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-31 19:53:08 +0300
committerDavid Benson <david@draw.io>2022-05-31 19:53:08 +0300
commitf18308fab6394585084de82c0c370bc3ab50a945 (patch)
treed9b50f5e04cdde4643cec39370dee4f187c57dec
parent064729fec4262f9373d9fdcafda0be47cd18dd50 (diff)
18.2.0 releasev18.2.0
-rw-r--r--ChangeLog9
-rw-r--r--VERSION2
-rw-r--r--src/main/java/com/mxgraph/online/ConverterServlet.java4
-rw-r--r--src/main/java/com/mxgraph/online/EmbedServlet2.java71
-rw-r--r--src/main/java/com/mxgraph/online/ExportProxyServlet.java19
-rw-r--r--src/main/java/com/mxgraph/online/ProxyServlet.java32
-rw-r--r--src/main/java/com/mxgraph/online/Utils.java52
-rw-r--r--src/main/webapp/js/app.min.js3265
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js8
-rw-r--r--src/main/webapp/js/diagramly/DrawioFile.js122
-rw-r--r--src/main/webapp/js/diagramly/Menus.js38
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js39
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js262
-rw-r--r--src/main/webapp/js/grapheditor/Format.js60
-rw-r--r--src/main/webapp/js/grapheditor/Graph.js22
-rw-r--r--src/main/webapp/js/grapheditor/Init.js5
-rw-r--r--src/main/webapp/js/integrate.min.js3685
-rw-r--r--src/main/webapp/js/viewer-static.min.js2325
-rw-r--r--src/main/webapp/js/viewer.min.js2325
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/resources/dia.txt2
-rw-r--r--src/main/webapp/resources/dia_am.txt2
-rw-r--r--src/main/webapp/resources/dia_ar.txt4
-rw-r--r--src/main/webapp/resources/dia_bg.txt2
-rw-r--r--src/main/webapp/resources/dia_bn.txt2
-rw-r--r--src/main/webapp/resources/dia_bs.txt2
-rw-r--r--src/main/webapp/resources/dia_ca.txt2
-rw-r--r--src/main/webapp/resources/dia_cs.txt2
-rw-r--r--src/main/webapp/resources/dia_da.txt2
-rw-r--r--src/main/webapp/resources/dia_de.txt2
-rw-r--r--src/main/webapp/resources/dia_el.txt2
-rw-r--r--src/main/webapp/resources/dia_eo.txt2
-rw-r--r--src/main/webapp/resources/dia_es.txt2
-rw-r--r--src/main/webapp/resources/dia_et.txt2
-rw-r--r--src/main/webapp/resources/dia_eu.txt2
-rw-r--r--src/main/webapp/resources/dia_fa.txt2
-rw-r--r--src/main/webapp/resources/dia_fi.txt2
-rw-r--r--src/main/webapp/resources/dia_fil.txt2
-rw-r--r--src/main/webapp/resources/dia_fr.txt2
-rw-r--r--src/main/webapp/resources/dia_gl.txt2
-rw-r--r--src/main/webapp/resources/dia_gu.txt2
-rw-r--r--src/main/webapp/resources/dia_he.txt2
-rw-r--r--src/main/webapp/resources/dia_hi.txt2
-rw-r--r--src/main/webapp/resources/dia_hr.txt2
-rw-r--r--src/main/webapp/resources/dia_hu.txt2
-rw-r--r--src/main/webapp/resources/dia_i18n.txt2
-rw-r--r--src/main/webapp/resources/dia_id.txt2
-rw-r--r--src/main/webapp/resources/dia_it.txt2
-rw-r--r--src/main/webapp/resources/dia_ja.txt2
-rw-r--r--src/main/webapp/resources/dia_kn.txt2
-rw-r--r--src/main/webapp/resources/dia_ko.txt2
-rw-r--r--src/main/webapp/resources/dia_lt.txt2
-rw-r--r--src/main/webapp/resources/dia_lv.txt2
-rw-r--r--src/main/webapp/resources/dia_ml.txt2
-rw-r--r--src/main/webapp/resources/dia_mr.txt2
-rw-r--r--src/main/webapp/resources/dia_ms.txt2
-rw-r--r--src/main/webapp/resources/dia_my.txt2
-rw-r--r--src/main/webapp/resources/dia_nl.txt2
-rw-r--r--src/main/webapp/resources/dia_no.txt2
-rw-r--r--src/main/webapp/resources/dia_pl.txt2
-rw-r--r--src/main/webapp/resources/dia_pt-br.txt2
-rw-r--r--src/main/webapp/resources/dia_pt.txt2
-rw-r--r--src/main/webapp/resources/dia_ro.txt2
-rw-r--r--src/main/webapp/resources/dia_ru.txt2
-rw-r--r--src/main/webapp/resources/dia_si.txt2
-rw-r--r--src/main/webapp/resources/dia_sk.txt2
-rw-r--r--src/main/webapp/resources/dia_sl.txt2
-rw-r--r--src/main/webapp/resources/dia_sr.txt2
-rw-r--r--src/main/webapp/resources/dia_sv.txt2
-rw-r--r--src/main/webapp/resources/dia_sw.txt2
-rw-r--r--src/main/webapp/resources/dia_ta.txt2
-rw-r--r--src/main/webapp/resources/dia_te.txt2
-rw-r--r--src/main/webapp/resources/dia_th.txt2
-rw-r--r--src/main/webapp/resources/dia_tr.txt2
-rw-r--r--src/main/webapp/resources/dia_uk.txt2
-rw-r--r--src/main/webapp/resources/dia_vi.txt2
-rw-r--r--src/main/webapp/resources/dia_zh-tw.txt2
-rw-r--r--src/main/webapp/resources/dia_zh.txt2
-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-fa8c4ce5.js.map2
81 files changed, 6389 insertions, 6082 deletions
diff --git a/ChangeLog b/ChangeLog
index 308eaafd..eb85cd99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+31-MAY-2022: 18.2.0
+
+- Fixes inconsistent menus in sketch theme
+- Fixes ignored XML data for importing embedded SVG
+- Fixes ignored double arrow marker selection [2839]
+- Fixes NPE with regex in find/replace dialog [2833]
+- Fixes link icons in dark mode
+- Fixes main button hover state in conf sketch macro
+
26-MAY-2022: 18.1.3
- Adds spacing dialog for parallels layout
diff --git a/VERSION b/VERSION
index e9197468..585739b6 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-18.1.3 \ No newline at end of file
+18.2.0 \ No newline at end of file
diff --git a/src/main/java/com/mxgraph/online/ConverterServlet.java b/src/main/java/com/mxgraph/online/ConverterServlet.java
index e82f6ff9..d010acaa 100644
--- a/src/main/java/com/mxgraph/online/ConverterServlet.java
+++ b/src/main/java/com/mxgraph/online/ConverterServlet.java
@@ -186,7 +186,7 @@ public class ConverterServlet extends HttpServlet
bytesRead = fileContent.read(data);
total += bytesRead;
- if (total > MAX_FILE_SIZE)
+ if (total > Utils.MAX_SIZE)
{
postRequest.close();
throw new Exception("File size exceeds the maximum allowed size of " + MAX_FILE_SIZE + " bytes.");
@@ -267,6 +267,8 @@ public class ConverterServlet extends HttpServlet
}
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+
+ throw e;
}
}
}
diff --git a/src/main/java/com/mxgraph/online/EmbedServlet2.java b/src/main/java/com/mxgraph/online/EmbedServlet2.java
index ef3ccb18..003b1830 100644
--- a/src/main/java/com/mxgraph/online/EmbedServlet2.java
+++ b/src/main/java/com/mxgraph/online/EmbedServlet2.java
@@ -44,6 +44,8 @@ import org.apache.commons.text.StringEscapeUtils;
import com.google.appengine.api.utils.SystemProperty;
+import com.mxgraph.online.Utils.SizeLimitExceededException;
+
/**
* Servlet implementation class OpenServlet
*/
@@ -70,11 +72,6 @@ public class EmbedServlet2 extends HttpServlet
protected static String lastModified = null;
/**
- * Max fetch size
- */
- protected static int MAX_FETCH_SIZE = 50 * 1024 * 1024; // 50 MB
-
- /**
*
*/
protected HashMap<String, String> stencils = new HashMap<String, String>();
@@ -222,15 +219,24 @@ public class EmbedServlet2 extends HttpServlet
}
}
}
+ catch (SizeLimitExceededException e)
+ {
+ response.setStatus(HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE);
+
+ throw e;
+ }
catch (Exception e)
{
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
+
+ throw e;
}
}
public void writeEmbedResponse(HttpServletRequest request,
HttpServletResponse response) throws IOException
{
+ response.setStatus(HttpServletResponse.SC_OK);
response.setCharacterEncoding("UTF-8");
response.setContentType("application/javascript; charset=UTF-8");
response.setHeader("Last-Modified", lastModified);
@@ -248,8 +254,6 @@ public class EmbedServlet2 extends HttpServlet
// Writes JavaScript and adds function call with
// stylesheet and stencils as arguments
writer.println(createEmbedJavaScript(request));
- response.setStatus(HttpServletResponse.SC_OK);
-
writer.flush();
writer.close();
}
@@ -397,42 +401,35 @@ public class EmbedServlet2 extends HttpServlet
if (urls != null)
{
HashSet<String> completed = new HashSet<String>();
- int sizeLimit = MAX_FETCH_SIZE;
+ int sizeLimit = Utils.MAX_SIZE;
for (int i = 0; i < urls.length; i++)
{
- try
+ // Checks if URL already fetched to avoid duplicates
+ if (!completed.contains(urls[i]) && Utils.sanitizeUrl(urls[i]))
{
- // Checks if URL already fetched to avoid duplicates
- if (!completed.contains(urls[i]) && Utils.sanitizeUrl(urls[i]))
+ completed.add(urls[i]);
+ URL url = new URL(urls[i]);
+ URLConnection connection = url.openConnection();
+ ((HttpURLConnection) connection).setInstanceFollowRedirects(false);
+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
+ String contentLength = connection.getHeaderField("Content-Length");
+
+ // If content length is available, use it to enforce maximum size
+ if (contentLength != null && Long.parseLong(contentLength) > sizeLimit)
{
- completed.add(urls[i]);
- URL url = new URL(urls[i]);
- URLConnection connection = url.openConnection();
- ((HttpURLConnection) connection).setInstanceFollowRedirects(false);
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- String contentLength = connection.getHeaderField("Content-Length");
-
- // If content length is available, use it to enforce maximum size
- if (contentLength != null && Long.parseLong(contentLength) > sizeLimit)
- {
- break;
- }
-
- sizeLimit -= Utils.copyRestricted(connection.getInputStream(), stream, sizeLimit);
- setCachedUrls += "GraphViewer.cachedUrls['"
- + StringEscapeUtils.escapeEcmaScript(urls[i])
- + "'] = decodeURIComponent('"
- + StringEscapeUtils.escapeEcmaScript(
- Utils.encodeURIComponent(
- stream.toString("UTF-8"),
- Utils.CHARSET_FOR_URL_ENCODING))
- + "');";
+ break;
}
- }
- catch (Exception e)
- {
- // ignore
+
+ sizeLimit -= Utils.copyRestricted(connection.getInputStream(), stream);
+ setCachedUrls += "GraphViewer.cachedUrls['"
+ + StringEscapeUtils.escapeEcmaScript(urls[i])
+ + "'] = decodeURIComponent('"
+ + StringEscapeUtils.escapeEcmaScript(
+ Utils.encodeURIComponent(
+ stream.toString("UTF-8"),
+ Utils.CHARSET_FOR_URL_ENCODING))
+ + "');";
}
}
}
diff --git a/src/main/java/com/mxgraph/online/ExportProxyServlet.java b/src/main/java/com/mxgraph/online/ExportProxyServlet.java
index fcb4d088..f026bd87 100644
--- a/src/main/java/com/mxgraph/online/ExportProxyServlet.java
+++ b/src/main/java/com/mxgraph/online/ExportProxyServlet.java
@@ -14,6 +14,8 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import com.mxgraph.online.Utils.SizeLimitExceededException;
+
/**
* Servlet implementation ExportProxyServlet
*/
@@ -21,7 +23,6 @@ import javax.servlet.http.HttpServletResponse;
public class ExportProxyServlet extends HttpServlet
{
private final String[] supportedServices = {"EXPORT_URL", "PLANTUML_URL", "VSD_CONVERT_URL", "EMF_CONVERT_URL"};
- private static int MAX_FETCH_SIZE = 50 * 1024 * 1024; // 50 MB
private void doRequest(String method, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
@@ -103,7 +104,7 @@ public class ExportProxyServlet extends HttpServlet
con.setDoOutput(true);
OutputStream params = con.getOutputStream();
- Utils.copyRestricted(request.getInputStream(), params, MAX_FETCH_SIZE);
+ Utils.copyRestricted(request.getInputStream(), params);
params.flush();
params.close();
}
@@ -145,6 +146,12 @@ public class ExportProxyServlet extends HttpServlet
out.flush();
out.close();
}
+ catch (SizeLimitExceededException e)
+ {
+ response.setStatus(HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE);
+
+ throw e;
+ }
catch (Exception e)
{
response.setStatus(
@@ -157,8 +164,8 @@ public class ExportProxyServlet extends HttpServlet
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
- protected void doGet(HttpServletRequest request,
- HttpServletResponse response) throws ServletException, IOException
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
{
doRequest("GET", request, response);
}
@@ -166,8 +173,8 @@ public class ExportProxyServlet extends HttpServlet
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
- protected void doPost(HttpServletRequest request,
- HttpServletResponse response) throws ServletException, IOException
+ protected void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException
{
doRequest("POST", request, response);
}
diff --git a/src/main/java/com/mxgraph/online/ProxyServlet.java b/src/main/java/com/mxgraph/online/ProxyServlet.java
index d9b9621a..bb649706 100644
--- a/src/main/java/com/mxgraph/online/ProxyServlet.java
+++ b/src/main/java/com/mxgraph/online/ProxyServlet.java
@@ -24,6 +24,7 @@ import javax.servlet.http.HttpServletResponse;
import com.google.apphosting.api.DeadlineExceededException;
import com.mxgraph.online.Utils.UnsupportedContentException;
+import com.mxgraph.online.Utils.SizeLimitExceededException;
/**
* Servlet implementation ProxyServlet
@@ -35,22 +36,12 @@ public class ProxyServlet extends HttpServlet
.getLogger(HttpServlet.class.getName());
/**
- * Buffer size for content pass-through.
- */
- private static int BUFFER_SIZE = 3 * 1024;
-
- /**
* GAE deadline is 30 secs so timeout before that to avoid
* HardDeadlineExceeded errors.
*/
private static final int TIMEOUT = 29000;
/**
- * Max fetch size
- */
- protected static int MAX_FETCH_SIZE = 50 * 1024 * 1024; // 50 MB
-
- /**
* A resuable empty byte array instance.
*/
private static byte[] emptyBytes = new byte[0];
@@ -140,13 +131,12 @@ public class ProxyServlet extends HttpServlet
if (status >= 200 && status <= 299)
{
response.setStatus(status);
-
String contentLength = connection.getHeaderField("Content-Length");
// If content length is available, use it to enforce maximum size
- if (contentLength != null && Long.parseLong(contentLength) > MAX_FETCH_SIZE)
+ if (contentLength != null && Long.parseLong(contentLength) > Utils.MAX_SIZE)
{
- throw new UnsupportedContentException();
+ throw new SizeLimitExceededException();
}
// Copies input stream to output stream
@@ -192,6 +182,12 @@ public class ProxyServlet extends HttpServlet
+ ", referer=" + ((ref != null) ? ref : "[null]")
+ ", user agent=" + ((ua != null) ? ua : "[null]"));
}
+ catch (SizeLimitExceededException e)
+ {
+ response.setStatus(HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE);
+
+ throw e;
+ }
catch (Exception e)
{
response.setStatus(
@@ -201,6 +197,8 @@ public class ProxyServlet extends HttpServlet
+ ", referer=" + ((ref != null) ? ref : "[null]")
+ ", user agent=" + ((ua != null) ? ua : "[null]"));
e.printStackTrace();
+
+ throw e;
}
}
else
@@ -224,7 +222,7 @@ public class ProxyServlet extends HttpServlet
int total = 0;
try (BufferedInputStream in = new BufferedInputStream(is,
- BUFFER_SIZE))
+ Utils.IO_BUFFER_SIZE))
{
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buffer = new byte[0xFFFF];
@@ -235,9 +233,9 @@ public class ProxyServlet extends HttpServlet
{
total += len;
- if (total > MAX_FETCH_SIZE)
+ if (total > Utils.MAX_SIZE)
{
- throw new IOException("Size limit exceeded");
+ throw new SizeLimitExceededException();
}
os.write(buffer, 0, len);
@@ -249,7 +247,7 @@ public class ProxyServlet extends HttpServlet
else
{
out.write(head);
- Utils.copyRestricted(is, out, MAX_FETCH_SIZE);
+ Utils.copyRestricted(is, out);
}
}
diff --git a/src/main/java/com/mxgraph/online/Utils.java b/src/main/java/com/mxgraph/online/Utils.java
index 238e1d9c..45f4a9ae 100644
--- a/src/main/java/com/mxgraph/online/Utils.java
+++ b/src/main/java/com/mxgraph/online/Utils.java
@@ -34,14 +34,6 @@ import java.net.InetAddress;
public class Utils
{
- /**
- *
- */
- public static class UnsupportedContentException extends Exception
- {
- private static final long serialVersionUID = 1239597891574347740L;
- }
-
private static SecureRandom randomSecure = new SecureRandom();
/**
@@ -52,7 +44,12 @@ public class Utils
/**
*
*/
- protected static final int IO_BUFFER_SIZE = 4 * 1024;
+ public static int MAX_SIZE = 20 * 1024 * 1024; // 20 MB
+
+ /**
+ *
+ */
+ public static final int IO_BUFFER_SIZE = 4 * 1024;
/**
* Alphabet for global unique IDs.
@@ -152,6 +149,18 @@ public class Utils
* @param sizeLimit the maximum number of bytes to copy
* @throws IOException
*/
+ public static int copyRestricted(InputStream in, OutputStream out) throws IOException
+ {
+ return copy(in, out, IO_BUFFER_SIZE, MAX_SIZE);
+ }
+
+ /**
+ * Copies the input stream to the output stream using the default buffer size
+ * @param in the input stream
+ * @param out the output stream
+ * @param sizeLimit the maximum number of bytes to copy
+ * @throws IOException
+ */
public static int copyRestricted(InputStream in, OutputStream out, int sizeLimit) throws IOException
{
return copy(in, out, IO_BUFFER_SIZE, sizeLimit);
@@ -190,7 +199,7 @@ public class Utils
if (sizeLimit > 0 && total > sizeLimit)
{
- throw new IOException("Size limit exceeded");
+ throw new SizeLimitExceededException();
}
out.write(b, 0, read);
@@ -516,7 +525,8 @@ public class Utils
{
try
{
- Double.parseDouble(str);
+ Double.parseDouble(str);
+
return true;
}
catch(NumberFormatException e)
@@ -593,4 +603,24 @@ public class Utils
return false;
}
}
+
+ /**
+ *
+ */
+ public static class UnsupportedContentException extends Exception
+ {
+ private static final long serialVersionUID = 1239597891574347740L;
+ }
+
+ /**
+ * Exception for size limit exceeeded in copy request.
+ */
+ public static class SizeLimitExceededException extends IOException
+ {
+ public SizeLimitExceededException()
+ {
+ super("Size limit exceeded");
+ }
+ }
+
}
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 00d355ff..ad012a61 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -467,9 +467,9 @@ return a}();
a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
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.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i};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";
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.0",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]"!==
@@ -2293,8 +2293,8 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(a,b,f,e,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=e||this.createGraph(b,f);this.editable=null!=g?g:!a;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(d){this.status=d;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(d,k){d=null!=k?k.getProperty("edit"):null;null!=d&&d.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;
+Editor=function(a,b,f,d,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,f);this.editable=null!=g?g:!a;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(e){this.status=e;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(e,k){e=null!=k?k.getProperty("edit"):null;null!=e&&e.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 a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();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+
@@ -2327,12 +2327,12 @@ 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(a){return null!=a&&"data:image/png;"==a.substring(0,15)};Editor.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(g,d,k){g=e.substring(g+8,g+8+k);"zTXt"==d?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==d&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
-g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==d)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.isDarkMode=function(a){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.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(g,e,k){g=d.substring(g+8,g+8+k);"zTXt"==e?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==e&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
+g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==e)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.isDarkMode=function(a){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(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,b){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,e=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",e),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",e);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,e=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!e.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
+Editor.prototype.editAsNew=function(a,b){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,d=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",d),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",d);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,d=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!d.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(a){var b=a.getAttribute("grid");if(null==b||""==b)b=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=b&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled=
@@ -2344,62 +2344,62 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<e.length){a.getModel();g=[];for(var d=0;d<e.length;d++)null!=
-a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(d,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(d,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,g){d=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<d.length){a.getModel();g=[];for(var e=0;e<d.length;e++)null!=
+a.view.getState(d[e])&&g.push(d[e]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,A=f,C=e,F=u?0:64,K=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(K.height=window.innerHeight);var E=K.height,O=Math.max(1,Math.round((K.width-f-F)/2)),R=Math.max(1,Math.round((E-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,E-F);0<a.dialogs.length&&(this.zIndex+=
+function Dialog(a,b,f,d,g,e,k,n,u,m,r){var x=u?57:0,A=f,C=d,F=u?0:64,K=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(K.height=window.innerHeight);var E=K.height,O=Math.max(1,Math.round((K.width-f-F)/2)),R=Math.max(1,Math.round((E-d-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;d=Math.min(d,E-F);0<a.dialogs.length&&(this.zIndex+=
2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=E+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));K=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=K.x+"px";this.bg.style.top=K.y+"px";O+=K.x;R+=K.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-R+=a.embedViewport.y,O+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var Q=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(O,R,f,e);O=g.x;R=g.y;Q.style.width=f+"px";Q.style.height=e+"px";Q.style.left=O+"px";Q.style.top=R+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!n&&b.clientHeight>Q.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),
-d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=R+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){P=!0}),null,mxUtils.bind(this,function(aa){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m();
-null!=aa&&(A=f=aa.w,C=e=aa.h)}aa=mxUtils.getDocumentSize();E=aa.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((E-e-a.footerHeight)/3));f=null!=document.body?Math.min(A,document.body.scrollWidth-F):A;e=Math.min(C,E-F);aa=this.getPosition(O,R,f,e);O=aa.x;R=aa.y;Q.style.left=O+"px";Q.style.top=R+"px";Q.style.width=f+"px";Q.style.height=e+
+R+=a.embedViewport.y,O+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var Q=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(O,R,f,d);O=g.x;R=g.y;Q.style.width=f+"px";Q.style.height=d+"px";Q.style.left=O+"px";Q.style.top=R+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!n&&b.clientHeight>Q.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),
+e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=R+14+"px",e.style.left=O+f+38-x+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){P=!0}),null,mxUtils.bind(this,function(aa){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m();
+null!=aa&&(A=f=aa.w,C=d=aa.h)}aa=mxUtils.getDocumentSize();E=aa.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((E-d-a.footerHeight)/3));f=null!=document.body?Math.min(A,document.body.scrollWidth-F):A;d=Math.min(C,E-F);aa=this.getPosition(O,R,f,d);O=aa.x;R=aa.y;Q.style.left=O+"px";Q.style.top=R+"px";Q.style.width=f+"px";Q.style.height=d+
"px";!n&&b.clientHeight>Q.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=Q;a.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(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))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(a,b,f,e,g,d,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var A=document.createElement("div");A.style.padding="0px";A.style.margin="0px";A.style.fontSize="18px";A.style.paddingBottom="16px";A.style.marginBottom="10px";A.style.borderBottom="1px solid #c0c0c0";A.style.color="gray";A.style.whiteSpace="nowrap";A.style.textOverflow="ellipsis";A.style.overflow="hidden";mxUtils.write(A,b);A.setAttribute("title",b);x.appendChild(A)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()});
-C.className="geBtn";f.appendChild(C);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
+var ErrorDialog=function(a,b,f,d,g,e,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var A=document.createElement("div");A.style.padding="0px";A.style.margin="0px";A.style.fontSize="18px";A.style.paddingBottom="16px";A.style.marginBottom="10px";A.style.borderBottom="1px solid #c0c0c0";A.style.color="gray";A.style.whiteSpace="nowrap";A.style.textOverflow="ellipsis";A.style.overflow="hidden";mxUtils.write(A,b);A.setAttribute("title",b);x.appendChild(A)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(d,function(){u&&a.hideDialog();null!=g&&g()});
+C.className="geBtn";f.appendChild(C);null!=k&&(d=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
PrintDialog.prototype.create=function(a){function b(C){var F=k.checked||m.checked,K=parseInt(x.value)/100;isNaN(K)&&(K=1,x.value="100%");K*=.75;var E=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(O=mxUtils.getScaleForPageCount(R,f,E))}f.getGraphBounds();var Q=R=0;E=mxRectangle.fromRectangle(E);E.width=Math.ceil(E.width*K);E.height=Math.ceil(E.height*K);O*=K;!F&&f.pageVisible?(K=f.getPageLayout(),R-=K.x*E.width,Q-=K.y*E.height):
-F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,R,Q,F);F.open();C&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
-"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});d.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(m,"change",
-function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
+F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,R,Q,F);F.open();C&&PrintDialog.printPreview(F)}var f=a.editor.graph,d=document.createElement("table");d.style.width="100%";d.style.height="100%";var g=document.createElement("tbody");var e=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});e.appendChild(n);g.appendChild(e);e=e.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
+"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});e.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");e.appendChild(n);g.appendChild(e);mxEvent.addListener(m,"change",
+function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});e=e.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");e.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);e.appendChild(n);g.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
n.style.paddingTop="20px";n.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&n.appendChild(u);if(PrintDialog.previewEnabled){var A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});A.className="geBtn";n.appendChild(A)}A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});A.className="geBtn gePrimaryBtn";n.appendChild(A);a.editor.cancelFirst||
-n.appendChild(u);d.appendChild(n);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
-PrintDialog.createPrintPreview=function(a,b,f,e,g,d,k){b=new mxPrintPreview(a,b,f,e,g,d);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
+n.appendChild(u);e.appendChild(n);g.appendChild(e);d.appendChild(g);this.container=d};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
+PrintDialog.createPrintPreview=function(a,b,f,d,g,e,k){b=new mxPrintPreview(a,b,f,d,g,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var E=F;null!=E&&Graph.isPageLink(E.src)&&(E=a.createImageForPageLink(E.src,null));null!=E&&null!=E.src?(C.setAttribute("src",E.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var e=a.editor.graph,g=document.createElement("table");g.style.width=
-"100%";g.style.height="100%";var d=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",e.pageFormat);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=e.background;b();mxEvent.addListener(m,
-"click",function(E){a.pickColor(r||"none",function(O){r=O;b()});mxEvent.consume(E)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var E=parseInt(x.value);x.value=Math.max(1,isNaN(E)?e.getGridSize():E)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr");
+var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var E=F;null!=E&&Graph.isPageLink(E.src)&&(E=a.createImageForPageLink(E.src,null));null!=E&&null!=E.src?(C.setAttribute("src",E.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var d=a.editor.graph,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var e=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
+mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=d.background;b();mxEvent.addListener(m,
+"click",function(E){a.pickColor(r||"none",function(O){r=O;b()});mxEvent.consume(E)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=d.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var E=parseInt(x.value);x.value=Math.max(1,isNaN(E)?d.getGridSize():E)});k.appendChild(n);e.appendChild(k);k=document.createElement("tr");
n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var A=document.createElement("button");A.className="geBtn";A.style.margin="0px";mxUtils.write(A,mxResources.get("change")+"...");var C=document.createElement("img");C.setAttribute("valign","middle");C.style.verticalAlign="middle";C.style.border="1px solid lightGray";C.style.borderRadius="4px";C.style.marginRight="14px";C.style.maxWidth="100px";C.style.cursor="pointer";C.style.height=
-"60px";C.style.padding="4px";var F=e.backgroundImage,K=function(E){a.showBackgroundImageDialog(function(O,R){R||(F=O,f())},F);mxEvent.consume(E)};mxEvent.addListener(A,"click",K);mxEvent.addListener(C,"click",K);f();n.appendChild(C);n.appendChild(A);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});A.className="geBtn";
-a.editor.cancelFirst&&n.appendChild(A);K=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(x.value);isNaN(E)||e.gridSize===E||e.setGridSize(E);E=new ChangePageSetup(a,r,F,u.get());E.ignoreColor=e.background==r;E.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==E.previousFormat.width&&e.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage||e.model.execute(E)});K.className="geBtn gePrimaryBtn";
-n.appendChild(K);a.editor.cancelFirst||n.appendChild(A);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g};
-PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(aa,T,U){if(U||x!=document.activeElement&&A!=document.activeElement){aa=!1;for(T=0;T<F.length;T++)U=F[T],R?"custom"==U.key&&(n.value=U.key,R=!1):null!=U.format&&("a4"==U.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==U.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==U.format.width&&
-f.height==U.format.height?(n.value=U.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==U.format.height&&f.height==U.format.width&&(n.value=U.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(u.style.display="",r.style.display="none"):(x.value=f.width/100,A.value=f.height/100,d.setAttribute("checked","checked"),
-n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
-document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";d.style.marginRight="6px";u.appendChild(d);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
+"60px";C.style.padding="4px";var F=d.backgroundImage,K=function(E){a.showBackgroundImageDialog(function(O,R){R||(F=O,f())},F);mxEvent.consume(E)};mxEvent.addListener(A,"click",K);mxEvent.addListener(C,"click",K);f();n.appendChild(C);n.appendChild(A);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});A.className="geBtn";
+a.editor.cancelFirst&&n.appendChild(A);K=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(x.value);isNaN(E)||d.gridSize===E||d.setGridSize(E);E=new ChangePageSetup(a,r,F,u.get());E.ignoreColor=d.background==r;E.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=F?F.src:null);d.pageFormat.width==E.previousFormat.width&&d.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage||d.model.execute(E)});K.className="geBtn gePrimaryBtn";
+n.appendChild(K);a.editor.cancelFirst||n.appendChild(A);k.appendChild(n);e.appendChild(k);g.appendChild(e);this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function g(aa,T,U){if(U||x!=document.activeElement&&A!=document.activeElement){aa=!1;for(T=0;T<F.length;T++)U=F[T],R?"custom"==U.key&&(n.value=U.key,R=!1):null!=U.format&&("a4"==U.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==U.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==U.format.width&&
+f.height==U.format.height?(n.value=U.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==U.format.height&&f.height==U.format.width&&(n.value=U.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(u.style.display="",r.style.display="none"):(x.value=f.width/100,A.value=f.height/100,e.setAttribute("checked","checked"),
+n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var e=document.createElement("input");e.setAttribute("name",b);e.setAttribute("type","radio");e.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
+document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";e.style.marginRight="6px";u.appendChild(e);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var A=document.createElement("input");A.setAttribute("size","7");A.style.textAlign="right";r.appendChild(A);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var C={},F=PageSetupDialog.getFormats(),K=0;K<F.length;K++){var E=F[K];C[E.key]=E;var O=document.createElement("option");O.setAttribute("value",
E.key);mxUtils.write(O,E.title);n.appendChild(O)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var Q=f,P=function(aa,T){aa=C[n.value];null!=aa.format?(x.value=aa.format.width/100,A.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(A.value);if(isNaN(aa)||0>=aa)A.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
-Math.floor(100*parseFloat(A.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));T&&R||aa.width==Q.width&&aa.height==Q.height||(Q=aa,null!=e&&e(Q))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(A,"blur",P);mxEvent.addListener(A,"click",P);mxEvent.addListener(k,"change",
-P);mxEvent.addListener(d,"change",P);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;P(aa,!0)});P();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return Q},widthInput:x,heightInput:A}};
+Math.floor(100*parseFloat(A.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));T&&R||aa.width==Q.width&&aa.height==Q.height||(Q=aa,null!=d&&d(Q))};mxEvent.addListener(b,"click",function(aa){e.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(A,"blur",P);mxEvent.addListener(A,"click",P);mxEvent.addListener(k,"change",
+P);mxEvent.addListener(e,"change",P);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;P(aa,!0)});P();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return Q},widthInput:x,heightInput:A}};
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(a,b,f,e,g,d,k,n,u,m,r,x){u=null!=u?u:!0;var A=document.createElement("table"),C=document.createElement("tbody");A.style.position="absolute";A.style.top="30px";A.style.left="20px";var F=document.createElement("tr");var K=document.createElement("td");K.style.textOverflow="ellipsis";K.style.textAlign="right";K.style.maxWidth="100px";K.style.fontSize="10pt";K.style.width="84px";mxUtils.write(K,(g||mxResources.get("filename"))+":");F.appendChild(K);var E=document.createElement("input");
-E.setAttribute("value",b||"");E.style.marginLeft="4px";E.style.width=null!=x?x+"px":"180px";var O=mxUtils.button(f,function(){if(null==d||d(E.value))u&&a.hideDialog(),e(E.value)});O.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var R=A.parentNode;if(null!=R){var Q=null;mxEvent.addListener(R,"dragleave",function(P){null!=Q&&(Q.style.backgroundColor=
+var FilenameDialog=function(a,b,f,d,g,e,k,n,u,m,r,x){u=null!=u?u:!0;var A=document.createElement("table"),C=document.createElement("tbody");A.style.position="absolute";A.style.top="30px";A.style.left="20px";var F=document.createElement("tr");var K=document.createElement("td");K.style.textOverflow="ellipsis";K.style.textAlign="right";K.style.maxWidth="100px";K.style.fontSize="10pt";K.style.width="84px";mxUtils.write(K,(g||mxResources.get("filename"))+":");F.appendChild(K);var E=document.createElement("input");
+E.setAttribute("value",b||"");E.style.marginLeft="4px";E.style.width=null!=x?x+"px":"180px";var O=mxUtils.button(f,function(){if(null==e||e(E.value))u&&a.hideDialog(),d(E.value)});O.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var R=A.parentNode;if(null!=R){var Q=null;mxEvent.addListener(R,"dragleave",function(P){null!=Q&&(Q.style.backgroundColor=
"",Q=null);P.stopPropagation();P.preventDefault()});mxEvent.addListener(R,"dragover",mxUtils.bind(this,function(P){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=E,Q.style.backgroundColor="#ebf2f9");P.stopPropagation();P.preventDefault()}));mxEvent.addListener(R,"drop",mxUtils.bind(this,function(P){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(P.dataTransfer.getData("text/uri-list")),O.click());P.stopPropagation();
P.preventDefault()}))}}};K=document.createElement("td");K.style.whiteSpace="nowrap";K.appendChild(E);F.appendChild(K);if(null!=g||null==k)C.appendChild(F),null!=r&&(K.appendChild(FilenameDialog.createTypeHint(a,E,r)),null!=a.editor.diagramFileTypes&&(F=document.createElement("tr"),K=document.createElement("td"),K.style.textOverflow="ellipsis",K.style.textAlign="right",K.style.maxWidth="100px",K.style.fontSize="10pt",K.style.width="84px",mxUtils.write(K,mxResources.get("type")+":"),F.appendChild(K),
K=document.createElement("td"),K.style.whiteSpace="nowrap",F.appendChild(K),b=FilenameDialog.createFileTypes(a,E,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",K.appendChild(b),E.style.width=null!=x?x-40+"px":"190px",F.appendChild(K),C.appendChild(F)));null!=k&&(F=document.createElement("tr"),K=document.createElement("td"),K.colSpan=2,K.appendChild(k),F.appendChild(K),C.appendChild(F));F=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop=
null!=r?"12px":"20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&K.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",K.appendChild(x));mxEvent.addListener(E,"keypress",function(R){13==R.keyCode&&O.click()});K.appendChild(O);a.editor.cancelFirst||K.appendChild(r);F.appendChild(K);C.appendChild(F);
A.appendChild(C);this.container=A};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,f){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var g=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var d=0;d<f.length;d++)if(0<f[d].ext.length&&b.value.toLowerCase().substring(b.value.length-
-f[d].ext.length-1)=="."+f[d].ext){e.setAttribute("title",mxResources.get(f[d].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(e,"click",function(d){var k=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(d)});
-g();return e};
-FilenameDialog.createFileTypes=function(a,b,f){var e=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");e.appendChild(g)}mxEvent.addListener(e,"change",function(d){d=f[e.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<k?b.value.substring(0,k+1)+d:b.value+"."+d;"createEvent"in
-document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(d.substring(d.length-u.length-1)=="."+u||null!=m&&d.substring(d.length-m.length-1)=="."+m){k=n;break}}e.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return e};
+FilenameDialog.createTypeHint=function(a,b,f){var d=document.createElement("img");d.style.backgroundPosition="center bottom";d.style.backgroundRepeat="no-repeat";d.style.margin="2px 0 0 4px";d.style.verticalAlign="top";d.style.cursor="pointer";d.style.height="16px";d.style.width="16px";mxUtils.setOpacity(d,70);var g=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var e=0;e<f.length;e++)if(0<f[e].ext.length&&b.value.toLowerCase().substring(b.value.length-
+f[e].ext.length-1)=="."+f[e].ext){d.setAttribute("title",mxResources.get(f[e].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(d,"click",function(e){var k=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(e)});
+g();return d};
+FilenameDialog.createFileTypes=function(a,b,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(g)}mxEvent.addListener(d,"change",function(e){e=f[d.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=e&&(e="drawio."+e);b.value=0<k?b.value.substring(0,k+1)+e:b.value+"."+e;"createEvent"in
+document?(e=document.createEvent("HTMLEvents"),e.initEvent("change",!1,!0),b.dispatchEvent(e)):b.fireEvent("onchange")});a=function(e){e=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(e.substring(e.length-u.length-1)=="."+u||null!=m&&e.substring(e.length-m.length-1)=="."+m){k=n;break}}d.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph;if(null!=k.container&&!k.transparentBackground){if(k.pageVisible){var n=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var u=k.container.firstChild;null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.nextSibling;null!=u&&(this.backgroundPageShape=this.createBackgroundPageShape(n),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(k.container),u.style.position="absolute",k.container.insertBefore(this.backgroundPageShape.node,u),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(m){k.dblClick(m)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){null!=
k.tooltipHandler&&k.tooltipHandler.isHideOnHover()&&k.tooltipHandler.hide();k.isMouseDown&&!mxEvent.isConsumed(m)&&k.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(m))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=n,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2412,97 +2412,98 @@ n=C.width;u=C.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*A,x.height*A),K=(
Math.round(C.y+(aa+1)*F.height)),new mxPoint(Math.round(O),Math.round(C.y+(aa+1)*F.height))]:[new mxPoint(Math.round(C.x+(aa+1)*F.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(aa+1)*F.width),Math.round(R))];null!=Q[aa]?(Q[aa].points=T,Q[aa].redraw()):(T=new mxPolyline(T,this.pageBreakColor),T.dialect=this.dialect,T.isDashed=this.pageBreakDashed,T.pointerEvents=!1,T.init(this.view.backgroundPane),T.redraw(),Q[aa]=T)}for(aa=P;aa<Q.length;aa++)Q[aa].destroy();Q.splice(P,Q.length-P)}});k(this.horizontalPageBreaks);
k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=
f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,
-r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var A=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+A*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-A)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var A=g.apply(this,arguments);null==x||x||mxEvent.addListener(A,"mousedown",function(C){mxEvent.consume(C)});return A};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
-this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var I=g.apply(this,arguments),L=this.backgroundImage;if(null!=L&&null!=L.width&&null!=L.height){var H=this.view.translate,S=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((H.x+L.x)*S,(H.y+L.y)*S,L.width*S,L.height*S))}return I};e.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,L){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");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(b=0;b<u.length;b++)0>mxUtils.indexOf(d,u[b])&&d.push(u[b]);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(b=0;b<r.length;b++)for(f=0;f<r[b].length;f++)d.push(r[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);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 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=
+r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var A=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+A*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-A)*m)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var A=g.apply(this,arguments);null==x||x||mxEvent.addListener(A,"mousedown",function(C){mxEvent.consume(C)});return A};var e=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=e.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
+this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=f;var g=d.getGraphBounds;d.getGraphBounds=function(){var I=g.apply(this,arguments),L=this.backgroundImage;if(null!=L&&null!=L.width&&null!=L.height){var H=this.view.translate,S=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((H.x+L.x)*S,(H.y+L.y)*S,L.width*S,L.height*S))}return I};d.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,L){this.clearSelectionState()});d.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+d.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);d.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);d.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);d.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
+this.createMenus();if(!d.standalone){var e="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var L=d.getCellStyle(I,!1),H=[],S=[],V;for(V in L)H.push(L[V]),S.push(V);d.getModel().isEdge(I)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",S,"values",H,"cells",[I]))}catch(ea){this.handleError(ea)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);
+d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var u=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<u.length;b++)0>mxUtils.indexOf(e,u[b])&&e.push(u[b]);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(b=0;b<r.length;b++)for(f=0;f<r[b].length;f++)e.push(r[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(e,k[b])&&e.push(k[b]);var x=function(I,L,H,S,V,ea,ka){S=null!=S?S:d.currentVertexStyle;V=null!=V?V:d.currentEdgeStyle;ea=null!=ea?ea:!0;H=null!=H?H:d.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),ua=null!=oa?oa.split(";"):[];Z=e.slice();for(var Ja=0;Ja<ua.length;Ja++){var Ga=ua[Ja],va=Ga.indexOf("=");if(0<=va){var za=Ga.substring(0,va),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};d.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});d.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 d.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?(b=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",b):this.diagramContainer.oncontextmenu=
-b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.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);
-0<mxEvent.getClientX(I)-L.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-L.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var F=!1,K=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,L){return F||K.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||e.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,
-!0):(F=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(I)!=e.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){e.container.style.cursor="";F=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var E=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(I){return E.apply(this,arguments)||F||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||
-!mxEvent.isPopupTrigger(I.getEvent()))&&(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var O=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(I){return O.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 R=e.isZoomWheelEvent;e.isZoomWheelEvent=function(){return F||R.apply(this,arguments)};
-var Q=!1,P=null,aa=null,T=null,U=mxUtils.bind(this,function(){if(null!=this.toolbar&&Q!=e.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,L=[];null!=I;){var H=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),L.push(I));I=H}I=this.toolbar.fontMenu;H=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var S=0;S<T.length;S++)this.toolbar.container.appendChild(T[S]);this.toolbar.fontMenu=P;this.toolbar.sizeMenu=
-aa}Q=e.cellEditor.isContentEditing();P=I;aa=H;T=L}}),fa=this,ha=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){ha.apply(this,arguments);U();if(e.cellEditor.isContentEditing()){var I=!1,L=function(){I||(I=!0,window.setTimeout(function(){var H=e.getSelectedEditingElement();null!=H&&(H=mxUtils.getCurrentStyle(H),null!=H&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(H.fontFamily)),fa.toolbar.setFontSize(parseInt(H.fontSize))));I=!1},0))};mxEvent.addListener(e.cellEditor.textarea,
-"input",L);mxEvent.addListener(e.cellEditor.textarea,"touchend",L);mxEvent.addListener(e.cellEditor.textarea,"mouseup",L);mxEvent.addListener(e.cellEditor.textarea,"keyup",L);L()}};var ba=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(I,L){try{ba.apply(this,arguments),U()}catch(H){fa.handleError(H)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(I){}var qa=e.fireMouseEvent;
-e.fireMouseEvent=function(I,L,H){I==mxEvent.MOUSE_DOWN&&this.container.focus();qa.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,L,H){this.menus.createPopupMenu(I,L,H)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,function(I,
-L){var H=[L.getProperty("cell")];L.getProperty("terminalInserted")&&(H.push(L.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(H[H.length-1]))},0));x(H)});this.addListener("styleChanged",mxUtils.bind(this,function(I,L){var H=L.getProperty("cells"),S=I=!1;if(0<H.length)for(var V=0;V<H.length&&(I=e.getModel().isVertex(H[V])||I,!(S=e.getModel().isEdge(H[V])||S)||!I);V++);else S=I=!0;H=L.getProperty("keys");L=L.getProperty("values");for(V=
-0;V<H.length;V++){var ea=0<=mxUtils.indexOf(u,H[V]);if("strokeColor"!=H[V]||null!=L[V]&&"none"!=L[V])if(0<=mxUtils.indexOf(k,H[V]))S||0<=mxUtils.indexOf(m,H[V])?null==L[V]?delete e.currentEdgeStyle[H[V]]:e.currentEdgeStyle[H[V]]=L[V]:I&&0<=mxUtils.indexOf(d,H[V])&&(null==L[V]?delete e.currentVertexStyle[H[V]]:e.currentVertexStyle[H[V]]=L[V]);else if(0<=mxUtils.indexOf(d,H[V])){if(I||ea)null==L[V]?delete e.currentVertexStyle[H[V]]:e.currentVertexStyle[H[V]]=L[V];if(S||ea||0<=mxUtils.indexOf(m,H[V]))null==
-L[V]?delete e.currentEdgeStyle[H[V]]:e.currentEdgeStyle[H[V]]=L[V]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==e.currentEdgeStyle.edgeStyle||
-"none"==e.currentEdgeStyle.edgeStyle||null==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
-null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",e.currentEdgeStyle.shape,e.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
-mxUtils.getValue(e.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",e.currentEdgeStyle.shape,e.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(e.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var I=e.currentVertexStyle.fontFamily||"Helvetica",L=String(e.currentVertexStyle.fontSize||"12"),H=e.getView().getState(e.getSelectionCell());
-null!=H&&(I=H.style[mxConstants.STYLE_FONTFAMILY]||I,L=H.style[mxConstants.STYLE_FONTSIZE]||L,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(L)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(I,L){I=L.getProperty("cells");L=L.getProperty("parent");null!=L&&e.getModel().isLayer(L)&&!e.isCellVisible(L)&&null!=I&&0<I.length&&e.getModel().setVisible(L,!0)});this.gestureHandler=
+b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var C=d.graphHandler.start;d.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);
+0<mxEvent.getClientX(I)-L.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-L.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var F=!1,K=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,L){return F||K.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||d.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,
+!0):(F=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(I)!=d.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){d.container.style.cursor="";F=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var E=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(I){return E.apply(this,arguments)||F||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||
+!mxEvent.isPopupTrigger(I.getEvent()))&&(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var O=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(I){return O.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 R=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return F||R.apply(this,arguments)};
+var Q=!1,P=null,aa=null,T=null,U=mxUtils.bind(this,function(){if(null!=this.toolbar&&Q!=d.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,L=[];null!=I;){var H=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),L.push(I));I=H}I=this.toolbar.fontMenu;H=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var S=0;S<T.length;S++)this.toolbar.container.appendChild(T[S]);this.toolbar.fontMenu=P;this.toolbar.sizeMenu=
+aa}Q=d.cellEditor.isContentEditing();P=I;aa=H;T=L}}),fa=this,ha=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){ha.apply(this,arguments);U();if(d.cellEditor.isContentEditing()){var I=!1,L=function(){I||(I=!0,window.setTimeout(function(){var H=d.getSelectedEditingElement();null!=H&&(H=mxUtils.getCurrentStyle(H),null!=H&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(H.fontFamily)),fa.toolbar.setFontSize(parseInt(H.fontSize))));I=!1},0))};mxEvent.addListener(d.cellEditor.textarea,
+"input",L);mxEvent.addListener(d.cellEditor.textarea,"touchend",L);mxEvent.addListener(d.cellEditor.textarea,"mouseup",L);mxEvent.addListener(d.cellEditor.textarea,"keyup",L);L()}};var ba=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(I,L){try{ba.apply(this,arguments),U()}catch(H){fa.handleError(H)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(I){}var qa=d.fireMouseEvent;
+d.fireMouseEvent=function(I,L,H){I==mxEvent.MOUSE_DOWN&&this.container.focus();qa.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,L,H){this.menus.createPopupMenu(I,L,H)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};d.connectionHandler.addListener(mxEvent.CONNECT,function(I,
+L){var H=[L.getProperty("cell")];L.getProperty("terminalInserted")&&(H.push(L.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(d.view.getState(H[H.length-1]))},0));x(H)});this.addListener("styleChanged",mxUtils.bind(this,function(I,L){var H=L.getProperty("cells"),S=I=!1;if(0<H.length)for(var V=0;V<H.length&&(I=d.getModel().isVertex(H[V])||I,!(S=d.getModel().isEdge(H[V])||S)||!I);V++);else S=I=!0;H=L.getProperty("keys");L=L.getProperty("values");for(V=
+0;V<H.length;V++){var ea=0<=mxUtils.indexOf(u,H[V]);if("strokeColor"!=H[V]||null!=L[V]&&"none"!=L[V])if(0<=mxUtils.indexOf(k,H[V]))S||0<=mxUtils.indexOf(m,H[V])?null==L[V]?delete d.currentEdgeStyle[H[V]]:d.currentEdgeStyle[H[V]]=L[V]:I&&0<=mxUtils.indexOf(e,H[V])&&(null==L[V]?delete d.currentVertexStyle[H[V]]:d.currentVertexStyle[H[V]]=L[V]);else if(0<=mxUtils.indexOf(e,H[V])){if(I||ea)null==L[V]?delete d.currentVertexStyle[H[V]]:d.currentVertexStyle[H[V]]=L[V];if(S||ea||0<=mxUtils.indexOf(m,H[V]))null==
+L[V]?delete d.currentEdgeStyle[H[V]]:d.currentEdgeStyle[H[V]]=L[V]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||
+"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
+null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var I=d.currentVertexStyle.fontFamily||"Helvetica",L=String(d.currentVertexStyle.fontSize||"12"),H=d.getView().getState(d.getSelectionCell());
+null!=H&&(I=H.style[mxConstants.STYLE_FONTFAMILY]||I,L=H.style[mxConstants.STYLE_FONTSIZE]||L,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(L)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(I,L){I=L.getProperty("cells");L=L.getProperty("parent");null!=L&&d.getModel().isLayer(L)&&!d.isCellVisible(L)&&null!=I&&0<I.length&&d.getModel().setVisible(L,!0)});this.gestureHandler=
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(){e.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){e.view.validateBackground()}));
-e.addListener("gridSizeChanged",mxUtils.bind(this,function(){e.isGridEnabled()&&e.view.validateBackground()}));this.editor.resetGraph()}this.init();e.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(a,b,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=b&&b(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
+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(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));
+d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(a,b,f){function d(n,u){var m=e;e+=u;return n.substring(m,e)}function g(n){n=d(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(d(a,4),"IHDR"!=d(a,4))null!=f&&f();else{d(a,17);do{f=g(a);var k=d(a,4);if(null!=b&&b(e-8,k,f))break;value=d(a,f);d(a,4);if("IEND"==k)break}while(f)}};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 a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var e=a.getRubberband();null!=e&&e.cancel()}));mxEvent.addListener(a.container,
-"keydown",mxUtils.bind(this,function(e){this.onKeyDown(e)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(e){this.onKeyPress(e)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
+EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var d=a.getRubberband();null!=d&&d.cancel()}));mxEvent.addListener(a.container,
+"keydown",mxUtils.bind(this,function(d){this.onKeyDown(d)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(d){this.onKeyPress(d)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);f.updateActionStates()};a.editLink=f.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 a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),e=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,e),e=!1)}this.updateSelectionStateForTableCells(f);return f};
+EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),d=!0,g=0;g<b.length;g++){var e=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(e,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,d),d=!1)}this.updateSelectionStateForTableCells(f);return f};
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(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,e=f.getParent(b[0]),g=f.getParent(e),d=e.getIndex(b[0]),k=g.getIndex(e),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),d):null;r<b.length-1;){var A=b[++r];null==x||x!=A||null!=n&&u!=n||(n=u,u=0,m++,e=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),d):null);var C=this.editor.graph.view.getState(A);
-if(A==f.getChildAt(e,d+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
-EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,e){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
-a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
-!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),d=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(b.style,a.style,e))};
-EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var e=a.popupMenuHandler.isMenuShowing;
-a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(A,C,F){var K=a.getCompositeParent(u.cell);A=a.getCellGeometry(K);for(r.consume();null!=K&&a.model.isVertex(K)&&null!=A&&A.relative;)cell=
+EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,d=f.getParent(b[0]),g=f.getParent(d),e=d.getIndex(b[0]),k=g.getIndex(d),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),e):null;r<b.length-1;){var A=b[++r];null==x||x!=A||null!=n&&u!=n||(n=u,u=0,m++,d=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),e):null);var C=this.editor.graph.view.getState(A);
+if(A==f.getChildAt(d,e+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
+EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,d){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
+a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var e=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=e:a.x!=e&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
+!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),e=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==e,f.mergeStyle(b.style,a.style,d))};
+EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var d=a.popupMenuHandler.isMenuShowing;
+a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+f);var e=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();e.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(A,C,F){var K=a.getCompositeParent(u.cell);A=a.getCellGeometry(K);for(r.consume();null!=K&&a.model.isVertex(K)&&null!=A&&A.relative;)cell=
K,K=a.model.getParent(cell),A=a.getCellGeometry(K);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),K,mxUtils.bind(this,function(E){F(E);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(E))}),m)}),30)}),mxUtils.bind(this,function(A){this.graph.selectCellsForConnectVertex(A,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r=
m.getProperty("arrow"),x=m.getProperty("direction"),A=m.getProperty("event");r=r.getBoundingClientRect();var C=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-C.x;C=a.container.scrollTop+r.y-C.y;var K=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),E=b.showShapePicker(F,C,K,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(K,x,a.defaultEdgeLength,A,!0,!0,function(R,Q,P){P(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))},
function(R){a.selectCellsForConnectVertex(R)},A,this.hoverIcons)}),x,!0);this.centerShapePicker(E,r,F,C,x);mxUtils.setOpacity(E,30);mxEvent.addListener(E,"mouseenter",function(){mxUtils.setOpacity(E,100)});mxEvent.addListener(E,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}};
-EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"};
-EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a};
-EditorUi.prototype.createShapePicker=function(a,b,f,e,g,d,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+EditorUi.prototype.centerShapePicker=function(a,b,f,d,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var e=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=e.width/2-10,d-=e.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=e.width/2-10,d+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=e.width+6,d-=e.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,d-=e.height/2-10);a.style.left=f+"px";a.style.top=d+"px"};
+EditorUi.prototype.showShapePicker=function(a,b,f,d,g,e){a=this.createShapePicker(a,b,f,d,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,e),e);null!=a&&(null==this.hoverIcons||e||this.hoverIcons.reset(),e=this.editor.graph,e.popupMenuHandler.hideMenu(),e.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=d,this.shapePicker=a);return a};
+EditorUi.prototype.createShapePicker=function(a,b,f,d,g,e,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
mxPopupMenu.prototype.zIndex+1+";";n||mxUtils.setPrefixedStyle(u.style,"transform","translate(-22px,-22px)");null!=r.background&&r.background!=mxConstants.NONE&&(u.style.backgroundColor=r.background);r.container.appendChild(u);f=mxUtils.bind(this,function(A){var C=document.createElement("a");C.className="geItem";C.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";u.appendChild(C);null!=x&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(x,[A]):m.insertHandler([A],""!=A.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([A],25,25,C,null,!0,!1,A.geometry.width,A.geometry.height);mxEvent.addListener(C,"click",function(){var F=r.cloneCell(A);if(null!=e)e(F);else{F.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-A.geometry.width/2);F.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-A.geometry.height/2);r.model.beginUpdate();try{r.addCell(F)}finally{r.model.endUpdate()}r.setSelectionCell(F);
-r.scrollCellToVisible(F);r.startEditingAtCell(F);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(F))}null!=d&&d()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
-EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,e,g,d){return this.editor.graph.createVertex(null,null,d||"",0,0,e||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+this.sidebar.graph.pasteStyle(x,[A]):m.insertHandler([A],""!=A.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([A],25,25,C,null,!0,!1,A.geometry.width,A.geometry.height);mxEvent.addListener(C,"click",function(){var F=r.cloneCell(A);if(null!=d)d(F);else{F.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-A.geometry.width/2);F.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-A.geometry.height/2);r.model.beginUpdate();try{r.addCell(F)}finally{r.model.endUpdate()}r.setSelectionCell(F);
+r.scrollCellToVisible(F);r.startEditingAtCell(F);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(F))}null!=e&&e()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
+EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,d,g,e){return this.editor.graph.createVertex(null,null,e||"",0,0,d||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
b("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),b("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),b("triangle;whiteSpace=wrap;html=1;",60,80),b("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),b("shape=tape;whiteSpace=wrap;html=1;",120,100),b("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),b("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(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var e=window.getSelection(),g=0<e.rangeCount?e.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
-g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(d){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
+EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var d=window.getSelection(),g=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
+g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(e){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,null!=b.textarea&&(b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a))))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.getCssClassForMarker=function(a,b,f,e){return"flexArrow"==b?null!=f&&f!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==f||"halfCircle"==f?"geSprite geSvgSprite geSprite-"+f+("end"==a?" geFlipSprite":""):f==mxConstants.ARROW_CLASSIC?"1"==e?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":f==mxConstants.ARROW_CLASSIC_THIN?"1"==e?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":f==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+a+"open":f==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":f==mxConstants.ARROW_BLOCK?"1"==e?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":f==mxConstants.ARROW_BLOCK_THIN?"1"==e?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":f==mxConstants.ARROW_OVAL?"1"==e?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":f==mxConstants.ARROW_DIAMOND?"1"==e?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
-f==mxConstants.ARROW_DIAMOND_THIN?"1"==e?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==f?"geSprite geSprite-"+a+"openasync":"dash"==f?"geSprite geSprite-"+a+"dash":"cross"==f?"geSprite geSprite-"+a+"cross":"async"==f?"1"==e?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==f||"circlePlus"==f?"1"==e||"circle"==f?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==f?"geSprite geSprite-"+a+"erone":"ERmandOne"==
-f?"geSprite geSprite-"+a+"eronetoone":"ERmany"==f?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==f?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==f?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==f?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updateCssForMarker=function(a,b,f,d,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerHTML="";"flexArrow"==f?a.className=null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(d,g),null!=f?(d=document.createElement("img"),d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
+(d.style.filter="invert(100%)"),a.appendChild(d)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.getImageForMarker=function(a,b){var f=null;a==mxConstants.ARROW_CLASSIC?f="1"!=b?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:a==mxConstants.ARROW_CLASSIC_THIN?f="1"!=b?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_OPEN?f=Format.openFilledMarkerImage.src:a==mxConstants.ARROW_OPEN_THIN?f=Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_BLOCK?f="1"!=b?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+a==mxConstants.ARROW_BLOCK_THIN?f="1"!=b?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:a==mxConstants.ARROW_OVAL?f="1"!=b?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND?f="1"!=b?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND_THIN?f="1"!=b?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==a?f="1"!=b?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==a?f=Format.boxMarkerImage.src:"halfCircle"==a?f=Format.halfCircleMarkerImage.src:"openAsync"==a?f=Format.openAsyncFilledMarkerImage.src:"async"==a?f="1"!=b?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==a?f=Format.dashMarkerImage.src:"baseDash"==a?f=Format.baseDashMarkerImage.src:"cross"==a?f=Format.crossMarkerImage.src:"circle"==a?f=Format.circleMarkerImage.src:"circlePlus"==a?f=Format.circlePlusMarkerImage.src:"ERone"==a?f=Format.EROneMarkerImage.src:"ERmandOne"==a?
+f=Format.ERmandOneMarkerImage.src:"ERmany"==a?f=Format.ERmanyMarkerImage.src:"ERoneToMany"==a?f=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==a?f=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==a&&(f=Format.ERzeroToManyMarkerImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),f=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var k=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||d.getSelectionCells();k=d.getExportableCells(d.model.getTopmostCells(k));for(var n={},u=d.createCellLookup(k),m=d.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
-0),A=0;A<m.length;A++){r.add(x,m[A]);var C=d.view.getState(k[A]);if(null!=C){var F=d.getCellGeometry(m[A]);null!=F&&F.relative&&!r.isEdge(k[A])&&null==u[mxObjectIdentity.get(r.getParent(k[A]))]&&(F.offset=null,F.relative=!1,F.x=C.x/C.view.scale-C.view.translate.x,F.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(d){var k=
-null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(e){var k=null;if(e.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||e.getSelectionCells();k=e.getExportableCells(e.model.getTopmostCells(k));for(var n={},u=e.createCellLookup(k),m=e.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
+0),A=0;A<m.length;A++){r.add(x,m[A]);var C=e.view.getState(k[A]);if(null!=C){var F=e.getCellGeometry(m[A]);null!=F&&F.relative&&!r.isEdge(k[A])&&null==u[mxObjectIdentity.get(r.getParent(k[A]))]&&(F.offset=null,F.relative=!1,F.x=C.x/C.view.scale-C.view.translate.x,F.y=C.y/C.view.scale-C.view.translate.y)}}e.updateCustomLinks(e.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(e){var k=
+null;e.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(e,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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 b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=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 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=
+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 ua=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 va=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),va=Math.max(va,0));if(wa||
+ka.width<Ga||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(va-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=ua*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 d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",d)});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++;
-var ea=document.createElement("span");ea.style.paddingLeft="8px";ea.style.paddingRight="8px";ea.style.cursor="pointer";mxEvent.addListener(ea,"click",H);null!=V&&ea.setAttribute("title",V);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",S);H.style.width="36px";H.style.filter="invert(100%)";ea.appendChild(H);this.chromelessToolbar.appendChild(ea);return ea});null!=g.backBtn&&d(mxUtils.bind(this,function(H){window.location.href=g.backBtn.url;mxEvent.consume(H)}),Editor.backImage,
-mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=d(mxUtils.bind(this,function(H){this.actions.get("previousPage").funct();mxEvent.consume(H)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
-var m=d(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerHTML="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
-1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();
-mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var A=null,C=null,F=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);A=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);A=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var E=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var e=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",e);e();var k=0;e=mxUtils.bind(this,function(H,S,V){k++;
+var ea=document.createElement("span");ea.style.paddingLeft="8px";ea.style.paddingRight="8px";ea.style.cursor="pointer";mxEvent.addListener(ea,"click",H);null!=V&&ea.setAttribute("title",V);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",S);H.style.width="36px";H.style.filter="invert(100%)";ea.appendChild(H);this.chromelessToolbar.appendChild(ea);return ea});null!=g.backBtn&&e(mxUtils.bind(this,function(H){window.location.href=g.backBtn.url;mxEvent.consume(H)}),Editor.backImage,
+mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=e(mxUtils.bind(this,function(H){this.actions.get("previousPage").funct();mxEvent.consume(H)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
+var m=e(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerHTML="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
+1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}e(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();
+mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(H){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var A=null,C=null,F=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);A=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);A=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var E=e(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var S=E.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=S.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));S=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),O=a.getModel();O.addListener(mxEvent.CHANGE,function(){E.style.display=1<O.getChildCount(O.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var R=this.lightboxToolbarActions[x];R.elem=d(R.fn,R.icon,R.tooltip)}null!=g.refreshBtn&&d(mxUtils.bind(this,function(H){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
-window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(H){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,
+this.layersDialog.style.zIndex=S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),O=a.getModel();O.addListener(mxEvent.CHANGE,function(){E.style.display=1<O.getChildCount(O.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(H){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var R=this.lightboxToolbarActions[x];R.elem=e(R.fn,R.icon,R.tooltip)}null!=g.refreshBtn&&e(mxUtils.bind(this,function(H){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
+window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(H){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,
function(H){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(H))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||(mxEvent.isShiftDown(H)||
K(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?F():K(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?F():K(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,
"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||K(30)}));var Q=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,S){},mouseUp:function(H,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Q&&Math.abs(this.scrollTop-a.container.scrollTop)<Q&&
@@ -2523,38 +2524,38 @@ EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=u
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,d){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,d);this.setCurrentMenu(g)};
EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{b=a.getGraphBounds();var f=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var e=a.view.scale;b.x=b.x/e-f.x;b.y=b.y/e-f.y;b.width/=e;b.height/=e;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),e=0,g=0;f&&(e=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var d=b.getSelectionCells();b.clearSelection();b.setSelectionCells(d)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-e,b.container.scrollTop=b.view.translate.y*
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var d=a.view.scale;b.x=b.x/d-f.x;b.y=b.y/d-f.y;b.width/=d;b.height/=d;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),d=0,g=0;f&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var e=b.getSelectionCells();b.clearSelection();b.setSelectionCells(e)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
b.view.scale-g);b.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
-function ChangePageSetup(a,b,f,e,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=e;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
+function ChangePageSetup(a,b,f,d,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=d;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}if(!this.ignoreImage){this.image=this.previousImage;b=a.backgroundImage;var f=this.previousImage;null!=f&&null!=f.src&&"data:page/id,"==f.src.substring(0,13)&&(f=this.ui.createImageForPageLink(f.src,this.ui.currentPage));this.ui.setBackgroundImage(f);this.previousImage=b}null!=this.previousFormat&&
(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;e.previousPageScale=e.pageScale;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);return e};mxCodecRegistry.register(a)})();
+this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(a,b){b=null!=b?b:"1"==urlParams.sketch;this.editor.graph.pageFormat=a;b||(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(a){this.editor.graph.pageScale=a;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(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,e=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,e);f.addListener(mxEvent.UNDO,e);f.addListener(mxEvent.REDO,e);f.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var d=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(k,n){d.apply(this,arguments);e()};e()};
-EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),e="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(" "),g=0;g<e.length;g++)this.actions.get(e[g]).setEnabled(0<b.cells.length);
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);d()};var e=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(k,n){e.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),d="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(" "),g=0;g<d.length;g++)this.actions.get(d[g]).setEnabled(0<b.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<b.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<b.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==b.cells.length);this.actions.get("sendBackward").setEnabled(1==
b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(1==b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
-this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
+this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);d=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
-b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
-d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-d+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var d=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(d=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
+b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var e=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+d;e=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+e+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+d+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=d+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+d+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
+e+d+"px";this.formatContainer.style.bottom=this.footerHeight+d+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+d+g+"px");a&&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};
@@ -2564,19 +2565,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))};
EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.setAttribute("title",a);b.innerHTML=a;return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,e){function g(x){if(null!=k){var A=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));e(Math.max(0,n+(b?A.x-k.x:k.y-A.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function d(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
-mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var A=null!=m?m-f:0;m=r();e(A);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,d)})};
-EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(e){f(parseFloat(e))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
-EditorUi.prototype.handleError=function(a,b,f,e,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,d,f,null,null,null,null,null,null,null,null,e?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,b,f,e,g,d,k,n,u,m,r,x,A){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),e,g,d,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,A);a.init()};EditorUi.prototype.showDialog=function(a,b,f,e,g,d,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,e,g,d,k,n,u,m);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,f,d){function g(x){if(null!=k){var A=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));d(Math.max(0,n+(b?A.x-k.x:k.y-A.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function e(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
+mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var A=null!=m?m-f:0;m=r();d(A);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,e)})};
+EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(d){f(parseFloat(d))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
+EditorUi.prototype.handleError=function(a,b,f,d,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,e,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
+EditorUi.prototype.showError=function(a,b,f,d,g,e,k,n,u,m,r,x,A){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,g,e,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,A);a.init()};EditorUi.prototype.showDialog=function(a,b,f,d,g,e,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,g,e,k,n,u,m);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,f){null!=this.dialogs&&0<this.dialogs.length&&(null==f||f==this.dialog.container.firstChild)&&(f=this.dialogs.pop(),0==f.close(a,b)?this.dialogs.push(f):(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 a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,e=[],g=0;g<b.length;g++){var d=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==d||f.get(d)||(f.put(d,!0),e.push(d))}a.setSelectionCells(a.duplicateCells(e,!1))}catch(k){this.handleError(k)}};
-EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,e=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(d){f.cellEditor.restoreSelection(e);b(d)},function(){f.cellEditor.restoreSelection(e)});this.showDialog(a.container,230,g,!0,!1);a.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,d=[],g=0;g<b.length;g++){var e=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==e||f.get(e)||(f.put(e,!0),d.push(e))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(k){this.handleError(k)}};
+EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(e){f.cellEditor.restoreSelection(d);b(e)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(a.container,230,g,!0,!1);a.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var e=a.lastIndexOf("&lt;/mxGraphModel&gt;");e>f&&(b=a.substring(f,e+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
-EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var e=decodeURIComponent(f);this.isCompatibleString(e)&&(f=e)}a(f)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(e){e.text().then(mxUtils.bind(this,function(g){try{var d=this.parseHtmlData(g),k="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var n=k.lastIndexOf("%3E");
-0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=d.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(e){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(e){e.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>f&&(b=a.substring(f,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
+EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var d=decodeURIComponent(f);this.isCompatibleString(d)&&(f=d)}a(f)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(d){d.text().then(mxUtils.bind(this,function(g){try{var e=this.parseHtmlData(g),k="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var n=k.lastIndexOf("%3E");
+0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=e.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(d){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(d){d.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(f){a(null)})};
EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var f="<meta "==a.substring(0,6);b=document.createElement("div");b.innerHTML=(f?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));f=f&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=f&&null==f.nextSibling&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==f.nodeName?(a=f.getAttribute("src"),
@@ -2585,24 +2586,24 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null
(b=f);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(b){this.save(b)}),null,mxUtils.bind(this,function(b){if(null!=b&&0<b.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),e=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==e.length?null:e)}),!0,b)};
-EditorUi.prototype.executeLayout=function(a,b,f){var e=this.editor.graph;if(e.isEnabled()){e.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(e),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(e.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,b,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,b);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),d=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==d.length?null:d)}),!0,b)};
+EditorUi.prototype.executeLayout=function(a,b,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
+EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var g=d.saveSelection(),e=mxUtils.prompt(a,b);d.restoreSelection(g);if(null!=e&&0<e.length){var k=new Image;k.onload=function(){f(e,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=e}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(e){e=new ChangePageSetup(this,null,e);e.ignoreColor=!0;this.editor.graph.model.execute(e)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
+EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(d){d=new ChangePageSetup(this,null,d);d.ignoreColor=!0;this.editor.graph.model.execute(d)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
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(a){function b(x,A,C){if(!e.isSelectionEmpty()&&e.isEnabled()){A=null!=A?A:1;var F=e.getCompositeParents(e.getSelectionCells()),K=0<F.length?F[0]:null;if(null!=K)if(C){e.getModel().beginUpdate();try{for(K=0;K<F.length;K++)if(e.getModel().isVertex(F[K])&&e.isCellResizable(F[K])){var E=e.getCellGeometry(F[K]);null!=E&&(E=E.clone(),37==x?E.width=Math.max(0,E.width-A):38==x?E.height=Math.max(0,E.height-A):39==x?E.width+=A:40==x&&(E.height+=A),e.getModel().setGeometry(F[K],
-E))}}finally{e.getModel().endUpdate()}}else{E=e.model.getParent(K);var O=e.getView().scale;C=null;1==e.getSelectionCount()&&e.model.isVertex(K)&&null!=e.layoutManager&&!e.isCellLocked(K)&&(C=e.layoutManager.getLayout(E));if(null!=C&&C.constructor==mxStackLayout)A=E.getIndex(K),37==x||38==x?e.model.add(E,K,Math.max(0,A-1)):(39==x||40==x)&&e.model.add(E,K,Math.min(e.model.getChildCount(E),A+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(K,0,0,F),null!=R.first&&(K=F=0,37==x?F=-A:38==
-x?K=-A:39==x?F=A:40==x&&(K=A),R.currentDx+=F*O,R.currentDy+=K*O,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var Q=R.roundLength(R.currentDx/O),P=R.roundLength(R.currentDy/O);R.moveCells(R.cells,Q,P);R.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
-89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(e.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var A=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=A)return A.funct}if(null!=n[x.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(e.model.isVertex(e.getSelectionCell()))return function(){var C=e.connectVertex(e.getSelectionCell(),n[x.keyCode],
-e.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&e.model.isEdge(C[0])?e.setSelectionCell(e.model.getTerminal(C[0],!1)):e.setSelectionCell(C[C.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
-function(x,A,C,F){var K=this.actions.get(C);null!=K&&(C=function(){K.isEnabled()&&K.funct()},A?F?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):F?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
-!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
+EditorUi.prototype.createKeyHandler=function(a){function b(x,A,C){if(!d.isSelectionEmpty()&&d.isEnabled()){A=null!=A?A:1;var F=d.getCompositeParents(d.getSelectionCells()),K=0<F.length?F[0]:null;if(null!=K)if(C){d.getModel().beginUpdate();try{for(K=0;K<F.length;K++)if(d.getModel().isVertex(F[K])&&d.isCellResizable(F[K])){var E=d.getCellGeometry(F[K]);null!=E&&(E=E.clone(),37==x?E.width=Math.max(0,E.width-A):38==x?E.height=Math.max(0,E.height-A):39==x?E.width+=A:40==x&&(E.height+=A),d.getModel().setGeometry(F[K],
+E))}}finally{d.getModel().endUpdate()}}else{E=d.model.getParent(K);var O=d.getView().scale;C=null;1==d.getSelectionCount()&&d.model.isVertex(K)&&null!=d.layoutManager&&!d.isCellLocked(K)&&(C=d.layoutManager.getLayout(E));if(null!=C&&C.constructor==mxStackLayout)A=E.getIndex(K),37==x||38==x?d.model.add(E,K,Math.max(0,A-1)):(39==x||40==x)&&d.model.add(E,K,Math.min(d.model.getChildCount(E),A+1));else{var R=d.graphHandler;null!=R&&(null==R.first&&R.start(K,0,0,F),null!=R.first&&(K=F=0,37==x?F=-A:38==
+x?K=-A:39==x?F=A:40==x&&(K=A),R.currentDx+=F*O,R.currentDy+=K*O,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var Q=R.roundLength(R.currentDx/O),P=R.roundLength(R.currentDy/O);R.moveCells(R.cells,Q,P);R.reset()}},400))}}}}var f=this,d=this.editor.graph,g=new mxKeyHandler(d),e=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
+89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&e.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(d.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var A=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=A)return A.funct}if(null!=n[x.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(d.model.isVertex(d.getSelectionCell()))return function(){var C=d.connectVertex(d.getSelectionCell(),n[x.keyCode],
+d.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&d.model.isEdge(C[0])?d.setSelectionCell(d.model.getTerminal(C[0],!1)):d.setSelectionCell(C[C.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
+function(x,A,C,F){var K=this.actions.get(C);null!=K&&(C=function(){K.isEnabled()&&K.funct()},A?F?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):F?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){d.exitGroup()});g.bindControlShiftKey(35,function(){d.enterGroup()});g.bindShiftKey(36,function(){d.home()});g.bindKey(35,function(){d.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
+!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),g.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,
"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),g.bindAction(85,!0,
-"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){var a=this.editor.graph;null!=a&&null!=this.selectionStateListener&&(a.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),a.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
@@ -2622,34 +2623,34 @@ Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"large"!=urlParams["sidebar-entries"]&&(Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=1,Sidebar.prototype.thumbWidth=32,Sidebar.prototype.thumbHeight=30,Sidebar.prototype.minThumbStrokeWidth=1.3,Sidebar.prototype.thumbAntiAlias=!0);Sidebar.prototype.sidebarTitleSize=8;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;
Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.tooltipMouseDown=null;Sidebar.prototype.refresh=function(){this.graph.stylesheet.styles=mxUtils.clone(this.editorUi.editor.graph.stylesheet.styles);this.container.innerHTML="";this.palettes={};this.init()};
Sidebar.prototype.getTooltipOffset=function(a,b){b=b.height+2*this.tooltipBorder;return new mxPoint(this.container.offsetWidth+this.editorUi.splitSize+10+this.editorUi.container.offsetLeft,Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-b-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-b/2+16)))};
-Sidebar.prototype.createTooltip=function(a,b,f,e,g,d,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.createTooltip=function(a,b,f,d,g,e,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setPanning(!1),this.graph2.setEnabled(!1),this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()}),mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(x){null!=this.tooltipMouseDown&&this.tooltipMouseDown(x);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&
"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(x){this.hideTooltip()})),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),u=document.createElement("img"),u.setAttribute("src",Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("close")),u.style.position="absolute",u.style.cursor="default",u.style.padding="8px",u.style.right="2px",u.style.top="2px",this.tooltip.appendChild(u),this.tooltipCloseImage=u,mxEvent.addListener(u,
-"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||e>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/e))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
-b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=d;r=this.graph2.getGraphBounds();n&&0<f&&0<e&&(r.width>f||r.height>e)?(f=Math.round(100*Math.min(f/r.width,e/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
-(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;e=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
+"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||d>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/d))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
+b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=e;r=this.graph2.getGraphBounds();n&&0<f&&0<d&&(r.width>f||r.height>d)?(f=Math.round(100*Math.min(f/r.width,d/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
+(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;d=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g),n=Math.min(this.maxTooltipWidth,Math.max(f,this.tooltipTitle.scrollWidth+
-4)),g=this.tooltipTitle.offsetHeight+10,e+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(e-=6,this.tooltipTitle.style.top=e-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=e+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
+4)),g=this.tooltipTitle.offsetHeight+10,d+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(d-=6,this.tooltipTitle.style.top=d-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=d+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
"translate("+g+","+f+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=g+"px",this.graph2.view.drawPane.style.top=f+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=k+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()};
-Sidebar.prototype.showTooltip=function(a,b,f,e,g,d){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,e,g,d)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
-Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,e,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,e)}))};
-Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var e=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=e&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){e=this.editorUi.convertDataUri(e);var d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(d+="aspect=fixed;");return this.createVertexTemplate(d+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
-mxUtils.bind(this,function(){var d=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
-Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],e={},g=0;g<a.length;g++){null==e[a[g]]&&(e[a[g]]=!0,f.push(a[g]));var d=a[g].replace(/\.*\d*$/,"");d!=a[g]&&null==e[d]&&(e[d]=!0,f.push(d))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
+Sidebar.prototype.showTooltip=function(a,b,f,d,g,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,d,g,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
+Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,d,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,d)}))};
+Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var d=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=d&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){d=this.editorUi.convertDataUri(d);var e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");return this.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
+mxUtils.bind(this,function(){var e=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(e,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
+Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],d={},g=0;g<a.length;g++){null==d[a[g]]&&(d[a[g]]=!0,f.push(a[g]));var e=a[g].replace(/\.*\d*$/,"");e!=a[g]&&null==d[e]&&(d[e]=!0,f.push(e))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
Sidebar.prototype.addEntryForTag=function(a,b){if(null!=a&&1<a.length){var f=this.taglist[a];"object"!==typeof f&&(f={entries:[]},this.taglist[a]=f);f.entries.push(b)}};
-Sidebar.prototype.searchEntries=function(a,b,f,e,g){if(null!=this.taglist&&null!=a){var d=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<d.length;u++)if(0<d[u].length){var m=this.taglist[d[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var A=0;A<x.length;A++)if(m=x[A],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==d.length-1&&a.length==k)){e(a.slice(f*b,k),k,!0,d);return}}else a=[];g=r;n++}g=a.length;e(a.slice(f*b,(f+1)*b),g,!1,d)}else e([],null,
-null,d)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},e=0;e<a.length;e++)null==f[a[e]]&&(f[a[e]]="1",b.push(a[e]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
-Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px";
-e.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";e.appendChild(g);var d=document.createElement("img");d.setAttribute("src",Sidebar.prototype.searchImage);d.setAttribute("title",
-mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){K()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
-"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,A={},C=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var E=f.firstChild;null!=E;){var O=E.nextSibling;E!=e&&E!=k&&E.parentNode.removeChild(E);E=O}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var K=mxUtils.bind(this,
+Sidebar.prototype.searchEntries=function(a,b,f,d,g){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<e.length;u++)if(0<e[u].length){var m=this.taglist[e[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var A=0;A<x.length;A++)if(m=x[A],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==e.length-1&&a.length==k)){d(a.slice(f*b,k),k,!0,e);return}}else a=[];g=r;n++}g=a.length;d(a.slice(f*b,(f+1)*b),g,!1,e)}else d([],null,
+null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},d=0;d<a.length;d++)null==f[a[d]]&&(f[a[d]]="1",b.push(a[d]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
+Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.paddingBottom="8px";
+d.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";d.appendChild(g);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",
+mxResources.get("search"));e.style.position="relative";e.style.left="-18px";e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";d.appendChild(e);f.appendChild(d);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){K()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
+"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,A={},C=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var E=f.firstChild;null!=E;){var O=E.nextSibling;E!=d&&E!=k&&E.parentNode.removeChild(E);E=O}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var K=mxUtils.bind(this,
function(){C=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,A={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var E={};this.currentSearch=E;this.searchEntries(u,C,x,mxUtils.bind(this,function(O,R,Q,P){if(this.currentSearch==E){O=null!=O?O:[];m=!1;x++;this.insertSearchHint(f,u,C,x,O,R,Q,P);
0==O.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<O.length;R++)mxUtils.bind(this,function(aa){try{var T=aa();null==A[T.innerHTML]?(A[T.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(T)):null!=aa.parentLibraries&&(A[T.innerHTML]=A[T.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(T,null,null,mxUtils.bind(this,function(U){var fa=A[T.innerHTML];mxEvent.isPopupTrigger(U)&&this.showPopupMenuForEntry(T,fa,U)}));mxEvent.disableContextMenu(T)}catch(U){}})(O[R]);
Q?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",A={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(E){g.value=E;K()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(E){13==E.keyCode&&(K(),mxEvent.consume(E))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(E){""==
-g.value?(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search"))):(d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(E){E.stopPropagation&&E.stopPropagation();E.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(E){E.stopPropagation&&
+g.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(E){E.stopPropagation&&E.stopPropagation();E.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(E){E.stopPropagation&&
E.stopPropagation();E.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.container.appendChild(a);this.palettes.search=[b,a]};
-Sidebar.prototype.insertSearchHint=function(a,b,f,e,g,d,k,n){0==g.length&&1==e&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
-Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var e=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);e.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
+Sidebar.prototype.insertSearchHint=function(a,b,f,d,g,e,k,n){0==g.length&&1==d&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
+Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);d.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",
190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60,"","Parallelogram"),this.createVertexTemplateEntry("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2658,16 +2659,16 @@ Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrar
120,60,"","Trapezoid"),this.createVertexTemplateEntry("shape=tape;whiteSpace=wrap;html=1;",120,100,"","Tape"),this.createVertexTemplateEntry("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",80,100,"","Note"),this.createVertexTemplateEntry("shape=card;whiteSpace=wrap;html=1;",80,100,"","Card"),this.createVertexTemplateEntry("shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;",120,80,"","Callout",null,null,"bubble chat thought speech message"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;",
30,60,"Actor","Actor",!1,null,"user person human stickman"),this.createVertexTemplateEntry("shape=xor;whiteSpace=wrap;html=1;",60,80,"","Or",null,null,"logic or"),this.createVertexTemplateEntry("shape=or;whiteSpace=wrap;html=1;",60,80,"","And",null,null,"logic and"),this.createVertexTemplateEntry("shape=dataStorage;whiteSpace=wrap;html=1;fixedSize=1;",100,80,"","Data Storage"),this.createVertexTemplateEntry("swimlane;startSize=0;",200,200,"","Container",null,null,"container swimlane lane pool group"),
this.createVertexTemplateEntry("swimlane;",200,200,"Vertical Container","Container",null,null,"container swimlane lane pool group"),this.createVertexTemplateEntry("swimlane;horizontal=0;",200,200,"Horizontal Container","Horizontal Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var g=new mxCell("List",new mxGeometry(0,0,140,120),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-g.vertex=!0;g.insert(b.cloneCell(e,"Item 1"));g.insert(b.cloneCell(e,"Item 2"));g.insert(b.cloneCell(e,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(e,"List Item")],e.geometry.width,e.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
+g.vertex=!0;g.insert(b.cloneCell(d,"Item 1"));g.insert(b.cloneCell(d,"Item 2"));g.insert(b.cloneCell(d,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(d,"List Item")],d.geometry.width,d.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
g.geometry.setTerminalPoint(new mxPoint(0,50),!0);g.geometry.setTerminalPoint(new mxPoint(50,0),!1);g.geometry.points=[new mxPoint(50,50),new mxPoint(0,0)];g.geometry.relative=!0;g.edge=!0;return this.createEdgeTemplateFromCells([g],g.geometry.width,g.geometry.height,"Curve")})),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;startArrow=classic;html=1;",100,100,"","Bidirectional Arrow",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;html=1;",
50,50,"","Arrow",null,"line lines connector connectors connection connections arrow arrows directional directed"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;",50,50,"","Dashed Line",null,"line lines connector connectors connection connections arrow arrows dashed undirected no"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;",50,50,"","Dotted Line",null,"line lines connector connectors connection connections arrow arrows dotted undirected no"),
this.createEdgeTemplateEntry("endArrow=none;html=1;",50,50,"","Line",null,"line lines connector connectors connection connections arrow arrows simple undirected plain blank no"),this.createEdgeTemplateEntry("endArrow=classic;startArrow=classic;html=1;",50,50,"","Bidirectional Connector",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("endArrow=classic;html=1;",50,50,"","Directional Connector",null,"line lines connector connectors connection connections arrow arrows directional directed"),
-this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",
-new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
-0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
-mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
-0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");d.geometry.relative=!0;d.vertex=!0;d.geometry.offset=new mxPoint(-10,-7);g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
+this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",
+new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
+0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
+mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
+0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-7);g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
Sidebar.prototype.addMiscPalette=function(a){var b=this;this.setCurrentSearchEntryLibrary("general","misc");var f=[this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;",100,40,"Title","Title",null,null,"text heading title"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>",
"Unordered List"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ol><li>Value 1</li><li>Value 2</li><li>Value 3</li></ol>","Ordered List"),this.addDataEntry("table",180,120,"Table 1","7ZjBTuMwEIafJteVnVDoXpuycGAvsC9g6mltyfFE9kAann7txN2qqIgU0aCllRJpZjxO7G9i/3KyoqzWN07U6jdKMFlxnRWlQ6TeqtYlGJPlTMusmGd5zsKd5b/eaOVdK6uFA0tDOuR9h2dhnqCP9AFPrUkBr0QdTRKPMTRTVIVhznkwG6UJHmqxiO1NmESIeRKOHvRLDLHgL9CS0BZc6rNAY0TtdfewPkNpI+9Ei0+0ec3Gm6XhgSNYvznFLpTmdwNYAbk2pDRakkoZ0x4DU6BXatMtsWHC94HVv75bYsFI0PYDLA4EeI9NZIhOv0QwJjF4Tc03ujLCwi0I+So0Q9mmEGGdLANLSuYjEmGVHJemy/aSlw7rP8KtYJOy1MaUaDAWy6KN5a5RW+oATWbhCshK9mOSTcLMyuDzrR+umO6oROvJhaLHx4Lw1IAfXMz8Y8W8+IRaXgyvZRgxaWHuYUHCroasi7AObMze0t8D+7CCYkC5NPGDmistJdihjIt3GV8eCfHkxBGvd/GOQPzyTHxnsx8B+dVZE0bRhHa3ZGNIxPRUVtPVl0nEzxNHPL5EcHZGPrZGcH4WiTFFYjqiSPADTtX/93ri7x+9j7aADjh5f0/IXyAU3+GE3O1L4K6fod+e+CfV4YjqEdztL8GubeeP4V8="),
this.addDataEntry("table",180,120,"Table 2","7ZhRb5swEMc/Da+TDSFJX0O27qF7aae9u8EJlowP2ZcR+ulng1maJlbTaaEPIBHpfL5z8O/v0wlHSVYe7jWrih+QcxklX6Mk0wDYWeUh41JGMRF5lKyjOCb2F8XfArO0nSUV01zhNQlxl/CbyT3vPJ3DYCO9wxSsciayZ+daFVja11xTa9aFQP5UsY2br+0mrM8g0/gkXpyL2PEGFDKhuPY5G5CSVUa0i3URhZD5A2tgj/3f9CMXvS/Vg803PlpD/Xro359r5Icgg9blAdxzKDnqxobUIsfCRyw7TqTgYlf0aR4eYaZz7P7mHpFaw1O9TDj5IOFHqB1k0OLFkZN+n2+xmlqUkin+nbP8jWsFeeNdCJW3JN+iN58BEcoep98uuShNrqH6yfSO9yFbIWUGEpyaCpQ7DxUIhS2gdGUfiywjX9IotTvL7Jgex/Zx4RozUAa1PRVuWc4M1tzgtWLG/ybm7D9oOTvT8ldrxoQGRbWvjoLJR75BpnbXVJCtGOWijzJcoP4xZcEy3Up3staFyHOu3KL2ePkDReNr4Sfvwp/fiH0aZB8uqFGwP5xyH0CKeVCKZJLidd8YQIvF1F4GaS/NqWRDdJtlsMxmIymzxad1m7sg+3Tc7IfvNpQEtZhPWgzcbiid+s2Q/WY5YL+h55cBfaEtRlJo9P2bgptV1vlFQU9/OXL6n9Bzwl/6d5MYN246dni8AG3nTu5H/wA="),
@@ -2677,10 +2678,10 @@ this.addDataEntry("crossfunctional cross-functional cross functional flowchart s
this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=#ffffff;overflow=fill;rounded=0;",280,160,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr style="background-color:#A7C942;color:#ffffff;border:1px solid #98bf21;"><th align="left">Title 1</th><th align="left">Title 2</th><th align="left">Title 3</th></tr><tr style="border:1px solid #98bf21;"><td>Value 1</td><td>Value 2</td><td>Value 3</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 4</td><td>Value 5</td><td>Value 6</td></tr><tr style="border:1px solid #98bf21;"><td>Value 7</td><td>Value 8</td><td>Value 9</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 10</td><td>Value 11</td><td>Value 12</td></tr></table>',
"HTML Table 1"),this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=none;overflow=fill;",180,140,'<table border="0" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
"HTML Table 2"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",180,140,'<table border="1" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
-"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var e=
-new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");e.vertex=!0;this.graph.setLinkForCell(e,"https://www.draw.io");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var e=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
-e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var e=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");this.graph.setAttributeForCell(e,
-"name","Variable");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
+"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var d=
+new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");d.vertex=!0;this.graph.setLinkForCell(d,"https://www.draw.io");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var d=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
+d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var d=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");this.graph.setAttributeForCell(d,
+"name","Variable");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
100,60,"","Double Ellipse",null,null,"oval ellipse start end state double"),this.createVertexTemplateEntry("shape=ext;double=1;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Square",null,null,"double square"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Circle",null,null,"double circle"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#1ba1e2;sketch=1;",
120,60,"","Rectangle Sketch",!0,null,"rectangle rect box text sketch comic retro"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=2;hachureGap=8;fillColor=#990000;fillStyle=dots;sketch=1;",120,60,"","Ellipse Sketch",!0,null,"ellipse oval sketch comic retro"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=-1;hachureGap=8;fillStyle=cross-hatch;fillColor=#006600;sketch=1;",120,60,"","Diamond Sketch",!0,null,"diamond sketch comic retro"),
this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;backgroundOutline=1;isoAngle=15;",90,100,"","Isometric Cube",!0,null,"cube box iso isometric"),this.createVertexTemplateEntry("html=1;whiteSpace=wrap;aspect=fixed;shape=isoRectangle;",150,90,"","Isometric Square",!0,null,"rectangle rect box iso isometric"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;",50,100,"","Isometric Edge 1"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;elbow=vertical;",
@@ -2688,7 +2689,7 @@ this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;background
160,10,"","Horizontal Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("line;strokeWidth=4;direction=south;html=1;perimeter=backbonePerimeter;points=[];outlineConnect=0;",10,160,"","Vertical Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;",120,20,"","Horizontal Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;direction=south;",
20,120,"","Vertical Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image="+this.gearImage,52,61,"","Image (Fixed Aspect)",!1,null,"fixed image icon symbol"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image="+this.gearImage,50,60,"","Image (Variable Aspect)",!1,null,"strechted image icon symbol"),
this.createVertexTemplateEntry("icon;html=1;image="+this.gearImage,60,60,"Icon","Icon",!1,null,"icon image symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;image="+this.gearImage,140,60,"Label","Label 1",null,null,"label image icon symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;align=center;verticalAlign=bottom;spacingLeft=0;spacingBottom=4;imageAlign=center;imageVerticalAlign=top;image="+this.gearImage,120,80,"Label","Label 2",null,null,"label image icon symbol"),
-this.addEntry("shape group container",function(){var e=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");e.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;e.insert(g);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
+this.addEntry("shape group container",function(){var d=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");d.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;d.insert(g);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;top=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=1;right=1;left=1;top=0;fillColor=none;routingCenterX=-0.5;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",
40,40,"","Waypoint"),this.createEdgeTemplateEntry("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;",50,50,"","Manual Line",null,"line lines connector connectors connection connections arrow arrows manual"),this.createEdgeTemplateEntry("shape=filledEdge;rounded=0;fixDash=1;endArrow=none;strokeWidth=10;fillColor=#ffffff;edgeStyle=orthogonalEdgeStyle;",60,40,"","Filled Edge"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=horizontal;endArrow=classic;html=1;",50,50,"","Horizontal Elbow",
null,"line lines connector connectors connection connections arrow arrows elbow horizontal"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;",50,50,"","Vertical Elbow",null,"line lines connector connectors connection connections arrow arrows elbow vertical")];this.addPaletteFunctions("misc",mxResources.get("misc"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
@@ -2715,122 +2716,122 @@ null,null,"collate"),this.createVertexTemplateEntry("shape=switch;whiteSpace=wra
f.insert(a.cloneCell(b,"Item 3"));return a.createVertexTemplateFromCells([f],f.geometry.width,f.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(b,"List Item")],b.geometry.width,b.geometry.height,"List Item")})]};
Sidebar.prototype.addBasicPalette=function(a){this.setCurrentSearchEntryLibrary("basic");this.addStencilPalette("basic",mxResources.get("basic"),a+"/basic.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2",null,null,null,null,[this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;",
120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;",120,60,"","Partial Rectangle")]);this.setCurrentSearchEntryLibrary()};
-Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,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;");f.vertex=!0;var e=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;");
-e.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var d=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-d.vertex=!0;d.insert(f.clone());d.insert(e.clone());d.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var d=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");d.vertex=
-!0;d.insert(f.clone());d.insert(f.clone());d.insert(f.clone());return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var d=new mxCell("item: attribute",
-new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);d.vertex=!0;return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([e.clone()],
-e.geometry.width,e.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var d=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
-80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var d=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);d.insert(k);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component")}),
-this.addEntry("uml static class component",function(){var d=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);d.insert(k);
-return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
+Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,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;");f.vertex=!0;var d=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;");
+d.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var e=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
+e.vertex=!0;e.insert(f.clone());e.insert(d.clone());e.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var e=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");e.vertex=
+!0;e.insert(f.clone());e.insert(f.clone());e.insert(f.clone());return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var e=new mxCell("item: attribute",
+new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);e.vertex=!0;return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([d.clone()],
+d.geometry.width,d.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var e=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
+80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var e=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);e.insert(k);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component")}),
+this.addEntry("uml static class component",function(){var e=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);e.insert(k);
+return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
this.createVertexTemplateEntry("shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;",70,50,"package","Package",null,null,"uml static class package"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;",160,90,'<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;"><b>Object:Type</b></p><hr/><p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
"Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;html=1;",180,90,'<div style="box-sizing:border-box;width:100%;background:#e4e4e4;padding:2px;">Tablename</div><table style="width:100%;font-size:1em;" cellpadding="2" cellspacing="0"><tr><td>PK</td><td>uniqueId</td></tr><tr><td>FK1</td><td>foreignKey</td></tr><tr><td></td><td>fieldname</td></tr></table>',"Entity",null,null,"er entity table"),this.addEntry("uml static class object instance",
-function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
-new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
-new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
-new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
+function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
+new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
+new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
+new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
10,20,"","Required Interface",null,null,"uml required interface lollipop notation"),this.addEntry("uml lollipop notation provided required interface",function(){return b.createVertexTemplateFromData("zVRNT8MwDP01uaLSMu6sfFxAmrQDcAytaQJZXLnu2u7XkzQZXTUmuIA4VIqf/ZzkvdQiyzf9HclaPWAJRmQ3IssJkcNq0+dgjEgTXYrsWqRp4j6R3p7Ino/ZpJYEln9CSANhK00LAQlAw4OJAGFrS/D1iciWSKywQivNPWLtwHMHvgHzsNY7z5Ato4MUb0zMgi2viLBzoUULAbnVxsSWzTtwofYBtlTACkhvgIHWtSy0rWKSJVXAJ5Lh4FBWMNMicAJ0cSzPWBW1uQN0fWlwJQRGst7OW8kmhNVn3Sd1hdp1TJMhVCzmhHipUDO54RYHm07Q6NHXfmV/65eS5jXXVJhj15yCNDz54GyxD58PwjL2v/SmMuE7POqSVdxj5vm/cK6PG4X/5deNvPjeSEfQdeOV75Rm8K/dZzo3LOaGSaMr69aF0wbIA00NhZfpVff+JSwJGr2TL2Nnr3jtbzDeabEUi2v/Tlo22kKO1gbq0Z8ZDwzE0J+cNidM2ROinF18CR6KeivQleI59pVrM8knfV04Dc1gx+FM/QA=",
40,10,"Lollipop Notation")}),this.createVertexTemplateEntry("shape=umlBoundary;whiteSpace=wrap;html=1;",100,80,"Boundary Object","Boundary Object",null,null,"uml boundary object"),this.createVertexTemplateEntry("ellipse;shape=umlEntity;whiteSpace=wrap;html=1;",80,80,"Entity Object","Entity Object",null,null,"uml entity object"),this.createVertexTemplateEntry("ellipse;shape=umlControl;whiteSpace=wrap;html=1;",70,80,"Control Object","Control Object",null,null,"uml control object"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;",
-30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var d=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var d=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var d=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
-d.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;d.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,
-!0);return b.createVertexTemplateFromCells([d,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var d=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
-!0;k.geometry.x=-1;k.edge=!0;d.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var d=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
-d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
+30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var e=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var e=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var e=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
+e.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;e.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,
+!0);return b.createVertexTemplateFromCells([e,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var e=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
+!0;k.geometry.x=-1;k.edge=!0;e.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var e=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
+e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
100,300,":Object","Lifeline",null,null,"uml sequence participant lifeline"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlActor;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",20,300,"","Actor Lifeline",null,null,"uml sequence participant lifeline actor"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlBoundary;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
50,300,"","Boundary Lifeline",null,null,"uml sequence participant lifeline boundary"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlEntity;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",40,300,"","Entity Lifeline",null,null,"uml sequence participant lifeline entity"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlControl;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
-40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,
-k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var d=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");d.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
-!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
+40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,
+k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var e=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");e.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
+!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
10,60,"Callback")}),this.createVertexTemplateEntry("html=1;points=[];perimeter=orthogonalPerimeter;",10,80,"","Activation",null,null,"uml sequence activation"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=oval;startFill=1;endArrow=block;startSize=8;",60,0,"dispatch","Found Message 1",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=circle;startFill=1;endArrow=open;startSize=6;endSize=8;",80,0,"dispatch",
-"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var d=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");d.geometry.setTerminalPoint(new mxPoint(80,0),!0);d.geometry.setTerminalPoint(new mxPoint(0,0),!1);d.geometry.relative=
-!0;d.edge=!0;return b.createEdgeTemplateFromCells([d],80,0,"Return")}),this.addEntry("uml relation",function(){var d=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 1")}),this.addEntry("uml association",function(){var d=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
-d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");d.geometry.setTerminalPoint(new mxPoint(0,
-0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var d=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=
-!0;d.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
+"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var e=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");e.geometry.setTerminalPoint(new mxPoint(80,0),!0);e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=
+!0;e.edge=!0;return b.createEdgeTemplateFromCells([e],80,0,"Return")}),this.addEntry("uml relation",function(){var e=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 1")}),this.addEntry("uml association",function(){var e=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
+e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");e.geometry.setTerminalPoint(new mxPoint(0,
+0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var e=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=
+!0;e.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,g);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";mxUtils.write(b,a);return b};
-Sidebar.prototype.createThumb=function(a,b,f,e,g,d,k){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
-mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=d;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";e.appendChild(n);
-this.sidebarTitles&&null!=g&&0!=k&&(e.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),e.appendChild(b));return a};
+Sidebar.prototype.createThumb=function(a,b,f,d,g,e,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
+mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";d.appendChild(n);
+this.sidebarTitles&&null!=g&&0!=k&&(d.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),d.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,f,e,g,d,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
-!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,e,g,d);var r=new mxRectangle(0,0,g,d);1<a.length||a[0].vertex?(e=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a),e.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(e=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a));
+Sidebar.prototype.createItem=function(a,b,f,d,g,e,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
+!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,d,g,e);var r=new mxRectangle(0,0,g,e);1<a.length||a[0].vertex?(d=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a),d.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(d=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a));
!mxClient.IS_IOS&&n&&mxEvent.addGestureListeners(u,null,mxUtils.bind(this,function(x){mxEvent.isMouseEvent(x)&&this.showTooltip(u,a,r.width,r.height,b,f)}));return u};
-Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,e=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var d=f.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),n=
-0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,d);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",e[mxConstants.STYLE_SHAPE],
+Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,d=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var e=f.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),n=
+0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,e);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=d[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",d[mxConstants.STYLE_SHAPE],
[u]));for(r=0;r<k.length;r++){var x=m[k[r]];null!=x&&f.setCellStyles(k[r],x,[u])}g.push(u)}}}finally{f.model.endUpdate()}return g};
-Sidebar.prototype.createDropHandler=function(a,b,f,e){f=null!=f?f:!0;return mxUtils.bind(this,function(g,d,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d)?document.elementFromPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)):mxEvent.getSource(d);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(d)?!1:g.isValidDropTarget(k,a,d);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
-g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,K=g.cloneCells(a);g.splitEdge(k,K,null,n-e.width/2,u-e.height/2,C,F);r=K}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var E=g.layoutManager.getLayout(k);if(null!=E)for(x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,k=0;k<r.length;k++)E.moveCell(r[k],C,F)}!f||null!=d&&mxEvent.isShiftDown(d)||
-g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(O){this.editorUi.handleError(O)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})};
+Sidebar.prototype.createDropHandler=function(a,b,f,d){f=null!=f?f:!0;return mxUtils.bind(this,function(g,e,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(e)?!1:g.isValidDropTarget(k,a,e);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
+g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,e)){var x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,K=g.cloneCells(a);g.splitEdge(k,K,null,n-d.width/2,u-d.height/2,C,F);r=K}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var E=g.layoutManager.getLayout(k);if(null!=E)for(x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,k=0;k<r.length;k++)E.moveCell(r[k],C,F)}!f||null!=e&&mxEvent.isShiftDown(e)||
+g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(O){this.editorUi.handleError(O)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(e)}})};
Sidebar.prototype.createDragPreview=function(a,b){var f=document.createElement("div");f.className="geDragPreview";f.style.width=a+"px";f.style.height=b+"px";return f};
-Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),A=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(A=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=C=0;if(null!=k){var K=k.origin;C=K.x;F=K.y;var E=d.getTerminalPoint(!1);null!=
-E&&(E.x+=K.x,E.y+=K.y)}var O=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&A),R=n.getCellAt((d.x+C+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,T,U){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(K=k.origin,x=R,O=!0,n.model.isEdge(a)||(d.x-=K.x-C,d.y-=K.y-F));else if(!A||n.isTableRow(a)||n.isTableCell(a))d.x+=C,d.y+=F;C=r.x;F=r.y;n.model.isEdge(b[e])&&(F=C=0);k=b=n.importCells(b,
-d.x-(O?C:0),d.y-(O?F:0),O?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var Q=n.getCellGeometry(b[e]);Q.points=null;if(null!=Q.getTerminalPoint(!1))Q.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(O&&n.model.isVertex(x)){var P=n.view.getState(x);K=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,K.x,K.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),C=d.x-Math.round(r.x),F=
-d.y-Math.round(r.y),d.x=Math.round(r.x),d.y=Math.round(r.y),n.model.setGeometry(b[e],d),n.cellsMoved(b,C,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[e],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(aa){this.editorUi.handleError(aa)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view,k=1<e.length,n=g.getCellGeometry(a);e=g.getCellGeometry(b);null!=n&&null!=e&&(e=e.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(e.x=b.x/d.scale-d.translate.x-e.width/2,e.y=b.y/d.scale-d.translate.y-e.height/2):(e.x=g.x/d.scale-d.translate.x-e.width/2,e.y=g.y/d.scale-d.translate.y-e.height/2)):(n.relative&&(a=g.view.getState(a),
-n=n.clone(),n.x=(a.x-d.translate.x)/d.scale,n.y=(a.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(b=e.getTerminalPoint(!0),g=e.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),e.x=n.getCenterX(),e.y=n.getCenterY(),e.width=1,e.height=1,f==mxConstants.DIRECTION_NORTH?(e.height=d,e.y=n.y-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):f==mxConstants.DIRECTION_EAST?(e.width=d,e.x=n.x+n.width,e.setTerminalPoint(new mxPoint(e.x+
-e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=n.y+n.height,e.setTerminalPoint(new mxPoint(e.x,e.y+e.height),!1)):f==mxConstants.DIRECTION_WEST&&(e.width=d,e.x=n.x-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1))):(!k&&45<e.width&&45<e.height&&45<n.width&&45<n.height&&(e.width*=n.height/e.height,e.height=n.height),e.x=n.x+n.width/2-e.width/2,e.y=n.y+n.height/2-e.height/2,f==mxConstants.DIRECTION_NORTH?e.y=e.y-n.height/2-e.height/2-d:f==mxConstants.DIRECTION_EAST?e.x=e.x+n.width/2+
-e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-n.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=n.getCenterX()-n.width/2,e.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()-n.height/
-2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),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.dropAndConnect=function(a,b,f,d,g){var e=this.getDropAndConnectGeometry(a,b[d],f,b),k=[];if(null!=e){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[d]),x=n.model.getParent(a),A=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(A=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=C=0;if(null!=k){var K=k.origin;C=K.x;F=K.y;var E=e.getTerminalPoint(!1);null!=
+E&&(E.x+=K.x,E.y+=K.y)}var O=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&A),R=n.getCellAt((e.x+C+n.view.translate.x)*n.view.scale,(e.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,T,U){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(K=k.origin,x=R,O=!0,n.model.isEdge(a)||(e.x-=K.x-C,e.y-=K.y-F));else if(!A||n.isTableRow(a)||n.isTableCell(a))e.x+=C,e.y+=F;C=r.x;F=r.y;n.model.isEdge(b[d])&&(F=C=0);k=b=n.importCells(b,
+e.x-(O?C:0),e.y-(O?F:0),O?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[d],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[d])){n.model.setTerminal(b[d],a,!0);var Q=n.getCellGeometry(b[d]);Q.points=null;if(null!=Q.getTerminalPoint(!1))Q.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(O&&n.model.isVertex(x)){var P=n.view.getState(x);K=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,K.x,K.y,null,null,!0)}}else r=n.getCellGeometry(b[d]),C=e.x-Math.round(r.x),F=
+e.y-Math.round(r.y),e.x=Math.round(r.x),e.y=Math.round(r.y),n.model.setGeometry(b[d],e),n.cellsMoved(b,C,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[d],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(aa){this.editorUi.handleError(aa)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view,k=1<d.length,n=g.getCellGeometry(a);d=g.getCellGeometry(b);null!=n&&null!=d&&(d=d.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(d.x=b.x/e.scale-e.translate.x-d.width/2,d.y=b.y/e.scale-e.translate.y-d.height/2):(d.x=g.x/e.scale-e.translate.x-d.width/2,d.y=g.y/e.scale-e.translate.y-d.height/2)):(n.relative&&(a=g.view.getState(a),
+n=n.clone(),n.x=(a.x-e.translate.x)/e.scale,n.y=(a.y-e.translate.y)/e.scale),e=g.defaultEdgeLength,g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=d.getTerminalPoint(!1)?(b=d.getTerminalPoint(!0),g=d.getTerminalPoint(!1),e=g.x-b.x,b=g.y-b.y,e=Math.sqrt(e*e+b*b),d.x=n.getCenterX(),d.y=n.getCenterY(),d.width=1,d.height=1,f==mxConstants.DIRECTION_NORTH?(d.height=e,d.y=n.y-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1)):f==mxConstants.DIRECTION_EAST?(d.width=e,d.x=n.x+n.width,d.setTerminalPoint(new mxPoint(d.x+
+d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=n.y+n.height,d.setTerminalPoint(new mxPoint(d.x,d.y+d.height),!1)):f==mxConstants.DIRECTION_WEST&&(d.width=e,d.x=n.x-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1))):(!k&&45<d.width&&45<d.height&&45<n.width&&45<n.height&&(d.width*=n.height/d.height,d.height=n.height),d.x=n.x+n.width/2-d.width/2,d.y=n.y+n.height/2-d.height/2,f==mxConstants.DIRECTION_NORTH?d.y=d.y-n.height/2-d.height/2-e:f==mxConstants.DIRECTION_EAST?d.x=d.x+n.width/2+
+d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+n.height/2+d.height/2+e:f==mxConstants.DIRECTION_WEST&&(d.x=d.x-n.width/2-d.width/2-e),g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(d.x-=n.getCenterX()-n.width/2,d.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()-n.height/
+2):f==mxConstants.DIRECTION_WEST&&(d.x-=n.getCenterX()+n.width/2,d.y-=n.getCenterY()))))));return d};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),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,b,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,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))):b.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&&
+Sidebar.prototype.createDragSource=function(a,b,f,d,g){function e(Z,oa){var ua=mxUtils.createImage(Z.src);ua.style.width=Z.width+"px";ua.style.height=Z.height+"px";null!=oa&&ua.setAttribute("title",oa);mxUtils.setOpacity(ua,Z==this.refreshTarget?30:20);ua.style.position="absolute";ua.style.cursor="crosshair";return ua}function k(Z,oa,ua,Ja){null!=Ja.parentNode&&(mxUtils.contains(ua,Z,oa)?(mxUtils.setOpacity(Ja,100),L=Ja):mxUtils.setOpacity(Ja,Ja==fa?30:20));return ua}for(var n=this.editorUi,u=n.editor.graph,
+m=null,r=null,x=this,A=0;A<d.length&&(null==r&&u.model.isVertex(d[A])?r=A:null==m&&u.model.isEdge(d[A])&&null==u.model.getTerminal(d[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(d,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,ua,Ja,Ga){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=R&&L==fa){var va=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];va=this.updateShapes(Z.model.isEdge(R.cell)?d[0]:d[r],va);Z.setSelectionCells(va)}else null!=
+d&&null!=L&&null!=E&&L!=fa?(va=Z.model.isEdge(E.cell)||null==m?r:m,Z.setSelectionCells(this.dropAndConnect(E.cell,d,I,va,oa))):b.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=e(this.triangleUp,mxResources.get("connect")),aa=e(this.triangleRight,mxResources.get("connect")),T=e(this.triangleDown,mxResources.get("connect")),U=e(this.triangleLeft,mxResources.get("connect")),fa=e(this.refreshTarget,mxResources.get("replace")),ha=null,ba=e(this.roundDrop),qa=e(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,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 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(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),
+if(null!=this.previewElement){var ua=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,d[Ja],I,d),
+va=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(d[Ja]),ra=Z.model.getParent(E.cell),Ha=ua.translate.x*ua.scale,Ta=ua.translate.y*ua.scale;null!=va&&!va.relative&&Z.model.isVertex(ra)&&ra!=ua.currentRoot&&(Ta=ua.getState(ra),Ha=Ta.x,Ta=Ta.y);va=za.x;za=za.y;Z.model.isEdge(d[Ja])&&(za=va=0);this.previewElement.style.left=(Ga.x-va)*ua.scale+Ha+"px";this.previewElement.style.top=(Ga.y-za)*ua.scale+Ta+"px";1==d.length&&(this.previewElement.style.width=Ga.width*ua.scale+"px",
+this.previewElement.style.height=Ga.height*ua.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*ua.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*ua.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(d[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,ua,Ja){var Ga=mxEvent.isAltDown(Ja)||null==d?null:Z.getCellAt(oa,ua,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 va=this.graph.getModel().getParent(Ga);this.graph.getModel().isVertex(va)&&this.graph.isCellConnectable(va)&&
+(Ga=va)}Z.isCellLocked(Ga)&&(Ga=null);var za=Z.view.getState(Ga);va=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,ua,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(d[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,ua,ra,fa)}}else null==R||!mxUtils.contains(R,oa,ua)||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,ua,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){va=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ha=E.absolutePoints;null!=ba.parentNode&&(ra=Ha[0],va.add(k(oa,ua,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],va.add(k(oa,ua,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)),va.add(k(oa,ua,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),va.add(k(oa,ua,new mxRectangle(ra.x+
+ra.width,E.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),va.add(k(oa,ua,new mxRectangle(E.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,this.triangleDown.height),T)),va.add(k(oa,ua,new mxRectangle(ra.x-this.triangleLeft.width,E.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),U));null!=va&&va.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(d[r]))&&(Z.model.isEdge(Ga)&&null!=r||Z.model.isVertex(Ga)&&Z.isCellConnectable(Ga));if(null!=E&&5E3<=ka||E!=za&&(null==va||!mxUtils.contains(va,oa,ua)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Ga)?za:null,null!=E&&ra){va=[ba,qa,P,aa,T,U];for(ra=0;ra<va.length;ra++)null!=va[ra].parentNode&&va[ra].parentNode.removeChild(va[ra]);Z.model.isEdge(Ga)?
+(Ha=za.absolutePoints,null!=Ha&&(ra=Ha[0],Ha=Ha[Ha.length-1],va=Z.tolerance,new mxRectangle(oa-va,ua-va,2*va,2*va),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.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(va=[ba,qa,P,aa,T,U],ra=0;ra<va.length;ra++)null!=va[ra].parentNode&&va[ra].parentNode.removeChild(va[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);va=Z.getModel();if(null!=Ga&&(null!=L||!Z.isSplitTarget(Ga,d,Ja))){for(;null!=Ga&&!Z.isValidDropTarget(Ga,d,Ja)&&va.isVertex(va.getParent(Ga));)Ga=va.getParent(Ga);null!=Ga&&(Z.view.currentRoot==Ga||!Z.isValidRoot(Ga)&&0==Z.getModel().getChildCount(Ga)||Z.isCellLocked(Ga)||va.isEdge(Ga)||!Z.isValidDropTarget(Ga,d,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,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)e.model.isVertex(a[g])&&(b=g);null!=b&&(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,b,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)),b.drop(e,f,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,b,f){var e=b.mouseDown,g=b.mouseMove,d=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){e.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
-k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),d.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
-Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,e,g,d,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,e,g,d,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,e,g,d,k,n,u){a=[new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,d,k,n,u)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,e,g,d,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,e,g,d,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,d,b,f,k,n)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,e,g,d,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,e,g,d,n,u)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,b,f,e,g,d,k,n){a=new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,d,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,null!=n?n:!0,b,f,d,k)};
-Sidebar.prototype.addPaletteFunctions=function(a,b,f,e){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var d=0;d<e.length;d++)g.appendChild(e[d](g))}))};
-Sidebar.prototype.addPalette=function(a,b,f,e){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(e(g),e=null):g.style.display="none";this.addFoldingHandler(b,g,e);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
-Sidebar.prototype.addFoldingHandler=function(a,b,f){var e=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(e)b.style.display="block";else if(e=!0,null!=f){a.style.cursor="wait";var d=a.innerHTML;a.innerHTML=mxResources.get("loading")+
-"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=d;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
+Sidebar.prototype.itemClicked=function(a,b,f,d){d=this.editorUi.editor.graph;d.container.focus();if(mxEvent.isAltDown(f)&&1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)d.model.isVertex(a[g])&&(b=g);null!=b&&(d.setSelectionCells(this.dropAndConnect(d.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,b,f)),d.scrollCellToVisible(d.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!d.isSelectionEmpty()?(f=d.getEditableCells(d.getSelectionCells()),this.updateShapes(a[0],f),d.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?d.getFreeInsertPoint():d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(a,!0)),b.drop(d,f,null,a.x,a.y,!0))};
+Sidebar.prototype.addClickHandler=function(a,b,f){var d=b.mouseDown,g=b.mouseMove,e=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){d.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
+k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
+Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,d,g,e,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,d,g,e,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,d,g,e,k,n,u){a=[new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,e,k,n,u)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,d,g,e,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,d,g,e,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,e,b,f,k,n)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,d,g,e,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,d,g,e,n,u)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,b,f,d,g,e,k,n){a=new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,e,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,null!=n?n:!0,b,f,e,k)};
+Sidebar.prototype.addPaletteFunctions=function(a,b,f,d){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var e=0;e<d.length;e++)g.appendChild(d[e](g))}))};
+Sidebar.prototype.addPalette=function(a,b,f,d){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(d(g),d=null):g.style.display="none";this.addFoldingHandler(b,g,d);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
+Sidebar.prototype.addFoldingHandler=function(a,b,f){var d=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(d)b.style.display="block";else if(d=!0,null!=f){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
+"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=e;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,b,f,e,g,d,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var A=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=A?A:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+e,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=d?d[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
-Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,A,C,F,K){if(null==g||0>mxUtils.indexOf(g,A)){C=this.getTagsForStencil(x,A);var E=null!=n?n[A]:null;null!=E&&C.push(E);r.push(this.createVertexTemplateEntry("shape="+x+A.toLowerCase()+e,Math.round(F*k),Math.round(K*k),"",A.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var A=0;A<u.length;A++)u[A](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,F,K,E,O){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+e,Math.round(E*k),Math.round(O*k),"",F.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addImagePalette=function(a,b,f,d,g,e,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var A=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=A?A:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+d,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=e?e[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
+Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var d=1;d<a.length;d++)a[d]=a[d].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
+Sidebar.prototype.addStencilPalette=function(a,b,f,d,g,e,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,A,C,F,K){if(null==g||0>mxUtils.indexOf(g,A)){C=this.getTagsForStencil(x,A);var E=null!=n?n[A]:null;null!=E&&C.push(E);r.push(this.createVertexTemplateEntry("shape="+x+A.toLowerCase()+d,Math.round(F*k),Math.round(K*k),"",A.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==d&&(d="");null!=e&&e.call(this,x);if(null!=u)for(var A=0;A<u.length;A++)u[A](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,F,K,E,O){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+d,Math.round(E*k),Math.round(O*k),"",F.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
-this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return b(f)}})();
+this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var d=0;d<a.length;d++)f=f.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][1]+";");return b(f)}})();
Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(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 a=Object.prototype.toString,b=function(e){return"function"===typeof e||"[object Function]"===a.call(e)},f=Math.pow(2,53)-1;return function(e){var g=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var d=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof d){if(!b(d))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
-arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=d?"undefined"===typeof k?d(r,m):d.call(k,r,m):r,m+=1;u.length=n;return u}}());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 a=Object.prototype.toString,b=function(d){return"function"===typeof d||"[object Function]"===a.call(d)},f=Math.pow(2,53)-1;return function(d){var g=Object(d);if(null==d)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof e){if(!b(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
+arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=e?"undefined"===typeof k?e(r,m):e.call(k,r,m):r,m+=1;u.length=n;return u}}());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 a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();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(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a};
-Graph=function(a,b,f,e,g,d){mxGraph.call(this,a,b,f,e);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(I){I=this.getCurrentCellStyle(I);
+Graph=function(a,b,f,d,g,e){mxGraph.call(this,a,b,f,d);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=e?e:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(I){I=this.getCurrentCellStyle(I);
return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,L){if("mouseDown"==L.getProperty("eventName")&&this.isEnabled()){I=L.getProperty("event");var H=I.getState();L=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=H)if(this.model.isEdge(H.cell))if(k=new mxPoint(I.getGraphX(),I.getGraphY()),r=this.isCellSelected(H.cell),u=H,n=I,null!=H.text&&null!=
H.text.boundingBox&&mxUtils.contains(H.text.boundingBox,I.getGraphX(),I.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var S=this.selectionCellsHandler.getHandler(H.cell);null!=S&&null!=S.bends&&0<S.bends.length&&(m=S.getHandleForEvent(I))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(I.getEvent())&&(S=this.selectionCellsHandler.getHandler(H.cell),null==S||null==S.getHandleForEvent(I))){var V=new mxRectangle(I.getGraphX()-1,I.getGraphY()-1),ea=mxEvent.isTouchEvent(I.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;S=ea+2;V.grow(ea);if(this.isTableCell(H.cell)&&!this.isCellSelected(H.cell)&&!(mxUtils.contains(H,I.getGraphX()-S,I.getGraphY()-S)&&mxUtils.contains(H,I.getGraphX()-S,I.getGraphY()+S)&&mxUtils.contains(H,I.getGraphX()+S,I.getGraphY()+S)&&mxUtils.contains(H,I.getGraphX()+S,I.getGraphY()-S))){var ka=this.model.getParent(H.cell);S=this.model.getParent(ka);if(!this.isCellSelected(S)){ea*=L;var wa=2*ea;if(this.model.getChildAt(S,0)!=ka&&mxUtils.intersects(V,
@@ -2845,7 +2846,7 @@ null!=H.visibleTargetState)I=this.view.getEdgeStyle(H),V="crosshair",I!=mxEdgeSt
new mxRectangle(H.x,H.y-2,H.width,4))&&this.model.getChildAt(S,0)!=L||mxUtils.intersects(I,new mxRectangle(H.x,H.y+H.height-2,H.width,4)))V="row-resize";else if(mxUtils.intersects(I,new mxRectangle(H.x-2,H.y,4,H.height))&&this.model.getChildAt(L,0)!=H.cell||mxUtils.intersects(I,new mxRectangle(H.x+H.width-2,H.y,4,H.height)))V="col-resize";for(L=H;null==V&&null!=L&&(this.isTableCell(L.cell)||this.isTableRow(L.cell)||this.isTable(L.cell));)this.isSwimlane(L.cell)&&(S=this.getActualStartSize(L.cell),
ea=this.view.scale,(0<S.x||0<S.width)&&mxUtils.intersects(I,new mxRectangle(L.x+(S.x-S.width-1)*ea+(0==S.x?L.width*ea:0),L.y,1,L.height))?V="col-resize":(0<S.y||0<S.height)&&mxUtils.intersects(I,new mxRectangle(L.x,L.y+(S.y-S.height-1)*ea+(0==S.y?L.height:0),L.width,1))&&(V="row-resize")),L=this.view.getState(this.model.getParent(L.cell))}null!=V&&H.setCursor(V)}}}),mouseUp:mxUtils.bind(this,function(I,L){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(I){var L=
mxCellRenderer.prototype.getLabelValue.apply(this,arguments);I.view.graph.isHtmlLabel(I.cell)&&(L=1!=I.style.html?mxUtils.htmlEntities(L,!1):I.view.graph.sanitizeHtml(L));return L};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,L){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=x.apply(this,arguments);if(this.graph.pageVisible){var L=[],H=this.graph.pageFormat,S=this.graph.pageScale,V=H.width*S;H=H.height*S;S=this.graph.view.translate;for(var ea=this.graph.view.scale,ka=
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(I,L){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=x.apply(this,arguments);if(this.graph.pageVisible){var L=[],H=this.graph.pageFormat,S=this.graph.pageScale,V=H.width*S;H=H.height*S;S=this.graph.view.translate;for(var ea=this.graph.view.scale,ka=
this.graph.getPageLayout(),wa=0;wa<ka.width;wa++)L.push(new mxRectangle(((ka.x+wa)*V+S.x)*ea,(ka.y*H+S.y)*ea,V*ea,H*ea));for(wa=1;wa<ka.height;wa++)L.push(new mxRectangle((ka.x*V+S.x)*ea,((ka.y+wa)*H+S.y)*ea,V*ea,H*ea));I=L.concat(I)}return I};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(I,L){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 A=this.graphHandler.getCells;this.graphHandler.getCells=function(I){for(var L=A.apply(this,arguments),H=new mxDictionary,S=[],V=0;V<L.length;V++){var ea=this.graph.isTableCell(I)&&this.graph.isTableCell(L[V])&&this.graph.isCellSelected(L[V])?this.graph.model.getParent(L[V]):this.graph.isTableRow(I)&&this.graph.isTableRow(L[V])&&this.graph.isCellSelected(L[V])?L[V]:this.graph.getCompositeParent(L[V]);
null==ea||H.get(ea)||(H.put(ea,!0),S.push(ea))}return S};var C=this.graphHandler.start;this.graphHandler.start=function(I,L,H,S){var V=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?V=!0:I=this.graph.model.getParent(I));V||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,L){L=this.graph.getCompositeParent(L);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
@@ -2863,29 +2864,29 @@ 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.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
Graph.createOffscreenGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
-Graph.createSvgImage=function(a,b,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="'+b+'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,b)};
-Graph.createSvgNode=function(a,b,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+" "+b+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,e){var g=document.createElement("canvas");g.width=b;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 b=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(b,e)),b=e+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
+Graph.createSvgImage=function(a,b,f,d,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="'+b+'px" '+(null!=d&&null!=g?'viewBox="0 0 '+d+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
+Graph.createSvgNode=function(a,b,f,d,g){var e=mxUtils.createXmlDocument(),k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"svg"):e.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==e.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",d+"px");k.setAttribute("viewBox",a+" "+b+" "+f+" "+d);e.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,d){var g=document.createElement("canvas");g.width=b;g.height=f;var e=document.createElement("img");e.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(e,0,0);d(g.toDataURL())});e.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 b=0,f=[],d=0;d<a.length;d++){var g=a.charCodeAt(d);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(b,d)),b=d+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(b,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,b){a=mxUtils.getXml(a);return Graph.compress(b?a:Graph.zapGremlins(a))};
-Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,e=0;e<f;e++)b+=String.fromCharCode(a[e]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==e){d=f;break}for(f=d+1;-1<d&&f<a.byteLength&&f<d+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
+Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,d=0;d<f;d++)b+=String.fromCharCode(a[d]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(a,b,f){var d=b.charCodeAt(0),g=1,e=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==d){e=f;break}for(f=e+1;-1<e&&f<a.byteLength&&f<e+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,e+1);g++}return g==b.length-1?e:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)};
-Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
+Graph.fadeNodes=function(a,b,f,d,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=d&&d()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};
Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()});
Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b=
-1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
-r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/e))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
+Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),g=d.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(d.substring(g));var e=f.getElementsByTagName("svg");if(0<e.length){if(b||null!=e[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{d=b=
+1;var k=e[0].getAttribute("width"),n=e[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=e[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,d=parseFloat(m[3])/n)}var r=e[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
+r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/d))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(e[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
Graph.createRemoveIcon=function(a,b){var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",a);f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";mxEvent.addListener(f,"click",b);return f};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};
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(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,d=!0,k=null,n=mxUtils.bind(this,function(r){d=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){d=d&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(d)for(var x=mxEvent.getSource(r);null!=
-x&&x!=e.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(e.node,n,u,m);mxEvent.addListener(e.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var e=mxEvent.getSource(f);"A"==e.nodeName&&(e=e.getAttribute("href"),null!=
-e&&this.graph.isCustomLink(e)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(e)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,e){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,e=!0,k=null,n=mxUtils.bind(this,function(r){e=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){e=e&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(e)for(var x=mxEvent.getSource(r);null!=
+x&&x!=d.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(d.node,n,u,m);mxEvent.addListener(d.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var d=mxEvent.getSource(f);"A"==d.nodeName&&(d=d.getAttribute("href"),null!=
+d&&this.graph.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(d)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,d){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(k.style,"lineShape",null)&&(this.model.isVertex(k.cell)||"arrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,
null))};Graph.prototype.isStrokeState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(k){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],k)};Graph.prototype.isGlassState=function(k){k=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return"label"==k||"rectangle"==k||"internalStorage"==k||"ext"==k||"umlLifeline"==k||"swimlane"==k||"process"==k};Graph.prototype.isRoundedState=
function(k){return null!=k.shape?k.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(k){var n=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(k.style,mxConstants.STYLE_CURVED,!1)&&("connector"==n||"filledEdge"==n)};Graph.prototype.isAutoSizeState=function(k){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(k){k=
@@ -2899,78 +2900,78 @@ A;A--){var C=this.model.getChildAt(u,A),F=this.getScaledCellAt(k,n,C,m,r,x);if(n
this.isTableRow(r)&&(r=this.graph.model.getParent(r));null==r||n.get(r)||(n.put(r,!0),u.push(r))}return u};Graph.prototype.getCompositeParent=function(k){for(;this.isPart(k);){var n=this.model.getParent(k);if(!this.model.isVertex(n))break;k=n}return k};Graph.prototype.filterSelectionCells=function(k){var n=this.getSelectionCells();if(null!=k){for(var u=[],m=0;m<n.length;m++)k(n[m])||u.push(n[m]);n=u}return n};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(k){if(this.useCssTransforms){var n=
this.currentScale,u=this.currentTranslate;k=new mxRectangle((k.x+2*u.x)*n-u.x,(k.y+2*u.y)*n-u.y,k.width*n,k.height*n)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(k){k=this.strokeWidth;this.graph.useCssTransforms&&(k/=this.graph.currentScale);return k};mxGraphView.prototype.getGraphBounds=function(){var k=this.graphBounds;if(this.graph.useCssTransforms){var n=this.graph.currentTranslate,u=this.graph.currentScale;k=new mxRectangle((k.x+n.x)*u,(k.y+n.y)*u,k.width*u,k.height*
u)}return k};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(k){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);b.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 f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var e=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=e.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
+this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var d=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=d.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};Graph.prototype.updateCssTransform=function(){var k=this.view.getDrawPane();if(null!=k)if(k=k.parentNode,this.useCssTransforms){var n=k.getAttribute("transform");k.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;k.setAttribute("transform","scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=k.getAttribute("transform")&&
-this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var d=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var e=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
-Graph.prototype.openLink=function(a,b,f){var e=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else e=window.open(a,null!=b?b:"_blank"),null==e||f||(e.opener=null)}catch(d){}return e};
+Graph.prototype.openLink=function(a,b,f){var d=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else d=window.open(a,null!=b?b:"_blank"),null==d||f||(d.opener=null)}catch(e){}return d};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var f=this.graph.model.getParent(a);if(!this.graph.isCellCollapsed(a)&&(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,b))){a=this.graph.getCellStyle(a);if("stackLayout"==a.childLayout)return b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax",
"1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.allowGaps=a.allowGaps||0,b.fill=!0,b.allowGaps&&(b.gridSize=parseFloat(mxUtils.getValue(a,"stackUnitSize",20))),b;if("treeLayout"==
a.childLayout)return b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==a.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent=
"1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(e){null!=window.console&&console.error(e)}}return null}};
-Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var e=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)e[g]=a[f].config[g];b.push(e)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
-Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=e)for(var d=0;d<e.length;d++)g[e[d].nodeName]=e[d].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
-Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=this.view.getState(a[f]);if(null!=e){for(var g=this.cellRenderer.getShapesForState(e),d=0;d<g.length;d++)null!=g[d]&&null!=g[d].node&&b.push(g[d].node);null!=e.control&&null!=e.control.node&&b.push(e.control.node)}}return b};
-Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],e=0;e<a.length;e++){var g=this.view.getState(a[e]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
-Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),e=a.segments,g=a.length,d=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<d;r++)if(m<=e[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/e[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/e[r-1]));break}else m-=e[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(d){null!=window.console&&console.error(d)}}return null}};
+Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var d=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)d[g]=a[f].config[g];b.push(d)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
+Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=d)for(var e=0;e<d.length;e++)g[d[e].nodeName]=d[e].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
+Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=this.view.getState(a[f]);if(null!=d){for(var g=this.cellRenderer.getShapesForState(d),e=0;e<g.length;e++)null!=g[e]&&null!=g[e].node&&b.push(g[e].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b};
+Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],d=0;d<a.length;d++){var g=this.view.getState(a[d]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
+Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),d=a.segments,g=a.length,e=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<e;r++)if(m<=d[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/d[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/d[r-1]));break}else m-=d[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
a.text.node&&(a.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(e,g){null!=a.shape&&(g=e/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==e&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
-(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,e){f=null!=f?f:30;e=null!=e?e:30;var g=null,d=0,k=mxUtils.bind(this,function(){if(d==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(d,f);d++});g=window.setInterval(k,e);k()};
+Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(d,g){null!=a.shape&&(g=d/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==d&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
+(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,d){f=null!=f?f:30;d=null!=d?d:30;var g=null,e=0,k=mxUtils.bind(this,function(){if(e==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(e,f);e++});g=window.setInterval(k,d);k()};
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 a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),e=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,e,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
-e)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),d=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,d,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+d)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return Graph.zoomWheel&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(a)||mxEvent.isControlDown(a))};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};
Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isAltDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)&&!mxEvent.isMetaDown(a)};Graph.prototype.isEdgeIgnored=function(a){var b=!1;null!=a&&(a=this.getCurrentCellStyle(a),b="1"==mxUtils.getValue(a,"ignoreEdge","0"));return b};Graph.prototype.isSplitTarget=function(a,b,f){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};
Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,f){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 e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(O,R){O=String(O);for(R=R||2;O.length<R;)O="0"+O;return O};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),A=a[n+"Hours"](),C=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var K=f?0:a.getTimezoneOffset(),E={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+
-12],yy:String(x).slice(2),yyyy:x,h:A%12||12,hh:k(A%12||12),H:A,HH:k(A),M:C,MM:k(C),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>A?"a":"p",tt:12>A?"am":"pm",T:12>A?"A":"P",TT:12>A?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<K?"-":"+")+k(100*Math.floor(Math.abs(K)/60)+Math.abs(K)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(O){return O in E?E[O]:O.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 d=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,k=function(O,R){O=String(O);for(R=R||2;O.length<R;)O="0"+O;return O};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),A=a[n+"Hours"](),C=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var K=f?0:a.getTimezoneOffset(),E={d:u,dd:k(u),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:d.i18n.monthNames[r],mmmm:d.i18n.monthNames[r+
+12],yy:String(x).slice(2),yyyy:x,h:A%12||12,hh:k(A%12||12),H:A,HH:k(A),M:C,MM:k(C),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>A?"a":"p",tt:12>A?"am":"pm",T:12>A?"A":"P",TT:12>A?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(e,""),o:(0<K?"-":"+")+k(100*Math.floor(Math.abs(K)/60)+Math.abs(K)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(O){return O in E?E[O]:O.slice(1,
O.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b};
-Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var e=this.getModel(),g=e.getChildCount(e.root),d=0;d<g;d++)mxUtils.bind(this,function(k){function n(){e.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
-"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(e.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
-mxEvent.addListener(m,"click",function(){e.setVisible(k,!e.isVisible(k));n();null!=a&&a(k)});n()})(e.getChildAt(e.root,d));return f};
-Graph.prototype.replacePlaceholders=function(a,b,f,e){e=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var d=match[0];if(2<d.length&&"%label%"!=d&&"%tooltip%"!=d){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=d.substring(1);else{var n=d.substring(1,d.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
-null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}e.push(b.substring(g,match.index)+(null!=k?k:d));g=match.index+d.length}}e.push(b.substring(g))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var e=this.model.getCell(a[f].id);null!=e&&b.push(e)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var d=this.getModel(),g=d.getChildCount(d.root),e=0;e<g;e++)mxUtils.bind(this,function(k){function n(){d.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
+"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(d.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
+mxEvent.addListener(m,"click",function(){d.setVisible(k,!d.isVisible(k));n();null!=a&&a(k)});n()})(d.getChildAt(d.root,e));return f};
+Graph.prototype.replacePlaceholders=function(a,b,f,d){d=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var e=match[0];if(2<e.length&&"%label%"!=e&&"%tooltip%"!=e){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=e.substring(1);else{var n=e.substring(1,e.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
+null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}d.push(b.substring(g,match.index)+(null!=k?k:e));g=match.index+e.length}}d.push(b.substring(g))}return d.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var e=this.model.getParent(a),g=this.model.getParent(e),d=this.model.getParent(b);if(g==this.model.getParent(d)){a=e.getIndex(a);e=g.getIndex(e);var k=d.getIndex(b),n=g.getIndex(d);d=Math.max(e,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(e=Math.min(e,n);e<=d;e++){n=this.model.getChildAt(g,e);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var d=this.model.getParent(a),g=this.model.getParent(d),e=this.model.getParent(b);if(g==this.model.getParent(e)){a=d.getIndex(a);d=g.getIndex(d);var k=e.getIndex(b),n=g.getIndex(e);e=Math.max(d,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(d=Math.min(d,n);d<=e;d++){n=this.model.getChildAt(g,d);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
!this.isCellSelected(k[0]))&&(this.setSelectionCells(k),f=!0)}}return f};
-Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f],g=this.getCellGeometry(e);if(null!=g){g=g.clone();if(this.getModel().isVertex(e))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(e)&&null!=g.points)for(var d=0;d<g.points.length;d++)g.points[d].x=Math.round(g.points[d].x/b)*b,g.points[d].y=Math.round(g.points[d].y/b)*b;this.getModel().setGeometry(e,
+Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f],g=this.getCellGeometry(d);if(null!=g){g=g.clone();if(this.getModel().isVertex(d))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(d)&&null!=g.points)for(var e=0;e<g.points.length;e++)g.points[e].x=Math.round(g.points[e].x/b)*b,g.points[e].y=Math.round(g.points[e].y/b)*b;this.getModel().setGeometry(d,
g)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,f,e,g,d,k,n){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
-mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var A=this.view.translate;m=A.x*f;A=A.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,A=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(m+r.x*f,A+r.y*f)).grow(40*f);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var C=null,F=null;if(null!=d){d=d.reverse();for(var K=0;K<d.length;K++)if(!this.isCellLocked(d[K])&&!this.model.isEdge(d[K])&&d[K]!=a)if(!this.model.isAncestor(a,d[K])&&this.isContainer(d[K])&&(null==C||d[K]==this.model.getParent(a)))C=d[K];else if(null==F&&this.isCellConnectable(d[K])&&!this.model.isAncestor(d[K],a)&&!this.isSwimlane(d[K])){var E=this.view.getState(d[K]);null==x||null==E||mxUtils.intersects(x,E)||(F=d[K])}}var O=
-!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;O&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],Q=F;F=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==F&&u){this.model.beginUpdate();try{if(null==Q&&O){var aa=this.getAbsoluteParent(null!=P?P:a);aa=u?a:this.getCompositeParent(aa);Q=null!=P?P:this.duplicateCells([aa],
-!1)[0];null!=P&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var T=this.getCellGeometry(Q);null!=T&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=T.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=T.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-T.width/2:r.x+T.width/2),T.x=r.x-T.width/2,T.y=r.y-T.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),F=null):O&&!u&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var U=mxEvent.isControlDown(e)&&
-mxEvent.isShiftDown(e)&&O||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());if(null!=U&&this.connectionHandler.insertBeforeSource){var fa=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=U.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==U.parent&&(fa=P.parent.getIndex(P),this.model.add(P.parent,U,fa))}null==F&&null!=Q&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(fa=a.parent.getIndex(a),this.model.add(a.parent,
+Graph.prototype.connectVertex=function(a,b,f,d,g,e,k,n){e=e?e:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
+mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var A=this.view.translate;m=A.x*f;A=A.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,A=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);e=e?null:(new mxRectangle(m+r.x*f,A+r.y*f)).grow(40*f);e=null!=e?
+this.getCells(0,0,0,0,null,null,e,null,!0):null;x=this.view.getState(a);var C=null,F=null;if(null!=e){e=e.reverse();for(var K=0;K<e.length;K++)if(!this.isCellLocked(e[K])&&!this.model.isEdge(e[K])&&e[K]!=a)if(!this.model.isAncestor(a,e[K])&&this.isContainer(e[K])&&(null==C||e[K]==this.model.getParent(a)))C=e[K];else if(null==F&&this.isCellConnectable(e[K])&&!this.model.isAncestor(e[K],a)&&!this.isSwimlane(e[K])){var E=this.view.getState(e[K]);null==x||null==E||mxUtils.intersects(x,E)||(F=e[K])}}var O=
+!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||g;O&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],Q=F;F=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==F&&u){this.model.beginUpdate();try{if(null==Q&&O){var aa=this.getAbsoluteParent(null!=P?P:a);aa=u?a:this.getCompositeParent(aa);Q=null!=P?P:this.duplicateCells([aa],
+!1)[0];null!=P&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var T=this.getCellGeometry(Q);null!=T&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=T.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=T.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-T.width/2:r.x+T.width/2),T.x=r.x-T.width/2,T.y=r.y-T.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),F=null):O&&!u&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var U=mxEvent.isControlDown(d)&&
+mxEvent.isShiftDown(d)&&O||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());if(null!=U&&this.connectionHandler.insertBeforeSource){var fa=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=U.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==U.parent&&(fa=P.parent.getIndex(P),this.model.add(P.parent,U,fa))}null==F&&null!=Q&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(fa=a.parent.getIndex(a),this.model.add(a.parent,
Q,fa));null!=U&&R.push(U);null==F&&null!=Q&&R.push(Q);null==Q&&null!=U&&U.geometry.setTerminalPoint(r,!1);null!=U&&this.fireEvent(new mxEventObject("cellsInserted","cells",[U]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=Q||!O||null==F&&u)return g(Q);k(m+r.x*f,A+r.y*f,g)};
-Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")};
-Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
+Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],d,g=0;g<a.length;g++)if(d=a[g],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(b.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([b])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&f.push(d);return f.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var d=a;null==f&&null!=d;)null!=d.value&&"object"==typeof d.value&&(f=d.hasAttribute(b)?null!=d.getAttribute(b)?d.getAttribute(b):"":null),d=this.model.getParent(d)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(a,b){return this.updateHorizontalStyle(a,this.replaceDefaultColors(a,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
Graph.prototype.updateHorizontalStyle=function(a,b){if(null!=a&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(a=this.layoutManager.getLayout(f),null!=a&&a.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!a.horizontal))}return b};
Graph.prototype.replaceDefaultColors=function(a,b){if(null!=b){a=mxUtils.hex2rgb(this.shapeBackgroundColor);var f=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(b,mxConstants.STYLE_FONTCOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_STROKECOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BORDER,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BACKGROUND,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,
f);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f){null!=a&&"default"==a[b]&&null!=f&&(a[b]=f)};
-Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var e=this.layoutManager.getLayout(this.model.getParent(a));null!=e&&e.constructor==mxStackLayout&&(e.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,f,e,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var d=0;d<f.length;d++){var k=this.view.getState(f[d]),n=this.getCellGeometry(f[d]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[d]),x=this.layoutManager.getLayout(r);
+Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,f,d,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var e=0;e<f.length;e++){var k=this.view.getState(f[e]),n=this.getCellGeometry(f[e]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[e]),x=this.layoutManager.getLayout(r);
null==x?null!=g&&this.isMoveCellsEvent(g,k)&&this.moveSiblings(k,r,u,m):null!=g&&mxEvent.isAltDown(g)||x.constructor!=mxStackLayout||x.resizeLast||this.resizeParentStacks(r,x,u,m)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,b,f,e){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var d=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=d&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(d.x-a.x)/a.width))),Math.round(e*Math.max(0,Math.min(1,(d.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,f,e){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var d=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=d&&(d=d.clone(),b.horizontal?d.width+=f+Math.min(0,k.width/this.view.scale-d.width):d.height+=e+Math.min(0,k.height/this.view.scale-d.height),this.model.setGeometry(a,
-d));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var e=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=e&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var e=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=e&&(e=e.clone(),b.horizontal?e.width+=f+Math.min(0,k.width/this.view.scale-e.width):e.height+=d+Math.min(0,k.height/this.view.scale-e.height),this.model.setGeometry(a,
+e));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(a,b,f){var e=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(e)&&(e=null);return e};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
+Graph.prototype.getSwimlaneAt=function(a,b,f){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,e=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,e/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var d=this.view.translate;this.container.scrollTop=(a.y+d.y)*g-Math.max((e-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+d.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
-mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&e.push({name:a[g].nodeName,value:a[g].nodeValue});e.sort(function(d,k){return d.name<k.name?-1:d.name>k.name?1:0});for(g=0;g<e.length;g++)"link"==e[g].name&&this.isCustomLink(e[g].value)||(b+=("link"!=e[g].name?"<b>"+e[g].name+":</b> ":"")+mxUtils.htmlEntities(e[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,d=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var e=this.view.translate;this.container.scrollTop=(a.y+e.y)*g-Math.max((d-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+e.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
+mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(e,k){return e.name<k.name?-1:e.name>k.name?1:0});for(g=0;g<d.length;g++)"link"==d[g].name&&this.isCustomLink(d[g].value)||(b+=("link"!=d[g].name?"<b>"+d[g].name+":</b> ":"")+mxUtils.htmlEntities(d[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};
Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){mxEventSource.call(this);this.graph=a;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;
@@ -2983,60 +2984,60 @@ HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangle
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(f){null!=f.relatedTarget&&
mxEvent.getSource(f)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(f){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(f){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(f.getEvent())||this.graph.model.isVertex(f.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(f,
-e){b=!1;f=e.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(e=this.getState(e.getState()),null==e&&mxEvent.isTouchEvent(f)||this.update(e));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,e){f=e.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(e.getState()),e.getGraphX(),e.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
-function(f,e){f=e.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),e):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(e.getGraphX(),e.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
-this.bbox&&mxUtils.contains(this.bbox,e.getGraphX(),e.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
-HoverIcons.prototype.createArrow=function(a,b,f){var e=null;e=mxUtils.createImage(a.src);e.style.width=a.width+"px";e.style.height=a.height+"px";e.style.padding=this.tolerance+"px";null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e,this.fireEvent(new mxEventObject("focus",
-"arrow",e,"direction",f,"event",g)))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",e,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+d){b=!1;f=d.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(d=this.getState(d.getState()),null==d&&mxEvent.isTouchEvent(f)||this.update(d));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,d){f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
+function(f,d){f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
+this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
+HoverIcons.prototype.createArrow=function(a,b,f){var d=null;d=mxUtils.createImage(a.src);d.style.width=a.width+"px";d.style.height=a.height+"px";d.style.padding=this.tolerance+"px";null!=b&&d.setAttribute("title",b);d.style.position="absolute";d.style.cursor=this.cssCursor;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=d,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(d,this.graph,this.currentState);mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=d&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(d,100),this.activeArrow=d,this.fireEvent(new mxEventObject("focus",
+"arrow",d,"direction",f,"event",g)))}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",d,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return d};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};
HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,f){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,f),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,f){return this.graph.view.getState(this.graph.getCellAt(b,f))};
-HoverIcons.prototype.click=function(a,b,f){var e=f.getEvent(),g=f.getGraphX(),d=f.getGraphY();g=this.getStateAt(a,g,d);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(e)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
+HoverIcons.prototype.click=function(a,b,f){var d=f.getEvent(),g=f.getGraphX(),e=f.getGraphY();g=this.getStateAt(a,g,e);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(d)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
HoverIcons.prototype.execute=function(a,b,f){f=f.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,f,this.graph.isCloneEvent(f),this.graph.isCloneEvent(f)),f,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||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 a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(b=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var f=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
(f=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(n,u,m){if(null!=f){var r=new mxRectangle(u,m,n.clientWidth,n.clientHeight);mxUtils.intersects(r,f)&&(n==this.arrowUp?m-=r.y+r.height-f.y:n==this.arrowRight?u+=f.x+f.width-r.x:n==this.arrowDown?m+=f.y+f.height-r.y:n==this.arrowLeft&&(u-=r.x+r.width-f.x))}n.style.left=u+"px";n.style.top=m+"px";mxUtils.setOpacity(n,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==g&&g==a&&(a=g=e=b=null);var d=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
-this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==d||m.height<3*d.height&&m.width<3*d.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(e,this.arrowLeft);k(g,this.arrowUp);k(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==g&&g==a&&(a=g=d=b=null);var e=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
+this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==e||m.height<3*e.height&&m.width<3*e.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(d,this.arrowLeft);k(g,this.arrowUp);k(a,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 a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
-HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
+HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.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=a};Graph.prototype.createParent=function(a,b,f,e,g){a=this.cloneCell(a);for(var d=0;d<f;d++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=d*e,n.y+=d*g);a.insert(k)}return a};
-Graph.prototype.createTable=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:60;e=null!=e?e:40;d=null!=d?d:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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!=g?g:"",0,0,b*f,a*e+(null!=g?d:0),null!=k?k:"shape=table;startSize="+(null!=g?d:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,e,n),this.createVertex(null,null,"",0,0,f,e,u),b,f,0),a,0,e)};
-Graph.prototype.setTableValues=function(a,b,f){for(var e=this.model.getChildCells(a,!0),g=0;g<e.length;g++)if(null!=f&&(e[g].value=f[g]),null!=b)for(var d=this.model.getChildCells(e[g],!0),k=0;k<d.length;k++)null!=b[g][k]&&(d[k].value=b[g][k]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:120;e=null!=e?e:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*e,null!=d?d:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");d=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=d;g.geometry.height+=d;k=this.createVertex(null,
-null,"",0,d,b*f+d,e,k);g.insert(this.createParent(k,this.createVertex(null,null,"",d,0,f,e,n),b,f,0));return 1<a?(k.geometry.y=e+d,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",d,0,f,e,u),b,f,0),a-1,0,e)):g};
-Graph.prototype.visitTableCells=function(a,b){var f=null,e=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<e.length;g++){for(var d=this.getActualStartSize(e[g],!0),k=this.model.getChildCells(e[g],!0),n=this.getCellStyle(e[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),A={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;A.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+d.x),x.height+(null!=f&&null!=
-f[0]?f[0].point.y:a.y+d.y));A.actual=A;null!=f&&null!=f[r]&&1<f[r].rowspan?(A.rowspan=f[r].rowspan-1,A.colspan=f[r].colspan,A.actual=f[r].actual):null!=u&&1<u.colspan?(A.rowspan=u.rowspan,A.colspan=u.colspan-1,A.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(A.rowspan=parseInt(u.rowspan||1),A.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(A,k.length,
-e.length,a.x+(u?d.x:0),a.y+(u?d.y:0));m.push(A);u=A}f=m}};Graph.prototype.getTableLines=function(a,b,f){var e=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(d,k,n,u,m){b&&d.row<n-1&&(null==e[d.row]&&(e[d.row]=[new mxPoint(u,d.point.y)]),1<d.rowspan&&e[d.row].push(null),e[d.row].push(d.point));f&&d.col<k-1&&(null==g[d.col]&&(g[d.col]=[new mxPoint(d.point.x,m)]),1<d.colspan&&g[d.col].push(null),g[d.col].push(d.point))}));return e.concat(g)};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.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=a};Graph.prototype.createParent=function(a,b,f,d,g){a=this.cloneCell(a);for(var e=0;e<f;e++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=e*d,n.y+=e*g);a.insert(k)}return a};
+Graph.prototype.createTable=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:60;d=null!=d?d:40;e=null!=e?e:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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!=g?g:"",0,0,b*f,a*d+(null!=g?e:0),null!=k?k:"shape=table;startSize="+(null!=g?e:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,d,n),this.createVertex(null,null,"",0,0,f,d,u),b,f,0),a,0,d)};
+Graph.prototype.setTableValues=function(a,b,f){for(var d=this.model.getChildCells(a,!0),g=0;g<d.length;g++)if(null!=f&&(d[g].value=f[g]),null!=b)for(var e=this.model.getChildCells(d[g],!0),k=0;k<e.length;k++)null!=b[g][k]&&(e[k].value=b[g][k]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*d,null!=e?e:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");e=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=e;g.geometry.height+=e;k=this.createVertex(null,
+null,"",0,e,b*f+e,d,k);g.insert(this.createParent(k,this.createVertex(null,null,"",e,0,f,d,n),b,f,0));return 1<a?(k.geometry.y=d+e,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",e,0,f,d,u),b,f,0),a-1,0,d)):g};
+Graph.prototype.visitTableCells=function(a,b){var f=null,d=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<d.length;g++){for(var e=this.getActualStartSize(d[g],!0),k=this.model.getChildCells(d[g],!0),n=this.getCellStyle(d[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),A={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;A.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+e.x),x.height+(null!=f&&null!=
+f[0]?f[0].point.y:a.y+e.y));A.actual=A;null!=f&&null!=f[r]&&1<f[r].rowspan?(A.rowspan=f[r].rowspan-1,A.colspan=f[r].colspan,A.actual=f[r].actual):null!=u&&1<u.colspan?(A.rowspan=u.rowspan,A.colspan=u.colspan-1,A.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(A.rowspan=parseInt(u.rowspan||1),A.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(A,k.length,
+d.length,a.x+(u?e.x:0),a.y+(u?e.y:0));m.push(A);u=A}f=m}};Graph.prototype.getTableLines=function(a,b,f){var d=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(e,k,n,u,m){b&&e.row<n-1&&(null==d[e.row]&&(d[e.row]=[new mxPoint(u,e.point.y)]),1<e.rowspan&&d[e.row].push(null),d[e.row].push(e.point));f&&e.col<k-1&&(null==g[e.col]&&(g[e.col]=[new mxPoint(e.point.x,m)]),1<e.colspan&&g[e.col].push(null),g[e.col].push(e.point))}));return d.concat(g)};
Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};Graph.prototype.isStack=function(a){a=this.getCellStyle(a);return null!=a&&"stackLayout"==a.childLayout};
Graph.prototype.isStackChild=function(a){return this.model.isVertex(a)&&this.isStack(this.model.getParent(a))};
-Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var e=this.getModel();e.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;e.setGeometry(a,g);var d=e.getParent(a),k=e.getChildCells(d,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,e.setGeometry(u,m))}}var r=this.getCellGeometry(d);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,e.setGeometry(d,r)))}}finally{e.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var e=this.getModel(),g=e.getParent(a),d=e.getParent(g),k=e.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;e.beginUpdate();try{for(var u=e.getChildCells(d,!0),m=0;m<u.length;m++){g=u[m];k=e.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),e.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
-x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),e.setGeometry(r,x)))}if(n||f){var A=this.getCellGeometry(d);null!=A&&(A=A.clone(),A.width+=b,e.setGeometry(d,A))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{e.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var g=this.graph.getCellGeometry(a[e]);null!=g&&(f+=b?g.width:g.height)}return f};
-TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-e.x-e.width;var g=[];e=e.x;for(var d=0;d<f.length;d++){var k=this.graph.getCellGeometry(f[d]);null!=k&&(e+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(e)))}return g};
-TableLayout.prototype.layoutRow=function(a,b,f,e){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<d.length;u++){var m=this.graph.getCellGeometry(d[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==d.length-1&&u<b.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==d.length-1?m.width=e-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
-0,m.width,m.height),g.setGeometry(d[u],m))}return n};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(e,"resizeLastRow","0"),d="1"==mxUtils.getValue(e,"resizeLast","0");e="1"==mxUtils.getValue(e,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var A=this.getSize(r,!1);if(0<u&&0<m&&0<
-r.length&&0<A){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-A+C.height,k.setGeometry(r[r.length-1],C))}var F=d?null:this.getRowLayout(r[0],m),K=[],E=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(E),E=g||e?E+C.height:E+C.height/A*u,C.height=Math.round(E)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],F,C.height,m,K));e&&u<A&&(f=f.clone(),f.height=E+b.height,k.setGeometry(a,
-f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(O){k.setVisible(O.cell,O.actual.cell==O.cell);if(O.actual.cell!=O.cell){if(O.actual.row==O.row){var R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo;O.actual.geo.width+=R.width}O.actual.col==O.col&&(R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo,O.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
+Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;d.setGeometry(a,g);var e=d.getParent(a),k=d.getChildCells(e,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,d.setGeometry(u,m))}}var r=this.getCellGeometry(e);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,d.setGeometry(e,r)))}}finally{d.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var d=this.getModel(),g=d.getParent(a),e=d.getParent(g),k=d.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;d.beginUpdate();try{for(var u=d.getChildCells(e,!0),m=0;m<u.length;m++){g=u[m];k=d.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),d.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
+x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),d.setGeometry(r,x)))}if(n||f){var A=this.getCellGeometry(e);null!=A&&(A=A.clone(),A.width+=b,d.setGeometry(e,A))}null!=this.layoutManager&&this.layoutManager.executeLayout(e)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var g=this.graph.getCellGeometry(a[d]);null!=g&&(f+=b?g.width:g.height)}return f};
+TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-d.x-d.width;var g=[];d=d.x;for(var e=0;e<f.length;e++){var k=this.graph.getCellGeometry(f[e]);null!=k&&(d+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(d)))}return g};
+TableLayout.prototype.layoutRow=function(a,b,f,d){var g=this.graph.getModel(),e=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<e.length;u++){var m=this.graph.getCellGeometry(e[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==e.length-1&&u<b.length-2&&(m.width=d-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==e.length-1?m.width=d-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
+0,m.width,m.height),g.setGeometry(e[u],m))}return n};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(d,"resizeLastRow","0"),e="1"==mxUtils.getValue(d,"resizeLast","0");d="1"==mxUtils.getValue(d,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var A=this.getSize(r,!1);if(0<u&&0<m&&0<
+r.length&&0<A){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-A+C.height,k.setGeometry(r[r.length-1],C))}var F=e?null:this.getRowLayout(r[0],m),K=[],E=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(E),E=g||d?E+C.height:E+C.height/A*u,C.height=Math.round(E)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],F,C.height,m,K));d&&u<A&&(f=f.clone(),f.height=E+b.height,k.setGeometry(a,
+f));e&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(O){k.setVisible(O.cell,O.actual.cell==O.cell);if(O.actual.cell!=O.cell){if(O.actual.row==O.row){var R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo;O.actual.geo.width+=R.width}O.actual.col==O.col&&(R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo,O.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
!1)}finally{k.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(r,x){x=null!=x?x:!0;var A=this.getState(r);null!=A&&x&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&!A.invalid&&this.updateLineJumps(A)&&this.graph.cellRenderer.redraw(A,!1,this.isRendering());A=b.apply(this,
arguments);null!=A&&x&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(A);return A};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(){f.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 r=this.node.getElementsByTagName("path");if(1<r.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return e.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return d.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=r.routedPoints,C=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(ba,qa,I){var L=new mxPoint(qa,I);L.type=ba;C.push(L);L=null!=r.routedPoints?r.routedPoints[C.length-1]:null;return null==L||L.type!=
ba||L.x!=qa||L.y!=I},K=.5*this.scale;A=!1;C=[];for(var E=0;E<x.length-1;E++){for(var O=x[E+1],R=x[E],Q=[],P=x[E+2];E<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,P.x,P.y,O.x,O.y)<1*this.scale*this.scale;)O=P,E++,P=x[E+2];A=F(0,R.x,R.y)||A;for(var aa=0;aa<this.validEdges.length;aa++){var T=this.validEdges[aa],U=T.absolutePoints;if(null!=U&&mxUtils.intersects(r,T)&&"1"!=T.style.noJump)for(T=0;T<U.length-1;T++){var fa=U[T+1],ha=U[T];for(P=U[T+2];T<U.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,P.x,P.y,fa.x,fa.y)<
1*this.scale*this.scale;)fa=P,T++,P=U[T+2];P=mxUtils.intersection(R.x,R.y,O.x,O.y,ha.x,ha.y,fa.x,fa.y);if(null!=P&&(Math.abs(P.x-R.x)>K||Math.abs(P.y-R.y)>K)&&(Math.abs(P.x-O.x)>K||Math.abs(P.y-O.y)>K)&&(Math.abs(P.x-ha.x)>K||Math.abs(P.y-ha.y)>K)&&(Math.abs(P.x-fa.x)>K||Math.abs(P.y-fa.y)>K)){fa=P.x-R.x;ha=P.y-R.y;P={distSq:fa*fa+ha*ha,x:P.x,y:P.y};for(fa=0;fa<Q.length;fa++)if(Q[fa].distSq>P.distSq){Q.splice(fa,0,P);P=null;break}null==P||0!=Q.length&&Q[Q.length-1].x===P.x&&Q[Q.length-1].y===P.y||
-Q.push(P)}}}for(T=0;T<Q.length;T++)A=F(1,Q[T].x,Q[T].y)||A}P=x[x.length-1];A=F(0,P.x,P.y)||A}r.routedPoints=C;return A}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,A){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)d.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+Q.push(P)}}}for(T=0;T<Q.length;T++)A=F(1,Q[T].x,Q[T].y)||A}P=x[x.length-1];A=F(0,P.x,P.y)||A}r.routedPoints=C;return A}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,A){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)e.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2,F=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,K=mxUtils.getValue(this.style,"jumpStyle","none"),E=!0,O=null,R=null,Q=[],P=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var T=this.state.routedPoints[aa],U=new mxPoint(T.x/this.scale,T.y/this.scale);0==aa?U=x[0]:aa==this.state.routedPoints.length-1&&(U=x[x.length-1]);var fa=!1;if(null!=O&&1==T.type){var ha=this.state.routedPoints[aa+1];T=ha.x/this.scale-U.x;ha=ha.y/this.scale-
U.y;T=T*T+ha*ha;null==P&&(P=new mxPoint(U.x-O.x,U.y-O.y),R=Math.sqrt(P.x*P.x+P.y*P.y),0<R?(P.x=P.x*F/R,P.y=P.y*F/R):P=null);T>F*F&&0<R&&(T=O.x-U.x,ha=O.y-U.y,T=T*T+ha*ha,T>F*F&&(fa=new mxPoint(U.x-P.x,U.y-P.y),T=new mxPoint(U.x+P.x,U.y+P.y),Q.push(fa),this.addPoints(r,Q,A,C,!1,null,E),Q=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,E=!1,"sharp"==K?(r.lineTo(fa.x-P.y*Q,fa.y+P.x*Q),r.lineTo(T.x-P.y*Q,T.y+P.x*Q),r.lineTo(T.x,T.y)):"line"==K?(r.moveTo(fa.x+P.y*Q,fa.y-P.x*Q),r.lineTo(fa.x-
P.y*Q,fa.y+P.x*Q),r.moveTo(T.x-P.y*Q,T.y+P.x*Q),r.lineTo(T.x+P.y*Q,T.y-P.x*Q),r.moveTo(T.x,T.y)):"arc"==K?(Q*=1.3,r.curveTo(fa.x-P.y*Q,fa.y+P.x*Q,T.x-P.y*Q,T.y+P.x*Q,T.x,T.y)):(r.moveTo(T.x,T.y),E=!0),Q=[T],fa=!0))}else P=null;fa||(Q.push(U),O=U)}this.addPoints(r,Q,A,C,!1,null,E);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,A,C){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),
@@ -3045,33 +3046,33 @@ Math.sin(-E);F=mxUtils.getRotatedPoint(F,R,Q,O)}R=parseFloat(r.style[mxConstants
C=A=null;if(null!=r)for(var K=0;K<r.length;K++){var E=this.graph.getConnectionPoint(x,r[K]);if(null!=E){var O=(E.x-F.x)*(E.x-F.x)+(E.y-F.y)*(E.y-F.y);if(null==C||O<C)A=E,C=O}}null!=A&&(F=A)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,A){var C=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=A.state&&(C=A.state.view.graph.replacePlaceholders(A.state.cell,C));return C};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var A=x.substring(8,x.length-1),C=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(C.documentElement))}catch(F){null!=window.console&&console.log("Error in shape: "+F)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var e=0;e<b.length;e++){var g=b[e];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
-null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var g=b[d];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
+null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var e=mxUtils.load(g);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var f=2;f<a.length-1;f++)b+="/"+a[f]}return b};
-mxStencilRegistry.loadStencilSet=function(a,b,f,e){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var d=!1;if(null==g)try{if(e){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,d=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,d))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;d=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
-g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,d)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var e=a.firstChild;null!=e;)"shapes"==e.nodeName&&mxStencilRegistry.parseStencilSet(e,b,f),e=e.nextSibling;else{f=null!=f?f:!0;e=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=e;){if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=e.getAttribute("name"),null!=a)){g=g.toLowerCase();var d=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+d.toLowerCase(),new mxStencil(e));if(null!=b){var k=e.getAttribute("w"),
-n=e.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,d,a,k,n)}}e=e.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,f,d){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var e=!1;if(null==g)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,e=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,e))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;e=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,e)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;d=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){g=g.toLowerCase();var e=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+e.toLowerCase(),new mxStencil(d));if(null!=b){var k=d.getAttribute("w"),
+n=d.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,e,a,k,n)}}d=d.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function a(){var t=document.createElement("div");t.className="geHint";t.style.whiteSpace="nowrap";t.style.position="absolute";return t}function b(t,z){switch(z){case mxConstants.POINTS:return t;case mxConstants.MILLIMETERS:return(t/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(t/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(t/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(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return e.apply(this,arguments)||
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var d=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return d.apply(this,arguments)||
this.graph.isEdgeIgnored(t)};var g=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(t){return this.graph.isCloneEvent(t)!=g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var t=new mxEllipse(null,this.highlightColor,this.highlightColor,0);t.opacity=mxConstants.HIGHLIGHT_OPACITY;return t};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=d.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=e.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
return t};mxConnectionHandler.prototype.updatePreview=function(t){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=k.apply(this,arguments),z=t.getCell;t.getCell=mxUtils.bind(this,function(B){var D=z.apply(this,arguments);this.error=null;return D});return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",z="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),B=0;B<z.length;B++)null!=this.currentEdgeStyle[z[B]]&&(t+=z[B]+"="+this.currentEdgeStyle[z[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var B=0;B<t.length;B++){var D=t[B];z[mxObjectIdentity.get(D)]=D.getId();for(var G=this.model.getChildCount(D),
M=0;M<G;M++)this.createCellLookup([this.model.getChildAt(D,M)],z)}return z};Graph.prototype.createCellMapping=function(t,z,B){B=null!=B?B:{};for(var D in t){var G=z[D];null==B[G]&&(B[G]=t[D].getId()||"")}return B};Graph.prototype.importGraphModel=function(t,z,B,D){z=null!=z?z:0;B=null!=B?B:0;var G=new mxCodec(t.ownerDocument),M=new mxGraphModel;G.decode(t,M);t=[];G={};var X={},ia=M.getChildren(this.cloneCell(M.root,this.isCloneInvalidEdges(),G));if(null!=ia){var da=this.createCellLookup([M.root]);
ia=ia.slice();this.model.beginUpdate();try{if(1!=ia.length||this.isCellLocked(this.getDefaultParent()))for(M=0;M<ia.length;M++)ja=this.model.getChildren(this.moveCells([ia[M]],z,B,!1,this.model.getRoot())[0]),null!=ja&&(t=t.concat(ja));else{var ja=M.getChildren(ia[0]);null!=ja&&(t=this.moveCells(ja,z,B,!1,this.getDefaultParent()),X[M.getChildAt(M.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(G,da,X),this.updateCustomLinks(X,t),D)){this.isGridEnabled()&&(z=this.snap(z),
-B=this.snap(B));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.moveCells(t,z-ta.x,B-ta.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},B=this.cloneCells(t,null,z),D=new mxDictionary,G=0;G<t.length;G++)D.put(t[G],!0);var M=new mxCodec,X=new mxGraphModel,ia=X.getChildAt(X.getRoot(),0);for(G=0;G<B.length;G++){X.add(ia,B[G]);var da=this.view.getState(t[G]);if(null!=da){var ja=this.getCellGeometry(B[G]);null!=ja&&ja.relative&&!this.model.isEdge(t[G])&&
+B=this.snap(B));var sa=this.getBoundingBoxFromGeometry(t,!0);null!=sa&&this.moveCells(t,z-sa.x,B-sa.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},B=this.cloneCells(t,null,z),D=new mxDictionary,G=0;G<t.length;G++)D.put(t[G],!0);var M=new mxCodec,X=new mxGraphModel,ia=X.getChildAt(X.getRoot(),0);for(G=0;G<B.length;G++){X.add(ia,B[G]);var da=this.view.getState(t[G]);if(null!=da){var ja=this.getCellGeometry(B[G]);null!=ja&&ja.relative&&!this.model.isEdge(t[G])&&
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,
+[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 sa=this.getChildCells(t,!0);for(z=0;z<sa.length;z++)ja=this.getCellGeometry(sa[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(sa[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 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 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}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]),sa=this.getCellGeometry(t[da]);this.isTable(ja)&&ia.push(ja);
+if(null!=ja&&null!=sa&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=sa.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=sa.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=
@@ -3080,8 +3081,8 @@ D[3]:0,4<D.length?D[4]:0))}}catch(M){}return t}if(null!=t.shape&&null!=t.shape.b
t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),B=0,D=0;D<z;D++){var G=this.model.getChildAt(t,D);this.model.isVertex(G)&&(G=this.getCellGeometry(G),null==G||G.relative||B++)}return 0<B||this.isContainer(t)};Graph.prototype.isValidDropTarget=
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),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,
+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),sa=da.getTerminalPoint(!1);
+da.setTerminalPoint(ja,!1);da.setTerminalPoint(sa,!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);
@@ -3099,21 +3100,21 @@ Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.contai
z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(B.y,(z.y+z.height)/t.scale-t.translate.y+2*this.gridSize)));return new mxPoint(D,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(t,z,B){var D=new mxCell;D.value="Text";D.geometry=new mxGeometry(0,0,0,0);D.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){D.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
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,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;
+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 sa=
+this.getAbsoluteUrl(da[ja].getAttribute("href"));null!=sa&&(da[ja].setAttribute("rel",this.linkRelation),da[ja].setAttribute("href",sa),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(sa,Ba,Da){return null==X.getLinkForCell(sa.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)<
+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 sa=ja.getSource();for(da=ja.getEvent();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null==sa&&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?(sa=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&sa||null==z||z(da,this.currentLink),mxEvent.isConsumed(da)||(da=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(da)?"_blank":sa?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 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,
+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 sa=this.moveCells([da[B]],G,G,!1)[0];M.push(sa);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,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,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?
+sa=this.getCellGeometry(B[M].cell);D+=da;null!=sa&&null!=ja&&(sa=sa.clone(),t?sa.x=Math.round(D-sa.width/2)-ja.origin.x:sa.y=Math.round(D-sa.height/2)-ja.origin.y,this.getModel().setGeometry(B[M].cell,sa))}}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,sa,Ba,Da,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,sa=0;sa<Ma.length;sa++)La.put(Ma[sa],!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-
@@ -3129,11 +3130,11 @@ 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+
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],
+!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),sa=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=sa){null!=sa.alternateBounds&&(sa.width=sa.alternateBounds.width,sa.height=sa.alternateBounds.height,sa.alternateBounds=null);ia=sa.width;var Ba=this.getCellGeometry(X[t]);null!=Ba&&(sa.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=
+!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 sa=this.getCellGeometry(D);null!=sa&&(sa=
+sa.clone(),sa.height+=da.height,B.setGeometry(D,sa))}}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=
@@ -3173,9 +3174,9 @@ 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(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;
+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 sa=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<sa.length){var Ba=G.getChildCells(sa[0].cell,!0),Da=D.getTableLines(this.state.cell,
+!1,!0),Ma=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<sa.length;G++)mxUtils.bind(this,function(La){var Ia=sa[La],Ea=La<sa.length-1?sa[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==sa.length-1?0:Na.x*M);this.shape.bounds.width=X.width-(La==sa.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=
@@ -3208,11 +3209,11 @@ this.first&&null!=this.currentX&&null!=this.currentY&&(D=this.first.x,G=this.fir
t=mxUtils.getOffset(this.graph.container);B.x-=t.x;B.y-=t.y;t=z.getX()+B.x;B=z.getY()+B.y;var D=this.first.x-t,G=this.first.y-B,M=this.graph.tolerance;if(null!=this.div||Math.abs(D)>M||Math.abs(G)>M)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,B),this.isSpaceEvent(z)?(t=this.x+this.width,B=this.y+this.height,D=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/D)*D,this.height=this.graph.snap(this.height/D)*D,this.graph.isGridEnabled()||
(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=t-this.width),this.y<this.first.y&&(this.y=B-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),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(),
+(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,ua=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,B,D){ua.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 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;
+return Ga.apply(this,arguments)};var va=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 va.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 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])};
@@ -3222,18 +3223,19 @@ else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.ce
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 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 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,b){this.editorUi=a;this.container=b};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);
+mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";Editor.isDarkMode()&&(B.style.filter="invert(100%)");this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(M){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(M)}));var D=B.cloneNode(!0);D.setAttribute("src",Editor.trashImage);D.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));D.style.marginLeft="4px";this.linkHint.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(M){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(M)}))}if(null!=z)for(B=0;B<z.length;B++){var G=document.createElement("div");G.style.marginTop=null!=t||0<B?"6px":"0px";G.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(G)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(M){}};
+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 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,b){this.editorUi=a;this.container=b};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);
Format.blockThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.asyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 6 8 L 6 4 L 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
@@ -3252,171 +3254,171 @@ Format.ERzeroToManyMarkerImage=Graph.createSvgImage(20,22,'<path transform="tran
Format.baseDashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.doubleBlockMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.doubleBlockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.processMenuIcon=function(a,b){var f=a.getElementsByTagName("img");0<f.length&&(Editor.isDarkMode()&&(f[0].style.filter="invert(100%)"),f[0].className="geIcon",f[0].style.padding="0px",f[0].style.margin="0 0 0 2px",null!=b&&mxUtils.setPrefixedStyle(f[0].style,"transform",b));return a};
Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;
-Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
+Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(d,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle=
-"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,F,K,E){var O=mxUtils.bind(this,function(R){k!=C&&(d?this.labelIndex=K:b.isSelectionEmpty()?this.diagramIndex=K:this.currentIndex=K,null!=k&&(k.style.backgroundColor=
-Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(C,"click",O);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(E&&null==k||K==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&O()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
-e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display=
-"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
-Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
-this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=d||0==g.cells.length?"50%":"33.3%";r=e.cloneNode(!1);var A=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;A.style.backgroundColor=Format.inactiveTabBackgroundColor;d?r.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),f.appendChild(e),x=f.cloneNode(!1),
-x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(A,mxResources.get("arrange"));f.appendChild(A);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display=
+Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var d=document.createElement("div");d.className="geFormatSection";d.style.textAlign="center";d.style.fontWeight="bold";d.style.paddingTop="8px";d.style.fontSize="13px";d.style.borderWidth="0px 0px 1px 1px";d.style.borderStyle=
+"solid";d.style.display="inline-block";d.style.height="25px";d.style.overflow="hidden";d.style.width="100%";this.container.appendChild(f);mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),e=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,F,K,E){var O=mxUtils.bind(this,function(R){k!=C&&(e?this.labelIndex=K:b.isSelectionEmpty()?this.diagramIndex=K:this.currentIndex=K,null!=k&&(k.style.backgroundColor=
+Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(C,"click",O);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(E&&null==k||K==(e?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&O()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(d,mxResources.get("diagram"));
+d.style.borderLeftWidth="0px";f.appendChild(d);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";d.style.width=this.showCloseButton?"106px":"50%";d.style.cursor="pointer";d.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=d.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(d,g,m++);var x=f.cloneNode(!1);x.style.display=
+"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=d.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
+Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(d,mxResources.get("text")),f.appendChild(d),
+this.panels.push(new TextFormatPanel(this,a,f));else{d.style.backgroundColor=Format.inactiveTabBackgroundColor;d.style.borderLeftWidth="1px";d.style.cursor="pointer";d.style.width=e||0==g.cells.length?"50%":"33.3%";r=d.cloneNode(!1);var A=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;A.style.backgroundColor=Format.inactiveTabBackgroundColor;e?r.style.borderLeftWidth="0px":(d.style.borderLeftWidth="0px",mxUtils.write(d,mxResources.get("style")),f.appendChild(d),x=f.cloneNode(!1),
+x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(d,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);d=f.cloneNode(!1);d.style.display="none";this.panels.push(new TextFormatPanel(this,a,d));this.container.appendChild(d);mxUtils.write(A,mxResources.get("arrange"));f.appendChild(A);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,d,m++):r.style.display=
"none";u(A,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,f,e,g,d,k,n){d=null!=d?d:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;e=null!=e?e:1;g=null!=g?g:999;var r=null,x=!1,A=mxUtils.bind(this,function(C){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(e,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+d,
+BaseFormatPanel.prototype.installInputHandler=function(a,b,f,d,g,e,k,n){e=null!=e?e:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;d=null!=d?d:1;g=null!=g?g:999;var r=null,x=!1,A=mxUtils.bind(this,function(C){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(d,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+e,
x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var K=u.getSelectionState().cells;m.setCellStyles(b,F,K);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(K,function(O){O.style.fontSize=F+"px";O.removeAttribute("size")});for(var E=0;E<K.length;E++)0==m.model.getChildCount(K[E])&&m.autoSizeCell(K[E],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",K))}finally{m.getModel().endUpdate()}}a.value=
-F+d;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",A);mxEvent.addListener(a,"blur",A);return A};
+F+e;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",A);mxEvent.addListener(a,"blur",A);return A};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};
-BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(e){f.funct(e,e)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
-BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,e=null,g=0,d=0;d<b.length;d++){var k=this.addAction(a,b[d]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(e.style.marginRight="2px",e.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),e=k)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,f,e,g,d,k){f=null!=f?f:1;e=null!=e?e:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=e+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
-r.style.height=e+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=d||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(A)?n:f),null!=b&&b(A));mxEvent.consume(A)});mxEvent.addGestureListeners(m,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=d||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(A)?
+BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(d){f.funct(d,d)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
+BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,d=null,g=0,e=0;e<b.length;e++){var k=this.addAction(a,b[e]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(d.style.marginRight="2px",d.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),d=k)}return g};
+BaseFormatPanel.prototype.createStepper=function(a,b,f,d,g,e,k){f=null!=f?f:1;d=null!=d?d:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=d+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
+r.style.height=d+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=e||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(A)?n:f),null!=b&&b(A));mxEvent.consume(A)});mxEvent.addGestureListeners(m,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=e||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(A)?
n:f),null!=b&&b(A));mxEvent.consume(A)});if(g){var x=null;mxEvent.addGestureListeners(u,function(A){mxEvent.consume(A)},null,function(A){if(null!=x){try{x.select()}catch(C){}x=null;mxEvent.consume(A)}})}else mxEvent.addListener(u,"click",function(A){mxEvent.consume(A)});return u};
-BaseFormatPanel.prototype.createOption=function(a,b,f,e,g){var d=document.createElement("div");d.style.padding="3px 0px 3px 0px";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";d.style.width="200px";d.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";d.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
-a);d.appendChild(n);var u=!1,m=b(),r=function(x,A){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,A)),u=!1)};mxEvent.addListener(d,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var A=mxEvent.getSource(x);if(A==d||A==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=e&&(e.install(r),this.listeners.push(e));null!=g&&g(d);return d};
-BaseFormatPanel.prototype.createCellOption=function(a,b,f,e,g,d,k,n,u){var m=this.editorUi,r=m.editor.graph;e=null!=e?"null"==e?null:e:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(A){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;A=A?e:g;r.setCellStyles(b,A,C);null!=d&&d(C,A);m.fireEvent(new mxEventObject("styleChanged",
+BaseFormatPanel.prototype.createOption=function(a,b,f,d,g){var e=document.createElement("div");e.style.padding="3px 0px 3px 0px";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";e.style.width="200px";e.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";e.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
+a);e.appendChild(n);var u=!1,m=b(),r=function(x,A){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,A)),u=!1)};mxEvent.addListener(e,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var A=mxEvent.getSource(x);if(A==e||A==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=d&&(d.install(r),this.listeners.push(d));null!=g&&g(e);return e};
+BaseFormatPanel.prototype.createCellOption=function(a,b,f,d,g,e,k,n,u){var m=this.editorUi,r=m.editor.graph;d=null!=d?"null"==d?null:d:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(A){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;A=A?d:g;r.setCellStyles(b,A,C);null!=e&&e(C,A);m.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[A],"cells",C))}finally{r.getModel().endUpdate()}}},{install:function(A){this.listener=function(){A(mxUtils.getValue(x,b,f)!=g)};r.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){r.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,f,e,g,d,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
-A=!1,C=null,F=function(E,O,R){if(!A){var Q="null"==e?null:e;A=!0;E=/(^#?[a-zA-Z0-9]*$)/.test(E)?E:Q;Q=null!=E&&E!=mxConstants.NONE?E:Q;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==Q?n:Q;C.innerHTML="";C.appendChild(P);null!=E&&E!=mxConstants.NONE&&1<E.length&&"string"===typeof E&&(Q="#"==E.charAt(0)?E.substring(1).toUpperCase():E,Q=ColorDialog.prototype.colorNames[Q],C.setAttribute("title",
-null!=Q?Q+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=E&&E!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=d&&d("null"==E?null:E);x=E;O||(R||k||b()!=x)&&f("null"==x?null:x,x);A=!1}},K=document.createElement("input");K.setAttribute("type","color");K.style.visibility="hidden";K.style.width="0px";K.style.height="0px";K.style.border=
+BaseFormatPanel.prototype.createColorOption=function(a,b,f,d,g,e,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
+A=!1,C=null,F=function(E,O,R){if(!A){var Q="null"==d?null:d;A=!0;E=/(^#?[a-zA-Z0-9]*$)/.test(E)?E:Q;Q=null!=E&&E!=mxConstants.NONE?E:Q;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==Q?n:Q;C.innerHTML="";C.appendChild(P);null!=E&&E!=mxConstants.NONE&&1<E.length&&"string"===typeof E&&(Q="#"==E.charAt(0)?E.substring(1).toUpperCase():E,Q=ColorDialog.prototype.colorNames[Q],C.setAttribute("title",
+null!=Q?Q+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=E&&E!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=e&&e("null"==E?null:E);x=E;O||(R||k||b()!=x)&&f("null"==x?null:x,x);A=!1}},K=document.createElement("input");K.setAttribute("type","color");K.style.visibility="hidden";K.style.width="0px";K.style.height="0px";K.style.border=
"none";u.appendChild(K);C=mxUtils.button("",mxUtils.bind(this,function(E){var O=x;"default"==O&&(O=n);!mxEvent.isShiftDown(E)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(O,function(R){F(R,null,!0)},n):(K.value=O,K.click(),mxEvent.addListener(K,"input",function(){F(K.value,null,!0)}));mxEvent.consume(E)}));C.style.position="absolute";C.style.marginTop="-3px";C.style.left="178px";C.style.height="22px";C.className="geColorBtn";C.style.display=m.checked||k?"":"none";u.appendChild(C);a=null!=
-x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(E){E=mxEvent.getSource(E);if(E==m||"INPUT"!=E.nodeName)E!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||e==mxConstants.NONE||(e=x),F(m.checked?e:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
-BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,e,g,d){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
-{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},e,null,d)};
-BaseFormatPanel.prototype.addArrow=function(a,b){b=null!=b?b:10;var f=document.createElement("div");f.style.display="inline-block";f.style.paddingRight="4px";f.style.padding="6px";var e=10-b;2==e?f.style.paddingTop="6px":0<e?f.style.paddingTop=6-e+"px":f.style.marginTop="-2px";f.style.height=b+"px";f.style.borderLeft="1px solid #a0a0a0";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",Toolbar.prototype.dropDownImage);f.appendChild(b);
-b=f.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(f,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+=
-" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(f);return b};
-BaseFormatPanel.prototype.addUnitInput=function(a,b,f,e,g,d,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-e+"px";b.style.width=e+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);e=this.createStepper(b,g,d,null,n,null,u);e.style.marginTop=k-2+"px";e.style.left=228-f+"px";a.appendChild(e);return b};
-BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,e,g){f=null!=f?f:52;var d=this.editorUi,k=d.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=e)e(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var A=k.view.getState(d.getSelectionState().cells[0]);null!=A&&x!=mxUtils.getValue(A.style,b,100)&&(100==x&&(x=null),A=d.getSelectionState().cells,
-k.setCellStyles(b,x,A),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",A)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=e);if(null!=b){var m=mxUtils.bind(this,function(r,x,A){if(A||u!=document.activeElement)r=d.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
+x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(E){E=mxEvent.getSource(E);if(E==m||"INPUT"!=E.nodeName)E!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||d==mxConstants.NONE||(d=x),F(m.checked?d:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
+BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,d,g,e){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
+{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},d,null,e)};
+BaseFormatPanel.prototype.addArrow=function(a,b,f){b=null!=b?b:10;var d=document.createElement("div");d.style.borderLeft="1px solid #a0a0a0";d.style.display="inline-block";d.style.height=b+"px";d.style.paddingRight="4px";d.style.padding="6px";f?(d.style.verticalAlign="top",d.style.marginLeft="1px"):(b=10-b,2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px");b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",
+Toolbar.prototype.dropDownImage);d.appendChild(b);b=d.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage=
+"none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(d);return b};
+BaseFormatPanel.prototype.addUnitInput=function(a,b,f,d,g,e,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-d+"px";b.style.width=d+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);d=this.createStepper(b,g,e,null,n,null,u);d.style.marginTop=k-2+"px";d.style.left=228-f+"px";a.appendChild(d);return b};
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,d,g){f=null!=f?f:52;var e=this.editorUi,k=e.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=d)d(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var A=k.view.getState(e.getSelectionState().cells[0]);null!=A&&x!=mxUtils.getValue(A.style,b,100)&&(100==x&&(x=null),A=e.getSelectionState().cells,
+k.setCellStyles(b,x,A),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",A)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=d);if(null!=b){var m=mxUtils.bind(this,function(r,x,A){if(A||u!=document.activeElement)r=e.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
27==r.keyCode&&(m(null,null,!0),k.container.focus(),mxEvent.consume(r))});k.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){k.getModel().removeListener(m)}});m()}mxEvent.addListener(u,"blur",a);mxEvent.addListener(u,"change",a);null!=g&&g(u);return n};
-BaseFormatPanel.prototype.addLabel=function(a,b,f,e){e=null!=e?e:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-e+"px";g.style.width=e+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
+BaseFormatPanel.prototype.addLabel=function(a,b,f,d){d=null!=d?d:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-d+"px";g.style.width=d+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
BaseFormatPanel.prototype.addKeyHandler=function(a,b){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(f){13==f.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(f)):27==f.keyCode&&(null!=b&&b(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(f))}))};
BaseFormatPanel.prototype.styleButtons=function(a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"borderRadius","3px"),mxUtils.setOpacity(a[b],100),a[b].style.border="1px solid #a0a0a0",a[b].style.padding="4px",a[b].style.paddingTop="3px",a[b].style.paddingRight="1px",a[b].style.margin="1px",a[b].style.marginRight="2px",a[b].style.width="24px",a[b].style.height="20px",a[b].className+=" geColorBtn"};
BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
ArrangePanel.prototype.init=function(){var a=this.editorUi.getSelectionState();0<a.cells.length&&(this.container.appendChild(this.addLayerOps(this.createPanel())),this.addGeometry(this.container),this.addEdgeGeometry(this.container),a.containsLabel&&0!=a.edges.length||this.container.appendChild(this.addAngle(this.createPanel())),a.containsLabel||this.container.appendChild(this.addFlip(this.createPanel())),this.container.appendChild(this.addAlign(this.createPanel())),1<a.vertices.length&&!a.cell&&
!a.row&&this.container.appendChild(this.addDistribute(this.createPanel())),this.container.appendChild(this.addTable(this.createPanel())),this.container.appendChild(this.addGroupOps(this.createPanel())));a.containsLabel&&(a=document.createElement("div"),a.style.width="100%",a.style.marginTop="0px",a.style.fontWeight="bold",a.style.padding="10px 0 0 14px",mxUtils.write(a,mxResources.get("style")),this.container.appendChild(a),new StyleFormatPanel(this.format,this.editorUi,this.container))};
-ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var d=
-e.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var k=e.table||e.row||e.cell,n=f.isStack(d)||f.isStackChild(d),u=k;n&&(k="0"==(f.isStack(d)?e.style:f.getCellStyle(f.model.getParent(d))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(r){b.handleError(r)}}),
-g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableColumn(d)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
-function(){try{n?f.insertLane(d,!0):f.insertTableRow(d,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableRow(d)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
-3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=e.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<e.style.colspan||1<e.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
-ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;e.cell||e.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var d=null;1!=e.cells.length||null==e.cells[0].value||isNaN(e.cells[0].value.nodeType)||(d=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
-n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),d.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),d.style.marginBottom="2px",d.style.width="210px",a.appendChild(d),g++);var k=null;null!=b.copiedValue&&
-0<e.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=d&&(d.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",d.style.marginBottom="2px",d.style.marginRight="2px"));null==d&&null==k||mxUtils.br(a);e=this.addAction(a,"clearWaypoints");null!=
-e&&(mxUtils.br(a),e.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
-ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var e=document.createElement("div");e.style.position="relative";e.style.whiteSpace="nowrap";e.style.paddingLeft="0px";e.style.paddingBottom="2px";e.style.borderWidth="0px";e.style.width="220px";e.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
-mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},e);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},e),d=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},e),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},e),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
-mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},e),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},e);this.styleButtons([b,g,d,k,n,u]);d.style.marginRight="10px"}a.appendChild(e);this.addActions(a,["snapToGrid"]);return a};
-ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),e=document.createElement("div");e.style.marginTop="2px";e.style.marginBottom="8px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("flip"));a.appendChild(e);e=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});e.setAttribute("title",mxResources.get("horizontal"));e.style.width="104px";e.style.marginRight=
-"2px";a.appendChild(e);e=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);return a};
-ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(e){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(e){b.distributeCells(!1)});f.setAttribute("title",
+ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var e=
+d.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var k=d.table||d.row||d.cell,n=f.isStack(e)||f.isStackChild(e),u=k;n&&(k="0"==(f.isStack(e)?d.style:f.getCellStyle(f.model.getParent(e))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(r){b.handleError(r)}}),
+g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableColumn(e)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
+function(){try{n?f.insertLane(e,!0):f.insertTableRow(e,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableRow(e)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
+3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=d.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<d.style.colspan||1<d.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
+ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;d.cell||d.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var e=null;1!=d.cells.length||null==d.cells[0].value||isNaN(d.cells[0].value.nodeType)||(e=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
+n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),e.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),e.style.marginBottom="2px",e.style.width="210px",a.appendChild(e),g++);var k=null;null!=b.copiedValue&&
+0<d.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=e&&(e.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",e.style.marginBottom="2px",e.style.marginRight="2px"));null==e&&null==k||mxUtils.br(a);d=this.addAction(a,"clearWaypoints");null!=
+d&&(mxUtils.br(a),d.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
+ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.paddingLeft="0px";d.style.paddingBottom="2px";d.style.borderWidth="0px";d.style.width="220px";d.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
+mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},d);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},d),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},d),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
+mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},d),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,g,e,k,n,u]);e.style.marginRight="10px"}a.appendChild(d);this.addActions(a,["snapToGrid"]);return a};
+ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="104px";d.style.marginRight=
+"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);return a};
+ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(d){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(d){b.distributeCells(!1)});f.setAttribute("title",
mxResources.get("vertical"));f.style.width="104px";a.appendChild(f);return a};
-ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var d=null,k=null,n=null;!e.rotatable||e.table||e.row||e.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),d=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
-"10px");e.containsLabel||(g=mxResources.get("reverse"),0<e.vertices.length&&0<e.edges.length?g=mxResources.get("turn")+" / "+g:0<e.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=d&&(n.style.marginTop="8px"));if(null!=d){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=d)e=b.getSelectionState(),
-m=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),d.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(d,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(d,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
+ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var e=null,k=null,n=null;!d.rotatable||d.table||d.row||d.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),e=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
+"10px");d.containsLabel||(g=mxResources.get("reverse"),0<d.vertices.length&&0<d.edges.length?g=mxResources.get("turn")+" / "+g:0<d.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=e&&(n.style.marginTop="8px"));if(null!=e){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=e)d=b.getSelectionState(),
+m=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
BaseFormatPanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.MILLIMETERS:return"mm";case mxConstants.METERS:return"m"}};BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
-ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
+ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,d=f.editor.graph,g=d.getModel(),e=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
m=this.addUnitInput(k,this.getUnit(),16,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r,
-100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);d.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
-mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var A=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var C=this.addGeometryHandler(u,function(T,U,fa){if(e.isTableCell(fa))return e.setTableColumnWidth(fa,U-T.width,!0),!0;0<T.width&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.height=Math.round(T.height*U*100/T.width)/100),T.width=U)});var F=this.addGeometryHandler(m,function(T,
-U,fa){e.isTableCell(fa)&&(fa=e.model.getParent(fa));if(e.isTableRow(fa))return e.setTableRowHeight(fa,U-T.height),!0;0<T.height&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.width=Math.round(T.width*U*100/T.height)/100),T.height=U)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var K=this.createPanel();K.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
-K.appendChild(n);var E=this.addUnitInput(K,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(K,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(K);this.addLabel(K,mxResources.get("left"),87);this.addLabel(K,mxResources.get("top"),16);var R=mxUtils.bind(this,function(T,U,fa){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||
-null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(fa||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(fa||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){K.style.display="";if(fa||document.activeElement!=E)E.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(fa||document.activeElement!=O)O.value=this.inUnit(d.y)+
-(""==d.y?"":" "+this.getUnit())}else K.style.display="none"});this.addKeyHandler(E,R);this.addKeyHandler(O,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var Q=this.addGeometryHandler(E,function(T,U){U=b.fromUnit(U);T.relative?T.offset.x=U:T.x=U});var P=this.addGeometryHandler(O,function(T,U){U=b.fromUnit(U);T.relative?T.offset.y=U:T.y=U});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]);
-null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(T){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(K),mxUtils.br(K),K.appendChild(n))}a.appendChild(K)}};
-ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=d+" "+k.getUnit();else if(u!=d){g.getModel().beginUpdate();try{for(var m=e.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var A=g.view.getState(m[r]);null!=A&&g.isRecursiveVertexResize(A)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}d=
-u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var e=this.editorUi,g=e.editor.graph,d=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=d+" pt";else if(n!=d){g.getModel().beginUpdate();try{for(var u=e.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}d=n;a.value=n+" pt"}}mxEvent.consume(k)}var e=this.editorUi,g=e.editor.graph,d=null;mxEvent.addListener(a,
-"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(Q){var P=parseInt(k.value);P=Math.min(999,
-Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",P,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",aa))}k.value=P+" pt";mxEvent.consume(Q)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position=
-"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){K.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){E.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div");
-d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var A=this.addUnitInput(x,"pt",87,52,function(){O.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(A,F);this.addKeyHandler(C,F);var F=mxUtils.bind(this,function(Q,P,aa){e=b.getSelectionState();
-Q=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(Q)?(aa=f.model.getGeometry(Q),null!=aa.sourcePoint&&null==f.model.getTerminal(Q,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(Q,
+100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);e.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
+mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);e.cell||e.row?r.style.visibility="hidden":k.appendChild(n);var A=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var C=this.addGeometryHandler(u,function(T,U,fa){if(d.isTableCell(fa))return d.setTableColumnWidth(fa,U-T.width,!0),!0;0<T.width&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.height=Math.round(T.height*U*100/T.width)/100),T.width=U)});var F=this.addGeometryHandler(m,function(T,
+U,fa){d.isTableCell(fa)&&(fa=d.model.getParent(fa));if(d.isTableRow(fa))return d.setTableRowHeight(fa,U-T.height),!0;0<T.height&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.width=Math.round(T.width*U*100/T.height)/100),T.height=U)});(e.resizable||e.row||e.cell)&&a.appendChild(k);var K=this.createPanel();K.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
+K.appendChild(n);var E=this.addUnitInput(K,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(K,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(K);this.addLabel(K,mxResources.get("left"),87);this.addLabel(K,mxResources.get("top"),16);var R=mxUtils.bind(this,function(T,U,fa){e=f.getSelectionState();if(e.containsLabel||e.vertices.length!=d.getSelectionCount()||
+null==e.width||null==e.height)k.style.display="none";else{k.style.display="";if(fa||document.activeElement!=u)u.value=this.inUnit(e.width)+(""==e.width?"":" "+this.getUnit());if(fa||document.activeElement!=m)m.value=this.inUnit(e.height)+(""==e.height?"":" "+this.getUnit())}if(e.vertices.length==d.getSelectionCount()&&null!=e.x&&null!=e.y){K.style.display="";if(fa||document.activeElement!=E)E.value=this.inUnit(e.x)+(""==e.x?"":" "+this.getUnit());if(fa||document.activeElement!=O)O.value=this.inUnit(e.y)+
+(""==e.y?"":" "+this.getUnit())}else K.style.display="none"});this.addKeyHandler(E,R);this.addKeyHandler(O,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var Q=this.addGeometryHandler(E,function(T,U){U=b.fromUnit(U);T.relative?T.offset.x=U:T.x=U});var P=this.addGeometryHandler(O,function(T,U){U=b.fromUnit(U);T.relative?T.offset.y=U:T.y=U});if(e.movable){if(0==e.edges.length&&1==e.vertices.length&&g.isEdge(g.getParent(e.vertices[0]))){var aa=d.getCellGeometry(e.vertices[0]);
+null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(T){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(e.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(K),mxUtils.br(K),K.appendChild(n))}a.appendChild(K)}};
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=e+" "+k.getUnit();else if(u!=e){g.getModel().beginUpdate();try{for(var m=d.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var A=g.view.getState(m[r]);null!=A&&g.isRecursiveVertexResize(A)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}e=
+u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var d=this.editorUi,g=d.editor.graph,e=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=e+" pt";else if(n!=e){g.getModel().beginUpdate();try{for(var u=d.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}e=n;a.value=n+" pt"}}mxEvent.consume(k)}var d=this.editorUi,g=d.editor.graph,e=null;mxEvent.addListener(a,
+"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState(),g=this.createPanel(),e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("width"));g.appendChild(e);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(Q){var P=parseInt(k.value);P=Math.min(999,
+Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",P,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",aa))}k.value=P+" pt";mxEvent.consume(Q)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";e=document.createElement("div");e.style.position=
+"absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("linestart"));u.appendChild(e);var m=this.addUnitInput(u,"pt",87,52,function(){K.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){E.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";e=document.createElement("div");
+e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("lineend"));x.appendChild(e);var A=this.addUnitInput(x,"pt",87,52,function(){O.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(A,F);this.addKeyHandler(C,F);var F=mxUtils.bind(this,function(Q,P,aa){d=b.getSelectionState();
+Q=d.cells[0];if("link"==d.style.shape||"flexArrow"==d.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==d.cells.length&&f.model.isEdge(Q)?(aa=f.model.getGeometry(Q),null!=aa.sourcePoint&&null==f.model.getTerminal(Q,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(Q,
!1)?(A.value=aa.targetPoint.x,C.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var K=this.addEdgeGeometryHandler(m,function(Q,P){Q.sourcePoint.x=P});var E=this.addEdgeGeometryHandler(r,function(Q,P){Q.sourcePoint.y=P});var O=this.addEdgeGeometryHandler(A,function(Q,P){Q.targetPoint.x=P});var R=this.addEdgeGeometryHandler(C,function(Q,P){Q.targetPoint.y=P});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}});
F()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
-TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState(),d=this.createTitle(mxResources.get("font"));d.style.paddingLeft="14px";d.style.paddingTop="10px";d.style.paddingBottom="6px";a.appendChild(d);d=this.createPanel();d.style.paddingTop="2px";d.style.paddingBottom="2px";d.style.position=
-"relative";d.style.marginLeft="-2px";d.style.borderWidth="0px";d.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=d.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(d);
-k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",d,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=d.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
-"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=d.cloneNode(!1);x.style.marginLeft=
-"-3px";x.style.paddingBottom="0px";var A=function(ca){return function(){return ca()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center",
-mxResources.get("center"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),K=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
-ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,F,K]);if(e.cellEditor.isContentEditing()){var E=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([E]);E.firstChild.style.background=
+TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,d=f.editor.graph,g=f.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="14px";e.style.paddingTop="10px";e.style.paddingBottom="6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position=
+"relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var k=e.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(e);
+k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=e.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
+"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=e.cloneNode(!1);x.style.marginLeft=
+"-3px";x.style.paddingBottom="0px";var A=function(ca){return function(){return ca()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center",
+mxResources.get("center"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),K=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
+ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,F,K]);if(d.cellEditor.isContentEditing()){var E=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([E]);E.firstChild.style.background=
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
E.firstChild.style.backgroundPosition="2px 2px";E.firstChild.style.backgroundSize="18px 18px";this.styleButtons([E])}var O=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),Q=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([O,R,Q]);a.appendChild(x);var P,aa,T,U,fa;if(e.cellEditor.isContentEditing()){O.style.display="none";R.style.display="none";Q.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight=
+mxResources.get("bottom"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([O,R,Q]);a.appendChild(x);var P,aa,T,U,fa;if(d.cellEditor.isContentEditing()){O.style.display="none";R.style.display="none";Q.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight=
"9px";ha.style.opacity=1;this.styleButtons([ha,P=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);P.style.marginLeft="10px";A=x.cloneNode(!1);A.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
-!1,null)},A),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},A)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(A)}else m[2].style.marginRight="12px",K.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
+!1,null)},A),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},A)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(A)}else m[2].style.marginRight="12px",K.style.marginRight="12px";x=e.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var ba=document.createElement("select");ba.style.position="absolute";ba.style.left="126px";ba.style.width="98px";ba.style.border="1px solid rgb(160, 160, 160)";ba.style.borderRadius="4px";ba.style.marginTop="-2px";E="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(A=0;A<E.length;A++){var I=document.createElement("option");I.setAttribute("value",E[A]);mxUtils.write(I,mxResources.get(E[A]));ba.appendChild(I)}x.appendChild(ba);E=d.cloneNode(!1);E.style.marginLeft="0px";E.style.paddingTop=
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(A=0;A<E.length;A++){var I=document.createElement("option");I.setAttribute("value",E[A]);mxUtils.write(I,mxResources.get(E[A]));ba.appendChild(I)}x.appendChild(ba);E=e.cloneNode(!1);E.style.marginLeft="0px";E.style.paddingTop=
"4px";E.style.paddingBottom="4px";E.style.fontWeight="normal";mxUtils.write(E,mxResources.get("writingDirection"));var L=document.createElement("select");L.style.position="absolute";L.style.border="1px solid rgb(160, 160, 160)";L.style.left="126px";L.style.width="98px";L.style.borderRadius="4px";L.style.marginTop="-2px";I=["automatic","leftToRight","rightToLeft"];var H={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(A=0;A<I.length;A++){var S=
-document.createElement("option");S.setAttribute("value",I[A]);mxUtils.write(S,mxResources.get(I[A]));L.appendChild(S)}E.appendChild(L);e.isEditing()||(a.appendChild(x),mxEvent.addListener(ba,"change",function(ca){e.getModel().beginUpdate();try{var t=qa[ba.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
-t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(E),mxEvent.addListener(L,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,H[L.value],g.cells);mxEvent.consume(ca)}));var V=document.createElement("input");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.textAlign="right";V.style.marginTop="4px";V.style.left="161px";V.style.width="53px";V.style.borderRadius="4px";V.style.height="23px";V.style.boxSizing="border-box";
-n.appendChild(V);var ea=null;x=this.installInputHandler(V,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,M){null!=e.cellEditor.textarea&&G!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(G)&&(M||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
-ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),B=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;B!=e.cellEditor.textarea&&B.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");B!=e.cellEditor.textarea&&(B=B.parentNode);if(null!=B&&B.nodeType==mxConstants.NODETYPE_ELEMENT){var D=B.getElementsByTagName("*");
-t(B);for(B=0;B<D.length;B++)t(D[B])}V.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,M){for(;null!=M;){if(M===G)return!0;M=M.parentNode}return!1},D=null,document.selection?D=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(D=z.getRangeAt(0).commonAncestorContainer)),null!=D&&t(e.cellEditor.textarea,D))for(ea=ca,document.execCommand("fontSize",!1,"4"),D=e.cellEditor.textarea.getElementsByTagName("font"),B=0;B<D.length;B++)if("4"==
-D[B].getAttribute("size")){D[B].removeAttribute("size");D[B].style.fontSize=ea+"px";window.setTimeout(function(){V.value=ea+" pt";ea=null},0);break}},!0);x=this.createStepper(V,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=V.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ka=null,wa=e.shapeBackgroundColor,W=null,Z=e.shapeForegroundColor,oa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
-function(){return wa},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){ka=ca},destroy:function(){ka=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
-null})},e.shapeBackgroundColor);oa.style.fontWeight="bold";var va=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);va.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Z},function(ca){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"),
-z=[],B=0;B<t.length;B++)z.push({node:t[B],color:t[B].getAttribute("color")});document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=e.cellEditor.textarea.getElementsByTagName("font");for(B=0;B<ca.length;B++)if(B>=z.length||ca[B]!=z[B].node||ca[B]==z[B].node&&ca[B].getAttribute("color")!=z[B].color){z=ca[B].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
-null!=z.firstChild){ca[B].parentNode.insertBefore(z,ca[B]);for(t=z.firstChild;null!=t;){var D=t.nextSibling;ca[B].appendChild(t);t=D}z.appendChild(ca[B])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
-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",
+document.createElement("option");S.setAttribute("value",I[A]);mxUtils.write(S,mxResources.get(I[A]));L.appendChild(S)}E.appendChild(L);d.isEditing()||(a.appendChild(x),mxEvent.addListener(ba,"change",function(ca){d.getModel().beginUpdate();try{var t=qa[ba.value];null!=t&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
+t[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(E),mxEvent.addListener(L,"change",function(ca){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,H[L.value],g.cells);mxEvent.consume(ca)}));var V=document.createElement("input");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.textAlign="right";V.style.marginTop="4px";V.style.left="161px";V.style.width="53px";V.style.borderRadius="4px";V.style.height="23px";V.style.boxSizing="border-box";
+n.appendChild(V);var ea=null;x=this.installInputHandler(V,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,M){null!=d.cellEditor.textarea&&G!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(G)&&(M||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
+ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),B=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:d.cellEditor.textarea;B!=d.cellEditor.textarea&&B.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");B!=d.cellEditor.textarea&&(B=B.parentNode);if(null!=B&&B.nodeType==mxConstants.NODETYPE_ELEMENT){var D=B.getElementsByTagName("*");
+t(B);for(B=0;B<D.length;B++)t(D[B])}V.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,M){for(;null!=M;){if(M===G)return!0;M=M.parentNode}return!1},D=null,document.selection?D=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(D=z.getRangeAt(0).commonAncestorContainer)),null!=D&&t(d.cellEditor.textarea,D))for(ea=ca,document.execCommand("fontSize",!1,"4"),D=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<D.length;B++)if("4"==
+D[B].getAttribute("size")){D[B].removeAttribute("size");D[B].style.fontSize=ea+"px";window.setTimeout(function(){V.value=ea+" pt";ea=null},0);break}},!0);x=this.createStepper(V,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=V.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ka=null,wa=d.shapeBackgroundColor,W=null,Z=d.shapeForegroundColor,oa=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
+function(){return wa},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},d.shapeBackgroundColor,{install:function(ca){ka=ca},destroy:function(){ka=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){d.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
+null})},d.shapeBackgroundColor);oa.style.fontWeight="bold";var ua=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ua.style.fontWeight="bold";n=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();n=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Z},function(ca){if(mxClient.IS_FF){for(var t=d.cellEditor.textarea.getElementsByTagName("font"),
+z=[],B=0;B<t.length;B++)z.push({node:t[B],color:t[B].getAttribute("color")});document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=d.cellEditor.textarea.getElementsByTagName("font");for(B=0;B<ca.length;B++)if(B>=z.length||ca[B]!=z[B].node||ca[B]==z[B].node&&ca[B].getAttribute("color")!=z[B].color){z=ca[B].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
+null!=z.firstChild){ca[B].parentNode.insertBefore(z,ca[B]);for(t=z.firstChild;null!=t;){var D=t.nextSibling;ca[B].appendChild(t);t=D}z.appendChild(ca[B])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
+null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){oa.style.display=ca==mxConstants.NONE?"none":"";ua.style.display=oa.style.display},function(ca){ca==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);d.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},d.shapeForegroundColor);
+n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);d.cellEditor.isContentEditing()||k.appendChild(ua);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=d.filterSelectionCells(mxUtils.bind(this,function(ca){var t=d.view.getState(ca);return null==t||d.isAutoSizeState(t)||d.getModel().isEdge(ca)||!d.isTableRow(ca)&&!d.isTableCell(ca)&&!d.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)}),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&&
-(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",
-mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.deleteRow(T,fa.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
-function(ca){if(null!=T){var t=T.style.borderColor.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.border=null});null==z||z==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=
-""):(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);
+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 va=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(d.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&&(d.cellEditor.restoreSelection(Ha),Ha=null);for(var z=d.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+z.parentNode;null!=z&&z==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("P"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="<p>"+d.cellEditor.textarea.innerHTML+"</p>"),z=d.cellEditor.textarea.firstChild);null!=z&&null!=d.cellEditor.textarea&&z!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);ca.value=t+" %"},function(ca){Ta=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==d.cellEditor.textarea&&
+(Ha=d.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(Ha=d.cellEditor.saveSelection())});ca.value="120 %"}));k=e.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=e.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
+function(){try{null!=T&&d.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&&d.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&&d.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&&d.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&&d.insertRow(T,fa.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&d.deleteRow(T,fa.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);e=e.cloneNode(!1);e.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
+function(ca){if(null!=T){var t=T.style.borderColor.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;d.processElements(B,function(D){D.style.border=null});null==z||z==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=
+""):(B.setAttribute("border","1"),B.style.border="1px solid "+z,B.style.borderCollapse="collapse")})}}),e),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;d.processElements(B,function(D){D.style.backgroundColor=null});B.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),e),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()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},e)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(e);
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);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(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);b(C,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(K,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,
mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(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!=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-
+za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=va)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),va.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(va,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(va,Ua);d.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){d.getModel().removeListener(Ua)}});Ua();if(d.cellEditor.isContentEditing()){var $a=!1;e=function(){$a||
+($a=!0,window.setTimeout(function(){var ca=d.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!=d.getParentByName(ca,Ba,d.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&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(P,z("SUB")),e.cellEditor.isTableSelected()?(b(ha,t(G.textAlign,"justify")),b(C,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(K,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ha,t(G.textAlign,"justify")),b(C,!1),b(F,!1),b(K,!1)):(b(ha,!1),b(C,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(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,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
+0;ja<ia.length;ja++)if(da.containsNode(ia[ja],!0)){temp=mxUtils.getCurrentStyle(ia[ja]);M=Math.max(B(temp),M);var sa=D(M,temp,ia[ja]);if(sa!=X||isNaN(sa))X=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(P,z("SUB")),d.cellEditor.isTableSelected()?(b(ha,t(G.textAlign,"justify")),b(C,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(K,t(G.textAlign,"right"))):(z=d.cellEditor.align||mxUtils.getValue(g.style,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ha,t(G.textAlign,"justify")),b(C,!1),b(F,!1),b(K,!1)):(b(ha,!1),b(C,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(K,z==mxConstants.ALIGN_RIGHT))),T=d.getParentByName(ca,"TABLE",d.cellEditor.textarea),fa=null==T?null:d.getParentByName(ca,"TR",T),U=null==T?null:d.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",sa=parseFloat(X),isNaN(sa)?Ta.value="100 %":Ta.value=Math.round(100*sa)+" %"),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(d.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,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())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),f=document.createElement("style");mxUtils.setTextContent(f,a);b.body.appendChild(f);return f.sheet.cssRules};
-StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var e=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(d);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
-for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,e)}}}}catch(m){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,f,e,g,d,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var A=mxUtils.trim(m.style[r]);""!=A&&"url("!=A.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=A;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
-10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[d].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";e.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
+StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var d=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),e=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(e);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
+for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,d)}}}}catch(m){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,f,d,g,e,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var A=mxUtils.trim(m.style[r]);""!=A&&"url("!=A.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=A;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
+10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[e].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";d.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
mxResources.get("gradient")))};
-StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(e){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
-function(e){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
-StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var d=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
-mxEvent.addListener(d,"click",function(C){mxEvent.consume(C)});var k=1<=e.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==e.style.shape?
-mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,e.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(e.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&e.fill&&"image"!=e.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
-for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),d.appendChild(r);k.appendChild(d);var A=mxUtils.bind(this,function(){e=b.getSelectionState();var C=mxUtils.getValue(e.style,mxConstants.STYLE_GRADIENT_DIRECTION,
-mxConstants.DIRECTION_SOUTH),F=mxUtils.getValue(e.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;d.value=F;a.style.display=e.fill?"":"none";C=mxUtils.getValue(e.style,u,null);e.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=e.style.shape?(d.style.display="1"==e.style.sketch?"":"none",n.style.display=e.containsImage||"1"==e.style.sketch&&"solid"!=F&&"auto"!=F?"none":""):(d.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});
-A();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",e.cells));mxEvent.consume(C)});mxEvent.addListener(d,"change",function(C){f.setCellStyles("fillStyle",d.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[d.value],"cells",e.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
+StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(d){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
+function(d){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
+StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var e=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
+mxEvent.addListener(e,"click",function(C){mxEvent.consume(C)});var k=1<=d.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==d.style.shape?
+mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,d.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(d.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
+for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),e.appendChild(r);k.appendChild(e);var A=mxUtils.bind(this,function(){d=b.getSelectionState();var C=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,
+mxConstants.DIRECTION_SOUTH),F=mxUtils.getValue(d.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;e.value=F;a.style.display=d.fill?"":"none";C=mxUtils.getValue(d.style,u,null);d.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=d.style.shape?(e.style.display="1"==d.style.sketch?"":"none",n.style.display=d.containsImage||"1"==d.style.sketch&&"solid"!=F&&"auto"!=F?"none":""):(e.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});
+A();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",d.cells));mxEvent.consume(C)});mxEvent.addListener(e,"change",function(C){f.setCellStyles("fillStyle",e.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[e.value],"cells",d.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
k=this.getCustomColors();for(m=0;m<k.length;m++)a.appendChild(this.createCellColorOption(k[m].title,k[m].key,k[m].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function b(W){var Z=parseFloat(E.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",d.cells)));E.value=Z+" pt";mxEvent.consume(W)}function f(W){var Z=parseFloat(O.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(d.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",d.cells)));O.value=Z+" pt";mxEvent.consume(W)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select");
+StyleFormatPanel.prototype.addStroke=function(a){function b(W){var Z=parseFloat(E.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",e.cells)));E.value=Z+" pt";mxEvent.consume(W)}function f(W){var Z=parseFloat(O.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(e.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",e.cells)));O.value=Z+" pt";mxEvent.consume(W)}var d=this.editorUi,g=d.editor.graph,e=d.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";e.stroke||(k.style.display="none");var n=document.createElement("select");
n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(W){g.getModel().beginUpdate();try{var Z=
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var va=0;va<Z.length;va++)g.setCellStyles(Z[va],oa[va],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",oa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
-d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var A=k.cloneNode(!1);A.style.fontWeight="normal";A.style.whiteSpace="nowrap";A.style.position="relative";A.style.paddingLeft="0px";A.style.marginBottom="2px";A.style.overflow="hidden";A.style.marginTop="2px";A.style.width="220px";A.className="geToolbarContainer";var C=
-mxUtils.bind(this,function(W,Z,oa,va,Ja){W=this.editorUi.menus.styleChange(W,"",va,Ja,"geIcon",null);va=document.createElement("div");va.style.width=Z+"px";va.style.height="1px";va.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;va.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=Z+"px";W.firstChild.firstChild.appendChild(va);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(A,"geSprite-orthogonal",mxResources.get("pattern"),
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var ua=0;ua<Z.length;ua++)g.setCellStyles(Z[ua],oa[ua],e.cells);d.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",oa,"cells",e.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
+e.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,e.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var A=k.cloneNode(!1);A.style.fontWeight="normal";A.style.whiteSpace="nowrap";A.style.position="relative";A.style.paddingLeft="0px";A.style.marginBottom="2px";A.style.overflow="hidden";A.style.marginTop="2px";A.style.width="220px";A.className="geToolbarContainer";var C=
+mxUtils.bind(this,function(W,Z,oa,ua,Ja){W=this.editorUi.menus.styleChange(W,"",ua,Ja,"geIcon",null);ua=document.createElement("div");ua.style.width=Z+"px";ua.style.height="1px";ua.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;ua.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=Z+"px";W.firstChild.firstChild.appendChild(ua);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(A,"geSprite-orthogonal",mxResources.get("pattern"),
!1,mxUtils.bind(this,function(W){C(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=A.cloneNode(!1),K=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(W){this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,
null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],
@@ -3424,12 +3426,12 @@ null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("tit
mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
" (2)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=A.cloneNode(!1);var E=document.createElement("input");E.style.position="absolute";E.style.textAlign="right";E.style.marginTop="2px";E.style.width="52px";E.style.height="21px";E.style.left="146px";E.style.border="1px solid rgb(160, 160, 160)";E.style.borderRadius="4px";E.style.boxSizing="border-box";E.setAttribute("title",mxResources.get("linewidth"));
A.appendChild(E);var O=E.cloneNode(!0);F.appendChild(O);var R=this.createStepper(E,b,1,9);R.style.display=E.style.display;R.style.marginTop="2px";R.style.left="198px";A.appendChild(R);R=this.createStepper(O,f,1,9);R.style.display=O.style.display;R.style.marginTop="2px";O.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(E,"blur",b);mxEvent.addListener(E,"change",b);mxEvent.addListener(O,"blur",f);mxEvent.addListener(O,"change",f);var Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,
-"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
+"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",
"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
+mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),
Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,
null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
@@ -3442,7 +3444,7 @@ null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.edit
["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
-mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
+mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),
"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],
[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
@@ -3456,79 +3458,78 @@ mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.styl
"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,
"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}}));R=this.addArrow(K,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(Q,
-10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";Q.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P);this.addArrow(aa);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var T=this.addArrow(r,9);T.className="geIcon";T.style.width="22px";var U=document.createElement("div");U.style.width="84px";U.style.height="1px";U.style.borderBottom="1px solid "+this.defaultStrokeColor;U.style.marginBottom="7px";R.appendChild(U);var fa=document.createElement("div");
+10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";Q.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var T=this.addArrow(r,9);T.className="geIcon";T.style.width="22px";var U=document.createElement("div");U.style.width="84px";U.style.height="1px";U.style.borderBottom="1px solid "+this.defaultStrokeColor;U.style.marginBottom="7px";R.appendChild(U);var fa=document.createElement("div");
fa.style.width="23px";fa.style.height="1px";fa.style.borderBottom="1px solid "+this.defaultStrokeColor;fa.style.marginBottom="7px";T.appendChild(fa);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";K.style.marginLeft="10px";K.style.height="15px";Q.style.marginLeft="10px";Q.style.height="17px";P.style.marginLeft="3px";P.style.height="17px";aa.style.marginLeft="3px";aa.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(A);m=A.cloneNode(!1);
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,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,
-mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==Z?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=K.getElementsByTagName("div")[0];null!=W&&(W.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"==d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");
-d.edges.length==d.cells.length?(F.style.display="",A.style.display="none"):(F.style.display="none",A.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");W=va(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),P,"start");Z=va(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style,"endFill","1"),aa,"end");null!=W&&null!=Z&&("arrow"==d.style.shape?
-(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(Q,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(aa,100));if(oa||document.activeElement!=I)W=parseInt(mxUtils.getValue(d.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=ba)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ba.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0)),ha.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=L)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),L.value=isNaN(W)?"":W+" pt"});var S=this.installInputHandler(I,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var V=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ea=this.installInputHandler(ba,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var ka=this.installInputHandler(ha,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var wa=this.installInputHandler(L,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(E,H);this.addKeyHandler(I,H);this.addKeyHandler(qa,H);this.addKeyHandler(ba,H);this.addKeyHandler(ha,H);this.addKeyHandler(L,H);g.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){g.getModel().removeListener(H)}});H();return a};
-StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.position="absolute";
-d.style.height="21px";d.style.padding="0px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.right="76px";d.style.width="54px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));d.appendChild(n)}mxEvent.addListener(d,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
-d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,A,C){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,
-"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(e.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
-"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){e=b.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
-0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
+"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)});e.edges.length==e.cells.length?(a.appendChild(u),a.appendChild(m)):e.vertices.length==e.cells.length&&
+a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function ua(Ja,Ga,va,za){va=va.getElementsByTagName("div")[0];null!=va&&d.updateCssForMarker(va,za,e.style.shape,Ja,Ga);return va}e=d.getSelectionState();if(oa||document.activeElement!=E)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),E.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=O)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),O.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"==
+e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.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(e.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(Z=null),"orthogonalEdgeStyle"==Z&&"1"==mxUtils.getValue(e.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(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==Z?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=K.getElementsByTagName("div")[0];null!=W&&(W.className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?
+"geSprite geSprite-simplearrow":"geSprite geSprite-connection");e.edges.length==e.cells.length?(F.style.display="",A.style.display="none"):(F.style.display="none",A.style.display="");Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps&&(a.style.borderBottomStyle="none");W=ua(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),P,"start");Z=ua(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
+"endFill","1"),aa,"end");null!=W&&null!=Z&&("arrow"==e.style.shape?(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(Q,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(aa,100));
+if(oa||document.activeElement!=I)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=ba)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ba.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ha.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=L)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),L.value=isNaN(W)?"":W+" pt"});var S=this.installInputHandler(I,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var V=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ea=this.installInputHandler(ba,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,
+0,999," pt");var ka=this.installInputHandler(ha,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var wa=this.installInputHandler(L,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(E,H);this.addKeyHandler(I,H);this.addKeyHandler(qa,H);this.addKeyHandler(ba,H);this.addKeyHandler(ha,H);this.addKeyHandler(L,H);g.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){g.getModel().removeListener(H)}});H();return a};
+StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var e=document.createElement("select");e.style.position="absolute";
+e.style.height="21px";e.style.padding="0px";e.style.marginTop="-2px";e.style.boxSizing="border-box";e.style.right="76px";e.style.width="54px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));e.appendChild(n)}mxEvent.addListener(e,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
+e.value,d.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",d.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(e,"click",function(x){mxEvent.consume(x)});a.appendChild(e);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,A,C){d=b.getSelectionState();e.value=mxUtils.getValue(d.style,
+"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(d.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
+StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var e=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
+"8px";k.appendChild(n);k.appendChild(u);e.appendChild(k);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){d=b.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;d.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);d.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
+0);d.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){var a=this.editorUi;this.darkModeChangedListener=mxUtils.bind(this,function(){this.format.cachedStyleEntries=[]});a.addListener("darkModeChanged",this.darkModeChangedListener);this.container.appendChild(this.addView(this.createPanel()))};
-DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
-x.style.padding="0px";var A=document.createElement("td");A.style.padding="0px";A.style.width="50%";A.setAttribute("valign","middle");var C=A.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(A),A.appendChild(this.createOption(mxResources.get("sketch"),function(){return d},function(ba){(d=ba)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ba?
+DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,d=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var e="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
+x.style.padding="0px";var A=document.createElement("td");A.style.padding="0px";A.style.width="50%";A.setAttribute("valign","middle");var C=A.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(A),A.appendChild(this.createOption(mxResources.get("sketch"),function(){return e},function(ba){(e=ba)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ba?
"1":null},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"})));x.appendChild(C);r.appendChild(x);m.appendChild(r);C.appendChild(this.createOption(mxResources.get("rounded"),function(){return k},function(ba){(k=ba)?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded);f.updateCellStyles({rounded:ba?"1":"0"},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"}));"1"!=urlParams.sketch&&
(A=A.cloneNode(!1),C=C.cloneNode(!1),x=x.cloneNode(!1),x.appendChild(A),x.appendChild(C),r.appendChild(x),A.appendChild(this.createOption(mxResources.get("curved"),function(){return n},function(ba){(n=ba)?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved;f.updateCellStyles({curved:ba?"1":null},f.getVerticesAndEdges(!1,!0))},null,function(ba){ba.style.width="auto"})));u.appendChild(m);a.appendChild(u);var F=["fillColor","strokeColor","fontColor","gradientColor"],K=mxUtils.bind(this,function(ba,
-qa){var I=f.getVerticesAndEdges();e.beginUpdate();try{for(var L=0;L<I.length;L++){var H=f.getCellStyle(I[L]);null!=H.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[I[L]]);for(var S=e.isEdge(I[L]),V=e.getStyle(I[L]),ea=S?f.currentEdgeStyle:f.currentVertexStyle,ka=0;ka<ba.length;ka++)if(null!=H[ba[ka]]&&H[ba[ka]]!=mxConstants.NONE||ba[ka]!=mxConstants.STYLE_FILLCOLOR&&ba[ka]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,ba[ka],ea[ba[ka]]);e.setStyle(I[L],
-V)}}finally{e.endUpdate()}}),E=mxUtils.bind(this,function(ba,qa,I){if(null!=ba)for(var L=0;L<qa.length;L++)if(null!=ba[qa[L]]&&ba[qa[L]]!=mxConstants.NONE||qa[L]!=mxConstants.STYLE_FILLCOLOR&&qa[L]!=mxConstants.STYLE_STROKECOLOR)ba[qa[L]]=I[qa[L]]}),O=mxUtils.bind(this,function(ba,qa,I,L,H){if(null!=ba){null!=I&&null!=qa.labelBackgroundColor&&(L=null!=L?L.background:null,H=null!=H?H:f,null==L&&(L=H.background),null==L&&(L=H.defaultPageBackgroundColor),qa.labelBackgroundColor=L);for(var S in ba)if(null==
-I||null!=qa[S]&&qa[S]!=mxConstants.NONE||S!=mxConstants.STYLE_FILLCOLOR&&S!=mxConstants.STYLE_STROKECOLOR)qa[S]=ba[S]}});"1"!=urlParams.sketch&&(A=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ba){ba=f.getVerticesAndEdges(!0,!0);if(0<ba.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ba),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle()})),A.setAttribute("title",mxResources.get("reset")),A.style.textOverflow=
+qa){var I=f.getVerticesAndEdges();d.beginUpdate();try{for(var L=0;L<I.length;L++){var H=f.getCellStyle(I[L]);null!=H.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[I[L]]);for(var S=d.isEdge(I[L]),V=d.getStyle(I[L]),ea=S?f.currentEdgeStyle:f.currentVertexStyle,ka=0;ka<ba.length;ka++)if(null!=H[ba[ka]]&&H[ba[ka]]!=mxConstants.NONE||ba[ka]!=mxConstants.STYLE_FILLCOLOR&&ba[ka]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,ba[ka],ea[ba[ka]]);d.setStyle(I[L],
+V)}}finally{d.endUpdate()}}),E=mxUtils.bind(this,function(ba,qa,I){if(null!=ba)for(var L=0;L<qa.length;L++)if(null!=ba[qa[L]]&&ba[qa[L]]!=mxConstants.NONE||qa[L]!=mxConstants.STYLE_FILLCOLOR&&qa[L]!=mxConstants.STYLE_STROKECOLOR)ba[qa[L]]=I[qa[L]]}),O=mxUtils.bind(this,function(ba,qa,I,L,H){if(null!=ba){null!=I&&null!=qa.labelBackgroundColor&&(L=null!=L?L.background:null,H=null!=H?H:f,null==L&&(L=H.background),null==L&&(L=H.defaultPageBackgroundColor),qa.labelBackgroundColor=L);for(var S in ba)if(null==
+I||null!=qa[S]&&qa[S]!=mxConstants.NONE||S!=mxConstants.STYLE_FILLCOLOR&&S!=mxConstants.STYLE_STROKECOLOR)qa[S]=ba[S]}});"1"!=urlParams.sketch&&(A=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ba){ba=f.getVerticesAndEdges(!0,!0);if(0<ba.length){d.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ba),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{d.endUpdate()}}b.clearDefaultStyle()})),A.setAttribute("title",mxResources.get("reset")),A.style.textOverflow=
"ellipsis",A.style.maxWidth="90px",C.appendChild(A));var R=mxUtils.bind(this,function(ba,qa,I,L,H){var S=document.createElement("div");S.style.position="absolute";S.style.display="inline-block";S.style.overflow="hidden";S.style.pointerEvents="none";S.style.width="100%";S.style.height="100%";H.appendChild(S);var V=new Graph(S,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);
-V.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),va=qa;e.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),va=I);E(Z,F,oa);O(ba,Z,wa,L,V);O(va,Z,wa,L,V);W&&(Z=f.postProcessCellStyle(wa,Z));return Z};V.model.beginUpdate();try{var ea=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),ka=V.insertEdge(V.getDefaultParent(),null,"Connector",ea,ea,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
+V.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ua=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ua=I);E(Z,F,oa);O(ba,Z,wa,L,V);O(ua,Z,wa,L,V);W&&(Z=f.postProcessCellStyle(wa,Z));return Z};V.model.beginUpdate();try{var ea=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),ka=V.insertEdge(V.getDefaultParent(),null,"Connector",ea,ea,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
ka.geometry.points=[new mxPoint(32,70)];ka.geometry.offset=new mxPoint(0,8)}finally{V.model.endUpdate()}}),Q=document.createElement("div");Q.style.position="relative";a.appendChild(Q);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var P=mxUtils.bind(this,function(ba,qa,I,L,H){var S=this.format.cachedStyleEntries[H];null==S&&(S=document.createElement("div"),S.style.display="inline-block",S.style.position="relative",S.style.width="96px",S.style.height="90px",S.style.cursor=
"pointer",S.style.border="1px solid gray",S.style.borderRadius="8px",S.style.margin="2px",S.style.overflow="hidden",null!=L&&null!=L.background&&(S.style.backgroundColor=L.background),R(ba,qa,I,L,S),mxEvent.addGestureListeners(S,mxUtils.bind(this,function(V){S.style.opacity=.5}),null,mxUtils.bind(this,function(V){S.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);O(ba,f.currentVertexStyle);O(ba,f.currentEdgeStyle);O(qa,f.currentVertexStyle);
-O(I,f.currentEdgeStyle);"1"==urlParams.sketch&&(d=Editor.sketchMode);d?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";e.beginUpdate();try{var ea=F.slice(),ka;for(ka in ba)ea.push(ka);K(ea,L);var wa=new ChangePageSetup(b,null!=L?L.background:null);wa.ignoreImage=!0;e.execute(wa);e.execute(new ChangeGridColor(b,null!=
-L&&null!=L.gridColor?L.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(V){var ea=f.getCellStyle;V=f.background;var ka=f.view.gridColor;f.background=null!=L?L.background:null;f.view.gridColor=null!=L&&null!=L.gridColor?L.gridColor:g;f.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(ea.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),va=qa;e.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),va=I);E(Z,F,oa);O(ba,Z,wa,
-L);O(va,Z,wa,L);W&&(Z=this.postProcessCellStyle(wa,Z));return Z};f.refresh();f.getCellStyle=ea;f.background=V;f.view.gridColor=ka})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[H]=S));Q.appendChild(S)}),aa=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],U=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background=
+O(I,f.currentEdgeStyle);"1"==urlParams.sketch&&(e=Editor.sketchMode);e?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";d.beginUpdate();try{var ea=F.slice(),ka;for(ka in ba)ea.push(ka);K(ea,L);var wa=new ChangePageSetup(b,null!=L?L.background:null);wa.ignoreImage=!0;d.execute(wa);d.execute(new ChangeGridColor(b,null!=
+L&&null!=L.gridColor?L.gridColor:g))}finally{d.endUpdate()}})),mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(V){var ea=f.getCellStyle;V=f.background;var ka=f.view.gridColor;f.background=null!=L?L.background:null;f.view.gridColor=null!=L&&null!=L.gridColor?L.gridColor:g;f.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(ea.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ua=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ua=I);E(Z,F,oa);O(ba,Z,wa,
+L);O(ua,Z,wa,L);W&&(Z=this.postProcessCellStyle(wa,Z));return Z};f.refresh();f.getCellStyle=ea;f.background=V;f.view.gridColor=ka})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[H]=S));Q.appendChild(S)}),aa=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],U=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background=
"#84d7ff");for(var ba=10*this.format.currentStylePage;ba<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);ba++){var qa=Editor.styles[ba];P(qa.commonStyle,qa.vertexStyle,qa.edgeStyle,qa.graph,ba)}}),fa=mxUtils.bind(this,function(ba){0<=ba&&ba<aa&&(T[this.format.currentStylePage].style.background="transparent",Q.innerHTML="",this.format.currentStylePage=ba,U())});if(1<aa){u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.position="relative";u.style.textAlign="center";
u.style.paddingTop="4px";u.style.width="210px";a.style.paddingBottom="8px";for(C=0;C<aa;C++){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(ba,qa){mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){fa(ba)}))})(C,ha);u.appendChild(ha);
T.push(ha)}a.appendChild(u);U();15>aa&&(m=function(ba){mxEvent.addListener(ba,"mouseenter",function(){ba.style.opacity="1"});mxEvent.addListener(ba,"mouseleave",function(){ba.style.opacity="0.5"})},A=document.createElement("div"),A.style.position="absolute",A.style.left="0px",A.style.top="0px",A.style.bottom="0px",A.style.width="24px",A.style.height="24px",A.style.margin="0px",A.style.cursor="pointer",A.style.opacity="0.5",A.style.backgroundRepeat="no-repeat",A.style.backgroundPosition="center center",
A.style.backgroundSize="24px 24px",A.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(A.style.filter="invert(100%)"),C=A.cloneNode(!1),C.style.backgroundImage="url("+Editor.nextImage+")",C.style.left="",C.style.right="2px",u.appendChild(A),u.appendChild(C),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentStylePage-1,aa))})),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentStylePage+1,
aa))})),m(A),m(C))}else U();return a};DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
-DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
-if(f.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return f.background},function(d){var k=new ChangePageSetup(b,d);k.ignoreImage=null!=d&&d!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(d){this.listener=function(){d(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=e.getElementsByTagName("span")[0];g.style.display="inline-block";
-g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(d){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(d)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";e.appendChild(g)}a.appendChild(e)}return a};
-DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(e){b.actions.get("connectionArrows").funct()},{install:function(e){this.listener=function(){e(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
-a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(e){b.actions.get("connectionPoints").funct()},{install:function(e){this.listener=function(){e(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(e){b.actions.get("guides").funct()},
-{install:function(e){this.listener=function(){e(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
-DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(d.value):parseInt(d.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));d.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,e=this.editorUi,g=e.editor.graph,d=document.createElement("input");d.style.position="absolute";d.style.textAlign="right";d.style.width="48px";d.style.marginTop="-2px";d.style.height=
-"21px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";d.style.boxSizing="border-box";d.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(d,b,this.getUnitStep(),null,null,null,this.isFloatUnit());d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;mxEvent.addListener(d,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(d.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
-mxEvent.addListener(d,"blur",b);mxEvent.addListener(d,"change",b);d.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),e.setGridColor(u));d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
-e.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};e.addListener("gridColorChanged",this.listener);e.addListener("gridEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});n.appendChild(d);n.appendChild(k);a.appendChild(n)};
+DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(e){b.actions.get("pageView").funct()},{install:function(e){this.listener=function(){e(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
+if(f.isEnabled()){var d=this.createColorOption(mxResources.get("background"),function(){return f.background},function(e){var k=new ChangePageSetup(b,e);k.ignoreImage=null!=e&&e!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(e){this.listener=function(){e(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=d.getElementsByTagName("span")[0];g.style.display="inline-block";
+g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(e){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(e)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";d.appendChild(g)}a.appendChild(d)}return a};
+DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(d){b.actions.get("connectionArrows").funct()},{install:function(d){this.listener=function(){d(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
+a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(d){b.actions.get("connectionPoints").funct()},{install:function(d){this.listener=function(){d(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(d){b.actions.get("guides").funct()},
+{install:function(d){this.listener=function(){d(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
+DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(e.value):parseInt(e.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));e.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,d=this.editorUi,g=d.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="48px";e.style.marginTop="-2px";e.style.height=
+"21px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";e.style.boxSizing="border-box";e.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(e.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
+mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),d.setGridColor(u));e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
+d.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});n.appendChild(e);n.appendChild(k);a.appendChild(n)};
DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
-DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(d){if(null==f.pageFormat||f.pageFormat.width!=d.width||f.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,f.model.execute(d)});this.addKeyHandler(e.widthInput,function(){e.set(f.pageFormat)});this.addKeyHandler(e.heightInput,
-function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
-DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function d(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
+DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var d=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(e){if(null==f.pageFormat||f.pageFormat.width!=e.width||f.pageFormat.height!=e.height)e=new ChangePageSetup(b,null,null,e),e.ignoreColor=!0,e.ignoreImage=!0,f.model.execute(e)});this.addKeyHandler(d.widthInput,function(){d.set(f.pageFormat)});this.addKeyHandler(d.heightInput,
+function(){d.set(f.pageFormat)});var g=function(){d.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
+DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function d(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function e(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
function A(c,h,q,l){mxShape.call(this);this.bounds=c;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(c,h){this.canvas=c;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 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);
+function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ga(){mxShape.call(this)}function va(){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(c,h,q,l){mxShape.call(this);this.bounds=c;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 ja(){mxRhombus.call(this)}function sa(){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(c,h,q,l){mxShape.call(this);this.bounds=c;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(c,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(){c.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=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==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,
h,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,h,q,l){if(null!=h){var p=null;c.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?c.moveTo(w.x+q,w.y+l):null!=p&&c.lineTo(w.x+q,w.y+l));p=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){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(c,
q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,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),c.translate(-h,-q));v||this.outline||!(w&&J<p||!w&&J<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,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}c.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(c,h,q,l,p)}};b.prototype.paintTableForeground=function(c,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(c,l[p],h,q)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-b);mxUtils.extend(f,b);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(c,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,
+b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.darkOpacity=0;d.prototype.darkOpacity2=0;d.prototype.paintVertexShape=function(c,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))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=J&&(c.setFillAlpha(Math.abs(J)),c.setFillColor(0>J?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,
-v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.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",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(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
-.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
+v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};d.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",d);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(g,
+mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
+.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
h,(1-Sa)*h),c.lineTo(0,.75*h),c.close());c.end()};mxCellRenderer.registerShape("isoCube",k);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,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)c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,
-h);v||(c.moveTo(0,h),c.curveTo(0,-h/3,l,-h/3,l,h),c.lineTo(l,p-h),c.curveTo(l,p+h/3,0,p+h/3,0,p-h),c.close())};n.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(c,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))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(0,p);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),c.close(),c.fill()),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),
@@ -3596,10 +3597,10 @@ h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAS
y,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,c),new mxPoint(w+p,J)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J+p),new mxPoint(N,J),new mxPoint(w+y,J+p),new mxPoint(w+y,J+Y),new mxPoint(N,J+Y-p),new mxPoint(w,J+Y),new mxPoint(w,J+p)]):(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(N,J+p),new mxPoint(w+y,J),new mxPoint(w+y,J+Y-p),new mxPoint(N,J+Y),new mxPoint(w,J+Y-p),new mxPoint(w,J)]);N=new mxPoint(N,
c);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(c,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=c.x,J=c.y,y=c.width,Y=c.height,N=c.getCenterX();c=c.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,c),new mxPoint(w+y-p,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,c),new mxPoint(w+p,J)]);N=new mxPoint(N,
-c);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(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ja,
+c);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(ua,mxShape);ua.prototype.size=10;ua.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ua);mxUtils.extend(Ja,
mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(c,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;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Ga,
-mxShape);Ga.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
-p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(c,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?(c.moveTo(q,J),c.lineTo(w,J),c.lineTo(w,J+h),c.lineTo(q,J+h),c.moveTo(q,
+mxShape);Ga.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
+p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(c,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?(c.moveTo(q,J),c.lineTo(w,J),c.lineTo(w,J+h),c.lineTo(q,J+h),c.moveTo(q,
y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,J+h),c.lineTo(0,J+h),c.lineTo(0,J),c.lineTo(q,J),c.close());c.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(c,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?(c.moveTo(q,J),c.lineTo(w,J),c.lineTo(w,J+h),c.lineTo(q,J+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,J+h),c.lineTo(0,J+h),c.lineTo(0,J),c.lineTo(q,J),c.close());c.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.paintForeground=
function(c,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[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);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ha);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4,
@@ -3619,7 +3620,7 @@ G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,h
.375;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,h,q,l,p){h=p*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(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",M);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=
function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
+arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",sa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,J);c.lineTo(h+v+w,J-w/2);c.moveTo(h+v,J);c.lineTo(h+v+w,J+w/2);c.moveTo(h+v,J);c.lineTo(h+l-v,J);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,J);c.lineTo(h+l-w-v,J-w/2);c.moveTo(h+l-v,J);c.lineTo(h+l-w-v,J+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(c,h,q,
l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.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?(c.rect(h,q,l,p),c.fill(),c.pointerEvents=
v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||J?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Y?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||N?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
@@ -3632,34 +3633,34 @@ type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{nam
{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"}]}];Fa.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Fa.prototype.strictDrawShape=function(c,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.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),ta=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=Fa.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.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&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,ua,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ca=J=Cb,"none"==wb&&(J=0),"none"==yb&&(Ca=0),c.setGradient(wb,yb,0,0,l,p,Bb,J,Ca),
-c.begin(),la?v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma):c.moveTo(N,0),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,ua,y,N),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma),c.stroke()));
-la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,
-h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la||!pa||na||ma?!la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,
-p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&
+p)-y);(la||pa||na||ma)&&"frame"!=Y&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,ta,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ca=J=Cb,"none"==wb&&(J=0),"none"==yb&&(Ca=0),c.setGradient(wb,yb,0,0,l,p,Bb,J,Ca),
+c.begin(),la?v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma):c.moveTo(N,0),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,ta,y,N),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,ta,xa,ya,Aa,y,la,pa,na,ma),c.stroke()));
+la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,
+h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la||!pa||na||ma?!la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,
+p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&
!ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,
-h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),
-v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),
-v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la||pa||na||ma?la&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,
-ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,
-h,q,l,p,w,ua,y,N,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,
-Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,
-h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,
-l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),
-v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),
-v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,
-h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,
-h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,
-w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,
-y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,
-l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,
-na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
+h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),
+v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),
+v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la||pa||na||ma?la&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,
+ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,
+h,q,l,p,w,ta,y,N,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,
+Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,
+h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,
+l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),
+v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),
+v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,
+h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,
+h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,
+w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,
+y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,
+l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,
+na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,
-h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,
-w,Aa,y,N,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);c.stroke()};Fa.prototype.moveNW=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,J)};Fa.prototype.moveNE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-J,0)};Fa.prototype.moveSE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-J)};Fa.prototype.moveSW=
+h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,
+w,Aa,y,N,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,ta,xa,ya,Aa,y,la,pa,na,ma);c.stroke()};Fa.prototype.moveNW=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,J)};Fa.prototype.moveNE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-J,0)};Fa.prototype.moveSE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-J)};Fa.prototype.moveSW=
function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(J,p)};Fa.prototype.paintNW=function(c,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;c.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(J,0);else c.lineTo(0,0)};Fa.prototype.paintTop=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==
w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-J,0)};Fa.prototype.paintNE=function(c,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;c.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,J);else c.lineTo(l,0)};Fa.prototype.paintRight=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p-
J)};Fa.prototype.paintLeft=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,J)};Fa.prototype.paintSE=function(c,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;c.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-J,p);else c.lineTo(l,p)};Fa.prototype.paintBottom=function(c,h,q,
@@ -3721,12 +3722,12 @@ Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.proto
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(c){return[Ra(c,["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(c){return[Ra(c,["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(c){var h=[Graph.createHandle(c,["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})];c=Graph.createHandle(c,["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(c);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=
+Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);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,d.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 c=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&&(c=null==c?h:c.concat(h)))}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=rb[c];return null!=c?c(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(c,h,q,l,p){var v=c.view;l=null!=l&&0<l.length?l[0]:null;var w=c.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,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(c.style,
"elbow","horizontal");if(null!=w&&null!=J){c=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));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
-var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];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;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
+var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};e.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];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;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return c};r.prototype.getConstraints=function(c,h,q){c=[];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);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,l));return c};ba.prototype.getConstraints=function(c,h,q){c=[];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));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3737,7 +3738,7 @@ q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));h>
mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,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*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));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));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return c};E.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,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*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(q+l)));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));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(q+l)));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));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};d.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,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*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));return c};A.prototype.getConstraints=function(c,h,q){c=[];h=Math.max(0,Math.min(q,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,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,
@@ -3757,7 +3758,7 @@ h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(
.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)];C.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)];O.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)];qa.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)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.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)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
@@ -3775,214 +3776,214 @@ function(c,h,q){c=[];var l=Math.min(q,h),p=Math.max(0,Math.min(l,l*parseFloat(mx
0),!1,null,p,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return c};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)];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,
+.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)];va.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 b(){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,
-r=d.view.translate.x,x=d.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(m-d.view.scale)&&r==d.view.translate.x&&x==d.view.translate.y&&e.actions.get(d.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?e.actions.get("smartFit").funct():d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(A){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+A.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){e.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(e);e.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=e.copyXml(),null!=m&&d.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(m){}try{mxClipboard.copy(d)}catch(m){e.handleError(m)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(r){if(null!=r){d.getModel().beginUpdate();try{e.pasteXml(r,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),m=!0)}catch(r){}m||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(A){if(null!=A){for(var C=!0,F=0;F<
-A.length&&C;F++)C=C&&d.model.isEdge(A[F]);var K=d.view.translate;F=d.view.scale;var E=K.x,O=K.y;K=null;if(1==A.length&&C){var R=d.getCellGeometry(A[0]);null!=R&&(K=R.getTerminalPoint(!0))}K=null!=K?K:d.getBoundingBoxFromGeometry(A,C);null!=K&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/F-E)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-O)),d.cellsMoved(A,C-K.x,F-K.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(A){if(null!=A){d.getModel().beginUpdate();try{r(e.pasteXml(A,!0))}finally{d.getModel().endUpdate()}}else x()}),m=!0)}catch(A){}m||x()}});this.addAction("copySize",function(){var m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.getModel().isVertex(m)&&(m=d.getCellGeometry(m),null!=m&&(e.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedSize){d.getModel().beginUpdate();try{for(var m=d.getResizableCells(d.getSelectionCells()),r=0;r<m.length;r++)if(d.getModel().isVertex(m[r])){var x=d.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=e.copiedSize.width,x.height=e.copiedSize.height,d.getModel().setGeometry(m[r],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&
-null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,K){var E=A.getValue(F);K=F.cloneValue(K);K.removeAttribute("placeholders");null==E||isNaN(E.nodeType)||K.setAttribute("placeholders",E.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||K.setAttribute("label",d.convertValueToString(F));A.setValue(F,K)}m=null!=r?r:m;var A=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){A.beginUpdate();
-try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)x(A.getRoot(),e.copiedValue);else for(r=0;r<C.length;r++)x(C[r],e.copiedValue)}finally{A.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
-"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(m){e.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=e.getSelectionState();if(null!=m.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),d.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var m=e.getSelectionState();if(0<m.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,m.cells),d.setCellStyles("colspan",null,m.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
-this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.addSelectionCells(d.getEdges(m))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(d.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);d.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);d.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);d.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);d.setCellStyles(mxConstants.STYLE_EDITABLE,
-x,m);d.setCellStyles("connectable",x,m)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},
-null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){d.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){d.orderCells(!0,null,!0)});this.addAction("group",function(){if(d.isEnabled()){var m=mxUtils.sortCells(d.getSelectionCells(),!0);1!=m.length||d.isTable(m[0])||d.isTableRow(m[0])?
-(m=d.getCellsForGroup(m),1<m.length&&d.setSelectionCell(d.groupCells(null,0,m))):d.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()){var m=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var r=d.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)d.model.contains(m[x])&&(0==d.model.getChildCount(m[x])&&d.model.isVertex(m[x])&&d.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{d.model.endUpdate()}0<
-r.length&&d.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var m=d.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)d.isTableRow(m[x])||d.isTableCell(m[x])||r.push(m[x]);d.removeCellsFromParent(r)}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=d.getSelectionCell()||d.getModel().getRoot();e.showDataDialog(m)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(e,mxResources.get("editTooltip")+":",r,function(A){d.setTooltipForCell(m,
-A)});e.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=d.getLinkForCell(d.getSelectionCell());null!=m&&d.openLink(m)});this.addAction("editLink...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r=d.getLinkForCell(m)||"";e.showLinkDialog(r,mxResources.get("apply"),function(x,A,C){x=mxUtils.trim(x);d.setLinkForCell(m,0<x.length?x:null);d.setAttributeForCell(m,"linkTarget",C)},!0,d.getLinkTargetForCell(m))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),e.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var A=null,C=d.getLinkTitle(m);null!=r&&0<r.length&&(A=r[0].iconUrl,
-C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=A?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+A:"spacing=10;"));r.vertex=!0;A=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=A.x;r.geometry.y=A.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r,
-!0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var A=m.getElementsByTagName("a"),
-C=0;C<A.length&&null==r;C++)A[C].textContent==m.textContent&&(r=A[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(K){d.cellEditor.restoreSelection(F);null!=K&&d.insertLink(K)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate();
-try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),
-x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var A=mxUtils.getValue(state.style,"html","0");if("1"==A&&null==m){var C=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,C);d.setCellStyles("html",m,[r[x]])}else"0"==A&&"1"==m&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(C)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
-m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*
-Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-
-10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/
-d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
-300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
-function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});
-n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});
-n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());
-e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+
-"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,A){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?d.updateLabelElements(C,function(K){K.style.fontWeight=null;"B"==K.nodeName&&d.replaceElement(K)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(C,function(K){K.style.fontStyle=null;"I"==K.nodeName&&d.replaceElement(K)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(C,function(K){K.style.textDecoration=null;"U"==K.nodeName&&d.replaceElement(K)});for(var F=0;F<C.length;F++)0==d.model.getChildCount(C[F])&&d.autoSizeCell(C[F],
-!1)}finally{d.getModel().endUpdate()}}},null,null,A)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
-function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
-!0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();
-try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
-this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(m[0]),
-x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,x);d.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=d.view.getState(d.getSelectionCell()),r="1";null!=m&&null!=d.getFoldingImage(m)&&(r="0");d.setCellStyles("collapsible",r);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var m=d.getEditableCells(d.getSelectionCells());if(null!=m&&0<m.length){var r=d.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&d.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&e.setDefaultStyle(d.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&e.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=d.getSelectionCell();if(null!=m&&d.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=d.view.translate,A=d.view.scale,C=x.x;x=x.y;m=d.getModel().getParent(m);for(var F=d.getCellGeometry(m);d.getModel().isVertex(m)&&null!=F;)C+=F.x,x+=F.y,m=
-d.getModel().getParent(m),F=d.getCellGeometry(m);C=Math.round(d.snap(d.popupMenuHandler.triggerX/A-C));A=Math.round(d.snap(d.popupMenuHandler.triggerY/A-x));r.addPointAt(r.state,C,A)}}});this.addAction("removeWaypoint",function(){var m=e.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var A=
-0;A<x.length;A++){var C=x[A];if(d.getModel().isEdge(C)){var F=d.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(C,F))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
-mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=d.getView().getState(d.getSelectionCell()),
-x="",A=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,A=r.style[mxConstants.STYLE_CLIP_PATH]||A);var C=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,K,E,O,R,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(F,K,E);else{var P=d.getSelectionCells();if(null!=F&&(0<F.length||0<P.length)){var aa=null;d.getModel().beginUpdate();try{if(0==P.length){P=[d.insertVertex(d.getDefaultParent(),null,"",0,0,K,E,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var T=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=T.x;P[0].geometry.y=T.y;null!=O&&f(P[0],O,R,Q,d);aa=P;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,P);var U=d.getCurrentCellStyle(P[0]);"image"!=U[mxConstants.STYLE_SHAPE]&&"label"!=U[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==d.getSelectionCount()&&
-null!=K&&null!=E){var fa=P[0],ha=d.getModel().getGeometry(fa);null!=ha&&(ha=ha.clone(),ha.width=K,ha.height=E,d.getModel().setGeometry(fa,ha));null!=O?f(fa,O,R,Q,d):d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,A)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
-null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],A=r[mxConstants.STYLE_SHAPE];x&&"image"==A&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(C,F,K){f(m,C,F,K,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("layers"))})),
-this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
-function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,
-m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Actions.prototype.init=function(){function a(m){e.escape();m=e.deleteCells(e.getDeletableCells(e.getSelectionCells()),m);null!=m&&e.setSelectionCells(m)}function b(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{for(var m=e.getSelectionCells(),r=0;r<m.length;r++)e.cellLabelChanged(m[r],"")}finally{e.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 d=this.editorUi,g=d.editor,e=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&e.isEnabled()};this.addAction("new...",function(){e.openLink(d.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("smartFit",function(){e.popupMenuHandler.hideMenu();var m=e.view.scale,
+r=e.view.translate.x,x=e.view.translate.y;d.actions.get("resetView").funct();1E-5>Math.abs(m-e.view.scale)&&r==e.view.translate.x&&x==e.view.translate.y&&d.actions.get(e.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){e.isEnabled()&&(e.isSelectionEmpty()?d.actions.get("smartFit").funct():e.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(A){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+A.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){d.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(d);d.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){d.showDialog((new PageSetupDialog(d)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){d.showDialog((new PrintDialog(d)).container,300,180,!0,!0)},null,"sprite-print",
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=d.copyXml(),null!=m&&e.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(m){}try{mxClipboard.copy(e)}catch(m){d.handleError(m)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(r){if(null!=r){e.getModel().beginUpdate();try{d.pasteXml(r,!0)}finally{e.getModel().endUpdate()}}else mxClipboard.paste(e)}),m=!0)}catch(r){}m||mxClipboard.paste(e)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(A){if(null!=A){for(var C=!0,F=0;F<
+A.length&&C;F++)C=C&&e.model.isEdge(A[F]);var K=e.view.translate;F=e.view.scale;var E=K.x,O=K.y;K=null;if(1==A.length&&C){var R=e.getCellGeometry(A[0]);null!=R&&(K=R.getTerminalPoint(!0))}K=null!=K?K:e.getBoundingBoxFromGeometry(A,C);null!=K&&(C=Math.round(e.snap(e.popupMenuHandler.triggerX/F-E)),F=Math.round(e.snap(e.popupMenuHandler.triggerY/F-O)),e.cellsMoved(A,C-K.x,F-K.y))}}function x(){e.getModel().beginUpdate();try{r(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&
+!e.isCellLocked(e.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(A){if(null!=A){e.getModel().beginUpdate();try{r(d.pasteXml(A,!0))}finally{e.getModel().endUpdate()}}else x()}),m=!0)}catch(A){}m||x()}});this.addAction("copySize",function(){var m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.getModel().isVertex(m)&&(m=e.getCellGeometry(m),null!=m&&(d.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedSize){e.getModel().beginUpdate();try{for(var m=e.getResizableCells(e.getSelectionCells()),r=0;r<m.length;r++)if(e.getModel().isVertex(m[r])){var x=e.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=d.copiedSize.width,x.height=d.copiedSize.height,e.getModel().setGeometry(m[r],x))}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=e.getSelectionCell()||e.getModel().getRoot();e.isEnabled()&&
+null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(d.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,K){var E=A.getValue(F);K=F.cloneValue(K);K.removeAttribute("placeholders");null==E||isNaN(E.nodeType)||K.setAttribute("placeholders",E.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||K.setAttribute("label",e.convertValueToString(F));A.setValue(F,K)}m=null!=r?r:m;var A=e.getModel();if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedValue){A.beginUpdate();
+try{var C=e.getEditableCells(e.getSelectionCells());if(0==C.length)x(A.getRoot(),d.copiedValue);else for(r=0;r<C.length;r++)x(C[r],d.copiedValue)}finally{A.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
+"+Delete");this.addAction("duplicate",function(){try{e.setSelectionCells(e.duplicateCells()),e.scrollCellToVisible(e.getSelectionCell())}catch(m){d.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=d.getSelectionState();if(null!=m.mergeCell){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),e.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{e.getModel().endUpdate()}}}));this.put("unmergeCells",
+new Action(mxResources.get("unmerge"),function(){var m=d.getSelectionState();if(0<m.cells.length){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",null,m.cells),e.setCellStyles("colspan",null,m.cells)}finally{e.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;e.turnShapes(e.getResizableCells(e.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.addSelectionCells(e.getEdges(m))}));this.addAction("selectVertices",function(){e.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){e.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){e.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){e.clearSelection()},
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(e.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;e.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);e.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);e.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);e.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);e.setCellStyles(mxConstants.STYLE_EDITABLE,
+x,m);e.setCellStyles("connectable",x,m)}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){e.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){e.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){e.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){e.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){e.foldCells(!1)},
+null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){e.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){e.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){e.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){e.orderCells(!0,null,!0)});this.addAction("group",function(){if(e.isEnabled()){var m=mxUtils.sortCells(e.getSelectionCells(),!0);1!=m.length||e.isTable(m[0])||e.isTableRow(m[0])?
+(m=e.getCellsForGroup(m),1<m.length&&e.setSelectionCell(e.groupCells(null,0,m))):e.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(e.isEnabled()){var m=e.getEditableCells(e.getSelectionCells());e.model.beginUpdate();try{var r=e.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)e.model.contains(m[x])&&(0==e.model.getChildCount(m[x])&&e.model.isVertex(m[x])&&e.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{e.model.endUpdate()}0<
+r.length&&e.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(e.isEnabled()){var m=e.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)e.isTableRow(m[x])||e.isTableCell(m[x])||r.push(m[x]);e.removeCellsFromParent(r)}}});this.addAction("edit",function(){e.isEnabled()&&e.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=e.getSelectionCell()||e.getModel().getRoot();d.showDataDialog(m)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(d,mxResources.get("editTooltip")+":",r,function(A){e.setTooltipForCell(m,
+A)});d.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=e.getLinkForCell(e.getSelectionCell());null!=m&&e.openLink(m)});this.addAction("editLink...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r=e.getLinkForCell(m)||"";d.showLinkDialog(r,mxResources.get("apply"),function(x,A,C){x=mxUtils.trim(x);e.setLinkForCell(m,0<x.length?x:null);e.setAttributeForCell(m,"linkTarget",C)},!0,e.getLinkTargetForCell(m))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(e.clearSelection(),d.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var A=null,C=e.getLinkTitle(m);null!=r&&0<r.length&&(A=r[0].iconUrl,
+C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=A?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+A:"spacing=10;"));r.vertex=!0;A=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([r],!0));r.geometry.x=A.x;r.geometry.y=A.y;e.setAttributeForCell(r,"linkTarget",x);e.setLinkForCell(r,m);e.cellSizeUpdated(r,
+!0);e.getModel().beginUpdate();try{r=e.addCell(r),e.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{e.getModel().endUpdate()}e.setSelectionCell(r);e.scrollCellToVisible(e.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(e.isEnabled())if(e.cellEditor.isContentEditing()){var m=e.getSelectedElement(),r=e.getParentByName(m,"A",e.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var A=m.getElementsByTagName("a"),
+C=0;C<A.length&&null==r;C++)A[C].textContent==m.textContent&&(r=A[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",e.selectNode(r));var F=e.cellEditor.saveSelection();d.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(K){e.cellEditor.restoreSelection(F);null!=K&&e.insertLink(K)}))}else e.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=e.getSelectionCells();if(null!=m){e.getModel().beginUpdate();
+try{for(var r=0;r<m.length;r++){var x=m[r];0<e.getModel().getChildCount(x)?e.updateGroupBounds([x],0,!0):e.updateCellSize(x)}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){e.snapCellsToGrid(e.getSelectionCells(),e.gridSize)});this.addAction("formattedText",function(){e.stopEditing();var m=e.getCommonStyle(e.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";e.getModel().beginUpdate();try{for(var r=e.getEditableCells(e.getSelectionCells()),
+x=0;x<r.length;x++)if(state=e.getView().getState(r[x]),null!=state){var A=mxUtils.getValue(state.style,"html","0");if("1"==A&&null==m){var C=e.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=e.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);e.cellLabelChanged(state.cell,C);e.setCellStyles("html",m,[r[x]])}else"0"==A&&"1"==m&&(C=mxUtils.htmlEntities(e.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),e.cellLabelChanged(state.cell,e.sanitizeHtml(C)),e.setCellStyles("html",m,[r[x]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{e.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=e.getView().getState(e.getSelectionCell()),r="wrap";e.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);e.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+r)});this.addAction("rotation",function(){var m="0",r=e.getView().getState(e.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(d,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&e.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){e.zoomTo(1);d.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(m){e.isFastZoomEnabled()?e.lazyZoom(!0,!0,d.buttonZoomDelay):e.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){e.isFastZoomEnabled()?e.lazyZoom(!1,!0,d.buttonZoomDelay):e.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=e.isSelectionEmpty()?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),r=e.view.translate,x=e.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
+m.height/=x;null!=e.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,e.backgroundImage.width,e.backgroundImage.height)));0==m.width||0==m.height?(e.zoomTo(1),d.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),e.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*
+Math.min((e.container.clientWidth-10)/m.width/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=m.y*e.view.scale-1,e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*Math.min((e.container.clientWidth-
+10)/(2*m.width)/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=Math.min(m.y,(e.container.scrollHeight-e.container.clientHeight)/2),e.container.scrollLeft=Math.min(m.x,(e.container.scrollWidth-e.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();e.zoomTo(Math.floor(20*(e.container.clientWidth-10)/e.pageFormat.width/
+e.pageScale)/20);if(mxUtils.hasScrollbars(e.container)){var m=e.getPagePadding();e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&e.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
+300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(d,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,e.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
+function(){e.setGridEnabled(!e.isGridEnabled());e.defaultGridEnabled=e.isGridEnabled();d.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){e.graphHandler.guidesEnabled=!e.graphHandler.guidesEnabled;d.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.graphHandler.guidesEnabled});
+n.setEnabled(!1);n=this.addAction("tooltips",function(){e.tooltipHandler.setEnabled(!e.tooltipHandler.isEnabled());d.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!e.foldingEnabled;e.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.foldingEnabled});
+n.isEnabled=k;n=this.addAction("scrollbars",function(){d.setScrollbars(!d.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){d.setPageVisible(!e.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return e.pageVisible});n=this.addAction("connectionArrows",function(){e.connectionArrowsEnabled=!e.connectionArrowsEnabled;d.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){e.setConnectable(!e.connectionHandler.isEnabled());d.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){e.connectionHandler.setCreateTarget(!e.connectionHandler.isCreateTarget());
+d.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);e.openLink(RESOURCES_PATH+
+"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(d.showDialog((new AboutDialog(d)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,A){return this.addAction(m,function(){if(null!=x&&e.cellEditor.isContentEditing())x();else{e.stopEditing(!1);e.getModel().beginUpdate();try{var C=e.getEditableCells(e.getSelectionCells());e.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?e.updateLabelElements(C,function(K){K.style.fontWeight=null;"B"==K.nodeName&&e.replaceElement(K)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?e.updateLabelElements(C,function(K){K.style.fontStyle=null;"I"==K.nodeName&&e.replaceElement(K)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.updateLabelElements(C,function(K){K.style.textDecoration=null;"U"==K.nodeName&&e.replaceElement(K)});for(var F=0;F<C.length;F++)0==e.model.getChildCount(C[F])&&e.autoSizeCell(C[F],
+!1)}finally{e.getModel().endUpdate()}}},null,null,A)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){d.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+function(){d.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){d.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){d.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){d.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+!0)});this.addAction("shadow",function(){d.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,null),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dashed",function(){e.getModel().beginUpdate();
+try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dotted",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),d.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("sharp",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});
+this.addAction("rounded",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!e.isSelectionEmpty()&&e.isEnabled()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(m[0]),
+x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";e.setCellStyles(mxConstants.STYLE_ROUNDED,x);e.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}}});this.addAction("curved",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=e.view.getState(e.getSelectionCell()),r="1";null!=m&&null!=e.getFoldingImage(m)&&(r="0");e.setCellStyles("collapsible",r);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",e.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var m=e.getEditableCells(e.getSelectionCells());if(null!=m&&0<m.length){var r=e.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&e.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){e.isEnabled()&&!e.isSelectionEmpty()&&d.setDefaultStyle(e.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){e.isEnabled()&&d.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=e.getSelectionCell();if(null!=m&&e.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=e.view.translate,A=e.view.scale,C=x.x;x=x.y;m=e.getModel().getParent(m);for(var F=e.getCellGeometry(m);e.getModel().isVertex(m)&&null!=F;)C+=F.x,x+=F.y,m=
+e.getModel().getParent(m),F=e.getCellGeometry(m);C=Math.round(e.snap(e.popupMenuHandler.triggerX/A-C));A=Math.round(e.snap(e.popupMenuHandler.triggerY/A-x));r.addPointAt(r.state,C,A)}}});this.addAction("removeWaypoint",function(){var m=d.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=e.getSelectionCells();if(null!=x){x=e.getEditableCells(e.addAllEdges(x));e.getModel().beginUpdate();try{for(var A=
+0;A<x.length;A++){var C=x[A];if(e.getModel().isEdge(C)){var F=e.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(e.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),e.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,e.getModel().setGeometry(C,F))}}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
+mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=e.getView().getState(e.getSelectionCell()),
+x="",A=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,A=r.style[mxConstants.STYLE_CLIP_PATH]||A);var C=e.cellEditor.saveSelection();d.showImageDialog(m,x,function(F,K,E,O,R,Q){if(e.cellEditor.isContentEditing())e.cellEditor.restoreSelection(C),e.insertImage(F,K,E);else{var P=e.getSelectionCells();if(null!=F&&(0<F.length||0<P.length)){var aa=null;e.getModel().beginUpdate();try{if(0==P.length){P=[e.insertVertex(e.getDefaultParent(),null,"",0,0,K,E,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var T=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=T.x;P[0].geometry.y=T.y;null!=O&&f(P[0],O,R,Q,e);aa=P;e.fireEvent(new mxEventObject("cellsInserted","cells",aa))}e.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,P);var U=e.getCurrentCellStyle(P[0]);"image"!=U[mxConstants.STYLE_SHAPE]&&"label"!=U[mxConstants.STYLE_SHAPE]?e.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==F.length&&e.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==e.getSelectionCount()&&
+null!=K&&null!=E){var fa=P[0],ha=e.getModel().getGeometry(fa);null!=ha&&(ha=ha.clone(),ha.width=K,ha.height=E,e.getModel().setGeometry(fa,ha));null!=O?f(fa,O,R,Q,e):e.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{e.getModel().endUpdate()}null!=aa&&(e.setSelectionCells(aa),e.scrollCellToVisible(aa[0]))}}},e.cellEditor.isContentEditing(),!e.cellEditor.isContentEditing(),!0,A)}}).isEnabled=k;this.addAction("crop...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
+null!=m){var r=e.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],A=r[mxConstants.STYLE_SHAPE];x&&"image"==A&&(r=new CropImageDialog(d,x,r[mxConstants.STYLE_CLIP_PATH],function(C,F,K){f(m,C,F,K,e)}),d.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("layers"))})),
+this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
+function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),
+this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(d,
+m);d.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,d,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var e=mxResources.get(a)+"..."}else e=mxResources.get(a);return this.put(a,new Action(e,b,f,d,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,f,d,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras help".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");
-Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,g){for(var d=mxUtils.bind(this,function(n){this.styleChange(e,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
-function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)d(this.defaultFonts[k]);e.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)d(this.customFonts[k]);e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);e.addSeparator(g)}this.promptChange(e,
-mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(e,g){function d(k,n){return e.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
-n+">"))}),g)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML=
-'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(e,g){var d=
-[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,A){return x-A}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var A=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<A.length;C++)if("3"==A[C].getAttribute("size")){A[C].removeAttribute("size");A[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
-"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(e,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<d.length;u++)n(d[u]);e.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(d,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);e.addSeparator(g)}var r=
-null;this.promptChange(e,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
-!1)},g);e.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(e,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(e,g){var d=1<this.editorUi.getSelectionState().vertices.length;e.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,d);e.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,d);e.addItem(mxResources.get("rightAlign"),
-null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,d);e.addSeparator(g);e.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,d);e.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,d);e.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,d);this.addMenuItems(e,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("horizontal"),
-null,function(){b.distributeCells(!0)},g);e.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(e,g){var d=b.view.getState(b.getSelectionCell());null!=d&&(d=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE),"arrow"!=d&&(this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
-this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,
-"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
-this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d&&this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
-this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),e.addSeparator(g),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(e,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
-mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(e,g){var d=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
-m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});e.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
-null:u)},!0)}),g);e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);e.addSeparator(g);e.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
-(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
-g);e.addSeparator(g);e.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);d(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);e.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
-this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["toFront","toBack","bringForward",
-"sendBackward","-"],g);this.addSubmenu("direction",e,g);this.addMenuItems(e,["turn","-"],g);this.addSubmenu("align",e,g);this.addSubmenu("distribute",e,g);e.addSeparator(g);this.addSubmenu("navigation",e,g);this.addSubmenu("insert",e,g);this.addSubmenu("layout",e,g);this.addMenuItems(e,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["insertLink","insertImage"],g)})));this.put("view",
-new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
-g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
-"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,f)};
-Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
+Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(d,g){for(var e=mxUtils.bind(this,function(n){this.styleChange(d,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
+function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)e(this.defaultFonts[k]);d.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)e(this.customFonts[k]);d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);d.addSeparator(g)}this.promptChange(d,
+mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(d,g){function e(k,n){return d.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
+n+">"))}),g)}e(mxResources.get("normal"),"p");e("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";e("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";e("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";e("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";e("","h5").firstChild.nextSibling.innerHTML=
+'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";e("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";e("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";e("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(d,g){var e=
+[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(e,this.defaultFontSize)&&(e.push(this.defaultFontSize),e.sort(function(x,A){return x-A}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var A=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<A.length;C++)if("3"==A[C].getAttribute("size")){A[C].removeAttribute("size");A[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
+"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(d,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<e.length;u++)n(e[u]);d.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(e,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);d.addSeparator(g)}var r=
+null;this.promptChange(d,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
+!1)},g);d.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(d,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(d,g){var e=1<this.editorUi.getSelectionState().vertices.length;d.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,e);d.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,e);d.addItem(mxResources.get("rightAlign"),
+null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,e);d.addSeparator(g);d.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,e);d.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,e);d.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,e);this.addMenuItems(d,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("horizontal"),
+null,function(){b.distributeCells(!0)},g);d.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(d,g){var e=b.view.getState(b.getSelectionCell());null!=e&&(e=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE),"arrow"!=e&&(this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
+this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,
+"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
+this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e&&this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
+this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),d.addSeparator(g),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(d,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(d,g){var e=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
+m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});d.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
+null:u)},!0)}),g);d.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);d.addSeparator(g);d.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
+(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
+g);d.addSeparator(g);d.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);e(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);d.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
+this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["toFront","toBack","bringForward",
+"sendBackward","-"],g);this.addSubmenu("direction",d,g);this.addMenuItems(d,["turn","-"],g);this.addSubmenu("align",d,g);this.addSubmenu("distribute",d,g);d.addSeparator(g);this.addSubmenu("navigation",d,g);this.addSubmenu("insert",d,g);this.addSubmenu("layout",d,g);this.addMenuItems(d,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["insertLink","insertImage"],g)})));this.put("view",
+new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(d,g){null!=this.editorUi.format&&this.addMenuItems(d,["formatPanel"],g);this.addMenuItems(d,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(d,
+g){this.addMenuItems(d,["resetView","-"],g);for(var e=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<e.length;k++)(function(n){d.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(e[k]);this.addMenuItems(d,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,
+"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,d){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(d||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var d=this.get(a);null!=d&&(b.showDisabled||d.isEnabled())&&this.get(a).execute(b,f)};
+Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,d=f.getSelectionCell(),g=f.getCurrentCellStyle(d);1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var e=f.isTable(d)||f.isTableRow(d)||f.isTableCell(d),k=f.isStack(d)||f.isStackChild(d),n=e,u=e;k&&(g=f.isStack(d)?g:f.getCellStyle(f.model.getParent(d)),u="0"==g.horizontalStack,n=!u);null!=b||!e&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,A,C){r=C||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,A||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,A||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
-x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
-null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{k?f.deleteLane(e):f.deleteTableColumn(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableRow(e,
-!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
-f.deleteLane(e):f.deleteTableRow(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(C){n=d.getParentByName(mxEvent.getSource(C),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var K=mxEvent.isMouseEvent(C)?2:4,E=x,O=Math.min(20,k.sectionRowIndex+K);K=Math.min(20,n.cellIndex+K);for(var R=E.rows.length;R<O;R++)for(var Q=E.insertRow(R),P=0;P<E.rows[0].cells.length;P++)Q.insertCell(-1);for(R=0;R<E.rows.length;R++)for(Q=E.rows[R],P=Q.cells.length;P<K;P++)Q.insertCell(-1);A.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
-1);for(E=0;E<x.rows.length;E++)for(O=x.rows[E],K=0;K<O.cells.length;K++)R=O.cells[K],E==k.sectionRowIndex&&K==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=E<=k.sectionRowIndex&&K<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(C,F,K){var E=this.editorUi.editor.graph;C=E.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=E.cellEditor.textarea){E.getParentByName(C,"TR");var O=E.cellEditor.textarea.getElementsByTagName("table");
-C=[];for(var R=0;R<O.length;R++)C.push(O[R]);E.container.focus();R=E.pasteHtmlAtCaret;O=["<table>"];for(var Q=0;Q<F;Q++){O.push("<tr>");for(var P=0;P<K;P++)O.push("<td><br></td>");O.push("</tr>")}O.push("</table>");F=O.join("");R.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=C[R-1]){E.selectNode(F[R].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
+x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(m){this.editorUi.handleError(m)}}),
+null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=d)try{k?f.deleteLane(d):f.deleteTableColumn(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableRow(d,
+!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
+f.deleteLane(d):f.deleteTableRow(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
+Menus.prototype.addInsertTableItem=function(a,b,f,d){function g(C){n=e.getParentByName(mxEvent.getSource(C),"TD");var F=!1;if(null!=n){k=e.getParentByName(n,"TR");var K=mxEvent.isMouseEvent(C)?2:4,E=x,O=Math.min(20,k.sectionRowIndex+K);K=Math.min(20,n.cellIndex+K);for(var R=E.rows.length;R<O;R++)for(var Q=E.insertRow(R),P=0;P<E.rows[0].cells.length;P++)Q.insertCell(-1);for(R=0;R<E.rows.length;R++)for(Q=E.rows[R],P=Q.cells.length;P<K;P++)Q.insertCell(-1);A.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
+1);for(E=0;E<x.rows.length;E++)for(O=x.rows[E],K=0;K<O.cells.length;K++)R=O.cells[K],E==k.sectionRowIndex&&K==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=E<=k.sectionRowIndex&&K<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return F}d=null!=d?d:!0;b=null!=b?b:mxUtils.bind(this,function(C,F,K){var E=this.editorUi.editor.graph;C=E.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=E.cellEditor.textarea){E.getParentByName(C,"TR");var O=E.cellEditor.textarea.getElementsByTagName("table");
+C=[];for(var R=0;R<O.length;R++)C.push(O[R]);E.container.focus();R=E.pasteHtmlAtCaret;O=["<table>"];for(var Q=0;Q<F;Q++){O.push("<tr>");for(var P=0;P<K;P++)O.push("<td><br></td>");O.push("</tr>")}O.push("</table>");F=O.join("");R.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=C[R-1]){E.selectNode(F[R].rows[0].cells[0]);break}}});var e=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";a.firstChild.innerHTML="";var u=document.createElement("input");u.setAttribute("id","geTitleOption");u.setAttribute("type","checkbox");f=document.createElement("label");mxUtils.write(f,mxResources.get("title"));f.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(f,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(u,null,null,
-mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));e&&(a.firstChild.appendChild(u),
+mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));d&&(a.firstChild.appendChild(u),
a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(C,F){var K=document.createElement("table");K.setAttribute("border","1");K.style.borderCollapse="collapse";K.style.borderStyle="solid";K.setAttribute("cellPadding","8");for(var E=0;E<C;E++)for(var O=K.insertRow(E),R=0;R<F;R++)O.insertCell(-1);return K}(5,5);a.firstChild.appendChild(x);var A=document.createElement("div");A.style.padding=
"4px";A.innerHTML="1x1";a.firstChild.appendChild(A);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var F=g(C);null!=n&&null!=k&&F&&(b(C,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,f,e,g,d,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var A=m[x];if(u.getModel().isEdge(A)){if(k){var C=u.getCellGeometry(A);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(A,C))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],e[F],[A]);r.push(A)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",e,"cells",r))}finally{u.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
-Menus.prototype.styleChange=function(a,b,f,e,g,d,k,n,u){var m=this.createStyleChangeFunction(f,e);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),d,g);u&&this.showIconOnly(a);return a};
-Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var e=this.editorUi.editor.graph;e.stopEditing(!1);e.getModel().beginUpdate();try{for(var g=e.getEditableCells(e.getSelectionCells()),d=!1,k=0;k<a.length;k++)if(e.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&e.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])d=!0;if(d)for(d=0;d<g.length;d++)0==e.model.getChildCount(g[d])&&
-e.autoSizeCell(g[d],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{e.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,f,e,g,d,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=e,A=r.getView().getState(r.getSelectionCell());null!=A&&(x=A.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(F){if(null!=F&&0<F.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,F)}finally{r.getModel().endUpdate()}}null!=n&&n(F)}}),mxResources.get("enterValue")+
-(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),d,u,k)};
-Menus.prototype.pickColor=function(a,b,f){var e=this.editorUi,g=e.editor.graph,d=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
-backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&e.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,d,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
-(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,d,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
-Menus.prototype.addMenuItem=function(a,b,f,e,g,d){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(d||k.label,null,function(n){k.funct(e,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
-Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,e,g){for(var d=0;d<b.length;d++)"-"==b[d]?a.addSeparator(f):this.addMenuItem(a,b[d],f,e,null!=g?g[d]:null)};
+Menus.prototype.edgeStyleChange=function(a,b,f,d,g,e,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var A=m[x];if(u.getModel().isEdge(A)){if(k){var C=u.getCellGeometry(A);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(A,C))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],d[F],[A]);r.push(A)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",d,"cells",r))}finally{u.getModel().endUpdate()}}),e,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
+Menus.prototype.styleChange=function(a,b,f,d,g,e,k,n,u){var m=this.createStyleChangeFunction(f,d);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),e,g);u&&this.showIconOnly(a);return a};
+Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var d=this.editorUi.editor.graph;d.stopEditing(!1);d.getModel().beginUpdate();try{for(var g=d.getEditableCells(d.getSelectionCells()),e=!1,k=0;k<a.length;k++)if(d.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&d.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])e=!0;if(e)for(e=0;e<g.length;e++)0==d.model.getChildCount(g[e])&&
+d.autoSizeCell(g[e],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{d.getModel().endUpdate()}})};
+Menus.prototype.promptChange=function(a,b,f,d,g,e,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=d,A=r.getView().getState(r.getSelectionCell());null!=A&&(x=A.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(F){if(null!=F&&0<F.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,F)}finally{r.getModel().endUpdate()}}null!=n&&n(F)}}),mxResources.get("enterValue")+
+(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),e,u,k)};
+Menus.prototype.pickColor=function(a,b,f){var d=this.editorUi,g=d.editor.graph,e=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
+backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&d.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,e,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
+(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,e,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
+Menus.prototype.addMenuItem=function(a,b,f,d,g,e){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(e||k.label,null,function(n){k.funct(d,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
+Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,d,g){for(var e=0;e<b.length;e++)"-"==b[e]?a.addSeparator(f):this.addMenuItem(a,b[e],f,d,null!=g?g[e]:null)};
Menus.prototype.createPopupMenu=function(a,b,f){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,b,f);this.addPopupMenuEditItems(a,b,f);this.addPopupMenuStyleItems(a,b,f);this.addPopupMenuArrangeItems(a,b,f);this.addPopupMenuCellItems(a,b,f);this.addPopupMenuSelectionItems(a,b,f)};Menus.prototype.addPopupMenuHistoryItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,f)};
Menus.prototype.addPopupMenuEditItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,f):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,f)};Menus.prototype.addPopupMenuStyleItems=function(a,b,f){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,f):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,f)};
-Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var e=this.editorUi.editor.graph;0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<e.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==e.getSelectionCount()&&!e.getModel().isEdge(b)&&!e.isSwimlane(b)&&0<e.getModel().getChildCount(b)&&e.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
+Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var d=this.editorUi.editor.graph;0<d.getEditableCells(d.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==d.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<d.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==d.getSelectionCount()&&!d.getModel().isEdge(b)&&!d.isSwimlane(b)&&0<d.getModel().getChildCount(b)&&d.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
null,f)};
-Menus.prototype.addPopupMenuCellItems=function(a,b,f){var e=this.editorUi.editor.graph,g=e.view.getState(b);a.addSeparator();if(null!=g){var d=!1;1==e.getSelectionCount()&&e.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
-2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=d,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(b);d=null!=g&&null!=g.points&&0<g.points.length}1==e.getSelectionCount()&&
-(d||e.getModel().isVertex(b)&&0<e.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==e.getSelectionCount()&&e.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
-Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",e,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
-"editConnectionPoints",e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
-Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,e=0;e<f.length;e++)mxUtils.bind(this,function(g){var d=b.addMenu(mxResources.get(f[e]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,d)})(this.get(f[e]));return b};
+Menus.prototype.addPopupMenuCellItems=function(a,b,f){var d=this.editorUi.editor.graph,g=d.view.getState(b);a.addSeparator();if(null!=g){var e=!1;1==d.getSelectionCount()&&d.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(d.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=d.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
+2<g.bends.length&&(e=g.getHandleForEvent(d.updateMouseEvent(new mxMouseEvent(f))),0<e&&e<g.bends.length-1&&(null==g.bends[e]||null==g.bends[e].node||""==g.bends[e].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=e,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=d.getModel().getGeometry(b);e=null!=g&&null!=g.points&&0<g.points.length}1==d.getSelectionCount()&&
+(e||d.getModel().isVertex(b)&&0<d.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==d.getSelectionCount()&&d.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
+Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],d,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(e.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",d,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",d,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
+"editConnectionPoints",d,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
+Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)mxUtils.bind(this,function(g){var e=b.addMenu(mxResources.get(f[d]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,e)})(this.get(f[d]));return b};
Menus.prototype.menuCreated=function(a,b,f){null!=b&&(f=null!=f?f:"geItem",a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=f,8==document.documentMode&&(b.style.color="")):(b.className=f+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
-Menubar.prototype.addMenu=function(a,b,f){var e=document.createElement("a");e.className="geItem";mxUtils.write(e,a);this.addMenuHandler(e,b);null!=f?this.container.insertBefore(e,f):this.container.appendChild(e);return e};
-Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,e=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(b);d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();d.destroy()});var k=mxUtils.getOffset(a);d.popup(k.x,k.y+a.offsetHeight,null,
-g);this.editorUi.setCurrentMenu(d,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),e(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){e(g);f=!0}))}};Menubar.prototype.destroy=function(){};
+Menubar.prototype.addMenu=function(a,b,f){var d=document.createElement("a");d.className="geItem";mxUtils.write(d,a);this.addMenuHandler(d,b);null!=f?this.container.insertBefore(d,f):this.container.appendChild(d);return d};
+Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,d=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(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.editorUi.resetCurrentMenu();e.destroy()});var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,
+g);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),d(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){d(g);f=!0}))}};Menubar.prototype.destroy=function(){};
function Menu(a,b){mxEventSource.call(this);this.funct=a;this.enabled=null!=b?b:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(f){null!=this.editorUi.currentMenu&&mxEvent.getSource(f)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
Toolbar.prototype.dropDownImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAHt7e////yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCREM1NkJFMjE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCREM1NkJFMzE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQzOUMzMjZCMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQzOUMzMjZDMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+
"/dropdown.gif";Toolbar.prototype.selectedBackground="#d0d0d0";Toolbar.prototype.unselectedBackground="none";Toolbar.prototype.staticElements=null;
Toolbar.prototype.init=function(){var a=screen.width;a-=740<screen.height?56:0;if(700<=a){var b=this.addMenu("",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")",!0,"viewPanels",null,!0);this.addDropDownArrow(b,"geSprite-formatpanel",38,50,-4,-3,36,-8);this.addSeparator()}var f=this.addMenu("",mxResources.get("zoom")+" (Alt+Mousewheel)",!0,"viewZoom",null,!0);f.showDisabled=!0;f.style.whiteSpace="nowrap";f.style.position="relative";f.style.overflow="hidden";f.style.width=EditorUi.compactUi?
"50px":"36px";420<=a&&(this.addSeparator(),b=this.addItems(["zoomIn","zoomOut"]),b[0].setAttribute("title",mxResources.get("zoomIn")+" ("+this.editorUi.actions.get("zoomIn").shortcut+")"),b[1].setAttribute("title",mxResources.get("zoomOut")+" ("+this.editorUi.actions.get("zoomOut").shortcut+")"));this.updateZoom=mxUtils.bind(this,function(){f.innerHTML=Math.round(100*this.editorUi.editor.graph.view.scale)+"%";this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.getElementsByTagName("img")[0].style.right=
"1px",f.getElementsByTagName("img")[0].style.top="5px")});this.editorUi.editor.graph.view.addListener(mxEvent.EVENT_SCALE,this.updateZoom);this.editorUi.editor.addListener("resetGraphView",this.updateZoom);b=this.addItems(["-","undo","redo"]);b[1].setAttribute("title",mxResources.get("undo")+" ("+this.editorUi.actions.get("undo").shortcut+")");b[2].setAttribute("title",mxResources.get("redo")+" ("+this.editorUi.actions.get("redo").shortcut+")");320<=a&&(b=this.addItems(["-","delete"]),b[1].setAttribute("title",
-mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
-null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
-null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
-mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
-null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
-null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
+mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
+null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
+null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
+mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
+null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
+null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
+mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8);this.addSeparator();this.addTableDropDown()};
Toolbar.prototype.appendDropDownImageHtml=function(a){var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",Toolbar.prototype.dropDownImage);a.appendChild(b);b.style.position="absolute";b.style.right="4px";b.style.top=(EditorUi.compactUi?6:8)+"px"};
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(f){this.editorUi.menus.addInsertTableCellItem(f)}));a.style.position="relative";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.width="30px";a.innerHTML='<div class="geSprite geSprite-table"></div>';this.appendDropDownImageHtml(a);a.getElementsByTagName("div")[0].style.marginLeft="-2px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left=
"22px",a.getElementsByTagName("img")[0].style.top="5px");var b=this.editorUi.menus.get("insert");null!=b&&"function"===typeof a.setEnabled&&b.addListener("stateChanged",function(){a.setEnabled(b.enabled)});return a};
-Toolbar.prototype.addDropDownArrow=function(a,b,f,e,g,d,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=e-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=d+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
+Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};
Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,f=this.addMenu("",mxResources.get("style"),!0,"formatBlock");f.style.position="relative";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.style.paddingRight="18px",f.getElementsByTagName("img")[0].style.right="1px",f.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width="68px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,mxResources.get("fontSize"),
!0,"fontSize");this.sizeMenu.style.position="relative";this.sizeMenu.style.whiteSpace="nowrap";this.sizeMenu.style.overflow="hidden";this.sizeMenu.style.width="24px";this.setFontSize(Menus.prototype.defaultFontSize);EditorUi.compactUi&&(this.sizeMenu.style.paddingRight="18px",this.sizeMenu.getElementsByTagName("img")[0].style.right="1px",this.sizeMenu.getElementsByTagName("img")[0].style.top="5px");f=this.addItems("- undo redo - bold italic underline".split(" "));f[1].setAttribute("title",mxResources.get("undo")+
-" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var e=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(d){g=
-d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
-"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
-g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
-"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));e.style.position="relative";
-e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");e=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(d){g=d.addItem("",null,this.editorUi.actions.get("subscript").funct,
-null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=d.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=d.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=d.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
-null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));e.style.position="relative";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
-"-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
-this.addSeparator();e=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(d){d.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));d.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));d.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));e.style.whiteSpace=
-"nowrap";e.style.overflow="hidden";e.style.position="relative";e.style.width="16px";e.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="24px",e.getElementsByTagName("img")[0].style.top="5px",e.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
-!1,mxUtils.bind(this,function(d){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(d);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
-k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=d.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
-k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=d.addItem("",
-null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,
-function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+
-("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
-x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
-k.setAttribute("title",mxResources.get("center"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
-(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,e,g,d,k){var n=this.editorUi.menus.get(e),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,d);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
-Toolbar.prototype.addMenuFunction=function(a,b,f,e,g,d){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,e,d)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,e,g,d){b=e?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,e,g,d);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
-Toolbar.prototype.addItems=function(a,b,f){for(var e=[],g=0;g<a.length;g++){var d=a[g];"-"==d?e.push(this.addSeparator(b)):e.push(this.addItem("geSprite-"+d.toLowerCase(),d,b,f))}return e};Toolbar.prototype.addItem=function(a,b,f,e){var g=this.editorUi.actions.get(b),d=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),d=this.addButton(a,b,g.funct,f),e||"function"!==typeof d.setEnabled||(d.setEnabled(g.enabled),g.addListener("stateChanged",function(){d.setEnabled(g.enabled)})));return d};
-Toolbar.prototype.addButton=function(a,b,f,e){a=this.createButton(a);e=null!=e?e:this.container;this.initElement(a,b);this.addClickHandler(a,f);e.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
+" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var d=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(e){g=
+e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
+"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
+g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
+"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));d.style.position="relative";
+d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");d=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(e){g=e.addItem("",null,this.editorUi.actions.get("subscript").funct,
+null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=e.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=e.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=e.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
+null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
+"-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
+this.addSeparator();d=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(e){e.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));e.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));e.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));d.style.whiteSpace=
+"nowrap";d.style.overflow="hidden";d.style.position="relative";d.style.width="16px";d.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="24px",d.getElementsByTagName("img")[0].style.top="5px",d.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
+!1,mxUtils.bind(this,function(e){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(e);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
+k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=e.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
+k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=e.addItem("",
+null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,
+function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+
+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
+x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
+k.setAttribute("title",mxResources.get("center"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
+(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,d,g,e,k){var n=this.editorUi.menus.get(d),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,e);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
+Toolbar.prototype.addMenuFunction=function(a,b,f,d,g,e){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,d,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,d,g,e){b=d?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,d,g,e);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
+Toolbar.prototype.addItems=function(a,b,f){for(var d=[],g=0;g<a.length;g++){var e=a[g];"-"==e?d.push(this.addSeparator(b)):d.push(this.addItem("geSprite-"+e.toLowerCase(),e,b,f))}return d};Toolbar.prototype.addItem=function(a,b,f,d){var g=this.editorUi.actions.get(b),e=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),e=this.addButton(a,b,g.funct,f),d||"function"!==typeof e.setEnabled||(e.setEnabled(g.enabled),g.addListener("stateChanged",function(){e.setEnabled(g.enabled)})));return e};
+Toolbar.prototype.addButton=function(a,b,f,d){a=this.createButton(a);d=null!=d?d:this.container;this.initElement(a,b);this.addClickHandler(a,f);d.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,"click",function(f){a.enabled&&b(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);b.appendChild(f);return b};
Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};
-Toolbar.prototype.addMenuHandler=function(a,b,f,e){if(null!=f){var g=this.editorUi.editor.graph,d=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();d=new mxPopupMenu(f);d.div.className+=" geToolbarMenu";d.showDisabled=e;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();
-d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var K=k.value;/(^#?[a-zA-Z0-9]*$)/.test(K)?("none"!=K&&"#"!=
-K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12),n(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var K=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom="8px";return K}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
+Toolbar.prototype.addMenuHandler=function(a,b,f,d){if(null!=f){var g=this.editorUi.editor.graph,e=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=b;e.autoExpand=!0;!b&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();
+e.destroy()});var u=mxUtils.getOffset(a);e.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(e,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==e||null==e.div||null==e.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,d){function g(){var K=k.value;/(^#?[a-zA-Z0-9]*$)/.test(K)?("none"!=K&&"#"!=
+K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12),n(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var K=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom="8px";return K}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(K,E,O,R){E=null!=E?E:12;var Q=document.createElement("table");Q.style.borderCollapse=
"collapse";Q.setAttribute("cellspacing","0");Q.style.marginBottom="20px";Q.style.cellSpacing="0px";Q.style.marginLeft="1px";var P=document.createElement("tbody");Q.appendChild(P);for(var aa=K.length/E,T=0;T<aa;T++){for(var U=document.createElement("tr"),fa=0;fa<E;fa++)mxUtils.bind(this,function(ha){var ba=document.createElement("td");ba.style.border="0px solid black";ba.style.padding="0px";ba.style.width="16px";ba.style.height="16px";null==ha&&(ha=O);if(null!=ha){ba.style.borderWidth="1px";"none"==
ha?ba.style.background="url('"+Dialog.prototype.noColorImage+"')":ba.style.backgroundColor="#"+ha;var qa=this.colorNames[ha.toUpperCase()];null!=qa&&ba.setAttribute("title",qa)}U.appendChild(ba);null!=ha&&(ba.style.cursor="pointer",mxEvent.addListener(ba,"click",function(){"none"==ha?(u.fromString("ffffff"),k.value="none"):u.fromString(ha)}),mxEvent.addListener(ba,"dblclick",g))})(K[T*E+fa]);P.appendChild(U)}R&&(K=document.createElement("td"),K.setAttribute("title",mxResources.get("reset")),K.style.border=
-"1px solid black",K.style.padding="0px",K.style.width="16px",K.style.height="16px",K.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",K.style.backgroundPosition="center center",K.style.backgroundRepeat="no-repeat",K.style.cursor="pointer",U.appendChild(K),mxEvent.addListener(K,"click",function(){ColorDialog.resetRecentColors();Q.parentNode.replaceChild(d(),Q)}));m.appendChild(Q);return Q});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
-"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);d();var A=r(this.presetColors);A.style.marginBottom="8px";
-A=r(this.defaultColors);A.style.marginBottom="16px";f.appendChild(m);A=document.createElement("div");A.style.textAlign="right";A.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});C.className="geBtn";a.editor.cancelFirst&&A.appendChild(C);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";A.appendChild(F);a.editor.cancelFirst||A.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
-f.appendChild(A);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(K){27==K.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(K))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+"1px solid black",K.style.padding="0px",K.style.width="16px",K.style.height="16px",K.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",K.style.backgroundPosition="center center",K.style.backgroundRepeat="no-repeat",K.style.cursor="pointer",U.appendChild(K),mxEvent.addListener(K,"click",function(){ColorDialog.resetRecentColors();Q.parentNode.replaceChild(e(),Q)}));m.appendChild(Q);return Q});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
+"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);e();var A=r(this.presetColors);A.style.marginBottom="8px";
+A=r(this.defaultColors);A.style.marginBottom="16px";f.appendChild(m);A=document.createElement("div");A.style.textAlign="right";A.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});C.className="geBtn";a.editor.cancelFirst&&A.appendChild(C);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";A.appendChild(F);a.editor.cancelFirst||A.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
+f.appendChild(A);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(K){27==K.keyCode&&(a.hideDialog(),null!=d&&d(),mxEvent.consume(K))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var b=this.editorUi.editor.graph;b.getModel().beginUpdate();try{b.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href",
-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,A,C,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,d,g,e,k,n,u,m,r,x,A,C,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
n.style.position="absolute";n.style.left="0px";n.style.right="0px";var K=n.cloneNode(!1),E=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";K.style.top="20px";K.style.bottom="64px";E.style.bottom="0px";E.style.height="60px";E.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(K);k.appendChild(E);null!=F&&n.appendChild(F);var O=document.createElement("textarea");r&&O.setAttribute("wrap","off");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete",
"off");O.setAttribute("autocapitalize","off");mxUtils.write(O,f||"");O.style.resize="none";O.style.outline="none";O.style.position="absolute";O.style.boxSizing="border-box";O.style.top="0px";O.style.left="0px";O.style.height="100%";O.style.width="100%";this.textarea=O;this.init=function(){O.focus();O.scrollTop=0};K.appendChild(O);null!=A&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(A)}),b.className="geBtn",E.appendChild(b));if(null!=C)for(b=0;b<C.length;b++)(function(Q,
-P,aa){Q=mxUtils.button(Q,function(T){P(T,O)});null!=aa&&Q.setAttribute("title",aa);Q.className="geBtn";E.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&E.appendChild(d);null!=u&&u(E,O);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(O.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn";
-E.appendChild(R);mxEvent.addListener(O,"keypress",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&R.click()})}a.editor.cancelFirst||E.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
+P,aa){Q=mxUtils.button(Q,function(T){P(T,O)});null!=aa&&Q.setAttribute("title",aa);Q.className="geBtn";E.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});e.setAttribute("title","Escape");e.className="geBtn";a.editor.cancelFirst&&E.appendChild(e);null!=u&&u(E,O);if(null!=d){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();d(O.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn";
+E.appendChild(R);mxEvent.addListener(O,"keypress",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&R.click()})}a.editor.cancelFirst||E.appendChild(e);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),f.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result};
-n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var d=document.createElement("option");d.setAttribute("value","replace");mxUtils.write(d,mxResources.get("replaceExistingDrawing"));g.appendChild(d)}d=document.createElement("option");d.setAttribute("value",
-"new");mxUtils.write(d,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(d);a.editor.graph.isEnabled()&&(d=document.createElement("option"),d.setAttribute("value","import"),mxUtils.write(d,mxResources.get("addToExistingDrawing")),g.appendChild(d));b.appendChild(g);d=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
+n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));g.appendChild(e)}e=document.createElement("option");e.setAttribute("value",
+"new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),g.appendChild(e));b.appendChild(g);e=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
try{a.editor.setGraphXml(mxUtils.parseXml(k).documentElement),a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}else if("import"==g.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(k),m=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,m);var r=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(r));a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}null!=n&&mxUtils.alert(n.message)});
-d.className="geBtn gePrimaryBtn";b.appendChild(d);a.editor.cancelFirst||b.appendChild(e);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
+e.className="geBtn gePrimaryBtn";b.appendChild(e);a.editor.cancelFirst||b.appendChild(d);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function b(){var U=r.value,fa=U.lastIndexOf(".");r.value=0<fa?U.substring(0,fa+1)+x.value:U+"."+x.value;"xml"===x.value?(A.setAttribute("disabled","true"),C.setAttribute("disabled","true"),F.setAttribute("disabled","true"),P.setAttribute("disabled","true")):(A.removeAttribute("disabled"),C.removeAttribute("disabled"),F.removeAttribute("disabled"),P.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===x.value?(K.removeAttribute("disabled"),E.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*F.value>MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/
-d),n=Math.ceil(g.height/d);d=document.createElement("table");var u=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
+"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===x.value?(K.removeAttribute("disabled"),E.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*F.value>MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var d=a.editor.graph,g=d.getGraphBounds(),e=d.view.scale,k=Math.ceil(g.width/
+e),n=Math.ceil(g.height/e);e=document.createElement("table");var u=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");g.appendChild(m);var x=document.createElement("select");x.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));x.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")),x.appendChild(m));
m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","pdf");mxUtils.write(m,mxResources.get("formatPdf"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));x.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m,mxResources.get("formatXml")),
x.appendChild(m));m=document.createElement("td");m.appendChild(x);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("zoom")+" (%):");g.appendChild(m);var A=document.createElement("input");A.setAttribute("type","number");A.setAttribute("value","100");A.style.width="180px";m=document.createElement("td");m.appendChild(A);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");
@@ -3990,36 +3991,36 @@ m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendCh
m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var K=document.createElement("select");K.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");K.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");K.appendChild(m);m=document.createElement("option");
m.setAttribute("value","300");mxUtils.write(m,"300dpi");K.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");K.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));K.appendChild(m);var E=document.createElement("input");E.style.width="180px";E.style.display="none";E.setAttribute("value","100");E.setAttribute("type","number");E.setAttribute("min","50");E.setAttribute("step",
"50");var O=!1;mxEvent.addListener(K,"change",function(){"custom"==this.value?(this.style.display="none",E.style.display="",E.focus()):(E.value=this.value,O||(A.value=this.value))});mxEvent.addListener(E,"change",function(){var U=parseInt(E.value);isNaN(U)||0>=U?E.style.backgroundColor="red":(E.style.backgroundColor="",O||(A.value=U))});m=document.createElement("td");m.appendChild(K);m.appendChild(E);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize=
-"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var Q=document.createElement("input");
+"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==d.background||d.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var Q=document.createElement("input");
Q.setAttribute("type","checkbox");Q.checked=!1;m=document.createElement("td");m.appendChild(Q);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("value",ExportDialog.lastBorderValue);P.style.width="180px";m=document.createElement("td");m.appendChild(P);g.appendChild(m);u.appendChild(g);
-d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(A,"change",function(){O=!0;var U=Math.max(0,parseFloat(A.value)||100)/100;A.value=parseFloat((100*U).toFixed(2));0<k?(C.value=Math.floor(k*U),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(C,"change",function(){var U=parseInt(C.value)/k;0<U?(A.value=parseFloat((100*U).toFixed(2)),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(F,"change",function(){var U=
+e.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(A,"change",function(){O=!0;var U=Math.max(0,parseFloat(A.value)||100)/100;A.value=parseFloat((100*U).toFixed(2));0<k?(C.value=Math.floor(k*U),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(C,"change",function(){var U=parseInt(C.value)/k;0<U?(A.value=parseFloat((100*U).toFixed(2)),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(F,"change",function(){var U=
parseInt(F.value)/n;0<U?(A.value=parseFloat((100*U).toFixed(2)),C.value=Math.floor(k*U)):(A.value="100",C.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(A.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var U=r.value,fa=x.value,ha=Math.max(0,parseFloat(A.value)||100)/100,ba=Math.max(0,parseInt(P.value)),
-qa=e.background,I=Math.max(1,parseInt(E.value));if(("svg"==fa||"png"==fa||"pdf"==fa)&&R.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ba;ExportDialog.exportFile(a,U,fa,qa,ha,ba,I,Q.checked)}}));aa.className="geBtn gePrimaryBtn";var T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});T.className="geBtn";a.editor.cancelFirst?(m.appendChild(T),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(T));g.appendChild(m);u.appendChild(g);
-d.appendChild(u);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,b,f,e,g,d,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((d/g-u.x)/n.view.scale),Math.floor((d/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
-m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*d);g=Math.ceil(u.height*g/n.view.scale+2*d);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
-ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function f(){0<Q.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(T){}var m=new mxForm("properties");m.table.style.width=
-"100%";var r=d.attributes,x=[],A=[],C=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,K=function(T,U){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var ha=document.createElement("a"),ba=mxUtils.createImage(Dialog.prototype.closeImage);ba.style.height="9px";ba.style.fontSize="9px";ba.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";
+qa=d.background,I=Math.max(1,parseInt(E.value));if(("svg"==fa||"png"==fa||"pdf"==fa)&&R.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ba;ExportDialog.exportFile(a,U,fa,qa,ha,ba,I,Q.checked)}}));aa.className="geBtn gePrimaryBtn";var T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});T.className="geBtn";a.editor.cancelFirst?(m.appendChild(T),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(T));g.appendChild(m);u.appendChild(g);
+e.appendChild(u);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
+ExportDialog.exportFile=function(a,b,f,d,g,e,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(d,g,e)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((e/g-u.x)/n.view.scale),Math.floor((e/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
+m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*e);g=Math.ceil(u.height*g/n.view.scale+2*e);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+ExportDialog.saveLocalFile=function(a,b,f,d){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+d)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
+var EditDataDialog=function(a,b){function f(){0<Q.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var d=document.createElement("div"),g=a.editor.graph,e=g.getModel().getValue(b);if(!mxUtils.isNode(e)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",e||"");e=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(T){}var m=new mxForm("properties");m.table.style.width=
+"100%";var r=e.attributes,x=[],A=[],C=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,K=function(T,U){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var ha=document.createElement("a"),ba=mxUtils.createImage(Dialog.prototype.closeImage);ba.style.height="9px";ba.style.fontSize="9px";ba.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";
ha.setAttribute("title",mxResources.get("delete"));ha.style.position="absolute";ha.style.top="4px";ha.style.right="0px";ha.style.margin="0px";ha.style.width="9px";ha.style.height="9px";ha.style.cursor="pointer";ha.appendChild(ba);U=function(qa){return function(){for(var I=0,L=0;L<x.length;L++){if(x[L]==qa){A[L]=null;m.table.deleteRow(I+(null!=F?1:0));break}null!=A[L]&&I++}}}(U);mxEvent.addListener(ha,"click",U);U=T.parentNode;fa.appendChild(T);fa.appendChild(ha);U.appendChild(fa)};k=function(T,U,
fa){x[T]=U;A[T]=m.addTextarea(x[C]+":",fa,2);A[T].style.width="100%";0<fa.indexOf("\n")&&A[T].setAttribute("rows","2");K(A[T],U);null!=n[U]&&0==n[U].editable&&A[T].setAttribute("disabled","disabled")};u=[];for(var E=g.getModel().getParent(b)==g.getModel().getRoot(),O=0;O<r.length;O++)!E&&"label"==r[O].nodeName||"placeholders"==r[O].nodeName||u.push({name:r[O].nodeName,value:r[O].nodeValue});u.sort(function(T,U){return T.name<U.name?-1:T.name>U.name?1:0});if(null!=F){r=document.createElement("div");
r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var R=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(T){mxEvent.isShiftDown(T)&&(T=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(U){null!=U&&0<U.length&&U!=F&&(null==g.getModel().getCell(U)?(g.getModel().cellRemoved(b),b.setId(U),F=U,R.innerHTML=mxUtils.htmlEntities(U),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",
[U])}))}),mxResources.get("id")),a.showDialog(T.container,300,80,!0,!0),T.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(O=0;O<u.length;O++)k(C,u[O].name,u[O].value),C++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";
-k.style.marginTop="6px";k.style.width="100%";var Q=document.createElement("input");Q.setAttribute("placeholder",mxResources.get("enterPropertyName"));Q.setAttribute("type","text");Q.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");Q.style.boxSizing="border-box";Q.style.marginLeft="2px";Q.style.width="100%";k.appendChild(Q);u.appendChild(k);e.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var T=Q.value;if(0<T.length&&"label"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var U=
-mxUtils.indexOf(x,T);if(0<=U&&null!=A[U])A[U].focus();else{d.cloneNode(!1).setAttribute(T,"");0<=U&&(x.splice(U,1),A.splice(U,1));x.push(T);var fa=m.addTextarea(T+":","",2);fa.style.width="100%";A.push(fa);K(fa,T);fa.focus()}P.setAttribute("disabled","disabled");Q.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(Q,"keypress",function(T){13==T.keyCode&&P.click()});this.init=function(){0<A.length?A[0].focus():Q.focus()};P.setAttribute("title",
-mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var T=!1,
-U=0;U<x.length;U++)null==A[U]?d.removeAttribute(x[U]):(d.setAttribute(x[U],A[U].value),T=T||"placeholder"==x[U]&&"1"==d.getAttribute("placeholders"));T&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(fa){mxUtils.alert(fa)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&aa.click()});mxEvent.addListener(Q,"keyup",f);mxEvent.addListener(Q,"change",f);k=document.createElement("div");
-k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",E=document.createElement("input"),E.setAttribute("type","checkbox"),E.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(E.setAttribute("checked","checked"),E.defaultChecked=!0),mxEvent.addListener(E,"click",function(){"1"==d.getAttribute("placeholders")?
-d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(E),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(E=document.createElement("a"),E.setAttribute("href",EditDataDialog.placeholderHelpLink),E.setAttribute("title",mxResources.get("help")),E.setAttribute("target","_blank"),E.style.marginLeft="8px",E.style.cursor="help",O=document.createElement("img"),mxUtils.setOpacity(O,50),O.style.height="16px",O.style.width="16px",O.setAttribute("border",
-"0"),O.setAttribute("valign","middle"),O.style.marginTop=mxClient.IS_IE11?"0px":"-4px",O.setAttribute("src",Editor.helpImage),E.appendChild(O),r.appendChild(E)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,b,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
+k.style.marginTop="6px";k.style.width="100%";var Q=document.createElement("input");Q.setAttribute("placeholder",mxResources.get("enterPropertyName"));Q.setAttribute("type","text");Q.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");Q.style.boxSizing="border-box";Q.style.marginLeft="2px";Q.style.width="100%";k.appendChild(Q);u.appendChild(k);d.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var T=Q.value;if(0<T.length&&"label"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var U=
+mxUtils.indexOf(x,T);if(0<=U&&null!=A[U])A[U].focus();else{e.cloneNode(!1).setAttribute(T,"");0<=U&&(x.splice(U,1),A.splice(U,1));x.push(T);var fa=m.addTextarea(T+":","",2);fa.style.width="100%";A.push(fa);K(fa,T);fa.focus()}P.setAttribute("disabled","disabled");Q.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(Q,"keypress",function(T){13==T.keyCode&&P.click()});this.init=function(){0<A.length?A[0].focus():Q.focus()};P.setAttribute("title",
+mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var T=!1,
+U=0;U<x.length;U++)null==A[U]?e.removeAttribute(x[U]):(e.setAttribute(x[U],A[U].value),T=T||"placeholder"==x[U]&&"1"==e.getAttribute("placeholders"));T&&e.removeAttribute("label");g.getModel().setValue(b,e)}catch(fa){mxUtils.alert(fa)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&aa.click()});mxEvent.addListener(Q,"keyup",f);mxEvent.addListener(Q,"change",f);k=document.createElement("div");
+k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",E=document.createElement("input"),E.setAttribute("type","checkbox"),E.style.marginRight="6px","1"==e.getAttribute("placeholders")&&(E.setAttribute("checked","checked"),E.defaultChecked=!0),mxEvent.addListener(E,"click",function(){"1"==e.getAttribute("placeholders")?
+e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")}),r.appendChild(E),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(E=document.createElement("a"),E.setAttribute("href",EditDataDialog.placeholderHelpLink),E.setAttribute("title",mxResources.get("help")),E.setAttribute("target","_blank"),E.style.marginLeft="8px",E.style.cursor="help",O=document.createElement("img"),mxUtils.setOpacity(O,50),O.style.height="16px",O.style.width="16px",O.setAttribute("border",
+"0"),O.setAttribute("valign","middle"),O.style.marginTop=mxClient.IS_IE11?"0px":"-4px",O.setAttribute("src",Editor.helpImage),E.appendChild(O),r.appendChild(E)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));d.appendChild(k);this.container=d};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
+var LinkDialog=function(a,b,f,d){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var 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 k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
-mxEvent.addListener(b,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(b);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,e,g,!0,!0);this.window.minimumSize=
+mxEvent.addListener(b,"click",function(){k.value="";k.focus()});e.appendChild(k);e.appendChild(b);g.appendChild(e);this.init=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.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),d(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+b.className="geBtn";a.editor.cancelFirst&&e.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();d(k.value)});f.className="geBtn gePrimaryBtn";e.appendChild(f);a.editor.cancelFirst||e.appendChild(b);g.appendChild(e);this.container=g},OutlineWindow=function(a,b,f,d,g){var e=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,d,g,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(m,r){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;m=Math.max(0,Math.min(m,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));r=Math.max(0,Math.min(r,x-this.table.clientHeight-("1"==urlParams.sketch?
3:48)));this.getX()==m&&this.getY()==r||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var m=this.window.getX(),r=this.window.getY();this.window.setLocation(m,r)});mxEvent.addListener(window,"resize",n);var u=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy();u.destroy()};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();u.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,
-mxUtils.bind(this,function(){u.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){u.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){u.setSuspended(!0)}));u.init(k);a.actions.get("zoomIn");a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(m,r){for(var x=!1,A=mxEvent.getSource(m);null!=A;){if(A==u.svg){x=!0;break}A=A.parentNode}x&&(x=d.zoomFactor,null!=m.deltaY&&Math.round(m.deltaY)!=m.deltaY&&(x=1+Math.abs(m.deltaY)/
-20*(x-1)),d.lazyZoom(r,null,null,x),mxEvent.consume(m))})},LayersWindow=function(a,b,f,e,g){function d(ha){if(u.isEnabled()&&null!=ha){var ba=u.convertValueToString(ha);ba=new FilenameDialog(a,ba||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(qa){null!=qa&&u.cellLabelChanged(ha,qa)}),mxResources.get("enterName"));a.showDialog(ba.container,300,100,!0,!0);ba.init()}}function k(){var ha=T.get(u.getLayerForCells(u.getSelectionCells()));null!=ha?ha.appendChild(U):null!=
+mxUtils.bind(this,function(){u.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){u.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){u.setSuspended(!0)}));u.init(k);a.actions.get("zoomIn");a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(m,r){for(var x=!1,A=mxEvent.getSource(m);null!=A;){if(A==u.svg){x=!0;break}A=A.parentNode}x&&(x=e.zoomFactor,null!=m.deltaY&&Math.round(m.deltaY)!=m.deltaY&&(x=1+Math.abs(m.deltaY)/
+20*(x-1)),e.lazyZoom(r,null,null,x),mxEvent.consume(m))})},LayersWindow=function(a,b,f,d,g){function e(ha){if(u.isEnabled()&&null!=ha){var ba=u.convertValueToString(ha);ba=new FilenameDialog(a,ba||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(qa){null!=qa&&u.cellLabelChanged(ha,qa)}),mxResources.get("enterName"));a.showDialog(ba.container,300,100,!0,!0);ba.init()}}function k(){var ha=T.get(u.getLayerForCells(u.getSelectionCells()));null!=ha?ha.appendChild(U):null!=
U.parentNode&&U.parentNode.removeChild(U)}function n(){function ha(I,L,H,S){var V=document.createElement("div");V.className="geToolbarContainer";T.put(H,V);V.style.overflow="hidden";V.style.position="relative";V.style.padding="4px";V.style.height="22px";V.style.display="block";V.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";V.style.borderWidth="0px 0px 1px 0px";V.style.borderColor="#c3c3c3";V.style.borderStyle="solid";V.style.whiteSpace="nowrap";V.setAttribute("title",
L);var ea=document.createElement("div");ea.style.display="inline-block";ea.style.width="100%";ea.style.textOverflow="ellipsis";ea.style.overflow="hidden";mxEvent.addListener(V,"dragover",function(W){W.dataTransfer.dropEffect="move";C=I;W.stopPropagation();W.preventDefault()});mxEvent.addListener(V,"dragstart",function(W){A=V;mxClient.IS_FF&&W.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(V,"dragend",function(W){null!=A&&null!=C&&u.addCell(H,u.model.root,C);C=A=null;W.stopPropagation();
W.preventDefault()});var ka=document.createElement("img");ka.setAttribute("draggable","false");ka.setAttribute("align","top");ka.setAttribute("border","0");ka.style.width="16px";ka.style.padding="0px 6px 0 4px";ka.style.marginTop="2px";ka.style.cursor="pointer";ka.setAttribute("title",mxResources.get(u.model.isVisible(H)?"hide":"show"));u.model.isVisible(H)?(ka.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(V,75)):(ka.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(V,25));Editor.isDarkMode()&&
@@ -4028,7 +4029,7 @@ Editor.lockedImage),mxUtils.setOpacity(ka,75)):(ka.setAttribute("src",Editor.unl
ea.appendChild(ka);ka=document.createElement("span");mxUtils.write(ka,L);ka.style.display="block";ka.style.whiteSpace="nowrap";ka.style.overflow="hidden";ka.style.textOverflow="ellipsis";ka.style.position="absolute";ka.style.left="52px";ka.style.right="8px";ka.style.top="8px";ea.appendChild(ka);V.appendChild(ea);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)L=document.createElement("div"),L.style.display="block",L.style.textAlign="right",L.style.whiteSpace=
"nowrap",L.style.position="absolute",L.style.right="16px",L.style.top="6px",0<I&&(ea=document.createElement("a"),ea.setAttribute("title",mxResources.get("toBack")),ea.className="geButton",ea.style.cssFloat="none",ea.innerHTML="&#9660;",ea.style.width="14px",ea.style.height="14px",ea.style.fontSize="14px",ea.style.margin="0px",ea.style.marginTop="-1px",L.appendChild(ea),mxEvent.addListener(ea,"click",function(W){u.isEnabled()&&u.addCell(H,u.model.root,I-1);mxEvent.consume(W)})),0<=I&&I<F-1&&(ea=document.createElement("a"),
ea.setAttribute("title",mxResources.get("toFront")),ea.className="geButton",ea.style.cssFloat="none",ea.innerHTML="&#9650;",ea.style.width="14px",ea.style.height="14px",ea.style.fontSize="14px",ea.style.margin="0px",ea.style.marginTop="-1px",L.appendChild(ea),mxEvent.addListener(ea,"click",function(W){u.isEnabled()&&u.addCell(H,u.model.root,I+1);mxEvent.consume(W)})),V.appendChild(L);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(V.setAttribute("draggable","true"),V.style.cursor=
-"move")}mxEvent.addListener(V,"dblclick",function(W){var Z=mxEvent.getSource(W).nodeName;"INPUT"!=Z&&"IMG"!=Z&&(d(H),mxEvent.consume(W))});u.getDefaultParent()==H&&(V.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",V.style.fontWeight=u.isEnabled()?"bold":"",K=H);mxEvent.addListener(V,"click",function(W){u.isEnabled()&&(u.setDefaultParent(S),u.view.setCurrentRoot(null),mxEvent.isShiftDown(W)&&u.setSelectionCells(H.children),mxEvent.consume(W))});x.appendChild(V)}F=u.model.getChildCount(u.model.root);
+"move")}mxEvent.addListener(V,"dblclick",function(W){var Z=mxEvent.getSource(W).nodeName;"INPUT"!=Z&&"IMG"!=Z&&(e(H),mxEvent.consume(W))});u.getDefaultParent()==H&&(V.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",V.style.fontWeight=u.isEnabled()?"bold":"",K=H);mxEvent.addListener(V,"click",function(W){u.isEnabled()&&(u.setDefaultParent(S),u.view.setCurrentRoot(null),mxEvent.isShiftDown(W)&&u.setSelectionCells(H.children),mxEvent.consume(W))});x.appendChild(V)}F=u.model.getChildCount(u.model.root);
x.innerHTML="";T.clear();for(var ba=F-1;0<=ba;ba--)mxUtils.bind(this,function(I){ha(ba,u.convertValueToString(I)||mxResources.get("background"),I,I)})(u.model.getChildAt(u.model.root,ba));var qa=u.convertValueToString(K)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[qa]));aa.setAttribute("title",mxResources.get("duplicateIt",[qa]));u.isSelectionEmpty()&&(Q.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect=
"none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom="10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var A=null,C=
null;mxEvent.addListener(m,"dragover",function(ha){ha.dataTransfer.dropEffect="move";C=0;ha.stopPropagation();ha.preventDefault()});mxEvent.addListener(m,"drop",function(ha){ha.stopPropagation();ha.preventDefault()});var F=null,K=null,E=document.createElement("div");E.className="geToolbarContainer";E.style.position="absolute";E.style.bottom="0px";E.style.left="0px";E.style.right="0px";E.style.height=r;E.style.overflow="hidden";E.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";E.style.backgroundColor=
@@ -4039,7 +4040,7 @@ Q.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])))
E.appendChild(P);var aa=O.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);aa.appendChild(r);mxEvent.addListener(aa,"click",function(ha){if(u.isEnabled()){ha=null;u.model.beginUpdate();try{ha=u.cloneCell(K),u.cellLabelChanged(ha,mxResources.get("untitledLayer")),ha.setVisible(!0),ha=u.addCell(ha,u.model.root),u.setDefaultParent(ha)}finally{u.model.endUpdate()}null==ha||u.isCellLocked(ha)||u.selectAll(ha)}});u.isEnabled()||
(aa.className="geButton mxDisabled");E.appendChild(aa);O=O.cloneNode(!1);O.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src",Editor.addImage);O.appendChild(r);mxEvent.addListener(O,"click",function(ha){if(u.isEnabled()){u.model.beginUpdate();try{var ba=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ba)}finally{u.model.endUpdate()}}mxEvent.consume(ha)});u.isEnabled()||(O.className="geButton mxDisabled");E.appendChild(O);
m.appendChild(E);var T=new mxDictionary,U=document.createElement("span");U.setAttribute("title",mxResources.get("selectionOnly"));U.innerHTML="&#8226;";U.style.position="absolute";U.style.fontWeight="bold";U.style.fontSize="16pt";U.style.right="2px";U.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?Q.className="geButton mxDisabled":Q.className="geButton";k()});this.window=
-new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;this.window.setLocation=function(ha,ba){var qa=window.innerHeight||document.body.clientHeight||
+new mxWindow(mxResources.get("layers"),m,b,f,d,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;this.window.setLocation=function(ha,ba){var qa=window.innerHeight||document.body.clientHeight||
document.documentElement.clientHeight;ha=Math.max(0,Math.min(ha,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));ba=Math.max(0,Math.min(ba,qa-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==ha&&this.getY()==ba||mxWindow.prototype.setLocation.apply(this,arguments)};var fa=mxUtils.bind(this,function(){var ha=this.window.getX(),ba=this.window.getY();this.window.setLocation(ha,ba)});mxEvent.addListener(window,"resize",fa);
this.destroy=function(){mxEvent.removeListener(window,"resize",fa);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -10942,18 +10943,19 @@ 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()),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){}}};
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(M){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(M);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,M);else{var L=this.getCurrentUser(),O=null!=L?L.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),O,M)}}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)),
-25E3);this.sendErrorReport("Checksum Error in "+m+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+k+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==c?n(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==c?n(g):n(null)}),function(){})}else{var v=this.getCurrentUser(),d=null!=v?v.id:"unknown";EditorUi.logError("Checksum Error in "+m+" "+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:m,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize()})}catch(g){}}}catch(g){}};
+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(k){var l=this.compressReportData(JSON.stringify(e,null,2));k=null==k?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(k.data)),
+25E3);this.sendErrorReport("Checksum Error in "+m+" "+this.getHash(),(null!=f?f:"")+"\n\nPatches:\n"+l+(null!=k?"\n\nRemote:\n"+k:""),null,7E4)});null==c?n(null):this.getLatestVersion(mxUtils.bind(this,function(k){null!=k&&k.getCurrentEtag()==c?n(k):n(null)}),function(){})}else{var v=this.getCurrentUser(),d=null!=v?v.id:"unknown",g=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")";EditorUi.logError("Checksum Error in "+m+" "+g,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-"+g,action:m,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize()})}catch(k){}}}catch(k){}};
DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var m=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),v=this.getCurrentUser(),d=null!=v?this.ui.hashValue(v.id):"unknown",g=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",k=this.getTitle(),l=k.lastIndexOf(".");v="xml";0<l&&(v=k.substring(l));var p=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+v+")\nUser="+d+g+"\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!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+m+"\n\nData:\n"+n,c)}catch(q){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),m=this.ui.editor.graph.getSelectionCells(),n=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(n,c,m);null!=this.backupPatch&&this.patch([this.backupPatch]);var v=this.ui.getCurrentFile();null!=v&&(v.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)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()}catch(c){null!=e&&e(c)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
-DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var f=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var c=this.ui.editor.graph,m=c.getSelectionCells(),n=c.getViewState(),v=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(v,n,m);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)}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):
+f()}catch(c){null!=e&&e(c)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,f){this.getLatestVersion(mxUtils.bind(this,function(c){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(c.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(c.getDescriptor());this.descriptorChanged();null!=e&&e()}),f)};
+DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};
DrawioFile.prototype.patch=function(b,e,f){if(null!=b){var c=this.ui.editor.undoManager,m=c.history.slice(),n=c.indexOfNextAdd,v=this.ui.editor.graph;v.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=f;var g=v.foldingEnabled,k=v.mathEnabled,l=v.cellRenderer.redraw;v.cellRenderer.redraw=function(p){p.view.graph.isEditing(p.cell)&&(p.view.graph.scrollCellToVisible(p.cell),p.view.graph.cellEditor.resize());l.apply(this,arguments)};v.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{v.container.style.visibility="";v.model.endUpdate();v.cellRenderer.redraw=l;this.changeListenerEnabled=d;f||(c.history=m,c.indexOfNextAdd=n,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)k!=v.mathEnabled?
(this.ui.editor.updateGraphComponents(),v.refresh()):(g!=v.foldingEnabled?v.view.revalidate():v.view.validate(),v.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",f)}return b};
@@ -11002,7 +11004,7 @@ null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.i
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(f){b(e,f)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,f,c,m){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var n=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(n),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(n,e,f,c,m)}catch(g){this.invalidChecksum=this.inConflictState=
!0;this.descriptorChanged();null!=c&&c(g);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,g);else{var v=this.getCurrentUser(),d=null!=v?v.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),d,g)}}catch(k){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var m=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==m&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",m,"saving",this.savingFile,"modified",this.isModified(),"now",this.isAutosaveNow());if(this.isModified()&&this.isAutosaveNow()){var n=this.isAutosaveRevision();
+DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var m=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==m&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",m,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var n=this.isAutosaveRevision();
n&&(this.lastAutosaveRevision=(new Date).getTime());this.save(n,mxUtils.bind(this,function(v){this.autosaveCompleted();null!=f&&f(v)}),mxUtils.bind(this,function(v){null!=c&&c(v)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",m,"delay",b,"saving",this.savingFile);this.autosaveThread=m};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 f=b.lastIndexOf(".");b=0<f?b.substring(f):"";f=e.lastIndexOf(".");return b===(0<f?e.substring(f):"")}return b==e};
@@ -11028,11 +11030,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,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=
+var StorageDialog=function(b,e,f){function c(p,q,x,y,z,A){function L(){mxEvent.addListener(O,"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 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 M=document.createElement("div");M.style.textOverflow="ellipsis";M.style.overflow="hidden";M.style.position="absolute";M.style.bottom="8px";M.style.left="0px";M.style.right="0px";mxUtils.write(M,q);O.appendChild(M);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";O.appendChild(u)}else M.style.paddingTop=
+"5px",M.style.whiteSpace="normal",mxClient.IS_IOS?(O.style.padding="0px 10px 20px 10px",O.style.top="6px"):mxClient.IS_FF&&(M.style.paddingTop="0px",M.style.marginTop="-2px");if(null!=z)for(p=0;p<z.length;p++)mxUtils.br(M),mxUtils.write(M,z[p]);if(null!=y&&null==b[y]){u.style.visibility="hidden";mxUtils.setOpacity(M,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(O);
+var B=window.setTimeout(function(){null==b[y]&&(D.stop(),O.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(M,100),u.style.visibility="",D.stop(),L(),"drive"==y&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else L();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=
"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,
@@ -11059,53 +11061,53 @@ d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAtt
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 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!=
+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="+(M.checked?"1":"0");
+G+="&resize="+(O.checked?"1":"0");G+="&x0="+Number(l.value);G+="&y0="+g;m.mathEnabled&&(G+="&math=1");L.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 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();
+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 L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";c.appendChild(L);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 M=document.createElement("input");M.setAttribute("type","checkbox");M.style.marginLeft="8px";c.appendChild(M);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(O,"change",f);mxEvent.addListener(M,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(L,"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(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",
+function(z,A,L){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(L.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(O){A.fireEvent(new mxEventObject("pointerdown","event",O,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(L.node,"touchstart",function(O){A.fireEvent(new mxEventObject("pointerdown","event",O,"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(L,O){n.connectionHandler.reset();n.clearSelection();var M=n.getCellGeometry(z),u;p(function(){u=n.insertVertex(d,null,"Entry",M.x,M.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(L,O){L=O.getProperty("event");O=O.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var M=mxUtils.convertPoint(n.container,mxEvent.getClientX(L),mxEvent.getClientY(L));n.connectionHandler.start(O,M.x,M.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(L);mxEvent.consume(L)});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(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";
+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(L){throw L;}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,L,O,M){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 L=z.getBounds(A);L.x-=z.translate.x;L.y-=z.translate.y;b.editor.graph.scrollRectToVisible(L);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,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,
+k.value):""==g.value||b.isOffline()?(L.value="",O.value="",null!=D&&D("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(B){L.value=B.width;O.value=B.height;null!=D&&D(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";O.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],
+"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 L=document.createElement("input");L.setAttribute("type","text");L.style.width="60px";L.style.marginLeft="8px";L.style.marginRight="16px";
+L.value=null==f||n?"":f.width;c.appendChild(L);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",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]]=
+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="";L.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 M=document.createElement("input");M.setAttribute("multiple","multiple");M.setAttribute("type",
+"file");mxEvent.addListener(M,"change",function(u){null!=M.files&&(A(M.files),M.type="",M.type="file",M.value="")});M.style.display="none";c.appendChild(M);l=mxUtils.button(mxResources.get("open"),function(){M.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,L.value,O.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 L=function(W,J,V,U,X){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(new mxRectangle(0,0,U,X));var t=null;O.getModel().beginUpdate();try{t="txt"==J?b.insertAsPreText(V,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(V)+";"),O.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:W,format:J},null,2))}finally{O.getModel().endUpdate()}null!=t&&(O.setSelectionCell(t),O.scrollCellToVisible(t))},O=b.editor.graph,M="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"==M?window.setTimeout(function(){b.spinner.stop();L(x,M,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(x,M,function(W,J,V){b.spinner.stop();L(x,M,W,J,V)},function(W){b.handleError(W)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(O=b.editor.graph,b.generateMermaidImage(x,M,function(W,J,V){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(new mxRectangle(0,0,J,V));b.spinner.stop();var U=null;O.getModel().beginUpdate();try{U=O.insertVertex(null,null,null,n.x,n.y,J,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+W+";"),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(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?
+Math.max(y.geometry.width,G.width+30)));y.insert(I,N?0:null);y.geometry.height+=30}0<u.length&&(O=b.editor.graph,n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0)),O.setSelectionCells(O.importCells(u,n.x,n.y)),O.scrollCellToVisible(O.getSelectionCell()))}else if("list"==y){if(0<A.length){O=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=O.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=O.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:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0));O.getModel().beginUpdate();try{u=O.importCells(u,n.x,n.y);G=[];for(C=0;C<u.length;C++)G.push(u[C]),G=G.concat(u[C].children);O.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{O.getModel().endUpdate()}O.setSelectionCells(u);
+O.scrollCellToVisible(O.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);O=new Graph(A);O.getModel().beginUpdate();try{u=O.importCells(u);for(C=0;C<u.length;C++)O.getModel().isVertex(u[C])&&(G=O.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(O,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(O.getDefaultParent(),u),C=!1):"circle"==y?
+(new mxCircleLayout(O)).execute(O.getDefaultParent()):(D=new mxFastOrganicLayout(O),D.disableEdgeStyle=!1,D.forceConstant=180,D.execute(O.getDefaultParent()));C&&(B=new mxParallelEdgeLayout(O),B.spacing=30,B.execute(O.getDefaultParent()))}finally{O.getModel().endUpdate()}O.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{u=O.getModel().getChildren(O.getDefaultParent()),n=mxEvent.isAltDown(z)?n:b.editor.graph.getCenterInsertPoint(O.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());O.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"==
@@ -11114,87 +11116,87 @@ l.setAttribute("value","horizontalFlow");mxUtils.write(l,mxResources.get("horizo
"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(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,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;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){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&&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 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)}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");
+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,L){function O(fa){null!=fa&&(Da=oa=fa?135:140);fa=!0;if(null!=La)for(;H<La.length&&(fa||0!=mxUtils.mod(H,30));){var ra=La[H++];ra=D(ra.url,ra.libs,ra.title,ra.tooltip?ra.tooltip:ra.title,ra.select,ra.imgUrl,ra.info,ra.onClick,ra.preview,ra.noImg,ra.clibs);fa&&ra.click();fa=!1}}function M(){if(Y&&null!=x)f||b.hideDialog(),x(Y,da,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ca,T);else{var fa=F.value;null!=fa&&
+0<fa.length&&b.pickFolder(b.mode,function(ra){b.createFile(fa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,ra,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function u(fa,ra,xa,wa,sa,va,ia){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");W.removeAttribute("disabled");Q=ra;T=xa;P=va;S=fa;Y=wa;ca=ia;da=sa;S.style.backgroundColor=d;S.style.border=g}function D(fa,ra,xa,wa,sa,va,ia,pa,
+ba,ea,ma){function ja(Ma,Ta){null==Ja?(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()&&(Ja=Ua.getText());Ta(Ja,Ia)}))):Ta(Ja,Ia)}function na(Ma,Ta,Ua){if(null!=Ma&&mxUtils.isAncestorNode(document.body,ka)){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(ka,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!=xa?mxResources.get(xa,null,xa):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;u(ka,null,null,fa,ia,ma)},!0,!1)}}function ua(Ma,Ta){null==fa||Ra||
+b.sidebar.currentElt==ka?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>",na(Ta,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma))):(b.sidebar.currentElt=
+ka,Ra=!0,ja(fa,function(Ua){Ra&&b.sidebar.currentElt==ka&&na(Ua,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma));Ra=!1})))}var ka=document.createElement("div");ka.className="geTemplate";ka.style.position="relative";ka.style.height=Da+"px";ka.style.width=oa+"px";var Ja=null,Ia=fa;Editor.isDarkMode()&&(ka.style.filter="invert(100%)");null!=xa?ka.setAttribute("title",mxResources.get(xa,null,xa)):null!=wa&&0<wa.length&&ka.setAttribute("title",wa);var Ra=!1,Sa=null;if(null!=va){ka.style.display="inline-flex";
+ka.style.justifyContent="center";ka.style.alignItems="center";sa=document.createElement("img");sa.setAttribute("src",va);sa.setAttribute("alt",wa);sa.style.maxWidth=Da+"px";sa.style.maxHeight=oa+"px";Sa=sa;var Ka=va.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ka.appendChild(sa);sa.onerror=function(){this.src!=Ka?this.src=Ka:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ma){u(ka,null,null,fa,ia,ma)}),null,null);mxEvent.addListener(ka,
+"dblclick",function(Ma){M();mxEvent.consume(Ma)})}else if(!ea&&null!=fa&&0<fa.length){var Oa=function(Ma){W.setAttribute("disabled","disabled");ka.style.backgroundColor="transparent";ka.style.border="1px solid transparent";R.spin(Z);ja(fa,function(Ta,Ua){R.stop();null!=Ta&&(u(ka,Ta,ra,null,null,ma,Ua),Ma&&M())})};sa=ba||TEMPLATE_PATH+"/"+fa.substring(0,fa.length-4)+".png";ka.style.backgroundImage="url("+sa+")";ka.style.backgroundPosition="center center";ka.style.backgroundRepeat="no-repeat";if(null!=
+xa){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";va=document.createElement("tbody");ba=document.createElement("tr");ea=document.createElement("td");ea.setAttribute("align","center");ea.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(xa,null,xa));ea.appendChild(Pa);ba.appendChild(ea);va.appendChild(ba);wa.appendChild(va);ka.appendChild(wa)}mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ma){Oa()}),null,null);mxEvent.addListener(ka,"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",va=document.createElement("tbody"),ba=document.createElement("tr"),ea=document.createElement("td"),ea.setAttribute("align","center"),ea.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(xa,null,xa)),ea.appendChild(Pa),ba.appendChild(ea),va.appendChild(ba),wa.appendChild(va),ka.appendChild(wa),sa&&u(ka),mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ma){u(ka,null,null,fa,ia)}),null,null),null!=pa?mxEvent.addListener(ka,"click",pa):(mxEvent.addListener(ka,"click",function(Ma){u(ka,null,null,fa,ia)}),mxEvent.addListener(ka,"dblclick",function(Ma){M();mxEvent.consume(Ma)}));if(null!=fa){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";ka.appendChild(Qa);var Ya=!1;mxEvent.addGestureListeners(Qa,mxUtils.bind(this,function(Ma){Ya=b.sidebar.currentElt==ka}),null,null);mxEvent.addListener(Qa,"click",mxUtils.bind(this,function(Ma){Ya||ua(Ma,Qa);mxEvent.consume(Ma)}))}Z.appendChild(ka);
+return ka}function B(){function fa(ua,ka){var Ja=mxResources.get(ua);null==Ja&&(Ja=ua.substring(0,1).toUpperCase()+ua.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+ka.length+")"}function ra(ua,ka,Ja){mxEvent.addListener(ka,"click",function(){Fa!=ka&&(Fa.style.backgroundColor="",Fa=ka,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ja?Aa[ua][Ja]:Ba[ua],V=null,O(!1))})}Ga&&(Ga=!1,mxEvent.addListener(Z,"scroll",function(ua){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
+(O(),mxEvent.consume(ua))}));if(0<Na){var xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,mxResources.get("custom"));Ca.appendChild(xa);for(var wa in Ha){var sa=document.createElement("div"),va=wa;xa=Ha[wa];18<va.length&&(va=va.substring(0,18)+"&hellip;");sa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+sa.setAttribute("title",va+" ("+xa.length+")");mxUtils.write(sa,sa.getAttribute("title"));null!=k&&(sa.style.padding=k);Ca.appendChild(sa);(function(ua,ka){mxEvent.addListener(sa,"click",function(){Fa!=ka&&(Fa.style.backgroundColor="",Fa=ka,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,La=Ha[ua],V=null,O(!1))})})(wa,sa)}xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,"draw.io");Ca.appendChild(xa)}for(wa in Ba){va=
+Aa[wa];var ia=sa=document.createElement(va?"ul":"div");xa=Ba[wa];var pa=fa(wa,xa);if(null!=va){var ba=document.createElement("li"),ea=document.createElement("div");ea.className="geTempTreeCaret";ea.setAttribute("title",pa);mxUtils.write(ea,pa);ia=ea;ba.appendChild(ea);pa=document.createElement("ul");pa.className="geTempTreeNested";pa.style.visibility="hidden";for(var ma in va){var ja=document.createElement("li"),na=fa(ma,va[ma]);ja.setAttribute("title",na);mxUtils.write(ja,na);ra(wa,ja,ma);pa.appendChild(ja)}ba.appendChild(pa);
+sa.className="geTempTree";sa.appendChild(ba);(function(ua,ka){mxEvent.addListener(ka,"click",function(){ua.style.visibility="visible";ua.classList.toggle("geTempTreeActive");ua.classList.toggle("geTempTreeNested")&&setTimeout(function(){ua.style.visibility="hidden"},550);ka.classList.toggle("geTempTreeCaret-down")})})(pa,ea)}else sa.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;",
+sa.setAttribute("title",pa),mxUtils.write(sa,pa);null!=k&&(sa.style.padding=k);Ca.appendChild(sa);null==Fa&&0<xa.length&&(Fa=sa,Fa.style.backgroundColor=v,La=xa);ra(wa,ia)}O(!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;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}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=
+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(fa){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(F),L?F.style.width=e||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),L.style.marginLeft=
+"6px",L.style.width=e||C?"80px":"180px",N.appendChild(L)),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");M();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
+if(p||q){var J=[],V=null,U=null,X=null,t=function(fa){W.setAttribute("disabled","disabled");for(var ra=0;ra<J.length;ra++)J[ra].className=ra==fa?"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(){Ca.style.display="";ha.style.display="";Z.style.left="160px";t(0);Z.scrollTop=0;Z.innerHTML="";H=0;V!=La&&(La=V,Ba=U,Na=X,Ca.innerHTML="",B(),V=null)});
+J.push(C);z.appendChild(C);var E=function(fa){Ca.style.display="none";ha.style.display="none";Z.style.left="30px";t(fa?-1:1);null==V&&(V=La);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var ra=function(xa,wa,sa){H=0;R.stop();La=xa;sa=sa||{};var va=0,ia;for(ia in sa)va+=sa[ia].length;if(wa)Z.innerHTML=wa;else if(0==xa.length&&0==va)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<va){Ca.style.display="";Z.style.left="160px";Ca.innerHTML="";
+Na=0;Ba={"draw.io":xa};for(ia in sa)Ba[ia]=sa[ia];B()}else O(!0)};fa?q(K.value,ra):p(ra)};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 K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(fa){13==
+fa.keyCode&&E(!0)});z.appendChild(K);C=mxUtils.button(mxResources.get("search"),function(){E(!0)});C.className="geBtn";z.appendChild(C)}t(0)}var T=null,P=null,Q=null,S=null,Y=null,ca=null,da=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 ha=document.createElement("div");
+ha.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");ha.appendChild(aa);var ta=document.createElement("img"),la="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ta.setAttribute("src",
+la);ta.setAttribute("title",mxResources.get("search"));ta.style.position="relative";ta.style.left="-18px";ta.style.top="1px";ta.style.background="url('"+b.editor.transparentImage+"')";ha.appendChild(ta);mxEvent.addListener(ta,"click",function(){ta.getAttribute("src")==Dialog.prototype.closeImage&&(ta.setAttribute("src",la),ta.setAttribute("title",mxResources.get("search")),aa.value="",null!=Ea&&(Ea.click(),Ea=null));aa.focus()});mxEvent.addListener(aa,"keydown",mxUtils.bind(this,function(fa){if(13==
+fa.keyCode){var ra=aa.value;if(""==ra)null!=Ea&&(Ea.click(),Ea=null);else{if(null==NewDialog.tagsList[l]){var xa={};for(ma in Ba)for(var wa=Ba[ma],sa=0;sa<wa.length;sa++){var va=wa[sa];if(null!=va.tags)for(var ia=va.tags.toLowerCase().split(";"),pa=0;pa<ia.length;pa++)null==xa[ia[pa]]&&(xa[ia[pa]]=[]),xa[ia[pa]].push(va)}NewDialog.tagsList[l]=xa}var ba=ra.toLowerCase().split(" ");xa=NewDialog.tagsList[l];if(0<Na&&null==xa.__tagsList__){for(ma in Ha)for(wa=Ha[ma],sa=0;sa<wa.length;sa++)for(va=wa[sa],
+ia=va.title.split(" "),ia.push(ma),pa=0;pa<ia.length;pa++){var ea=ia[pa].toLowerCase();null==xa[ea]&&(xa[ea]=[]);xa[ea].push(va)}xa.__tagsList__=!0}var ma=[];wa={};for(sa=ia=0;sa<ba.length;sa++)if(0<ba[sa].length){ea=xa[ba[sa]];var ja={};ma=[];if(null!=ea)for(pa=0;pa<ea.length;pa++)va=ea[pa],0==ia==(null==wa[va.url])&&(ja[va.url]=!0,ma.push(va));wa=ja;ia++}Z.scrollTop=0;Z.innerHTML="";H=0;xa=document.createElement("div");xa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
+mxUtils.write(xa,mxResources.get(0==ma.length?"noResultsFor":"resultsFor",[ra]));Z.appendChild(xa);null!=Fa&&null==Ea&&(Fa.style.backgroundColor="",Ea=Fa,Fa=xa);La=ma;V=null;O(!1)}mxEvent.consume(fa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(fa){""==aa.value?(ta.setAttribute("src",la),ta.setAttribute("title",mxResources.get("search"))):(ta.setAttribute("src",Dialog.prototype.closeImage),ta.setAttribute("title",mxResources.get("reset")))}));z+=23;var Ca=document.createElement("div");
+Ca.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,oa=140,Ba={},Aa={},Ha={},Na=0,Ga=!0,Fa=null,Ea=null;Ba.basic=[{title:"blankDiagram",select:!0}];var La=Ba.basic;if(!e){var za=function(){mxUtils.get(qa,function(fa){if(!ya){ya=!0;fa=fa.getXml().documentElement.firstChild;for(var ra={};null!=fa;){if("undefined"!==typeof fa.getAttribute)if("clibs"==
+fa.nodeName){for(var xa=fa.getAttribute("name"),wa=fa.getElementsByTagName("add"),sa=[],va=0;va<wa.length;va++)sa.push(encodeURIComponent(mxUtils.getTextContent(wa[va])));null!=xa&&0<sa.length&&(ra[xa]=sa.join(";"))}else if(sa=fa.getAttribute("url"),null!=sa){wa=fa.getAttribute("section");xa=fa.getAttribute("subsection");if(null==wa&&(va=sa.indexOf("/"),wa=sa.substring(0,va),null==xa)){var ia=sa.indexOf("/",va+1);-1<ia&&(xa=sa.substring(va+1,ia))}va=Ba[wa];null==va&&(va=[],Ba[wa]=va);sa=fa.getAttribute("clibs");
+null!=ra[sa]&&(sa=ra[sa]);sa={url:fa.getAttribute("url"),libs:fa.getAttribute("libs"),title:fa.getAttribute("title"),tooltip:fa.getAttribute("name")||fa.getAttribute("url"),preview:fa.getAttribute("preview"),clibs:sa,tags:fa.getAttribute("tags")};va.push(sa);null!=xa&&(va=Aa[wa],null==va&&(va={},Aa[wa]=va),wa=va[xa],null==wa&&(wa=[],va[xa]=wa),wa.push(sa))}fa=fa.nextSibling}R.stop();B()}})};G.appendChild(ha);G.appendChild(Ca);G.appendChild(Z);var ya=!1,qa=l;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&
+(qa=PROXY_URL+"?url="+encodeURIComponent(qa));R.spin(Z);null!=A?A(function(fa,ra){Ha=fa;X=Na=ra;za()},za):za();U=Ba}mxEvent.addListener(F,"keypress",function(fa){b.dialog.container.firstChild==G&&13==fa.keyCode&&M()});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 fa=new FilenameDialog(b,"",mxResources.get("create"),function(ra){null!=ra&&0<ra.length&&(ra=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
+encodeURIComponent(F.value)+"&create="+encodeURIComponent(ra)),null==b.getCurrentFile()?window.location.href=ra:window.openWindow(ra))},mxResources.get("url"));b.showDialog(fa.container,300,80,!0,!0);fa.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var fa=document.createElement("input");fa.setAttribute("multiple","multiple");fa.setAttribute("type","file");mxEvent.addListener(fa,"change",function(ra){b.openFiles(fa.files,
+!0);fa.value=""});fa.style.display="none";document.body.appendChild(fa);b.newDlgFileInputElt=fa}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 L(N,I,F,H){function R(){mxEvent.addListener(W,"click",function(){var t=F;if(v){var E=u.value,K=E.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>K){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<=K&&(E=E.substring(0,K));u.value=E+T}}O(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),
+mxUtils.setOpacity(V,100),J.style.visibility="",U.stop(),R())}))}else R();B.appendChild(W);++C==p&&(mxUtils.br(B),C=0)}function O(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 M=document.createElement("h2");mxUtils.write(M,m||mxResources.get("create"));M.style.marginTop="0px";M.style.marginBottom=
+"24px";n.appendChild(M);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;
+z.style.marginTop="6px",z.className="geBtn");g&&Editor.popupsAllowed&&(m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(N){mxEvent.isPopupTrigger(N)||O("_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),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&&d||q.setAttribute("selected","selected"),l&&L(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"),L(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!=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?O(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?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=
+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=
"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,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,
+e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,z=function(M,u,D,B){var C="data:"==M.substring(0,5);!b.isOffline()||C&&"undefined"===typeof chrome?0<M.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(M,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&&(M=b.convertDataUri(M));c(M,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(M,null,null,q,x,y)):(M=b.convertDataUri(M),u=null==u?120:u,D=null==D?100:D,b.hideDialog(),c(M,u,D,q,x,y))},A=function(M,u){if(null!=M){var D=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=D?z(M,D.width,D.height,u):z(M,null,null,u)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var M=l.parentNode,u=null;mxEvent.addListener(M,"dragleave",function(D){null!=u&&(u.parentNode.removeChild(u),u=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(D){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(M));D.stopPropagation();D.preventDefault()}));mxEvent.addListener(M,"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=
+"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(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1],null!=M&&(p.value=M.url));p.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(M){null!=L.files&&(b.importFiles(L.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),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
+"keypress",function(M){13==M.keyCode&&A(p.value)});var O=mxUtils.button(mxResources.get("crop"),function(){var M=new CropImageDialog(b,p.value,q,function(u,D,B){q=u;x=D;y=B});b.showDialog(M.container,300,390,!0,!0)});v&&(O.className="geBtn",d.appendChild(O));mxEvent.addListener(p,"change",function(M){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(M,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",M);D.style.minWidth="42px";D.style.verticalAlign="middle";D.appendChild(u);O.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 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=
+e),k.appendChild(l),k.appendChild(p);g.appendChild(k);var L=mxUtils.button(f,function(){b.hideDialog();c(x.checked?"pageNotFound"!==y.value?y.value:e:l.value,LinkDialog.selectedDocs,z.checked?v:null)});L.style.verticalAlign="middle";L.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 M=g.parentNode,u=null;mxEvent.addListener(M,"dragleave",function(D){null!=u&&(u.parentNode.removeChild(u),u=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(D){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(M));D.stopPropagation();D.preventDefault()}));
+mxEvent.addListener(M,"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,L.click());D.stopPropagation();D.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(M){if(M.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=M.docs;var u=M.docs[0].url;"application/mxe"==M.docs[0].mimeType||null!=M.docs[0].mimeType&&
+"application/vnd.jgraph."==M.docs[0].mimeType.substring(0,23)?u="https://www.draw.io/#G"+M.docs[0].id:"application/vnd.google-apps.folder"==M.docs[0].mimeType&&(u="https://drive.google.com/#folders/"+M.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 M=b.drive.createLinkPicker();b.linkPicker=M.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(M){l.value=M[0].link;l.focus()}})});null!=b.oneDrive&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(M,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(M){if(null!=M){M=M.split("/");var u=M[0],D=M[1],B=M[2];M=M.slice(3,M.length).join("/");l.value="https://github.com/"+u+"/"+D+"/blob/"+B+"/"+M;l.focus()}})});null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(M){if(null!=M){M=M.split("/");var u=
+M[0],D=M[1],B=M[2];M=M.slice(3,M.length).join("/");l.value=DRAWIO_GITLAB_URL+"/"+u+"/"+D+"/blob/"+B+"/"+M;l.focus()}})});mxEvent.addListener(l,"keypress",function(M){13==M.keyCode&&(b.hideDialog(),c(x.checked?y.value:l.value,LinkDialog.selectedDocs))});O.appendChild(L);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=
"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,
@@ -11204,55 +11206,55 @@ m.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.styl
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(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"));
+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 L=null,O=null,M=null,u=null,D=mxUtils.button("",function(){null!=M&&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!=M&&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!=M&&(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!=M&&(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=
+"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!=M){var S=mxUtils.getXml(M.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!=M&&null!=u&&(mxEvent.isShiftDown(S)?null!=M&&(S=b.getPagesForNode(M.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(ca){b.handleError(ca)}},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!=M&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(M.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(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 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"),P=(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),ca=null;if(0<=Y.getTime()){var da=function(ha){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(ha),ta=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=ta){var la=function(Da){null!=Da&&(Da=Ca(Editor.parseDiagramNode(Da)));return Da},Ca=function(Da){var oa=Da.getAttribute("background");
+if(null==oa||""==oa||oa==mxConstants.NONE)oa=d.defaultPageBackgroundColor;n.style.backgroundColor=oa;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};J.style.display="none";J.innerHTML="";M=aa;u=ha;k=parseSelectFunction=null;l=0;if("mxfile"==ta.nodeName){aa=ta.getElementsByTagName("diagram");k=[];for(ha=0;ha<aa.length;ha++)k.push(aa[ha]);l=Math.min(g,k.length-1);0<k.length&&la(k[l]);if(1<k.length)for(J.removeAttribute("disabled"),J.style.display=
+"",ha=0;ha<k.length;ha++)aa=document.createElement("option"),mxUtils.write(aa,k[ha].getAttribute("name")||mxResources.get("pageWithNumber",[ha+1])),aa.setAttribute("value",ha),ha==l&&aa.setAttribute("selected","selected"),J.appendChild(aa);V=function(){try{var Da=parseInt(J.value);l=g=Da;la(k[Da])}catch(oa){J.value=g,b.handleError(oa)}}}else Ca(ta);ha=S.lastModifyingUserName;null!=ha&&20<ha.length&&(ha=ha.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=ha?ha+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());H.setAttribute("title",ca.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"))};ca=document.createElement("tr");ca.style.borderBottom="1px solid lightGray";ca.style.fontSize="12px";ca.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()===P?mxUtils.write(Z,Y.toLocaleTimeString()):
+mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ca.appendChild(Z);ca.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=S.fileSize?" "+b.formatFileSize(parseInt(S.fileSize)):"")+(null!=S.lastModifyingUserName?" "+S.lastModifyingUserName:""));mxEvent.addListener(ca,"click",function(ha){O!=S&&(x.stop(),null!=L&&(L.style.backgroundColor=""),O=S,L=ca,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",u=M=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=
+"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(O==S)try{da(aa)}catch(ta){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ta.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(ha))});mxEvent.addListener(ca,
+"dblclick",function(ha){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ha)},!1);T.appendChild(ca)}return ca}(e[q]);null!=Q&&q==e.length-1&&(E=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",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=
+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(){O=mxUtils.parseXml(g[p.value].data);M=b.editor.extractGraphModel(O.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"));
+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 L=new Graph(A);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var O=mxUtils.parseXml(f),M=b.editor.extractGraphModel(O.documentElement,!0),u=0,D=null,B=L.getGlobalVariable;L.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)};L.getLinkForCell=function(){return null};f=mxUtils.button("",function(){L.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(){L.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(){L.maxFitScale=8;L.fit(8);L.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(){L.zoomActual();L.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"),
+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,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(C,"change",function(H){u=parseInt(C.value);N(D[u]);mxEvent.consume(H)});if("mxfile"==M.nodeName){var I=M.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(M)};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,
+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&&(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()),K=u.value.toLowerCase(),T=B.checked?new RegExp(K):null,P=null;z=null;p!=K&&(p=K,q=null,y=!1);var Q=null==q;if(0<K.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==P)&&(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 ca=0;X&&n&&null!=T&&S==q&&(label=label.substr(A),
+ca=A);var da=""==D.value,Z=da;if(null==T&&(Z&&0<=label.indexOf(K)||!Z&&label.substring(0,K.length)===K||da&&v(T,S.cell,K,Z))||null!=T&&(T.test(label)||da&&v(T,S.cell,K,Z)))if(n&&(null!=T?(da=label.match(T),null!=da&&0<da.length&&(z=da[0].toLowerCase(),A=ca+da.index+z.length)):(z=K,A=z.length)),Q){P=S;break}else null==P&&(P=S)}Q=Q||S==q}}if(null!=P){if(Y==E.length&&C.checked)return q=null,y=!0,g(!0,X,t);q=P;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!=P;n&&!U&&d();return 0==K.length||null!=P}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,z=null,A=0,L=1,O=document.createElement("div");O.style.userSelect="none";O.style.overflow="hidden";O.style.padding="10px";O.style.height="100%";var M=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=M;u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";O.appendChild(u);mxUtils.br(O);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=M;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";
+O.appendChild(D);mxUtils.br(O);mxEvent.addListener(D,"input",d)}var B=document.createElement("input");B.setAttribute("id","geFindWinRegExChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";O.appendChild(B);M=document.createElement("label");M.setAttribute("for","geFindWinRegExChck");O.appendChild(M);mxUtils.write(M,mxResources.get("regularExpression"));O.appendChild(M);M=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");M.style.position="relative";M.style.marginLeft=
+"6px";M.style.top="-1px";O.appendChild(M);mxUtils.br(O);var C=document.createElement("input");C.setAttribute("id","geFindWinAllPagesChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";O.appendChild(C);M=document.createElement("label");M.setAttribute("for","geFindWinAllPagesChck");O.appendChild(M);mxUtils.write(M,mxResources.get("allPages"));O.appendChild(M);var G=document.createElement("div");mxUtils.br(O);M=document.createElement("div");M.style.left="0px";M.style.right="0px";M.style.marginTop=
+"6px";M.style.padding="0 6px 0 6px";M.style.textAlign="center";O.appendChild(M);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||M.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";M.appendChild(I);var F=document.createElement("div");F.style.marginTop="10px";if(n){var H=function(U,X,t,E,K){if(null==K||"1"!=K.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);K=[];var P=-1;for(U=U.replace(/<br>/ig,"\n");-1<(P=U.indexOf("<",P+1));)K.push(P);P=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<K.length;S++){if(K[S]-Q<E)U=U.substr(0,K[S])+P[S]+U.substr(K[S]);else{var Y=K[S]-Q<T?E+Q:K[S]+(t.length-X.length);U=U.substr(0,Y)+P[S]+U.substr(Y)}Q+=P[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():
+"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");M.appendChild(R);mxUtils.br(M);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");M.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 K=q.cell,T=l.getLabel(K),P=E[K.id];if(P&&P.replAllMrk==
+L&&P.replAllPos>=A)break;E[K.id]={replAllMrk:L,replAllPos:A};l.isCellEditable(K)&&(l.model.setValue(K,H(T,z,D.value,A-z.length,l.getCurrentCellStyle(K))),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}L++}});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");M.appendChild(J);mxUtils.br(M);M.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";M.appendChild(N);mxUtils.br(M);M.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(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()?(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");
@@ -11276,108 +11278,108 @@ p=document.createElement("div");l.style.position="absolute";l.style.top="40px";l
"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");
+(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 L=document.createElement("table");n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");
+L.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var O=mxUtils.bind(this,function(B,C,G){var N=document.createElement("input");N.type="checkbox";L.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);L.appendChild(n);x=[];var M=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)M++;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(O(u[Math.floor(D/(M/3))],G.title,G.id));D++}})(f[n]);c.appendChild(L);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()});
+"";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(L){return function(){b.confirm(mxResources.get("delete")+' "'+d[L]+'"?',function(){null!=f&&
+f(d[L]);d.splice(L,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 L=document.createElement("option");mxUtils.write(L,App.publicPlugin[z]);L.value=App.publicPlugin[z];A.appendChild(L)}y.appendChild(A);mxUtils.br(y);mxUtils.br(y);z=mxUtils.button(mxResources.get("custom")+"...",function(){var O=new FilenameDialog(b,"",mxResources.get("add"),function(M){b.hideDialog();if(null!=M&&0<M.length){M=M.split(";");for(var u=0;u<M.length;u++){var D=M[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(O.container,300,80,!0,!0);O.init()});z.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var O=App.pluginRegistry[A.value];0>mxUtils.indexOf(d,O)&&(d.push(O),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 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=
+!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=L.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,M.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.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 K=
+C.apply(this,arguments);K.livePreview=!1;return K};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]?L.setAttribute("checked","checked"):(q=parseInt(R[5]),M.value=
+q,A.setAttribute("checked","checked"),O.style.visibility="visible"):z.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,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=
+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 L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";v.appendChild(L);
+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(L,"change",n);var O=document.createElement("div");O.style.textAlign="center";O.style.visibility="hidden";var M=document.createElement("input");M.setAttribute("type","range");M.setAttribute("min","1");M.setAttribute("max","49");M.setAttribute("value",q);M.setAttribute("title",mxResources.get("arcSize"));
+O.appendChild(M);v.appendChild(O);mxEvent.addListener(M,"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 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,
+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 L=document.createElement("input");L.setAttribute("type","text");L.style.width="100px";L.value=
+1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(L);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 M=0;M<e.length;M++){var u=f.getCellGeometry(e[M]);null!=u&&(u=u.clone(),f.isCellMovable(e[M])&&(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[M])&&(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[M],u));0<mxUtils.trim(L.value).length&&
+f.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[e[M]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(M){13==M.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(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]));
+"transform .1s ease-in-out");if(null!=C){var K=document.createElement("img");K.setAttribute("src",M.convert(C));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";E.appendChild(K)}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 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,ha,aa){mxEvent.addListener(P,"click",function(ta){z[ha]=null;for(var la=0;la<l.length;la++)if(null!=l[la].data&&l[la].data==ha||null!=l[la].xml&&
+null!=aa&&l[la].xml==aa.xml){l.splice(la,1);break}E.parentNode.removeChild(Z);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(ta)});mxEvent.addListener(P,"dblclick",function(ta){mxEvent.consume(ta)})})(E,C,R);E.appendChild(P);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]=K,l.push(S)):null!=R&&(R.aspect="fixed",l.push(R),S=R);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=O&&(O(),O=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 ha=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(aa){null!=aa&&(S.title=aa,V())},mxResources.get("enterValue"));b.showDialog(ha.container,300,80,!0,!0);ha.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=O&&(O(),O=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);O=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&&(P.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);P.style.visibility="";Q.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(Z){"hidden"==P.style.visibility&&(P.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 ca=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ca.length;Y++){X=mxUtils.getTextContent(ca[Y]);T=b.stringToCells(Graph.decompress(X));var da=b.editor.graph.getBoundingBoxFromGeometry(T);
+d(null,null,0,0,0,0,{xml:X,w:da.width,h:da.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;L=v(C);if(null!=A)null!=L&&L<x.children.length?(l.splice(L>A?L-1:L,0,l.splice(A,1)[0]),x.insertBefore(x.children[A],x.children[L])):(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 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=
+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,L=null,O=null;e=function(C){"true"!=mxEvent.getSource(C).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(C))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var M=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",
+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!=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(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!=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",
"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,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,
+var x=function(y,z,A){var L=k.value,O=mxUtils.parseXml(L);L=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(A&&b.hideDialog(),O=!y.model.contains(z),!A||O||L!=q){L=Graph.compress(L);y.getModel().beginUpdate();try{if(O){var M=b.editor.graph.getFreeInsertPoint();z.geometry.x=M.x;z.geometry.y=M.y;y.addCell(z)}y.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+L+")",[z])}catch(u){throw u;}finally{y.getModel().endUpdate()}O&&(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,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";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==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,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 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 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]):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">'+
+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(ia){Ga.innerHTML=mxUtils.htmlEntities(ia);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 L(ia,pa,ba,ea,ma,ja,na){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";J.querySelector(".geTempDlgRadioBtn[data-id="+
+ea+"]").className="geTempDlgRadioBtn "+(na?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");J.querySelector("."+pa).src="/images/"+ba+"-sel.svg";J.querySelector("."+ma).src="/images/"+ja+".svg";return!0}function O(ia,pa,ba,ea){function ma(ka,Ja){null==na?(ka=/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)?PROXY_URL+"?url="+encodeURIComponent(ka):TEMPLATE_PATH+"/"+ka,mxUtils.get(ka,mxUtils.bind(this,function(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(na=Ia.getText());Ja(na)}))):Ja(na)}
+function ja(ka,Ja,Ia){if(null!=ka&&mxUtils.isAncestorNode(document.body,pa)&&(ka=mxUtils.parseXml(ka),ka=Editor.extractGraphModel(ka.documentElement,!0),null!=ka)){"mxfile"==ka.nodeName&&(ka=Editor.parseDiagramNode(ka.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(ka.ownerDocument),Sa=new mxGraphModel;Ra.decode(ka,Sa);ka=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(pa,ka,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!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(Ja,Ia),!0,null,!0);var Ka=document.createElement("div");Ka.className="geTempDlgDialogMask";J.appendChild(Ka);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ka&&(J.removeChild(Ka),Ka=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=Oa)};mxEvent.addListener(Ka,"click",function(){b.sidebar.hideTooltip()})}}var na=null;if(Ea||b.sidebar.currentElt==
+pa)b.sidebar.hideTooltip();else{var ua=function(ka){Ea&&b.sidebar.currentElt==pa&&ja(ka,mxEvent.getClientX(ea),mxEvent.getClientY(ea));Ea=!1;ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=pa;Ea=!0;ba.src="/images/aui-wait.gif";ia.isExt?g(ia,ua,function(){z(mxResources.get("cantLoadPrev"));Ea=!1;ba.src="/images/icon-search.svg"}):ma(ia.url,ua)}}function M(ia,pa,ba){if(null!=E){for(var ea=E.className.split(" "),ma=0;ma<ea.length;ma++)if(-1<ea[ma].indexOf("Active")){ea.splice(ma,
+1);break}E.className=ea.join(" ")}null!=ia?(E=ia,E.className+=" "+pa,K=ba,Aa.className="geTempDlgCreateBtn"):(K=E=null,Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ia,pa){if(null!=K){var ba=function(ua){na.isExternal?g(na,function(ka){ea(ka,ua)},ma):na.url?mxUtils.get(TEMPLATE_PATH+"/"+na.url,mxUtils.bind(this,function(ka){200<=ka.getStatus()&&299>=ka.getStatus()?ea(ka.getText(),ua):ma()})):ea(b.emptyDiagramXml,ua)},ea=function(ua,ka){y||b.hideDialog(!0);e(ua,ka,na,pa)},ma=function(){z(mxResources.get("cannotLoad"));
+ja()},ja=function(){K=na;Aa.className="geTempDlgCreateBtn";pa&&(Ha.className="geTempDlgOpenBtn")},na=K;K=null;"boolean"!==typeof pa&&(pa=na.isExternal&&p);1==ia?k(na.url,na):pa?(Ha.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),ba,ia,function(ua){var ka=null!=ua&&0<ua.length;return ka&&y?(ba(ua),!1):ka},null,null,null,ja,x?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function D(ia){Aa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ia?"create":"copy"));ia=ia?"none":"";p&&(Ha.style.display=ia);for(var pa=J.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<pa.length;ba++)pa[ba].style.display=ia}function B(ia,pa,ba,ea,ma){ma||(aa.innerHTML="",M(),S=ia,Y=ea);var ja=null;if(ba){ja=document.createElement("table");
+ja.className="geTempDlgDiagramsListGrid";var na=document.createElement("tr"),ua=document.createElement("th");ua.style.width="50%";ua.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));na.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));na.appendChild(ua);ua=document.createElement("th");ua.style.width="25%";ua.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));na.appendChild(ua);ja.appendChild(na);
+aa.appendChild(ja)}for(na=0;na<ia.length;na++){ia[na].isExternal=!pa;var ka=ia[na].url,Ja=(ua=mxUtils.htmlEntities(pa?mxResources.get(ia[na].title,null,ia[na].title):ia[na].title))||ia[na].url,Ia=ia[na].imgUrl,Ra=mxUtils.htmlEntities(ia[na].changedBy||""),Sa="";ia[na].lastModifiedOn&&(Sa=b.timeSince(new Date(ia[na].lastModifiedOn)),null==Sa&&(Sa=mxResources.get("lessThanAMinute")),Sa=mxUtils.htmlEntities(mxResources.get("timeAgo",[Sa],"{1} ago")));Ia||(Ia=TEMPLATE_PATH+"/"+ka.substring(0,ka.length-
+4)+".png");ka=ba?50:15;null!=ua&&ua.length>ka&&(ua=ua.substring(0,ka)+"&hellip;");if(ba){var Ka=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"));ma||Ia.appendChild(Oa);Ja=document.createElement("span");Ja.className="geTempDlgDiagramTitle";Ja.innerHTML=ua;Ia.appendChild(Ja);Ka.appendChild(Ia);Ia=document.createElement("td");
+Ia.innerHTML=Ra;Ka.appendChild(Ia);Ia=document.createElement("td");Ia.innerHTML=Sa;Ka.appendChild(Ia);ja.appendChild(Ka);null==E&&(D(pa),M(Ka,"geTempDlgDiagramsListGridActive",ia[na]));(function(Ma,Ta,Ua){mxEvent.addListener(Ka,"click",function(){E!=Ta&&(D(pa),M(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(Ka,"dblclick",u);mxEvent.addListener(Oa,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ia[na],Ka,Oa)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
+Ja);null==E&&(D(pa),M(Pa,"geTempDlgDiagramTileActive",ia[na]));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!=ua?ua:"";Pa.appendChild(Ra);Oa=document.createElement("img");Oa.src="/images/icon-search.svg";Oa.className="geTempDlgDiagramPreviewBtn";Oa.setAttribute("title",mxResources.get("preview"));ma||Pa.appendChild(Oa);(function(Ma,Ta,Ua){mxEvent.addListener(Pa,"click",function(){E!=Ta&&(D(pa),M(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Pa,
+"dblclick",u);mxEvent.addListener(Oa,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ia[na],Pa,Oa);aa.appendChild(Pa)}}for(var Ya in ea)ia=ea[Ya],0<ia.length&&(ma=document.createElement("div"),ma.className="geTempDlgImportCat",ma.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ma),B(ia,pa,ba,null,!0))}function C(ia,pa){Ba.innerHTML="";M();var ba=Math.floor(Ba.offsetWidth/150)-1;pa=!pa&&ia.length>ba?ba:ia.length;for(var ea=0;ea<pa;ea++){var ma=ia[ea];ma.isCategory=!0;var ja=document.createElement("div"),
+na=mxResources.get(ma.title);null==na&&(na=ma.title.substring(0,1).toUpperCase()+ma.title.substring(1));ja.className="geTempDlgNewDiagramCatItem";ja.setAttribute("title",na);na=mxUtils.htmlEntities(na);15<na.length&&(na=na.substring(0,15)+"&hellip;");null==E&&(D(!0),M(ja,"geTempDlgNewDiagramCatItemActive",ma));var ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";var ka=document.createElement("img");ka.src=NEW_DIAGRAM_CATS_PATH+"/"+ma.img;ua.appendChild(ka);ja.appendChild(ua);
+ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=na;ja.appendChild(ua);Ba.appendChild(ja);(function(Ja,Ia){mxEvent.addListener(ja,"click",function(){E!=Ia&&(D(!0),M(Ia,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(ja,"dblclick",u)})(ma,ja)}ja=document.createElement("div");ja.className="geTempDlgNewDiagramCatItem";na=mxResources.get("showAllTemps");ja.setAttribute("title",na);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemImg";
+ua.innerHTML="...";ua.style.fontSize="32px";ja.appendChild(ua);ua=document.createElement("div");ua.className="geTempDlgNewDiagramCatItemLbl";ua.innerHTML=na;ja.appendChild(ua);Ba.appendChild(ja);mxEvent.addListener(ja,"click",function(){function Ja(){var Ra=Ia.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}Z=!0;var Ia=J.querySelector(".geTemplatesList");Ia.style.display="block";Ca.style.width="";Na.style.display="";Na.value="";ca=null;Ja()});ha.style.display=ia.length<=
+ba?"none":""}function G(ia,pa,ba){function ea(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 ma(Qa,Ya,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){X!=Ma&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(oa.style.display="none",Da.style.minHeight="100%"),
+X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",Ca.scrollTop=0,V&&(U=!0),ta.innerHTML=Ya,la.style.display="none",B(Ua?pa[Qa]:Ta?qa[Qa][Ta]:ia[Qa],Ua?!1:!0))})}var ja=J.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"));ja.appendChild(ba);for(var na in pa){ba=document.createElement("div");var ua=pa[na];
+ua=ea(na,ua);ba.className="geTemplateCatLink";ba.setAttribute("title",ua.fullLbl);ba.innerHTML=ua.lbl;ja.appendChild(ba);ma(na,ua.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");ja.appendChild(ba)}for(na in ia){var ka=qa[na],Ja=ba=document.createElement(ka?"ul":"div");ua=ia[na];ua=ea(na,ua);if(null!=ka){var Ia=document.createElement("li"),Ra=document.createElement("div");
+Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",ua.fullLbl);Ra.innerHTML=ua.lbl;Ja=Ra;Ia.appendChild(Ra);var Sa=document.createElement("ul");Sa.className="geTempTreeNested";Sa.style.visibility="hidden";for(var Ka in ka){var Oa=document.createElement("li"),Pa=ea(Ka,ka[Ka]);Oa.setAttribute("title",Pa.fullLbl);Oa.innerHTML=Pa.lbl;Oa.className="geTemplateCatLink";Oa.style.padding="0";Oa.style.margin="0";ma(na,Pa.lblOnly,Oa,Ka);Sa.appendChild(Oa)}Ia.appendChild(Sa);
+ba.className="geTempTree";ba.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 ba.className="geTemplateCatLink geTemplateDrawioCatLink",
+ba.setAttribute("title",ua.fullLbl),ba.innerHTML=ua.lbl;ja.appendChild(ba);ma(na,ua.lblOnly,Ja)}}function N(){mxUtils.get(c,function(ia){if(!La){La=!0;ia=ia.getXml().documentElement.firstChild;for(var pa={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var ba=ia.getAttribute("name"),ea=ia.getElementsByTagName("add"),ma=[],ja=0;ja<ea.length;ja++)ma.push(encodeURIComponent(mxUtils.getTextContent(ea[ja])));null!=ba&&0<ma.length&&(pa[ba]=ma.join(";"))}else if(ma=ia.getAttribute("url"),
+null!=ma){ea=ia.getAttribute("section");ba=ia.getAttribute("subsection");if(null==ea&&(ja=ma.indexOf("/"),ea=ma.substring(0,ja),null==ba)){var na=ma.indexOf("/",ja+1);-1<na&&(ba=ma.substring(ja+1,na))}ja=ya[ea];null==ja&&(xa++,ja=[],ya[ea]=ja);ma=ia.getAttribute("clibs");null!=pa[ma]&&(ma=pa[ma]);ma={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:ma,tags:ia.getAttribute("tags")};ja.push(ma);null!=
+ba&&(ja=qa[ea],null==ja&&(ja={},qa[ea]=ja),ea=ja[ba],null==ea&&(ea=[],ja[ba]=ea),ea.push(ma))}ia=ia.nextSibling}G(ya,fa,wa)}})}function I(ia){v&&(Ca.scrollTop=0,aa.innerHTML="",Fa.spin(aa),U=!1,V=!0,ta.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ca=null,v(sa,function(){z(mxResources.get("cannotLoad"));sa([])},ia?null:n))}function F(ia){if(""==ia)null!=t&&(t.click(),t=null);else{if(null==TemplatesDialog.tagsList[c]){var pa={};for(Ja in ya)for(var ba=ya[Ja],ea=0;ea<ba.length;ea++){var ma=
+ba[ea];if(null!=ma.tags)for(var ja=ma.tags.toLowerCase().split(";"),na=0;na<ja.length;na++)null==pa[ja[na]]&&(pa[ja[na]]=[]),pa[ja[na]].push(ma)}TemplatesDialog.tagsList[c]=pa}var ua=ia.toLowerCase().split(" ");pa=TemplatesDialog.tagsList[c];if(0<wa&&null==pa.__tagsList__){for(Ja in fa)for(ba=fa[Ja],ea=0;ea<ba.length;ea++)for(ma=ba[ea],ja=ma.title.split(" "),ja.push(Ja),na=0;na<ja.length;na++){var ka=ja[na].toLowerCase();null==pa[ka]&&(pa[ka]=[]);pa[ka].push(ma)}pa.__tagsList__=!0}var Ja=[];ba={};
+for(ea=ja=0;ea<ua.length;ea++)if(0<ua[ea].length){ka=pa[ua[ea]];var Ia={};Ja=[];if(null!=ka)for(na=0;na<ka.length;na++)ma=ka[na],0==ja==(null==ba[ma.url])&&(Ia[ma.url]=!0,Ja.push(ma));ba=Ia;ja++}0==Ja.length?ta.innerHTML=mxResources.get("noResultsFor",[ia]):B(Ja,!0)}}function H(ia){if(ca!=ia||P!=da)A(),Ca.scrollTop=0,aa.innerHTML="",ta.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',va=null,Z?F(ia):d&&(ia?(Fa.spin(aa),U=!1,V=!0,d(ia,sa,function(){z(mxResources.get("searchFailed"));
+sa([])},P?null:n)):I(P)),ca=ia,da=P}function R(ia){null!=va&&clearTimeout(va);13==ia.keyCode?H(Na.value):va=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>",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={};
+"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,K=null,T=!1,P=!0,Q=!1,S=[],Y=null,ca,da,Z=!1,ha=J.querySelector(".geTempDlgShowAllBtn"),aa=J.querySelector(".geTempDlgDiagramsTiles"),ta=J.querySelector(".geTempDlgDiagramsListTitle"),la=J.querySelector(".geTempDlgDiagramsListBtns"),Ca=J.querySelector(".geTempDlgContent"),Da=J.querySelector(".geTempDlgDiagramsList"),oa=J.querySelector(".geTempDlgNewDiagramCat"),
+Ba=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";Ca.style.width=
+"100%";oa.style.display="";Da.style.minHeight="calc(100% - 280px)";Na.style.display=d?"":"none";Na.value="";ca=null;I(P)});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==ca?I(P):H(ca))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==ca?I(P):H(ca))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Q=!0,B(S,!1,Q,Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Q=!1,B(S,!1,Q,Y))});
+var Ea=!1;mxEvent.addListener(ha,"click",function(){T?(oa.style.height="280px",Ba.style.height="190px",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),C(ra)):(oa.style.height="440px",Ba.style.height="355px",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),C(ra,!0));T=!T});var La=!1,za=!1,ya={},qa={},fa={},ra=[],xa=1,wa=0;null!=l?l(function(ia,pa){fa=ia;wa=pa;N()},N):N();mxUtils.get(m,function(ia){if(!za){za=!0;for(ia=ia.getXml().documentElement.firstChild;null!=ia;)"undefined"!==
+typeof ia.getAttribute&&null!=ia.getAttribute("title")&&ra.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;C(ra)}});var sa=function(ia,pa,ba){la.style.display="";Fa.stop();V=!1;if(U)U=!1;else if(pa)aa.innerHTML=pa;else{ba=ba||{};pa=0;for(var ea in ba)pa+=ba[ea].length;0==ia.length&&0==pa?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(ia,!1,Q,0==pa?null:ba)}};I(P);var va=null;mxEvent.addListener(Na,
+"keyup",R);mxEvent.addListener(Na,"search",R);mxEvent.addListener(Na,"input",R);mxEvent.addListener(Aa,"click",function(ia){u(!1,!1)});p&&mxEvent.addListener(Ha,"click",function(ia){u(!1,!0)});q&&mxEvent.addListener(J.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ia){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(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=
+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(M){this.style.border="";13==M.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=
"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",
@@ -11385,11 +11387,11 @@ null,"Google Fonts"));k.appendChild(p);mxClient.IS_CHROMEAPP||b.isOffline()&&!Ed
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};
+k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontUrl",null,"Font URL")+":");g.appendChild(k);var L=document.createElement("input");L.setAttribute("value",f||"");L.style.marginLeft="4px";L.style.width="250px";L.className="dlg_fontUrl";k=document.createElement("td");k.appendChild(L);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);this.init=function(){var M=q;"g"==c?M=y:"w"==c&&Editor.enableWebFonts&&(M=A);M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+M.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 M=q.value;var u="s"}else if(x.checked){M=y.value;var D=Editor.GOOGLE_FONTS+encodeURIComponent(M).replace(/%20/g,"+");u="g"}else z.checked&&(M=A.value,D=L.value,u="w");var B=D;var C=u,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==M||0==M.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(M,D,u),b.hideDialog())});O.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",n);mxEvent.addListener(y,"keypress",n);mxEvent.addListener(A,"keypress",n);mxEvent.addListener(L,"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(L,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});k.appendChild(O);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)};
@@ -11413,16 +11415,16 @@ C.value=F;var H=parseInt(N.value)||0;H=0>H?0:100<H?100:H;N.value=H;var R=parseIn
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 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=
+"-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 L=mxUtils.button("",function(){p.fit(8);p.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 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 M=mxUtils.button("",v);M.className="geSprite geSprite-delete";M.setAttribute("title",mxResources.get("delete"));M.style.position="relative";M.style.outline="none";M.style.border="none";M.style.margin="2px";M.style.float="right";M.style.cursor="pointer";mxUtils.setOpacity(M,10);l=document.createElement("div");l.appendChild(z);l.appendChild(A);l.appendChild(O);l.appendChild(L);l.appendChild(M);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++)L=A[z],O=document.createElement("option"),mxUtils.write(O,mxResources.get(L)),O.value=L,D.appendChild(O);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=
+mxUtils.write(B,"pt");c.appendChild(B);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(M,60):mxUtils.setOpacity(M,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"},
+null,[e]);f();b.hideDialog()});A.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(l),L.appendChild(A),L.appendChild(z)):(L.appendChild(A),L.appendChild(z),L.appendChild(l));c.appendChild(L)};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"},
@@ -11465,94 +11467,94 @@ E){t=E.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.lengt
{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(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(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,
+{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 K=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;E=E.editorUi.editor.graph;return null!=K&&(E.isContainer(K)&&
+"0"!=t.style.collapsible||!E.isContainer(K)&&"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",
+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 K=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==K||K==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=
+Editor.createRoughCanvas=function(t){var E=rough.canvas({getContext:function(){return t}});E.draw=function(K){var T=K.sets||[];K=K.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var Q=T[P];switch(Q.type){case "path":null!=K.stroke&&this._drawToContext(t,Q,K);break;case "fillPath":this._drawToContext(t,Q,K);break;case "fillSketch":this.fillSketch(t,Q,K)}}};E.fillSketch=function(K,T,P){var Q=t.state.strokeColor,S=t.state.strokeWidth,Y=t.state.strokeAlpha,ca=t.state.dashed,da=P.fillWeight;
+0>da&&(da=P.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(P.fill||"");t.setStrokeWidth(da);t.setDashed(!1);this._drawToContext(K,T,P);t.setDashed(ca);t.setStrokeWidth(S);t.setStrokeColor(Q);t.setStrokeAlpha(Y)};E._drawToContext=function(K,T,P){K.begin();for(var Q=0;Q<T.ops.length;Q++){var S=T.ops[Q],Y=S.data;switch(S.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&&P.filled?K.fill():K.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.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 ca=this.shape.state.cell.id;if(null!=ca)for(var da=0;da<ca.length;da++)Y=(Y<<5)-Y+ca.charCodeAt(da)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ca=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",ca.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ca.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ca.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",ca.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ca.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ca.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ca.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":ca.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!=
+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,ca){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
+S,Y,ca),this.lastX=Y,this.lastY=ca)};t.prototype.curveTo=function(Q,S,Y,ca,da,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,Y,ca,da,Z),this.lastX=da,this.lastY=Z)};t.prototype.arcTo=function(Q,S,Y,ca,da,Z,ha){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,Y,ca,da,Z,ha);if(null!=aa)for(var ta=0;ta<aa.length;ta+=6)this.curveTo(aa[ta],aa[ta+1],aa[ta+2],aa[ta+3],aa[ta+4],
+aa[ta+5]);this.lastX=Z;this.lastY=ha}};t.prototype.rect=function(Q,S,Y,ca){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,Y,ca,this.getStyle(!0,!0)))};t.prototype.ellipse=function(Q,S,Y,ca){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+Y/2,S+ca/2,Y,ca,this.getStyle(!0,!0)))};t.prototype.roundrect=function(Q,S,Y,ca,da,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(Q+da,S),this.lineTo(Q+Y-da,S),this.quadTo(Q+Y,S,Q+Y,S+Z),this.lineTo(Q+Y,S+ca-Z),this.quadTo(Q+Y,S+ca,Q+Y-da,S+ca),this.lineTo(Q+da,S+ca),this.quadTo(Q,S+ca,Q,S+ca-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+da,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=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=
+"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,Y,ca,da){null!=Q.handJiggle&&Q.handJiggle.passThrough||K.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 ca=this.fill,da=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ha=Q.setStrokeColor;Q.setStrokeColor=function(){};var aa=Q.setFillColor;Q.setFillColor=function(){};Y||null==ca||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;T.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=aa;Q.setStrokeColor=ha;this.configurePointerEvents=Z;this.stroke=da;this.fill=ca;Q.restore();Y&&null!=ca&&(Q.addTolerance=function(){})}T.apply(this,arguments);
+Q.addTolerance=S};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,Y,ca,da,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==t?(Q.handJiggle.passThrough=!0,P.apply(this,arguments),Q.handJiggle.passThrough=!1):P.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,K){if(null!=t&&"undefined"!==typeof pako){var T=t.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){P.push(T[Q]);break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(t=mxUtils.parseXml(P.xml),t=t.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&
+(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,K),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||(P=null,"diagram"==t.nodeName?P=t:"mxfile"==
+t.nodeName&&(T=t.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(t=Editor.parseDiagramNode(P,K)));null==t||"mxGraphModel"==t.nodeName||E&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,E){var K=mxUtils.trim(mxUtils.getTextContent(t)),T=null;0<K.length?(t=Graph.decompress(K,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),K=null;0<E.length?K=Graph.decompress(E):null!=t.firstChild&&(K=mxUtils.getXml(t.firstChild));return K};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 K=t.indexOf("stream",E)+9;if(0<t.substring(E,K).indexOf("application#2Fvnd.jgraph.mxfile"))return E=
+t.indexOf("endstream",K-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(K,E)),{to:"string"})}return null}K=null;E="";for(var T=0,P=0,Q=[],S=null;P<t.length;){var Y=t.charCodeAt(P);P+=1;10!=Y&&(E+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ca=t.indexOf("%3C%2Fmxfile%3E)",P)+15;P-=9;if(ca>P){K=t.substring(P,ca);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==K&&(K=Editor.extractGraphModelFromXref(Q));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(t){var E=t.trailer,K=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"),K=t.substring(1,t.length-1))))));return K};Editor.extractParserError=function(t,E){var K=
+null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(K=E||mxResources.get("invalidChars"),E=t[0].getElementsByTagName("div"),0<E.length&&(K=mxUtils.getTextContent(E[0])));return null!=K?mxUtils.trim(K):K};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=
+null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(t.css));var T=document.getElementsByTagName("script")[0];T.parentNode.insertBefore(K,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!=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&&(K=parseFloat(t.zoomFactor),!isNaN(K)&&1<K?Graph.prototype.zoomFactor=K:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(K=parseInt(t.gridSteps),!isNaN(K)&&0<K?mxGraphView.prototype.gridSteps=K:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=t.pageFormat&&(K=parseInt(t.pageFormat.width),T=parseInt(t.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"));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&&(K=parseInt(t.sidebarTitleSize),!isNaN(K)&&0<K?Sidebar.prototype.sidebarTitleSize=K: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&&(K=parseInt(t.autosaveDelay),!isNaN(K)&&0<K?DrawioFile.prototype.autosaveDelay=K: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 K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(t));E.parentNode.insertBefore(K,E);t=t.split("url(");for(K=1;K<t.length;K++){var T=t[K].indexOf(")");T=Editor.trimCssUrl(t[K].substring(0,T));var P=
+document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");E.parentNode.insertBefore(P,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=[],K=0;K<t;K++)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&&(K=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".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=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(P){P=P.split("^");return{name:P[0],url:P[1]}}),K=0;K<E.length;K++)this.graph.addExtFont(E[K].name,E[K].url)}catch(P){console.log("ExtFonts format error: "+
+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,E){t=null!=t?t:!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,
+E);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(P){return P.name+"^"+P.url}),K.setAttribute("extFonts",T.join("|")));return K};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 K=mxUtils.parseXml(E).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(t,E,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=
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(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);
+[];Editor.doMathJaxRender=function(S){window.setTimeout(function(){"hidden"!=S.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,S])},0)};var K=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";E=null!=E?E:{"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(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,
+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 P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",t);K[0].parentNode.appendChild(P)}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(K,T,P,Q){void 0!==T?E.push(T.replace(/\\'/g,"'")):void 0!==P?E.push(P.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!=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;
+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,K=this;t.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,t.baseUrl.length)==t.baseUrl||K.crossOriginImages&&K.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 K=!0,T=window.setTimeout(mxUtils.bind(this,function(){K=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(Q){window.clearTimeout(T);K&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
+K&&E(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(T);if(K)try{var Q=document.createElement("canvas"),S=Q.getContext("2d");Q.height=P.height;Q.width=P.width;S.drawImage(P,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(T);K&&E(Editor.svgBrokenImage.src)};P.src=t}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,E,K,
+T){null==T&&(T=this.createImageUrlConverter());var P=0,Q=K||{};K=mxUtils.bind(this,function(S,Y){S=t.getElementsByTagName(S);for(var ca=0;ca<S.length;ca++)mxUtils.bind(this,function(da){try{if(null!=da){var Z=T.convert(da.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var ha=Q[Z];null==ha?(P++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(Q[Z]=aa,da.setAttribute(Y,aa));P--;0==P&&E(t)})):da.setAttribute(Y,ha)}else null!=Z&&da.setAttribute(Y,Z)}}catch(aa){}})(S[ca])});K("image","xlink:href");
+K("img","src");0==P&&E(t)};Editor.base64Encode=function(t){for(var E="",K=0,T=t.length,P,Q,S;K<T;){P=t.charCodeAt(K++)&255;if(K==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);E+="==";break}Q=t.charCodeAt(K++);if(K==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4|(Q&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);E+="=";break}S=t.charCodeAt(K++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&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,K,T,P,Q,S,Y){try{var ca=!S&&(T||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));P=null!=P?P:!0;var da=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=E){var ha=Z.getText();if(ca){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+ha=Array(Z.length);for(var aa=0;aa<Z.length;aa++)ha[aa]=String.fromCharCode(Z[aa]);ha=ha.join("")}Q=null!=Q?Q:"data:image/png;base64,";ha=Q+Editor.base64Encode(ha)}E(ha)}}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()})},ca,this.timeout,function(){P&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:da})},Y)});da()}catch(Z){null!=K&&K(Z)}};
+Editor.prototype.absoluteCssFonts=function(t){var E=null;if(null!=t){var K=t.split("url(");if(0<K.length){E=[K[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 P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var Q=1;Q<K.length;Q++)if(T=K[Q].indexOf(")"),0<T){var S=Editor.trimCssUrl(K[Q].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=P?P+S:window.location.protocol+"//"+window.location.hostname+
+("/"==S.charAt(0)?"":t)+S);E.push('url("'+S+'"'+K[Q].substring(T))}else E.push(K[Q])}else E=[t]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(t,E,K){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));K(t,E)};Editor.prototype.embedCssFonts=function(t,E){var K=t.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==T){for(var ca=[K[0]],da=1;da<K.length;da++){var Z=K[da].indexOf(")");
+ca.push('url("');ca.push(this.cachedFonts[Editor.trimCssUrl(K[da].substring(0,Z))]);ca.push('"'+K[da].substring(Z))}E(ca.join(""))}});if(0<K.length){for(t=1;t<K.length;t++){var Q=K[t].indexOf(")"),S=null,Y=K[t].indexOf("format(",Q);0<Y&&(S=Editor.trimCssUrl(K[t].substring(Y+7,K[t].indexOf(")",Y))));mxUtils.bind(this,function(ca){if(null==this.cachedFonts[ca]){this.cachedFonts[ca]=ca;T++;var da="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(ca))da="image/svg+xml";else if("otf"==S||"embedded-opentype"==
+S||/(\.otf)($|\?)/i.test(ca))da="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(ca))da="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(ca))da="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(ca))da="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(ca))da="application/font-sfnt";this.mapFontUrl(da,ca,mxUtils.bind(this,function(Z,ha){this.loadUrl(ha,mxUtils.bind(this,function(aa){this.cachedFonts[ca]=aa;T--;P()}),mxUtils.bind(this,
+function(aa){T--;P()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[t].substring(0,Q)),S)}P()}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 K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.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(ca){this.cachedGoogleFonts[Y]=ca;K.push(ca+"\n");T--;P()}),mxUtils.bind(this,function(ca){T--;K.push("@import url("+
+Y+");\n");P()}))):K.push(this.cachedGoogleFonts[Y]+"\n"):K.push('@font-face {font-family: "'+S+'";src: url("'+Y+'")}\n')})(E[Q].name,E[Q].url);P()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var E=document.getElementsByTagName("style"),K=0;K<E.length;K++){var T=mxUtils.getTextContent(E[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&t[0].appendChild(E[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,E){E=null!=
+E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var K=t.getElementsByTagName("defs"),T=t.ownerDocument;0==K.length?(K=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=t.firstChild?t.insertBefore(K,t.firstChild):t.appendChild(K)):K=K[0];t=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,E);K.appendChild(t)}};Editor.prototype.isExportToCanvas=
+function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,E,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/t,T/E))};Editor.prototype.exportToCanvas=function(t,E,K,T,P,Q,S,Y,ca,da,Z,ha,aa,ta,la,Ca,Da,oa){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;ha=null!=ha?ha:this.graph;aa=null!=aa?aa:0;var Ba=ca?null:ha.background;Ba==mxConstants.NONE&&(Ba=null);null==Ba&&(Ba=T);null==Ba&&0==ca&&(Ba=Ca?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(ha.getSvg(null,null,aa,ta,null,S,null,null,null,da,null,Ca,Da,oa),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!=Ba&&(za.beginPath(),za.rect(0,0,Ea,La),za.fillStyle=Ba,za.fill());1!=Y&&za.scale(Y,Y);if(la){var ya=ha.view,qa=ya.scale;ya.scale=1;var fa=btoa(unescape(encodeURIComponent(ya.createSvgGrid(ya.gridColor))));ya.scale=qa;fa="data:image/svg+xml;base64,"+fa;var ra=ha.gridSize*ya.gridSteps*Y,xa=ha.getGraphBounds(),wa=ya.translate.x*qa,sa=ya.translate.y*qa,va=wa+(xa.x-wa)/
+qa-aa,ia=sa+(xa.y-sa)/qa-aa,pa=new Image;pa.onload=function(){try{for(var ba=-Math.round(ra-mxUtils.mod((wa-va)*Y,ra)),ea=-Math.round(ra-mxUtils.mod((sa-ia)*Y,ra));ba<Ea;ba+=ra)for(var ma=ea;ma<La;ma+=ra)za.drawImage(pa,ba/Y,ma/Y);Ga()}catch(ja){null!=P&&P(ja)}};pa.onerror=function(ba){null!=P&&P(ba)};pa.src=fa}else Ga()}catch(ba){null!=P&&P(ba)}});Ha.onerror=function(Ga){null!=P&&P(Ga)};da&&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!=P&&P(Ga)}});this.embedExtFonts(mxUtils.bind(this,function(Ga){try{null!=Ga&&this.addFontCss(Aa,Ga),this.loadFonts(Na)}catch(Fa){null!=P&&P(Fa)}}))}catch(Ga){null!=P&&P(Ga)}}),K,Z)}catch(Aa){null!=P&&P(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,K,T){for(var P=
+0;P<T;P++)t=Editor.crcTable[(t^E.charCodeAt(K+P))&255]^t>>>8;return t};Editor.crc32=function(t){for(var E=-1,K=0;K<t.length;K++)E=E>>>8^Editor.crcTable[(E^t.charCodeAt(K))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(t,E,K,T,P){function Q(Z,ha){var aa=ca;ca+=ha;return Z.substring(aa,ca)}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 ca=0;if(Q(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(Q(t,4),"IHDR"!=Q(t,4))null!=P&&P();else{Q(t,17);P=t.substring(0,ca);do{var da=S(t);if("IDAT"==Q(t,4)){P=t.substring(0,ca-8);"pHYs"==E&&"dpi"==K?(K=Math.round(T/.0254),K=Y(K)+Y(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,E,0,4);T=Editor.updateCRC(T,K,0,K.length);P+=Y(K.length)+
+E+K+Y(T^4294967295);P+=t.substring(ca-8,t.length);break}P+=t.substring(ca-8,ca-4+da);Q(t,da);Q(t,4)}while(da);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 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 K=null;null!=t.editor.graph.getModel().getParent(E)?K=E.getId():null!=t.currentPage&&(K=t.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 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},
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,K=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(P){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=P;K.model.execute(Q)},{install:function(P){this.listener=function(){P(K.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,K=E.editor.graph;if(K.isEnabled()){var T=E.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var P=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(P)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(S){E.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
+function(){S(K.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});P.style.paddingTop="5px";t.appendChild(P);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";P.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",
@@ -11575,93 +11577,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(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 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");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");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";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&&(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"),
+function(t,E,K){if(null!=E){var T=function(Q){if(null!=Q)if(K)for(var S=0;S<Q.length;S++)E[Q[S].name]=Q[S];else for(var Y in E){var ca=!1;for(S=0;S<Q.length;S++)if(Q[S].name==Y&&Q[S].type==E[Y].type){ca=!0;break}ca||delete E[Y]}},P=this.editorUi.editor.graph.view.getState(t);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));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=
+{},K=t.vertices,T=t.edges,P=0;P<K.length;P++)this.findCommonProperties(K[P],E,0==P);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],E,0==K.length&&0==P);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,K){function T(za,ya,qa,fa){ha.getModel().beginUpdate();try{var ra=[],xa=[];if(null!=qa.index){for(var wa=[],sa=qa.parentRow.nextSibling;sa&&sa.getAttribute("data-pName")==za;)wa.push(sa.getAttribute("data-pValue")),sa=sa.nextSibling;qa.index<wa.length?null!=fa?wa.splice(fa,1):wa[qa.index]=ya:wa.push(ya);null!=qa.size&&wa.length>qa.size&&(wa=wa.slice(0,qa.size));ya=wa.join(",");null!=qa.countProperty&&(ha.setCellStyles(qa.countProperty,wa.length,
+ha.getSelectionCells()),ra.push(qa.countProperty),xa.push(wa.length))}ha.setCellStyles(za,ya,ha.getSelectionCells());ra.push(za);xa.push(ya);if(null!=qa.dependentProps)for(za=0;za<qa.dependentProps.length;za++){var va=qa.dependentPropsDefVal[za],ia=qa.dependentPropsVals[za];if(ia.length>ya)ia=ia.slice(0,ya);else for(var pa=ia.length;pa<ya;pa++)ia.push(va);ia=ia.join(",");ha.setCellStyles(qa.dependentProps[za],ia,ha.getSelectionCells());ra.push(qa.dependentProps[za]);xa.push(ia)}if("function"==typeof qa.onChange)qa.onChange(ha,
+ya);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",xa,"cells",ha.getSelectionCells()))}finally{ha.getModel().endUpdate()}}function P(za,ya,qa){var fa=mxUtils.getOffset(t,!0),ra=mxUtils.getOffset(za,!0);ya.style.position="absolute";ya.style.left=ra.x-fa.x+"px";ya.style.top=ra.y-fa.y+"px";ya.style.width=za.offsetWidth+"px";ya.style.height=za.offsetHeight-(qa?4:0)+"px";ya.style.zIndex=5}function Q(za,ya,qa){var fa=document.createElement("div");fa.style.width="32px";fa.style.height=
+"4px";fa.style.margin="2px";fa.style.border="1px solid black";fa.style.background=ya&&"none"!=ya?ya:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ra){this.editorUi.pickColor(ya,function(xa){fa.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;T(za,xa,qa)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(fa);return btn}function S(za,ya,qa,fa,ra,xa,wa){null!=ya&&(ya=ya.split(","),
+aa.push({name:za,values:ya,type:qa,defVal:fa,countProperty:ra,parentRow:xa,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(sa){for(var va=xa,ia=0;null!=va.nextSibling;)if(va.nextSibling.getAttribute("data-pName")==za)va=va.nextSibling,ia++;else break;var pa={type:qa,parentRow:xa,index:ia,isDeletable:!0,defVal:fa,countProperty:ra};ia=da(za,"",pa,0==ia%2,wa);T(za,fa,pa);va.parentNode.insertBefore(ia,va.nextSibling);mxEvent.consume(sa)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function Y(za,ya,qa,fa,ra,xa,wa){if(0<ra){var sa=Array(ra);ya=null!=ya?ya.split(","):[];for(var va=0;va<ra;va++)sa[va]=null!=ya[va]?ya[va]:null!=fa?fa:"";aa.push({name:za,values:sa,type:qa,defVal:fa,parentRow:xa,flipBkg:wa,size:ra})}return document.createElement("div")}function ca(za,ya,qa){var fa=document.createElement("input");fa.type="checkbox";fa.checked="1"==ya;mxEvent.addListener(fa,"change",function(){T(za,fa.checked?"1":"0",qa)});return fa}function da(za,
+ya,qa,fa,ra){var xa=qa.dispName,wa=qa.type,sa=document.createElement("tr");sa.className="gePropRow"+(ra?"Dark":"")+(fa?"Alt":"")+" gePropNonHeaderRow";sa.setAttribute("data-pName",za);sa.setAttribute("data-pValue",ya);fa=!1;null!=qa.index&&(sa.setAttribute("data-index",qa.index),xa=(null!=xa?xa:"")+"["+qa.index+"]",fa=!0);var va=document.createElement("td");va.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(va,xa);va.setAttribute("title",xa);fa&&(va.style.textAlign="right");
+sa.appendChild(va);va=document.createElement("td");va.className="gePropRowCell";if("color"==wa)va.appendChild(Q(za,ya,qa));else if("bool"==wa||"boolean"==wa)va.appendChild(ca(za,ya,qa));else if("enum"==wa){var ia=qa.enumList;for(ra=0;ra<ia.length;ra++)if(xa=ia[ra],xa.val==ya){mxUtils.write(va,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){var pa=document.createElement("select");P(va,pa);for(var ba=0;ba<ia.length;ba++){var ea=ia[ba],ma=
+document.createElement("option");ma.value=mxUtils.htmlEntities(ea.val);mxUtils.write(ma,mxResources.get(ea.dispName,null,ea.dispName));pa.appendChild(ma)}pa.value=ya;t.appendChild(pa);mxEvent.addListener(pa,"change",function(){var ja=mxUtils.htmlEntities(pa.value);T(za,ja,qa)});pa.focus();mxEvent.addListener(pa,"blur",function(){t.removeChild(pa)})}))}else"dynamicArr"==wa?va.appendChild(S(za,ya,qa.subType,qa.subDefVal,qa.countProperty,sa,ra)):"staticArr"==wa?va.appendChild(Y(za,ya,qa.subType,qa.subDefVal,
+qa.size,sa,ra)):"readOnly"==wa?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ya,ra.style.width="96px",ra.style.borderWidth="0px",va.appendChild(ra)):(va.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ya)),mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){function pa(){var ea=ba.value;ea=0==ea.length&&"string"!=wa?0:ea;qa.allowAuto&&(null!=ea.trim&&"auto"==ea.trim().toLowerCase()?(ea="auto",wa="string"):(ea=parseFloat(ea),ea=isNaN(ea)?0:ea));null!=qa.min&&ea<
+qa.min?ea=qa.min:null!=qa.max&&ea>qa.max&&(ea=qa.max);ea=encodeURIComponent(("int"==wa?parseInt(ea):ea)+"");T(za,ea,qa)}var ba=document.createElement("input");P(va,ba,!0);ba.value=decodeURIComponent(ya);ba.className="gePropEditor";"int"!=wa&&"float"!=wa||qa.allowAuto||(ba.type="number",ba.step="int"==wa?"1":"any",null!=qa.min&&(ba.min=parseFloat(qa.min)),null!=qa.max&&(ba.max=parseFloat(qa.max)));t.appendChild(ba);mxEvent.addListener(ba,"keypress",function(ea){13==ea.keyCode&&pa()});ba.focus();mxEvent.addListener(ba,
+"blur",function(){pa()})})));qa.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(Z,function(pa){T(za,"",qa,qa.index);mxEvent.consume(pa)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",va.appendChild(ra));sa.appendChild(va);return sa}var Z=this,ha=this.editorUi.editor.graph,aa=[];t.style.position="relative";t.style.padding="0";var ta=document.createElement("table");ta.className="geProperties";ta.style.whiteSpace="nowrap";ta.style.width="100%";var la=
+document.createElement("tr");la.className="gePropHeader";var Ca=document.createElement("th");Ca.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ca.appendChild(Da);mxUtils.write(Ca,mxResources.get("property"));la.style.cursor="pointer";var oa=function(){var za=ta.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ya="none";for(var qa=t.childNodes.length-
+1;0<=qa;qa--)try{var fa=t.childNodes[qa],ra=fa.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||t.removeChild(fa)}catch(xa){}}else Da.src=Sidebar.prototype.expandedImage,ya="";for(qa=0;qa<za.length;qa++)za[qa].style.display=ya};mxEvent.addListener(la,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;oa()});la.appendChild(Ca);Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.innerHTML=mxResources.get("value");la.appendChild(Ca);ta.appendChild(la);var Ba=
+!1,Aa=!1;la=null;1==K.vertices.length&&0==K.edges.length?la=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(la=K.edges[0].id);null!=la&&ta.appendChild(da("id",mxUtils.htmlEntities(la),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ha in E)if(la=E[Ha],"function"!=typeof la.isVisible||la.isVisible(K,this)){var Na=null!=K.style[Ha]?mxUtils.htmlEntities(K.style[Ha]+""):null!=la.getDefaultValue?la.getDefaultValue(K,this):la.defVal;if("separator"==la.type)Aa=!Aa;else{if("staticArr"==la.type)la.size=
+parseInt(K.style[la.sizeProperty]||E[la.sizeProperty].defVal)||0;else if(null!=la.dependentProps){var Ga=la.dependentProps,Fa=[],Ea=[];for(Ca=0;Ca<Ga.length;Ca++){var La=K.style[Ga[Ca]];Ea.push(E[Ga[Ca]].subDefVal);Fa.push(null!=La?La.split(","):[])}la.dependentPropsDefVal=Ea;la.dependentPropsVals=Fa}ta.appendChild(da(Ha,Na,la,Ba,Aa));Ba=!Ba}}for(Ca=0;Ca<aa.length;Ca++)for(la=aa[Ca],E=la.parentRow,K=0;K<la.values.length;K++)Ha=da(la.name,la.values[K],{type:la.type,parentRow:la.parentRow,isDeletable:la.isDeletable,
+index:K,defVal:la.defVal,countProperty:la.countProperty,size:la.size},0==K%2,la.flipBkg),E.parentNode.insertBefore(Ha,E.nextSibling),E=Ha;t.appendChild(ta);oa();return t};StyleFormatPanel.prototype.addStyles=function(t){function E(la){mxEvent.addListener(la,"mouseenter",function(){la.style.opacity="1"});mxEvent.addListener(la,"mouseleave",function(){la.style.opacity="0.5"})}var K=this.editorUi,T=K.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";
+P.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(P);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=[],ca=0;ca<this.defaultColorSchemes.length;ca++){var da=
+document.createElement("div");da.style.display="inline-block";da.style.width="6px";da.style.height="6px";da.style.marginLeft="4px";da.style.marginRight="3px";da.style.borderRadius="3px";da.style.cursor="pointer";da.style.background="transparent";da.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(la){mxEvent.addListener(da,"click",mxUtils.bind(this,function(){Z(la)}))})(ca);Y.push(da);S.appendChild(da)}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,ha(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),ha=mxUtils.bind(this,function(la){var Ca=mxUtils.bind(this,function(oa){var Ba=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]),
+La=0;La<Q.length;La++)Ea=mxUtils.removeStylename(Ea,Q[La]);var za=T.getModel().isVertex(Ga[Fa])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=oa?(mxEvent.isShiftDown(Na)||(Ea=""==oa.fill?mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,oa.fill||mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,null)),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,oa.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,oa.font||mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(Ea=""==oa.stroke?mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,oa.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()}}));Ba.className="geStyleButton";Ba.style.width="36px";
+Ba.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ba.style.margin="0px 6px 6px 0px";if(null!=oa){var Aa="1"==urlParams.sketch?"2px solid":"1px solid";null!=oa.gradient?mxClient.IS_IE&&10>document.documentMode?Ba.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+oa.fill+"', EndColorStr='"+oa.gradient+"', GradientType=0)":Ba.style.backgroundImage="linear-gradient("+oa.fill+" 0px,"+oa.gradient+" 100%)":oa.fill==mxConstants.NONE?Ba.style.background="url('"+Dialog.prototype.noColorImage+
+"')":Ba.style.backgroundColor=""==oa.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):oa.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ba.style.border=oa.stroke==mxConstants.NONE?Aa+" transparent":""==oa.stroke?Aa+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Aa+" "+(oa.stroke||mxUtils.getValue(T.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=oa.title&&Ba.setAttribute("title",oa.title)}else{Aa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ha=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ba.style.backgroundColor=Aa;Ba.style.border="1px solid "+Ha}Ba.style.borderRadius="0";P.appendChild(Ba)});P.innerHTML="";for(var Da=0;Da<la.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(P),Ca(la[Da])});
+null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);ca=10>=this.defaultColorSchemes.length?28:8;var aa=document.createElement("div");aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ca+"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 ta=document.createElement("div");ta.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ca+"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&&(t.appendChild(aa),t.appendChild(ta));mxEvent.addListener(ta,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(aa);E(ta);ha(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var E=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,T=null;1==E.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",t.appendChild(T));K=1==E.cells.length?K.view.getState(E.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(P){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(P){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;
+E){var K=Graph.fontMapping[E];null==K&&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==K&&(K='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+E+'");\n}'),t=document.createElement("style"),mxUtils.write(t,K));return t};Graph.addFont=function(t,E,K){if(null!=t&&0<t.length&&null!=E&&0<E.length){var T=t.toLowerCase();if("helvetica"!=T&&"arial"!=t&&"sans-serif"!=
+T){var P=Graph.customFontElements[T];null!=P&&P.url!=E&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=E,"http:"==E.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(E)),P={name:t,url:E,elt:Graph.createFontElement(t,P)},Graph.customFontElements[T]=P,Graph.recentCustomFonts[T]=P,E=document.getElementsByTagName("head")[0],null!=K&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=K,P.elt.onerror=K):K()),null!=E&&E.appendChild(P.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
+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 K=t[E].getAttribute("data-font-src");if(null!=K){var T="FONT"==t[E].nodeName?t[E].getAttribute("face"):t[E].style.fontFamily;null!=T&&Graph.addFont(T,K)}}};Graph.processFontStyle=function(t){if(null!=t){var E=mxUtils.getValue(t,"fontSource",null);if(null!=E){var K=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
+null);null!=K&&Graph.addFont(K,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(P){E=P}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(P){E=null});this.isMouseInsertPoint=function(){return null!=E};var K=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):K.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var Q=this.graph.getCellStyle(P);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 L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,E,K,T,P,Q,S,Y,ca,da,Z){L.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(t,E,K){function T(){for(var la=S.getSelectionCells(),Ca=[],Da=0;Da<la.length;Da++)S.isCellVisible(la[Da])&&Ca.push(la[Da]);S.setSelectionCells(Ca)}function P(la){S.hiddenTags=la?[]:Y.slice();T();S.refresh()}function Q(la,Ca){da.innerHTML="";if(0<la.length){var Da=document.createElement("table");
+Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var oa=document.createElement("tbody");if(null!=la&&0<la.length)for(var Ba=0;Ba<la.length;Ba++)(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)?P(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)){P(!0);var za=S.getCellsForTags([Aa],null,null,!0);S.isEnabled()?S.setSelectionCells(za):S.highlightCells(za)}else if(Ha&&
+0<S.hiddenTags.length)P(!0);else{za=Y.slice();var ya=mxUtils.indexOf(za,Aa);za.splice(ya,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==Ca){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!=Ca&&0<=mxUtils.indexOf(Ca,
+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)}oa.appendChild(Na)})(la[Ba]);Da.appendChild(oa);da.appendChild(Da)}}var S=this,Y=S.hiddenTags.slice(),ca=document.createElement("div");ca.style.userSelect=
+"none";ca.style.overflow="hidden";ca.style.padding="10px";ca.style.height="100%";var da=document.createElement("div");da.style.boxSizing="border-box";da.style.borderRadius="4px";da.style.userSelect="none";da.style.overflow="auto";da.style.position="absolute";da.style.left="10px";da.style.right="10px";da.style.top="10px";da.style.border=S.isEnabled()?"1px solid #808080":"none";da.style.bottom=S.isEnabled()?"48px":"10px";ca.appendChild(da);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 ha=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(Y,function(la){Y=la;aa()})});ha.setAttribute("title",mxResources.get("add"));ha.className="geBtn";ha.style.margin="0";S.addListener(mxEvent.ROOT,function(){Y=S.hiddenTags.slice()});var aa=mxUtils.bind(this,function(la,Ca){if(t()){la=S.getAllTags();for(Ca=0;Ca<la.length;Ca++)0>
+mxUtils.indexOf(Y,la[Ca])&&Y.push(la[Ca]);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 ta=document.createElement("div");ta.style.boxSizing="border-box";ta.style.whiteSpace="nowrap";ta.style.position="absolute";ta.style.overflow="hidden";ta.style.bottom="0px";ta.style.height="42px";ta.style.right="10px";ta.style.left="10px";S.isEnabled()&&
+(ta.appendChild(Z),ta.appendChild(ha),ca.appendChild(ta));return{div:ca,refresh:aa}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var E in Graph.customFontElements){var K=Graph.customFontElements[E];t.push({name:K.name,url:K.url})}return t};Graph.prototype.setFont=function(t,E){Graph.addFont(t,E);document.execCommand("fontname",!1,t);if(null!=E){var K=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(t,E);for(var T=0;T<K.length;T++)K[T].getAttribute("face")==
+t&&K[T].getAttribute("data-font-src")!=E&&K[T].setAttribute("data-font-src",E)}};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.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(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 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,K,T,P,Q,S,Y,ca,da,Z,ha,aa,ta){var la=null,Ca=null,Da=null;ha||null==this.themes||"darkTheme"!=this.defaultThemeName||(la=this.stylesheet,Ca=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 oa=D.apply(this,arguments),Ba=this.getCustomFonts();if(Z&&0<Ba.length){var Aa=oa.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<Ba.length;Fa++){var Ea=Ba[Fa].name,La=Ba[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));oa.getElementsByTagName("defs")[0].appendChild(Ha)}null!=la&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ca,this.stylesheet=la,this.refresh());return oa};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(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 P=K.text.getContentNode();if(null!=P){P=P.cloneNode(!0);if(P.getElementsByTagNameNS)for(var Q=P.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=P.innerHTML&&(Q=K.text.value,K.text.value=P.innerHTML,E.apply(this,arguments),K.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||
+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 K=t.view.scale,T=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*K,t.y+4*K,0,0):mxRectangle.fromPoint(t.view.getPoint(t));E.bounds.equals(t)&&E.value==T&&E.scale==K||(E.bounds=
+t,E.value=T,E.scale=K,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&&
+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 K=!1,T=0,P=0,Q=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){K&&(K=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&ca()}),ca=mxUtils.bind(this,function(){if(P<t.length){var da=this.stoppingCustomActions,Z=t[P++],ha=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||da||(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,da?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,da?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ha=ha.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+!0),!0)));null!=Z.wipeOut&&(ha=ha.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():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",
+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 ta=this.getAllTags(),la=0;la<ta.length;la++)0>mxUtils.indexOf(Z.tags.visible,ta[la])&&0>mxUtils.indexOf(aa,ta[la])&&aa.push(ta[la]);this.hiddenTags=aa;this.refresh()}0<ha.length&&(T++,this.executeAnimations(ha,Y,da?1:Z.steps,da?0:Z.delay));
+0==T?ca():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=E&&E()});ca()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,E){var K=this.getLinkForCell(E);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(t,K));if(this.isHtmlLabel(E)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var P=T.getElementsByTagName("a"),Q=!1,S=0;S<P.length;S++)K=P[S].getAttribute("href"),null!=K&&"data:action/json,"==
+K.substring(0,17)&&(P[S].setAttribute("href",this.updateCustomLink(t,K)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(t,E){if("data:action/json,"==E.substring(0,17))try{var K=JSON.parse(E.substring(17));null!=K.actions&&(this.updateCustomLinkActions(t,K.actions),E="data:action/json,"+JSON.stringify(K))}catch(T){}return E};Graph.prototype.updateCustomLinkActions=function(t,E){for(var K=0;K<E.length;K++){var T=E[K],P;for(P in T)this.updateCustomLinkAction(t,
+T[P],"cells"),this.updateCustomLinkAction(t,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,E,K){if(null!=E&&null!=E[K]){for(var T=[],P=0;P<E[K].length;P++)if("*"==E[K][P])T.push(E[K][P]);else{var Q=t[E[K][P]];null!=Q?""!=Q&&T.push(Q):T.push(E[K][P])}E[K]=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 K=[],T=0;T<E.length;T++)0>t.excludeCells.indexOf(E[T].id)&&K.push(E[T]);
+E=K}return E};Graph.prototype.getCellsById=function(t){var E=[];if(null!=t)for(var K=0;K<t.length;K++)if("*"==t[K]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var P=this.model.getCell(t[K]);null!=P&&E.push(P)}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,K,T){var P=[];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(K&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ca=
+this.getTagsForCell(E[Y]),da=!1;if(0<ca.length&&(ca=ca.split(" "),ca.length>=t.length)){for(var Z=da=0;Z<ca.length&&da<Q;Z++)null!=S[ca[Z]]&&da++;da=da==Q}da&&(1!=T||this.isCellVisible(E[Y]))&&P.push(E[Y])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var E=null,K=[],T=0;T<t.length;T++){var P=this.getTagsForCell(t[T]);K=[];if(0<P.length){P=P.split(" ");for(var Q={},
+S=0;S<P.length;S++)if(null==E||null!=E[P[S]])Q[P[S]]=!0,K.push(P[S]);E=Q}else return[]}return K};Graph.prototype.getTagsForCells=function(t){for(var E=[],K={},T=0;T<t.length;T++){var P=this.getTagsForCell(t[T]);if(0<P.length){P=P.split(" ");for(var Q=0;Q<P.length;Q++)null==K[P[Q]]&&(K[P[Q]]=!0,E.push(P[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 K=0;K<t.length;K++){for(var T=this.getTagsForCell(t[K]),P=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=mxUtils.trim(E[S]);""!=Y&&0>mxUtils.indexOf(P,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(t[K],"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 K=0;K<t.length;K++){var T=this.getTagsForCell(t[K]);if(0<T.length){for(var P=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=
+mxUtils.indexOf(P,E[S]);0<=Y&&(P.splice(Y,1),Q=!0)}Q&&this.setAttributeForCell(t[K],"tags",P.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 K=0;K<t.length;K++)this.model.setVisible(t[K],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(t,E,K,T){for(var P=0;P<t.length;P++)this.highlightCell(t[P],E,K,T)};Graph.prototype.highlightCell=function(t,E,K,T,P){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;t=this.view.getState(t);var Q=null;null!=t&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,1)+P),Q=new mxCellHighlight(this,E,P,!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)},K));return Q};Graph.prototype.addSvgShadow=function(t,E,K,T){K=null!=K?K:!1;T=null!=T?T:!0;var P=t.ownerDocument,Q=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");Q.setAttribute("id",this.shadowId);var S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",
+this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.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!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",
+this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2",
+"offsetBlur");Q.appendChild(S);S=t.getElementsByTagName("defs");0==S.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=t.firstChild?t.insertBefore(P,t.firstChild):t.appendChild(P)):P=S[0];P.appendChild(Q);K||(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+
+Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),E=0;do var K=this.model.getChildAt(this.model.root,E);while(E++<t&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",
STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=
[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];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"];
@@ -11673,35 +11675,35 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
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(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=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=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);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||
+function(t,E,K,T,P,Q,S,Y,ca,da){if(null!=K&&null==mxMarker.markers[K]){var Z=this.getPackageForType(K);null!=Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,E,K,T,P,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 K(){aa.value=Math.max(1,
+Math.min(Y,Math.max(parseInt(aa.value),parseInt(ha.value))));ha.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),parseInt(ha.value))))}function T(xa){function wa(Ka,Oa,Pa){var Qa=Ka.useCssTransforms,Ya=Ka.currentTranslate,Ma=Ka.currentScale,Ta=Ka.view.translate,Ua=Ka.view.scale;Ka.useCssTransforms&&(Ka.useCssTransforms=!1,Ka.currentTranslate=new mxPoint(0,0),Ka.currentScale=1,Ka.view.translate=new mxPoint(0,0),Ka.view.scale=1);var Za=Ka.getGraphBounds(),Wa=0,bb=0,Va=fa.get(),ab=1/Ka.pageScale,
+$a=oa.checked;if($a){ab=parseInt(ya.value);var hb=parseInt(qa.value);ab=Math.min(Va.height*hb/(Za.height/Ka.view.scale),Va.width*ab/(Za.width/Ka.view.scale))}else ab=parseInt(Da.value)/(100*Ka.pageScale),isNaN(ab)&&(sa=1/Ka.pageScale,Da.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*sa);Va.height=Math.ceil(Va.height*sa);ab*=sa;!$a&&Ka.pageVisible?(Za=Ka.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Oa){Oa=PrintDialog.createPrintPreview(Ka,ab,Va,
+0,Wa,bb,$a);Oa.pageSelector=!1;Oa.mathEnabled=!1;ta.checked&&(Oa.isCellVisible=function(Xa){return Ka.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=Ka.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=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());Oa.open(null,null,Pa,!0);P.enableFlowAnimation=Va;null!=Wa&&(P.shapeForegroundColor=bb,P.shapeBackgroundColor=$a,P.stylesheet=Wa,P.refresh())}else{Va=Ka.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Oa.backgroundColor=Va;Oa.autoOrigin=$a;Oa.appendGraph(Ka,ab,Wa,bb,Pa,!0);Pa=
+Ka.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&&(Ka.useCssTransforms=Qa,Ka.currentTranslate=
+Ya,Ka.currentScale=Ma,Ka.view.translate=Ta,Ka.view.scale=Ua);return Oa}var sa=parseInt(ra.value)/100;isNaN(sa)&&(sa=1,ra.value="100 %");sa*=.75;var va=null,ia=P.shapeForegroundColor,pa=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(va=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var ba=ha.value,ea=aa.value,ma=!da.checked,ja=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,da.checked,
+ba,ea,oa.checked,ya.value,qa.value,parseInt(Da.value)/100,parseInt(ra.value)/100,fa.get());else{ma&&(ma=ta.checked||ba==ca&&ea==ca);if(!ma&&null!=t.pages&&t.pages.length){var na=0;ma=t.pages.length-1;da.checked||(na=parseInt(ba)-1,ma=parseInt(ea)-1);for(var ua=na;ua<=ma;ua++){var ka=t.pages[ua];ba=ka==t.currentPage?P:null;if(null==ba){ba=t.createTemporaryGraph(P.stylesheet);ba.shapeForegroundColor=P.shapeForegroundColor;ba.shapeBackgroundColor=P.shapeBackgroundColor;ea=!0;na=!1;var Ja=null,Ia=null;
+null==ka.viewState&&null==ka.root&&t.updatePageRoot(ka);null!=ka.viewState&&(ea=ka.viewState.pageVisible,na=ka.viewState.mathEnabled,Ja=ka.viewState.background,Ia=ka.viewState.backgroundImage,ba.extFonts=ka.viewState.extFonts);null!=Ia&&null!=Ia.originalSrc&&(Ia=t.createImageForPageLink(Ia.originalSrc,ka));ba.background=Ja;ba.backgroundImage=null!=Ia?new mxImage(Ia.src,Ia.width,Ia.height,Ia.x,Ia.y):null;ba.pageVisible=ea;ba.mathEnabled=na;var Ra=ba.getGraphBounds;ba.getGraphBounds=function(){var Ka=
+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;Ka=mxRectangle.fromRectangle(Ka);Ka.add(new mxRectangle((Pa.x+Oa.x)*Qa,(Pa.y+Oa.y)*Qa,Oa.width*Qa,Oa.height*Qa))}return Ka};var Sa=ba.getGlobalVariable;ba.getGlobalVariable=function(Ka){return"page"==Ka?ka.getName():"pagenumber"==Ka?ua+1:"pagecount"==Ka?null!=t.pages?t.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ba.container);t.updatePageRoot(ka);
+ba.model.setRoot(ka.root)}ja=wa(ba,ja,ua!=ma);ba!=P&&ba.container.parentNode.removeChild(ba.container)}}else ja=wa(P);null==ja?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(ja.mathEnabled&&(ma=ja.wnd.document,xa&&(ja.wnd.IMMEDIATE_PRINT=!0),ma.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ja.closeDocument(),!ja.mathEnabled&&xa&&PrintDialog.printPreview(ja));null!=va&&(P.shapeForegroundColor=ia,P.shapeBackgroundColor=pa,P.stylesheet=
+va,P.refresh())}}var P=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,ca=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var da=document.createElement("input");da.style.cssText="margin-right:8px;margin-bottom:8px;";da.setAttribute("value","all");da.setAttribute("type",
+"radio");da.setAttribute("name","pages-printdialog");S.appendChild(da);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));S.appendChild(E);mxUtils.br(S);var Z=da.cloneNode(!0);da.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");S.appendChild(E);var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("type",
+"number");ha.setAttribute("min","1");ha.style.width="50px";S.appendChild(ha);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));S.appendChild(E);var aa=ha.cloneNode(!0);S.appendChild(aa);mxEvent.addListener(ha,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ha,"change",K);mxEvent.addListener(aa,"change",K);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]){ca=
+E+1;ha.value=ca;aa.value=ca;break}ha.setAttribute("max",Y);aa.setAttribute("max",Y);t.isPagesEnabled()?1<Y&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ta=document.createElement("input");ta.setAttribute("value","all");ta.setAttribute("type","radio");ta.style.marginRight="8px";P.isSelectionEmpty()&&ta.setAttribute("disabled","disabled");var la=document.createElement("div");la.style.marginBottom="10px";1==Y?(ta.setAttribute("type","checkbox"),ta.style.marginBottom="12px",la.appendChild(ta)):
+(ta.setAttribute("name","pages-printdialog"),ta.style.marginBottom="8px",S.appendChild(ta));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));ta.parentNode.appendChild(E);1==Y&&mxUtils.br(ta.parentNode);var Ca=document.createElement("input");Ca.style.marginRight="8px";Ca.setAttribute("value","adjust");Ca.setAttribute("type","radio");Ca.setAttribute("name","printZoom");la.appendChild(Ca);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));
+la.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","100 %");Da.style.width="50px";la.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ca.checked=!0});Q.appendChild(la);S=S.cloneNode(!1);var oa=Ca.cloneNode(!0);oa.setAttribute("value","fit");Ca.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(oa);S.appendChild(E);la=
+document.createElement("table");la.style.display="inline-block";var Ba=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 ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("min",
+"1");ya.setAttribute("type","number");ya.style.width="40px";Ga.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));Fa.appendChild(E);mxUtils.write(Ea,mxResources.get("fitToBy"));var qa=ya.cloneNode(!0);La.appendChild(qa);mxEvent.addListener(ya,"focus",function(){oa.checked=!0});mxEvent.addListener(qa,"focus",function(){oa.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);Ba.appendChild(Aa);Ba.appendChild(Ha);la.appendChild(Ba);S.appendChild(la);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 fa=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 ra=document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";S.appendChild(ra);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()||(la=mxUtils.button(mxResources.get("help"),function(){P.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),la.className="geBtn",E.appendChild(la));PrintDialog.previewEnabled&&(la=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();T(!1)}),la.className="geBtn",E.appendChild(la));la=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();T(!0)});la.className="geBtn gePrimaryBtn";E.appendChild(la);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.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(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.2.0";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&&
@@ -11717,7 +11719,7 @@ d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prot
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,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(){}};
+"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 L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(y,z)}));this.stop();return L}),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,
@@ -11726,10 +11728,10 @@ 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,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");
+function(d,g,k,l,p,q,x,y,z,A,L){g=null!=g?g:this.editor.graph;p=null!=p?p:!1;z=null!=z?z:!0;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var M="_blank";else O=M=l;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(L){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);
+L=L?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!q&&!p&&(x||null!=k&&/(\.html)$/i.test(k.getTitle())))L=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,M,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),L=this.getEmbeddedSvg(L,g,l,null,y,z,O);return L};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,
@@ -11739,9 +11741,9 @@ 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,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(";"),
+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,L){p=null!=p?p:!0;q=null!=q?q:!1;var O=this.editor.graph;if(g||!d&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var M=null!=O.themes&&"darkTheme"==O.defaultThemeName;A=!1;if(M||null!=this.pages&&this.currentPage!=this.pages[0]){var u=O.getGlobalVariable;O=this.createTemporaryGraph(M?O.getDefaultStylesheet():O.getStylesheet());
+O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var D=this.pages[0];this.currentPage==D?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&O.setBackgroundImage(D.viewState.backgroundImage);O.getGlobalVariable=function(B){return"page"==B?D.getName():"pagenumber"==B?1:u.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(D.root)}}x=null!=x?x:this.getXmlFileData(p,q,A,L);z=null!=z?
+z:this.getCurrentFile();d=this.createFileData(x,O,z,window.location.href,d,g,k,l,p,y,A);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 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,
@@ -11751,17 +11753,17 @@ function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage
"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(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=
+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,L,O){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!p),u=M+("xml"==d||"pdf"==d&&L?".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,
+M),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=M+".png";else if("jpeg"==d)u=M+".jpg";else if("remoteSvg"==d){u=M+".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,L,O,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=M+".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,L,O,M){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!=L?C="&from="+L.from+"&to="+L.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!=
+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(M&&isFinite(M)?"&h="+M:""))};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,z=null,A=mxUtils.bind(this,function(){var O=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(M){O===this.currentPage&&(200<=
+M.getStatus()&&300>=M.getStatus()?(this.updateDiagram(M.getText()),L()):this.handleError({message:mxResources.get("error")+" "+M.getStatus()}))}),mxUtils.bind(this,function(M){this.handleError(M)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(A,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();A()}));L();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 "+
+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 L=A.attributes,O=0;O<L.length;O++)p.setAttributeForCell(y,L[O].nodeName,0<L[O].nodeValue.length?L[O].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+y.id+": "+I)}try{var M=d.getAttribute("style");null!=M&&p.model.setStyle(y,M)}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();
@@ -11772,7 +11774,7 @@ 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(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=
+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,L,O){return!O||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?O&&"mxCell"==z.nodeName&&"previous"==A?null:L:Math.round(L)},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()),
@@ -11780,20 +11782,20 @@ d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scrat
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(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();
+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 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 O=null;if(".scratchpad"!=d.title||this.closableScratchpad)A.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(N){if(!mxEvent.isConsumed(N)){var I=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=O?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I();mxEvent.consume(N)}}));if(d.isEditable()){var M=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=L.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==O&&(O=L.cloneNode(!1),O.setAttribute("src",Editor.saveImage),O.setAttribute("title",mxResources.get("save")),A.insertBefore(O,A.firstChild),mxEvent.addListener(O,"click",mxUtils.bind(this,function(I){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==O||d.isModified()||(z.style.paddingRight=18*A.childNodes.length+"px",O.parentNode.removeChild(O),O=null)});mxEvent.consume(I)})),z.style.paddingRight=
+18*A.childNodes.length+"px")}),C=mxUtils.bind(this,function(N,I,F,H){N=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(N)));for(var R=0;R<N.length;R++){var W=M.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(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(N),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var I=M.getSelectionCells(),F=M.view.getBounds(I),H=M.view.scale;F.x/=H;F.y/=H;F.width/=H;F.height/=H;F.x-=M.view.translate.x;F.y-=M.view.translate.y;C(I,F)}mxEvent.consume(N)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(N){M.isMouseDown&&
+null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(N))}),mxUtils.bind(this,function(N){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=
+!1,M.autoScroll=!0,G(N),mxEvent.consume(N))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(N){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",M.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,
+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(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 P=JSON.parse(mxUtils.getTextContent(K.documentElement));x(P,y);g=g.concat(P);B(N);this.spinner.stop();
+t=!0}catch(ca){}else if("mxfile"==K.documentElement.nodeName)try{var Q=K.documentElement.getElementsByTagName("diagram");for(P=0;P<Q.length;P++){var S=this.stringToCells(Editor.getDiagramNodeXml(Q[P])),Y=this.editor.graph.getBoundingBoxFromGeometry(S);C(S,new mxRectangle(0,0,Y.width,Y.height),N)}t=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}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(K){E(K,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?E(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"))):E(I,F)}}));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"));A.insertBefore(L,A.firstChild);mxEvent.addListener(L,"click",D);mxEvent.addListener(y,
+"dblclick",function(N){mxEvent.getSource(N)==y&&D(N)});l=L.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=
@@ -11804,27 +11806,27 @@ Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.pro
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(){},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;";
+d.columnNumber,d,"INFO")}catch(u){}if(null!=z||null!=g){x=mxUtils.htmlEntities(mxResources.get("unknownError"));var A=mxResources.get("ok"),L=null;g=null!=g?g:mxResources.get("error");if(null!=z){null!=z.retry&&(A=mxResources.get("cancel"),L=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 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==z.code||404==z.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)}),L,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);
+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 M=q=null;null!=z&&null!=z.helpLink?(q=mxResources.get("help"),M=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+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,x,A,k,L,null,null,q,M,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 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=
+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(L){mxEvent.consume(L);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(L){var O=mxEvent.getSource(L);O!=x&&O!=y?(null!=k&&k(),z(),mxEvent.consume(L)):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(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=
+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,L){try{if("_blank"==L)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 M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,
+!1)+"</pre>"),M.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(d,A,k,l,null,y):null!=A&&0<A.length&&this.pickFolder(L,mxUtils.bind(this,function(u){try{this.exportFile(d,A,k,l,L,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=
@@ -11837,12 +11839,12 @@ else{this.exportDialog=document.createElement("div");var q=k.getBoundingClientRe
"#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 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")})}),
+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,L){if("_blank"==L||null!=A&&0<A.length){var O=k("_blank"==L?null:A,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1");
+null!=O&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?O.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(M){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,A,q,!0,L,M)}catch(u){this.handleError(u)}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(),A,q,!0,L,M)}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=
+g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,z,A,L,O,M,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=L?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,!M,L,O);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,
+"\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)});M?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,
@@ -11852,102 +11854,102 @@ l.appendChild(p);p=document.createElement("option");p.setAttribute("value","blan
":");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,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:
+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,L,O){this.getBasenames();var M={};""!=
+p&&p!=mxConstants.NONE&&(M.highlight=p);"auto"!==l&&(M.target=l);A||(M.lightbox=!1);M.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(M.zoom=k/100);k=[];x&&(k.push("pages"),M.resize=!0,null!=this.pages&&null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),M.resize=!0);y&&k.push("layers");z&&k.push("tags");0<k.length&&(A&&k.push("lightbox"),M.toolbar=k.join(" "));null!=L&&0<L.length&&(M.edit=L);null!=d?M.url=d:M.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(M))+'"></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:
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 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==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 L=this.addLinkSection(p),O=this.addCheckbox(p,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(p,":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value="100%";p.appendChild(M);var u=this.addCheckbox(p,mxResources.get("fit"),!0);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,O.checked,M.value,L.getTarget(),
+L.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 L=this.getCurrentFile();d=0;if(null==
+L||L.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 O=document.createElement("div");O.style.whiteSpace="normal";mxUtils.write(O,mxResources.get("linkAccountRequired"));A.appendChild(O);O=
+mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));O.style.marginTop="12px";O.className="geBtn";A.appendChild(O);z.appendChild(A);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"));A.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 M=null,u=null;if(null!=k||null!=l)d+=30,mxUtils.write(z,mxResources.get("width")+":"),M=document.createElement("input"),M.setAttribute("type","text"),M.style.marginRight="16px",M.style.width="50px",M.style.marginLeft="6px",M.style.marginRight="16px",M.style.marginBottom="10px",
+M.value="100%",z.appendChild(M),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==L||L.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");
+(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!=M?M.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!=M?(M.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?M.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");
+this.editor.graph.isSelectionEmpty()),L=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 M=parseInt(y.value)/100||1,u=parseInt(z.value)||0;k(!A.checked,null!=L?L.checked:!1,null!=O?O.checked:!1,M,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 L=this.editor.graph,O="jpeg"==y?220:300,M=document.createElement("h3");mxUtils.write(M,d);M.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(M);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";
+L.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(M=0;M<d.length;M++)if(!L.isSelectionEmpty()||"selectionOnly"!=d[M]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(d[M]));I.setAttribute("value",
+d[M]);G.appendChild(I);N[d[M]]=I}z?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),O+=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),O+=30,mxEvent.addListener(B,"change",function(){B.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?z&&(B.style.display="none",B.nextSibling.style.display="none",B.nextSibling.nextSibling.style.display=
+"none",O-=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),O+=26);var R=this.addCheckbox(A,mxResources.get("shadow"),L.shadowVisible),W=null;if("png"==y||"jpeg"==y)W=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),O+=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?(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=
+mxUtils.br(A),mxUtils.write(A,mxResources.get("txtSettings")+":"),A.appendChild(U),mxUtils.br(A),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 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),O+=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,O,!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),L=this.addCheckbox(q,k),O=this.addCheckbox(q,mxResources.get("lightbox"),!0),M=this.addEditButton(q,O),u=M.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(O,"change",function(){O.checked?(D&&B.removeAttribute("disabled"),u.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&O.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(z.checked,A.checked,L.checked,
+O.checked,M.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!=L?"&page="+L:"")+(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(),L=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 O="";k&&(O="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var M=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+O+"&xml="+encodeURIComponent(g));M.send(mxUtils.bind(this,function(){200<=M.getStatus()&&
+299>=M.getStatus()?z("data:image/png;base64,"+M.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 L=z[A].getAttribute("href");null!=L&&"#"==L.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 O=" ",M="";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);\"",M+="cursor:pointer;");d&&(M+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(u){x('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=M?' style="'+M+'"':"")+O+"/>")}))}else M="",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);"),M+="cursor:pointer;"),d&&(d=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+d+" "+p),M+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=M&&y.setAttribute("style",M),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 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=
+!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(L){return"page"==L?A.getName():"pagenumber"==L?1:z.apply(this,
+arguments)};document.body.appendChild(q.container);q.model.setRoot(A.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 O=L.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(M){null!=g&&g(M)}}),null,null,null,mxUtils.bind(this,function(L){null!=g&&
+g(L)}),null,null,l,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(L){null!=g&&g(L)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,l,p,q,x,y,z,A,L,O,M){y=null!=y?y:!0;L=null!=L?L:0;x=null!=z?z:g.background;x==mxConstants.NONE&&(x=null);q=g.getSvg(x,A,L,null,null,q,null,null,null,g.shadowVisible||O,null,M,"diagram");(g.shadowVisible||O)&&g.addSvgShadow(q,null,null,0==L);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.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,L,O,M){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,L)}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,O,M)}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 L=this.editor.extractGraphModel(A.documentElement,null!=this.pages);if(null!=L&&"mxfile"==L.nodeName&&null!=this.pages){var O=L.getElementsByTagName("diagram");if(1==O.length&&!q){if(L=Editor.parseDiagramNode(O[0]),null!=this.currentPage&&(d[O[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var M=O[0].getAttribute("name");null!=M&&""!=M&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,M))}}else if(0<O.length){q=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[O[0].getAttribute("id")]=this.pages[0].getId(),L=Editor.parseDiagramNode(O[0]),l=!1,u=1);for(;u<O.length;u++){var D=O[u].getAttribute("id");O[u].removeAttribute("id");var B=this.updatePageRoot(new DiagramPage(O[u]));d[D]=O[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!=L&&"mxGraphModel"===L.nodeName){y=z.importGraphModel(L,g,k,l);if(null!=y)for(u=0;u<y.length;u++)this.updatePageLinksForCell(d,y[u]);var G=z.parseBackgroundImage(L.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",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)});
+A&&A<l.length&&(l=l.substring(A+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 L=new XMLHttpRequest;L.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));L.responseType="blob";this.addRemoteServiceSecurityCheck(L);
+null!=p&&L.setRequestHeader("x-convert-custom",p);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var O=L.response;if("text/xml"==O.type){var M=new FileReader;M.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(D){k({message:mxResources.get("errorLoadingFile")})}});M.readAsText(O)}else this.doImportVisio(O,g,k,l)}catch(u){k(u)}else try{""==L.responseType||"text"==L.responseType?k({message:L.responseText}):(M=new FileReader,M.onload=
+function(){k({message:JSON.parse(M.result).Message})},M.readAsText(L.response))}catch(u){k({})}});L.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)});
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 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",
+if(0<y.length){var z=parseFloat(y[0].getAttribute("width")),A=parseFloat(y[0].getAttribute("height"));if(isNaN(z)||isNaN(A))try{var L=y[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(L[2]);A=parseFloat(L[3])}catch(O){z=z||100,A=A||100}k(p.convertDataUri(Editor.createSvgDataUri(x)),z,A)}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,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]};
+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 L=new Image;L.onload=
+function(){try{var O=L.width,M=L.height;if(0==O&&0==M){var u=z.result,D=u.indexOf(","),B=decodeURIComponent(escape(atob(u.substring(D+1)))),C=mxUtils.parseXml(B).getElementsByTagName("svg");0<C.length&&(O=parseFloat(C[0].getAttribute("width")),M=parseFloat(C[0].getAttribute("height")))}k(z.result,O,M)}catch(G){l(G)}};L.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(M){4==
+M.readyState&&200<=M.status&&299>=M.status&&this.editor.graph.setSelectionCells(this.insertTextAt(M.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 L=this.importXml(A,g,k,q,!0,y);if(0<L.length)return L}catch(M){}this.loadImage(d,mxUtils.bind(this,function(M){if("data:"==d.substring(0,5))this.resizeImage(M,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/M.width,this.maxImageSize/M.height)),D=Math.round(M.width*u);M=Math.round(M.height*u);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(g),z.snap(k),D,M,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var M=null;z.getModel().beginUpdate();try{M=z.insertVertex(z.getDefaultParent(),null,d,z.snap(g),z.snap(k),1,1,"text;"+(l?"html=1;":"")),z.updateCellSize(M),z.fireEvent(new mxEventObject("textInserted","cells",[M]))}finally{z.getModel().endUpdate()}z.setSelectionCell(M)}))}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(M){this.editor.graph.setSelectionCells(this.importXml(M,g,k,q,null,y))}),mxUtils.bind(this,function(M){this.handleError(M)}));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 O=z.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=O.width;p.geometry.height=O.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,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=
+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,L){A=L.name.toLowerCase();"diagram/diagram.xml"==A?(z=!0,L.async("string").then(function(O){0==O.indexOf("<mxfile ")?g(O):k()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>x&&(x=A,y=L))});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(L){4==L.readyState&&(200<=L.status&&299>=L.status?g(L.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,L,O){A=null!=
+A?A:!0;var M=!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!=O?mxEvent.isControlDown(O):null);null!=y&&y(C)});"image"==g.substring(0,5)?(z=!1,"image/png"==g.substring(0,9)&&(g=L?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,l,A,null,null!=O?mxEvent.isControlDown(O):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)?(M=!0,this.importGraphML(d,D)):null!=z&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(M=!0,this.importVisio(z,D)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!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?(M=!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!=O?mxEvent.isControlDown(O):null));M||null==y||y(u);return u};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,z,A,L,O,M){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=L||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,K,T,P,Q,S){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,P)),null):this.importFile(U,X,t,E,K,T,P,Q,S,u,O,M)}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 K=Graph.clipSvgDataUri(E.target.result),T=K.indexOf(",");T=decodeURIComponent(escape(atob(K.substring(T+
+1))));var P=mxUtils.parseXml(T);T=P.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)?J(U,mxUtils.bind(this,function(){try{if(null!=P){var ca=P.getElementsByTagName("svg");if(0<ca.length){var da=ca[0],Z=da.getAttribute("width"),ha=da.getAttribute("height");
+Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var aa=da.getAttribute("viewBox");if(null==aa||0==aa.length)da.setAttribute("viewBox","0 0 "+Z+" "+ha);else if(isNaN(Z)||isNaN(ha)){var ta=aa.split(" ");3<ta.length&&(Z=parseFloat(ta[2]),ha=parseFloat(ta[3]))}K=Editor.createSvgDataUri(mxUtils.getXml(da));var la=Math.min(1,Math.min(l/Math.max(1,Z)),l/Math.max(1,ha)),Ca=p(K,X.type,g+U*F,k+U*F,Math.max(1,Math.round(Z*la)),Math.max(1,Math.round(ha*
+la)),X.name);if(isNaN(Z)||isNaN(ha)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Z=Math.max(1,Da.width);ha=Math.max(1,Da.height);Ca[0].geometry.width=Z;Ca[0].geometry.height=ha;da.setAttribute("viewBox","0 0 "+Z+" "+ha);K=Editor.createSvgDataUri(mxUtils.getXml(da));var oa=K.indexOf(";");0<oa&&(K=K.substring(0,oa)+K.substring(K.indexOf(",",oa+1)));I.setCellStyles("image",K,[Ca[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(da))}return Ca}}}catch(oa){}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=O?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(ca){this.resizeImage(ca,E.target.result,mxUtils.bind(this,function(da,Z,ha){J(U,mxUtils.bind(this,function(){if(null!=da&&da.length<A){var aa=D&&this.isResampleImageSize(X.size,L)?Math.min(1,Math.min(l/Z,l/ha)):1;return p(da,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(ha*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),D,l,L,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else K=E.target.result,p(K,X.type,g+U*F,k+U*F,240,160,X.name,function(ca){J(U,function(){return ca})},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),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=
+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 L=Math.round(y/A),O=Math.round(z/A),M=document.createElement("canvas");M.width=L;M.height=O;M.getContext("2d").drawImage(d,0,0,L,O);var u=
+M.toDataURL();if(u.length<g.length){var D=document.createElement("canvas");D.width=L;D.height=O;var B=D.toDataURL();u!==B&&(g=u,y=L,z=O)}}}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(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,
@@ -11959,9 +11961,9 @@ mxUtils.bind(this,function(C,G){C=null!=g.backgroundImage?g.backgroundImage.orig
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()?
+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 L=g.getExportVariables;g.getExportVariables=function(){var C=L.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 O=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:O.apply(this,arguments)};var M=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))M.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,
@@ -11974,9 +11976,9 @@ C=this.editor.graph.getModel().getStyle(C),this.styleInput.value=C||"",this.styl
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="+
+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 K=this.maxImageSize;K=Math.min(1,Math.min(K/Math.max(1,E)),K/Math.max(1,t));g.setSelectionCell(g.insertVertex(null,null,"",H,R,E*K,t*K,"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=
+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,L,O,M,u){d.insertImage(z,M,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",
@@ -11999,10 +12001,10 @@ null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError
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 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(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(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 M=this.editor.graph;M.lastPasteXml==O?M.pasteCounter++:(M.lastPasteXml=O,M.pasteCounter=0);var u=M.pasteCounter*M.gridSize;M.setSelectionCells(this.importXml(O,u,u));M.scrollCellToVisible(M.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 A=q.lastIndexOf("%3E");0<=A&&A<q.length-3&&(q=q.substring(0,A+3))}catch(O){}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(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 L=this.editor.graph;L.lastPasteXml=null;L.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(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)?
@@ -12026,55 +12028,55 @@ if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile
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(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,
+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,L=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(S){}return Q});if("json"==urlParams.proto){var M=!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.executeLayouts(this.editor.graph.createLayouts(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}),"*")}),
+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=O(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,
+mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getRecentDiagrams",[Y],null,Q,S)}):null,C?mxUtils.bind(this,function(Q,S,Y,ca){this.remoteInvoke("searchDiagrams",[Q,ca],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,ca){Q=Q||this.emptyDiagramXml;null!=A.callback?x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y,libs:ca,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,
+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(ha){return"page"==ha?S.getName():"pagenumber"==
+ha?1:Q.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(S.root)}if(null!=A.layerIds){var ca=W.model,da=ca.getChildCells(ca.getRoot()),Z={};for(Y=0;Y<A.layerIds.length;Y++)Z[A.layerIds[Y]]=!0;for(Y=0;Y<da.length;Y++)ca.setVisible(da[Y],Z[da[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ha){V(ha.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.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(ca){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(ca);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;
+A.shadow)&&this.editor.graph.addSvgShadow(S),this.embedFonts(S,mxUtils.bind(this,function(ca){A.embedImages||null==A.embedImages?this.editor.convertImages(ca,mxUtils.bind(this,function(da){Y(mxUtils.getXml(da))})):Y(mxUtils.getXml(ca))}));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){M=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)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=
+"";this.diagramContainer.style.right="";L=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 K=this.getCurrentFile();null!=K&&(D=O(A.xml),null!=D&&""!=D&&K.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())}),P=mxUtils.bind(this,function(Q,S){k=!0;try{d(Q,
+S,null,M)}catch(Y){this.handleError(Y)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");p=T();l&&null==g&&(g=mxUtils.bind(this,function(Y,ca){Y=T();Y==p||k||(ca=this.createLoadMessage("autosave"),ca.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(ca),"*"));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)S=this.createLoadMessage("load"),S.xml=Q,x.postMessage(JSON.stringify(S),"*");null!=L&&L()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==
+A.substring(0,34)?(O="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(Q){P(Q,z)},mxUtils.bind(this,function(Q){this.handleError(Q)}),O)):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)&&P(Q.responseText,z)}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(Q){P(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=O(A),P(A,z)):this.loadDescriptor(A,mxUtils.bind(this,function(Q){P(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,L){y.apply(this,arguments);x.postMessage(JSON.stringify({event:"openLink",href:z,target:A,allowOpener:L}),"*")}}};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.importCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},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.executeLayouts(z.createLayouts(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=
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},z=this.editor.graph,A=null,L=null,O=null,M=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(ya):(z.setSelectionCells(ya),z.scrollCellToVisible(z.getSelectionCell()))},E=z.getFreeInsertPoint(),K=E.x,T=E.y;E=T;var P=null,Q="auto";
+N=null;for(var S=[],Y=null,ca=null,da=0;da<k.length&&"#"==k[da].charAt(0);){d=k[da].replace(/\r$/,"");for(da++;da<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[da].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[da].substring(1)),da++;if("#"!=d.charAt(1)){var Z=d.indexOf(":");if(0<Z){var ha=mxUtils.trim(d.substring(1,Z)),aa=mxUtils.trim(d.substring(Z+1));"label"==ha?P=z.sanitizeHtml(aa):"labelname"==ha&&0<aa.length&&"-"!=aa?u=aa:"labels"==ha&&0<aa.length&&"-"!=aa?B=JSON.parse(aa):"style"==ha?
+L=aa:"parentstyle"==ha?C=aa:"unknownStyle"==ha&&"-"!=aa?D=aa:"stylename"==ha&&0<aa.length&&"-"!=aa?M=aa:"styles"==ha&&0<aa.length&&"-"!=aa?O=JSON.parse(aa):"vars"==ha&&0<aa.length&&"-"!=aa?A=JSON.parse(aa):"identity"==ha&&0<aa.length&&"-"!=aa?G=aa:"parent"==ha&&0<aa.length&&"-"!=aa?N=aa:"namespace"==ha&&0<aa.length&&"-"!=aa?I=aa:"width"==ha?F=aa:"height"==ha?H=aa:"left"==ha&&0<aa.length?R=aa:"top"==ha&&0<aa.length?W=aa:"ignore"==ha?ca=aa.split(","):"connect"==ha?S.push(JSON.parse(aa)):"link"==ha?
+Y=aa:"padding"==ha?X=parseFloat(aa):"edgespacing"==ha?J=parseFloat(aa):"nodespacing"==ha?V=parseFloat(aa):"levelspacing"==ha?U=parseFloat(aa):"layout"==ha&&(Q=aa)}}}if(null==k[da])throw Error(mxResources.get("invalidOrMissingFile"));var ta=this.editor.csvToArray(k[da].replace(/\r$/,""));Z=d=null;ha=[];for(aa=0;aa<ta.length;aa++)G==ta[aa]&&(d=aa),N==ta[aa]&&(Z=aa),ha.push(mxUtils.trim(ta[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==P&&(P="%"+ha[0]+"%");if(null!=S)for(var la=
+0;la<S.length;la++)null==y[S[la].to]&&(y[S[la].to]={});G=[];for(aa=da+1;aa<k.length;aa++){var Ca=this.editor.csvToArray(k[aa].replace(/\r$/,""));if(null==Ca){var Da=40<k[aa].length?k[aa].substring(0,40)+"...":k[aa];throw Error(Da+" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ca.length&&G.push(Ca)}z.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Ca=G[aa];var oa=null,Ba=null!=d?I+Ca[d]:null;null!=Ba&&(oa=z.model.getCell(Ba));k=null!=oa;var Aa=new mxCell(P,new mxGeometry(K,E,0,0),
+L||"whiteSpace=wrap;html=1;");Aa.vertex=!0;Aa.id=Ba;Da=null!=oa?oa:Aa;for(var Ha=0;Ha<Ca.length;Ha++)z.setAttributeForCell(Da,ha[Ha],Ca[Ha]);if(null!=u&&null!=B){var Na=B[Da.getAttribute(u)];null!=Na&&z.labelChanged(Da,Na)}if(null!=M&&null!=O){var Ga=O[Da.getAttribute(M)];null!=Ga&&(Da.style=Ga)}z.setAttributeForCell(Da,"placeholders","1");Da.style=z.replacePlaceholders(Da,Da.style,A);k?(0>mxUtils.indexOf(q,oa)&&q.push(oa),z.fireEvent(new mxEventObject("cellsInserted","cells",[oa]))):z.fireEvent(new mxEventObject("cellsInserted",
+"cells",[Aa]));oa=Aa;if(!k)for(la=0;la<S.length;la++)y[S[la].to][oa.getAttribute(S[la].to)]=oa;null!=Y&&"link"!=Y&&(z.setLinkForCell(oa,oa.getAttribute(Y)),z.setAttributeForCell(oa,Y,null));var Fa=this.editor.graph.getPreferredSizeForCell(oa);N=null!=Z?z.model.getCell(I+Ca[Z]):null;if(oa.vertex){Da=null!=N?0:K;da=null!=N?0:T;null!=R&&null!=oa.getAttribute(R)&&(oa.geometry.x=Da+parseFloat(oa.getAttribute(R)));null!=W&&null!=oa.getAttribute(W)&&(oa.geometry.y=da+parseFloat(oa.getAttribute(W)));var Ea=
+"@"==F.charAt(0)?oa.getAttribute(F.substring(1)):null;oa.geometry.width=null!=Ea&&"auto"!=Ea?parseFloat(oa.getAttribute(F.substring(1))):"auto"==F||"auto"==Ea?Fa.width+X:parseFloat(F);var La="@"==H.charAt(0)?oa.getAttribute(H.substring(1)):null;oa.geometry.height=null!=La&&"auto"!=La?parseFloat(La):"auto"==H||"auto"==La?Fa.height+X:parseFloat(H);E+=oa.geometry.height+V}k?(null==x[Ba]&&(x[Ba]=[]),x[Ba].push(oa)):(l.push(oa),null!=N?(N.style=z.replacePlaceholders(N,C,A),z.addCell(oa,N),p.push(N)):q.push(z.addCell(oa)))}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(),ya=q.slice();for(la=0;la<S.length;la++){var qa=S[la];for(aa=0;aa<l.length;aa++){oa=l[aa];var fa=mxUtils.bind(this,function(ma,ja,na){var ua=ja.getAttribute(na.from);if(null!=ua&&""!=ua){ua=ua.split(",");for(var ka=0;ka<ua.length;ka++){var Ja=y[na.to][ua[ka]];if(null==
+Ja&&null!=D){Ja=new mxCell(ua[ka],new mxGeometry(K,T,0,0),D);Ja.style=z.replacePlaceholders(ja,Ja.style,A);var Ia=this.editor.graph.getPreferredSizeForCell(Ja);Ja.geometry.width=Ia.width+X;Ja.geometry.height=Ia.height+X;y[na.to][ua[ka]]=Ja;Ja.vertex=!0;Ja.id=ua[ka];q.push(z.addCell(Ja))}if(null!=Ja){Ia=na.label;null!=na.fromlabel&&(Ia=(ja.getAttribute(na.fromlabel)||"")+(Ia||""));null!=na.sourcelabel&&(Ia=z.replacePlaceholders(ja,na.sourcelabel,A)+(Ia||""));null!=na.tolabel&&(Ia=(Ia||"")+(Ja.getAttribute(na.tolabel)||
+""));null!=na.targetlabel&&(Ia=(Ia||"")+z.replacePlaceholders(Ja,na.targetlabel,A));var Ra="target"==na.placeholders==!na.invert?Ja:ma;Ra=null!=na.style?z.replacePlaceholders(Ra,na.style,A):z.createCurrentEdgeStyle();Ia=z.insertEdge(null,null,Ia||"",na.invert?Ja:ma,na.invert?ma:Ja,Ra);if(null!=na.labels)for(Ra=0;Ra<na.labels.length;Ra++){var Sa=na.labels[Ra],Ka=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;");Ka.vertex=!0;Ka.connectable=!1;Ka.geometry.relative=
+!0;null!=Sa.placeholders&&(Ka.value=z.replacePlaceholders("target"==Sa.placeholders==!na.invert?Ja:ma,Ka.value,A));if(null!=Sa.dx||null!=Sa.dy)Ka.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ia.insert(Ka)}ya.push(Ia);mxUtils.remove(na.invert?ma:Ja,za)}}}});fa(oa,oa,qa);if(null!=x[oa.id])for(Ha=0;Ha<x[oa.id].length;Ha++)fa(oa,x[oa.id][Ha],qa)}}if(null!=ca)for(aa=0;aa<l.length;aa++)for(oa=l[aa],Ha=0;Ha<ca.length;Ha++)z.setAttributeForCell(oa,mxUtils.trim(ca[Ha]),null);if(0<q.length){var ra=
+new mxParallelEdgeLayout(z);ra.spacing=J;ra.checkOverlap=!0;var xa=function(){0<ra.spacing&&ra.execute(z.getDefaultParent());for(var ma=0;ma<q.length;ma++){var ja=z.getCellGeometry(q[ma]);ja.x=Math.round(z.snap(ja.x));ja.y=Math.round(z.snap(ja.y));"auto"==F&&(ja.width=Math.round(z.snap(ja.width)));"auto"==H&&(ja.height=Math.round(z.snap(ja.height)))}};if("["==Q.charAt(0)){var wa=t;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(Q)),function(){xa();wa()});t=null}else if("circle"==
+Q){var sa=new mxCircleLayout(z);sa.disableEdgeStyle=!1;sa.resetEdges=!1;var va=sa.isVertexIgnored;sa.isVertexIgnored=function(ma){return va.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){sa.execute(z.getDefaultParent());xa()},!0,t);t=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ya.length==2*q.length-1&&1==za.length){z.view.validate();var ia=new mxCompactTreeLayout(z,"horizontaltree"==Q);ia.levelDistance=V;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.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 pa=new mxHierarchicalLayout(z,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=V;pa.parallelEdgeSpacing=J;pa.interRankCellSpacing=U;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(z.getDefaultParent(),ya);z.moveCells(ya,K,T)},!0,t);t=null}else if("organic"==Q||"auto"==Q&&ya.length>q.length){z.view.validate();
+var ba=new mxFastOrganicLayout(z);ba.forceConstant=3*V;ba.disableEdgeStyle=!1;ba.resetEdges=!1;var ea=ba.isVertexIgnored;ba.isVertexIgnored=function(ma){return ea.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){ba.execute(z.getDefaultParent());xa()},!0,t);t=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=t&&t()}}catch(ma){this.handleError(ma)}};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);
@@ -12085,23 +12087,23 @@ this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOpt
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 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"))}});
+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),L=z.getGraphBounds(),O=Math.floor(L.width*p/z.view.scale),M=Math.floor(L.height*p/z.view.scale);if(A.length<=MAX_REQUEST_SIZE&&O*M<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="+O+"&h="+M+"&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 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]));
+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 L=0;L<A.length;L++){var O=A[L];q[O.id]&&(g[O.id]=O);var M=this.addCheckbox(p,O.title,q[O.id]);
+(function(u,D){mxEvent.addListener(D,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(O,M)}},mxUtils.bind(this,function(A){p.innerHTML="";var L=document.createElement("div");L.style.padding="8px";L.style.textAlign="center";mxUtils.write(L,mxResources.get("error")+": ");mxUtils.write(L,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(L)}));k.appendChild(p);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
+var A=0,L;for(L in g)null==q[L]&&(A++,mxUtils.bind(this,function(O){this.remoteInvoke("getFileContent",[O.downloadUrl],null,mxUtils.bind(this,function(M){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,O))}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[L]));for(L in q)g[L]||this.closeLibrary(new RemoteLibrary(this,null,q[L]));
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)}),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"===
+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,L){var O={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=L?O.error={errResp:L}:null!=A&&(O.resp=A);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(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 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",
+document.body.appendChild(y);var z=!0,A=!1,L,O=0,M=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){O++;D()}),D=mxUtils.bind(this,function(){try{if(O>=L.length)M();else{var C=L[O];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)};
+"*"),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]?(L=G.resp[0],z=!1,D()):M():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=k||"objects";var p=l.transaction([k],"readonly").objectStore(k).getAllKeys();p.onsuccess=function(){d(p.result)};p.onerror=g}catch(q){null!=g&&g(q)}}),g)};EditorUi.prototype.commentsSupported=
@@ -12109,31 +12111,31 @@ function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};
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,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.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,L,O,M,u,D,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,z,A,L,O,M,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 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=
+var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var I=O.getElementsByTagName("div"),F=0,H=0;H<I.length;H++)"none"!=I[H].style.display&&I[H].parentNode==O&&F++;M.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=
+function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(E.click(),mxEvent.consume(K)):27==K.keyCode&&(t.click(),mxEvent.consume(K)))}));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(P,Q,S){var Y=document.createElement("li");Y.className="geCommentAction";var ca=document.createElement("a");ca.className=
+"geCommentActionLnk";mxUtils.write(ca,P);Y.appendChild(ca);mxEvent.addListener(ca,"click",function(da){Q(da,I);da.preventDefault();mxEvent.consume(da)});T.appendChild(Y);S&&(Y.style.display="none")}function V(){function P(Y){Q.push(S);if(null!=Y.replies)for(var ca=0;ca<Y.replies.length;ca++)S=S.nextSibling,P(Y.replies[ca])}var Q=[],S=X;P(I);return{pdiv:S,replies:Q}}function U(P,Q,S,Y,ca){function da(){k(ta);I.addReply(aa,function(la){aa.id=la;I.replies.push(aa);p(ta);S&&S()},function(la){Z();l(ta);
+b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ca)}function Z(){d(aa,ta,function(la){da()},!0)}var ha=V().pdiv,aa=b.newComment(P,b.getCurrentUser());aa.pCommentId=I.id;null==I.replies&&(I.replies=[]);var ta=q(aa,I.replies,ha,R+1);Q?Z():da()}if(W||!I.isResolved){M.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 K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,I.user.displayName||"");E.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",
+I.id);g(I,K);E.appendChild(K);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 P(){d(I,X,function(){k(X);I.editComment(I.content,function(){p(X)},function(Q){l(X);P();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}P()},I.isResolved),J(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);I.deleteComment(function(P){if(!0===P){P=X.querySelector(".geCommentTxt");P.innerHTML="";mxUtils.write(P,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(P=
+0;P<Q.length;P++)Q[P].parentNode.removeChild(Q[P]);p(X);X.style.opacity="0.5"}else{Q=V(I).replies;for(P=0;P<Q.length;P++)O.removeChild(Q[P]);for(P=0;P<F.length;P++)if(F[P]==I){F.splice(P,1);break}M.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(P){l(X);b.handleError(P,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(P){function Q(){var S=
+P.target;S.innerHTML="";I.isResolved=!I.isResolved;mxUtils.write(S,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",ca=V(I).replies,da=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",Z=0;Z<ca.length;Z++){ca[Z].style.backgroundColor=da;for(var ha=ca[Z].querySelectorAll(".geCommentAction"),aa=0;aa<ha.length;aa++)ha[aa]!=S.parentNode&&(ha[aa].style.display=Y);B||(ca[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?O.insertBefore(X,H.nextSibling):O.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&&(O.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 L=EditorUi.compactUi?"26px":"30px",O=document.createElement("div");O.className="geCommentsList";O.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";O.style.bottom=parseInt(L)+7+"px";A.appendChild(O);var M=document.createElement("span");M.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(M,mxResources.get("noCommentsFound"));var u=document.createElement("div");u.className="geToolbarContainer geCommentsToolbar";u.style.height=L;u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";L=document.createElement("a");L.className="geButton";if(!x){var D=L.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=L.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=L.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()&&(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(I){n();I.preventDefault();mxEvent.consume(I)}),u.appendChild(L));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)}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 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)});O.innerHTML="";O.appendChild(M);M.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&&(O.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.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;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=O.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=
@@ -12142,12 +12144,12 @@ v+"<br>"+y.innerHTML+"<br>",y.style.paddingBottom="8px",y.style.paddingTop="8px"
"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={},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]),
+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(L){var O=null!=L?L.getId():"";if(null!=L&&!y[O]){y[O]=!0;v.push(L);var M=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][O]:null;null!=M&&(this.updatePageRoot(L),null!=M.name&&L.setName(M.name),
+null!=M.view&&this.patchViewState(L,M.view),null!=M.cells&&this.patchPage(L,M.cells,n[L.getId()],m),!f||null==M.cells&&null==M.view||(L.needsUpdate=!0))}L=l[O];null!=L&&(delete l[O],z(k[L]));L=d[O];null!=L&&(delete d[O],A(L))}),A=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var O=k[L.getId()];null==O?z(L):(this.patchPage(O,this.diffPages([O],[L]),n[O.getId()],m),f&&(O.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(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),
+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,L){!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=
@@ -12230,9 +12232,9 @@ DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mx
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,e,f,c){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 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)};
+(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 L=this.stringToObject(z[A]);if(L.v>DrawioFileSync.PROTOCOL){g=!0;y=[];break}else if(L.v===
+DrawioFileSync.PROTOCOL&&null!=L.d)x=L.d.checksum,y.push(L.d.patch);else{g=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"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)};
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()}))}))};
@@ -12308,9 +12310,9 @@ function(){return this.user};DriveClient.prototype.getUsersList=function(){var f
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 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&&
+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(L){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())};
+Math.round(Math.pow(2,d)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=m&&m(y):m(y)}}}catch(L){if(null!=m)m(L);else throw L;}}))}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=
@@ -12325,22 +12327,22 @@ m){return this.getFile(f,c,m,!0,!0)};DriveClient.prototype.loadDescriptor=functi
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 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,
+q=!0:p=z}catch(L){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(L){try{4==L.readyState&&(200<=L.status&&299>=L.status?c(new LocalFile(this.ui,L.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(L){if(null!=m)m(L);else throw L;}}),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;
+C)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),z=f.desc.etag,A=f.desc.modifiedDate,L=f.desc.headRevisionId,O=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var M=null,u=!1,D={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,M=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);
+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&&L==W.headRevisionId){f.saveLevel=12;var V=[];0>=J&&V.push("invalid modified time");z==W.etag&&V.push("stale etag");c&&L==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-"+L+"."+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!=M){this.executeRequest({url:"/files/"+M.id+"/revisions/"+M.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(X){X.pinned=!0;this.executeRequest({url:"/files/"+M.id+"/revisions/"+
+M.headRevisionId,method:"PUT",params:X})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+M.id+"."+M.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 K=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,T=!0,P=null;try{P=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||K,J,E?null:V,u),mxUtils.bind(this,function(Q){window.clearTimeout(P);T&&F(Q)}),mxUtils.bind(this,function(Q){window.clearTimeout(P);
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)}})))&&
+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(ca){}}else"1"==urlParams.test&&S.headRevisionId==L&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,
+"remote",S.etag,"rev",f.desc.headRevisionId,"response",[S],"file",[f]),q(Q,S)}catch(ca){x(ca)}}),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 K=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){K=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(T);
+if(K){f.saveLevel=10;try{null!=P&&P.headRevisionId==L?("1"==urlParams.test&&V!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),V=P.etag,U(E)):q({error:{code:412}},P)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(P){window.clearTimeout(T);K&&(f.saveLevel=11,q(P))}))}});if(O&&null==C){f.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var E=this.thumbnailWidth/t.width,K=document.createElement("canvas");
+K.width=this.thumbnailWidth;K.height=Math.floor(t.height*E);K.getContext("2d").drawImage(t,0,0,K.width,K.height);var T=K.toDataURL();T=T.substring(T.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:T,mimeType:"image/png"};X(!1)}catch(P){try{X(!1)}catch(Q){x(Q)}}});t.src="data:image/png;base64,"+W}else X(!1)}catch(E){x(E)}});if(O){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||O||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);
@@ -12461,26 +12463,26 @@ f+"/contents/"+c+"?ref="+m+g,null,"HEAD");this.executeRequest(e,mxUtils.bind(thi
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(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=
+n))}catch(L){m(L)}}),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(){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();
+function(){M()})],[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;M()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),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("/");L()}),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,M()):this.ui.hideDialog()}),null,{})}),z=null,A=null,L=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(){L(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,M();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");L()}}),"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,L()):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)}),O=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(){O(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;M()}),"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="",L();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="";L()})));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)}),M=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(){M(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,O()):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="";L()}),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};
+m=N.name;v="";O(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)});M()};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";
@@ -12495,12 +12497,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,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==
+"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 L=document.createElement("div");L.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!=A){var M=document.createElement("img");
+M.src=A.url;M.width=A.width;M.height=A.height;M.style="border: 1px solid black;margin:5px;vertical-align:middle";O.appendChild(M)}mxUtils.write(O,y);mxEvent.addListener(O,"click",z);L.appendChild(O);return L}),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(L){d.appendChild(g(L.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+L.id)}),null!=L.previews?L.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()};
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:y-1},mxUtils.bind(this,function(L){this.ui.spinner.stop();L=null!=L?L.cards:null;if(null==L||0==L.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==y&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var M=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(M.container,300,80,!0,!1);M.init()}))),mxUtils.br(d));for(var O=0;O<L.length;O++)mxUtils.bind(this,function(M){d.appendChild(g(M.name,mxUtils.bind(this,function(){b?(f=M.id,l()):(this.ui.hideDialog(),e(M.id))})))})(L[O]);100==L.length&&(d.appendChild(p),q=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&z()},mxEvent.addListener(d,"scroll",q))}}),mxUtils.bind(this,function(L){401==L.status?this.authenticate(A,k,!0):null!=k&&k({message:L.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=
@@ -12512,11 +12514,11 @@ 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,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)}}),
+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(L){try{z(this.getFileContent(JSON.parse(L.getText())))}catch(O){A(O)}}),
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,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()}))}),
+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(L){try{var O=JSON.parse(L.getText());c(this.createGitLabFile(p,q,x,null!=O.content?O.content:O,n,k))}catch(M){m(M)}}),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(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);
@@ -12524,40 +12526,40 @@ this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(e.meta.last_commit_id,x)}
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(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=
+null;M()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),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("/");L()}),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,
+M()):this.ui.hideDialog()}))}),z=null,A=null,L=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(){L(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,M();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");L()}}),"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,
+R.type?(v=R.path,L()):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)}),O=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(){O(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;M()}),"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="",L();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="";L()})));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 M=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&&M(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+
+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("/")),L()):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 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="",O(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(K){E.appendChild(q(K.name_with_namespace,
+mxUtils.bind(this,function(){0===B&&(c=U.full_path,m=K.path,v="",O(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?M():this.updateUser(function(){M()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){M()},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(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,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+")":""));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">'+
+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(P,Q){Q=Q||document;return Q.querySelector(P)}function z(P,Q,S){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)S();else{c(P.id,P.parentReference.driveId,function(da){z(da,Q,S)},S);return}var Y=new XMLHttpRequest;Y.open("GET",P["@microsoft.graph.downloadUrl"]);var ca=P.file?"image/png"==P.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var da=Y.responseText;
+ca&&(da="data:image/png;base64,"+Editor.base64Encode(da),da=Editor.extractGraphModelFromPng(da));var Z=mxUtils.parseXml(da),ha="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=ha){Q(ha.ownerDocument);return}}catch(aa){}S()}};ca&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function A(){p&&null!=F?I.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");v(H,P);n(H)},400,
+null,null,function(P){console.log(P)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function L(P){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==P||P.folder||/\.drawiolib$/.test(P.name))Q(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),U=P,N.spin(E),z(P,function(S){N.stop();
+if(U==P)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 O(){var P=y(".odFilesBreadcrumb");if(null!=P){P.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"));P.appendChild(S);(function(ca,da){S.addEventListener("click",function(){e(null);J=J.slice(0,da);u(ca.driveId,ca.folderId,ca.siteId,ca.name)})})(J[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";P.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")),P.appendChild(Q))}}function M(){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 P=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||R,S=H.id;P?u(Q,S,null,H.name):A()}}function u(P,Q,S,Y,ca){function da(oa){N.stop();var Ba=document.createElement("table");Ba.className="odFileListGrid";for(var Aa=null,Ha=0,Na=0;null!=oa&&Na<oa.length;Na++){var Ga=oa[Na];if(1!=ha||!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);ha&&(Ga.folder=2==ha?{isRoot:!0}:!0);var La=null!=Ga.folder;if(!g||La){var za=document.createElement("tr");za.className=Ha++%2?"odOddRow":"odEvenRow";var ya=document.createElement("td");ya.style.width="36px";var qa=document.createElement("img");qa.src="/images/"+(La?"folder.png":"file.png");qa.className="odFileImg";ya.appendChild(qa);za.appendChild(ya);ya=document.createElement("td");
+La=document.createElement("div");La.className="odFileTitle";La.innerHTML=mxUtils.htmlEntities(Fa);La.setAttribute("title",Ea);ya.appendChild(La);za.appendChild(ya);Ba.appendChild(za);null==Aa&&(Aa=za,Aa.className+=" odRowSelected",H=Ga,R=P,x||e(H));(function(fa,ra){za.addEventListener("dblclick",M);za.addEventListener("click",function(){Aa!=ra&&(Aa.className=Aa.className.replace("odRowSelected",""),Aa=ra,Aa.className+=" odRowSelected",H=fa,R=P,x||e(H))})})(Ga,za)}}}0==Ha?(oa=document.createElement("div"),
+oa.className="odEmptyFolder",oa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ta.appendChild(oa)):ta.appendChild(Ba);O();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,ha=0;V=arguments;var aa=setTimeout(function(){W=Z=!1;N.stop();d(mxResources.get("timeout"))},2E4),ta=y(".odFilesList");ta.innerHTML="";N.spin(ta);switch(P){case "recent":J=[{name:mxResources.get("recent",
+null,"Recent"),driveId:P}];var la=m()||{};var Ca=[],Da;for(Da in la)Ca.push(la[Da]);clearTimeout(aa);da(Ca);return;case "shared":la="/me/drive/sharedWithMe";J=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:P}];break;case "sharepoint":la="/sites?search=";J=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:P}];ha=1;break;case "site":J.push({name:Y,driveId:P,folderId:Q,siteId:S});la="/sites/"+S+"/drives";ha=2;break;case "subsite":J.push({name:Y,driveId:P,
+folderId:Q,siteId:S});la="/drives/"+S+(Q?"/items/"+Q:"/root")+"/children";break;case "search":P=R;J=[{driveId:P,name:mxResources.get("back",null,"Back")}];ca=encodeURIComponent(ca.replace(/'/g,"\\'"));la=P?"/drives/"+P+"/root/search(q='"+ca+"')":"/me/drive/root/search(q='"+ca+"')";break;default:null==Q?J=[{driveId:P}]:J.push({name:Y,driveId:P,folderId:Q}),la=(P?"/drives/"+P:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}ha||(la+=(0<la.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
+f(la,function(oa){if(Z){clearTimeout(aa);oa=oa.value||[];for(var Ba=x||ha?oa:[],Aa=0;!ha&&!x&&Aa<oa.length;Aa++){var Ha=oa[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))&&Ba.push(Ha)}da(Ba)}},function(oa){if(Z){clearTimeout(aa);var Ba=null;try{Ba=JSON.parse(oa.responseText).error.message}catch(Aa){}d(mxResources.get("errorFetchingFolder",
+null,"Error fetching folder items")+(null!=Ba?" ("+Ba+")":""));W=!1;N.stop()}})}}function D(P){K.className=K.className.replace("odCatSelected","");K=P;K.className+=" odCatSelected"}function B(P){W||(T=null,u("search",null,null,null,P))}var C="";null==e&&(e=L,C='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var P=null;try{P=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return P});null==n&&(n=function(P){if(null!=P){var Q=m()||{};delete P["@microsoft.graph.downloadUrl"];
+Q[P.id]=P;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>'+
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 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)},
+C;var E=y(".odPreview"),K=y("#odFiles");b=function(P,Q){Q=Q||document;return Q.querySelectorAll(P)}(".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(P){var Q=this;null!=T&&clearTimeout(T);13==P.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?
@@ -12576,12 +12578,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 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||
+App.main=function(b,e){function f(l){mxUtils.getAll("1"!=urlParams.dev?[l]:[l,STYLE_PATH+"/default.xml"],function(p){function q(){var M=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(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"],
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(M);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[M,(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(M){if(null!=M)for(var u=0;u<M.length;u++)if(!y[M[u]])throw Error(mxResources.get("invalidInput")+
+' "'+M[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 L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var O=JSON.parse(L);for(z in A.merge)O[z]=A.merge[z];A=O}catch(M){window.location.hash="",alert(M)}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(M){window.location.hash="",alert(M)}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)||
@@ -12643,7 +12645,7 @@ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxVie
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(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),
+z=Math.min(1,Math.min(3*b/(4*q.height),z));var A=Math.floor(q.x),L=Math.floor(q.y);p.setAttribute("width",Math.ceil(z*(q.width+4)));p.setAttribute("height",Math.ceil(z*(q.height+4)));var O=p.getContext("2d");O.scale(z,z);O.translate(-A,-L);var M=v.background;if(null==M||""==M||M==mxConstants.NONE)M="#ffffff";O.save();O.fillStyle=M;O.fillRect(A,L,Math.ceil(q.width+4),Math.ceil(q.height+4));O.restore();if(null!=d){var u=new Image;u.src=d.src;O.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")])),
@@ -12718,14 +12720,14 @@ 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 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!=e&&this.sidebar.showEntries(e);if(null!=m){for(var z=[],A=m.split(";"),L=0;L<A.length;L++)z.push(decodeURIComponent(A[L]));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 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.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("."),L=z.lastIndexOf("/");A>L&&0<L&&(z=z.substring(L+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()&&
@@ -12734,10 +12736,10 @@ v=this.getCurrentFile(),d=mxUtils.bind(this,function(){m||null==v||!v.isModified
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(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()}};
+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(L){m[l]=L;c--;v()}),q=mxUtils.bind(this,function(L){f(k,L);c--;v()}),x=k.substring(0,1);if("L"==x)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var L=decodeURIComponent(k.substring(1));StorageFile.getFileContent(this,L,mxUtils.bind(this,function(O){".scratchpad"==L&&null==
+O&&(O=this.emptyLibraryXml);null!=O?p(new StorageLibrary(this,O,L)):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(L){null!=L&&0<L.length?p(new UrlLibrary(this,L,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(L){try{p(new RemoteLibrary(this,
+L,z))}catch(O){q()}}),function(){q()})}catch(L){q()}}else if("S"==x&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(k.substring(1)),function(L){p(L)},q)}catch(L){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(L){try{p(L)}catch(O){q()}}),function(L){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=
@@ -12836,7 +12838,7 @@ function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,f
"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<
+D,mxUtils.bind(this,function(){var K=null;if(!u){K=parseInt(R.value);var T=parseInt(J.value);K=F.checked||K==N&&T==N?null:{from:Math.max(0,Math.min(G-1,K-1)),to:Math.max(0,Math.min(G-1,T-1))}}c.downloadFile("pdf",null,null,!V.checked,u?!0:!F.checked&&null==K,!U.checked,null!=t&&t.checked,null,null,X.checked,null!=E&&E.checked,K)}),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=
@@ -12863,48 +12865,49 @@ function(G){var N=""==G?mxResources.get("automatic"):mxLanguageMap[G],I=null;""!
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.executeLayouts(m.createLayouts(B));c.customLayoutConfig=B;c.hideDialog()}catch(C){c.handleError(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;c.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(C){B.spacing=C;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 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")});
+c.executeLayouts(m.createLayouts(B));c.customLayoutConfig=B;c.hideDialog()}catch(C){c.handleError(C)}},null,null,null,null,function(D,B){var C=mxUtils.button(mxResources.get("copy"),function(){try{var G=B.value;B.value=JSON.stringify(JSON.parse(G));B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));B.value=G}catch(N){c.handleError(N)}});C.setAttribute("title",
+"copy");C.className="geBtn";D.appendChild(C)},!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),K=t.getDefaultParent();1<t.model.getChildCount(t.getSelectionCell())&&(K=t.getSelectionCell());E.execute(K);
+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;c.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(C){B.spacing=C;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 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==K[T]){if(K[T]=!0,null!=J[T]){for(;0<J[T].length;){var P=J[T].pop();H(P)}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 K={};null==V?mxLog.debug(R+": No root"):(H(V),Object.keys(K).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 K=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;K&&E.writeln(U);E.writeln("</body>");E.writeln("</html>");E.close();if(!K){var T=t.document.createElement("div");T.marginLeft="26px";T.marginTop="26px";mxUtils.write(T,mxResources.get("updatingDocument"));K=t.document.createElement("img");K.setAttribute("src",window.location.protocol+"//"+
+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");K.style.marginLeft="6px";T.appendChild(K);t.document.body.insertBefore(T,t.document.body.firstChild);window.setTimeout(function(){var P=document.createElement("script");P.type="text/javascript";P.src=/<script.*?src="(.*?)"/.exec(U)[1];E.body.appendChild(P);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)});
+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,K){t=U?Math.min(1,Math.min(c.maxImageSize/E,c.maxImageSize/K)):1;c.importFile(N,I,W,J,Math.round(E*t),Math.round(K*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")+
@@ -12941,10 +12944,10 @@ D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.s
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||
+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 L=l.funct;l.funct=
+function(u,D){L.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",
+["-","fullscreen"],D)})));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});var M="1"==urlParams.enableStoreBkp;l=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();M=!M});l.setToggleAction(!0);l.setSelectedCallback(function(){return M});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=
@@ -12957,16 +12960,16 @@ this.addMenuItems(u,["moveToFolder"],D)));u.addSeparator(D);this.addSubmenu("imp
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)+"@"+
+"1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],"cells",[E.cellEditor.getEditingCell()]))},function(){E.updateLabelElements(E.getSelectionCells(),function(K){K.removeAttribute("face");K.style.fontFamily=null;"PRE"==K.nodeName&&E.replaceElement(K,"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(K){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 P=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=P&&0<P.length)for(T=0;T<P.length;T++)if(P[T].name==J){P.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,P,Q);this.editorUi.editor.graph.model.execute(T)}this.editorUi.hideCurrentMenu();mxEvent.consume(K)})));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,
+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(K){return K.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(K,T,P){null!=E&&(J.cellEditor.restoreSelection(E),E=null);if(null!=K&&0<K.length)if("1"!=urlParams["ext-fonts"]&&J.isEditing())J.setFont(K,T);else{J.getModel().beginUpdate();try{J.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,K),J.setCellStyles("fontSource",null!=T?encodeURIComponent(T):null),J.setCellStyles("FType",
+null)):(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,K),"s"!=P&&(J.setCellStyles("FType",P),0==T.indexOf("http://")&&(T=PROXY_URL+"?url="+encodeURIComponent(T)),this.editorUi.editor.graph.addExtFont(K,T)));P=!0;for(var Q=0;Q<this.customFonts.length;Q++)if(this.customFonts[Q].name==K){P=!1;break}P&&(this.customFonts.push({name:K,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"))};
@@ -13042,28 +13045,28 @@ function(c,m){this.model.beginUpdate();try{var n=[];this.traverse(m,!0,mxUtils.b
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?
+!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 K=mxRectangle.fromRectangle(t);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?K.x+=(R?H.geometry.width+10:-V[1].geometry.width-10)*E:K.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 P=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&&(P&&R!=Y.getCenterX()<t.getCenterX()||!P&&R!=Y.getCenterY()<t.getCenterY())&&mxUtils.intersects(K,Y)&&(J=10+Math.max(J,(Math.min(K.x+K.width,Y.x+Y.width)-Math.max(K.x,Y.x))/E),X=10+Math.max(X,(Math.min(K.y+
+K.height,Y.y+Y.height)-Math.max(K.y,Y.y))/E))}}P?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&&(P&&R!=Y.getCenterX()<t.getCenterX()||!P&&R!=Y.getCenterY()<t.getCenterY()))){var ca=[];y.traverse(Y.cell,!0,function(da,Z){var ha=null!=Z&&y.isTreeEdge(Z);ha&&ca.push(Z);(null==Z||ha)&&ca.push(da);return null==Z||ha});y.moveCells(ca,(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(K,T){var P=null!=T&&y.isTreeEdge(T);P&&X.push(T);(null==T||P)&&X.push(K);return null==T||P});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-
+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 K=W.geometry;R=[];y.view.currentRoot==W&&(K=new mxRectangle);for(X=0;X<J.length;X++){var T=y.model.getTerminal(J[X],!1);null!=T&&R.push(T)}var P=y.view.getBounds(R),Q=y.view.translate,S=y.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(U[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(P.x+P.width)/S-Q.x-K.x+10,U[1].geometry.y+=U[1].geometry.height-K.y+40):V==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(P.x+P.width)/S-Q.x+-K.x+10,U[1].geometry.y-=U[1].geometry.height+K.y+40):(U[1].geometry.x=V==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==P?H.geometry.y+
+(H.geometry.height-U[1].geometry.height)/2:(P.y+P.height)/S-Q.y+-K.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=
+var L=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 L.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 O=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=O.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 M=y.moveCells;y.moveCells=function(H,R,W,J,V,U,X){var t=null;this.model.beginUpdate();try{var E=V,K=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"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)){V=y.model.getParent(H[T]);break}if(null!=E&&V!=E&&null!=this.view.getState(H[0])){var P=y.getIncomingTreeEdges(H[0]);if(0<P.length){var Q=y.view.getState(y.model.getTerminal(P[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=M.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])&&(P=y.getIncomingTreeEdges(H[T]),0<P.length))if(!J)c(E)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],E,!0);else if(0==y.getIncomingTreeEdges(t[T]).length){K=E;if(null==K||K==y.model.getParent(H[T]))K=y.model.getTerminal(P[0],!0);J=this.cloneCell(P[0]);this.addEdge(J,y.getDefaultParent(),K,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=
+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),K=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):K==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 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,
@@ -13129,9 +13132,9 @@ G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-C.height/2+16;return G}
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);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=
+null);A.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){L.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 O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=O.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 M=Menus.prototype.init;Menus.prototype.init=function(){M.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)},
@@ -13142,127 +13145,127 @@ J,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,functio
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("insertAdvanced",U,X,mxResources.get("advanced")),B.menus.addSubmenu("layout",U,X)):(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?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(),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;";
+"1"!=urlParams.noFileMenu&&B.menus.addSubmenu("importFrom",J,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);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("insertAdvanced",U,X,mxResources.get("advanced")),B.menus.addSubmenu("layout",U,X)):(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(ba,ea,ma){var ja=F.menus.get(ba),
+na=J.addMenu(mxResources.get(ba),mxUtils.bind(this,function(){ja.funct.apply(this,arguments)}),W);na.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";na.style.display="inline-block";na.style.boxSizing="border-box";na.style.top="6px";na.style.marginRight="6px";na.style.height="30px";na.style.paddingTop="6px";na.style.paddingBottom="6px";na.style.cursor="pointer";na.setAttribute("title",mxResources.get(ba));F.menus.menuCreated(ja,na,"geMenuItem");null!=ma?(na.style.backgroundImage="url("+
+ma+")",na.style.backgroundPosition="center center",na.style.backgroundRepeat="no-repeat",na.style.backgroundSize="24px 24px",na.style.width="34px",na.innerHTML=""):ea||(na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",na.style.backgroundPosition="right 6px center",na.style.backgroundRepeat="no-repeat",na.style.paddingRight="22px");return na}function C(ba,ea,ma,ja,na,ua){var ka=document.createElement("a");ka.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ka.style.display=
+"inline-block";ka.style.boxSizing="border-box";ka.style.height="30px";ka.style.padding="6px";ka.style.position="relative";ka.style.verticalAlign="top";ka.style.top="0px";"1"==urlParams.sketch&&(ka.style.borderStyle="none",ka.style.boxShadow="none",ka.style.padding="6px",ka.style.margin="0px");null!=F.statusContainer?R.insertBefore(ka,F.statusContainer):R.appendChild(ka);null!=ua?(ka.style.backgroundImage="url("+ua+")",ka.style.backgroundPosition="center center",ka.style.backgroundRepeat="no-repeat",
+ka.style.backgroundSize="24px 24px",ka.style.width="34px"):mxUtils.write(ka,ba);mxEvent.addListener(ka,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ja){Ja.preventDefault()}));mxEvent.addListener(ka,"click",function(Ja){"disabled"!=ka.getAttribute("disabled")&&ea(Ja);mxEvent.consume(Ja)});null==ma&&(ka.style.marginRight="4px");null!=ja&&ka.setAttribute("title",ja);null!=na&&(ba=function(){na.isEnabled()?(ka.removeAttribute("disabled"),ka.style.cursor="pointer"):(ka.setAttribute("disabled",
+"disabled"),ka.style.cursor="default")},na.addListener("stateChanged",ba),H.addListener("enabledChanged",ba),ba());return ka}function G(ba,ea,ma){ma=document.createElement("div");ma.className="geMenuItem";ma.style.display="inline-block";ma.style.verticalAlign="top";ma.style.marginRight="6px";ma.style.padding="0 4px 0 4px";ma.style.height="30px";ma.style.position="relative";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.boxShadow="none");for(var ja=0;ja<ba.length;ja++)null!=ba[ja]&&("1"==urlParams.sketch&&
+(ba[ja].style.padding="10px 8px",ba[ja].style.width="30px"),ba[ja].style.margin="0px",ba[ja].style.boxShadow="none",ma.appendChild(ba[ja]));null!=ea&&mxUtils.setOpacity(ma,ea);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(ma,F.statusContainer):R.appendChild(ma);return ma}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>T.offsetTop-T.offsetHeight/2?"70px":"10px");else{for(var ba=R.firstChild;null!=ba;){var ea=ba.nextSibling;"geMenuItem"!=ba.className&&
+"geItem"!=ba.className||ba.parentNode.removeChild(ba);ba=ea}W=R.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ba=1E3>c||"1"==urlParams.sketch;var ma=null;ba||(ma=B("diagram"));ea=ba?B("diagram",null,Editor.drawLogoImage):null;null!=ea&&(ma=ea);G([ma,C(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ba?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"),ba?Editor.formatImage:null)],ba?60:null);ea=B("insert",!0,ba?E:null);G([ea,C(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ba?Editor.trashImage:null)],ba?60:null);411<=c&&(G([Na,Ga],60),520<=c&&G([ra,640<=c?C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):null,640<=c?C("",oa.funct,!0,mxResources.get("zoomOut")+
+" ("+Editor.ctrlKey+" -)",oa,Editor.zoomOutImage):null],60))}null!=ma&&(mxEvent.disableContextMenu(ma),mxEvent.addGestureListeners(ma,mxUtils.bind(this,function(ja){(mxEvent.isShiftDown(ja)||mxEvent.isAltDown(ja)||mxEvent.isMetaDown(ja)||mxEvent.isControlDown(ja)||mxEvent.isPopupTrigger(ja))&&F.appIconClicked(ja)}),null,null));ea=F.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==wa&&(ea=J.addMenu("",ea.funct),ea.setAttribute("title",
+mxResources.get("language")),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition="center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="24px 24px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(ea),wa=ea),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight=
+"4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=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 ba=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),ma=F.embedViewport.x+F.embedViewport.width,ja=parseInt(this.div.offsetTop),na=parseInt(this.div.offsetHeight),ua=F.embedViewport.y+F.embedViewport.height;
+this.div.style.left=Math.max(F.embedViewport.x,Math.min(ba,ma-ea))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(ja,ua-na))+"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(),
+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 ba=F.getCurrentFile();if(null!=
+ba&&null!=ba.getTitle()){var ea=ba.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);R.setAttribute("title",ba.getTitle()+(null!=ea?" ("+ea+")":""))}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";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-
+"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)}t=
+F.menus.get("viewZoom");var E="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,K="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});F.addListener("darkModeChanged",Q);F.addListener("sketchModeChanged",Q);var S=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)P.style.left=
+"10px",P.style.top="10px",T.style.left="10px",T.style.top="60px",K.style.top="10px",K.style.right="12px",K.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 ba=F.diagramContainer.getAttribute("data-bounds");if(null!=ba){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var ea=H.getGraphBounds();ba=ba.split(" ");F.diagramContainer.style.top=ba[0];F.diagramContainer.style.left=ba[1];F.diagramContainer.style.width=ea.width+50+"px";F.diagramContainer.style.height=ea.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()}P.style.left=F.diagramContainer.offsetLeft+"px";P.style.top=F.diagramContainer.offsetTop-P.offsetHeight-4+"px";T.style.display="";T.style.left=F.diagramContainer.offsetLeft-T.offsetWidth-4+"px";T.style.top=F.diagramContainer.offsetTop+"px";K.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-K.offsetWidth+"px";K.style.top=P.style.top;K.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";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&&"atlassian"!=F.getServiceName())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(){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+")",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",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(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,
+F.bottomResizer.style.visibility;R.style.display="none";P.style.visibility="";K.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()});Q=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var ba=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ba.x+
+ba.width+4,ba.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",Q);F.addListener("editInlineStop",mxUtils.bind(this,function(ba){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";P.style.visibility="hidden";K.style.visibility="hidden";T.style.display="none"}));if(null!=
+F.hoverIcons){var ca=F.hoverIcons.update;F.hoverIcons.update=function(){H.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=H.freehand){var da=H.freehand.createStyle;H.freehand.createStyle=function(ba){return da.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){T.className="geToolbarContainer";K.className="geToolbarContainer";P.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=T;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(R,
+"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(R,"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var ha=mxUtils.bind(this,function(ba){null!=F.notificationBtn&&(null!=ba?F.notificationBtn.setAttribute("title",ba):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&&
+"atlassian"!=F.getServiceName())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 ba=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):
+F.editor.getStatus();ha(ba);var ea=F.getCurrentFile();ea=null!=ea?ea.savingStatusKey:DrawioFile.prototype.savingStatusKey;ba==mxResources.get(ea)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ea))+'..."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",ha(null),Z=!0;R.style.visibility=20>R.clientWidth&&
+!Z?"hidden":""}}));fa=B("diagram",null,Editor.menuImage);fa.style.boxShadow="none";fa.style.padding="6px";fa.style.margin="0px";P.appendChild(fa);mxEvent.disableContextMenu(fa);mxEvent.addGestureListeners(fa,mxUtils.bind(this,function(ba){(mxEvent.isShiftDown(ba)||mxEvent.isAltDown(ba)||mxEvent.isMetaDown(ba)||mxEvent.isControlDown(ba)||mxEvent.isPopupTrigger(ba))&&this.appIconClicked(ba)}),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 ta=!1,la=mxUtils.bind(this,function(){T.innerHTML="";if(!ta){var ba=function(ja,na,ua){ja=C("",ja.funct,null,na,ja,ua);ja.style.width="40px";ja.style.opacity="0.7";return ea(ja,null,"pointer")},ea=function(ja,na,ua){null!=na&&ja.setAttribute("title",na);ja.style.cursor=null!=
+ua?ua:"default";ja.style.margin="2px 0px";T.appendChild(ja);mxUtils.br(T);return ja};ea(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)");ea(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"));ea(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ea(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ja=new mxCell("",new mxGeometry(0,0,H.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+ja.geometry.setTerminalPoint(new mxPoint(0,0),!0);ja.geometry.setTerminalPoint(new mxPoint(ja.geometry.width,0),!1);ja.geometry.points=[];ja.geometry.relative=!0;ja.edge=!0;ea(F.sidebar.createEdgeTemplateFromCells([ja],ja.geometry.width,ja.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ja=ja.clone();ja.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ja.geometry.width=H.defaultEdgeLength+20;ja.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);ja.geometry.setTerminalPoint(new mxPoint(ja.geometry.width,20),!1);ja=ea(F.sidebar.createEdgeTemplateFromCells([ja],ja.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ja.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ja.style.paddingBottom="14px";ja.style.marginBottom="14px"})();ba(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var ma=F.actions.get("toggleShapes");ba(ma,mxResources.get("shapes")+
+" ("+ma.shortcut+")",E);fa=B("table",null,Editor.calendarImage);fa.style.boxShadow="none";fa.style.opacity="0.7";fa.style.padding="6px";fa.style.margin="0px";fa.style.width="37px";ea(fa,null,"pointer");fa=B("insert",null,Editor.plusImage);fa.style.boxShadow="none";fa.style.opacity="0.7";fa.style.padding="6px";fa.style.margin="0px";fa.style.width="37px";ea(fa,null,"pointer")}"1"!=urlParams.embedInline&&T.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){ta?(mxUtils.setPrefixedStyle(T.style,
+"transform","translate(0, -50%)"),T.style.padding="8px 6px 4px",T.style.top="50%",T.style.bottom="",T.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),ta=!1,la()):(T.innerHTML="",T.appendChild(aa),mxUtils.setPrefixedStyle(T.style,"transform","translate(0, 0)"),T.style.top="",T.style.bottom="12px",T.style.padding="0px",T.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
+"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",ta=!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!=t){var Ca=function(ba){mxEvent.isShiftDown(ba)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ba)):mxEvent.isAltDown(ba)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
+mxEvent.consume(ba))},Da=F.actions.get("zoomIn"),oa=F.actions.get("zoomOut"),Ba=F.actions.get("resetView");Q=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("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=K){Ba=function(){qa.style.display=null!=F.pages&&
+("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Ea=function(){qa.innerHTML="";if(null!=F.currentPage){mxUtils.write(qa,F.currentPage.getName());var ba=null!=F.pages?F.pages.length:1,ea=F.getPageIndex(F.currentPage);ea=null!=ea?ea+1:1;var ma=F.currentPage.getId();qa.setAttribute("title",F.currentPage.getName()+" ("+ea+"/"+ba+")"+(null!=ma?" ["+ma+"]":""))}};Fa.parentNode.removeChild(Fa);var La=F.actions.get("delete"),za=C("",La.funct,null,mxResources.get("delete"),
+La,Editor.trashImage);za.style.opacity="0.1";P.appendChild(za);La.addListener("stateChanged",function(){za.style.opacity=La.enabled?"":"0.1"});var ya=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"};P.appendChild(Na);P.appendChild(Ga);Aa.addListener("stateChanged",ya);Ha.addListener("stateChanged",ya);ya();var qa=this.createPageMenuTab(!1,
+!0);qa.style.display="none";qa.style.position="";qa.style.marginLeft="";qa.style.top="";qa.style.left="";qa.style.height="100%";qa.style.lineHeight="";qa.style.borderStyle="none";qa.style.padding="3px 0";qa.style.margin="0px";qa.style.background="";qa.style.border="";qa.style.boxShadow="none";qa.style.verticalAlign="top";qa.style.width="auto";qa.style.maxWidth="160px";qa.style.position="relative";qa.style.padding="6px";qa.style.textOverflow="ellipsis";qa.style.opacity="0.8";K.appendChild(qa);F.editor.addListener("pagesPatched",
+Ea);F.editor.addListener("pageSelected",Ea);F.editor.addListener("pageRenamed",Ea);F.editor.addListener("fileLoaded",Ea);Ea();F.addListener("fileDescriptorChanged",Ba);F.addListener("pagesVisibleChanged",Ba);F.editor.addListener("pagesPatched",Ba);Ba();Ba=C("",oa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",oa,Editor.zoomOutImage);K.appendChild(Ba);var fa=J.addMenu("100%",t.funct);fa.setAttribute("title",mxResources.get("zoom"));fa.innerHTML="100%";fa.style.display=
+"inline-block";fa.style.color="inherit";fa.style.cursor="pointer";fa.style.textAlign="center";fa.style.whiteSpace="nowrap";fa.style.paddingRight="10px";fa.style.textDecoration="none";fa.style.verticalAlign="top";fa.style.padding="6px 0";fa.style.fontSize="14px";fa.style.width="40px";fa.style.opacity="0.4";K.appendChild(fa);t=C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);K.appendChild(t);Q.visible&&(K.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"),K.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;";
+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;";K.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(P);X.appendChild(K);T.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&&(T.style.touchAction="none");X.appendChild(T);window.setTimeout(function(){mxUtils.setPrefixedStyle(T.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var ra=C("",Ca,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ba,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";fa=J.addMenu("100%",
+t.funct);fa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");fa.style.whiteSpace="nowrap";fa.style.paddingRight="10px";fa.style.textDecoration="none";fa.style.textDecoration="none";fa.style.overflow="hidden";fa.style.visibility="hidden";fa.style.textAlign="center";fa.style.cursor="pointer";fa.style.height=parseInt(F.tabContainerHeight)-1+"px";fa.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";fa.style.position="absolute";fa.style.display="block";fa.style.fontSize="12px";fa.style.width=
+"59px";fa.style.right="0px";fa.style.bottom="0px";fa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";fa.style.backgroundPosition="right 6px center";fa.style.backgroundRepeat="no-repeat";X.appendChild(fa)}(function(ba){mxEvent.addListener(ba,"click",Ca);var ea=mxUtils.bind(this,function(){ba.innerHTML="";mxUtils.write(ba,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);F.editor.addListener("resetGraphView",ea);F.editor.addListener("pageSelected",
+ea)})(fa);var xa=F.setGraphEnabled;F.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(fa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==K?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==K&&X.appendChild(F.tabContainer);
+var wa=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";T.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ba){mxEvent.getSource(ba)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ba),mxEvent.getClientY(ba)),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 sa=null,va=null,ia=null,pa=null;mxEvent.addGestureListeners(I,function(ba){pa=parseInt(F.diagramContainer.style.height);va=mxEvent.getClientY(ba);H.popupMenuHandler.hideMenu();mxEvent.consume(ba)});I=I.cloneNode(!1);I.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(I);F.rightResizer=I;mxEvent.addGestureListeners(I,function(ba){ia=parseInt(F.diagramContainer.style.width);sa=mxEvent.getClientX(ba);H.popupMenuHandler.hideMenu();
+mxEvent.consume(ba)});mxEvent.addGestureListeners(document.body,null,function(ba){var ea=!1;null!=sa&&(F.diagramContainer.style.width=Math.max(20,ia+mxEvent.getClientX(ba)-sa)+"px",ea=!0);null!=va&&(F.diagramContainer.style.height=Math.max(20,pa+mxEvent.getClientY(ba)-va)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),S(),F.refresh())},function(ba){null==sa&&null==
+va||mxEvent.consume(ba);va=sa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";P.style.visibility="hidden";K.style.visibility="hidden";T.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=[],L=0;L<this.states.length;L++){var O=this.states[L];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)?z.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)&&A.push(O))}var M=0,u=0,D=O=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;L=q==z[0];x=q==z[z.length-1];if(!L&&!x)for(L=1;L<z.length-1;L++)if(q==z[L]){x=z[L-1];L=z[L+1];O=u=D=(L.y-x.y-x.height-q.height)/2;break}for(L=0;L<z.length-1;L++){x=z[L];var H=z[L+1],R=q==x||q==H;H=H.y-x.y-x.height;F|=q==x;if(0==u&&0==
+M)u=H,M=1;else if(Math.abs(u-H)<=(R||1==L&&F?y:0))M+=1;else if(1<M&&F){z=z.slice(0,L+1);break}else if(3<=z.length-L&&!F)M=0,O=u=0!=D?D:0,z.splice(0,0==L?1:L),L=-1;else break;0!=O||R||(u=O=H)}3==z.length&&z[1]==q&&(O=0)}if(1<A.length){A.push(q);A.sort(function(W,J){return W.x-J.x});F=!1;L=q==A[0];x=q==A[A.length-1];if(!L&&!x)for(L=1;L<A.length-1;L++)if(q==A[L]){x=A[L-1];L=A[L+1];G=C=N=(L.x-x.x-x.width-q.width)/2;break}for(L=0;L<A.length-1;L++){x=A[L];H=A[L+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==L&&F?y:0))B+=1;else if(1<B&&F){A=A.slice(0,L+1);break}else if(3<=A.length-L&&!F)B=0,G=C=0!=N?N:0,A.splice(0,0==L?1:L),L=-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;L=A[0]==q?1:0;F=A[L].y+A[L].height;if(0<G)for(L=0;L<A.length-1;L++)x=
+A[L],H=A[L+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],L=A[2],g=x.x+x.width+(L.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(L.x-I,F));for(L=0;L<k.length;L+=2)A=k[L],G=k[L+1],A=y(A,G,null!=N?
+N[L/2]:null),A.node.style.visibility="visible",A.redraw(),B.push(A);for(L=k.length/2;null!=N&&L<N.length;L++)N[L].destroy();p.guidesArrHor=B;g-=c.x;k=!0}else C(!0);if(1<M&&M==z.length-1){B=[];N=p.guidesArrVer;l=[];d=0;L=z[0]==q?1:0;M=z[L].x+z[L].width;if(0<O)for(L=0;L<z.length-1;L++)x=z[L],H=z[L+1],q==x?(d=H.y-x.height-O,l.push(new mxPoint(M,d+x.height+I)),l.push(new mxPoint(M,H.y-I))):q==H?(l.push(new mxPoint(M,x.y+x.height+I)),d=x.y+x.height+O,l.push(new mxPoint(M,d-I))):(l.push(new mxPoint(M,x.y+
+x.height+I)),l.push(new mxPoint(M,H.y-I)));else x=z[0],L=z[2],d=x.y+x.height+(L.y-x.y-x.height-q.height)/2,l.push(new mxPoint(M,x.y+x.height+I)),l.push(new mxPoint(M,d-I)),l.push(new mxPoint(M,d+q.height+I)),l.push(new mxPoint(M,L.y-I));for(L=0;L<l.length;L+=2)A=l[L],G=l[L+1],A=y(A,G,null!=N?N[L/2]:null,!0),A.node.style.visibility="visible",A.redraw(),B.push(A);for(L=l.length/2;null!=N&&L<N.length;L++)N[L].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,
+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 M=b.diagramContainer;p.style.top=M.offsetTop-g+"px";p.style.left=M.offsetLeft-g+"px";p.style.width=(f?0:M.offsetWidth)+g+"px";p.style.height=(f?M.offsetHeight:0)+g+"px"}function n(M,u,D){if(null!=v)return M;var B;return function(){var C=this,G=arguments,N=D&&!B;clearTimeout(B);B=setTimeout(function(){B=null;D||M.apply(C,G)},u);N&&M.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(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;
+function(M){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(M,u,D,B,C){M=Math.round(M);u=Math.round(u);D=Math.round(D);B=Math.round(B);x.beginPath();x.moveTo(M+.5,u+.5);x.lineTo(D+.5,B+.5);x.stroke();C&&(f?(x.save(),x.translate(M,u),
+x.rotate(-Math.PI/2),x.fillText(C,0,0),x.restore()):x.fillText(C,M,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 M=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*M-y.container.scrollTop:D.x*M-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>=M||4<=M?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<=M?F=N/(2*Math.floor(M/2)):.5>=M&&(F=N*Math.floor(1/M/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*M);B<=u;B+=F*M)if(H=Math.round((B-D)/M/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)},L=-1,O=function(){null!=v?(null!=d&&d(L),L=v(A)):A()};this.drawRuler=O;this.sizeListener=e=n(function(){var M=y.container;f?(M=M.offsetHeight+g,q.height!=M&&(q.height=M,p.style.height=M+"px",O())):(M=M.offsetWidth+g,q.width!=M&&(q.width=M,p.style.width=M+"px",O()))},10);this.pageListener=function(){O()};this.scrollListener=c=n(function(){var M=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=M&&(k.lastScroll=M,O())},10);
+this.unitListener=function(M,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(M){l=M;p.style.background=l.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(M,u,D,B){if(f&&4<M.height||
+!f&&4<M.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=M.y+C.y+g-this.graph.container.scrollTop;var N=0;var I=G+M.height/2;var F=g/2;var H=G+M.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=M.x+C.x+g-this.graph.container.scrollLeft,I=g/2,F=N+M.width/2,H=0,R=N+M.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 M=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 M}}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,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)+
+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,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!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){O=I};this.setBrushSize=function(I){L.size=I};this.getBrushSize=function(){return L.size};var M=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(){M(!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;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+I+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var I=[],F=0;F<v.length;F++)null!=v[F]&&I.push([v[F].x,v[F].y]);I=PerfectFreehand.getStroke(I,L);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(K){if(null==K)return K;K.x=(K.x-H)*J;K.y=(K.y-W)*V;return K});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"+
+b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}M(!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",O?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",O?PerfectFreehand.getSvgPathFromStroke([[I.x,I.y]],L):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),O){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,L))}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()||
+else{U=function(){var P=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,K));T.style.opacity=P!=E||Q!=K?0:1;J.cursor.style.left=P+"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,K=(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=M[t];null==Y&&(Y=p%x.length,M[t]=Y,p++);var ca=x[Y];Y=11<Y?"black":"white";y[t]={cursor:document.createElement("div"),color:ca,selection:{}};L[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 da=document.createElement("img");mxUtils.setPrefixedStyle(da.style,"transform","rotate(-45deg)translateX(-14px)");da.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ca+'" fill="'+ca+'"/>').src);da.style.width="10px";E.appendChild(da);da=document.createElement("div");da.style.backgroundColor=ca;da.style.color=Y;da.style.fontSize="9pt";da.style.padding=
+"3px 7px";da.style.marginTop="8px";da.style.borderRadius="10px";da.style.maxWidth="100px";da.style.overflow="hidden";da.style.textOverflow="ellipsis";da.style.whiteSpace="nowrap";mxUtils.write(da,X);E.appendChild(da);b.diagramContainer.appendChild(E)}else E=y[t].cursor;K=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,K;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 P=null!=b.currentPage?b.currentPage.getId():null;if(null==
+P||null!=T.pageId&&T.pageId==P){U();for(P=0;P<T.removed.length;P++){var Q=T.removed[P];if(null!=Q){var S=K[Q];delete K[Q];null!=S&&S.destroy()}}for(P=0;P<T.added.length;P++)Q=T.added[P],null!=Q&&(S=l.model.getCell(Q),null!=S&&(K[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&&O[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,O[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(L[J]),delete B[J])});U.on("data",v);return D[J]=U}}function g(J,V){k(V||L[J]);null!=J&&(delete L[J],O[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={},L={},O={},M={},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,K=function(){U=null;X=Date.now();J.apply(t,E)};Date.now()-X>V?K():U=setTimeout(K,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",
+[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],O[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,
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 8b224dce..08ce4fbe 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -7159,8 +7159,12 @@ var FindWindow = function(ui, x, y, w, h, withReplace)
if (re != null)
{
var result = label.match(re);
- lblMatch = result[0].toLowerCase();
- lblMatchPos = lblPosShift + result.index + lblMatch.length;
+
+ if (result != null && result.length > 0)
+ {
+ lblMatch = result[0].toLowerCase();
+ lblMatchPos = lblPosShift + result.index + lblMatch.length;
+ }
}
else
{
diff --git a/src/main/webapp/js/diagramly/DrawioFile.js b/src/main/webapp/js/diagramly/DrawioFile.js
index a9c412d7..8676eeed 100644
--- a/src/main/webapp/js/diagramly/DrawioFile.js
+++ b/src/main/webapp/js/diagramly/DrawioFile.js
@@ -10,7 +10,7 @@ DrawioFile = function(ui, data)
this.setData(data || '');
this.initialData = this.getData();
this.created = new Date().getTime();
-
+
// Creates the stats object
this.stats = {
opened: 0, /* number of calls to open */
@@ -551,8 +551,10 @@ DrawioFile.prototype.checksumError = function(error, patches, details, etag, fun
{
var user = this.getCurrentUser();
var uid = (user != null) ? user.id : 'unknown';
+ var id = (this.getId() != '') ? this.getId() :
+ ('(' + this.ui.hashValue(this.getTitle()) + ')');
- EditorUi.logError('Checksum Error in ' + functionName + ' ' + this.getId(),
+ EditorUi.logError('Checksum Error in ' + functionName + ' ' + id,
null, this.getMode() + '.' + this.getId(),
'user_' + uid + ((this.sync != null) ?
'-client_' + this.sync.clientId : '-nosync') +
@@ -563,7 +565,7 @@ DrawioFile.prototype.checksumError = function(error, patches, details, etag, fun
// Logs checksum error for file
try
{
- EditorUi.logEvent({category: 'CHECKSUM-ERROR-SYNC-FILE-' + this.getHash(),
+ EditorUi.logEvent({category: 'CHECKSUM-ERROR-SYNC-FILE-' + id,
action: functionName, label: 'user_' + uid + ((this.sync != null) ?
'-client_' + this.sync.clientId : '-nosync') +
'-bytes_' + JSON.stringify(patches).length +
@@ -644,38 +646,58 @@ DrawioFile.prototype.reloadFile = function(success, error)
var fn = mxUtils.bind(this, function()
{
+ EditorUi.debug('DrawioFile.reloadFile', [this], 'hash', this.getHash(),
+ 'modified', this.isModified(), 'backupPatch', this.backupPatch);
this.stats.fileReloaded++;
- // Restores view state and current page
- var viewState = this.ui.editor.graph.getViewState();
- var selection = this.ui.editor.graph.getSelectionCells();
- var page = this.ui.currentPage;
-
- this.ui.loadFile(this.getHash(), true, null, mxUtils.bind(this, function()
+ // Handles files that cannot be reloaded with hash
+ if (this.getHash() == '')
{
- if (this.ui.fileLoadedError == null)
+ this.mergeLatestVersion((this.backupPatch != null) ?
+ [this.backupPatch] : null, mxUtils.bind(this, function()
{
- this.ui.restoreViewState(page, viewState, selection);
-
- if (this.backupPatch != null)
- {
- this.patch([this.backupPatch]);
- }
-
- // Carry-over stats
- var file = this.ui.getCurrentFile();
-
- if (file != null)
- {
- file.stats = this.stats;
- }
-
+ this.backupPatch = null;
+
if (success != null)
{
success();
}
- }
- }), true);
+ }), error);
+ }
+ else
+ {
+ // Saves view state and current page
+ var graph = this.ui.editor.graph;
+ var selection = graph.getSelectionCells();
+ var viewState = graph.getViewState();
+ var page = this.ui.currentPage;
+
+ this.ui.loadFile(this.getHash(), true, null, mxUtils.bind(this, function()
+ {
+ if (this.ui.fileLoadedError == null)
+ {
+ this.ui.restoreViewState(page, viewState, selection);
+
+ if (this.backupPatch != null)
+ {
+ this.patch([this.backupPatch]);
+ }
+
+ // Carry-over stats
+ var file = this.ui.getCurrentFile();
+
+ if (file != null)
+ {
+ file.stats = this.stats;
+ }
+
+ if (success != null)
+ {
+ success();
+ }
+ }
+ }), true);
+ }
});
if (this.isModified() && this.backupPatch == null)
@@ -700,6 +722,40 @@ DrawioFile.prototype.reloadFile = function(success, error)
};
/**
+ * Loads the latest version into the file and patches it with the given patch.
+ */
+DrawioFile.prototype.mergeLatestVersion = function(patches, success, error)
+{
+ this.getLatestVersion(mxUtils.bind(this, function(latestFile)
+ {
+ this.ui.editor.graph.model.beginUpdate();
+ try
+ {
+ this.ui.replaceFileData(latestFile.getData());
+
+ if (patches != null)
+ {
+ this.patch(patches);
+ }
+ }
+ finally
+ {
+ this.ui.editor.graph.model.endUpdate();
+ }
+
+ this.invalidChecksum = false;
+ this.inConflictState = false;
+ this.setDescriptor(latestFile.getDescriptor());
+ this.descriptorChanged();
+
+ if (success != null)
+ {
+ success();
+ }
+ }), error);
+};
+
+/**
* Shows a conflict dialog to the user.
*/
DrawioFile.prototype.copyFile = function(success, error)
@@ -2331,10 +2387,9 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
this.autosaveThread = null;
}
- EditorUi.debug('DrawioFile.autosave', [this],
- 'thread', thread, 'saving', this.savingFile,
- 'modified', this.isModified(),
- 'now', this.isAutosaveNow());
+ EditorUi.debug('DrawioFile.autosave', [this], 'thread', thread,
+ 'modified', this.isModified(), 'now', this.isAutosaveNow(),
+ 'saving', this.savingFile);
// Workaround for duplicate save if UI is blocking
// after save while pending autosave triggers
@@ -2377,9 +2432,8 @@ DrawioFile.prototype.autosave = function(delay, maxDelay, success, error)
}
}), tmp);
- EditorUi.debug('DrawioFile.autosave', [this],
- 'thread', thread, 'delay', tmp,
- 'saving', this.savingFile);
+ EditorUi.debug('DrawioFile.autosave', [this], 'thread', thread,
+ 'delay', tmp, 'saving', this.savingFile);
this.autosaveThread = thread;
};
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 4c5aaeed..c9c597a3 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -1339,9 +1339,41 @@
editorUi.handleError(e);
}
}
- }, null, null, null, null, null, true, null, null,
- 'https://www.diagrams.net/doc/faq/apply-layouts');
-
+ }, null, null, null, null, function(buttons, input)
+ {
+ var copyBtn = mxUtils.button(mxResources.get('copy'), function()
+ {
+ try
+ {
+ var orig = input.value;
+ input.value = JSON.stringify(JSON.parse(orig));
+ input.focus();
+
+ if (mxClient.IS_GC || mxClient.IS_FF || document.documentMode >= 5)
+ {
+ input.select();
+ }
+ else
+ {
+ document.execCommand('selectAll', false, null);
+ }
+
+ document.execCommand('copy');
+ editorUi.alert(mxResources.get('copiedToClipboard'));
+
+ input.value = orig;
+ }
+ catch (e)
+ {
+ editorUi.handleError(e);
+ }
+ });
+
+ copyBtn.setAttribute('title', 'copy');
+ copyBtn.className = 'geBtn';
+ buttons.appendChild(copyBtn);
+ }, true, null, null, 'https://www.diagrams.net/doc/faq/apply-layouts');
+
editorUi.showDialog(dlg.container, 620, 460, true, true);
dlg.init();
});
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index b75a1c7c..03ed2a61 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -1368,16 +1368,9 @@ EditorUi.initMinimalTheme = function()
ui.menus.addSubmenu('importFrom', menu, parent);
}
- menu.addSeparator(parent);
-
- if (urlParams['sketch'] != '1')
- {
- ui.menus.addMenuItems(menu, ['outline'], parent);
- }
-
if (ui.commentsSupported())
{
- ui.menus.addMenuItems(menu, ['comments'], parent);
+ ui.menus.addMenuItems(menu, ['-', 'comments'], parent);
}
ui.menus.addMenuItems(menu, ['-', 'findReplace', 'outline',
@@ -1551,7 +1544,7 @@ EditorUi.initMinimalTheme = function()
menu.addSeparator(parent);
- if (urlParams['sketch'] != '1' && ui.mode != App.MODE_ATLAS)
+ if (ui.mode != App.MODE_ATLAS)
{
this.addMenuItems(menu, ['fullscreen'], parent);
}
@@ -2269,7 +2262,7 @@ EditorUi.initMinimalTheme = function()
ui.picker = picker;
var statusVisible = false;
- if (urlParams['embed'] != '1')
+ if (urlParams['embed'] != '1' && ui.getServiceName() != 'atlassian')
{
mxEvent.addListener(menubar, 'mouseenter', function()
{
@@ -2556,15 +2549,17 @@ EditorUi.initMinimalTheme = function()
{
var fitFunction = function(evt)
{
- graph.popupMenuHandler.hideMenu();
-
- if (mxEvent.isAltDown(evt) || mxEvent.isShiftDown(evt))
+ if (mxEvent.isShiftDown(evt))
{
- ui.actions.get('customZoom').funct();
+ ui.hideCurrentMenu();
+ ui.actions.get('smartFit').funct();
+ mxEvent.consume(evt);
}
- else
+ else if (mxEvent.isAltDown(evt))
{
- ui.actions.get('smartFit').funct();
+ ui.hideCurrentMenu();
+ ui.actions.get('customZoom').funct();
+ mxEvent.consume(evt);
}
};
@@ -2671,10 +2666,11 @@ EditorUi.initMinimalTheme = function()
' (' + Editor.ctrlKey + ' -/Alt+Mousewheel)', zoomOutAction, Editor.zoomOutImage);
footer.appendChild(zoomOutElt);
- var elt = document.createElement('div');
+ var elt = menuObj.addMenu('100%', viewZoomMenu.funct);
+ elt.setAttribute('title', mxResources.get('zoom'));
elt.innerHTML = '100%';
- elt.setAttribute('title', mxResources.get('fitWindow') + '/' + mxResources.get('resetView') + ' (Enter)');
elt.style.display = 'inline-block';
+ elt.style.color = 'inherit';
elt.style.cursor = 'pointer';
elt.style.textAlign = 'center';
elt.style.whiteSpace = 'nowrap';
@@ -2687,8 +2683,6 @@ EditorUi.initMinimalTheme = function()
elt.style.opacity = '0.4';
footer.appendChild(elt);
- mxEvent.addListener(elt, 'click', fitFunction);
-
var zoomInElt = addMenuItem('', zoomInAction.funct, true, mxResources.get('zoomIn') +
' (' + Editor.ctrlKey + ' +/Alt+Mousewheel)', zoomInAction, Editor.zoomInImage);
footer.appendChild(zoomInElt);
@@ -2777,10 +2771,13 @@ EditorUi.initMinimalTheme = function()
elt.style.backgroundRepeat = 'no-repeat';
wrapper.appendChild(elt);
}
-
+
// Updates the label if the scale changes
(function(elt)
{
+ // Adds shift+/alt+click on zoom label
+ mxEvent.addListener(elt, 'click', fitFunction);
+
var updateZoom = mxUtils.bind(this, function()
{
elt.innerHTML = '';
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index 7cd6b035..9f50f132 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -860,26 +860,6 @@ EditorUi = function(editor, container, lightbox)
edgeShapeDiv.className = 'geSprite geSprite-connection';
}
}
-
- // Updates icon for optinal line start shape
- if (this.toolbar.lineStartMenu != null)
- {
- var lineStartDiv = this.toolbar.lineStartMenu.getElementsByTagName('div')[0];
-
- lineStartDiv.className = this.getCssClassForMarker('start',
- graph.currentEdgeStyle['shape'], graph.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
- mxUtils.getValue(graph.currentEdgeStyle, 'startFill', '1'));
- }
-
- // Updates icon for optinal line end shape
- if (this.toolbar.lineEndMenu != null)
- {
- var lineEndDiv = this.toolbar.lineEndMenu.getElementsByTagName('div')[0];
-
- lineEndDiv.className = this.getCssClassForMarker('end',
- graph.currentEdgeStyle['shape'], graph.currentEdgeStyle[mxConstants.STYLE_ENDARROW],
- mxUtils.getValue(graph.currentEdgeStyle, 'endFill', '1'));
- }
}
}));
@@ -2006,109 +1986,175 @@ EditorUi.prototype.isImmediateEditingEvent = function(evt)
};
/**
- * Private helper method.
+ * Updates the CSS for the given element to match the selection.
*/
-EditorUi.prototype.getCssClassForMarker = function(prefix, shape, marker, fill)
+EditorUi.prototype.updateCssForMarker = function(markerDiv, prefix, shape, marker, fill)
{
- var result = '';
+ markerDiv.style.verticalAlign = 'top';
+ markerDiv.style.height = '21px';
+ markerDiv.style.width = '21px';
+ markerDiv.innerHTML = '';
if (shape == 'flexArrow')
{
- result = (marker != null && marker != mxConstants.NONE) ?
+ markerDiv.className = (marker != null && marker != mxConstants.NONE) ?
'geSprite geSprite-' + prefix + 'blocktrans' : 'geSprite geSprite-noarrow';
}
else
{
- // SVG marker sprites
- if (marker == 'box' || marker == 'halfCircle')
- {
- result = 'geSprite geSvgSprite geSprite-' + marker + ((prefix == 'end') ? ' geFlipSprite' : '');
- }
- else if (marker == mxConstants.ARROW_CLASSIC)
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'classic' : 'geSprite geSprite-' + prefix + 'classictrans';
- }
- else if (marker == mxConstants.ARROW_CLASSIC_THIN)
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'classicthin' : 'geSprite geSprite-' + prefix + 'classicthintrans';
- }
- else if (marker == mxConstants.ARROW_OPEN)
- {
- result = 'geSprite geSprite-' + prefix + 'open';
- }
- else if (marker == mxConstants.ARROW_OPEN_THIN)
- {
- result = 'geSprite geSprite-' + prefix + 'openthin';
- }
- else if (marker == mxConstants.ARROW_BLOCK)
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'block' : 'geSprite geSprite-' + prefix + 'blocktrans';
- }
- else if (marker == mxConstants.ARROW_BLOCK_THIN)
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'blockthin' : 'geSprite geSprite-' + prefix + 'blockthintrans';
- }
- else if (marker == mxConstants.ARROW_OVAL)
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'oval' : 'geSprite geSprite-' + prefix + 'ovaltrans';
- }
- else if (marker == mxConstants.ARROW_DIAMOND)
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'diamond' : 'geSprite geSprite-' + prefix + 'diamondtrans';
- }
- else if (marker == mxConstants.ARROW_DIAMOND_THIN)
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'thindiamond' : 'geSprite geSprite-' + prefix + 'thindiamondtrans';
- }
- else if (marker == 'openAsync')
- {
- result = 'geSprite geSprite-' + prefix + 'openasync';
- }
- else if (marker == 'dash')
- {
- result = 'geSprite geSprite-' + prefix + 'dash';
- }
- else if (marker == 'cross')
- {
- result = 'geSprite geSprite-' + prefix + 'cross';
- }
- else if (marker == 'async')
- {
- result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'async' : 'geSprite geSprite-' + prefix + 'asynctrans';
- }
- else if (marker == 'circle' || marker == 'circlePlus')
- {
- result = (fill == '1' || marker == 'circle') ? 'geSprite geSprite-' + prefix + 'circle' : 'geSprite geSprite-' + prefix + 'circleplus';
- }
- else if (marker == 'ERone')
- {
- result = 'geSprite geSprite-' + prefix + 'erone';
- }
- else if (marker == 'ERmandOne')
- {
- result = 'geSprite geSprite-' + prefix + 'eronetoone';
- }
- else if (marker == 'ERmany')
- {
- result = 'geSprite geSprite-' + prefix + 'ermany';
- }
- else if (marker == 'ERoneToMany')
- {
- result = 'geSprite geSprite-' + prefix + 'eronetomany';
- }
- else if (marker == 'ERzeroToOne')
- {
- result = 'geSprite geSprite-' + prefix + 'eroneopt';
- }
- else if (marker == 'ERzeroToMany')
+ var src = this.getImageForMarker(marker, fill);
+
+ if (src != null)
{
- result = 'geSprite geSprite-' + prefix + 'ermanyopt';
+ var img = document.createElement('img');
+ img.style.position = 'absolute';
+ img.style.marginTop = '0.5px';
+ img.setAttribute('src', src);
+ markerDiv.className = '';
+
+ if (prefix == 'end')
+ {
+ mxUtils.setPrefixedStyle(img.style, 'transform', 'scaleX(-1)');
+ }
+
+ if (Editor.isDarkMode())
+ {
+ img.style.filter = 'invert(100%)';
+ }
+
+ markerDiv.appendChild(img);
}
else
{
- result = 'geSprite geSprite-noarrow';
+ markerDiv.className = 'geSprite geSprite-noarrow';
+ markerDiv.innerHTML = mxUtils.htmlEntities(mxResources.get('none'));
+ markerDiv.style.backgroundImage = 'none';
+ markerDiv.style.verticalAlign = 'top';
+ markerDiv.style.marginTop = '4px';
+ markerDiv.style.fontSize = '10px';
+ markerDiv.style.filter = 'none';
+ markerDiv.style.color = this.defaultStrokeColor;
+ markerDiv.nextSibling.style.marginTop = '0px';
}
}
+};
+
+/**
+ * Returns true if the given event should start editing. This implementation returns true.
+ */
+EditorUi.prototype.getImageForMarker = function(marker, fill)
+{
+ var result = null;
+
+ if (marker == mxConstants.ARROW_CLASSIC)
+ {
+ result = (fill != '1') ? Format.classicMarkerImage.src :
+ Format.classicFilledMarkerImage.src
+ }
+ else if (marker == mxConstants.ARROW_CLASSIC_THIN)
+ {
+ result = (fill != '1') ? Format.classicThinMarkerImage.src :
+ Format.openThinFilledMarkerImage.src;
+ }
+ else if (marker == mxConstants.ARROW_OPEN)
+ {
+ result = Format.openFilledMarkerImage.src;
+ }
+ else if (marker == mxConstants.ARROW_OPEN_THIN)
+ {
+ result = Format.openThinFilledMarkerImage.src;
+ }
+ else if (marker == mxConstants.ARROW_BLOCK)
+ {
+ result = (fill != '1') ? Format.blockMarkerImage.src :
+ Format.blockFilledMarkerImage.src;
+ }
+ else if (marker == mxConstants.ARROW_BLOCK_THIN)
+ {
+ result = (fill != '1') ? Format.blockThinMarkerImage.src :
+ Format.blockThinFilledMarkerImage.src;
+ }
+ else if (marker == mxConstants.ARROW_OVAL)
+ {
+ result = (fill != '1') ? Format.ovalMarkerImage.src :
+ Format.ovalFilledMarkerImage.src;
+ }
+ else if (marker == mxConstants.ARROW_DIAMOND)
+ {
+ result = (fill != '1') ? Format.diamondMarkerImage.src :
+ Format.diamondFilledMarkerImage.src;
+ }
+ else if (marker == mxConstants.ARROW_DIAMOND_THIN)
+ {
+ result = (fill != '1') ? Format.diamondThinMarkerImage.src :
+ Format.diamondThinFilledMarkerImage.src;
+ }
+ else if (marker == 'doubleBlock')
+ {
+ result = (fill != '1') ? Format.doubleBlockMarkerImage.src :
+ Format.doubleBlockFilledMarkerImage.src;
+ }
+ else if (marker == 'box')
+ {
+ result = Format.boxMarkerImage.src;
+ }
+ else if (marker == 'halfCircle')
+ {
+ result = Format.halfCircleMarkerImage.src;
+ }
+ else if (marker == 'openAsync')
+ {
+ result = Format.openAsyncFilledMarkerImage.src;
+ }
+ else if (marker == 'async')
+ {
+ result = (fill != '1') ? Format.asyncMarkerImage.src :
+ Format.asyncFilledMarkerImage.src;
+ }
+ else if (marker == 'dash')
+ {
+ result = Format.dashMarkerImage.src;
+ }
+ else if (marker == 'baseDash')
+ {
+ result = Format.baseDashMarkerImage.src;
+ }
+ else if (marker == 'cross')
+ {
+ result = Format.crossMarkerImage.src;
+ }
+ else if (marker == 'circle')
+ {
+ result = Format.circleMarkerImage.src;
+ }
+ else if (marker == 'circlePlus')
+ {
+ result = Format.circlePlusMarkerImage.src;
+ }
+ else if (marker == 'ERone')
+ {
+ result = Format.EROneMarkerImage.src;
+ }
+ else if (marker == 'ERmandOne')
+ {
+ result = Format.ERmandOneMarkerImage.src;
+ }
+ else if (marker == 'ERmany')
+ {
+ result = Format.ERmanyMarkerImage.src;
+ }
+ else if (marker == 'ERoneToMany')
+ {
+ result = Format.ERoneToManyMarkerImage.src;
+ }
+ else if (marker == 'ERzeroToOne')
+ {
+ result = Format.ERzeroToOneMarkerImage.src;
+ }
+ else if (marker == 'ERzeroToMany')
+ {
+ result = Format.ERzeroToManyMarkerImage.src;
+ }
return result;
};
diff --git a/src/main/webapp/js/grapheditor/Format.js b/src/main/webapp/js/grapheditor/Format.js
index cdf287ad..34ffe0c1 100644
--- a/src/main/webapp/js/grapheditor/Format.js
+++ b/src/main/webapp/js/grapheditor/Format.js
@@ -1167,32 +1167,39 @@ BaseFormatPanel.prototype.createCellColorOption = function(label, colorKey, defa
/**
*
*/
-BaseFormatPanel.prototype.addArrow = function(elt, height)
+BaseFormatPanel.prototype.addArrow = function(elt, height, topAlign)
{
height = (height != null) ? height : 10;
var arrow = document.createElement('div');
+ arrow.style.borderLeft = '1px solid #a0a0a0';
arrow.style.display = 'inline-block';
+ arrow.style.height = height + 'px';
arrow.style.paddingRight = '4px';
arrow.style.padding = '6px';
-
- var m = (10 - height);
-
- if (m == 2)
- {
- arrow.style.paddingTop = 6 + 'px';
- }
- else if (m > 0)
+
+ if (topAlign)
{
- arrow.style.paddingTop = (6 - m) + 'px';
+ arrow.style.verticalAlign = 'top';
+ arrow.style.marginLeft = '1px';
}
else
{
- arrow.style.marginTop = '-2px';
+ var m = (10 - height);
+
+ if (m == 2)
+ {
+ arrow.style.paddingTop = 6 + 'px';
+ }
+ else if (m > 0)
+ {
+ arrow.style.paddingTop = (6 - m) + 'px';
+ }
+ else
+ {
+ arrow.style.marginTop = '-2px';
+ }
}
-
- arrow.style.height = height + 'px';
- arrow.style.borderLeft = '1px solid #a0a0a0';
var img = document.createElement('img');
img.setAttribute('border', '0');
@@ -4984,8 +4991,8 @@ StyleFormatPanel.prototype.addStroke = function(container)
elt.nextSibling.style.position = 'relative';
elt.nextSibling.style.top = '-3px';
edgeStyle.getElementsByTagName('img')[0].style.top = '-1px';
- this.addArrow(lineStart);
- this.addArrow(lineEnd);
+ this.addArrow(lineStart, null, true);
+ this.addArrow(lineEnd, null, true);
var symbol = this.addArrow(pattern, 9);
symbol.className = 'geIcon';
@@ -5244,26 +5251,7 @@ StyleFormatPanel.prototype.addStroke = function(container)
if (markerDiv != null)
{
- markerDiv.className = ui.getCssClassForMarker(prefix, ss.style.shape, marker, fill);
- markerDiv.nextSibling.style.marginLeft = '1px';
- markerDiv.nextSibling.style.paddingRight = '5px';
-
- if (markerDiv.className == 'geSprite geSprite-noarrow')
- {
- markerDiv.innerHTML = mxUtils.htmlEntities(mxResources.get('none'));
- markerDiv.style.backgroundImage = 'none';
- markerDiv.style.verticalAlign = 'top';
- markerDiv.style.marginTop = '4px';
- markerDiv.style.fontSize = '10px';
- markerDiv.style.filter = 'none';
- markerDiv.style.color = this.defaultStrokeColor;
- markerDiv.nextSibling.style.marginTop = '0px';
- }
- else
- {
- markerDiv.nextSibling.style.position = 'relative';
- markerDiv.nextSibling.style.top = '-2px';
- }
+ ui.updateCssForMarker(markerDiv, prefix, ss.style.shape, marker, fill);
}
return markerDiv;
diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js
index a9418211..f489009a 100644
--- a/src/main/webapp/js/grapheditor/Graph.js
+++ b/src/main/webapp/js/grapheditor/Graph.js
@@ -13828,6 +13828,12 @@ if (typeof mxVertexHandler !== 'undefined')
changeLink.style.marginLeft = '10px';
changeLink.style.marginBottom = '-1px';
changeLink.style.cursor = 'pointer';
+
+ if (Editor.isDarkMode())
+ {
+ changeLink.style.filter = 'invert(100%)';
+ }
+
this.linkHint.appendChild(changeLink);
mxEvent.addListener(changeLink, 'click', mxUtils.bind(this, function(evt)
@@ -13836,13 +13842,21 @@ if (typeof mxVertexHandler !== 'undefined')
this.graph.editLink();
mxEvent.consume(evt);
}));
-
- this.linkHint.appendChild(Graph.createRemoveIcon(mxResources.get('removeIt',
- [mxResources.get('link')]), mxUtils.bind(this, function(evt)
+
+ var trashLink = changeLink.cloneNode(true);
+
+ trashLink.setAttribute('src', Editor.trashImage);
+ trashLink.setAttribute('title', mxResources.get('removeIt',
+ [mxResources.get('link')]));
+ trashLink.style.marginLeft = '4px';
+
+ this.linkHint.appendChild(trashLink);
+
+ mxEvent.addListener(trashLink, 'click', mxUtils.bind(this, function(evt)
{
this.graph.setLinkForCell(this.state.cell, null);
mxEvent.consume(evt);
- })));
+ }));
}
}
diff --git a/src/main/webapp/js/grapheditor/Init.js b/src/main/webapp/js/grapheditor/Init.js
index fcac9c05..084547b3 100644
--- a/src/main/webapp/js/grapheditor/Init.js
+++ b/src/main/webapp/js/grapheditor/Init.js
@@ -8,8 +8,9 @@ window.urlParams = window.urlParams || {};
// Public global variables
window.DOM_PURIFY_CONFIG = window.DOM_PURIFY_CONFIG ||
- {ADD_TAGS: ['use'], ADD_ATTR: ['target'], FORBID_TAGS: ['form'],
- ALLOWED_URI_REGEXP: /^((?!javascript:).)*$/i};
+ {ADD_TAGS: ['use'], FORBID_TAGS: ['form'],
+ ALLOWED_URI_REGEXP: /^((?!javascript:).)*$/i,
+ ADD_ATTR: ['target', 'content']};
window.MAX_REQUEST_SIZE = window.MAX_REQUEST_SIZE || 10485760;
window.MAX_AREA = window.MAX_AREA || 15000 * 15000;
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 7aceb5d5..18558c54 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -467,9 +467,9 @@ return a}();
a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
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.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i};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";
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.0",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]"!==
@@ -2293,8 +2293,8 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(a,b,f,e,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=e||this.createGraph(b,f);this.editable=null!=g?g:!a;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(d){this.status=d;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(d,k){d=null!=k?k.getProperty("edit"):null;null!=d&&d.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;
+Editor=function(a,b,f,d,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,f);this.editable=null!=g?g:!a;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(e){this.status=e;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(e,k){e=null!=k?k.getProperty("edit"):null;null!=e&&e.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 a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();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+
@@ -2327,12 +2327,12 @@ 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(a){return null!=a&&"data:image/png;"==a.substring(0,15)};Editor.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(g,d,k){g=e.substring(g+8,g+8+k);"zTXt"==d?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==d&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
-g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==d)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.isDarkMode=function(a){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.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(g,e,k){g=d.substring(g+8,g+8+k);"zTXt"==e?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==e&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
+g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==e)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};Editor.isDarkMode=function(a){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(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,b){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,e=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",e),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",e);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,e=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!e.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
+Editor.prototype.editAsNew=function(a,b){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,d=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",d),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",d);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,d=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!d.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(a){var b=a.getAttribute("grid");if(null==b||""==b)b=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=b&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled=
@@ -2344,62 +2344,62 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<e.length){a.getModel();g=[];for(var d=0;d<e.length;d++)null!=
-a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(d,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(d,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,g){d=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<d.length){a.getModel();g=[];for(var e=0;e<d.length;e++)null!=
+a.view.getState(d[e])&&g.push(d[e]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,A=f,C=e,F=u?0:64,K=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(K.height=window.innerHeight);var E=K.height,O=Math.max(1,Math.round((K.width-f-F)/2)),R=Math.max(1,Math.round((E-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,E-F);0<a.dialogs.length&&(this.zIndex+=
+function Dialog(a,b,f,d,g,e,k,n,u,m,r){var x=u?57:0,A=f,C=d,F=u?0:64,K=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(K.height=window.innerHeight);var E=K.height,O=Math.max(1,Math.round((K.width-f-F)/2)),R=Math.max(1,Math.round((E-d-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;d=Math.min(d,E-F);0<a.dialogs.length&&(this.zIndex+=
2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=E+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));K=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=K.x+"px";this.bg.style.top=K.y+"px";O+=K.x;R+=K.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-R+=a.embedViewport.y,O+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var Q=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(O,R,f,e);O=g.x;R=g.y;Q.style.width=f+"px";Q.style.height=e+"px";Q.style.left=O+"px";Q.style.top=R+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!n&&b.clientHeight>Q.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),
-d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=R+14+"px",d.style.left=O+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){P=!0}),null,mxUtils.bind(this,function(aa){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m();
-null!=aa&&(A=f=aa.w,C=e=aa.h)}aa=mxUtils.getDocumentSize();E=aa.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((E-e-a.footerHeight)/3));f=null!=document.body?Math.min(A,document.body.scrollWidth-F):A;e=Math.min(C,E-F);aa=this.getPosition(O,R,f,e);O=aa.x;R=aa.y;Q.style.left=O+"px";Q.style.top=R+"px";Q.style.width=f+"px";Q.style.height=e+
+R+=a.embedViewport.y,O+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var Q=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(O,R,f,d);O=g.x;R=g.y;Q.style.width=f+"px";Q.style.height=d+"px";Q.style.left=O+"px";Q.style.top=R+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!n&&b.clientHeight>Q.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),
+e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=R+14+"px",e.style.left=O+f+38-x+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(aa){P=!0}),null,mxUtils.bind(this,function(aa){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var aa=m();
+null!=aa&&(A=f=aa.w,C=d=aa.h)}aa=mxUtils.getDocumentSize();E=aa.height;this.bg.style.height=E+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");O=Math.max(1,Math.round((aa.width-f-F)/2));R=Math.max(1,Math.round((E-d-a.footerHeight)/3));f=null!=document.body?Math.min(A,document.body.scrollWidth-F):A;d=Math.min(C,E-F);aa=this.getPosition(O,R,f,d);O=aa.x;R=aa.y;Q.style.left=O+"px";Q.style.top=R+"px";Q.style.width=f+"px";Q.style.height=d+
"px";!n&&b.clientHeight>Q.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=R+14+"px",this.dialogImg.style.left=O+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=Q;a.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(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))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(a,b,f,e,g,d,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var A=document.createElement("div");A.style.padding="0px";A.style.margin="0px";A.style.fontSize="18px";A.style.paddingBottom="16px";A.style.marginBottom="10px";A.style.borderBottom="1px solid #c0c0c0";A.style.color="gray";A.style.whiteSpace="nowrap";A.style.textOverflow="ellipsis";A.style.overflow="hidden";mxUtils.write(A,b);A.setAttribute("title",b);x.appendChild(A)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()});
-C.className="geBtn";f.appendChild(C);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
+var ErrorDialog=function(a,b,f,d,g,e,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var A=document.createElement("div");A.style.padding="0px";A.style.margin="0px";A.style.fontSize="18px";A.style.paddingBottom="16px";A.style.marginBottom="10px";A.style.borderBottom="1px solid #c0c0c0";A.style.color="gray";A.style.whiteSpace="nowrap";A.style.textOverflow="ellipsis";A.style.overflow="hidden";mxUtils.write(A,b);A.setAttribute("title",b);x.appendChild(A)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(d,function(){u&&a.hideDialog();null!=g&&g()});
+C.className="geBtn";f.appendChild(C);null!=k&&(d=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
PrintDialog.prototype.create=function(a){function b(C){var F=k.checked||m.checked,K=parseInt(x.value)/100;isNaN(K)&&(K=1,x.value="100%");K*=.75;var E=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,O=1/f.pageScale;if(F){var R=k.checked?1:parseInt(r.value);isNaN(R)||(O=mxUtils.getScaleForPageCount(R,f,E))}f.getGraphBounds();var Q=R=0;E=mxRectangle.fromRectangle(E);E.width=Math.ceil(E.width*K);E.height=Math.ceil(E.height*K);O*=K;!F&&f.pageVisible?(K=f.getPageLayout(),R-=K.x*E.width,Q-=K.y*E.height):
-F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,R,Q,F);F.open();C&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
-"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});d.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(m,"change",
-function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
+F=!0;F=PrintDialog.createPrintPreview(f,O,E,0,R,Q,F);F.open();C&&PrintDialog.printPreview(F)}var f=a.editor.graph,d=document.createElement("table");d.style.width="100%";d.style.height="100%";var g=document.createElement("tbody");var e=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});e.appendChild(n);g.appendChild(e);e=e.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
+"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});e.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");e.appendChild(n);g.appendChild(e);mxEvent.addListener(m,"change",
+function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});e=e.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");e.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);e.appendChild(n);g.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
n.style.paddingTop="20px";n.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&n.appendChild(u);if(PrintDialog.previewEnabled){var A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});A.className="geBtn";n.appendChild(A)}A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});A.className="geBtn gePrimaryBtn";n.appendChild(A);a.editor.cancelFirst||
-n.appendChild(u);d.appendChild(n);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
-PrintDialog.createPrintPreview=function(a,b,f,e,g,d,k){b=new mxPrintPreview(a,b,f,e,g,d);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
+n.appendChild(u);e.appendChild(n);g.appendChild(e);d.appendChild(g);this.container=d};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
+PrintDialog.createPrintPreview=function(a,b,f,d,g,e,k){b=new mxPrintPreview(a,b,f,d,g,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var E=F;null!=E&&Graph.isPageLink(E.src)&&(E=a.createImageForPageLink(E.src,null));null!=E&&null!=E.src?(C.setAttribute("src",E.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var e=a.editor.graph,g=document.createElement("table");g.style.width=
-"100%";g.style.height="100%";var d=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",e.pageFormat);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=e.background;b();mxEvent.addListener(m,
-"click",function(E){a.pickColor(r||"none",function(O){r=O;b()});mxEvent.consume(E)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var E=parseInt(x.value);x.value=Math.max(1,isNaN(E)?e.getGridSize():E)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr");
+var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var E=F;null!=E&&Graph.isPageLink(E.src)&&(E=a.createImageForPageLink(E.src,null));null!=E&&null!=E.src?(C.setAttribute("src",E.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var d=a.editor.graph,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var e=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
+mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=d.background;b();mxEvent.addListener(m,
+"click",function(E){a.pickColor(r||"none",function(O){r=O;b()});mxEvent.consume(E)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=d.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var E=parseInt(x.value);x.value=Math.max(1,isNaN(E)?d.getGridSize():E)});k.appendChild(n);e.appendChild(k);k=document.createElement("tr");
n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var A=document.createElement("button");A.className="geBtn";A.style.margin="0px";mxUtils.write(A,mxResources.get("change")+"...");var C=document.createElement("img");C.setAttribute("valign","middle");C.style.verticalAlign="middle";C.style.border="1px solid lightGray";C.style.borderRadius="4px";C.style.marginRight="14px";C.style.maxWidth="100px";C.style.cursor="pointer";C.style.height=
-"60px";C.style.padding="4px";var F=e.backgroundImage,K=function(E){a.showBackgroundImageDialog(function(O,R){R||(F=O,f())},F);mxEvent.consume(E)};mxEvent.addListener(A,"click",K);mxEvent.addListener(C,"click",K);f();n.appendChild(C);n.appendChild(A);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});A.className="geBtn";
-a.editor.cancelFirst&&n.appendChild(A);K=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(x.value);isNaN(E)||e.gridSize===E||e.setGridSize(E);E=new ChangePageSetup(a,r,F,u.get());E.ignoreColor=e.background==r;E.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==E.previousFormat.width&&e.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage||e.model.execute(E)});K.className="geBtn gePrimaryBtn";
-n.appendChild(K);a.editor.cancelFirst||n.appendChild(A);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g};
-PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(aa,T,U){if(U||x!=document.activeElement&&A!=document.activeElement){aa=!1;for(T=0;T<F.length;T++)U=F[T],R?"custom"==U.key&&(n.value=U.key,R=!1):null!=U.format&&("a4"==U.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==U.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==U.format.width&&
-f.height==U.format.height?(n.value=U.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==U.format.height&&f.height==U.format.width&&(n.value=U.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(u.style.display="",r.style.display="none"):(x.value=f.width/100,A.value=f.height/100,d.setAttribute("checked","checked"),
-n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
-document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";d.style.marginRight="6px";u.appendChild(d);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
+"60px";C.style.padding="4px";var F=d.backgroundImage,K=function(E){a.showBackgroundImageDialog(function(O,R){R||(F=O,f())},F);mxEvent.consume(E)};mxEvent.addListener(A,"click",K);mxEvent.addListener(C,"click",K);f();n.appendChild(C);n.appendChild(A);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");A=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});A.className="geBtn";
+a.editor.cancelFirst&&n.appendChild(A);K=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var E=parseInt(x.value);isNaN(E)||d.gridSize===E||d.setGridSize(E);E=new ChangePageSetup(a,r,F,u.get());E.ignoreColor=d.background==r;E.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=F?F.src:null);d.pageFormat.width==E.previousFormat.width&&d.pageFormat.height==E.previousFormat.height&&E.ignoreColor&&E.ignoreImage||d.model.execute(E)});K.className="geBtn gePrimaryBtn";
+n.appendChild(K);a.editor.cancelFirst||n.appendChild(A);k.appendChild(n);e.appendChild(k);g.appendChild(e);this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function g(aa,T,U){if(U||x!=document.activeElement&&A!=document.activeElement){aa=!1;for(T=0;T<F.length;T++)U=F[T],R?"custom"==U.key&&(n.value=U.key,R=!1):null!=U.format&&("a4"==U.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==U.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==U.format.width&&
+f.height==U.format.height?(n.value=U.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,aa=!0):f.width==U.format.height&&f.height==U.format.width&&(n.value=U.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,aa=k.checked=!0));aa?(u.style.display="",r.style.display="none"):(x.value=f.width/100,A.value=f.height/100,e.setAttribute("checked","checked"),
+n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var e=document.createElement("input");e.setAttribute("name",b);e.setAttribute("type","radio");e.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
+document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";e.style.marginRight="6px";u.appendChild(e);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var A=document.createElement("input");A.setAttribute("size","7");A.style.textAlign="right";r.appendChild(A);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var C={},F=PageSetupDialog.getFormats(),K=0;K<F.length;K++){var E=F[K];C[E.key]=E;var O=document.createElement("option");O.setAttribute("value",
E.key);mxUtils.write(O,E.title);n.appendChild(O)}var R=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var Q=f,P=function(aa,T){aa=C[n.value];null!=aa.format?(x.value=aa.format.width/100,A.value=aa.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");aa=parseFloat(x.value);if(isNaN(aa)||0>=aa)x.value=f.width/100;aa=parseFloat(A.value);if(isNaN(aa)||0>=aa)A.value=f.height/100;aa=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
-Math.floor(100*parseFloat(A.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));T&&R||aa.width==Q.width&&aa.height==Q.height||(Q=aa,null!=e&&e(Q))};mxEvent.addListener(b,"click",function(aa){d.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(A,"blur",P);mxEvent.addListener(A,"click",P);mxEvent.addListener(k,"change",
-P);mxEvent.addListener(d,"change",P);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;P(aa,!0)});P();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return Q},widthInput:x,heightInput:A}};
+Math.floor(100*parseFloat(A.value)));"custom"!=n.value&&k.checked&&(aa=new mxRectangle(0,0,aa.height,aa.width));T&&R||aa.width==Q.width&&aa.height==Q.height||(Q=aa,null!=d&&d(Q))};mxEvent.addListener(b,"click",function(aa){e.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(m,"click",function(aa){k.checked=!0;P(aa);mxEvent.consume(aa)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(A,"blur",P);mxEvent.addListener(A,"click",P);mxEvent.addListener(k,"change",
+P);mxEvent.addListener(e,"change",P);mxEvent.addListener(n,"change",function(aa){R="custom"==n.value;P(aa,!0)});P();return{set:function(aa){f=aa;g(null,null,!0)},get:function(){return Q},widthInput:x,heightInput:A}};
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(a,b,f,e,g,d,k,n,u,m,r,x){u=null!=u?u:!0;var A=document.createElement("table"),C=document.createElement("tbody");A.style.position="absolute";A.style.top="30px";A.style.left="20px";var F=document.createElement("tr");var K=document.createElement("td");K.style.textOverflow="ellipsis";K.style.textAlign="right";K.style.maxWidth="100px";K.style.fontSize="10pt";K.style.width="84px";mxUtils.write(K,(g||mxResources.get("filename"))+":");F.appendChild(K);var E=document.createElement("input");
-E.setAttribute("value",b||"");E.style.marginLeft="4px";E.style.width=null!=x?x+"px":"180px";var O=mxUtils.button(f,function(){if(null==d||d(E.value))u&&a.hideDialog(),e(E.value)});O.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var R=A.parentNode;if(null!=R){var Q=null;mxEvent.addListener(R,"dragleave",function(P){null!=Q&&(Q.style.backgroundColor=
+var FilenameDialog=function(a,b,f,d,g,e,k,n,u,m,r,x){u=null!=u?u:!0;var A=document.createElement("table"),C=document.createElement("tbody");A.style.position="absolute";A.style.top="30px";A.style.left="20px";var F=document.createElement("tr");var K=document.createElement("td");K.style.textOverflow="ellipsis";K.style.textAlign="right";K.style.maxWidth="100px";K.style.fontSize="10pt";K.style.width="84px";mxUtils.write(K,(g||mxResources.get("filename"))+":");F.appendChild(K);var E=document.createElement("input");
+E.setAttribute("value",b||"");E.style.marginLeft="4px";E.style.width=null!=x?x+"px":"180px";var O=mxUtils.button(f,function(){if(null==e||e(E.value))u&&a.hideDialog(),d(E.value)});O.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var R=A.parentNode;if(null!=R){var Q=null;mxEvent.addListener(R,"dragleave",function(P){null!=Q&&(Q.style.backgroundColor=
"",Q=null);P.stopPropagation();P.preventDefault()});mxEvent.addListener(R,"dragover",mxUtils.bind(this,function(P){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=E,Q.style.backgroundColor="#ebf2f9");P.stopPropagation();P.preventDefault()}));mxEvent.addListener(R,"drop",mxUtils.bind(this,function(P){null!=Q&&(Q.style.backgroundColor="",Q=null);0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(P.dataTransfer.getData("text/uri-list")),O.click());P.stopPropagation();
P.preventDefault()}))}}};K=document.createElement("td");K.style.whiteSpace="nowrap";K.appendChild(E);F.appendChild(K);if(null!=g||null==k)C.appendChild(F),null!=r&&(K.appendChild(FilenameDialog.createTypeHint(a,E,r)),null!=a.editor.diagramFileTypes&&(F=document.createElement("tr"),K=document.createElement("td"),K.style.textOverflow="ellipsis",K.style.textAlign="right",K.style.maxWidth="100px",K.style.fontSize="10pt",K.style.width="84px",mxUtils.write(K,mxResources.get("type")+":"),F.appendChild(K),
K=document.createElement("td"),K.style.whiteSpace="nowrap",F.appendChild(K),b=FilenameDialog.createFileTypes(a,E,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",K.appendChild(b),E.style.width=null!=x?x-40+"px":"190px",F.appendChild(K),C.appendChild(F)));null!=k&&(F=document.createElement("tr"),K=document.createElement("td"),K.colSpan=2,K.appendChild(k),F.appendChild(K),C.appendChild(F));F=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop=
null!=r?"12px":"20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&K.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",K.appendChild(x));mxEvent.addListener(E,"keypress",function(R){13==R.keyCode&&O.click()});K.appendChild(O);a.editor.cancelFirst||K.appendChild(r);F.appendChild(K);C.appendChild(F);
A.appendChild(C);this.container=A};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,f){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var g=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var d=0;d<f.length;d++)if(0<f[d].ext.length&&b.value.toLowerCase().substring(b.value.length-
-f[d].ext.length-1)=="."+f[d].ext){e.setAttribute("title",mxResources.get(f[d].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(e,"click",function(d){var k=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(d)});
-g();return e};
-FilenameDialog.createFileTypes=function(a,b,f){var e=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");e.appendChild(g)}mxEvent.addListener(e,"change",function(d){d=f[e.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<k?b.value.substring(0,k+1)+d:b.value+"."+d;"createEvent"in
-document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(d.substring(d.length-u.length-1)=="."+u||null!=m&&d.substring(d.length-m.length-1)=="."+m){k=n;break}}e.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return e};
+FilenameDialog.createTypeHint=function(a,b,f){var d=document.createElement("img");d.style.backgroundPosition="center bottom";d.style.backgroundRepeat="no-repeat";d.style.margin="2px 0 0 4px";d.style.verticalAlign="top";d.style.cursor="pointer";d.style.height="16px";d.style.width="16px";mxUtils.setOpacity(d,70);var g=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var e=0;e<f.length;e++)if(0<f[e].ext.length&&b.value.toLowerCase().substring(b.value.length-
+f[e].ext.length-1)=="."+f[e].ext){d.setAttribute("title",mxResources.get(f[e].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(d,"click",function(e){var k=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(e)});
+g();return d};
+FilenameDialog.createFileTypes=function(a,b,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(g)}mxEvent.addListener(d,"change",function(e){e=f[d.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=e&&(e="drawio."+e);b.value=0<k?b.value.substring(0,k+1)+e:b.value+"."+e;"createEvent"in
+document?(e=document.createEvent("HTMLEvents"),e.initEvent("change",!1,!0),b.dispatchEvent(e)):b.fireEvent("onchange")});a=function(e){e=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(e.substring(e.length-u.length-1)=="."+u||null!=m&&e.substring(e.length-m.length-1)=="."+m){k=n;break}}d.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph;if(null!=k.container&&!k.transparentBackground){if(k.pageVisible){var n=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var u=k.container.firstChild;null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.nextSibling;null!=u&&(this.backgroundPageShape=this.createBackgroundPageShape(n),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(k.container),u.style.position="absolute",k.container.insertBefore(this.backgroundPageShape.node,u),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(m){k.dblClick(m)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){null!=
k.tooltipHandler&&k.tooltipHandler.isHideOnHover()&&k.tooltipHandler.hide();k.isMouseDown&&!mxEvent.isConsumed(m)&&k.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(m))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=n,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2412,97 +2412,98 @@ n=C.width;u=C.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*A,x.height*A),K=(
Math.round(C.y+(aa+1)*F.height)),new mxPoint(Math.round(O),Math.round(C.y+(aa+1)*F.height))]:[new mxPoint(Math.round(C.x+(aa+1)*F.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(aa+1)*F.width),Math.round(R))];null!=Q[aa]?(Q[aa].points=T,Q[aa].redraw()):(T=new mxPolyline(T,this.pageBreakColor),T.dialect=this.dialect,T.isDashed=this.pageBreakDashed,T.pointerEvents=!1,T.init(this.view.backgroundPane),T.redraw(),Q[aa]=T)}for(aa=P;aa<Q.length;aa++)Q[aa].destroy();Q.splice(P,Q.length-P)}});k(this.horizontalPageBreaks);
k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=
f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,
-r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var A=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+A*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-A)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var A=g.apply(this,arguments);null==x||x||mxEvent.addListener(A,"mousedown",function(C){mxEvent.consume(C)});return A};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
-this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var I=g.apply(this,arguments),L=this.backgroundImage;if(null!=L&&null!=L.width&&null!=L.height){var H=this.view.translate,S=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((H.x+L.x)*S,(H.y+L.y)*S,L.width*S,L.height*S))}return I};e.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,L){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");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(b=0;b<u.length;b++)0>mxUtils.indexOf(d,u[b])&&d.push(u[b]);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(b=0;b<r.length;b++)for(f=0;f<r[b].length;f++)d.push(r[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);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 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=
+r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var A=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+A*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-A)*m)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var A=g.apply(this,arguments);null==x||x||mxEvent.addListener(A,"mousedown",function(C){mxEvent.consume(C)});return A};var e=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=e.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
+this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=f;var g=d.getGraphBounds;d.getGraphBounds=function(){var I=g.apply(this,arguments),L=this.backgroundImage;if(null!=L&&null!=L.width&&null!=L.height){var H=this.view.translate,S=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((H.x+L.x)*S,(H.y+L.y)*S,L.width*S,L.height*S))}return I};d.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,L){this.clearSelectionState()});d.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+d.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);d.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);d.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);d.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
+this.createMenus();if(!d.standalone){var e="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var L=d.getCellStyle(I,!1),H=[],S=[],V;for(V in L)H.push(L[V]),S.push(V);d.getModel().isEdge(I)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",S,"values",H,"cells",[I]))}catch(ea){this.handleError(ea)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);
+d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var u=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<u.length;b++)0>mxUtils.indexOf(e,u[b])&&e.push(u[b]);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(b=0;b<r.length;b++)for(f=0;f<r[b].length;f++)e.push(r[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(e,k[b])&&e.push(k[b]);var x=function(I,L,H,S,V,ea,ka){S=null!=S?S:d.currentVertexStyle;V=null!=V?V:d.currentEdgeStyle;ea=null!=ea?ea:!0;H=null!=H?H:d.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),ua=null!=oa?oa.split(";"):[];Z=e.slice();for(var Ja=0;Ja<ua.length;Ja++){var Ga=ua[Ja],va=Ga.indexOf("=");if(0<=va){var za=Ga.substring(0,va),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};d.addListener("cellsInserted",function(I,L){x(L.getProperty("cells"),null,null,null,null,!0,!0)});d.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 d.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?(b=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",b):this.diagramContainer.oncontextmenu=
-b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.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);
-0<mxEvent.getClientX(I)-L.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-L.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var F=!1,K=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,L){return F||K.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||e.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,
-!0):(F=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(I)!=e.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){e.container.style.cursor="";F=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var E=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(I){return E.apply(this,arguments)||F||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||
-!mxEvent.isPopupTrigger(I.getEvent()))&&(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var O=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(I){return O.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 R=e.isZoomWheelEvent;e.isZoomWheelEvent=function(){return F||R.apply(this,arguments)};
-var Q=!1,P=null,aa=null,T=null,U=mxUtils.bind(this,function(){if(null!=this.toolbar&&Q!=e.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,L=[];null!=I;){var H=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),L.push(I));I=H}I=this.toolbar.fontMenu;H=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var S=0;S<T.length;S++)this.toolbar.container.appendChild(T[S]);this.toolbar.fontMenu=P;this.toolbar.sizeMenu=
-aa}Q=e.cellEditor.isContentEditing();P=I;aa=H;T=L}}),fa=this,ha=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){ha.apply(this,arguments);U();if(e.cellEditor.isContentEditing()){var I=!1,L=function(){I||(I=!0,window.setTimeout(function(){var H=e.getSelectedEditingElement();null!=H&&(H=mxUtils.getCurrentStyle(H),null!=H&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(H.fontFamily)),fa.toolbar.setFontSize(parseInt(H.fontSize))));I=!1},0))};mxEvent.addListener(e.cellEditor.textarea,
-"input",L);mxEvent.addListener(e.cellEditor.textarea,"touchend",L);mxEvent.addListener(e.cellEditor.textarea,"mouseup",L);mxEvent.addListener(e.cellEditor.textarea,"keyup",L);L()}};var ba=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(I,L){try{ba.apply(this,arguments),U()}catch(H){fa.handleError(H)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(I){}var qa=e.fireMouseEvent;
-e.fireMouseEvent=function(I,L,H){I==mxEvent.MOUSE_DOWN&&this.container.focus();qa.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,L,H){this.menus.createPopupMenu(I,L,H)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,function(I,
-L){var H=[L.getProperty("cell")];L.getProperty("terminalInserted")&&(H.push(L.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(e.view.getState(H[H.length-1]))},0));x(H)});this.addListener("styleChanged",mxUtils.bind(this,function(I,L){var H=L.getProperty("cells"),S=I=!1;if(0<H.length)for(var V=0;V<H.length&&(I=e.getModel().isVertex(H[V])||I,!(S=e.getModel().isEdge(H[V])||S)||!I);V++);else S=I=!0;H=L.getProperty("keys");L=L.getProperty("values");for(V=
-0;V<H.length;V++){var ea=0<=mxUtils.indexOf(u,H[V]);if("strokeColor"!=H[V]||null!=L[V]&&"none"!=L[V])if(0<=mxUtils.indexOf(k,H[V]))S||0<=mxUtils.indexOf(m,H[V])?null==L[V]?delete e.currentEdgeStyle[H[V]]:e.currentEdgeStyle[H[V]]=L[V]:I&&0<=mxUtils.indexOf(d,H[V])&&(null==L[V]?delete e.currentVertexStyle[H[V]]:e.currentVertexStyle[H[V]]=L[V]);else if(0<=mxUtils.indexOf(d,H[V])){if(I||ea)null==L[V]?delete e.currentVertexStyle[H[V]]:e.currentVertexStyle[H[V]]=L[V];if(S||ea||0<=mxUtils.indexOf(m,H[V]))null==
-L[V]?delete e.currentEdgeStyle[H[V]]:e.currentEdgeStyle[H[V]]=L[V]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==e.currentEdgeStyle.edgeStyle||
-"none"==e.currentEdgeStyle.edgeStyle||null==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
-null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",e.currentEdgeStyle.shape,e.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
-mxUtils.getValue(e.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",e.currentEdgeStyle.shape,e.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(e.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var I=e.currentVertexStyle.fontFamily||"Helvetica",L=String(e.currentVertexStyle.fontSize||"12"),H=e.getView().getState(e.getSelectionCell());
-null!=H&&(I=H.style[mxConstants.STYLE_FONTFAMILY]||I,L=H.style[mxConstants.STYLE_FONTSIZE]||L,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(L)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(I,L){I=L.getProperty("cells");L=L.getProperty("parent");null!=L&&e.getModel().isLayer(L)&&!e.isCellVisible(L)&&null!=I&&0<I.length&&e.getModel().setVisible(L,!0)});this.gestureHandler=
+b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var C=d.graphHandler.start;d.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);
+0<mxEvent.getClientX(I)-L.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-L.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var F=!1,K=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,L){return F||K.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||d.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,
+!0):(F=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(I)!=d.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){d.container.style.cursor="";F=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var E=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(I){return E.apply(this,arguments)||F||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||
+!mxEvent.isPopupTrigger(I.getEvent()))&&(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var O=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(I){return O.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 R=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return F||R.apply(this,arguments)};
+var Q=!1,P=null,aa=null,T=null,U=mxUtils.bind(this,function(){if(null!=this.toolbar&&Q!=d.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,L=[];null!=I;){var H=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),L.push(I));I=H}I=this.toolbar.fontMenu;H=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var S=0;S<T.length;S++)this.toolbar.container.appendChild(T[S]);this.toolbar.fontMenu=P;this.toolbar.sizeMenu=
+aa}Q=d.cellEditor.isContentEditing();P=I;aa=H;T=L}}),fa=this,ha=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){ha.apply(this,arguments);U();if(d.cellEditor.isContentEditing()){var I=!1,L=function(){I||(I=!0,window.setTimeout(function(){var H=d.getSelectedEditingElement();null!=H&&(H=mxUtils.getCurrentStyle(H),null!=H&&null!=fa.toolbar&&(fa.toolbar.setFontName(Graph.stripQuotes(H.fontFamily)),fa.toolbar.setFontSize(parseInt(H.fontSize))));I=!1},0))};mxEvent.addListener(d.cellEditor.textarea,
+"input",L);mxEvent.addListener(d.cellEditor.textarea,"touchend",L);mxEvent.addListener(d.cellEditor.textarea,"mouseup",L);mxEvent.addListener(d.cellEditor.textarea,"keyup",L);L()}};var ba=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(I,L){try{ba.apply(this,arguments),U()}catch(H){fa.handleError(H)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(I){}var qa=d.fireMouseEvent;
+d.fireMouseEvent=function(I,L,H){I==mxEvent.MOUSE_DOWN&&this.container.focus();qa.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,L,H){this.menus.createPopupMenu(I,L,H)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};d.connectionHandler.addListener(mxEvent.CONNECT,function(I,
+L){var H=[L.getProperty("cell")];L.getProperty("terminalInserted")&&(H.push(L.getProperty("terminal")),window.setTimeout(function(){null!=fa.hoverIcons&&fa.hoverIcons.update(d.view.getState(H[H.length-1]))},0));x(H)});this.addListener("styleChanged",mxUtils.bind(this,function(I,L){var H=L.getProperty("cells"),S=I=!1;if(0<H.length)for(var V=0;V<H.length&&(I=d.getModel().isVertex(H[V])||I,!(S=d.getModel().isEdge(H[V])||S)||!I);V++);else S=I=!0;H=L.getProperty("keys");L=L.getProperty("values");for(V=
+0;V<H.length;V++){var ea=0<=mxUtils.indexOf(u,H[V]);if("strokeColor"!=H[V]||null!=L[V]&&"none"!=L[V])if(0<=mxUtils.indexOf(k,H[V]))S||0<=mxUtils.indexOf(m,H[V])?null==L[V]?delete d.currentEdgeStyle[H[V]]:d.currentEdgeStyle[H[V]]=L[V]:I&&0<=mxUtils.indexOf(e,H[V])&&(null==L[V]?delete d.currentVertexStyle[H[V]]:d.currentVertexStyle[H[V]]=L[V]);else if(0<=mxUtils.indexOf(e,H[V])){if(I||ea)null==L[V]?delete d.currentVertexStyle[H[V]]:d.currentVertexStyle[H[V]]=L[V];if(S||ea||0<=mxUtils.indexOf(m,H[V]))null==
+L[V]?delete d.currentEdgeStyle[H[V]]:d.currentEdgeStyle[H[V]]=L[V]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||
+"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
+null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var I=d.currentVertexStyle.fontFamily||"Helvetica",L=String(d.currentVertexStyle.fontSize||"12"),H=d.getView().getState(d.getSelectionCell());
+null!=H&&(I=H.style[mxConstants.STYLE_FONTFAMILY]||I,L=H.style[mxConstants.STYLE_FONTSIZE]||L,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(L)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(I,L){I=L.getProperty("cells");L=L.getProperty("parent");null!=L&&d.getModel().isLayer(L)&&!d.isCellVisible(L)&&null!=I&&0<I.length&&d.getModel().setVisible(L,!0)});this.gestureHandler=
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(){e.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){e.view.validateBackground()}));
-e.addListener("gridSizeChanged",mxUtils.bind(this,function(){e.isGridEnabled()&&e.view.validateBackground()}));this.editor.resetGraph()}this.init();e.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(a,b,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=b&&b(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
+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(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));
+d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(a,b,f){function d(n,u){var m=e;e+=u;return n.substring(m,e)}function g(n){n=d(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(d(a,4),"IHDR"!=d(a,4))null!=f&&f();else{d(a,17);do{f=g(a);var k=d(a,4);if(null!=b&&b(e-8,k,f))break;value=d(a,f);d(a,4);if("IEND"==k)break}while(f)}};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 a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var e=a.getRubberband();null!=e&&e.cancel()}));mxEvent.addListener(a.container,
-"keydown",mxUtils.bind(this,function(e){this.onKeyDown(e)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(e){this.onKeyPress(e)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
+EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var d=a.getRubberband();null!=d&&d.cancel()}));mxEvent.addListener(a.container,
+"keydown",mxUtils.bind(this,function(d){this.onKeyDown(d)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(d){this.onKeyPress(d)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);f.updateActionStates()};a.editLink=f.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 a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),e=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,e),e=!1)}this.updateSelectionStateForTableCells(f);return f};
+EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),d=!0,g=0;g<b.length;g++){var e=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(e,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,d),d=!1)}this.updateSelectionStateForTableCells(f);return f};
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(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,e=f.getParent(b[0]),g=f.getParent(e),d=e.getIndex(b[0]),k=g.getIndex(e),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),d):null;r<b.length-1;){var A=b[++r];null==x||x!=A||null!=n&&u!=n||(n=u,u=0,m++,e=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),d):null);var C=this.editor.graph.view.getState(A);
-if(A==f.getChildAt(e,d+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
-EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,e){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
-a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
-!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),d=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(b.style,a.style,e))};
-EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var e=a.popupMenuHandler.isMenuShowing;
-a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(A,C,F){var K=a.getCompositeParent(u.cell);A=a.getCellGeometry(K);for(r.consume();null!=K&&a.model.isVertex(K)&&null!=A&&A.relative;)cell=
+EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,d=f.getParent(b[0]),g=f.getParent(d),e=d.getIndex(b[0]),k=g.getIndex(d),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),e):null;r<b.length-1;){var A=b[++r];null==x||x!=A||null!=n&&u!=n||(n=u,u=0,m++,d=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),e):null);var C=this.editor.graph.view.getState(A);
+if(A==f.getChildAt(d,e+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
+EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,d){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
+a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var e=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=e:a.x!=e&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
+!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),e=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==e,f.mergeStyle(b.style,a.style,d))};
+EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var d=a.popupMenuHandler.isMenuShowing;
+a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+f);var e=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();e.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(A,C,F){var K=a.getCompositeParent(u.cell);A=a.getCellGeometry(K);for(r.consume();null!=K&&a.model.isVertex(K)&&null!=A&&A.relative;)cell=
K,K=a.model.getParent(cell),A=a.getCellGeometry(K);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),K,mxUtils.bind(this,function(E){F(E);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(E))}),m)}),30)}),mxUtils.bind(this,function(A){this.graph.selectCellsForConnectVertex(A,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r=
m.getProperty("arrow"),x=m.getProperty("direction"),A=m.getProperty("event");r=r.getBoundingClientRect();var C=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-C.x;C=a.container.scrollTop+r.y-C.y;var K=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),E=b.showShapePicker(F,C,K,mxUtils.bind(this,function(O){null!=O&&a.connectVertex(K,x,a.defaultEdgeLength,A,!0,!0,function(R,Q,P){P(O);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(O))},
function(R){a.selectCellsForConnectVertex(R)},A,this.hoverIcons)}),x,!0);this.centerShapePicker(E,r,F,C,x);mxUtils.setOpacity(E,30);mxEvent.addListener(E,"mouseenter",function(){mxUtils.setOpacity(E,100)});mxEvent.addListener(E,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}};
-EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"};
-EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a};
-EditorUi.prototype.createShapePicker=function(a,b,f,e,g,d,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+EditorUi.prototype.centerShapePicker=function(a,b,f,d,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var e=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=e.width/2-10,d-=e.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=e.width/2-10,d+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=e.width+6,d-=e.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,d-=e.height/2-10);a.style.left=f+"px";a.style.top=d+"px"};
+EditorUi.prototype.showShapePicker=function(a,b,f,d,g,e){a=this.createShapePicker(a,b,f,d,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,e),e);null!=a&&(null==this.hoverIcons||e||this.hoverIcons.reset(),e=this.editor.graph,e.popupMenuHandler.hideMenu(),e.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=d,this.shapePicker=a);return a};
+EditorUi.prototype.createShapePicker=function(a,b,f,d,g,e,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
mxPopupMenu.prototype.zIndex+1+";";n||mxUtils.setPrefixedStyle(u.style,"transform","translate(-22px,-22px)");null!=r.background&&r.background!=mxConstants.NONE&&(u.style.backgroundColor=r.background);r.container.appendChild(u);f=mxUtils.bind(this,function(A){var C=document.createElement("a");C.className="geItem";C.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";u.appendChild(C);null!=x&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(x,[A]):m.insertHandler([A],""!=A.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([A],25,25,C,null,!0,!1,A.geometry.width,A.geometry.height);mxEvent.addListener(C,"click",function(){var F=r.cloneCell(A);if(null!=e)e(F);else{F.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-A.geometry.width/2);F.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-A.geometry.height/2);r.model.beginUpdate();try{r.addCell(F)}finally{r.model.endUpdate()}r.setSelectionCell(F);
-r.scrollCellToVisible(F);r.startEditingAtCell(F);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(F))}null!=d&&d()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
-EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,e,g,d){return this.editor.graph.createVertex(null,null,d||"",0,0,e||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+this.sidebar.graph.pasteStyle(x,[A]):m.insertHandler([A],""!=A.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([A],25,25,C,null,!0,!1,A.geometry.width,A.geometry.height);mxEvent.addListener(C,"click",function(){var F=r.cloneCell(A);if(null!=d)d(F);else{F.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-A.geometry.width/2);F.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-A.geometry.height/2);r.model.beginUpdate();try{r.addCell(F)}finally{r.model.endUpdate()}r.setSelectionCell(F);
+r.scrollCellToVisible(F);r.startEditingAtCell(F);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(F))}null!=e&&e()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
+EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,d,g,e){return this.editor.graph.createVertex(null,null,e||"",0,0,d||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
b("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),b("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),b("triangle;whiteSpace=wrap;html=1;",60,80),b("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),b("shape=tape;whiteSpace=wrap;html=1;",120,100),b("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),b("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(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var e=window.getSelection(),g=0<e.rangeCount?e.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
-g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(d){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
+EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var d=window.getSelection(),g=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
+g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(e){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,null!=b.textarea&&(b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a))))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.getCssClassForMarker=function(a,b,f,e){return"flexArrow"==b?null!=f&&f!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==f||"halfCircle"==f?"geSprite geSvgSprite geSprite-"+f+("end"==a?" geFlipSprite":""):f==mxConstants.ARROW_CLASSIC?"1"==e?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":f==mxConstants.ARROW_CLASSIC_THIN?"1"==e?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":f==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+a+"open":f==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":f==mxConstants.ARROW_BLOCK?"1"==e?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":f==mxConstants.ARROW_BLOCK_THIN?"1"==e?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":f==mxConstants.ARROW_OVAL?"1"==e?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":f==mxConstants.ARROW_DIAMOND?"1"==e?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
-f==mxConstants.ARROW_DIAMOND_THIN?"1"==e?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==f?"geSprite geSprite-"+a+"openasync":"dash"==f?"geSprite geSprite-"+a+"dash":"cross"==f?"geSprite geSprite-"+a+"cross":"async"==f?"1"==e?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==f||"circlePlus"==f?"1"==e||"circle"==f?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==f?"geSprite geSprite-"+a+"erone":"ERmandOne"==
-f?"geSprite geSprite-"+a+"eronetoone":"ERmany"==f?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==f?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==f?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==f?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updateCssForMarker=function(a,b,f,d,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerHTML="";"flexArrow"==f?a.className=null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(d,g),null!=f?(d=document.createElement("img"),d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
+(d.style.filter="invert(100%)"),a.appendChild(d)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.getImageForMarker=function(a,b){var f=null;a==mxConstants.ARROW_CLASSIC?f="1"!=b?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:a==mxConstants.ARROW_CLASSIC_THIN?f="1"!=b?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_OPEN?f=Format.openFilledMarkerImage.src:a==mxConstants.ARROW_OPEN_THIN?f=Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_BLOCK?f="1"!=b?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+a==mxConstants.ARROW_BLOCK_THIN?f="1"!=b?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:a==mxConstants.ARROW_OVAL?f="1"!=b?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND?f="1"!=b?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND_THIN?f="1"!=b?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==a?f="1"!=b?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==a?f=Format.boxMarkerImage.src:"halfCircle"==a?f=Format.halfCircleMarkerImage.src:"openAsync"==a?f=Format.openAsyncFilledMarkerImage.src:"async"==a?f="1"!=b?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==a?f=Format.dashMarkerImage.src:"baseDash"==a?f=Format.baseDashMarkerImage.src:"cross"==a?f=Format.crossMarkerImage.src:"circle"==a?f=Format.circleMarkerImage.src:"circlePlus"==a?f=Format.circlePlusMarkerImage.src:"ERone"==a?f=Format.EROneMarkerImage.src:"ERmandOne"==a?
+f=Format.ERmandOneMarkerImage.src:"ERmany"==a?f=Format.ERmanyMarkerImage.src:"ERoneToMany"==a?f=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==a?f=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==a&&(f=Format.ERzeroToManyMarkerImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),f=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var k=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||d.getSelectionCells();k=d.getExportableCells(d.model.getTopmostCells(k));for(var n={},u=d.createCellLookup(k),m=d.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
-0),A=0;A<m.length;A++){r.add(x,m[A]);var C=d.view.getState(k[A]);if(null!=C){var F=d.getCellGeometry(m[A]);null!=F&&F.relative&&!r.isEdge(k[A])&&null==u[mxObjectIdentity.get(r.getParent(k[A]))]&&(F.offset=null,F.relative=!1,F.x=C.x/C.view.scale-C.view.translate.x,F.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(d){var k=
-null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(e){var k=null;if(e.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||e.getSelectionCells();k=e.getExportableCells(e.model.getTopmostCells(k));for(var n={},u=e.createCellLookup(k),m=e.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
+0),A=0;A<m.length;A++){r.add(x,m[A]);var C=e.view.getState(k[A]);if(null!=C){var F=e.getCellGeometry(m[A]);null!=F&&F.relative&&!r.isEdge(k[A])&&null==u[mxObjectIdentity.get(r.getParent(k[A]))]&&(F.offset=null,F.relative=!1,F.x=C.x/C.view.scale-C.view.translate.x,F.y=C.y/C.view.scale-C.view.translate.y)}}e.updateCustomLinks(e.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(e){var k=
+null;e.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(e,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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 b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=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 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=
+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 ua=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 va=0==this.lightboxVerticalDivider?0:(Ja-H*oa.height)/this.lightboxVerticalDivider/H;wa&&(S=Math.max(S,0),va=Math.max(va,0));if(wa||
+ka.width<Ga||ka.height<Ja)a.view.scaleAndTranslate(H,Math.floor(S-oa.x),Math.floor(va-oa.y)),a.container.scrollTop=W*H/Z,a.container.scrollLeft=ua*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 d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",d)});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++;
-var ea=document.createElement("span");ea.style.paddingLeft="8px";ea.style.paddingRight="8px";ea.style.cursor="pointer";mxEvent.addListener(ea,"click",H);null!=V&&ea.setAttribute("title",V);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",S);H.style.width="36px";H.style.filter="invert(100%)";ea.appendChild(H);this.chromelessToolbar.appendChild(ea);return ea});null!=g.backBtn&&d(mxUtils.bind(this,function(H){window.location.href=g.backBtn.url;mxEvent.consume(H)}),Editor.backImage,
-mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=d(mxUtils.bind(this,function(H){this.actions.get("previousPage").funct();mxEvent.consume(H)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
-var m=d(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerHTML="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
-1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();
-mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var A=null,C=null,F=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);A=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);A=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var E=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var e=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",e);e();var k=0;e=mxUtils.bind(this,function(H,S,V){k++;
+var ea=document.createElement("span");ea.style.paddingLeft="8px";ea.style.paddingRight="8px";ea.style.cursor="pointer";mxEvent.addListener(ea,"click",H);null!=V&&ea.setAttribute("title",V);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",S);H.style.width="36px";H.style.filter="invert(100%)";ea.appendChild(H);this.chromelessToolbar.appendChild(ea);return ea});null!=g.backBtn&&e(mxUtils.bind(this,function(H){window.location.href=g.backBtn.url;mxEvent.consume(H)}),Editor.backImage,
+mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=e(mxUtils.bind(this,function(H){this.actions.get("previousPage").funct();mxEvent.consume(H)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
+var m=e(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerHTML="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
+1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}e(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();
+mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(H){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var A=null,C=null,F=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);A=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);A=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=A&&(window.clearTimeout(A),A=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var E=e(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var S=E.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=S.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));S=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),O=a.getModel();O.addListener(mxEvent.CHANGE,function(){E.style.display=1<O.getChildCount(O.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var R=this.lightboxToolbarActions[x];R.elem=d(R.fn,R.icon,R.tooltip)}null!=g.refreshBtn&&d(mxUtils.bind(this,function(H){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
-window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(H){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,
+this.layersDialog.style.zIndex=S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),O=a.getModel();O.addListener(mxEvent.CHANGE,function(){E.style.display=1<O.getChildCount(O.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(H){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var R=this.lightboxToolbarActions[x];R.elem=e(R.fn,R.icon,R.tooltip)}null!=g.refreshBtn&&e(mxUtils.bind(this,function(H){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
+window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(H){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,
function(H){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(H))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||(mxEvent.isShiftDown(H)||
K(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?F():K(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?F():K(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,
"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||K(30)}));var Q=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,S){},mouseUp:function(H,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Q&&Math.abs(this.scrollTop-a.container.scrollTop)<Q&&
@@ -2523,38 +2524,38 @@ EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=u
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,d){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,d);this.setCurrentMenu(g)};
EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{b=a.getGraphBounds();var f=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var e=a.view.scale;b.x=b.x/e-f.x;b.y=b.y/e-f.y;b.width/=e;b.height/=e;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),e=0,g=0;f&&(e=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var d=b.getSelectionCells();b.clearSelection();b.setSelectionCells(d)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-e,b.container.scrollTop=b.view.translate.y*
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var d=a.view.scale;b.x=b.x/d-f.x;b.y=b.y/d-f.y;b.width/=d;b.height/=d;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),d=0,g=0;f&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var e=b.getSelectionCells();b.clearSelection();b.setSelectionCells(e)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
b.view.scale-g);b.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
-function ChangePageSetup(a,b,f,e,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=e;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
+function ChangePageSetup(a,b,f,d,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=d;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}if(!this.ignoreImage){this.image=this.previousImage;b=a.backgroundImage;var f=this.previousImage;null!=f&&null!=f.src&&"data:page/id,"==f.src.substring(0,13)&&(f=this.ui.createImageForPageLink(f.src,this.ui.currentPage));this.ui.setBackgroundImage(f);this.previousImage=b}null!=this.previousFormat&&
(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;e.previousPageScale=e.pageScale;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);return e};mxCodecRegistry.register(a)})();
+this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(a,b){b=null!=b?b:"1"==urlParams.sketch;this.editor.graph.pageFormat=a;b||(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(a){this.editor.graph.pageScale=a;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(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,e=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,e);f.addListener(mxEvent.UNDO,e);f.addListener(mxEvent.REDO,e);f.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var d=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(k,n){d.apply(this,arguments);e()};e()};
-EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),e="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(" "),g=0;g<e.length;g++)this.actions.get(e[g]).setEnabled(0<b.cells.length);
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);d()};var e=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(k,n){e.apply(this,arguments);d()};d()};
+EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),d="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(" "),g=0;g<d.length;g++)this.actions.get(d[g]).setEnabled(0<b.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<b.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<b.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==b.cells.length);this.actions.get("sendBackward").setEnabled(1==
b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(1==b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
-this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
+this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);d=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
-b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
-d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-d+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var d=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(d=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
+b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var e=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+d;e=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+e+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=null!=this.hsplit.parentNode?g+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+d+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=d+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+d+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
+e+d+"px";this.formatContainer.style.bottom=this.footerHeight+d+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+d+g+"px");a&&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};
@@ -2564,19 +2565,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))};
EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.setAttribute("title",a);b.innerHTML=a;return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,e){function g(x){if(null!=k){var A=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));e(Math.max(0,n+(b?A.x-k.x:k.y-A.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function d(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
-mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var A=null!=m?m-f:0;m=r();e(A);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,d)})};
-EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(e){f(parseFloat(e))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
-EditorUi.prototype.handleError=function(a,b,f,e,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,d,f,null,null,null,null,null,null,null,null,e?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,b,f,e,g,d,k,n,u,m,r,x,A){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),e,g,d,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,A);a.init()};EditorUi.prototype.showDialog=function(a,b,f,e,g,d,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,e,g,d,k,n,u,m);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,f,d){function g(x){if(null!=k){var A=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));d(Math.max(0,n+(b?A.x-k.x:k.y-A.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function e(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
+mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var A=null!=m?m-f:0;m=r();d(A);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,e)})};
+EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(d){f(parseFloat(d))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
+EditorUi.prototype.handleError=function(a,b,f,d,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,e,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
+EditorUi.prototype.showError=function(a,b,f,d,g,e,k,n,u,m,r,x,A){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,g,e,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,A);a.init()};EditorUi.prototype.showDialog=function(a,b,f,d,g,e,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,g,e,k,n,u,m);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,f){null!=this.dialogs&&0<this.dialogs.length&&(null==f||f==this.dialog.container.firstChild)&&(f=this.dialogs.pop(),0==f.close(a,b)?this.dialogs.push(f):(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 a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,e=[],g=0;g<b.length;g++){var d=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==d||f.get(d)||(f.put(d,!0),e.push(d))}a.setSelectionCells(a.duplicateCells(e,!1))}catch(k){this.handleError(k)}};
-EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,e=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(d){f.cellEditor.restoreSelection(e);b(d)},function(){f.cellEditor.restoreSelection(e)});this.showDialog(a.container,230,g,!0,!1);a.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,d=[],g=0;g<b.length;g++){var e=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==e||f.get(e)||(f.put(e,!0),d.push(e))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(k){this.handleError(k)}};
+EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(e){f.cellEditor.restoreSelection(d);b(e)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(a.container,230,g,!0,!1);a.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var e=a.lastIndexOf("&lt;/mxGraphModel&gt;");e>f&&(b=a.substring(f,e+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
-EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var e=decodeURIComponent(f);this.isCompatibleString(e)&&(f=e)}a(f)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(e){e.text().then(mxUtils.bind(this,function(g){try{var d=this.parseHtmlData(g),k="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var n=k.lastIndexOf("%3E");
-0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=d.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(e){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(e){e.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>f&&(b=a.substring(f,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
+EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var d=decodeURIComponent(f);this.isCompatibleString(d)&&(f=d)}a(f)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(d){d.text().then(mxUtils.bind(this,function(g){try{var e=this.parseHtmlData(g),k="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var n=k.lastIndexOf("%3E");
+0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=e.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(d){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(d){d.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(f){a(null)})};
EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var f="<meta "==a.substring(0,6);b=document.createElement("div");b.innerHTML=(f?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));f=f&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=f&&null==f.nextSibling&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==f.nodeName?(a=f.getAttribute("src"),
@@ -2585,24 +2586,24 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null
(b=f);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(b){this.save(b)}),null,mxUtils.bind(this,function(b){if(null!=b&&0<b.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),e=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==e.length?null:e)}),!0,b)};
-EditorUi.prototype.executeLayout=function(a,b,f){var e=this.editor.graph;if(e.isEnabled()){e.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(e),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(e.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,b,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,b);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),d=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==d.length?null:d)}),!0,b)};
+EditorUi.prototype.executeLayout=function(a,b,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
+EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var g=d.saveSelection(),e=mxUtils.prompt(a,b);d.restoreSelection(g);if(null!=e&&0<e.length){var k=new Image;k.onload=function(){f(e,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=e}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(e){e=new ChangePageSetup(this,null,e);e.ignoreColor=!0;this.editor.graph.model.execute(e)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
+EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(d){d=new ChangePageSetup(this,null,d);d.ignoreColor=!0;this.editor.graph.model.execute(d)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
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(a){function b(x,A,C){if(!e.isSelectionEmpty()&&e.isEnabled()){A=null!=A?A:1;var F=e.getCompositeParents(e.getSelectionCells()),K=0<F.length?F[0]:null;if(null!=K)if(C){e.getModel().beginUpdate();try{for(K=0;K<F.length;K++)if(e.getModel().isVertex(F[K])&&e.isCellResizable(F[K])){var E=e.getCellGeometry(F[K]);null!=E&&(E=E.clone(),37==x?E.width=Math.max(0,E.width-A):38==x?E.height=Math.max(0,E.height-A):39==x?E.width+=A:40==x&&(E.height+=A),e.getModel().setGeometry(F[K],
-E))}}finally{e.getModel().endUpdate()}}else{E=e.model.getParent(K);var O=e.getView().scale;C=null;1==e.getSelectionCount()&&e.model.isVertex(K)&&null!=e.layoutManager&&!e.isCellLocked(K)&&(C=e.layoutManager.getLayout(E));if(null!=C&&C.constructor==mxStackLayout)A=E.getIndex(K),37==x||38==x?e.model.add(E,K,Math.max(0,A-1)):(39==x||40==x)&&e.model.add(E,K,Math.min(e.model.getChildCount(E),A+1));else{var R=e.graphHandler;null!=R&&(null==R.first&&R.start(K,0,0,F),null!=R.first&&(K=F=0,37==x?F=-A:38==
-x?K=-A:39==x?F=A:40==x&&(K=A),R.currentDx+=F*O,R.currentDy+=K*O,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var Q=R.roundLength(R.currentDx/O),P=R.roundLength(R.currentDy/O);R.moveCells(R.cells,Q,P);R.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
-89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(e.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var A=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=A)return A.funct}if(null!=n[x.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(e.model.isVertex(e.getSelectionCell()))return function(){var C=e.connectVertex(e.getSelectionCell(),n[x.keyCode],
-e.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&e.model.isEdge(C[0])?e.setSelectionCell(e.model.getTerminal(C[0],!1)):e.setSelectionCell(C[C.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
-function(x,A,C,F){var K=this.actions.get(C);null!=K&&(C=function(){K.isEnabled()&&K.funct()},A?F?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):F?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
-!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
+EditorUi.prototype.createKeyHandler=function(a){function b(x,A,C){if(!d.isSelectionEmpty()&&d.isEnabled()){A=null!=A?A:1;var F=d.getCompositeParents(d.getSelectionCells()),K=0<F.length?F[0]:null;if(null!=K)if(C){d.getModel().beginUpdate();try{for(K=0;K<F.length;K++)if(d.getModel().isVertex(F[K])&&d.isCellResizable(F[K])){var E=d.getCellGeometry(F[K]);null!=E&&(E=E.clone(),37==x?E.width=Math.max(0,E.width-A):38==x?E.height=Math.max(0,E.height-A):39==x?E.width+=A:40==x&&(E.height+=A),d.getModel().setGeometry(F[K],
+E))}}finally{d.getModel().endUpdate()}}else{E=d.model.getParent(K);var O=d.getView().scale;C=null;1==d.getSelectionCount()&&d.model.isVertex(K)&&null!=d.layoutManager&&!d.isCellLocked(K)&&(C=d.layoutManager.getLayout(E));if(null!=C&&C.constructor==mxStackLayout)A=E.getIndex(K),37==x||38==x?d.model.add(E,K,Math.max(0,A-1)):(39==x||40==x)&&d.model.add(E,K,Math.min(d.model.getChildCount(E),A+1));else{var R=d.graphHandler;null!=R&&(null==R.first&&R.start(K,0,0,F),null!=R.first&&(K=F=0,37==x?F=-A:38==
+x?K=-A:39==x?F=A:40==x&&(K=A),R.currentDx+=F*O,R.currentDy+=K*O,R.checkPreview(),R.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=R.first){var Q=R.roundLength(R.currentDx/O),P=R.roundLength(R.currentDy/O);R.moveCells(R.cells,Q,P);R.reset()}},400))}}}}var f=this,d=this.editor.graph,g=new mxKeyHandler(d),e=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
+89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&e.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(d.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var A=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=A)return A.funct}if(null!=n[x.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(d.model.isVertex(d.getSelectionCell()))return function(){var C=d.connectVertex(d.getSelectionCell(),n[x.keyCode],
+d.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&d.model.isEdge(C[0])?d.setSelectionCell(d.model.getTerminal(C[0],!1)):d.setSelectionCell(C[C.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
+function(x,A,C,F){var K=this.actions.get(C);null!=K&&(C=function(){K.isEnabled()&&K.funct()},A?F?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):F?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){d.exitGroup()});g.bindControlShiftKey(35,function(){d.enterGroup()});g.bindShiftKey(36,function(){d.home()});g.bindKey(35,function(){d.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
+!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),g.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,
"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),g.bindAction(85,!0,
-"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){var a=this.editor.graph;null!=a&&null!=this.selectionStateListener&&(a.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),a.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
@@ -2622,34 +2623,34 @@ Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"large"!=urlParams["sidebar-entries"]&&(Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=1,Sidebar.prototype.thumbWidth=32,Sidebar.prototype.thumbHeight=30,Sidebar.prototype.minThumbStrokeWidth=1.3,Sidebar.prototype.thumbAntiAlias=!0);Sidebar.prototype.sidebarTitleSize=8;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;
Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.tooltipMouseDown=null;Sidebar.prototype.refresh=function(){this.graph.stylesheet.styles=mxUtils.clone(this.editorUi.editor.graph.stylesheet.styles);this.container.innerHTML="";this.palettes={};this.init()};
Sidebar.prototype.getTooltipOffset=function(a,b){b=b.height+2*this.tooltipBorder;return new mxPoint(this.container.offsetWidth+this.editorUi.splitSize+10+this.editorUi.container.offsetLeft,Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-b-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-b/2+16)))};
-Sidebar.prototype.createTooltip=function(a,b,f,e,g,d,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.createTooltip=function(a,b,f,d,g,e,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setPanning(!1),this.graph2.setEnabled(!1),this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()}),mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(x){null!=this.tooltipMouseDown&&this.tooltipMouseDown(x);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&
"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(x){this.hideTooltip()})),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),u=document.createElement("img"),u.setAttribute("src",Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("close")),u.style.position="absolute",u.style.cursor="default",u.style.padding="8px",u.style.right="2px",u.style.top="2px",this.tooltip.appendChild(u),this.tooltipCloseImage=u,mxEvent.addListener(u,
-"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||e>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/e))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
-b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=d;r=this.graph2.getGraphBounds();n&&0<f&&0<e&&(r.width>f||r.height>e)?(f=Math.round(100*Math.min(f/r.width,e/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
-(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;e=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
+"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||d>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/d))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
+b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=e;r=this.graph2.getGraphBounds();n&&0<f&&0<d&&(r.width>f||r.height>d)?(f=Math.round(100*Math.min(f/r.width,d/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
+(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;d=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g),n=Math.min(this.maxTooltipWidth,Math.max(f,this.tooltipTitle.scrollWidth+
-4)),g=this.tooltipTitle.offsetHeight+10,e+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(e-=6,this.tooltipTitle.style.top=e-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=e+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
+4)),g=this.tooltipTitle.offsetHeight+10,d+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(d-=6,this.tooltipTitle.style.top=d-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=d+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
"translate("+g+","+f+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=g+"px",this.graph2.view.drawPane.style.top=f+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=k+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()};
-Sidebar.prototype.showTooltip=function(a,b,f,e,g,d){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,e,g,d)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
-Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,e,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,e)}))};
-Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var e=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=e&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){e=this.editorUi.convertDataUri(e);var d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(d+="aspect=fixed;");return this.createVertexTemplate(d+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
-mxUtils.bind(this,function(){var d=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
-Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],e={},g=0;g<a.length;g++){null==e[a[g]]&&(e[a[g]]=!0,f.push(a[g]));var d=a[g].replace(/\.*\d*$/,"");d!=a[g]&&null==e[d]&&(e[d]=!0,f.push(d))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
+Sidebar.prototype.showTooltip=function(a,b,f,d,g,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,d,g,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
+Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,d,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,d)}))};
+Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var d=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=d&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){d=this.editorUi.convertDataUri(d);var e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");return this.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
+mxUtils.bind(this,function(){var e=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(e,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
+Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],d={},g=0;g<a.length;g++){null==d[a[g]]&&(d[a[g]]=!0,f.push(a[g]));var e=a[g].replace(/\.*\d*$/,"");e!=a[g]&&null==d[e]&&(d[e]=!0,f.push(e))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
Sidebar.prototype.addEntryForTag=function(a,b){if(null!=a&&1<a.length){var f=this.taglist[a];"object"!==typeof f&&(f={entries:[]},this.taglist[a]=f);f.entries.push(b)}};
-Sidebar.prototype.searchEntries=function(a,b,f,e,g){if(null!=this.taglist&&null!=a){var d=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<d.length;u++)if(0<d[u].length){var m=this.taglist[d[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var A=0;A<x.length;A++)if(m=x[A],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==d.length-1&&a.length==k)){e(a.slice(f*b,k),k,!0,d);return}}else a=[];g=r;n++}g=a.length;e(a.slice(f*b,(f+1)*b),g,!1,d)}else e([],null,
-null,d)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},e=0;e<a.length;e++)null==f[a[e]]&&(f[a[e]]="1",b.push(a[e]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
-Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px";
-e.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";e.appendChild(g);var d=document.createElement("img");d.setAttribute("src",Sidebar.prototype.searchImage);d.setAttribute("title",
-mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){K()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
-"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,A={},C=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var E=f.firstChild;null!=E;){var O=E.nextSibling;E!=e&&E!=k&&E.parentNode.removeChild(E);E=O}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var K=mxUtils.bind(this,
+Sidebar.prototype.searchEntries=function(a,b,f,d,g){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<e.length;u++)if(0<e[u].length){var m=this.taglist[e[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var A=0;A<x.length;A++)if(m=x[A],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==e.length-1&&a.length==k)){d(a.slice(f*b,k),k,!0,e);return}}else a=[];g=r;n++}g=a.length;d(a.slice(f*b,(f+1)*b),g,!1,e)}else d([],null,
+null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},d=0;d<a.length;d++)null==f[a[d]]&&(f[a[d]]="1",b.push(a[d]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
+Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.paddingBottom="8px";
+d.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";d.appendChild(g);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",
+mxResources.get("search"));e.style.position="relative";e.style.left="-18px";e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";d.appendChild(e);f.appendChild(d);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){K()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
+"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,A={},C=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var E=f.firstChild;null!=E;){var O=E.nextSibling;E!=d&&E!=k&&E.parentNode.removeChild(E);E=O}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var K=mxUtils.bind(this,
function(){C=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,A={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var E={};this.currentSearch=E;this.searchEntries(u,C,x,mxUtils.bind(this,function(O,R,Q,P){if(this.currentSearch==E){O=null!=O?O:[];m=!1;x++;this.insertSearchHint(f,u,C,x,O,R,Q,P);
0==O.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(R=0;R<O.length;R++)mxUtils.bind(this,function(aa){try{var T=aa();null==A[T.innerHTML]?(A[T.innerHTML]=null!=aa.parentLibraries?aa.parentLibraries.slice():[],f.appendChild(T)):null!=aa.parentLibraries&&(A[T.innerHTML]=A[T.innerHTML].concat(aa.parentLibraries));mxEvent.addGestureListeners(T,null,null,mxUtils.bind(this,function(U){var fa=A[T.innerHTML];mxEvent.isPopupTrigger(U)&&this.showPopupMenuForEntry(T,fa,U)}));mxEvent.disableContextMenu(T)}catch(U){}})(O[R]);
Q?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",A={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(E){g.value=E;K()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(E){13==E.keyCode&&(K(),mxEvent.consume(E))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(E){""==
-g.value?(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search"))):(d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(E){E.stopPropagation&&E.stopPropagation();E.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(E){E.stopPropagation&&
+g.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(E){E.stopPropagation&&E.stopPropagation();E.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(E){E.stopPropagation&&
E.stopPropagation();E.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.container.appendChild(a);this.palettes.search=[b,a]};
-Sidebar.prototype.insertSearchHint=function(a,b,f,e,g,d,k,n){0==g.length&&1==e&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
-Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var e=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);e.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
+Sidebar.prototype.insertSearchHint=function(a,b,f,d,g,e,k,n){0==g.length&&1==d&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
+Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);d.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",
190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60,"","Parallelogram"),this.createVertexTemplateEntry("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2658,16 +2659,16 @@ Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrar
120,60,"","Trapezoid"),this.createVertexTemplateEntry("shape=tape;whiteSpace=wrap;html=1;",120,100,"","Tape"),this.createVertexTemplateEntry("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",80,100,"","Note"),this.createVertexTemplateEntry("shape=card;whiteSpace=wrap;html=1;",80,100,"","Card"),this.createVertexTemplateEntry("shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;",120,80,"","Callout",null,null,"bubble chat thought speech message"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;",
30,60,"Actor","Actor",!1,null,"user person human stickman"),this.createVertexTemplateEntry("shape=xor;whiteSpace=wrap;html=1;",60,80,"","Or",null,null,"logic or"),this.createVertexTemplateEntry("shape=or;whiteSpace=wrap;html=1;",60,80,"","And",null,null,"logic and"),this.createVertexTemplateEntry("shape=dataStorage;whiteSpace=wrap;html=1;fixedSize=1;",100,80,"","Data Storage"),this.createVertexTemplateEntry("swimlane;startSize=0;",200,200,"","Container",null,null,"container swimlane lane pool group"),
this.createVertexTemplateEntry("swimlane;",200,200,"Vertical Container","Container",null,null,"container swimlane lane pool group"),this.createVertexTemplateEntry("swimlane;horizontal=0;",200,200,"Horizontal Container","Horizontal Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var g=new mxCell("List",new mxGeometry(0,0,140,120),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-g.vertex=!0;g.insert(b.cloneCell(e,"Item 1"));g.insert(b.cloneCell(e,"Item 2"));g.insert(b.cloneCell(e,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(e,"List Item")],e.geometry.width,e.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
+g.vertex=!0;g.insert(b.cloneCell(d,"Item 1"));g.insert(b.cloneCell(d,"Item 2"));g.insert(b.cloneCell(d,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(d,"List Item")],d.geometry.width,d.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
g.geometry.setTerminalPoint(new mxPoint(0,50),!0);g.geometry.setTerminalPoint(new mxPoint(50,0),!1);g.geometry.points=[new mxPoint(50,50),new mxPoint(0,0)];g.geometry.relative=!0;g.edge=!0;return this.createEdgeTemplateFromCells([g],g.geometry.width,g.geometry.height,"Curve")})),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;startArrow=classic;html=1;",100,100,"","Bidirectional Arrow",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;html=1;",
50,50,"","Arrow",null,"line lines connector connectors connection connections arrow arrows directional directed"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;",50,50,"","Dashed Line",null,"line lines connector connectors connection connections arrow arrows dashed undirected no"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;",50,50,"","Dotted Line",null,"line lines connector connectors connection connections arrow arrows dotted undirected no"),
this.createEdgeTemplateEntry("endArrow=none;html=1;",50,50,"","Line",null,"line lines connector connectors connection connections arrow arrows simple undirected plain blank no"),this.createEdgeTemplateEntry("endArrow=classic;startArrow=classic;html=1;",50,50,"","Bidirectional Connector",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("endArrow=classic;html=1;",50,50,"","Directional Connector",null,"line lines connector connectors connection connections arrow arrows directional directed"),
-this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",
-new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
-0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
-mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
-0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");d.geometry.relative=!0;d.vertex=!0;d.geometry.offset=new mxPoint(-10,-7);g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
+this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",
+new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
+0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
+mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
+0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-7);g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
Sidebar.prototype.addMiscPalette=function(a){var b=this;this.setCurrentSearchEntryLibrary("general","misc");var f=[this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;",100,40,"Title","Title",null,null,"text heading title"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>",
"Unordered List"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ol><li>Value 1</li><li>Value 2</li><li>Value 3</li></ol>","Ordered List"),this.addDataEntry("table",180,120,"Table 1","7ZjBTuMwEIafJteVnVDoXpuycGAvsC9g6mltyfFE9kAann7txN2qqIgU0aCllRJpZjxO7G9i/3KyoqzWN07U6jdKMFlxnRWlQ6TeqtYlGJPlTMusmGd5zsKd5b/eaOVdK6uFA0tDOuR9h2dhnqCP9AFPrUkBr0QdTRKPMTRTVIVhznkwG6UJHmqxiO1NmESIeRKOHvRLDLHgL9CS0BZc6rNAY0TtdfewPkNpI+9Ei0+0ec3Gm6XhgSNYvznFLpTmdwNYAbk2pDRakkoZ0x4DU6BXatMtsWHC94HVv75bYsFI0PYDLA4EeI9NZIhOv0QwJjF4Tc03ujLCwi0I+So0Q9mmEGGdLANLSuYjEmGVHJemy/aSlw7rP8KtYJOy1MaUaDAWy6KN5a5RW+oATWbhCshK9mOSTcLMyuDzrR+umO6oROvJhaLHx4Lw1IAfXMz8Y8W8+IRaXgyvZRgxaWHuYUHCroasi7AObMze0t8D+7CCYkC5NPGDmistJdihjIt3GV8eCfHkxBGvd/GOQPzyTHxnsx8B+dVZE0bRhHa3ZGNIxPRUVtPVl0nEzxNHPL5EcHZGPrZGcH4WiTFFYjqiSPADTtX/93ri7x+9j7aADjh5f0/IXyAU3+GE3O1L4K6fod+e+CfV4YjqEdztL8GubeeP4V8="),
this.addDataEntry("table",180,120,"Table 2","7ZhRb5swEMc/Da+TDSFJX0O27qF7aae9u8EJlowP2ZcR+ulng1maJlbTaaEPIBHpfL5z8O/v0wlHSVYe7jWrih+QcxklX6Mk0wDYWeUh41JGMRF5lKyjOCb2F8XfArO0nSUV01zhNQlxl/CbyT3vPJ3DYCO9wxSsciayZ+daFVja11xTa9aFQP5UsY2br+0mrM8g0/gkXpyL2PEGFDKhuPY5G5CSVUa0i3URhZD5A2tgj/3f9CMXvS/Vg803PlpD/Xro359r5Icgg9blAdxzKDnqxobUIsfCRyw7TqTgYlf0aR4eYaZz7P7mHpFaw1O9TDj5IOFHqB1k0OLFkZN+n2+xmlqUkin+nbP8jWsFeeNdCJW3JN+iN58BEcoep98uuShNrqH6yfSO9yFbIWUGEpyaCpQ7DxUIhS2gdGUfiywjX9IotTvL7Jgex/Zx4RozUAa1PRVuWc4M1tzgtWLG/ybm7D9oOTvT8ldrxoQGRbWvjoLJR75BpnbXVJCtGOWijzJcoP4xZcEy3Up3staFyHOu3KL2ePkDReNr4Sfvwp/fiH0aZB8uqFGwP5xyH0CKeVCKZJLidd8YQIvF1F4GaS/NqWRDdJtlsMxmIymzxad1m7sg+3Tc7IfvNpQEtZhPWgzcbiid+s2Q/WY5YL+h55cBfaEtRlJo9P2bgptV1vlFQU9/OXL6n9Bzwl/6d5MYN246dni8AG3nTu5H/wA="),
@@ -2677,10 +2678,10 @@ this.addDataEntry("crossfunctional cross-functional cross functional flowchart s
this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=#ffffff;overflow=fill;rounded=0;",280,160,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr style="background-color:#A7C942;color:#ffffff;border:1px solid #98bf21;"><th align="left">Title 1</th><th align="left">Title 2</th><th align="left">Title 3</th></tr><tr style="border:1px solid #98bf21;"><td>Value 1</td><td>Value 2</td><td>Value 3</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 4</td><td>Value 5</td><td>Value 6</td></tr><tr style="border:1px solid #98bf21;"><td>Value 7</td><td>Value 8</td><td>Value 9</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 10</td><td>Value 11</td><td>Value 12</td></tr></table>',
"HTML Table 1"),this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=none;overflow=fill;",180,140,'<table border="0" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
"HTML Table 2"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",180,140,'<table border="1" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
-"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var e=
-new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");e.vertex=!0;this.graph.setLinkForCell(e,"https://www.draw.io");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var e=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
-e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var e=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");this.graph.setAttributeForCell(e,
-"name","Variable");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
+"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var d=
+new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");d.vertex=!0;this.graph.setLinkForCell(d,"https://www.draw.io");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var d=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
+d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var d=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");this.graph.setAttributeForCell(d,
+"name","Variable");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
100,60,"","Double Ellipse",null,null,"oval ellipse start end state double"),this.createVertexTemplateEntry("shape=ext;double=1;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Square",null,null,"double square"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Circle",null,null,"double circle"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#1ba1e2;sketch=1;",
120,60,"","Rectangle Sketch",!0,null,"rectangle rect box text sketch comic retro"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=2;hachureGap=8;fillColor=#990000;fillStyle=dots;sketch=1;",120,60,"","Ellipse Sketch",!0,null,"ellipse oval sketch comic retro"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=-1;hachureGap=8;fillStyle=cross-hatch;fillColor=#006600;sketch=1;",120,60,"","Diamond Sketch",!0,null,"diamond sketch comic retro"),
this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;backgroundOutline=1;isoAngle=15;",90,100,"","Isometric Cube",!0,null,"cube box iso isometric"),this.createVertexTemplateEntry("html=1;whiteSpace=wrap;aspect=fixed;shape=isoRectangle;",150,90,"","Isometric Square",!0,null,"rectangle rect box iso isometric"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;",50,100,"","Isometric Edge 1"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;elbow=vertical;",
@@ -2688,7 +2689,7 @@ this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;background
160,10,"","Horizontal Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("line;strokeWidth=4;direction=south;html=1;perimeter=backbonePerimeter;points=[];outlineConnect=0;",10,160,"","Vertical Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;",120,20,"","Horizontal Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;direction=south;",
20,120,"","Vertical Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image="+this.gearImage,52,61,"","Image (Fixed Aspect)",!1,null,"fixed image icon symbol"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image="+this.gearImage,50,60,"","Image (Variable Aspect)",!1,null,"strechted image icon symbol"),
this.createVertexTemplateEntry("icon;html=1;image="+this.gearImage,60,60,"Icon","Icon",!1,null,"icon image symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;image="+this.gearImage,140,60,"Label","Label 1",null,null,"label image icon symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;align=center;verticalAlign=bottom;spacingLeft=0;spacingBottom=4;imageAlign=center;imageVerticalAlign=top;image="+this.gearImage,120,80,"Label","Label 2",null,null,"label image icon symbol"),
-this.addEntry("shape group container",function(){var e=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");e.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;e.insert(g);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
+this.addEntry("shape group container",function(){var d=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");d.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;d.insert(g);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;top=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=1;right=1;left=1;top=0;fillColor=none;routingCenterX=-0.5;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",
40,40,"","Waypoint"),this.createEdgeTemplateEntry("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;",50,50,"","Manual Line",null,"line lines connector connectors connection connections arrow arrows manual"),this.createEdgeTemplateEntry("shape=filledEdge;rounded=0;fixDash=1;endArrow=none;strokeWidth=10;fillColor=#ffffff;edgeStyle=orthogonalEdgeStyle;",60,40,"","Filled Edge"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=horizontal;endArrow=classic;html=1;",50,50,"","Horizontal Elbow",
null,"line lines connector connectors connection connections arrow arrows elbow horizontal"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;",50,50,"","Vertical Elbow",null,"line lines connector connectors connection connections arrow arrows elbow vertical")];this.addPaletteFunctions("misc",mxResources.get("misc"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
@@ -2715,122 +2716,122 @@ null,null,"collate"),this.createVertexTemplateEntry("shape=switch;whiteSpace=wra
f.insert(a.cloneCell(b,"Item 3"));return a.createVertexTemplateFromCells([f],f.geometry.width,f.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(b,"List Item")],b.geometry.width,b.geometry.height,"List Item")})]};
Sidebar.prototype.addBasicPalette=function(a){this.setCurrentSearchEntryLibrary("basic");this.addStencilPalette("basic",mxResources.get("basic"),a+"/basic.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2",null,null,null,null,[this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;",
120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;",120,60,"","Partial Rectangle")]);this.setCurrentSearchEntryLibrary()};
-Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,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;");f.vertex=!0;var e=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;");
-e.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var d=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-d.vertex=!0;d.insert(f.clone());d.insert(e.clone());d.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var d=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");d.vertex=
-!0;d.insert(f.clone());d.insert(f.clone());d.insert(f.clone());return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var d=new mxCell("item: attribute",
-new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);d.vertex=!0;return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([e.clone()],
-e.geometry.width,e.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var d=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
-80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var d=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);d.insert(k);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component")}),
-this.addEntry("uml static class component",function(){var d=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);d.insert(k);
-return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
+Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,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;");f.vertex=!0;var d=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;");
+d.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var e=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
+e.vertex=!0;e.insert(f.clone());e.insert(d.clone());e.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var e=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");e.vertex=
+!0;e.insert(f.clone());e.insert(f.clone());e.insert(f.clone());return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var e=new mxCell("item: attribute",
+new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);e.vertex=!0;return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([d.clone()],
+d.geometry.width,d.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var e=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
+80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var e=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);e.insert(k);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component")}),
+this.addEntry("uml static class component",function(){var e=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);e.insert(k);
+return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
this.createVertexTemplateEntry("shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;",70,50,"package","Package",null,null,"uml static class package"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;",160,90,'<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;"><b>Object:Type</b></p><hr/><p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
"Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;html=1;",180,90,'<div style="box-sizing:border-box;width:100%;background:#e4e4e4;padding:2px;">Tablename</div><table style="width:100%;font-size:1em;" cellpadding="2" cellspacing="0"><tr><td>PK</td><td>uniqueId</td></tr><tr><td>FK1</td><td>foreignKey</td></tr><tr><td></td><td>fieldname</td></tr></table>',"Entity",null,null,"er entity table"),this.addEntry("uml static class object instance",
-function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
-new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
-new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
-new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
+function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
+new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
+new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
+new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
10,20,"","Required Interface",null,null,"uml required interface lollipop notation"),this.addEntry("uml lollipop notation provided required interface",function(){return b.createVertexTemplateFromData("zVRNT8MwDP01uaLSMu6sfFxAmrQDcAytaQJZXLnu2u7XkzQZXTUmuIA4VIqf/ZzkvdQiyzf9HclaPWAJRmQ3IssJkcNq0+dgjEgTXYrsWqRp4j6R3p7Ino/ZpJYEln9CSANhK00LAQlAw4OJAGFrS/D1iciWSKywQivNPWLtwHMHvgHzsNY7z5Ato4MUb0zMgi2viLBzoUULAbnVxsSWzTtwofYBtlTACkhvgIHWtSy0rWKSJVXAJ5Lh4FBWMNMicAJ0cSzPWBW1uQN0fWlwJQRGst7OW8kmhNVn3Sd1hdp1TJMhVCzmhHipUDO54RYHm07Q6NHXfmV/65eS5jXXVJhj15yCNDz54GyxD58PwjL2v/SmMuE7POqSVdxj5vm/cK6PG4X/5deNvPjeSEfQdeOV75Rm8K/dZzo3LOaGSaMr69aF0wbIA00NhZfpVff+JSwJGr2TL2Nnr3jtbzDeabEUi2v/Tlo22kKO1gbq0Z8ZDwzE0J+cNidM2ROinF18CR6KeivQleI59pVrM8knfV04Dc1gx+FM/QA=",
40,10,"Lollipop Notation")}),this.createVertexTemplateEntry("shape=umlBoundary;whiteSpace=wrap;html=1;",100,80,"Boundary Object","Boundary Object",null,null,"uml boundary object"),this.createVertexTemplateEntry("ellipse;shape=umlEntity;whiteSpace=wrap;html=1;",80,80,"Entity Object","Entity Object",null,null,"uml entity object"),this.createVertexTemplateEntry("ellipse;shape=umlControl;whiteSpace=wrap;html=1;",70,80,"Control Object","Control Object",null,null,"uml control object"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;",
-30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var d=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var d=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var d=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
-d.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;d.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,
-!0);return b.createVertexTemplateFromCells([d,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var d=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
-!0;k.geometry.x=-1;k.edge=!0;d.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var d=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
-d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
+30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var e=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var e=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var e=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
+e.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;e.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,
+!0);return b.createVertexTemplateFromCells([e,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var e=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
+!0;k.geometry.x=-1;k.edge=!0;e.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var e=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
+e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
100,300,":Object","Lifeline",null,null,"uml sequence participant lifeline"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlActor;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",20,300,"","Actor Lifeline",null,null,"uml sequence participant lifeline actor"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlBoundary;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
50,300,"","Boundary Lifeline",null,null,"uml sequence participant lifeline boundary"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlEntity;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",40,300,"","Entity Lifeline",null,null,"uml sequence participant lifeline entity"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlControl;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
-40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,
-k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var d=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");d.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
-!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
+40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,
+k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var e=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");e.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
+!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
10,60,"Callback")}),this.createVertexTemplateEntry("html=1;points=[];perimeter=orthogonalPerimeter;",10,80,"","Activation",null,null,"uml sequence activation"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=oval;startFill=1;endArrow=block;startSize=8;",60,0,"dispatch","Found Message 1",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=circle;startFill=1;endArrow=open;startSize=6;endSize=8;",80,0,"dispatch",
-"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var d=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");d.geometry.setTerminalPoint(new mxPoint(80,0),!0);d.geometry.setTerminalPoint(new mxPoint(0,0),!1);d.geometry.relative=
-!0;d.edge=!0;return b.createEdgeTemplateFromCells([d],80,0,"Return")}),this.addEntry("uml relation",function(){var d=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 1")}),this.addEntry("uml association",function(){var d=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
-d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");d.geometry.setTerminalPoint(new mxPoint(0,
-0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var d=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=
-!0;d.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
+"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var e=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");e.geometry.setTerminalPoint(new mxPoint(80,0),!0);e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=
+!0;e.edge=!0;return b.createEdgeTemplateFromCells([e],80,0,"Return")}),this.addEntry("uml relation",function(){var e=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 1")}),this.addEntry("uml association",function(){var e=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
+e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");e.geometry.setTerminalPoint(new mxPoint(0,
+0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var e=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=
+!0;e.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,g);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";mxUtils.write(b,a);return b};
-Sidebar.prototype.createThumb=function(a,b,f,e,g,d,k){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
-mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=d;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";e.appendChild(n);
-this.sidebarTitles&&null!=g&&0!=k&&(e.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),e.appendChild(b));return a};
+Sidebar.prototype.createThumb=function(a,b,f,d,g,e,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
+mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";d.appendChild(n);
+this.sidebarTitles&&null!=g&&0!=k&&(d.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),d.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,f,e,g,d,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
-!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,e,g,d);var r=new mxRectangle(0,0,g,d);1<a.length||a[0].vertex?(e=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a),e.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(e=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a));
+Sidebar.prototype.createItem=function(a,b,f,d,g,e,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
+!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,d,g,e);var r=new mxRectangle(0,0,g,e);1<a.length||a[0].vertex?(d=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a),d.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(d=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a));
!mxClient.IS_IOS&&n&&mxEvent.addGestureListeners(u,null,mxUtils.bind(this,function(x){mxEvent.isMouseEvent(x)&&this.showTooltip(u,a,r.width,r.height,b,f)}));return u};
-Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,e=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var d=f.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),n=
-0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,d);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",e[mxConstants.STYLE_SHAPE],
+Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,d=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var e=f.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),n=
+0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,e);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=d[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",d[mxConstants.STYLE_SHAPE],
[u]));for(r=0;r<k.length;r++){var x=m[k[r]];null!=x&&f.setCellStyles(k[r],x,[u])}g.push(u)}}}finally{f.model.endUpdate()}return g};
-Sidebar.prototype.createDropHandler=function(a,b,f,e){f=null!=f?f:!0;return mxUtils.bind(this,function(g,d,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d)?document.elementFromPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)):mxEvent.getSource(d);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(d)?!1:g.isValidDropTarget(k,a,d);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
-g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,K=g.cloneCells(a);g.splitEdge(k,K,null,n-e.width/2,u-e.height/2,C,F);r=K}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var E=g.layoutManager.getLayout(k);if(null!=E)for(x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,k=0;k<r.length;k++)E.moveCell(r[k],C,F)}!f||null!=d&&mxEvent.isShiftDown(d)||
-g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(O){this.editorUi.handleError(O)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})};
+Sidebar.prototype.createDropHandler=function(a,b,f,d){f=null!=f?f:!0;return mxUtils.bind(this,function(g,e,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(e)?!1:g.isValidDropTarget(k,a,e);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
+g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,e)){var x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,K=g.cloneCells(a);g.splitEdge(k,K,null,n-d.width/2,u-d.height/2,C,F);r=K}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var E=g.layoutManager.getLayout(k);if(null!=E)for(x=g.view.scale,A=g.view.translate,C=(n+A.x)*x,F=(u+A.y)*x,k=0;k<r.length;k++)E.moveCell(r[k],C,F)}!f||null!=e&&mxEvent.isShiftDown(e)||
+g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(O){this.editorUi.handleError(O)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(e)}})};
Sidebar.prototype.createDragPreview=function(a,b){var f=document.createElement("div");f.className="geDragPreview";f.style.width=a+"px";f.style.height=b+"px";return f};
-Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),A=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(A=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=C=0;if(null!=k){var K=k.origin;C=K.x;F=K.y;var E=d.getTerminalPoint(!1);null!=
-E&&(E.x+=K.x,E.y+=K.y)}var O=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&A),R=n.getCellAt((d.x+C+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,T,U){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(K=k.origin,x=R,O=!0,n.model.isEdge(a)||(d.x-=K.x-C,d.y-=K.y-F));else if(!A||n.isTableRow(a)||n.isTableCell(a))d.x+=C,d.y+=F;C=r.x;F=r.y;n.model.isEdge(b[e])&&(F=C=0);k=b=n.importCells(b,
-d.x-(O?C:0),d.y-(O?F:0),O?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var Q=n.getCellGeometry(b[e]);Q.points=null;if(null!=Q.getTerminalPoint(!1))Q.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(O&&n.model.isVertex(x)){var P=n.view.getState(x);K=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,K.x,K.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),C=d.x-Math.round(r.x),F=
-d.y-Math.round(r.y),d.x=Math.round(r.x),d.y=Math.round(r.y),n.model.setGeometry(b[e],d),n.cellsMoved(b,C,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[e],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(aa){this.editorUi.handleError(aa)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view,k=1<e.length,n=g.getCellGeometry(a);e=g.getCellGeometry(b);null!=n&&null!=e&&(e=e.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(e.x=b.x/d.scale-d.translate.x-e.width/2,e.y=b.y/d.scale-d.translate.y-e.height/2):(e.x=g.x/d.scale-d.translate.x-e.width/2,e.y=g.y/d.scale-d.translate.y-e.height/2)):(n.relative&&(a=g.view.getState(a),
-n=n.clone(),n.x=(a.x-d.translate.x)/d.scale,n.y=(a.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(b=e.getTerminalPoint(!0),g=e.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),e.x=n.getCenterX(),e.y=n.getCenterY(),e.width=1,e.height=1,f==mxConstants.DIRECTION_NORTH?(e.height=d,e.y=n.y-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):f==mxConstants.DIRECTION_EAST?(e.width=d,e.x=n.x+n.width,e.setTerminalPoint(new mxPoint(e.x+
-e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=n.y+n.height,e.setTerminalPoint(new mxPoint(e.x,e.y+e.height),!1)):f==mxConstants.DIRECTION_WEST&&(e.width=d,e.x=n.x-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1))):(!k&&45<e.width&&45<e.height&&45<n.width&&45<n.height&&(e.width*=n.height/e.height,e.height=n.height),e.x=n.x+n.width/2-e.width/2,e.y=n.y+n.height/2-e.height/2,f==mxConstants.DIRECTION_NORTH?e.y=e.y-n.height/2-e.height/2-d:f==mxConstants.DIRECTION_EAST?e.x=e.x+n.width/2+
-e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-n.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=n.getCenterX()-n.width/2,e.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()-n.height/
-2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),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.dropAndConnect=function(a,b,f,d,g){var e=this.getDropAndConnectGeometry(a,b[d],f,b),k=[];if(null!=e){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[d]),x=n.model.getParent(a),A=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(A=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=C=0;if(null!=k){var K=k.origin;C=K.x;F=K.y;var E=e.getTerminalPoint(!1);null!=
+E&&(E.x+=K.x,E.y+=K.y)}var O=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&A),R=n.getCellAt((e.x+C+n.view.translate.x)*n.view.scale,(e.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(aa,T,U){return!n.isContainer(aa.cell)});if(null!=R&&R!=x)k=n.view.getState(R),null!=k&&(K=k.origin,x=R,O=!0,n.model.isEdge(a)||(e.x-=K.x-C,e.y-=K.y-F));else if(!A||n.isTableRow(a)||n.isTableCell(a))e.x+=C,e.y+=F;C=r.x;F=r.y;n.model.isEdge(b[d])&&(F=C=0);k=b=n.importCells(b,
+e.x-(O?C:0),e.y-(O?F:0),O?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[d],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[d])){n.model.setTerminal(b[d],a,!0);var Q=n.getCellGeometry(b[d]);Q.points=null;if(null!=Q.getTerminalPoint(!1))Q.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(O&&n.model.isVertex(x)){var P=n.view.getState(x);K=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,K.x,K.y,null,null,!0)}}else r=n.getCellGeometry(b[d]),C=e.x-Math.round(r.x),F=
+e.y-Math.round(r.y),e.x=Math.round(r.x),e.y=Math.round(r.y),n.model.setGeometry(b[d],e),n.cellsMoved(b,C,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[d],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(aa){this.editorUi.handleError(aa)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view,k=1<d.length,n=g.getCellGeometry(a);d=g.getCellGeometry(b);null!=n&&null!=d&&(d=d.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(d.x=b.x/e.scale-e.translate.x-d.width/2,d.y=b.y/e.scale-e.translate.y-d.height/2):(d.x=g.x/e.scale-e.translate.x-d.width/2,d.y=g.y/e.scale-e.translate.y-d.height/2)):(n.relative&&(a=g.view.getState(a),
+n=n.clone(),n.x=(a.x-e.translate.x)/e.scale,n.y=(a.y-e.translate.y)/e.scale),e=g.defaultEdgeLength,g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=d.getTerminalPoint(!1)?(b=d.getTerminalPoint(!0),g=d.getTerminalPoint(!1),e=g.x-b.x,b=g.y-b.y,e=Math.sqrt(e*e+b*b),d.x=n.getCenterX(),d.y=n.getCenterY(),d.width=1,d.height=1,f==mxConstants.DIRECTION_NORTH?(d.height=e,d.y=n.y-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1)):f==mxConstants.DIRECTION_EAST?(d.width=e,d.x=n.x+n.width,d.setTerminalPoint(new mxPoint(d.x+
+d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=n.y+n.height,d.setTerminalPoint(new mxPoint(d.x,d.y+d.height),!1)):f==mxConstants.DIRECTION_WEST&&(d.width=e,d.x=n.x-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1))):(!k&&45<d.width&&45<d.height&&45<n.width&&45<n.height&&(d.width*=n.height/d.height,d.height=n.height),d.x=n.x+n.width/2-d.width/2,d.y=n.y+n.height/2-d.height/2,f==mxConstants.DIRECTION_NORTH?d.y=d.y-n.height/2-d.height/2-e:f==mxConstants.DIRECTION_EAST?d.x=d.x+n.width/2+
+d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+n.height/2+d.height/2+e:f==mxConstants.DIRECTION_WEST&&(d.x=d.x-n.width/2-d.width/2-e),g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(d.x-=n.getCenterX()-n.width/2,d.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()-n.height/
+2):f==mxConstants.DIRECTION_WEST&&(d.x-=n.getCenterX()+n.width/2,d.y-=n.getCenterY()))))));return d};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),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,b,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,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))):b.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&&
+Sidebar.prototype.createDragSource=function(a,b,f,d,g){function e(Z,oa){var ua=mxUtils.createImage(Z.src);ua.style.width=Z.width+"px";ua.style.height=Z.height+"px";null!=oa&&ua.setAttribute("title",oa);mxUtils.setOpacity(ua,Z==this.refreshTarget?30:20);ua.style.position="absolute";ua.style.cursor="crosshair";return ua}function k(Z,oa,ua,Ja){null!=Ja.parentNode&&(mxUtils.contains(ua,Z,oa)?(mxUtils.setOpacity(Ja,100),L=Ja):mxUtils.setOpacity(Ja,Ja==fa?30:20));return ua}for(var n=this.editorUi,u=n.editor.graph,
+m=null,r=null,x=this,A=0;A<d.length&&(null==r&&u.model.isVertex(d[A])?r=A:null==m&&u.model.isEdge(d[A])&&null==u.model.getTerminal(d[A],!0)&&(m=A),null==r||null==m);A++);var C=this.isDropStyleEnabled(d,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(Z,oa,ua,Ja,Ga){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=R&&L==fa){var va=Z.isCellSelected(R.cell)?Z.getSelectionCells():[R.cell];va=this.updateShapes(Z.model.isEdge(R.cell)?d[0]:d[r],va);Z.setSelectionCells(va)}else null!=
+d&&null!=L&&null!=E&&L!=fa?(va=Z.model.isEdge(E.cell)||null==m?r:m,Z.setSelectionCells(this.dropAndConnect(E.cell,d,I,va,oa))):b.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=e(this.triangleUp,mxResources.get("connect")),aa=e(this.triangleRight,mxResources.get("connect")),T=e(this.triangleDown,mxResources.get("connect")),U=e(this.triangleLeft,mxResources.get("connect")),fa=e(this.refreshTarget,mxResources.get("replace")),ha=null,ba=e(this.roundDrop),qa=e(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,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 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(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),
+if(null!=this.previewElement){var ua=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,d[Ja],I,d),
+va=Z.model.isEdge(E.cell)?null:Z.getCellGeometry(E.cell),za=Z.getCellGeometry(d[Ja]),ra=Z.model.getParent(E.cell),Ha=ua.translate.x*ua.scale,Ta=ua.translate.y*ua.scale;null!=va&&!va.relative&&Z.model.isVertex(ra)&&ra!=ua.currentRoot&&(Ta=ua.getState(ra),Ha=Ta.x,Ta=Ta.y);va=za.x;za=za.y;Z.model.isEdge(d[Ja])&&(za=va=0);this.previewElement.style.left=(Ga.x-va)*ua.scale+Ha+"px";this.previewElement.style.top=(Ga.y-za)*ua.scale+Ta+"px";1==d.length&&(this.previewElement.style.width=Ga.width*ua.scale+"px",
+this.previewElement.style.height=Ga.height*ua.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*ua.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*ua.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(d[0]);F.getDropTarget=mxUtils.bind(this,function(Z,oa,ua,Ja){var Ga=mxEvent.isAltDown(Ja)||null==d?null:Z.getCellAt(oa,ua,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 va=this.graph.getModel().getParent(Ga);this.graph.getModel().isVertex(va)&&this.graph.isCellConnectable(va)&&
+(Ga=va)}Z.isCellLocked(Ga)&&(Ga=null);var za=Z.view.getState(Ga);va=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,ua,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(d[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,ua,ra,fa)}}else null==R||!mxUtils.contains(R,oa,ua)||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,ua,ra,fa));if(Q&&null!=E&&!mxEvent.isAltDown(Ja)&&null==L){va=mxRectangle.fromRectangle(E);if(Z.model.isEdge(E.cell)){var Ha=E.absolutePoints;null!=ba.parentNode&&(ra=Ha[0],va.add(k(oa,ua,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],va.add(k(oa,ua,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)),va.add(k(oa,ua,new mxRectangle(E.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),va.add(k(oa,ua,new mxRectangle(ra.x+
+ra.width,E.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),aa)),va.add(k(oa,ua,new mxRectangle(E.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,this.triangleDown.height),T)),va.add(k(oa,ua,new mxRectangle(ra.x-this.triangleLeft.width,E.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),U));null!=va&&va.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(d[r]))&&(Z.model.isEdge(Ga)&&null!=r||Z.model.isVertex(Ga)&&Z.isCellConnectable(Ga));if(null!=E&&5E3<=ka||E!=za&&(null==va||!mxUtils.contains(va,oa,ua)||500<ka&&null==L&&ra))if(Q=!1,E=5E3>ka&&ka>this.dropTargetDelay||Z.model.isEdge(Ga)?za:null,null!=E&&ra){va=[ba,qa,P,aa,T,U];for(ra=0;ra<va.length;ra++)null!=va[ra].parentNode&&va[ra].parentNode.removeChild(va[ra]);Z.model.isEdge(Ga)?
+(Ha=za.absolutePoints,null!=Ha&&(ra=Ha[0],Ha=Ha[Ha.length-1],va=Z.tolerance,new mxRectangle(oa-va,ua-va,2*va,2*va),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.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(va=[ba,qa,P,aa,T,U],ra=0;ra<va.length;ra++)null!=va[ra].parentNode&&va[ra].parentNode.removeChild(va[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);va=Z.getModel();if(null!=Ga&&(null!=L||!Z.isSplitTarget(Ga,d,Ja))){for(;null!=Ga&&!Z.isValidDropTarget(Ga,d,Ja)&&va.isVertex(va.getParent(Ga));)Ga=va.getParent(Ga);null!=Ga&&(Z.view.currentRoot==Ga||!Z.isValidRoot(Ga)&&0==Z.getModel().getChildCount(Ga)||Z.isCellLocked(Ga)||va.isEdge(Ga)||!Z.isValidDropTarget(Ga,d,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,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)e.model.isVertex(a[g])&&(b=g);null!=b&&(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,b,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)),b.drop(e,f,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,b,f){var e=b.mouseDown,g=b.mouseMove,d=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){e.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
-k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),d.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
-Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,e,g,d,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,e,g,d,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,e,g,d,k,n,u){a=[new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,d,k,n,u)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,e,g,d,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,e,g,d,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,d,b,f,k,n)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,e,g,d,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,e,g,d,n,u)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,b,f,e,g,d,k,n){a=new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,d,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,null!=n?n:!0,b,f,d,k)};
-Sidebar.prototype.addPaletteFunctions=function(a,b,f,e){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var d=0;d<e.length;d++)g.appendChild(e[d](g))}))};
-Sidebar.prototype.addPalette=function(a,b,f,e){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(e(g),e=null):g.style.display="none";this.addFoldingHandler(b,g,e);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
-Sidebar.prototype.addFoldingHandler=function(a,b,f){var e=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(e)b.style.display="block";else if(e=!0,null!=f){a.style.cursor="wait";var d=a.innerHTML;a.innerHTML=mxResources.get("loading")+
-"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=d;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
+Sidebar.prototype.itemClicked=function(a,b,f,d){d=this.editorUi.editor.graph;d.container.focus();if(mxEvent.isAltDown(f)&&1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)d.model.isVertex(a[g])&&(b=g);null!=b&&(d.setSelectionCells(this.dropAndConnect(d.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,b,f)),d.scrollCellToVisible(d.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!d.isSelectionEmpty()?(f=d.getEditableCells(d.getSelectionCells()),this.updateShapes(a[0],f),d.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?d.getFreeInsertPoint():d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(a,!0)),b.drop(d,f,null,a.x,a.y,!0))};
+Sidebar.prototype.addClickHandler=function(a,b,f){var d=b.mouseDown,g=b.mouseMove,e=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){d.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
+k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
+Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,d,g,e,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,d,g,e,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,d,g,e,k,n,u){a=[new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,e,k,n,u)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,d,g,e,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,d,g,e,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,e,b,f,k,n)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,d,g,e,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,d,g,e,n,u)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,b,f,d,g,e,k,n){a=new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,e,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,null!=n?n:!0,b,f,e,k)};
+Sidebar.prototype.addPaletteFunctions=function(a,b,f,d){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var e=0;e<d.length;e++)g.appendChild(d[e](g))}))};
+Sidebar.prototype.addPalette=function(a,b,f,d){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(d(g),d=null):g.style.display="none";this.addFoldingHandler(b,g,d);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
+Sidebar.prototype.addFoldingHandler=function(a,b,f){var d=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(d)b.style.display="block";else if(d=!0,null!=f){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
+"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=e;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,b,f,e,g,d,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var A=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=A?A:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+e,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=d?d[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
-Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,A,C,F,K){if(null==g||0>mxUtils.indexOf(g,A)){C=this.getTagsForStencil(x,A);var E=null!=n?n[A]:null;null!=E&&C.push(E);r.push(this.createVertexTemplateEntry("shape="+x+A.toLowerCase()+e,Math.round(F*k),Math.round(K*k),"",A.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var A=0;A<u.length;A++)u[A](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,F,K,E,O){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+e,Math.round(E*k),Math.round(O*k),"",F.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addImagePalette=function(a,b,f,d,g,e,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var A=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=A?A:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+d,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=e?e[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
+Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var d=1;d<a.length;d++)a[d]=a[d].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
+Sidebar.prototype.addStencilPalette=function(a,b,f,d,g,e,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,A,C,F,K){if(null==g||0>mxUtils.indexOf(g,A)){C=this.getTagsForStencil(x,A);var E=null!=n?n[A]:null;null!=E&&C.push(E);r.push(this.createVertexTemplateEntry("shape="+x+A.toLowerCase()+d,Math.round(F*k),Math.round(K*k),"",A.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==d&&(d="");null!=e&&e.call(this,x);if(null!=u)for(var A=0;A<u.length;A++)u[A](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,F,K,E,O){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+d,Math.round(E*k),Math.round(O*k),"",F.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
-this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return b(f)}})();
+this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var d=0;d<a.length;d++)f=f.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][1]+";");return b(f)}})();
Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(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 a=Object.prototype.toString,b=function(e){return"function"===typeof e||"[object Function]"===a.call(e)},f=Math.pow(2,53)-1;return function(e){var g=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var d=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof d){if(!b(d))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
-arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=d?"undefined"===typeof k?d(r,m):d.call(k,r,m):r,m+=1;u.length=n;return u}}());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 a=Object.prototype.toString,b=function(d){return"function"===typeof d||"[object Function]"===a.call(d)},f=Math.pow(2,53)-1;return function(d){var g=Object(d);if(null==d)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof e){if(!b(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
+arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=e?"undefined"===typeof k?e(r,m):e.call(k,r,m):r,m+=1;u.length=n;return u}}());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 a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();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(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a};
-Graph=function(a,b,f,e,g,d){mxGraph.call(this,a,b,f,e);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(I){I=this.getCurrentCellStyle(I);
+Graph=function(a,b,f,d,g,e){mxGraph.call(this,a,b,f,d);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=e?e:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(I){I=this.getCurrentCellStyle(I);
return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,L){if("mouseDown"==L.getProperty("eventName")&&this.isEnabled()){I=L.getProperty("event");var H=I.getState();L=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=H)if(this.model.isEdge(H.cell))if(k=new mxPoint(I.getGraphX(),I.getGraphY()),r=this.isCellSelected(H.cell),u=H,n=I,null!=H.text&&null!=
H.text.boundingBox&&mxUtils.contains(H.text.boundingBox,I.getGraphX(),I.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var S=this.selectionCellsHandler.getHandler(H.cell);null!=S&&null!=S.bends&&0<S.bends.length&&(m=S.getHandleForEvent(I))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(I.getEvent())&&(S=this.selectionCellsHandler.getHandler(H.cell),null==S||null==S.getHandleForEvent(I))){var V=new mxRectangle(I.getGraphX()-1,I.getGraphY()-1),ea=mxEvent.isTouchEvent(I.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;S=ea+2;V.grow(ea);if(this.isTableCell(H.cell)&&!this.isCellSelected(H.cell)&&!(mxUtils.contains(H,I.getGraphX()-S,I.getGraphY()-S)&&mxUtils.contains(H,I.getGraphX()-S,I.getGraphY()+S)&&mxUtils.contains(H,I.getGraphX()+S,I.getGraphY()+S)&&mxUtils.contains(H,I.getGraphX()+S,I.getGraphY()-S))){var ka=this.model.getParent(H.cell);S=this.model.getParent(ka);if(!this.isCellSelected(S)){ea*=L;var wa=2*ea;if(this.model.getChildAt(S,0)!=ka&&mxUtils.intersects(V,
@@ -2845,7 +2846,7 @@ null!=H.visibleTargetState)I=this.view.getEdgeStyle(H),V="crosshair",I!=mxEdgeSt
new mxRectangle(H.x,H.y-2,H.width,4))&&this.model.getChildAt(S,0)!=L||mxUtils.intersects(I,new mxRectangle(H.x,H.y+H.height-2,H.width,4)))V="row-resize";else if(mxUtils.intersects(I,new mxRectangle(H.x-2,H.y,4,H.height))&&this.model.getChildAt(L,0)!=H.cell||mxUtils.intersects(I,new mxRectangle(H.x+H.width-2,H.y,4,H.height)))V="col-resize";for(L=H;null==V&&null!=L&&(this.isTableCell(L.cell)||this.isTableRow(L.cell)||this.isTable(L.cell));)this.isSwimlane(L.cell)&&(S=this.getActualStartSize(L.cell),
ea=this.view.scale,(0<S.x||0<S.width)&&mxUtils.intersects(I,new mxRectangle(L.x+(S.x-S.width-1)*ea+(0==S.x?L.width*ea:0),L.y,1,L.height))?V="col-resize":(0<S.y||0<S.height)&&mxUtils.intersects(I,new mxRectangle(L.x,L.y+(S.y-S.height-1)*ea+(0==S.y?L.height:0),L.width,1))&&(V="row-resize")),L=this.view.getState(this.model.getParent(L.cell))}null!=V&&H.setCursor(V)}}}),mouseUp:mxUtils.bind(this,function(I,L){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(I){var L=
mxCellRenderer.prototype.getLabelValue.apply(this,arguments);I.view.graph.isHtmlLabel(I.cell)&&(L=1!=I.style.html?mxUtils.htmlEntities(L,!1):I.view.graph.sanitizeHtml(L));return L};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,L){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=x.apply(this,arguments);if(this.graph.pageVisible){var L=[],H=this.graph.pageFormat,S=this.graph.pageScale,V=H.width*S;H=H.height*S;S=this.graph.view.translate;for(var ea=this.graph.view.scale,ka=
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(I,L){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=x.apply(this,arguments);if(this.graph.pageVisible){var L=[],H=this.graph.pageFormat,S=this.graph.pageScale,V=H.width*S;H=H.height*S;S=this.graph.view.translate;for(var ea=this.graph.view.scale,ka=
this.graph.getPageLayout(),wa=0;wa<ka.width;wa++)L.push(new mxRectangle(((ka.x+wa)*V+S.x)*ea,(ka.y*H+S.y)*ea,V*ea,H*ea));for(wa=1;wa<ka.height;wa++)L.push(new mxRectangle((ka.x*V+S.x)*ea,((ka.y+wa)*H+S.y)*ea,V*ea,H*ea));I=L.concat(I)}return I};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(I,L){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 A=this.graphHandler.getCells;this.graphHandler.getCells=function(I){for(var L=A.apply(this,arguments),H=new mxDictionary,S=[],V=0;V<L.length;V++){var ea=this.graph.isTableCell(I)&&this.graph.isTableCell(L[V])&&this.graph.isCellSelected(L[V])?this.graph.model.getParent(L[V]):this.graph.isTableRow(I)&&this.graph.isTableRow(L[V])&&this.graph.isCellSelected(L[V])?L[V]:this.graph.getCompositeParent(L[V]);
null==ea||H.get(ea)||(H.put(ea,!0),S.push(ea))}return S};var C=this.graphHandler.start;this.graphHandler.start=function(I,L,H,S){var V=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?V=!0:I=this.graph.model.getParent(I));V||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,L){L=this.graph.getCompositeParent(L);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
@@ -2863,29 +2864,29 @@ 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.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
Graph.createOffscreenGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
-Graph.createSvgImage=function(a,b,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="'+b+'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,b)};
-Graph.createSvgNode=function(a,b,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+" "+b+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,e){var g=document.createElement("canvas");g.width=b;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 b=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(b,e)),b=e+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
+Graph.createSvgImage=function(a,b,f,d,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="'+b+'px" '+(null!=d&&null!=g?'viewBox="0 0 '+d+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
+Graph.createSvgNode=function(a,b,f,d,g){var e=mxUtils.createXmlDocument(),k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"svg"):e.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==e.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",d+"px");k.setAttribute("viewBox",a+" "+b+" "+f+" "+d);e.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,d){var g=document.createElement("canvas");g.width=b;g.height=f;var e=document.createElement("img");e.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(e,0,0);d(g.toDataURL())});e.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 b=0,f=[],d=0;d<a.length;d++){var g=a.charCodeAt(d);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(b,d)),b=d+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(b,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,b){a=mxUtils.getXml(a);return Graph.compress(b?a:Graph.zapGremlins(a))};
-Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,e=0;e<f;e++)b+=String.fromCharCode(a[e]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==e){d=f;break}for(f=d+1;-1<d&&f<a.byteLength&&f<d+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
+Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,d=0;d<f;d++)b+=String.fromCharCode(a[d]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(a,b,f){var d=b.charCodeAt(0),g=1,e=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==d){e=f;break}for(f=e+1;-1<e&&f<a.byteLength&&f<e+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,e+1);g++}return g==b.length-1?e:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)};
-Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
+Graph.fadeNodes=function(a,b,f,d,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=d&&d()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};
Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()});
Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b=
-1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
-r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/e))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
+Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),g=d.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(d.substring(g));var e=f.getElementsByTagName("svg");if(0<e.length){if(b||null!=e[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{d=b=
+1;var k=e[0].getAttribute("width"),n=e[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=e[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,d=parseFloat(m[3])/n)}var r=e[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
+r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/d))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(e[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
Graph.createRemoveIcon=function(a,b){var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",a);f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";mxEvent.addListener(f,"click",b);return f};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};
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(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,d=!0,k=null,n=mxUtils.bind(this,function(r){d=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){d=d&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(d)for(var x=mxEvent.getSource(r);null!=
-x&&x!=e.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(e.node,n,u,m);mxEvent.addListener(e.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var e=mxEvent.getSource(f);"A"==e.nodeName&&(e=e.getAttribute("href"),null!=
-e&&this.graph.isCustomLink(e)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(e)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,e){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,e=!0,k=null,n=mxUtils.bind(this,function(r){e=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){e=e&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(e)for(var x=mxEvent.getSource(r);null!=
+x&&x!=d.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(d.node,n,u,m);mxEvent.addListener(d.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var d=mxEvent.getSource(f);"A"==d.nodeName&&(d=d.getAttribute("href"),null!=
+d&&this.graph.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(d)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,d){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(k.style,"lineShape",null)&&(this.model.isVertex(k.cell)||"arrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,
null))};Graph.prototype.isStrokeState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(k){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],k)};Graph.prototype.isGlassState=function(k){k=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return"label"==k||"rectangle"==k||"internalStorage"==k||"ext"==k||"umlLifeline"==k||"swimlane"==k||"process"==k};Graph.prototype.isRoundedState=
function(k){return null!=k.shape?k.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(k){var n=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(k.style,mxConstants.STYLE_CURVED,!1)&&("connector"==n||"filledEdge"==n)};Graph.prototype.isAutoSizeState=function(k){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(k){k=
@@ -2899,78 +2900,78 @@ A;A--){var C=this.model.getChildAt(u,A),F=this.getScaledCellAt(k,n,C,m,r,x);if(n
this.isTableRow(r)&&(r=this.graph.model.getParent(r));null==r||n.get(r)||(n.put(r,!0),u.push(r))}return u};Graph.prototype.getCompositeParent=function(k){for(;this.isPart(k);){var n=this.model.getParent(k);if(!this.model.isVertex(n))break;k=n}return k};Graph.prototype.filterSelectionCells=function(k){var n=this.getSelectionCells();if(null!=k){for(var u=[],m=0;m<n.length;m++)k(n[m])||u.push(n[m]);n=u}return n};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(k){if(this.useCssTransforms){var n=
this.currentScale,u=this.currentTranslate;k=new mxRectangle((k.x+2*u.x)*n-u.x,(k.y+2*u.y)*n-u.y,k.width*n,k.height*n)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(k){k=this.strokeWidth;this.graph.useCssTransforms&&(k/=this.graph.currentScale);return k};mxGraphView.prototype.getGraphBounds=function(){var k=this.graphBounds;if(this.graph.useCssTransforms){var n=this.graph.currentTranslate,u=this.graph.currentScale;k=new mxRectangle((k.x+n.x)*u,(k.y+n.y)*u,k.width*u,k.height*
u)}return k};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(k){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);b.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 f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var e=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=e.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
+this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var d=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=d.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};Graph.prototype.updateCssTransform=function(){var k=this.view.getDrawPane();if(null!=k)if(k=k.parentNode,this.useCssTransforms){var n=k.getAttribute("transform");k.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;k.setAttribute("transform","scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=k.getAttribute("transform")&&
-this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var d=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var e=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
-Graph.prototype.openLink=function(a,b,f){var e=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else e=window.open(a,null!=b?b:"_blank"),null==e||f||(e.opener=null)}catch(d){}return e};
+Graph.prototype.openLink=function(a,b,f){var d=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else d=window.open(a,null!=b?b:"_blank"),null==d||f||(d.opener=null)}catch(e){}return d};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var f=this.graph.model.getParent(a);if(!this.graph.isCellCollapsed(a)&&(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,b))){a=this.graph.getCellStyle(a);if("stackLayout"==a.childLayout)return b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax",
"1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.allowGaps=a.allowGaps||0,b.fill=!0,b.allowGaps&&(b.gridSize=parseFloat(mxUtils.getValue(a,"stackUnitSize",20))),b;if("treeLayout"==
a.childLayout)return b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==a.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent=
"1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(e){null!=window.console&&console.error(e)}}return null}};
-Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var e=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)e[g]=a[f].config[g];b.push(e)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
-Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=e)for(var d=0;d<e.length;d++)g[e[d].nodeName]=e[d].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
-Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=this.view.getState(a[f]);if(null!=e){for(var g=this.cellRenderer.getShapesForState(e),d=0;d<g.length;d++)null!=g[d]&&null!=g[d].node&&b.push(g[d].node);null!=e.control&&null!=e.control.node&&b.push(e.control.node)}}return b};
-Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],e=0;e<a.length;e++){var g=this.view.getState(a[e]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
-Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),e=a.segments,g=a.length,d=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<d;r++)if(m<=e[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/e[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/e[r-1]));break}else m-=e[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(d){null!=window.console&&console.error(d)}}return null}};
+Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var d=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)d[g]=a[f].config[g];b.push(d)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
+Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=d)for(var e=0;e<d.length;e++)g[d[e].nodeName]=d[e].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
+Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=this.view.getState(a[f]);if(null!=d){for(var g=this.cellRenderer.getShapesForState(d),e=0;e<g.length;e++)null!=g[e]&&null!=g[e].node&&b.push(g[e].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b};
+Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],d=0;d<a.length;d++){var g=this.view.getState(a[d]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
+Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),d=a.segments,g=a.length,e=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<e;r++)if(m<=d[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/d[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/d[r-1]));break}else m-=d[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
a.text.node&&(a.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(e,g){null!=a.shape&&(g=e/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==e&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
-(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,e){f=null!=f?f:30;e=null!=e?e:30;var g=null,d=0,k=mxUtils.bind(this,function(){if(d==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(d,f);d++});g=window.setInterval(k,e);k()};
+Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(d,g){null!=a.shape&&(g=d/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==d&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
+(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,d){f=null!=f?f:30;d=null!=d?d:30;var g=null,e=0,k=mxUtils.bind(this,function(){if(e==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(e,f);e++});g=window.setInterval(k,d);k()};
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 a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),e=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,e,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
-e)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),d=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,d,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+d)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return Graph.zoomWheel&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(a)||mxEvent.isControlDown(a))};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};
Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isAltDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)&&!mxEvent.isMetaDown(a)};Graph.prototype.isEdgeIgnored=function(a){var b=!1;null!=a&&(a=this.getCurrentCellStyle(a),b="1"==mxUtils.getValue(a,"ignoreEdge","0"));return b};Graph.prototype.isSplitTarget=function(a,b,f){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};
Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,f){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 e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(O,R){O=String(O);for(R=R||2;O.length<R;)O="0"+O;return O};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),A=a[n+"Hours"](),C=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var K=f?0:a.getTimezoneOffset(),E={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+
-12],yy:String(x).slice(2),yyyy:x,h:A%12||12,hh:k(A%12||12),H:A,HH:k(A),M:C,MM:k(C),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>A?"a":"p",tt:12>A?"am":"pm",T:12>A?"A":"P",TT:12>A?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<K?"-":"+")+k(100*Math.floor(Math.abs(K)/60)+Math.abs(K)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(O){return O in E?E[O]:O.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 d=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,k=function(O,R){O=String(O);for(R=R||2;O.length<R;)O="0"+O;return O};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),A=a[n+"Hours"](),C=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var K=f?0:a.getTimezoneOffset(),E={d:u,dd:k(u),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:d.i18n.monthNames[r],mmmm:d.i18n.monthNames[r+
+12],yy:String(x).slice(2),yyyy:x,h:A%12||12,hh:k(A%12||12),H:A,HH:k(A),M:C,MM:k(C),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>A?"a":"p",tt:12>A?"am":"pm",T:12>A?"A":"P",TT:12>A?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(e,""),o:(0<K?"-":"+")+k(100*Math.floor(Math.abs(K)/60)+Math.abs(K)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(O){return O in E?E[O]:O.slice(1,
O.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b};
-Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var e=this.getModel(),g=e.getChildCount(e.root),d=0;d<g;d++)mxUtils.bind(this,function(k){function n(){e.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
-"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(e.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
-mxEvent.addListener(m,"click",function(){e.setVisible(k,!e.isVisible(k));n();null!=a&&a(k)});n()})(e.getChildAt(e.root,d));return f};
-Graph.prototype.replacePlaceholders=function(a,b,f,e){e=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var d=match[0];if(2<d.length&&"%label%"!=d&&"%tooltip%"!=d){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=d.substring(1);else{var n=d.substring(1,d.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
-null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}e.push(b.substring(g,match.index)+(null!=k?k:d));g=match.index+d.length}}e.push(b.substring(g))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var e=this.model.getCell(a[f].id);null!=e&&b.push(e)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var d=this.getModel(),g=d.getChildCount(d.root),e=0;e<g;e++)mxUtils.bind(this,function(k){function n(){d.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
+"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(d.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
+mxEvent.addListener(m,"click",function(){d.setVisible(k,!d.isVisible(k));n();null!=a&&a(k)});n()})(d.getChildAt(d.root,e));return f};
+Graph.prototype.replacePlaceholders=function(a,b,f,d){d=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var e=match[0];if(2<e.length&&"%label%"!=e&&"%tooltip%"!=e){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=e.substring(1);else{var n=e.substring(1,e.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
+null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}d.push(b.substring(g,match.index)+(null!=k?k:e));g=match.index+e.length}}d.push(b.substring(g))}return d.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var e=this.model.getParent(a),g=this.model.getParent(e),d=this.model.getParent(b);if(g==this.model.getParent(d)){a=e.getIndex(a);e=g.getIndex(e);var k=d.getIndex(b),n=g.getIndex(d);d=Math.max(e,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(e=Math.min(e,n);e<=d;e++){n=this.model.getChildAt(g,e);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var d=this.model.getParent(a),g=this.model.getParent(d),e=this.model.getParent(b);if(g==this.model.getParent(e)){a=d.getIndex(a);d=g.getIndex(d);var k=e.getIndex(b),n=g.getIndex(e);e=Math.max(d,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(d=Math.min(d,n);d<=e;d++){n=this.model.getChildAt(g,d);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
!this.isCellSelected(k[0]))&&(this.setSelectionCells(k),f=!0)}}return f};
-Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f],g=this.getCellGeometry(e);if(null!=g){g=g.clone();if(this.getModel().isVertex(e))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(e)&&null!=g.points)for(var d=0;d<g.points.length;d++)g.points[d].x=Math.round(g.points[d].x/b)*b,g.points[d].y=Math.round(g.points[d].y/b)*b;this.getModel().setGeometry(e,
+Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f],g=this.getCellGeometry(d);if(null!=g){g=g.clone();if(this.getModel().isVertex(d))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(d)&&null!=g.points)for(var e=0;e<g.points.length;e++)g.points[e].x=Math.round(g.points[e].x/b)*b,g.points[e].y=Math.round(g.points[e].y/b)*b;this.getModel().setGeometry(d,
g)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,f,e,g,d,k,n){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
-mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var A=this.view.translate;m=A.x*f;A=A.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,A=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(m+r.x*f,A+r.y*f)).grow(40*f);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var C=null,F=null;if(null!=d){d=d.reverse();for(var K=0;K<d.length;K++)if(!this.isCellLocked(d[K])&&!this.model.isEdge(d[K])&&d[K]!=a)if(!this.model.isAncestor(a,d[K])&&this.isContainer(d[K])&&(null==C||d[K]==this.model.getParent(a)))C=d[K];else if(null==F&&this.isCellConnectable(d[K])&&!this.model.isAncestor(d[K],a)&&!this.isSwimlane(d[K])){var E=this.view.getState(d[K]);null==x||null==E||mxUtils.intersects(x,E)||(F=d[K])}}var O=
-!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;O&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],Q=F;F=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==F&&u){this.model.beginUpdate();try{if(null==Q&&O){var aa=this.getAbsoluteParent(null!=P?P:a);aa=u?a:this.getCompositeParent(aa);Q=null!=P?P:this.duplicateCells([aa],
-!1)[0];null!=P&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var T=this.getCellGeometry(Q);null!=T&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=T.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=T.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-T.width/2:r.x+T.width/2),T.x=r.x-T.width/2,T.y=r.y-T.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),F=null):O&&!u&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var U=mxEvent.isControlDown(e)&&
-mxEvent.isShiftDown(e)&&O||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());if(null!=U&&this.connectionHandler.insertBeforeSource){var fa=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=U.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==U.parent&&(fa=P.parent.getIndex(P),this.model.add(P.parent,U,fa))}null==F&&null!=Q&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(fa=a.parent.getIndex(a),this.model.add(a.parent,
+Graph.prototype.connectVertex=function(a,b,f,d,g,e,k,n){e=e?e:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
+mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var A=this.view.translate;m=A.x*f;A=A.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,A=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);e=e?null:(new mxRectangle(m+r.x*f,A+r.y*f)).grow(40*f);e=null!=e?
+this.getCells(0,0,0,0,null,null,e,null,!0):null;x=this.view.getState(a);var C=null,F=null;if(null!=e){e=e.reverse();for(var K=0;K<e.length;K++)if(!this.isCellLocked(e[K])&&!this.model.isEdge(e[K])&&e[K]!=a)if(!this.model.isAncestor(a,e[K])&&this.isContainer(e[K])&&(null==C||e[K]==this.model.getParent(a)))C=e[K];else if(null==F&&this.isCellConnectable(e[K])&&!this.model.isAncestor(e[K],a)&&!this.isSwimlane(e[K])){var E=this.view.getState(e[K]);null==x||null==E||mxUtils.intersects(x,E)||(F=e[K])}}var O=
+!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||g;O&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var R=[],Q=F;F=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==F&&u){this.model.beginUpdate();try{if(null==Q&&O){var aa=this.getAbsoluteParent(null!=P?P:a);aa=u?a:this.getCompositeParent(aa);Q=null!=P?P:this.duplicateCells([aa],
+!1)[0];null!=P&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var T=this.getCellGeometry(Q);null!=T&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=T.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=T.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-T.width/2:r.x+T.width/2),T.x=r.x-T.width/2,T.y=r.y-T.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),F=null):O&&!u&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var U=mxEvent.isControlDown(d)&&
+mxEvent.isShiftDown(d)&&O||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());if(null!=U&&this.connectionHandler.insertBeforeSource){var fa=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=U.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==U.parent&&(fa=P.parent.getIndex(P),this.model.add(P.parent,U,fa))}null==F&&null!=Q&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(fa=a.parent.getIndex(a),this.model.add(a.parent,
Q,fa));null!=U&&R.push(U);null==F&&null!=Q&&R.push(Q);null==Q&&null!=U&&U.geometry.setTerminalPoint(r,!1);null!=U&&this.fireEvent(new mxEventObject("cellsInserted","cells",[U]))}finally{this.model.endUpdate()}}if(null!=n)n(R);else return R});if(null==k||null!=Q||!O||null==F&&u)return g(Q);k(m+r.x*f,A+r.y*f,g)};
-Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&f.push(e);return f.join(" ")};
-Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
+Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],d,g=0;g<a.length;g++)if(d=a[g],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(b.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([b])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&f.push(d);return f.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var d=a;null==f&&null!=d;)null!=d.value&&"object"==typeof d.value&&(f=d.hasAttribute(b)?null!=d.getAttribute(b)?d.getAttribute(b):"":null),d=this.model.getParent(d)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(a,b){return this.updateHorizontalStyle(a,this.replaceDefaultColors(a,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
Graph.prototype.updateHorizontalStyle=function(a,b){if(null!=a&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(a=this.layoutManager.getLayout(f),null!=a&&a.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!a.horizontal))}return b};
Graph.prototype.replaceDefaultColors=function(a,b){if(null!=b){a=mxUtils.hex2rgb(this.shapeBackgroundColor);var f=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(b,mxConstants.STYLE_FONTCOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_STROKECOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BORDER,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BACKGROUND,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,
f);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f){null!=a&&"default"==a[b]&&null!=f&&(a[b]=f)};
-Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var e=this.layoutManager.getLayout(this.model.getParent(a));null!=e&&e.constructor==mxStackLayout&&(e.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,f,e,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var d=0;d<f.length;d++){var k=this.view.getState(f[d]),n=this.getCellGeometry(f[d]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[d]),x=this.layoutManager.getLayout(r);
+Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,f,d,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var e=0;e<f.length;e++){var k=this.view.getState(f[e]),n=this.getCellGeometry(f[e]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[e]),x=this.layoutManager.getLayout(r);
null==x?null!=g&&this.isMoveCellsEvent(g,k)&&this.moveSiblings(k,r,u,m):null!=g&&mxEvent.isAltDown(g)||x.constructor!=mxStackLayout||x.resizeLast||this.resizeParentStacks(r,x,u,m)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,b,f,e){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var d=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=d&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(d.x-a.x)/a.width))),Math.round(e*Math.max(0,Math.min(1,(d.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,f,e){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var d=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=d&&(d=d.clone(),b.horizontal?d.width+=f+Math.min(0,k.width/this.view.scale-d.width):d.height+=e+Math.min(0,k.height/this.view.scale-d.height),this.model.setGeometry(a,
-d));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var e=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=e&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var e=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=e&&(e=e.clone(),b.horizontal?e.width+=f+Math.min(0,k.width/this.view.scale-e.width):e.height+=d+Math.min(0,k.height/this.view.scale-e.height),this.model.setGeometry(a,
+e));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(a,b,f){var e=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(e)&&(e=null);return e};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
+Graph.prototype.getSwimlaneAt=function(a,b,f){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,e=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,e/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var d=this.view.translate;this.container.scrollTop=(a.y+d.y)*g-Math.max((e-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+d.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
-mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&e.push({name:a[g].nodeName,value:a[g].nodeValue});e.sort(function(d,k){return d.name<k.name?-1:d.name>k.name?1:0});for(g=0;g<e.length;g++)"link"==e[g].name&&this.isCustomLink(e[g].value)||(b+=("link"!=e[g].name?"<b>"+e[g].name+":</b> ":"")+mxUtils.htmlEntities(e[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,d=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var e=this.view.translate;this.container.scrollTop=(a.y+e.y)*g-Math.max((d-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+e.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
+mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(e,k){return e.name<k.name?-1:e.name>k.name?1:0});for(g=0;g<d.length;g++)"link"==d[g].name&&this.isCustomLink(d[g].value)||(b+=("link"!=d[g].name?"<b>"+d[g].name+":</b> ":"")+mxUtils.htmlEntities(d[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};
Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){mxEventSource.call(this);this.graph=a;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;
@@ -2983,60 +2984,60 @@ HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangle
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(f){null!=f.relatedTarget&&
mxEvent.getSource(f)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(f){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(f){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(f.getEvent())||this.graph.model.isVertex(f.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(f,
-e){b=!1;f=e.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(e=this.getState(e.getState()),null==e&&mxEvent.isTouchEvent(f)||this.update(e));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,e){f=e.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(e.getState()),e.getGraphX(),e.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
-function(f,e){f=e.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),e):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(e.getGraphX(),e.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
-this.bbox&&mxUtils.contains(this.bbox,e.getGraphX(),e.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
-HoverIcons.prototype.createArrow=function(a,b,f){var e=null;e=mxUtils.createImage(a.src);e.style.width=a.width+"px";e.style.height=a.height+"px";e.style.padding=this.tolerance+"px";null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e,this.fireEvent(new mxEventObject("focus",
-"arrow",e,"direction",f,"event",g)))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",e,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+d){b=!1;f=d.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(d=this.getState(d.getState()),null==d&&mxEvent.isTouchEvent(f)||this.update(d));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,d){f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
+function(f,d){f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
+this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
+HoverIcons.prototype.createArrow=function(a,b,f){var d=null;d=mxUtils.createImage(a.src);d.style.width=a.width+"px";d.style.height=a.height+"px";d.style.padding=this.tolerance+"px";null!=b&&d.setAttribute("title",b);d.style.position="absolute";d.style.cursor=this.cssCursor;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=d,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(d,this.graph,this.currentState);mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=d&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(d,100),this.activeArrow=d,this.fireEvent(new mxEventObject("focus",
+"arrow",d,"direction",f,"event",g)))}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",d,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return d};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};
HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,f){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,f),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,f){return this.graph.view.getState(this.graph.getCellAt(b,f))};
-HoverIcons.prototype.click=function(a,b,f){var e=f.getEvent(),g=f.getGraphX(),d=f.getGraphY();g=this.getStateAt(a,g,d);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(e)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
+HoverIcons.prototype.click=function(a,b,f){var d=f.getEvent(),g=f.getGraphX(),e=f.getGraphY();g=this.getStateAt(a,g,e);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(d)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
HoverIcons.prototype.execute=function(a,b,f){f=f.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,f,this.graph.isCloneEvent(f),this.graph.isCloneEvent(f)),f,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||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 a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(b=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var f=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
(f=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(n,u,m){if(null!=f){var r=new mxRectangle(u,m,n.clientWidth,n.clientHeight);mxUtils.intersects(r,f)&&(n==this.arrowUp?m-=r.y+r.height-f.y:n==this.arrowRight?u+=f.x+f.width-r.x:n==this.arrowDown?m+=f.y+f.height-r.y:n==this.arrowLeft&&(u-=r.x+r.width-f.x))}n.style.left=u+"px";n.style.top=m+"px";mxUtils.setOpacity(n,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==g&&g==a&&(a=g=e=b=null);var d=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
-this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==d||m.height<3*d.height&&m.width<3*d.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(e,this.arrowLeft);k(g,this.arrowUp);k(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==g&&g==a&&(a=g=d=b=null);var e=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
+this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==e||m.height<3*e.height&&m.width<3*e.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(d,this.arrowLeft);k(g,this.arrowUp);k(a,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 a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
-HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
+HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.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=a};Graph.prototype.createParent=function(a,b,f,e,g){a=this.cloneCell(a);for(var d=0;d<f;d++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=d*e,n.y+=d*g);a.insert(k)}return a};
-Graph.prototype.createTable=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:60;e=null!=e?e:40;d=null!=d?d:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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!=g?g:"",0,0,b*f,a*e+(null!=g?d:0),null!=k?k:"shape=table;startSize="+(null!=g?d:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,e,n),this.createVertex(null,null,"",0,0,f,e,u),b,f,0),a,0,e)};
-Graph.prototype.setTableValues=function(a,b,f){for(var e=this.model.getChildCells(a,!0),g=0;g<e.length;g++)if(null!=f&&(e[g].value=f[g]),null!=b)for(var d=this.model.getChildCells(e[g],!0),k=0;k<d.length;k++)null!=b[g][k]&&(d[k].value=b[g][k]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:120;e=null!=e?e:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*e,null!=d?d:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");d=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=d;g.geometry.height+=d;k=this.createVertex(null,
-null,"",0,d,b*f+d,e,k);g.insert(this.createParent(k,this.createVertex(null,null,"",d,0,f,e,n),b,f,0));return 1<a?(k.geometry.y=e+d,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",d,0,f,e,u),b,f,0),a-1,0,e)):g};
-Graph.prototype.visitTableCells=function(a,b){var f=null,e=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<e.length;g++){for(var d=this.getActualStartSize(e[g],!0),k=this.model.getChildCells(e[g],!0),n=this.getCellStyle(e[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),A={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;A.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+d.x),x.height+(null!=f&&null!=
-f[0]?f[0].point.y:a.y+d.y));A.actual=A;null!=f&&null!=f[r]&&1<f[r].rowspan?(A.rowspan=f[r].rowspan-1,A.colspan=f[r].colspan,A.actual=f[r].actual):null!=u&&1<u.colspan?(A.rowspan=u.rowspan,A.colspan=u.colspan-1,A.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(A.rowspan=parseInt(u.rowspan||1),A.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(A,k.length,
-e.length,a.x+(u?d.x:0),a.y+(u?d.y:0));m.push(A);u=A}f=m}};Graph.prototype.getTableLines=function(a,b,f){var e=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(d,k,n,u,m){b&&d.row<n-1&&(null==e[d.row]&&(e[d.row]=[new mxPoint(u,d.point.y)]),1<d.rowspan&&e[d.row].push(null),e[d.row].push(d.point));f&&d.col<k-1&&(null==g[d.col]&&(g[d.col]=[new mxPoint(d.point.x,m)]),1<d.colspan&&g[d.col].push(null),g[d.col].push(d.point))}));return e.concat(g)};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.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=a};Graph.prototype.createParent=function(a,b,f,d,g){a=this.cloneCell(a);for(var e=0;e<f;e++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=e*d,n.y+=e*g);a.insert(k)}return a};
+Graph.prototype.createTable=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:60;d=null!=d?d:40;e=null!=e?e:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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!=g?g:"",0,0,b*f,a*d+(null!=g?e:0),null!=k?k:"shape=table;startSize="+(null!=g?e:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,d,n),this.createVertex(null,null,"",0,0,f,d,u),b,f,0),a,0,d)};
+Graph.prototype.setTableValues=function(a,b,f){for(var d=this.model.getChildCells(a,!0),g=0;g<d.length;g++)if(null!=f&&(d[g].value=f[g]),null!=b)for(var e=this.model.getChildCells(d[g],!0),k=0;k<e.length;k++)null!=b[g][k]&&(e[k].value=b[g][k]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*d,null!=e?e:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");e=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=e;g.geometry.height+=e;k=this.createVertex(null,
+null,"",0,e,b*f+e,d,k);g.insert(this.createParent(k,this.createVertex(null,null,"",e,0,f,d,n),b,f,0));return 1<a?(k.geometry.y=d+e,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",e,0,f,d,u),b,f,0),a-1,0,d)):g};
+Graph.prototype.visitTableCells=function(a,b){var f=null,d=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<d.length;g++){for(var e=this.getActualStartSize(d[g],!0),k=this.model.getChildCells(d[g],!0),n=this.getCellStyle(d[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),A={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;A.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+e.x),x.height+(null!=f&&null!=
+f[0]?f[0].point.y:a.y+e.y));A.actual=A;null!=f&&null!=f[r]&&1<f[r].rowspan?(A.rowspan=f[r].rowspan-1,A.colspan=f[r].colspan,A.actual=f[r].actual):null!=u&&1<u.colspan?(A.rowspan=u.rowspan,A.colspan=u.colspan-1,A.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(A.rowspan=parseInt(u.rowspan||1),A.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(A,k.length,
+d.length,a.x+(u?e.x:0),a.y+(u?e.y:0));m.push(A);u=A}f=m}};Graph.prototype.getTableLines=function(a,b,f){var d=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(e,k,n,u,m){b&&e.row<n-1&&(null==d[e.row]&&(d[e.row]=[new mxPoint(u,e.point.y)]),1<e.rowspan&&d[e.row].push(null),d[e.row].push(e.point));f&&e.col<k-1&&(null==g[e.col]&&(g[e.col]=[new mxPoint(e.point.x,m)]),1<e.colspan&&g[e.col].push(null),g[e.col].push(e.point))}));return d.concat(g)};
Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};Graph.prototype.isStack=function(a){a=this.getCellStyle(a);return null!=a&&"stackLayout"==a.childLayout};
Graph.prototype.isStackChild=function(a){return this.model.isVertex(a)&&this.isStack(this.model.getParent(a))};
-Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var e=this.getModel();e.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;e.setGeometry(a,g);var d=e.getParent(a),k=e.getChildCells(d,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,e.setGeometry(u,m))}}var r=this.getCellGeometry(d);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,e.setGeometry(d,r)))}}finally{e.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var e=this.getModel(),g=e.getParent(a),d=e.getParent(g),k=e.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;e.beginUpdate();try{for(var u=e.getChildCells(d,!0),m=0;m<u.length;m++){g=u[m];k=e.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),e.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
-x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),e.setGeometry(r,x)))}if(n||f){var A=this.getCellGeometry(d);null!=A&&(A=A.clone(),A.width+=b,e.setGeometry(d,A))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{e.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var g=this.graph.getCellGeometry(a[e]);null!=g&&(f+=b?g.width:g.height)}return f};
-TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-e.x-e.width;var g=[];e=e.x;for(var d=0;d<f.length;d++){var k=this.graph.getCellGeometry(f[d]);null!=k&&(e+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(e)))}return g};
-TableLayout.prototype.layoutRow=function(a,b,f,e){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<d.length;u++){var m=this.graph.getCellGeometry(d[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==d.length-1&&u<b.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==d.length-1?m.width=e-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
-0,m.width,m.height),g.setGeometry(d[u],m))}return n};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(e,"resizeLastRow","0"),d="1"==mxUtils.getValue(e,"resizeLast","0");e="1"==mxUtils.getValue(e,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var A=this.getSize(r,!1);if(0<u&&0<m&&0<
-r.length&&0<A){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-A+C.height,k.setGeometry(r[r.length-1],C))}var F=d?null:this.getRowLayout(r[0],m),K=[],E=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(E),E=g||e?E+C.height:E+C.height/A*u,C.height=Math.round(E)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],F,C.height,m,K));e&&u<A&&(f=f.clone(),f.height=E+b.height,k.setGeometry(a,
-f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(O){k.setVisible(O.cell,O.actual.cell==O.cell);if(O.actual.cell!=O.cell){if(O.actual.row==O.row){var R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo;O.actual.geo.width+=R.width}O.actual.col==O.col&&(R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo,O.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
+Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;d.setGeometry(a,g);var e=d.getParent(a),k=d.getChildCells(e,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,d.setGeometry(u,m))}}var r=this.getCellGeometry(e);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,d.setGeometry(e,r)))}}finally{d.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var d=this.getModel(),g=d.getParent(a),e=d.getParent(g),k=d.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;d.beginUpdate();try{for(var u=d.getChildCells(e,!0),m=0;m<u.length;m++){g=u[m];k=d.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),d.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
+x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),d.setGeometry(r,x)))}if(n||f){var A=this.getCellGeometry(e);null!=A&&(A=A.clone(),A.width+=b,d.setGeometry(e,A))}null!=this.layoutManager&&this.layoutManager.executeLayout(e)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var g=this.graph.getCellGeometry(a[d]);null!=g&&(f+=b?g.width:g.height)}return f};
+TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-d.x-d.width;var g=[];d=d.x;for(var e=0;e<f.length;e++){var k=this.graph.getCellGeometry(f[e]);null!=k&&(d+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(d)))}return g};
+TableLayout.prototype.layoutRow=function(a,b,f,d){var g=this.graph.getModel(),e=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<e.length;u++){var m=this.graph.getCellGeometry(e[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==e.length-1&&u<b.length-2&&(m.width=d-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==e.length-1?m.width=d-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
+0,m.width,m.height),g.setGeometry(e[u],m))}return n};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(d,"resizeLastRow","0"),e="1"==mxUtils.getValue(d,"resizeLast","0");d="1"==mxUtils.getValue(d,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var A=this.getSize(r,!1);if(0<u&&0<m&&0<
+r.length&&0<A){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-A+C.height,k.setGeometry(r[r.length-1],C))}var F=e?null:this.getRowLayout(r[0],m),K=[],E=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(E),E=g||d?E+C.height:E+C.height/A*u,C.height=Math.round(E)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],F,C.height,m,K));d&&u<A&&(f=f.clone(),f.height=E+b.height,k.setGeometry(a,
+f));e&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(O){k.setVisible(O.cell,O.actual.cell==O.cell);if(O.actual.cell!=O.cell){if(O.actual.row==O.row){var R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo;O.actual.geo.width+=R.width}O.actual.col==O.col&&(R=null!=O.geo.alternateBounds?O.geo.alternateBounds:O.geo,O.actual.geo.height+=R.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
!1)}finally{k.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(r,x){x=null!=x?x:!0;var A=this.getState(r);null!=A&&x&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&!A.invalid&&this.updateLineJumps(A)&&this.graph.cellRenderer.redraw(A,!1,this.isRendering());A=b.apply(this,
arguments);null!=A&&x&&this.graph.model.isEdge(A.cell)&&null!=A.style&&1!=A.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(A);return A};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(){f.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 r=this.node.getElementsByTagName("path");if(1<r.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return e.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return d.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var A=null!=r.routedPoints,C=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(ba,qa,I){var L=new mxPoint(qa,I);L.type=ba;C.push(L);L=null!=r.routedPoints?r.routedPoints[C.length-1]:null;return null==L||L.type!=
ba||L.x!=qa||L.y!=I},K=.5*this.scale;A=!1;C=[];for(var E=0;E<x.length-1;E++){for(var O=x[E+1],R=x[E],Q=[],P=x[E+2];E<x.length-2&&mxUtils.ptSegDistSq(R.x,R.y,P.x,P.y,O.x,O.y)<1*this.scale*this.scale;)O=P,E++,P=x[E+2];A=F(0,R.x,R.y)||A;for(var aa=0;aa<this.validEdges.length;aa++){var T=this.validEdges[aa],U=T.absolutePoints;if(null!=U&&mxUtils.intersects(r,T)&&"1"!=T.style.noJump)for(T=0;T<U.length-1;T++){var fa=U[T+1],ha=U[T];for(P=U[T+2];T<U.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,P.x,P.y,fa.x,fa.y)<
1*this.scale*this.scale;)fa=P,T++,P=U[T+2];P=mxUtils.intersection(R.x,R.y,O.x,O.y,ha.x,ha.y,fa.x,fa.y);if(null!=P&&(Math.abs(P.x-R.x)>K||Math.abs(P.y-R.y)>K)&&(Math.abs(P.x-O.x)>K||Math.abs(P.y-O.y)>K)&&(Math.abs(P.x-ha.x)>K||Math.abs(P.y-ha.y)>K)&&(Math.abs(P.x-fa.x)>K||Math.abs(P.y-fa.y)>K)){fa=P.x-R.x;ha=P.y-R.y;P={distSq:fa*fa+ha*ha,x:P.x,y:P.y};for(fa=0;fa<Q.length;fa++)if(Q[fa].distSq>P.distSq){Q.splice(fa,0,P);P=null;break}null==P||0!=Q.length&&Q[Q.length-1].x===P.x&&Q[Q.length-1].y===P.y||
-Q.push(P)}}}for(T=0;T<Q.length;T++)A=F(1,Q[T].x,Q[T].y)||A}P=x[x.length-1];A=F(0,P.x,P.y)||A}r.routedPoints=C;return A}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,A){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)d.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+Q.push(P)}}}for(T=0;T<Q.length;T++)A=F(1,Q[T].x,Q[T].y)||A}P=x[x.length-1];A=F(0,P.x,P.y)||A}r.routedPoints=C;return A}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,A){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)e.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2,F=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,K=mxUtils.getValue(this.style,"jumpStyle","none"),E=!0,O=null,R=null,Q=[],P=null;r.begin();for(var aa=0;aa<this.state.routedPoints.length;aa++){var T=this.state.routedPoints[aa],U=new mxPoint(T.x/this.scale,T.y/this.scale);0==aa?U=x[0]:aa==this.state.routedPoints.length-1&&(U=x[x.length-1]);var fa=!1;if(null!=O&&1==T.type){var ha=this.state.routedPoints[aa+1];T=ha.x/this.scale-U.x;ha=ha.y/this.scale-
U.y;T=T*T+ha*ha;null==P&&(P=new mxPoint(U.x-O.x,U.y-O.y),R=Math.sqrt(P.x*P.x+P.y*P.y),0<R?(P.x=P.x*F/R,P.y=P.y*F/R):P=null);T>F*F&&0<R&&(T=O.x-U.x,ha=O.y-U.y,T=T*T+ha*ha,T>F*F&&(fa=new mxPoint(U.x-P.x,U.y-P.y),T=new mxPoint(U.x+P.x,U.y+P.y),Q.push(fa),this.addPoints(r,Q,A,C,!1,null,E),Q=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,E=!1,"sharp"==K?(r.lineTo(fa.x-P.y*Q,fa.y+P.x*Q),r.lineTo(T.x-P.y*Q,T.y+P.x*Q),r.lineTo(T.x,T.y)):"line"==K?(r.moveTo(fa.x+P.y*Q,fa.y-P.x*Q),r.lineTo(fa.x-
P.y*Q,fa.y+P.x*Q),r.moveTo(T.x-P.y*Q,T.y+P.x*Q),r.lineTo(T.x+P.y*Q,T.y-P.x*Q),r.moveTo(T.x,T.y)):"arc"==K?(Q*=1.3,r.curveTo(fa.x-P.y*Q,fa.y+P.x*Q,T.x-P.y*Q,T.y+P.x*Q,T.x,T.y)):(r.moveTo(T.x,T.y),E=!0),Q=[T],fa=!0))}else P=null;fa||(Q.push(U),O=U)}this.addPoints(r,Q,A,C,!1,null,E);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,A,C){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),
@@ -3045,33 +3046,33 @@ Math.sin(-E);F=mxUtils.getRotatedPoint(F,R,Q,O)}R=parseFloat(r.style[mxConstants
C=A=null;if(null!=r)for(var K=0;K<r.length;K++){var E=this.graph.getConnectionPoint(x,r[K]);if(null!=E){var O=(E.x-F.x)*(E.x-F.x)+(E.y-F.y)*(E.y-F.y);if(null==C||O<C)A=E,C=O}}null!=A&&(F=A)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,A){var C=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=A.state&&(C=A.state.view.graph.replacePlaceholders(A.state.cell,C));return C};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var A=x.substring(8,x.length-1),C=mxUtils.parseXml(Graph.decompress(A));return new mxShape(new mxStencil(C.documentElement))}catch(F){null!=window.console&&console.log("Error in shape: "+F)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var e=0;e<b.length;e++){var g=b[e];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
-null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var g=b[d];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
+null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var e=mxUtils.load(g);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var f=2;f<a.length-1;f++)b+="/"+a[f]}return b};
-mxStencilRegistry.loadStencilSet=function(a,b,f,e){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var d=!1;if(null==g)try{if(e){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,d=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,d))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;d=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
-g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,d)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var e=a.firstChild;null!=e;)"shapes"==e.nodeName&&mxStencilRegistry.parseStencilSet(e,b,f),e=e.nextSibling;else{f=null!=f?f:!0;e=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=e;){if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=e.getAttribute("name"),null!=a)){g=g.toLowerCase();var d=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+d.toLowerCase(),new mxStencil(e));if(null!=b){var k=e.getAttribute("w"),
-n=e.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,d,a,k,n)}}e=e.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,f,d){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var e=!1;if(null==g)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,e=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,e))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;e=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,e)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;d=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){g=g.toLowerCase();var e=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+e.toLowerCase(),new mxStencil(d));if(null!=b){var k=d.getAttribute("w"),
+n=d.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,e,a,k,n)}}d=d.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function a(){var t=document.createElement("div");t.className="geHint";t.style.whiteSpace="nowrap";t.style.position="absolute";return t}function b(t,z){switch(z){case mxConstants.POINTS:return t;case mxConstants.MILLIMETERS:return(t/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(t/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(t/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(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return e.apply(this,arguments)||
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var d=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return d.apply(this,arguments)||
this.graph.isEdgeIgnored(t)};var g=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(t){return this.graph.isCloneEvent(t)!=g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var t=new mxEllipse(null,this.highlightColor,this.highlightColor,0);t.opacity=mxConstants.HIGHLIGHT_OPACITY;return t};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=d.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=e.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
return t};mxConnectionHandler.prototype.updatePreview=function(t){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=k.apply(this,arguments),z=t.getCell;t.getCell=mxUtils.bind(this,function(B){var D=z.apply(this,arguments);this.error=null;return D});return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",z="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),B=0;B<z.length;B++)null!=this.currentEdgeStyle[z[B]]&&(t+=z[B]+"="+this.currentEdgeStyle[z[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var B=0;B<t.length;B++){var D=t[B];z[mxObjectIdentity.get(D)]=D.getId();for(var G=this.model.getChildCount(D),
M=0;M<G;M++)this.createCellLookup([this.model.getChildAt(D,M)],z)}return z};Graph.prototype.createCellMapping=function(t,z,B){B=null!=B?B:{};for(var D in t){var G=z[D];null==B[G]&&(B[G]=t[D].getId()||"")}return B};Graph.prototype.importGraphModel=function(t,z,B,D){z=null!=z?z:0;B=null!=B?B:0;var G=new mxCodec(t.ownerDocument),M=new mxGraphModel;G.decode(t,M);t=[];G={};var X={},ia=M.getChildren(this.cloneCell(M.root,this.isCloneInvalidEdges(),G));if(null!=ia){var da=this.createCellLookup([M.root]);
ia=ia.slice();this.model.beginUpdate();try{if(1!=ia.length||this.isCellLocked(this.getDefaultParent()))for(M=0;M<ia.length;M++)ja=this.model.getChildren(this.moveCells([ia[M]],z,B,!1,this.model.getRoot())[0]),null!=ja&&(t=t.concat(ja));else{var ja=M.getChildren(ia[0]);null!=ja&&(t=this.moveCells(ja,z,B,!1,this.getDefaultParent()),X[M.getChildAt(M.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(G,da,X),this.updateCustomLinks(X,t),D)){this.isGridEnabled()&&(z=this.snap(z),
-B=this.snap(B));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.moveCells(t,z-ta.x,B-ta.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},B=this.cloneCells(t,null,z),D=new mxDictionary,G=0;G<t.length;G++)D.put(t[G],!0);var M=new mxCodec,X=new mxGraphModel,ia=X.getChildAt(X.getRoot(),0);for(G=0;G<B.length;G++){X.add(ia,B[G]);var da=this.view.getState(t[G]);if(null!=da){var ja=this.getCellGeometry(B[G]);null!=ja&&ja.relative&&!this.model.isEdge(t[G])&&
+B=this.snap(B));var sa=this.getBoundingBoxFromGeometry(t,!0);null!=sa&&this.moveCells(t,z-sa.x,B-sa.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},B=this.cloneCells(t,null,z),D=new mxDictionary,G=0;G<t.length;G++)D.put(t[G],!0);var M=new mxCodec,X=new mxGraphModel,ia=X.getChildAt(X.getRoot(),0);for(G=0;G<B.length;G++){X.add(ia,B[G]);var da=this.view.getState(t[G]);if(null!=da){var ja=this.getCellGeometry(B[G]);null!=ja&&ja.relative&&!this.model.isEdge(t[G])&&
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,
+[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 sa=this.getChildCells(t,!0);for(z=0;z<sa.length;z++)ja=this.getCellGeometry(sa[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(sa[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 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 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}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]),sa=this.getCellGeometry(t[da]);this.isTable(ja)&&ia.push(ja);
+if(null!=ja&&null!=sa&&this.isTable(ja)&&this.isTable(G)&&(D||ja!=G)){if(!D){var Ba=this.getCellGeometry(ja);null!=Ba&&(Ba=Ba.clone(),Ba.height-=sa.height,this.model.setGeometry(ja,Ba))}Ba=this.getCellGeometry(G);null!=Ba&&(Ba=Ba.clone(),Ba.height+=sa.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=
@@ -3080,8 +3081,8 @@ D[3]:0,4<D.length?D[4]:0))}}catch(M){}return t}if(null!=t.shape&&null!=t.shape.b
t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),B=0,D=0;D<z;D++){var G=this.model.getChildAt(t,D);this.model.isVertex(G)&&(G=this.getCellGeometry(G),null==G||G.relative||B++)}return 0<B||this.isContainer(t)};Graph.prototype.isValidDropTarget=
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),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,
+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),sa=da.getTerminalPoint(!1);
+da.setTerminalPoint(ja,!1);da.setTerminalPoint(sa,!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);
@@ -3099,21 +3100,21 @@ Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.contai
z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(B.y,(z.y+z.height)/t.scale-t.translate.y+2*this.gridSize)));return new mxPoint(D,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(t,z,B){var D=new mxCell;D.value="Text";D.geometry=new mxGeometry(0,0,0,0);D.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){D.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
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,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;
+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 sa=
+this.getAbsoluteUrl(da[ja].getAttribute("href"));null!=sa&&(da[ja].setAttribute("rel",this.linkRelation),da[ja].setAttribute("href",sa),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(sa,Ba,Da){return null==X.getLinkForCell(sa.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)<
+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 sa=ja.getSource();for(da=ja.getEvent();null!=sa&&"a"!=sa.nodeName.toLowerCase();)sa=sa.parentNode;null==sa&&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?(sa=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&sa||null==z||z(da,this.currentLink),mxEvent.isConsumed(da)||(da=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(da)?"_blank":sa?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 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,
+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 sa=this.moveCells([da[B]],G,G,!1)[0];M.push(sa);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,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,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?
+sa=this.getCellGeometry(B[M].cell);D+=da;null!=sa&&null!=ja&&(sa=sa.clone(),t?sa.x=Math.round(D-sa.width/2)-ja.origin.x:sa.y=Math.round(D-sa.height/2)-ja.origin.y,this.getModel().setGeometry(B[M].cell,sa))}}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,sa,Ba,Da,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,sa=0;sa<Ma.length;sa++)La.put(Ma[sa],!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-
@@ -3129,11 +3130,11 @@ 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+
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],
+!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),sa=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=sa){null!=sa.alternateBounds&&(sa.width=sa.alternateBounds.width,sa.height=sa.alternateBounds.height,sa.alternateBounds=null);ia=sa.width;var Ba=this.getCellGeometry(X[t]);null!=Ba&&(sa.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=
+!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 sa=this.getCellGeometry(D);null!=sa&&(sa=
+sa.clone(),sa.height+=da.height,B.setGeometry(D,sa))}}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=
@@ -3173,9 +3174,9 @@ 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(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;
+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 sa=D.view.getCellStates(G.getChildCells(this.state.cell,!0));if(0<sa.length){var Ba=G.getChildCells(sa[0].cell,!0),Da=D.getTableLines(this.state.cell,
+!1,!0),Ma=D.getTableLines(this.state.cell,!0,!1);for(G=0;G<sa.length;G++)mxUtils.bind(this,function(La){var Ia=sa[La],Ea=La<sa.length-1?sa[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==sa.length-1?0:Na.x*M);this.shape.bounds.width=X.width-(La==sa.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=
@@ -3208,11 +3209,11 @@ this.first&&null!=this.currentX&&null!=this.currentY&&(D=this.first.x,G=this.fir
t=mxUtils.getOffset(this.graph.container);B.x-=t.x;B.y-=t.y;t=z.getX()+B.x;B=z.getY()+B.y;var D=this.first.x-t,G=this.first.y-B,M=this.graph.tolerance;if(null!=this.div||Math.abs(D)>M||Math.abs(G)>M)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,B),this.isSpaceEvent(z)?(t=this.x+this.width,B=this.y+this.height,D=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/D)*D,this.height=this.graph.snap(this.height/D)*D,this.graph.isGridEnabled()||
(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=t-this.width),this.y<this.first.y&&(this.y=B-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),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(),
+(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,ua=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,B,D){ua.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 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;
+return Ga.apply(this,arguments)};var va=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 va.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 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])};
@@ -3222,18 +3223,19 @@ else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.ce
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 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 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,b){this.editorUi=a;this.container=b};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);
+mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";Editor.isDarkMode()&&(B.style.filter="invert(100%)");this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(M){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(M)}));var D=B.cloneNode(!0);D.setAttribute("src",Editor.trashImage);D.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));D.style.marginLeft="4px";this.linkHint.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(M){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(M)}))}if(null!=z)for(B=0;B<z.length;B++){var G=document.createElement("div");G.style.marginTop=null!=t||0<B?"6px":"0px";G.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(G)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(M){}};
+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 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,b){this.editorUi=a;this.container=b};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);
Format.blockThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.asyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 6 8 L 6 4 L 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
@@ -3252,171 +3254,171 @@ Format.ERzeroToManyMarkerImage=Graph.createSvgImage(20,22,'<path transform="tran
Format.baseDashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.doubleBlockMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.doubleBlockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.processMenuIcon=function(a,b){var f=a.getElementsByTagName("img");0<f.length&&(Editor.isDarkMode()&&(f[0].style.filter="invert(100%)"),f[0].className="geIcon",f[0].style.padding="0px",f[0].style.margin="0 0 0 2px",null!=b&&mxUtils.setPrefixedStyle(f[0].style,"transform",b));return a};
Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;
-Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
+Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(d,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle=
-"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,F,K,E){var O=mxUtils.bind(this,function(R){k!=C&&(d?this.labelIndex=K:b.isSelectionEmpty()?this.diagramIndex=K:this.currentIndex=K,null!=k&&(k.style.backgroundColor=
-Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(C,"click",O);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(E&&null==k||K==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&O()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
-e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display=
-"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
-Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
-this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=d||0==g.cells.length?"50%":"33.3%";r=e.cloneNode(!1);var A=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;A.style.backgroundColor=Format.inactiveTabBackgroundColor;d?r.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),f.appendChild(e),x=f.cloneNode(!1),
-x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(A,mxResources.get("arrange"));f.appendChild(A);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display=
+Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var d=document.createElement("div");d.className="geFormatSection";d.style.textAlign="center";d.style.fontWeight="bold";d.style.paddingTop="8px";d.style.fontSize="13px";d.style.borderWidth="0px 0px 1px 1px";d.style.borderStyle=
+"solid";d.style.display="inline-block";d.style.height="25px";d.style.overflow="hidden";d.style.width="100%";this.container.appendChild(f);mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),e=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,F,K,E){var O=mxUtils.bind(this,function(R){k!=C&&(e?this.labelIndex=K:b.isSelectionEmpty()?this.diagramIndex=K:this.currentIndex=K,null!=k&&(k.style.backgroundColor=
+Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(C,"click",O);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(R){R.preventDefault()}));(E&&null==k||K==(e?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&O()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(d,mxResources.get("diagram"));
+d.style.borderLeftWidth="0px";f.appendChild(d);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";d.style.width=this.showCloseButton?"106px":"50%";d.style.cursor="pointer";d.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=d.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(d,g,m++);var x=f.cloneNode(!1);x.style.display=
+"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=d.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
+Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(d,mxResources.get("text")),f.appendChild(d),
+this.panels.push(new TextFormatPanel(this,a,f));else{d.style.backgroundColor=Format.inactiveTabBackgroundColor;d.style.borderLeftWidth="1px";d.style.cursor="pointer";d.style.width=e||0==g.cells.length?"50%":"33.3%";r=d.cloneNode(!1);var A=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;A.style.backgroundColor=Format.inactiveTabBackgroundColor;e?r.style.borderLeftWidth="0px":(d.style.borderLeftWidth="0px",mxUtils.write(d,mxResources.get("style")),f.appendChild(d),x=f.cloneNode(!1),
+x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(d,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);d=f.cloneNode(!1);d.style.display="none";this.panels.push(new TextFormatPanel(this,a,d));this.container.appendChild(d);mxUtils.write(A,mxResources.get("arrange"));f.appendChild(A);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,d,m++):r.style.display=
"none";u(A,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,f,e,g,d,k,n){d=null!=d?d:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;e=null!=e?e:1;g=null!=g?g:999;var r=null,x=!1,A=mxUtils.bind(this,function(C){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(e,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+d,
+BaseFormatPanel.prototype.installInputHandler=function(a,b,f,d,g,e,k,n){e=null!=e?e:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;d=null!=d?d:1;g=null!=g?g:999;var r=null,x=!1,A=mxUtils.bind(this,function(C){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(d,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+e,
x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var K=u.getSelectionState().cells;m.setCellStyles(b,F,K);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(K,function(O){O.style.fontSize=F+"px";O.removeAttribute("size")});for(var E=0;E<K.length;E++)0==m.model.getChildCount(K[E])&&m.autoSizeCell(K[E],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",K))}finally{m.getModel().endUpdate()}}a.value=
-F+d;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",A);mxEvent.addListener(a,"blur",A);return A};
+F+e;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",A);mxEvent.addListener(a,"blur",A);return A};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};
-BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(e){f.funct(e,e)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
-BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,e=null,g=0,d=0;d<b.length;d++){var k=this.addAction(a,b[d]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(e.style.marginRight="2px",e.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),e=k)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,f,e,g,d,k){f=null!=f?f:1;e=null!=e?e:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=e+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
-r.style.height=e+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=d||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(A)?n:f),null!=b&&b(A));mxEvent.consume(A)});mxEvent.addGestureListeners(m,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=d||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(A)?
+BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(d){f.funct(d,d)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
+BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,d=null,g=0,e=0;e<b.length;e++){var k=this.addAction(a,b[e]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(d.style.marginRight="2px",d.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),d=k)}return g};
+BaseFormatPanel.prototype.createStepper=function(a,b,f,d,g,e,k){f=null!=f?f:1;d=null!=d?d:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=d+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
+r.style.height=d+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=e||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(A)?n:f),null!=b&&b(A));mxEvent.consume(A)});mxEvent.addGestureListeners(m,function(A){mxEvent.consume(A)},null,function(A){""==a.value&&(a.value=e||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(A)?
n:f),null!=b&&b(A));mxEvent.consume(A)});if(g){var x=null;mxEvent.addGestureListeners(u,function(A){mxEvent.consume(A)},null,function(A){if(null!=x){try{x.select()}catch(C){}x=null;mxEvent.consume(A)}})}else mxEvent.addListener(u,"click",function(A){mxEvent.consume(A)});return u};
-BaseFormatPanel.prototype.createOption=function(a,b,f,e,g){var d=document.createElement("div");d.style.padding="3px 0px 3px 0px";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";d.style.width="200px";d.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";d.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
-a);d.appendChild(n);var u=!1,m=b(),r=function(x,A){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,A)),u=!1)};mxEvent.addListener(d,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var A=mxEvent.getSource(x);if(A==d||A==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=e&&(e.install(r),this.listeners.push(e));null!=g&&g(d);return d};
-BaseFormatPanel.prototype.createCellOption=function(a,b,f,e,g,d,k,n,u){var m=this.editorUi,r=m.editor.graph;e=null!=e?"null"==e?null:e:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(A){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;A=A?e:g;r.setCellStyles(b,A,C);null!=d&&d(C,A);m.fireEvent(new mxEventObject("styleChanged",
+BaseFormatPanel.prototype.createOption=function(a,b,f,d,g){var e=document.createElement("div");e.style.padding="3px 0px 3px 0px";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";e.style.width="200px";e.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";e.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
+a);e.appendChild(n);var u=!1,m=b(),r=function(x,A){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,A)),u=!1)};mxEvent.addListener(e,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var A=mxEvent.getSource(x);if(A==e||A==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=d&&(d.install(r),this.listeners.push(d));null!=g&&g(e);return e};
+BaseFormatPanel.prototype.createCellOption=function(a,b,f,d,g,e,k,n,u){var m=this.editorUi,r=m.editor.graph;d=null!=d?"null"==d?null:d:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(A){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;A=A?d:g;r.setCellStyles(b,A,C);null!=e&&e(C,A);m.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[A],"cells",C))}finally{r.getModel().endUpdate()}}},{install:function(A){this.listener=function(){A(mxUtils.getValue(x,b,f)!=g)};r.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){r.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,f,e,g,d,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
-A=!1,C=null,F=function(E,O,R){if(!A){var Q="null"==e?null:e;A=!0;E=/(^#?[a-zA-Z0-9]*$)/.test(E)?E:Q;Q=null!=E&&E!=mxConstants.NONE?E:Q;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==Q?n:Q;C.innerHTML="";C.appendChild(P);null!=E&&E!=mxConstants.NONE&&1<E.length&&"string"===typeof E&&(Q="#"==E.charAt(0)?E.substring(1).toUpperCase():E,Q=ColorDialog.prototype.colorNames[Q],C.setAttribute("title",
-null!=Q?Q+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=E&&E!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=d&&d("null"==E?null:E);x=E;O||(R||k||b()!=x)&&f("null"==x?null:x,x);A=!1}},K=document.createElement("input");K.setAttribute("type","color");K.style.visibility="hidden";K.style.width="0px";K.style.height="0px";K.style.border=
+BaseFormatPanel.prototype.createColorOption=function(a,b,f,d,g,e,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
+A=!1,C=null,F=function(E,O,R){if(!A){var Q="null"==d?null:d;A=!0;E=/(^#?[a-zA-Z0-9]*$)/.test(E)?E:Q;Q=null!=E&&E!=mxConstants.NONE?E:Q;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==Q?n:Q;C.innerHTML="";C.appendChild(P);null!=E&&E!=mxConstants.NONE&&1<E.length&&"string"===typeof E&&(Q="#"==E.charAt(0)?E.substring(1).toUpperCase():E,Q=ColorDialog.prototype.colorNames[Q],C.setAttribute("title",
+null!=Q?Q+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=E&&E!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=e&&e("null"==E?null:E);x=E;O||(R||k||b()!=x)&&f("null"==x?null:x,x);A=!1}},K=document.createElement("input");K.setAttribute("type","color");K.style.visibility="hidden";K.style.width="0px";K.style.height="0px";K.style.border=
"none";u.appendChild(K);C=mxUtils.button("",mxUtils.bind(this,function(E){var O=x;"default"==O&&(O=n);!mxEvent.isShiftDown(E)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(O,function(R){F(R,null,!0)},n):(K.value=O,K.click(),mxEvent.addListener(K,"input",function(){F(K.value,null,!0)}));mxEvent.consume(E)}));C.style.position="absolute";C.style.marginTop="-3px";C.style.left="178px";C.style.height="22px";C.className="geColorBtn";C.style.display=m.checked||k?"":"none";u.appendChild(C);a=null!=
-x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(E){E=mxEvent.getSource(E);if(E==m||"INPUT"!=E.nodeName)E!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||e==mxConstants.NONE||(e=x),F(m.checked?e:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
-BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,e,g,d){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
-{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},e,null,d)};
-BaseFormatPanel.prototype.addArrow=function(a,b){b=null!=b?b:10;var f=document.createElement("div");f.style.display="inline-block";f.style.paddingRight="4px";f.style.padding="6px";var e=10-b;2==e?f.style.paddingTop="6px":0<e?f.style.paddingTop=6-e+"px":f.style.marginTop="-2px";f.style.height=b+"px";f.style.borderLeft="1px solid #a0a0a0";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",Toolbar.prototype.dropDownImage);f.appendChild(b);
-b=f.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(f,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+=
-" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(f);return b};
-BaseFormatPanel.prototype.addUnitInput=function(a,b,f,e,g,d,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-e+"px";b.style.width=e+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);e=this.createStepper(b,g,d,null,n,null,u);e.style.marginTop=k-2+"px";e.style.left=228-f+"px";a.appendChild(e);return b};
-BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,e,g){f=null!=f?f:52;var d=this.editorUi,k=d.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=e)e(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var A=k.view.getState(d.getSelectionState().cells[0]);null!=A&&x!=mxUtils.getValue(A.style,b,100)&&(100==x&&(x=null),A=d.getSelectionState().cells,
-k.setCellStyles(b,x,A),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",A)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=e);if(null!=b){var m=mxUtils.bind(this,function(r,x,A){if(A||u!=document.activeElement)r=d.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
+x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(E){E=mxEvent.getSource(E);if(E==m||"INPUT"!=E.nodeName)E!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||d==mxConstants.NONE||(d=x),F(m.checked?d:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
+BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,d,g,e){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
+{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},d,null,e)};
+BaseFormatPanel.prototype.addArrow=function(a,b,f){b=null!=b?b:10;var d=document.createElement("div");d.style.borderLeft="1px solid #a0a0a0";d.style.display="inline-block";d.style.height=b+"px";d.style.paddingRight="4px";d.style.padding="6px";f?(d.style.verticalAlign="top",d.style.marginLeft="1px"):(b=10-b,2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px");b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",
+Toolbar.prototype.dropDownImage);d.appendChild(b);b=d.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage=
+"none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(d);return b};
+BaseFormatPanel.prototype.addUnitInput=function(a,b,f,d,g,e,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-d+"px";b.style.width=d+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);d=this.createStepper(b,g,e,null,n,null,u);d.style.marginTop=k-2+"px";d.style.left=228-f+"px";a.appendChild(d);return b};
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,d,g){f=null!=f?f:52;var e=this.editorUi,k=e.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=d)d(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var A=k.view.getState(e.getSelectionState().cells[0]);null!=A&&x!=mxUtils.getValue(A.style,b,100)&&(100==x&&(x=null),A=e.getSelectionState().cells,
+k.setCellStyles(b,x,A),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",A)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=d);if(null!=b){var m=mxUtils.bind(this,function(r,x,A){if(A||u!=document.activeElement)r=e.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
27==r.keyCode&&(m(null,null,!0),k.container.focus(),mxEvent.consume(r))});k.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){k.getModel().removeListener(m)}});m()}mxEvent.addListener(u,"blur",a);mxEvent.addListener(u,"change",a);null!=g&&g(u);return n};
-BaseFormatPanel.prototype.addLabel=function(a,b,f,e){e=null!=e?e:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-e+"px";g.style.width=e+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
+BaseFormatPanel.prototype.addLabel=function(a,b,f,d){d=null!=d?d:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-d+"px";g.style.width=d+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
BaseFormatPanel.prototype.addKeyHandler=function(a,b){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(f){13==f.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(f)):27==f.keyCode&&(null!=b&&b(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(f))}))};
BaseFormatPanel.prototype.styleButtons=function(a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"borderRadius","3px"),mxUtils.setOpacity(a[b],100),a[b].style.border="1px solid #a0a0a0",a[b].style.padding="4px",a[b].style.paddingTop="3px",a[b].style.paddingRight="1px",a[b].style.margin="1px",a[b].style.marginRight="2px",a[b].style.width="24px",a[b].style.height="20px",a[b].className+=" geColorBtn"};
BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
ArrangePanel.prototype.init=function(){var a=this.editorUi.getSelectionState();0<a.cells.length&&(this.container.appendChild(this.addLayerOps(this.createPanel())),this.addGeometry(this.container),this.addEdgeGeometry(this.container),a.containsLabel&&0!=a.edges.length||this.container.appendChild(this.addAngle(this.createPanel())),a.containsLabel||this.container.appendChild(this.addFlip(this.createPanel())),this.container.appendChild(this.addAlign(this.createPanel())),1<a.vertices.length&&!a.cell&&
!a.row&&this.container.appendChild(this.addDistribute(this.createPanel())),this.container.appendChild(this.addTable(this.createPanel())),this.container.appendChild(this.addGroupOps(this.createPanel())));a.containsLabel&&(a=document.createElement("div"),a.style.width="100%",a.style.marginTop="0px",a.style.fontWeight="bold",a.style.padding="10px 0 0 14px",mxUtils.write(a,mxResources.get("style")),this.container.appendChild(a),new StyleFormatPanel(this.format,this.editorUi,this.container))};
-ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var d=
-e.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var k=e.table||e.row||e.cell,n=f.isStack(d)||f.isStackChild(d),u=k;n&&(k="0"==(f.isStack(d)?e.style:f.getCellStyle(f.model.getParent(d))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(r){b.handleError(r)}}),
-g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableColumn(d)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
-function(){try{n?f.insertLane(d,!0):f.insertTableRow(d,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableRow(d)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
-3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=e.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<e.style.colspan||1<e.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
-ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;e.cell||e.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var d=null;1!=e.cells.length||null==e.cells[0].value||isNaN(e.cells[0].value.nodeType)||(d=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
-n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),d.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),d.style.marginBottom="2px",d.style.width="210px",a.appendChild(d),g++);var k=null;null!=b.copiedValue&&
-0<e.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=d&&(d.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",d.style.marginBottom="2px",d.style.marginRight="2px"));null==d&&null==k||mxUtils.br(a);e=this.addAction(a,"clearWaypoints");null!=
-e&&(mxUtils.br(a),e.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
-ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var e=document.createElement("div");e.style.position="relative";e.style.whiteSpace="nowrap";e.style.paddingLeft="0px";e.style.paddingBottom="2px";e.style.borderWidth="0px";e.style.width="220px";e.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
-mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},e);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},e),d=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},e),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},e),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
-mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},e),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},e);this.styleButtons([b,g,d,k,n,u]);d.style.marginRight="10px"}a.appendChild(e);this.addActions(a,["snapToGrid"]);return a};
-ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),e=document.createElement("div");e.style.marginTop="2px";e.style.marginBottom="8px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("flip"));a.appendChild(e);e=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});e.setAttribute("title",mxResources.get("horizontal"));e.style.width="104px";e.style.marginRight=
-"2px";a.appendChild(e);e=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);return a};
-ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(e){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(e){b.distributeCells(!1)});f.setAttribute("title",
+ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var e=
+d.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var k=d.table||d.row||d.cell,n=f.isStack(e)||f.isStackChild(e),u=k;n&&(k="0"==(f.isStack(e)?d.style:f.getCellStyle(f.model.getParent(e))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(r){b.handleError(r)}}),
+g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableColumn(e)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
+function(){try{n?f.insertLane(e,!0):f.insertTableRow(e,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableRow(e)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
+3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=d.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<d.style.colspan||1<d.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
+ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;d.cell||d.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var e=null;1!=d.cells.length||null==d.cells[0].value||isNaN(d.cells[0].value.nodeType)||(e=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
+n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),e.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),e.style.marginBottom="2px",e.style.width="210px",a.appendChild(e),g++);var k=null;null!=b.copiedValue&&
+0<d.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=e&&(e.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",e.style.marginBottom="2px",e.style.marginRight="2px"));null==e&&null==k||mxUtils.br(a);d=this.addAction(a,"clearWaypoints");null!=
+d&&(mxUtils.br(a),d.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
+ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.paddingLeft="0px";d.style.paddingBottom="2px";d.style.borderWidth="0px";d.style.width="220px";d.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
+mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},d);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},d),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},d),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
+mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},d),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,g,e,k,n,u]);e.style.marginRight="10px"}a.appendChild(d);this.addActions(a,["snapToGrid"]);return a};
+ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="104px";d.style.marginRight=
+"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);return a};
+ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(d){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(d){b.distributeCells(!1)});f.setAttribute("title",
mxResources.get("vertical"));f.style.width="104px";a.appendChild(f);return a};
-ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var d=null,k=null,n=null;!e.rotatable||e.table||e.row||e.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),d=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
-"10px");e.containsLabel||(g=mxResources.get("reverse"),0<e.vertices.length&&0<e.edges.length?g=mxResources.get("turn")+" / "+g:0<e.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=d&&(n.style.marginTop="8px"));if(null!=d){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=d)e=b.getSelectionState(),
-m=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),d.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(d,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(d,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
+ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var e=null,k=null,n=null;!d.rotatable||d.table||d.row||d.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),e=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
+"10px");d.containsLabel||(g=mxResources.get("reverse"),0<d.vertices.length&&0<d.edges.length?g=mxResources.get("turn")+" / "+g:0<d.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=e&&(n.style.marginTop="8px"));if(null!=e){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=e)d=b.getSelectionState(),
+m=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
BaseFormatPanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.MILLIMETERS:return"mm";case mxConstants.METERS:return"m"}};BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
-ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
+ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,d=f.editor.graph,g=d.getModel(),e=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
m=this.addUnitInput(k,this.getUnit(),16,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r,
-100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);d.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
-mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var A=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var C=this.addGeometryHandler(u,function(T,U,fa){if(e.isTableCell(fa))return e.setTableColumnWidth(fa,U-T.width,!0),!0;0<T.width&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.height=Math.round(T.height*U*100/T.width)/100),T.width=U)});var F=this.addGeometryHandler(m,function(T,
-U,fa){e.isTableCell(fa)&&(fa=e.model.getParent(fa));if(e.isTableRow(fa))return e.setTableRowHeight(fa,U-T.height),!0;0<T.height&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.width=Math.round(T.width*U*100/T.height)/100),T.height=U)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var K=this.createPanel();K.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
-K.appendChild(n);var E=this.addUnitInput(K,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(K,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(K);this.addLabel(K,mxResources.get("left"),87);this.addLabel(K,mxResources.get("top"),16);var R=mxUtils.bind(this,function(T,U,fa){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||
-null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(fa||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(fa||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){K.style.display="";if(fa||document.activeElement!=E)E.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(fa||document.activeElement!=O)O.value=this.inUnit(d.y)+
-(""==d.y?"":" "+this.getUnit())}else K.style.display="none"});this.addKeyHandler(E,R);this.addKeyHandler(O,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var Q=this.addGeometryHandler(E,function(T,U){U=b.fromUnit(U);T.relative?T.offset.x=U:T.x=U});var P=this.addGeometryHandler(O,function(T,U){U=b.fromUnit(U);T.relative?T.offset.y=U:T.y=U});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var aa=e.getCellGeometry(d.vertices[0]);
-null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(T){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(d.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(K),mxUtils.br(K),K.appendChild(n))}a.appendChild(K)}};
-ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=d+" "+k.getUnit();else if(u!=d){g.getModel().beginUpdate();try{for(var m=e.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var A=g.view.getState(m[r]);null!=A&&g.isRecursiveVertexResize(A)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}d=
-u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var e=this.editorUi,g=e.editor.graph,d=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=d+" pt";else if(n!=d){g.getModel().beginUpdate();try{for(var u=e.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}d=n;a.value=n+" pt"}}mxEvent.consume(k)}var e=this.editorUi,g=e.editor.graph,d=null;mxEvent.addListener(a,
-"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(Q){var P=parseInt(k.value);P=Math.min(999,
-Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",P,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",aa))}k.value=P+" pt";mxEvent.consume(Q)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position=
-"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){K.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){E.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div");
-d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var A=this.addUnitInput(x,"pt",87,52,function(){O.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(A,F);this.addKeyHandler(C,F);var F=mxUtils.bind(this,function(Q,P,aa){e=b.getSelectionState();
-Q=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(Q)?(aa=f.model.getGeometry(Q),null!=aa.sourcePoint&&null==f.model.getTerminal(Q,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(Q,
+100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);e.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
+mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);e.cell||e.row?r.style.visibility="hidden":k.appendChild(n);var A=x.getElementsByTagName("input")[0];this.addKeyHandler(u,R);this.addKeyHandler(m,R);var C=this.addGeometryHandler(u,function(T,U,fa){if(d.isTableCell(fa))return d.setTableColumnWidth(fa,U-T.width,!0),!0;0<T.width&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.height=Math.round(T.height*U*100/T.width)/100),T.width=U)});var F=this.addGeometryHandler(m,function(T,
+U,fa){d.isTableCell(fa)&&(fa=d.model.getParent(fa));if(d.isTableRow(fa))return d.setTableRowHeight(fa,U-T.height),!0;0<T.height&&(U=Math.max(1,b.fromUnit(U)),A.checked&&(T.width=Math.round(T.width*U*100/T.height)/100),T.height=U)});(e.resizable||e.row||e.cell)&&a.appendChild(k);var K=this.createPanel();K.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
+K.appendChild(n);var E=this.addUnitInput(K,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),O=this.addUnitInput(K,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(K);this.addLabel(K,mxResources.get("left"),87);this.addLabel(K,mxResources.get("top"),16);var R=mxUtils.bind(this,function(T,U,fa){e=f.getSelectionState();if(e.containsLabel||e.vertices.length!=d.getSelectionCount()||
+null==e.width||null==e.height)k.style.display="none";else{k.style.display="";if(fa||document.activeElement!=u)u.value=this.inUnit(e.width)+(""==e.width?"":" "+this.getUnit());if(fa||document.activeElement!=m)m.value=this.inUnit(e.height)+(""==e.height?"":" "+this.getUnit())}if(e.vertices.length==d.getSelectionCount()&&null!=e.x&&null!=e.y){K.style.display="";if(fa||document.activeElement!=E)E.value=this.inUnit(e.x)+(""==e.x?"":" "+this.getUnit());if(fa||document.activeElement!=O)O.value=this.inUnit(e.y)+
+(""==e.y?"":" "+this.getUnit())}else K.style.display="none"});this.addKeyHandler(E,R);this.addKeyHandler(O,R);g.addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){g.removeListener(R)}});R();var Q=this.addGeometryHandler(E,function(T,U){U=b.fromUnit(U);T.relative?T.offset.x=U:T.x=U});var P=this.addGeometryHandler(O,function(T,U){U=b.fromUnit(U);T.relative?T.offset.y=U:T.y=U});if(e.movable){if(0==e.edges.length&&1==e.vertices.length&&g.isEdge(g.getParent(e.vertices[0]))){var aa=d.getCellGeometry(e.vertices[0]);
+null!=aa&&aa.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(T){g.beginUpdate();try{aa=aa.clone(),aa.x=0,aa.y=0,aa.offset=new mxPoint,g.setGeometry(e.vertices[0],aa)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(K),mxUtils.br(K),K.appendChild(n))}a.appendChild(K)}};
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=e+" "+k.getUnit();else if(u!=e){g.getModel().beginUpdate();try{for(var m=d.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var A=g.view.getState(m[r]);null!=A&&g.isRecursiveVertexResize(A)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}e=
+u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var d=this.editorUi,g=d.editor.graph,e=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=e+" pt";else if(n!=e){g.getModel().beginUpdate();try{for(var u=d.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}e=n;a.value=n+" pt"}}mxEvent.consume(k)}var d=this.editorUi,g=d.editor.graph,e=null;mxEvent.addListener(a,
+"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState(),g=this.createPanel(),e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("width"));g.appendChild(e);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(Q){var P=parseInt(k.value);P=Math.min(999,
+Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var aa=b.getSelectionState().cells;f.setCellStyles("width",P,aa);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",aa))}k.value=P+" pt";mxEvent.consume(Q)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";e=document.createElement("div");e.style.position=
+"absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("linestart"));u.appendChild(e);var m=this.addUnitInput(u,"pt",87,52,function(){K.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){E.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";e=document.createElement("div");
+e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("lineend"));x.appendChild(e);var A=this.addUnitInput(x,"pt",87,52,function(){O.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){R.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(A,F);this.addKeyHandler(C,F);var F=mxUtils.bind(this,function(Q,P,aa){d=b.getSelectionState();
+Q=d.cells[0];if("link"==d.style.shape||"flexArrow"==d.style.shape){if(g.style.display="",aa||document.activeElement!=k)aa=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=aa+" pt"}else g.style.display="none";1==d.cells.length&&f.model.isEdge(Q)?(aa=f.model.getGeometry(Q),null!=aa.sourcePoint&&null==f.model.getTerminal(Q,!0)?(m.value=aa.sourcePoint.x,r.value=aa.sourcePoint.y):u.style.display="none",null!=aa.targetPoint&&null==f.model.getTerminal(Q,
!1)?(A.value=aa.targetPoint.x,C.value=aa.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var K=this.addEdgeGeometryHandler(m,function(Q,P){Q.sourcePoint.x=P});var E=this.addEdgeGeometryHandler(r,function(Q,P){Q.sourcePoint.y=P});var O=this.addEdgeGeometryHandler(A,function(Q,P){Q.targetPoint.x=P});var R=this.addEdgeGeometryHandler(C,function(Q,P){Q.targetPoint.y=P});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}});
F()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
-TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState(),d=this.createTitle(mxResources.get("font"));d.style.paddingLeft="14px";d.style.paddingTop="10px";d.style.paddingBottom="6px";a.appendChild(d);d=this.createPanel();d.style.paddingTop="2px";d.style.paddingBottom="2px";d.style.position=
-"relative";d.style.marginLeft="-2px";d.style.borderWidth="0px";d.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=d.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(d);
-k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",d,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=d.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
-"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=d.cloneNode(!1);x.style.marginLeft=
-"-3px";x.style.paddingBottom="0px";var A=function(ca){return function(){return ca()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center",
-mxResources.get("center"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),K=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(ca){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
-ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,F,K]);if(e.cellEditor.isContentEditing()){var E=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([E]);E.firstChild.style.background=
+TextFormatPanel.prototype.addFont=function(a){function b(ca,t){ca.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,d=f.editor.graph,g=f.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="14px";e.style.paddingTop="10px";e.style.paddingBottom="6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position=
+"relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var k=e.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(e);
+k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=e.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
+"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=e.cloneNode(!1);x.style.marginLeft=
+"-3px";x.style.paddingBottom="0px";var A=function(ca){return function(){return ca()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center",
+mxResources.get("center"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),K=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(ca){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
+ca);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,F,K]);if(d.cellEditor.isContentEditing()){var E=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([E]);E.firstChild.style.background=
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
E.firstChild.style.backgroundPosition="2px 2px";E.firstChild.style.backgroundSize="18px 18px";this.styleButtons([E])}var O=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),R=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),Q=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([O,R,Q]);a.appendChild(x);var P,aa,T,U,fa;if(e.cellEditor.isContentEditing()){O.style.display="none";R.style.display="none";Q.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight=
+mxResources.get("bottom"),A(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([O,R,Q]);a.appendChild(x);var P,aa,T,U,fa;if(d.cellEditor.isContentEditing()){O.style.display="none";R.style.display="none";Q.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight=
"9px";ha.style.opacity=1;this.styleButtons([ha,P=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),aa=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);P.style.marginLeft="10px";A=x.cloneNode(!1);A.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
-!1,null)},A),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},A)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(A)}else m[2].style.marginRight="12px",K.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
+!1,null)},A),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},A),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},A)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(A)}else m[2].style.marginRight="12px",K.style.marginRight="12px";x=e.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var ba=document.createElement("select");ba.style.position="absolute";ba.style.left="126px";ba.style.width="98px";ba.style.border="1px solid rgb(160, 160, 160)";ba.style.borderRadius="4px";ba.style.marginTop="-2px";E="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(A=0;A<E.length;A++){var I=document.createElement("option");I.setAttribute("value",E[A]);mxUtils.write(I,mxResources.get(E[A]));ba.appendChild(I)}x.appendChild(ba);E=d.cloneNode(!1);E.style.marginLeft="0px";E.style.paddingTop=
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(A=0;A<E.length;A++){var I=document.createElement("option");I.setAttribute("value",E[A]);mxUtils.write(I,mxResources.get(E[A]));ba.appendChild(I)}x.appendChild(ba);E=e.cloneNode(!1);E.style.marginLeft="0px";E.style.paddingTop=
"4px";E.style.paddingBottom="4px";E.style.fontWeight="normal";mxUtils.write(E,mxResources.get("writingDirection"));var L=document.createElement("select");L.style.position="absolute";L.style.border="1px solid rgb(160, 160, 160)";L.style.left="126px";L.style.width="98px";L.style.borderRadius="4px";L.style.marginTop="-2px";I=["automatic","leftToRight","rightToLeft"];var H={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(A=0;A<I.length;A++){var S=
-document.createElement("option");S.setAttribute("value",I[A]);mxUtils.write(S,mxResources.get(I[A]));L.appendChild(S)}E.appendChild(L);e.isEditing()||(a.appendChild(x),mxEvent.addListener(ba,"change",function(ca){e.getModel().beginUpdate();try{var t=qa[ba.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
-t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(E),mxEvent.addListener(L,"change",function(ca){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,H[L.value],g.cells);mxEvent.consume(ca)}));var V=document.createElement("input");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.textAlign="right";V.style.marginTop="4px";V.style.left="161px";V.style.width="53px";V.style.borderRadius="4px";V.style.height="23px";V.style.boxSizing="border-box";
-n.appendChild(V);var ea=null;x=this.installInputHandler(V,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,M){null!=e.cellEditor.textarea&&G!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(G)&&(M||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
-ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),B=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;B!=e.cellEditor.textarea&&B.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");B!=e.cellEditor.textarea&&(B=B.parentNode);if(null!=B&&B.nodeType==mxConstants.NODETYPE_ELEMENT){var D=B.getElementsByTagName("*");
-t(B);for(B=0;B<D.length;B++)t(D[B])}V.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,M){for(;null!=M;){if(M===G)return!0;M=M.parentNode}return!1},D=null,document.selection?D=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(D=z.getRangeAt(0).commonAncestorContainer)),null!=D&&t(e.cellEditor.textarea,D))for(ea=ca,document.execCommand("fontSize",!1,"4"),D=e.cellEditor.textarea.getElementsByTagName("font"),B=0;B<D.length;B++)if("4"==
-D[B].getAttribute("size")){D[B].removeAttribute("size");D[B].style.fontSize=ea+"px";window.setTimeout(function(){V.value=ea+" pt";ea=null},0);break}},!0);x=this.createStepper(V,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=V.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ka=null,wa=e.shapeBackgroundColor,W=null,Z=e.shapeForegroundColor,oa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
-function(){return wa},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},e.shapeBackgroundColor,{install:function(ca){ka=ca},destroy:function(){ka=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
-null})},e.shapeBackgroundColor);oa.style.fontWeight="bold";var va=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);va.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Z},function(ca){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"),
-z=[],B=0;B<t.length;B++)z.push({node:t[B],color:t[B].getAttribute("color")});document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=e.cellEditor.textarea.getElementsByTagName("font");for(B=0;B<ca.length;B++)if(B>=z.length||ca[B]!=z[B].node||ca[B]==z[B].node&&ca[B].getAttribute("color")!=z[B].color){z=ca[B].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
-null!=z.firstChild){ca[B].parentNode.insertBefore(z,ca[B]);for(t=z.firstChild;null!=t;){var D=t.nextSibling;ca[B].appendChild(t);t=D}z.appendChild(ca[B])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
-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",
+document.createElement("option");S.setAttribute("value",I[A]);mxUtils.write(S,mxResources.get(I[A]));L.appendChild(S)}E.appendChild(L);d.isEditing()||(a.appendChild(x),mxEvent.addListener(ba,"change",function(ca){d.getModel().beginUpdate();try{var t=qa[ba.value];null!=t&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
+t[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(ca)}),a.appendChild(E),mxEvent.addListener(L,"change",function(ca){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,H[L.value],g.cells);mxEvent.consume(ca)}));var V=document.createElement("input");V.style.position="absolute";V.style.border="1px solid rgb(160, 160, 160)";V.style.textAlign="right";V.style.marginTop="4px";V.style.left="161px";V.style.width="53px";V.style.borderRadius="4px";V.style.height="23px";V.style.boxSizing="border-box";
+n.appendChild(V);var ea=null;x=this.installInputHandler(V,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(ca){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(G,M){null!=d.cellEditor.textarea&&G!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(G)&&(M||z.containsNode(G,!0))&&("FONT"==G.nodeName?(G.removeAttribute("size"),G.style.fontSize=ca+"px"):mxUtils.getCurrentStyle(G).fontSize!=ca+"px"&&(mxUtils.getCurrentStyle(G.parentNode).fontSize!=
+ca+"px"?G.style.fontSize=ca+"px":G.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[ca],"cells",g.cells))},z=window.getSelection(),B=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:d.cellEditor.textarea;B!=d.cellEditor.textarea&&B.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");B!=d.cellEditor.textarea&&(B=B.parentNode);if(null!=B&&B.nodeType==mxConstants.NODETYPE_ELEMENT){var D=B.getElementsByTagName("*");
+t(B);for(B=0;B<D.length;B++)t(D[B])}V.value=ca+" pt"}else if(window.getSelection||document.selection)if(t=function(G,M){for(;null!=M;){if(M===G)return!0;M=M.parentNode}return!1},D=null,document.selection?D=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(D=z.getRangeAt(0).commonAncestorContainer)),null!=D&&t(d.cellEditor.textarea,D))for(ea=ca,document.execCommand("fontSize",!1,"4"),D=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<D.length;B++)if("4"==
+D[B].getAttribute("size")){D[B].removeAttribute("size");D[B].style.fontSize=ea+"px";window.setTimeout(function(){V.value=ea+" pt";ea=null},0);break}},!0);x=this.createStepper(V,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=V.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var ka=null,wa=d.shapeBackgroundColor,W=null,Z=d.shapeForegroundColor,oa=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
+function(){return wa},function(ca){document.execCommand("backcolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[ca],"cells",g.cells))},d.shapeBackgroundColor,{install:function(ca){ka=ca},destroy:function(){ka=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(ca){d.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
+null})},d.shapeBackgroundColor);oa.style.fontWeight="bold";var ua=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ua.style.fontWeight="bold";n=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();n=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return Z},function(ca){if(mxClient.IS_FF){for(var t=d.cellEditor.textarea.getElementsByTagName("font"),
+z=[],B=0;B<t.length;B++)z.push({node:t[B],color:t[B].getAttribute("color")});document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells));ca=d.cellEditor.textarea.getElementsByTagName("font");for(B=0;B<ca.length;B++)if(B>=z.length||ca[B]!=z[B].node||ca[B]==z[B].node&&ca[B].getAttribute("color")!=z[B].color){z=ca[B].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
+null!=z.firstChild){ca[B].parentNode.insertBefore(z,ca[B]);for(t=z.firstChild;null!=t;){var D=t.nextSibling;ca[B].appendChild(t);t=D}z.appendChild(ca[B])}break}}else document.execCommand("forecolor",!1,ca!=mxConstants.NONE?ca:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[ca],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor,{install:function(ca){W=ca},destroy:function(){W=null}},
+null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(ca){oa.style.display=ca==mxConstants.NONE?"none":"";ua.style.display=oa.style.display},function(ca){ca==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,ca,g.cells);d.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},d.shapeForegroundColor);
+n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);d.cellEditor.isContentEditing()||k.appendChild(ua);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=d.filterSelectionCells(mxUtils.bind(this,function(ca){var t=d.view.getState(ca);return null==t||d.isAutoSizeState(t)||d.getModel().isEdge(ca)||!d.isTableRow(ca)&&!d.isTableCell(ca)&&!d.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)}),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&&
-(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",
-mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&e.deleteRow(T,fa.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
-function(ca){if(null!=T){var t=T.style.borderColor.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.border=null});null==z||z==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=
-""):(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);
+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 va=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(d.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&&(d.cellEditor.restoreSelection(Ha),Ha=null);for(var z=d.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+z.parentNode;null!=z&&z==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("P"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="<p>"+d.cellEditor.textarea.innerHTML+"</p>"),z=d.cellEditor.textarea.firstChild);null!=z&&null!=d.cellEditor.textarea&&z!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);ca.value=t+" %"},function(ca){Ta=ca;mxEvent.addListener(ca,"mousedown",function(){document.activeElement==d.cellEditor.textarea&&
+(Ha=d.cellEditor.saveSelection())});mxEvent.addListener(ca,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(Ha=d.cellEditor.saveSelection())});ca.value="120 %"}));k=e.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=e.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
+function(){try{null!=T&&d.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&&d.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&&d.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&&d.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&&d.insertRow(T,fa.sectionRowIndex+1)}catch(ca){this.editorUi.handleError(ca)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=fa&&d.deleteRow(T,fa.sectionRowIndex)}catch(ca){this.editorUi.handleError(ca)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);e=e.cloneNode(!1);e.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
+function(ca){if(null!=T){var t=T.style.borderColor.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;d.processElements(B,function(D){D.style.border=null});null==z||z==mxConstants.NONE?(B.removeAttribute("border"),B.style.border="",B.style.borderCollapse=
+""):(B.setAttribute("border","1"),B.style.border="1px solid "+z,B.style.borderCollapse="collapse")})}}),e),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;d.processElements(B,function(D){D.style.backgroundColor=null});B.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),e),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()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},e)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(e);
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);b(m[0],(ca&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(ca&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(m[2],(ca&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=
mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(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);b(C,ca==mxConstants.ALIGN_LEFT);b(F,ca==mxConstants.ALIGN_CENTER);b(K,ca==mxConstants.ALIGN_RIGHT);ca=mxUtils.getValue(g.style,
mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(O,ca==mxConstants.ALIGN_TOP);b(R,ca==mxConstants.ALIGN_MIDDLE);b(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!=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-
+za)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),za.value=isNaN(ca)?"":ca+" pt";if(z||document.activeElement!=va)ca=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),va.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(va,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(va,Ua);d.getModel().addListener(mxEvent.CHANGE,Ua);this.listeners.push({destroy:function(){d.getModel().removeListener(Ua)}});Ua();if(d.cellEditor.isContentEditing()){var $a=!1;e=function(){$a||
+($a=!0,window.setTimeout(function(){var ca=d.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!=d.getParentByName(ca,Ba,d.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&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(P,z("SUB")),e.cellEditor.isTableSelected()?(b(ha,t(G.textAlign,"justify")),b(C,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(K,t(G.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ha,t(G.textAlign,"justify")),b(C,!1),b(F,!1),b(K,!1)):(b(ha,!1),b(C,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(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,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
+0;ja<ia.length;ja++)if(da.containsNode(ia[ja],!0)){temp=mxUtils.getCurrentStyle(ia[ja]);M=Math.max(B(temp),M);var sa=D(M,temp,ia[ja]);if(sa!=X||isNaN(sa))X=""}null!=G&&(b(m[0],"bold"==G.fontWeight||400<G.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==G.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(aa,z("SUP")),b(P,z("SUB")),d.cellEditor.isTableSelected()?(b(ha,t(G.textAlign,"justify")),b(C,t(G.textAlign,"left")),b(F,t(G.textAlign,"center")),b(K,t(G.textAlign,"right"))):(z=d.cellEditor.align||mxUtils.getValue(g.style,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(G.textAlign,"justify")?(b(ha,t(G.textAlign,"justify")),b(C,!1),b(F,!1),b(K,!1)):(b(ha,!1),b(C,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(K,z==mxConstants.ALIGN_RIGHT))),T=d.getParentByName(ca,"TABLE",d.cellEditor.textarea),fa=null==T?null:d.getParentByName(ca,"TR",T),U=null==T?null:d.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",sa=parseFloat(X),isNaN(sa)?Ta.value="100 %":Ta.value=Math.round(100*sa)+" %"),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(d.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,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())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),f=document.createElement("style");mxUtils.setTextContent(f,a);b.body.appendChild(f);return f.sheet.cssRules};
-StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var e=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(d);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
-for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,e)}}}}catch(m){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,f,e,g,d,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var A=mxUtils.trim(m.style[r]);""!=A&&"url("!=A.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=A;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
-10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[d].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";e.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
+StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var d=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),e=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(e);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
+for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,d)}}}}catch(m){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,f,d,g,e,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var A=mxUtils.trim(m.style[r]);""!=A&&"url("!=A.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=A;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
+10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[e].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";d.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
mxResources.get("gradient")))};
-StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(e){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
-function(e){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
-StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var d=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
-mxEvent.addListener(d,"click",function(C){mxEvent.consume(C)});var k=1<=e.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==e.style.shape?
-mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,e.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(e.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&e.fill&&"image"!=e.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
-for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),d.appendChild(r);k.appendChild(d);var A=mxUtils.bind(this,function(){e=b.getSelectionState();var C=mxUtils.getValue(e.style,mxConstants.STYLE_GRADIENT_DIRECTION,
-mxConstants.DIRECTION_SOUTH),F=mxUtils.getValue(e.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;d.value=F;a.style.display=e.fill?"":"none";C=mxUtils.getValue(e.style,u,null);e.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=e.style.shape?(d.style.display="1"==e.style.sketch?"":"none",n.style.display=e.containsImage||"1"==e.style.sketch&&"solid"!=F&&"auto"!=F?"none":""):(d.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});
-A();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",e.cells));mxEvent.consume(C)});mxEvent.addListener(d,"change",function(C){f.setCellStyles("fillStyle",d.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[d.value],"cells",e.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
+StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(d){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
+function(d){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
+StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var e=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
+mxEvent.addListener(e,"click",function(C){mxEvent.consume(C)});var k=1<=d.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==d.style.shape?
+mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,d.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(d.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
+for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),e.appendChild(r);k.appendChild(e);var A=mxUtils.bind(this,function(){d=b.getSelectionState();var C=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,
+mxConstants.DIRECTION_SOUTH),F=mxUtils.getValue(d.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;e.value=F;a.style.display=d.fill?"":"none";C=mxUtils.getValue(d.style,u,null);d.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=d.style.shape?(e.style.display="1"==d.style.sketch?"":"none",n.style.display=d.containsImage||"1"==d.style.sketch&&"solid"!=F&&"auto"!=F?"none":""):(e.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});
+A();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",d.cells));mxEvent.consume(C)});mxEvent.addListener(e,"change",function(C){f.setCellStyles("fillStyle",e.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[e.value],"cells",d.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
k=this.getCustomColors();for(m=0;m<k.length;m++)a.appendChild(this.createCellColorOption(k[m].title,k[m].key,k[m].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function b(W){var Z=parseFloat(E.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",d.cells)));E.value=Z+" pt";mxEvent.consume(W)}function f(W){var Z=parseFloat(O.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(d.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",d.cells)));O.value=Z+" pt";mxEvent.consume(W)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select");
+StyleFormatPanel.prototype.addStroke=function(a){function b(W){var Z=parseFloat(E.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",e.cells)));E.value=Z+" pt";mxEvent.consume(W)}function f(W){var Z=parseFloat(O.value);Z=Math.min(999,Math.max(0,isNaN(Z)?1:Z));Z!=mxUtils.getValue(e.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,Z,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[Z],"cells",e.cells)));O.value=Z+" pt";mxEvent.consume(W)}var d=this.editorUi,g=d.editor.graph,e=d.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";e.stroke||(k.style.display="none");var n=document.createElement("select");
n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(W){g.getModel().beginUpdate();try{var Z=
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var va=0;va<Z.length;va++)g.setCellStyles(Z[va],oa[va],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",oa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
-d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var A=k.cloneNode(!1);A.style.fontWeight="normal";A.style.whiteSpace="nowrap";A.style.position="relative";A.style.paddingLeft="0px";A.style.marginBottom="2px";A.style.overflow="hidden";A.style.marginTop="2px";A.style.width="220px";A.className="geToolbarContainer";var C=
-mxUtils.bind(this,function(W,Z,oa,va,Ja){W=this.editorUi.menus.styleChange(W,"",va,Ja,"geIcon",null);va=document.createElement("div");va.style.width=Z+"px";va.style.height="1px";va.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;va.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=Z+"px";W.firstChild.firstChild.appendChild(va);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(A,"geSprite-orthogonal",mxResources.get("pattern"),
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var ua=0;ua<Z.length;ua++)g.setCellStyles(Z[ua],oa[ua],e.cells);d.fireEvent(new mxEventObject("styleChanged","keys",Z,"values",oa,"cells",e.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
+e.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,e.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var A=k.cloneNode(!1);A.style.fontWeight="normal";A.style.whiteSpace="nowrap";A.style.position="relative";A.style.paddingLeft="0px";A.style.marginBottom="2px";A.style.overflow="hidden";A.style.marginTop="2px";A.style.width="220px";A.className="geToolbarContainer";var C=
+mxUtils.bind(this,function(W,Z,oa,ua,Ja){W=this.editorUi.menus.styleChange(W,"",ua,Ja,"geIcon",null);ua=document.createElement("div");ua.style.width=Z+"px";ua.style.height="1px";ua.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;ua.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=Z+"px";W.firstChild.firstChild.appendChild(ua);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(A,"geSprite-orthogonal",mxResources.get("pattern"),
!1,mxUtils.bind(this,function(W){C(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=A.cloneNode(!1),K=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(W){this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,
null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],
@@ -3424,12 +3426,12 @@ null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("tit
mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
" (2)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=A.cloneNode(!1);var E=document.createElement("input");E.style.position="absolute";E.style.textAlign="right";E.style.marginTop="2px";E.style.width="52px";E.style.height="21px";E.style.left="146px";E.style.border="1px solid rgb(160, 160, 160)";E.style.borderRadius="4px";E.style.boxSizing="border-box";E.setAttribute("title",mxResources.get("linewidth"));
A.appendChild(E);var O=E.cloneNode(!0);F.appendChild(O);var R=this.createStepper(E,b,1,9);R.style.display=E.style.display;R.style.marginTop="2px";R.style.left="198px";A.appendChild(R);R=this.createStepper(O,f,1,9);R.style.display=O.style.display;R.style.marginTop="2px";O.style.position="absolute";R.style.left="198px";F.appendChild(R);mxEvent.addListener(E,"blur",b);mxEvent.addListener(E,"change",b);mxEvent.addListener(O,"blur",f);mxEvent.addListener(O,"change",f);var Q=this.editorUi.toolbar.addMenuFunctionInContainer(u,
-"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
+"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",
"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
+mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),
Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,
null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
@@ -3442,7 +3444,7 @@ null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.edit
["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}})),aa=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
-mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
+mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var Z=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);Z.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));Z.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),
"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],
[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
@@ -3456,79 +3458,78 @@ mxUtils.bind(this,function(W){if("connector"==d.style.shape||"flexArrow"==d.styl
"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,
"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}}));R=this.addArrow(K,8);R.nextSibling.style.position="relative";R.nextSibling.style.top="-2px";R=this.addArrow(Q,
-10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";Q.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P);this.addArrow(aa);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var T=this.addArrow(r,9);T.className="geIcon";T.style.width="22px";var U=document.createElement("div");U.style.width="84px";U.style.height="1px";U.style.borderBottom="1px solid "+this.defaultStrokeColor;U.style.marginBottom="7px";R.appendChild(U);var fa=document.createElement("div");
+10);R.nextSibling.style.position="relative";R.nextSibling.style.top="-3px";Q.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P,null,!0);this.addArrow(aa,null,!0);R=this.addArrow(m,9);R.className="geIcon";R.style.width="auto";var T=this.addArrow(r,9);T.className="geIcon";T.style.width="22px";var U=document.createElement("div");U.style.width="84px";U.style.height="1px";U.style.borderBottom="1px solid "+this.defaultStrokeColor;U.style.marginBottom="7px";R.appendChild(U);var fa=document.createElement("div");
fa.style.width="23px";fa.style.height="1px";fa.style.borderBottom="1px solid "+this.defaultStrokeColor;fa.style.marginBottom="7px";T.appendChild(fa);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";K.style.marginLeft="10px";K.style.height="15px";Q.style.marginLeft="10px";Q.style.height="17px";P.style.marginLeft="3px";P.style.height="17px";aa.style.marginLeft="3px";aa.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(A);m=A.cloneNode(!1);
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,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,
-mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==Z?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=K.getElementsByTagName("div")[0];null!=W&&(W.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"==d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");
-d.edges.length==d.cells.length?(F.style.display="",A.style.display="none"):(F.style.display="none",A.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");W=va(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),P,"start");Z=va(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style,"endFill","1"),aa,"end");null!=W&&null!=Z&&("arrow"==d.style.shape?
-(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(Q,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(aa,100));if(oa||document.activeElement!=I)W=parseInt(mxUtils.getValue(d.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=ba)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ba.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0)),ha.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=L)W=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),L.value=isNaN(W)?"":W+" pt"});var S=this.installInputHandler(I,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var V=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ea=this.installInputHandler(ba,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var ka=this.installInputHandler(ha,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var wa=this.installInputHandler(L,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(E,H);this.addKeyHandler(I,H);this.addKeyHandler(qa,H);this.addKeyHandler(ba,H);this.addKeyHandler(ha,H);this.addKeyHandler(L,H);g.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){g.getModel().removeListener(H)}});H();return a};
-StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.position="absolute";
-d.style.height="21px";d.style.padding="0px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.right="76px";d.style.width="54px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));d.appendChild(n)}mxEvent.addListener(d,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
-d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,A,C){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,
-"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(e.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
-"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){e=b.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
-0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
+"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)});e.edges.length==e.cells.length?(a.appendChild(u),a.appendChild(m)):e.vertices.length==e.cells.length&&
+a.appendChild(k);var H=mxUtils.bind(this,function(W,Z,oa){function ua(Ja,Ga,va,za){va=va.getElementsByTagName("div")[0];null!=va&&d.updateCssForMarker(va,za,e.style.shape,Ja,Ga);return va}e=d.getSelectionState();if(oa||document.activeElement!=E)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),E.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=O)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),O.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"==
+e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.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(e.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(Z=null),"orthogonalEdgeStyle"==Z&&"1"==mxUtils.getValue(e.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(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==Z?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=K.getElementsByTagName("div")[0];null!=W&&(W.className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?
+"geSprite geSprite-simplearrow":"geSprite geSprite-connection");e.edges.length==e.cells.length?(F.style.display="",A.style.display="none"):(F.style.display="none",A.style.display="");Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps&&(a.style.borderBottomStyle="none");W=ua(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),P,"start");Z=ua(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
+"endFill","1"),aa,"end");null!=W&&null!=Z&&("arrow"==e.style.shape?(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(W.className="geSprite geSprite-noarrow",Z.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(Q,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(aa,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(aa,100));
+if(oa||document.activeElement!=I)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),I.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=ba)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ba.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ha.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=L)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),L.value=isNaN(W)?"":W+" pt"});var S=this.installInputHandler(I,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var V=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ea=this.installInputHandler(ba,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,
+0,999," pt");var ka=this.installInputHandler(ha,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var wa=this.installInputHandler(L,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(E,H);this.addKeyHandler(I,H);this.addKeyHandler(qa,H);this.addKeyHandler(ba,H);this.addKeyHandler(ha,H);this.addKeyHandler(L,H);g.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){g.getModel().removeListener(H)}});H();return a};
+StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var e=document.createElement("select");e.style.position="absolute";
+e.style.height="21px";e.style.padding="0px";e.style.marginTop="-2px";e.style.boxSizing="border-box";e.style.right="76px";e.style.width="54px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));e.appendChild(n)}mxEvent.addListener(e,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
+e.value,d.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",d.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(e,"click",function(x){mxEvent.consume(x)});a.appendChild(e);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,A,C){d=b.getSelectionState();e.value=mxUtils.getValue(d.style,
+"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(d.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
+StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var e=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
+"8px";k.appendChild(n);k.appendChild(u);e.appendChild(k);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,K){C=this.createCellOption(C,F,K);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),A=mxUtils.bind(this,function(C,F,K){d=b.getSelectionState();n.innerHTML="";u.innerHTML="";m=n;d.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);d.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
+0);d.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,A);this.listeners.push({destroy:function(){f.getModel().removeListener(A)}});A();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){var a=this.editorUi;this.darkModeChangedListener=mxUtils.bind(this,function(){this.format.cachedStyleEntries=[]});a.addListener("darkModeChanged",this.darkModeChangedListener);this.container.appendChild(this.addView(this.createPanel()))};
-DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
-x.style.padding="0px";var A=document.createElement("td");A.style.padding="0px";A.style.width="50%";A.setAttribute("valign","middle");var C=A.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(A),A.appendChild(this.createOption(mxResources.get("sketch"),function(){return d},function(ba){(d=ba)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ba?
+DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,d=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var e="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
+x.style.padding="0px";var A=document.createElement("td");A.style.padding="0px";A.style.width="50%";A.setAttribute("valign","middle");var C=A.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(A),A.appendChild(this.createOption(mxResources.get("sketch"),function(){return e},function(ba){(e=ba)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ba?
"1":null},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"})));x.appendChild(C);r.appendChild(x);m.appendChild(r);C.appendChild(this.createOption(mxResources.get("rounded"),function(){return k},function(ba){(k=ba)?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded);f.updateCellStyles({rounded:ba?"1":"0"},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"}));"1"!=urlParams.sketch&&
(A=A.cloneNode(!1),C=C.cloneNode(!1),x=x.cloneNode(!1),x.appendChild(A),x.appendChild(C),r.appendChild(x),A.appendChild(this.createOption(mxResources.get("curved"),function(){return n},function(ba){(n=ba)?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved;f.updateCellStyles({curved:ba?"1":null},f.getVerticesAndEdges(!1,!0))},null,function(ba){ba.style.width="auto"})));u.appendChild(m);a.appendChild(u);var F=["fillColor","strokeColor","fontColor","gradientColor"],K=mxUtils.bind(this,function(ba,
-qa){var I=f.getVerticesAndEdges();e.beginUpdate();try{for(var L=0;L<I.length;L++){var H=f.getCellStyle(I[L]);null!=H.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[I[L]]);for(var S=e.isEdge(I[L]),V=e.getStyle(I[L]),ea=S?f.currentEdgeStyle:f.currentVertexStyle,ka=0;ka<ba.length;ka++)if(null!=H[ba[ka]]&&H[ba[ka]]!=mxConstants.NONE||ba[ka]!=mxConstants.STYLE_FILLCOLOR&&ba[ka]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,ba[ka],ea[ba[ka]]);e.setStyle(I[L],
-V)}}finally{e.endUpdate()}}),E=mxUtils.bind(this,function(ba,qa,I){if(null!=ba)for(var L=0;L<qa.length;L++)if(null!=ba[qa[L]]&&ba[qa[L]]!=mxConstants.NONE||qa[L]!=mxConstants.STYLE_FILLCOLOR&&qa[L]!=mxConstants.STYLE_STROKECOLOR)ba[qa[L]]=I[qa[L]]}),O=mxUtils.bind(this,function(ba,qa,I,L,H){if(null!=ba){null!=I&&null!=qa.labelBackgroundColor&&(L=null!=L?L.background:null,H=null!=H?H:f,null==L&&(L=H.background),null==L&&(L=H.defaultPageBackgroundColor),qa.labelBackgroundColor=L);for(var S in ba)if(null==
-I||null!=qa[S]&&qa[S]!=mxConstants.NONE||S!=mxConstants.STYLE_FILLCOLOR&&S!=mxConstants.STYLE_STROKECOLOR)qa[S]=ba[S]}});"1"!=urlParams.sketch&&(A=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ba){ba=f.getVerticesAndEdges(!0,!0);if(0<ba.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ba),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle()})),A.setAttribute("title",mxResources.get("reset")),A.style.textOverflow=
+qa){var I=f.getVerticesAndEdges();d.beginUpdate();try{for(var L=0;L<I.length;L++){var H=f.getCellStyle(I[L]);null!=H.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[I[L]]);for(var S=d.isEdge(I[L]),V=d.getStyle(I[L]),ea=S?f.currentEdgeStyle:f.currentVertexStyle,ka=0;ka<ba.length;ka++)if(null!=H[ba[ka]]&&H[ba[ka]]!=mxConstants.NONE||ba[ka]!=mxConstants.STYLE_FILLCOLOR&&ba[ka]!=mxConstants.STYLE_STROKECOLOR)V=mxUtils.setStyle(V,ba[ka],ea[ba[ka]]);d.setStyle(I[L],
+V)}}finally{d.endUpdate()}}),E=mxUtils.bind(this,function(ba,qa,I){if(null!=ba)for(var L=0;L<qa.length;L++)if(null!=ba[qa[L]]&&ba[qa[L]]!=mxConstants.NONE||qa[L]!=mxConstants.STYLE_FILLCOLOR&&qa[L]!=mxConstants.STYLE_STROKECOLOR)ba[qa[L]]=I[qa[L]]}),O=mxUtils.bind(this,function(ba,qa,I,L,H){if(null!=ba){null!=I&&null!=qa.labelBackgroundColor&&(L=null!=L?L.background:null,H=null!=H?H:f,null==L&&(L=H.background),null==L&&(L=H.defaultPageBackgroundColor),qa.labelBackgroundColor=L);for(var S in ba)if(null==
+I||null!=qa[S]&&qa[S]!=mxConstants.NONE||S!=mxConstants.STYLE_FILLCOLOR&&S!=mxConstants.STYLE_STROKECOLOR)qa[S]=ba[S]}});"1"!=urlParams.sketch&&(A=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ba){ba=f.getVerticesAndEdges(!0,!0);if(0<ba.length){d.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ba),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{d.endUpdate()}}b.clearDefaultStyle()})),A.setAttribute("title",mxResources.get("reset")),A.style.textOverflow=
"ellipsis",A.style.maxWidth="90px",C.appendChild(A));var R=mxUtils.bind(this,function(ba,qa,I,L,H){var S=document.createElement("div");S.style.position="absolute";S.style.display="inline-block";S.style.overflow="hidden";S.style.pointerEvents="none";S.style.width="100%";S.style.height="100%";H.appendChild(S);var V=new Graph(S,null,null,f.getStylesheet());V.resetViewOnRootChange=!1;V.foldingEnabled=!1;V.gridEnabled=!1;V.autoScroll=!1;V.setTooltips(!1);V.setConnectable(!1);V.setPanning(!1);V.setEnabled(!1);
-V.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),va=qa;e.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),va=I);E(Z,F,oa);O(ba,Z,wa,L,V);O(va,Z,wa,L,V);W&&(Z=f.postProcessCellStyle(wa,Z));return Z};V.model.beginUpdate();try{var ea=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),ka=V.insertEdge(V.getDefaultParent(),null,"Connector",ea,ea,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
+V.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ua=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ua=I);E(Z,F,oa);O(ba,Z,wa,L,V);O(ua,Z,wa,L,V);W&&(Z=f.postProcessCellStyle(wa,Z));return Z};V.model.beginUpdate();try{var ea=V.insertVertex(V.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),ka=V.insertEdge(V.getDefaultParent(),null,"Connector",ea,ea,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
ka.geometry.points=[new mxPoint(32,70)];ka.geometry.offset=new mxPoint(0,8)}finally{V.model.endUpdate()}}),Q=document.createElement("div");Q.style.position="relative";a.appendChild(Q);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var P=mxUtils.bind(this,function(ba,qa,I,L,H){var S=this.format.cachedStyleEntries[H];null==S&&(S=document.createElement("div"),S.style.display="inline-block",S.style.position="relative",S.style.width="96px",S.style.height="90px",S.style.cursor=
"pointer",S.style.border="1px solid gray",S.style.borderRadius="8px",S.style.margin="2px",S.style.overflow="hidden",null!=L&&null!=L.background&&(S.style.backgroundColor=L.background),R(ba,qa,I,L,S),mxEvent.addGestureListeners(S,mxUtils.bind(this,function(V){S.style.opacity=.5}),null,mxUtils.bind(this,function(V){S.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);O(ba,f.currentVertexStyle);O(ba,f.currentEdgeStyle);O(qa,f.currentVertexStyle);
-O(I,f.currentEdgeStyle);"1"==urlParams.sketch&&(d=Editor.sketchMode);d?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";e.beginUpdate();try{var ea=F.slice(),ka;for(ka in ba)ea.push(ka);K(ea,L);var wa=new ChangePageSetup(b,null!=L?L.background:null);wa.ignoreImage=!0;e.execute(wa);e.execute(new ChangeGridColor(b,null!=
-L&&null!=L.gridColor?L.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(V){var ea=f.getCellStyle;V=f.background;var ka=f.view.gridColor;f.background=null!=L?L.background:null;f.view.gridColor=null!=L&&null!=L.gridColor?L.gridColor:g;f.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(ea.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),va=qa;e.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),va=I);E(Z,F,oa);O(ba,Z,wa,
-L);O(va,Z,wa,L);W&&(Z=this.postProcessCellStyle(wa,Z));return Z};f.refresh();f.getCellStyle=ea;f.background=V;f.view.gridColor=ka})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[H]=S));Q.appendChild(S)}),aa=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],U=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background=
+O(I,f.currentEdgeStyle);"1"==urlParams.sketch&&(e=Editor.sketchMode);e?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";d.beginUpdate();try{var ea=F.slice(),ka;for(ka in ba)ea.push(ka);K(ea,L);var wa=new ChangePageSetup(b,null!=L?L.background:null);wa.ignoreImage=!0;d.execute(wa);d.execute(new ChangeGridColor(b,null!=
+L&&null!=L.gridColor?L.gridColor:g))}finally{d.endUpdate()}})),mxEvent.addListener(S,"mouseenter",mxUtils.bind(this,function(V){var ea=f.getCellStyle;V=f.background;var ka=f.view.gridColor;f.background=null!=L?L.background:null;f.view.gridColor=null!=L&&null!=L.gridColor?L.gridColor:g;f.getCellStyle=function(wa,W){W=null!=W?W:!0;var Z=mxUtils.clone(ea.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ua=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ua=I);E(Z,F,oa);O(ba,Z,wa,
+L);O(ua,Z,wa,L);W&&(Z=this.postProcessCellStyle(wa,Z));return Z};f.refresh();f.getCellStyle=ea;f.background=V;f.view.gridColor=ka})),mxEvent.addListener(S,"mouseleave",mxUtils.bind(this,function(V){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[H]=S));Q.appendChild(S)}),aa=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var T=[],U=mxUtils.bind(this,function(){0<T.length&&(T[this.format.currentStylePage].style.background=
"#84d7ff");for(var ba=10*this.format.currentStylePage;ba<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);ba++){var qa=Editor.styles[ba];P(qa.commonStyle,qa.vertexStyle,qa.edgeStyle,qa.graph,ba)}}),fa=mxUtils.bind(this,function(ba){0<=ba&&ba<aa&&(T[this.format.currentStylePage].style.background="transparent",Q.innerHTML="",this.format.currentStylePage=ba,U())});if(1<aa){u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.position="relative";u.style.textAlign="center";
u.style.paddingTop="4px";u.style.width="210px";a.style.paddingBottom="8px";for(C=0;C<aa;C++){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(ba,qa){mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){fa(ba)}))})(C,ha);u.appendChild(ha);
T.push(ha)}a.appendChild(u);U();15>aa&&(m=function(ba){mxEvent.addListener(ba,"mouseenter",function(){ba.style.opacity="1"});mxEvent.addListener(ba,"mouseleave",function(){ba.style.opacity="0.5"})},A=document.createElement("div"),A.style.position="absolute",A.style.left="0px",A.style.top="0px",A.style.bottom="0px",A.style.width="24px",A.style.height="24px",A.style.margin="0px",A.style.cursor="pointer",A.style.opacity="0.5",A.style.backgroundRepeat="no-repeat",A.style.backgroundPosition="center center",
A.style.backgroundSize="24px 24px",A.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(A.style.filter="invert(100%)"),C=A.cloneNode(!1),C.style.backgroundImage="url("+Editor.nextImage+")",C.style.left="",C.style.right="2px",u.appendChild(A),u.appendChild(C),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentStylePage-1,aa))})),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){fa(mxUtils.mod(this.format.currentStylePage+1,
aa))})),m(A),m(C))}else U();return a};DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
-DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
-if(f.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return f.background},function(d){var k=new ChangePageSetup(b,d);k.ignoreImage=null!=d&&d!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(d){this.listener=function(){d(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=e.getElementsByTagName("span")[0];g.style.display="inline-block";
-g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(d){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(d)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";e.appendChild(g)}a.appendChild(e)}return a};
-DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(e){b.actions.get("connectionArrows").funct()},{install:function(e){this.listener=function(){e(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
-a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(e){b.actions.get("connectionPoints").funct()},{install:function(e){this.listener=function(){e(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(e){b.actions.get("guides").funct()},
-{install:function(e){this.listener=function(){e(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
-DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(d.value):parseInt(d.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));d.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,e=this.editorUi,g=e.editor.graph,d=document.createElement("input");d.style.position="absolute";d.style.textAlign="right";d.style.width="48px";d.style.marginTop="-2px";d.style.height=
-"21px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";d.style.boxSizing="border-box";d.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(d,b,this.getUnitStep(),null,null,null,this.isFloatUnit());d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;mxEvent.addListener(d,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(d.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
-mxEvent.addListener(d,"blur",b);mxEvent.addListener(d,"change",b);d.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),e.setGridColor(u));d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
-e.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};e.addListener("gridColorChanged",this.listener);e.addListener("gridEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});n.appendChild(d);n.appendChild(k);a.appendChild(n)};
+DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(e){b.actions.get("pageView").funct()},{install:function(e){this.listener=function(){e(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
+if(f.isEnabled()){var d=this.createColorOption(mxResources.get("background"),function(){return f.background},function(e){var k=new ChangePageSetup(b,e);k.ignoreImage=null!=e&&e!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(e){this.listener=function(){e(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=d.getElementsByTagName("span")[0];g.style.display="inline-block";
+g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(e){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(e)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";d.appendChild(g)}a.appendChild(d)}return a};
+DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(d){b.actions.get("connectionArrows").funct()},{install:function(d){this.listener=function(){d(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
+a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(d){b.actions.get("connectionPoints").funct()},{install:function(d){this.listener=function(){d(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(d){b.actions.get("guides").funct()},
+{install:function(d){this.listener=function(){d(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
+DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(e.value):parseInt(e.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));e.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,d=this.editorUi,g=d.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="48px";e.style.marginTop="-2px";e.style.height=
+"21px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";e.style.boxSizing="border-box";e.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(e.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
+mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),d.setGridColor(u));e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
+d.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});n.appendChild(e);n.appendChild(k);a.appendChild(n)};
DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
-DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(d){if(null==f.pageFormat||f.pageFormat.width!=d.width||f.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,f.model.execute(d)});this.addKeyHandler(e.widthInput,function(){e.set(f.pageFormat)});this.addKeyHandler(e.heightInput,
-function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
-DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function d(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
+DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var d=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(e){if(null==f.pageFormat||f.pageFormat.width!=e.width||f.pageFormat.height!=e.height)e=new ChangePageSetup(b,null,null,e),e.ignoreColor=!0,e.ignoreImage=!0,f.model.execute(e)});this.addKeyHandler(d.widthInput,function(){d.set(f.pageFormat)});this.addKeyHandler(d.heightInput,
+function(){d.set(f.pageFormat)});var g=function(){d.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
+DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function d(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function e(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
function A(c,h,q,l){mxShape.call(this);this.bounds=c;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(c,h){this.canvas=c;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 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);
+function W(){mxShape.call(this)}function Z(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ja(){mxShape.call(this)}function Ga(){mxShape.call(this)}function va(){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(c,h,q,l){mxShape.call(this);this.bounds=c;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 ja(){mxRhombus.call(this)}function sa(){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(c,h,q,l){mxShape.call(this);this.bounds=c;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(c,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(){c.ellipse(N.x-p-w,N.y-v-w,2*w,2*w);Y?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=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==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,
h,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,h,q,l){if(null!=h){var p=null;c.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?c.moveTo(w.x+q,w.y+l):null!=p&&c.lineTo(w.x+q,w.y+l));p=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){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(c,
q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,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),c.translate(-h,-q));v||this.outline||!(w&&J<p||!w&&J<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,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}c.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(c,h,q,l,p)}};b.prototype.paintTableForeground=function(c,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(c,l[p],h,q)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-b);mxUtils.extend(f,b);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(c,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,
+b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.darkOpacity=0;d.prototype.darkOpacity2=0;d.prototype.paintVertexShape=function(c,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))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=J&&(c.setFillAlpha(Math.abs(J)),c.setFillColor(0>J?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,
-v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.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",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(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
-.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
+v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};d.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",d);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(g,
+mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
+.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
h,(1-Sa)*h),c.lineTo(0,.75*h),c.close());c.end()};mxCellRenderer.registerShape("isoCube",k);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,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)c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,
-h);v||(c.moveTo(0,h),c.curveTo(0,-h/3,l,-h/3,l,h),c.lineTo(l,p-h),c.curveTo(l,p+h/3,0,p+h/3,0,p-h),c.close())};n.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(c,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))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(0,p);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),c.close(),c.fill()),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),
@@ -3596,10 +3597,10 @@ h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAS
y,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,c),new mxPoint(w+p,J)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J+p),new mxPoint(N,J),new mxPoint(w+y,J+p),new mxPoint(w+y,J+Y),new mxPoint(N,J+Y-p),new mxPoint(w,J+Y),new mxPoint(w,J+p)]):(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(N,J+p),new mxPoint(w+y,J),new mxPoint(w+y,J+Y-p),new mxPoint(N,J+Y),new mxPoint(w,J+Y-p),new mxPoint(w,J)]);N=new mxPoint(N,
c);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(c,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=c.x,J=c.y,y=c.width,Y=c.height,N=c.getCenterX();c=c.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,c),new mxPoint(w+y-p,J+Y),new mxPoint(w+p,J+Y),new mxPoint(w,c),new mxPoint(w+p,J)]);N=new mxPoint(N,
-c);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(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ja,
+c);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(ua,mxShape);ua.prototype.size=10;ua.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ua);mxUtils.extend(Ja,
mxShape);Ja.prototype.size=10;Ja.prototype.inset=2;Ja.prototype.paintBackground=function(c,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;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ja);mxUtils.extend(Ga,
-mxShape);Ga.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
-p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(c,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?(c.moveTo(q,J),c.lineTo(w,J),c.lineTo(w,J+h),c.lineTo(q,J+h),c.moveTo(q,
+mxShape);Ga.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ga);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
+p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(c,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?(c.moveTo(q,J),c.lineTo(w,J),c.lineTo(w,J+h),c.lineTo(q,J+h),c.moveTo(q,
y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,J+h),c.lineTo(0,J+h),c.lineTo(0,J),c.lineTo(q,J),c.close());c.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(c,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?(c.moveTo(q,J),c.lineTo(w,J),c.lineTo(w,J+h),c.lineTo(q,J+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,J+h),c.lineTo(0,J+h),c.lineTo(0,J),c.lineTo(q,J),c.close());c.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.paintForeground=
function(c,h,q,l,p){var v=l/2,w=p/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[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);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ha);mxUtils.extend(Ta,mxDoubleEllipse);Ta.prototype.outerStroke=!0;Ta.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4,
@@ -3619,7 +3620,7 @@ G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(c,h
.375;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,h,q,l,p){h=p*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(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",M);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=
function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
ia);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
+arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",sa);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=
function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,J=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,J);c.lineTo(h+v+w,J-w/2);c.moveTo(h+v,J);c.lineTo(h+v+w,J+w/2);c.moveTo(h+v,J);c.lineTo(h+l-v,J);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,J);c.lineTo(h+l-w-v,J-w/2);c.moveTo(h+l-v,J);c.lineTo(h+l-w-v,J+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ba);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(c,h,q,
l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.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?(c.rect(h,q,l,p),c.fill(),c.pointerEvents=
v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||J?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Y?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||N?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
@@ -3632,34 +3633,34 @@ type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{nam
{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"}]}];Fa.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Fa.prototype.strictDrawShape=function(c,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.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),ta=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=Fa.prototype;c.setDashed(Ca);Qa&&""!=Qa&&c.setDashPattern(Qa);c.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&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,ua,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ca=J=Cb,"none"==wb&&(J=0),"none"==yb&&(Ca=0),c.setGradient(wb,yb,0,0,l,p,Bb,J,Ca),
-c.begin(),la?v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma):c.moveTo(N,0),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,ua,y,N),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma),c.stroke()));
-la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,
-h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la||!pa||na||ma?!la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,
-p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&
+p)-y);(la||pa||na||ma)&&"frame"!=Y&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,ta,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),ma&&v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ca=J=Cb,"none"==wb&&(J=0),"none"==yb&&(Ca=0),c.setGradient(wb,yb,0,0,l,p,Bb,J,Ca),
+c.begin(),la?v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma):c.moveTo(N,0),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,ta,y,N),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,ta,xa,ya,Aa,y,la,pa,na,ma),c.stroke()));
+la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,
+h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la||!pa||na||ma?!la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,
+p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&
!ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,
-h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),
-v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),
-v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la||pa||na||ma?la&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,
-ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,
-h,q,l,p,w,ua,y,N,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,
-Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,
-h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,
-l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),
-v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),
-v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,
-h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,
-h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,
-w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,
-y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,
-l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ua,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,
-na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ua,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ua,y,N,ma,la),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
+h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),
+v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),
+v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):!la||pa||na||ma?la&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,
+ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,
+h,q,l,p,w,ta,y,N,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,
+Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,
+h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,
+l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):la&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),
+v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),
+v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,
+h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close(),c.fillAndStroke()):la&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,
+h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,
+w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke()):la&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,
+y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,
+l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.paintSW(c,h,q,l,p,w,Aa,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintSWInner(c,h,q,l,p,w,Aa,y,N,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,N),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,N),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),v.paintNWInner(c,h,q,l,p,w,ta,y,N),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,
+na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,ta,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,N,pa),v.paintTopInner(c,h,q,l,p,w,ta,y,N,ma,la),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,N,na),v.paintRightInner(c,h,q,l,p,w,xa,y,N,la,pa),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,
-h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ua,y,na),v.paintLeft(c,h,q,l,p,w,ua,y,la),v.lineNWInner(c,h,q,l,p,w,ua,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,
-w,Aa,y,N,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,ua,xa,ya,Aa,y,la,pa,na,ma);c.stroke()};Fa.prototype.moveNW=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,J)};Fa.prototype.moveNE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-J,0)};Fa.prototype.moveSE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-J)};Fa.prototype.moveSW=
+h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,Aa,y,ma),v.lineSWInner(c,h,q,l,p,w,Aa,y,N,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,N,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,w,Aa,y,N,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,ta,y,na),v.paintLeft(c,h,q,l,p,w,ta,y,la),v.lineNWInner(c,h,q,l,p,w,ta,y,N,la,ma),v.paintLeftInner(c,h,q,l,p,
+w,Aa,y,N,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,ta,xa,ya,Aa,y,la,pa,na,ma);c.stroke()};Fa.prototype.moveNW=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,J)};Fa.prototype.moveNE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-J,0)};Fa.prototype.moveSE=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-J)};Fa.prototype.moveSW=
function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(J,p)};Fa.prototype.paintNW=function(c,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;c.arcTo(J,J,0,0,h,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(J,0);else c.lineTo(0,0)};Fa.prototype.paintTop=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==
w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-J,0)};Fa.prototype.paintNE=function(c,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;c.arcTo(J,J,0,0,h,l,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,J);else c.lineTo(l,0)};Fa.prototype.paintRight=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p-
J)};Fa.prototype.paintLeft=function(c,h,q,l,p,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,J)};Fa.prototype.paintSE=function(c,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;c.arcTo(J,J,0,0,h,l-J,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-J,p);else c.lineTo(l,p)};Fa.prototype.paintBottom=function(c,h,q,
@@ -3721,12 +3722,12 @@ Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.proto
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(c){return[Ra(c,["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(c){return[Ra(c,["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(c){var h=[Graph.createHandle(c,["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})];c=Graph.createHandle(c,["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(c);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=
+Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);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,d.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 c=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&&(c=null==c?h:c.concat(h)))}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=rb[c];return null!=c?c(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(c,h,q,l,p){var v=c.view;l=null!=l&&0<l.length?l[0]:null;var w=c.absolutePoints,J=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,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(c.style,
"elbow","horizontal");if(null!=w&&null!=J){c=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));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
-var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];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;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
+var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};e.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];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;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return c};r.prototype.getConstraints=function(c,h,q){c=[];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);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,l));return c};ba.prototype.getConstraints=function(c,h,q){c=[];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));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3737,7 +3738,7 @@ q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));h>
mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,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*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));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));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return c};E.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,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*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(q+l)));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));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(q+l)));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));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};d.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,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*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));return c};A.prototype.getConstraints=function(c,h,q){c=[];h=Math.max(0,Math.min(q,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,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,
@@ -3757,7 +3758,7 @@ h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(
.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)];C.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)];O.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)];qa.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)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.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)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
@@ -3775,214 +3776,214 @@ function(c,h,q){c=[];var l=Math.min(q,h),p=Math.max(0,Math.min(l,l*parseFloat(mx
0),!1,null,p,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return c};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)];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,
+.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)];va.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 b(){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,
-r=d.view.translate.x,x=d.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(m-d.view.scale)&&r==d.view.translate.x&&x==d.view.translate.y&&e.actions.get(d.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?e.actions.get("smartFit").funct():d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(A){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+A.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){e.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(e);e.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=e.copyXml(),null!=m&&d.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(m){}try{mxClipboard.copy(d)}catch(m){e.handleError(m)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(r){if(null!=r){d.getModel().beginUpdate();try{e.pasteXml(r,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),m=!0)}catch(r){}m||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(A){if(null!=A){for(var C=!0,F=0;F<
-A.length&&C;F++)C=C&&d.model.isEdge(A[F]);var K=d.view.translate;F=d.view.scale;var E=K.x,O=K.y;K=null;if(1==A.length&&C){var R=d.getCellGeometry(A[0]);null!=R&&(K=R.getTerminalPoint(!0))}K=null!=K?K:d.getBoundingBoxFromGeometry(A,C);null!=K&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/F-E)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-O)),d.cellsMoved(A,C-K.x,F-K.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(A){if(null!=A){d.getModel().beginUpdate();try{r(e.pasteXml(A,!0))}finally{d.getModel().endUpdate()}}else x()}),m=!0)}catch(A){}m||x()}});this.addAction("copySize",function(){var m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.getModel().isVertex(m)&&(m=d.getCellGeometry(m),null!=m&&(e.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedSize){d.getModel().beginUpdate();try{for(var m=d.getResizableCells(d.getSelectionCells()),r=0;r<m.length;r++)if(d.getModel().isVertex(m[r])){var x=d.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=e.copiedSize.width,x.height=e.copiedSize.height,d.getModel().setGeometry(m[r],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&
-null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,K){var E=A.getValue(F);K=F.cloneValue(K);K.removeAttribute("placeholders");null==E||isNaN(E.nodeType)||K.setAttribute("placeholders",E.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||K.setAttribute("label",d.convertValueToString(F));A.setValue(F,K)}m=null!=r?r:m;var A=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){A.beginUpdate();
-try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)x(A.getRoot(),e.copiedValue);else for(r=0;r<C.length;r++)x(C[r],e.copiedValue)}finally{A.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
-"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(m){e.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=e.getSelectionState();if(null!=m.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),d.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var m=e.getSelectionState();if(0<m.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,m.cells),d.setCellStyles("colspan",null,m.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
-this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.addSelectionCells(d.getEdges(m))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(d.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);d.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);d.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);d.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);d.setCellStyles(mxConstants.STYLE_EDITABLE,
-x,m);d.setCellStyles("connectable",x,m)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},
-null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){d.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){d.orderCells(!0,null,!0)});this.addAction("group",function(){if(d.isEnabled()){var m=mxUtils.sortCells(d.getSelectionCells(),!0);1!=m.length||d.isTable(m[0])||d.isTableRow(m[0])?
-(m=d.getCellsForGroup(m),1<m.length&&d.setSelectionCell(d.groupCells(null,0,m))):d.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()){var m=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var r=d.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)d.model.contains(m[x])&&(0==d.model.getChildCount(m[x])&&d.model.isVertex(m[x])&&d.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{d.model.endUpdate()}0<
-r.length&&d.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var m=d.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)d.isTableRow(m[x])||d.isTableCell(m[x])||r.push(m[x]);d.removeCellsFromParent(r)}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=d.getSelectionCell()||d.getModel().getRoot();e.showDataDialog(m)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(e,mxResources.get("editTooltip")+":",r,function(A){d.setTooltipForCell(m,
-A)});e.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=d.getLinkForCell(d.getSelectionCell());null!=m&&d.openLink(m)});this.addAction("editLink...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r=d.getLinkForCell(m)||"";e.showLinkDialog(r,mxResources.get("apply"),function(x,A,C){x=mxUtils.trim(x);d.setLinkForCell(m,0<x.length?x:null);d.setAttributeForCell(m,"linkTarget",C)},!0,d.getLinkTargetForCell(m))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),e.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var A=null,C=d.getLinkTitle(m);null!=r&&0<r.length&&(A=r[0].iconUrl,
-C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=A?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+A:"spacing=10;"));r.vertex=!0;A=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=A.x;r.geometry.y=A.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r,
-!0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var A=m.getElementsByTagName("a"),
-C=0;C<A.length&&null==r;C++)A[C].textContent==m.textContent&&(r=A[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(K){d.cellEditor.restoreSelection(F);null!=K&&d.insertLink(K)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate();
-try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),
-x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var A=mxUtils.getValue(state.style,"html","0");if("1"==A&&null==m){var C=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,C);d.setCellStyles("html",m,[r[x]])}else"0"==A&&"1"==m&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(C)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
-m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*
-Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-
-10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/
-d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
-300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
-function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});
-n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});
-n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());
-e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+
-"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,A){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?d.updateLabelElements(C,function(K){K.style.fontWeight=null;"B"==K.nodeName&&d.replaceElement(K)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(C,function(K){K.style.fontStyle=null;"I"==K.nodeName&&d.replaceElement(K)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(C,function(K){K.style.textDecoration=null;"U"==K.nodeName&&d.replaceElement(K)});for(var F=0;F<C.length;F++)0==d.model.getChildCount(C[F])&&d.autoSizeCell(C[F],
-!1)}finally{d.getModel().endUpdate()}}},null,null,A)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
-function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
-!0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();
-try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
-this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(m[0]),
-x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,x);d.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=d.view.getState(d.getSelectionCell()),r="1";null!=m&&null!=d.getFoldingImage(m)&&(r="0");d.setCellStyles("collapsible",r);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var m=d.getEditableCells(d.getSelectionCells());if(null!=m&&0<m.length){var r=d.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&d.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&e.setDefaultStyle(d.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&e.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=d.getSelectionCell();if(null!=m&&d.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=d.view.translate,A=d.view.scale,C=x.x;x=x.y;m=d.getModel().getParent(m);for(var F=d.getCellGeometry(m);d.getModel().isVertex(m)&&null!=F;)C+=F.x,x+=F.y,m=
-d.getModel().getParent(m),F=d.getCellGeometry(m);C=Math.round(d.snap(d.popupMenuHandler.triggerX/A-C));A=Math.round(d.snap(d.popupMenuHandler.triggerY/A-x));r.addPointAt(r.state,C,A)}}});this.addAction("removeWaypoint",function(){var m=e.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var A=
-0;A<x.length;A++){var C=x[A];if(d.getModel().isEdge(C)){var F=d.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(C,F))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
-mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=d.getView().getState(d.getSelectionCell()),
-x="",A=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,A=r.style[mxConstants.STYLE_CLIP_PATH]||A);var C=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,K,E,O,R,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(F,K,E);else{var P=d.getSelectionCells();if(null!=F&&(0<F.length||0<P.length)){var aa=null;d.getModel().beginUpdate();try{if(0==P.length){P=[d.insertVertex(d.getDefaultParent(),null,"",0,0,K,E,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var T=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=T.x;P[0].geometry.y=T.y;null!=O&&f(P[0],O,R,Q,d);aa=P;d.fireEvent(new mxEventObject("cellsInserted","cells",aa))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,P);var U=d.getCurrentCellStyle(P[0]);"image"!=U[mxConstants.STYLE_SHAPE]&&"label"!=U[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==d.getSelectionCount()&&
-null!=K&&null!=E){var fa=P[0],ha=d.getModel().getGeometry(fa);null!=ha&&(ha=ha.clone(),ha.width=K,ha.height=E,d.getModel().setGeometry(fa,ha));null!=O?f(fa,O,R,Q,d):d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{d.getModel().endUpdate()}null!=aa&&(d.setSelectionCells(aa),d.scrollCellToVisible(aa[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,A)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
-null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],A=r[mxConstants.STYLE_SHAPE];x&&"image"==A&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(C,F,K){f(m,C,F,K,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("layers"))})),
-this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
-function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){e.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,
-m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Actions.prototype.init=function(){function a(m){e.escape();m=e.deleteCells(e.getDeletableCells(e.getSelectionCells()),m);null!=m&&e.setSelectionCells(m)}function b(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{for(var m=e.getSelectionCells(),r=0;r<m.length;r++)e.cellLabelChanged(m[r],"")}finally{e.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 d=this.editorUi,g=d.editor,e=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&e.isEnabled()};this.addAction("new...",function(){e.openLink(d.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("smartFit",function(){e.popupMenuHandler.hideMenu();var m=e.view.scale,
+r=e.view.translate.x,x=e.view.translate.y;d.actions.get("resetView").funct();1E-5>Math.abs(m-e.view.scale)&&r==e.view.translate.x&&x==e.view.translate.y&&d.actions.get(e.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){e.isEnabled()&&(e.isSelectionEmpty()?d.actions.get("smartFit").funct():e.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(A){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+A.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){d.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(d);d.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){d.showDialog((new PageSetupDialog(d)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){d.showDialog((new PrintDialog(d)).container,300,180,!0,!0)},null,"sprite-print",
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=d.copyXml(),null!=m&&e.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(m){}try{mxClipboard.copy(e)}catch(m){d.handleError(m)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(r){if(null!=r){e.getModel().beginUpdate();try{d.pasteXml(r,!0)}finally{e.getModel().endUpdate()}}else mxClipboard.paste(e)}),m=!0)}catch(r){}m||mxClipboard.paste(e)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(A){if(null!=A){for(var C=!0,F=0;F<
+A.length&&C;F++)C=C&&e.model.isEdge(A[F]);var K=e.view.translate;F=e.view.scale;var E=K.x,O=K.y;K=null;if(1==A.length&&C){var R=e.getCellGeometry(A[0]);null!=R&&(K=R.getTerminalPoint(!0))}K=null!=K?K:e.getBoundingBoxFromGeometry(A,C);null!=K&&(C=Math.round(e.snap(e.popupMenuHandler.triggerX/F-E)),F=Math.round(e.snap(e.popupMenuHandler.triggerY/F-O)),e.cellsMoved(A,C-K.x,F-K.y))}}function x(){e.getModel().beginUpdate();try{r(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&
+!e.isCellLocked(e.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(A){if(null!=A){e.getModel().beginUpdate();try{r(d.pasteXml(A,!0))}finally{e.getModel().endUpdate()}}else x()}),m=!0)}catch(A){}m||x()}});this.addAction("copySize",function(){var m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.getModel().isVertex(m)&&(m=e.getCellGeometry(m),null!=m&&(d.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedSize){e.getModel().beginUpdate();try{for(var m=e.getResizableCells(e.getSelectionCells()),r=0;r<m.length;r++)if(e.getModel().isVertex(m[r])){var x=e.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=d.copiedSize.width,x.height=d.copiedSize.height,e.getModel().setGeometry(m[r],x))}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=e.getSelectionCell()||e.getModel().getRoot();e.isEnabled()&&
+null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(d.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,K){var E=A.getValue(F);K=F.cloneValue(K);K.removeAttribute("placeholders");null==E||isNaN(E.nodeType)||K.setAttribute("placeholders",E.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||K.setAttribute("label",e.convertValueToString(F));A.setValue(F,K)}m=null!=r?r:m;var A=e.getModel();if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedValue){A.beginUpdate();
+try{var C=e.getEditableCells(e.getSelectionCells());if(0==C.length)x(A.getRoot(),d.copiedValue);else for(r=0;r<C.length;r++)x(C[r],d.copiedValue)}finally{A.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
+"+Delete");this.addAction("duplicate",function(){try{e.setSelectionCells(e.duplicateCells()),e.scrollCellToVisible(e.getSelectionCell())}catch(m){d.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=d.getSelectionState();if(null!=m.mergeCell){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),e.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{e.getModel().endUpdate()}}}));this.put("unmergeCells",
+new Action(mxResources.get("unmerge"),function(){var m=d.getSelectionState();if(0<m.cells.length){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",null,m.cells),e.setCellStyles("colspan",null,m.cells)}finally{e.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;e.turnShapes(e.getResizableCells(e.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.addSelectionCells(e.getEdges(m))}));this.addAction("selectVertices",function(){e.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){e.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){e.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){e.clearSelection()},
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(e.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;e.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);e.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);e.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);e.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);e.setCellStyles(mxConstants.STYLE_EDITABLE,
+x,m);e.setCellStyles("connectable",x,m)}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){e.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){e.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){e.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){e.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){e.foldCells(!1)},
+null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){e.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){e.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){e.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){e.orderCells(!0,null,!0)});this.addAction("group",function(){if(e.isEnabled()){var m=mxUtils.sortCells(e.getSelectionCells(),!0);1!=m.length||e.isTable(m[0])||e.isTableRow(m[0])?
+(m=e.getCellsForGroup(m),1<m.length&&e.setSelectionCell(e.groupCells(null,0,m))):e.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(e.isEnabled()){var m=e.getEditableCells(e.getSelectionCells());e.model.beginUpdate();try{var r=e.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)e.model.contains(m[x])&&(0==e.model.getChildCount(m[x])&&e.model.isVertex(m[x])&&e.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{e.model.endUpdate()}0<
+r.length&&e.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(e.isEnabled()){var m=e.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)e.isTableRow(m[x])||e.isTableCell(m[x])||r.push(m[x]);e.removeCellsFromParent(r)}}});this.addAction("edit",function(){e.isEnabled()&&e.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=e.getSelectionCell()||e.getModel().getRoot();d.showDataDialog(m)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(d,mxResources.get("editTooltip")+":",r,function(A){e.setTooltipForCell(m,
+A)});d.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=e.getLinkForCell(e.getSelectionCell());null!=m&&e.openLink(m)});this.addAction("editLink...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r=e.getLinkForCell(m)||"";d.showLinkDialog(r,mxResources.get("apply"),function(x,A,C){x=mxUtils.trim(x);e.setLinkForCell(m,0<x.length?x:null);e.setAttributeForCell(m,"linkTarget",C)},!0,e.getLinkTargetForCell(m))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(e.clearSelection(),d.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var A=null,C=e.getLinkTitle(m);null!=r&&0<r.length&&(A=r[0].iconUrl,
+C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=A?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+A:"spacing=10;"));r.vertex=!0;A=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([r],!0));r.geometry.x=A.x;r.geometry.y=A.y;e.setAttributeForCell(r,"linkTarget",x);e.setLinkForCell(r,m);e.cellSizeUpdated(r,
+!0);e.getModel().beginUpdate();try{r=e.addCell(r),e.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{e.getModel().endUpdate()}e.setSelectionCell(r);e.scrollCellToVisible(e.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(e.isEnabled())if(e.cellEditor.isContentEditing()){var m=e.getSelectedElement(),r=e.getParentByName(m,"A",e.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var A=m.getElementsByTagName("a"),
+C=0;C<A.length&&null==r;C++)A[C].textContent==m.textContent&&(r=A[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",e.selectNode(r));var F=e.cellEditor.saveSelection();d.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(K){e.cellEditor.restoreSelection(F);null!=K&&e.insertLink(K)}))}else e.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=e.getSelectionCells();if(null!=m){e.getModel().beginUpdate();
+try{for(var r=0;r<m.length;r++){var x=m[r];0<e.getModel().getChildCount(x)?e.updateGroupBounds([x],0,!0):e.updateCellSize(x)}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){e.snapCellsToGrid(e.getSelectionCells(),e.gridSize)});this.addAction("formattedText",function(){e.stopEditing();var m=e.getCommonStyle(e.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";e.getModel().beginUpdate();try{for(var r=e.getEditableCells(e.getSelectionCells()),
+x=0;x<r.length;x++)if(state=e.getView().getState(r[x]),null!=state){var A=mxUtils.getValue(state.style,"html","0");if("1"==A&&null==m){var C=e.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=e.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);e.cellLabelChanged(state.cell,C);e.setCellStyles("html",m,[r[x]])}else"0"==A&&"1"==m&&(C=mxUtils.htmlEntities(e.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),e.cellLabelChanged(state.cell,e.sanitizeHtml(C)),e.setCellStyles("html",m,[r[x]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{e.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=e.getView().getState(e.getSelectionCell()),r="wrap";e.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);e.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+r)});this.addAction("rotation",function(){var m="0",r=e.getView().getState(e.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(d,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&e.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){e.zoomTo(1);d.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(m){e.isFastZoomEnabled()?e.lazyZoom(!0,!0,d.buttonZoomDelay):e.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){e.isFastZoomEnabled()?e.lazyZoom(!1,!0,d.buttonZoomDelay):e.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=e.isSelectionEmpty()?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),r=e.view.translate,x=e.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
+m.height/=x;null!=e.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,e.backgroundImage.width,e.backgroundImage.height)));0==m.width||0==m.height?(e.zoomTo(1),d.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),e.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*
+Math.min((e.container.clientWidth-10)/m.width/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=m.y*e.view.scale-1,e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*Math.min((e.container.clientWidth-
+10)/(2*m.width)/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=Math.min(m.y,(e.container.scrollHeight-e.container.clientHeight)/2),e.container.scrollLeft=Math.min(m.x,(e.container.scrollWidth-e.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();e.zoomTo(Math.floor(20*(e.container.clientWidth-10)/e.pageFormat.width/
+e.pageScale)/20);if(mxUtils.hasScrollbars(e.container)){var m=e.getPagePadding();e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&e.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
+300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(d,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,e.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
+function(){e.setGridEnabled(!e.isGridEnabled());e.defaultGridEnabled=e.isGridEnabled();d.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){e.graphHandler.guidesEnabled=!e.graphHandler.guidesEnabled;d.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.graphHandler.guidesEnabled});
+n.setEnabled(!1);n=this.addAction("tooltips",function(){e.tooltipHandler.setEnabled(!e.tooltipHandler.isEnabled());d.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!e.foldingEnabled;e.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.foldingEnabled});
+n.isEnabled=k;n=this.addAction("scrollbars",function(){d.setScrollbars(!d.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){d.setPageVisible(!e.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return e.pageVisible});n=this.addAction("connectionArrows",function(){e.connectionArrowsEnabled=!e.connectionArrowsEnabled;d.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){e.setConnectable(!e.connectionHandler.isEnabled());d.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){e.connectionHandler.setCreateTarget(!e.connectionHandler.isCreateTarget());
+d.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);e.openLink(RESOURCES_PATH+
+"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(d.showDialog((new AboutDialog(d)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,A){return this.addAction(m,function(){if(null!=x&&e.cellEditor.isContentEditing())x();else{e.stopEditing(!1);e.getModel().beginUpdate();try{var C=e.getEditableCells(e.getSelectionCells());e.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?e.updateLabelElements(C,function(K){K.style.fontWeight=null;"B"==K.nodeName&&e.replaceElement(K)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?e.updateLabelElements(C,function(K){K.style.fontStyle=null;"I"==K.nodeName&&e.replaceElement(K)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.updateLabelElements(C,function(K){K.style.textDecoration=null;"U"==K.nodeName&&e.replaceElement(K)});for(var F=0;F<C.length;F++)0==e.model.getChildCount(C[F])&&e.autoSizeCell(C[F],
+!1)}finally{e.getModel().endUpdate()}}},null,null,A)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){d.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+function(){d.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){d.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){d.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){d.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+!0)});this.addAction("shadow",function(){d.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,null),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dashed",function(){e.getModel().beginUpdate();
+try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dotted",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),d.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("sharp",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});
+this.addAction("rounded",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!e.isSelectionEmpty()&&e.isEnabled()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(m[0]),
+x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";e.setCellStyles(mxConstants.STYLE_ROUNDED,x);e.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}}});this.addAction("curved",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=e.view.getState(e.getSelectionCell()),r="1";null!=m&&null!=e.getFoldingImage(m)&&(r="0");e.setCellStyles("collapsible",r);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",e.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var m=e.getEditableCells(e.getSelectionCells());if(null!=m&&0<m.length){var r=e.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&e.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){e.isEnabled()&&!e.isSelectionEmpty()&&d.setDefaultStyle(e.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){e.isEnabled()&&d.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=e.getSelectionCell();if(null!=m&&e.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=e.view.translate,A=e.view.scale,C=x.x;x=x.y;m=e.getModel().getParent(m);for(var F=e.getCellGeometry(m);e.getModel().isVertex(m)&&null!=F;)C+=F.x,x+=F.y,m=
+e.getModel().getParent(m),F=e.getCellGeometry(m);C=Math.round(e.snap(e.popupMenuHandler.triggerX/A-C));A=Math.round(e.snap(e.popupMenuHandler.triggerY/A-x));r.addPointAt(r.state,C,A)}}});this.addAction("removeWaypoint",function(){var m=d.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=e.getSelectionCells();if(null!=x){x=e.getEditableCells(e.addAllEdges(x));e.getModel().beginUpdate();try{for(var A=
+0;A<x.length;A++){var C=x[A];if(e.getModel().isEdge(C)){var F=e.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(e.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),e.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,e.getModel().setGeometry(C,F))}}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
+mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=e.getView().getState(e.getSelectionCell()),
+x="",A=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,A=r.style[mxConstants.STYLE_CLIP_PATH]||A);var C=e.cellEditor.saveSelection();d.showImageDialog(m,x,function(F,K,E,O,R,Q){if(e.cellEditor.isContentEditing())e.cellEditor.restoreSelection(C),e.insertImage(F,K,E);else{var P=e.getSelectionCells();if(null!=F&&(0<F.length||0<P.length)){var aa=null;e.getModel().beginUpdate();try{if(0==P.length){P=[e.insertVertex(e.getDefaultParent(),null,"",0,0,K,E,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var T=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=T.x;P[0].geometry.y=T.y;null!=O&&f(P[0],O,R,Q,e);aa=P;e.fireEvent(new mxEventObject("cellsInserted","cells",aa))}e.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,P);var U=e.getCurrentCellStyle(P[0]);"image"!=U[mxConstants.STYLE_SHAPE]&&"label"!=U[mxConstants.STYLE_SHAPE]?e.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==F.length&&e.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==e.getSelectionCount()&&
+null!=K&&null!=E){var fa=P[0],ha=e.getModel().getGeometry(fa);null!=ha&&(ha=ha.clone(),ha.width=K,ha.height=E,e.getModel().setGeometry(fa,ha));null!=O?f(fa,O,R,Q,e):e.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{e.getModel().endUpdate()}null!=aa&&(e.setSelectionCells(aa),e.scrollCellToVisible(aa[0]))}}},e.cellEditor.isContentEditing(),!e.cellEditor.isContentEditing(),!0,A)}}).isEnabled=k;this.addAction("crop...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
+null!=m){var r=e.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],A=r[mxConstants.STYLE_SHAPE];x&&"image"==A&&(r=new CropImageDialog(d,x,r[mxConstants.STYLE_CLIP_PATH],function(C,F,K){f(m,C,F,K,e)}),d.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("layers"))})),
+this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
+function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),
+this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(d,
+m);d.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,d,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var e=mxResources.get(a)+"..."}else e=mxResources.get(a);return this.put(a,new Action(e,b,f,d,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,f,d,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras help".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");
-Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,g){for(var d=mxUtils.bind(this,function(n){this.styleChange(e,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
-function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)d(this.defaultFonts[k]);e.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)d(this.customFonts[k]);e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);e.addSeparator(g)}this.promptChange(e,
-mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(e,g){function d(k,n){return e.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
-n+">"))}),g)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML=
-'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(e,g){var d=
-[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,A){return x-A}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var A=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<A.length;C++)if("3"==A[C].getAttribute("size")){A[C].removeAttribute("size");A[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
-"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(e,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<d.length;u++)n(d[u]);e.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(d,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);e.addSeparator(g)}var r=
-null;this.promptChange(e,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
-!1)},g);e.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(e,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(e,g){var d=1<this.editorUi.getSelectionState().vertices.length;e.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,d);e.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,d);e.addItem(mxResources.get("rightAlign"),
-null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,d);e.addSeparator(g);e.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,d);e.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,d);e.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,d);this.addMenuItems(e,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("horizontal"),
-null,function(){b.distributeCells(!0)},g);e.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(e,g){var d=b.view.getState(b.getSelectionCell());null!=d&&(d=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE),"arrow"!=d&&(this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
-this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,
-"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
-this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d&&this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
-this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),e.addSeparator(g),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(e,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
-mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(e,g){var d=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
-m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});e.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
-null:u)},!0)}),g);e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);e.addSeparator(g);e.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
-(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
-g);e.addSeparator(g);e.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);d(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);e.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
-this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["toFront","toBack","bringForward",
-"sendBackward","-"],g);this.addSubmenu("direction",e,g);this.addMenuItems(e,["turn","-"],g);this.addSubmenu("align",e,g);this.addSubmenu("distribute",e,g);e.addSeparator(g);this.addSubmenu("navigation",e,g);this.addSubmenu("insert",e,g);this.addSubmenu("layout",e,g);this.addMenuItems(e,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["insertLink","insertImage"],g)})));this.put("view",
-new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
-g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
-"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,f)};
-Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
+Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(d,g){for(var e=mxUtils.bind(this,function(n){this.styleChange(d,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
+function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)e(this.defaultFonts[k]);d.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)e(this.customFonts[k]);d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);d.addSeparator(g)}this.promptChange(d,
+mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(d,g){function e(k,n){return d.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
+n+">"))}),g)}e(mxResources.get("normal"),"p");e("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";e("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";e("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";e("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";e("","h5").firstChild.nextSibling.innerHTML=
+'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";e("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";e("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";e("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(d,g){var e=
+[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(e,this.defaultFontSize)&&(e.push(this.defaultFontSize),e.sort(function(x,A){return x-A}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var A=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<A.length;C++)if("3"==A[C].getAttribute("size")){A[C].removeAttribute("size");A[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
+"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(d,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<e.length;u++)n(e[u]);d.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(e,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);d.addSeparator(g)}var r=
+null;this.promptChange(d,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
+!1)},g);d.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(d,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(d,g){var e=1<this.editorUi.getSelectionState().vertices.length;d.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,e);d.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,e);d.addItem(mxResources.get("rightAlign"),
+null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,e);d.addSeparator(g);d.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,e);d.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,e);d.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,e);this.addMenuItems(d,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("horizontal"),
+null,function(){b.distributeCells(!0)},g);d.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(d,g){var e=b.view.getState(b.getSelectionCell());null!=e&&(e=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE),"arrow"!=e&&(this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
+this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,
+"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
+this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e&&this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
+this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),d.addSeparator(g),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(d,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(d,g){var e=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
+m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});d.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
+null:u)},!0)}),g);d.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);d.addSeparator(g);d.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
+(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
+g);d.addSeparator(g);d.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);e(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);d.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
+this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["toFront","toBack","bringForward",
+"sendBackward","-"],g);this.addSubmenu("direction",d,g);this.addMenuItems(d,["turn","-"],g);this.addSubmenu("align",d,g);this.addSubmenu("distribute",d,g);d.addSeparator(g);this.addSubmenu("navigation",d,g);this.addSubmenu("insert",d,g);this.addSubmenu("layout",d,g);this.addMenuItems(d,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["insertLink","insertImage"],g)})));this.put("view",
+new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(d,g){null!=this.editorUi.format&&this.addMenuItems(d,["formatPanel"],g);this.addMenuItems(d,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(d,
+g){this.addMenuItems(d,["resetView","-"],g);for(var e=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<e.length;k++)(function(n){d.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(e[k]);this.addMenuItems(d,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,
+"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,d){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(d||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var d=this.get(a);null!=d&&(b.showDisabled||d.isEnabled())&&this.get(a).execute(b,f)};
+Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,d=f.getSelectionCell(),g=f.getCurrentCellStyle(d);1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var e=f.isTable(d)||f.isTableRow(d)||f.isTableCell(d),k=f.isStack(d)||f.isStackChild(d),n=e,u=e;k&&(g=f.isStack(d)?g:f.getCellStyle(f.model.getParent(d)),u="0"==g.horizontalStack,n=!u);null!=b||!e&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,A,C){r=C||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,A||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,A||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
-x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
-null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{k?f.deleteLane(e):f.deleteTableColumn(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableRow(e,
-!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
-f.deleteLane(e):f.deleteTableRow(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(C){n=d.getParentByName(mxEvent.getSource(C),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var K=mxEvent.isMouseEvent(C)?2:4,E=x,O=Math.min(20,k.sectionRowIndex+K);K=Math.min(20,n.cellIndex+K);for(var R=E.rows.length;R<O;R++)for(var Q=E.insertRow(R),P=0;P<E.rows[0].cells.length;P++)Q.insertCell(-1);for(R=0;R<E.rows.length;R++)for(Q=E.rows[R],P=Q.cells.length;P<K;P++)Q.insertCell(-1);A.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
-1);for(E=0;E<x.rows.length;E++)for(O=x.rows[E],K=0;K<O.cells.length;K++)R=O.cells[K],E==k.sectionRowIndex&&K==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=E<=k.sectionRowIndex&&K<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(C,F,K){var E=this.editorUi.editor.graph;C=E.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=E.cellEditor.textarea){E.getParentByName(C,"TR");var O=E.cellEditor.textarea.getElementsByTagName("table");
-C=[];for(var R=0;R<O.length;R++)C.push(O[R]);E.container.focus();R=E.pasteHtmlAtCaret;O=["<table>"];for(var Q=0;Q<F;Q++){O.push("<tr>");for(var P=0;P<K;P++)O.push("<td><br></td>");O.push("</tr>")}O.push("</table>");F=O.join("");R.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=C[R-1]){E.selectNode(F[R].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
+x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(m){this.editorUi.handleError(m)}}),
+null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=d)try{k?f.deleteLane(d):f.deleteTableColumn(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableRow(d,
+!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
+f.deleteLane(d):f.deleteTableRow(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
+Menus.prototype.addInsertTableItem=function(a,b,f,d){function g(C){n=e.getParentByName(mxEvent.getSource(C),"TD");var F=!1;if(null!=n){k=e.getParentByName(n,"TR");var K=mxEvent.isMouseEvent(C)?2:4,E=x,O=Math.min(20,k.sectionRowIndex+K);K=Math.min(20,n.cellIndex+K);for(var R=E.rows.length;R<O;R++)for(var Q=E.insertRow(R),P=0;P<E.rows[0].cells.length;P++)Q.insertCell(-1);for(R=0;R<E.rows.length;R++)for(Q=E.rows[R],P=Q.cells.length;P<K;P++)Q.insertCell(-1);A.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
+1);for(E=0;E<x.rows.length;E++)for(O=x.rows[E],K=0;K<O.cells.length;K++)R=O.cells[K],E==k.sectionRowIndex&&K==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=E<=k.sectionRowIndex&&K<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return F}d=null!=d?d:!0;b=null!=b?b:mxUtils.bind(this,function(C,F,K){var E=this.editorUi.editor.graph;C=E.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=E.cellEditor.textarea){E.getParentByName(C,"TR");var O=E.cellEditor.textarea.getElementsByTagName("table");
+C=[];for(var R=0;R<O.length;R++)C.push(O[R]);E.container.focus();R=E.pasteHtmlAtCaret;O=["<table>"];for(var Q=0;Q<F;Q++){O.push("<tr>");for(var P=0;P<K;P++)O.push("<td><br></td>");O.push("</tr>")}O.push("</table>");F=O.join("");R.call(E,F);F=E.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(R=F.length-1;0<=R;R--)if(0==R||F[R]!=C[R-1]){E.selectNode(F[R].rows[0].cells[0]);break}}});var e=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";a.firstChild.innerHTML="";var u=document.createElement("input");u.setAttribute("id","geTitleOption");u.setAttribute("type","checkbox");f=document.createElement("label");mxUtils.write(f,mxResources.get("title"));f.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(f,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(u,null,null,
-mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));e&&(a.firstChild.appendChild(u),
+mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));d&&(a.firstChild.appendChild(u),
a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(C,F){var K=document.createElement("table");K.setAttribute("border","1");K.style.borderCollapse="collapse";K.style.borderStyle="solid";K.setAttribute("cellPadding","8");for(var E=0;E<C;E++)for(var O=K.insertRow(E),R=0;R<F;R++)O.insertCell(-1);return K}(5,5);a.firstChild.appendChild(x);var A=document.createElement("div");A.style.padding=
"4px";A.innerHTML="1x1";a.firstChild.appendChild(A);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var F=g(C);null!=n&&null!=k&&F&&(b(C,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,f,e,g,d,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var A=m[x];if(u.getModel().isEdge(A)){if(k){var C=u.getCellGeometry(A);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(A,C))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],e[F],[A]);r.push(A)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",e,"cells",r))}finally{u.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
-Menus.prototype.styleChange=function(a,b,f,e,g,d,k,n,u){var m=this.createStyleChangeFunction(f,e);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),d,g);u&&this.showIconOnly(a);return a};
-Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var e=this.editorUi.editor.graph;e.stopEditing(!1);e.getModel().beginUpdate();try{for(var g=e.getEditableCells(e.getSelectionCells()),d=!1,k=0;k<a.length;k++)if(e.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&e.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])d=!0;if(d)for(d=0;d<g.length;d++)0==e.model.getChildCount(g[d])&&
-e.autoSizeCell(g[d],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{e.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,f,e,g,d,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=e,A=r.getView().getState(r.getSelectionCell());null!=A&&(x=A.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(F){if(null!=F&&0<F.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,F)}finally{r.getModel().endUpdate()}}null!=n&&n(F)}}),mxResources.get("enterValue")+
-(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),d,u,k)};
-Menus.prototype.pickColor=function(a,b,f){var e=this.editorUi,g=e.editor.graph,d=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
-backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&e.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,d,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
-(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,d,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
-Menus.prototype.addMenuItem=function(a,b,f,e,g,d){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(d||k.label,null,function(n){k.funct(e,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
-Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,e,g){for(var d=0;d<b.length;d++)"-"==b[d]?a.addSeparator(f):this.addMenuItem(a,b[d],f,e,null!=g?g[d]:null)};
+Menus.prototype.edgeStyleChange=function(a,b,f,d,g,e,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var A=m[x];if(u.getModel().isEdge(A)){if(k){var C=u.getCellGeometry(A);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(A,C))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],d[F],[A]);r.push(A)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",d,"cells",r))}finally{u.getModel().endUpdate()}}),e,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
+Menus.prototype.styleChange=function(a,b,f,d,g,e,k,n,u){var m=this.createStyleChangeFunction(f,d);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),e,g);u&&this.showIconOnly(a);return a};
+Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var d=this.editorUi.editor.graph;d.stopEditing(!1);d.getModel().beginUpdate();try{for(var g=d.getEditableCells(d.getSelectionCells()),e=!1,k=0;k<a.length;k++)if(d.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&d.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])e=!0;if(e)for(e=0;e<g.length;e++)0==d.model.getChildCount(g[e])&&
+d.autoSizeCell(g[e],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{d.getModel().endUpdate()}})};
+Menus.prototype.promptChange=function(a,b,f,d,g,e,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=d,A=r.getView().getState(r.getSelectionCell());null!=A&&(x=A.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(F){if(null!=F&&0<F.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,F)}finally{r.getModel().endUpdate()}}null!=n&&n(F)}}),mxResources.get("enterValue")+
+(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),e,u,k)};
+Menus.prototype.pickColor=function(a,b,f){var d=this.editorUi,g=d.editor.graph,e=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
+backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&d.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,e,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
+(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,e,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
+Menus.prototype.addMenuItem=function(a,b,f,d,g,e){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(e||k.label,null,function(n){k.funct(d,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
+Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,d,g){for(var e=0;e<b.length;e++)"-"==b[e]?a.addSeparator(f):this.addMenuItem(a,b[e],f,d,null!=g?g[e]:null)};
Menus.prototype.createPopupMenu=function(a,b,f){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,b,f);this.addPopupMenuEditItems(a,b,f);this.addPopupMenuStyleItems(a,b,f);this.addPopupMenuArrangeItems(a,b,f);this.addPopupMenuCellItems(a,b,f);this.addPopupMenuSelectionItems(a,b,f)};Menus.prototype.addPopupMenuHistoryItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,f)};
Menus.prototype.addPopupMenuEditItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,f):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,f)};Menus.prototype.addPopupMenuStyleItems=function(a,b,f){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,f):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,f)};
-Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var e=this.editorUi.editor.graph;0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<e.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==e.getSelectionCount()&&!e.getModel().isEdge(b)&&!e.isSwimlane(b)&&0<e.getModel().getChildCount(b)&&e.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
+Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var d=this.editorUi.editor.graph;0<d.getEditableCells(d.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==d.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<d.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==d.getSelectionCount()&&!d.getModel().isEdge(b)&&!d.isSwimlane(b)&&0<d.getModel().getChildCount(b)&&d.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
null,f)};
-Menus.prototype.addPopupMenuCellItems=function(a,b,f){var e=this.editorUi.editor.graph,g=e.view.getState(b);a.addSeparator();if(null!=g){var d=!1;1==e.getSelectionCount()&&e.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
-2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=d,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(b);d=null!=g&&null!=g.points&&0<g.points.length}1==e.getSelectionCount()&&
-(d||e.getModel().isVertex(b)&&0<e.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==e.getSelectionCount()&&e.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
-Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",e,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
-"editConnectionPoints",e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
-Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,e=0;e<f.length;e++)mxUtils.bind(this,function(g){var d=b.addMenu(mxResources.get(f[e]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,d)})(this.get(f[e]));return b};
+Menus.prototype.addPopupMenuCellItems=function(a,b,f){var d=this.editorUi.editor.graph,g=d.view.getState(b);a.addSeparator();if(null!=g){var e=!1;1==d.getSelectionCount()&&d.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(d.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=d.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
+2<g.bends.length&&(e=g.getHandleForEvent(d.updateMouseEvent(new mxMouseEvent(f))),0<e&&e<g.bends.length-1&&(null==g.bends[e]||null==g.bends[e].node||""==g.bends[e].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=e,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=d.getModel().getGeometry(b);e=null!=g&&null!=g.points&&0<g.points.length}1==d.getSelectionCount()&&
+(e||d.getModel().isVertex(b)&&0<d.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==d.getSelectionCount()&&d.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
+Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],d,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(e.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",d,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",d,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
+"editConnectionPoints",d,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
+Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)mxUtils.bind(this,function(g){var e=b.addMenu(mxResources.get(f[d]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,e)})(this.get(f[d]));return b};
Menus.prototype.menuCreated=function(a,b,f){null!=b&&(f=null!=f?f:"geItem",a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=f,8==document.documentMode&&(b.style.color="")):(b.className=f+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
-Menubar.prototype.addMenu=function(a,b,f){var e=document.createElement("a");e.className="geItem";mxUtils.write(e,a);this.addMenuHandler(e,b);null!=f?this.container.insertBefore(e,f):this.container.appendChild(e);return e};
-Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,e=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(b);d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();d.destroy()});var k=mxUtils.getOffset(a);d.popup(k.x,k.y+a.offsetHeight,null,
-g);this.editorUi.setCurrentMenu(d,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),e(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){e(g);f=!0}))}};Menubar.prototype.destroy=function(){};
+Menubar.prototype.addMenu=function(a,b,f){var d=document.createElement("a");d.className="geItem";mxUtils.write(d,a);this.addMenuHandler(d,b);null!=f?this.container.insertBefore(d,f):this.container.appendChild(d);return d};
+Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,d=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(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.editorUi.resetCurrentMenu();e.destroy()});var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,
+g);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),d(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){d(g);f=!0}))}};Menubar.prototype.destroy=function(){};
function Menu(a,b){mxEventSource.call(this);this.funct=a;this.enabled=null!=b?b:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(f){null!=this.editorUi.currentMenu&&mxEvent.getSource(f)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
Toolbar.prototype.dropDownImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAHt7e////yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCREM1NkJFMjE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCREM1NkJFMzE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQzOUMzMjZCMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQzOUMzMjZDMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+
"/dropdown.gif";Toolbar.prototype.selectedBackground="#d0d0d0";Toolbar.prototype.unselectedBackground="none";Toolbar.prototype.staticElements=null;
Toolbar.prototype.init=function(){var a=screen.width;a-=740<screen.height?56:0;if(700<=a){var b=this.addMenu("",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")",!0,"viewPanels",null,!0);this.addDropDownArrow(b,"geSprite-formatpanel",38,50,-4,-3,36,-8);this.addSeparator()}var f=this.addMenu("",mxResources.get("zoom")+" (Alt+Mousewheel)",!0,"viewZoom",null,!0);f.showDisabled=!0;f.style.whiteSpace="nowrap";f.style.position="relative";f.style.overflow="hidden";f.style.width=EditorUi.compactUi?
"50px":"36px";420<=a&&(this.addSeparator(),b=this.addItems(["zoomIn","zoomOut"]),b[0].setAttribute("title",mxResources.get("zoomIn")+" ("+this.editorUi.actions.get("zoomIn").shortcut+")"),b[1].setAttribute("title",mxResources.get("zoomOut")+" ("+this.editorUi.actions.get("zoomOut").shortcut+")"));this.updateZoom=mxUtils.bind(this,function(){f.innerHTML=Math.round(100*this.editorUi.editor.graph.view.scale)+"%";this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.getElementsByTagName("img")[0].style.right=
"1px",f.getElementsByTagName("img")[0].style.top="5px")});this.editorUi.editor.graph.view.addListener(mxEvent.EVENT_SCALE,this.updateZoom);this.editorUi.editor.addListener("resetGraphView",this.updateZoom);b=this.addItems(["-","undo","redo"]);b[1].setAttribute("title",mxResources.get("undo")+" ("+this.editorUi.actions.get("undo").shortcut+")");b[2].setAttribute("title",mxResources.get("redo")+" ("+this.editorUi.actions.get("redo").shortcut+")");320<=a&&(b=this.addItems(["-","delete"]),b[1].setAttribute("title",
-mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
-null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
-null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
-mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
-null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
-null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
+mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
+null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
+null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
+mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
+null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
+null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
+mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8);this.addSeparator();this.addTableDropDown()};
Toolbar.prototype.appendDropDownImageHtml=function(a){var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",Toolbar.prototype.dropDownImage);a.appendChild(b);b.style.position="absolute";b.style.right="4px";b.style.top=(EditorUi.compactUi?6:8)+"px"};
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(f){this.editorUi.menus.addInsertTableCellItem(f)}));a.style.position="relative";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.width="30px";a.innerHTML='<div class="geSprite geSprite-table"></div>';this.appendDropDownImageHtml(a);a.getElementsByTagName("div")[0].style.marginLeft="-2px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left=
"22px",a.getElementsByTagName("img")[0].style.top="5px");var b=this.editorUi.menus.get("insert");null!=b&&"function"===typeof a.setEnabled&&b.addListener("stateChanged",function(){a.setEnabled(b.enabled)});return a};
-Toolbar.prototype.addDropDownArrow=function(a,b,f,e,g,d,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=e-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=d+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
+Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};
Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,f=this.addMenu("",mxResources.get("style"),!0,"formatBlock");f.style.position="relative";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.style.paddingRight="18px",f.getElementsByTagName("img")[0].style.right="1px",f.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width="68px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,mxResources.get("fontSize"),
!0,"fontSize");this.sizeMenu.style.position="relative";this.sizeMenu.style.whiteSpace="nowrap";this.sizeMenu.style.overflow="hidden";this.sizeMenu.style.width="24px";this.setFontSize(Menus.prototype.defaultFontSize);EditorUi.compactUi&&(this.sizeMenu.style.paddingRight="18px",this.sizeMenu.getElementsByTagName("img")[0].style.right="1px",this.sizeMenu.getElementsByTagName("img")[0].style.top="5px");f=this.addItems("- undo redo - bold italic underline".split(" "));f[1].setAttribute("title",mxResources.get("undo")+
-" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var e=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(d){g=
-d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
-"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
-g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
-"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));e.style.position="relative";
-e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");e=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(d){g=d.addItem("",null,this.editorUi.actions.get("subscript").funct,
-null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=d.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=d.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=d.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
-null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));e.style.position="relative";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
-"-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
-this.addSeparator();e=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(d){d.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));d.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));d.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));e.style.whiteSpace=
-"nowrap";e.style.overflow="hidden";e.style.position="relative";e.style.width="16px";e.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="24px",e.getElementsByTagName("img")[0].style.top="5px",e.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
-!1,mxUtils.bind(this,function(d){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(d);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
-k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=d.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
-k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=d.addItem("",
-null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,
-function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+
-("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
-x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
-k.setAttribute("title",mxResources.get("center"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
-(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,e,g,d,k){var n=this.editorUi.menus.get(e),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,d);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
-Toolbar.prototype.addMenuFunction=function(a,b,f,e,g,d){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,e,d)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,e,g,d){b=e?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,e,g,d);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
-Toolbar.prototype.addItems=function(a,b,f){for(var e=[],g=0;g<a.length;g++){var d=a[g];"-"==d?e.push(this.addSeparator(b)):e.push(this.addItem("geSprite-"+d.toLowerCase(),d,b,f))}return e};Toolbar.prototype.addItem=function(a,b,f,e){var g=this.editorUi.actions.get(b),d=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),d=this.addButton(a,b,g.funct,f),e||"function"!==typeof d.setEnabled||(d.setEnabled(g.enabled),g.addListener("stateChanged",function(){d.setEnabled(g.enabled)})));return d};
-Toolbar.prototype.addButton=function(a,b,f,e){a=this.createButton(a);e=null!=e?e:this.container;this.initElement(a,b);this.addClickHandler(a,f);e.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
+" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var d=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(e){g=
+e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
+"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
+g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
+"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));d.style.position="relative";
+d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");d=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(e){g=e.addItem("",null,this.editorUi.actions.get("subscript").funct,
+null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=e.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=e.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=e.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
+null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
+"-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
+this.addSeparator();d=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(e){e.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));e.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));e.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));d.style.whiteSpace=
+"nowrap";d.style.overflow="hidden";d.style.position="relative";d.style.width="16px";d.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="24px",d.getElementsByTagName("img")[0].style.top="5px",d.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
+!1,mxUtils.bind(this,function(e){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(e);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
+k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=e.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
+k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=e.addItem("",
+null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,
+function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,A,C,F){return"#"+("0"+Number(A).toString(16)).substr(-2)+
+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
+x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
+k.setAttribute("title",mxResources.get("center"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerHTML="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
+(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,d,g,e,k){var n=this.editorUi.menus.get(d),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,e);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
+Toolbar.prototype.addMenuFunction=function(a,b,f,d,g,e){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,d,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,d,g,e){b=d?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,d,g,e);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
+Toolbar.prototype.addItems=function(a,b,f){for(var d=[],g=0;g<a.length;g++){var e=a[g];"-"==e?d.push(this.addSeparator(b)):d.push(this.addItem("geSprite-"+e.toLowerCase(),e,b,f))}return d};Toolbar.prototype.addItem=function(a,b,f,d){var g=this.editorUi.actions.get(b),e=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),e=this.addButton(a,b,g.funct,f),d||"function"!==typeof e.setEnabled||(e.setEnabled(g.enabled),g.addListener("stateChanged",function(){e.setEnabled(g.enabled)})));return e};
+Toolbar.prototype.addButton=function(a,b,f,d){a=this.createButton(a);d=null!=d?d:this.container;this.initElement(a,b);this.addClickHandler(a,f);d.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,"click",function(f){a.enabled&&b(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);b.appendChild(f);return b};
Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};
-Toolbar.prototype.addMenuHandler=function(a,b,f,e){if(null!=f){var g=this.editorUi.editor.graph,d=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();d=new mxPopupMenu(f);d.div.className+=" geToolbarMenu";d.showDisabled=e;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();
-d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var K=k.value;/(^#?[a-zA-Z0-9]*$)/.test(K)?("none"!=K&&"#"!=
-K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12),n(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var K=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom="8px";return K}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
+Toolbar.prototype.addMenuHandler=function(a,b,f,d){if(null!=f){var g=this.editorUi.editor.graph,e=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=b;e.autoExpand=!0;!b&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();
+e.destroy()});var u=mxUtils.getOffset(a);e.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(e,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==e||null==e.div||null==e.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,d){function g(){var K=k.value;/(^#?[a-zA-Z0-9]*$)/.test(K)?("none"!=K&&"#"!=
+K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12),n(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var K=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom="8px";return K}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(K,E,O,R){E=null!=E?E:12;var Q=document.createElement("table");Q.style.borderCollapse=
"collapse";Q.setAttribute("cellspacing","0");Q.style.marginBottom="20px";Q.style.cellSpacing="0px";Q.style.marginLeft="1px";var P=document.createElement("tbody");Q.appendChild(P);for(var aa=K.length/E,T=0;T<aa;T++){for(var U=document.createElement("tr"),fa=0;fa<E;fa++)mxUtils.bind(this,function(ha){var ba=document.createElement("td");ba.style.border="0px solid black";ba.style.padding="0px";ba.style.width="16px";ba.style.height="16px";null==ha&&(ha=O);if(null!=ha){ba.style.borderWidth="1px";"none"==
ha?ba.style.background="url('"+Dialog.prototype.noColorImage+"')":ba.style.backgroundColor="#"+ha;var qa=this.colorNames[ha.toUpperCase()];null!=qa&&ba.setAttribute("title",qa)}U.appendChild(ba);null!=ha&&(ba.style.cursor="pointer",mxEvent.addListener(ba,"click",function(){"none"==ha?(u.fromString("ffffff"),k.value="none"):u.fromString(ha)}),mxEvent.addListener(ba,"dblclick",g))})(K[T*E+fa]);P.appendChild(U)}R&&(K=document.createElement("td"),K.setAttribute("title",mxResources.get("reset")),K.style.border=
-"1px solid black",K.style.padding="0px",K.style.width="16px",K.style.height="16px",K.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",K.style.backgroundPosition="center center",K.style.backgroundRepeat="no-repeat",K.style.cursor="pointer",U.appendChild(K),mxEvent.addListener(K,"click",function(){ColorDialog.resetRecentColors();Q.parentNode.replaceChild(d(),Q)}));m.appendChild(Q);return Q});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
-"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);d();var A=r(this.presetColors);A.style.marginBottom="8px";
-A=r(this.defaultColors);A.style.marginBottom="16px";f.appendChild(m);A=document.createElement("div");A.style.textAlign="right";A.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});C.className="geBtn";a.editor.cancelFirst&&A.appendChild(C);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";A.appendChild(F);a.editor.cancelFirst||A.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
-f.appendChild(A);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(K){27==K.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(K))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+"1px solid black",K.style.padding="0px",K.style.width="16px",K.style.height="16px",K.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",K.style.backgroundPosition="center center",K.style.backgroundRepeat="no-repeat",K.style.cursor="pointer",U.appendChild(K),mxEvent.addListener(K,"click",function(){ColorDialog.resetRecentColors();Q.parentNode.replaceChild(e(),Q)}));m.appendChild(Q);return Q});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
+"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);e();var A=r(this.presetColors);A.style.marginBottom="8px";
+A=r(this.defaultColors);A.style.marginBottom="16px";f.appendChild(m);A=document.createElement("div");A.style.textAlign="right";A.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});C.className="geBtn";a.editor.cancelFirst&&A.appendChild(C);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";A.appendChild(F);a.editor.cancelFirst||A.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
+f.appendChild(A);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(K){27==K.keyCode&&(a.hideDialog(),null!=d&&d(),mxEvent.consume(K))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var b=this.editorUi.editor.graph;b.getModel().beginUpdate();try{b.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href",
-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,A,C,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,d,g,e,k,n,u,m,r,x,A,C,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
n.style.position="absolute";n.style.left="0px";n.style.right="0px";var K=n.cloneNode(!1),E=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";K.style.top="20px";K.style.bottom="64px";E.style.bottom="0px";E.style.height="60px";E.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(K);k.appendChild(E);null!=F&&n.appendChild(F);var O=document.createElement("textarea");r&&O.setAttribute("wrap","off");O.setAttribute("spellcheck","false");O.setAttribute("autocorrect","off");O.setAttribute("autocomplete",
"off");O.setAttribute("autocapitalize","off");mxUtils.write(O,f||"");O.style.resize="none";O.style.outline="none";O.style.position="absolute";O.style.boxSizing="border-box";O.style.top="0px";O.style.left="0px";O.style.height="100%";O.style.width="100%";this.textarea=O;this.init=function(){O.focus();O.scrollTop=0};K.appendChild(O);null!=A&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(A)}),b.className="geBtn",E.appendChild(b));if(null!=C)for(b=0;b<C.length;b++)(function(Q,
-P,aa){Q=mxUtils.button(Q,function(T){P(T,O)});null!=aa&&Q.setAttribute("title",aa);Q.className="geBtn";E.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&E.appendChild(d);null!=u&&u(E,O);if(null!=e){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(O.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn";
-E.appendChild(R);mxEvent.addListener(O,"keypress",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&R.click()})}a.editor.cancelFirst||E.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
+P,aa){Q=mxUtils.button(Q,function(T){P(T,O)});null!=aa&&Q.setAttribute("title",aa);Q.className="geBtn";E.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});e.setAttribute("title","Escape");e.className="geBtn";a.editor.cancelFirst&&E.appendChild(e);null!=u&&u(E,O);if(null!=d){var R=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();d(O.value)});R.setAttribute("title","Ctrl+Enter");R.className="geBtn gePrimaryBtn";
+E.appendChild(R);mxEvent.addListener(O,"keypress",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&R.click()})}a.editor.cancelFirst||E.appendChild(e);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),f.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result};
-n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var d=document.createElement("option");d.setAttribute("value","replace");mxUtils.write(d,mxResources.get("replaceExistingDrawing"));g.appendChild(d)}d=document.createElement("option");d.setAttribute("value",
-"new");mxUtils.write(d,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(d);a.editor.graph.isEnabled()&&(d=document.createElement("option"),d.setAttribute("value","import"),mxUtils.write(d,mxResources.get("addToExistingDrawing")),g.appendChild(d));b.appendChild(g);d=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
+n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));g.appendChild(e)}e=document.createElement("option");e.setAttribute("value",
+"new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),g.appendChild(e));b.appendChild(g);e=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
try{a.editor.setGraphXml(mxUtils.parseXml(k).documentElement),a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}else if("import"==g.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(k),m=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,m);var r=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(r));a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}null!=n&&mxUtils.alert(n.message)});
-d.className="geBtn gePrimaryBtn";b.appendChild(d);a.editor.cancelFirst||b.appendChild(e);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
+e.className="geBtn gePrimaryBtn";b.appendChild(e);a.editor.cancelFirst||b.appendChild(d);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
var ExportDialog=function(a){function b(){var U=r.value,fa=U.lastIndexOf(".");r.value=0<fa?U.substring(0,fa+1)+x.value:U+"."+x.value;"xml"===x.value?(A.setAttribute("disabled","true"),C.setAttribute("disabled","true"),F.setAttribute("disabled","true"),P.setAttribute("disabled","true")):(A.removeAttribute("disabled"),C.removeAttribute("disabled"),F.removeAttribute("disabled"),P.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===x.value?(K.removeAttribute("disabled"),E.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*F.value>MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/
-d),n=Math.ceil(g.height/d);d=document.createElement("table");var u=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
+"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===x.value?(K.removeAttribute("disabled"),E.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*F.value>MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var d=a.editor.graph,g=d.getGraphBounds(),e=d.view.scale,k=Math.ceil(g.width/
+e),n=Math.ceil(g.height/e);e=document.createElement("table");var u=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");g.appendChild(m);var x=document.createElement("select");x.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));x.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")),x.appendChild(m));
m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","pdf");mxUtils.write(m,mxResources.get("formatPdf"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));x.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m,mxResources.get("formatXml")),
x.appendChild(m));m=document.createElement("td");m.appendChild(x);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("zoom")+" (%):");g.appendChild(m);var A=document.createElement("input");A.setAttribute("type","number");A.setAttribute("value","100");A.style.width="180px";m=document.createElement("td");m.appendChild(A);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");
@@ -3990,36 +3991,36 @@ m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendCh
m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var K=document.createElement("select");K.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");K.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");K.appendChild(m);m=document.createElement("option");
m.setAttribute("value","300");mxUtils.write(m,"300dpi");K.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");K.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));K.appendChild(m);var E=document.createElement("input");E.style.width="180px";E.style.display="none";E.setAttribute("value","100");E.setAttribute("type","number");E.setAttribute("min","50");E.setAttribute("step",
"50");var O=!1;mxEvent.addListener(K,"change",function(){"custom"==this.value?(this.style.display="none",E.style.display="",E.focus()):(E.value=this.value,O||(A.value=this.value))});mxEvent.addListener(E,"change",function(){var U=parseInt(E.value);isNaN(U)||0>=U?E.style.backgroundColor="red":(E.style.backgroundColor="",O||(A.value=U))});m=document.createElement("td");m.appendChild(K);m.appendChild(E);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize=
-"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var Q=document.createElement("input");
+"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=null==d.background||d.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(R);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var Q=document.createElement("input");
Q.setAttribute("type","checkbox");Q.checked=!1;m=document.createElement("td");m.appendChild(Q);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("value",ExportDialog.lastBorderValue);P.style.width="180px";m=document.createElement("td");m.appendChild(P);g.appendChild(m);u.appendChild(g);
-d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(A,"change",function(){O=!0;var U=Math.max(0,parseFloat(A.value)||100)/100;A.value=parseFloat((100*U).toFixed(2));0<k?(C.value=Math.floor(k*U),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(C,"change",function(){var U=parseInt(C.value)/k;0<U?(A.value=parseFloat((100*U).toFixed(2)),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(F,"change",function(){var U=
+e.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(A,"change",function(){O=!0;var U=Math.max(0,parseFloat(A.value)||100)/100;A.value=parseFloat((100*U).toFixed(2));0<k?(C.value=Math.floor(k*U),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(C,"change",function(){var U=parseInt(C.value)/k;0<U?(A.value=parseFloat((100*U).toFixed(2)),F.value=Math.floor(n*U)):(A.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(F,"change",function(){var U=
parseInt(F.value)/n;0<U?(A.value=parseFloat((100*U).toFixed(2)),C.value=Math.floor(k*U)):(A.value="100",C.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var aa=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(A.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var U=r.value,fa=x.value,ha=Math.max(0,parseFloat(A.value)||100)/100,ba=Math.max(0,parseInt(P.value)),
-qa=e.background,I=Math.max(1,parseInt(E.value));if(("svg"==fa||"png"==fa||"pdf"==fa)&&R.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ba;ExportDialog.exportFile(a,U,fa,qa,ha,ba,I,Q.checked)}}));aa.className="geBtn gePrimaryBtn";var T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});T.className="geBtn";a.editor.cancelFirst?(m.appendChild(T),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(T));g.appendChild(m);u.appendChild(g);
-d.appendChild(u);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,b,f,e,g,d,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((d/g-u.x)/n.view.scale),Math.floor((d/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
-m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*d);g=Math.ceil(u.height*g/n.view.scale+2*d);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
-ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function f(){0<Q.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(T){}var m=new mxForm("properties");m.table.style.width=
-"100%";var r=d.attributes,x=[],A=[],C=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,K=function(T,U){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var ha=document.createElement("a"),ba=mxUtils.createImage(Dialog.prototype.closeImage);ba.style.height="9px";ba.style.fontSize="9px";ba.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";
+qa=d.background,I=Math.max(1,parseInt(E.value));if(("svg"==fa||"png"==fa||"pdf"==fa)&&R.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ba;ExportDialog.exportFile(a,U,fa,qa,ha,ba,I,Q.checked)}}));aa.className="geBtn gePrimaryBtn";var T=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});T.className="geBtn";a.editor.cancelFirst?(m.appendChild(T),m.appendChild(aa)):(m.appendChild(aa),m.appendChild(T));g.appendChild(m);u.appendChild(g);
+e.appendChild(u);this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
+ExportDialog.exportFile=function(a,b,f,d,g,e,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(d,g,e)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((e/g-u.x)/n.view.scale),Math.floor((e/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
+m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*e);g=Math.ceil(u.height*g/n.view.scale+2*e);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+ExportDialog.saveLocalFile=function(a,b,f,d){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+d)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
+var EditDataDialog=function(a,b){function f(){0<Q.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var d=document.createElement("div"),g=a.editor.graph,e=g.getModel().getValue(b);if(!mxUtils.isNode(e)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",e||"");e=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(T){}var m=new mxForm("properties");m.table.style.width=
+"100%";var r=e.attributes,x=[],A=[],C=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,K=function(T,U){var fa=document.createElement("div");fa.style.position="relative";fa.style.paddingRight="20px";fa.style.boxSizing="border-box";fa.style.width="100%";var ha=document.createElement("a"),ba=mxUtils.createImage(Dialog.prototype.closeImage);ba.style.height="9px";ba.style.fontSize="9px";ba.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";
ha.setAttribute("title",mxResources.get("delete"));ha.style.position="absolute";ha.style.top="4px";ha.style.right="0px";ha.style.margin="0px";ha.style.width="9px";ha.style.height="9px";ha.style.cursor="pointer";ha.appendChild(ba);U=function(qa){return function(){for(var I=0,L=0;L<x.length;L++){if(x[L]==qa){A[L]=null;m.table.deleteRow(I+(null!=F?1:0));break}null!=A[L]&&I++}}}(U);mxEvent.addListener(ha,"click",U);U=T.parentNode;fa.appendChild(T);fa.appendChild(ha);U.appendChild(fa)};k=function(T,U,
fa){x[T]=U;A[T]=m.addTextarea(x[C]+":",fa,2);A[T].style.width="100%";0<fa.indexOf("\n")&&A[T].setAttribute("rows","2");K(A[T],U);null!=n[U]&&0==n[U].editable&&A[T].setAttribute("disabled","disabled")};u=[];for(var E=g.getModel().getParent(b)==g.getModel().getRoot(),O=0;O<r.length;O++)!E&&"label"==r[O].nodeName||"placeholders"==r[O].nodeName||u.push({name:r[O].nodeName,value:r[O].nodeValue});u.sort(function(T,U){return T.name<U.name?-1:T.name>U.name?1:0});if(null!=F){r=document.createElement("div");
r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var R=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(T){mxEvent.isShiftDown(T)&&(T=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(U){null!=U&&0<U.length&&U!=F&&(null==g.getModel().getCell(U)?(g.getModel().cellRemoved(b),b.setId(U),F=U,R.innerHTML=mxUtils.htmlEntities(U),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",
[U])}))}),mxResources.get("id")),a.showDialog(T.container,300,80,!0,!0),T.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(O=0;O<u.length;O++)k(C,u[O].name,u[O].value),C++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";
-k.style.marginTop="6px";k.style.width="100%";var Q=document.createElement("input");Q.setAttribute("placeholder",mxResources.get("enterPropertyName"));Q.setAttribute("type","text");Q.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");Q.style.boxSizing="border-box";Q.style.marginLeft="2px";Q.style.width="100%";k.appendChild(Q);u.appendChild(k);e.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var T=Q.value;if(0<T.length&&"label"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var U=
-mxUtils.indexOf(x,T);if(0<=U&&null!=A[U])A[U].focus();else{d.cloneNode(!1).setAttribute(T,"");0<=U&&(x.splice(U,1),A.splice(U,1));x.push(T);var fa=m.addTextarea(T+":","",2);fa.style.width="100%";A.push(fa);K(fa,T);fa.focus()}P.setAttribute("disabled","disabled");Q.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(Q,"keypress",function(T){13==T.keyCode&&P.click()});this.init=function(){0<A.length?A[0].focus():Q.focus()};P.setAttribute("title",
-mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var T=!1,
-U=0;U<x.length;U++)null==A[U]?d.removeAttribute(x[U]):(d.setAttribute(x[U],A[U].value),T=T||"placeholder"==x[U]&&"1"==d.getAttribute("placeholders"));T&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(fa){mxUtils.alert(fa)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&aa.click()});mxEvent.addListener(Q,"keyup",f);mxEvent.addListener(Q,"change",f);k=document.createElement("div");
-k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",E=document.createElement("input"),E.setAttribute("type","checkbox"),E.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(E.setAttribute("checked","checked"),E.defaultChecked=!0),mxEvent.addListener(E,"click",function(){"1"==d.getAttribute("placeholders")?
-d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(E),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(E=document.createElement("a"),E.setAttribute("href",EditDataDialog.placeholderHelpLink),E.setAttribute("title",mxResources.get("help")),E.setAttribute("target","_blank"),E.style.marginLeft="8px",E.style.cursor="help",O=document.createElement("img"),mxUtils.setOpacity(O,50),O.style.height="16px",O.style.width="16px",O.setAttribute("border",
-"0"),O.setAttribute("valign","middle"),O.style.marginTop=mxClient.IS_IE11?"0px":"-4px",O.setAttribute("src",Editor.helpImage),E.appendChild(O),r.appendChild(E)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,b,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
+k.style.marginTop="6px";k.style.width="100%";var Q=document.createElement("input");Q.setAttribute("placeholder",mxResources.get("enterPropertyName"));Q.setAttribute("type","text");Q.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");Q.style.boxSizing="border-box";Q.style.marginLeft="2px";Q.style.width="100%";k.appendChild(Q);u.appendChild(k);d.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var T=Q.value;if(0<T.length&&"label"!=T&&"placeholders"!=T&&0>T.indexOf(":"))try{var U=
+mxUtils.indexOf(x,T);if(0<=U&&null!=A[U])A[U].focus();else{e.cloneNode(!1).setAttribute(T,"");0<=U&&(x.splice(U,1),A.splice(U,1));x.push(T);var fa=m.addTextarea(T+":","",2);fa.style.width="100%";A.push(fa);K(fa,T);fa.focus()}P.setAttribute("disabled","disabled");Q.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(Q,"keypress",function(T){13==T.keyCode&&P.click()});this.init=function(){0<A.length?A[0].focus():Q.focus()};P.setAttribute("title",
+mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var aa=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var T=!1,
+U=0;U<x.length;U++)null==A[U]?e.removeAttribute(x[U]):(e.setAttribute(x[U],A[U].value),T=T||"placeholder"==x[U]&&"1"==e.getAttribute("placeholders"));T&&e.removeAttribute("label");g.getModel().setValue(b,e)}catch(fa){mxUtils.alert(fa)}});aa.setAttribute("title","Ctrl+Enter");aa.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&aa.click()});mxEvent.addListener(Q,"keyup",f);mxEvent.addListener(Q,"change",f);k=document.createElement("div");
+k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",E=document.createElement("input"),E.setAttribute("type","checkbox"),E.style.marginRight="6px","1"==e.getAttribute("placeholders")&&(E.setAttribute("checked","checked"),E.defaultChecked=!0),mxEvent.addListener(E,"click",function(){"1"==e.getAttribute("placeholders")?
+e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")}),r.appendChild(E),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(E=document.createElement("a"),E.setAttribute("href",EditDataDialog.placeholderHelpLink),E.setAttribute("title",mxResources.get("help")),E.setAttribute("target","_blank"),E.style.marginLeft="8px",E.style.cursor="help",O=document.createElement("img"),mxUtils.setOpacity(O,50),O.style.height="16px",O.style.width="16px",O.setAttribute("border",
+"0"),O.setAttribute("valign","middle"),O.style.marginTop=mxClient.IS_IE11?"0px":"-4px",O.setAttribute("src",Editor.helpImage),E.appendChild(O),r.appendChild(E)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(aa)):(k.appendChild(aa),k.appendChild(u));d.appendChild(k);this.container=d};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
+var LinkDialog=function(a,b,f,d){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var 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 k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
-mxEvent.addListener(b,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(b);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,e,g,!0,!0);this.window.minimumSize=
+mxEvent.addListener(b,"click",function(){k.value="";k.focus()});e.appendChild(k);e.appendChild(b);g.appendChild(e);this.init=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.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),d(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+b.className="geBtn";a.editor.cancelFirst&&e.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();d(k.value)});f.className="geBtn gePrimaryBtn";e.appendChild(f);a.editor.cancelFirst||e.appendChild(b);g.appendChild(e);this.container=g},OutlineWindow=function(a,b,f,d,g){var e=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,d,g,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(m,r){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;m=Math.max(0,Math.min(m,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));r=Math.max(0,Math.min(r,x-this.table.clientHeight-("1"==urlParams.sketch?
3:48)));this.getX()==m&&this.getY()==r||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var m=this.window.getX(),r=this.window.getY();this.window.setLocation(m,r)});mxEvent.addListener(window,"resize",n);var u=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy();u.destroy()};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();u.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,
-mxUtils.bind(this,function(){u.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){u.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){u.setSuspended(!0)}));u.init(k);a.actions.get("zoomIn");a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(m,r){for(var x=!1,A=mxEvent.getSource(m);null!=A;){if(A==u.svg){x=!0;break}A=A.parentNode}x&&(x=d.zoomFactor,null!=m.deltaY&&Math.round(m.deltaY)!=m.deltaY&&(x=1+Math.abs(m.deltaY)/
-20*(x-1)),d.lazyZoom(r,null,null,x),mxEvent.consume(m))})},LayersWindow=function(a,b,f,e,g){function d(ha){if(u.isEnabled()&&null!=ha){var ba=u.convertValueToString(ha);ba=new FilenameDialog(a,ba||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(qa){null!=qa&&u.cellLabelChanged(ha,qa)}),mxResources.get("enterName"));a.showDialog(ba.container,300,100,!0,!0);ba.init()}}function k(){var ha=T.get(u.getLayerForCells(u.getSelectionCells()));null!=ha?ha.appendChild(U):null!=
+mxUtils.bind(this,function(){u.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){u.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){u.setSuspended(!0)}));u.init(k);a.actions.get("zoomIn");a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(m,r){for(var x=!1,A=mxEvent.getSource(m);null!=A;){if(A==u.svg){x=!0;break}A=A.parentNode}x&&(x=e.zoomFactor,null!=m.deltaY&&Math.round(m.deltaY)!=m.deltaY&&(x=1+Math.abs(m.deltaY)/
+20*(x-1)),e.lazyZoom(r,null,null,x),mxEvent.consume(m))})},LayersWindow=function(a,b,f,d,g){function e(ha){if(u.isEnabled()&&null!=ha){var ba=u.convertValueToString(ha);ba=new FilenameDialog(a,ba||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(qa){null!=qa&&u.cellLabelChanged(ha,qa)}),mxResources.get("enterName"));a.showDialog(ba.container,300,100,!0,!0);ba.init()}}function k(){var ha=T.get(u.getLayerForCells(u.getSelectionCells()));null!=ha?ha.appendChild(U):null!=
U.parentNode&&U.parentNode.removeChild(U)}function n(){function ha(I,L,H,S){var V=document.createElement("div");V.className="geToolbarContainer";T.put(H,V);V.style.overflow="hidden";V.style.position="relative";V.style.padding="4px";V.style.height="22px";V.style.display="block";V.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";V.style.borderWidth="0px 0px 1px 0px";V.style.borderColor="#c3c3c3";V.style.borderStyle="solid";V.style.whiteSpace="nowrap";V.setAttribute("title",
L);var ea=document.createElement("div");ea.style.display="inline-block";ea.style.width="100%";ea.style.textOverflow="ellipsis";ea.style.overflow="hidden";mxEvent.addListener(V,"dragover",function(W){W.dataTransfer.dropEffect="move";C=I;W.stopPropagation();W.preventDefault()});mxEvent.addListener(V,"dragstart",function(W){A=V;mxClient.IS_FF&&W.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(V,"dragend",function(W){null!=A&&null!=C&&u.addCell(H,u.model.root,C);C=A=null;W.stopPropagation();
W.preventDefault()});var ka=document.createElement("img");ka.setAttribute("draggable","false");ka.setAttribute("align","top");ka.setAttribute("border","0");ka.style.width="16px";ka.style.padding="0px 6px 0 4px";ka.style.marginTop="2px";ka.style.cursor="pointer";ka.setAttribute("title",mxResources.get(u.model.isVisible(H)?"hide":"show"));u.model.isVisible(H)?(ka.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(V,75)):(ka.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(V,25));Editor.isDarkMode()&&
@@ -4028,7 +4029,7 @@ Editor.lockedImage),mxUtils.setOpacity(ka,75)):(ka.setAttribute("src",Editor.unl
ea.appendChild(ka);ka=document.createElement("span");mxUtils.write(ka,L);ka.style.display="block";ka.style.whiteSpace="nowrap";ka.style.overflow="hidden";ka.style.textOverflow="ellipsis";ka.style.position="absolute";ka.style.left="52px";ka.style.right="8px";ka.style.top="8px";ea.appendChild(ka);V.appendChild(ea);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)L=document.createElement("div"),L.style.display="block",L.style.textAlign="right",L.style.whiteSpace=
"nowrap",L.style.position="absolute",L.style.right="16px",L.style.top="6px",0<I&&(ea=document.createElement("a"),ea.setAttribute("title",mxResources.get("toBack")),ea.className="geButton",ea.style.cssFloat="none",ea.innerHTML="&#9660;",ea.style.width="14px",ea.style.height="14px",ea.style.fontSize="14px",ea.style.margin="0px",ea.style.marginTop="-1px",L.appendChild(ea),mxEvent.addListener(ea,"click",function(W){u.isEnabled()&&u.addCell(H,u.model.root,I-1);mxEvent.consume(W)})),0<=I&&I<F-1&&(ea=document.createElement("a"),
ea.setAttribute("title",mxResources.get("toFront")),ea.className="geButton",ea.style.cssFloat="none",ea.innerHTML="&#9650;",ea.style.width="14px",ea.style.height="14px",ea.style.fontSize="14px",ea.style.margin="0px",ea.style.marginTop="-1px",L.appendChild(ea),mxEvent.addListener(ea,"click",function(W){u.isEnabled()&&u.addCell(H,u.model.root,I+1);mxEvent.consume(W)})),V.appendChild(L);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(V.setAttribute("draggable","true"),V.style.cursor=
-"move")}mxEvent.addListener(V,"dblclick",function(W){var Z=mxEvent.getSource(W).nodeName;"INPUT"!=Z&&"IMG"!=Z&&(d(H),mxEvent.consume(W))});u.getDefaultParent()==H&&(V.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",V.style.fontWeight=u.isEnabled()?"bold":"",K=H);mxEvent.addListener(V,"click",function(W){u.isEnabled()&&(u.setDefaultParent(S),u.view.setCurrentRoot(null),mxEvent.isShiftDown(W)&&u.setSelectionCells(H.children),mxEvent.consume(W))});x.appendChild(V)}F=u.model.getChildCount(u.model.root);
+"move")}mxEvent.addListener(V,"dblclick",function(W){var Z=mxEvent.getSource(W).nodeName;"INPUT"!=Z&&"IMG"!=Z&&(e(H),mxEvent.consume(W))});u.getDefaultParent()==H&&(V.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",V.style.fontWeight=u.isEnabled()?"bold":"",K=H);mxEvent.addListener(V,"click",function(W){u.isEnabled()&&(u.setDefaultParent(S),u.view.setCurrentRoot(null),mxEvent.isShiftDown(W)&&u.setSelectionCells(H.children),mxEvent.consume(W))});x.appendChild(V)}F=u.model.getChildCount(u.model.root);
x.innerHTML="";T.clear();for(var ba=F-1;0<=ba;ba--)mxUtils.bind(this,function(I){ha(ba,u.convertValueToString(I)||mxResources.get("background"),I,I)})(u.model.getChildAt(u.model.root,ba));var qa=u.convertValueToString(K)||mxResources.get("background");R.setAttribute("title",mxResources.get("removeIt",[qa]));aa.setAttribute("title",mxResources.get("duplicateIt",[qa]));u.isSelectionEmpty()&&(Q.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect=
"none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom="10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var A=null,C=
null;mxEvent.addListener(m,"dragover",function(ha){ha.dataTransfer.dropEffect="move";C=0;ha.stopPropagation();ha.preventDefault()});mxEvent.addListener(m,"drop",function(ha){ha.stopPropagation();ha.preventDefault()});var F=null,K=null,E=document.createElement("div");E.className="geToolbarContainer";E.style.position="absolute";E.style.bottom="0px";E.style.left="0px";E.style.right="0px";E.style.height=r;E.style.overflow="hidden";E.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";E.style.backgroundColor=
@@ -4039,7 +4040,7 @@ Q.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])))
E.appendChild(P);var aa=O.cloneNode(!1);aa.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);aa.appendChild(r);mxEvent.addListener(aa,"click",function(ha){if(u.isEnabled()){ha=null;u.model.beginUpdate();try{ha=u.cloneCell(K),u.cellLabelChanged(ha,mxResources.get("untitledLayer")),ha.setVisible(!0),ha=u.addCell(ha,u.model.root),u.setDefaultParent(ha)}finally{u.model.endUpdate()}null==ha||u.isCellLocked(ha)||u.selectAll(ha)}});u.isEnabled()||
(aa.className="geButton mxDisabled");E.appendChild(aa);O=O.cloneNode(!1);O.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src",Editor.addImage);O.appendChild(r);mxEvent.addListener(O,"click",function(ha){if(u.isEnabled()){u.model.beginUpdate();try{var ba=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ba)}finally{u.model.endUpdate()}}mxEvent.consume(ha)});u.isEnabled()||(O.className="geButton mxDisabled");E.appendChild(O);
m.appendChild(E);var T=new mxDictionary,U=document.createElement("span");U.setAttribute("title",mxResources.get("selectionOnly"));U.innerHTML="&#8226;";U.style.position="absolute";U.style.fontWeight="bold";U.style.fontSize="16pt";U.style.right="2px";U.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?Q.className="geButton mxDisabled":Q.className="geButton";k()});this.window=
-new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;this.window.setLocation=function(ha,ba){var qa=window.innerHeight||document.body.clientHeight||
+new mxWindow(mxResources.get("layers"),m,b,f,d,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;this.window.setLocation=function(ha,ba){var qa=window.innerHeight||document.body.clientHeight||
document.documentElement.clientHeight;ha=Math.max(0,Math.min(ha,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));ba=Math.max(0,Math.min(ba,qa-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==ha&&this.getY()==ba||mxWindow.prototype.setLocation.apply(this,arguments)};var fa=mxUtils.bind(this,function(){var ha=this.window.getX(),ba=this.window.getY();this.window.setLocation(ha,ba)});mxEvent.addListener(window,"resize",fa);
this.destroy=function(){mxEvent.removeListener(window,"resize",fa);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
@@ -10939,26 +10940,27 @@ 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,f){this.savingFile?null!=f&&f({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(l){this.sync.cleanup(b,f,l)}),f):this.updateFile(b,f)};
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 p=this.compressReportData(this.getAnonymizedXmlForPages(D)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),x=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+DrawioFile.prototype.mergeFile=function(b,f,l,d){var u=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),C=b.getShadowPages();if(null!=C&&0<C.length){var c=[this.ui.diffPages(null!=d?d:t,C)],e=this.ignorePatches(c);this.setShadowPages(C);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(C,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(C)),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)),
-25E3);this.sendErrorReport("Checksum Error in "+u+" "+this.getHash(),(null!=l?l:"")+"\n\nPatches:\n"+g+(null!=e?"\n\nRemote:\n"+e:""),null,7E4)});null==d?t(null):this.getLatestVersion(mxUtils.bind(this,function(e){null!=e&&e.getCurrentEtag()==d?t(e):t(null)}),function(){})}else{var D=this.getCurrentUser(),c=null!=D?D.id:"unknown";EditorUi.logError("Checksum Error in "+u+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+
-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:
+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(g){var k=this.compressReportData(JSON.stringify(f,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
+25E3);this.sendErrorReport("Checksum Error in "+u+" "+this.getHash(),(null!=l?l:"")+"\n\nPatches:\n"+k+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==d?t(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==d?t(g):t(null)}),function(){})}else{var C=this.getCurrentUser(),c=null!=C?C.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")";EditorUi.logError("Checksum Error in "+u+" "+e,null,this.getMode()+"."+this.getId(),"user_"+c+
+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(f).length+"-patches_"+f.length+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,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(g){}}}catch(g){}};
+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),C=this.getCurrentUser(),c=null!=C?this.ui.hashValue(C.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),k=g.lastIndexOf(".");C="xml";0<k&&(C=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()+" ("+C+")\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(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};
-DrawioFile.prototype.patch=function(b,f,l){if(null!=b){var d=this.ui.editor.undoManager,u=d.history.slice(),t=d.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=l;var e=D.foldingEnabled,g=D.mathEnabled,k=D.cellRenderer.redraw;D.cellRenderer.redraw=function(m){m.view.graph.isEditing(m.cell)&&(m.view.graph.scrollCellToVisible(m.cell),m.view.graph.cellEditor.resize());k.apply(this,arguments)};D.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=k;this.changeListenerEnabled=c;l||(d.history=u,d.indexOfNextAdd=t,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=D.mathEnabled?
-(this.ui.editor.updateGraphComponents(),D.refresh()):(e!=D.foldingEnabled?D.view.revalidate():D.view.validate(),D.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",f,"undoable",l)}return b};
+DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var l=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,u=d.getSelectionCells(),t=d.getViewState(),C=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(C,t,u);null!=this.backupPatch&&this.patch([this.backupPatch]);var c=this.ui.getCurrentFile();null!=c&&(c.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.mergeLatestVersion=function(b,f,l){this.getLatestVersion(mxUtils.bind(this,function(d){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(d.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(d.getDescriptor());this.descriptorChanged();null!=f&&f()}),l)};
+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};
+DrawioFile.prototype.patch=function(b,f,l){if(null!=b){var d=this.ui.editor.undoManager,u=d.history.slice(),t=d.indexOfNextAdd,C=this.ui.editor.graph;C.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=l;var e=C.foldingEnabled,g=C.mathEnabled,k=C.cellRenderer.redraw;C.cellRenderer.redraw=function(m){m.view.graph.isEditing(m.cell)&&(m.view.graph.scrollCellToVisible(m.cell),m.view.graph.cellEditor.resize());k.apply(this,arguments)};C.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{C.container.style.visibility="";C.model.endUpdate();C.cellRenderer.redraw=k;this.changeListenerEnabled=c;l||(d.history=u,d.indexOfNextAdd=t,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=C.mathEnabled?
+(this.ui.editor.updateGraphComponents(),C.refresh()):(e!=C.foldingEnabled?C.view.revalidate():C.view.validate(),C.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",f,"undoable",l)}return b};
DrawioFile.prototype.save=function(b,f,l,d,u,t){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",u,"manual",t,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(D){if(null!=l)l(D);else throw D;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=l)l(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
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,f,l){};
DrawioFile.prototype.saveFile=function(b,f,l,d){};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,f,l){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,l){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -10994,173 +10996,173 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(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,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(D){this.handleFileError(D,!0)}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,l,d,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,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,l,d,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,l,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(l,d,u):this.invalidChecksum?this.showRefreshDialog(l,d,this.getErrorMessage(b)):f?this.showConflictDialog(u,t):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(l,d)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};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(f){this.ui.stopSanityCheck();
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(f):this.sync.createToken(f,mxUtils.bind(this,function(l){b(f,l)}),mxUtils.bind(this,function(){b(f)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,f,l,d,u){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!=l&&l()):this.sync.fileSaved(t,f,l,d,u)}catch(e){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=d&&d(e);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,e);else{var D=this.getCurrentUser(),c=null!=D?D.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),c,e)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,f,l,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var u=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==u&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"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(D){this.autosaveCompleted();null!=l&&l(D)}),mxUtils.bind(this,function(D){null!=d&&d(D)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=l&&l(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"delay",b,"saving",this.savingFile);this.autosaveThread=u};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+!0;this.descriptorChanged();null!=d&&d(e);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,e);else{var C=this.getCurrentUser(),c=null!=C?C.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),c,e)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+DrawioFile.prototype.autosave=function(b,f,l,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var u=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==u&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var t=this.isAutosaveRevision();
+t&&(this.lastAutosaveRevision=(new Date).getTime());this.save(t,mxUtils.bind(this,function(C){this.autosaveCompleted();null!=l&&l(C)}),mxUtils.bind(this,function(C){null!=d&&d(C)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=l&&l(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",u,"delay",b,"saving",this.savingFile);this.autosaveThread=u};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,f){if(null!=b&&null!=f){var l=b.lastIndexOf(".");b=0<l?b.substring(l):"";l=f.lastIndexOf(".");return b===(0<l?f.substring(l):"")}return b==f};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,l){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,l,d,u,t){DrawioFile.call(this,b,f);this.title=l;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=u;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,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,
+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 C=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(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)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var z=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(C,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?C:null,f.scale,f.border)):e(C)};
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)};
-StorageFile.insertFile=function(b,f,l,d,u){var t=mxUtils.bind(this,function(D){var c=function(){var e=new StorageFile(b,l,f);e.saveFile(f,!1,function(){d(e)},u)};D?b.confirm(mxResources.get("replaceIt",[f]),c,u):c()});StorageFile.getFileContent(b,f,function(D){t(null!=D)},function(){t(!1)})};StorageFile.getFileContent=function(b,f,l,d){b.getDatabaseItem(f,function(u){l(null!=u?u.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,l):null!=d&&d()}),"files")};
+StorageFile.insertFile=function(b,f,l,d,u){var t=mxUtils.bind(this,function(C){var c=function(){var e=new StorageFile(b,l,f);e.saveFile(f,!1,function(){d(e)},u)};C?b.confirm(mxResources.get("replaceIt",[f]),c,u):c()});StorageFile.getFileContent(b,f,function(C){t(null!=C)},function(){t(!1)})};StorageFile.getFileContent=function(b,f,l,d){b.getDatabaseItem(f,function(u){l(null!=u?u.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,l):null!=d&&d()}),"files")};
StorageFile.getFileInfo=function(b,f,l,d){b.getDatabaseItem(f,function(u){l(u)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(u){l(null!=u?{title:f}:null)}):null!=d&&d()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,f,l,d){if(this.isEditable()){var u=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var t=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()});this.setShadowModified(!1);var D=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:D.length,lastModified:Date.now(),type:this.type},{title:this.title,data:D}],t,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-D,t):null!=d&&d()}),["filesInfo","files"])}catch(c){null!=d&&d(c)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(t){this.isRenamable()&&this.getTitle()!=b&&null!=t?this.ui.confirm(mxResources.get("replaceIt",[b]),u,d):u()}),d)}else null!=l&&l()};
+StorageFile.prototype.saveFile=function(b,f,l,d){if(this.isEditable()){var u=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var t=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()});this.setShadowModified(!1);var C=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:C.length,lastModified:Date.now(),type:this.type},{title:this.title,data:C}],t,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+C,t):null!=d&&d()}),["filesInfo","files"])}catch(c){null!=d&&d(c)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(t){this.isRenamable()&&this.getTitle()!=b&&null!=t?this.ui.confirm(mxResources.get("replaceIt",[b]),u,d):u()}),d)}else null!=l&&l()};
StorageFile.prototype.rename=function(b,f,l){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){var t=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),l)});null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),t,l):t()}),l):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(l){b(new StorageFile(this.ui,l,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var f=[],l=0;l<localStorage.length;l++){var d=localStorage.key(l),u=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<u.length){var t=(null==b||"F"==b)&&("<mxfile "===u.substring(0,8)||"<?xml"===u.substring(0,5)||"\x3c!--[if IE]>"===u.substring(0,12)),D=(null==b||"L"==b)&&"<mxlibrary>"===u.substring(0,11);(t||D)&&f.push({title:d,type:t?"F":"L",size:u.length,lastModified:Date.now()})}}return f};
+StorageFile.listLocalStorageFiles=function(b){for(var f=[],l=0;l<localStorage.length;l++){var d=localStorage.key(l),u=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<u.length){var t=(null==b||"F"==b)&&("<mxfile "===u.substring(0,8)||"<?xml"===u.substring(0,5)||"\x3c!--[if IE]>"===u.substring(0,12)),C=(null==b||"L"==b)&&"<mxlibrary>"===u.substring(0,11);(t||C)&&f.push({title:d,type:t?"F":"L",size:u.length,lastModified:Date.now()})}}return f};
StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var l=b.transaction(["files","filesInfo"],"readwrite");b=l.objectStore("files");l=l.objectStore("filesInfo");for(var d=0;d<f.length;d++){var u=f[d],t=localStorage.getItem(u.title);b.add({title:u.title,data:t});l.add(u)}};
-StorageFile.listFiles=function(b,f,l,d){b.getDatabaseItems(function(u){var t=[];if(null!=u)for(var D=0;D<u.length;D++)"."==u[D].title.charAt(0)||null!=f&&u[D].type!=f||t.push(u[D]);l(t)},function(){null==b.database?l(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,l,d){b.removeDatabaseItem([f,f],l,function(){null==b.database?(localStorage.removeItem(f),l()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,l){StorageFile.call(this,b,f,l)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listFiles=function(b,f,l,d){b.getDatabaseItems(function(u){var t=[];if(null!=u)for(var C=0;C<u.length;C++)"."==u[C].title.charAt(0)||null!=f&&u[C].type!=f||t.push(u[C]);l(t)},function(){null==b.database?l(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,l,d){b.removeDatabaseItem([f,f],l,function(){null==b.database?(localStorage.removeItem(f),l()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,l){StorageFile.call(this,b,f,l)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,f,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,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=
+function(B){b.spinner.stop();b.handleError(B)}):(b.setMode(v,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}c++;++C>l&&(mxUtils.br(e),C=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&&
+"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 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(N);
+var A=window.setTimeout(function(){null==b[x]&&(D.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="",D.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 C=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);C=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,
"transform","translate(-50%,0)");mxUtils.write(t,mxResources.get("decideLater"));u.appendChild(t);mxEvent.addListener(t,"click",function(){b.hideDialog();var m=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=m});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(g.style.padding="7px",g.style.fontSize="9pt",g.style.marginTop="-14px",
g.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",u.appendChild(g))},5E3);this.container=u},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var l=
b.addLanguageMenu(f,!0);null!=l&&(l.style.bottom="19px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var u=document.createElement("div");u.style.margin="8px 0px 0px 0px";u.style.padding="18px 0px 24px 0px";l="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",l=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+
"/dropbox-logo.svg",l=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",l=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",l=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",l=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",l=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",l=mxResources.get("trello")):
-(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",u.style.paddingBottom="10px",u.style.paddingTop="30px",l=mxResources.get("device"));var t=document.createElement("button");t.className="geBigButton";t.style.marginBottom="8px";t.style.fontSize="18px";t.style.padding="10px";t.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)u.style.padding="42px 0px 10px 0px",t.style.marginBottom="12px";else{u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";var D=document.createElement("table"),
-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%;";
+(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",u.style.paddingBottom="10px",u.style.paddingTop="30px",l=mxResources.get("device"));var t=document.createElement("button");t.className="geBigButton";t.style.marginBottom="8px";t.style.fontSize="18px";t.style.padding="10px";t.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)u.style.padding="42px 0px 10px 0px",t.style.marginBottom="12px";else{u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";var C=document.createElement("table"),
+c=document.createElement("tbody"),e=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");C.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);C.appendChild(c);f.appendChild(C);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 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();
+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++)C=document.createElement("option"),mxUtils.write(C,m[l].displayName),C.value=l,p.appendChild(C),
+C=document.createElement("option"),C.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(C,"<"+m[l].email+">"),C.setAttribute("disabled","disabled"),p.appendChild(C);C=document.createElement("option");mxUtils.write(C,mxResources.get("addAccount"));C.value=m.length;p.appendChild(C);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");
+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,C,c,e){C=null!=C?C:"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 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")})}}),
+"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(C)+"&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 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");
+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<D.length&&(G+="&s="+D);""!=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";
+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(),C=u.view.scale,c=Math.floor(t.x/C-u.view.translate.x),e=Math.floor(t.y/C-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 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);
+m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(t.height/C);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();
+"8px";d.appendChild(q);mxUtils.write(d,mxResources.get("embed")+" ");var D=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(){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 C="curved=1;";t.cellRenderer.installCellOverlayListeners=
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"==
+!1;t.connectionHandler.createEdgeState=function(z){z=t.createEdge(null,null,null,null,null,C);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,C)},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;C="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(k=new mxCompactTreeLayout(t,!1),k.edgeRouting=!1,k.levelDistance=30,C="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(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");
+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 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 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 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";
+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||(C.style.display="none",c.style.display="none",g.style.display="none");var p=document.createElement("option"),v=!1,x=!1,z=function(q,D){v||null!=q&&x||(c.checked?null!=D&&D(p.selected?null:
+g.value):""==e.value||b.isOffline()?(L.value="",N.value="",null!=D&&D("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(A){L.value=A.width;N.value=A.height;null!=D&&D(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";N.value="";null!=D&&D(null)})))},y=mxUtils.bind(this,function(q){b.importFiles(q,0,0,b.maxBackgroundSize,function(D,A,B,G,M,H){e.value=D;z();e.focus()},function(){},function(D){return"image/"==D.type.substring(0,
+6)},function(D){for(var A=0;A<D.length;A++)D[A]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){t?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){C.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");C.setAttribute("checked","checked");C.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var q=d.parentNode,D=null;mxEvent.addListener(q,
+"dragleave",function(A){null!=D&&(D.parentNode.removeChild(D),D=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(A){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(q));A.stopPropagation();A.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(A){null!=D&&(D.parentNode.removeChild(D),D=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(C);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",
+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):(C.setAttribute("checked","checked"),C.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="";C.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"==
+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(V,O,W,U,X){t=mxEvent.isAltDown(z)?t:N.getCenterInsertPoint(new mxRectangle(0,0,U,X));var n=null;N.getModel().beginUpdate();try{n="txt"==O?b.insertAsPreText(W,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(W)+";"),N.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:V,format:O},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":"",
+295,212)},200):b.generatePlantUmlImage(v,K,function(V,O,W){b.spinner.stop();L(v,K,V,O,W)},function(V){b.handleError(V)})}}else if("mermaid"==x)b.spinner.spin(document.body,mxResources.get("inserting"))&&(N=b.editor.graph,b.generateMermaidImage(v,K,function(V,O,W){t=mxEvent.isAltDown(z)?t:N.getCenterInsertPoint(new mxRectangle(0,0,O,W));b.spinner.stop();var U=null;N.getModel().beginUpdate();try{U=N.insertVertex(null,null,null,t.x,t.y,O,W,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+V+";"),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(V){b.handleError(V)}));else if("table"==x){x=null;for(var q=[],D=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(D,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))D+=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";
+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&&(D=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;"),
+D.vertex=!0,G=N.getPreferredSizeForCell(D),null!=G&&D.geometry.width<G.width&&(D.geometry.width=G.width),H.geometry.width=Math.max(H.geometry.width,D.geometry.width),H.geometry.height+=D.geometry.height,H.insert(D)));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(V){var O=J[V];null==O&&(O=new mxCell(V,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),O.vertex=!0,J[V]=O,q.push(O));return O};var J={};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,
+(new mxCircleLayout(N)).execute(N.getDefaultParent()):(D=new mxFastOrganicLayout(N),D.disableEdgeStyle=!1,D.forceConstant=180,D.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"==
+"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 C=document.createElement("textarea");C.style.boxSizing="border-box";C.style.resize=
+"none";C.style.width="100%";C.style.height="354px";C.style.marginBottom="16px";var 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 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;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){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&&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 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)}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");
+"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();C.value=p;f.appendChild(C);this.init=function(){C.focus()};
+Graph.fileSupport&&(C.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),C.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){C.value=z.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=u();if(0==C.value.length||C.value==p)p=v,C.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(){C.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(C.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,C,c,e,g,k,m,p,v,x,z,y,L){function N(ea){null!=ea&&(Ba=ua=ea?135:140);ea=!0;if(null!=Ma)for(;J<Ma.length&&(ea||0!=mxUtils.mod(J,30));){var ra=Ma[J++];ra=D(ra.url,ra.libs,ra.title,ra.tooltip?ra.tooltip:ra.title,ra.select,ra.imgUrl,ra.info,ra.onClick,ra.preview,ra.noImg,ra.clibs);ea&&ra.click();ea=!1}}function K(){if(Y&&null!=v)l||b.hideDialog(),v(Y,ha,F.value);else if(d)l||b.hideDialog(),d(P,F.value,ca,S);else{var ea=F.value;null!=ea&&
+0<ea.length&&b.pickFolder(b.mode,function(ra){b.createFile(ea,P,null!=S&&0<S.length?S:null,null,function(){b.hideDialog()},null,ra,null,null!=Q&&0<Q.length?Q:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function q(ea,ra,xa,va,qa,ta,ia){null!=T&&(T.style.backgroundColor="transparent",T.style.border="1px solid transparent");V.removeAttribute("disabled");P=ra;S=xa;Q=ta;T=ea;Y=va;ca=ia;ha=qa;T.style.backgroundColor=c;T.style.border=e}function D(ea,ra,xa,va,qa,ta,ia,oa,
+ba,da,ma){function ja(La,Ta){null==Ha?(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()&&(Ha=Ua.getText());Ta(Ha,Ga)}))):Ta(Ha,Ga)}function na(La,Ta,Ua){if(null!=La&&mxUtils.isAncestorNode(document.body,ka)){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(ka,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!=xa?mxResources.get(xa,null,xa):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;q(ka,null,null,ea,ia,ma)},!0,!1)}}function sa(La,Ta){null==ea||Ra||
+b.sidebar.currentElt==ka?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>",na(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt=
+ka,Ra=!0,ja(ea,function(Ua){Ra&&b.sidebar.currentElt==ka&&na(Ua,mxEvent.getClientX(La),mxEvent.getClientY(La));Ra=!1})))}var ka=document.createElement("div");ka.className="geTemplate";ka.style.position="relative";ka.style.height=Ba+"px";ka.style.width=ua+"px";var Ha=null,Ga=ea;Editor.isDarkMode()&&(ka.style.filter="invert(100%)");null!=xa?ka.setAttribute("title",mxResources.get(xa,null,xa)):null!=va&&0<va.length&&ka.setAttribute("title",va);var Ra=!1,Sa=null;if(null!=ta){ka.style.display="inline-flex";
+ka.style.justifyContent="center";ka.style.alignItems="center";qa=document.createElement("img");qa.setAttribute("src",ta);qa.setAttribute("alt",va);qa.style.maxWidth=Ba+"px";qa.style.maxHeight=ua+"px";Sa=qa;var Ia=ta.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ka.appendChild(qa);qa.onerror=function(){this.src!=Ia?this.src=Ia:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(La){q(ka,null,null,ea,ia,ma)}),null,null);mxEvent.addListener(ka,
+"dblclick",function(La){K();mxEvent.consume(La)})}else if(!da&&null!=ea&&0<ea.length){var Na=function(La){V.setAttribute("disabled","disabled");ka.style.backgroundColor="transparent";ka.style.border="1px solid transparent";R.spin(Z);ja(ea,function(Ta,Ua){R.stop();null!=Ta&&(q(ka,Ta,ra,null,null,ma,Ua),La&&K())})};qa=ba||TEMPLATE_PATH+"/"+ea.substring(0,ea.length-4)+".png";ka.style.backgroundImage="url("+qa+")";ka.style.backgroundPosition="center center";ka.style.backgroundRepeat="no-repeat";if(null!=
+xa){va=document.createElement("table");va.setAttribute("width","100%");va.setAttribute("height","100%");va.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";va.style.lineHeight="1.3em";va.style.border="inherit";ta=document.createElement("tbody");ba=document.createElement("tr");da=document.createElement("td");da.setAttribute("align","center");da.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(xa,null,xa));da.appendChild(Pa);ba.appendChild(da);ta.appendChild(ba);va.appendChild(ta);ka.appendChild(va)}mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(La){Na()}),null,null);mxEvent.addListener(ka,"dblclick",function(La){Na(!0);mxEvent.consume(La)})}else va=document.createElement("table"),
+va.setAttribute("width","100%"),va.setAttribute("height","100%"),va.style.lineHeight="1.3em",ta=document.createElement("tbody"),ba=document.createElement("tr"),da=document.createElement("td"),da.setAttribute("align","center"),da.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(xa,null,xa)),da.appendChild(Pa),ba.appendChild(da),ta.appendChild(ba),va.appendChild(ta),ka.appendChild(va),qa&&q(ka),mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(La){q(ka,null,null,ea,ia)}),null,null),null!=oa?mxEvent.addListener(ka,"click",oa):(mxEvent.addListener(ka,"click",function(La){q(ka,null,null,ea,ia)}),mxEvent.addListener(ka,"dblclick",function(La){K();mxEvent.consume(La)}));if(null!=ea){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";ka.appendChild(Qa);var Ya=!1;mxEvent.addGestureListeners(Qa,mxUtils.bind(this,function(La){Ya=b.sidebar.currentElt==ka}),null,null);mxEvent.addListener(Qa,"click",mxUtils.bind(this,function(La){Ya||sa(La,Qa);mxEvent.consume(La)}))}Z.appendChild(ka);
+return ka}function A(){function ea(sa,ka){var Ha=mxResources.get(sa);null==Ha&&(Ha=sa.substring(0,1).toUpperCase()+sa.substring(1));18<Ha.length&&(Ha=Ha.substring(0,18)+"&hellip;");return Ha+" ("+ka.length+")"}function ra(sa,ka,Ha){mxEvent.addListener(ka,"click",function(){Ea!=ka&&(Ea.style.backgroundColor="",Ea=ka,Ea.style.backgroundColor=C,Z.scrollTop=0,Z.innerHTML="",J=0,Ma=Ha?Fa[sa][Ha]:Da[sa],W=null,N(!1))})}Ja&&(Ja=!1,mxEvent.addListener(Z,"scroll",function(sa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
+(N(),mxEvent.consume(sa))}));if(0<Oa){var xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,mxResources.get("custom"));Aa.appendChild(xa);for(var va in Ka){var qa=document.createElement("div"),ta=va;xa=Ka[va];18<ta.length&&(ta=ta.substring(0,18)+"&hellip;");qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+qa.setAttribute("title",ta+" ("+xa.length+")");mxUtils.write(qa,qa.getAttribute("title"));null!=g&&(qa.style.padding=g);Aa.appendChild(qa);(function(sa,ka){mxEvent.addListener(qa,"click",function(){Ea!=ka&&(Ea.style.backgroundColor="",Ea=ka,Ea.style.backgroundColor=C,Z.scrollTop=0,Z.innerHTML="",J=0,Ma=Ka[sa],W=null,N(!1))})})(va,qa)}xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,"draw.io");Aa.appendChild(xa)}for(va in Da){ta=
+Fa[va];var ia=qa=document.createElement(ta?"ul":"div");xa=Da[va];var oa=ea(va,xa);if(null!=ta){var ba=document.createElement("li"),da=document.createElement("div");da.className="geTempTreeCaret";da.setAttribute("title",oa);mxUtils.write(da,oa);ia=da;ba.appendChild(da);oa=document.createElement("ul");oa.className="geTempTreeNested";oa.style.visibility="hidden";for(var ma in ta){var ja=document.createElement("li"),na=ea(ma,ta[ma]);ja.setAttribute("title",na);mxUtils.write(ja,na);ra(va,ja,ma);oa.appendChild(ja)}ba.appendChild(oa);
+qa.className="geTempTree";qa.appendChild(ba);(function(sa,ka){mxEvent.addListener(ka,"click",function(){sa.style.visibility="visible";sa.classList.toggle("geTempTreeActive");sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){sa.style.visibility="hidden"},550);ka.classList.toggle("geTempTreeCaret-down")})})(oa,da)}else qa.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;",
+qa.setAttribute("title",oa),mxUtils.write(qa,oa);null!=g&&(qa.style.padding=g);Aa.appendChild(qa);null==Ea&&0<xa.length&&(Ea=qa,Ea.style.backgroundColor=C,Ma=xa);ra(va,ia)}N(!1)}var B=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;u=null!=u?u:!1;C=null!=C?C:"#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="";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}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=
+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(ea){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 J=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}),V=mxUtils.button(z||mxResources.get("create"),function(){V.setAttribute("disabled","disabled");K();V.removeAttribute("disabled")});V.className="geBtn gePrimaryBtn";
+if(m||p){var O=[],W=null,U=null,X=null,n=function(ea){V.setAttribute("disabled","disabled");for(var ra=0;ra<O.length;ra++)O[ra].className=ra==ea?"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="";fa.style.display="";Z.style.left="160px";n(0);Z.scrollTop=0;Z.innerHTML="";J=0;W!=Ma&&(Ma=W,Da=U,Oa=X,Aa.innerHTML="",A(),W=null)});
+O.push(B);z.appendChild(B);var E=function(ea){Aa.style.display="none";fa.style.display="none";Z.style.left="30px";n(ea?-1:1);null==W&&(W=Ma);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var ra=function(xa,va,qa){J=0;R.stop();Ma=xa;qa=qa||{};var ta=0,ia;for(ia in qa)ta+=qa[ia].length;if(va)Z.innerHTML=va;else if(0==xa.length&&0==ta)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<ta){Aa.style.display="";Z.style.left="160px";Aa.innerHTML="";
+Oa=0;Da={"draw.io":xa};for(ia in qa)Da[ia]=qa[ia];A()}else N(!0)};ea?p(I.value,ra):m(ra)};m&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),z.appendChild(B),O.push(B));if(p){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(B);var I=document.createElement("input");I.style.marginRight="10px";I.style.marginLeft="10px";I.style.width="220px";mxEvent.addListener(I,"keypress",function(ea){13==
+ea.keyCode&&E(!0)});z.appendChild(I);B=mxUtils.button(mxResources.get("search"),function(){E(!0)});B.className="geBtn";z.appendChild(B)}n(0)}var S=null,Q=null,P=null,T=null,Y=null,ca=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 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 wa=document.createElement("img"),la="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";wa.setAttribute("src",
+la);wa.setAttribute("title",mxResources.get("search"));wa.style.position="relative";wa.style.left="-18px";wa.style.top="1px";wa.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(wa);mxEvent.addListener(wa,"click",function(){wa.getAttribute("src")==Dialog.prototype.closeImage&&(wa.setAttribute("src",la),wa.setAttribute("title",mxResources.get("search")),aa.value="",null!=Ca&&(Ca.click(),Ca=null));aa.focus()});mxEvent.addListener(aa,"keydown",mxUtils.bind(this,function(ea){if(13==
+ea.keyCode){var ra=aa.value;if(""==ra)null!=Ca&&(Ca.click(),Ca=null);else{if(null==NewDialog.tagsList[k]){var xa={};for(ma in Da)for(var va=Da[ma],qa=0;qa<va.length;qa++){var ta=va[qa];if(null!=ta.tags)for(var ia=ta.tags.toLowerCase().split(";"),oa=0;oa<ia.length;oa++)null==xa[ia[oa]]&&(xa[ia[oa]]=[]),xa[ia[oa]].push(ta)}NewDialog.tagsList[k]=xa}var ba=ra.toLowerCase().split(" ");xa=NewDialog.tagsList[k];if(0<Oa&&null==xa.__tagsList__){for(ma in Ka)for(va=Ka[ma],qa=0;qa<va.length;qa++)for(ta=va[qa],
+ia=ta.title.split(" "),ia.push(ma),oa=0;oa<ia.length;oa++){var da=ia[oa].toLowerCase();null==xa[da]&&(xa[da]=[]);xa[da].push(ta)}xa.__tagsList__=!0}var ma=[];va={};for(qa=ia=0;qa<ba.length;qa++)if(0<ba[qa].length){da=xa[ba[qa]];var ja={};ma=[];if(null!=da)for(oa=0;oa<da.length;oa++)ta=da[oa],0==ia==(null==va[ta.url])&&(ja[ta.url]=!0,ma.push(ta));va=ja;ia++}Z.scrollTop=0;Z.innerHTML="";J=0;xa=document.createElement("div");xa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
+mxUtils.write(xa,mxResources.get(0==ma.length?"noResultsFor":"resultsFor",[ra]));Z.appendChild(xa);null!=Ea&&null==Ca&&(Ea.style.backgroundColor="",Ca=Ea,Ea=xa);Ma=ma;W=null;N(!1)}mxEvent.consume(ea)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(ea){""==aa.value?(wa.setAttribute("src",la),wa.setAttribute("title",mxResources.get("search"))):(wa.setAttribute("src",Dialog.prototype.closeImage),wa.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,Ja=!0,Ea=null,Ca=null;Da.basic=[{title:"blankDiagram",select:!0}];var Ma=Da.basic;if(!f){var za=function(){mxUtils.get(pa,function(ea){if(!ya){ya=!0;ea=ea.getXml().documentElement.firstChild;for(var ra={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==
+ea.nodeName){for(var xa=ea.getAttribute("name"),va=ea.getElementsByTagName("add"),qa=[],ta=0;ta<va.length;ta++)qa.push(encodeURIComponent(mxUtils.getTextContent(va[ta])));null!=xa&&0<qa.length&&(ra[xa]=qa.join(";"))}else if(qa=ea.getAttribute("url"),null!=qa){va=ea.getAttribute("section");xa=ea.getAttribute("subsection");if(null==va&&(ta=qa.indexOf("/"),va=qa.substring(0,ta),null==xa)){var ia=qa.indexOf("/",ta+1);-1<ia&&(xa=qa.substring(ta+1,ia))}ta=Da[va];null==ta&&(ta=[],Da[va]=ta);qa=ea.getAttribute("clibs");
+null!=ra[qa]&&(qa=ra[qa]);qa={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title"),tooltip:ea.getAttribute("name")||ea.getAttribute("url"),preview:ea.getAttribute("preview"),clibs:qa,tags:ea.getAttribute("tags")};ta.push(qa);null!=xa&&(ta=Fa[va],null==ta&&(ta={},Fa[va]=ta),va=ta[xa],null==va&&(va=[],ta[xa]=va),va.push(qa))}ea=ea.nextSibling}R.stop();A()}})};G.appendChild(fa);G.appendChild(Aa);G.appendChild(Z);var ya=!1,pa=k;/^https?:\/\//.test(pa)&&!b.editor.isCorsEnabledForUrl(pa)&&
+(pa=PROXY_URL+"?url="+encodeURIComponent(pa));R.spin(Z);null!=y?y(function(ea,ra){Ka=ea;X=Oa=ra;za()},za):za();U=Da}mxEvent.addListener(F,"keypress",function(ea){b.dialog.container.firstChild==G&&13==ea.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 ea=new FilenameDialog(b,"",mxResources.get("create"),function(ra){null!=ra&&0<ra.length&&(ra=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
+encodeURIComponent(F.value)+"&create="+encodeURIComponent(ra)),null==b.getCurrentFile()?window.location.href=ra:window.openWindow(ra))},mxResources.get("url"));b.showDialog(ea.container,300,80,!0,!0);ea.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&x&&(x=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ea=document.createElement("input");ea.setAttribute("multiple","multiple");ea.setAttribute("type","file");mxEvent.addListener(ea,"change",function(ra){b.openFiles(ea.files,
+!0);ea.value=""});ea.style.display="none";document.body.appendChild(ea);b.newDlgFileInputElt=ea}b.newDlgFileInputElt.click()}),x.className="geBtn",y.appendChild(x));y.appendChild(V);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,C,c,e,g,k,m,p,v,x,z,y){function L(M,H,F,J){function R(){mxEvent.addListener(V,"click",function(){var n=F;if(C){var E=q.value,I=E.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>I){n=null!=n?n:G.value;var S="";n==App.MODE_GOOGLE?S=b.drive.extension:n==App.MODE_GITHUB?S=b.gitHub.extension:n==App.MODE_GITLAB?S=b.gitLab.extension:n==App.MODE_TRELLO?S=b.trello.extension:n==App.MODE_DROPBOX?S=b.dropbox.extension:n==App.MODE_ONEDRIVE?S=b.oneDrive.extension:n==App.MODE_DEVICE&&
+(S=".drawio");0<=I&&(E=E.substring(0,I));q.value=E+S}}N(F)})}var V=document.createElement("a");V.style.overflow="hidden";var O=document.createElement("img");O.src=M;O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.width="60px";O.style.height="60px";O.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(O);V.style.color=
+"gray";V.style.fontSize="11px";var W=document.createElement("div");V.appendChild(W);mxUtils.write(W,H);if(null!=J&&null==b[J]){O.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[J]&&(U.stop(),V.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(X),
+mxUtils.setOpacity(W,100),O.style.visibility="",U.stop(),R())}))}else R();A.appendChild(V);++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;C=null!=C?C:!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)}))}),
+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 D=x?p:btoa(unescape(encodeURIComponent(p)));u.setAttribute("src","data:"+v+";base64,"+D);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(D,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+v+";base64,"+D+'">'],{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+
@@ -11169,215 +11171,215 @@ mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage
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&&(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?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=
+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 C=mxUtils.button(mxResources.get("openInThisWindow"),function(){u&&b.hideDialog();null!=d&&d()});C.className="geBtn";C.style.marginBottom="8px";C.style.width="280px";t.appendChild(C);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=C.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,C,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 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=
+f.appendChild(m);f.appendChild(l);k.appendChild(f);var p=c,v,x,z=function(K,q,D,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!=D?Math.max(q/G.width,D/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,D=null==D?100:D,b.hideDialog(),d(K,q,D,p,v,x))},y=function(K,q){if(null!=K){var D=u?null:g.getModel().getGeometry(g.getSelectionCell());null!=D?z(K,D.width,D.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(D){null!=q&&(q.parentNode.removeChild(q),q=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(D){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(K));D.stopPropagation();D.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(D){null!=q&&(q.parentNode.removeChild(q),q=null);if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,
+0,0,b.maxImageSize,function(B,G,M,H,F,J,R,V){y(B,V)},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var G=0;G<B.length;G++)B[G]()},!mxEvent.isControlDown(D),null,null,!0);else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var A=D.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(A)&&y(decodeURIComponent(A))}D.stopPropagation();D.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=
+"file");mxEvent.addListener(L,"change",function(K){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(q,D,A,B,G,M){y(q)},function(){},function(q){return"image/"==q.type.substring(0,6)},function(q){for(var D=0;D<q.length;D++)q[D]()},!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,D,A){p=q;v=D;x=A});b.showDialog(K.container,300,390,!0,!0)});C&&(N.className="geBtn",c.appendChild(N));mxEvent.addListener(m,"change",function(K){p=null;e()});e();C=mxUtils.button(mxResources.get("apply"),function(){y(m.value)});C.className="geBtn gePrimaryBtn";c.appendChild(C);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",C=document.createElement("div"),C.style.position="absolute",C.style.width="420px",C.style.top="58%",C.style.textAlign="center",C.style.fontSize="18px",C.style.color="#a0c3ff",mxUtils.write(C,mxResources.get("dragImagesHere")),k.appendChild(C));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,u,t,C){function c(K,q,D){D=mxUtils.button("",D);
+D.className="geBtn";D.setAttribute("title",q);q=document.createElement("img");q.style.height="26px";q.style.width="26px";q.setAttribute("src",K);D.style.minWidth="42px";D.style.verticalAlign="middle";D.appendChild(q);N.appendChild(D)}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 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&&
+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!=C&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);C=null!=C?C:"_blank";z.setAttribute("title",C);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")});
+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?C: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(D){null!=q&&(q.parentNode.removeChild(q),q=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(D){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(K));D.stopPropagation();D.preventDefault()}));
+mxEvent.addListener(K,"drop",mxUtils.bind(this,function(D){null!=q&&(q.parentNode.removeChild(q),q=null);0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(D.dataTransfer.getData("text/uri-list")),p.setAttribute("checked","checked"),p.checked=!0,L.click());D.stopPropagation();D.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(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";
+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],D=K[1],A=K[2];K=K.slice(3,K.length).join("/");k.value="https://github.com/"+q+"/"+D+"/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],D=K[1],A=K[2];K=K.slice(3,K.length).join("/");k.value=DRAWIO_GITLAB_URL+"/"+q+"/"+D+"/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 C=document.createElement("input");C.setAttribute("type","text");C.style.marginTop="6px";C.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(C.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
+":\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(C,
+"change",function(){0<C.value.length&&0<e.test(C.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")});mxEvent.addListener(C,"keyup",function(){0<C.value.length&&e.test(C.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")})}u.appendChild(C);this.init=function(){C.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(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=
+t.style.overflow="hidden";var C=document.createElement("div");C.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";t.appendChild(C);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(T){return"page"==T&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==T?k+1:"pagecount"==T?null!=g?g.length:1:m.apply(this,arguments)};c.getLinkForCell=function(){return null};Editor.MathJaxRender&&c.addListener(mxEvent.SIZE,mxUtils.bind(this,function(T,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,D=mxUtils.button("",function(){null!=K&&c.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 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=
+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(T){T=y[g[e].getAttribute("id")];mxUtils.setOpacity(M,20);C.innerHTML="";null==T?mxUtils.write(C,
+mxResources.get("pageNotFound")):(J.style.display="none",t.style.display="none",H.style.display="",H.style.backgroundColor=t.style.backgroundColor,T=Editor.parseDiagramNode(T),(new mxCodec(T.ownerDocument)).decode(T,F.getModel()),F.view.scaleAndTranslate(c.view.scale,c.view.translate.x,c.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);C.innerHTML="";"none"==t.style.display&&(J.style.display="",t.style.display="",H.style.display="none")});var J=document.createElement("div");J.style.position=
+"absolute";J.style.textAlign="right";J.style.color="gray";J.style.marginTop="10px";J.style.backgroundColor="transparent";J.style.top="440px";J.style.right="32px";J.style.maxWidth="380px";J.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=K){var T=mxUtils.getXml(K.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(T,Y,"text/xml"):(T="undefined"===typeof pako?"&xml="+encodeURIComponent(T):"&data="+encodeURIComponent(Graph.compress(T)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+T)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var V=mxUtils.button(mxResources.get("restore"),function(T){null!=K&&null!=q&&(mxEvent.isShiftDown(T)?null!=K&&(T=b.getPagesForNode(K.documentElement),T=b.diffPages(b.pages,T),T=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(T,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(ca){b.handleError(ca)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(T.container,620,460,!0,!0),T.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)})}))});
+V.className="geBtn";V.setAttribute("disabled","disabled");V.setAttribute("title","Shift+Click for Diff");var O=document.createElement("select");O.setAttribute("disabled","disabled");O.style.maxWidth="80px";O.style.position="relative";O.style.top="-2px";O.style.verticalAlign="bottom";O.style.marginRight="6px";O.style.display="none";var W=null;mxEvent.addListener(O,"change",function(T){null!=W&&(W(T),mxEvent.consume(T))});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(O.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=l&&(X.style.display="none",V.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 E=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 S=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 P=function(T){var Y=new Date(T.modifiedDate),ca=null;if(0<=Y.getTime()){var ha=function(fa){v.stop();C.innerHTML="";var aa=mxUtils.parseXml(fa),wa=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=wa){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};O.style.display="none";O.innerHTML="";K=aa;q=fa;g=parseSelectFunction=null;k=0;if("mxfile"==wa.nodeName){aa=wa.getElementsByTagName("diagram");g=[];for(fa=0;fa<aa.length;fa++)g.push(aa[fa]);k=Math.min(e,g.length-1);0<g.length&&la(g[k]);if(1<g.length)for(O.removeAttribute("disabled"),O.style.display=
+"",fa=0;fa<g.length;fa++)aa=document.createElement("option"),mxUtils.write(aa,g[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),aa.setAttribute("value",fa),fa==k&&aa.setAttribute("selected","selected"),O.appendChild(aa);W=function(){try{var Ba=parseInt(O.value);k=e=Ba;la(g[Ba])}catch(ua){O.value=e,b.handleError(ua)}}}else Aa(wa);fa=T.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");J.innerHTML="";mxUtils.write(J,(null!=fa?fa+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());J.setAttribute("title",ca.getAttribute("title"));D.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");G.removeAttribute("disabled");M.removeAttribute("disabled");null!=x&&x.isRestricted()||(b.editor.graph.isEnabled()&&V.removeAttribute("disabled"),R.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(M,60)}else O.style.display="none",O.innerHTML="",J.innerHTML="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(C,mxResources.get("errorLoadingFile"))};ca=document.createElement("tr");ca.style.borderBottom="1px solid lightGray";ca.style.fontSize="12px";ca.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";T==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());ca.appendChild(Z);ca.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=T.fileSize?" "+b.formatFileSize(parseInt(T.fileSize)):"")+(null!=T.lastModifyingUserName?" "+T.lastModifyingUserName:""));mxEvent.addListener(ca,"click",function(fa){N!=T&&(v.stop(),null!=L&&(L.style.backgroundColor=""),N=T,L=ca,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",q=K=null,J.removeAttribute("title"),J.innerHTML=
+mxUtils.htmlEntities(mxResources.get("loading")+"..."),t.style.backgroundColor=c.defaultPageBackgroundColor,C.innerHTML="",c.getModel().clear(),V.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),D.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"),O.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(M,20),v.spin(t),T.getXml(function(aa){if(N==T)try{ha(aa)}catch(wa){J.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+wa.message)}},function(aa){v.stop();O.style.display="none";O.innerHTML="";J.innerHTML="";mxUtils.write(J,mxResources.get("errorLoadingFile"));mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(ca,
+"dblclick",function(fa){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);S.appendChild(ca)}return ca}(f[p]);null!=P&&p==f.length-1&&(E=P)}I.appendChild(S);u.appendChild(I)}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!=E&&E.click()};u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn";n.appendChild(O);n.appendChild(D);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(V),z.appendChild(X)):(z.appendChild(R),z.appendChild(U),z.appendChild(V),z.appendChild(X),z.appendChild(u));d.appendChild(z);
+d.appendChild(n);d.appendChild(J);this.container=d},DraftDialog=function(b,f,l,d,u,t,C,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",
+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,D=null,A=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
+G&&null!=D&&null!=D[q]?D[q].getAttribute("name"):"pagenumber"==G?q+1:"pagecount"==G?null!=D?D.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,p()):b.hideDialog(!0))})])});D.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";
+v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);C=mxUtils.button(C||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))})])});C.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=
+this.init=function(){function G(J){if(null!=J){var R=J.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=R;(new mxCodec(J.ownerDocument)).decode(J,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return J}function M(J){null!=J&&(J=G(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(B,"change",function(J){q=parseInt(B.value);M(D[q]);mxEvent.consume(J)});if("mxfile"==K.nodeName){var H=K.getElementsByTagName("diagram");
+D=[];for(var F=0;F<H.length;F++)D.push(H[F]);0<D.length&&M(D[q]);B.innerHTML="";if(1<D.length)for(B.style.display="",F=0;F<D.length;F++)H=document.createElement("option"),mxUtils.write(H,D[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(C),x.appendChild(t)):(x.appendChild(t),x.appendChild(C),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 C(U,X,n,E){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 S=mxUtils.trim(X[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(E&&0<=S.indexOf(n)||!E&&S.substring(0,n.length)===n)||null!=U&&U.test(S))return!0}}return!1}function c(){v&&D.value?(R.removeAttribute("disabled"),V.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));D.value&&q.value?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")}function e(U,
+X,n){F.innerHTML="";var E=k.model.getDescendants(k.model.getRoot()),I=q.value.toLowerCase(),S=A.checked?new RegExp(I):null,Q=null;z=null;m!=I&&(m=I,p=null,x=!1);var P=null==p;if(0<I.length){if(x){x=!1;for(var T,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){T=Y;break}U=(T+1)%b.pages.length;p=null;do x=!1,E=b.pages[U],k=b.createTemporaryGraph(k.getStylesheet()),b.updatePageRoot(E),k.model.setRoot(E.root),U=(U+1)%b.pages.length;while(!e(!0,X,n)&&U!=T);p&&(p=null,n?b.editor.graph.model.execute(new SelectPage(b,
+E)):b.selectPage(E));x=!1;k=b.editor.graph;return e(!0,X,n)}for(Y=0;Y<E.length;Y++){T=k.view.getState(E[Y]);X&&null!=S&&(P=P||T==p);if(null!=T&&null!=T.cell.value&&(P||null==Q)&&(k.model.isVertex(T.cell)||k.model.isEdge(T.cell))){null!=T.style&&"1"==T.style.html?(G.innerHTML=k.sanitizeHtml(k.getLabel(T.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=k.getLabel(T.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ca=0;X&&t&&null!=S&&T==p&&(label=label.substr(y),
+ca=y);var ha=""==D.value,Z=ha;if(null==S&&(Z&&0<=label.indexOf(I)||!Z&&label.substring(0,I.length)===I||ha&&C(S,T.cell,I,Z))||null!=S&&(S.test(label)||ha&&C(S,T.cell,I,Z)))if(t&&(null!=S?(ha=label.match(S),null!=ha&&0<ha.length&&(z=ha[0].toLowerCase(),y=ca+ha.index+z.length)):(z=I,y=z.length)),P){Q=T;break}else null==Q&&(Q=T)}P=P||T==p}}if(null!=Q){if(Y==E.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==I.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 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=K;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";
+N.appendChild(D);mxUtils.br(N);mxEvent.addListener(D,"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&&(D.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 J=function(U,X,n,E,I){if(null==I||"1"!=I.html)return E=U.toLowerCase().indexOf(X,
+E),0>E?U:U.substr(0,E)+n+U.substr(E+X.length);var S=U;X=mxUtils.htmlEntities(X);I=[];var Q=-1;for(U=U.replace(/<br>/ig,"\n");-1<(Q=U.indexOf("<",Q+1));)I.push(Q);Q=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");E=U.toLowerCase().indexOf(X,E);if(0>E)return S;S=E+X.length;n=mxUtils.htmlEntities(n);U=U.substr(0,E)+n+U.substr(S);for(var P=0,T=0;T<I.length;T++){if(I[T]-P<E)U=U.substr(0,I[T])+Q[T]+U.substr(I[T]);else{var Y=I[T]-P<S?E+P:I[T]+(n.length-X.length);U=U.substr(0,Y)+Q[T]+U.substr(Y)}P+=Q[T].length}return U.replace(/\n/g,
+"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=p&&D.value){var U=p.cell,X=k.getLabel(U);k.isCellEditable(U)&&k.model.setValue(U,J(X,z,D.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 V=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=p&&D.value){var U=p.cell,X=k.getLabel(U);k.model.setValue(U,J(X,z,D.value,y-z.length,k.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");V.setAttribute("disabled","disabled")}}catch(n){b.handleError(n)}});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");K.appendChild(V);var O=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(D.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,E={};e(!1,!0,!0)&&100>n;){var I=p.cell,S=k.getLabel(I),Q=E[I.id];if(Q&&Q.replAllMrk==
+L&&Q.replAllPos>=y)break;E[I.id]={replAllMrk:L,replAllPos:y};k.isCellEditable(I)&&(k.model.setValue(I,J(S,z,D.value,y-z.length,k.getCurrentCellStyle(I))),n++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[n]))}catch(P){b.handleError(P)}finally{k.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}L++}});O.setAttribute("title",mxResources.get("replaceAll"));O.style.float="none";O.style.width="120px";
+O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn gePrimaryBtn";O.setAttribute("disabled","disabled");K.appendChild(O);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=
+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,f,l,d,u,t){var C=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()}));
+g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",C.freehand.getBrushSize());g.style.width="90%";g.style.visibility="hidden";b.appendChild(g);mxUtils.br(b);mxEvent.addListener(c,"change",function(){C.freehand.setPerfectFreehandMode(this.checked);g.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(g,"change",function(){C.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){C.freehand.isDrawing()?
+C.freehand.stopDrawing():C.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);
+C.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(C.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){C.freehand.isDrawing()&&C.freehand.stopDrawing()}));
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,
+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,C=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=C.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(){C.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(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"),
+var C="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(C=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?
+(C=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg",c.style.width="32px"):f==b.trello&&(C=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[C]));var e=document.createElement("input");e.setAttribute("type","checkbox");C=mxUtils.button(mxResources.get("authorize"),function(){d(e.checked)});C.insertBefore(c,C.firstChild);C.style.marginTop="6px";C.className="geBigButton";C.style.fontSize=
+"18px";C.style.padding="14px";u.appendChild(t);u.appendChild(b);u.appendChild(C);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 C=b.sidebar.customEntries[t],c={title:b.getResource(C.title),entries:[]},e=0;e<C.entries.length;e++){var g=C.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(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 J=x.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace=
+"nowrap";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.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;J.appendChild(R);mxUtils.write(J," "+F.title);k.appendChild(J);var V=function(O){if(null==O||"INPUT"!=mxEvent.getSource(O).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.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);m.appendChild(W)}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=J;p.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
+O&&mxEvent.consume(O)}};mxEvent.addListener(J,"click",V);mxEvent.addListener(J,"dblclick",function(O){R.checked=!R.checked;mxEvent.consume(O)});v.push(function(){return R.checked?F.id:null});0==B&&0==H&&V()})(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");
+L.style.width="100%";f=document.createElement("td");u=document.createElement("td");C=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(C);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,C],D=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(D/(K/3))],G.title,G.id));D++}})(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()});
+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)C.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{C.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]);C.appendChild(z);mxUtils.br(C);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"),C=document.createElement("div");C.style.height="180px";C.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;t.appendChild(C);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 D=K[q],
+A=App.pluginRegistry[D];null!=A&&(D=A);0<D.length&&0>mxUtils.indexOf(c,D)&&c.push(D)}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),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 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,
+!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,J=(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<J?(G.height-=J-G.y,G.y=J):G.y+G.height>J+H&&
+(G.height=J+H-G.y,G.y=Math.min(G.y,J+H));var R=(G.x-F)/M*100;M=100-(G.x+G.width-F)/M*100;F=(G.y-J)/H*100;G=100-(G.y+G.height-J)/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 C=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 I=
+B.apply(this,arguments);I.livePreview=!1;return I};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,J=(300-H)/2,R=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),V=parseFloat(R[0]),O=parseFloat(R[1]),W=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(V)&&isFinite(O)&&isFinite(W)&&isFinite(U)?(G.x=U/100*M+F,G.y=V/100*H+J,G.width=(100-O)/100*M+F-G.x,G.height=(100-W)/100*H+J-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(I){}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 E=k.getSelectionModel().changeSelection;k.getSelectionModel().changeSelection=function(){E.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);C.appendChild(c);var g=document.createElement("div");g.style.width="300px";g.style.height="300px";g.style.overflow="hidden";g.style.backgroundColor="#fff9";C.appendChild(g);var k=null,m=new mxGeometry(100,
+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";C.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));C.appendChild(f);
+var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";C.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));C.appendChild(f);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";C.appendChild(L);
+f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));C.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);C.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 D=document.createElement("div");D.style.marginTop=
+"10px";D.style.textAlign="right";b.editor.cancelFirst?(D.appendChild(f),D.appendChild(q),D.appendChild(c)):(D.appendChild(q),D.appendChild(c),D.appendChild(f));C.appendChild(D);this.container=C},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"),C=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);C.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);C.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);C.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);C.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);C.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);C.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);C.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);C.appendChild(c);t.appendChild(C);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.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 C(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,J,R,V,O){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==B&&null!=R||null==z[B]){var W=function(){P.innerHTML="";P.style.cursor="pointer";P.style.whiteSpace="nowrap";P.style.textOverflow="ellipsis";mxUtils.write(P,null!=T.title&&0<T.title.length?T.title:mxResources.get("untitled"));P.style.color=null==T.title||0==
+T.title.length?"#d0d0d0":""};v.style.backgroundImage="";x.style.display="none";var U=F,X=J;if(F>b.maxImageSize||J>b.maxImageSize){var n=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,J));F*=n;J*=n}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!=B){var I=document.createElement("img");I.setAttribute("src",K.convert(B));I.style.width=U+"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-U)/2)+"px";E.appendChild(I)}else if(null!=R){var S=b.stringToCells(Graph.decompress(R.xml));0<S.length&&(b.sidebar.createThumb(S,100,100,E,null,!0,!1),E.firstChild.style.display="inline-block",E.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,fa,aa){mxEvent.addListener(Q,"click",function(wa){z[fa]=null;for(var la=0;la<k.length;la++)if(null!=k[la].data&&k[la].data==fa||null!=k[la].xml&&
+null!=aa&&k[la].xml==aa.xml){k.splice(la,1);break}E.parentNode.removeChild(Z);0==k.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(wa)});mxEvent.addListener(Q,"dblclick",function(wa){mxEvent.consume(wa)})})(E,B,R);E.appendChild(Q);E.style.marginBottom="30px";var P=document.createElement("div");P.style.position="absolute";P.style.boxSizing="border-box";P.style.bottom="-18px";P.style.left="10px";P.style.right="10px";P.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";P.style.overflow="hidden";P.style.textAlign="center";var T=null;null!=B?(T={data:B,w:F,h:J,title:O},null!=V&&(T.aspect=V),z[B]=I,k.push(T)):null!=R&&(R.aspect="fixed",k.push(R),T=R);mxEvent.addListener(P,"keydown",function(Z){13==Z.keyCode&&null!=N&&(N(),N=null,mxEvent.consume(Z))});W();E.appendChild(P);mxEvent.addListener(P,"mousedown",function(Z){"true"!=P.getAttribute("contentEditable")&&mxEvent.consume(Z)});S=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
+!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,T.title||"",mxResources.get("ok"),function(aa){null!=aa&&(T.title=aa,W())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(Z)}else if("true"!=P.getAttribute("contentEditable")){null!=N&&(N(),N=null);if(null==T.title||0==T.title.length)P.innerHTML="";P.style.textOverflow="";P.style.whiteSpace="";P.style.cursor="text";P.style.color="";P.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(P.style,"user-select","text");P.focus();document.execCommand("selectAll",!1,null);N=function(){P.removeAttribute("contentEditable");P.style.cursor="pointer";T.title=P.innerHTML;W()};mxEvent.consume(Z)}};mxEvent.addListener(P,"click",S);mxEvent.addListener(E,"dblclick",S);v.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==B&&null!=R&&(Q.style.visibility="hidden",P.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
+R.xml);y=C(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);Q.style.visibility="";P.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(Z){"hidden"==Q.style.visibility&&(Q.style.visibility="",P.style.visibility="");y=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.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 ca=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ca.length;Y++){X=mxUtils.getTextContent(ca[Y]);S=b.stringToCells(Graph.decompress(X));var ha=b.editor.graph.getBoundingBoxFromGeometry(S);
+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=C(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,D(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&&
+!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 D=function(B){return function(G,M,H,F,J,R,V,O,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){c(U,M,H,F,J,R,V,"fixed",mxEvent.isAltDown(B)?
+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&&(c(U.responseText,M,H,F,J,R,V,"fixed",mxEvent.isAltDown(B)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(c(G,M,H,F,J,R,V,"fixed",mxEvent.isAltDown(B)?null:V.substring(0,V.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=
+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,J,R,V,O,W){null!=A.files&&(D(B)(G,M,H,F,J,R,V,O,W),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=
+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"),C=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);C.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 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);
+C.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(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||
+"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);C.appendChild(c);t.appendChild(C);this.container=t},CustomDialog=function(b,f,l,d,u,t,
+C,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!=C&&p.appendChild(C);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";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&&(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,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);
+m.appendChild(p);this.cancelBtn=e;this.okButton=u;this.container=m},TemplatesDialog=function(b,f,l,d,u,t,C,c,e,g,k,m,p,v,x){function z(ia){Ja.innerHTML=mxUtils.htmlEntities(ia);Ja.style.display="block";setTimeout(function(){Ja.style.display="none"},4E3)}function y(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",n=X,X=null)}function L(ia,oa,ba,da,ma,ja,na){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";O.querySelector(".geTempDlgRadioBtn[data-id="+
+da+"]").className="geTempDlgRadioBtn "+(na?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");O.querySelector("."+oa).src="/images/"+ba+"-sel.svg";O.querySelector("."+ma).src="/images/"+ja+".svg";return!0}function N(ia,oa,ba,da){function ma(ka,Ha){null==na?(ka=/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)?PROXY_URL+"?url="+encodeURIComponent(ka):TEMPLATE_PATH+"/"+ka,mxUtils.get(ka,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(na=Ga.getText());Ha(na)}))):Ha(na)}
+function ja(ka,Ha,Ga){if(null!=ka&&mxUtils.isAncestorNode(document.body,oa)&&(ka=mxUtils.parseXml(ka),ka=Editor.extractGraphModel(ka.documentElement,!0),null!=ka)){"mxfile"==ka.nodeName&&(ka=Editor.parseDiagramNode(ka.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(ka.ownerDocument),Sa=new mxGraphModel;Ra.decode(ka,Sa);ka=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(oa,ka,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!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(Ha,Ga),!0,null,!0);var Ia=document.createElement("div");Ia.className="geTempDlgDialogMask";O.appendChild(Ia);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ia&&(O.removeChild(Ia),Ia=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ia,"click",function(){b.sidebar.hideTooltip()})}}var na=null;if(Ca||b.sidebar.currentElt==
+oa)b.sidebar.hideTooltip();else{var sa=function(ka){Ca&&b.sidebar.currentElt==oa&&ja(ka,mxEvent.getClientX(da),mxEvent.getClientY(da));Ca=!1;ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=oa;Ca=!0;ba.src="/images/aui-wait.gif";ia.isExt?e(ia,sa,function(){z(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):ma(ia.url,sa)}}function K(ia,oa,ba){if(null!=E){for(var da=E.className.split(" "),ma=0;ma<da.length;ma++)if(-1<da[ma].indexOf("Active")){da.splice(ma,
+1);break}E.className=da.join(" ")}null!=ia?(E=ia,E.className+=" "+oa,I=ba,Fa.className="geTempDlgCreateBtn"):(I=E=null,Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function q(ia,oa){if(null!=I){var ba=function(sa){na.isExternal?e(na,function(ka){da(ka,sa)},ma):na.url?mxUtils.get(TEMPLATE_PATH+"/"+na.url,mxUtils.bind(this,function(ka){200<=ka.getStatus()&&299>=ka.getStatus()?da(ka.getText(),sa):ma()})):da(b.emptyDiagramXml,sa)},da=function(sa,ka){x||b.hideDialog(!0);f(sa,ka,na,oa)},ma=function(){z(mxResources.get("cannotLoad"));
+ja()},ja=function(){I=na;Fa.className="geTempDlgCreateBtn";oa&&(Ka.className="geTempDlgOpenBtn")},na=I;I=null;"boolean"!==typeof oa&&(oa=na.isExternal&&m);1==ia?g(na.url,na):oa?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),ba,ia,function(sa){var ka=null!=sa&&0<sa.length;return ka&&x?(ba(sa),!1):ka},null,null,null,ja,v?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function D(ia){Fa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ia?"create":"copy"));ia=ia?"none":"";m&&(Ka.style.display=ia);for(var oa=O.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<oa.length;ba++)oa[ba].style.display=ia}function A(ia,oa,ba,da,ma){ma||(aa.innerHTML="",K(),T=ia,Y=da);var ja=null;if(ba){ja=document.createElement("table");
+ja.className="geTempDlgDiagramsListGrid";var na=document.createElement("tr"),sa=document.createElement("th");sa.style.width="50%";sa.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));na.appendChild(sa);sa=document.createElement("th");sa.style.width="25%";sa.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));na.appendChild(sa);sa=document.createElement("th");sa.style.width="25%";sa.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));na.appendChild(sa);ja.appendChild(na);
+aa.appendChild(ja)}for(na=0;na<ia.length;na++){ia[na].isExternal=!oa;var ka=ia[na].url,Ha=(sa=mxUtils.htmlEntities(oa?mxResources.get(ia[na].title,null,ia[na].title):ia[na].title))||ia[na].url,Ga=ia[na].imgUrl,Ra=mxUtils.htmlEntities(ia[na].changedBy||""),Sa="";ia[na].lastModifiedOn&&(Sa=b.timeSince(new Date(ia[na].lastModifiedOn)),null==Sa&&(Sa=mxResources.get("lessThanAMinute")),Sa=mxUtils.htmlEntities(mxResources.get("timeAgo",[Sa],"{1} ago")));Ga||(Ga=TEMPLATE_PATH+"/"+ka.substring(0,ka.length-
+4)+".png");ka=ba?50:15;null!=sa&&sa.length>ka&&(sa=sa.substring(0,ka)+"&hellip;");if(ba){var Ia=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"));ma||Ga.appendChild(Na);Ha=document.createElement("span");Ha.className="geTempDlgDiagramTitle";Ha.innerHTML=sa;Ga.appendChild(Ha);Ia.appendChild(Ga);Ga=document.createElement("td");
+Ga.innerHTML=Ra;Ia.appendChild(Ga);Ga=document.createElement("td");Ga.innerHTML=Sa;Ia.appendChild(Ga);ja.appendChild(Ia);null==E&&(D(oa),K(Ia,"geTempDlgDiagramsListGridActive",ia[na]));(function(La,Ta,Ua){mxEvent.addListener(Ia,"click",function(){E!=Ta&&(D(oa),K(Ta,"geTempDlgDiagramsListGridActive",La))});mxEvent.addListener(Ia,"dblclick",q);mxEvent.addListener(Na,"click",function(Za){N(La,Ta,Ua,Za)})})(ia[na],Ia,Na)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
+Ha);null==E&&(D(oa),K(Pa,"geTempDlgDiagramTileActive",ia[na]));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!=sa?sa:"";Pa.appendChild(Ra);Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));ma||Pa.appendChild(Na);(function(La,Ta,Ua){mxEvent.addListener(Pa,"click",function(){E!=Ta&&(D(oa),K(Ta,"geTempDlgDiagramTileActive",La))});mxEvent.addListener(Pa,
+"dblclick",q);mxEvent.addListener(Na,"click",function(Za){N(La,Ta,Ua,Za)})})(ia[na],Pa,Na);aa.appendChild(Pa)}}for(var Ya in da)ia=da[Ya],0<ia.length&&(ma=document.createElement("div"),ma.className="geTempDlgImportCat",ma.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ma),A(ia,oa,ba,null,!0))}function B(ia,oa){Da.innerHTML="";K();var ba=Math.floor(Da.offsetWidth/150)-1;oa=!oa&&ia.length>ba?ba:ia.length;for(var da=0;da<oa;da++){var ma=ia[da];ma.isCategory=!0;var ja=document.createElement("div"),
+na=mxResources.get(ma.title);null==na&&(na=ma.title.substring(0,1).toUpperCase()+ma.title.substring(1));ja.className="geTempDlgNewDiagramCatItem";ja.setAttribute("title",na);na=mxUtils.htmlEntities(na);15<na.length&&(na=na.substring(0,15)+"&hellip;");null==E&&(D(!0),K(ja,"geTempDlgNewDiagramCatItemActive",ma));var sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemImg";var ka=document.createElement("img");ka.src=NEW_DIAGRAM_CATS_PATH+"/"+ma.img;sa.appendChild(ka);ja.appendChild(sa);
+sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemLbl";sa.innerHTML=na;ja.appendChild(sa);Da.appendChild(ja);(function(Ha,Ga){mxEvent.addListener(ja,"click",function(){E!=Ga&&(D(!0),K(Ga,"geTempDlgNewDiagramCatItemActive",Ha))});mxEvent.addListener(ja,"dblclick",q)})(ma,ja)}ja=document.createElement("div");ja.className="geTempDlgNewDiagramCatItem";na=mxResources.get("showAllTemps");ja.setAttribute("title",na);sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemImg";
+sa.innerHTML="...";sa.style.fontSize="32px";ja.appendChild(sa);sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemLbl";sa.innerHTML=na;ja.appendChild(sa);Da.appendChild(ja);mxEvent.addListener(ja,"click",function(){function Ha(){var Ra=Ga.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ha,200)}Z=!0;var Ga=O.querySelector(".geTemplatesList");Ga.style.display="block";Aa.style.width="";Oa.style.display="";Oa.value="";ca=null;Ha()});fa.style.display=ia.length<=
+ba?"none":""}function G(ia,oa,ba){function da(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 ma(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&&(U=!0),wa.innerHTML=Ya,la.style.display="none",A(Ua?oa[Qa]:Ta?pa[Qa][Ta]:ia[Qa],Ua?!1:!0))})}var ja=O.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"));ja.appendChild(ba);for(var na in oa){ba=document.createElement("div");var sa=oa[na];
+sa=da(na,sa);ba.className="geTemplateCatLink";ba.setAttribute("title",sa.fullLbl);ba.innerHTML=sa.lbl;ja.appendChild(ba);ma(na,sa.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");ja.appendChild(ba)}for(na in ia){var ka=pa[na],Ha=ba=document.createElement(ka?"ul":"div");sa=ia[na];sa=da(na,sa);if(null!=ka){var Ga=document.createElement("li"),Ra=document.createElement("div");
+Ra.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Ra.style.padding="0";Ra.setAttribute("title",sa.fullLbl);Ra.innerHTML=sa.lbl;Ha=Ra;Ga.appendChild(Ra);var Sa=document.createElement("ul");Sa.className="geTempTreeNested";Sa.style.visibility="hidden";for(var Ia in ka){var Na=document.createElement("li"),Pa=da(Ia,ka[Ia]);Na.setAttribute("title",Pa.fullLbl);Na.innerHTML=Pa.lbl;Na.className="geTemplateCatLink";Na.style.padding="0";Na.style.margin="0";ma(na,Pa.lblOnly,Na,Ia);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 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 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]):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">'+
+ba.setAttribute("title",sa.fullLbl),ba.innerHTML=sa.lbl;ja.appendChild(ba);ma(na,sa.lblOnly,Ha)}}function M(){mxUtils.get(d,function(ia){if(!Ma){Ma=!0;ia=ia.getXml().documentElement.firstChild;for(var oa={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var ba=ia.getAttribute("name"),da=ia.getElementsByTagName("add"),ma=[],ja=0;ja<da.length;ja++)ma.push(encodeURIComponent(mxUtils.getTextContent(da[ja])));null!=ba&&0<ma.length&&(oa[ba]=ma.join(";"))}else if(ma=ia.getAttribute("url"),
+null!=ma){da=ia.getAttribute("section");ba=ia.getAttribute("subsection");if(null==da&&(ja=ma.indexOf("/"),da=ma.substring(0,ja),null==ba)){var na=ma.indexOf("/",ja+1);-1<na&&(ba=ma.substring(ja+1,na))}ja=ya[da];null==ja&&(xa++,ja=[],ya[da]=ja);ma=ia.getAttribute("clibs");null!=oa[ma]&&(ma=oa[ma]);ma={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:ma,tags:ia.getAttribute("tags")};ja.push(ma);null!=
+ba&&(ja=pa[da],null==ja&&(ja={},pa[da]=ja),da=ja[ba],null==da&&(da=[],ja[ba]=da),da.push(ma))}ia=ia.nextSibling}G(ya,ea,va)}})}function H(ia){C&&(Aa.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,W=!0,wa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ca=null,C(qa,function(){z(mxResources.get("cannotLoad"));qa([])},ia?null:t))}function F(ia){if(""==ia)null!=n&&(n.click(),n=null);else{if(null==TemplatesDialog.tagsList[d]){var oa={};for(Ha in ya)for(var ba=ya[Ha],da=0;da<ba.length;da++){var ma=
+ba[da];if(null!=ma.tags)for(var ja=ma.tags.toLowerCase().split(";"),na=0;na<ja.length;na++)null==oa[ja[na]]&&(oa[ja[na]]=[]),oa[ja[na]].push(ma)}TemplatesDialog.tagsList[d]=oa}var sa=ia.toLowerCase().split(" ");oa=TemplatesDialog.tagsList[d];if(0<va&&null==oa.__tagsList__){for(Ha in ea)for(ba=ea[Ha],da=0;da<ba.length;da++)for(ma=ba[da],ja=ma.title.split(" "),ja.push(Ha),na=0;na<ja.length;na++){var ka=ja[na].toLowerCase();null==oa[ka]&&(oa[ka]=[]);oa[ka].push(ma)}oa.__tagsList__=!0}var Ha=[];ba={};
+for(da=ja=0;da<sa.length;da++)if(0<sa[da].length){ka=oa[sa[da]];var Ga={};Ha=[];if(null!=ka)for(na=0;na<ka.length;na++)ma=ka[na],0==ja==(null==ba[ma.url])&&(Ga[ma.url]=!0,Ha.push(ma));ba=Ga;ja++}0==Ha.length?wa.innerHTML=mxResources.get("noResultsFor",[ia]):A(Ha,!0)}}function J(ia){if(ca!=ia||Q!=ha)y(),Aa.scrollTop=0,aa.innerHTML="",wa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',ta=null,Z?F(ia):c&&(ia?(Ea.spin(aa),U=!1,W=!0,c(ia,qa,function(){z(mxResources.get("searchFailed"));
+qa([])},Q?null:t)):H(Q)),ca=ia,ha=Q}function R(ia){null!=ta&&clearTimeout(ta);13==ia.keyCode?J(Oa.value):ta=setTimeout(function(){J(Oa.value)},1E3)}var V='<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>'+
-(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(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=
+(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>",O=document.createElement("div");O.innerHTML=V;O.className=
+"geTemplateDlg";this.container=O;d=null!=d?d:TEMPLATE_PATH+"/index.xml";u=null!=u?u:NEW_DIAGRAM_CATS_PATH+"/index.xml";var W=!1,U=!1,X=null,n=null,E=null,I=null,S=!1,Q=!0,P=!1,T=[],Y=null,ca,ha,Z=!1,fa=O.querySelector(".geTempDlgShowAllBtn"),aa=O.querySelector(".geTempDlgDiagramsTiles"),wa=O.querySelector(".geTempDlgDiagramsListTitle"),la=O.querySelector(".geTempDlgDiagramsListBtns"),Aa=O.querySelector(".geTempDlgContent"),Ba=O.querySelector(".geTempDlgDiagramsList"),ua=O.querySelector(".geTempDlgNewDiagramCat"),
+Da=O.querySelector(".geTempDlgNewDiagramCatList"),Fa=O.querySelector(".geTempDlgCreateBtn"),Ka=O.querySelector(".geTempDlgOpenBtn"),Oa=O.querySelector(".geTempDlgSearchBox"),Ja=O.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(O.querySelector(".geTempDlgBack"),"click",function(){y();Z=!1;O.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="";ca=null;H(Q)});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==ca?H(Q):J(ca))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(Q=!1,null==ca?H(Q):J(ca))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(P=!0,A(T,!1,P,Y))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(P=!1,A(T,!1,P,Y))});
+var Ca=!1;mxEvent.addListener(fa,"click",function(){S?(ua.style.height="280px",Da.style.height="190px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),B(ra)):(ua.style.height="440px",Da.style.height="355px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),B(ra,!0));S=!S});var Ma=!1,za=!1,ya={},pa={},ea={},ra=[],xa=1,va=0;null!=k?k(function(ia,oa){ea=ia;va=oa;M()},M):M();mxUtils.get(u,function(ia){if(!za){za=!0;for(ia=ia.getXml().documentElement.firstChild;null!=ia;)"undefined"!==
+typeof ia.getAttribute&&null!=ia.getAttribute("title")&&ra.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;B(ra)}});var qa=function(ia,oa,ba){la.style.display="";Ea.stop();W=!1;if(U)U=!1;else if(oa)aa.innerHTML=oa;else{ba=ba||{};oa=0;for(var da in ba)oa+=ba[da].length;0==ia.length&&0==oa?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):A(ia,!1,P,0==oa?null:ba)}};H(Q);var ta=null;mxEvent.addListener(Oa,
+"keyup",R);mxEvent.addListener(Oa,"search",R);mxEvent.addListener(Oa,"input",R);mxEvent.addListener(Fa,"click",function(ia){q(!1,!1)});m&&mxEvent.addListener(Ka,"click",function(ia){q(!1,!0)});p&&mxEvent.addListener(O.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ia){q(!0)});mxEvent.addListener(O.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 C="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
+(C=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(C=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[C],"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(K){this.style.border="";13==K.keyCode&&N.click()}var C=document.createElement("table"),c=document.createElement("tbody");C.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 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",
@@ -11387,41 +11389,41 @@ e.appendChild(g);var x=document.createElement("input");"g"==d&&x.setAttribute("v
"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};
+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 D=Editor.GOOGLE_FONTS+encodeURIComponent(K).replace(/%20/g,"+");q="g"}else z.checked&&(K=y.value,D=L.value,q="w");var A=D;var B=q,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==K||0==K.length?(C.querySelector(".dlg_fontName_"+B).style.border="1px solid red",A=!1):"w"!=B||G.test(A)?A=!0:(C.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",A=!1);A&&(u(K,D,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);C.appendChild(c);this.container=C};
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)};
+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 C=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));l.appendChild(C);C.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||l.appendChild(t);C.setAttribute("disabled","disabled");this.okBtn=C;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)};
AspectDialog.prototype.createViewer=function(b,f,l,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var u=new Graph(b);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!1);u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var t=f.getAttribute("background");if(null==t||""==t||t==mxConstants.NONE)t=null!=d?d:"#ffffff";b.style.backgroundColor=t;d=new mxCodec(f.ownerDocument);b=u.getModel();d.decode(f,b);f=b.getChildCount(b.root);
-d=null==l;for(t=0;t<f;t++){var D=b.getChildAt(b.root,t);b.setVisible(D,d||l==D.id)}u.maxFitScale=1;u.fit(0);u.center()}return u};
+d=null==l;for(t=0;t<f;t++){var C=b.getChildAt(b.root,t);b.setVisible(C,d||l==C.id)}u.maxFitScale=1;u.fit(0);u.center()}return u};
AspectDialog.prototype.createPageItem=function(b,f,l){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var u=this.createViewer(d.childNodes[0],l);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var t=u.model;t=t.getChildCells(t.getRoot());for(var D=0;D<t.length;D++)this.createLayerItem(t[D],b,u,l)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var t=u.model;t=t.getChildCells(t.getRoot());for(var C=0;C<t.length;C++)this.createLayerItem(t[C],b,u,l)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
AspectDialog.prototype.createLayerItem=function(b,f,l,d){f=l.convertValueToString(b)||mxResources.get("background")||"Background";var u=document.createElement("div");u.setAttribute("data-layer-id",b.id);u.className="geAspectDlgListItem";u.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(u);this.createViewer(u.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=u.className.indexOf("geAspectDlgListItemSelected")?
(u.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(u.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(u,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b){var f=document.createElement("table"),l=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var u=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var t=function(){};if(/(\.png)$/i.test(u)){t=1;var D=0;u=b.fileNode;null!=u&&(u.hasAttribute("scale")&&(t=parseFloat(u.getAttribute("scale"))),u.hasAttribute("border")&&(D=parseInt(u.getAttribute("border"))));u=document.createElement("tr");var c=document.createElement("td");
+var FilePropertiesDialog=function(b){var f=document.createElement("table"),l=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var u=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var t=function(){};if(/(\.png)$/i.test(u)){t=1;var C=0;u=b.fileNode;null!=u&&(u.hasAttribute("scale")&&(t=parseFloat(u.getAttribute("scale"))),u.hasAttribute("border")&&(C=parseInt(u.getAttribute("border"))));u=document.createElement("tr");var c=document.createElement("td");
c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("zoom")+":");u.appendChild(c);var e=document.createElement("input");e.setAttribute("value",100*t+"%");e.style.marginLeft="4px";e.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);u.appendChild(c);l.appendChild(u);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("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,
+mxUtils.write(c,mxResources.get("borderWidth")+":");u.appendChild(c);var g=document.createElement("input");g.setAttribute("value",C);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 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(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:
+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");C=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});C.className="geBtn";b.editor.cancelFirst&&c.appendChild(C);c.appendChild(t);b.editor.cancelFirst||c.appendChild(C);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(F,J){F=new mxCell("",new mxGeometry(F,J,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 C(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 J=parseInt(M.value)||0;J=0>J?0:100<J?100:J;M.value=J;var R=parseInt(G.value)||0,V=parseInt(H.value)||0;F=m.getConnectionPoint(x,new mxConnectionConstraint(new mxPoint(F/100,J/100),!1,null,R,V));J=m.getSelectionCell();if(null!=J){R=J.geometry.clone();V=m.view.scale;var O=m.view.translate;R.x=(F.x-3*V)/V-O.x;R.y=(F.y-3*V)/V-O.y;m.model.setGeometry(J,R)}}function e(F){var J=0,R=0,V=p.geometry,O=mxUtils.format((F.geometry.x+3-V.x)/V.width);F=mxUtils.format((F.geometry.y+3-V.y)/V.height);
+0>O?(J=O*V.width,O=0):1<O&&(J=(O-1)*V.width,O=1);0>F?(R=F*V.height,F=0):1<F&&(R=(F-1)*V.height,F=1);return{x:O,y:F,dx:parseInt(J),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,J){if(null!=J&&J!=p)m.setSelectionCell(J);else{J=
+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((J.x-3*F)/F-R.x,(J.y-3*F)/F-R.y))}};u=new mxKeyHandler(m);u.bindKey(46,C);u.bindKey(8,C);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");
+60);var K=mxUtils.button("",C);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 D=document.createElement("select");D.style.position="relative";D.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,D.appendChild(N);k.appendChild(D);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 J=D.value,R=p.geometry,V=[],O=0;O<F;O++){switch(J){case "left":var W=R.x;var U=R.y+(O+1)*R.height/(F+1);break;case "right":W=R.x+R.width;U=R.y+(O+1)*R.height/(F+1);break;case "top":W=R.x+(O+1)*R.width/(F+1);U=R.y;break;case "bottom":W=R.x+(O+1)*R.width/(F+1),U=R.y+R.height}V.push(t(W-3,U-3))}m.setSelectionCells(V)});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",
+m.model.cells,J=[],R=[],V;for(V in F){var O=F[V];O.cp&&R.push(e(O))}R.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<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||J.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+J.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"},
@@ -11448,111 +11450,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(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},
+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,E){return"1"==mxUtils.getValue(n.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(n,E){return"1"!=mxUtils.getValue(n.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(n,E){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,E){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,E){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,E){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,E){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,E){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,E){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,
+E){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,E){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,E){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,E){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,E){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(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(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"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(n,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.isTableCell(n.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(n,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.isTableCell(n.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(n,
+E){n=E.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,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.isTable(n.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(n,E){n=E.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,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.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(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},
+{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,E){return E.editorUi.editor.graph.isCellConnectable(0<n.vertices.length&&0==n.edges.length?n.vertices[0]:null)},isVisible:function(n,E){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(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=
+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,E){return 1==n.vertices.length&&0==n.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(n,E){n=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;E=E.editorUi.editor.graph;return null!=n&&(E.isSwimlane(n)||0<E.model.getChildCount(n))},isVisible:function(n,E){return 1==n.vertices.length&&0==n.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(n,E){var I=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;E=E.editorUi.editor.graph;return null!=I&&(E.isContainer(I)&&
+"0"!=n.style.collapsible||!E.isContainer(I)&&"1"==n.style.collapsible)},isVisible:function(n,E){return 1==n.vertices.length&&0==n.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(n,E){return 1==n.vertices.length&&0==n.edges.length&&!E.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,E){E=E.editorUi.editor.graph.model;return 0<n.vertices.length?E.isVertex(E.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,E){n=0<n.vertices.length?
+E.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,E){var I=mxUtils.getValue(n.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(n.vertices[0])||null==I||I==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,E){return 0<n.vertices.length&&E.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 E=rough.canvas({getContext:function(){return n}});E.draw=function(I){var S=I.sets||[];I=I.options||this.getDefaultOptions();for(var Q=0;Q<S.length;Q++){var P=S[Q];switch(P.type){case "path":null!=I.stroke&&this._drawToContext(n,P,I);break;case "fillPath":this._drawToContext(n,P,I);break;case "fillSketch":this.fillSketch(n,P,I)}}};E.fillSketch=function(I,S,Q){var P=n.state.strokeColor,T=n.state.strokeWidth,Y=n.state.strokeAlpha,ca=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(I,S,Q);n.setDashed(ca);n.setStrokeWidth(T);n.setStrokeColor(P);n.setStrokeAlpha(Y)};E._drawToContext=function(I,S,Q){I.begin();for(var P=0;P<S.ops.length;P++){var T=S.ops[P],Y=T.data;switch(T.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"===
+S.type&&Q.filled?I.fill():I.stroke()};return E};(function(){function n(P,T,Y){this.canvas=P;this.rc=T;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,
+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(P,T){var Y=1;if(null!=this.shape.state){var ca=this.shape.state.cell.id;if(null!=ca)for(var ha=0;ha<ca.length;ha++)Y=(Y<<5)-Y+ca.charCodeAt(ha)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ca=this.rc.getDefaultOptions();Y.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+this.canvas.state.strokeColor:mxConstants.NONE;P=null;(Y.filled=T)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ca.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ca.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ca.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",ca.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ca.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ca.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ca.disableMultiStrokeFill);T=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==T?-1:T;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",T);Y.dashOffset=mxUtils.getValue(this.shape.style,
+"dashOffset",T);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",T);T=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==T?-1:T;T=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==T&&(T=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),T=null!=Y.fill&&(null!=P||null!=T&&Y.fill==T)?"solid":ca.fillStyle);Y.fillStyle=T;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 P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};n.prototype.lineTo=function(P,T){this.passThrough?this.originalLineTo.apply(this.canvas,
+arguments):(this.addOp(this.lineOp,P,T),this.lastX=P,this.lastY=T)};n.prototype.moveTo=function(P,T){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,T),this.lastX=P,this.lastY=T,this.firstX=P,this.firstY=T)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(P,T,Y,ca){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,
+T,Y,ca),this.lastX=Y,this.lastY=ca)};n.prototype.curveTo=function(P,T,Y,ca,ha,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,T,Y,ca,ha,Z),this.lastX=ha,this.lastY=Z)};n.prototype.arcTo=function(P,T,Y,ca,ha,Z,fa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,P,T,Y,ca,ha,Z,fa);if(null!=aa)for(var wa=0;wa<aa.length;wa+=6)this.curveTo(aa[wa],aa[wa+1],aa[wa+2],aa[wa+3],aa[wa+4],
+aa[wa+5]);this.lastX=Z;this.lastY=fa}};n.prototype.rect=function(P,T,Y,ca){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,T,Y,ca,this.getStyle(!0,!0)))};n.prototype.ellipse=function(P,T,Y,ca){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+Y/2,T+ca/2,Y,ca,this.getStyle(!0,!0)))};n.prototype.roundrect=function(P,T,Y,ca,ha,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(P+ha,T),this.lineTo(P+Y-ha,T),this.quadTo(P+Y,T,P+Y,T+Z),this.lineTo(P+Y,T+ca-Z),this.quadTo(P+Y,T+ca,P+Y-ha,T+ca),this.lineTo(P+ha,T+ca),this.quadTo(P,T+ca,P,T+ca-Z),this.lineTo(P,T+Z),this.quadTo(P,T,P+ha,T))};n.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var T in P)this.nextShape.options[T]=P[T];P.stroke!=mxConstants.NONE&&null!=
+P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};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=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=
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new n(P,Editor.createRoughCanvas(P),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){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(P):this.createRoughCanvas(P)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,T,Y,ca,ha){null!=P.handJiggle&&P.handJiggle.passThrough||I.apply(this,arguments)};var S=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var T=P.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==n&&!this.outline){P.save();
+var ca=this.fill,ha=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,fa=P.setStrokeColor;P.setStrokeColor=function(){};var aa=P.setFillColor;P.setFillColor=function(){};Y||null==ca||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;S.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=aa;P.setStrokeColor=fa;this.configurePointerEvents=Z;this.stroke=ha;this.fill=ca;P.restore();Y&&null!=ca&&(P.addTolerance=function(){})}S.apply(this,arguments);
+P.addTolerance=T};var Q=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,T,Y,ca,ha,Z){null!=P.handJiggle&&P.handJiggle.constructor==n?(P.handJiggle.passThrough=!0,Q.apply(this,arguments),P.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,E,I){if(null!=n&&"undefined"!==typeof pako){var S=n.ownerDocument.getElementsByTagName("div"),Q=[];if(null!=S&&0<S.length)for(var P=0;P<S.length;P++)if("mxgraph"==S[P].getAttribute("class")){Q.push(S[P]);break}0<Q.length&&(S=Q[0].getAttribute("data-mxgraph"),null!=S?(Q=JSON.parse(S),null!=Q&&null!=Q.xml&&(n=mxUtils.parseXml(Q.xml),n=n.documentElement)):(Q=Q[0].getElementsByTagName("div"),0<Q.length&&
+(S=mxUtils.getTextContent(Q[0]),S=Graph.decompress(S,null,I),0<S.length&&(n=mxUtils.parseXml(S),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(S=n.getAttribute("content"),null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(cont,S))),null!=S&&"%"==S.charAt(0)&&(S=decodeURIComponent(S)),null!=S&&0<S.length)n=mxUtils.parseXml(S).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||E||(Q=null,"diagram"==n.nodeName?Q=n:"mxfile"==
+n.nodeName&&(S=n.getElementsByTagName("diagram"),0<S.length&&(Q=S[Math.max(0,Math.min(S.length-1,urlParams.page||0))])),null!=Q&&(n=Editor.parseDiagramNode(Q,I)));null==n||"mxGraphModel"==n.nodeName||E&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,E){var I=mxUtils.trim(mxUtils.getTextContent(n)),S=null;0<I.length?(n=Graph.decompress(I,null,E),null!=n&&0<n.length&&(S=mxUtils.parseXml(n).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(S=mxUtils.createXmlDocument(),
+S.appendChild(S.importNode(n[0],!0)),S=S.documentElement));return S};Editor.getDiagramNodeXml=function(n){var E=mxUtils.getTextContent(n),I=null;0<E.length?I=Graph.decompress(E):null!=n.firstChild&&(I=mxUtils.getXml(n.firstChild));return I};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 E=n.indexOf("EmbeddedFile");if(-1<E){var I=n.indexOf("stream",E)+9;if(0<n.substring(E,I).indexOf("application#2Fvnd.jgraph.mxfile"))return E=
+n.indexOf("endstream",I-1),pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(I,E)),{to:"string"})}return null}I=null;E="";for(var S=0,Q=0,P=[],T=null;Q<n.length;){var Y=n.charCodeAt(Q);Q+=1;10!=Y&&(E+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(S)?S++:S=0;if(19==S){var ca=n.indexOf("%3C%2Fmxfile%3E)",Q)+15;Q-=9;if(ca>Q){I=n.substring(Q,ca);break}}10==Y&&("endobj"==E?T=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(T=[],P[E.split(" ")[0]]=T):null!=T&&T.push(E),
+E="")}null==I&&(I=Editor.extractGraphModelFromXref(P));null!=I&&(I=decodeURIComponent(I.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return I};Editor.extractGraphModelFromXref=function(n){var E=n.trailer,I=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=n[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(n=n[E[1]],null!=n&&(n=n.join("\n"),I=n.substring(1,n.length-1))))));return I};Editor.extractParserError=function(n,E){var I=
+null;n=null!=n?n.getElementsByTagName("parsererror"):null;null!=n&&0<n.length&&(I=E||mxResources.get("invalidChars"),E=n[0].getElementsByTagName("div"),0<E.length&&(I=mxUtils.getTextContent(E[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(n,E){null!=n&&(n=null!=n.error?n.error:n,null==n.retry&&(n.retry=E))};Editor.configure=function(n,E){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=
+null!=n.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=n.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=n.css){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(n.css));var S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(I,S)}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!=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&&(I=parseFloat(n.zoomFactor),!isNaN(I)&&1<I?Graph.prototype.zoomFactor=I:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=n.gridSteps&&(I=parseInt(n.gridSteps),!isNaN(I)&&0<I?mxGraphView.prototype.gridSteps=I:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=n.pageFormat&&(I=parseInt(n.pageFormat.width),S=parseInt(n.pageFormat.height),!isNaN(I)&&0<I&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,I,S),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&&(I=parseInt(n.sidebarTitleSize),!isNaN(I)&&0<I?Sidebar.prototype.sidebarTitleSize=I: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&&(I=parseInt(n.autosaveDelay),!isNaN(I)&&0<I?DrawioFile.prototype.autosaveDelay=I:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=n.plugins&&!E)for(App.initPluginCallback(),E=0;E<n.plugins.length;E++)mxscript(n.plugins[E]);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 E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(n));E.parentNode.insertBefore(I,E);n=n.split("url(");for(I=1;I<n.length;I++){var S=n[I].indexOf(")");S=Editor.trimCssUrl(n[I].substring(0,S));var Q=
+document.createElement("link");Q.setAttribute("rel","preload");Q.setAttribute("href",S);Q.setAttribute("as","font");Q.setAttribute("crossorigin","");E.parentNode.insertBefore(Q,E)}}}};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 E=[],I=0;I<n;I++)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(n){n=null!=n&&"mxlibrary"!=n.nodeName?this.extractGraphModel(n):
+null;if(null!=n){var E=Editor.extractParserError(n,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[n],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==n.nodeName){E=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=E)E!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=I&&(S=new mxCodec(I.ownerDocument),
+S.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 S=new mxCodec(I.ownerDocument);S.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");E=n.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"==n.getAttribute("shadow"),!1);if(E=n.getAttribute("extFonts"))try{for(E=E.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}}),I=0;I<E.length;I++)this.graph.addExtFont(E[I].name,E[I].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,E){n=null!=n?n:!0;var I=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var S=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+E);null!=S&&I.setAttribute("backgroundImage",JSON.stringify(S));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&&(S=this.graph.extFonts.map(function(Q){return Q.name+"^"+Q.url}),I.setAttribute("extFonts",S.join("|")));return I};Editor.prototype.isDataSvg=function(n){try{var E=mxUtils.parseXml(n).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 I=mxUtils.parseXml(E).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=function(n,E,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=
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(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!=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;
+!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,E){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(T){window.setTimeout(function(){"hidden"!=T.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,T])},0)};var I=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";E=null!=E?E:{"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(E);
+MathJax.Hub.Register.StartupHook("Begin",function(){for(var T=0;T<Editor.mathJaxQueue.length;T++)Editor.doMathJaxRender(Editor.mathJaxQueue[T])})}};Editor.MathJaxRender=function(T){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(T):Editor.mathJaxQueue.push(T)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var S=Editor.prototype.init;Editor.prototype.init=function(){S.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(T,
+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 Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",n);I[0].parentNode.appendChild(Q)}try{if(mxClient.IS_GC||mxClient.IS_SF){var P=document.createElement("style");P.type="text/css";P.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(P)}}catch(T){}}};
+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 E=[];n.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(I,S,Q,P){void 0!==S?E.push(S.replace(/\\'/g,"'")):void 0!==Q?E.push(Q.replace(/\\"/g,
+'"')):void 0!==P&&E.push(P);return""});/,\s*$/.test(n)&&E.push("");return E};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 E=n.convert,I=this;n.convert=function(S){if(null!=S){var Q="http://"==S.substring(0,7)||"https://"==S.substring(0,8);Q&&!navigator.onLine?S=Editor.svgBrokenImage.src:!Q||S.substring(0,n.baseUrl.length)==n.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(S)?"chrome-extension://"==S.substring(0,19)||mxClient.IS_CHROMEAPP||(S=E.apply(this,
+arguments)):S=PROXY_URL+"?url="+encodeURIComponent(S)}return S};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,E){try{var I=!0,S=window.setTimeout(mxUtils.bind(this,function(){I=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(n))mxUtils.get(n,mxUtils.bind(this,function(P){window.clearTimeout(S);I&&E(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(S);
+I&&E(Editor.svgBrokenImage.src)});else{var Q=new Image;this.crossOriginImages&&(Q.crossOrigin="anonymous");Q.onload=function(){window.clearTimeout(S);if(I)try{var P=document.createElement("canvas"),T=P.getContext("2d");P.height=Q.height;P.width=Q.width;T.drawImage(Q,0,0);E(P.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};Q.onerror=function(){window.clearTimeout(S);I&&E(Editor.svgBrokenImage.src)};Q.src=n}}catch(P){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(n,E,I,
+S){null==S&&(S=this.createImageUrlConverter());var Q=0,P=I||{};I=mxUtils.bind(this,function(T,Y){T=n.getElementsByTagName(T);for(var ca=0;ca<T.length;ca++)mxUtils.bind(this,function(ha){try{if(null!=ha){var Z=S.convert(ha.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var fa=P[Z];null==fa?(Q++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(P[Z]=aa,ha.setAttribute(Y,aa));Q--;0==Q&&E(n)})):ha.setAttribute(Y,fa)}else null!=Z&&ha.setAttribute(Y,Z)}}catch(aa){}})(T[ca])});I("image","xlink:href");
+I("img","src");0==Q&&E(n)};Editor.base64Encode=function(n){for(var E="",I=0,S=n.length,Q,P,T;I<S;){Q=n.charCodeAt(I++)&255;if(I==S){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4);E+="==";break}P=n.charCodeAt(I++);if(I==S){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&
+3)<<4|(P&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);E+="=";break}T=n.charCodeAt(I++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4|(P&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(T&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T&63)}return E};
+Editor.prototype.loadUrl=function(n,E,I,S,Q,P,T,Y){try{var ca=!T&&(S||/(\.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!=E){var fa=Z.getText();if(ca){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("")}P=null!=P?P:"data:image/png;base64,";fa=P+Editor.base64Encode(fa)}E(fa)}}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()})},ca,this.timeout,function(){Q&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:ha})},Y)});ha()}catch(Z){null!=I&&I(Z)}};
+Editor.prototype.absoluteCssFonts=function(n){var E=null;if(null!=n){var I=n.split("url(");if(0<I.length){E=[I[0]];n=window.location.pathname;var S=null!=n?n.lastIndexOf("/"):-1;0<=S&&(n=n.substring(0,S+1));S=document.getElementsByTagName("base");var Q=null;null!=S&&0<S.length&&(Q=S[0].getAttribute("href"));for(var P=1;P<I.length;P++)if(S=I[P].indexOf(")"),0<S){var T=Editor.trimCssUrl(I[P].substring(0,S));this.graph.isRelativeUrl(T)&&(T=null!=Q?Q+T:window.location.protocol+"//"+window.location.hostname+
+("/"==T.charAt(0)?"":n)+T);E.push('url("'+T+'"'+I[P].substring(S))}else E.push(I[P])}else E=[n]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(n,E,I){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));I(n,E)};Editor.prototype.embedCssFonts=function(n,E){var I=n.split("url("),S=0;null==this.cachedFonts&&(this.cachedFonts={});var Q=mxUtils.bind(this,function(){if(0==S){for(var ca=[I[0]],ha=1;ha<I.length;ha++){var Z=I[ha].indexOf(")");
+ca.push('url("');ca.push(this.cachedFonts[Editor.trimCssUrl(I[ha].substring(0,Z))]);ca.push('"'+I[ha].substring(Z))}E(ca.join(""))}});if(0<I.length){for(n=1;n<I.length;n++){var P=I[n].indexOf(")"),T=null,Y=I[n].indexOf("format(",P);0<Y&&(T=Editor.trimCssUrl(I[n].substring(Y+7,I[n].indexOf(")",Y))));mxUtils.bind(this,function(ca){if(null==this.cachedFonts[ca]){this.cachedFonts[ca]=ca;S++;var ha="application/x-font-ttf";if("svg"==T||/(\.svg)($|\?)/i.test(ca))ha="image/svg+xml";else if("otf"==T||"embedded-opentype"==
+T||/(\.otf)($|\?)/i.test(ca))ha="application/x-font-opentype";else if("woff"==T||/(\.woff)($|\?)/i.test(ca))ha="application/font-woff";else if("woff2"==T||/(\.woff2)($|\?)/i.test(ca))ha="application/font-woff2";else if("eot"==T||/(\.eot)($|\?)/i.test(ca))ha="application/vnd.ms-fontobject";else if("sfnt"==T||/(\.sfnt)($|\?)/i.test(ca))ha="application/font-sfnt";this.mapFontUrl(ha,ca,mxUtils.bind(this,function(Z,fa){this.loadUrl(fa,mxUtils.bind(this,function(aa){this.cachedFonts[ca]=aa;S--;Q()}),mxUtils.bind(this,
+function(aa){S--;Q()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[n].substring(0,P)),T)}Q()}else E(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(n[E]=Graph.fontMapping[E]);return n};Editor.prototype.embedExtFonts=
+function(n){var E=this.graph.getCustomFonts();if(0<E.length){var I=[],S=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var Q=mxUtils.bind(this,function(){0==S&&this.embedCssFonts(I.join(""),n)}),P=0;P<E.length;P++)mxUtils.bind(this,function(T,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(S++,this.loadUrl(Y,mxUtils.bind(this,function(ca){this.cachedGoogleFonts[Y]=ca;I.push(ca+"\n");S--;Q()}),mxUtils.bind(this,function(ca){S--;I.push("@import url("+
+Y+");\n");Q()}))):I.push(this.cachedGoogleFonts[Y]+"\n"):I.push('@font-face {font-family: "'+T+'";src: url("'+Y+'")}\n')})(E[P].name,E[P].url);Q()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var E=document.getElementsByTagName("style"),I=0;I<E.length;I++){var S=mxUtils.getTextContent(E[I]);0>S.indexOf("mxPageSelector")&&0<S.indexOf("MathJax")&&n[0].appendChild(E[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(n,E){E=null!=
+E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var I=n.getElementsByTagName("defs"),S=n.ownerDocument;0==I.length?(I=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=n.firstChild?n.insertBefore(I,n.firstChild):n.appendChild(I)):I=I[0];n=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"style"):S.createElement("style");n.setAttribute("type","text/css");mxUtils.setTextContent(n,E);I.appendChild(n)}};Editor.prototype.isExportToCanvas=
+function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,E,I){var S=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(S/n,S/E))};Editor.prototype.exportToCanvas=function(n,E,I,S,Q,P,T,Y,ca,ha,Z,fa,aa,wa,la,Aa,Ba,ua){try{P=null!=P?P:!0;T=null!=T?T:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Da=ca?null:fa.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=S);null==Da&&0==ca&&(Da=Aa?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(fa.getSvg(null,null,aa,wa,null,T,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 Ja=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!=E&&(Y=P?Math.min(1,Math.min(3*E/(4*Ma),E/Ca)):E/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 ya=fa.view,pa=ya.scale;ya.scale=1;var ea=btoa(unescape(encodeURIComponent(ya.createSvgGrid(ya.gridColor))));ya.scale=pa;ea="data:image/svg+xml;base64,"+ea;var ra=fa.gridSize*ya.gridSteps*Y,xa=fa.getGraphBounds(),va=ya.translate.x*pa,qa=ya.translate.y*pa,ta=va+(xa.x-va)/
+pa-aa,ia=qa+(xa.y-qa)/pa-aa,oa=new Image;oa.onload=function(){try{for(var ba=-Math.round(ra-mxUtils.mod((va-ta)*Y,ra)),da=-Math.round(ra-mxUtils.mod((qa-ia)*Y,ra));ba<Ca;ba+=ra)for(var ma=da;ma<Ma;ma+=ra)za.drawImage(oa,ba/Y,ma/Y);Ja()}catch(ja){null!=Q&&Q(ja)}};oa.onerror=function(ba){null!=Q&&Q(ba)};oa.src=ea}else Ja()}catch(ba){null!=Q&&Q(ba)}});Ka.onerror=function(Ja){null!=Q&&Q(Ja)};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(Ja){null!=Q&&Q(Ja)}});this.embedExtFonts(mxUtils.bind(this,function(Ja){try{null!=Ja&&this.addFontCss(Fa,Ja),this.loadFonts(Oa)}catch(Ea){null!=Q&&Q(Ea)}}))}catch(Ja){null!=Q&&Q(Ja)}}),I,Z)}catch(Fa){null!=Q&&Q(Fa)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var t=u,C=0;8>C;C++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[u]=t;Editor.updateCRC=function(n,E,I,S){for(var Q=
+0;Q<S;Q++)n=Editor.crcTable[(n^E.charCodeAt(I+Q))&255]^n>>>8;return n};Editor.crc32=function(n){for(var E=-1,I=0;I<n.length;I++)E=E>>>8^Editor.crcTable[(E^n.charCodeAt(I))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(n,E,I,S,Q){function P(Z,fa){var aa=ca;ca+=fa;return Z.substring(aa,ca)}function T(Z){Z=P(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 ca=0;if(P(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=Q&&Q();else if(P(n,4),"IHDR"!=P(n,4))null!=Q&&Q();else{P(n,17);Q=n.substring(0,ca);do{var ha=T(n);if("IDAT"==P(n,4)){Q=n.substring(0,ca-8);"pHYs"==E&&"dpi"==I?(I=Math.round(S/.0254),I=Y(I)+Y(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+S;S=4294967295;S=Editor.updateCRC(S,E,0,4);S=Editor.updateCRC(S,I,0,I.length);Q+=Y(I.length)+
+E+I+Y(S^4294967295);Q+=n.substring(ca-8,n.length);break}Q+=n.substring(ca-8,ca-4+ha);P(n,ha);P(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,E){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,E){var I=null;null!=n.editor.graph.getModel().getParent(E)?I=E.getId():null!=n.currentPage&&(I=n.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 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},
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,I=E.editor.graph,S=this.createOption(mxResources.get("shadow"),function(){return I.shadowVisible},function(Q){var P=new ChangePageSetup(E);P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=Q;I.model.execute(P)},{install:function(Q){this.listener=function(){Q(I.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||
+(S.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(S,60));n.appendChild(S)}return n};var p=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=p.apply(this,arguments);var E=this.editorUi,I=E.editor.graph;if(I.isEnabled()){var S=E.getCurrentFile();if(null!=S&&S.isAutosaveOptional()){var Q=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(T){E.editor.setAutosave(T);E.editor.autosave&&
+S.isModified()&&S.fileChanged()},{install:function(T){this.listener=function(){T(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});n.appendChild(Q)}}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){Q=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(T){E.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=
+function(){T(I.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Q.style.paddingTop="5px";n.appendChild(Q);var P=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position="relative";P.style.marginLeft="6px";P.style.top="2px";Q.appendChild(P)}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",
@@ -11575,93 +11577,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(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 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");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");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";
+function(n,E,I){if(null!=E){var S=function(P){if(null!=P)if(I)for(var T=0;T<P.length;T++)E[P[T].name]=P[T];else for(var Y in E){var ca=!1;for(T=0;T<P.length;T++)if(P[T].name==Y&&P[T].type==E[Y].type){ca=!0;break}ca||delete E[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)),S(Q.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{S(JSON.parse(n))}catch(P){}}};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 E=
+{},I=n.vertices,S=n.edges,Q=0;Q<I.length;Q++)this.findCommonProperties(I[Q],E,0==Q);for(Q=0;Q<S.length;Q++)this.findCommonProperties(S[Q],E,0==I.length&&0==Q);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,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,E,I){function S(za,ya,pa,ea){fa.getModel().beginUpdate();try{var ra=[],xa=[];if(null!=pa.index){for(var va=[],qa=pa.parentRow.nextSibling;qa&&qa.getAttribute("data-pName")==za;)va.push(qa.getAttribute("data-pValue")),qa=qa.nextSibling;pa.index<va.length?null!=ea?va.splice(ea,1):va[pa.index]=ya:va.push(ya);null!=pa.size&&va.length>pa.size&&(va=va.slice(0,pa.size));ya=va.join(",");null!=pa.countProperty&&(fa.setCellStyles(pa.countProperty,va.length,
+fa.getSelectionCells()),ra.push(pa.countProperty),xa.push(va.length))}fa.setCellStyles(za,ya,fa.getSelectionCells());ra.push(za);xa.push(ya);if(null!=pa.dependentProps)for(za=0;za<pa.dependentProps.length;za++){var ta=pa.dependentPropsDefVal[za],ia=pa.dependentPropsVals[za];if(ia.length>ya)ia=ia.slice(0,ya);else for(var oa=ia.length;oa<ya;oa++)ia.push(ta);ia=ia.join(",");fa.setCellStyles(pa.dependentProps[za],ia,fa.getSelectionCells());ra.push(pa.dependentProps[za]);xa.push(ia)}if("function"==typeof pa.onChange)pa.onChange(fa,
+ya);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",xa,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function Q(za,ya,pa){var ea=mxUtils.getOffset(n,!0),ra=mxUtils.getOffset(za,!0);ya.style.position="absolute";ya.style.left=ra.x-ea.x+"px";ya.style.top=ra.y-ea.y+"px";ya.style.width=za.offsetWidth+"px";ya.style.height=za.offsetHeight-(pa?4:0)+"px";ya.style.zIndex=5}function P(za,ya,pa){var ea=document.createElement("div");ea.style.width="32px";ea.style.height=
+"4px";ea.style.margin="2px";ea.style.border="1px solid black";ea.style.background=ya&&"none"!=ya?ya:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ra){this.editorUi.pickColor(ya,function(xa){ea.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;S(za,xa,pa)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ea);return btn}function T(za,ya,pa,ea,ra,xa,va){null!=ya&&(ya=ya.split(","),
+aa.push({name:za,values:ya,type:pa,defVal:ea,countProperty:ra,parentRow:xa,isDeletable:!0,flipBkg:va}));btn=mxUtils.button("+",mxUtils.bind(Z,function(qa){for(var ta=xa,ia=0;null!=ta.nextSibling;)if(ta.nextSibling.getAttribute("data-pName")==za)ta=ta.nextSibling,ia++;else break;var oa={type:pa,parentRow:xa,index:ia,isDeletable:!0,defVal:ea,countProperty:ra};ia=ha(za,"",oa,0==ia%2,va);S(za,ea,oa);ta.parentNode.insertBefore(ia,ta.nextSibling);mxEvent.consume(qa)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function Y(za,ya,pa,ea,ra,xa,va){if(0<ra){var qa=Array(ra);ya=null!=ya?ya.split(","):[];for(var ta=0;ta<ra;ta++)qa[ta]=null!=ya[ta]?ya[ta]:null!=ea?ea:"";aa.push({name:za,values:qa,type:pa,defVal:ea,parentRow:xa,flipBkg:va,size:ra})}return document.createElement("div")}function ca(za,ya,pa){var ea=document.createElement("input");ea.type="checkbox";ea.checked="1"==ya;mxEvent.addListener(ea,"change",function(){S(za,ea.checked?"1":"0",pa)});return ea}function ha(za,
+ya,pa,ea,ra){var xa=pa.dispName,va=pa.type,qa=document.createElement("tr");qa.className="gePropRow"+(ra?"Dark":"")+(ea?"Alt":"")+" gePropNonHeaderRow";qa.setAttribute("data-pName",za);qa.setAttribute("data-pValue",ya);ea=!1;null!=pa.index&&(qa.setAttribute("data-index",pa.index),xa=(null!=xa?xa:"")+"["+pa.index+"]",ea=!0);var ta=document.createElement("td");ta.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(ta,xa);ta.setAttribute("title",xa);ea&&(ta.style.textAlign="right");
+qa.appendChild(ta);ta=document.createElement("td");ta.className="gePropRowCell";if("color"==va)ta.appendChild(P(za,ya,pa));else if("bool"==va||"boolean"==va)ta.appendChild(ca(za,ya,pa));else if("enum"==va){var ia=pa.enumList;for(ra=0;ra<ia.length;ra++)if(xa=ia[ra],xa.val==ya){mxUtils.write(ta,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(ta,"click",mxUtils.bind(Z,function(){var oa=document.createElement("select");Q(ta,oa);for(var ba=0;ba<ia.length;ba++){var da=ia[ba],ma=
+document.createElement("option");ma.value=mxUtils.htmlEntities(da.val);mxUtils.write(ma,mxResources.get(da.dispName,null,da.dispName));oa.appendChild(ma)}oa.value=ya;n.appendChild(oa);mxEvent.addListener(oa,"change",function(){var ja=mxUtils.htmlEntities(oa.value);S(za,ja,pa)});oa.focus();mxEvent.addListener(oa,"blur",function(){n.removeChild(oa)})}))}else"dynamicArr"==va?ta.appendChild(T(za,ya,pa.subType,pa.subDefVal,pa.countProperty,qa,ra)):"staticArr"==va?ta.appendChild(Y(za,ya,pa.subType,pa.subDefVal,
+pa.size,qa,ra)):"readOnly"==va?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ya,ra.style.width="96px",ra.style.borderWidth="0px",ta.appendChild(ra)):(ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ya)),mxEvent.addListener(ta,"click",mxUtils.bind(Z,function(){function oa(){var da=ba.value;da=0==da.length&&"string"!=va?0:da;pa.allowAuto&&(null!=da.trim&&"auto"==da.trim().toLowerCase()?(da="auto",va="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"==va?parseInt(da):da)+"");S(za,da,pa)}var ba=document.createElement("input");Q(ta,ba,!0);ba.value=decodeURIComponent(ya);ba.className="gePropEditor";"int"!=va&&"float"!=va||pa.allowAuto||(ba.type="number",ba.step="int"==va?"1":"any",null!=pa.min&&(ba.min=parseFloat(pa.min)),null!=pa.max&&(ba.max=parseFloat(pa.max)));n.appendChild(ba);mxEvent.addListener(ba,"keypress",function(da){13==da.keyCode&&oa()});ba.focus();mxEvent.addListener(ba,
+"blur",function(){oa()})})));pa.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(Z,function(oa){S(za,"",pa,pa.index);mxEvent.consume(oa)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",ta.appendChild(ra));qa.appendChild(ta);return qa}var Z=this,fa=this.editorUi.editor.graph,aa=[];n.style.position="relative";n.style.padding="0";var wa=document.createElement("table");wa.className="geProperties";wa.style.whiteSpace="nowrap";wa.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=wa.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ba.src=Sidebar.prototype.collapsedImage;var ya="none";for(var pa=n.childNodes.length-
+1;0<=pa;pa--)try{var ea=n.childNodes[pa],ra=ea.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||n.removeChild(ea)}catch(xa){}}else Ba.src=Sidebar.prototype.expandedImage,ya="";for(pa=0;pa<za.length;pa++)za[pa].style.display=ya};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);wa.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&&wa.appendChild(ha("id",mxUtils.htmlEntities(la),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ka in E)if(la=E[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]||E[la.sizeProperty].defVal)||0;else if(null!=la.dependentProps){var Ja=la.dependentProps,Ea=[],Ca=[];for(Aa=0;Aa<Ja.length;Aa++){var Ma=I.style[Ja[Aa]];Ca.push(E[Ja[Aa]].subDefVal);Ea.push(null!=Ma?Ma.split(","):[])}la.dependentPropsDefVal=Ca;la.dependentPropsVals=Ea}wa.appendChild(ha(Ka,Oa,la,Da,Fa));Da=!Da}}for(Aa=0;Aa<aa.length;Aa++)for(la=aa[Aa],E=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),E.parentNode.insertBefore(Ka,E.nextSibling),E=Ka;n.appendChild(wa);ua();return n};StyleFormatPanel.prototype.addStyles=function(n){function E(la){mxEvent.addListener(la,"mouseenter",function(){la.style.opacity="1"});mxEvent.addListener(la,"mouseleave",function(){la.style.opacity="0.5"})}var I=this.editorUi,S=I.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 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(" "),T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var Y=[],ca=0;ca<this.defaultColorSchemes.length;ca++){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)}))})(ca);Y.push(ha);T.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,fa(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),fa=mxUtils.bind(this,function(la){var Aa=mxUtils.bind(this,function(ua){var Da=mxUtils.button("",mxUtils.bind(this,function(Oa){S.getModel().beginUpdate();try{for(var Ja=I.getSelectionState().cells,Ea=0;Ea<Ja.length;Ea++){for(var Ca=S.getModel().getStyle(Ja[Ea]),
+Ma=0;Ma<P.length;Ma++)Ca=mxUtils.removeStylename(Ca,P[Ma]);var za=S.getModel().isVertex(Ja[Ea])?S.defaultVertexStyle:S.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)||!S.getModel().isVertex(Ja[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)),S.getModel().isVertex(Ja[Ea])&&(Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null))));S.getModel().setStyle(Ja[Ea],Ca)}}finally{S.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";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&&(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;
+"')":Da.style.backgroundColor=""==ua.fill?mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):ua.fill||mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Da.style.border=ua.stroke==mxConstants.NONE?Fa+" transparent":""==ua.stroke?Fa+" "+mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Fa+" "+(ua.stroke||mxUtils.getValue(S.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ua.title&&Da.setAttribute("title",ua.title)}else{Fa=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ka=mxUtils.getValue(S.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);ca=10>=this.defaultColorSchemes.length?28:8;var aa=document.createElement("div");aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ca+"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 wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ca+"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&&(n.appendChild(aa),n.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(aa);E(wa);fa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(T);return n};StyleFormatPanel.prototype.addEditOps=function(n){var E=this.editorUi.getSelectionState(),I=this.editorUi.editor.graph,S=null;1==E.cells.length&&(S=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(Q){this.editorUi.actions.get("editStyle").funct()})),S.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),S.style.width="210px",S.style.marginBottom="2px",n.appendChild(S));I=1==E.cells.length?I.view.getState(E.cells[0]):null;null!=I&&null!=I.shape&&null!=I.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
+mxResources.get("editShape")),E.style.marginBottom="2px",null==S?E.style.width="210px":(S.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),n.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==S?E.style.width="210px":(S.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
+n.appendChild(E));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,
+E){var I=Graph.fontMapping[E];null==I&&Graph.isCssFontUrl(E)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",E)):(null==I&&(I='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+E+'");\n}'),n=document.createElement("style"),mxUtils.write(n,I));return n};Graph.addFont=function(n,E,I){if(null!=n&&0<n.length&&null!=E&&0<E.length){var S=n.toLowerCase();if("helvetica"!=S&&"arial"!=n&&"sans-serif"!=
+S){var Q=Graph.customFontElements[S];null!=Q&&Q.url!=E&&(Q.elt.parentNode.removeChild(Q.elt),Q=null);null==Q?(Q=E,"http:"==E.substring(0,5)&&(Q=PROXY_URL+"?url="+encodeURIComponent(E)),Q={name:n,url:E,elt:Graph.createFontElement(n,Q)},Graph.customFontElements[S]=Q,Graph.recentCustomFonts[S]=Q,E=document.getElementsByTagName("head")[0],null!=I&&("link"==Q.elt.nodeName.toLowerCase()?(Q.elt.onload=I,Q.elt.onerror=I):I()),null!=E&&E.appendChild(Q.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();
+return n};Graph.getFontUrl=function(n,E){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(E=n.url);return E};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var E=0;E<n.length;E++){var I=n[E].getAttribute("data-font-src");if(null!=I){var S="FONT"==n[E].nodeName?n[E].getAttribute("face"):n[E].style.fontFamily;null!=S&&Graph.addFont(S,I)}}};Graph.processFontStyle=function(n){if(null!=n){var E=mxUtils.getValue(n,"fontSource",null);if(null!=E){var I=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,
+null);null!=I&&Graph.addFont(I,decodeURIComponent(E))}}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){E=Q}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",function(Q){E=null});this.isMouseInsertPoint=function(){return null!=E};var I=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):I.apply(this,arguments)};var S=this.layoutManager.getLayout;this.layoutManager.getLayout=function(Q){var P=this.graph.getCellStyle(Q);if(null!=P&&"rack"==P.childLayout){var T=new mxStackLayout(this.graph,!1);T.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;T.marginLeft=P.marginLeft||0;T.marginRight=P.marginRight||0;T.marginTop=P.marginTop||0;T.marginBottom=
+P.marginBottom||0;T.allowGaps=P.allowGaps||0;T.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");T.resizeParent=!1;T.fill=!0;return T}return S.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,E){return Graph.processFontStyle(y.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,E,I,S,Q,P,T,Y,ca,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,E,I){function S(){for(var la=T.getSelectionCells(),Aa=[],Ba=0;Ba<la.length;Ba++)T.isCellVisible(la[Ba])&&Aa.push(la[Ba]);T.setSelectionCells(Aa)}function Q(la){T.hiddenTags=la?[]:Y.slice();S();T.refresh()}function P(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(T.hiddenTags,Fa),Oa=document.createElement("tr"),Ja=document.createElement("td");Ja.style.align="center";Ja.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(E||Editor.isDarkMode())Ea.style.filter="invert(100%)";Ja.appendChild(Ea);mxEvent.addListener(Ea,"click",function(Ma){var za=mxUtils.indexOf(T.hiddenTags,Fa);mxEvent.isShiftDown(Ma)?Q(0<=mxUtils.indexOf(T.hiddenTags,Fa)):(0>za?T.hiddenTags.push(Fa):0<=za&&T.hiddenTags.splice(za,1),S(),T.refresh());mxEvent.consume(Ma)});Oa.appendChild(Ja);Ja=document.createElement("td");
+Ja.style.overflow="hidden";Ja.style.whiteSpace="nowrap";Ja.style.textOverflow="ellipsis";Ja.style.verticalAlign="middle";Ja.style.cursor="pointer";Ja.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);Ja.appendChild(a);mxEvent.addListener(Ja,"click",function(Ma){if(mxEvent.isShiftDown(Ma)){Q(!0);var za=T.getCellsForTags([Fa],null,null,!0);T.isEnabled()?T.setSelectionCells(za):T.highlightCells(za)}else if(Ka&&
+0<T.hiddenTags.length)Q(!0);else{za=Y.slice();var ya=mxUtils.indexOf(za,Fa);za.splice(ya,1);T.hiddenTags=za;S();T.refresh()}mxEvent.consume(Ma)});Oa.appendChild(Ja);if(T.isEnabled()){Ja=document.createElement("td");Ja.style.verticalAlign="middle";Ja.style.textAlign="center";Ja.style.width="18px";if(null==Aa){Ja.style.align="center";Ja.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(E||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);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[Fa]);T.refresh();mxEvent.consume(Ma)});Ja.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?T.addTagsForCells(T.getSelectionCells(),[Fa]):T.removeTagsForCells(T.getSelectionCells(),[Fa]);mxEvent.consume(Ma)});Ja.appendChild(Ca)}Oa.appendChild(Ja)}ua.appendChild(Oa)})(la[Da]);Ba.appendChild(ua);ha.appendChild(Ba)}}var T=this,Y=T.hiddenTags.slice(),ca=document.createElement("div");ca.style.userSelect=
+"none";ca.style.overflow="hidden";ca.style.padding="10px";ca.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=T.isEnabled()?"1px solid #808080":"none";ha.style.bottom=T.isEnabled()?"48px":"10px";ca.appendChild(ha);var Z=mxUtils.button(mxResources.get("reset"),function(la){T.hiddenTags=
+[];mxEvent.isShiftDown(la)||(Y=T.hiddenTags.slice());S();T.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!=I&&I(Y,function(la){Y=la;aa()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";T.addListener(mxEvent.ROOT,function(){Y=T.hiddenTags.slice()});var aa=mxUtils.bind(this,function(la,Aa){if(n()){la=T.getAllTags();for(Aa=0;Aa<la.length;Aa++)0>
+mxUtils.indexOf(Y,la[Aa])&&Y.push(la[Aa]);Y.sort();T.isSelectionEmpty()?P(Y):P(Y,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,aa);T.model.addListener(mxEvent.CHANGE,aa);T.addListener(mxEvent.REFRESH,aa);var wa=document.createElement("div");wa.style.boxSizing="border-box";wa.style.whiteSpace="nowrap";wa.style.position="absolute";wa.style.overflow="hidden";wa.style.bottom="0px";wa.style.height="42px";wa.style.right="10px";wa.style.left="10px";T.isEnabled()&&
+(wa.appendChild(Z),wa.appendChild(fa),ca.appendChild(wa));return{div:ca,refresh:aa}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var E in Graph.customFontElements){var I=Graph.customFontElements[E];n.push({name:I.name,url:I.url})}return n};Graph.prototype.setFont=function(n,E){Graph.addFont(n,E);document.execCommand("fontname",!1,n);if(null!=E){var I=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(n,E);for(var S=0;S<I.length;S++)I[S].getAttribute("face")==
+n&&I[S].getAttribute("data-font-src")!=E&&I[S].setAttribute("data-font-src",E)}};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 E in n)this.globalVars[E]=
+n[E]}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 q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(n){var E=q.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[n]);return E};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 D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,E,I,S,Q,P,T,Y,ca,ha,Z,fa,aa,wa){var la=null,Aa=null,Ba=null;fa||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=D.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="",Ja="",Ea=0;Ea<Da.length;Ea++){var Ca=Da[Ea].name,Ma=Da[Ea].url;Graph.isCssFontUrl(Ma)?
+Oa+="@import url("+Ma+");\n":Ja+='@font-face {\nfont-family: "'+Ca+'";\nsrc: url("'+Ma+'");\n}\n'}Ka.appendChild(Fa.createTextNode(Oa+Ja));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 E=n.drawText;n.drawText=function(I,S){if(null!=I.text&&
+null!=I.text.value&&I.text.checkBounds()&&(mxUtils.isNode(I.text.value)||I.text.dialect==mxConstants.DIALECT_STRICTHTML)){var Q=I.text.getContentNode();if(null!=Q){Q=Q.cloneNode(!0);if(Q.getElementsByTagNameNS)for(var P=Q.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<P.length;)P[0].parentNode.removeChild(P[0]);null!=Q.innerHTML&&(P=I.text.value,I.text.value=Q.innerHTML,E.apply(this,arguments),I.text.value=P)}}else E.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||
+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 E="1"==mxUtils.getValue(n.style,"enumerate",0);E&&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)):E||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);E=n.secondLabel;if(null!=E){var I=n.view.scale,S=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*I,n.y+4*I,0,0):mxRectangle.fromPoint(n.view.getPoint(n));E.bounds.equals(n)&&E.value==S&&E.scale==I||(E.bounds=
+n,E.value=S,E.scale=I,E.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():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+
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.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,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 I=!1,S=0,Q=0,P=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
+function(){I&&(I=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<S&&S--;0==S&&ca()}),ca=mxUtils.bind(this,function(){if(Q<n.length){var ha=this.stoppingCustomActions,Z=n[Q++],fa=[];if(null!=Z.open)if(T(),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()}),S++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),T());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ha?0:Z.fadeIn.delay));null!=Z.fadeOut&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ha?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&&(P(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){P();var aa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Z.hide&&(P(),aa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
+(P(),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&&(P(),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 wa=this.getAllTags(),la=0;la<wa.length;la++)0>mxUtils.indexOf(Z.tags.visible,wa[la])&&0>mxUtils.indexOf(aa,wa[la])&&aa.push(wa[la]);this.hiddenTags=aa;this.refresh()}0<fa.length&&(S++,this.executeAnimations(fa,Y,ha?1:Z.steps,ha?0:Z.delay));
+0==S?ca():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=E&&E()});ca()}};Graph.prototype.doUpdateCustomLinksForCell=function(n,E){var I=this.getLinkForCell(E);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(n,I));if(this.isHtmlLabel(E)){var S=document.createElement("div");S.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var Q=S.getElementsByTagName("a"),P=!1,T=0;T<Q.length;T++)I=Q[T].getAttribute("href"),null!=I&&"data:action/json,"==
+I.substring(0,17)&&(Q[T].setAttribute("href",this.updateCustomLink(n,I)),P=!0);P&&this.labelChanged(E,S.innerHTML)}};Graph.prototype.updateCustomLink=function(n,E){if("data:action/json,"==E.substring(0,17))try{var I=JSON.parse(E.substring(17));null!=I.actions&&(this.updateCustomLinkActions(n,I.actions),E="data:action/json,"+JSON.stringify(I))}catch(S){}return E};Graph.prototype.updateCustomLinkActions=function(n,E){for(var I=0;I<E.length;I++){var S=E[I],Q;for(Q in S)this.updateCustomLinkAction(n,
+S[Q],"cells"),this.updateCustomLinkAction(n,S[Q],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,E,I){if(null!=E&&null!=E[I]){for(var S=[],Q=0;Q<E[I].length;Q++)if("*"==E[I][Q])S.push(E[I][Q]);else{var P=n[E[I][Q]];null!=P?""!=P&&S.push(P):S.push(E[I][Q])}E[I]=S}};Graph.prototype.getCellsForAction=function(n,E){E=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,E));if(null!=n.excludeCells){for(var I=[],S=0;S<E.length;S++)0>n.excludeCells.indexOf(E[S].id)&&I.push(E[S]);
+E=I}return E};Graph.prototype.getCellsById=function(n){var E=[];if(null!=n)for(var I=0;I<n.length;I++)if("*"==n[I]){var S=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(P){return P!=S},S))}else{var Q=this.model.getCell(n[I]);null!=Q&&E.push(Q)}return E};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 E=0;E<n.length;E++)if(0>mxUtils.indexOf(this.hiddenTags,n[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,E,I,S){var Q=[];if(null!=n){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var P=0,T={},Y=0;Y<n.length;Y++)0<n[Y].length&&(T[n[Y]]=!0,P++);for(Y=0;Y<E.length;Y++)if(I&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ca=
+this.getTagsForCell(E[Y]),ha=!1;if(0<ca.length&&(ca=ca.split(" "),ca.length>=n.length)){for(var Z=ha=0;Z<ca.length&&ha<P;Z++)null!=T[ca[Z]]&&ha++;ha=ha==P}ha&&(1!=S||this.isCellVisible(E[Y]))&&Q.push(E[Y])}}return Q};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var E=null,I=[],S=0;S<n.length;S++){var Q=this.getTagsForCell(n[S]);I=[];if(0<Q.length){Q=Q.split(" ");for(var P={},
+T=0;T<Q.length;T++)if(null==E||null!=E[Q[T]])P[Q[T]]=!0,I.push(Q[T]);E=P}else return[]}return I};Graph.prototype.getTagsForCells=function(n){for(var E=[],I={},S=0;S<n.length;S++){var Q=this.getTagsForCell(n[S]);if(0<Q.length){Q=Q.split(" ");for(var P=0;P<Q.length;P++)null==I[Q[P]]&&(I[Q[P]]=!0,E.push(Q[P]))}}return E};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,E){if(0<n.length&&0<E.length){this.model.beginUpdate();
+try{for(var I=0;I<n.length;I++){for(var S=this.getTagsForCell(n[I]),Q=S.split(" "),P=!1,T=0;T<E.length;T++){var Y=mxUtils.trim(E[T]);""!=Y&&0>mxUtils.indexOf(Q,Y)&&(S=0<S.length?S+" "+Y:Y,P=!0)}P&&this.setAttributeForCell(n[I],"tags",S)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(n,E){if(0<n.length&&0<E.length){this.model.beginUpdate();try{for(var I=0;I<n.length;I++){var S=this.getTagsForCell(n[I]);if(0<S.length){for(var Q=S.split(" "),P=!1,T=0;T<E.length;T++){var Y=
+mxUtils.indexOf(Q,E[T]);0<=Y&&(Q.splice(Y,1),P=!0)}P&&this.setAttributeForCell(n[I],"tags",Q.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var E=0;E<n.length;E++)this.model.setVisible(n[E],!this.model.isVisible(n[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(n,E){this.model.beginUpdate();try{for(var I=0;I<n.length;I++)this.model.setVisible(n[I],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
+function(n,E,I,S){for(var Q=0;Q<n.length;Q++)this.highlightCell(n[Q],E,I,S)};Graph.prototype.highlightCell=function(n,E,I,S,Q){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;n=this.view.getState(n);var P=null;null!=n&&(Q=null!=Q?Q:4,Q=Math.max(Q+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,1)+Q),P=new mxCellHighlight(this,E,Q,!1),null!=S&&(P.opacity=S),P.highlight(n),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),
+P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},I));return P};Graph.prototype.addSvgShadow=function(n,E,I,S){I=null!=I?I:!1;S=null!=S?S:!0;var Q=n.ownerDocument,P=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"filter"):Q.createElement("filter");P.setAttribute("id",this.shadowId);var T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):Q.createElement("feGaussianBlur");T.setAttribute("in","SourceAlpha");T.setAttribute("stdDeviation",
+this.svgShadowBlur);T.setAttribute("result","blur");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feOffset"):Q.createElement("feOffset");T.setAttribute("in","blur");T.setAttribute("dx",this.svgShadowSize);T.setAttribute("dy",this.svgShadowSize);T.setAttribute("result","offsetBlur");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feFlood"):Q.createElement("feFlood");T.setAttribute("flood-color",this.svgShadowColor);T.setAttribute("flood-opacity",
+this.svgShadowOpacity);T.setAttribute("result","offsetColor");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feComposite"):Q.createElement("feComposite");T.setAttribute("in","offsetColor");T.setAttribute("in2","offsetBlur");T.setAttribute("operator","in");T.setAttribute("result","offsetBlur");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feBlend"):Q.createElement("feBlend");T.setAttribute("in","SourceGraphic");T.setAttribute("in2",
+"offsetBlur");P.appendChild(T);T=n.getElementsByTagName("defs");0==T.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=T[0];Q.appendChild(P);I||(E=null!=E?E:n.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&S&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+6),n.setAttribute("height",
+parseInt(n.getAttribute("height"))+6),E=n.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,n.setAttribute("viewBox",E[0]+" "+E[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(n,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=n)?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 n=this.model.getChildCount(this.model.root),E=0;do var I=this.model.getChildAt(this.model.root,E);while(E++<n&&"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+
"/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"];
@@ -11672,36 +11674,36 @@ 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(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=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)+
+"/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 E=null;null!=n&&0<n.length&&("ER"==n.substring(0,2)?E="mxgraph.er":"sysML"==n.substring(0,5)&&(E="mxgraph.sysml"));return E};var V=mxMarker.createMarker;mxMarker.createMarker=
+function(n,E,I,S,Q,P,T,Y,ca,ha){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return V.apply(this,arguments)};var O=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(n,E,I,S,Q,P){"1"==mxUtils.getValue(E.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return O.apply(this,arguments)};PrintDialog.prototype.create=function(n,E){function I(){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 S(xa){function va(Ia,Na,Pa){var Qa=Ia.useCssTransforms,Ya=Ia.currentTranslate,La=Ia.currentScale,Ta=Ia.view.translate,Ua=Ia.view.scale;Ia.useCssTransforms&&(Ia.useCssTransforms=!1,Ia.currentTranslate=new mxPoint(0,0),Ia.currentScale=1,Ia.view.translate=new mxPoint(0,0),Ia.view.scale=1);var Za=Ia.getGraphBounds(),Wa=0,bb=0,Va=ea.get(),ab=1/Ia.pageScale,
+$a=ua.checked;if($a){ab=parseInt(ya.value);var hb=parseInt(pa.value);ab=Math.min(Va.height*hb/(Za.height/Ia.view.scale),Va.width*ab/(Za.width/Ia.view.scale))}else ab=parseInt(Ba.value)/(100*Ia.pageScale),isNaN(ab)&&(qa=1/Ia.pageScale,Ba.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*qa);Va.height=Math.ceil(Va.height*qa);ab*=qa;!$a&&Ia.pageVisible?(Za=Ia.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Na){Na=PrintDialog.createPrintPreview(Ia,ab,Va,
+0,Wa,bb,$a);Na.pageSelector=!1;Na.mathEnabled=!1;wa.checked&&(Na.isCellVisible=function(Xa){return Ia.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=Ia.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=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);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){}})();
+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=Ia.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Na.backgroundColor=Va;Na.autoOrigin=$a;Na.appendGraph(Ia,ab,Wa,bb,Pa,!0);Pa=
+Ia.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&&(Ia.useCssTransforms=Qa,Ia.currentTranslate=
+Ya,Ia.currentScale=La,Ia.view.translate=Ta,Ia.view.scale=Ua);return Na}var qa=parseInt(ra.value)/100;isNaN(qa)&&(qa=1,ra.value="100 %");qa*=.75;var ta=null,ia=Q.shapeForegroundColor,oa=Q.shapeBackgroundColor;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(ta=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());var ba=fa.value,da=aa.value,ma=!ha.checked,ja=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,ha.checked,
+ba,da,ua.checked,ya.value,pa.value,parseInt(Ba.value)/100,parseInt(ra.value)/100,ea.get());else{ma&&(ma=wa.checked||ba==ca&&da==ca);if(!ma&&null!=n.pages&&n.pages.length){var na=0;ma=n.pages.length-1;ha.checked||(na=parseInt(ba)-1,ma=parseInt(da)-1);for(var sa=na;sa<=ma;sa++){var ka=n.pages[sa];ba=ka==n.currentPage?Q:null;if(null==ba){ba=n.createTemporaryGraph(Q.stylesheet);ba.shapeForegroundColor=Q.shapeForegroundColor;ba.shapeBackgroundColor=Q.shapeBackgroundColor;da=!0;na=!1;var Ha=null,Ga=null;
+null==ka.viewState&&null==ka.root&&n.updatePageRoot(ka);null!=ka.viewState&&(da=ka.viewState.pageVisible,na=ka.viewState.mathEnabled,Ha=ka.viewState.background,Ga=ka.viewState.backgroundImage,ba.extFonts=ka.viewState.extFonts);null!=Ga&&null!=Ga.originalSrc&&(Ga=n.createImageForPageLink(Ga.originalSrc,ka));ba.background=Ha;ba.backgroundImage=null!=Ga?new mxImage(Ga.src,Ga.width,Ga.height,Ga.x,Ga.y):null;ba.pageVisible=da;ba.mathEnabled=na;var Ra=ba.getGraphBounds;ba.getGraphBounds=function(){var Ia=
+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;Ia=mxRectangle.fromRectangle(Ia);Ia.add(new mxRectangle((Pa.x+Na.x)*Qa,(Pa.y+Na.y)*Qa,Na.width*Qa,Na.height*Qa))}return Ia};var Sa=ba.getGlobalVariable;ba.getGlobalVariable=function(Ia){return"page"==Ia?ka.getName():"pagenumber"==Ia?sa+1:"pagecount"==Ia?null!=n.pages?n.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ba.container);n.updatePageRoot(ka);
+ba.model.setRoot(ka.root)}ja=va(ba,ja,sa!=ma);ba!=Q&&ba.container.parentNode.removeChild(ba.container)}}else ja=va(Q);null==ja?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(ja.mathEnabled&&(ma=ja.wnd.document,xa&&(ja.wnd.IMMEDIATE_PRINT=!0),ma.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ja.closeDocument(),!ja.mathEnabled&&xa&&PrintDialog.printPreview(ja));null!=ta&&(Q.shapeForegroundColor=ia,Q.shapeBackgroundColor=oa,Q.stylesheet=
+ta,Q.refresh())}}var Q=n.editor.graph,P=document.createElement("div"),T=document.createElement("h3");T.style.width="100%";T.style.textAlign="center";T.style.marginTop="0px";mxUtils.write(T,E||mxResources.get("print"));P.appendChild(T);var Y=1,ca=1;T=document.createElement("div");T.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");T.appendChild(ha);E=document.createElement("span");mxUtils.write(E,mxResources.get("printAllPages"));T.appendChild(E);mxUtils.br(T);var Z=ha.cloneNode(!0);ha.setAttribute("checked","checked");Z.setAttribute("value","range");T.appendChild(Z);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");T.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";T.appendChild(fa);E=document.createElement("span");mxUtils.write(E,mxResources.get("to"));T.appendChild(E);var aa=fa.cloneNode(!0);T.appendChild(aa);mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"change",I);mxEvent.addListener(aa,"change",I);if(null!=n.pages&&(Y=n.pages.length,null!=n.currentPage))for(E=0;E<n.pages.length;E++)if(n.currentPage==n.pages[E]){ca=
+E+1;fa.value=ca;aa.value=ca;break}fa.setAttribute("max",Y);aa.setAttribute("max",Y);n.isPagesEnabled()?1<Y&&(P.appendChild(T),Z.checked=!0):Z.checked=!0;mxUtils.br(T);var wa=document.createElement("input");wa.setAttribute("value","all");wa.setAttribute("type","radio");wa.style.marginRight="8px";Q.isSelectionEmpty()&&wa.setAttribute("disabled","disabled");var la=document.createElement("div");la.style.marginBottom="10px";1==Y?(wa.setAttribute("type","checkbox"),wa.style.marginBottom="12px",la.appendChild(wa)):
+(wa.setAttribute("name","pages-printdialog"),wa.style.marginBottom="8px",T.appendChild(wa));E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));wa.parentNode.appendChild(E);1==Y&&mxUtils.br(wa.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);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));
+la.appendChild(E);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});P.appendChild(la);T=T.cloneNode(!1);var ua=Aa.cloneNode(!0);ua.setAttribute("value","fit");Aa.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(ua);T.appendChild(E);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"),Ja=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 ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("min",
+"1");ya.setAttribute("type","number");ya.style.width="40px";Ja.appendChild(ya);E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsAcross"));Ea.appendChild(E);mxUtils.write(Ca,mxResources.get("fitToBy"));var pa=ya.cloneNode(!0);Ma.appendChild(pa);mxEvent.addListener(ya,"focus",function(){ua.checked=!0});mxEvent.addListener(pa,"focus",function(){ua.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));za.appendChild(E);Fa.appendChild(Oa);
+Fa.appendChild(Ja);Fa.appendChild(Ea);Ka.appendChild(Ca);Ka.appendChild(Ma);Ka.appendChild(za);Da.appendChild(Fa);Da.appendChild(Ka);la.appendChild(Da);T.appendChild(la);P.appendChild(T);T=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));T.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(E,"printdialog",n.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);T.appendChild(E);E=document.createElement("span");mxUtils.write(E,mxResources.get("pageScale"));T.appendChild(E);var ra=document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";T.appendChild(ra);P.appendChild(T);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";T=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});T.className="geBtn";n.editor.cancelFirst&&
+E.appendChild(T);n.isOffline()||(la=mxUtils.button(mxResources.get("help"),function(){Q.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),la.className="geBtn",E.appendChild(la));PrintDialog.previewEnabled&&(la=mxUtils.button(mxResources.get("preview"),function(){n.hideDialog();S(!1)}),la.className="geBtn",E.appendChild(la));la=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){n.hideDialog();S(!0)});la.className="geBtn gePrimaryBtn";E.appendChild(la);n.editor.cancelFirst||
+E.appendChild(T);P.appendChild(E);this.container=P};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 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 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 n=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.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(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.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(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.2.0";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,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&&
@@ -11726,8 +11728,8 @@ var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
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,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"),
+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 D=c.ownerDocument.createElement("diagram");D.setAttribute("id",Editor.guid());D.appendChild(c)}else{D=Graph.zapGremlins(mxUtils.getXml(c));q=Graph.compress(D);if(Graph.decompress(q)!=D)return D;D=c.ownerDocument.createElement("diagram");
+D.setAttribute("id",Editor.guid());mxUtils.setTextContent(D,q)}q=c.ownerDocument.createElement("mxfile");q.appendChild(D)}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,
@@ -11740,7 +11742,7 @@ delete c[EditorUi.DIFF_UPDATE][k]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])
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,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?
+N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var D=this.pages[0];this.currentPage==D?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&N.setBackgroundImage(D.viewState.backgroundImage);N.getGlobalVariable=function(A){return"page"==A?D.getName():"pagenumber"==A?1:q.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(D.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"+
@@ -11751,18 +11753,18 @@ function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage
"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 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=
+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 D=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(q,c,D,"text/xml")}else if("html"==c)D=this.getHtml2(this.getFileData(!0),this.editor.graph,
+K),this.saveData(q,c,D,"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(O,W){try{var U=
+this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var X=this.createDownloadRequest(O,c,k,W,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,J=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",O,"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 V=this.editor.graph.getSvg(R,null,null,null,null,k);g&&this.editor.graph.addSvgShadow(V);this.editor.convertImages(V,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else q=K+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();J(O)}),k)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,k,m,p,v,x,z,
+y,L,N,K){var q=this.editor.graph,D=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(D.width*D.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"));
+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(J,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,
+x.id+": "+H)}try{var q=c.getAttribute("icon");if(null!=q){var D=0<q.length?JSON.parse(q):null;null!=D&&D.append||m.removeCellOverlays(x);null!=D&&m.addCellOverlay(x,e(D))}}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);
@@ -11781,19 +11783,19 @@ c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scrat
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());
+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,D=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&&
+18*y.childNodes.length+"px")}),B=mxUtils.bind(this,function(M,H,F,J){M=K.cloneCells(mxUtils.sortCells(K.model.getTopmostCells(M)));for(var R=0;R<M.length;R++){var V=K.getCellGeometry(M[R]);null!=V&&V.translate(-H.x,-H.y)}x.appendChild(this.sidebar.createVertexTemplateFromCells(M,H.width,H.height,J||"",!0,null,!1));M={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(M))),w:H.width,h:H.height};null!=J&&(M.title=J);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),J=K.view.scale;F.x/=J;F.y/=J;F.width/=J;F.height/=J;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,
+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,J,R,V,O,W,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,V,O),H)],H[0].vertex=!0,
+B(H,new mxRectangle(0,0,V,O),M,mxEvent.isAltDown(M)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null);else{var n=!1,E=mxUtils.bind(this,function(I,S){null!=I&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(I),null!=S&&0<S.length&&(I=S));if(null!=I)if(I=mxUtils.parseXml(I),"mxlibrary"==I.documentElement.nodeName)try{var Q=JSON.parse(mxUtils.getTextContent(I.documentElement));v(Q,x);e=e.concat(Q);A(M);this.spinner.stop();
+n=!0}catch(ca){}else if("mxfile"==I.documentElement.nodeName)try{var P=I.documentElement.getElementsByTagName("diagram");for(Q=0;Q<P.length;Q++){var T=this.stringToCells(Editor.getDiagramNodeXml(P[Q])),Y=this.editor.graph.getBoundingBoxFromGeometry(T);B(T,new mxRectangle(0,0,Y.width,Y.height),M)}n=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}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!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(X,function(I){E(I,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,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?E(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"))):E(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",D);mxEvent.addListener(x,
+"dblclick",function(M){mxEvent.getSource(M)==x&&D(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=
@@ -11806,9 +11808,9 @@ function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplas
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?
+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<D.length;M++){var H=document.createElement("option");mxUtils.write(H,D[M].displayName);H.value=M;G.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(H,"<"+D[M].email+">");H.setAttribute("disabled","disabled");G.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=D.length;G.appendChild(H)}var D=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=D.length!=M;H&&this.drive.setUser(D[M]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(D=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!=
@@ -11824,7 +11826,7 @@ g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxCl
!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=
+!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(D){this.handleError(D)}}))}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=
@@ -11840,7 +11842,7 @@ function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);m.
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=
+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 D=this.editor.graph.isSelectionEmpty();g=null!=g?g:D;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,
@@ -11858,34 +11860,34 @@ null,null,null,null,!v);e='<div class="mxgraph" style="'+(p?"max-width:100%;":""
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,
+!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 D=D=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.getColor(),q.checked,D.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,
+mxUtils.bind(this,function(J){this.spinner.stop();J=new ErrorDialog(this,null,mxResources.get(null!=J?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(J.container,300,80,!0,!1);J.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 D=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");
+(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(D.getTarget(),D.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)):D.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,
+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 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";y.appendChild(D);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";
+"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),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var R=this.addCheckbox(y,mxResources.get("shadow"),L.shadowVisible),V=null;if("png"==x||"jpeg"==x)V=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||
+!this.canvasSupported,!1,!0),N+=30;var O=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),v,null,null,"jpeg"!=x);O.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";
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")),
+function(){"lblToSvg"==U.value?(W.checked=!0,W.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"==W.getAttribute("disabled")&&(W.checked=!1,W.removeAttribute("disabled"),R.removeAttribute("disabled"),M.page.style.display="",n.style.display="none",X.style.display="")}));e&&(y.appendChild(W),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()&&
+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=D.value;this.lastExportZoom=q.value;
+m(q.value,F.checked,!A.checked,R.checked,O.checked,W.checked,D.value,B.checked,!1,X.value,null!=V?V.checked:null,null!=J?J.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(),D=1<v.model.getChildCount(v.model.getRoot()),A=this.addCheckbox(p,mxResources.get("layers"),
+D,!D);A.style.marginLeft=q.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(D&&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 D=" ",A="";k&&(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!=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+'"':"")+D+"/>")}var y=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(q){var D=k?this.getFileData(!0):null;q=
+this.createImageDataUri(q,D,"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('"+
@@ -11895,19 +11897,19 @@ c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.l
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=
+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(D){D=
+(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(D);null!=m&&m(D);return D});e.mathEnabled&&this.editor.addMathCss(p);if(null!=m)this.embedFonts(p,mxUtils.bind(this,function(D){x?this.editor.convertImages(D,mxUtils.bind(this,function(A){q(A)})):q(D)}));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(D){this.spinner.stop();try{this.saveCanvas(D,
+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(D){this.spinner.stop();this.handleError(D)}),null,g,c||1,e,k,null,null,p,v,y,N,K)}catch(D){this.spinner.stop(),this.handleError(D)}}};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,
+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 D=N[q].getAttribute("id");N[q].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(N[q]));c[D]=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=
+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(D){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=
@@ -11917,11 +11919,11 @@ e,g,k){var m=this,p=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.cl
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();
+function(){try{var N=L.width,K=L.height;if(0==N&&0==K){var q=z.result,D=q.indexOf(","),A=decodeURIComponent(escape(atob(q.substring(D+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="+
+"",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)),D=Math.round(K.width*q);K=Math.round(K.height*q);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(e),z.snap(g),D,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]};
@@ -11931,51 +11933,51 @@ this.importFileInputElt){var g=document.createElement("input");g.setAttribute("t
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():
+y?y:!0;var K=!1,q=null,D=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,D)):null!=z&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(K=!0,this.importVisio(z,D)):(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?D(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,D,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,D=!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,E,I,S,Q,P,T){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,E,I,S,Q,P,T,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 J=c.length,R=J,V=[],O=mxUtils.bind(this,function(U,X){V[U]=X;if(0==
+--R){this.spinner.stop();if(null!=x)x(V);else{var n=[];H.getModel().beginUpdate();try{for(U=0;U<V.length;U++){var E=V[U]();null!=E&&(n=n.concat(E))}}finally{H.getModel().endUpdate()}}p(n)}}),W=0;W<J;W++)mxUtils.bind(this,function(U){var X=c[U];if(null!=X){var n=new FileReader;n.onload=mxUtils.bind(this,function(E){if(null==v||v(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var I=Graph.clipSvgDataUri(E.target.result),S=I.indexOf(",");S=decodeURIComponent(escape(atob(I.substring(S+
+1))));var Q=mxUtils.parseXml(S);S=Q.getElementsByTagName("svg");if(0<S.length){S=S[0];var P=N?null:S.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)?O(U,mxUtils.bind(this,function(){try{if(null!=Q){var ca=Q.getElementsByTagName("svg");if(0<ca.length){var ha=ca[0],Z=ha.getAttribute("width"),fa=ha.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=ha.getAttribute("viewBox");if(null==aa||0==aa.length)ha.setAttribute("viewBox","0 0 "+Z+" "+fa);else if(isNaN(Z)||isNaN(fa)){var wa=aa.split(" ");3<wa.length&&(Z=parseFloat(wa[2]),fa=parseFloat(wa[3]))}I=Editor.createSvgDataUri(mxUtils.getXml(ha));var la=Math.min(1,Math.min(k/Math.max(1,Z)),k/Math.max(1,fa)),Aa=m(I,X.type,e+U*F,g+U*F,Math.max(1,Math.round(Z*la)),Math.max(1,Math.round(fa*
+la)),X.name);if(isNaN(Z)||isNaN(fa)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){Z=Math.max(1,Ba.width);fa=Math.max(1,Ba.height);Aa[0].geometry.width=Z;Aa[0].geometry.height=fa;ha.setAttribute("viewBox","0 0 "+Z+" "+fa);I=Editor.createSvgDataUri(mxUtils.getXml(ha));var ua=I.indexOf(";");0<ua&&(I=I.substring(0,ua)+I.substring(I.indexOf(",",ua+1)));H.setCellStyles("image",I,[Aa[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}return Aa}}}catch(ua){}return null})):O(U,mxUtils.bind(this,
+function(){return m(P,"text/xml",e+U*F,g+U*F,0,0,X.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==X.type){var T=N?null:this.extractGraphModelFromPng(E.target.result);if(null!=T&&0<T.length){var Y=new Image;Y.src=E.target.result;O(U,mxUtils.bind(this,function(){return m(T,"text/xml",e+U*F,g+U*F,Y.width,Y.height,X.name)}));S=!0}}S||(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(ca){this.resizeImage(ca,E.target.result,mxUtils.bind(this,function(ha,Z,fa){O(U,mxUtils.bind(this,function(){if(null!=ha&&ha.length<y){var aa=D&&this.isResampleImageSize(X.size,L)?Math.min(1,Math.min(k/Z,k/fa)):1;return m(ha,X.type,e+U*F,g+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),D,k,L,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else I=E.target.result,m(I,X.type,e+U*F,g+U*F,240,160,X.name,function(ca){O(U,function(){return ca})},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(E){O(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?n.readAsDataURL(X):n.readAsText(X)}})(W)});if(A){A=
+[];for(G=0;G<c.length;G++)A.push(c[G]);c=A;this.confirmImageResize(function(H){D=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,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=
+K.toDataURL();if(q.length<e.length){var D=document.createElement("canvas");D.width=L;D.height=N;var A=D.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(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!=
+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(J,R,V){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==H.format)e.labelChanged(B,"<pre>"+J+"</pre>"),e.updateCellSize(B,!0);else{e.setCellStyles("image",c.convertDataUri(J),[B]);var O=e.model.getGeometry(B);null!=O&&(O=O.clone(),O.width=R,O.height=V,e.cellsResized([B],[O],!1))}e.setAttributeForCell(B,
+"plantUmlData",JSON.stringify({data:F,format:H.format}))}finally{e.getModel().endUpdate()}},function(J){c.handleError(J)})},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(J,R,V){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",
+J,[B]);var O=e.model.getGeometry(B);null!=O&&(O=O.clone(),O.width=Math.max(O.width,R),O.height=Math.max(O.height,V),e.cellsResized([B],[O],!1));e.setAttributeForCell(B,"mermaidData",JSON.stringify({data:F,config:H.config},null,2))}finally{e.getModel().endUpdate()}},function(J){c.handleError(J)})},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,
+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,J=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";M=c.createImageForPageLink(M.originalSrc);this.shapeBackgroundColor=J;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;
+var z=e.addClickHandler;e.addClickHandler=function(B,G,M){var H=G;G=function(F,J){if(null==J){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(J=R.getAttribute("href"))}null!=J&&e.isCustomLink(J)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&e.customLinkClicked(J)&&mxEvent.consume(F);null!=H&&H(F,J)};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",
+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(J,R,V,O,W,U){e.insertImage(J,W,U)},function(){},function(J){return"image/"==J.type.substring(0,
+6)},function(J){for(var R=0;R<J.length;R++)J[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(J){var R=Math.max(1,J.width);J=Math.max(1,J.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,R)),V/Math.max(1,J));e.insertImage(decodeURIComponent(F),R*V,J*V)})):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()&&
+B=this.editor.graph.getModel().getStyle(B),this.styleInput.value=B||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==this.styleInput?!0:D.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",
+mxEvent.getClientX(B),mxEvent.getClientY(B)),M=B.dataTransfer.files,H=e.view.translate,F=e.view.scale,J=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=J=null),this.importFiles(M,
+J,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(B),null,null,mxEvent.isShiftDown(B),B));else{mxEvent.isAltDown(B)&&(R=J=0);var V=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,J,R,!0));else if(0<=mxUtils.indexOf(B.dataTransfer.types,"text/html")){var O=B.dataTransfer.getData("text/html");M=document.createElement("div");M.innerHTML=
+e.sanitizeHtml(O);var W=null;G=M.getElementsByTagName("img");null!=G&&1==G.length?(O=G[0].getAttribute("src"),null==O&&(O=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(W=!0)):(G=M.getElementsByTagName("a"),null!=G&&1==G.length?O=G[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(O=mxUtils.getTextContent(M[0]))));var U=!0,X=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(O,J,R,!0,W,null,U,mxEvent.isControlDown(B)))});W&&null!=
+O&&O.length>this.resampleThreshold?this.confirmImageResize(function(n){U=n;X()},mxEvent.isControlDown(B)):X()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(n){var E=Math.max(1,n.width);n=Math.max(1,n.height);var I=this.maxImageSize;I=Math.min(1,Math.min(I/Math.max(1,E)),I/Math.max(1,n));e.setSelectionCell(e.insertVertex(null,null,"",J,R,E*I,n*I,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+V+";"))}),mxUtils.bind(this,function(n){e.setSelectionCells(this.insertTextAt(V,J,R,!0))})):0<=mxUtils.indexOf(B.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(B.dataTransfer.getData("text/plain"),J,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,
@@ -12026,55 +12028,55 @@ if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile
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,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.executeLayouts(this.editor.graph.createLayouts(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.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(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(T){}return P});if("json"==urlParams.proto){var K=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[y])}catch(P){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):y.message,
+null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var q=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(P){null!=P?v.postMessage(JSON.stringify({event:"prompt",value:P,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 D=N(y.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),D,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(P){P&&this.actions.get("exit").funct()}));try{q.init()}catch(P){v.postMessage(JSON.stringify({event:"draft",error:P.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(P,T,Y){P=P||this.emptyDiagramXml;v.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:T,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(P,T,Y){this.remoteInvoke("getRecentDiagrams",[Y],null,P,T)}):null,B?mxUtils.bind(this,function(P,T,Y,ca){this.remoteInvoke("searchDiagrams",[P,ca],null,T,Y)}):null,mxUtils.bind(this,function(P,T,Y){this.remoteInvoke("getFileContent",[P.url],null,T,Y)}),null,G?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},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(P,T,Y,ca){P=P||this.emptyDiagramXml;null!=y.callback?v.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:T,tempUrl:Y,libs:ca,builtIn:!0,message:y}),"*"):(c(P,z,P!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,A?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,
+"Network Error!")})}):null,B?mxUtils.bind(this,function(P,T){this.remoteInvoke("searchDiagrams",[P,null],null,T,function(){T(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,T,Y){v.postMessage(JSON.stringify({event:"template",docUrl:P,info:T,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==y.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();
+P&&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 J=null!=y.messageKey?mxResources.get(y.messageKey):
+y.message;null==y.show||y.show?this.spinner.spin(document.body,J):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 V=this.editor.graph,O=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var T=this.createLoadMessage("export");T.format=y.format;T.message=y;T.data=P;T.xml=R;v.postMessage(JSON.stringify(T),"*")}),W=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==y.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(R)));V!=this.editor.graph&&V.container.parentNode.removeChild(V.container);
+O(P)}),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 P=V.getGlobalVariable;V=this.createTemporaryGraph(V.getStylesheet());for(var T,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){T=this.updatePageRoot(this.pages[Y]);break}null==T&&(T=this.currentPage);V.getGlobalVariable=function(fa){return"page"==fa?T.getName():"pagenumber"==
+fa?1:P.apply(this,arguments)};document.body.appendChild(V.container);V.model.setRoot(T.root)}if(null!=y.layerIds){var ca=V.model,ha=ca.getChildCells(ca.getRoot()),Z={};for(Y=0;Y<y.layerIds.length;Y++)Z[y.layerIds[Y]]=!0;for(Y=0;Y<ha.length;Y++)ca.setVisible(ha[Y],Z[ha[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(fa){W(fa.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){W(null)}),null,null,y.scale,y.transparent,y.shadow,null,V,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(P){200<=
+P.getStatus()&&299>=P.getStatus()?O("data:image/png;base64,"+P.getText()):W(null)}),mxUtils.bind(this,function(){W(null)}))}}else X=mxUtils.bind(this,function(){var P=this.createLoadMessage("export");P.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var T=this.getXmlFileData();P.xml=mxUtils.getXml(T);P.data=this.getFileData(null,null,!0,null,null,null,T);P.format=y.format}else if("html"==y.format)T=this.editor.getGraphXml(),P.data=this.getHtml(T,
+this.editor.graph),P.xml=mxUtils.getXml(T),P.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;T=null!=y.background?y.background:this.editor.graph.background;T==mxConstants.NONE&&(T=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var Y=mxUtils.bind(this,function(ca){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(ca);v.postMessage(JSON.stringify(P),"*")});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(P.xml,this.editor.graph,null,!0,Y,null,null,y.embedImages,T,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),T=this.editor.graph.getSvg(T,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(T),this.embedFonts(T,mxUtils.bind(this,function(ca){y.embedImages||null==y.embedImages?this.editor.convertImages(ca,mxUtils.bind(this,function(ha){Y(mxUtils.getXml(ha))})):Y(mxUtils.getXml(ca))}));return}v.postMessage(JSON.stringify(P),"*")}),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)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"))}))}}));
+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 E=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 P=this.editor.graph,T=P.maxFitScale;P.maxFitScale=y.maxFitScale;P.fit(2*E);P.maxFitScale=T;P.container.scrollTop-=2*E;P.container.scrollLeft-=2*E;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(D=document.createElement("span"),mxUtils.write(D,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(D),this.embedFilenameSpan=D);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(P){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var I=this.getCurrentFile();null!=I&&(D=N(y.xml),null!=D&&""!=D&&I.mergeFile(new LocalFile(this,D),function(){v.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(P){v.postMessage(JSON.stringify({event:"merge",message:y,error:P}),"*")}))}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(P){this.handleError(P)}}var S=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(P,T){g=!0;try{c(P,
+T,null,K)}catch(Y){this.handleError(Y)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=S();k&&null==e&&(e=mxUtils.bind(this,function(Y,ca){Y=S();Y==m||g||(ca=this.createLoadMessage("autosave"),ca.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(ca),"*"));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)T=this.createLoadMessage("load"),T.xml=P,v.postMessage(JSON.stringify(T),"*");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(P){Q(P,z)},mxUtils.bind(this,function(P){this.handleError(P)}),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(P){4==P.readyState&&200<=P.status&&299>=P.status&&
+"<mxGraphModel"==P.responseText.substring(0,13)&&Q(P.responseText,z)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(P){Q(P)}),mxUtils.bind(this,function(P){this.handleError(P)})):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(P){Q(S(),z)}),mxUtils.bind(this,function(P){this.handleError(P,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.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.executeLayouts(z.createLayouts(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=
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};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,D=null,A=null,B="whiteSpace=wrap;html=1;",G=null,M=null,H="",F="auto",J="auto",R=null,V=null,O=40,W=40,U=100,X=0,n=function(){null!=e?e(ya):(z.setSelectionCells(ya),z.scrollCellToVisible(z.getSelectionCell()))},E=z.getFreeInsertPoint(),I=E.x,S=E.y;E=S;var Q=null,P="auto";
+M=null;for(var T=[],Y=null,ca=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 fa=mxUtils.trim(c.substring(1,Z)),aa=mxUtils.trim(c.substring(Z+1));"label"==fa?Q=z.sanitizeHtml(aa):"labelname"==fa&&0<aa.length&&"-"!=aa?q=aa:"labels"==fa&&0<aa.length&&"-"!=aa?A=JSON.parse(aa):"style"==fa?
+L=aa:"parentstyle"==fa?B=aa:"unknownStyle"==fa&&"-"!=aa?D=aa:"stylename"==fa&&0<aa.length&&"-"!=aa?K=aa:"styles"==fa&&0<aa.length&&"-"!=aa?N=JSON.parse(aa):"vars"==fa&&0<aa.length&&"-"!=aa?y=JSON.parse(aa):"identity"==fa&&0<aa.length&&"-"!=aa?G=aa:"parent"==fa&&0<aa.length&&"-"!=aa?M=aa:"namespace"==fa&&0<aa.length&&"-"!=aa?H=aa:"width"==fa?F=aa:"height"==fa?J=aa:"left"==fa&&0<aa.length?R=aa:"top"==fa&&0<aa.length?V=aa:"ignore"==fa?ca=aa.split(","):"connect"==fa?T.push(JSON.parse(aa)):"link"==fa?
+Y=aa:"padding"==fa?X=parseFloat(aa):"edgespacing"==fa?O=parseFloat(aa):"nodespacing"==fa?W=parseFloat(aa):"levelspacing"==fa?U=parseFloat(aa):"layout"==fa&&(P=aa)}}}if(null==g[ha])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(g[ha].replace(/\r$/,""));Z=c=null;fa=[];for(aa=0;aa<wa.length;aa++)G==wa[aa]&&(c=aa),M==wa[aa]&&(Z=aa),fa.push(mxUtils.trim(wa[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Q&&(Q="%"+fa[0]+"%");if(null!=T)for(var la=
+0;la<T.length;la++)null==x[T[la].to]&&(x[T[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(I,E,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,fa[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 Ja=N[Ba.getAttribute(K)];null!=Ja&&(Ba.style=Ja)}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<T.length;la++)x[T[la].to][ua.getAttribute(T[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:I;ha=null!=M?0:S;null!=R&&null!=ua.getAttribute(R)&&(ua.geometry.x=Ba+parseFloat(ua.getAttribute(R)));null!=V&&null!=ua.getAttribute(V)&&(ua.geometry.y=ha+parseFloat(ua.getAttribute(V)));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="@"==J.charAt(0)?ua.getAttribute(J.substring(1)):null;ua.geometry.height=null!=Ma&&"auto"!=Ma?parseFloat(Ma):"auto"==J||"auto"==Ma?Ea.height+X:parseFloat(J);E+=ua.geometry.height+W}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="@"==J.charAt(0)?m[aa].getAttribute(J.substring(1)):null,"auto"!=F&&"auto"!=Ca||"auto"!=J&&"auto"!=Ma||z.updateGroupBounds([m[aa]],X,!0);var za=p.slice(),ya=p.slice();for(la=0;la<T.length;la++){var pa=T[la];for(aa=0;aa<k.length;aa++){ua=k[aa];var ea=mxUtils.bind(this,function(ma,ja,na){var sa=ja.getAttribute(na.from);if(null!=sa&&""!=sa){sa=sa.split(",");for(var ka=0;ka<sa.length;ka++){var Ha=x[na.to][sa[ka]];if(null==
+Ha&&null!=D){Ha=new mxCell(sa[ka],new mxGeometry(I,S,0,0),D);Ha.style=z.replacePlaceholders(ja,Ha.style,y);var Ga=this.editor.graph.getPreferredSizeForCell(Ha);Ha.geometry.width=Ga.width+X;Ha.geometry.height=Ga.height+X;x[na.to][sa[ka]]=Ha;Ha.vertex=!0;Ha.id=sa[ka];p.push(z.addCell(Ha))}if(null!=Ha){Ga=na.label;null!=na.fromlabel&&(Ga=(ja.getAttribute(na.fromlabel)||"")+(Ga||""));null!=na.sourcelabel&&(Ga=z.replacePlaceholders(ja,na.sourcelabel,y)+(Ga||""));null!=na.tolabel&&(Ga=(Ga||"")+(Ha.getAttribute(na.tolabel)||
+""));null!=na.targetlabel&&(Ga=(Ga||"")+z.replacePlaceholders(Ha,na.targetlabel,y));var Ra="target"==na.placeholders==!na.invert?Ha:ma;Ra=null!=na.style?z.replacePlaceholders(Ra,na.style,y):z.createCurrentEdgeStyle();Ga=z.insertEdge(null,null,Ga||"",na.invert?Ha:ma,na.invert?ma:Ha,Ra);if(null!=na.labels)for(Ra=0;Ra<na.labels.length;Ra++){var Sa=na.labels[Ra],Ia=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;");Ia.vertex=!0;Ia.connectable=!1;Ia.geometry.relative=
+!0;null!=Sa.placeholders&&(Ia.value=z.replacePlaceholders("target"==Sa.placeholders==!na.invert?Ha:ma,Ia.value,y));if(null!=Sa.dx||null!=Sa.dy)Ia.geometry.offset=new mxPoint(null!=Sa.dx?Sa.dx:0,null!=Sa.dy?Sa.dy:0);Ga.insert(Ia)}ya.push(Ga);mxUtils.remove(na.invert?ma:Ha,za)}}}});ea(ua,ua,pa);if(null!=v[ua.id])for(Ka=0;Ka<v[ua.id].length;Ka++)ea(ua,v[ua.id][Ka],pa)}}if(null!=ca)for(aa=0;aa<k.length;aa++)for(ua=k[aa],Ka=0;Ka<ca.length;Ka++)z.setAttributeForCell(ua,mxUtils.trim(ca[Ka]),null);if(0<p.length){var ra=
+new mxParallelEdgeLayout(z);ra.spacing=O;ra.checkOverlap=!0;var xa=function(){0<ra.spacing&&ra.execute(z.getDefaultParent());for(var ma=0;ma<p.length;ma++){var ja=z.getCellGeometry(p[ma]);ja.x=Math.round(z.snap(ja.x));ja.y=Math.round(z.snap(ja.y));"auto"==F&&(ja.width=Math.round(z.snap(ja.width)));"auto"==J&&(ja.height=Math.round(z.snap(ja.height)))}};if("["==P.charAt(0)){var va=n;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(P)),function(){xa();va()});n=null}else if("circle"==
+P){var qa=new mxCircleLayout(z);qa.disableEdgeStyle=!1;qa.resetEdges=!1;var ta=qa.isVertexIgnored;qa.isVertexIgnored=function(ma){return ta.apply(this,arguments)||0>mxUtils.indexOf(p,ma)};this.executeLayout(function(){qa.execute(z.getDefaultParent());xa()},!0,n);n=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ya.length==2*p.length-1&&1==za.length){z.view.validate();var ia=new mxCompactTreeLayout(z,"horizontaltree"==P);ia.levelDistance=W;ia.edgeRouting=!1;ia.resetEdges=!1;this.executeLayout(function(){ia.execute(z.getDefaultParent(),
+0<za.length?za[0]:null)},!0,n);n=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==za.length){z.view.validate();var oa=new mxHierarchicalLayout(z,"horizontalflow"==P?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=W;oa.parallelEdgeSpacing=O;oa.interRankCellSpacing=U;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(z.getDefaultParent(),ya);z.moveCells(ya,I,S)},!0,n);n=null}else if("organic"==P||"auto"==P&&ya.length>p.length){z.view.validate();
+var ba=new mxFastOrganicLayout(z);ba.forceConstant=3*W;ba.disableEdgeStyle=!1;ba.resetEdges=!1;var da=ba.isVertexIgnored;ba.isVertexIgnored=function(ma){return da.apply(this,arguments)||0>mxUtils.indexOf(p,ma)};this.executeLayout(function(){ba.execute(z.getDefaultParent());xa()},!0,n);n=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=n&&n()}}catch(ma){this.handleError(ma)}};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);
@@ -12084,13 +12086,13 @@ function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.protot
this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(k);this.actions.get("editData").setEnabled(c.isEnabled());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,p,v,x){var z=c.editor.graph;
+"")+"...";c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(k&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var C=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);C.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"))}});
+x&&(q.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});c.saveRequest(e,g,function(D,A){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(A||"0")+(null!=D?"&filename="+encodeURIComponent(D):"")+"&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 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"));
+(function(q,D){mxEvent.addListener(D,"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,
@@ -12099,9 +12101,9 @@ error:z});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,ms
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",
+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++;D()}),D=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)};
+"*"),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,D()):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=
@@ -12109,64 +12111,64 @@ function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};
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,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.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,D,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,D,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 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 CommentsWindow=function(b,f,l,d,u,t){function C(){for(var H=N.getElementsByTagName("div"),F=0,J=0;J<H.length;J++)"none"!=H[J].style.display&&H[J].parentNode==N&&F++;K.style.display=0==F?"block":"none"}function c(H,F,J,R){function V(){F.removeChild(U);F.removeChild(X);W.style.display="block";O.style.display="block"}z={div:F,comment:H,saveCallback:J,deleteOnCancel:R};var O=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=O.offsetHeight+"px";U.value=H.content;F.insertBefore(U,O);var X=document.createElement("div");X.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),C()):V();z=null});n.className="geCommentEditBtn";X.appendChild(n);var E=mxUtils.button(mxResources.get("save"),function(){O.innerHTML="";H.content=U.value;mxUtils.write(O,H.content);V();J(H);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(E.click(),mxEvent.consume(I)):27==I.keyCode&&(n.click(),mxEvent.consume(I)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,O);W.style.display="none";O.style.display="none";U.focus()}function e(H,F){F.innerHTML="";H=new Date(H.modifiedDate);var J=b.timeSince(H);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
+[J],"{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,J,R,V){function O(Q,P,T){var Y=document.createElement("li");Y.className="geCommentAction";var ca=document.createElement("a");ca.className=
+"geCommentActionLnk";mxUtils.write(ca,Q);Y.appendChild(ca);mxEvent.addListener(ca,"click",function(ha){P(ha,H);ha.preventDefault();mxEvent.consume(ha)});S.appendChild(Y);T&&(Y.style.display="none")}function W(){function Q(Y){P.push(T);if(null!=Y.replies)for(var ca=0;ca<Y.replies.length;ca++)T=T.nextSibling,Q(Y.replies[ca])}var P=[],T=X;Q(H);return{pdiv:T,replies:P}}function U(Q,P,T,Y,ca){function ha(){g(wa);H.addReply(aa,function(la){aa.id=la;H.replies.push(aa);m(wa);T&&T()},function(la){Z();k(wa);
+b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ca)}function Z(){c(aa,wa,function(la){ha()},!0)}var fa=W().pdiv,aa=b.newComment(Q,b.getCurrentUser());aa.pCommentId=H.id;null==H.replies&&(H.replies=[]);var wa=p(aa,H.replies,fa,R+1);P?Z():ha()}if(V||!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 E=document.createElement("img");E.className="geCommentUserImg";E.src=H.user.pictureUrl||Editor.userImage;n.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";n.appendChild(E);var I=document.createElement("div");I.className="geCommentUsername";mxUtils.write(I,H.user.displayName||"");E.appendChild(I);I=document.createElement("div");I.className="geCommentDate";I.setAttribute("data-commentId",
+H.id);e(H,I);E.appendChild(I);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 S=document.createElement("ul");S.className="geCommentActionsList";n.appendChild(S);v||H.isLocked||0!=R&&!x||O(mxResources.get("reply"),function(){U("",!0)},H.isResolved);E=b.getCurrentUser();null==E||E.id!=H.user.id||v||H.isLocked||(O(mxResources.get("edit"),
+function(){function Q(){c(H,X,function(){g(X);H.editComment(H.content,function(){m(X)},function(P){k(X);Q();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Q()},H.isResolved),O(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 P=X.querySelectorAll(".geCommentAction");for(Q=
+0;Q<P.length;Q++)P[Q].parentNode.removeChild(P[Q]);m(X);X.style.opacity="0.5"}else{P=W(H).replies;for(Q=0;Q<P.length;Q++)N.removeChild(P[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||O(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Q){function P(){var T=
+Q.target;T.innerHTML="";H.isResolved=!H.isResolved;mxUtils.write(T,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=H.isResolved?"none":"",ca=W(H).replies,ha=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",Z=0;Z<ca.length;Z++){ca[Z].style.backgroundColor=ha;for(var fa=ca[Z].querySelectorAll(".geCommentAction"),aa=0;aa<fa.length;aa++)fa[aa]!=T.parentNode&&(fa[aa].style.display=Y);A||(ca[Z].style.display="none")}C()}H.isResolved?U(mxResources.get("reOpened")+
+": ",!0,P,!1,!0):U(mxResources.get("markedAsResolved"),!1,P,!0)});X.appendChild(n);null!=J?N.insertBefore(X,J.nextSibling):N.appendChild(X);for(J=0;null!=H.replies&&J<H.replies.length;J++)n=H.replies[J],n.isResolved=H.isResolved,p(n,H.replies,null,R+1,V);null!=z&&(z.comment.id==H.id?(V=H.content,H.content=z.comment.content,c(H,X,z.saveCallback,z.deleteOnCancel),H.content=V):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,
+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 D=L.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(D,"click",function(H){function F(){c(J,R,function(V){g(R);b.addComment(V,function(O){V.id=O;B.push(V);m(R)},function(O){k(R);F();b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),R=p(J,B,null,0);F();H.preventDefault();mxEvent.consume(H)});q.appendChild(D)}D=L.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
+var A=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(H){this.className=(A=!A)?"geButton geCheckedBtn":"geButton";G();H.preventDefault();mxEvent.consume(H)});q.appendChild(D);b.commentsRefreshNeeded()&&(D=L.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(H){G();
+H.preventDefault();mxEvent.consume(H)}),q.appendChild(D));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(J){b.handleError(J)}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(J){function R(V){if(null!=V){V.sort(function(W,U){return new Date(W.modifiedDate)-
+new Date(U.modifiedDate)});for(var O=0;O<V.length;O++)R(V[O].replies)}}J.sort(function(V,O){return new Date(V.modifiedDate)-new Date(O.modifiedDate)});N.innerHTML="";N.appendChild(K);K.style.display="block";B=J;for(J=0;J<B.length;J++)R(B[J].replies),p(B[J],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(J){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?
+": "+J.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;q=mxUtils.bind(this,function(){function H(O){var W=J[O.id];if(null!=W)for(e(O,W),W=0;null!=O.replies&&W<O.replies.length;W++)H(O.replies[W])}if(this.window.isVisible()){for(var F=N.querySelectorAll(".geCommentDate"),J={},R=0;R<F.length;R++){var V=F[R];J[V.getAttribute("data-commentId")]=V}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 J=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,J-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,C,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!=C?(x.innerHTML=
+C+"<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 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),
+EditorUi.prototype.patchPages=function(b,f,l,d,u){var t={},C=[],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 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;C.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(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),
+delete c[m];return C};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var 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],C=null!=t.parent?t.parent:"",c=null!=t.previous?t.previous:"";l(C).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&&(C=t.parent,null==C&&(u=b.getCell(e),null!=u&&(u=
+b.getParent(u),null!=u&&(C=u.getId()))),null!=C&&(l(C).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 C=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]}}};
+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=C;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()],C=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=C[k],null!=m&&(delete C[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 C)g.push({child:this.getCellForJson(C[k]),insert:!0}),delete C[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)};
EditorUi.prototype.getPagesForNode=function(b,f){var l=this.editor.extractGraphModel(b,!0,!0);null!=l&&(b=l);f=b.getElementsByTagName(f||"diagram");l=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);l.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(d.node,Graph.compressNode(b,!0)),l.push(d));return l};
-EditorUi.prototype.diffPages=function(b,f){var l=[],d=[],u={},t={},D={},c=null;if(null!=b&&null!=f){for(var e=0;e<f.length;e++)t[f[e].getId()]={page:f[e],prev:c},c=f[e];c=null;for(e=0;e<b.length;e++){var g=b[e].getId();f=t[g];if(null==f)d.push(g);else{var k=this.diffPage(b[e],f.page),m={};mxUtils.isEmptyObject(k)||(m.cells=k);k=this.diffViewState(b[e],f.page);mxUtils.isEmptyObject(k)||(m.view=k);if((null!=f.prev?null==c:null!=c)||null!=c&&null!=f.prev&&c.getId()!=f.prev.getId())m.previous=null!=f.prev?
-f.prev.getId():"";null!=f.page.getName()&&b[e].getName()!=f.page.getName()&&(m.name=f.page.getName());mxUtils.isEmptyObject(m)||(D[g]=m)}delete t[b[e].getId()];c=b[e]}for(g in t)f=t[g],l.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(D)||(u[EditorUi.DIFF_UPDATE]=D);0<d.length&&(u[EditorUi.DIFF_REMOVE]=d);0<l.length&&(u[EditorUi.DIFF_INSERT]=l)}return u};
+EditorUi.prototype.diffPages=function(b,f){var l=[],d=[],u={},t={},C={},c=null;if(null!=b&&null!=f){for(var e=0;e<f.length;e++)t[f[e].getId()]={page:f[e],prev:c},c=f[e];c=null;for(e=0;e<b.length;e++){var g=b[e].getId();f=t[g];if(null==f)d.push(g);else{var k=this.diffPage(b[e],f.page),m={};mxUtils.isEmptyObject(k)||(m.cells=k);k=this.diffViewState(b[e],f.page);mxUtils.isEmptyObject(k)||(m.view=k);if((null!=f.prev?null==c:null!=c)||null!=c&&null!=f.prev&&c.getId()!=f.prev.getId())m.previous=null!=f.prev?
+f.prev.getId():"";null!=f.page.getName()&&b[e].getName()!=f.page.getName()&&(m.name=f.page.getName());mxUtils.isEmptyObject(m)||(C[g]=m)}delete t[b[e].getId()];c=b[e]}for(g in t)f=t[g],l.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(C)||(u[EditorUi.DIFF_UPDATE]=C);0<d.length&&(u[EditorUi.DIFF_REMOVE]=d);0<l.length&&(u[EditorUi.DIFF_INSERT]=l)}return u};
EditorUi.prototype.createCellLookup=function(b,f,l){l=null!=l?l:{};l[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var u=0;u<d;u++){var t=b.getChildAt(u);this.createCellLookup(t,f,l);f=t}return l};
-EditorUi.prototype.diffCellRecursive=function(b,f,l,d,u){d=null!=d?d:{};var t=l[b.getId()];delete l[b.getId()];if(null==t)u.push(b.getId());else{var D=this.diffCell(b,t.cell);if(null!=D.parent||(null!=t.prev?null==f:null!=f)||null!=f&&null!=t.prev&&f.getId()!=t.prev.getId())D.previous=null!=t.prev?t.prev.getId():"";mxUtils.isEmptyObject(D)||(d[b.getId()]=D)}t=b.getChildCount();f=null;for(D=0;D<t;D++){var c=b.getChildAt(D);this.diffCellRecursive(c,f,l,d,u);f=c}return d};
-EditorUi.prototype.diffPage=function(b,f){var l=[],d=[],u={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var t=this.diffCellRecursive(b.root,null,f,t,d),D;for(D in f)b=f[D],l.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(t)||(u[EditorUi.DIFF_UPDATE]=t);0<d.length&&(u[EditorUi.DIFF_REMOVE]=d);0<l.length&&(u[EditorUi.DIFF_INSERT]=l);return u};
+EditorUi.prototype.diffCellRecursive=function(b,f,l,d,u){d=null!=d?d:{};var t=l[b.getId()];delete l[b.getId()];if(null==t)u.push(b.getId());else{var C=this.diffCell(b,t.cell);if(null!=C.parent||(null!=t.prev?null==f:null!=f)||null!=f&&null!=t.prev&&f.getId()!=t.prev.getId())C.previous=null!=t.prev?t.prev.getId():"";mxUtils.isEmptyObject(C)||(d[b.getId()]=C)}t=b.getChildCount();f=null;for(C=0;C<t;C++){var c=b.getChildAt(C);this.diffCellRecursive(c,f,l,d,u);f=c}return d};
+EditorUi.prototype.diffPage=function(b,f){var l=[],d=[],u={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var t=this.diffCellRecursive(b.root,null,f,t,d),C;for(C in f)b=f[C],l.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(t)||(u[EditorUi.DIFF_UPDATE]=t);0<d.length&&(u[EditorUi.DIFF_REMOVE]=d);0<l.length&&(u[EditorUi.DIFF_INSERT]=l);return u};
EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var l=f.viewState,d={};f==this.currentPage&&(l=this.editor.graph.getViewState());if(null!=b&&null!=l)for(var u in this.viewStateProperties)this.diffViewStateProperty(b,l,u,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,f,l,d){b=JSON.stringify(this.getViewStateProperty(b,l));f=JSON.stringify(this.getViewStateProperty(f,l));b!=f&&(d[l]=f)};
EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==f&&null==b&&(b=[]);return b};
EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,l=b.value;null!=b.xmlValue&&(l=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(l,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f};
EditorUi.prototype.getJsonForCell=function(b,f){var l={id:b.getId()};b.vertex&&(l.vertex=1);b.edge&&(l.edge=1);b.connectable||(l.connectable=0);null!=b.parent&&(l.parent=b.parent.getId());null!=f&&(l.previous=f.getId());null!=b.source&&(l.source=b.source.getId());null!=b.target&&(l.target=b.target.getId());null!=b.style&&(l.style=b.style);null!=b.geometry&&(l.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(l.collapsed=1);b.visible||(l.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?l.xmlValue=mxUtils.getXml(b.value):l.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(l[d]=b[d]);return l};
-EditorUi.prototype.diffCell=function(b,f){function l(D){return null!=D&&"object"===typeof D&&"number"===typeof D.nodeType&&"string"===typeof D.nodeName&&"function"===typeof D.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
+EditorUi.prototype.diffCell=function(b,f){function l(C){return null!=C&&"object"===typeof C&&"number"===typeof C.nodeType&&"string"===typeof C.nodeName&&"function"===typeof C.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";l(b.value)&&l(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(l(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value?
f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var u=this.codec.encode(f.geometry);null!=u&&(d.geometry=mxUtils.getXml(u))}for(var t in b)this.cellProperties[t]||"function"===typeof b[t]||"function"===typeof f[t]||b[t]==f[t]||(d[t]=void 0===f[t]?null:f[t]);for(t in f)t in b||this.cellProperties[t]||"function"===typeof b[t]||"function"===
typeof f[t]||b[t]==f[t]||(d[t]=void 0===f[t]?null:f[t]);return d};EditorUi.prototype.isObjectEqual=function(b,f,l){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(u,t){return null==l||l[u]!=t?!0===t?1:t:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},getUi:function(){return mxSettings.settings.ui},setUi:function(b){var f=localStorage.getItem(".drawio-config");f=null==f?mxSettings.getDefaults():JSON.parse(f);f.ui=b;delete f.isNew;f.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(f))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
@@ -12214,22 +12216,22 @@ DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatc
DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(u,t){return u.id<t.id?-1:u.id>t.id?1:0});for(var f=null,l=0;l<this.receivedData.length;l++){var d=JSON.stringify(this.receivedData[l].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[l].c);
f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))};
DrawioFileSync.prototype.cleanup=function(b,f,l){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",l);l?this.file.getLatestVersion(mxUtils.bind(this,function(u){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var t=this.ui.getPagesForXml(u.data);d=[this.ui.diffPages(this.ui.pages,t),this.ui.diffPages(t,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",u,"patches",d)}null!=b&&b()}catch(D){null!=f&&f(D)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",l,"modified",this.file.isModified()))};
+!this.file.inConflictState&&this.file.isRealtime()){var t=this.ui.getPagesForXml(u.data);d=[this.ui.diffPages(this.ui.pages,t),this.ui.diffPages(t,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",u,"patches",d)}null!=b&&b()}catch(C){null!=f&&f(C)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",l,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var l in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][l];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][l]={};var u=f[EditorUi.DIFF_UPDATE][l];u.cells={};u.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};
DrawioFileSync.prototype.patchRealtime=function(b,f,l){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var u=this.extractRemove(this.extractLocal(d)),t=(null==l?b:b.concat(l)).concat([u]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,t,!0,f);mxUtils.isEmptyObject(u)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",l,"all",d,"local",
u,"applied",t)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([f])}this.localFileWasChanged=!1}catch(l){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
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");
+DrawioFileSync.prototype.merge=function(b,f,l,d,u,t){try{this.file.stats.merged++;this.lastModified=new Date;var C=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",C,"etag",this.file.getDescriptorEtag(l));if(null!=f&&f!=g){var k=this.ui.hashValue(C),m=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(u,b,"From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nCurrent: "+g,C,"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(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){}}};
+null!=u&&u(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(C),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(p){this.file.stats.bytesReceived+=p.getText().length;window.clearTimeout(m);if(k&&
+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 C=this.file.getDescriptorSecret(b);if(null==C||"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!=C?"&secret="+encodeURIComponent(C):""),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)};
@@ -12237,9 +12239,9 @@ DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.fi
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 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):
+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()})),C=this.file.getDescriptorSecret(this.file.getDescriptor()),c=this.file.getDescriptorRevisionId(f),e=this.file.getCurrentRevisionId();if(null==
+C||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 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!=C?"&secret="+encodeURIComponent(C):"")+(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")}))};
@@ -12250,7 +12252,7 @@ this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(
d.ageStart?Math.round((Date.now()-d.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(d.isAutosave()?"":"-noauto")+"-open_"+(null!=d.opened?Math.round((Date.now()-d.opened.getTime())/1E3):"x")+"-save_"+(null!=d.lastSaved?Math.round((Date.now()-d.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=d.lastChanged?Math.round((Date.now()-d.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=d.sync?"client_"+d.sync.clientId:"nosync"};
d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(u.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(u)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,u,t){if("1"==urlParams.openInSameWin||navigator.standalone)t();else{var D=null;try{D=window.open(d)}catch(c){}null==D||void 0===D?this.showDialog((new PopupDialog(this,d,u,t)).container,320,140,!0,!0):null!=u&&u()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,u,t){if("1"==urlParams.openInSameWin||navigator.standalone)t();else{var C=null;try{C=window.open(d)}catch(c){}null==C||void 0===C?this.showDialog((new PopupDialog(this,d,u,t)).container,320,140,!0,!0):null!=u&&u()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.3.1.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js";
@@ -12277,7 +12279,7 @@ parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype
!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",
+isLocalStorage&&"undefined"!==typeof JSON)try{var C=JSON.parse(localStorage.getItem(mxSettings.key));null!=C&&(u=C.plugins)}catch(k){}C=urlParams.p;App.initPluginCallback();null!=C&&App.loadPlugins(C.split(";"));if(null!=u&&0<u.length&&"0"!=urlParams.plugins){C=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,C.length)!=C&&(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(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",
@@ -12319,21 +12321,21 @@ l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute(
b.appendChild(l);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(d);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.setAttribute("title","3 star");u.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");u.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(u);var t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.setAttribute("title","4 star");t.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");t.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(t);this.bannerShowing=!0;var D=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);D()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);D()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(c){mxEvent.consume(c);D()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);D()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");D()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(t);this.bannerShowing=!0;var C=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);C()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);C()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(c){mxEvent.consume(c);C()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);C()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");C()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var l=f.lastIndexOf("@"),d=0<=l?f.substring(l+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(u){try{if(200<=u.getStatus()&&299>=u.getStatus()){var t=u.getText();if(0<t.length){var D=JSON.parse(t);null!=D&&this.handleLicense(D,
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var l=f.lastIndexOf("@"),d=0<=l?f.substring(l+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(u){try{if(200<=u.getStatus()&&299>=u.getStatus()){var t=u.getText();if(0<t.length){var C=JSON.parse(t);null!=C&&this.handleLicense(C,
d)}}}catch(c){}}))}};App.prototype.handleLicense=function(b,f){null!=b&&null!=b.plugins&&App.loadPlugins(b.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var f=this.getRecent();if(null==f)f=[];else for(var l=0;l<f.length;l++)f[l].id==b.id&&f.splice(l,1);null!=f&&(f.unshift(b),f=f.slice(0,10),localStorage.setItem(".recent",JSON.stringify(f)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(f){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(f){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
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(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};
+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 C=this.editor.graph,c=C.backgroundImage,e=null!=C.themes&&"darkTheme"==C.defaultThemeName;if(null!=this.pages&&(e||this.currentPage!=this.pages[0])){var g=C.getGlobalVariable;C=this.createTemporaryGraph(C.getStylesheet());C.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var k=this.pages[0];this.currentPage==k?C.setBackgroundImage(c):null!=k.viewState&&null!=k.viewState&&(c=k.viewState.backgroundImage,C.setBackgroundImage(c));C.getGlobalVariable=function(G){return"page"==G?k.getName():"pagenumber"==G?1:g.apply(this,arguments)};C.getGlobalVariable=g;document.body.appendChild(C.container);C.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{C!=this.editor.graph&&
+null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(M){G=null}t(G)}),b,this.thumbImageCache,"#ffffff",function(){t()},null,null,null,null,null,null,C,null,null,null,null,"diagram",null),l=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=C.getGraphBounds(),v=C.view.translate,x=C.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=C.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 D=new mxJsCanvas(m),
+A=new mxAsyncCanvas(this.thumbImageCache);D.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(C.getView().getState(C.model.root),A);A.finish(mxUtils.bind(this,function(){try{B.drawState(C.getView().getState(C.model.root),D),C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.container)}catch(G){m=
+null}t(m)}));l=!0}}catch(G){l=!1,null!=C&&C!=this.editor.graph&&null!=C.container.parentNode&&C.container.parentNode.removeChild(C.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){}}})();
App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var f=this.getCurrentFile(),l=null!=f?f.getMode():null;l==App.MODE_GOOGLE?null!=f&&null!=f.desc&&null!=f.desc.parents&&0<f.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+f.desc.parents[0].id):null!=f&&null!=f.getId()?this.openLink("https://drive.google.com/open?id="+f.getId()):this.openLink("https://drive.google.com/?authuser=0"):l==App.MODE_ONEDRIVE?null!=
@@ -12349,20 +12351,20 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(l){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(l))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(t,D,c,e,g){"ResizeObserver loop limit exceeded"!=t&&(EditorUi.logError("Uncaught: "+(null!=t?t:""),D,c,e,g,null,!0),b.handleError({message:t},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(t){var D=this.getCurrentFile();EditorUi.debug("storage event",[t],[D]);null!=D&&".draft-alive-check"==t.key&&null!=t.newValue&&null!=D.draftId&&(this.draftAliveCheck=t.newValue,D.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(t){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(t){try{this.hideDialog();
-var D=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==D||this.loadFile(D,!0)}catch(e){null!=document.body&&this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(t){this.handleError(t,mxResources.get("errorLoadingFile"))}))}catch(t){this.handleError(t,
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(t,C,c,e,g){"ResizeObserver loop limit exceeded"!=t&&(EditorUi.logError("Uncaught: "+(null!=t?t:""),C,c,e,g,null,!0),b.handleError({message:t},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(t){var C=this.getCurrentFile();EditorUi.debug("storage event",[t],[C]);null!=C&&".draft-alive-check"==t.key&&null!=t.newValue&&null!=C.draftId&&(this.draftAliveCheck=t.newValue,C.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(t){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(t){try{this.hideDialog();
+var C=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==C||this.loadFile(C,!0)}catch(e){null!=document.body&&this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(t){this.handleError(t,mxResources.get("errorLoadingFile"))}))}catch(t){this.handleError(t,
mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var t=mxUtils.bind(this,function(e){Editor.isPngDataUrl(e)&&(e=Editor.extractGraphModelFromPng(e));var g=urlParams.title;g=null!=g?decodeURIComponent(g):
-this.defaultFilename;e=new LocalFile(this,e,g,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(e.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(e);this.getCurrentFile().setModified(!this.editor.chromeless)}),D=window.opener||window.parent;if(D!=window){var c=urlParams.create;null!=c?t(D[decodeURIComponent(c)]):(c=urlParams.data,null!=c?t(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(e,g){g.source==D&&t(e)})))}}else if(null==
+this.defaultFilename;e=new LocalFile(this,e,g,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(e.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(e);this.getCurrentFile().setModified(!this.editor.chromeless)}),C=window.opener||window.parent;if(C!=window){var c=urlParams.create;null!=c?t(C[decodeURIComponent(c)]):(c=urlParams.data,null!=c?t(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(e,g){g.source==C&&t(e)})))}}else if(null==
this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(e){}c?this.spinner.spin(document.body,mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length||this.editor.isChromelessView()?null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,
function(){var e=decodeURIComponent(urlParams.viewbox||"");if(""!=e)try{var g=JSON.parse(e);this.editor.graph.fitWindow(g,g.border)}catch(k){console.error(k)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),l=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=l&&0<l.length&&this.spinner.spin(document.body,
-mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),u=mxUtils.bind(this,function(t){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,t,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;t=this.getServiceCount(!0);isLocalStorage&&t++;var c=4>=
-t?2:6<t?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(e,g){if(null==g){this.hideDialog();var k=Editor.useLocalStorage;this.createFile(0<e.length?e:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,this.getFileData(!0),null,g,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(D.container,420,t>c?
-390:280,!0,!1,mxUtils.bind(this,function(e){e&&null==this.getCurrentFile()&&this.showSplash()}));D.init()}});l=decodeURIComponent(l);if("http://"!=l.substring(0,7)&&"https://"!=l.substring(0,8))try{null!=window.opener&&null!=window.opener[l]?u(window.opener[l]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}else this.loadTemplate(l,function(t){u(t)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
+mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),u=mxUtils.bind(this,function(t){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,t,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var C=urlParams.title;C=null!=C?decodeURIComponent(C):this.defaultFilename;t=this.getServiceCount(!0);isLocalStorage&&t++;var c=4>=
+t?2:6<t?4:3;C=new CreateDialog(this,C,mxUtils.bind(this,function(e,g){if(null==g){this.hideDialog();var k=Editor.useLocalStorage;this.createFile(0<e.length?e:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,this.getFileData(!0),null,g,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(C.container,420,t>c?
+390:280,!0,!1,mxUtils.bind(this,function(e){e&&null==this.getCurrentFile()&&this.showSplash()}));C.init()}});l=decodeURIComponent(l);if("http://"!=l.substring(0,7)&&"https://"!=l.substring(0,8))try{null!=window.opener&&null!=window.opener[l]?u(window.opener[l]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}else this.loadTemplate(l,function(t){u(t)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
f())}}catch(t){this.handleError(t)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,l){function d(){l(u)}var u=[];try{this.getDatabaseItems(mxUtils.bind(this,function(t){EditorUi.debug("App.filterDrafts",[this],"items",t);for(var D=0;D<t.length;D++)try{var c=t[D].key;if(null!=c&&".draft_"==c.substring(0,7)){var e=JSON.parse(t[D].data);null!=e&&"draft"==e.type&&e.aliveCheck!=f&&(null==b&&null==e.fileObject||null!=e.fileObject&&e.fileObject.path==b)&&(e.key=c,u.push(e))}}catch(g){}d()},d))}catch(t){d()}};
+App.prototype.filterDrafts=function(b,f,l){function d(){l(u)}var u=[];try{this.getDatabaseItems(mxUtils.bind(this,function(t){EditorUi.debug("App.filterDrafts",[this],"items",t);for(var C=0;C<t.length;C++)try{var c=t[C].key;if(null!=c&&".draft_"==c.substring(0,7)){var e=JSON.parse(t[C].data);null!=e&&"draft"==e.type&&e.aliveCheck!=f&&(null==b&&null==e.fileObject||null!=e.fileObject&&e.fileObject.path==b)&&(e.key=c,u.push(e))}}catch(g){}d()},d))}catch(t){d()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var l=new Date(f[0].modified);l=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
[l.toLocaleDateString()+" "+l.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,u){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key);null!=u&&u()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(l.container,
640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));l.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
@@ -12371,41 +12373,41 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash
App.prototype.addLanguageMenu=function(b,f){var l=null;null!=this.menus.get("language")&&(l=document.createElement("div"),l.setAttribute("title",mxResources.get("language")),l.className="geIcon geSprite geSprite-globe",l.style.position="absolute",l.style.cursor="pointer",l.style.bottom="20px",l.style.right="20px",f&&(l.style.direction="rtl",l.style.textAlign="right",l.style.right="24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="5px 24px 0 0",
f.style.color="gray",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),l.appendChild(f)),mxEvent.addListener(l,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();var u=new mxPopupMenu(this.menus.get("language").funct);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=mxUtils.getOffset(l);u.popup(t.x,
t.y+l.offsetHeight,null,d);this.setCurrentMenu(u)})),b.appendChild(l));return l};
-App.prototype.loadFileSystemEntry=function(b,f,l){l=null!=l?l:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var u=new FileReader;u.onload=mxUtils.bind(this,function(t){try{if(null!=f){var D=t.target.result;"image/png"==d.type&&(D=this.extractGraphModelFromPng(D));f(new LocalFile(this,D,d.name,null,b,d))}else this.openFileHandle(t.target.result,d.name,d,!1,b)}catch(c){l(c)}});u.onerror=l;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
+App.prototype.loadFileSystemEntry=function(b,f,l){l=null!=l?l:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var u=new FileReader;u.onload=mxUtils.bind(this,function(t){try{if(null!=f){var C=t.target.result;"image/png"==d.type&&(C=this.extractGraphModelFromPng(C));f(new LocalFile(this,C,d.name,null,b,d))}else this.openFileHandle(t.target.result,d.name,d,!1,b)}catch(c){l(c)}});u.onerror=l;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
"image/svg"===d.type.substring(0,9)?u.readAsText(d):u.readAsDataURL(d)}),l)}catch(d){l(d)}};
App.prototype.createFileSystemOptions=function(b){var f=[],l=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(l=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var u={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};u.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==l?f.splice(0,0,
u):this.editor.diagramFileTypes[d].extension==l?f.splice(0,0,u):f.push(u)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,l){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});l=null!=l?l:this.createFileSystemOptions();window.showSaveFilePicker(l).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(u){b(d,u)}),f)}),f)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(D){null!=D&&0<D.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(D[0])}),
-mxUtils.bind(this,function(D){"AbortError"!=D.name&&this.handleError(D)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.openFiles(l.files),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.openFileInputElt=l}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(D,c){StorageFile.listFiles(this,"F",D,c)});window.openBrowserFile=mxUtils.bind(this,function(D,c,e){StorageFile.getFileContent(this,D,c,e)});window.deleteBrowserFile=mxUtils.bind(this,function(D,c,e){StorageFile.deleteFile(this,D,c,e)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(D,c){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,D,c):new LocalFile(this,D,c))}),g=this.getCurrentFile();null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var u=this.dialog,t=u.close;this.dialog.close=mxUtils.bind(this,function(D){Editor.useLocalStorage=
-d;t.apply(u,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(D){this.handleError(D)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(u,t){if(null!=t)try{this.loadLibrary(t)}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&f.getLibrary(u,mxUtils.bind(this,function(D){this.spinner.stop();try{this.loadLibrary(D)}catch(c){this.handleError(c,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(D){this.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if(null!=
-l.files){for(var u=0;u<l.files.length;u++)mxUtils.bind(this,function(t){var D=new FileReader;D.onload=mxUtils.bind(this,function(c){try{this.loadLibrary(new LocalLibrary(this,c.target.result,t.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}});D.readAsText(t)})(l.files[u]);l.type="";l.type="file";l.value=""}}));l.style.display="none";document.body.appendChild(l);this.libFileInputElt=l}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-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"))?
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(C){null!=C&&0<C.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(C[0])}),
+mxUtils.bind(this,function(C){"AbortError"!=C.name&&this.handleError(C)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.openFiles(l.files),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.openFileInputElt=l}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(C,c){StorageFile.listFiles(this,"F",C,c)});window.openBrowserFile=mxUtils.bind(this,function(C,c,e){StorageFile.getFileContent(this,C,c,e)});window.deleteBrowserFile=mxUtils.bind(this,function(C,c,e){StorageFile.deleteFile(this,C,c,e)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(C,c){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,C,c):new LocalFile(this,C,c))}),g=this.getCurrentFile();null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var u=this.dialog,t=u.close;this.dialog.close=mxUtils.bind(this,function(C){Editor.useLocalStorage=
+d;t.apply(u,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(C){this.handleError(C)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(u,t){if(null!=t)try{this.loadLibrary(t)}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&f.getLibrary(u,mxUtils.bind(this,function(C){this.spinner.stop();try{this.loadLibrary(C)}catch(c){this.handleError(c,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(C){this.handleError(C,null!=C?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if(null!=
+l.files){for(var u=0;u<l.files.length;u++)mxUtils.bind(this,function(t){var C=new FileReader;C.onload=mxUtils.bind(this,function(c){try{this.loadLibrary(new LocalLibrary(this,c.target.result,t.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}});C.readAsText(t)})(l.files[u]);l.type="";l.type="file";l.value=""}}));l.style.display="none";document.body.appendChild(l);this.libFileInputElt=l}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(u,t){StorageFile.listFiles(this,"L",u,t)});window.openBrowserFile=mxUtils.bind(this,function(u,t,C){StorageFile.getFileContent(this,u,t,C)});window.deleteBrowserFile=mxUtils.bind(this,function(u,t,C){StorageFile.deleteFile(this,u,t,C)});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(C){this.handleError(C,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,C){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!=C&&C();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(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()&&
+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!=C&&C()}),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,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,
+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,C=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==C&&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)):C!=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)?
+App.prototype.loadTemplate=function(b,f,l,d,u){var t=!1,C=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(C)||(t=d||e,C="t="+(new Date).getTime(),C=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+C+(t?"&base64=1":""));this.editor.loadUrl(C,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);
else if(this.isLucidChartData(k))this.convertLucidChart(k,mxUtils.bind(this,function(m){f(m)}),mxUtils.bind(this,function(m){l(m)}));else{if(/(\.png)($|\?)/i.test(c)||Editor.isPngData(k))k=Editor.extractGraphModelFromPng(g);f(k)}}catch(m){l(m)}}),l,/(\.png)($|\?)/i.test(c)||/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c),null,null,t)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-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,
+App.prototype.createFile=function(b,f,l,d,u,t,C,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==C&&null!=this.stateArg&&null!=this.stateArg.folderId&&(C=this.stateArg.folderId),
+this.drive.insertFile(b,f,C,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,C):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,C):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,C):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,C):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,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 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();
+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 C=b.getData();C=0<C.length?this.editor.extractGraphModel(mxUtils.parseXml(C).documentElement,!0):null;var c=window.location.protocol+"//"+window.location.hostname+t,e=C,g=null;null!=C&&/\.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(C,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();
@@ -12418,46 +12420,46 @@ this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html
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 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)};
+C=this.getCurrentFile(),c=mxUtils.bind(this,function(){u||null==C||!C.isModified()?t():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=C&&(window.location.hash=C.getHash())}),t,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?c():null==C||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()}),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==
+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,C=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--;C()}),p=mxUtils.bind(this,function(L){l(g,L);d--;C()}),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()}};
+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)}C()}};
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=
null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage=
"none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),
Editor.isDarkMode()||"atlas"==uiTheme||(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var l=null,d=mxUtils.bind(this,function(u){u=u.filter(function(e){return!e.targets||-1<e.targets.indexOf(b)||null!=f&&-1<e.targets.indexOf(f)});for(var t=b+"NotifReadTS",D=isLocalStorage?parseInt(localStorage.getItem(t)):!0,c=0;c<u.length;c++)u[c].isNew=!D||u[c].timestamp>D;this.showNotification(u,t)});try{isLocalStorage&&(l=JSON.parse(localStorage.getItem(".notifCache")))}catch(u){}null==l||l.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()&&(u=JSON.parse(u.getText()),u.sort(function(t,D){return D.timestamp-t.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:u})),this.fetchingNotif=!1,d(u))}))):d(l.notifs)}};
+App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var l=null,d=mxUtils.bind(this,function(u){u=u.filter(function(e){return!e.targets||-1<e.targets.indexOf(b)||null!=f&&-1<e.targets.indexOf(f)});for(var t=b+"NotifReadTS",C=isLocalStorage?parseInt(localStorage.getItem(t)):!0,c=0;c<u.length;c++)u[c].isNew=!C||u[c].timestamp>C;this.showNotification(u,t)});try{isLocalStorage&&(l=JSON.parse(localStorage.getItem(".notifCache")))}catch(u){}null==l||l.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()&&(u=JSON.parse(u.getText()),u.sort(function(t,C){return C.timestamp-t.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:u})),this.fetchingNotif=!1,d(u))}))):d(l.notifs)}};
App.prototype.showNotification=function(b,f){function l(g){var k=document.querySelector(".geNotification-count");null!=k&&(k.innerHTML=g,k.style.display=0==g?"none":"",k=document.querySelector(".geNotification-bell"),k.style.animation=0==g?"none":"",k.className="geNotification-bell"+(0==g?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==g?"none":"")}var d=b.length;if("min"==uiTheme)for(var u=d=0;u<b.length;u++)b[u].isNew&&d++;if(0==d)null!=this.notificationBtn&&
(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var t=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var g=this.notificationWin.querySelectorAll(".circle.active"),k=0;k<g.length;k++)g[k].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==uiTheme?"0.5":"";u=document.createElement("span");u.className="geBell-top";d.appendChild(u);u=document.createElement("span");u.className="geBell-middle";d.appendChild(u);
u=document.createElement("span");u.className="geBell-bottom";d.appendChild(u);u=document.createElement("span");u.className="geBell-rad";d.appendChild(u);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);u=document.createElement("div");u.className=
-"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");u.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";u.appendChild(d);this.notificationWin.appendChild(u);u=document.createElement("div");u.className="notifications clearfix";var D=document.createElement("div");D.setAttribute("id","geNotifList");D.style.position="relative";u.appendChild(D);this.notificationWin.appendChild(u);mxEvent.addListener(this.notificationBtn,
+"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");u.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";u.appendChild(d);this.notificationWin.appendChild(u);u=document.createElement("div");u.className="notifications clearfix";var C=document.createElement("div");C.setAttribute("id","geNotifList");C.style.position="relative";u.appendChild(C);this.notificationWin.appendChild(u);mxEvent.addListener(this.notificationBtn,
"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var g=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=g.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=g.right-this.notificationWin.clientWidth+"px";l(0)}else t()}));mxEvent.addListener(d,"click",t)}else this.notificationBtn.style.display="";var c=0,e=document.getElementById("geNotifList");
if(null!=e){e.innerHTML='<div class="line"></div>';for(u=0;u<b.length;u++)(function(g,k){k.isNew&&c++;var m=document.createElement("div");m.className="notification";g=g.timeSince(new Date(k.timestamp));null==g&&(g=mxResources.get("lessThanAMinute"));m.innerHTML='<div class="circle'+(k.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[g],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(k.content)+"</p>";k.link&&mxEvent.addListener(m,"click",function(){window.open(k.link,
"notifWin")});e.appendChild(m)})(this,b[u]);l(c)}}};
App.prototype.save=function(b,f){var l=this.getCurrentFile();if(null!=l&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){l.handleFileSuccess(!0);null!=f&&f()}),u=mxUtils.bind(this,function(t){l.isModified()&&Editor.addRetryToError(t,mxUtils.bind(this,function(){this.save(b,f)}));l.handleFileError(t,null==t||"AbortError"!=t.name)});try{b==l.getTitle()?l.save(!0,d,
u):l.saveAs(b,d,u)}catch(t){u(t)}}};
-App.prototype.pickFolder=function(b,f,l,d,u){l=null!=l?l:!0;var t=this.spinner.pause();l&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(D){t();if(D.action==google.picker.Action.PICKED){var c=null;null!=D.docs&&0<D.docs.length&&"folder"==D.docs[0].type&&(c=D.docs[0].id);f(c)}}),u):l&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(D){t();null!=D&&null!=D.value&&0<D.value.length&&(D=OneDriveFile.prototype.getIdOf(D.value[0]),
-f(D))}),d):l&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(D){t();f(D)})):l&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(D){t();f(D)})):l&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(D){t();f(D)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,f,l,d,u,t){u==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)})):u==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,t,mxUtils.bind(this,function(D){this.spinner.stop()}),
-mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),l,d):u==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!1,t):u==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!0,t,d):u==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!0,t,d):u==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
-l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!1,t):u==App.MODE_BROWSER&&(l=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?l():this.confirm(mxResources.get("replaceIt",[f]),l))};
+App.prototype.pickFolder=function(b,f,l,d,u){l=null!=l?l:!0;var t=this.spinner.pause();l&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(C){t();if(C.action==google.picker.Action.PICKED){var c=null;null!=C.docs&&0<C.docs.length&&"folder"==C.docs[0].type&&(c=C.docs[0].id);f(c)}}),u):l&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(C){t();null!=C&&null!=C.value&&0<C.value.length&&(C=OneDriveFile.prototype.getIdOf(C.value[0]),
+f(C))}),d):l&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(C){t();f(C)})):l&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(C){t();f(C)})):l&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(C){t();f(C)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,f,l,d,u,t){u==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)})):u==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,t,mxUtils.bind(this,function(C){this.spinner.stop()}),
+mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),l,d):u==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,t):u==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,t,d):u==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,t,d):u==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
+l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,t):u==App.MODE_BROWSER&&(l=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?l():this.confirm(mxResources.get("replaceIt",[f]),l))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var l=b.isEditable()&&!b.invalidChecksum;f.isEnabled()&&!l&&f.reset();f.setEnabled(l);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?
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<=
+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(C){this.editor.setStatus(mxUtils.htmlEntities(C.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,C,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(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)}};
+function(){null!=t&&t({code:App.ERROR_TIMEOUT,retry:fn})},c):null!=C?C(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==)":
@@ -12486,9 +12488,9 @@ else{var d=!1;this.userPanel.innerHTML="";l=document.createElement("img");l.setA
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 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"));
+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 C=document.createElement("table");C.style.borderSpacing="0";C.style.fontSize="10pt";C.style.width="100%";C.style.padding="10px";for(var c=0;c<u.length;c++)C.appendChild(l(u[c]));this.userPanel.appendChild(C);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)";C=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"))}))}));C.className="geBtn";C.style.float="right";l.appendChild(C);C=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")+"...")}));C.className="geBtn";C.style.margin="0px";l.appendChild(C);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 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();
@@ -12496,166 +12498,167 @@ window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChange
""});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")):
g()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&l(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==TrelloFile){var g=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.trello.logout()}),mxResources.get("trello"));d||
-(l=document.createElement("div"),l.style.textAlign="center",l.style.padding="10px",l.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(l));l=document.createElement("div");l.style.textAlign="center";l.style.padding="10px";l.style.background=Editor.isDarkMode()?"":"whiteSmoke";l.style.borderTop="1px solid #e0e0e0";l.style.whiteSpace="nowrap";"1"==urlParams.sketch?(D=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.actions.get("share").funct()})),D.className=
-"geBtn",l.appendChild(D),this.commentsSupported()&&(D=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),D.className="geBtn",l.appendChild(D),this.userPanel.appendChild(l))):(D=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),D.className="geBtn",l.appendChild(D));this.userPanel.appendChild(l);
-"min"==uiTheme&&(c=this.getCurrentFile(),null!=c&&c.isRealtimeEnabled()&&c.isRealtimeSupported()&&(l=l.cloneNode(!1),l.style.fontSize="9pt",D=c.getRealtimeError(),c=c.getRealtimeState(),mxUtils.write(l,mxResources.get("realtimeCollaboration")+": "+(1==c?mxResources.get("online"):null!=D&&null!=D.message?D.message:mxResources.get("disconnected"))),this.userPanel.appendChild(l)));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,
+(l=document.createElement("div"),l.style.textAlign="center",l.style.padding="10px",l.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(l));l=document.createElement("div");l.style.textAlign="center";l.style.padding="10px";l.style.background=Editor.isDarkMode()?"":"whiteSmoke";l.style.borderTop="1px solid #e0e0e0";l.style.whiteSpace="nowrap";"1"==urlParams.sketch?(C=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.actions.get("share").funct()})),C.className=
+"geBtn",l.appendChild(C),this.commentsSupported()&&(C=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),C.className="geBtn",l.appendChild(C),this.userPanel.appendChild(l))):(C=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),C.className="geBtn",l.appendChild(C));this.userPanel.appendChild(l);
+"min"==uiTheme&&(c=this.getCurrentFile(),null!=c&&c.isRealtimeEnabled()&&c.isRealtimeSupported()&&(l=l.cloneNode(!1),l.style.fontSize="9pt",C=c.getRealtimeError(),c=c.getRealtimeState(),mxUtils.write(l,mxResources.get("realtimeCollaboration")+": "+(1==c?mxResources.get("online"):null!=C&&null!=C.message?C.message:mxResources.get("disconnected"))),this.userPanel.appendChild(l)));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,
function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());
null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};
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(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&&
+Menus.prototype.init=function(){function l(q,D,A){this.ui=q;this.previousExtFonts=this.extFonts=D;this.prevCustomFonts=this.customFonts=A}f.apply(this,arguments);var d=this.editorUi,u=d.editor.graph,t=mxUtils.bind(u,u.isEnabled),C=("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(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",
+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 D=new NewDialog(d,q,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(D.container,q?350:620,q?70:460,!0,!0,function(B){d.sidebar.hideTooltip();B&&null==d.getCurrentFile()&&d.showSplash()});
+D.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(J){d.createFile(G,B,null!=H&&0<H.length?H:null,null,function(){d.hideDialog()},null,J,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 J=[],R=0;R<F.items.length;R++)J.push(A(F.items[R]));B(J)},G)},function(B,G,M,H){d.drive.listFiles(B,null,H?!0:!1,function(F){for(var J=[],R=0;R<F.items.length;R++)J.push(A(F.items[R]));G(J)},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(D){d.hideDialog();if(null!=D){var A=d.editor.graph.getFreeInsertPoint();u.setSelectionCells(d.importXml(D,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(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 d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,["points","inches","millimeters","meters"],D)})));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 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,
+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 D=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"),!D,D);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,D||!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,D,A,B,G,M,H,F,J){H=[];J&&H.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,D,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(D,A,B,G,M,H,F,J,R,V,O){d.createHtml(D,A,B,G,M,H,F,J,R,V,O,mxUtils.bind(this,function(W,U){var X=d.getBaseFilename(F);W='\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>'+W+"\n"+U+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+
+".html","html",W,"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,D=document.createElement("div");D.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";D.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(){O.value=Math.max(1,Math.min(G,Math.max(parseInt(O.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(O.value),parseInt(R.value))))},F=d.addRadiobox(D,"pages",mxResources.get("allPages"),!0),J=d.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 V=document.createElement("span");mxUtils.write(V,mxResources.get("to"));D.appendChild(V);var O=R.cloneNode(!0);D.appendChild(O);mxEvent.addListener(R,"focus",function(){J.checked=!0});mxEvent.addListener(O,"focus",function(){J.checked=!0});mxEvent.addListener(R,"change",H);mxEvent.addListener(O,"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;O.value=M;break}R.setAttribute("max",G);O.setAttribute("max",G);mxUtils.br(D);var W=d.addRadiobox(D,"pages",mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),U=d.addCheckbox(D,mxResources.get("crop"),!1,!0),X=d.addCheckbox(D,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",B);mxEvent.addListener(J,"change",B);mxEvent.addListener(W,"change",B);A+=64}else W=d.addCheckbox(D,mxResources.get("selectionOnly"),!1,u.isSelectionEmpty()),
+U=d.addCheckbox(D,mxResources.get("crop"),!u.pageVisible||!d.pdfPageExport,!d.pdfPageExport),X=d.addCheckbox(D,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(W,"change",B);B=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var n=null,E=null;if(EditorUi.isElectronApp||B)E=d.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),A+=30;B&&(n=d.addCheckbox(D,mxResources.get("transparentBackground"),!1),A+=30);D=new CustomDialog(d,
+D,mxUtils.bind(this,function(){var I=null;if(!q){I=parseInt(R.value);var S=parseInt(O.value);I=F.checked||I==M&&S==M?null:{from:Math.max(0,Math.min(G-1,I-1)),to:Math.max(0,Math.min(G-1,S-1))}}d.downloadFile("pdf",null,null,!W.checked,q?!0:!F.checked&&null==I,!U.checked,null!=n&&n.checked,null,null,X.checked,null!=E&&E.checked,I)}),null,mxResources.get("export"));d.showDialog(D.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!=D&&D.removeDraft();d.fileLoaded(null)}var D=d.getCurrentFile();null!=D&&D.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(),D=u.view.getState(q);null!=D&&null!=D.shape&&null!=D.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,D){d.spinner.stop();q=new RevisionDialog(d,q,D);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||
+u.getSelectionCells(),D=[],A=0;A<q.length;A++)u.getModel().isVertex(q[A])&&D.push(q[A]);0<D.length&&(q=new EditGeometryDialog(d,D),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(D){d.setBackgroundImage(D)});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,D,A,B,G,M,H,F,J,R,V,O,W,U,X){J=parseInt(q);!isNaN(J)&&0<J&&(X?d.downloadFile("remoteSvg",null,null,A,null,F,D,q,H,null,G):d.exportSvg(J/100,D,A,B,G,M,H,!F,!1,R,O,W,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,D,A,B,G,M,H,F,J,R,V,O,W){q=parseInt(q);!isNaN(q)&&
+0<q&&d.exportImage(q/100,D,A,B,G,H,!F,!1,null,V,null,O,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,D,A,B,G){d.downloadFile(D?"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,D,A,B,G,M,H,F,J,R,V,O,W){q=parseInt(q);!isNaN(q)&&0<q&&d.exportImage(q/100,!1,A,B,!1,H,!F,!1,"jpeg",V,null,O,W)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,D,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())),
+D=mxUtils.getXml(0==q.length?d.editor.getGraphXml():u.encodeCells(q));d.copyImage(q,D)}));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 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(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":
+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,D){var A=(q=u.isEnabled()&&(null==D||!mxEvent.isShiftDown(D)))?"findReplace":"find";D=A+"Window";if(null==this[D]){var B=q?"min"==uiTheme?330:
+300:240;this[D]=new FindWindow(d,document.body.offsetWidth-(B+20),100,B,q?"min"==uiTheme?304:288:170,q);this[D].window.addListener("show",function(){d.fireEvent(new mxEventObject(A))});this[D].window.addListener("hide",function(){d.fireEvent(new mxEventObject(A))});this[D].window.setVisible(!0)}else this[D].window.setVisible(!this[D].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 D=document.createElement("div");D.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";D.appendChild(A);var B=d.addCheckbox(D,mxResources.get("allPages"),
+!q,q);B.style.marginBottom="16px";q=new CustomDialog(d,D,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 D=
+document.createElement("span");D.style["float"]="right";D.style.cursor="pointer";D.style.userSelect="none";D.style.marginTop="-4px";D.appendChild(q);mxUtils.write(D,mxResources.get("showStartScreen"));mxEvent.addListener(D,"click",function(G){mxEvent.getSource(G)!=q&&(q.checked=!q.checked)});header=D}var A=localStorage.getItem(Editor.configurationKey);D=[[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&&D.push([mxResources.get("plugins"),B.funct]);EditorUi.isElectronApp||D.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)),J=new EmbedDialog(d,F);d.showDialog(J.container,450,240,!0);J.init()}catch(R){d.handleError(R)}else d.handleError({message:mxResources.get("invalidInput")})}]);D=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",D,q.parentNode);d.showDialog(D.container,620,460,!0,!1);D.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,D){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"))}),D),(G==mxLanguage||""==G&&null==mxLanguage)&&q.addCheckmark(H,Editor.checkmarkImage));return H});A("");q.addSeparator(D);for(var B in mxLanguageMap)A(B)})));var v=Menus.prototype.createMenubar;
+Menus.prototype.createMenubar=function(q){var D=v.apply(this,arguments);if(null!=D&&"1"!=urlParams.noLangIcon){var A=this.get("language");if(null!=A){A=D.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.executeLayouts(u.createLayouts(A));d.customLayoutConfig=A;d.hideDialog()}catch(B){d.handleError(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;d.prompt(mxResources.get("spacing"),A.spacing,mxUtils.bind(this,function(B){A.spacing=B;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 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))},
+"no-drag");if("atlas"==uiTheme||"dark"==uiTheme)A.style.opacity="0.85",A.style.filter="invert(100%)";document.body.appendChild(A);D.langIcon=A}}return D}}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(D){if(0<D.length)try{var A=JSON.parse(D);
+d.executeLayouts(u.createLayouts(A));d.customLayoutConfig=A;d.hideDialog()}catch(B){d.handleError(B)}},null,null,null,null,function(D,A){var B=mxUtils.button(mxResources.get("copy"),function(){try{var G=A.value;A.value=JSON.stringify(JSON.parse(G));A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));A.value=G}catch(M){d.handleError(M)}});B.setAttribute("title",
+"copy");B.className="geBtn";D.appendChild(B)},!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,D){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,E=new mxOrgChartLayout(n,B,G,M),I=n.getDefaultParent();1<n.model.getChildCount(n.getSelectionCell())&&(I=n.getSelectionCell());E.execute(I);
+H=!1}},J=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")+": ");J.appendChild(R);var V=document.createElement("select");V.style.width="200px";V.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 O=0;O<R.length;O++){var W=document.createElement("option");mxUtils.write(W,R[O]);W.value=O;2==O&&W.setAttribute("selected","selected");V.appendChild(W)}mxEvent.addListener(V,"change",function(){B=V.value});J.appendChild(V);R=document.createElement("div");R.style.marginTop="6px";R.style.display="inline-block";R.style.width="140px";mxUtils.write(R,mxResources.get("parentChildSpacing")+": ");J.appendChild(R);var U=document.createElement("input");U.type="number";U.value=
+G;U.style.width="200px";U.style.boxSizing="border-box";J.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")+": ");J.appendChild(R);var X=document.createElement("input");X.type="number";X.value=M;X.style.width="200px";X.style.boxSizing="border-box";J.appendChild(X);mxEvent.addListener(X,"change",function(){M=X.value});J=new CustomDialog(d,
+J,function(){null==B&&(B=2);A()});d.showDialog(J.container,355,140,!0,!0)},D,null,t());q.addSeparator(D);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(u);A.checkOverlap=!0;d.prompt(mxResources.get("spacing"),A.spacing,mxUtils.bind(this,function(B){A.spacing=B;d.executeLayout(function(){A.execute(u.getDefaultParent(),u.isSelectionEmpty()?null:u.getSelectionCells())},!1)}))}),D);q.addSeparator(D);d.menus.addMenuItem(q,"runLayout",D,null,null,
+mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,D){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(q,["about"],D);else{var A=q.addItem("Search:",null,null,D,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(" "),D),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],D),this.addMenuItems(q,["forkme",
+"-","about"],D)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),D)}"1"==urlParams.test&&(q.addSeparator(D),this.addSubmenu("testDevelop",q,D))})));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 q=u.cloneCells(u.getSelectionCells()),
+D=u.getBoundingBoxFromGeometry(q);q=u.moveCells(q,-D.x,-D.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+D.width+", "+D.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(u.encodeCells(q)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var q=u.getGraphBounds(),D=u.view.translate,A=u.view.scale;u.insertVertex(u.getDefaultParent(),null,"",q.x/A-D.x,q.y/A-D.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(D){if(0<D.length)try{var A=function(F){function J(S){if(null==I[S]){if(I[S]=!0,null!=O[S]){for(;0<O[S].length;){var Q=O[S].pop();J(Q)}delete O[S]}}else mxLog.debug(R+": Visited: "+S)}var R=F.parentNode.id,V=F.childNodes;F={};for(var O={},W=null,U={},X=0;X<V.length;X++){var n=V[X];if(null!=n.id&&0<n.id.length)if(null==F[n.id]){F[n.id]=
+n.id;var E=n.getAttribute("parent");null==E?null!=W?mxLog.debug(R+": Multiple roots: "+n.id):W=n.id:(null==O[E]&&(O[E]=[]),O[E].push(n.id))}else U[n.id]=n.id}V=Object.keys(U);0<V.length?(V=R+": "+V.length+" Duplicates: "+V.join(", "),mxLog.debug(V+" (see console)")):mxLog.debug(R+": Checked");var I={};null==W?mxLog.debug(R+": No root"):(J(W),Object.keys(I).length!=Object.keys(F).length&&(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",O)))};"<"!=D.charAt(0)&&(D=Graph.decompress(D),
+mxLog.debug("See console for uncompressed XML"),console.log("xml",D));var B=mxUtils.parseXml(D),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(D=0;D<H.length;D++)A(H[D]);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(D){var A=d.getCurrentFile();if(0<D.length&&null!=A)try{var B=JSON.parse(D);A.patch([B],null,!0);d.hideDialog()}catch(G){d.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(D,A){z=d.getPagesForXml(d.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)}],
+["Diff",function(D,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 D=q.getShadowPages();null!=D&&(console.log("Checksum shadowPages",d.getHashValueForPages(D)),console.log("diff shadowPages/ownPages",d.diffPages(D,q.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(q.ownPages,
+D)),console.log("diff theirPages/shadowPages",d.diffPages(q.theirPages,D)));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,D=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-
+D.x)/A),Math.floor((1-D.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 J=q.drawShape;q.drawShape=function(R){mxLog.debug("entering shape",R,M);J.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,D){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),D)})))}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(D,A,B,G,M,H,F,J,R,V,O){d.createHtml(D,A,B,G,M,H,F,J,R,V,O,mxUtils.bind(this,function(W,U){var X=new EmbedDialog(d,W+"\n"+U,null,null,function(){var n=window.open(),E=n.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(W);var I=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;I&&E.writeln(U);E.writeln("</body>");E.writeln("</html>");E.close();if(!I){var S=n.document.createElement("div");S.marginLeft="26px";S.marginTop="26px";mxUtils.write(S,mxResources.get("updatingDocument"));I=n.document.createElement("img");I.setAttribute("src",window.location.protocol+"//"+
+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");I.style.marginLeft="6px";S.appendChild(I);n.document.body.insertBefore(S,n.document.body.firstChild);window.setTimeout(function(){var Q=document.createElement("script");Q.type="text/javascript";Q.src=/<script.*?src="(.*?)"/.exec(U)[1];E.body.appendChild(Q);S.parentNode.removeChild(S)},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(D){d.spinner.stop();null!=D?(D=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?D:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(D.container,450,240,!0,!0),D.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(q,
+D,A,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,D,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,D,A,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&
+d.createEmbedSvg(q,D,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(D,
+A,B,G,M,H,F,J,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(V){d.spinner.stop();var O=[];R&&O.push("tags=%7B%7D");V=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+J+';" src="'+d.createLink(D,A,B,G,M,H,V,null,O)+'"></iframe>');d.showDialog(V.container,450,240,!0,!0);V.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 D=document.createElement("a");D.setAttribute("href","javascript:void(0);");D.setAttribute("target","_blank");D.style.cursor="pointer";mxUtils.write(D,mxResources.get("getNotionChromeExtension"));q.appendChild(D);mxEvent.addListener(D,"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,J,R,V){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(O){d.spinner.stop();var W=["border=0"];V&&W.push("tags=%7B%7D");O=new EmbedDialog(d,d.createLink(A,B,G,M,H,F,O,null,W,!0));d.showDialog(O.container,450,240,!0,!0);O.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,
+D,A,B,G,M,H,F,J){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(R){d.spinner.stop();var V=[];J&&V.push("tags=%7B%7D");R=new EmbedDialog(d,d.createLink(q,D,A,B,G,M,R,null,V));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 D="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=D;q&&(A.exit=!0);D=JSON.stringify(A)}(window.opener||window.parent).postMessage(D,"*");"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 D="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(D,
+"*")};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,D){d.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],D),d.jpgSupported&&this.addMenuItems(q,["exportJpg"],D)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],D);this.addMenuItems(q,["exportSvg","-"],D);d.isOffline()||d.printPdfExport?this.addMenuItems(q,
+["exportPdf"],D):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],D);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(q,["exportVsdx"],D);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],D);d.isOffline()||(q.addSeparator(D),this.addMenuItem(q,"export",D).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,D){function A(M){M.pickFile(function(H){d.spinner.spin(document.body,
+mxResources.get("loading"))&&M.getFile(H,function(F){var J="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())),J="image/svg+xml");B(F.getData(),J,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 J=u.view,R=u.getGraphBounds(),V=u.snap(Math.ceil(Math.max(0,R.x/J.scale-
+J.translate.x)+4*u.gridSize)),O=u.snap(Math.ceil(Math.max(0,(R.y+R.height)/J.scale-J.translate.y)+4*u.gridSize));"data:image/"==M.substring(0,11)?d.loadImage(M,mxUtils.bind(this,function(W){var U=!0,X=mxUtils.bind(this,function(){d.resizeImage(W,M,mxUtils.bind(this,function(n,E,I){n=U?Math.min(1,Math.min(d.maxImageSize/E,d.maxImageSize/I)):1;d.importFile(M,H,V,O,Math.round(E*n),Math.round(I*n),F,function(S){d.spinner.stop();u.setSelectionCells(S);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,V,O,0,0,F,function(W){d.spinner.stop();u.setSelectionCells(W);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)},D):C&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},D);null!=d.trello?q.addItem(mxResources.get("trello")+
+"...",null,function(){A(d.trello)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},D);d.isOffline()||(q.addSeparator(D),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(J){B(J,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()},D))}))).isEnabled=t;
+this.put("theme",new Menu(mxUtils.bind(this,function(q,D){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=q.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");d.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"!=A&&"atlas"!=A&&"dark"!=A&&"min"!=A&&"sketch"!=A&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(D);B=q.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");d.alert(mxResources.get("restartForChangeRequired"))},
+D);"kennedy"==A&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");d.alert(mxResources.get("restartForChangeRequired"))},D);"min"==A&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");d.alert(mxResources.get("restartForChangeRequired"))},D);"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"))},D),"dark"==A&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(D);B=q.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");d.alert(mxResources.get("restartForChangeRequired"))},D);"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 D=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;D=new FilenameDialog(this.editorUi,D,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(D.container,340,96,!0,
+!0);D.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 D=d.getCopyFilename(q);q.constructor==DriveFile?(D=new CreateDialog(d,D,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(D.container,420,380,!0,!0),
+D.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),D)}}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var D=!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){D=!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,D)}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,["publishLink"],D)})));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(D){d.handleError(D)}}));this.put("embed",new Menu(mxUtils.bind(this,function(q,D){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","-"],D);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],D);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],D);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(q,
+"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),D)})));d.addInsertItem=function(q,D,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()}),D,null,t())};
+var y=function(q,D,A,B){var G=new mxCell(q,new mxGeometry(0,0,D,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,
+mxUtils.bind(this,function(q,D,A){for(var B=0;B<A.length;B++)"-"==A[B]?q.addSeparator(D):d.addInsertItem(q,D,mxResources.get(A[B])+"...",A[B])});this.put("insert",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),D);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["insertTemplate"],D);q.addSeparator(D);this.addSubmenu("insertLayout",q,D,mxResources.get("layout"));
+this.addSubmenu("insertAdvanced",q,D,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,D){d.addInsertMenuItems(q,D,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,D){d.addInsertMenuItems(q,D,["fromText","plantUml","mermaid","-","formatSql"]);q.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},D,null,t())})));
+this.put("openRecent",new Menu(function(q,D){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)},D)})(A[B]);q.addSeparator(D)}q.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},D)}));this.put("openFrom",new Menu(function(q,D){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},
+D):C&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},
+D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},D):g&&"function"===
+typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},D);d.isOffline()||(q.addSeparator(D),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()},D))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,D){"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)},D):C&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},
+D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+
+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},D)})),this.put("openLibraryFrom",new Menu(function(q,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},D):C&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},D);d.isOffline()||(q.addSeparator(D),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(" "))})));
+d.showDialog(A.container,300,80,!0,!0);A.init()},D));"1"==urlParams.confLib&&(q.addSeparator(D),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},D))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,D){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")};
+function(q,D){L.apply(this,arguments);d.menus.addMenuItems(q,["tags"],D);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],D)};this.put("view",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],D);if(isLocalStorage||mxClient.IS_CHROMEAPP){var A=this.addMenuItem(q,"scratchpad",D);(!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,D);this.addMenuItems(q,"- scrollbars tooltips ruler - grid guides".split(" "),D);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(q,"shadowVisible",D);this.addMenuItems(q,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),D);"1"!=urlParams.sketch&&this.addMenuItems(q,
+["-","fullscreen"],D)})));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,D){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",q,D),q.addSeparator(D));"1"!=urlParams.embed&&(this.addSubmenu("theme",q,D),q.addSeparator(D));if("undefined"!==typeof MathJax){var A=this.addMenuItem(q,"mathematicalTypesetting",D);(!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"],D);this.addMenuItems(q,
+["copyConnect","collapseExpand","-"],D);"1"!=urlParams.embed&&(A=d.getCurrentFile(),null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors","shareCursor"],D),this.addMenuItems(q,["autosave"],D));q.addSeparator(D);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,"plugins",D);this.addMenuItems(q,["-","editDiagram"],D);Graph.translateDiagram&&this.addMenuItems(q,["diagramLanguage"]);q.addSeparator(D);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&
+this.addMenuItems(q,["showStartScreen"],D);this.addMenuItems(q,["configuration"],D);EditorUi.isElectronApp&&this.addMenuItems(q,["openDevTools"],D);q.addSeparator(D);"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 J=
+new Date;J.setDate(J.getDate()-7);d.drive.listFiles(null,J,F?!0:!1,function(R){for(var V=[],O=0;O<R.items.length;O++)V.push(B(R.items[O]));M(V)},H)},function(M,H,F,J){d.drive.listFiles(M,null,J?!0:!1,function(R){for(var V=[],O=0;O<R.items.length;O++)V.push(B(R.items[O]));H(V)},F)},function(M,H,F){d.drive.getFile(M.id,function(J){H(J.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",D))})));
+this.put("file",new Menu(mxUtils.bind(this,function(q,D){if("1"==urlParams.embed)this.addSubmenu("importFrom",q,D),this.addSubmenu("exportAs",q,D),this.addSubmenu("embed",q,D),"1"==urlParams.libraries&&(this.addMenuItems(q,["-"],D),this.addSubmenu("newLibrary",q,D),this.addSubmenu("openLibraryFrom",q,D)),d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],D),this.addMenuItems(q,["-","pageSetup","print","-","rename"],D),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?
+"0"!=urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],D):(this.addMenuItems(q,["save"],D),"1"==urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],D))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],D);else{var A=this.editorUi.getCurrentFile();if(null!=A&&A.constructor==DriveFile){A.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],D);this.addMenuItems(q,["save","-","share"],D);var B=this.addMenuItem(q,"synchronize",D);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
+this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize");q.addSeparator(D)}else this.addMenuItems(q,["new"],D);this.addSubmenu("openFrom",q,D);isLocalStorage&&this.addSubmenu("openRecent",q,D);null!=A&&A.constructor==DriveFile?this.addMenuItems(q,["new","-","rename","makeCopy","moveToFolder"],D):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(q.addSeparator(D),B=this.addMenuItem(q,"synchronize",D),(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],D),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==A||this.addMenuItems(q,["share","-"],D),this.addMenuItems(q,["rename"],D),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],D):(this.addMenuItems(q,["makeCopy"],D),null!=A&&A.constructor==OneDriveFile&&
+this.addMenuItems(q,["moveToFolder"],D)));q.addSeparator(D);this.addSubmenu("importFrom",q,D);this.addSubmenu("exportAs",q,D);q.addSeparator(D);this.addSubmenu("embed",q,D);this.addSubmenu("publish",q,D);q.addSeparator(D);this.addSubmenu("newLibrary",q,D);this.addSubmenu("openLibraryFrom",q,D);d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],D);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"],D);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],D);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 D=q.extFonts,A=0;null!=D&&A<D.length;A++){var B=document.getElementById("extFont_"+D[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=D};this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,D){for(var A=mxUtils.bind(this,function(O,W,U,X,n){var E=d.editor.graph;
+X=this.styleChange(q,X||O,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],null,D,function(){"1"!=urlParams["ext-fonts"]?E.setFont(O,W):(document.execCommand("fontname",!1,O),E.addExtFont(O,W));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values",
+"1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],"cells",[E.cellEditor.getEditingCell()]))},function(){E.updateLabelElements(E.getSelectionCells(),function(I){I.removeAttribute("face");I.style.fontFamily=null;"PRE"==I.nodeName&&E.replaceElement(I,"div")});"1"==urlParams["ext-fonts"]&&E.addExtFont(O,W)});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(I){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[O.toLowerCase()];for(var S=0;S<this.customFonts.length;S++)if(this.customFonts[S].name==O&&this.customFonts[S].url==W){this.customFonts.splice(S,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var Q=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Q&&0<Q.length)for(S=0;S<Q.length;S++)if(Q[S].name==O){Q.splice(S,
+1);break}var P=mxUtils.clone(this.customFonts);for(S=0;S<P.length;S++)if(P[S].name==O){P.splice(S,1);break}S=new l(this.editorUi,Q,P);this.editorUi.editor.graph.model.execute(S)}this.editorUi.hideCurrentMenu();mxEvent.consume(I)})));Graph.addFont(O,W);X.firstChild.nextSibling.style.fontFamily=O;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(D);if("1"!=urlParams["ext-fonts"]){M=function(O){var W=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!B[W]){for(var U=O.name,X=0;null!=F[U.toLowerCase()];)U=O.name+" ("+ ++X+")";null==H[W]&&(J.push({name:O.name,url:O.url,label:U,title:O.url}),F[U.toLowerCase()]=O,H[W]=O)}};var H={},F={},J=[];for(G=0;G<this.customFonts.length;G++)M(this.customFonts[G]);for(var R in Graph.recentCustomFonts)M(Graph.recentCustomFonts[R]);
+J.sort(function(O,W){return O.label<W.label?-1:O.label>W.label?1:0});if(0<J.length){for(G=0;G<J.length;G++)A(J[G].name,J[G].url,!0,J[G].label,J[G].url);q.addSeparator(D)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),D);q.addSeparator(D)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){M={};var V=!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]),V=!0);V&&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(D);q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var O=new l(this.editorUi,[],[]);d.editor.graph.model.execute(O)}),
+D);q.addSeparator(D)}}q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,W=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U="s",X=null;if("1"!=urlParams["ext-fonts"]&&O.isEditing()){var n=O.getSelectedEditingElement();null!=n&&(n=mxUtils.getCurrentStyle(n),null!=n&&(W=Graph.stripQuotes(n.fontFamily),X=Graph.getFontUrl(W,null),null!=X&&(Graph.isGoogleFontUrl(X)?(X=null,U="g"):U="w")))}else n=O.getView().getState(O.getSelectionCell()),
+null!=n&&(W=n.style[mxConstants.STYLE_FONTFAMILY]||W,"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(I){return I.name==W})),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 E=null;
+document.activeElement==O.cellEditor.textarea&&(E=O.cellEditor.saveSelection());U=new FontDialog(this.editorUi,W,X,U,mxUtils.bind(this,function(I,S,Q){null!=E&&(O.cellEditor.restoreSelection(E),E=null);if(null!=I&&0<I.length)if("1"!=urlParams["ext-fonts"]&&O.isEditing())O.setFont(I,S);else{O.getModel().beginUpdate();try{O.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,I),O.setCellStyles("fontSource",null!=S?encodeURIComponent(S):null),O.setCellStyles("FType",
+null)):(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,I),"s"!=Q&&(O.setCellStyles("FType",Q),0==S.indexOf("http://")&&(S=PROXY_URL+"?url="+encodeURIComponent(S)),this.editorUi.editor.graph.addExtFont(I,S)));Q=!0;for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==I){Q=!1;break}Q&&(this.customFonts.push({name:I,url:S}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(U.container,
+380,Editor.enableWebFonts?250:180,!0,!0);U.init()}),D,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))}
@@ -12666,14 +12669,14 @@ ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObje
EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var l=0;l<this.pages.length;l++)if(this.pages[l]==b){f=l;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var l=0;l<f.length;l++)if(f[l].getId()==b)return f[l];return null};
EditorUi.prototype.createImageForPageLink=function(b,f,l){var d=b.indexOf(","),u=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=f&&(u=this.getImageForPage(d,f,l),u.originalSrc=b));null==u&&(u={originalSrc:b});return u};
EditorUi.prototype.getImageForPage=function(b,f,l){l=null!=l?l:this.editor.graph;var d=l.getGlobalVariable,u=this.createTemporaryGraph(l.getStylesheet());u.defaultPageBackgroundColor=l.defaultPageBackgroundColor;u.shapeBackgroundColor=l.shapeBackgroundColor;u.shapeForegroundColor=l.shapeForegroundColor;var t=this.getPageIndex(null!=f?f:this.currentPage);u.getGlobalVariable=function(c){return"pagenumber"==c?t+1:"page"==c&&null!=f?f.getName():d.apply(this,arguments)};document.body.appendChild(u.container);
-this.updatePageRoot(b);u.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";l=u.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var D=u.getGraphBounds();document.body.removeChild(u.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(l)),D.width,D.height,D.x,D.y)};
+this.updatePageRoot(b);u.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";l=u.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var C=u.getGraphBounds();document.body.removeChild(u.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(l)),C.width,C.height,C.x,C.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var u=
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";u!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var l=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var u=this.currentPage;null!=u&&u!=l&&(null==u.viewState||null==u.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+u.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+u.viewState.scrollTop),l=u);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(u,t){u=t.getProperty("edit").changes;for(t=0;t<u.length;t++)if(u[t]instanceof SelectPage||u[t]instanceof RenamePage||u[t]instanceof MovePage||u[t]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(l))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),t=b.getAttribute("background"),D=this.parseBackgroundImage(b.getAttribute("backgroundImage")),c=b.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(e){e=e.split("^");return{name:e[0],url:e[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=t&&0<t.length?t:null,backgroundImage:D,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(d)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),t=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),c=b.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(e){e=e.split("^");return{name:e[0],url:e[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=t&&0<t.length?t:null,backgroundImage:C,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(d)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,d,u),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:c||[]}};
Graph.prototype.saveViewState=function(b,f,l,d){l||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage",
@@ -12694,7 +12697,7 @@ EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&nu
EditorUi.prototype.insertPage=function(b,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,f){f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};
EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,d=this.pages[l]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(u){this.handleError(u)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var t={},D=d.createCellLookup([d.model.root]);l=new DiagramPage(u);l.root=d.cloneCell(d.model.root,null,t);var c=new mxGraphModel;c.prefix=Editor.guid()+"-";c.setRoot(l.root);d.updateCustomLinks(d.createCellMapping(t,D),[l.root]);l.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(l);
+EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var u=b.node.cloneNode(!1);u.removeAttribute("id");var t={},C=d.createCellLookup([d.model.root]);l=new DiagramPage(u);l.root=d.cloneCell(d.model.root,null,t);var c=new mxGraphModel;c.prefix=Editor.guid()+"-";c.setRoot(l.root);d.updateCustomLinks(d.createCellMapping(t,C),[l.root]);l.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(l);
l.viewState.scale=1;l.viewState.scrollLeft=null;l.viewState.scrollTop=null;l.viewState.currentRoot=null;l.viewState.defaultParent=null;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(e){this.handleError(e)}return l};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))};
EditorUi.prototype.clonePages=function(b){for(var f=[],l=0;l<b.length;l++)f.push(this.clonePage(b[l]));return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
@@ -12702,99 +12705,99 @@ EditorUi.prototype.createTabContainer=function(){var b=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var l=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-l)/this.pages.length)+
1),u=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,k){this.pages[g]==this.currentPage?(k.className="geActivePage",k.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):k.className="geInactivePage";k.setAttribute("draggable","true");mxEvent.addListener(k,"dragstart",mxUtils.bind(this,function(m){b.isEnabled()?(mxClient.IS_FF&&m.dataTransfer.setData("Text","<diagram/>"),u=g):mxEvent.consume(m)}));mxEvent.addListener(k,"dragend",mxUtils.bind(this,function(m){u=null;m.stopPropagation();
m.preventDefault()}));mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(m){null!=u&&(m.dataTransfer.dropEffect="move");m.stopPropagation();m.preventDefault()}));mxEvent.addListener(k,"drop",mxUtils.bind(this,function(m){null!=u&&g!=u&&this.movePage(u,g);m.stopPropagation();m.preventDefault()}));f.appendChild(k)})(t,this.createTabForPage(this.pages[t],d,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(f);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
-d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-l){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var D=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");D.style.position="absolute";D.style.right=this.editor.chromeless?"29px":"55px";D.style.fontSize="13pt";this.tabContainer.appendChild(D);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
-c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=e+"px";mxEvent.addListener(D,"click",mxUtils.bind(this,function(g){f.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,
-f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(g){f.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-l){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var C=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");C.style.position="absolute";C.style.right=this.editor.chromeless?"29px":"55px";C.style.fontSize="13pt";this.tabContainer.appendChild(C);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
+c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=e+"px";mxEvent.addListener(C,"click",mxUtils.bind(this,function(g){f.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,
+f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(g){f.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(C,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.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 f=document.createElement("div");f.style.display="inline-block";f.style.whiteSpace="nowrap";f.style.boxSizing="border-box";f.style.position="relative";f.style.overflow="hidden";f.style.textAlign="center";f.style.marginLeft="-1px";f.style.height=this.tabContainer.clientHeight+"px";f.style.padding="12px 4px 8px 4px";f.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";f.style.borderTopStyle="none";f.style.borderBottomStyle="none";f.style.backgroundColor=
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(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};
+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),C=mxEvent.getClientY(d);u.popup(t,C,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};
EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(t){this.renamePage(b);mxEvent.consume(t)}));var d=!1,u=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(t){d=null!=this.currentMenu;u=b==this.currentPage;l.isMouseDown||u||this.selectPage(b)}),null,mxUtils.bind(this,function(t){if(l.isEnabled()&&!l.isMouseDown&&(mxEvent.isTouchEvent(t)&&u||mxEvent.isPopupTrigger(t))){l.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!d){var D=new mxPopupMenu(this.createPageMenu(b));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var c=mxEvent.getClientX(t),e=mxEvent.getClientY(t);D.popup(c,e,null,t);this.setCurrentMenu(D,f)}mxEvent.consume(t)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!d){var C=new mxPopupMenu(this.createPageMenu(b));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);this.resetCurrentMenu();C.destroy()});var c=mxEvent.getClientX(t),e=mxEvent.getClientY(t);C.popup(c,e,null,t);this.setCurrentMenu(C,f)}mxEvent.consume(t)}}))};
EditorUi.prototype.getLinkForPage=function(b,f,l){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var u=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));u+=(0==u.length?"?":"&")+"page-id="+b.getId();null!=f&&(u+="&"+f.join("&"));return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+u+"#"+d.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,d){var u=this.editor.graph;l.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);l.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(l.addSeparator(d),l.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,D,c,e,g,k){t=this.createUrlParameters(t,D,c,e,g,k);c||t.push("hide-pages=1");u.isSelectionEmpty()||(c=u.getBoundingBox(u.getSelectionCells()),D=u.view.translate,g=u.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-D.x,c.y=c.y/g-D.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,C,c,e,g,k){t=this.createUrlParameters(t,C,c,e,g,k);c||t.push("hide-pages=1");u.isSelectionEmpty()||(c=u.getBoundingBox(u.getSelectionCells()),C=u.view.translate,g=u.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-C.x,c.y=c.y/g-C.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
e=new EmbedDialog(this,this.getLinkForPage(b,t,e));this.showDialog(e.container,450,240,!0,!0);e.init()}))})));l.addSeparator(d);l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(l.addSeparator(d),l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(f){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,l,d){d.setAttribute("relatedPage",l.relatedPage.getId());null==l.index&&(d.setAttribute("name",l.relatedPage.getName()),null!=l.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(l.relatedPage.viewState,function(u,t){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,u)?t:void 0})),null!=l.relatedPage.root&&f.encodeCell(l.relatedPage.root,
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(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 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",
+!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,C,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 C=0;C<t.length;C++)this.model.setVisible(t[C],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,u,t,C,c,e){return this.model.filterCells(this.getEdges(d,
+u,t,C,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(J){return z.isVertex(J)&&t(J)}function u(J){var R=
+!1;null!=J&&(R="1"==x.getCurrentCellStyle(J).treeMoving);return R}function t(J){var R=!1;null!=J&&(J=z.getParent(J),R=x.view.getState(J),R="tree"==(null!=R?R.style:x.getCellStyle(J)).containerType);return R}function C(J){var R=!1;null!=J&&(J=z.getParent(J),R=x.view.getState(J),x.view.getState(J),R=null!=(null!=R?R.style:x.getCellStyle(J)).childLayout);return R}function c(J){J=x.view.getState(J);if(null!=J){var R=x.getIncomingTreeEdges(J.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==J.y&&Math.abs(R.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==J.y+J.height&&Math.abs(R.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(J,R){R=null!=R?R:!0;x.model.beginUpdate();try{var V=x.model.getParent(J),O=x.getIncomingTreeEdges(J),W=x.cloneCells([O[0],J]);x.model.setTerminal(W[0],x.model.getTerminal(O[0],
+!0),!0);var U=c(J),X=V.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=R?J.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=R?J.geometry.height+10:-W[1].geometry.height-10;x.view.currentRoot!=V&&(W[1].geometry.x-=X.x,W[1].geometry.y-=X.y);var n=x.view.getState(J),E=x.view.scale;if(null!=n){var I=mxRectangle.fromRectangle(n);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?I.x+=(R?J.geometry.width+10:-W[1].geometry.width-10)*E:I.y+=(R?
+J.geometry.height+10:-W[1].geometry.height-10)*E;var S=x.getOutgoingTreeEdges(x.model.getTerminal(O[0],!0));if(null!=S){for(var Q=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,P=X=O=0;P<S.length;P++){var T=x.model.getTerminal(S[P],!1);if(U==c(T)){var Y=x.view.getState(T);T!=J&&null!=Y&&(Q&&R!=Y.getCenterX()<n.getCenterX()||!Q&&R!=Y.getCenterY()<n.getCenterY())&&mxUtils.intersects(I,Y)&&(O=10+Math.max(O,(Math.min(I.x+I.width,Y.x+Y.width)-Math.max(I.x,Y.x))/E),X=10+Math.max(X,(Math.min(I.y+
+I.height,Y.y+Y.height)-Math.max(I.y,Y.y))/E))}}Q?X=0:O=0;for(P=0;P<S.length;P++)if(T=x.model.getTerminal(S[P],!1),U==c(T)&&(Y=x.view.getState(T),T!=J&&null!=Y&&(Q&&R!=Y.getCenterX()<n.getCenterX()||!Q&&R!=Y.getCenterY()<n.getCenterY()))){var ca=[];x.traverse(Y.cell,!0,function(ha,Z){var fa=null!=Z&&x.isTreeEdge(Z);fa&&ca.push(Z);(null==Z||fa)&&ca.push(ha);return null==Z||fa});x.moveCells(ca,(R?1:-1)*O,(R?1:-1)*X)}}}return x.addCells(W,V)}finally{x.model.endUpdate()}}function g(J){x.model.beginUpdate();
+try{var R=c(J),V=x.getIncomingTreeEdges(J),O=x.cloneCells([V[0],J]);x.model.setTerminal(V[0],O[1],!1);x.model.setTerminal(O[0],O[1],!0);x.model.setTerminal(O[0],J,!1);var W=x.model.getParent(J),U=W.geometry,X=[];x.view.currentRoot!=W&&(O[1].geometry.x-=U.x,O[1].geometry.y-=U.y);x.traverse(J,!0,function(I,S){var Q=null!=S&&x.isTreeEdge(S);Q&&X.push(S);(null==S||Q)&&X.push(I);return null==S||Q});var n=J.geometry.width+40,E=J.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?n=0:R==mxConstants.DIRECTION_NORTH?
+(n=0,E=-E):R==mxConstants.DIRECTION_WEST?(n=-n,E=0):R==mxConstants.DIRECTION_EAST&&(E=0);x.moveCells(X,n,E);return x.addCells(O,W)}finally{x.model.endUpdate()}}function k(J,R){x.model.beginUpdate();try{var V=x.model.getParent(J),O=x.getIncomingTreeEdges(J),W=c(J);0==O.length&&(O=[x.createEdge(V,null,"",null,null,x.createCurrentEdgeStyle())],W=R);var U=x.cloneCells([O[0],J]);x.model.setTerminal(U[0],J,!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),E;for(E in n)x.setCellStyles(E,n[E],[U[0]]),"edgeStyle"==E&&"elbowEdgeStyle"==n[E]&&x.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}O=x.getOutgoingTreeEdges(J);var I=V.geometry;R=[];x.view.currentRoot==V&&(I=new mxRectangle);for(X=0;X<O.length;X++){var S=x.model.getTerminal(O[X],!1);null!=S&&R.push(S)}var Q=x.view.getBounds(R),P=x.view.translate,T=x.view.scale;W==mxConstants.DIRECTION_SOUTH?
+(U[1].geometry.x=null==Q?J.geometry.x+(J.geometry.width-U[1].geometry.width)/2:(Q.x+Q.width)/T-P.x-I.x+10,U[1].geometry.y+=U[1].geometry.height-I.y+40):W==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==Q?J.geometry.x+(J.geometry.width-U[1].geometry.width)/2:(Q.x+Q.width)/T-P.x+-I.x+10,U[1].geometry.y-=U[1].geometry.height+I.y+40):(U[1].geometry.x=W==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+I.x+40):U[1].geometry.x+(U[1].geometry.width-I.x+40),U[1].geometry.y=null==Q?J.geometry.y+
+(J.geometry.height-U[1].geometry.height)/2:(Q.y+Q.height)/T-P.y+-I.y+10);return x.addCells(U,V)}finally{x.model.endUpdate()}}function m(J,R,V){J=x.getOutgoingTreeEdges(J);V=x.view.getState(V);var O=[];if(null!=V&&null!=J){for(var W=0;W<J.length;W++){var U=x.view.getState(x.model.getTerminal(J[W],!1));null!=U&&(!R&&Math.min(U.x+U.width,V.x+V.width)>=Math.max(U.x,V.x)||R&&Math.min(U.y+U.height,V.y+V.height)>=Math.max(U.y,V.y))&&O.push(U)}O.sort(function(X,n){return R?X.x+X.width-n.x-n.width:X.y+X.height-
+n.y-n.height})}return O}function p(J,R){var V=c(J),O=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST)==O&&V!=R?v.actions.get("selectParent").funct():V==R?(R=x.getOutgoingTreeEdges(J),null!=R&&0<R.length&&x.setSelectionCell(x.model.getTerminal(R[0],!1))):(V=x.getIncomingTreeEdges(J),null!=V&&0<V.length&&(O=m(x.model.getTerminal(V[0],!0),O,J),J=x.view.getState(J),null!=J&&(J=mxUtils.indexOf(O,J),0<=J&&(J+=R==mxConstants.DIRECTION_NORTH||
+R==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=O.length-1&&x.setSelectionCell(O[J].cell)))))}var v=this,x=v.editor.graph,z=x.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(J,R,V){y.apply(this,arguments);if(1==x.getSelectionCount()){R=x.getSelectionCell();var O=x.getOutgoingTreeEdges(R);J.addSeparator();0<O.length&&(d(x.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,V),this.addMenuItems(J,["selectDescendants"],null,V));d(x.getSelectionCell())?(J.addSeparator(),
+0<x.getIncomingTreeEdges(R).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,V)):0<x.model.getEdgeCount(R)&&this.addMenuItems(J,["selectConnections"],null,V)}};v.actions.addAction("selectChildren",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getOutgoingTreeEdges(J);if(null!=J){for(var R=[],V=0;V<J.length;V++)R.push(x.model.getTerminal(J[V],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(x.isEnabled()&&
+1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=x.getOutgoingTreeEdges(x.model.getTerminal(J[0],!0)),null!=J)){for(var R=[],V=0;V<J.length;V++)R.push(x.model.getTerminal(J[V],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getIncomingTreeEdges(J);null!=J&&0<J.length&&x.setSelectionCell(x.model.getTerminal(J[0],
+!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(J,R){J=x.getSelectionCell();if(x.isEnabled()&&x.model.isVertex(J)){if(null!=R&&mxEvent.isAltDown(R))x.setSelectionCells(x.model.getTreeEdges(J,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var V=[];x.traverse(J,!0,function(O,W){var U=null!=W&&x.isTreeEdge(W);U&&V.push(W);null!=W&&!U||null!=R&&mxEvent.isShiftDown(R)||V.push(O);return null==W||U})}x.setSelectionCells(V)}},null,null,"Alt+Shift+D");
+var L=x.removeCells;x.removeCells=function(J,R){R=null!=R?R:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));R&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var V=[],O=0;O<J.length;O++){var W=J[O];z.isEdge(W)&&t(W)&&(V.push(W),W=z.getTerminal(W,!1));if(d(W)){var U=[];x.traverse(W,!0,function(X,n){var E=null!=n&&x.isTreeEdge(n);E&&U.push(n);(null==n||E)&&U.push(X);return null==n||E});0<U.length&&(V=V.concat(U),W=x.getIncomingTreeEdges(J[O]),J=J.concat(W))}else null!=W&&V.push(J[O])}J=
+V;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(J,R,V){return d(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,V))};var N=x.duplicateCells;x.duplicateCells=function(J,R){J=null!=J?J:this.getSelectionCells();for(var V=J.slice(0),O=0;O<V.length;O++){var W=x.view.getState(V[O]);if(null!=W&&d(W.cell)){var U=x.getIncomingTreeEdges(W.cell);for(W=0;W<U.length;W++)mxUtils.remove(U[W],J)}}this.model.beginUpdate();try{var X=N.call(this,J,R);if(X.length==J.length)for(O=0;O<J.length;O++)if(d(J[O])){var n=
+x.getIncomingTreeEdges(X[O]);U=x.getIncomingTreeEdges(J[O]);if(0==n.length&&0<U.length){var E=this.cloneCell(U[0]);this.addEdge(E,x.getDefaultParent(),this.model.getTerminal(U[0],!0),X[O])}}}finally{this.model.endUpdate()}return X};var K=x.moveCells;x.moveCells=function(J,R,V,O,W,U,X){var n=null;this.model.beginUpdate();try{var E=W,I=this.getCurrentCellStyle(W);if(null!=J&&d(W)&&"1"==mxUtils.getValue(I,"treeFolding","0")){for(var S=0;S<J.length;S++)if(d(J[S])||x.model.isEdge(J[S])&&null==x.model.getTerminal(J[S],
+!0)){W=x.model.getParent(J[S]);break}if(null!=E&&W!=E&&null!=this.view.getState(J[0])){var Q=x.getIncomingTreeEdges(J[0]);if(0<Q.length){var P=x.view.getState(x.model.getTerminal(Q[0],!0));if(null!=P){var T=x.view.getState(E);null!=T&&(R=(T.getCenterX()-P.getCenterX())/x.view.scale,V=(T.getCenterY()-P.getCenterY())/x.view.scale)}}}}n=K.apply(this,arguments);if(null!=n&&null!=J&&n.length==J.length)for(S=0;S<n.length;S++)if(this.model.isEdge(n[S]))d(E)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[S],
+!0))&&this.model.setTerminal(n[S],E,!0);else if(d(J[S])&&(Q=x.getIncomingTreeEdges(J[S]),0<Q.length))if(!O)d(E)&&0>mxUtils.indexOf(J,this.model.getTerminal(Q[0],!0))&&this.model.setTerminal(Q[0],E,!0);else if(0==x.getIncomingTreeEdges(n[S]).length){I=E;if(null==I||I==x.model.getParent(J[S]))I=x.model.getTerminal(Q[0],!0);O=this.cloneCell(Q[0]);this.addEdge(O,x.getDefaultParent(),I,n[S])}}finally{this.model.endUpdate()}return n};if(null!=v.sidebar){var q=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
+function(J,R,V,O){var W=x.model,U=null;W.beginUpdate();try{if(U=q.apply(this,arguments),d(J))for(var X=0;X<U.length;X++)if(W.isEdge(U[X])&&null==W.getTerminal(U[X],!0)){W.setTerminal(U[X],J,!0);var n=x.getCellGeometry(U[X]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return U}}var D={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(J){try{if(x.isEnabled()&&
+!x.isEditing()&&d(x.getSelectionCell())&&1==x.getSelectionCount()){var R=null;0<x.getIncomingTreeEdges(x.getSelectionCell()).length&&(9==J.which?R=mxEvent.isShiftDown(J)?g(x.getSelectionCell()):k(x.getSelectionCell()):13==J.which&&(R=e(x.getSelectionCell(),!mxEvent.isShiftDown(J))));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(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var V=D[J.keyCode];null!=V&&(V.funct(J),mxEvent.consume(J))}else 37==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(p(x.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(J))}}catch(O){v.handleError(O)}mxEvent.isConsumed(J)||A.apply(this,arguments)};var B=x.connectVertex;x.connectVertex=function(J,R,V,O,W,U,X){var n=x.getIncomingTreeEdges(J);if(d(J)){var E=c(J),I=E==mxConstants.DIRECTION_EAST||E==mxConstants.DIRECTION_WEST,S=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return E==R||0==n.length?k(J,R):I==S?g(J):e(J,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return B.apply(this,arguments)};x.getSubtree=function(J){var R=
+[J];!u(J)&&!d(J)||C(J)||x.traverse(J,!0,function(V,O){var W=null!=O&&x.isTreeEdge(O);W&&0>mxUtils.indexOf(R,O)&&R.push(O);(null==O||W)&&0>mxUtils.indexOf(R,V)&&R.push(V);return null==O||W});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(u(this.state.cell)||d(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);
+this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(J)})))};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(J){H.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,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 C=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.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;C.insertEdge(e,!0);c.insertEdge(e,!1);t.insert(e);t.insert(C);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 C=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};');C.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;C.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;C.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 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;C.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;C.insertEdge(x,!0);v.insertEdge(x,!1);t.insert(e);t.insert(k);t.insert(p);t.insert(x);t.insert(C);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"};');
-t.vertex=!0;var D=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"};');u.setAttributeForCell(D,"treeRoot","1");D.vertex=!0;var c=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"};');
-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);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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-k.geometry.relative=!0;k.edge=!0;D.insertEdge(k,!0);g.insertEdge(k,!1);t.insert(e);t.insert(k);t.insert(D);t.insert(c);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"};');u.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 D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-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(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";
+t.vertex=!0;var C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;t.insertEdge(C,!1);return sb.createVertexTemplateFromCells([t,C],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 C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.setTerminalPoint(new mxPoint(-40,40),!0);C.geometry.relative=!0;C.edge=!0;t.insertEdge(C,!1);return sb.createVertexTemplateFromCells([t,C],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 C=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"};');u.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;var c=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"};');
+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;C.insertEdge(e,!0);c.insertEdge(e,!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 k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+k.geometry.relative=!0;k.edge=!0;C.insertEdge(k,!0);g.insertEdge(k,!1);t.insert(e);t.insert(k);t.insert(C);t.insert(c);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"};');u.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 C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+C.geometry.setTerminalPoint(new mxPoint(0,0),!0);C.geometry.relative=!0;C.edge=!0;t.insertEdge(C,!1);return sb.createVertexTemplateFromCells([t,C],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 C=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+C.geometry.setTerminalPoint(new mxPoint(110,-40),!0);C.geometry.relative=!0;C.edge=!0;t.insertEdge(C,!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([C,e,t,c],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+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 J=
+A.createFormat(F);J.init();A.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}));return J});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(J,R){var V=A.menus.get(J);J=F.addMenu(R,mxUtils.bind(this,function(){V.funct.apply(this,arguments)}));J.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;";J.className="geTitle";B.appendChild(J);return J}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;
+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,J){var R=u();J(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(V,O){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));O=Math.max(0,Math.min(O,W-U.clientHeight-2));this.getX()==V&&this.getY()==O||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&&A.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;
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(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",
+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 C=document.createElement("link");C.setAttribute("rel","stylesheet");C.setAttribute("href",STYLE_PATH+"/dark.css");C.setAttribute("charset","UTF-8");C.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()?
+Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;c.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==C.parentNode&&document.getElementsByTagName("head")[0].appendChild(C):null!=C.parentNode&&C.parentNode.removeChild(C)}};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); "+
@@ -12820,122 +12823,122 @@ this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.m
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("insertAdvanced",U,X,mxResources.get("advanced")),A.menus.addSubmenu("layout",U,X)):(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),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;";
+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(O){A.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});
+G=A.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(O){A.setSketchMode(!Editor.sketchMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=A.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(O){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 O=new ParseDialog(A,"Insert from Text");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var O=new ParseDialog(A,"Insert from Text","formatSql");A.showDialog(O.container,620,420,!0,!1);O.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 O=new ParseDialog(A,mxResources.get("plantUml")+"...","plantUml");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var O=
+new ParseDialog(A,mxResources.get("mermaid")+"...","mermaid");A.showDialog(O.container,620,420,!0,!1);O.init()}));var M=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(O,W){var U=this.editorUi.editor.graph,X=U.getSelectionCell();M.call(this,O,X,null,W);this.addMenuItems(O,["editTooltip"],W);U.model.isVertex(X)&&this.addMenuItems(O,["editGeometry"],W);this.addMenuItems(O,["-","edit"],W)})));this.addPopupMenuCellEditItems=function(O,W,U,X){O.addSeparator();this.addSubmenu("editCell",
+O,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(O,W){var U=A.getCurrentFile();A.menus.addMenuItems(O,["new"],W);A.menus.addSubmenu("openFrom",O,W);isLocalStorage&&this.addSubmenu("openRecent",O,W);O.addSeparator(W);null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(O,["save","rename","makeCopy","moveToFolder"],W):(A.menus.addMenuItems(O,["save","saveAs","-","rename"],W),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,
+["upload"],W):A.menus.addMenuItems(O,["makeCopy"],W));O.addSeparator(W);null!=U&&(U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["revisionHistory"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||A.menus.addMenuItems(O,["synchronize"],W));A.menus.addMenuItems(O,["autosave"],W);if(null!=U&&(O.addSeparator(W),U.constructor==DriveFile&&A.menus.addMenuItems(O,["share"],W),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(O,["-","properties"],W)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(O,W){var U=A.getCurrentFile();A.menus.addSubmenu("extras",O,W,mxResources.get("preferences"));O.addSeparator(W);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)A.menus.addMenuItems(O,"new open - synchronize - save saveAs -".split(" "),W);else if("1"==urlParams.embed||A.mode==
+App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&A.menus.addMenuItems(O,["-","save"],W);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||A.mode==App.MODE_ATLAS)A.menus.addMenuItems(O,["saveAndExit"],W),null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["revisionHistory"],W);O.addSeparator(W)}else A.mode==App.MODE_ATLAS?A.menus.addMenuItems(O,["save","synchronize","-"],W):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(A.menus.addMenuItems(O,
+["new"],W),A.menus.addSubmenu("openFrom",O,W),isLocalStorage&&this.addSubmenu("openRecent",O,W),O.addSeparator(W),null!=U&&(U.constructor==DriveFile&&A.menus.addMenuItems(O,["share"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||A.menus.addMenuItems(O,["synchronize"],W)),O.addSeparator(W),A.menus.addSubmenu("save",O,W)):A.menus.addSubmenu("file",O,W));A.menus.addSubmenu("exportAs",O,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?A.menus.addMenuItems(O,["import"],W):
+"1"!=urlParams.noFileMenu&&A.menus.addSubmenu("importFrom",O,W);A.commentsSupported()&&A.menus.addMenuItems(O,["-","comments"],W);A.menus.addMenuItems(O,"- findReplace outline layers tags - pageSetup".split(" "),W);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||A.menus.addMenuItems(O,["print"],W);"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(O,
+["-","properties"]));O.addSeparator(W);A.menus.addSubmenu("help",O,W);"1"==urlParams.embed||A.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||A.mode==App.MODE_ATLAS)&&A.menus.addMenuItems(O,["-","exit"],W):"1"!=urlParams.noFileMenu&&A.menus.addMenuItems(O,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(O,W){var U=A.getCurrentFile();null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(O,["save","makeCopy","-","rename","moveToFolder"],W):(A.menus.addMenuItems(O,["save","saveAs",
+"-","rename"],W),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],W):A.menus.addMenuItems(O,["makeCopy"],W));A.menus.addMenuItems(O,["-","autosave"],W);null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["-","revisionHistory"],W)})));var H=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(O,W){H.funct(O,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||A.menus.addMenuItems(O,["publishLink"],W);
+A.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(O.addSeparator(W),A.menus.addSubmenu("embed",O,W))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(O,W){A.menus.addInsertTableCellItem(O,W)})));if("1"==urlParams.sketch){var J=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(O,W){J.funct(O,W);this.addMenuItems(O,["-","pageScale","-","ruler"],W)})))}this.put("extras",new Menu(mxUtils.bind(this,function(O,W){null!=F&&A.menus.addSubmenu("language",
+O,W);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&A.mode!=App.MODE_ATLAS&&A.menus.addSubmenu("theme",O,W);A.menus.addSubmenu("units",O,W);O.addSeparator(W);"1"!=urlParams.sketch&&A.menus.addMenuItems(O,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),W);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItems(O,["-","showStartScreen","search","scratchpad"],W);O.addSeparator(W);
+"1"==urlParams.sketch?A.menus.addMenuItems(O,"configuration - copyConnect collapseExpand tooltips -".split(" "),W):(A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(O,"configuration",W),!A.isOfflineApp()&&isLocalStorage&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(O,"plugins",W));var U=A.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(O,["-","showRemoteCursors","shareCursor","-"],W);O.addSeparator(W);A.mode!=App.MODE_ATLAS&&this.addMenuItems(O,["fullscreen"],
+W);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(O,["toggleDarkMode"],W);O.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(O,W){A.menus.addMenuItems(O,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var O=this.get("insert"),W=O.funct;O.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("insertAdvanced",U,X,mxResources.get("advanced")),A.menus.addSubmenu("layout",U,X)):(W.apply(this,arguments),A.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),V=function(O,W,U,X){O.addItem(U,null,mxUtils.bind(this,function(){var n=new CreateGraphDialog(A,U,X);A.showDialog(n.container,620,420,!0,!1);n.init()}),
+W)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(O,W){for(var U=0;U<R.length;U++)"-"==R[U]?O.addSeparator(W):V(O,W,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 D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function A(ba,da,ma){var ja=F.menus.get(ba),
+na=O.addMenu(mxResources.get(ba),mxUtils.bind(this,function(){ja.funct.apply(this,arguments)}),V);na.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";na.style.display="inline-block";na.style.boxSizing="border-box";na.style.top="6px";na.style.marginRight="6px";na.style.height="30px";na.style.paddingTop="6px";na.style.paddingBottom="6px";na.style.cursor="pointer";na.setAttribute("title",mxResources.get(ba));F.menus.menuCreated(ja,na,"geMenuItem");null!=ma?(na.style.backgroundImage="url("+
+ma+")",na.style.backgroundPosition="center center",na.style.backgroundRepeat="no-repeat",na.style.backgroundSize="24px 24px",na.style.width="34px",na.innerHTML=""):da||(na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",na.style.backgroundPosition="right 6px center",na.style.backgroundRepeat="no-repeat",na.style.paddingRight="22px");return na}function B(ba,da,ma,ja,na,sa){var ka=document.createElement("a");ka.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ka.style.display=
+"inline-block";ka.style.boxSizing="border-box";ka.style.height="30px";ka.style.padding="6px";ka.style.position="relative";ka.style.verticalAlign="top";ka.style.top="0px";"1"==urlParams.sketch&&(ka.style.borderStyle="none",ka.style.boxShadow="none",ka.style.padding="6px",ka.style.margin="0px");null!=F.statusContainer?R.insertBefore(ka,F.statusContainer):R.appendChild(ka);null!=sa?(ka.style.backgroundImage="url("+sa+")",ka.style.backgroundPosition="center center",ka.style.backgroundRepeat="no-repeat",
+ka.style.backgroundSize="24px 24px",ka.style.width="34px"):mxUtils.write(ka,ba);mxEvent.addListener(ka,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ha){Ha.preventDefault()}));mxEvent.addListener(ka,"click",function(Ha){"disabled"!=ka.getAttribute("disabled")&&da(Ha);mxEvent.consume(Ha)});null==ma&&(ka.style.marginRight="4px");null!=ja&&ka.setAttribute("title",ja);null!=na&&(ba=function(){na.isEnabled()?(ka.removeAttribute("disabled"),ka.style.cursor="pointer"):(ka.setAttribute("disabled",
+"disabled"),ka.style.cursor="default")},na.addListener("stateChanged",ba),J.addListener("enabledChanged",ba),ba());return ka}function G(ba,da,ma){ma=document.createElement("div");ma.className="geMenuItem";ma.style.display="inline-block";ma.style.verticalAlign="top";ma.style.marginRight="6px";ma.style.padding="0 4px 0 4px";ma.style.height="30px";ma.style.position="relative";ma.style.top="0px";"1"==urlParams.sketch&&(ma.style.boxShadow="none");for(var ja=0;ja<ba.length;ja++)null!=ba[ja]&&("1"==urlParams.sketch&&
+(ba[ja].style.padding="10px 8px",ba[ja].style.width="30px"),ba[ja].style.margin="0px",ba[ja].style.boxShadow="none",ma.appendChild(ba[ja]));null!=da&&mxUtils.setOpacity(ma,da);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(ma,F.statusContainer):R.appendChild(ma);return ma}function M(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var ba=R.firstChild;null!=ba;){var da=ba.nextSibling;"geMenuItem"!=ba.className&&
+"geItem"!=ba.className||ba.parentNode.removeChild(ba);ba=da}V=R.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ba=1E3>d||"1"==urlParams.sketch;var ma=null;ba||(ma=A("diagram"));da=ba?A("diagram",null,Editor.drawLogoImage):null;null!=da&&(ma=da);G([ma,B(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ba?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"),ba?Editor.formatImage:null)],ba?60:null);da=A("insert",!0,ba?E:null);G([da,B(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ba?Editor.trashImage:null)],ba?60:null);411<=d&&(G([Oa,Ja],60),520<=d&&G([ra,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!=ma&&(mxEvent.disableContextMenu(ma),mxEvent.addGestureListeners(ma,mxUtils.bind(this,function(ja){(mxEvent.isShiftDown(ja)||mxEvent.isAltDown(ja)||mxEvent.isMetaDown(ja)||mxEvent.isControlDown(ja)||mxEvent.isPopupTrigger(ja))&&F.appIconClicked(ja)}),null,null));da=F.menus.get("language");null!=da&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==va&&(da=O.addMenu("",da.funct),da.setAttribute("title",
+mxResources.get("language")),da.className="geToolbarButton",da.style.backgroundImage="url("+Editor.globeImage+")",da.style.backgroundPosition="center center",da.style.backgroundRepeat="no-repeat",da.style.backgroundSize="24px 24px",da.style.position="absolute",da.style.height="24px",da.style.width="24px",da.style.zIndex="1",da.style.right="8px",da.style.cursor="pointer",da.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(da),va=da),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight=
+"4px",null!=va&&(va.parentNode.removeChild(va),va=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 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 ba=parseInt(this.div.offsetLeft),da=parseInt(this.div.offsetWidth),ma=F.embedViewport.x+F.embedViewport.width,ja=parseInt(this.div.offsetTop),na=parseInt(this.div.offsetHeight),sa=F.embedViewport.y+F.embedViewport.height;
+this.div.style.left=Math.max(F.embedViewport.x,Math.min(ba,ma-da))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(ja,sa-na))+"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 J=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var V=null,O=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 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 ba=F.getCurrentFile();if(null!=
+ba&&null!=ba.getTitle()){var da=ba.getMode();"google"==da?da="googleDrive":"github"==da?da="gitHub":"gitlab"==da?da="gitLab":"onedrive"==da&&(da="oneDrive");da=mxResources.get(da);R.setAttribute("title",ba.getTitle()+(null!=da?" ("+da+")":""))}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-
+"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)}n=
+F.menus.get("viewZoom");var E="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,I="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,P=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();J.refresh();J.view.validateBackground()});F.addListener("darkModeChanged",P);F.addListener("sketchModeChanged",P);var T=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Q.style.left=
+"10px",Q.style.top="10px",S.style.left="10px",S.style.top="60px",I.style.top="10px",I.style.right="12px",I.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 ba=F.diagramContainer.getAttribute("data-bounds");if(null!=ba){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var da=J.getGraphBounds();ba=ba.split(" ");F.diagramContainer.style.top=ba[0];F.diagramContainer.style.left=ba[1];F.diagramContainer.style.width=da.width+50+"px";F.diagramContainer.style.height=da.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";S.style.display="";S.style.left=F.diagramContainer.offsetLeft-S.offsetWidth-4+"px";S.style.top=F.diagramContainer.offsetTop+"px";I.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-I.offsetWidth+"px";I.style.top=Q.style.top;I.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&&"atlassian"!=F.getServiceName())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,
+F.bottomResizer.style.visibility;R.style.display="none";Q.style.visibility="";I.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";T()});P=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var ba=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ba.x+
+ba.width+4,ba.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",P);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",P);F.addListener("editInlineStop",mxUtils.bind(this,function(ba){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";I.style.visibility="hidden";S.style.display="none"}));if(null!=
+F.hoverIcons){var ca=F.hoverIcons.update;F.hoverIcons.update=function(){J.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=J.freehand){var ha=J.freehand.createStyle;J.freehand.createStyle=function(ba){return ha.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";I.className="geToolbarContainer";Q.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=S;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(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(ba){null!=F.notificationBtn&&(null!=ba?F.notificationBtn.setAttribute("title",ba):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&&
+"atlassian"!=F.getServiceName())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 ba=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):
+F.editor.getStatus();fa(ba);var da=F.getCurrentFile();da=null!=da?da.savingStatusKey:DrawioFile.prototype.savingStatusKey;ba==mxResources.get(da)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(da))+'..."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":""}}));ea=A("diagram",null,Editor.menuImage);ea.style.boxShadow="none";ea.style.padding="6px";ea.style.margin="0px";Q.appendChild(ea);mxEvent.disableContextMenu(ea);mxEvent.addGestureListeners(ea,mxUtils.bind(this,function(ba){(mxEvent.isShiftDown(ba)||mxEvent.isAltDown(ba)||mxEvent.isMetaDown(ba)||mxEvent.isControlDown(ba)||mxEvent.isPopupTrigger(ba))&&this.appIconClicked(ba)}),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 wa=!1,la=mxUtils.bind(this,function(){S.innerHTML="";if(!wa){var ba=function(ja,na,sa){ja=B("",ja.funct,null,na,ja,sa);ja.style.width="40px";ja.style.opacity="0.7";return da(ja,null,"pointer")},da=function(ja,na,sa){null!=na&&ja.setAttribute("title",na);ja.style.cursor=null!=
+sa?sa:"default";ja.style.margin="2px 0px";S.appendChild(ja);mxUtils.br(S);return ja};da(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)");da(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"));da(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");da(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ja=new mxCell("",new mxGeometry(0,0,J.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+ja.geometry.setTerminalPoint(new mxPoint(0,0),!0);ja.geometry.setTerminalPoint(new mxPoint(ja.geometry.width,0),!1);ja.geometry.points=[];ja.geometry.relative=!0;ja.edge=!0;da(F.sidebar.createEdgeTemplateFromCells([ja],ja.geometry.width,ja.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ja=ja.clone();ja.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ja.geometry.width=J.defaultEdgeLength+20;ja.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);ja.geometry.setTerminalPoint(new mxPoint(ja.geometry.width,20),!1);ja=da(F.sidebar.createEdgeTemplateFromCells([ja],ja.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ja.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ja.style.paddingBottom="14px";ja.style.marginBottom="14px"})();ba(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var ma=F.actions.get("toggleShapes");ba(ma,mxResources.get("shapes")+
+" ("+ma.shortcut+")",E);ea=A("table",null,Editor.calendarImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";da(ea,null,"pointer");ea=A("insert",null,Editor.plusImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";da(ea,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){wa?(mxUtils.setPrefixedStyle(S.style,
+"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",S.style.top="50%",S.style.bottom="",S.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),wa=!1,la()):(S.innerHTML="",S.appendChild(aa),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
+"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",wa=!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!=n){var Aa=function(ba){mxEvent.isShiftDown(ba)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ba)):mxEvent.isAltDown(ba)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
+mxEvent.consume(ba))},Ba=F.actions.get("zoomIn"),ua=F.actions.get("zoomOut"),Da=F.actions.get("resetView");P=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),Ja=B("",Ka.funct,null,mxResources.get("redo")+" ("+Ka.shortcut+")",Ka,Editor.redoImage),Ea=B("",P.funct,null,mxResources.get("fullscreen"),P,Editor.fullscreenImage);if(null!=I){Da=function(){pa.style.display=null!=F.pages&&
+("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Ca=function(){pa.innerHTML="";if(null!=F.currentPage){mxUtils.write(pa,F.currentPage.getName());var ba=null!=F.pages?F.pages.length:1,da=F.getPageIndex(F.currentPage);da=null!=da?da+1:1;var ma=F.currentPage.getId();pa.setAttribute("title",F.currentPage.getName()+" ("+da+"/"+ba+")"+(null!=ma?" ["+ma+"]":""))}};Ea.parentNode.removeChild(Ea);var Ma=F.actions.get("delete"),za=B("",Ma.funct,null,mxResources.get("delete"),
+Ma,Editor.trashImage);za.style.opacity="0.1";Q.appendChild(za);Ma.addListener("stateChanged",function(){za.style.opacity=Ma.enabled?"":"0.1"});var ya=function(){Oa.style.display=0<F.editor.undoManager.history.length||J.isEditing()?"inline-block":"none";Ja.style.display=Oa.style.display;Oa.style.opacity=Fa.enabled?"":"0.1";Ja.style.opacity=Ka.enabled?"":"0.1"};Q.appendChild(Oa);Q.appendChild(Ja);Fa.addListener("stateChanged",ya);Ka.addListener("stateChanged",ya);ya();var pa=this.createPageMenuTab(!1,
+!0);pa.style.display="none";pa.style.position="";pa.style.marginLeft="";pa.style.top="";pa.style.left="";pa.style.height="100%";pa.style.lineHeight="";pa.style.borderStyle="none";pa.style.padding="3px 0";pa.style.margin="0px";pa.style.background="";pa.style.border="";pa.style.boxShadow="none";pa.style.verticalAlign="top";pa.style.width="auto";pa.style.maxWidth="160px";pa.style.position="relative";pa.style.padding="6px";pa.style.textOverflow="ellipsis";pa.style.opacity="0.8";I.appendChild(pa);F.editor.addListener("pagesPatched",
+Ca);F.editor.addListener("pageSelected",Ca);F.editor.addListener("pageRenamed",Ca);F.editor.addListener("fileLoaded",Ca);Ca();F.addListener("fileDescriptorChanged",Da);F.addListener("pagesVisibleChanged",Da);F.editor.addListener("pagesPatched",Da);Da();Da=B("",ua.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ua,Editor.zoomOutImage);I.appendChild(Da);var ea=O.addMenu("100%",n.funct);ea.setAttribute("title",mxResources.get("zoom"));ea.innerHTML="100%";ea.style.display=
+"inline-block";ea.style.color="inherit";ea.style.cursor="pointer";ea.style.textAlign="center";ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.verticalAlign="top";ea.style.padding="6px 0";ea.style.fontSize="14px";ea.style.width="40px";ea.style.opacity="0.4";I.appendChild(ea);n=B("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ba,Editor.zoomInImage);I.appendChild(n);P.visible&&(I.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"),I.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;";
+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;";I.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(I);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");X.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var ra=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";ea=O.addMenu("100%",
+n.funct);ea.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.textDecoration="none";ea.style.overflow="hidden";ea.style.visibility="hidden";ea.style.textAlign="center";ea.style.cursor="pointer";ea.style.height=parseInt(F.tabContainerHeight)-1+"px";ea.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ea.style.position="absolute";ea.style.display="block";ea.style.fontSize="12px";ea.style.width=
+"59px";ea.style.right="0px";ea.style.bottom="0px";ea.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ea.style.backgroundPosition="right 6px center";ea.style.backgroundRepeat="no-repeat";X.appendChild(ea)}(function(ba){mxEvent.addListener(ba,"click",Aa);var da=mxUtils.bind(this,function(){ba.innerHTML="";mxUtils.write(ba,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,da);F.editor.addListener("resetGraphView",da);F.editor.addListener("pageSelected",
+da)})(ea);var xa=F.setGraphEnabled;F.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(ea.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==I?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==I&&X.appendChild(F.tabContainer);
+var va=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";S.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ba){mxEvent.getSource(ba)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ba),mxEvent.getClientY(ba)),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 qa=null,ta=null,ia=null,oa=null;mxEvent.addGestureListeners(H,function(ba){oa=parseInt(F.diagramContainer.style.height);ta=mxEvent.getClientY(ba);J.popupMenuHandler.hideMenu();mxEvent.consume(ba)});H=H.cloneNode(!1);H.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(H);F.rightResizer=H;mxEvent.addGestureListeners(H,function(ba){ia=parseInt(F.diagramContainer.style.width);qa=mxEvent.getClientX(ba);J.popupMenuHandler.hideMenu();
+mxEvent.consume(ba)});mxEvent.addGestureListeners(document.body,null,function(ba){var da=!1;null!=qa&&(F.diagramContainer.style.width=Math.max(20,ia+mxEvent.getClientX(ba)-qa)+"px",da=!0);null!=ta&&(F.diagramContainer.style.height=Math.max(20,oa+mxEvent.getClientY(ba)-ta)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),T(),F.refresh())},function(ba){null==qa&&null==
+ta||mxEvent.consume(ba);ta=qa=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";I.style.visibility="hidden";S.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,C){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&&(C||!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,D=N=0,A=0,B=0,G=0,M=0,H=5*v;if(1<z.length){z.push(p);z.sort(function(V,O){return V.y-O.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=D=(L.y-v.y-v.height-p.height)/2;break}for(L=0;L<z.length-1;L++){v=z[L];var J=z[L+1],R=p==v||p==J;J=J.y-v.y-v.height;F|=p==v;if(0==q&&0==
+K)q=J,K=1;else if(Math.abs(q-J)<=(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!=D?D:0,z.splice(0,0==L?1:L),L=-1;else break;0!=N||R||(q=N=J)}3==z.length&&z[1]==p&&(N=0)}if(1<y.length){y.push(p);y.sort(function(V,O){return V.x-O.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];J=y[L+1];R=p==v||p==J;J=J.x-v.x-v.width;F|=p==v;
+if(0==B&&0==A)B=J,A=1;else if(Math.abs(B-J)<=(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=J)}3==y.length&&y[1]==p&&(G=0)}x=function(V,O,W,U){var X=[];if(U){U=H;var n=0}else U=0,n=H;X.push(new mxPoint(V.x-U,V.y-n));X.push(new mxPoint(V.x+U,V.y+n));X.push(V);X.push(O);X.push(new mxPoint(O.x-U,O.y-n));X.push(new mxPoint(O.x+U,O.y+n));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(m.graph.getView().getOverlayPane());return V};B=function(V,O){if(V&&null!=m.guidesArrHor)for(V=0;V<m.guidesArrHor.length;V++)m.guidesArrHor[V].node.style.visibility="hidden";if(O&&null!=m.guidesArrVer)for(V=0;V<m.guidesArrVer.length;V++)m.guidesArrVer[V].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],J=y[L+1],p==v?(e=J.x-v.width-G,g.push(new mxPoint(e+v.width+H,F)),g.push(new mxPoint(J.x-H,F))):p==J?(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(J.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],J=z[L+1],p==v?(c=J.y-v.height-N,k.push(new mxPoint(K,c+v.height+H)),k.push(new mxPoint(K,J.y-H))):p==J?(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,J.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,C),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 C=0;C<u.length;C++)u[C].node.style.visibility=d?"visible":"hidden";if(null!=
+t)for(C=0;C<t.length;C++)t[C].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,D){if(null!=C)return K;var A;return function(){var B=this,G=arguments,M=D&&!A;clearTimeout(A);A=setTimeout(function(){A=null;D||K.apply(B,G)},q);M&&K.apply(B,G)}}var C=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(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:
+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,D,A,B){K=Math.round(K);q=Math.round(q);D=Math.round(D);A=Math.round(A);v.beginPath();v.moveTo(K+.5,q+.5);v.lineTo(D+.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(),D=x.view.translate,A=x.pageVisible;D=A?e+(l?q.y-x.container.scrollTop:q.x-x.container.scrollLeft):e+(l?D.y*K-x.container.scrollTop:D.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,
+mxConstants.MILLIMETERS?2:1));M=null;q=A?Math.min(D+(l?q.height:q.width),l?p.height:p.width):l?p.height:p.width;if(A)if(v.fillStyle=k.outBkgClr,l){var J=D-e;0<J&&v.fillRect(0,e,e,J);q<p.height&&v.fillRect(0,q,e,p.height)}else J=D-e,0<J&&v.fillRect(e,0,J,e),q<p.width&&v.fillRect(q,0,p.width,e);v.fillStyle=k.fontClr;for(A=A?D:D%(F*K);A<=q;A+=F*K)if(J=Math.round((A-D)/K/F),!(A<e||J==M)){M=J;var R=null;0==J%G&&(R=g.formatText(B+J*F)+"");l?z(e-H[Math.abs(J)%G],A,e,A,R):z(A,e-H[Math.abs(J)%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!=C?(null!=c&&c(L),L=C(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,D,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 J=G+K.height;var R=0;var V=v.getImageData(M,G-1,e,
+3);z(M,G,e,G);G--;var O=v.getImageData(F,H-1,e,3);z(F,H,e,H);H--;var W=v.getImageData(R,J-1,e,3);z(R,J,e,J);J--}else G=0,M=K.x+B.x+e-this.graph.container.scrollLeft,H=e/2,F=M+K.width/2,J=0,R=M+K.width,V=v.getImageData(M-1,G,3,e),z(M,G,M,e),M--,O=v.getImageData(F-1,H,3,e),z(F,H,F,e),F--,W=v.getImageData(R-1,J,3,e),z(R,J,R,e),R--;if(null==g.guidePart||g.guidePart.x1!=M||g.guidePart.y1!=G)g.guidePart={imgData1:V,x1:M,y1:G,imgData2:O,x2:F,y2:H,imgData3:W,x3:R,y3:J}}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,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(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 C=new mxPopupMenu(mxUtils.bind(this,function(g,k){b.menus.addMenuItems(g,["points","inches","millimeters","meters"],k)}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=
+!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);b.resetCurrentMenu();C.destroy()});var c=mxEvent.getClientX(t),e=mxEvent.getClientY(t);C.popup(c,e,null,t);b.setCurrentMenu(C,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,C=[],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;
+this.startDrawing=function(){K(!0)};this.isDrawing=function(){return x};var q=mxUtils.bind(this,function(H){if(d){var F=c.length,J=z&&0<C.length&&null!=c&&2>c.length;J||C.push.apply(C,c);c=[];C.push(null);u.push(d);d=null;(J||k)&&this.stopDrawing();k&&2<=F&&this.startDrawing();mxEvent.consume(H)}}),D=new mxCell;D.edge=!0;var A=function(){var H=b.getCurrentCellStyle(D);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<C.length;F++)null!=C[F]&&H.push([C[F].x,C[F].y]);H=PerfectFreehand.getStroke(H,L);C=[];for(F=0;F<H.length;F++)C.push({x:H[F][0],y:H[F][1]});C.push(null)}H=C[0].x;var J=C[0].x,R=C[0].y,V=C[0].y;for(F=1;F<C.length;F++)null!=C[F]&&(H=Math.max(H,C[F].x),J=Math.min(J,C[F].x),R=Math.max(R,
+C[F].y),V=Math.min(V,C[F].y));H-=J;R-=V;if(0<H&&0<R){var O=100/H,W=100/R;C.map(function(I){if(null==I)return I;I.x=(I.x-J)*O;I.y=(I.y-V)*W;return I});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<C.length;F++){var n=C[F];if(null==n){n=!1;X=C[X];var E=C[F-1];!e&&g&&(n=X.x-E.x,E=X.y-E.y,n=Math.sqrt(n*n+E*E)<=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(J/U-X.x,V/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=[];C=[]}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 J=
+parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*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",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(V){return parseFloat(V)*J}).join(" "),d.setAttribute("stroke-dasharray",R));v=[];H=B(H);G(H);
+t="M"+H.x+" "+H.y;C.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 J=M(0);if(J)if(C.push(J),N){var R=[];for(J=0;J<C.length;J++)R.push([C[J].x,C[J].y]);c=[];for(var V=2;V<v.length;V+=2)J=M(V),R.push([J.x,J.y]),c.push(J);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,L))}else{t+=" L"+
+J.x+" "+J.y;R="";c=[];for(V=2;V<v.length;V+=2)J=M(V),R+=" L"+J.x+" "+J.y,c.push(J);d.setAttribute("d",t+R)}m&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-J.x,H.y-J.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 J=0,R=0,V,O=0;for(V=H;V<F;V++)O++,H=v[V],J+=H.x,R+=H.y;return{x:J/O,y:R/O}}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,C){this.file=b;this.id=f;this.content=l;this.modifiedDate=d;this.createdDate=u;this.isResolved=t;this.user=C;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 0c83668d..118f2849 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -108,9 +108,9 @@ return a}();
a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
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.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i};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";
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.0",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]"!==
@@ -1989,53 +1989,53 @@ 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(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,E,d,f,g,m){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+=
+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=
+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,E,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 F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
+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(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*
+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 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");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.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,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?(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=
+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 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)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+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,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";
+"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,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="",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 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 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 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(m);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,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)),
+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,E,d,f,g,m,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");
+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==E)F.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")+
+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!=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);
+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 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)});
@@ -2045,44 +2045,43 @@ document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dis
(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",m="";if(E.isGridEnabled()||E.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=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);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=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=m,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=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=m,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=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
+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,m=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*m.x,g*m.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),
+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 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=
+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,
-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+E.width/this.scale)/q)-m)*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,m,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 m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(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=
+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 P=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((P.x+V.x)*R,(P.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(" "),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<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<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"!=
-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,
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var V=n.getCellStyle(I,!1),P=[],R=[],ha;for(ha in V)P.push(V[ha]),R.push(ha);n.getModel().isEdge(I)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",P,"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(" "),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,P,R,ha,la,sa){R=null!=R?R:n.currentVertexStyle;ha=null!=ha?ha:n.currentEdgeStyle;la=null!=la?la:!0;P=null!=P?P:n.getModel();if(sa){sa=[];for(var u=0;u<I.length;u++)sa=sa.concat(P.getDescendants(I[u]));I=sa}P.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
+"fontFamily","fontColor"];else{var W=P.getStyle(J),T=null!=W?W.split(";"):[];N=t.slice();for(var Q=0;Q<T.length;Q++){var Z=T[Q],oa=Z.indexOf("=");if(0<=oa){var wa=Z.substring(0,oa),Aa=mxUtils.indexOf(N,wa);0<=Aa&&N.splice(Aa,1);for(sa=0;sa<l.length;sa++){var ta=l[sa];if(0<=mxUtils.indexOf(ta,wa))for(var Ba=0;Ba<ta.length;Ba++){var va=mxUtils.indexOf(N,ta[Ba]);0<=va&&N.splice(va,1)}}}}}var Oa=P.isEdge(J);sa=Oa?ha:R;var Ca=P.getStyle(J);for(Q=0;Q<N.length;Q++){wa=N[Q];var Sa=sa[wa];null!=Sa&&"edgeStyle"!=
+wa&&("shape"!=wa||Oa)&&(!Oa||la||0>mxUtils.indexOf(d,wa))&&(Ca=mxUtils.setStyle(Ca,wa,Sa))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));P.setStyle(J,Ca)}}finally{P.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 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,
-X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,V=[];null!=I;){var Q=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),V.push(I));I=Q}I=this.toolbar.fontMenu;Q=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=qa}ba=n.cellEditor.isContentEditing();
-Y=I;qa=Q;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var I=!1,V=function(){I||(I=!0,window.setTimeout(function(){var Q=n.getSelectedEditingElement();null!=Q&&(Q=mxUtils.getCurrentStyle(Q),null!=Q&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(Q.fontFamily)),ea.toolbar.setFontSize(parseInt(Q.fontSize))));I=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
-"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(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==
+X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,V=[];null!=I;){var P=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),V.push(I));I=P}I=this.toolbar.fontMenu;P=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=qa}ba=n.cellEditor.isContentEditing();
+Y=I;qa=P;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var I=!1,V=function(){I||(I=!0,window.setTimeout(function(){var P=n.getSelectedEditingElement();null!=P&&(P=mxUtils.getCurrentStyle(P),null!=P&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(P.fontFamily)),ea.toolbar.setFontSize(parseInt(P.fontSize))));I=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
+"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(P){ea.handleError(P)}};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,P){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,P){this.menus.createPopupMenu(I,V,P)}));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 P=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
+(P.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(P[P.length-1]))},0));q(P)});this.addListener("styleChanged",mxUtils.bind(this,function(I,V){var P=V.getProperty("cells"),R=I=!1;if(0<P.length)for(var ha=0;ha<P.length&&(I=n.getModel().isVertex(P[ha])||I,!(R=n.getModel().isEdge(P[ha])||R)||!I);ha++);else R=I=!0;P=V.getProperty("keys");V=V.getProperty("values");for(ha=0;ha<P.length;ha++){var la=0<=mxUtils.indexOf(f,P[ha]);if("strokeColor"!=
+P[ha]||null!=V[ha]&&"none"!=V[ha])if(0<=mxUtils.indexOf(E,P[ha]))R||0<=mxUtils.indexOf(g,P[ha])?null==V[ha]?delete n.currentEdgeStyle[P[ha]]:n.currentEdgeStyle[P[ha]]=V[ha]:I&&0<=mxUtils.indexOf(t,P[ha])&&(null==V[ha]?delete n.currentVertexStyle[P[ha]]:n.currentVertexStyle[P[ha]]=V[ha]);else if(0<=mxUtils.indexOf(t,P[ha])){if(I||la)null==V[ha]?delete n.currentVertexStyle[P[ha]]:n.currentVertexStyle[P[ha]]=V[ha];if(R||la||0<=mxUtils.indexOf(g,P[ha]))null==V[ha]?delete n.currentEdgeStyle[P[ha]]:n.currentEdgeStyle[P[ha]]=
+V[ha]}}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],
-mxUtils.getValue(n.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",n.currentEdgeStyle.shape,n.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(n.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var I=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),Q=n.getView().getState(n.getSelectionCell());
-null!=Q&&(I=Q.style[mxConstants.STYLE_FONTFAMILY]||I,V=Q.style[mxConstants.STYLE_FONTSIZE]||V,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(I,V){I=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=I&&0<I.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
+(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&&(b=mxUtils.bind(this,function(){var I=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),P=n.getView().getState(n.getSelectionCell());null!=P&&(I=
+P.style[mxConstants.STYLE_FONTFAMILY]||I,V=P.style[mxConstants.STYLE_FONTSIZE]||V,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(I,V){I=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=I&&0<I.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
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;
@@ -2094,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]),E=D.getIndex(n),d=null,f=1,g=1,m=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+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=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}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 E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.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(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 F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.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,m,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)}))}};
+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,E,d){var f=null;if(null!=E&&0<E.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>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!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.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=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(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<E&&(f.style.top=Math.max(m.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<E&&(f.style.left=Math.max(m.container.scrollLeft+22,b-E)+"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)};
@@ -2118,49 +2117,51 @@ EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&
D.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(t){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.getCssClassForMarker=function(b,e,k,n){return"flexArrow"==e?null!=k&&k!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":"box"==k||"halfCircle"==k?"geSprite geSvgSprite geSprite-"+k+("end"==b?" geFlipSprite":""):k==mxConstants.ARROW_CLASSIC?"1"==n?"geSprite geSprite-"+b+"classic":"geSprite geSprite-"+b+"classictrans":k==mxConstants.ARROW_CLASSIC_THIN?"1"==n?"geSprite geSprite-"+b+"classicthin":"geSprite geSprite-"+b+"classicthintrans":k==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+b+"open":k==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+b+"openthin":k==mxConstants.ARROW_BLOCK?"1"==n?"geSprite geSprite-"+b+"block":"geSprite geSprite-"+b+"blocktrans":k==mxConstants.ARROW_BLOCK_THIN?"1"==n?"geSprite geSprite-"+b+"blockthin":"geSprite geSprite-"+b+"blockthintrans":k==mxConstants.ARROW_OVAL?"1"==n?"geSprite geSprite-"+b+"oval":"geSprite geSprite-"+b+"ovaltrans":k==mxConstants.ARROW_DIAMOND?"1"==n?"geSprite geSprite-"+b+"diamond":"geSprite geSprite-"+b+"diamondtrans":
-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.updateCssForMarker=function(b,e,k,n,D){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerHTML="";"flexArrow"==k?b.className=null!=n&&n!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(n,D),null!=k?(n=document.createElement("img"),n.style.position="absolute",n.style.marginTop="0.5px",n.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(n.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
+(n.style.filter="invert(100%)"),b.appendChild(n)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
+k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(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),m=new mxGraphModel,q=m.getChildAt(m.getRoot(),
-0),y=0;y<g.length;y++){m.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(E[y])&&null==f[mxObjectIdentity.get(m.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=
+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,
-W=mxRectangle.fromRectangle(ra);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/=N;J=b.container.scrollTop;var S=b.container.scrollLeft,P=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)P+=3;var Z=b.container.offsetWidth-P;P=b.container.offsetHeight-P;Q=Q?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-Q*W.width)/2/Q;var oa=0==this.lightboxVerticalDivider?0:(P-Q*W.height)/this.lightboxVerticalDivider/Q;u&&(R=Math.max(R,0),oa=Math.max(oa,0));if(u||ra.width<Z||ra.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";
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*R.width),this.scale*(this.translate.y+P.y*R.height),this.scale*P.width*R.width,
+this.scale*P.height*R.height)};b.getPreferredPageSize=function(P,R,ha){P=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,P.width*R.width,P.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,R,ha,la){if(null!=b.container&&!b.isViewer()){ha=null!=ha?ha:0;la=null!=la?la:0;var sa=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),J=b.view.translate,N=b.view.scale,
+W=mxRectangle.fromRectangle(sa);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/=N;J=b.container.scrollTop;var T=b.container.scrollLeft,Q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Q+=3;var Z=b.container.offsetWidth-Q;Q=b.container.offsetHeight-Q;P=P?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-P*W.width)/2/P;var oa=0==this.lightboxVerticalDivider?0:(Q-P*W.height)/this.lightboxVerticalDivider/P;u&&(R=Math.max(R,0),oa=Math.max(oa,0));if(u||sa.width<Z||sa.height<
+Q)b.view.scaleAndTranslate(P,Math.floor(R-W.x),Math.floor(oa-W.y)),b.container.scrollTop=J*P/N,b.container.scrollLeft=T*P/N;else if(0!=ha||0!=la)sa=b.view.translate,b.view.setTranslate(Math.floor(sa.x+ha/N),Math.floor(sa.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(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var 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 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,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),
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(P,R,ha){E++;
+var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",P);null!=ha&&la.setAttribute("title",ha);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",R);P.style.width="36px";P.style.filter="invert(100%)";la.appendChild(P);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),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(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),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(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
+mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(P){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(P){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)}),P||200)}),H=mxUtils.bind(this,function(P){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(P){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,
-function(Q){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Q)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var da=this.lightboxToolbarActions[q];da.elem=t(da.fn,da.icon,da.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(Q){D.refreshBtn.url?
-window.location.href=D.refreshBtn.url:window.location.reload();mxEvent.consume(Q)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(Q){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Q)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
-document.body))&&t(mxUtils.bind(this,function(Q){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(Q))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(Q){mxEvent.isTouchEvent(Q)||
-(mxEvent.isShiftDown(Q)||H(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Q){mxEvent.consume(Q)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Q){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Q)?C():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Q){mxEvent.isShiftDown(Q)?C():H(100);mxEvent.consume(Q)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(Q){mxEvent.isTouchEvent(Q)||H(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Q,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Q,R){},mouseUp:function(Q,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ba&&Math.abs(this.startX-R.getGraphX())<ba&&Math.abs(this.startY-R.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Q=this.graph.getPagePadding(),R=this.graph.getPageSize();this.translate.x=Q.x-(this.x0||0)*R.width;this.translate.y=Q.y-(this.y0||0)*
-R.height}Y.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Q=this.getPageLayout(),R=this.getPagePadding(),fa=this.getPageSize(),la=Math.ceil(2*R.x+Q.width*fa.width),ra=Math.ceil(2*R.y+Q.height*fa.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=ra)b.minimumGraphSize=new mxRectangle(0,0,la,ra);la=R.x-Q.x*fa.width;R=R.y-Q.y*fa.height;this.autoTranslate||this.view.translate.x==
-la&&this.view.translate.y==R?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Q.x,this.view.y0=Q.y,Q=b.view.translate.x,fa=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-Q)*b.view.scale),b.container.scrollTop+=Math.round((R-fa)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
-ja=null,U=null,I=null,V=function(Q){null!=ea&&window.clearTimeout(ea);0<=Q&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
-(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),la=b.view.scale,ra=0,u=0;null!=ka&&(ra=b.container.offsetWidth/2-ka.x+fa.x,u=b.container.offsetHeight/2-ka.y+fa.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(ra+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,ra*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ra&&0==u||(b.container.scrollLeft-=ra*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=I&&X.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=U=ka=ja=ea=null}),null!=Q?Q:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(Q,R,fa,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Q?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==I&&""!=X.getAttribute("filter")&&(I=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Q=R||null==ka?b.container.scrollLeft+
-b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=R||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=Q+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=Q+"px "+la+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Q=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Q.style,
-"transform-origin",(R||null==ka?b.container.clientWidth/2+b.container.scrollLeft-Q.offsetLeft+"px":ka.x+b.container.scrollLeft-Q.offsetLeft-b.container.offsetLeft+"px")+" "+(R||null==ka?b.container.clientHeight/2+b.container.scrollTop-Q.offsetTop+"px":ka.y+b.container.scrollTop-Q.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Q.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(Q){null!=ea&&window.clearTimeout(ea)},null,function(Q){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(Q){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Q,R,fa,la,ra){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(Q))fa=
-b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(Q)?b.view.setTranslate(fa.x+(R?-la:la),fa.y):b.view.setTranslate(fa.x,fa.y+(R?la:-la));else if(fa||b.isZoomWheelEvent(Q))for(var u=mxEvent.getSource(Q);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=ra?new mxPoint(la,ra):new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q)),U=fa,fa=b.zoomFactor,la=null,Q.ctrlKey&&null!=Q.deltaY&&40>Math.abs(Q.deltaY)&&Math.round(Q.deltaY)!=Q.deltaY?fa=1+Math.abs(Q.deltaY)/
-20*(fa-1):null!=Q.movementY&&"pointermove"==Q.type&&(fa=1+Math.max(1,Math.abs(Q.movementY))/20*(fa-1),la=-1),b.lazyZoom(R,null,la,fa),mxEvent.consume(Q),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Q){b.cumulativeZoomFactor=Q.scale;b.lazyZoom(0<Q.scale,!0);mxEvent.consume(Q)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+this.layersDialog.style.zIndex=R.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),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,
+function(P){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var da=this.lightboxToolbarActions[q];da.elem=t(da.fn,da.icon,da.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(P){D.refreshBtn.url?
+window.location.href=D.refreshBtn.url:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(P){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
+document.body))&&t(mxUtils.bind(this,function(P){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||
+(mxEvent.isShiftDown(P)||H(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?C():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?C():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,R){},mouseUp:function(P,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
+ba&&Math.abs(this.startX-R.getGraphX())<ba&&Math.abs(this.startY-R.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var P=this.graph.getPagePadding(),R=this.graph.getPageSize();this.translate.x=P.x-(this.x0||0)*R.width;this.translate.y=P.y-(this.y0||0)*
+R.height}Y.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),R=this.getPagePadding(),ha=this.getPageSize(),la=Math.ceil(2*R.x+P.width*ha.width),sa=Math.ceil(2*R.y+P.height*ha.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=sa)b.minimumGraphSize=new mxRectangle(0,0,la,sa);la=R.x-P.x*ha.width;R=R.y-P.y*ha.height;this.autoTranslate||this.view.translate.x==
+la&&this.view.translate.y==R?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,ha=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-P)*b.view.scale),b.container.scrollTop+=Math.round((R-ha)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
+ja=null,U=null,I=null,V=function(P){null!=ea&&window.clearTimeout(ea);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
+(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ha=mxUtils.getOffset(b.container),la=b.view.scale,sa=0,u=0;null!=ka&&(sa=b.container.offsetWidth/2-ka.x+ha.x,u=b.container.offsetHeight/2-ka.y+ha.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(sa+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,sa*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==sa&&0==u||(b.container.scrollLeft-=sa*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=I&&X.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=U=ka=ja=ea=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(P,R,ha,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==I&&""!=X.getAttribute("filter")&&(I=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=R||null==ka?b.container.scrollLeft+
+b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=R||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=P+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=P+"px "+la+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(P=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(P.style,
+"transform-origin",(R||null==ka?b.container.clientWidth/2+b.container.scrollLeft-P.offsetLeft+"px":ka.x+b.container.scrollLeft-P.offsetLeft-b.container.offsetLeft+"px")+" "+(R||null==ka?b.container.clientHeight/2+b.container.scrollTop-P.offsetTop+"px":ka.y+b.container.scrollTop-P.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(P.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());V(b.isFastZoomEnabled()?ha:0)};mxEvent.addGestureListeners(b.container,function(P){null!=ea&&window.clearTimeout(ea)},null,function(P){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(P){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,R,ha,la,sa){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ha&&b.isScrollWheelEvent(P))ha=
+b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(ha.x+(R?-la:la),ha.y):b.view.setTranslate(ha.x,ha.y+(R?la:-la));else if(ha||b.isZoomWheelEvent(P))for(var u=mxEvent.getSource(P);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=sa?new mxPoint(la,sa):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),U=ha,ha=b.zoomFactor,la=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?ha=1+Math.abs(P.deltaY)/
+20*(ha-1):null!=P.movementY&&"pointermove"==P.type&&(ha=1+Math.max(1,Math.abs(P.movementY))/20*(ha-1),la=-1),b.lazyZoom(R,null,la,ha),mxEvent.consume(P),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2206,11 +2207,11 @@ 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!=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!=m()&&(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 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){E=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.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(n){k(parseFloat(n))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
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,E,d,f,g,m,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,m||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.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(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()};
@@ -2218,7 +2219,7 @@ EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind
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),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(m){}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(m){}}catch(m){}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)});
+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"),
@@ -2240,7 +2241,7 @@ G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(H);var aa=n.getV
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,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");
+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),
@@ -2251,39 +2252,39 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
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,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,m;g<d;)m=D[g],f[g]=t?"undefined"===typeof E?t(m,g):t.call(E,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";
+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 E=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(E=new mxPoint(I.getGraphX(),I.getGraphY()),m=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!=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;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(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());
-m=!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=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
+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 P=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),l=this.isCellSelected(P.cell),f=P,d=I,null!=P.text&&null!=
+P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,I.getGraphX(),I.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(P.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(P.cell),null==R||null==R.getHandleForEvent(I))){var ha=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;ha.grow(la);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()-R)&&mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()-R))){var sa=this.model.getParent(P.cell);R=this.model.getParent(sa);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=sa&&mxUtils.intersects(ha,
+new mxRectangle(P.x,P.y-la,P.width,u))||this.model.getChildAt(sa,0)!=P.cell&&mxUtils.intersects(ha,new mxRectangle(P.x-la,P.y,u,P.height))||mxUtils.intersects(ha,new mxRectangle(P.x,P.y+P.height-la,P.width,u))||mxUtils.intersects(ha,new mxRectangle(P.x+P.width-la,P.y,u,P.height)))sa=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=
+!sa,I.consume()))}}for(;!I.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(R=this.getActualStartSize(P.cell),(0<R.x||0<R.width)&&mxUtils.intersects(ha,new mxRectangle(P.x+(R.x-R.width-1)*V+(0==R.x?P.width:0),P.y,1,P.height))||(0<R.y||0<R.height)&&mxUtils.intersects(ha,new mxRectangle(P.x,P.y+(R.y-R.height-1)*V+(0==R.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,I.getEvent()),R=this.selectionCellsHandler.getHandler(P.cell),
+null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var P in I)if(null!=I[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(P=f,Math.abs(E.x-
+V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var ha=this.selectionCellsHandler.getHandler(P.cell);null==ha&&this.model.isEdge(P.cell)&&(ha=this.createHandler(P));if(null!=ha&&null!=ha.bends&&0<ha.bends.length){I=ha.getHandleForEvent(d);var la=this.view.getEdgeStyle(P);R=la==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=ha.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==P.visibleSourceState&&null==P.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
+mxEvent.LABEL_HANDLE||0==I||null!=P.visibleSourceState||I==ha.bends.length-1||null!=P.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=P.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=ha.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(P,E.x,E.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),ha.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=ha&&(this.selectionCellsHandler.isHandlerActive(ha)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,ha),this.selectCellForEvent(P.cell,V.getEvent())):this.isCellSelected(P.cell)||ha.destroy());
+l=!1;E=d=f=g=null}}else if(P=V.getState(),null!=P&&this.isCellEditable(P.cell)){ha=null;if(this.model.isEdge(P.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=P.absolutePoints,null!=R)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,V.getGraphX(),V.getGraphY()))ha="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))ha="pointer";else if(null!=P.visibleSourceState||
+null!=P.visibleTargetState)I=this.view.getEdgeStyle(P),ha="crosshair",I!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(V=mxUtils.findNearestSegment(P,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(ha=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(P.cell)&&(V=this.model.getParent(P.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(I,
+new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(I,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ha="row-resize";else if(mxUtils.intersects(I,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(V,0)!=P.cell||mxUtils.intersects(I,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ha="col-resize";for(V=P;null==ha&&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))?ha="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))&&(ha="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=ha&&P.setCursor(ha)}}}),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 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,
+!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=[],P=this.graph.pageFormat,R=this.graph.pageScale,ha=P.width*R;P=P.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
+sa=this.graph.getPageLayout(),u=0;u<sa.width;u++)V.push(new mxRectangle(((sa.x+u)*ha+R.x)*la,(sa.y*P+R.y)*la,ha*la,P*la));for(u=1;u<sa.height;u++)V.push(new mxRectangle((sa.x*ha+R.x)*la,((sa.y+u)*P+R.y)*la,ha*la,P*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),P=new mxDictionary,R=[],ha=0;ha<V.length;ha++){var la=this.graph.isTableCell(I)&&this.graph.isTableCell(V[ha])&&this.graph.isCellSelected(V[ha])?this.graph.model.getParent(V[ha]):this.graph.isTableRow(I)&&this.graph.isTableRow(V[ha])&&this.graph.isCellSelected(V[ha])?V[ha]:
+this.graph.getCompositeParent(V[ha]);null==la||P.get(la)||(P.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(I,V,P,R){var ha=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?ha=!0:I=this.graph.model.getParent(I));ha||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())};
-var O=this.click;this.click=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);if(this.isEnabled()&&!V||I.isConsumed())return O.apply(this,arguments);var Q=V?I.sourceState.cell:I.getCell();null!=Q&&(Q=this.getClickableLinkForCell(Q),null!=Q&&(this.isCustomLink(Q)?this.customLinkClicked(Q):this.openLink(Q)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
+var O=this.click;this.click=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);if(this.isEnabled()&&!V||I.isConsumed())return O.apply(this,arguments);var P=V?I.sourceState.cell:I.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
function(){X.apply(this,arguments);if(null!=this.div)for(var I=this.div.getElementsByTagName("a"),V=0;V<I.length;V++)null!=I[V].getAttribute("href")&&null==I[V].getAttribute("target")&&I[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};this.getCursorForMouseEvent=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);return this.getCursorForCell(V?I.sourceState.cell:I.getCell())};var ea=this.getCursorForCell;
-this.getCursorForCell=function(I){if(!this.isEnabled()||this.isCellLocked(I)){if(null!=this.getClickableLinkForCell(I))return"pointer";if(this.isCellLocked(I))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(I,V){var Q=mxEvent.isAltDown(V)?I:null;I=this.getCells(I.x,I.y,I.width,I.height,null,null,Q,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(Q=0;Q<I.length;Q++)this.selectCellForEvent(I[Q],V);else this.selectCellsForEvent(I,
-V);return I};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(I,V,Q){return this.graph.isCellSelected(I)?!1:ka.apply(this,arguments)};this.isCellLocked=function(I){for(;null!=I;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(I),"locked","0"))return!0;I=this.model.getParent(I)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){"mouseDown"==V.getProperty("eventName")&&(I=V.getProperty("event").getState(),
-ja=null==I||this.isSelectionEmpty()||this.isCellSelected(I.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(I,V){if(!mxEvent.isMultiTouchEvent(V)){I=V.getProperty("event");var Q=V.getProperty("cell");null==Q?(I=mxUtils.convertPoint(this.container,mxEvent.getClientX(I),mxEvent.getClientY(I)),C.start(I.x,I.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(Q)&&this.removeSelectionCell(Q);ja=null;V.consume()}}));
-this.connectionHandler.selectCells=function(I,V){this.graph.setSelectionCell(V||I)};this.connectionHandler.constraintHandler.isStateIgnored=function(I,V){var Q=I.view.graph;return V&&(Q.isCellSelected(I.cell)||Q.isTableRow(I.cell)&&Q.selectionCellsHandler.isHandled(Q.model.getParent(I.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var I=this.connectionHandler.constraintHandler;null!=I.currentFocus&&I.isStateIgnored(I.currentFocus,!0)&&(I.currentFocus=null,I.constraints=
+this.getCursorForCell=function(I){if(!this.isEnabled()||this.isCellLocked(I)){if(null!=this.getClickableLinkForCell(I))return"pointer";if(this.isCellLocked(I))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(I,V){var P=mxEvent.isAltDown(V)?I:null;I=this.getCells(I.x,I.y,I.width,I.height,null,null,P,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(P=0;P<I.length;P++)this.selectCellForEvent(I[P],V);else this.selectCellsForEvent(I,
+V);return I};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(I,V,P){return this.graph.isCellSelected(I)?!1:ka.apply(this,arguments)};this.isCellLocked=function(I){for(;null!=I;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(I),"locked","0"))return!0;I=this.model.getParent(I)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){"mouseDown"==V.getProperty("eventName")&&(I=V.getProperty("event").getState(),
+ja=null==I||this.isSelectionEmpty()||this.isCellSelected(I.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(I,V){if(!mxEvent.isMultiTouchEvent(V)){I=V.getProperty("event");var P=V.getProperty("cell");null==P?(I=mxUtils.convertPoint(this.container,mxEvent.getClientX(I),mxEvent.getClientY(I)),C.start(I.x,I.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);ja=null;V.consume()}}));
+this.connectionHandler.selectCells=function(I,V){this.graph.setSelectionCell(V||I)};this.connectionHandler.constraintHandler.isStateIgnored=function(I,V){var P=I.view.graph;return V&&(P.isCellSelected(I.cell)||P.isTableRow(I.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(I.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var I=this.connectionHandler.constraintHandler;null!=I.currentFocus&&I.isStateIgnored(I.currentFocus,!0)&&(I.currentFocus=null,I.constraints=
null,I.destroyIcons());I.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(I){I=U.apply(this,arguments);null!=I.state&&this.isCellLocked(I.getCell())&&(I.state=null);return I}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
@@ -2302,33 +2303,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var n=decodeURIComponent(escape(atob(b.substring(26)))),D=n.indexOf("<svg");if(0<=D){k.innerHTML=Graph.sanitizeHtml(n.substring(D));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 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 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};
+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,E=null,d=mxUtils.bind(this,function(m){t=!0;E=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m))}),f=mxUtils.bind(this,function(m){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(m))<D&&Math.abs(E.y-mxEvent.getClientY(m))<D}),g=mxUtils.bind(this,function(m){if(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(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={},m;for(m in E){var q=E[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(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,
+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),m;for(m in E){var q=E[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(E,d,f,g,m,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,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 F=this.model.getChildAt(f,y),C=this.getScaledCellAt(E,d,F,g,m,q);if(null!=C)return C;if(this.isCellVisible(F)&&(m&&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 m=this.getCompositeParent(E[g]);this.isTableCell(m)&&(m=this.graph.model.getParent(m));
-this.isTableRow(m)&&(m=this.graph.model.getParent(m));null==m||d.get(m)||(d.put(m,!0),f.push(m))}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=
+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,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};
+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)};
@@ -2342,7 +2343,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
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(E,d){if(null!=b.shape){var f=[k[0]];d=E/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==E&&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,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()};
@@ -2356,11 +2357,11 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
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,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"](),m=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:m+1,mm:E(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
+/\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(E){function d(){n.isVisible(E)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.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 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);
+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()};
@@ -2370,13 +2371,13 @@ Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&
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,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),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?
+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?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=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?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!=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)||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==E||null!=ba||!aa||null==C&&f)return D(ba);E(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};
@@ -2385,8 +2386,8 @@ 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 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 m=this.model.getParent(k[t]),q=this.layoutManager.getLayout(m);
-null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,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.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)};
@@ -2423,7 +2424,7 @@ 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),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")),
@@ -2440,36 +2441,36 @@ Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCell
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=[],m=0;m<E.length;m++){var q=this.getCellGeometry(E[m]),y={cell:E[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(E[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,E.length,
+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),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 m=this.getCellGeometry(t);null!=m&&(k||(k=b==E[E.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),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 m=E[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<E.length-1&&(m=E[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 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 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,m=E.getChildCells(b,!0),q=0;q<m.length;q++)E.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
-m.length&&0<y){if(D){var F=this.graph.getCellGeometry(m[m.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(m[m.length-1],F))}var C=t?null:this.getRowLayout(m[0],g),H=[],G=e.y;for(q=0;q<m.length;q++)F=this.graph.getCellGeometry(m[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(m[q],F)),d=Math.max(d,this.layoutRow(m[q],C,F.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
+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<m.length;q++)E.setVisible(m[q],!1)}finally{E.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var 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,F=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;F.push(V);V=null!=m.routedPoints?m.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(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,
+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=F;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 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;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,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?(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,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,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(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),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[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));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=
-q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=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==F||aa<F)y=G,F=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.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(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),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)}})();
+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(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};
@@ -2483,108 +2484,108 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
!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 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=
+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 S=L.apply(this,arguments);this.error=null;return S});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),
-ia=0;ia<ca;ia++)this.createCellLookup([this.model.getChildAt(T,ia)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var T in z){var ca=L[T];null==M[ca]&&(M[ca]=z[T].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,T){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),ia=new mxGraphModel;ca.decode(z,ia);z=[];ca={};var ma={},pa=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),ca));if(null!=pa){var ua=this.createCellLookup([ia.root]);
-pa=pa.slice();this.model.beginUpdate();try{if(1!=pa.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<pa.length;ia++)ya=this.model.getChildren(this.moveCells([pa[ia]],L,M,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ia.getChildren(pa[0]);null!=ya&&(z=this.moveCells(ya,L,M,!1,this.getDefaultParent()),ma[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,ua,ma),this.updateCustomLinks(ma,z),T)){this.isGridEnabled()&&
-(L=this.snap(L),M=this.snap(M));var Fa=this.getBoundingBoxFromGeometry(z,!0);null!=Fa&&this.moveCells(z,L-Fa.x,M-Fa.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),T=new mxDictionary,ca=0;ca<z.length;ca++)T.put(z[ca],!0);var ia=new mxCodec,ma=new mxGraphModel,pa=ma.getChildAt(ma.getRoot(),0);for(ca=0;ca<M.length;ca++){ma.add(pa,M[ca]);var ua=this.view.getState(z[ca]);if(null!=ua){var ya=this.getCellGeometry(M[ca]);null!=
-ya&&ya.relative&&!this.model.isEdge(z[ca])&&null==T.get(this.model.getParent(z[ca]))&&(ya.offset=null,ya.relative=!1,ya.x=ua.x/ua.view.scale-ua.view.translate.x,ya.y=ua.y/ua.view.scale-ua.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return ia.encode(ma)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
-mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,T,ca,ia,ma,pa){null==pa&&(pa=this.model.getParent(z),this.isTable(pa)||this.isTableRow(pa))&&(pa=this.getCellAt(ia,ma,
-null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,T,ca,ia,ma,pa]);this.model.setValue(M,"");var ua=this.getChildCells(M,!0);for(L=0;L<ua.length;L++){var ya=this.getCellGeometry(ua[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(ua[L])}var Fa=this.getChildCells(z,!0);for(L=0;L<Fa.length;L++)ya=this.getCellGeometry(Fa[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
-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=
-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 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=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)),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;
-if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),M=0,T=0;T<L;T++){var ca=this.model.getChildAt(z,T);this.model.isVertex(ca)&&
-(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var T=this.getCurrentCellStyle(z),ca=!0,ia=!0,ma=0;ma<L.length&&ia;ma++)ca=ca&&this.isTable(L[ma]),ia=ia&&this.isTableRow(L[ma]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(T,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(T,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
-arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
-(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 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.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 S=z[M];L[mxObjectIdentity.get(S)]=S.getId();for(var ca=this.model.getChildCount(S),
+fa=0;fa<ca;fa++)this.createCellLookup([this.model.getChildAt(S,fa)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var S in z){var ca=L[S];null==M[ca]&&(M[ca]=z[S].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,S){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),fa=new mxGraphModel;ca.decode(z,fa);z=[];ca={};var na={},ra=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),ca));if(null!=ra){var pa=this.createCellLookup([fa.root]);
+ra=ra.slice();this.model.beginUpdate();try{if(1!=ra.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<ra.length;fa++)ya=this.model.getChildren(this.moveCells([ra[fa]],L,M,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=fa.getChildren(ra[0]);null!=ya&&(z=this.moveCells(ya,L,M,!1,this.getDefaultParent()),na[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,pa,na),this.updateCustomLinks(na,z),S)){this.isGridEnabled()&&
+(L=this.snap(L),M=this.snap(M));var Fa=this.getBoundingBoxFromGeometry(z,!0);null!=Fa&&this.moveCells(z,L-Fa.x,M-Fa.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),S=new mxDictionary,ca=0;ca<z.length;ca++)S.put(z[ca],!0);var fa=new mxCodec,na=new mxGraphModel,ra=na.getChildAt(na.getRoot(),0);for(ca=0;ca<M.length;ca++){na.add(ra,M[ca]);var pa=this.view.getState(z[ca]);if(null!=pa){var ya=this.getCellGeometry(M[ca]);null!=
+ya&&ya.relative&&!this.model.isEdge(z[ca])&&null==S.get(this.model.getParent(z[ca]))&&(ya.offset=null,ya.relative=!1,ya.x=pa.x/pa.view.scale-pa.view.translate.x,ya.y=pa.y/pa.view.scale-pa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return fa.encode(na)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
+mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,S,ca,fa,na,ra){null==ra&&(ra=this.model.getParent(z),this.isTable(ra)||this.isTableRow(ra))&&(ra=this.getCellAt(fa,na,
+null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,S,ca,fa,na,ra]);this.model.setValue(M,"");var pa=this.getChildCells(M,!0);for(L=0;L<pa.length;L++){var ya=this.getCellGeometry(pa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(pa[L])}var Fa=this.getChildCells(z,!0);for(L=0;L<Fa.length;L++)ya=this.getCellGeometry(Fa[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
+mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Na=this.model.getTerminal(M,!1);if(null!=Na){var Pa=this.getCurrentCellStyle(Na);null!=Pa&&"1"==Pa.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 S=this.getSelectionCell(),ca=null,fa=[],na=mxUtils.bind(this,function(ra){if(null!=this.view.getState(ra)&&(this.model.isVertex(ra)||this.model.isEdge(ra)))if(fa.push(ra),ra==S)ca=fa.length-1;else if(z&&null==S&&0<fa.length||null!=ca&&z&&fa.length>ca||!z&&0<ca)return;for(var pa=0;pa<this.model.getChildCount(ra);pa++)na(this.model.getChildAt(ra,pa))});na(this.model.root);0<fa.length&&
+(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),fa.length):0,this.setSelectionCell(fa[ca]))}};Graph.prototype.swapShapes=function(z,L,M,S,ca,fa,na){L=!1;if(!S&&null!=ca&&1==z.length&&(S=this.view.getState(ca),M=this.view.getState(z[0]),null!=S&&null!=M&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==S.style.shape&&"umlLifeline"==M.style.shape)&&(S=this.getCellGeometry(ca),fa=this.getCellGeometry(z[0]),null!=S&&null!=fa))){L=S.clone();S=fa.clone();S.x=L.x;S.y=L.y;L.x=fa.x;L.y=fa.y;this.model.beginUpdate();
+try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}L=!0}return L};var l=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,S,ca,fa,na){if(this.swapShapes(z,L,M,S,ca,fa,na))return z;na=null!=na?na:{};if(this.isTable(ca)){for(var ra=[],pa=0;pa<z.length;pa++)this.isTable(z[pa])?ra=ra.concat(this.model.getChildCells(z[pa],!0).reverse()):ra.push(z[pa]);z=ra}this.model.beginUpdate();try{ra=[];for(pa=0;pa<z.length;pa++)if(null!=ca&&this.isTableRow(z[pa])){var ya=
+this.model.getParent(z[pa]),Fa=this.getCellGeometry(z[pa]);this.isTable(ya)&&ra.push(ya);if(null!=ya&&null!=Fa&&this.isTable(ya)&&this.isTable(ca)&&(S||ya!=ca)){if(!S){var Na=this.getCellGeometry(ya);null!=Na&&(Na=Na.clone(),Na.height-=Fa.height,this.model.setGeometry(ya,Na))}Na=this.getCellGeometry(ca);null!=Na&&(Na=Na.clone(),Na.height+=Fa.height,this.model.setGeometry(ca,Na));var Pa=this.model.getChildCells(ca,!0);if(0<Pa.length){z[pa]=S?this.cloneCell(z[pa]):z[pa];var Qa=this.model.getChildCells(z[pa],
+!0),Ta=this.model.getChildCells(Pa[0],!0),Ma=Ta.length-Qa.length;if(0<Ma)for(var ua=0;ua<Ma;ua++){var za=this.cloneCell(Qa[Qa.length-1]);null!=za&&(za.value="",this.model.add(z[pa],za))}else if(0>Ma)for(ua=0;ua>Ma;ua--)this.model.remove(Qa[Qa.length+ua-1]);Qa=this.model.getChildCells(z[pa],!0);for(ua=0;ua<Ta.length;ua++){var Ia=this.getCellGeometry(Ta[ua]),Da=this.getCellGeometry(Qa[ua]);null!=Ia&&null!=Da&&(Da=Da.clone(),Da.width=Ia.width,this.model.setGeometry(Qa[ua],Da))}}}}var La=l.apply(this,
+arguments);for(pa=0;pa<ra.length;pa++)!S&&this.model.contains(ra[pa])&&0==this.model.getChildCount(ra[pa])&&this.model.remove(ra[pa]);S&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),La)}finally{this.model.endUpdate()}return La};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var ca=this.model.getParent(z[S]),fa=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
+1==this.model.getChildCount(fa)?0>mxUtils.indexOf(z,fa)&&0>mxUtils.indexOf(M,fa)&&M.push(fa):this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(fa=this.model.getParent(z[S]),0>mxUtils.indexOf(z,fa)&&0>mxUtils.indexOf(M,fa))){for(var na=this.model.getChildCells(fa,!0),ra=0,pa=0;pa<na.length;pa++)0<=mxUtils.indexOf(z,na[pa])&&ra++;ra==na.length&&M.push(fa)}M.push(z[S])}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 S=0;S<L.length;S++)null!=L[S]&&M.updateCustomLinksForCell(z,L[S],M)};Graph.prototype.updateCustomLinksForCell=function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),S=0;S<M;S++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,S))};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 S=M[L];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?S[3]:0,4<S.length?S[4]:0))}}catch(fa){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=M,M=L,L=S;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;
+if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),M=0,S=0;S<L;S++){var ca=this.model.getChildAt(z,S);this.model.isVertex(ca)&&
+(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var S=this.getCurrentCellStyle(z),ca=!0,fa=!0,na=0;na<L.length&&fa;na++)ca=ca&&this.isTable(L[na]),fa=fa&&this.isTableRow(L[na]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
+arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||fa||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
+(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(),S=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var fa=z[ca];if(M.isEdge(fa)){var na=M.getTerminal(fa,!0),ra=M.getTerminal(fa,!1);M.setTerminal(fa,ra,!0);M.setTerminal(fa,
+na,!1);var pa=M.getGeometry(fa);if(null!=pa){pa=pa.clone();null!=pa.points&&pa.points.reverse();var ya=pa.getTerminalPoint(!0),Fa=pa.getTerminalPoint(!1);pa.setTerminalPoint(ya,!1);pa.setTerminalPoint(Fa,!0);M.setGeometry(fa,pa);var Na=this.view.getState(fa),Pa=this.view.getState(na),Qa=this.view.getState(ra);if(null!=Na){var Ta=null!=Pa?this.getConnectionConstraint(Na,Pa,!0):null,Ma=null!=Qa?this.getConnectionConstraint(Na,Qa,!1):null;this.setConnectionConstraint(fa,na,!0,Ma);this.setConnectionConstraint(fa,
+ra,!1,Ta);var ua=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[fa])}S.push(fa)}}else if(M.isVertex(fa)&&(pa=this.getCellGeometry(fa),null!=pa)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){pa=pa.clone();pa.x+=pa.width/2-pa.height/
+2;pa.y+=pa.height/2-pa.width/2;var za=pa.width;pa.width=pa.height;pa.height=za;M.setGeometry(fa,pa)}var Ia=this.view.getState(fa);if(null!=Ia){var Da=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],La=mxUtils.getValue(Ia.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Da[mxUtils.mod(mxUtils.indexOf(Da,La)+(L?-1:1),Da.length)],[fa])}S.push(fa)}}}finally{M.endUpdate()}return S};
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("*");
-for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var T=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var ia=this.convertValueToString(z[ca]);if(null!=ia&&0<ia.length){T.innerHTML=ia;for(var ma=T.getElementsByTagName(null!=M?M:"*"),pa=0;pa<ma.length;pa++)L(ma[pa]);T.innerHTML!=ia&&this.cellLabelChanged(z[ca],T.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
-this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var T=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(T)){this.setAttributeForCell(ca,T,L);break}ca=this.model.getParent(ca)}var ia=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+
-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,
+for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var fa=this.convertValueToString(z[ca]);if(null!=fa&&0<fa.length){S.innerHTML=fa;for(var na=S.getElementsByTagName(null!=M?M:"*"),ra=0;ra<na.length;ra++)L(na[ra]);S.innerHTML!=fa&&this.cellLabelChanged(z[ca],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
+this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(S)){this.setAttributeForCell(ca,S,L);break}ca=this.model.getParent(ca)}var fa=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+
+Graph.diagramLanguage,L):fa.setAttribute("label",L);L=fa}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 S=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),S.push(ca))}for(M=0;M<S.length;M++)if(ca=this.view.getState(S[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
+this.isTransparentState(ca)){for(var fa=!0,na=0;na<this.model.getChildCount(ca.cell)&&fa;na++)L.get(this.model.getChildAt(ca.cell,na))||(fa=!1);fa&&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 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)?
+M){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=M?S.setAttribute(L,M):S.removeAttribute(L);this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,S){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var fa=this.model.getParent(z[ca]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(z,fa))return null}fa=
+F.apply(this,arguments);var na=!0;for(ca=0;ca<z.length&&na;ca++)na=na&&this.isTableRow(z[ca]);na&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)||(fa=null));return fa};Graph.prototype.click=function(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 S=this.model.isEdge(L)?this.view.getState(L):null,ca=mxEvent.getSource(z);this.firstClickState!=S||this.firstClickSource!=ca||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(z)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&
+(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&ca==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(M.x,M.y))),L=this.addText(M.x,M.y,S))}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 S=this.getPageLayout(),ca=this.getPageSize();L=Math.max(L,S.x*ca.width);M=
+Math.max(M,S.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(),S=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(S,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?
new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=
-function(){return!1};Graph.prototype.addText=function(z,L,M){var T=new mxCell;T.value="Text";T.geometry=new mxGeometry(0,0,0,0);T.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){T.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";T.geometry.relative=!0;T.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);T.geometry.x=Math.round(1E4*ca.x)/1E4;T.geometry.y=Math.round(ca.y);T.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,T.geometry);var ia=this.view.scale;
-T.geometry.offset=new mxPoint(Math.round((z-ca.x)/ia),Math.round((L-ca.y)/ia))}else ca=this.view.translate,T.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",T.geometry.width=40,T.geometry.height=20,T.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),T.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),T.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([T],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
-"cells",[T])),this.autoSizeCell(T)}finally{this.getModel().endUpdate()}return T};Graph.prototype.addClickHandler=function(z,L,M){var T=mxUtils.bind(this,function(){var ua=this.container.getElementsByTagName("a");if(null!=ua)for(var ya=0;ya<ua.length;ya++){var Fa=this.getAbsoluteUrl(ua[ya].getAttribute("href"));null!=Fa&&(ua[ya].setAttribute("rel",this.linkRelation),ua[ya].setAttribute("href",Fa),null!=L&&mxEvent.addGestureListeners(ua[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,T);
-T();var ca=this.container.style.cursor,ia=this.getTolerance(),ma=this,pa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ma,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ua){var ya=ua.sourceState;if(null==ya||null==ma.getLinkForCell(ya.cell))ua=ma.getCellAt(ua.getGraphX(),ua.getGraphY(),null,null,null,function(Fa,Ma,Oa){return null==ma.getLinkForCell(Fa.cell)}),ya=null==ya||ma.model.isAncestor(ua,
-ya.cell)?ma.view.getState(ua):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ua,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=ma.container.scrollLeft;this.scrollTop=ma.container.scrollTop;null==this.currentLink&&"auto"==ma.container.style.overflow&&(ma.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(ua,ya){if(ma.isMouseDown)null!=
-this.currentLink&&(ua=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(ua>ia||ya>ia)&&this.clear());else{for(ua=ya.getSource();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null!=ua?this.clear():(null!=ma.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&ma.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!ma.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&
-this.updateCurrentState(ya))}},mouseUp:function(ua,ya){var Fa=ya.getSource();for(ua=ya.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==Fa&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ia&&Math.abs(this.scrollTop-ma.container.scrollTop)<ia&&(null==ya.sourceState||!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(ua)||mxEvent.isMiddleMouseButton(ua))&&!mxEvent.isPopupTrigger(ua)||mxEvent.isTouchEvent(ua))&&(null!=this.currentLink?(Fa=ma.isBlankLink(this.currentLink),
-"data:"!==this.currentLink.substring(0,5)&&Fa||null==L||L(ua,this.currentLink),mxEvent.isConsumed(ua)||(ua=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ua)?"_blank":Fa?ma.linkTarget:"_top",ma.openLink(this.currentLink,ua),ya.consume())):null!=M&&!ya.isConsumed()&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ia&&Math.abs(this.scrollTop-ma.container.scrollTop)<ia&&Math.abs(this.startX-ya.getGraphX())<ia&&Math.abs(this.startY-ya.getGraphY())<ia&&M(ya.getEvent()));this.clear()},
-activate:function(ua){this.currentLink=ma.getAbsoluteUrl(ma.getLinkForCell(ua.cell));null!=this.currentLink&&(this.currentTarget=ma.getLinkTargetForCell(ua.cell),ma.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ua))},clear:function(){null!=ma.container&&(ma.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ma.tooltipHandler&&ma.tooltipHandler.hide()}};ma.click=function(ua){};ma.addMouseListener(pa);
-mxEvent.addListener(document,"mouseleave",function(ua){pa.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var T=this.getModel(),ca=this.gridSize,ia=[];T.beginUpdate();try{var ma={},pa=this.createCellLookup(z),ua=this.cloneCells(z,!1,ma,!0);for(M=0;M<z.length;M++){var ya=T.getParent(z[M]);if(null!=ya){var Fa=this.moveCells([ua[M]],
-ca,ca,!1)[0];ia.push(Fa);if(L)T.add(ya,ua[M]);else{var Ma=ya.getIndex(z[M]);T.add(ya,ua[M],Ma+1)}if(this.isTable(ya)){var Oa=this.getCellGeometry(ua[M]),Pa=this.getCellGeometry(ya);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.height+=Oa.height,T.setGeometry(ya,Pa))}}else ia.push(ua[M])}this.updateCustomLinks(this.createCellMapping(ma,pa),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
-this.cellEditor.textarea){for(var T=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ia=0;ia<T.length;ia++)ca.push(T[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=ca[ia-1]){z[ia].setAttribute("width",L);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
-else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),M=[],T=0;T<L.length;T++)M.push(L[T]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==M.length+1)for(T=L.length-1;0<=T;T--)if(L[T]!=M[T-1]){for(L=L[T].getElementsByTagName("a");0<L.length;){for(M=L[0].parentNode;null!=L[0].firstChild;)M.insertBefore(L[0].firstChild,L[0]);M.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};
-Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],T=null,ca=null,ia=0;ia<L.length;ia++)if(this.getModel().isVertex(L[ia])){var ma=this.view.getState(L[ia]);
-if(null!=ma){var pa=z?ma.getCenterX():ma.getCenterY();T=null!=T?Math.max(T,pa):pa;ca=null!=ca?Math.min(ca,pa):pa;M.push(ma)}}if(2<M.length){M.sort(function(Ma,Oa){return z?Ma.x-Oa.x:Ma.y-Oa.y});ma=this.view.translate;pa=this.view.scale;ca=ca/pa-(z?ma.x:ma.y);T=T/pa-(z?ma.x:ma.y);this.getModel().beginUpdate();try{var ua=(T-ca)/(M.length-1);T=ca;for(ia=1;ia<M.length-1;ia++){var ya=this.view.getState(this.model.getParent(M[ia].cell)),Fa=this.getCellGeometry(M[ia].cell);T+=ua;null!=Fa&&null!=ya&&(Fa=
-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"));
-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;
+function(){return!1};Graph.prototype.addText=function(z,L,M){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";S.geometry.relative=!0;S.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);S.geometry.x=Math.round(1E4*ca.x)/1E4;S.geometry.y=Math.round(ca.y);S.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,S.geometry);var fa=this.view.scale;
+S.geometry.offset=new mxPoint(Math.round((z-ca.x)/fa),Math.round((L-ca.y)/fa))}else ca=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),S.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
+"cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,L,M){var S=mxUtils.bind(this,function(){var pa=this.container.getElementsByTagName("a");if(null!=pa)for(var ya=0;ya<pa.length;ya++){var Fa=this.getAbsoluteUrl(pa[ya].getAttribute("href"));null!=Fa&&(pa[ya].setAttribute("rel",this.linkRelation),pa[ya].setAttribute("href",Fa),null!=L&&mxEvent.addGestureListeners(pa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,S);
+S();var ca=this.container.style.cursor,fa=this.getTolerance(),na=this,ra={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(pa){var ya=pa.sourceState;if(null==ya||null==na.getLinkForCell(ya.cell))pa=na.getCellAt(pa.getGraphX(),pa.getGraphY(),null,null,null,function(Fa,Na,Pa){return null==na.getLinkForCell(Fa.cell)}),ya=null==ya||na.model.isAncestor(pa,
+ya.cell)?na.view.getState(pa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(pa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=na.container.scrollLeft;this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(pa,ya){if(na.isMouseDown)null!=
+this.currentLink&&(pa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(pa>fa||ya>fa)&&this.clear());else{for(pa=ya.getSource();null!=pa&&"a"!=pa.nodeName.toLowerCase();)pa=pa.parentNode;null!=pa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&na.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!na.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&
+this.updateCurrentState(ya))}},mouseUp:function(pa,ya){var Fa=ya.getSource();for(pa=ya.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==Fa&&Math.abs(this.scrollLeft-na.container.scrollLeft)<fa&&Math.abs(this.scrollTop-na.container.scrollTop)<fa&&(null==ya.sourceState||!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(pa)||mxEvent.isMiddleMouseButton(pa))&&!mxEvent.isPopupTrigger(pa)||mxEvent.isTouchEvent(pa))&&(null!=this.currentLink?(Fa=na.isBlankLink(this.currentLink),
+"data:"!==this.currentLink.substring(0,5)&&Fa||null==L||L(pa,this.currentLink),mxEvent.isConsumed(pa)||(pa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(pa)?"_blank":Fa?na.linkTarget:"_top",na.openLink(this.currentLink,pa),ya.consume())):null!=M&&!ya.isConsumed()&&Math.abs(this.scrollLeft-na.container.scrollLeft)<fa&&Math.abs(this.scrollTop-na.container.scrollTop)<fa&&Math.abs(this.startX-ya.getGraphX())<fa&&Math.abs(this.startY-ya.getGraphY())<fa&&M(ya.getEvent()));this.clear()},
+activate:function(pa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(pa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(pa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(pa))},clear:function(){null!=na.container&&(na.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(pa){};na.addMouseListener(ra);
+mxEvent.addListener(document,"mouseleave",function(pa){ra.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var S=this.getModel(),ca=this.gridSize,fa=[];S.beginUpdate();try{var na={},ra=this.createCellLookup(z),pa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var ya=S.getParent(z[M]);if(null!=ya){var Fa=this.moveCells([pa[M]],
+ca,ca,!1)[0];fa.push(Fa);if(L)S.add(ya,pa[M]);else{var Na=ya.getIndex(z[M]);S.add(ya,pa[M],Na+1)}if(this.isTable(ya)){var Pa=this.getCellGeometry(pa[M]),Qa=this.getCellGeometry(ya);null!=Pa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Pa.height,S.setGeometry(ya,Qa))}}else fa.push(pa[M])}this.updateCustomLinks(this.createCellMapping(na,ra),pa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",pa))}finally{S.endUpdate()}return fa};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
+this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],fa=0;fa<S.length;fa++)ca.push(S[fa]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(fa=z.length-1;0<=fa;fa--)if(0==fa||z[fa]!=ca[fa-1]){z[fa].setAttribute("width",L);z[fa].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
+else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),M=[],S=0;S<L.length;S++)M.push(L[S]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==M.length+1)for(S=L.length-1;0<=S;S--)if(L[S]!=M[S-1]){for(L=L[S].getElementsByTagName("a");0<L.length;){for(M=L[0].parentNode;null!=L[0].firstChild;)M.insertBefore(L[0].firstChild,L[0]);M.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};
+Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],S=null,ca=null,fa=0;fa<L.length;fa++)if(this.getModel().isVertex(L[fa])){var na=this.view.getState(L[fa]);
+if(null!=na){var ra=z?na.getCenterX():na.getCenterY();S=null!=S?Math.max(S,ra):ra;ca=null!=ca?Math.min(ca,ra):ra;M.push(na)}}if(2<M.length){M.sort(function(Na,Pa){return z?Na.x-Pa.x:Na.y-Pa.y});na=this.view.translate;ra=this.view.scale;ca=ca/ra-(z?na.x:na.y);S=S/ra-(z?na.x:na.y);this.getModel().beginUpdate();try{var pa=(S-ca)/(M.length-1);S=ca;for(fa=1;fa<M.length-1;fa++){var ya=this.view.getState(this.model.getParent(M[fa].cell)),Fa=this.getCellGeometry(M[fa].cell);S+=pa;null!=Fa&&null!=ya&&(Fa=
+Fa.clone(),z?Fa.x=Math.round(S-Fa.width/2)-ya.origin.x:Fa.y=Math.round(S-Fa.height/2)-ya.origin.y,this.getModel().setGeometry(M[fa].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,S,ca,fa,na,ra,pa,ya,Fa,Na,Pa,Qa){var Ta=null;if(null!=Qa)for(Ta=new mxDictionary,Fa=0;Fa<Qa.length;Fa++)Ta.put(Qa[Fa],!0);if(Qa=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;fa=null!=fa?fa:!0;na=
+null!=na?na:!0;ya=null!=ya?ya:!1;var Ma="page"==Pa?this.view.getBackgroundPageBounds():fa&&null==Ta||S||"diagram"==Pa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ua=this.view.scale;"diagram"==Pa&&null!=this.backgroundImage&&(Ma=mxRectangle.fromRectangle(Ma),Ma.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*ua,(this.view.translate.y+this.backgroundImage.y)*ua,this.backgroundImage.width*ua,this.backgroundImage.height*ua)));if(null==Ma)throw Error(mxResources.get("drawingEmpty"));
+S=L/ua;Pa=ca?-.5:0;var za=Graph.createSvgNode(Pa,Pa,Math.max(1,Math.ceil(Ma.width*S)+2*M)+(ya&&0==M?5:0),Math.max(1,Math.ceil(Ma.height*S)+2*M)+(ya&&0==M?5:0),z),Ia=za.ownerDocument,Da=null!=Ia.createElementNS?Ia.createElementNS(mxConstants.NS_SVG,"g"):Ia.createElement("g");za.appendChild(Da);var La=this.createSvgCanvas(Da);La.foOffset=ca?-.5:0;La.textOffset=ca?-.5:0;La.imageOffset=ca?-.5:0;La.translate(Math.floor(M/L-Ma.x/ua),Math.floor(M/L-Ma.y/ua));var db=document.createElement("div"),ab=La.getAlternateText;
+La.getAlternateText=function(cb,hb,lb,rb,vb,ob,Ab,Bb,ub,kb,gb,mb,wb){if(null!=ob&&0<this.state.fontSize)try{mxUtils.isNode(ob)?ob=ob.innerText:(db.innerHTML=ob,ob=mxUtils.extractTextWithWhitespace(db.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 ab.apply(this,
+arguments)}else return ab.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=ua/L;var ib=this.view.translate;Pa=new mxRectangle((fb.x+ib.x)*z,(fb.y+ib.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ma,Pa)&&La.image(fb.x+ib.x,fb.y+ib.y,fb.width,fb.height,fb.src,!0)}La.scale(S);La.textEnabled=na;ra=null!=ra?ra:this.createSvgImageExport();var tb=ra.drawCellState,qb=ra.getLinkForCellState;ra.getLinkForCellState=function(cb,hb){var lb=qb.apply(this,arguments);return null==lb||cb.view.graph.isCustomLink(lb)?
+null:lb};ra.getLinkTargetForCellState=function(cb,hb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ra.drawCellState=function(cb,hb){for(var lb=cb.view.graph,rb=null!=Ta?Ta.get(cb.cell):lb.isCellSelected(cb.cell),vb=lb.model.getParent(cb.cell);!(fa&&null==Ta||rb)&&null!=vb;)rb=null!=Ta?Ta.get(vb):lb.isCellSelected(vb),vb=lb.model.getParent(vb);(fa&&null==Ta||rb)&&tb.apply(this,arguments)};ra.drawState(this.getView().getState(this.model.root),La);this.updateSvgLinks(za,pa,!0);this.addForeignObjectWarning(La,
+za);return za}finally{Qa&&(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"),S=z.createElement("g");S.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(S);ca.appendChild(z);
+M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var S=0;S<z.length;S++)if(null==z[S].getAttribute("target")){var ca=z[S].getAttribute("href");null==ca&&(ca=z[S].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[S].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[S].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=
+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 S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var ca=0;ca<S.points.length;ca++)L?S.points[ca].x=M+(M-S.points[ca].x):S.points[ca].y=M+(M-S.points[ca].y);ca=function(fa){null!=fa&&(L?fa.x=
+M+(M-fa.x):fa.y=M+(M-fa.y))};ca(S.getTerminalPoint(!0));ca(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),ca=0;ca<S;ca++){var fa=this.model.getChildAt(z,ca);if(this.model.isEdge(fa))this.flipEdgePoints(fa,L,M);else{var na=this.getCellGeometry(fa);null!=na&&(na=na.clone(),L?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(fa,na))}}}finally{this.model.endUpdate()}};
+Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var ca=this.view.getState(z[S]);null!=ca&&this.flipEdgePoints(z[S],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 fa=this.getCellGeometry(z[S]);null!=fa&&this.flipChildren(z[S],L,L?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);M.push(z[S])}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 S=0;S<z.length;S++){var ca=this.model.getParent(z[S]);if(this.isTable(ca)){var fa=this.getCellGeometry(z[S]),na=this.getCellGeometry(ca);null!=fa&&null!=na&&(na=na.clone(),na.height-=fa.height,this.model.setGeometry(ca,na))}}var ra=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
+L)}finally{this.model.endUpdate()}if(null!=ra)for(M=[],S=0;S<ra.length;S++)this.model.contains(ra[S])&&(this.model.isVertex(ra[S])||this.model.isEdge(ra[S]))&&M.push(ra[S])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=0;if(this.isTableCell(z)){var fa=M.getParent(z);S=M.getParent(fa);ca=mxUtils.indexOf(M.getChildCells(fa,!0),z)}else this.isTableRow(z)?S=M.getParent(z):z=M.getChildCells(S,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
+var na=M.getChildCells(S,!0),ra=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var pa=M.getChildCells(na[z],!0)[ca],ya=M.cloneCell(pa,!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);ra=Fa.width;var Na=this.getCellGeometry(na[z]);null!=Na&&(Fa.height=Na.height)}M.add(na[z],ya,ca+(L?
+0:1))}var Pa=this.getCellGeometry(S);null!=Pa&&(Pa=Pa.clone(),Pa.width+=ra,M.setGeometry(S,Pa))}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 S=L.getChildCells(M,!0);0==S.length?L.remove(M):(M==z&&(z=S[S.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=null;if("stackLayout"==
+this.getCurrentCellStyle(z).childLayout){S=z;var ca=M.getChildCells(S,!0);z=ca[L?0:ca.length-1]}else S=M.getParent(z);var fa=S.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(S,z,fa+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),S=M.getParent(ca);else if(this.isTableRow(z))S=M.getParent(z);else{var fa=M.getChildCells(S,!0);ca=fa[L?0:fa.length-1]}var na=M.getChildCells(ca,
+!0),ra=S.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var pa=this.getCellGeometry(ca);if(null!=pa){for(fa=0;fa<na.length;fa++){z=M.cloneCell(na[fa],!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=pa.height);ca.insert(z)}M.add(S,ca,ra+(L?0:1));var Fa=this.getCellGeometry(S);
+null!=Fa&&(Fa=Fa.clone(),Fa.height+=pa.height,M.setGeometry(S,Fa))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(S=L.getParent(z));this.isTableRow(S)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(S)||(S=ca[0]);var fa=L.getChildCells(S,!0);if(1>=fa.length)L.remove(M);else{var na=fa.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(fa,z));for(S=z=0;S<
+ca.length;S++){var ra=L.getChildCells(ca[S],!0)[na];L.remove(ra);var pa=this.getCellGeometry(ra);null!=pa&&(z=Math.max(z,pa.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,S=z;this.isTableCell(z)&&(z=S=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(S)||
+(S=ca[ca.length-1]);L.remove(S);z=0;var fa=this.getCellGeometry(S);null!=fa&&(z=fa.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,L.setGeometry(M,na))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],S=M.rows[0].cells,ca=z=0;ca<S.length;ca++){var fa=S[ca].getAttribute("colspan");z+=null!=fa?parseInt(fa):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 S=0;S<M.rows.length;S++){var ca=document.createElement("th");M.rows[S].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)S=z.rows[M].insertCell(L),mxUtils.br(S);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 S;S=M.firstChild;)lastNode=z.appendChild(S);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,fa){ca.length>fa&&(ca=ca.substring(0,Math.round(fa/2))+"..."+ca.substring(ca.length-Math.round(fa/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 S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(z));S.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,M(L,40));this.isCustomLink(z)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));
+return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(fa){fa=z.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&null==fa.getState()){var na=this.getCellAt(fa.graphX,fa.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,fa.graphX,fa.graphY)||
+(fa.state=this.view.getState(na),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var L=!1,M=!1,S=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(fa,na,ra){fa==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),L=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
+mxUtils.bind(this,function(fa,na){var ra=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ra&&(M&&null==na.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(na.getCell())));ra=!L||ra?null:mxUtils.bind(this,function(pa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+
+ya.x+1,na.getY()+ya.y+1,pa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,na,ra])})};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),S="\t";if(null!=z)for(S="";0<z;)S+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(S));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 S=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):S=!1});S&&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,S=z.rangeCount;M<S;++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(S){}};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=
+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 S=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=S&&S.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,fa){fa.originalNode=ca;ca=ca.firstChild;for(var na=fa.firstChild;null!=ca&&null!=na;)L(ca,na),ca=ca.nextSibling,na=na.nextSibling;return fa}function M(ca,fa){if(null!=ca)if(fa.originalNode!=ca)S(ca);else for(ca=ca.firstChild,fa=fa.firstChild;null!=ca;){var na=ca.nextSibling;null==fa?S(ca):(M(ca,fa),
+fa=fa.nextSibling);ca=na}}function S(ca){for(var fa=ca.firstChild;null!=fa;){var na=fa.nextSibling;S(fa);fa=na}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 fa=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,fa):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){ra=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ra.length&&"\n"==ra.charAt(ra.length-1)&&(ra=ra.substring(0,ra.length-1));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"<br/>"):ra,!0);this.textarea.className="mxCellEditor geContentEditable";pa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=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,fa=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(pa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=
+L;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=ra&&(this.textarea.innerHTML=ra,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 ra=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ra=mxUtils.replaceTrailingNewlines(ra,
+"<div><br></div>"));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ra,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var pa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(pa)+"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!=ra&&(this.textarea.innerHTML=ra);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 S=null!=z.text?z.text.margin:null;null==S&&(S=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+=S.x*this.bounds.width;this.bounds.y+=S.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);
@@ -2593,31 +2594,31 @@ try{Y.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.g
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=
+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 S=this.graph.model.getParent(z),ca=null!=S?this.graph.getCellGeometry(S):
+null;if(null!=ca&&(M=this.graph.getCellStyle(S),"stackLayout"==M.childLayout)){var fa=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(S);ca=ca.clone();M?ca.height=L.height+na.y+na.height+2*fa:ca.width=L.width+na.x+na.width+2*fa;this.graph.model.setGeometry(S,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
+function(){function z(ra){M.get(ra)||(M.put(ra,!0),ca.push(ra))}for(var L=O.apply(this,arguments),M=new mxDictionary,S=this.graph.model,ca=[],fa=0;fa<L.length;fa++){var na=L[fa];this.graph.isTableCell(na)?z(S.getParent(S.getParent(na))):this.graph.isTableRow(na)&&z(S.getParent(na));z(na)}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=
+var V=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,Ma,ua){for(var za=[],Ia=0;Ia<Ta.length;Ia++){var Da=Ta[Ia];za.push(null==Da?null:new mxPoint((pa+Da.x+Ma)*fa,(ya+Da.y+ua)*fa))}return za},M=this,S=this.graph,ca=S.model,fa=S.view.scale,na=this.state,ra=this.selectionBorder,pa=this.state.origin.x+
+S.view.translate.x,ya=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Fa=S.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ca.getChildCells(Fa[0].cell,!0),Pa=S.getTableLines(this.state.cell,!1,!0),Qa=S.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this,function(Ta){var Ma=Fa[Ta],ua=Ta<Fa.length-1?Fa[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua.cell):null;var za=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=
+Qa[Ta]?new V(Qa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"row-resize",null,ua);Ma.tableHandle=!0;var Ia=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ia?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Qa[Ta],0,Ia),this.shape.updateBoundsFromLine();else{var La=S.getActualStartSize(na.cell,
+!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ia*fa;this.shape.bounds.x=na.x+(Ta==Fa.length-1?0:La.x*fa);this.shape.bounds.width=na.width-(Ta==Fa.length-1?0:La.width+La.x+fa)}this.shape.redraw()}};var Da=!1;Ma.setPosition=function(La,db,ab){Ia=Math.max(Graph.minTableRowHeight-La.height,db.y-La.y-La.height);Da=mxEvent.isShiftDown(ab.getEvent());null!=za&&Da&&(Ia=Math.min(Ia,za.height-Graph.minTableRowHeight))};Ma.execute=function(La){if(0!=Ia)S.setTableRowHeight(this.state.cell,
+Ia,!Da);else if(!M.blockDelayedSelection){var db=S.getCellAt(La.getGraphX(),La.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(db,La)}Ia=0};Ma.reset=function(){Ia=0};z.push(Ma)})(ca);for(ca=0;ca<Na.length;ca++)mxUtils.bind(this,function(Ta){var Ma=S.view.getState(Na[Ta]),ua=S.getCellGeometry(Na[Ta]),za=null!=ua.alternateBounds?ua.alternateBounds:ua;null==Ma&&(Ma=new mxCellState(S.view,Na[Ta],S.getCellStyle(Na[Ta])),Ma.x=na.x+ua.x*fa,Ma.y=na.y+ua.y*fa,Ma.width=za.width*fa,Ma.height=za.height*
+fa,Ma.updateCachedBounds());ua=Ta<Na.length-1?Na[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua):null;var Ia=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Pa[Ta]?new V(Pa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"col-resize",null,ua);Ma.tableHandle=!0;var Da=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==Da?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Ta],Da,0),this.shape.updateBoundsFromLine();else{var db=S.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(za.width+Da)*fa;this.shape.bounds.y=na.y+(Ta==Na.length-1?0:db.y*fa);this.shape.bounds.height=na.height-(Ta==Na.length-1?0:(db.height+db.y)*fa)}this.shape.redraw()}};var La=!1;Ma.setPosition=function(db,ab,fb){Da=Math.max(Graph.minTableColumnWidth-za.width,ab.x-db.x-za.width);
+La=mxEvent.isShiftDown(fb.getEvent());null==Ia||La||(Da=Math.min(Da,Ia.width-Graph.minTableColumnWidth))};Ma.execute=function(db){if(0!=Da)S.setTableColumnWidth(this.state.cell,Da,La);else if(!M.blockDelayedSelection){var ab=S.getCellAt(db.getGraphX(),db.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(ab,db)}Da=0};Ma.positionChanged=function(){};Ma.reset=function(){Da=0};z.push(Ma)})(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)||
+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 S=mxUtils.createImage(Editor.rowMoveImage);S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=M;mxEvent.addGestureListeners(S,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));
+this.moveHandles.push(S);this.graph.container.appendChild(S)}})(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 ha=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 S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var ca=this.customHandles[S].shape.bounds,fa=ca.getCenterX(),na=ca.getCenterY();if(Math.abs(this.state.x-fa)<ca.width/2||Math.abs(this.state.y-
+na)<ca.height/2||Math.abs(this.state.x+this.state.width-fa)<ca.width/2||Math.abs(this.state.y+this.state.height-na)<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=ha.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+
+"none")};var sa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){sa.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,S=this.graph.view.scale,ca=this.roundLength(L.x/S-M.x);M=this.roundLength(L.y/S-M.y);S=this.graph.view.unit;this.hint.innerHTML=
+e(ca,S)+", "+e(M,S);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"/>');
@@ -2630,367 +2631,368 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(z,L){u.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,T=null,ca=null,ia=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(T=this.first.x,ca=this.first.y,z=(this.currentX-T)/this.graph.view.scale,ia=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var ma=this.graph.getCellsBeyond(T,ca,this.graph.getDefaultParent(),
-!0,!0);for(M=0;M<ma.length;M++)if(this.graph.isCellMovable(ma[M])){var pa=this.graph.view.getState(ma[M]),ua=this.graph.getCellGeometry(ma[M]);null!=pa&&null!=ua&&(ua=ua.clone(),ua.translate(z,ia),this.graph.model.setGeometry(ma[M],ua))}}finally{this.graph.model.endUpdate()}}else ma=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ma,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var T=this.first.x-z,ca=this.first.y-M,ia=this.graph.tolerance;if(null!=this.div||Math.abs(T)>ia||Math.abs(ca)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,T=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/T)*T,this.height=this.graph.snap(this.height/T)*T,
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,S=null,ca=null,fa=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,ca=this.first.y,z=(this.currentX-S)/this.graph.view.scale,fa=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(S,ca,this.graph.getDefaultParent(),
+!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var ra=this.graph.view.getState(na[M]),pa=this.graph.getCellGeometry(na[M]);null!=ra&&null!=pa&&(pa=pa.clone(),pa.translate(z,fa),this.graph.model.setGeometry(na[M],pa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var S=this.first.x-z,ca=this.first.y-M,fa=this.graph.tolerance;if(null!=this.div||Math.abs(S)>fa||Math.abs(ca)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,
this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=M-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?
"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle=
-"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var N=(new Date).getTime(),W=0,S=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,T){S.apply(this,arguments);M!=this.currentTerminalState?
-(N=(new Date).getTime(),W=0):W=(new Date).getTime()-N;this.currentTerminalState=M};var P=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&P.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,L,M){L=null!=z&&0==z;var T=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,T,L):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=T?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
+"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var N=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,S){T.apply(this,arguments);M!=this.currentTerminalState?
+(N=(new Date).getTime(),W=0):W=(new Date).getTime()-N;this.currentTerminalState=M};var Q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,L,M){L=null!=z&&0==z;var S=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,S,L):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=S?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,M){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Z.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),T=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=T&&T.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return oa.apply(this,arguments)};var va=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=va.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Aa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),T=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=T&&T.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Aa.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),T=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(T)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&sa.apply(this,
+return Z.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=S&&S.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return oa.apply(this,arguments)};var wa=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=wa.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Aa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Aa.apply(this,arguments)};var ta=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),S=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(S)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ta.apply(this,
arguments)};mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ba.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 ta=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){ta.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 Na=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Na.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var T=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(ca,ia){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));T()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,ia){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
+var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ba.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 va=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){va.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 Oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Oa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var S=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(ca,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);L=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(L,M);if(null!=L||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var M=document.createElement("img");M.setAttribute("src",Editor.editImage);M.setAttribute("title",
-mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ca){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ca)}));this.linkHint.appendChild(Graph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(ca){this.graph.setLinkForCell(this.state.cell,
-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 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":"");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 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,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 E(){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 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,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,
-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 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,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 Ea(){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),
-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 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,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/Ta);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Wa);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Wa)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ta));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Wa)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Wa)*l),c.lineTo(.5*l,(1-Wa)*l)):(c.translate((p-
-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Wa),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Wa)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);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(F,mxActor);F.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",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,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,
+mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var S=M.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=L)for(M=0;M<L.length;M++){var ca=document.createElement("div");ca.style.marginTop=null!=z||0<M?"6px":"0px";ca.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(ca)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};
+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(S,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 Sa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Sa.apply(this,arguments);this.constraintHandler.isEnabled=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":"");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 Va=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Va.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.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 P(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function la(){mxShape.call(this)}function sa(){mxEllipse.call(this)}
+function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function T(){mxShape.call(this)}function Q(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function va(){mxDoubleEllipse.call(this)}function Oa(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Sa(){mxActor.call(this)}function Ua(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Va(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function na(){mxEllipse.call(this)}
+function ra(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function Ma(){mxActor.call(this)}function ua(){mxActor.call(this)}function za(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 Ia(){mxConnector.call(this)}function Da(c,m,x,p,v,A,B,ia,K,xa){B+=K;var ma=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(ma.x-v-B,ma.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(),ia=this.getTitleSize();0==ia||this.outline?Pa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-x));A||this.outline||!(B&&ia<v||!B&&ia<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 ia=A;A=B;B=ia}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)))),ia=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!=ia&&(c.setFillAlpha(Math.abs(ia)),c.setFillColor(0>ia?"#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 La=Math.tan(mxUtils.toRadians(30)),db=(.5-La)/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/La);c.translate((p-m)/2,(v-m)/2+m/4);c.moveTo(0,.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",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+La));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((p-
+m)/2,(v-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(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),ia=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));ia||(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 fb=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)):fb.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 gb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){gb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+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 ab=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)):ab.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(ma){return"number"===
+typeof ma?ma?0>ma?-1:1:ma===ma?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),ia=this.defaultVariation;5>B&&(B=5,ia/=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)*ia;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 fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.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,l,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,
+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,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=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-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,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);
-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(Ua,mxRectangleShape);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isHtmlAllowed=function(){return!1};Ua.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",Ua);
-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(Va,mxActor);Va.prototype.dx=20;Va.prototype.dy=20;Va.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",Va);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(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",
+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)))),ia=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+ia),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(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.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};P.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 ia=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+$a,eb=this.style["symbol"+A+"ArcSpacing"];null!=eb&&(eb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=eb,jb+=eb);eb=m;var Ea=x;eb=ia==mxConstants.ALIGN_CENTER?eb+(p-xa)/2:ia==mxConstants.ALIGN_RIGHT?eb+(p-xa-$a):eb+$a;Ea=K==mxConstants.ALIGN_MIDDLE?Ea+(v-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ea+(v-ma-jb):Ea+jb;c.save();ia=new B;ia.style=this.style;B.prototype.paintVertexShape.call(ia,c,eb,Ea,xa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",P);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(ha,mxShape);ha.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",ha);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(sa,mxEllipse);sa.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",sa);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)))),ia=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,ia-1.5*A));c.lineTo(m+Math.max(0,B-A),x+ia);c.lineTo(m,x+ia);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+ia);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,ia=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)),ia=[new mxPoint(B,ia),new mxPoint(B+K,ia+v),new mxPoint(B+
+K,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,ia+xa),new mxPoint(B,ia+xa),new mxPoint(B+v,ia)]);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(ia,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,ia=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)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,ia+xa),new mxPoint(B,ia+xa),new mxPoint(B+
+v,ia)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,ia+xa),new mxPoint(B+v,ia+xa),new mxPoint(B,ia)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia+v),new mxPoint(B+K,ia),new mxPoint(B+K,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+
+K,ia+v),new mxPoint(B+K,ia+xa-v),new mxPoint(B,ia+xa),new mxPoint(B,ia)]);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(ia,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,
+ia=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,c),new mxPoint(B+K-v,ia+xa),new mxPoint(B,ia+xa),new mxPoint(B+v,c),new mxPoint(B,ia)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,c),new mxPoint(B+K,ia+xa),new mxPoint(B+v,ia+xa),new mxPoint(B,c),new mxPoint(B+v,ia)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia+v),new mxPoint(ma,ia),new mxPoint(B+K,ia+v),new mxPoint(B+K,ia+xa),new mxPoint(ma,ia+xa-v),new mxPoint(B,ia+xa),new mxPoint(B,ia+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(ma,ia+
+v),new mxPoint(B+K,ia),new mxPoint(B+K,ia+xa-v),new mxPoint(ma,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ia,ma,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,ia=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(ma,ia),new mxPoint(B+K,ia+v),new mxPoint(B+K,ia+xa-v),new mxPoint(ma,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia+v),new mxPoint(ma,ia)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,c),new mxPoint(B+K-v,ia+xa),new mxPoint(B+v,ia+xa),new mxPoint(B,c),new mxPoint(B+v,ia)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ia,ma,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(T,mxShape);T.prototype.size=10;T.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",T);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.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",Q);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(wa,mxCylinder);wa.prototype.jettyWidth=20;wa.prototype.jettyHeight=10;wa.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 ia=Math.min(m,v-m),K=Math.min(ia+2*m,v-m);A?(c.moveTo(x,ia),c.lineTo(B,ia),c.lineTo(B,ia+m),c.lineTo(x,ia+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,ia+m),c.lineTo(0,ia+m),c.lineTo(0,ia),c.lineTo(x,ia),c.close());c.end()};mxCellRenderer.registerShape("module",wa);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 ia=.3*v-m/2,K=.7*v-m/2;A?(c.moveTo(x,ia),c.lineTo(B,ia),c.lineTo(B,ia+m),c.lineTo(x,ia+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,ia+m),c.lineTo(0,ia+m),c.lineTo(0,ia),c.lineTo(x,ia),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,m,x,p,v){var A=p/2,B=v/2,ia=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,ia,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",ta);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(va,Ba);va.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",va);mxUtils.extend(Oa,mxArrowConnector);
+Oa.prototype.defaultWidth=4;Oa.prototype.isOpenEnded=function(){return!0};Oa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Oa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Oa);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(Sa,mxActor);Sa.prototype.size=30;Sa.prototype.isRoundable=function(){return!0};Sa.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",Sa);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(Za,
+mxActor);Za.prototype.arrowWidth=.3;Za.prototype.arrowSize=.2;Za.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",Za);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",Za.prototype.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.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(S,mxActor);S.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",S);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(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.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",fa);mxUtils.extend(na,mxEllipse);na.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",na);mxUtils.extend(ra,mxEllipse);ra.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",ra);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+.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",pa);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(Na,mxEllipse);Na.prototype.paintVertexShape=function(c,m,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ia=x+v-B/2;c.begin();c.moveTo(m,x);c.lineTo(m,x+v);c.moveTo(m+A,ia);c.lineTo(m+A+B,ia-B/2);c.moveTo(m+A,ia);c.lineTo(m+A+B,ia+B/2);c.moveTo(m+A,ia);c.lineTo(m+p-A,ia);c.moveTo(m+p,x);c.lineTo(m+p,x+v);c.moveTo(m+p-A,ia);c.lineTo(m+p-B-A,ia-B/2);c.moveTo(m+
+p-A,ia);c.lineTo(m+p-B-A,ia+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Na);mxUtils.extend(Pa,mxEllipse);Pa.prototype.drawHidden=!0;Pa.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 ia="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ia||xa||ma||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||ia?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||ma?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",Pa);mxUtils.extend(Qa,mxEllipse);Qa.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",Qa);mxUtils.extend(Ta,mxActor);Ta.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",Ta);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.2;Ma.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",Ma);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.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",ua);mxUtils.extend(za,
+mxActor);za.prototype.cst={RECT2:"mxgraph.basic.rect"};za.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(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};Da.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),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");
+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"}]}];za.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,
+x);this.strictDrawShape(c,0,0,p,v)};za.prototype.strictDrawShape=function(c,m,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ia=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),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),$a=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),eb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ha=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=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");
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=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,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,Xa,K,Ja),Ja&&A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
-l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,l,x,p,v,B,Xa,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,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,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,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,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,Za,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
-Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,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,l,x,p,v,B,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),A.lineNEInner(c,
-l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,
-K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,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,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,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,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
-K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,
-x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,
-l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,
-B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),
-A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),
-A.paintBottomInner(c,l,x,p,v,B,Ya,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,Za,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,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Xa,
-Ya,Za,K,Ga,Ja,Ia,Ha);c.stroke()};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.prototype.paintFolds=function(c,l,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,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;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,l,x])))};mxCellRenderer.registerShape("filledEdge",Ea);"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),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,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),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,l,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,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 hb=
-function(c,l,x){return lb(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})},lb=function(c,l,x,p,v){return eb(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 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(l){return[eb(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))})]}},vb=function(c){return function(l){return[eb(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)]}},ob=function(c,l,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",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}},Ab=function(c,l,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)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,l,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: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}},ub=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 eb(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=za.prototype;c.setDashed($a);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ia||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ia||(ma=Math.min(eb*Math.min(p,v)/100));ma=Math.min(ma,.5*Math.min(p,v)-K);(Ea||Ja||Ha||Ga)&&"frame"!=xa&&(c.begin(),Ea?A.moveNW(c,m,x,p,v,B,Ra,K,Ga):c.moveTo(0,0),Ea&&A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),Ja&&A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),Ha&&
+A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),Ga&&A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),$a=ia=Hb,"none"==Cb&&(ia=0),"none"==Db&&($a=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ia,$a),c.begin(),Ea?A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga):c.moveTo(ma,0),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),Ga&&Ha&&A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSEInner(c,
+m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),Ja&&Ea&&A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),Ea&&Ga&&A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,m,x,p,v,B,Ra,Wa,Xa,Ya,K,Ea,Ja,Ha,Ga),c.stroke()));Ea||Ja||Ha||!Ga?Ea||Ja||!Ha||Ga?!Ea&&!Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==
+xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),
+c.fillAndStroke()):Ea||!Ja||Ha||Ga?!Ea&&Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,
+K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,
+m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&
+Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea||Ja||Ha||Ga?
+Ea&&!Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,
+m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,
+K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,
+K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,
+x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,
+m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,
+m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,
+m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,
+v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ea&&Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,
+m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke()):
+Ea&&Ja&&Ha&&Ga&&("frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),c.close(),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,
+B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),
+A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),c.close(),A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,
+m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),
+A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,x,p,v,B,Ra,Wa,
+Xa,Ya,K,Ea,Ja,Ha,Ga);c.stroke()};za.prototype.moveNW=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ia)};za.prototype.moveNE=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ia,0)};za.prototype.moveSE=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ia)};za.prototype.moveSW=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+v):c.moveTo(ia,v)};za.prototype.paintNW=function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,ia,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ia,0);else c.lineTo(0,0)};za.prototype.paintTop=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ia,0)};za.prototype.paintNE=
+function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,p,ia)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ia);else c.lineTo(p,0)};za.prototype.paintRight=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ia)};za.prototype.paintLeft=function(c,m,x,p,v,A,B,ia,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ia)};za.prototype.paintSE=function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,p-ia,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ia,v);else c.lineTo(p,v)};za.prototype.paintBottom=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+v):c.lineTo(ia,v)};za.prototype.paintSW=function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,0,v-ia)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ia);else c.lineTo(0,v)};za.prototype.paintNWInner=function(c,m,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,K,.5*K+ia);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,K,K+ia);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ia);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ia,K+ia),c.lineTo(K,K+ia)};za.prototype.paintTopInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(0,K):xa&&!ma?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(ia+.5*K,K):c.lineTo(ia+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};za.prototype.paintNEInner=function(c,m,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,p-ia-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,p-ia-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ia-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ia-K,ia+K),c.lineTo(p-ia-K,K)};za.prototype.paintRightInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p-K,0):xa&&!ma?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,ia+.5*K):c.lineTo(p-K,ia+K):c.lineTo(p-K,0):c.lineTo(p,0)};za.prototype.paintLeftInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,v):xa&&!ma?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-ia-.5*K):c.lineTo(K,v-ia-K):
+c.lineTo(K,v):c.lineTo(0,v)};za.prototype.paintSEInner=function(c,m,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,p-K,v-ia-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,p-K,v-ia-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ia-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ia-K,v-ia-K),c.lineTo(p-K,v-ia-K)};za.prototype.paintBottomInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p,
+v-K):xa&&!ma?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-ia-.5*K,v-K):c.lineTo(p-ia-K,v-K):c.lineTo(p,v)};za.prototype.paintSWInner=function(c,m,x,p,v,A,B,ia,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(ia-.5*K,ia-.5*K,0,0,0,ia+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ia+K,ia+K,0,0,1,ia+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ia+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ia,v-ia-K),c.lineTo(K+ia,v-K)};za.prototype.moveSWInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ia-K):
+c.moveTo(0,v-K)};za.prototype.lineSWInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ia-K):c.lineTo(0,v-K)};za.prototype.moveSEInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ia-K):c.moveTo(p-K,v)};za.prototype.lineSEInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ia-K):
+c.lineTo(p-K,v)};za.prototype.moveNEInner=function(c,m,x,p,v,A,B,ia,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,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ia+K):c.moveTo(p,K)};za.prototype.lineNEInner=function(c,m,x,p,v,A,B,ia,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,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ia+K):c.lineTo(p,K)};za.prototype.moveNWInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.moveTo(K,0):xa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ia+K):c.moveTo(0,0)};za.prototype.lineNWInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,0):xa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ia+K):c.lineTo(0,0)};za.prototype.paintFolds=function(c,m,x,p,v,A,B,ia,K,xa,ma,$a,jb,eb,Ea){if("fold"==
+A||"fold"==B||"fold"==ia||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&$a&&Ea&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ia||"default"==ia&&"fold"==A)&&$a&&jb&&(c.moveTo(p-ma,0),c.lineTo(p-ma,ma),c.lineTo(p,ma)),("fold"==K||"default"==K&&"fold"==A)&&eb&&jb&&(c.moveTo(p-ma,v),c.lineTo(p-ma,v-ma),c.lineTo(p,v-ma)),("fold"==xa||"default"==xa&&"fold"==A)&&eb&&Ea&&(c.moveTo(0,v-ma),c.lineTo(ma,v-ma),c.lineTo(ma,v))};mxCellRenderer.registerShape(za.prototype.cst.RECT2,za);
+za.prototype.constraints=null;mxUtils.extend(Ia,mxConnector);Ia.prototype.origPaintEdgeShape=Ia.prototype.paintEdgeShape;Ia.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;Ia.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),Ia.prototype.origPaintEdgeShape.apply(this,
+[c,m,x])))};mxCellRenderer.registerShape("filledEdge",Ia);"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,ia,K,xa){var ma=v*(B+K+1),$a=A*(B+K+1);return function(){c.begin();
+c.moveTo(p.x-ma/2-$a/2,p.y-$a/2+ma/2);c.lineTo(p.x+$a/2-3*ma/2,p.y-3*$a/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,x,p,v,A,B,ia,K,xa){var ma=v*(B+K+1),$a=A*(B+K+1),jb=p.x+ma/2,eb=p.y+$a/2;p.x-=ma;p.y-=$a;return function(){c.begin();c.moveTo(jb-ma/2-$a/2,eb-$a/2+ma/2);c.lineTo(jb-ma/2+$a/2,eb-$a/2-ma/2);c.lineTo(jb+$a/2-3*ma/2,eb-3*$a/2-ma/2);c.lineTo(jb-$a/2-3*ma/2,eb-3*$a/2+ma/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,x,p,v,A,B,ia,K,
+xa){var ma=v*(B+K+1),$a=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-ma/2-$a/2,p.y-$a/2+ma/2);c.lineTo(p.x+$a/2-3*ma/2,p.y-3*$a/2-ma/2);c.moveTo(p.x-ma/2+$a/2,p.y-$a/2-ma/2);c.lineTo(p.x-$a/2-3*ma/2,p.y-3*$a/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(c,m,x,p,v,A,B,ia,K,xa){var ma=p.clone(),$a=Da.apply(this,arguments),jb=v*(B+2*K),eb=A*(B+2*K);return function(){$a.apply(this,arguments);c.begin();c.moveTo(ma.x-v*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+v*K,ma.y-2*eb+A*K);c.moveTo(ma.x-jb-eb+A*K,ma.y-eb+jb-v*K);c.lineTo(ma.x+eb-jb-A*K,ma.y-eb-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,x,p,v,A,B,ia,K,xa){var ma=v*(B+K+1),$a=A*(B+K+1),jb=p.clone();p.x-=ma;p.y-=$a;return function(){c.begin();c.moveTo(jb.x-$a,jb.y+ma);c.quadTo(p.x-$a,p.y+ma,p.x,p.y);c.quadTo(p.x+$a,p.y-ma,jb.x+$a,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,m,x,p,v,A,B,ia,K,xa){m=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var ma=p.clone();ma.x-=m;ma.y-=
+x;p.x+=-v-m;p.y+=-A-x;return function(){c.begin();c.moveTo(ma.x,ma.y);ia?c.lineTo(ma.x-v-A/2,ma.y-A+v/2):c.lineTo(ma.x+A/2-v,ma.y-A-v/2);c.lineTo(ma.x-v,ma.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,ia,K,xa,ma){A*=ia+xa;B*=ia+xa;var $a=v.clone();return function(){m.begin();m.moveTo($a.x,$a.y);K?m.lineTo($a.x-A-B/c,$a.y-B+A/c):m.lineTo($a.x+B/c-A,$a.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,ia){ia=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ia/2,B.y+A*p/4-v*ia/2)},function(p,v,A,B,ia,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},lb=function(c,m,x,p,v){return gb(c,m,function(A){var B=c.absolutePoints,ia=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ia];B=x?B[1]:B[ia-1];ia=B.x-xa.x;var ma=B.y-xa.y,$a=Math.sqrt(ia*ia+ma*ma);xa=
+p.call(this,$a,ia/$a,ma/$a,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ia){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var ma=c.view.scale,$a=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-$a.x;var jb=K.y-$a.y,eb=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;v.call(this,eb,xa/eb,jb/eb,$a,K,B,ia)})},rb=function(c){return function(m){return[gb(m,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Za.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.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[gb(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=[gb(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=[gb(A,["size"],function(ia){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(ia.x+Math.max(0,Math.min(.5*ia.width,xa*(K?1:ia.width))),ia.getCenterY())},function(ia,K,xa){ia=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ia.x:Math.max(0,Math.min(x,(K.x-ia.x)/ia.width));this.state.style.size=
+ia},!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=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ia=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ia*(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 gb(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))))})},eb=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[hb(c,!0,10),hb(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(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(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(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(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,
+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))))})},gb=function(c,m,x,p,v,A,B){var ia=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ia.execute=function(xa){for(var ma=0;ma<m.length;ma++)this.copyStyle(m[ma]);B&&B(xa)};ia.getPosition=x;ia.setPosition=p;ia.ignoreGrid=null!=v?v:!0;if(A){var K=ia.positionChanged;ia.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return ia},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,ia){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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]))<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,ia){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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]))<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,ia){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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]))<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,ia){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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(eb(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(gb(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:ub(),ext:ub(),rectangle:ub(),
-triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[eb(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[eb(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=[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)&&l.push(kb(c));return l},cross:function(c){return[eb(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[eb(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[eb(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=[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)&&l.push(kb(c));return l},dataStorage:function(c){return[eb(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=[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)&&l.push(kb(c));return l},internalStorage:function(c){var l=[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)&&l.push(kb(c));return l},module:function(c){return[eb(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[eb(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[eb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Va.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:rb(1),doubleArrow:rb(.5),folder:function(c){return[eb(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[eb(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[eb(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[eb(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:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[eb(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: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 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 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,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=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,l){if(l==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,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=[],ia=0;ia<A.length;ia++)A[ia]!=c.cell&&v.isSwimlane(A[ia])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ia]))==p&&B.push(A[ia]);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[gb(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[gb(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=[gb(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[gb(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",Ma.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[gb(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[gb(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=[gb(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Sa.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[gb(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=[gb(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),gb(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),gb(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=[gb(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[gb(c,["jettyWidth","jettyHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",wa.prototype.jettyWidth))),p=Math.max(0,Math.min(m.height,
+mxUtils.getValue(this.state.style,"jettyHeight",wa.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[gb(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[gb(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[gb(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[gb(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[gb(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[gb(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[gb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.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(ua.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=gb;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,ia=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==ia&&null!=m&&(ia=new mxPoint(m.getCenterX(),m.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=pb.x,xa=pb.y,ma=xb.x,$a=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ia){c=function(Ea,Ja,Ha){Ea-=eb.x;var Ga=Ja-eb.y;Ja=($a*Ea-ma*Ga)/(K*$a-xa*ma);Ea=(xa*Ea-K*Ga)/(xa*ma-K*$a);jb?(Ha&&(eb=new mxPoint(eb.x+K*Ja,eb.y+xa*Ja),v.push(eb)),eb=new mxPoint(eb.x+ma*Ea,eb.y+$a*Ea)):(Ha&&(eb=new mxPoint(eb.x+ma*Ea,eb.y+$a*Ea),v.push(eb)),
+eb=new mxPoint(eb.x+K*Ja,eb.y+xa*Ja));v.push(eb)};var eb=ia;null==p&&(p=new mxPoint(ia.x+(B.x-ia.x)/2,ia.y+(B.y-ia.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};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,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,
-.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),!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))];Pa.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,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;na.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;
+pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;ua.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};wa.prototype.getConstraints=function(c,m,x){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",wa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",wa.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;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ha.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)];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,
+.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)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];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;Va.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,
-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,
+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)];Za.prototype.getConstraints=
+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",Za.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.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};Ma.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,
+.9),!1)];S.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,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,m,[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,
-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=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
+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(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 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{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 F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(y.getRoot(),n.copiedValue);else for(m=0;m<F.length;m++)q(F[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+
+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,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,m,q){g=mxUtils.trim(g);if(0<g.length){var y=null,F=t.getLinkTitle(g);null!=m&&0<m.length&&(y=m[0].iconUrl,
-F=m[0].name||m[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));m=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=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=E;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"),
-F=0;F<y.length&&null==m;F++)y[F].textContent==g.textContent&&(m=y[F]);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=E;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 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,[m[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,[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=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=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,m,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,m,F);(m&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?t.updateLabelElements(F,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(m&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],
+"/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,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));m.addPointAt(m.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,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 F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=m&&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")+"):",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 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;")];
+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=E;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(F,C,H){k(g,F,C,H,t)}),n.showDialog(m.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"))})),
+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=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]};
+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;
@@ -2998,23 +3000,24 @@ 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(),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]),m=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",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(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: "+m+"\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=
+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 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),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf(".");E="xml";0<m&&(E=g.substring(m));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+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(g){var l=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+l+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==n?t(g):t(null)}),function(){})}else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown",f=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")";EditorUi.logError("Checksum Error in "+D+" "+f,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-"+f,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(g){}}}catch(g){}};
+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 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,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,m=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());m.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,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=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!=E.mathEnabled?
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var n=this.ui.editor.graph,D=n.getSelectionCells(),t=n.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,t,D);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)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+k()}catch(n){null!=e&&e(n)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(n){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(n.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(n.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
+DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var 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(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};
@@ -3061,7 +3064,7 @@ null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.i
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 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();
+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,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var t=this.isAutosaveRevision();
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};
@@ -3069,9 +3072,9 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,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 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 m=mxUtils.bind(this,
+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,m);this.removeDraft()}catch(G){m(G)}}),m)}),m)}),m):(this.inConflictState=!0,m())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;m(F)}))}),m)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,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";
+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"}},
@@ -3122,32 +3125,32 @@ isVisible:function(u,J){J=J.editorUi.editor.graph.model;return 0<u.vertices.leng
J.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,J){var N=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return J.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==N||N==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,J){return 0<u.vertices.length&&J.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 J=rough.canvas({getContext:function(){return u}});J.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var S=0;S<W.length;S++){var P=W[S];switch(P.type){case "path":null!=N.stroke&&this._drawToContext(u,P,N);break;case "fillPath":this._drawToContext(u,P,N);break;case "fillSketch":this.fillSketch(u,P,N)}}};J.fillSketch=function(N,W,S){var P=u.state.strokeColor,Z=u.state.strokeWidth,oa=u.state.strokeAlpha,va=u.state.dashed,Aa=S.fillWeight;
-0>Aa&&(Aa=S.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(S.fill||"");u.setStrokeWidth(Aa);u.setDashed(!1);this._drawToContext(N,W,S);u.setDashed(va);u.setStrokeWidth(Z);u.setStrokeColor(P);u.setStrokeAlpha(oa)};J._drawToContext=function(N,W,S){N.begin();for(var P=0;P<W.ops.length;P++){var Z=W.ops[P],oa=Z.data;switch(Z.op){case "move":N.moveTo(oa[0],oa[1]);break;case "bcurveTo":N.curveTo(oa[0],oa[1],oa[2],oa[3],oa[4],oa[5]);break;case "lineTo":N.lineTo(oa[0],oa[1])}}N.end();
-"fillPath"===W.type&&S.filled?N.fill():N.stroke()};return J};(function(){function u(P,Z,oa){this.canvas=P;this.rc=Z;this.shape=oa;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;
+Editor.createRoughCanvas=function(u){var J=rough.canvas({getContext:function(){return u}});J.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var Q=W[T];switch(Q.type){case "path":null!=N.stroke&&this._drawToContext(u,Q,N);break;case "fillPath":this._drawToContext(u,Q,N);break;case "fillSketch":this.fillSketch(u,Q,N)}}};J.fillSketch=function(N,W,T){var Q=u.state.strokeColor,Z=u.state.strokeWidth,oa=u.state.strokeAlpha,wa=u.state.dashed,Aa=T.fillWeight;
+0>Aa&&(Aa=T.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(T.fill||"");u.setStrokeWidth(Aa);u.setDashed(!1);this._drawToContext(N,W,T);u.setDashed(wa);u.setStrokeWidth(Z);u.setStrokeColor(Q);u.setStrokeAlpha(oa)};J._drawToContext=function(N,W,T){N.begin();for(var Q=0;Q<W.ops.length;Q++){var Z=W.ops[Q],oa=Z.data;switch(Z.op){case "move":N.moveTo(oa[0],oa[1]);break;case "bcurveTo":N.curveTo(oa[0],oa[1],oa[2],oa[3],oa[4],oa[5]);break;case "lineTo":N.lineTo(oa[0],oa[1])}}N.end();
+"fillPath"===W.type&&T.filled?N.fill():N.stroke()};return J};(function(){function u(Q,Z,oa){this.canvas=Q;this.rc=Z;this.shape=oa;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(P,Z){var oa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var Aa=0;Aa<va.length;Aa++)oa=(oa<<5)-oa+va.charCodeAt(Aa)<<0}oa={strokeWidth:this.canvas.state.strokeWidth,seed:oa,preserveVertices:!0};va=this.rc.getDefaultOptions();oa.stroke=P?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;P=null;(oa.filled=Z)?(oa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):oa.fill="";oa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);oa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);oa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
-oa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);oa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);oa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);oa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);oa.hachureGap="auto"==Z?-1:Z;oa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-Z);oa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);oa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);oa.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=oa.fill&&(null!=P||null!=Z&&oa.fill==Z)?"solid":va.fillStyle);oa.fillStyle=
-Z;return oa};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 P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=
-function(P,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,P,Z),this.lastX=P,this.lastY=Z)};u.prototype.moveTo=function(P,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,Z),this.lastX=P,this.lastY=Z,this.firstX=P,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(P,Z,oa,va){this.passThrough?this.originalQuadTo.apply(this.canvas,
-arguments):(this.addOp(this.quadOp,P,Z,oa,va),this.lastX=oa,this.lastY=va)};u.prototype.curveTo=function(P,Z,oa,va,Aa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,Z,oa,va,Aa,sa),this.lastX=Aa,this.lastY=sa)};u.prototype.arcTo=function(P,Z,oa,va,Aa,sa,Ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ta=mxUtils.arcToCurves(this.lastX,this.lastY,P,Z,oa,va,Aa,sa,Ba);if(null!=ta)for(var Na=0;Na<ta.length;Na+=6)this.curveTo(ta[Na],
-ta[Na+1],ta[Na+2],ta[Na+3],ta[Na+4],ta[Na+5]);this.lastX=sa;this.lastY=Ba}};u.prototype.rect=function(P,Z,oa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,Z,oa,va,this.getStyle(!0,!0)))};u.prototype.ellipse=function(P,Z,oa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+oa/2,Z+va/2,oa,va,this.getStyle(!0,!0)))};u.prototype.roundrect=function(P,
-Z,oa,va,Aa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(P+Aa,Z),this.lineTo(P+oa-Aa,Z),this.quadTo(P+oa,Z,P+oa,Z+sa),this.lineTo(P+oa,Z+va-sa),this.quadTo(P+oa,Z+va,P+oa-Aa,Z+va),this.lineTo(P+Aa,Z+va),this.quadTo(P,Z+va,P,Z+va-sa),this.lineTo(P,Z+sa),this.quadTo(P,Z,P+Aa,Z))};u.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(oa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in P)this.nextShape.options[Z]=
-P[Z];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};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?
+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,Z){var oa=1;if(null!=this.shape.state){var wa=this.shape.state.cell.id;if(null!=wa)for(var Aa=0;Aa<wa.length;Aa++)oa=(oa<<5)-oa+wa.charCodeAt(Aa)<<0}oa={strokeWidth:this.canvas.state.strokeWidth,seed:oa,preserveVertices:!0};wa=this.rc.getDefaultOptions();oa.stroke=Q?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(oa.filled=Z)?(oa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):oa.fill="";oa.bowing=mxUtils.getValue(this.shape.style,"bowing",wa.bowing);oa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",wa.hachureAngle);oa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",wa.curveFitting);
+oa.roughness=mxUtils.getValue(this.shape.style,"jiggle",wa.roughness);oa.simplification=mxUtils.getValue(this.shape.style,"simplification",wa.simplification);oa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",wa.disableMultiStroke);oa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",wa.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);oa.hachureGap="auto"==Z?-1:Z;oa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+Z);oa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);oa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);oa.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=oa.fill&&(null!=Q||null!=Z&&oa.fill==Z)?"solid":wa.fillStyle);oa.fillStyle=
+Z;return oa};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,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,Z),this.lastX=Q,this.lastY=Z)};u.prototype.moveTo=function(Q,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,Z),this.lastX=Q,this.lastY=Z,this.firstX=Q,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,Z,oa,wa){this.passThrough?this.originalQuadTo.apply(this.canvas,
+arguments):(this.addOp(this.quadOp,Q,Z,oa,wa),this.lastX=oa,this.lastY=wa)};u.prototype.curveTo=function(Q,Z,oa,wa,Aa,ta){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,Z,oa,wa,Aa,ta),this.lastX=Aa,this.lastY=ta)};u.prototype.arcTo=function(Q,Z,oa,wa,Aa,ta,Ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var va=mxUtils.arcToCurves(this.lastX,this.lastY,Q,Z,oa,wa,Aa,ta,Ba);if(null!=va)for(var Oa=0;Oa<va.length;Oa+=6)this.curveTo(va[Oa],
+va[Oa+1],va[Oa+2],va[Oa+3],va[Oa+4],va[Oa+5]);this.lastX=ta;this.lastY=Ba}};u.prototype.rect=function(Q,Z,oa,wa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,Z,oa,wa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,Z,oa,wa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+oa/2,Z+wa/2,oa,wa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,
+Z,oa,wa,Aa,ta){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+Aa,Z),this.lineTo(Q+oa-Aa,Z),this.quadTo(Q+oa,Z,Q+oa,Z+ta),this.lineTo(Q+oa,Z+wa-ta),this.quadTo(Q+oa,Z+wa,Q+oa-Aa,Z+wa),this.lineTo(Q+Aa,Z+wa),this.quadTo(Q,Z+wa,Q,Z+wa-ta),this.lineTo(Q,Z+ta),this.quadTo(Q,Z,Q+Aa,Z))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(oa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in Q)this.nextShape.options[Z]=
+Q[Z];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(P){return new u(P,Editor.createRoughCanvas(P),this)};var J=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?J.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,Z,oa,va,Aa){null!=P.handJiggle&&P.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var Z=P.addTolerance,oa=!0;null!=this.style&&(oa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==u&&!this.outline){P.save();
-var va=this.fill,Aa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,Ba=P.setStrokeColor;P.setStrokeColor=function(){};var ta=P.setFillColor;P.setFillColor=function(){};oa||null==va||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;W.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ta;P.setStrokeColor=Ba;this.configurePointerEvents=sa;this.stroke=Aa;this.fill=va;P.restore();oa&&null!=va&&(P.addTolerance=function(){})}W.apply(this,arguments);
-P.addTolerance=Z};var S=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,Z,oa,va,Aa,sa){null!=P.handJiggle&&P.handJiggle.constructor==u?(P.handJiggle.passThrough=!0,S.apply(this,arguments),P.handJiggle.passThrough=!1):S.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,J,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),S=[];if(null!=W&&0<W.length)for(var P=0;P<W.length;P++)if("mxgraph"==W[P].getAttribute("class")){S.push(W[P]);break}0<S.length&&(W=S[0].getAttribute("data-mxgraph"),null!=W?(S=JSON.parse(W),null!=S&&null!=S.xml&&(u=mxUtils.parseXml(S.xml),u=u.documentElement)):(S=S[0].getElementsByTagName("div"),0<S.length&&
-(W=mxUtils.getTextContent(S[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||J||(S=null,"diagram"==u.nodeName?S=u:"mxfile"==
-u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(S=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=S&&(u=Editor.parseDiagramNode(S,N)));null==u||"mxGraphModel"==u.nodeName||J&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,J){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,J),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
+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 J=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?J.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
+"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,Z,oa,wa,Aa){null!=Q.handJiggle&&Q.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var Z=Q.addTolerance,oa=!0;null!=this.style&&(oa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
+var wa=this.fill,Aa=this.stroke;this.stroke=this.fill=null;var ta=this.configurePointerEvents,Ba=Q.setStrokeColor;Q.setStrokeColor=function(){};var va=Q.setFillColor;Q.setFillColor=function(){};oa||null==wa||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;W.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=va;Q.setStrokeColor=Ba;this.configurePointerEvents=ta;this.stroke=Aa;this.fill=wa;Q.restore();oa&&null!=wa&&(Q.addTolerance=function(){})}W.apply(this,arguments);
+Q.addTolerance=Z};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,Z,oa,wa,Aa,ta){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,T.apply(this,arguments),Q.handJiggle.passThrough=!1):T.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,J,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var Q=0;Q<W.length;Q++)if("mxgraph"==W[Q].getAttribute("class")){T.push(W[Q]);break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(u=mxUtils.parseXml(T.xml),u=u.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
+(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||J||(T=null,"diagram"==u.nodeName?T=u:"mxfile"==
+u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(u=Editor.parseDiagramNode(T,N)));null==u||"mxGraphModel"==u.nodeName||J&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,J){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,J),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var J=mxUtils.getTextContent(u),N=null;0<J.length?N=Graph.decompress(J):null!=u.firstChild&&(N=mxUtils.getXml(u.firstChild));return N};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 J=u.indexOf("EmbeddedFile");if(-1<J){var N=u.indexOf("stream",J)+9;if(0<u.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile"))return J=
-u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,J)),{to:"string"})}return null}N=null;J="";for(var W=0,S=0,P=[],Z=null;S<u.length;){var oa=u.charCodeAt(S);S+=1;10!=oa&&(J+=String.fromCharCode(oa));oa=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var va=u.indexOf("%3C%2Fmxfile%3E)",S)+15;S-=9;if(va>S){N=u.substring(S,va);break}}10==oa&&("endobj"==J?Z=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(Z=[],P[J.split(" ")[0]]=Z):null!=Z&&
-Z.push(J),J="")}null==N&&(N=Editor.extractGraphModelFromXref(P));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var J=u.trailer,N=null;null!=J&&(J=/.* \/Info (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(J=u[J[1]],null!=J&&(J=/.* \/Subject (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(u=u[J[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
+u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,J)),{to:"string"})}return null}N=null;J="";for(var W=0,T=0,Q=[],Z=null;T<u.length;){var oa=u.charCodeAt(T);T+=1;10!=oa&&(J+=String.fromCharCode(oa));oa=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var wa=u.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(wa>T){N=u.substring(T,wa);break}}10==oa&&("endobj"==J?Z=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(Z=[],Q[J.split(" ")[0]]=Z):null!=Z&&
+Z.push(J),J="")}null==N&&(N=Editor.extractGraphModelFromXref(Q));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var J=u.trailer,N=null;null!=J&&(J=/.* \/Info (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(J=u[J[1]],null!=J&&(J=/.* \/Subject (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(u=u[J[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
J){var N=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(N=J||mxResources.get("invalidChars"),J=u[0].getElementsByTagName("div"),0<J.length&&(N=mxUtils.getTextContent(J[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(u,J){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=J))};Editor.configure=function(u,J){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!=
@@ -3159,52 +3162,52 @@ u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyl
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&&(N=parseInt(u.sidebarTitleSize),!isNaN(N)&&0<N?Sidebar.prototype.sidebarTitleSize=N: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&&(N=parseInt(u.autosaveDelay),!isNaN(N)&&0<N?DrawioFile.prototype.autosaveDelay=N:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!J)for(App.initPluginCallback(),J=0;J<u.plugins.length;J++)mxscript(u.plugins[J]);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 J=document.getElementsByTagName("script")[0];if(null!=J&&null!=J.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(u));
-J.parentNode.insertBefore(N,J);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var S=document.createElement("link");S.setAttribute("rel","preload");S.setAttribute("href",W);S.setAttribute("as","font");S.setAttribute("crossorigin","");J.parentNode.insertBefore(S,J)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
+J.parentNode.insertBefore(N,J);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");J.parentNode.insertBefore(T,J)}}}};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 J=[],N=0;N<u;N++)J.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return J.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 J=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(J)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[J]),Error(mxResources.get("notADiagramFile")+" ("+J+")");if("mxGraphModel"==u.nodeName){J=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=J&&""!=
J)J!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[J]:mxUtils.load(STYLE_PATH+"/"+J+".xml").getDocumentElement(),null!=N&&(W=new mxCodec(N.ownerDocument),W.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=N){var W=new mxCodec(N.ownerDocument);W.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=J;this.graph.mathEnabled="1"==urlParams.math||
"1"==u.getAttribute("math");J=u.getAttribute("backgroundImage");null!=J?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(J)):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(J=u.getAttribute("extFonts"))try{for(J=
-J.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}}),N=0;N<J.length;N++)this.graph.addExtFont(J[N].name,J[N].url)}catch(S){console.log("ExtFonts format error: "+S.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,J){u=null!=
-u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,J);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(S){return S.name+
-"^"+S.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var J=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=J&&(null!=J&&"<"!=J.charAt(0)&&"%"!=J.charAt(0)&&(J=unescape(window.atob?atob(J):Base64.decode(cont,J))),null!=J&&"%"==J.charAt(0)&&(J=decodeURIComponent(J)),null!=J&&0<J.length)){var N=mxUtils.parseXml(J).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
+J.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),N=0;N<J.length;N++)this.graph.addExtFont(J[N].name,J[N].url)}catch(T){console.log("ExtFonts format error: "+T.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,J){u=null!=
+u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,J);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+
+"^"+T.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var J=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=J&&(null!=J&&"<"!=J.charAt(0)&&"%"!=J.charAt(0)&&(J=unescape(window.atob?atob(J):Base64.decode(cont,J))),null!=J&&"%"==J.charAt(0)&&(J=decodeURIComponent(J)),null!=J&&0<J.length)){var N=mxUtils.parseXml(J).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
function(u,J,N){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;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();k.apply(this,arguments)};
var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.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,J){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(Z){window.setTimeout(function(){"hidden"!=Z.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,Z])},0)};var N=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";J=null!=J?J:{"HTML-CSS":{availableFonts:[N],imageFont:null},
SVG:{font:N,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(J);MathJax.Hub.Register.StartupHook("Begin",function(){for(var Z=0;Z<Editor.mathJaxQueue.length;Z++)Editor.doMathJaxRender(Editor.mathJaxQueue[Z])})}};Editor.MathJaxRender=function(Z){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(Z):Editor.mathJaxQueue.push(Z)};
-Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,oa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var S=document.createElement("script");S.setAttribute("type","text/javascript");S.setAttribute("src",
-u);N[0].parentNode.appendChild(S)}try{if(mxClient.IS_GC||mxClient.IS_SF){var P=document.createElement("style");P.type="text/css";P.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(P)}}catch(Z){}}};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 J=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,S,P){void 0!==W?J.push(W.replace(/\\'/g,"'")):void 0!==S?J.push(S.replace(/\\"/g,'"')):void 0!==P&&J.push(P);return""});/,\s*$/.test(u)&&J.push("");return J};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 J=u.convert,N=this;u.convert=function(W){if(null!=W){var S="http://"==W.substring(0,7)||"https://"==
-W.substring(0,8);S&&!navigator.onLine?W=Editor.svgBrokenImage.src:!S||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=J.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,J){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
-function(){N=!1;J(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(P){window.clearTimeout(W);N&&J(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)});else{var S=new Image;this.crossOriginImages&&(S.crossOrigin="anonymous");S.onload=function(){window.clearTimeout(W);if(N)try{var P=document.createElement("canvas"),Z=P.getContext("2d");P.height=S.height;P.width=S.width;Z.drawImage(S,0,0);
-J(P.toDataURL())}catch(oa){J(Editor.svgBrokenImage.src)}};S.onerror=function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)};S.src=u}}catch(P){J(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,J,N,W){null==W&&(W=this.createImageUrlConverter());var S=0,P=N||{};N=mxUtils.bind(this,function(Z,oa){Z=u.getElementsByTagName(Z);for(var va=0;va<Z.length;va++)mxUtils.bind(this,function(Aa){try{if(null!=Aa){var sa=W.convert(Aa.getAttribute(oa));if(null!=sa&&"data:"!=sa.substring(0,
-5)){var Ba=P[sa];null==Ba?(S++,this.convertImageToDataUri(sa,function(ta){null!=ta&&(P[sa]=ta,Aa.setAttribute(oa,ta));S--;0==S&&J(u)})):Aa.setAttribute(oa,Ba)}else null!=sa&&Aa.setAttribute(oa,sa)}}catch(ta){}})(Z[va])});N("image","xlink:href");N("img","src");0==S&&J(u)};Editor.base64Encode=function(u){for(var J="",N=0,W=u.length,S,P,Z;N<W;){S=u.charCodeAt(N++)&255;if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&
-3)<<4);J+="==";break}P=u.charCodeAt(N++);if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&3)<<4|(P&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);J+="=";break}Z=u.charCodeAt(N++);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&
-3)<<4|(P&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(Z&192)>>6);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return J};Editor.prototype.loadUrl=function(u,J,N,W,S,P,Z,oa){try{var va=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));S=null!=S?S:!0;var Aa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&
-299>=sa.getStatus()){if(null!=J){var Ba=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();Ba=Array(sa.length);for(var ta=0;ta<sa.length;ta++)Ba[ta]=String.fromCharCode(sa[ta]);Ba=Ba.join("")}P=null!=P?P:"data:image/png;base64,";Ba=P+Editor.base64Encode(Ba)}J(Ba)}}else null!=N&&(0==sa.getStatus()?N({message:mxResources.get("accessDenied")},sa):N({message:mxResources.get("error")+
-" "+sa.getStatus()},sa))}),function(sa){null!=N&&N({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){S&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Aa})},oa)});Aa()}catch(sa){null!=N&&N(sa)}};Editor.prototype.absoluteCssFonts=function(u){var J=null;if(null!=u){var N=u.split("url(");if(0<N.length){J=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var S=null;null!=W&&0<W.length&&
-(S=W[0].getAttribute("href"));for(var P=1;P<N.length;P++)if(W=N[P].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[P].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=S?S+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);J.push('url("'+Z+'"'+N[P].substring(W))}else J.push(N[P])}else J=[u]}return null!=J?J.join(""):null};Editor.prototype.mapFontUrl=function(u,J,N){/^https?:\/\//.test(J)&&!this.isCorsEnabledForUrl(J)&&(J=PROXY_URL+"?url="+encodeURIComponent(J));N(u,
-J)};Editor.prototype.embedCssFonts=function(u,J){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var S=mxUtils.bind(this,function(){if(0==W){for(var va=[N[0]],Aa=1;Aa<N.length;Aa++){var sa=N[Aa].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(N[Aa].substring(0,sa))]);va.push('"'+N[Aa].substring(sa))}J(va.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var P=N[u].indexOf(")"),Z=null,oa=N[u].indexOf("format(",P);0<oa&&(Z=Editor.trimCssUrl(N[u].substring(oa+
-7,N[u].indexOf(")",oa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;W++;var Aa="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(va))Aa="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(va))Aa="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(va))Aa="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(va))Aa="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(va))Aa=
-"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(va))Aa="application/font-sfnt";this.mapFontUrl(Aa,va,mxUtils.bind(this,function(sa,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(ta){this.cachedFonts[va]=ta;W--;S()}),mxUtils.bind(this,function(ta){W--;S()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,P)),Z)}S()}else J(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
-mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},J;for(J in Graph.fontMapping)Graph.isCssFontUrl(J)&&(u[J]=Graph.fontMapping[J]);return u};Editor.prototype.embedExtFonts=function(u){var J=this.graph.getCustomFonts();if(0<J.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var S=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),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");
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,oa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",
+u);N[0].parentNode.appendChild(T)}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(Z){}}};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 J=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,T,Q){void 0!==W?J.push(W.replace(/\\'/g,"'")):void 0!==T?J.push(T.replace(/\\"/g,'"')):void 0!==Q&&J.push(Q);return""});/,\s*$/.test(u)&&J.push("");return J};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 J=u.convert,N=this;u.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==
+W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=J.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,J){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
+function(){N=!1;J(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(W);N&&J(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(N)try{var Q=document.createElement("canvas"),Z=Q.getContext("2d");Q.height=T.height;Q.width=T.width;Z.drawImage(T,0,0);
+J(Q.toDataURL())}catch(oa){J(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)};T.src=u}}catch(Q){J(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,J,N,W){null==W&&(W=this.createImageUrlConverter());var T=0,Q=N||{};N=mxUtils.bind(this,function(Z,oa){Z=u.getElementsByTagName(Z);for(var wa=0;wa<Z.length;wa++)mxUtils.bind(this,function(Aa){try{if(null!=Aa){var ta=W.convert(Aa.getAttribute(oa));if(null!=ta&&"data:"!=ta.substring(0,
+5)){var Ba=Q[ta];null==Ba?(T++,this.convertImageToDataUri(ta,function(va){null!=va&&(Q[ta]=va,Aa.setAttribute(oa,va));T--;0==T&&J(u)})):Aa.setAttribute(oa,Ba)}else null!=ta&&Aa.setAttribute(oa,ta)}}catch(va){}})(Z[wa])});N("image","xlink:href");N("img","src");0==T&&J(u)};Editor.base64Encode=function(u){for(var J="",N=0,W=u.length,T,Q,Z;N<W;){T=u.charCodeAt(N++)&255;if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4);J+="==";break}Q=u.charCodeAt(N++);if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);J+="=";break}Z=u.charCodeAt(N++);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(Z&192)>>6);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return J};Editor.prototype.loadUrl=function(u,J,N,W,T,Q,Z,oa){try{var wa=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));T=null!=T?T:!0;var Aa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ta){if(200<=ta.getStatus()&&
+299>=ta.getStatus()){if(null!=J){var Ba=ta.getText();if(wa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ta=mxUtilsBinaryToArray(ta.request.responseBody).toArray();Ba=Array(ta.length);for(var va=0;va<ta.length;va++)Ba[va]=String.fromCharCode(ta[va]);Ba=Ba.join("")}Q=null!=Q?Q:"data:image/png;base64,";Ba=Q+Editor.base64Encode(Ba)}J(Ba)}}else null!=N&&(0==ta.getStatus()?N({message:mxResources.get("accessDenied")},ta):N({message:mxResources.get("error")+
+" "+ta.getStatus()},ta))}),function(ta){null!=N&&N({message:mxResources.get("error")+" "+ta.getStatus()})},wa,this.timeout,function(){T&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Aa})},oa)});Aa()}catch(ta){null!=N&&N(ta)}};Editor.prototype.absoluteCssFonts=function(u){var J=null;if(null!=u){var N=u.split("url(");if(0<N.length){J=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&
+(T=W[0].getAttribute("href"));for(var Q=1;Q<N.length;Q++)if(W=N[Q].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[Q].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=T?T+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);J.push('url("'+Z+'"'+N[Q].substring(W))}else J.push(N[Q])}else J=[u]}return null!=J?J.join(""):null};Editor.prototype.mapFontUrl=function(u,J,N){/^https?:\/\//.test(J)&&!this.isCorsEnabledForUrl(J)&&(J=PROXY_URL+"?url="+encodeURIComponent(J));N(u,
+J)};Editor.prototype.embedCssFonts=function(u,J){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var wa=[N[0]],Aa=1;Aa<N.length;Aa++){var ta=N[Aa].indexOf(")");wa.push('url("');wa.push(this.cachedFonts[Editor.trimCssUrl(N[Aa].substring(0,ta))]);wa.push('"'+N[Aa].substring(ta))}J(wa.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var Q=N[u].indexOf(")"),Z=null,oa=N[u].indexOf("format(",Q);0<oa&&(Z=Editor.trimCssUrl(N[u].substring(oa+
+7,N[u].indexOf(")",oa))));mxUtils.bind(this,function(wa){if(null==this.cachedFonts[wa]){this.cachedFonts[wa]=wa;W++;var Aa="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(wa))Aa="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(wa))Aa="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(wa))Aa="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(wa))Aa="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(wa))Aa=
+"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(wa))Aa="application/font-sfnt";this.mapFontUrl(Aa,wa,mxUtils.bind(this,function(ta,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(va){this.cachedFonts[wa]=va;W--;T()}),mxUtils.bind(this,function(va){W--;T()}),!0,null,"data:"+ta+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,Q)),Z)}T()}else J(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},J;for(J in Graph.fontMapping)Graph.isCssFontUrl(J)&&(u[J]=Graph.fontMapping[J]);return u};Editor.prototype.embedExtFonts=function(u){var J=this.graph.getCustomFonts();if(0<J.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),u)}),
+Q=0;Q<J.length;Q++)mxUtils.bind(this,function(Z,oa){Graph.isCssFontUrl(oa)?null==this.cachedGoogleFonts[oa]?(W++,this.loadUrl(oa,mxUtils.bind(this,function(wa){this.cachedGoogleFonts[oa]=wa;N.push(wa+"\n");W--;T()}),mxUtils.bind(this,function(wa){W--;N.push("@import url("+oa+");\n");T()}))):N.push(this.cachedGoogleFonts[oa]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+oa+'")}\n')})(J[Q].name,J[Q].url);T()}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,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=
+W,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa,Ca,Sa,Ua,Ka){try{Q=null!=Q?Q:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;va=null!=va?va:0;var bb=wa?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==wa&&(bb=Sa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,va,Oa,null,Z,null,null,null,Aa,null,Sa,Ua,Ka),mxUtils.bind(this,function(Va){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){fa.drawImage(Za,
+0,0);u(M,Va)},0):(fa.drawImage(Za,0,0),u(M,Va))},M=document.createElement("canvas"),S=parseInt(Va.getAttribute("width")),ca=parseInt(Va.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=Q?Math.min(1,Math.min(3*J/(4*ca),J/S)):J/S);oa=this.getMaxCanvasScale(S,ca,oa);S=Math.ceil(oa*S);ca=Math.ceil(oa*ca);M.setAttribute("width",S);M.setAttribute("height",ca);var fa=M.getContext("2d");null!=bb&&(fa.beginPath(),fa.rect(0,0,S,ca),fa.fillStyle=bb,fa.fill());1!=oa&&fa.scale(oa,oa);if(Ca){var na=Ba.view,
+ra=na.scale;na.scale=1;var pa=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=ra;pa="data:image/svg+xml;base64,"+pa;var ya=Ba.gridSize*na.gridSteps*oa,Fa=Ba.getGraphBounds(),Na=na.translate.x*ra,Pa=na.translate.y*ra,Qa=Na+(Fa.x-Na)/ra-va,Ta=Pa+(Fa.y-Pa)/ra-va,Ma=new Image;Ma.onload=function(){try{for(var ua=-Math.round(ya-mxUtils.mod((Na-Qa)*oa,ya)),za=-Math.round(ya-mxUtils.mod((Pa-Ta)*oa,ya));ua<S;ua+=ya)for(var Ia=za;Ia<ca;Ia+=ya)fa.drawImage(Ma,ua/oa,Ia/oa);L()}catch(Da){null!=
+T&&T(Da)}};Ma.onerror=function(ua){null!=T&&T(ua)};Ma.src=pa}else L()}catch(ua){null!=T&&T(ua)}});Za.onerror=function(L){null!=T&&T(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),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Va))}catch(L){null!=T&&T(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Va,L),this.loadFonts(z)}catch(M){null!=
+T&&T(M)}}))}catch(L){null!=T&&T(L)}}),N,ta)}catch(Va){null!=T&&T(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 T=0;T<W;T++)u=Editor.crcTable[(u^J.charCodeAt(N+T))&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,T){function Q(ta,Ba){var va=
+wa;wa+=Ba;return ta.substring(va,wa)}function Z(ta){ta=Q(ta,4);return ta.charCodeAt(3)+(ta.charCodeAt(2)<<8)+(ta.charCodeAt(1)<<16)+(ta.charCodeAt(0)<<24)}function oa(ta){return String.fromCharCode(ta>>24&255,ta>>16&255,ta>>8&255,ta&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var wa=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(Q(u,4),"IHDR"!=Q(u,4))null!=T&&T();else{Q(u,17);T=u.substring(0,wa);do{var Aa=Z(u);if("IDAT"==
+Q(u,4)){T=u.substring(0,wa-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);T+=oa(N.length)+J+N+oa(W^4294967295);T+=u.substring(wa-8,u.length);break}T+=u.substring(wa-8,wa-4+Aa);Q(u,Aa);Q(u,4)}while(Aa);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!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=
-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()&&
-N.isEnabled()&&"undefined"!==typeof MathJax){S=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){J.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};J.addListener("mathEnabledChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});S.style.paddingTop="5px";u.appendChild(S);var P=J.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position=
-"relative";P.style.marginLeft="6px";P.style.top="2px";S.appendChild(P)}return u};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=
+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(T){var Q=new ChangePageSetup(J);
+Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=T;N.model.execute(Q)},{install:function(T){this.listener=function(){T(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 T=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(T)}}if(this.isMathOptionVisible()&&
+N.isEnabled()&&"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){J.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};J.addListener("mathEnabledChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});T.style.paddingTop="5px";u.appendChild(T);var Q=J.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position=
+"relative";Q.style.marginLeft="6px";Q.style.top="2px";T.appendChild(Q)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
@@ -3226,92 +3229,92 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:
stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(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 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,
-!0);ma.style.position="absolute";ma.style.left=ya.x-ua.x+"px";ma.style.top=ya.y-ua.y+"px";ma.style.width=ia.offsetWidth+"px";ma.style.height=ia.offsetHeight-(pa?4:0)+"px";ma.style.zIndex=5}function P(ia,ma,pa){var ua=document.createElement("div");ua.style.width="32px";ua.style.height="4px";ua.style.margin="2px";ua.style.border="1px solid black";ua.style.background=ma&&"none"!=ma?ma:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ya){this.editorUi.pickColor(ma,
-function(Fa){ua.style.background="none"==Fa?"url('"+Dialog.prototype.noColorImage+"')":Fa;W(ia,Fa,pa)});mxEvent.consume(ya)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ua);return btn}function Z(ia,ma,pa,ua,ya,Fa,Ma){null!=ma&&(ma=ma.split(","),ta.push({name:ia,values:ma,type:pa,defVal:ua,countProperty:ya,parentRow:Fa,isDeletable:!0,flipBkg:Ma}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Oa){for(var Pa=Fa,Sa=0;null!=Pa.nextSibling;)if(Pa.nextSibling.getAttribute("data-pName")==
-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 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 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 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)":
+{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(Q){if(null!=Q)if(N)for(var Z=0;Z<Q.length;Z++)J[Q[Z].name]=Q[Z];else for(var oa in J){var wa=!1;for(Z=0;Z<Q.length;Z++)if(Q[Z].name==oa&&Q[Z].type==J[oa].type){wa=!0;break}wa||delete J[oa]}},
+T=this.editorUi.editor.graph.view.getState(u);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),W(T.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(Q){}}};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,T=0;T<N.length;T++)this.findCommonProperties(N[T],J,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],J,0==N.length&&0==T);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(fa,na,ra,pa){Ba.getModel().beginUpdate();try{var ya=[],Fa=[];if(null!=ra.index){for(var Na=[],Pa=ra.parentRow.nextSibling;Pa&&Pa.getAttribute("data-pName")==
+fa;)Na.push(Pa.getAttribute("data-pValue")),Pa=Pa.nextSibling;ra.index<Na.length?null!=pa?Na.splice(pa,1):Na[ra.index]=na:Na.push(na);null!=ra.size&&Na.length>ra.size&&(Na=Na.slice(0,ra.size));na=Na.join(",");null!=ra.countProperty&&(Ba.setCellStyles(ra.countProperty,Na.length,Ba.getSelectionCells()),ya.push(ra.countProperty),Fa.push(Na.length))}Ba.setCellStyles(fa,na,Ba.getSelectionCells());ya.push(fa);Fa.push(na);if(null!=ra.dependentProps)for(fa=0;fa<ra.dependentProps.length;fa++){var Qa=ra.dependentPropsDefVal[fa],
+Ta=ra.dependentPropsVals[fa];if(Ta.length>na)Ta=Ta.slice(0,na);else for(var Ma=Ta.length;Ma<na;Ma++)Ta.push(Qa);Ta=Ta.join(",");Ba.setCellStyles(ra.dependentProps[fa],Ta,Ba.getSelectionCells());ya.push(ra.dependentProps[fa]);Fa.push(Ta)}if("function"==typeof ra.onChange)ra.onChange(Ba,na);ta.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ya,"values",Fa,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function T(fa,na,ra){var pa=mxUtils.getOffset(u,!0),ya=mxUtils.getOffset(fa,
+!0);na.style.position="absolute";na.style.left=ya.x-pa.x+"px";na.style.top=ya.y-pa.y+"px";na.style.width=fa.offsetWidth+"px";na.style.height=fa.offsetHeight-(ra?4:0)+"px";na.style.zIndex=5}function Q(fa,na,ra){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=na&&"none"!=na?na:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ta,function(ya){this.editorUi.pickColor(na,
+function(Fa){pa.style.background="none"==Fa?"url('"+Dialog.prototype.noColorImage+"')":Fa;W(fa,Fa,ra)});mxEvent.consume(ya)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function Z(fa,na,ra,pa,ya,Fa,Na){null!=na&&(na=na.split(","),va.push({name:fa,values:na,type:ra,defVal:pa,countProperty:ya,parentRow:Fa,isDeletable:!0,flipBkg:Na}));btn=mxUtils.button("+",mxUtils.bind(ta,function(Pa){for(var Qa=Fa,Ta=0;null!=Qa.nextSibling;)if(Qa.nextSibling.getAttribute("data-pName")==
+fa)Qa=Qa.nextSibling,Ta++;else break;var Ma={type:ra,parentRow:Fa,index:Ta,isDeletable:!0,defVal:pa,countProperty:ya};Ta=Aa(fa,"",Ma,0==Ta%2,Na);W(fa,pa,Ma);Qa.parentNode.insertBefore(Ta,Qa.nextSibling);mxEvent.consume(Pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function oa(fa,na,ra,pa,ya,Fa,Na){if(0<ya){var Pa=Array(ya);na=null!=na?na.split(","):[];for(var Qa=0;Qa<ya;Qa++)Pa[Qa]=null!=na[Qa]?na[Qa]:null!=pa?pa:"";va.push({name:fa,values:Pa,type:ra,
+defVal:pa,parentRow:Fa,flipBkg:Na,size:ya})}return document.createElement("div")}function wa(fa,na,ra){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==na;mxEvent.addListener(pa,"change",function(){W(fa,pa.checked?"1":"0",ra)});return pa}function Aa(fa,na,ra,pa,ya){var Fa=ra.dispName,Na=ra.type,Pa=document.createElement("tr");Pa.className="gePropRow"+(ya?"Dark":"")+(pa?"Alt":"")+" gePropNonHeaderRow";Pa.setAttribute("data-pName",fa);Pa.setAttribute("data-pValue",na);pa=!1;
+null!=ra.index&&(Pa.setAttribute("data-index",ra.index),Fa=(null!=Fa?Fa:"")+"["+ra.index+"]",pa=!0);var Qa=document.createElement("td");Qa.className="gePropRowCell";Fa=mxResources.get(Fa,null,Fa);mxUtils.write(Qa,Fa);Qa.setAttribute("title",Fa);pa&&(Qa.style.textAlign="right");Pa.appendChild(Qa);Qa=document.createElement("td");Qa.className="gePropRowCell";if("color"==Na)Qa.appendChild(Q(fa,na,ra));else if("bool"==Na||"boolean"==Na)Qa.appendChild(wa(fa,na,ra));else if("enum"==Na){var Ta=ra.enumList;
+for(ya=0;ya<Ta.length;ya++)if(Fa=Ta[ya],Fa.val==na){mxUtils.write(Qa,mxResources.get(Fa.dispName,null,Fa.dispName));break}mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){var Ma=document.createElement("select");T(Qa,Ma);for(var ua=0;ua<Ta.length;ua++){var za=Ta[ua],Ia=document.createElement("option");Ia.value=mxUtils.htmlEntities(za.val);mxUtils.write(Ia,mxResources.get(za.dispName,null,za.dispName));Ma.appendChild(Ia)}Ma.value=na;u.appendChild(Ma);mxEvent.addListener(Ma,"change",function(){var Da=
+mxUtils.htmlEntities(Ma.value);W(fa,Da,ra)});Ma.focus();mxEvent.addListener(Ma,"blur",function(){u.removeChild(Ma)})}))}else"dynamicArr"==Na?Qa.appendChild(Z(fa,na,ra.subType,ra.subDefVal,ra.countProperty,Pa,ya)):"staticArr"==Na?Qa.appendChild(oa(fa,na,ra.subType,ra.subDefVal,ra.size,Pa,ya)):"readOnly"==Na?(ya=document.createElement("input"),ya.setAttribute("readonly",""),ya.value=na,ya.style.width="96px",ya.style.borderWidth="0px",Qa.appendChild(ya)):(Qa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(na)),
+mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){function Ma(){var za=ua.value;za=0==za.length&&"string"!=Na?0:za;ra.allowAuto&&(null!=za.trim&&"auto"==za.trim().toLowerCase()?(za="auto",Na="string"):(za=parseFloat(za),za=isNaN(za)?0:za));null!=ra.min&&za<ra.min?za=ra.min:null!=ra.max&&za>ra.max&&(za=ra.max);za=encodeURIComponent(("int"==Na?parseInt(za):za)+"");W(fa,za,ra)}var ua=document.createElement("input");T(Qa,ua,!0);ua.value=decodeURIComponent(na);ua.className="gePropEditor";"int"!=
+Na&&"float"!=Na||ra.allowAuto||(ua.type="number",ua.step="int"==Na?"1":"any",null!=ra.min&&(ua.min=parseFloat(ra.min)),null!=ra.max&&(ua.max=parseFloat(ra.max)));u.appendChild(ua);mxEvent.addListener(ua,"keypress",function(za){13==za.keyCode&&Ma()});ua.focus();mxEvent.addListener(ua,"blur",function(){Ma()})})));ra.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(ta,function(Ma){W(fa,"",ra,ra.index);mxEvent.consume(Ma)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
+"geColorBtn",Qa.appendChild(ya));Pa.appendChild(Qa);return Pa}var ta=this,Ba=this.editorUi.editor.graph,va=[];u.style.position="relative";u.style.padding="0";var Oa=document.createElement("table");Oa.className="geProperties";Oa.style.whiteSpace="nowrap";Oa.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Sa=document.createElement("th");Sa.className="gePropHeaderCell";var Ua=document.createElement("img");Ua.src=Sidebar.prototype.expandedImage;Ua.style.verticalAlign=
+"middle";Sa.appendChild(Ua);mxUtils.write(Sa,mxResources.get("property"));Ca.style.cursor="pointer";var Ka=function(){var fa=Oa.querySelectorAll(".gePropNonHeaderRow");if(ta.editorUi.propertiesCollapsed){Ua.src=Sidebar.prototype.collapsedImage;var na="none";for(var ra=u.childNodes.length-1;0<=ra;ra--)try{var pa=u.childNodes[ra],ya=pa.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(pa)}catch(Fa){}}else Ua.src=Sidebar.prototype.expandedImage,na="";for(ra=0;ra<fa.length;ra++)fa[ra].style.display=
+na};mxEvent.addListener(Ca,"click",function(){ta.editorUi.propertiesCollapsed=!ta.editorUi.propertiesCollapsed;Ka()});Ca.appendChild(Sa);Sa=document.createElement("th");Sa.className="gePropHeaderCell";Sa.innerHTML=mxResources.get("value");Ca.appendChild(Sa);Oa.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&&Oa.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
+!0,!1));for(var Za in J)if(Ca=J[Za],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[Za]?mxUtils.htmlEntities(N.style[Za]+""):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=[],S=[];for(Sa=0;Sa<L.length;Sa++){var ca=N.style[L[Sa]];S.push(J[L[Sa]].subDefVal);M.push(null!=
+ca?ca.split(","):[])}Ca.dependentPropsDefVal=S;Ca.dependentPropsVals=M}Oa.appendChild(Aa(Za,z,Ca,bb,Va));bb=!bb}}for(Sa=0;Sa<va.length;Sa++)for(Ca=va[Sa],J=Ca.parentRow,N=0;N<Ca.values.length;N++)Za=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(Za,J.nextSibling),J=Za;u.appendChild(Oa);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,T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.paddingLeft="24px";T.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(T);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(" "),
+Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var oa=[],wa=0;wa<this.defaultColorSchemes.length;wa++){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(){ta(Ca)}))})(wa);oa.push(Aa);Z.appendChild(Aa)}var ta=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 Sa=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 S=W.getModel().getStyle(L[M]),ca=0;ca<Q.length;ca++)S=mxUtils.removeStylename(S,Q[ca]);var fa=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ka?(mxEvent.isShiftDown(z)||(S=""==Ka.fill?mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,Ka.fill||mxUtils.getValue(fa,
+mxConstants.STYLE_FILLCOLOR,null)),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,Ka.gradient||mxUtils.getValue(fa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,Ka.font||mxUtils.getValue(fa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(S=""==Ka.stroke?mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,
+Ka.stroke||mxUtils.getValue(fa,mxConstants.STYLE_STROKECOLOR,null)))):(S=mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(fa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),S=mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(fa,mxConstants.STYLE_STROKECOLOR,"#000000")),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(fa,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(fa,
+mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],S)}}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",
-mxResources.get("editShape")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),u.appendChild(J)):J.image&&0<J.cells.length&&(J=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(S){this.editorUi.actions.get("image").funct()})),J.setAttribute("title",mxResources.get("editImage")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),
+""==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 Za=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
+Va;bb.style.border="1px solid "+Za}bb.style.borderRadius="0";T.appendChild(bb)});T.innerHTML="";for(var Ua=0;Ua<Ca.length;Ua++)0<Ua&&0==mxUtils.mod(Ua,4)&&mxUtils.br(T),Sa(Ca[Ua])});null==this.format.currentScheme?ta(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ta(this.format.currentScheme);wa=10>=this.defaultColorSchemes.length?28:8;var va=document.createElement("div");va.style.cssText="position:absolute;left:10px;top:8px;bottom:"+wa+"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(va,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Oa=document.createElement("div");Oa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+wa+"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(va),u.appendChild(Oa));mxEvent.addListener(Oa,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));J(va);J(Oa);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(T){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(T){this.editorUi.actions.get("editShape").funct()})),J.setAttribute("title",
+mxResources.get("editShape")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),u.appendChild(J)):J.image&&0<J.cells.length&&(J=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),J.setAttribute("title",mxResources.get("editImage")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),
u.appendChild(J));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,
J){var N=Graph.fontMapping[J];null==N&&Graph.isCssFontUrl(J)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",J)):(null==N&&(N='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+J+'");\n}'),u=document.createElement("style"),mxUtils.write(u,N));return u};Graph.addFont=function(u,J,N){if(null!=u&&0<u.length&&null!=J&&0<J.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
-W){var S=Graph.customFontElements[W];null!=S&&S.url!=J&&(S.elt.parentNode.removeChild(S.elt),S=null);null==S?(S=J,"http:"==J.substring(0,5)&&(S=PROXY_URL+"?url="+encodeURIComponent(J)),S={name:u,url:J,elt:Graph.createFontElement(u,S)},Graph.customFontElements[W]=S,Graph.recentCustomFonts[W]=S,J=document.getElementsByTagName("head")[0],null!=N&&("link"==S.elt.nodeName.toLowerCase()?(S.elt.onload=N,S.elt.onerror=N):N()),null!=J&&J.appendChild(S.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
+W){var T=Graph.customFontElements[W];null!=T&&T.url!=J&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=J,"http:"==J.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(J)),T={name:u,url:J,elt:Graph.createFontElement(u,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,J=document.getElementsByTagName("head")[0],null!=N&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=N,T.elt.onerror=N):N()),null!=J&&J.appendChild(T.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
return u};Graph.getFontUrl=function(u,J){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(J=u.url);return J};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var J=0;J<u.length;J++){var N=u[J].getAttribute("data-font-src");if(null!=N){var W="FONT"==u[J].nodeName?u[J].getAttribute("face"):u[J].style.fontFamily;null!=W&&Graph.addFont(W,N)}}};Graph.processFontStyle=function(u){if(null!=u){var J=mxUtils.getValue(u,"fontSource",null);if(null!=J){var N=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
null);null!=N&&Graph.addFont(N,decodeURIComponent(J))}}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 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=[],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,
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(T){J=T}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(T){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(T){var Q=this.graph.getCellStyle(T);if(null!=Q&&"rack"==Q.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=Q.marginLeft||0;Z.marginRight=Q.marginRight||0;Z.marginTop=Q.marginTop||0;Z.marginBottom=
+Q.marginBottom||0;Z.allowGaps=Q.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(Q,"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,T,Q,Z,oa,wa,Aa,ta){aa.apply(this,arguments);
+Graph.processFontAttributes(ta)};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(),Sa=[],Ua=0;Ua<Ca.length;Ua++)Z.isCellVisible(Ca[Ua])&&Sa.push(Ca[Ua]);Z.setSelectionCells(Sa)}function T(Ca){Z.hiddenTags=Ca?[]:oa.slice();W();Z.refresh()}function Q(Ca,Sa){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 Za=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",Za?Editor.visibleImage:Editor.hiddenImage);
+M.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Va]));mxUtils.setOpacity(M,Za?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 fa=mxUtils.indexOf(Z.hiddenTags,Va);mxEvent.isShiftDown(ca)?T(0<=mxUtils.indexOf(Z.hiddenTags,Va)):(0>fa?Z.hiddenTags.push(Va):0<=fa&&Z.hiddenTags.splice(fa,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,Za?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){T(!0);var fa=Z.getCellsForTags([Va],null,null,!0);Z.isEnabled()?Z.setSelectionCells(fa):
+Z.highlightCells(fa)}else if(Za&&0<Z.hiddenTags.length)T(!0);else{fa=oa.slice();var na=mxUtils.indexOf(fa,Va);fa.splice(na,1);Z.hiddenTags=fa;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==Sa){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,Za?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 fa=mxUtils.indexOf(oa,Va);0<=fa&&oa.splice(fa,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Va]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px";S.defaultChecked=
+null!=Sa&&0<=mxUtils.indexOf(Sa,Va);S.checked=S.defaultChecked;S.style.background="transparent";S.setAttribute("title",mxResources.get(S.defaultChecked?"removeIt":"add",[Va]));mxEvent.addListener(S,"change",function(ca){S.checked?Z.addTagsForCells(Z.getSelectionCells(),[Va]):Z.removeTagsForCells(Z.getSelectionCells(),[Va]);mxEvent.consume(ca)});L.appendChild(S)}z.appendChild(L)}Ka.appendChild(z)})(Ca[bb]);Ua.appendChild(Ka);Aa.appendChild(Ua)}}var Z=this,oa=Z.hiddenTags.slice(),wa=document.createElement("div");
+wa.style.userSelect="none";wa.style.overflow="hidden";wa.style.padding="10px";wa.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";wa.appendChild(Aa);var ta=mxUtils.button(mxResources.get("reset"),
+function(Ca){Z.hiddenTags=[];mxEvent.isShiftDown(Ca)||(oa=Z.hiddenTags.slice());W();Z.refresh()});ta.setAttribute("title",mxResources.get("reset"));ta.className="geBtn";ta.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(oa,function(Ca){oa=Ca;va()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";Z.addListener(mxEvent.ROOT,function(){oa=Z.hiddenTags.slice()});var va=mxUtils.bind(this,function(Ca,Sa){if(u()){Ca=Z.getAllTags();
+for(Sa=0;Sa<Ca.length;Sa++)0>mxUtils.indexOf(oa,Ca[Sa])&&oa.push(Ca[Sa]);oa.sort();Z.isSelectionEmpty()?Q(oa):Q(oa,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,va);Z.model.addListener(mxEvent.CHANGE,va);Z.addListener(mxEvent.REFRESH,va);var Oa=document.createElement("div");Oa.style.boxSizing="border-box";Oa.style.whiteSpace="nowrap";Oa.style.position="absolute";Oa.style.overflow="hidden";Oa.style.bottom="0px";Oa.style.height="42px";Oa.style.right=
+"10px";Oa.style.left="10px";Z.isEnabled()&&(Oa.appendChild(ta),Oa.appendChild(Ba),wa.appendChild(Oa));return{div:wa,refresh:va}};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,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};
+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,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa){var Ca=null,Sa=null,Ua=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Sa=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(ta&&0<bb.length){var Va=Ka.ownerDocument,Za=null!=Va.createElementNS?Va.createElementNS(mxConstants.NS_SVG,"style"):Va.createElement("style");null!=Va.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var S=
+bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+S+'";\nsrc: url("'+ca+'");\n}\n'}Za.appendChild(Va.createTextNode(z+L));Ka.getElementsByTagName("defs")[0].appendChild(Za)}null!=Ca&&(this.shapeBackgroundColor=Ua,this.shapeForegroundColor=Sa,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 T=N.text.getContentNode();if(null!=T){T=T.cloneNode(!0);if(T.getElementsByTagNameNS)for(var Q=T.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=T.innerHTML&&(Q=N.text.value,N.text.value=T.innerHTML,J.apply(this,arguments),N.text.value=Q)}}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?
(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)):J||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);J=u.secondLabel;if(null!=J){var N=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*N,u.y+4*N,0,0):mxRectangle.fromPoint(u.view.getPoint(u));
J.bounds.equals(u)&&J.value==W&&J.scale==N||(J.bounds=u,J.value=W,J.scale=N,J.redraw())}};var ja=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ja.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 U=Graph.prototype.refresh;Graph.prototype.refresh=function(){U.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(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,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,S=0,P=mxUtils.bind(this,function(){N||
-(N=!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),oa=mxUtils.bind(this,function(){0<W&&W--;0==W&&va()}),va=mxUtils.bind(this,function(){if(S<u.length){var Aa=this.stoppingCustomActions,sa=u[S++],Ba=[];if(null!=sa.open)if(Z(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||Aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
-null;oa()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=sa.wait?parseInt(sa.wait):1E3),Z());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,oa,Aa?0:sa.fadeIn.delay));null!=sa.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),
-1,0,oa,Aa?0:sa.fadeOut.delay));null!=sa.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,!0),!0)));null!=sa.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(P(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){P();var ta=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ta),1);this.setCellsVisible(ta,!0)}null!=sa.hide&&(P(),ta=this.getCellsForAction(sa.hide,
-!0),Graph.setOpacityForNodes(this.getNodesForCells(ta),0),this.setCellsVisible(ta,!1));null!=sa.toggleStyle&&null!=sa.toggleStyle.key&&(P(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(P(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));ta=[];null!=sa.select&&this.isEnabled()&&(ta=this.getCellsForAction(sa.select),this.setSelectionCells(ta));
-null!=sa.highlight&&(ta=this.getCellsForAction(sa.highlight),this.highlightCells(ta,sa.highlight.color,sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(ta=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<ta.length&&this.scrollCellToVisible(ta[0]);if(null!=sa.tags){ta=[];null!=sa.tags.hidden&&(ta=ta.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Na=this.getAllTags(),Ca=0;Ca<Na.length;Ca++)0>mxUtils.indexOf(sa.tags.visible,Na[Ca])&&
-0>mxUtils.indexOf(ta,Na[Ca])&&ta.push(Na[Ca]);this.hiddenTags=ta;this.refresh()}0<Ba.length&&(W++,this.executeAnimations(Ba,oa,Aa?1:sa.steps,Aa?0:sa.delay));0==W?va():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=J&&J()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,J){var N=this.getLinkForCell(J);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(J,this.updateCustomLink(u,N));if(this.isHtmlLabel(J)){var W=document.createElement("div");
-W.innerHTML=this.sanitizeHtml(this.getLabel(J));for(var S=W.getElementsByTagName("a"),P=!1,Z=0;Z<S.length;Z++)N=S[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(S[Z].setAttribute("href",this.updateCustomLink(u,N)),P=!0);P&&this.labelChanged(J,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,J){if("data:action/json,"==J.substring(0,17))try{var N=JSON.parse(J.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),J="data:action/json,"+JSON.stringify(N))}catch(W){}return J};
-Graph.prototype.updateCustomLinkActions=function(u,J){for(var N=0;N<J.length;N++){var W=J[N],S;for(S in W)this.updateCustomLinkAction(u,W[S],"cells"),this.updateCustomLinkAction(u,W[S],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,J,N){if(null!=J&&null!=J[N]){for(var W=[],S=0;S<J[N].length;S++)if("*"==J[N][S])W.push(J[N][S]);else{var P=u[J[N][S]];null!=P?""!=P&&W.push(P):W.push(J[N][S])}J[N]=W}};Graph.prototype.getCellsForAction=function(u,J){J=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
-null,J));if(null!=u.excludeCells){for(var N=[],W=0;W<J.length;W++)0>u.excludeCells.indexOf(J[W].id)&&N.push(J[W]);J=N}return J};Graph.prototype.getCellsById=function(u){var J=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();J=J.concat(this.model.filterDescendants(function(P){return P!=W},W))}else{var S=this.model.getCell(u[N]);null!=S&&J.push(S)}return J};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.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 J=0;J<u.length;J++)if(0>mxUtils.indexOf(this.hiddenTags,u[J]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,J,N,W){var S=[];if(null!=u){J=null!=J?J:this.model.getDescendants(this.model.getRoot());for(var P=0,Z={},oa=0;oa<u.length;oa++)0<u[oa].length&&(Z[u[oa]]=!0,P++);
-for(oa=0;oa<J.length;oa++)if(N&&this.model.getParent(J[oa])==this.model.root||this.model.isVertex(J[oa])||this.model.isEdge(J[oa])){var va=this.getTagsForCell(J[oa]),Aa=!1;if(0<va.length&&(va=va.split(" "),va.length>=u.length)){for(var sa=Aa=0;sa<va.length&&Aa<P;sa++)null!=Z[va[sa]]&&Aa++;Aa=Aa==P}Aa&&(1!=W||this.isCellVisible(J[oa]))&&S.push(J[oa])}}return S};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=
-function(u){for(var J=null,N=[],W=0;W<u.length;W++){var S=this.getTagsForCell(u[W]);N=[];if(0<S.length){S=S.split(" ");for(var P={},Z=0;Z<S.length;Z++)if(null==J||null!=J[S[Z]])P[S[Z]]=!0,N.push(S[Z]);J=P}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var J=[],N={},W=0;W<u.length;W++){var S=this.getTagsForCell(u[W]);if(0<S.length){S=S.split(" ");for(var P=0;P<S.length;P++)null==N[S[P]]&&(N[S[P]]=!0,J.push(S[P]))}}return J};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,
-"tags","")};Graph.prototype.addTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),S=W.split(" "),P=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.trim(J[Z]);""!=oa&&0>mxUtils.indexOf(S,oa)&&(W=0<W.length?W+" "+oa:oa,P=!0)}P&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=
-0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var S=W.split(" "),P=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.indexOf(S,J[Z]);0<=oa&&(S.splice(oa,1),P=!0)}P&&this.setAttributeForCell(u[N],"tags",S.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var J=0;J<u.length;J++)this.model.setVisible(u[J],!this.model.isVisible(u[J]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,J){this.model.beginUpdate();
-try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],J)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,J,N,W){for(var S=0;S<u.length;S++)this.highlightCell(u[S],J,N,W)};Graph.prototype.highlightCell=function(u,J,N,W,S){J=null!=J?J:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var P=null;null!=u&&(S=null!=S?S:4,S=Math.max(S+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+S),P=new mxCellHighlight(this,J,S,!1),null!=W&&(P.opacity=
-W),P.highlight(u),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},N));return P};Graph.prototype.addSvgShadow=function(u,J,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var S=u.ownerDocument,P=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"filter"):S.createElement("filter");P.setAttribute("id",this.shadowId);var Z=null!=S.createElementNS?
-S.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):S.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");P.appendChild(Z);Z=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feOffset"):S.createElement("feOffset");Z.setAttribute("in","blur");Z.setAttribute("dx",this.svgShadowSize);Z.setAttribute("dy",this.svgShadowSize);Z.setAttribute("result","offsetBlur");P.appendChild(Z);Z=null!=S.createElementNS?
-S.createElementNS(mxConstants.NS_SVG,"feFlood"):S.createElement("feFlood");Z.setAttribute("flood-color",this.svgShadowColor);Z.setAttribute("flood-opacity",this.svgShadowOpacity);Z.setAttribute("result","offsetColor");P.appendChild(Z);Z=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feComposite"):S.createElement("feComposite");Z.setAttribute("in","offsetColor");Z.setAttribute("in2","offsetBlur");Z.setAttribute("operator","in");Z.setAttribute("result","offsetBlur");P.appendChild(Z);
-Z=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feBlend"):S.createElement("feBlend");Z.setAttribute("in","SourceGraphic");Z.setAttribute("in2","offsetBlur");P.appendChild(Z);Z=u.getElementsByTagName("defs");0==Z.length?(S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=u.firstChild?u.insertBefore(S,u.firstChild):u.appendChild(S)):S=Z[0];S.appendChild(P);N||(J=null!=J?J:u.getElementsByTagName("g")[0],null!=J&&(J.setAttribute("filter",
-"url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),J=u.getAttribute("viewBox"),null!=J&&0<J.length&&(J=J.split(" "),3<J.length&&(w=parseFloat(J[2])+6,h=parseFloat(J[3])+6,u.setAttribute("viewBox",J[0]+" "+J[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(u,J){mxClient.IS_SVG&&!mxClient.IS_SF&&(J=null!=J?J:!0,(this.shadowVisible=u)?
+u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,T=0,Q=mxUtils.bind(this,function(){N||
+(N=!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),oa=mxUtils.bind(this,function(){0<W&&W--;0==W&&wa()}),wa=mxUtils.bind(this,function(){if(T<u.length){var Aa=this.stoppingCustomActions,ta=u[T++],Ba=[];if(null!=ta.open)if(Z(),this.isCustomLink(ta.open)){if(!this.customLinkClicked(ta.open))return}else this.openLink(ta.open);null==ta.wait||Aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
+null;oa()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ta.wait?parseInt(ta.wait):1E3),Z());null!=ta.opacity&&null!=ta.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ta.opacity,!0)),ta.opacity.value);null!=ta.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeIn,!0)),0,1,oa,Aa?0:ta.fadeIn.delay));null!=ta.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeOut,!0)),
+1,0,oa,Aa?0:ta.fadeOut.delay));null!=ta.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeIn,!0),!0)));null!=ta.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeOut,!0),!1)));null!=ta.toggle&&(Q(),this.toggleCells(this.getCellsForAction(ta.toggle,!0)));if(null!=ta.show){Q();var va=this.getCellsForAction(ta.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(va),1);this.setCellsVisible(va,!0)}null!=ta.hide&&(Q(),va=this.getCellsForAction(ta.hide,
+!0),Graph.setOpacityForNodes(this.getNodesForCells(va),0),this.setCellsVisible(va,!1));null!=ta.toggleStyle&&null!=ta.toggleStyle.key&&(Q(),this.toggleCellStyles(ta.toggleStyle.key,null!=ta.toggleStyle.defaultValue?ta.toggleStyle.defaultValue:"0",this.getCellsForAction(ta.toggleStyle,!0)));null!=ta.style&&null!=ta.style.key&&(Q(),this.setCellStyles(ta.style.key,ta.style.value,this.getCellsForAction(ta.style,!0)));va=[];null!=ta.select&&this.isEnabled()&&(va=this.getCellsForAction(ta.select),this.setSelectionCells(va));
+null!=ta.highlight&&(va=this.getCellsForAction(ta.highlight),this.highlightCells(va,ta.highlight.color,ta.highlight.duration,ta.highlight.opacity));null!=ta.scroll&&(va=this.getCellsForAction(ta.scroll));null!=ta.viewbox&&this.fitWindow(ta.viewbox,ta.viewbox.border);0<va.length&&this.scrollCellToVisible(va[0]);if(null!=ta.tags){va=[];null!=ta.tags.hidden&&(va=va.concat(ta.tags.hidden));if(null!=ta.tags.visible)for(var Oa=this.getAllTags(),Ca=0;Ca<Oa.length;Ca++)0>mxUtils.indexOf(ta.tags.visible,Oa[Ca])&&
+0>mxUtils.indexOf(va,Oa[Ca])&&va.push(Oa[Ca]);this.hiddenTags=va;this.refresh()}0<Ba.length&&(W++,this.executeAnimations(Ba,oa,Aa?1:ta.steps,Aa?0:ta.delay));0==W?wa():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=J&&J()});wa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,J){var N=this.getLinkForCell(J);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(J,this.updateCustomLink(u,N));if(this.isHtmlLabel(J)){var W=document.createElement("div");
+W.innerHTML=this.sanitizeHtml(this.getLabel(J));for(var T=W.getElementsByTagName("a"),Q=!1,Z=0;Z<T.length;Z++)N=T[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(T[Z].setAttribute("href",this.updateCustomLink(u,N)),Q=!0);Q&&this.labelChanged(J,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,J){if("data:action/json,"==J.substring(0,17))try{var N=JSON.parse(J.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),J="data:action/json,"+JSON.stringify(N))}catch(W){}return J};
+Graph.prototype.updateCustomLinkActions=function(u,J){for(var N=0;N<J.length;N++){var W=J[N],T;for(T in W)this.updateCustomLinkAction(u,W[T],"cells"),this.updateCustomLinkAction(u,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,J,N){if(null!=J&&null!=J[N]){for(var W=[],T=0;T<J[N].length;T++)if("*"==J[N][T])W.push(J[N][T]);else{var Q=u[J[N][T]];null!=Q?""!=Q&&W.push(Q):W.push(J[N][T])}J[N]=W}};Graph.prototype.getCellsForAction=function(u,J){J=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
+null,J));if(null!=u.excludeCells){for(var N=[],W=0;W<J.length;W++)0>u.excludeCells.indexOf(J[W].id)&&N.push(J[W]);J=N}return J};Graph.prototype.getCellsById=function(u){var J=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();J=J.concat(this.model.filterDescendants(function(Q){return Q!=W},W))}else{var T=this.model.getCell(u[N]);null!=T&&J.push(T)}return J};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.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 J=0;J<u.length;J++)if(0>mxUtils.indexOf(this.hiddenTags,u[J]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,J,N,W){var T=[];if(null!=u){J=null!=J?J:this.model.getDescendants(this.model.getRoot());for(var Q=0,Z={},oa=0;oa<u.length;oa++)0<u[oa].length&&(Z[u[oa]]=!0,Q++);
+for(oa=0;oa<J.length;oa++)if(N&&this.model.getParent(J[oa])==this.model.root||this.model.isVertex(J[oa])||this.model.isEdge(J[oa])){var wa=this.getTagsForCell(J[oa]),Aa=!1;if(0<wa.length&&(wa=wa.split(" "),wa.length>=u.length)){for(var ta=Aa=0;ta<wa.length&&Aa<Q;ta++)null!=Z[wa[ta]]&&Aa++;Aa=Aa==Q}Aa&&(1!=W||this.isCellVisible(J[oa]))&&T.push(J[oa])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=
+function(u){for(var J=null,N=[],W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);N=[];if(0<T.length){T=T.split(" ");for(var Q={},Z=0;Z<T.length;Z++)if(null==J||null!=J[T[Z]])Q[T[Z]]=!0,N.push(T[Z]);J=Q}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var J=[],N={},W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);if(0<T.length){T=T.split(" ");for(var Q=0;Q<T.length;Q++)null==N[T[Q]]&&(N[T[Q]]=!0,J.push(T[Q]))}}return J};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,
+"tags","")};Graph.prototype.addTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.trim(J[Z]);""!=oa&&0>mxUtils.indexOf(T,oa)&&(W=0<W.length?W+" "+oa:oa,Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=
+0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.indexOf(T,J[Z]);0<=oa&&(T.splice(oa,1),Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var J=0;J<u.length;J++)this.model.setVisible(u[J],!this.model.isVisible(u[J]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,J){this.model.beginUpdate();
+try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],J)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,J,N,W){for(var T=0;T<u.length;T++)this.highlightCell(u[T],J,N,W)};Graph.prototype.highlightCell=function(u,J,N,W,T){J=null!=J?J:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var Q=null;null!=u&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+T),Q=new mxCellHighlight(this,J,T,!1),null!=W&&(Q.opacity=
+W),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)},N));return Q};Graph.prototype.addSvgShadow=function(u,J,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var T=u.ownerDocument,Q=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");Q.setAttribute("id",this.shadowId);var Z=null!=T.createElementNS?
+T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feOffset"):T.createElement("feOffset");Z.setAttribute("in","blur");Z.setAttribute("dx",this.svgShadowSize);Z.setAttribute("dy",this.svgShadowSize);Z.setAttribute("result","offsetBlur");Q.appendChild(Z);Z=null!=T.createElementNS?
+T.createElementNS(mxConstants.NS_SVG,"feFlood"):T.createElement("feFlood");Z.setAttribute("flood-color",this.svgShadowColor);Z.setAttribute("flood-opacity",this.svgShadowOpacity);Z.setAttribute("result","offsetColor");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feComposite"):T.createElement("feComposite");Z.setAttribute("in","offsetColor");Z.setAttribute("in2","offsetBlur");Z.setAttribute("operator","in");Z.setAttribute("result","offsetBlur");Q.appendChild(Z);
+Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feBlend"):T.createElement("feBlend");Z.setAttribute("in","SourceGraphic");Z.setAttribute("in2","offsetBlur");Q.appendChild(Z);Z=u.getElementsByTagName("defs");0==Z.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(T,u.firstChild):u.appendChild(T)):T=Z[0];T.appendChild(Q);N||(J=null!=J?J:u.getElementsByTagName("g")[0],null!=J&&(J.setAttribute("filter",
+"url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),J=u.getAttribute("viewBox"),null!=J&&0<J.length&&(J=J.split(" "),3<J.length&&(w=parseFloat(J[2])+6,h=parseFloat(J[3])+6,u.setAttribute("viewBox",J[0]+" "+J[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,J){mxClient.IS_SVG&&!mxClient.IS_SF&&(J=null!=J?J:!0,(this.shadowVisible=u)?
this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),J&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),J=0;do var N=this.model.getChildAt(this.model.root,J);while(J++<u&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}};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",
@@ -3324,289 +3327,289 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.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 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,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(),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 yb=hb.renderPage;hb.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=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 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);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){}})();
+[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 P=mxMarker.createMarker;mxMarker.createMarker=function(u,J,N,W,T,Q,Z,oa,wa,Aa){if(null!=N&&null==mxMarker.markers[N]){var ta=this.getPackageForType(N);null!=ta&&mxStencilRegistry.getStencil(ta)}return P.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
+function(u,J,N,W,T,Q){"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(){va.value=Math.max(1,Math.min(oa,Math.max(parseInt(va.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(va.value),parseInt(Ba.value))))}function W(Fa){function Na(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,gb=0,mb=pa.get(),wb=1/cb.pageScale,pb=Ka.checked;if(pb){wb=parseInt(na.value);var xb=parseInt(ra.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)&&(Pa=1/cb.pageScale,Ua.value="100 %");
+mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Pa);mb.height=Math.ceil(mb.height*Pa);wb*=Pa;!pb&&cb.pageVisible?(ub=cb.getPageLayout(),kb-=ub.x*mb.width,gb-=ub.y*mb.height):pb=!0;if(null==hb){hb=PrintDialog.createPrintPreview(cb,wb,mb,0,kb,gb,pb);hb.pageSelector=!1;hb.mathEnabled=!1;Oa.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;gb=T.shapeForegroundColor;pb=T.shapeBackgroundColor;mb=T.enableFlowAnimation;T.enableFlowAnimation=!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(kb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());hb.open(null,null,lb,!0);T.enableFlowAnimation=mb;null!=kb&&
+(T.shapeForegroundColor=gb,T.shapeBackgroundColor=pb,T.stylesheet=kb,T.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,gb,lb,!0);lb=cb.getCustomFonts();if(null!=hb.wnd)for(kb=0;kb<lb.length;kb++)gb=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(gb)+'";\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 Pa=parseInt(ya.value)/100;isNaN(Pa)&&(Pa=1,ya.value="100 %");Pa*=.75;var Qa=null,Ta=T.shapeForegroundColor,Ma=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(Qa=T.stylesheet,T.stylesheet=
+T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var ua=Ba.value,za=va.value,Ia=!Aa.checked,Da=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,ua,za,Ka.checked,na.value,ra.value,parseInt(Ua.value)/100,parseInt(ya.value)/100,pa.get());else{Ia&&(Ia=Oa.checked||ua==wa&&za==wa);if(!Ia&&null!=u.pages&&u.pages.length){var La=0;Ia=u.pages.length-1;Aa.checked||(La=parseInt(ua)-1,Ia=parseInt(za)-1);for(var db=La;db<=Ia;db++){var ab=
+u.pages[db];ua=ab==u.currentPage?T:null;if(null==ua){ua=u.createTemporaryGraph(T.stylesheet);ua.shapeForegroundColor=T.shapeForegroundColor;ua.shapeBackgroundColor=T.shapeBackgroundColor;za=!0;La=!1;var fb=null,ib=null;null==ab.viewState&&null==ab.root&&u.updatePageRoot(ab);null!=ab.viewState&&(za=ab.viewState.pageVisible,La=ab.viewState.mathEnabled,fb=ab.viewState.background,ib=ab.viewState.backgroundImage,ua.extFonts=ab.viewState.extFonts);null!=ib&&null!=ib.originalSrc&&(ib=u.createImageForPageLink(ib.originalSrc,
+ab));ua.background=fb;ua.backgroundImage=null!=ib?new mxImage(ib.src,ib.width,ib.height,ib.x,ib.y):null;ua.pageVisible=za;ua.mathEnabled=La;var tb=ua.getGraphBounds;ua.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=ua.getGlobalVariable;ua.getGlobalVariable=
+function(cb){return"page"==cb?ab.getName():"pagenumber"==cb?db+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:qb.apply(this,arguments)};document.body.appendChild(ua.container);u.updatePageRoot(ab);ua.model.setRoot(ab.root)}Da=Na(ua,Da,db!=Ia);ua!=T&&ua.container.parentNode.removeChild(ua.container)}}else Da=Na(T);null==Da?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Da.mathEnabled&&(Ia=Da.wnd.document,Fa&&(Da.wnd.IMMEDIATE_PRINT=!0),Ia.writeln('<script type="text/javascript" src="'+
+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Da.closeDocument(),!Da.mathEnabled&&Fa&&PrintDialog.printPreview(Da));null!=Qa&&(T.shapeForegroundColor=Ta,T.shapeBackgroundColor=Ma,T.stylesheet=Qa,T.refresh())}}var T=u.editor.graph,Q=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"));Q.appendChild(Z);var oa=1,wa=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 ta=Aa.cloneNode(!0);Aa.setAttribute("checked","checked");ta.setAttribute("value","range");Z.appendChild(ta);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 va=Ba.cloneNode(!0);Z.appendChild(va);mxEvent.addListener(Ba,"focus",function(){ta.checked=!0});mxEvent.addListener(va,"focus",function(){ta.checked=!0});mxEvent.addListener(Ba,"change",
+N);mxEvent.addListener(va,"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]){wa=J+1;Ba.value=wa;va.value=wa;break}Ba.setAttribute("max",oa);va.setAttribute("max",oa);u.isPagesEnabled()?1<oa&&(Q.appendChild(Z),ta.checked=!0):ta.checked=!0;mxUtils.br(Z);var Oa=document.createElement("input");Oa.setAttribute("value","all");Oa.setAttribute("type","radio");Oa.style.marginRight="8px";T.isSelectionEmpty()&&Oa.setAttribute("disabled",
+"disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==oa?(Oa.setAttribute("type","checkbox"),Oa.style.marginBottom="12px",Ca.appendChild(Oa)):(Oa.setAttribute("name","pages-printdialog"),Oa.style.marginBottom="8px",Z.appendChild(Oa));J=document.createElement("span");mxUtils.write(J,mxResources.get("selectionOnly"));Oa.parentNode.appendChild(J);1==oa&&mxUtils.br(Oa.parentNode);var Sa=document.createElement("input");Sa.style.marginRight="8px";Sa.setAttribute("value","adjust");
+Sa.setAttribute("type","radio");Sa.setAttribute("name","printZoom");Ca.appendChild(Sa);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(){Sa.checked=!0});Q.appendChild(Ca);Z=Z.cloneNode(!1);var Ka=Sa.cloneNode(!0);Ka.setAttribute("value","fit");Sa.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"),Za=Va.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),S=z.cloneNode(!0),ca=z.cloneNode(!0),fa=z.cloneNode(!0);z.style.textAlign="right";S.style.textAlign="right";mxUtils.write(z,
+mxResources.get("fitTo"));var na=document.createElement("input");na.style.cssText="margin:0 8px 0 8px;";na.setAttribute("value","1");na.setAttribute("min","1");na.setAttribute("type","number");na.style.width="40px";L.appendChild(na);J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsAcross"));M.appendChild(J);mxUtils.write(S,mxResources.get("fitToBy"));var ra=na.cloneNode(!0);ca.appendChild(ra);mxEvent.addListener(na,"focus",function(){Ka.checked=!0});mxEvent.addListener(ra,
+"focus",function(){Ka.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));fa.appendChild(J);Va.appendChild(z);Va.appendChild(L);Va.appendChild(M);Za.appendChild(S);Za.appendChild(ca);Za.appendChild(fa);bb.appendChild(Va);bb.appendChild(Za);Ca.appendChild(bb);Z.appendChild(Ca);Q.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 pa=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);Q.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(){T.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);Q.appendChild(J);this.container=Q};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var 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 ha.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),
+null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),sa=new Image;sa.onload=function(){try{la.getContext("2d").drawImage(sa,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(J){}};sa.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.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(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.2.0";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,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!=m?":colno:"+
-encodeURIComponent(m):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{F||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 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(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)&&
+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 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,
+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 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!=
+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,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=
+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,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=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&&(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||(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],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,m);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,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),F=F.cloneNode(!1),mxUtils.setTextContent(F,
-Graph.compressNode(C))));d(F)}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&&
+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][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");
+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,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());
+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,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 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!=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));
+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;">'+
-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,
+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(),
-F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[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,F,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,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,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,F,C,H,
+ha){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var sa=this.createDownloadRequest(R,d,l,ha,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return sa}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 P=this.editor.graph.getSvg(V,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(P);this.editor.convertImages(P,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!=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 m=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 m};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,
+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 F=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&&(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 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(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+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 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"));
+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 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 F=d[y].node.cloneNode(!1);F.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");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 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,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
-f,g)+this.hashValue(F,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,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+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,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!=m?m:!0,mxUtils.bind(this,function(ka){F(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==
-LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,I){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var Q=ba.getCellGeometry(ka[V]);null!=Q&&Q.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,I||
+LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,I){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var P=ba.getCellGeometry(ka[V]);null!=P&&P.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,I||
"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),w:ja.width,h:ja.height};null!=I&&(ka.title=I);f.push(ka);O(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ea=mxUtils.bind(this,function(ka){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(ka),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=ba.getSelectionCells(),
U=ba.view.getBounds(ja),I=ba.view.scale;U.x/=I;U.y/=I;U.width/=I;U.height/=I;U.x-=ba.view.translate.x;U.y-=ba.view.translate.y;X(ja,U)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,
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));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=
+this.maxImageSize,mxUtils.bind(this,function(ja,U,I,V,P,R,ha,la,sa){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,P,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,P,R),ka,mxEvent.isAltDown(ka)?null:ha.substring(0,ha.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 T=JSON.parse(mxUtils.getTextContent(N.documentElement));F(T,C);f=f.concat(T);O(ka);this.spinner.stop();u=!0}catch(wa){}else if("mxfile"==N.documentElement.nodeName)try{var Q=N.documentElement.getElementsByTagName("diagram");for(T=0;T<Q.length;T++){var Z=this.stringToCells(Editor.getDiagramNodeXml(Q[T])),
+oa=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,oa.width,oa.height),ka)}u=!0}catch(wa){null!=window.console&&console.log("error in drop handler:",wa)}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!=sa&&null!=ha&&(/(\.v(dx|sdx?))($|\?)/i.test(ha)||/(\.vs(x|sx?))($|\?)/i.test(ha))?this.importVisio(sa,function(N){J(N,"text/xml")},null,ha):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(ja,ha)&&null!=sa?this.isExternalDataComms()?this.parseFile(sa,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)});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,F){d=new ImageDialog(this,d,f,g,m,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,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,F){var C=null!=this.spinner&&null!=this.spinner.pause?
+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,
-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;
+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?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,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 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()},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:"+
+")"),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 F=document.createElement("input");
-F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";if(!m){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||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
+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,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 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(m?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,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 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,m,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,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,F,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=
+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 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,F){return this.createEchoRequest(g,y,m,q,f,F)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,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!=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,F,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,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);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,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,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);m&&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 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,
+(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+
-"')");F.innerHTML="";F.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",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 m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,F){F=null!=F?F:[];m&&("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,m,q,y,F,C,
-H,G){H=this.createUrlParameters(d,f,g,m,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(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,F,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)||
+"')");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,m){var q=document.createElement("div");
+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(){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,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,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";
+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"),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,m,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=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);F=this.editor.graph;var da=m?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)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(d,f,g,m,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=
+!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"),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 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&&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<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
+"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),P=null;if("png"==C||"jpeg"==C)P=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
+this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var ha=document.createElement("input");ha.style.marginBottom="16px";ha.style.marginRight="8px";ha.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ha.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?(ha.checked=!0,
+ha.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",sa.style.display="none"):"disabled"==ha.getAttribute("disabled")&&(ha.checked=!1,ha.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",sa.style.display="")}));f&&(G.appendChild(ha),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
+mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var sa=document.createElement("select");sa.style.maxWidth="260px";sa.style.marginLeft="8px";sa.style.marginRight="10px";sa.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));sa.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));sa.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));sa.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(sa),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,ha.checked,qa.value,X.checked,!1,sa.value,null!=P?P.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,F,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)+'"');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=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,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")}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){F('<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('"+
+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,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,
+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,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=(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,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,m,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,m,q,y,F){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)}}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(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"),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&&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 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(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(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=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: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,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(F)}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,
+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(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(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 m({message:mxResources.get("invalidInput")})}catch(da){m(da)}})}catch(F){m(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,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+
+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){m(ea)}};aa.src=H.result};H.onerror=function(G){m(G)}}else m(C)};
-F.onerror=function(C){m(C)};F.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,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()?
+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)+";"))}),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;"+(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;":""));
+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(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 m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
+"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=m;y.apply(q,arguments);F&&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 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&&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,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,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="+
+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,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(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,F,C,H,G,aa,da,ba){m=null!=m?m: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==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 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=
-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,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};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,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(m&&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 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?
+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,sa,u,J,N,W,T,Q,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+la,T)),null):this.importFile(la,sa,u,J,N,W,T,Q,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,P=[],R=mxUtils.bind(this,function(la,sa){P[la]=sa;if(0==--V){this.spinner.stop();if(null!=C)C(P);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<P.length;la++){var J=P[la]();null!=J&&(u=u.concat(J))}}finally{ja.getModel().endUpdate()}}y(u)}}),
+ha=0;ha<I;ha++)mxUtils.bind(this,function(la){var sa=d[la];if(null!=sa){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==F||F(sa))if("image/"==sa.type.substring(0,6))if("image/svg"==sa.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var T=mxUtils.parseXml(W);W=T.getElementsByTagName("svg");if(0<W.length){W=W[0];var Q=da?null:W.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)?R(la,mxUtils.bind(this,function(){try{if(null!=T){var wa=T.getElementsByTagName("svg");if(0<wa.length){var Aa=wa[0],ta=Aa.getAttribute("width"),Ba=Aa.getAttribute("height");ta=null!=ta&&"%"!=ta.charAt(ta.length-1)?parseFloat(ta):NaN;Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;var va=Aa.getAttribute("viewBox");
+if(null==va||0==va.length)Aa.setAttribute("viewBox","0 0 "+ta+" "+Ba);else if(isNaN(ta)||isNaN(Ba)){var Oa=va.split(" ");3<Oa.length&&(ta=parseFloat(Oa[2]),Ba=parseFloat(Oa[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(l/Math.max(1,ta)),l/Math.max(1,Ba)),Sa=q(N,sa.type,f+la*U,g+la*U,Math.max(1,Math.round(ta*Ca)),Math.max(1,Math.round(Ba*Ca)),sa.name);if(isNaN(ta)||isNaN(Ba)){var Ua=new Image;Ua.onload=mxUtils.bind(this,function(){ta=Math.max(1,Ua.width);Ba=Math.max(1,
+Ua.height);Sa[0].geometry.width=ta;Sa[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+ta+" "+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,[Sa[0]])});Ua.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Sa}}}catch(Ka){}return null})):R(la,mxUtils.bind(this,function(){return q(Q,"text/xml",f+la*U,g+la*U,0,0,sa.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
+!1;if("image/png"==sa.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,sa.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(wa){this.resizeImage(wa,J.target.result,mxUtils.bind(this,function(Aa,ta,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var va=qa&&this.isResampleImageSize(sa.size,aa)?Math.min(1,Math.min(l/ta,l/Ba)):1;return q(Aa,sa.type,f+la*U,g+la*U,Math.round(ta*va),Math.round(Ba*va),sa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,l,aa,sa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
+J.target.result,q(N,sa.type,f+la*U,g+la*U,240,160,sa.name,function(wa){R(la,function(){return wa})},sa)});/(\.v(dx|sdx?))($|\?)/i.test(sa.name)||/(\.vs(x|sx?))($|\?)/i.test(sa.name)?q(null,sa.type,f+la*U,g+la*U,240,160,sa.name,function(J){R(la,function(){return J})},sa):"image"==sa.type.substring(0,5)||"application/pdf"==sa.type?u.readAsDataURL(sa):u.readAsText(sa)}})(ha)});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(){},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)&&
+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(I,V,P){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=P,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,P){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,P),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 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 F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
@@ -3617,27 +3620,27 @@ null!=ea&&(X.filename=ea.getTitle());X.pagecount=null!=d.pages?d.pages.length:1;
1:1:"pagecount"==X?null!=d.pages?d.pages.length:1:da.apply(this,arguments)};var ba=f.labelLinkClicked;f.labelLinkClicked=function(X,ea,ka){var ja=ea.getAttribute("href");if(null==ja||!f.isCustomLink(ja)||!mxEvent.isTouchEvent(ka)&&mxEvent.isPopupTrigger(ka))ba.apply(this,arguments);else{if(!f.isEnabled()||null!=X&&f.isCellLocked(X.cell))f.customLinkClicked(ja),f.getRubberband().reset();mxEvent.consume(ka)}};this.editor.getOrCreateFilename=function(){var X=d.defaultFilename,ea=d.getCurrentFile();null!=
ea&&(X=null!=ea.getTitle()?ea.getTitle():X);return X};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(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&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(X){var ea=f.cellEditor.text2,ka=null;null!=ea&&(mxEvent.addListener(ea,"dragleave",function(ja){null!=ka&&(ka.parentNode.removeChild(ka),
-ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(I,V,Q,R,fa,la){f.insertImage(I,fa,la)},
-function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var V=0;V<I.length;V++)I[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(I){var V=Math.max(1,I.width);I=Math.max(1,I.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,V)),Q/Math.max(1,I));f.insertImage(decodeURIComponent(U),
-V*Q,I*Q)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
+ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(I,V,P,R,ha,la){f.insertImage(I,ha,la)},
+function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var V=0;V<I.length;V++)I[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(I){var V=Math.max(1,I.width);I=Math.max(1,I.height);var P=this.maxImageSize;P=Math.min(1,Math.min(P/Math.max(1,V)),P/Math.max(1,I));f.insertImage(decodeURIComponent(U),
+V*P,I*P)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
function(X,ea){mxSettings.setUnit(ea.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,Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top=
"14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,ea){0<this.editor.graph.getSelectionCount()?(X=this.editor.graph.getSelectionCell(),
X=this.editor.graph.getModel().getStyle(X),this.styleInput.value=X||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(X){return mxEvent.getSource(X)==this.styleInput?!0:qa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var O=null;mxEvent.addListener(f.container,"dragleave",
function(X){f.isEnabled()&&(null!=O&&(O.parentNode.removeChild(O),O=null),X.stopPropagation(),X.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(X){null==O&&(!mxClient.IS_IE||10<document.documentMode)&&(O=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(X){null!=O&&(O.parentNode.removeChild(O),O=null);if(f.isEnabled()){var ea=
mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka=X.dataTransfer.files,ja=f.view.translate,U=f.view.scale,I=ea.x/U-ja.x,V=ea.y/U-ja.y;if(0<ka.length)ea=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ea)?(!mxEvent.isShiftDown(X)&&ea&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,
-!0)):(mxEvent.isAltDown(X)&&(V=I=null),this.importFiles(ka,I,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=I=0);var Q=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,I,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
-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 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]()});
+!0)):(mxEvent.isAltDown(X)&&(V=I=null),this.importFiles(ka,I,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=I=0);var P=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,I,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
+ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var ha=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)||(ha=!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,sa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
+I,V,!0,ha,null,la,mxEvent.isControlDown(X)))});ha&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;sa()},mxEvent.isControlDown(X)):sa()}else null!=P&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),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="+
+P+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(P,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,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 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 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)||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 F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=F&&91!=F&&93!=F||(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),
+"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:"==
@@ -3647,150 +3650,150 @@ 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"),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(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 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(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
+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,m){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,
+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,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,
+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)}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();
+"/")+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 F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}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(F){this.handleError(F)}});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(),
-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,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
+(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 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=
+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));
+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!=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?
+""))}}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&&
-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.executeLayouts(this.editor.graph.createLayouts(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}),
+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(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(Z){}return Q});if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[H],"data",[G])}catch(Q){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):
+G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(Q){null!=Q?F.postMessage(JSON.stringify({event:"prompt",value:Q,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?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.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(Q){Q&&this.actions.get("exit").funct()}));try{Y.init()}catch(Q){F.postMessage(JSON.stringify({event:"draft",error:Q.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(Q,Z,oa){Q=Q||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==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(Q,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,Q,Z)}):null,X?mxUtils.bind(this,function(Q,Z,oa,wa){this.remoteInvoke("searchDiagrams",[Q,wa],null,Z,oa)}):null,mxUtils.bind(this,function(Q,Z,oa){this.remoteInvoke("getFileContent",[Q.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},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(Q,Z,oa,wa){Q=Q||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:wa,builtIn:!0,message:G}),"*"):(d(Q,H,Q!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],
+null,Q,function(){Q(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(Q,Z){this.remoteInvoke("searchDiagrams",[Q,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:Q,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();
+Q&&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;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);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}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;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.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,R=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=Q;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),ha=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==G.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(V)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);
+R(Q)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var sa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var Q=P.getGlobalVariable;P=this.createTemporaryGraph(P.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);P.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():
+"pagenumber"==Ba?1:Q.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(Z.root)}if(null!=G.layerIds){var wa=P.model,Aa=wa.getChildCells(wa.getRoot()),ta={};for(oa=0;oa<G.layerIds.length;oa++)ta[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)wa.setVisible(Aa[oa],ta[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){ha(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ha(null)}),null,null,G.scale,G.transparent,G.shadow,
+null,P,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(sa)},0):sa()):sa()}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(Q){200<=Q.getStatus()&&299>=Q.getStatus()?R("data:image/png;base64,"+Q.getText()):ha(null)}),mxUtils.bind(this,function(){ha(null)}))}}else sa=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Q.xml=mxUtils.getXml(Z);Q.data=this.getFileData(null,null,!0,null,null,null,Z);Q.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
+Q.data=this.getHtml(Z,this.editor.graph),Q.xml=mxUtils.getXml(Z),Q.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var oa=mxUtils.bind(this,function(wa){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(wa);F.postMessage(JSON.stringify(Q),"*")});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(Q.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(wa){G.embedImages||null==G.embedImages?this.editor.convertImages(wa,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(wa))}));return}F.postMessage(JSON.stringify(Q),"*")}),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(sa)},0):sa()):sa();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(){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();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,
+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var Q=this.editor.graph,Z=Q.maxFitScale;Q.maxFitScale=G.maxFitScale;Q.fit(2*J);Q.maxFitScale=Z;Q.container.scrollTop-=2*J;Q.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(Q){}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(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(Q){F.postMessage(JSON.stringify({event:"merge",message:G,error:Q}),"*")}))}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(Q){this.handleError(Q)}}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())}),T=mxUtils.bind(this,function(Q,Z){g=!0;try{d(Q,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,wa){oa=W();oa==q||g||(wa=this.createLoadMessage("autosave"),wa.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));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,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 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 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&&
+"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Q,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(Q){T(Q,H)},mxUtils.bind(this,function(Q){this.handleError(Q)}),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(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==Q.responseText.substring(0,13)&&T(Q.responseText,H)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(Q){T(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==G||"object"!==typeof G||null==G.format||null==
+G.data&&null==G.url?(G=da(G),T(G,H)):this.loadDescriptor(G,mxUtils.bind(this,function(Q){T(W(),H)}),mxUtils.bind(this,function(Q){this.handleError(Q,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.importCsv=function(d,f){try{var g=d.split("\n"),m=[],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 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!=
+":",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.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,P=null,R=40,ha=40,la=100,sa=0,u=function(){null!=f?f(na):(H.setSelectionCells(na),H.scrollCellToVisible(H.getSelectionCell()))},J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var T=null,Q="auto";ka=null;for(var Z=[],oa=null,wa=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 ta=d.indexOf(":");if(0<ta){var Ba=mxUtils.trim(d.substring(1,ta)),va=mxUtils.trim(d.substring(ta+1));"label"==Ba?T=H.sanitizeHtml(va):"labelname"==Ba&&0<va.length&&"-"!=va?Y=va:"labels"==Ba&&0<va.length&&"-"!=va?O=JSON.parse(va):"style"==Ba?aa=va:"parentstyle"==Ba?X=va:"unknownStyle"==Ba&&"-"!=va?qa=va:"stylename"==Ba&&0<va.length&&"-"!=va?ba=va:"styles"==Ba&&0<va.length&&"-"!=va?da=JSON.parse(va):"vars"==Ba&&0<va.length&&"-"!=va?G=JSON.parse(va):"identity"==Ba&&0<va.length&&
+"-"!=va?ea=va:"parent"==Ba&&0<va.length&&"-"!=va?ka=va:"namespace"==Ba&&0<va.length&&"-"!=va?ja=va:"width"==Ba?U=va:"height"==Ba?I=va:"left"==Ba&&0<va.length?V=va:"top"==Ba&&0<va.length?P=va:"ignore"==Ba?wa=va.split(","):"connect"==Ba?Z.push(JSON.parse(va)):"link"==Ba?oa=va:"padding"==Ba?sa=parseFloat(va):"edgespacing"==Ba?R=parseFloat(va):"nodespacing"==Ba?ha=parseFloat(va):"levelspacing"==Ba?la=parseFloat(va):"layout"==Ba&&(Q=va)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));
+var Oa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));ta=d=null;Ba=[];for(va=0;va<Oa.length;va++)ea==Oa[va]&&(d=va),ka==Oa[va]&&(ta=va),Ba.push(mxUtils.trim(Oa[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==T&&(T="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(va=Aa+1;va<g.length;va++){var Sa=this.editor.csvToArray(g[va].replace(/\r$/,""));if(null==Sa){var Ua=40<g[va].length?g[va].substring(0,40)+"...":g[va];throw Error(Ua+
+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Sa.length&&ea.push(Sa)}H.model.beginUpdate();try{for(va=0;va<ea.length;va++){Sa=ea[va];var Ka=null,bb=null!=d?ja+Sa[d]:null;null!=bb&&(Ka=H.model.getCell(bb));g=null!=Ka;var Va=new mxCell(T,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Va.vertex=!0;Va.id=bb;Ua=null!=Ka?Ka:Va;for(var Za=0;Za<Sa.length;Za++)H.setAttributeForCell(Ua,Ba[Za],Sa[Za]);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)):(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(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<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 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.executeLayouts(H.createLayouts(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 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="?",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||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();
+this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=ta?H.model.getCell(ja+Sa[ta]):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!=P&&null!=Ka.getAttribute(P)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(P)));var S="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=S&&"auto"!=S?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==S?M.width+sa: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+sa:parseFloat(I);J+=Ka.geometry.height+ha}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(va=0;va<q.length;va++)S="@"==U.charAt(0)?q[va].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[va].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=S||"auto"!=
+I&&"auto"!=ca||H.updateGroupBounds([q[va]],sa,!0);var fa=y.slice(),na=y.slice();for(Ca=0;Ca<Z.length;Ca++){var ra=Z[Ca];for(va=0;va<l.length;va++){Ka=l[va];var pa=mxUtils.bind(this,function(Ia,Da,La){var db=Da.getAttribute(La.from);if(null!=db&&""!=db){db=db.split(",");for(var ab=0;ab<db.length;ab++){var fb=C[La.to][db[ab]];if(null==fb&&null!=qa){fb=new mxCell(db[ab],new mxGeometry(N,W,0,0),qa);fb.style=H.replacePlaceholders(Da,fb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(fb);fb.geometry.width=
+ib.width+sa;fb.geometry.height=ib.height+sa;C[La.to][db[ab]]=fb;fb.vertex=!0;fb.id=db[ab];y.push(H.addCell(fb))}if(null!=fb){ib=La.label;null!=La.fromlabel&&(ib=(Da.getAttribute(La.fromlabel)||"")+(ib||""));null!=La.sourcelabel&&(ib=H.replacePlaceholders(Da,La.sourcelabel,G)+(ib||""));null!=La.tolabel&&(ib=(ib||"")+(fb.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(ib=(ib||"")+H.replacePlaceholders(fb,La.targetlabel,G));var tb="target"==La.placeholders==!La.invert?fb:Ia;tb=null!=La.style?H.replacePlaceholders(tb,
+La.style,G):H.createCurrentEdgeStyle();ib=H.insertEdge(null,null,ib||"",La.invert?fb:Ia,La.invert?Ia:fb,tb);if(null!=La.labels)for(tb=0;tb<La.labels.length;tb++){var qb=La.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==!La.invert?fb:Ia,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)}na.push(ib);mxUtils.remove(La.invert?Ia:fb,fa)}}}});pa(Ka,Ka,ra);if(null!=F[Ka.id])for(Za=0;Za<F[Ka.id].length;Za++)pa(Ka,F[Ka.id][Za],ra)}}if(null!=wa)for(va=0;va<l.length;va++)for(Ka=l[va],Za=0;Za<wa.length;Za++)H.setAttributeForCell(Ka,mxUtils.trim(wa[Za]),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 Ia=0;Ia<y.length;Ia++){var Da=
+H.getCellGeometry(y[Ia]);Da.x=Math.round(H.snap(Da.x));Da.y=Math.round(H.snap(Da.y));"auto"==U&&(Da.width=Math.round(H.snap(Da.width)));"auto"==I&&(Da.height=Math.round(H.snap(Da.height)))}};if("["==Q.charAt(0)){var Na=u;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(Q)),function(){Fa();Na()});u=null}else if("circle"==Q){var Pa=new mxCircleLayout(H);Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Qa=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Ia){return Qa.apply(this,arguments)||
+0>mxUtils.indexOf(y,Ia)};this.executeLayout(function(){Pa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&na.length==2*y.length-1&&1==fa.length){H.view.validate();var Ta=new mxCompactTreeLayout(H,"horizontaltree"==Q);Ta.levelDistance=ha;Ta.edgeRouting=!1;Ta.resetEdges=!1;this.executeLayout(function(){Ta.execute(H.getDefaultParent(),0<fa.length?fa[0]:null)},!0,u);u=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==fa.length){H.view.validate();
+var Ma=new mxHierarchicalLayout(H,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ma.intraCellSpacing=ha;Ma.parallelEdgeSpacing=R;Ma.interRankCellSpacing=la;Ma.disableEdgeStyle=!1;this.executeLayout(function(){Ma.execute(H.getDefaultParent(),na);H.moveCells(na,N,W)},!0,u);u=null}else if("organic"==Q||"auto"==Q&&na.length>y.length){H.view.validate();var ua=new mxFastOrganicLayout(H);ua.forceConstant=3*ha;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var za=ua.isVertexIgnored;
+ua.isVertexIgnored=function(Ia){return za.apply(this,arguments)||0>mxUtils.indexOf(y,Ia)};this.executeLayout(function(){ua.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=u&&u()}}catch(Ia){this.handleError(Ia)}};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"!=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 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,m,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(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<F?"&dpi="+F:"")+"&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,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 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 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)));
+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(),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(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,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&&m.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,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+
-q.allowedDomains[F]){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(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&
+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,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 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)}});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()}});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 F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;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!=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(F){null!=g&&g(F)}}),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(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(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=
+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,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,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,F,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,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,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>"===
+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,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=
-"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",
-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);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){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));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()?
+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 P(){U.removeChild(la);U.removeChild(sa);ha.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),ha=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 sa=document.createElement("div");sa.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):P();H=null});u.className="geCommentEditBtn";sa.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);P();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";sa.appendChild(J);U.insertBefore(sa,R);ha.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 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,P){function R(T,Q,Z){var oa=document.createElement("li");oa.className=
+"geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,T);oa.appendChild(wa);mxEvent.addListener(wa,"click",function(Aa){Q(Aa,ja);Aa.preventDefault();mxEvent.consume(Aa)});W.appendChild(oa);Z&&(oa.style.display="none")}function ha(){function T(oa){Q.push(Z);if(null!=oa.replies)for(var wa=0;wa<oa.replies.length;wa++)Z=Z.nextSibling,T(oa.replies[wa])}var Q=[],Z=sa;T(ja);return{pdiv:Z,replies:Q}}function la(T,Q,Z,oa,wa){function Aa(){g(Oa);ja.addReply(va,
+function(Ca){va.id=Ca;ja.replies.push(va);q(Oa);Z&&Z()},function(Ca){ta();l(Oa);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,wa)}function ta(){d(va,Oa,function(Ca){Aa()},!0)}var Ba=ha().pdiv,va=b.newComment(T,b.getCurrentUser());va.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Oa=y(va,ja.replies,Ba,V+1);Q?ta():Aa()}if(P||!ja.isResolved){ba.style.display="none";var sa=document.createElement("div");sa.className="geCommentContainer";sa.setAttribute("data-commentId",
+ja.id);sa.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(sa.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);sa.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");sa.appendChild(u);ja.isLocked&&(sa.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 T(){d(ja,sa,function(){g(sa);ja.editComment(ja.content,function(){q(sa)},function(Q){l(sa);T();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(sa);ja.deleteComment(function(T){if(!0===T){T=sa.querySelector(".geCommentTxt");
+T.innerHTML="";mxUtils.write(T,mxResources.get("msgDeleted"));var Q=sa.querySelectorAll(".geCommentAction");for(T=0;T<Q.length;T++)Q[T].parentNode.removeChild(Q[T]);q(sa);sa.style.opacity="0.5"}else{Q=ha(ja).replies;for(T=0;T<Q.length;T++)da.removeChild(Q[T]);for(T=0;T<U.length;T++)if(U[T]==ja){U.splice(T,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(T){l(sa);b.handleError(T,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(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",wa=ha(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",ta=0;ta<wa.length;ta++){wa[ta].style.backgroundColor=Aa;for(var Ba=wa[ta].querySelectorAll(".geCommentAction"),
+va=0;va<Ba.length;va++)Ba[va]!=Z.parentNode&&(Ba[va].style.display=oa);O||(wa[ta].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});sa.appendChild(u);null!=I?da.insertBefore(sa,I.nextSibling):da.appendChild(sa);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,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,sa,H.saveCallback,
+H.deleteOnCancel),ja.content=P):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return sa}}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(!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){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(P){g(V);b.addComment(P,function(R){P.id=R;X.push(P);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="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function V(Q){if(null!=Q){Q.sort(function(fa,la){return new Date(fa.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<Q.length;R++)V(Q[R].replies)}}I.sort(function(Q,R){return new Date(Q.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=I;for(I=0;I<X.length;I++)V(X[I].replies),
-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,
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function V(P){if(null!=P){P.sort(function(ha,la){return new Date(ha.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}I.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=I;for(I=0;I<X.length;I++)V(X[I].replies),
+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 ha=I[R.id];if(null!=ha)for(f(R,ha),ha=0;null!=R.replies&&ha<R.replies.length;ha++)ja(R.replies[ha])}
+if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),I={},V=0;V<U.length;V++){var P=U[V];I[P.getAttribute("data-commentId")]=P}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,E,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!=
+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")};
@@ -3838,8 +3841,8 @@ EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push
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);
+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()};
@@ -3847,9 +3850,9 @@ 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(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 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)}),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),E=mxEvent.getClientY(n);D.popup(t,E,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();
@@ -3857,7 +3860,7 @@ this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var E=new mxPopupMenu(th
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,E,d,f,g,m){t=this.createUrlParameters(t,E,d,f,g,m);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}))));
+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)})();
@@ -3867,30 +3870,30 @@ n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPag
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],
-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?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)};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!=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()):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!=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?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)||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)||
+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 P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),ha=C.cloneCells([R[0],I]);C.model.setTerminal(ha[0],C.model.getTerminal(R[0],
+!0),!0);var la=d(I),sa=P.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ha[1].geometry.x+=V?I.geometry.width+10:-ha[1].geometry.width-10:ha[1].geometry.y+=V?I.geometry.height+10:-ha[1].geometry.height-10;C.view.currentRoot!=P&&(ha[1].geometry.x-=sa.x,ha[1].geometry.y-=sa.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:-ha[1].geometry.width-
+10)*J:N.y+=(V?I.geometry.height+10:-ha[1].geometry.height-10)*J;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var T=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,Q=sa=R=0;Q<W.length;Q++){var Z=C.model.getTerminal(W[Q],!1);if(la==d(Z)){var oa=C.view.getState(Z);Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&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),sa=10+Math.max(sa,(Math.min(N.y+N.height,oa.y+oa.height)-Math.max(N.y,oa.y))/J))}}T?sa=0:R=0;for(Q=0;Q<W.length;Q++)if(Z=C.model.getTerminal(W[Q],!1),la==d(Z)&&(oa=C.view.getState(Z),Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&V!=oa.getCenterY()<u.getCenterY()))){var wa=[];C.traverse(oa.cell,!0,function(Aa,ta){var Ba=null!=ta&&C.isTreeEdge(ta);Ba&&wa.push(ta);(null==ta||Ba)&&wa.push(Aa);return null==ta||Ba});C.moveCells(wa,(V?1:-1)*R,(V?1:-1)*sa)}}}return C.addCells(ha,P)}finally{C.model.endUpdate()}}
+function g(I){C.model.beginUpdate();try{var V=d(I),P=C.getIncomingTreeEdges(I),R=C.cloneCells([P[0],I]);C.model.setTerminal(P[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],I,!1);var ha=C.model.getParent(I),la=ha.geometry,sa=[];C.view.currentRoot!=ha&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(I,!0,function(N,W){var T=null!=W&&C.isTreeEdge(W);T&&sa.push(W);(null==W||T)&&sa.push(N);return null==W||T});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(sa,u,J);return C.addCells(R,ha)}finally{C.model.endUpdate()}}function l(I,V){C.model.beginUpdate();try{var P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),ha=d(I);0==R.length&&(R=[C.createEdge(P,null,"",null,null,C.createCurrentEdgeStyle())],ha=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 sa=C.getCellStyle(la[1]).newEdgeStyle;if(null!=sa)try{var u=JSON.parse(sa),J;for(J in u)C.setCellStyles(J,u[J],[la[0]]),"edgeStyle"==J&&"elbowEdgeStyle"==u[J]&&C.setCellStyles("elbow",ha==mxConstants.DIRECTION_SOUTH||ha==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(oa){}}R=C.getOutgoingTreeEdges(I);var N=P.geometry;V=[];C.view.currentRoot==P&&(N=new mxRectangle);for(sa=0;sa<R.length;sa++){var W=C.model.getTerminal(R[sa],!1);null!=W&&V.push(W)}var T=C.view.getBounds(V),
+Q=C.view.translate,Z=C.view.scale;ha==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):ha==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=ha==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==T?I.geometry.y+(I.geometry.height-la[1].geometry.height)/2:(T.y+T.height)/Z-Q.y+-N.y+10);return C.addCells(la,P)}finally{C.model.endUpdate()}}function q(I,V,P){I=C.getOutgoingTreeEdges(I);P=C.view.getState(P);var R=[];if(null!=P&&null!=I){for(var ha=0;ha<I.length;ha++){var la=C.view.getState(C.model.getTerminal(I[ha],!1));null!=la&&(!V&&Math.min(la.x+la.width,P.x+P.width)>=Math.max(la.x,P.x)||V&&Math.min(la.y+la.height,P.y+
+P.height)>=Math.max(la.y,P.y))&&R.push(la)}R.sort(function(sa,u){return V?sa.x+sa.width-u.x-u.width:sa.y+sa.height-u.y-u.height})}return R}function y(I,V){var P=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=V?F.actions.get("selectParent").funct():P==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(P=C.getIncomingTreeEdges(I),null!=P&&0<P.length&&(R=q(C.model.getTerminal(P[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,P){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,P),this.addMenuItems(I,["selectDescendants"],null,P));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,P)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,P)}};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=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],
+!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=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],!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 P=[];C.traverse(I,!0,function(R,ha){var la=null!=ha&&C.isTreeEdge(ha);la&&P.push(ha);
+null!=ha&&!la||null!=V&&mxEvent.isShiftDown(V)||P.push(R);return null==ha||la})}C.setSelectionCells(P)}},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 P=[],R=0;R<I.length;R++){var ha=I[R];H.isEdge(ha)&&t(ha)&&(P.push(ha),ha=H.getTerminal(ha,!1));if(n(ha)){var la=[];C.traverse(ha,!0,function(sa,u){var J=null!=u&&C.isTreeEdge(u);J&&la.push(u);
+(null==u||J)&&la.push(sa);return null==u||J});0<la.length&&(P=P.concat(la),ha=C.getIncomingTreeEdges(I[R]),I=I.concat(ha))}else null!=ha&&P.push(I[R])}I=P;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(I,V,P){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,P))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var P=I.slice(0),R=0;R<P.length;R++){var ha=C.view.getState(P[R]);if(null!=ha&&n(ha.cell)){var la=C.getIncomingTreeEdges(ha.cell);
+for(ha=0;ha<la.length;ha++)mxUtils.remove(la[ha],I)}}this.model.beginUpdate();try{var sa=da.call(this,I,V);if(sa.length==I.length)for(R=0;R<I.length;R++)if(n(I[R])){var u=C.getIncomingTreeEdges(sa[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),sa[R])}}}finally{this.model.endUpdate()}return sa};var ba=C.moveCells;C.moveCells=function(I,V,P,R,ha,la,sa){var u=null;this.model.beginUpdate();
+try{var J=ha,N=this.getCurrentCellStyle(ha);if(null!=I&&n(ha)&&"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)){ha=C.model.getParent(I[W]);break}if(null!=J&&ha!=J&&null!=this.view.getState(I[0])){var T=C.getIncomingTreeEdges(I[0]);if(0<T.length){var Q=C.view.getState(C.model.getTerminal(T[0],!0));if(null!=Q){var Z=C.view.getState(J);null!=Z&&(V=(Z.getCenterX()-Q.getCenterX())/C.view.scale,P=(Z.getCenterY()-
+Q.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])&&(T=C.getIncomingTreeEdges(I[W]),0<T.length))if(!R)n(J)&&0>mxUtils.indexOf(I,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[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(T[0],
+!0);R=this.cloneCell(T[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,P,R){var ha=C.model,la=null;ha.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var sa=0;sa<la.length;sa++)if(ha.isEdge(la[sa])&&null==ha.getTerminal(la[sa],!0)){ha.setTerminal(la[sa],I,!0);var u=C.getCellGeometry(la[sa]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{ha.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 P=qa[I.keyCode];null!=P&&(P.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,P,R,ha,la,sa){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(P,R){var ha=null!=R&&C.isTreeEdge(R);ha&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||ha)&&0>mxUtils.indexOf(V,P)&&V.push(P);return null==R||ha});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"!==
@@ -3898,23 +3901,23 @@ typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.c
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 m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=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(m);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;');
+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 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 m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(f);t.insert(m);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",
+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)}));
+"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 P=O.menus.get(I);I=U.addMenu(V,mxUtils.bind(this,function(){P.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";X.appendChild(I);return I}var ka=document.createElement("div");ka.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;";ka.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
"5px";ja.innerHTML="+";ka.appendChild(ja);mxUtils.write(ka,mxResources.get("moreShapes"));X.appendChild(ka);mxEvent.addListener(ka,"click",function(){O.actions.get("shapes").funct()});var U=new Menubar(O,X);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?ka.style.bottom="0":null!=O.actions.get("newLibrary")?(ka=document.createElement("div"),ka.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
ka.className="geTitle",ja=document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("newLibrary")),ka.appendChild(ja),X.appendChild(ka),mxEvent.addListener(ka,"click",O.actions.get("newLibrary").funct),ka=document.createElement("div"),ka.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;",ka.className="geTitle",ja=
@@ -3923,8 +3926,8 @@ ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft
"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ea.container.clientHeight-ka)/2):56,X-6,ka-6,function(ja){e(O,ja)});O.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.sidebarWindow.window.fit()}));O.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);O.sidebarWindow.window.setVisible(!0);O.getLocalData("sidebar",function(ja){O.sidebar.showEntries(ja,null,!0)});O.restoreLibraries()}else O.sidebarWindow.window.setVisible(null!=
X?X:!O.sidebarWindow.window.isVisible())}else null==O.sidebarElt&&(O.sidebarElt=D(),e(O,O.sidebarElt),O.sidebarElt.style.border="none",O.sidebarElt.style.width="210px",O.sidebarElt.style.borderRight="1px solid gray"),ea=O.diagramContainer.parentNode,null!=O.sidebarElt.parentNode?(O.sidebarElt.parentNode.removeChild(O.sidebarElt),ea.style.left="0px"):(ea.parentNode.appendChild(O.sidebarElt),ea.style.left=O.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,X,ea,ka,ja,U,I){var V=D();I(V);this.window=new mxWindow(X,V,ea,ka,
-ja,U,!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(Q,R){var fa=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;Q=Math.max(0,Math.min(Q,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,fa-la.clientHeight-
-2));this.getX()==Q&&this.getY()==R||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&O.isSelectionAllowed(Q)}))};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=
+ja,U,!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(P,R){var ha=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;P=Math.max(0,Math.min(P,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,ha-la.clientHeight-
+2));this.getX()==P&&this.getY()==R||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&O.isSelectionAllowed(P)}))};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;
@@ -3942,8 +3945,8 @@ 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=
@@ -3963,81 +3966,81 @@ mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("
ea=O.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(R){O.setSketchMode(!Editor.sketchMode)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.sketchMode});ea=O.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(R){O.setPagesVisible(!Editor.pagesVisible)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.pagesVisible});O.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){X.popupMenuHandler.hideMenu();
O.showImportCsvDialog()}));O.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var R=new ParseDialog(O,"Insert from Text");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var R=new ParseDialog(O,"Insert from Text","formatSql");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(O)},
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.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("insertAdvanced",la,ra,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,ra)):(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%;";
+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,ha){var la=this.editorUi.editor.graph,sa=la.getSelectionCell();ka.call(this,R,sa,null,ha);this.addMenuItems(R,["editTooltip"],ha);la.model.isVertex(sa)&&this.addMenuItems(R,["editGeometry"],ha);this.addMenuItems(R,["-","edit"],ha)})));this.addPopupMenuCellEditItems=function(R,ha,la,sa){R.addSeparator();
+this.addSubmenu("editCell",R,sa,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(R,ha){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],ha);O.menus.addSubmenu("openFrom",R,ha);isLocalStorage&&this.addSubmenu("openRecent",R,ha);R.addSeparator(ha);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],ha):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],ha),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
+"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ha):O.menus.addMenuItems(R,["makeCopy"],ha));R.addSeparator(ha);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ha),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],ha));O.menus.addMenuItems(R,["autosave"],ha);if(null!=la&&(R.addSeparator(ha),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ha),null!=O.fileNode&&
+"1"!=urlParams.embedInline)){var sa=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(sa)&&!/(\.svg)$/i.test(sa))&&this.addMenuItems(R,["-","properties"],ha)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,ha){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,ha,mxResources.get("preferences"));R.addSeparator(ha);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),
+ha);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],ha);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],ha),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ha);R.addSeparator(ha)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],ha):"1"!=urlParams.noFileMenu&&
+("1"!=urlParams.sketch?(O.menus.addMenuItems(R,["new"],ha),O.menus.addSubmenu("openFrom",R,ha),isLocalStorage&&this.addSubmenu("openRecent",R,ha),R.addSeparator(ha),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ha),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],ha)),R.addSeparator(ha),O.menus.addSubmenu("save",R,ha)):O.menus.addSubmenu("file",R,ha));O.menus.addSubmenu("exportAs",R,ha);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp?O.menus.addMenuItems(R,["import"],ha):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,ha);O.commentsSupported()&&O.menus.addMenuItems(R,["-","comments"],ha);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),ha);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],ha);"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(ha);O.menus.addSubmenu("help",R,ha);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],ha):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,ha){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy",
+"-","rename","moveToFolder"],ha):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],ha),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ha):O.menus.addMenuItems(R,["makeCopy"],ha));O.menus.addMenuItems(R,["-","autosave"],ha);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],ha)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,ha){ja.funct(R,ha);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||O.menus.addMenuItems(R,["publishLink"],ha);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(ha),O.menus.addSubmenu("embed",R,ha))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,ha){O.menus.addInsertTableCellItem(R,ha)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,ha){I.funct(R,ha);this.addMenuItems(R,["-","pageScale","-","ruler"],ha)})))}this.put("extras",new Menu(mxUtils.bind(this,
+function(R,ha){null!=U&&O.menus.addSubmenu("language",R,ha);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,ha);O.menus.addSubmenu("units",R,ha);R.addSeparator(ha);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),ha);"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"],ha);R.addSeparator(ha);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),ha):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",ha),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",ha));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],ha);
+R.addSeparator(ha);O.mode!=App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],ha);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],ha);R.addSeparator(ha)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,ha){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ha)})));mxUtils.bind(this,function(){var R=this.get("insert"),ha=R.funct;R.funct=function(la,
+sa){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],sa),O.menus.addMenuItems(la,["insertImage","insertLink","-"],sa),O.menus.addSubmenu("insertAdvanced",la,sa,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,sa)):(ha.apply(this,arguments),O.menus.addSubmenu("table",la,sa))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),P=function(R,ha,la,sa){R.addItem(la,null,mxUtils.bind(this,
+function(){var u=new CreateGraphDialog(O,la,sa);O.showDialog(u.container,620,420,!0,!1);u.init()}),ha)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,ha){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(ha):P(R,ha,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,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=
+function(){function O(ua,za,Ia){var Da=U.menus.get(ua),La=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Da.funct.apply(this,arguments)}),P);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(ua));U.menus.menuCreated(Da,
+La,"geMenuItem");null!=Ia?(La.style.backgroundImage="url("+Ia+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):za||(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(ua,za,Ia,Da,La,db){var ab=document.createElement("a");ab.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ab.style.display="inline-block";ab.style.boxSizing="border-box";ab.style.height="30px";ab.style.padding="6px";ab.style.position="relative";ab.style.verticalAlign="top";ab.style.top="0px";"1"==urlParams.sketch&&(ab.style.borderStyle="none",ab.style.boxShadow="none",ab.style.padding="6px",ab.style.margin="0px");null!=U.statusContainer?V.insertBefore(ab,U.statusContainer):V.appendChild(ab);null!=db?(ab.style.backgroundImage="url("+db+")",ab.style.backgroundPosition=
+"center center",ab.style.backgroundRepeat="no-repeat",ab.style.backgroundSize="24px 24px",ab.style.width="34px"):mxUtils.write(ab,ua);mxEvent.addListener(ab,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(ab,"click",function(fb){"disabled"!=ab.getAttribute("disabled")&&za(fb);mxEvent.consume(fb)});null==Ia&&(ab.style.marginRight="4px");null!=Da&&ab.setAttribute("title",Da);null!=La&&(ua=function(){La.isEnabled()?(ab.removeAttribute("disabled"),
+ab.style.cursor="pointer"):(ab.setAttribute("disabled","disabled"),ab.style.cursor="default")},La.addListener("stateChanged",ua),I.addListener("enabledChanged",ua),ua());return ab}function ea(ua,za,Ia){Ia=document.createElement("div");Ia.className="geMenuItem";Ia.style.display="inline-block";Ia.style.verticalAlign="top";Ia.style.marginRight="6px";Ia.style.padding="0 4px 0 4px";Ia.style.height="30px";Ia.style.position="relative";Ia.style.top="0px";"1"==urlParams.sketch&&(Ia.style.boxShadow="none");
+for(var Da=0;Da<ua.length;Da++)null!=ua[Da]&&("1"==urlParams.sketch&&(ua[Da].style.padding="10px 8px",ua[Da].style.width="30px"),ua[Da].style.margin="0px",ua[Da].style.boxShadow="none",Ia.appendChild(ua[Da]));null!=za&&mxUtils.setOpacity(Ia,za);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ia,U.statusContainer):V.appendChild(Ia);return Ia}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var ua=
+V.firstChild;null!=ua;){var za=ua.nextSibling;"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}P=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>n||"1"==urlParams.sketch;var Ia=null;ua||(Ia=O("diagram"));za=ua?O("diagram",null,Editor.drawLogoImage):null;null!=za&&(Ia=za);ea([Ia,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),ua?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"),ua?Editor.formatImage:null)],ua?60:null);za=O("insert",!0,ua?J:null);ea([za,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ya,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!=Ia&&(mxEvent.disableContextMenu(Ia),mxEvent.addGestureListeners(Ia,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));za=U.menus.get("language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+n&&"1"!=urlParams.sketch?(null==Na&&(za=R.addMenu("",za.funct),za.setAttribute("title",mxResources.get("language")),za.className="geToolbarButton",za.style.backgroundImage="url("+Editor.globeImage+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.position="absolute",za.style.height="24px",za.style.width="24px",za.style.zIndex="1",za.style.right="8px",za.style.cursor="pointer",za.style.top="1"==urlParams.embed?"12px":
+"11px",V.appendChild(za),Na=za),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Na&&(Na.parentNode.removeChild(Na),Na=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),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",
+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 ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Ia=U.embedViewport.x+
+U.embedViewport.width,Da=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),db=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(ua,Ia-za))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Da,db-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");
-U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var ra=document.createElement("div");
-ra.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){ra.style.top="20px";U.titlebar=document.createElement("div");U.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;";
-U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}var J=U.menus.get("viewZoom"),N="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,W="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null;u=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});U.addListener("darkModeChanged",u);U.addListener("sketchModeChanged",
-u);var Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)P.style.left="10px",P.style.top="10px",S.style.left="10px",S.style.top="60px",W.style.top="10px",W.style.right="12px",W.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
-"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var za=U.diagramContainer.getAttribute("data-bounds");if(null!=za){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var wa=I.getGraphBounds();za=za.split(" ");U.diagramContainer.style.top=za[0];U.diagramContainer.style.left=za[1];U.diagramContainer.style.width=wa.width+50+"px";U.diagramContainer.style.height=wa.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
-"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}P.style.left=U.diagramContainer.offsetLeft+"px";P.style.top=U.diagramContainer.offsetTop-P.offsetHeight-4+"px";S.style.display="";S.style.left=U.diagramContainer.offsetLeft-S.offsetWidth-4+"px";S.style.top=U.diagramContainer.offsetTop+"px";W.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-W.offsetWidth+"px";W.style.top=P.style.top;
-W.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
-2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";P.style.visibility="";W.style.visibility=""}),oa=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});u=mxUtils.bind(this,
-function(){oa();b(U,!0);U.initFormatWindow();var za=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(za.x+za.width+4,za.y)});U.addListener("inlineFullscreenChanged",oa);U.addListener("editInlineStart",u);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",u);U.addListener("editInlineStop",mxUtils.bind(this,function(za){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
-"hidden";U.rightResizer.style.visibility="hidden";P.style.visibility="hidden";W.style.visibility="hidden";S.style.display="none"}));if(null!=U.hoverIcons){var va=U.hoverIcons.update;U.hoverIcons.update=function(){I.freehand.isDrawing()||va.apply(this,arguments)}}if(null!=I.freehand){var Aa=I.freehand.createStyle;I.freehand.createStyle=function(za){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";W.className="geToolbarContainer";P.className="geToolbarContainer";
-V.className="geToolbarContainer";U.picker=S;var sa=!1;"1"!=urlParams.embed&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){sa||(U.statusContainer.style.display="none")}));var Ba=mxUtils.bind(this,function(za){null!=U.notificationBtn&&(null!=za?U.notificationBtn.setAttribute("title",za):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":"";U.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",sa=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var za=null!=U.statusContainer.firstChild&&
-"function"===typeof U.statusContainer.firstChild.getAttribute?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(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()},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("",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%",
-J.funct);pa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.textDecoration="none";pa.style.overflow="hidden";pa.style.visibility="hidden";pa.style.textAlign="center";pa.style.cursor="pointer";pa.style.height=parseInt(U.tabContainerHeight)-1+"px";pa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";pa.style.position="absolute";pa.style.display="block";pa.style.fontSize="12px";pa.style.width=
-"59px";pa.style.right="0px";pa.style.bottom="0px";pa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";pa.style.backgroundPosition="right 6px center";pa.style.backgroundRepeat="no-repeat";ra.appendChild(pa)}(function(za){var wa=mxUtils.bind(this,function(){za.innerHTML="";mxUtils.write(za,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,wa);U.editor.addListener("resetGraphView",wa);U.editor.addListener("pageSelected",wa)})(pa);var ya=
-U.setGraphEnabled;U.setGraphEnabled=function(){ya.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}ra.appendChild(V);ra.appendChild(U.diagramContainer);ja.appendChild(ra);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==W&&ra.appendChild(U.tabContainer);
-var Fa=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";S.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(za){mxEvent.getSource(za)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(za),mxEvent.getClientY(za)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
-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,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\nconfAIgnoreCollectErr=Ignore collecting current pages errors\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;
+mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var P=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 ha=U.hideCurrentMenu;U.hideCurrentMenu=function(){ha.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
+var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var ua=U.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);V.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
+U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var sa=document.createElement("div");
+sa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){sa.style.top="20px";U.titlebar=document.createElement("div");U.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;";
+U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}u=U.menus.get("viewZoom");var J="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});U.addListener("darkModeChanged",Q);U.addListener("sketchModeChanged",
+Q);var Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)T.style.left="10px",T.style.top="10px",W.style.left="10px",W.style.top="60px",N.style.top="10px",N.style.right="12px",N.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
+"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var ua=U.diagramContainer.getAttribute("data-bounds");if(null!=ua){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var za=I.getGraphBounds();ua=ua.split(" ");U.diagramContainer.style.top=ua[0];U.diagramContainer.style.left=ua[1];U.diagramContainer.style.width=za.width+50+"px";U.diagramContainer.style.height=za.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
+"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}T.style.left=U.diagramContainer.offsetLeft+"px";T.style.top=U.diagramContainer.offsetTop-T.offsetHeight-4+"px";W.style.display="";W.style.left=U.diagramContainer.offsetLeft-W.offsetWidth-4+"px";W.style.top=U.diagramContainer.offsetTop+"px";N.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-N.offsetWidth+"px";N.style.top=T.style.top;
+N.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
+2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";T.style.visibility="";N.style.visibility=""}),oa=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});Q=mxUtils.bind(this,
+function(){oa();b(U,!0);U.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y)});U.addListener("inlineFullscreenChanged",oa);U.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",Q);U.addListener("editInlineStop",mxUtils.bind(this,function(ua){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
+"hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}));if(null!=U.hoverIcons){var wa=U.hoverIcons.update;U.hoverIcons.update=function(){I.freehand.isDrawing()||wa.apply(this,arguments)}}if(null!=I.freehand){var Aa=I.freehand.createStyle;I.freehand.createStyle=function(ua){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";N.className="geToolbarContainer";T.className="geToolbarContainer";
+V.className="geToolbarContainer";U.picker=W;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){ta||(U.statusContainer.style.display="none")}));var Ba=mxUtils.bind(this,function(ua){null!=U.notificationBtn&&(null!=ua?U.notificationBtn.setAttribute("title",ua):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":
+"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",ta=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var ua=
+null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ba(ua);var za=U.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",ta=!0):6<U.buttonContainer.clientWidth&&
+(U.statusContainer.style.display="none",ta=!1)}else U.statusContainer.style.display="inline-block",Ba(null),ta=!0;V.style.visibility=20>V.clientWidth&&!ta?"hidden":""}}));pa=O("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";T.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
+this.appIconClicked(ua)}),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 va=document.createElement("a");
+va.style.padding="0px";va.style.boxShadow="none";va.className="geMenuItem";va.style.display="inline-block";va.style.width="40px";va.style.height="12px";va.style.marginBottom="-2px";va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";va.style.backgroundPosition="top center";va.style.backgroundRepeat="no-repeat";va.setAttribute("title","Minimize");var Oa=!1,Ca=mxUtils.bind(this,function(){W.innerHTML="";if(!Oa){var ua=function(Da,La,db){Da=X("",Da.funct,null,La,Da,db);Da.style.width=
+"40px";Da.style.opacity="0.7";return za(Da,null,"pointer")},za=function(Da,La,db){null!=La&&Da.setAttribute("title",La);Da.style.cursor=null!=db?db:"default";Da.style.margin="2px 0px";W.appendChild(Da);mxUtils.br(W);return Da};za(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)");za(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"));za(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");za(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;za(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=za(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"})();ua(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Ia=U.actions.get("toggleShapes");ua(Ia,mxResources.get("shapes")+
+" ("+Ia.shortcut+")",J);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";za(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";za(pa,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(va)});mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Oa?(mxUtils.setPrefixedStyle(W.style,
+"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.width="40px",va.style.height="12px",va.setAttribute("title","Minimize"),Oa=!1,Ca()):(W.innerHTML="",W.appendChild(va),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",va.style.height="24px",va.style.backgroundImage=
+"url("+Editor.plusImage+")",va.setAttribute("title",mxResources.get("insert")),va.style.width="24px",Oa=!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!=u){var Sa=function(ua){mxEvent.isShiftDown(ua)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(ua)):mxEvent.isAltDown(ua)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
+mxEvent.consume(ua))},Ua=U.actions.get("zoomIn"),Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Va=U.actions.get("undo"),Za=U.actions.get("redo"),z=X("",Va.funct,null,mxResources.get("undo")+" ("+Va.shortcut+")",Va,Editor.undoImage),L=X("",Za.funct,null,mxResources.get("redo")+" ("+Za.shortcut+")",Za,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){bb=function(){ra.style.display=null!=U.pages&&("0"!=
+urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,za=U.getPageIndex(U.currentPage);za=null!=za?za+1:1;var Ia=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+za+"/"+ua+")"+(null!=Ia?" ["+Ia+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),fa=X("",ca.funct,null,mxResources.get("delete"),ca,
+Editor.trashImage);fa.style.opacity="0.1";T.appendChild(fa);ca.addListener("stateChanged",function(){fa.style.opacity=ca.enabled?"":"0.1"});var na=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=Za.enabled?"":"0.1"};T.appendChild(z);T.appendChild(L);Va.addListener("stateChanged",na);Za.addListener("stateChanged",na);na();var ra=this.createPageMenuTab(!1,!0);ra.style.display=
+"none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";N.appendChild(ra);U.editor.addListener("pagesPatched",
+S);U.editor.addListener("pageSelected",S);U.editor.addListener("pageRenamed",S);U.editor.addListener("fileLoaded",S);S();U.addListener("fileDescriptorChanged",bb);U.addListener("pagesVisibleChanged",bb);U.editor.addListener("pagesPatched",bb);bb();bb=X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ka,Editor.zoomOutImage);N.appendChild(bb);var pa=R.addMenu("100%",u.funct);pa.setAttribute("title",mxResources.get("zoom"));pa.innerHTML="100%";pa.style.display="inline-block";
+pa.style.color="inherit";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";N.appendChild(pa);u=X("",Ua.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ua,Editor.zoomInImage);N.appendChild(u);Q.visible&&(N.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"),N.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;";
+T.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;";N.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;";sa.appendChild(T);sa.appendChild(N);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(W.style.touchAction="none");sa.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(sa)}else{var ya=X("",Sa,!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%",
+u.funct);pa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.textDecoration="none";pa.style.overflow="hidden";pa.style.visibility="hidden";pa.style.textAlign="center";pa.style.cursor="pointer";pa.style.height=parseInt(U.tabContainerHeight)-1+"px";pa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";pa.style.position="absolute";pa.style.display="block";pa.style.fontSize="12px";pa.style.width=
+"59px";pa.style.right="0px";pa.style.bottom="0px";pa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";pa.style.backgroundPosition="right 6px center";pa.style.backgroundRepeat="no-repeat";sa.appendChild(pa)}(function(ua){mxEvent.addListener(ua,"click",Sa);var za=mxUtils.bind(this,function(){ua.innerHTML="";mxUtils.write(ua,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);U.editor.addListener("resetGraphView",za);U.editor.addListener("pageSelected",
+za)})(pa);var Fa=U.setGraphEnabled;U.setGraphEnabled=function(){Fa.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==N?this.tabContainerHeight+"px":"0px")}}sa.appendChild(V);sa.appendChild(U.diagramContainer);ja.appendChild(sa);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==N&&sa.appendChild(U.tabContainer);
+var Na=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";W.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
+ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Pa=null,Qa=null,Ta=null,Ma=null;mxEvent.addGestureListeners(ja,function(ua){Ma=parseInt(U.diagramContainer.style.height);Qa=mxEvent.getClientY(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(ua){Ta=parseInt(U.diagramContainer.style.width);Pa=
+mxEvent.getClientX(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=Pa&&(U.diagramContainer.style.width=Math.max(20,Ta+mxEvent.getClientX(ua)-Pa)+"px",za=!0);null!=Qa&&(U.diagramContainer.style.height=Math.max(20,Ma+mxEvent.getClientY(ua)-Qa)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
+"*"),Z(),U.refresh())},function(ua){null==Pa&&null==Qa||mxEvent.consume(ua);Qa=Pa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.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,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\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\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"]?
@@ -4047,7 +4050,7 @@ this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageI
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 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=
@@ -4073,11 +4076,11 @@ GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.
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)}),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,m=0,q=null,y=null,F=null,C=null,H=0;H<g.length;H++){var G=
+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(),
@@ -4087,8 +4090,8 @@ q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style
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!=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*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():
+(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"}))};
@@ -4100,8 +4103,8 @@ 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 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(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&&(E.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+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))};
@@ -4113,7 +4116,7 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewe
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,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 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 m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
+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 5bc3eb6e..6741c3d9 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -108,9 +108,9 @@ return a}();
a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
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.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i};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";
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.0",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]"!==
@@ -1989,53 +1989,53 @@ 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(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,E,d,f,g,m){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+=
+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=
+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,E,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 F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
+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(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*
+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 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");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.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,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?(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=
+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 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)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+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,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";
+"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,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="",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 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 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 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(m);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,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)),
+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,E,d,f,g,m,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");
+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==E)F.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")+
+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!=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);
+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 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)});
@@ -2045,44 +2045,43 @@ document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dis
(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",m="";if(E.isGridEnabled()||E.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=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);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=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=m,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=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=m,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=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
+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,m=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*m.x,g*m.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),
+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 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=
+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,
-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+E.width/this.scale)/q)-m)*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,m,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 m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(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=
+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 P=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((P.x+V.x)*R,(P.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(" "),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<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<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"!=
-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,
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var V=n.getCellStyle(I,!1),P=[],R=[],ha;for(ha in V)P.push(V[ha]),R.push(ha);n.getModel().isEdge(I)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",P,"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(" "),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,P,R,ha,la,sa){R=null!=R?R:n.currentVertexStyle;ha=null!=ha?ha:n.currentEdgeStyle;la=null!=la?la:!0;P=null!=P?P:n.getModel();if(sa){sa=[];for(var u=0;u<I.length;u++)sa=sa.concat(P.getDescendants(I[u]));I=sa}P.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
+"fontFamily","fontColor"];else{var W=P.getStyle(J),T=null!=W?W.split(";"):[];N=t.slice();for(var Q=0;Q<T.length;Q++){var Z=T[Q],oa=Z.indexOf("=");if(0<=oa){var wa=Z.substring(0,oa),Aa=mxUtils.indexOf(N,wa);0<=Aa&&N.splice(Aa,1);for(sa=0;sa<l.length;sa++){var ta=l[sa];if(0<=mxUtils.indexOf(ta,wa))for(var Ba=0;Ba<ta.length;Ba++){var va=mxUtils.indexOf(N,ta[Ba]);0<=va&&N.splice(va,1)}}}}}var Oa=P.isEdge(J);sa=Oa?ha:R;var Ca=P.getStyle(J);for(Q=0;Q<N.length;Q++){wa=N[Q];var Sa=sa[wa];null!=Sa&&"edgeStyle"!=
+wa&&("shape"!=wa||Oa)&&(!Oa||la||0>mxUtils.indexOf(d,wa))&&(Ca=mxUtils.setStyle(Ca,wa,Sa))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));P.setStyle(J,Ca)}}finally{P.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 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,
-X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,V=[];null!=I;){var Q=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),V.push(I));I=Q}I=this.toolbar.fontMenu;Q=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=qa}ba=n.cellEditor.isContentEditing();
-Y=I;qa=Q;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var I=!1,V=function(){I||(I=!0,window.setTimeout(function(){var Q=n.getSelectedEditingElement();null!=Q&&(Q=mxUtils.getCurrentStyle(Q),null!=Q&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(Q.fontFamily)),ea.toolbar.setFontSize(parseInt(Q.fontSize))));I=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
-"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(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==
+X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,V=[];null!=I;){var P=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),V.push(I));I=P}I=this.toolbar.fontMenu;P=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=qa}ba=n.cellEditor.isContentEditing();
+Y=I;qa=P;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var I=!1,V=function(){I||(I=!0,window.setTimeout(function(){var P=n.getSelectedEditingElement();null!=P&&(P=mxUtils.getCurrentStyle(P),null!=P&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(P.fontFamily)),ea.toolbar.setFontSize(parseInt(P.fontSize))));I=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
+"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(P){ea.handleError(P)}};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,P){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,P){this.menus.createPopupMenu(I,V,P)}));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 P=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
+(P.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(P[P.length-1]))},0));q(P)});this.addListener("styleChanged",mxUtils.bind(this,function(I,V){var P=V.getProperty("cells"),R=I=!1;if(0<P.length)for(var ha=0;ha<P.length&&(I=n.getModel().isVertex(P[ha])||I,!(R=n.getModel().isEdge(P[ha])||R)||!I);ha++);else R=I=!0;P=V.getProperty("keys");V=V.getProperty("values");for(ha=0;ha<P.length;ha++){var la=0<=mxUtils.indexOf(f,P[ha]);if("strokeColor"!=
+P[ha]||null!=V[ha]&&"none"!=V[ha])if(0<=mxUtils.indexOf(E,P[ha]))R||0<=mxUtils.indexOf(g,P[ha])?null==V[ha]?delete n.currentEdgeStyle[P[ha]]:n.currentEdgeStyle[P[ha]]=V[ha]:I&&0<=mxUtils.indexOf(t,P[ha])&&(null==V[ha]?delete n.currentVertexStyle[P[ha]]:n.currentVertexStyle[P[ha]]=V[ha]);else if(0<=mxUtils.indexOf(t,P[ha])){if(I||la)null==V[ha]?delete n.currentVertexStyle[P[ha]]:n.currentVertexStyle[P[ha]]=V[ha];if(R||la||0<=mxUtils.indexOf(g,P[ha]))null==V[ha]?delete n.currentEdgeStyle[P[ha]]:n.currentEdgeStyle[P[ha]]=
+V[ha]}}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],
-mxUtils.getValue(n.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",n.currentEdgeStyle.shape,n.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(n.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var I=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),Q=n.getView().getState(n.getSelectionCell());
-null!=Q&&(I=Q.style[mxConstants.STYLE_FONTFAMILY]||I,V=Q.style[mxConstants.STYLE_FONTSIZE]||V,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(I,V){I=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=I&&0<I.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
+(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&&(b=mxUtils.bind(this,function(){var I=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),P=n.getView().getState(n.getSelectionCell());null!=P&&(I=
+P.style[mxConstants.STYLE_FONTFAMILY]||I,V=P.style[mxConstants.STYLE_FONTSIZE]||V,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(I,V){I=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=I&&0<I.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
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;
@@ -2094,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]),E=D.getIndex(n),d=null,f=1,g=1,m=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+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=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}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 E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.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(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 F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.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,m,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)}))}};
+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,E,d){var f=null;if(null!=E&&0<E.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>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!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.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=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(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<E&&(f.style.top=Math.max(m.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<E&&(f.style.left=Math.max(m.container.scrollLeft+22,b-E)+"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)};
@@ -2118,49 +2117,51 @@ EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&
D.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(t){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.getCssClassForMarker=function(b,e,k,n){return"flexArrow"==e?null!=k&&k!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":"box"==k||"halfCircle"==k?"geSprite geSvgSprite geSprite-"+k+("end"==b?" geFlipSprite":""):k==mxConstants.ARROW_CLASSIC?"1"==n?"geSprite geSprite-"+b+"classic":"geSprite geSprite-"+b+"classictrans":k==mxConstants.ARROW_CLASSIC_THIN?"1"==n?"geSprite geSprite-"+b+"classicthin":"geSprite geSprite-"+b+"classicthintrans":k==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+b+"open":k==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+b+"openthin":k==mxConstants.ARROW_BLOCK?"1"==n?"geSprite geSprite-"+b+"block":"geSprite geSprite-"+b+"blocktrans":k==mxConstants.ARROW_BLOCK_THIN?"1"==n?"geSprite geSprite-"+b+"blockthin":"geSprite geSprite-"+b+"blockthintrans":k==mxConstants.ARROW_OVAL?"1"==n?"geSprite geSprite-"+b+"oval":"geSprite geSprite-"+b+"ovaltrans":k==mxConstants.ARROW_DIAMOND?"1"==n?"geSprite geSprite-"+b+"diamond":"geSprite geSprite-"+b+"diamondtrans":
-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.updateCssForMarker=function(b,e,k,n,D){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerHTML="";"flexArrow"==k?b.className=null!=n&&n!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(n,D),null!=k?(n=document.createElement("img"),n.style.position="absolute",n.style.marginTop="0.5px",n.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(n.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
+(n.style.filter="invert(100%)"),b.appendChild(n)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
+k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(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),m=new mxGraphModel,q=m.getChildAt(m.getRoot(),
-0),y=0;y<g.length;y++){m.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(E[y])&&null==f[mxObjectIdentity.get(m.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=
+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,
-W=mxRectangle.fromRectangle(ra);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/=N;J=b.container.scrollTop;var S=b.container.scrollLeft,P=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)P+=3;var Z=b.container.offsetWidth-P;P=b.container.offsetHeight-P;Q=Q?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-Q*W.width)/2/Q;var oa=0==this.lightboxVerticalDivider?0:(P-Q*W.height)/this.lightboxVerticalDivider/Q;u&&(R=Math.max(R,0),oa=Math.max(oa,0));if(u||ra.width<Z||ra.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";
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*R.width),this.scale*(this.translate.y+P.y*R.height),this.scale*P.width*R.width,
+this.scale*P.height*R.height)};b.getPreferredPageSize=function(P,R,ha){P=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,P.width*R.width,P.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,R,ha,la){if(null!=b.container&&!b.isViewer()){ha=null!=ha?ha:0;la=null!=la?la:0;var sa=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),J=b.view.translate,N=b.view.scale,
+W=mxRectangle.fromRectangle(sa);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/=N;J=b.container.scrollTop;var T=b.container.scrollLeft,Q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Q+=3;var Z=b.container.offsetWidth-Q;Q=b.container.offsetHeight-Q;P=P?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-P*W.width)/2/P;var oa=0==this.lightboxVerticalDivider?0:(Q-P*W.height)/this.lightboxVerticalDivider/P;u&&(R=Math.max(R,0),oa=Math.max(oa,0));if(u||sa.width<Z||sa.height<
+Q)b.view.scaleAndTranslate(P,Math.floor(R-W.x),Math.floor(oa-W.y)),b.container.scrollTop=J*P/N,b.container.scrollLeft=T*P/N;else if(0!=ha||0!=la)sa=b.view.translate,b.view.setTranslate(Math.floor(sa.x+ha/N),Math.floor(sa.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(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var 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 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,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),
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(P,R,ha){E++;
+var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",P);null!=ha&&la.setAttribute("title",ha);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",R);P.style.width="36px";P.style.filter="invert(100%)";la.appendChild(P);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),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(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),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(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
+mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(P){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(P){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)}),P||200)}),H=mxUtils.bind(this,function(P){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(P){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,
-function(Q){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Q)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var da=this.lightboxToolbarActions[q];da.elem=t(da.fn,da.icon,da.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(Q){D.refreshBtn.url?
-window.location.href=D.refreshBtn.url:window.location.reload();mxEvent.consume(Q)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(Q){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Q)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
-document.body))&&t(mxUtils.bind(this,function(Q){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(Q))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(Q){mxEvent.isTouchEvent(Q)||
-(mxEvent.isShiftDown(Q)||H(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Q){mxEvent.consume(Q)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Q){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Q)?C():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Q){mxEvent.isShiftDown(Q)?C():H(100);mxEvent.consume(Q)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(Q){mxEvent.isTouchEvent(Q)||H(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Q,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Q,R){},mouseUp:function(Q,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ba&&Math.abs(this.startX-R.getGraphX())<ba&&Math.abs(this.startY-R.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Q=this.graph.getPagePadding(),R=this.graph.getPageSize();this.translate.x=Q.x-(this.x0||0)*R.width;this.translate.y=Q.y-(this.y0||0)*
-R.height}Y.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Q=this.getPageLayout(),R=this.getPagePadding(),fa=this.getPageSize(),la=Math.ceil(2*R.x+Q.width*fa.width),ra=Math.ceil(2*R.y+Q.height*fa.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=ra)b.minimumGraphSize=new mxRectangle(0,0,la,ra);la=R.x-Q.x*fa.width;R=R.y-Q.y*fa.height;this.autoTranslate||this.view.translate.x==
-la&&this.view.translate.y==R?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Q.x,this.view.y0=Q.y,Q=b.view.translate.x,fa=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-Q)*b.view.scale),b.container.scrollTop+=Math.round((R-fa)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
-ja=null,U=null,I=null,V=function(Q){null!=ea&&window.clearTimeout(ea);0<=Q&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
-(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),la=b.view.scale,ra=0,u=0;null!=ka&&(ra=b.container.offsetWidth/2-ka.x+fa.x,u=b.container.offsetHeight/2-ka.y+fa.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(ra+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,ra*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ra&&0==u||(b.container.scrollLeft-=ra*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=I&&X.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=U=ka=ja=ea=null}),null!=Q?Q:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(Q,R,fa,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Q?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==I&&""!=X.getAttribute("filter")&&(I=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Q=R||null==ka?b.container.scrollLeft+
-b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=R||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=Q+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=Q+"px "+la+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Q=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Q.style,
-"transform-origin",(R||null==ka?b.container.clientWidth/2+b.container.scrollLeft-Q.offsetLeft+"px":ka.x+b.container.scrollLeft-Q.offsetLeft-b.container.offsetLeft+"px")+" "+(R||null==ka?b.container.clientHeight/2+b.container.scrollTop-Q.offsetTop+"px":ka.y+b.container.scrollTop-Q.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Q.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(Q){null!=ea&&window.clearTimeout(ea)},null,function(Q){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(Q){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Q,R,fa,la,ra){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(Q))fa=
-b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(Q)?b.view.setTranslate(fa.x+(R?-la:la),fa.y):b.view.setTranslate(fa.x,fa.y+(R?la:-la));else if(fa||b.isZoomWheelEvent(Q))for(var u=mxEvent.getSource(Q);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=ra?new mxPoint(la,ra):new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q)),U=fa,fa=b.zoomFactor,la=null,Q.ctrlKey&&null!=Q.deltaY&&40>Math.abs(Q.deltaY)&&Math.round(Q.deltaY)!=Q.deltaY?fa=1+Math.abs(Q.deltaY)/
-20*(fa-1):null!=Q.movementY&&"pointermove"==Q.type&&(fa=1+Math.max(1,Math.abs(Q.movementY))/20*(fa-1),la=-1),b.lazyZoom(R,null,la,fa),mxEvent.consume(Q),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Q){b.cumulativeZoomFactor=Q.scale;b.lazyZoom(0<Q.scale,!0);mxEvent.consume(Q)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+this.layersDialog.style.zIndex=R.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),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,
+function(P){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var da=this.lightboxToolbarActions[q];da.elem=t(da.fn,da.icon,da.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(P){D.refreshBtn.url?
+window.location.href=D.refreshBtn.url:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(P){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
+document.body))&&t(mxUtils.bind(this,function(P){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||
+(mxEvent.isShiftDown(P)||H(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?C():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?C():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,R){},mouseUp:function(P,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
+ba&&Math.abs(this.startX-R.getGraphX())<ba&&Math.abs(this.startY-R.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var P=this.graph.getPagePadding(),R=this.graph.getPageSize();this.translate.x=P.x-(this.x0||0)*R.width;this.translate.y=P.y-(this.y0||0)*
+R.height}Y.apply(this,arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),R=this.getPagePadding(),ha=this.getPageSize(),la=Math.ceil(2*R.x+P.width*ha.width),sa=Math.ceil(2*R.y+P.height*ha.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=sa)b.minimumGraphSize=new mxRectangle(0,0,la,sa);la=R.x-P.x*ha.width;R=R.y-P.y*ha.height;this.autoTranslate||this.view.translate.x==
+la&&this.view.translate.y==R?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,ha=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-P)*b.view.scale),b.container.scrollTop+=Math.round((R-ha)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
+ja=null,U=null,I=null,V=function(P){null!=ea&&window.clearTimeout(ea);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
+(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ha=mxUtils.getOffset(b.container),la=b.view.scale,sa=0,u=0;null!=ka&&(sa=b.container.offsetWidth/2-ka.x+ha.x,u=b.container.offsetHeight/2-ka.y+ha.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(sa+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,sa*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==sa&&0==u||(b.container.scrollLeft-=sa*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=I&&X.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=U=ka=ja=ea=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(P,R,ha,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==I&&""!=X.getAttribute("filter")&&(I=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=R||null==ka?b.container.scrollLeft+
+b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=R||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=P+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=P+"px "+la+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(P=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(P.style,
+"transform-origin",(R||null==ka?b.container.clientWidth/2+b.container.scrollLeft-P.offsetLeft+"px":ka.x+b.container.scrollLeft-P.offsetLeft-b.container.offsetLeft+"px")+" "+(R||null==ka?b.container.clientHeight/2+b.container.scrollTop-P.offsetTop+"px":ka.y+b.container.scrollTop-P.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(P.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());V(b.isFastZoomEnabled()?ha:0)};mxEvent.addGestureListeners(b.container,function(P){null!=ea&&window.clearTimeout(ea)},null,function(P){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(P){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,R,ha,la,sa){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ha&&b.isScrollWheelEvent(P))ha=
+b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(ha.x+(R?-la:la),ha.y):b.view.setTranslate(ha.x,ha.y+(R?la:-la));else if(ha||b.isZoomWheelEvent(P))for(var u=mxEvent.getSource(P);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=sa?new mxPoint(la,sa):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),U=ha,ha=b.zoomFactor,la=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?ha=1+Math.abs(P.deltaY)/
+20*(ha-1):null!=P.movementY&&"pointermove"==P.type&&(ha=1+Math.max(1,Math.abs(P.movementY))/20*(ha-1),la=-1),b.lazyZoom(R,null,la,ha),mxEvent.consume(P),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2206,11 +2207,11 @@ 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!=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!=m()&&(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 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){E=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.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(n){k(parseFloat(n))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
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,E,d,f,g,m,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,m||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.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(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()};
@@ -2218,7 +2219,7 @@ EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind
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),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(m){}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(m){}}catch(m){}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)});
+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"),
@@ -2240,7 +2241,7 @@ G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(H);var aa=n.getV
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,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");
+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),
@@ -2251,39 +2252,39 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
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,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,m;g<d;)m=D[g],f[g]=t?"undefined"===typeof E?t(m,g):t.call(E,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";
+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 E=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(E=new mxPoint(I.getGraphX(),I.getGraphY()),m=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!=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;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(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());
-m=!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=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
+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 P=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),l=this.isCellSelected(P.cell),f=P,d=I,null!=P.text&&null!=
+P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,I.getGraphX(),I.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(P.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(P.cell),null==R||null==R.getHandleForEvent(I))){var ha=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;ha.grow(la);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()-R)&&mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()-R))){var sa=this.model.getParent(P.cell);R=this.model.getParent(sa);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=sa&&mxUtils.intersects(ha,
+new mxRectangle(P.x,P.y-la,P.width,u))||this.model.getChildAt(sa,0)!=P.cell&&mxUtils.intersects(ha,new mxRectangle(P.x-la,P.y,u,P.height))||mxUtils.intersects(ha,new mxRectangle(P.x,P.y+P.height-la,P.width,u))||mxUtils.intersects(ha,new mxRectangle(P.x+P.width-la,P.y,u,P.height)))sa=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=
+!sa,I.consume()))}}for(;!I.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(R=this.getActualStartSize(P.cell),(0<R.x||0<R.width)&&mxUtils.intersects(ha,new mxRectangle(P.x+(R.x-R.width-1)*V+(0==R.x?P.width:0),P.y,1,P.height))||(0<R.y||0<R.height)&&mxUtils.intersects(ha,new mxRectangle(P.x,P.y+(R.y-R.height-1)*V+(0==R.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,I.getEvent()),R=this.selectionCellsHandler.getHandler(P.cell),
+null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var P in I)if(null!=I[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(P=f,Math.abs(E.x-
+V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var ha=this.selectionCellsHandler.getHandler(P.cell);null==ha&&this.model.isEdge(P.cell)&&(ha=this.createHandler(P));if(null!=ha&&null!=ha.bends&&0<ha.bends.length){I=ha.getHandleForEvent(d);var la=this.view.getEdgeStyle(P);R=la==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=ha.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==P.visibleSourceState&&null==P.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
+mxEvent.LABEL_HANDLE||0==I||null!=P.visibleSourceState||I==ha.bends.length-1||null!=P.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=P.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=ha.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(P,E.x,E.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),ha.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=ha&&(this.selectionCellsHandler.isHandlerActive(ha)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,ha),this.selectCellForEvent(P.cell,V.getEvent())):this.isCellSelected(P.cell)||ha.destroy());
+l=!1;E=d=f=g=null}}else if(P=V.getState(),null!=P&&this.isCellEditable(P.cell)){ha=null;if(this.model.isEdge(P.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=P.absolutePoints,null!=R)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,V.getGraphX(),V.getGraphY()))ha="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))ha="pointer";else if(null!=P.visibleSourceState||
+null!=P.visibleTargetState)I=this.view.getEdgeStyle(P),ha="crosshair",I!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(V=mxUtils.findNearestSegment(P,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(ha=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(P.cell)&&(V=this.model.getParent(P.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(I,
+new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(I,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ha="row-resize";else if(mxUtils.intersects(I,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(V,0)!=P.cell||mxUtils.intersects(I,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ha="col-resize";for(V=P;null==ha&&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))?ha="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))&&(ha="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=ha&&P.setCursor(ha)}}}),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 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,
+!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=[],P=this.graph.pageFormat,R=this.graph.pageScale,ha=P.width*R;P=P.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
+sa=this.graph.getPageLayout(),u=0;u<sa.width;u++)V.push(new mxRectangle(((sa.x+u)*ha+R.x)*la,(sa.y*P+R.y)*la,ha*la,P*la));for(u=1;u<sa.height;u++)V.push(new mxRectangle((sa.x*ha+R.x)*la,((sa.y+u)*P+R.y)*la,ha*la,P*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),P=new mxDictionary,R=[],ha=0;ha<V.length;ha++){var la=this.graph.isTableCell(I)&&this.graph.isTableCell(V[ha])&&this.graph.isCellSelected(V[ha])?this.graph.model.getParent(V[ha]):this.graph.isTableRow(I)&&this.graph.isTableRow(V[ha])&&this.graph.isCellSelected(V[ha])?V[ha]:
+this.graph.getCompositeParent(V[ha]);null==la||P.get(la)||(P.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(I,V,P,R){var ha=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?ha=!0:I=this.graph.model.getParent(I));ha||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())};
-var O=this.click;this.click=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);if(this.isEnabled()&&!V||I.isConsumed())return O.apply(this,arguments);var Q=V?I.sourceState.cell:I.getCell();null!=Q&&(Q=this.getClickableLinkForCell(Q),null!=Q&&(this.isCustomLink(Q)?this.customLinkClicked(Q):this.openLink(Q)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
+var O=this.click;this.click=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);if(this.isEnabled()&&!V||I.isConsumed())return O.apply(this,arguments);var P=V?I.sourceState.cell:I.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
function(){X.apply(this,arguments);if(null!=this.div)for(var I=this.div.getElementsByTagName("a"),V=0;V<I.length;V++)null!=I[V].getAttribute("href")&&null==I[V].getAttribute("target")&&I[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};this.getCursorForMouseEvent=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);return this.getCursorForCell(V?I.sourceState.cell:I.getCell())};var ea=this.getCursorForCell;
-this.getCursorForCell=function(I){if(!this.isEnabled()||this.isCellLocked(I)){if(null!=this.getClickableLinkForCell(I))return"pointer";if(this.isCellLocked(I))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(I,V){var Q=mxEvent.isAltDown(V)?I:null;I=this.getCells(I.x,I.y,I.width,I.height,null,null,Q,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(Q=0;Q<I.length;Q++)this.selectCellForEvent(I[Q],V);else this.selectCellsForEvent(I,
-V);return I};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(I,V,Q){return this.graph.isCellSelected(I)?!1:ka.apply(this,arguments)};this.isCellLocked=function(I){for(;null!=I;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(I),"locked","0"))return!0;I=this.model.getParent(I)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){"mouseDown"==V.getProperty("eventName")&&(I=V.getProperty("event").getState(),
-ja=null==I||this.isSelectionEmpty()||this.isCellSelected(I.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(I,V){if(!mxEvent.isMultiTouchEvent(V)){I=V.getProperty("event");var Q=V.getProperty("cell");null==Q?(I=mxUtils.convertPoint(this.container,mxEvent.getClientX(I),mxEvent.getClientY(I)),C.start(I.x,I.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(Q)&&this.removeSelectionCell(Q);ja=null;V.consume()}}));
-this.connectionHandler.selectCells=function(I,V){this.graph.setSelectionCell(V||I)};this.connectionHandler.constraintHandler.isStateIgnored=function(I,V){var Q=I.view.graph;return V&&(Q.isCellSelected(I.cell)||Q.isTableRow(I.cell)&&Q.selectionCellsHandler.isHandled(Q.model.getParent(I.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var I=this.connectionHandler.constraintHandler;null!=I.currentFocus&&I.isStateIgnored(I.currentFocus,!0)&&(I.currentFocus=null,I.constraints=
+this.getCursorForCell=function(I){if(!this.isEnabled()||this.isCellLocked(I)){if(null!=this.getClickableLinkForCell(I))return"pointer";if(this.isCellLocked(I))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(I,V){var P=mxEvent.isAltDown(V)?I:null;I=this.getCells(I.x,I.y,I.width,I.height,null,null,P,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(P=0;P<I.length;P++)this.selectCellForEvent(I[P],V);else this.selectCellsForEvent(I,
+V);return I};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(I,V,P){return this.graph.isCellSelected(I)?!1:ka.apply(this,arguments)};this.isCellLocked=function(I){for(;null!=I;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(I),"locked","0"))return!0;I=this.model.getParent(I)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){"mouseDown"==V.getProperty("eventName")&&(I=V.getProperty("event").getState(),
+ja=null==I||this.isSelectionEmpty()||this.isCellSelected(I.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(I,V){if(!mxEvent.isMultiTouchEvent(V)){I=V.getProperty("event");var P=V.getProperty("cell");null==P?(I=mxUtils.convertPoint(this.container,mxEvent.getClientX(I),mxEvent.getClientY(I)),C.start(I.x,I.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);ja=null;V.consume()}}));
+this.connectionHandler.selectCells=function(I,V){this.graph.setSelectionCell(V||I)};this.connectionHandler.constraintHandler.isStateIgnored=function(I,V){var P=I.view.graph;return V&&(P.isCellSelected(I.cell)||P.isTableRow(I.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(I.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var I=this.connectionHandler.constraintHandler;null!=I.currentFocus&&I.isStateIgnored(I.currentFocus,!0)&&(I.currentFocus=null,I.constraints=
null,I.destroyIcons());I.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(I){I=U.apply(this,arguments);null!=I.state&&this.isCellLocked(I.getCell())&&(I.state=null);return I}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
@@ -2302,33 +2303,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var n=decodeURIComponent(escape(atob(b.substring(26)))),D=n.indexOf("<svg");if(0<=D){k.innerHTML=Graph.sanitizeHtml(n.substring(D));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 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 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};
+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,E=null,d=mxUtils.bind(this,function(m){t=!0;E=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m))}),f=mxUtils.bind(this,function(m){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(m))<D&&Math.abs(E.y-mxEvent.getClientY(m))<D}),g=mxUtils.bind(this,function(m){if(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(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={},m;for(m in E){var q=E[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(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,
+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),m;for(m in E){var q=E[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(E,d,f,g,m,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,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 F=this.model.getChildAt(f,y),C=this.getScaledCellAt(E,d,F,g,m,q);if(null!=C)return C;if(this.isCellVisible(F)&&(m&&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 m=this.getCompositeParent(E[g]);this.isTableCell(m)&&(m=this.graph.model.getParent(m));
-this.isTableRow(m)&&(m=this.graph.model.getParent(m));null==m||d.get(m)||(d.put(m,!0),f.push(m))}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=
+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,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};
+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)};
@@ -2342,7 +2343,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
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(E,d){if(null!=b.shape){var f=[k[0]];d=E/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==E&&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,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()};
@@ -2356,11 +2357,11 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
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,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"](),m=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:m+1,mm:E(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
+/\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(E){function d(){n.isVisible(E)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.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 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);
+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()};
@@ -2370,13 +2371,13 @@ Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&
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,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),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?
+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?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=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?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!=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)||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==E||null!=ba||!aa||null==C&&f)return D(ba);E(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};
@@ -2385,8 +2386,8 @@ 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 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 m=this.model.getParent(k[t]),q=this.layoutManager.getLayout(m);
-null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,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.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)};
@@ -2423,7 +2424,7 @@ 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),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")),
@@ -2440,36 +2441,36 @@ Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCell
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=[],m=0;m<E.length;m++){var q=this.getCellGeometry(E[m]),y={cell:E[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(E[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,E.length,
+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),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 m=this.getCellGeometry(t);null!=m&&(k||(k=b==E[E.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),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 m=E[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<E.length-1&&(m=E[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 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 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,m=E.getChildCells(b,!0),q=0;q<m.length;q++)E.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
-m.length&&0<y){if(D){var F=this.graph.getCellGeometry(m[m.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(m[m.length-1],F))}var C=t?null:this.getRowLayout(m[0],g),H=[],G=e.y;for(q=0;q<m.length;q++)F=this.graph.getCellGeometry(m[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(m[q],F)),d=Math.max(d,this.layoutRow(m[q],C,F.height,g,H));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
+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<m.length;q++)E.setVisible(m[q],!1)}finally{E.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var 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,F=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;F.push(V);V=null!=m.routedPoints?m.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(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,
+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=F;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 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;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,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?(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,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,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(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),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[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));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=
-q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=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==F||aa<F)y=G,F=aa}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.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(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),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)}})();
+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(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};
@@ -2483,108 +2484,108 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
!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 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=
+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 S=L.apply(this,arguments);this.error=null;return S});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),
-ia=0;ia<ca;ia++)this.createCellLookup([this.model.getChildAt(T,ia)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var T in z){var ca=L[T];null==M[ca]&&(M[ca]=z[T].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,T){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),ia=new mxGraphModel;ca.decode(z,ia);z=[];ca={};var ma={},pa=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),ca));if(null!=pa){var ua=this.createCellLookup([ia.root]);
-pa=pa.slice();this.model.beginUpdate();try{if(1!=pa.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<pa.length;ia++)ya=this.model.getChildren(this.moveCells([pa[ia]],L,M,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ia.getChildren(pa[0]);null!=ya&&(z=this.moveCells(ya,L,M,!1,this.getDefaultParent()),ma[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,ua,ma),this.updateCustomLinks(ma,z),T)){this.isGridEnabled()&&
-(L=this.snap(L),M=this.snap(M));var Fa=this.getBoundingBoxFromGeometry(z,!0);null!=Fa&&this.moveCells(z,L-Fa.x,M-Fa.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),T=new mxDictionary,ca=0;ca<z.length;ca++)T.put(z[ca],!0);var ia=new mxCodec,ma=new mxGraphModel,pa=ma.getChildAt(ma.getRoot(),0);for(ca=0;ca<M.length;ca++){ma.add(pa,M[ca]);var ua=this.view.getState(z[ca]);if(null!=ua){var ya=this.getCellGeometry(M[ca]);null!=
-ya&&ya.relative&&!this.model.isEdge(z[ca])&&null==T.get(this.model.getParent(z[ca]))&&(ya.offset=null,ya.relative=!1,ya.x=ua.x/ua.view.scale-ua.view.translate.x,ya.y=ua.y/ua.view.scale-ua.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return ia.encode(ma)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
-mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,T,ca,ia,ma,pa){null==pa&&(pa=this.model.getParent(z),this.isTable(pa)||this.isTableRow(pa))&&(pa=this.getCellAt(ia,ma,
-null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,T,ca,ia,ma,pa]);this.model.setValue(M,"");var ua=this.getChildCells(M,!0);for(L=0;L<ua.length;L++){var ya=this.getCellGeometry(ua[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(ua[L])}var Fa=this.getChildCells(z,!0);for(L=0;L<Fa.length;L++)ya=this.getCellGeometry(Fa[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
-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=
-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 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=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)),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;
-if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),M=0,T=0;T<L;T++){var ca=this.model.getChildAt(z,T);this.model.isVertex(ca)&&
-(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var T=this.getCurrentCellStyle(z),ca=!0,ia=!0,ma=0;ma<L.length&&ia;ma++)ca=ca&&this.isTable(L[ma]),ia=ia&&this.isTableRow(L[ma]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(T,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(T,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
-arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
-(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 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.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 S=z[M];L[mxObjectIdentity.get(S)]=S.getId();for(var ca=this.model.getChildCount(S),
+fa=0;fa<ca;fa++)this.createCellLookup([this.model.getChildAt(S,fa)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var S in z){var ca=L[S];null==M[ca]&&(M[ca]=z[S].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,S){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),fa=new mxGraphModel;ca.decode(z,fa);z=[];ca={};var na={},ra=fa.getChildren(this.cloneCell(fa.root,this.isCloneInvalidEdges(),ca));if(null!=ra){var pa=this.createCellLookup([fa.root]);
+ra=ra.slice();this.model.beginUpdate();try{if(1!=ra.length||this.isCellLocked(this.getDefaultParent()))for(fa=0;fa<ra.length;fa++)ya=this.model.getChildren(this.moveCells([ra[fa]],L,M,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=fa.getChildren(ra[0]);null!=ya&&(z=this.moveCells(ya,L,M,!1,this.getDefaultParent()),na[fa.getChildAt(fa.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,pa,na),this.updateCustomLinks(na,z),S)){this.isGridEnabled()&&
+(L=this.snap(L),M=this.snap(M));var Fa=this.getBoundingBoxFromGeometry(z,!0);null!=Fa&&this.moveCells(z,L-Fa.x,M-Fa.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),S=new mxDictionary,ca=0;ca<z.length;ca++)S.put(z[ca],!0);var fa=new mxCodec,na=new mxGraphModel,ra=na.getChildAt(na.getRoot(),0);for(ca=0;ca<M.length;ca++){na.add(ra,M[ca]);var pa=this.view.getState(z[ca]);if(null!=pa){var ya=this.getCellGeometry(M[ca]);null!=
+ya&&ya.relative&&!this.model.isEdge(z[ca])&&null==S.get(this.model.getParent(z[ca]))&&(ya.offset=null,ya.relative=!1,ya.x=pa.x/pa.view.scale-pa.view.translate.x,ya.y=pa.y/pa.view.scale-pa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return fa.encode(na)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
+mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,S,ca,fa,na,ra){null==ra&&(ra=this.model.getParent(z),this.isTable(ra)||this.isTableRow(ra))&&(ra=this.getCellAt(fa,na,
+null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,S,ca,fa,na,ra]);this.model.setValue(M,"");var pa=this.getChildCells(M,!0);for(L=0;L<pa.length;L++){var ya=this.getCellGeometry(pa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(pa[L])}var Fa=this.getChildCells(z,!0);for(L=0;L<Fa.length;L++)ya=this.getCellGeometry(Fa[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Fa[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
+mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Na=this.model.getTerminal(M,!1);if(null!=Na){var Pa=this.getCurrentCellStyle(Na);null!=Pa&&"1"==Pa.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 S=this.getSelectionCell(),ca=null,fa=[],na=mxUtils.bind(this,function(ra){if(null!=this.view.getState(ra)&&(this.model.isVertex(ra)||this.model.isEdge(ra)))if(fa.push(ra),ra==S)ca=fa.length-1;else if(z&&null==S&&0<fa.length||null!=ca&&z&&fa.length>ca||!z&&0<ca)return;for(var pa=0;pa<this.model.getChildCount(ra);pa++)na(this.model.getChildAt(ra,pa))});na(this.model.root);0<fa.length&&
+(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),fa.length):0,this.setSelectionCell(fa[ca]))}};Graph.prototype.swapShapes=function(z,L,M,S,ca,fa,na){L=!1;if(!S&&null!=ca&&1==z.length&&(S=this.view.getState(ca),M=this.view.getState(z[0]),null!=S&&null!=M&&(null!=fa&&mxEvent.isShiftDown(fa)||"umlLifeline"==S.style.shape&&"umlLifeline"==M.style.shape)&&(S=this.getCellGeometry(ca),fa=this.getCellGeometry(z[0]),null!=S&&null!=fa))){L=S.clone();S=fa.clone();S.x=L.x;S.y=L.y;L.x=fa.x;L.y=fa.y;this.model.beginUpdate();
+try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}L=!0}return L};var l=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,S,ca,fa,na){if(this.swapShapes(z,L,M,S,ca,fa,na))return z;na=null!=na?na:{};if(this.isTable(ca)){for(var ra=[],pa=0;pa<z.length;pa++)this.isTable(z[pa])?ra=ra.concat(this.model.getChildCells(z[pa],!0).reverse()):ra.push(z[pa]);z=ra}this.model.beginUpdate();try{ra=[];for(pa=0;pa<z.length;pa++)if(null!=ca&&this.isTableRow(z[pa])){var ya=
+this.model.getParent(z[pa]),Fa=this.getCellGeometry(z[pa]);this.isTable(ya)&&ra.push(ya);if(null!=ya&&null!=Fa&&this.isTable(ya)&&this.isTable(ca)&&(S||ya!=ca)){if(!S){var Na=this.getCellGeometry(ya);null!=Na&&(Na=Na.clone(),Na.height-=Fa.height,this.model.setGeometry(ya,Na))}Na=this.getCellGeometry(ca);null!=Na&&(Na=Na.clone(),Na.height+=Fa.height,this.model.setGeometry(ca,Na));var Pa=this.model.getChildCells(ca,!0);if(0<Pa.length){z[pa]=S?this.cloneCell(z[pa]):z[pa];var Qa=this.model.getChildCells(z[pa],
+!0),Ta=this.model.getChildCells(Pa[0],!0),Ma=Ta.length-Qa.length;if(0<Ma)for(var ua=0;ua<Ma;ua++){var za=this.cloneCell(Qa[Qa.length-1]);null!=za&&(za.value="",this.model.add(z[pa],za))}else if(0>Ma)for(ua=0;ua>Ma;ua--)this.model.remove(Qa[Qa.length+ua-1]);Qa=this.model.getChildCells(z[pa],!0);for(ua=0;ua<Ta.length;ua++){var Ia=this.getCellGeometry(Ta[ua]),Da=this.getCellGeometry(Qa[ua]);null!=Ia&&null!=Da&&(Da=Da.clone(),Da.width=Ia.width,this.model.setGeometry(Qa[ua],Da))}}}}var La=l.apply(this,
+arguments);for(pa=0;pa<ra.length;pa++)!S&&this.model.contains(ra[pa])&&0==this.model.getChildCount(ra[pa])&&this.model.remove(ra[pa]);S&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),La)}finally{this.model.endUpdate()}return La};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var ca=this.model.getParent(z[S]),fa=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
+1==this.model.getChildCount(fa)?0>mxUtils.indexOf(z,fa)&&0>mxUtils.indexOf(M,fa)&&M.push(fa):this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(fa=this.model.getParent(z[S]),0>mxUtils.indexOf(z,fa)&&0>mxUtils.indexOf(M,fa))){for(var na=this.model.getChildCells(fa,!0),ra=0,pa=0;pa<na.length;pa++)0<=mxUtils.indexOf(z,na[pa])&&ra++;ra==na.length&&M.push(fa)}M.push(z[S])}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 S=0;S<L.length;S++)null!=L[S]&&M.updateCustomLinksForCell(z,L[S],M)};Graph.prototype.updateCustomLinksForCell=function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),S=0;S<M;S++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,S))};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 S=M[L];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?S[3]:0,4<S.length?S[4]:0))}}catch(fa){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=M,M=L,L=S;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;
+if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),M=0,S=0;S<L;S++){var ca=this.model.getChildAt(z,S);this.model.isVertex(ca)&&
+(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var S=this.getCurrentCellStyle(z),ca=!0,fa=!0,na=0;na<L.length&&fa;na++)ca=ca&&this.isTable(L[na]),fa=fa&&this.isTableRow(L[na]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
+arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||fa||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
+(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(),S=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var fa=z[ca];if(M.isEdge(fa)){var na=M.getTerminal(fa,!0),ra=M.getTerminal(fa,!1);M.setTerminal(fa,ra,!0);M.setTerminal(fa,
+na,!1);var pa=M.getGeometry(fa);if(null!=pa){pa=pa.clone();null!=pa.points&&pa.points.reverse();var ya=pa.getTerminalPoint(!0),Fa=pa.getTerminalPoint(!1);pa.setTerminalPoint(ya,!1);pa.setTerminalPoint(Fa,!0);M.setGeometry(fa,pa);var Na=this.view.getState(fa),Pa=this.view.getState(na),Qa=this.view.getState(ra);if(null!=Na){var Ta=null!=Pa?this.getConnectionConstraint(Na,Pa,!0):null,Ma=null!=Qa?this.getConnectionConstraint(Na,Qa,!1):null;this.setConnectionConstraint(fa,na,!0,Ma);this.setConnectionConstraint(fa,
+ra,!1,Ta);var ua=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[fa]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[fa])}S.push(fa)}}else if(M.isVertex(fa)&&(pa=this.getCellGeometry(fa),null!=pa)){if(!(this.isTable(fa)||this.isTableRow(fa)||this.isTableCell(fa)||this.isSwimlane(fa))){pa=pa.clone();pa.x+=pa.width/2-pa.height/
+2;pa.y+=pa.height/2-pa.width/2;var za=pa.width;pa.width=pa.height;pa.height=za;M.setGeometry(fa,pa)}var Ia=this.view.getState(fa);if(null!=Ia){var Da=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],La=mxUtils.getValue(Ia.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Da[mxUtils.mod(mxUtils.indexOf(Da,La)+(L?-1:1),Da.length)],[fa])}S.push(fa)}}}finally{M.endUpdate()}return S};
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("*");
-for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var T=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var ia=this.convertValueToString(z[ca]);if(null!=ia&&0<ia.length){T.innerHTML=ia;for(var ma=T.getElementsByTagName(null!=M?M:"*"),pa=0;pa<ma.length;pa++)L(ma[pa]);T.innerHTML!=ia&&this.cellLabelChanged(z[ca],T.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
-this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var T=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(T)){this.setAttributeForCell(ca,T,L);break}ca=this.model.getParent(ca)}var ia=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+
-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,
+for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var fa=this.convertValueToString(z[ca]);if(null!=fa&&0<fa.length){S.innerHTML=fa;for(var na=S.getElementsByTagName(null!=M?M:"*"),ra=0;ra<na.length;ra++)L(na[ra]);S.innerHTML!=fa&&this.cellLabelChanged(z[ca],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
+this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(S)){this.setAttributeForCell(ca,S,L);break}ca=this.model.getParent(ca)}var fa=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&fa.hasAttribute("label_"+Graph.diagramLanguage)?fa.setAttribute("label_"+
+Graph.diagramLanguage,L):fa.setAttribute("label",L);L=fa}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 S=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),S.push(ca))}for(M=0;M<S.length;M++)if(ca=this.view.getState(S[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
+this.isTransparentState(ca)){for(var fa=!0,na=0;na<this.model.getChildCount(ca.cell)&&fa;na++)L.get(this.model.getChildAt(ca.cell,na))||(fa=!1);fa&&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 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)?
+M){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=M?S.setAttribute(L,M):S.removeAttribute(L);this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,S){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var fa=this.model.getParent(z[ca]);if(this.model.isEdge(fa)&&0>mxUtils.indexOf(z,fa))return null}fa=
+F.apply(this,arguments);var na=!0;for(ca=0;ca<z.length&&na;ca++)na=na&&this.isTableRow(z[ca]);na&&(this.isTableCell(fa)&&(fa=this.model.getParent(fa)),this.isTableRow(fa)&&(fa=this.model.getParent(fa)),this.isTable(fa)||(fa=null));return fa};Graph.prototype.click=function(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 S=this.model.isEdge(L)?this.view.getState(L):null,ca=mxEvent.getSource(z);this.firstClickState!=S||this.firstClickSource!=ca||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(z)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&
+(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&ca==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(M.x,M.y))),L=this.addText(M.x,M.y,S))}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 S=this.getPageLayout(),ca=this.getPageSize();L=Math.max(L,S.x*ca.width);M=
+Math.max(M,S.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(),S=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(S,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?
new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=
-function(){return!1};Graph.prototype.addText=function(z,L,M){var T=new mxCell;T.value="Text";T.geometry=new mxGeometry(0,0,0,0);T.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){T.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";T.geometry.relative=!0;T.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);T.geometry.x=Math.round(1E4*ca.x)/1E4;T.geometry.y=Math.round(ca.y);T.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,T.geometry);var ia=this.view.scale;
-T.geometry.offset=new mxPoint(Math.round((z-ca.x)/ia),Math.round((L-ca.y)/ia))}else ca=this.view.translate,T.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",T.geometry.width=40,T.geometry.height=20,T.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),T.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),T.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([T],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
-"cells",[T])),this.autoSizeCell(T)}finally{this.getModel().endUpdate()}return T};Graph.prototype.addClickHandler=function(z,L,M){var T=mxUtils.bind(this,function(){var ua=this.container.getElementsByTagName("a");if(null!=ua)for(var ya=0;ya<ua.length;ya++){var Fa=this.getAbsoluteUrl(ua[ya].getAttribute("href"));null!=Fa&&(ua[ya].setAttribute("rel",this.linkRelation),ua[ya].setAttribute("href",Fa),null!=L&&mxEvent.addGestureListeners(ua[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,T);
-T();var ca=this.container.style.cursor,ia=this.getTolerance(),ma=this,pa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(ma,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ua){var ya=ua.sourceState;if(null==ya||null==ma.getLinkForCell(ya.cell))ua=ma.getCellAt(ua.getGraphX(),ua.getGraphY(),null,null,null,function(Fa,Ma,Oa){return null==ma.getLinkForCell(Fa.cell)}),ya=null==ya||ma.model.isAncestor(ua,
-ya.cell)?ma.view.getState(ua):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ua,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=ma.container.scrollLeft;this.scrollTop=ma.container.scrollTop;null==this.currentLink&&"auto"==ma.container.style.overflow&&(ma.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(ua,ya){if(ma.isMouseDown)null!=
-this.currentLink&&(ua=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(ua>ia||ya>ia)&&this.clear());else{for(ua=ya.getSource();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null!=ua?this.clear():(null!=ma.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&ma.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!ma.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&
-this.updateCurrentState(ya))}},mouseUp:function(ua,ya){var Fa=ya.getSource();for(ua=ya.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==Fa&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ia&&Math.abs(this.scrollTop-ma.container.scrollTop)<ia&&(null==ya.sourceState||!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(ua)||mxEvent.isMiddleMouseButton(ua))&&!mxEvent.isPopupTrigger(ua)||mxEvent.isTouchEvent(ua))&&(null!=this.currentLink?(Fa=ma.isBlankLink(this.currentLink),
-"data:"!==this.currentLink.substring(0,5)&&Fa||null==L||L(ua,this.currentLink),mxEvent.isConsumed(ua)||(ua=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ua)?"_blank":Fa?ma.linkTarget:"_top",ma.openLink(this.currentLink,ua),ya.consume())):null!=M&&!ya.isConsumed()&&Math.abs(this.scrollLeft-ma.container.scrollLeft)<ia&&Math.abs(this.scrollTop-ma.container.scrollTop)<ia&&Math.abs(this.startX-ya.getGraphX())<ia&&Math.abs(this.startY-ya.getGraphY())<ia&&M(ya.getEvent()));this.clear()},
-activate:function(ua){this.currentLink=ma.getAbsoluteUrl(ma.getLinkForCell(ua.cell));null!=this.currentLink&&(this.currentTarget=ma.getLinkTargetForCell(ua.cell),ma.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ua))},clear:function(){null!=ma.container&&(ma.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ma.tooltipHandler&&ma.tooltipHandler.hide()}};ma.click=function(ua){};ma.addMouseListener(pa);
-mxEvent.addListener(document,"mouseleave",function(ua){pa.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var T=this.getModel(),ca=this.gridSize,ia=[];T.beginUpdate();try{var ma={},pa=this.createCellLookup(z),ua=this.cloneCells(z,!1,ma,!0);for(M=0;M<z.length;M++){var ya=T.getParent(z[M]);if(null!=ya){var Fa=this.moveCells([ua[M]],
-ca,ca,!1)[0];ia.push(Fa);if(L)T.add(ya,ua[M]);else{var Ma=ya.getIndex(z[M]);T.add(ya,ua[M],Ma+1)}if(this.isTable(ya)){var Oa=this.getCellGeometry(ua[M]),Pa=this.getCellGeometry(ya);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.height+=Oa.height,T.setGeometry(ya,Pa))}}else ia.push(ua[M])}this.updateCustomLinks(this.createCellMapping(ma,pa),ua,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ua))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
-this.cellEditor.textarea){for(var T=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ia=0;ia<T.length;ia++)ca.push(T[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=ca[ia-1]){z[ia].setAttribute("width",L);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
-else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),M=[],T=0;T<L.length;T++)M.push(L[T]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==M.length+1)for(T=L.length-1;0<=T;T--)if(L[T]!=M[T-1]){for(L=L[T].getElementsByTagName("a");0<L.length;){for(M=L[0].parentNode;null!=L[0].firstChild;)M.insertBefore(L[0].firstChild,L[0]);M.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};
-Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],T=null,ca=null,ia=0;ia<L.length;ia++)if(this.getModel().isVertex(L[ia])){var ma=this.view.getState(L[ia]);
-if(null!=ma){var pa=z?ma.getCenterX():ma.getCenterY();T=null!=T?Math.max(T,pa):pa;ca=null!=ca?Math.min(ca,pa):pa;M.push(ma)}}if(2<M.length){M.sort(function(Ma,Oa){return z?Ma.x-Oa.x:Ma.y-Oa.y});ma=this.view.translate;pa=this.view.scale;ca=ca/pa-(z?ma.x:ma.y);T=T/pa-(z?ma.x:ma.y);this.getModel().beginUpdate();try{var ua=(T-ca)/(M.length-1);T=ca;for(ia=1;ia<M.length-1;ia++){var ya=this.view.getState(this.model.getParent(M[ia].cell)),Fa=this.getCellGeometry(M[ia].cell);T+=ua;null!=Fa&&null!=ya&&(Fa=
-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"));
-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;
+function(){return!1};Graph.prototype.addText=function(z,L,M){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";S.geometry.relative=!0;S.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);S.geometry.x=Math.round(1E4*ca.x)/1E4;S.geometry.y=Math.round(ca.y);S.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,S.geometry);var fa=this.view.scale;
+S.geometry.offset=new mxPoint(Math.round((z-ca.x)/fa),Math.round((L-ca.y)/fa))}else ca=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),S.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
+"cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,L,M){var S=mxUtils.bind(this,function(){var pa=this.container.getElementsByTagName("a");if(null!=pa)for(var ya=0;ya<pa.length;ya++){var Fa=this.getAbsoluteUrl(pa[ya].getAttribute("href"));null!=Fa&&(pa[ya].setAttribute("rel",this.linkRelation),pa[ya].setAttribute("href",Fa),null!=L&&mxEvent.addGestureListeners(pa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,S);
+S();var ca=this.container.style.cursor,fa=this.getTolerance(),na=this,ra={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(pa){var ya=pa.sourceState;if(null==ya||null==na.getLinkForCell(ya.cell))pa=na.getCellAt(pa.getGraphX(),pa.getGraphY(),null,null,null,function(Fa,Na,Pa){return null==na.getLinkForCell(Fa.cell)}),ya=null==ya||na.model.isAncestor(pa,
+ya.cell)?na.view.getState(pa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(pa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=na.container.scrollLeft;this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(pa,ya){if(na.isMouseDown)null!=
+this.currentLink&&(pa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(pa>fa||ya>fa)&&this.clear());else{for(pa=ya.getSource();null!=pa&&"a"!=pa.nodeName.toLowerCase();)pa=pa.parentNode;null!=pa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&na.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!na.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&
+this.updateCurrentState(ya))}},mouseUp:function(pa,ya){var Fa=ya.getSource();for(pa=ya.getEvent();null!=Fa&&"a"!=Fa.nodeName.toLowerCase();)Fa=Fa.parentNode;null==Fa&&Math.abs(this.scrollLeft-na.container.scrollLeft)<fa&&Math.abs(this.scrollTop-na.container.scrollTop)<fa&&(null==ya.sourceState||!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(pa)||mxEvent.isMiddleMouseButton(pa))&&!mxEvent.isPopupTrigger(pa)||mxEvent.isTouchEvent(pa))&&(null!=this.currentLink?(Fa=na.isBlankLink(this.currentLink),
+"data:"!==this.currentLink.substring(0,5)&&Fa||null==L||L(pa,this.currentLink),mxEvent.isConsumed(pa)||(pa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(pa)?"_blank":Fa?na.linkTarget:"_top",na.openLink(this.currentLink,pa),ya.consume())):null!=M&&!ya.isConsumed()&&Math.abs(this.scrollLeft-na.container.scrollLeft)<fa&&Math.abs(this.scrollTop-na.container.scrollTop)<fa&&Math.abs(this.startX-ya.getGraphX())<fa&&Math.abs(this.startY-ya.getGraphY())<fa&&M(ya.getEvent()));this.clear()},
+activate:function(pa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(pa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(pa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(pa))},clear:function(){null!=na.container&&(na.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(pa){};na.addMouseListener(ra);
+mxEvent.addListener(document,"mouseleave",function(pa){ra.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var S=this.getModel(),ca=this.gridSize,fa=[];S.beginUpdate();try{var na={},ra=this.createCellLookup(z),pa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var ya=S.getParent(z[M]);if(null!=ya){var Fa=this.moveCells([pa[M]],
+ca,ca,!1)[0];fa.push(Fa);if(L)S.add(ya,pa[M]);else{var Na=ya.getIndex(z[M]);S.add(ya,pa[M],Na+1)}if(this.isTable(ya)){var Pa=this.getCellGeometry(pa[M]),Qa=this.getCellGeometry(ya);null!=Pa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Pa.height,S.setGeometry(ya,Qa))}}else fa.push(pa[M])}this.updateCustomLinks(this.createCellMapping(na,ra),pa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",pa))}finally{S.endUpdate()}return fa};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
+this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],fa=0;fa<S.length;fa++)ca.push(S[fa]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(fa=z.length-1;0<=fa;fa--)if(0==fa||z[fa]!=ca[fa-1]){z[fa].setAttribute("width",L);z[fa].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
+else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),M=[],S=0;S<L.length;S++)M.push(L[S]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==M.length+1)for(S=L.length-1;0<=S;S--)if(L[S]!=M[S-1]){for(L=L[S].getElementsByTagName("a");0<L.length;){for(M=L[0].parentNode;null!=L[0].firstChild;)M.insertBefore(L[0].firstChild,L[0]);M.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};
+Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],S=null,ca=null,fa=0;fa<L.length;fa++)if(this.getModel().isVertex(L[fa])){var na=this.view.getState(L[fa]);
+if(null!=na){var ra=z?na.getCenterX():na.getCenterY();S=null!=S?Math.max(S,ra):ra;ca=null!=ca?Math.min(ca,ra):ra;M.push(na)}}if(2<M.length){M.sort(function(Na,Pa){return z?Na.x-Pa.x:Na.y-Pa.y});na=this.view.translate;ra=this.view.scale;ca=ca/ra-(z?na.x:na.y);S=S/ra-(z?na.x:na.y);this.getModel().beginUpdate();try{var pa=(S-ca)/(M.length-1);S=ca;for(fa=1;fa<M.length-1;fa++){var ya=this.view.getState(this.model.getParent(M[fa].cell)),Fa=this.getCellGeometry(M[fa].cell);S+=pa;null!=Fa&&null!=ya&&(Fa=
+Fa.clone(),z?Fa.x=Math.round(S-Fa.width/2)-ya.origin.x:Fa.y=Math.round(S-Fa.height/2)-ya.origin.y,this.getModel().setGeometry(M[fa].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,S,ca,fa,na,ra,pa,ya,Fa,Na,Pa,Qa){var Ta=null;if(null!=Qa)for(Ta=new mxDictionary,Fa=0;Fa<Qa.length;Fa++)Ta.put(Qa[Fa],!0);if(Qa=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;fa=null!=fa?fa:!0;na=
+null!=na?na:!0;ya=null!=ya?ya:!1;var Ma="page"==Pa?this.view.getBackgroundPageBounds():fa&&null==Ta||S||"diagram"==Pa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ua=this.view.scale;"diagram"==Pa&&null!=this.backgroundImage&&(Ma=mxRectangle.fromRectangle(Ma),Ma.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*ua,(this.view.translate.y+this.backgroundImage.y)*ua,this.backgroundImage.width*ua,this.backgroundImage.height*ua)));if(null==Ma)throw Error(mxResources.get("drawingEmpty"));
+S=L/ua;Pa=ca?-.5:0;var za=Graph.createSvgNode(Pa,Pa,Math.max(1,Math.ceil(Ma.width*S)+2*M)+(ya&&0==M?5:0),Math.max(1,Math.ceil(Ma.height*S)+2*M)+(ya&&0==M?5:0),z),Ia=za.ownerDocument,Da=null!=Ia.createElementNS?Ia.createElementNS(mxConstants.NS_SVG,"g"):Ia.createElement("g");za.appendChild(Da);var La=this.createSvgCanvas(Da);La.foOffset=ca?-.5:0;La.textOffset=ca?-.5:0;La.imageOffset=ca?-.5:0;La.translate(Math.floor(M/L-Ma.x/ua),Math.floor(M/L-Ma.y/ua));var db=document.createElement("div"),ab=La.getAlternateText;
+La.getAlternateText=function(cb,hb,lb,rb,vb,ob,Ab,Bb,ub,kb,gb,mb,wb){if(null!=ob&&0<this.state.fontSize)try{mxUtils.isNode(ob)?ob=ob.innerText:(db.innerHTML=ob,ob=mxUtils.extractTextWithWhitespace(db.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 ab.apply(this,
+arguments)}else return ab.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=ua/L;var ib=this.view.translate;Pa=new mxRectangle((fb.x+ib.x)*z,(fb.y+ib.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ma,Pa)&&La.image(fb.x+ib.x,fb.y+ib.y,fb.width,fb.height,fb.src,!0)}La.scale(S);La.textEnabled=na;ra=null!=ra?ra:this.createSvgImageExport();var tb=ra.drawCellState,qb=ra.getLinkForCellState;ra.getLinkForCellState=function(cb,hb){var lb=qb.apply(this,arguments);return null==lb||cb.view.graph.isCustomLink(lb)?
+null:lb};ra.getLinkTargetForCellState=function(cb,hb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ra.drawCellState=function(cb,hb){for(var lb=cb.view.graph,rb=null!=Ta?Ta.get(cb.cell):lb.isCellSelected(cb.cell),vb=lb.model.getParent(cb.cell);!(fa&&null==Ta||rb)&&null!=vb;)rb=null!=Ta?Ta.get(vb):lb.isCellSelected(vb),vb=lb.model.getParent(vb);(fa&&null==Ta||rb)&&tb.apply(this,arguments)};ra.drawState(this.getView().getState(this.model.root),La);this.updateSvgLinks(za,pa,!0);this.addForeignObjectWarning(La,
+za);return za}finally{Qa&&(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"),S=z.createElement("g");S.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(S);ca.appendChild(z);
+M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var S=0;S<z.length;S++)if(null==z[S].getAttribute("target")){var ca=z[S].getAttribute("href");null==ca&&(ca=z[S].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[S].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[S].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=
+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 S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var ca=0;ca<S.points.length;ca++)L?S.points[ca].x=M+(M-S.points[ca].x):S.points[ca].y=M+(M-S.points[ca].y);ca=function(fa){null!=fa&&(L?fa.x=
+M+(M-fa.x):fa.y=M+(M-fa.y))};ca(S.getTerminalPoint(!0));ca(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),ca=0;ca<S;ca++){var fa=this.model.getChildAt(z,ca);if(this.model.isEdge(fa))this.flipEdgePoints(fa,L,M);else{var na=this.getCellGeometry(fa);null!=na&&(na=na.clone(),L?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(fa,na))}}}finally{this.model.endUpdate()}};
+Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var ca=this.view.getState(z[S]);null!=ca&&this.flipEdgePoints(z[S],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 fa=this.getCellGeometry(z[S]);null!=fa&&this.flipChildren(z[S],L,L?fa.getCenterX()-fa.x:fa.getCenterY()-fa.y);M.push(z[S])}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 S=0;S<z.length;S++){var ca=this.model.getParent(z[S]);if(this.isTable(ca)){var fa=this.getCellGeometry(z[S]),na=this.getCellGeometry(ca);null!=fa&&null!=na&&(na=na.clone(),na.height-=fa.height,this.model.setGeometry(ca,na))}}var ra=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
+L)}finally{this.model.endUpdate()}if(null!=ra)for(M=[],S=0;S<ra.length;S++)this.model.contains(ra[S])&&(this.model.isVertex(ra[S])||this.model.isEdge(ra[S]))&&M.push(ra[S])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=0;if(this.isTableCell(z)){var fa=M.getParent(z);S=M.getParent(fa);ca=mxUtils.indexOf(M.getChildCells(fa,!0),z)}else this.isTableRow(z)?S=M.getParent(z):z=M.getChildCells(S,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
+var na=M.getChildCells(S,!0),ra=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var pa=M.getChildCells(na[z],!0)[ca],ya=M.cloneCell(pa,!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);ra=Fa.width;var Na=this.getCellGeometry(na[z]);null!=Na&&(Fa.height=Na.height)}M.add(na[z],ya,ca+(L?
+0:1))}var Pa=this.getCellGeometry(S);null!=Pa&&(Pa=Pa.clone(),Pa.width+=ra,M.setGeometry(S,Pa))}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 S=L.getChildCells(M,!0);0==S.length?L.remove(M):(M==z&&(z=S[S.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=null;if("stackLayout"==
+this.getCurrentCellStyle(z).childLayout){S=z;var ca=M.getChildCells(S,!0);z=ca[L?0:ca.length-1]}else S=M.getParent(z);var fa=S.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(S,z,fa+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),S=M.getParent(ca);else if(this.isTableRow(z))S=M.getParent(z);else{var fa=M.getChildCells(S,!0);ca=fa[L?0:fa.length-1]}var na=M.getChildCells(ca,
+!0),ra=S.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var pa=this.getCellGeometry(ca);if(null!=pa){for(fa=0;fa<na.length;fa++){z=M.cloneCell(na[fa],!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=pa.height);ca.insert(z)}M.add(S,ca,ra+(L?0:1));var Fa=this.getCellGeometry(S);
+null!=Fa&&(Fa=Fa.clone(),Fa.height+=pa.height,M.setGeometry(S,Fa))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(S=L.getParent(z));this.isTableRow(S)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(S)||(S=ca[0]);var fa=L.getChildCells(S,!0);if(1>=fa.length)L.remove(M);else{var na=fa.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(fa,z));for(S=z=0;S<
+ca.length;S++){var ra=L.getChildCells(ca[S],!0)[na];L.remove(ra);var pa=this.getCellGeometry(ra);null!=pa&&(z=Math.max(z,pa.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,S=z;this.isTableCell(z)&&(z=S=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(S)||
+(S=ca[ca.length-1]);L.remove(S);z=0;var fa=this.getCellGeometry(S);null!=fa&&(z=fa.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,L.setGeometry(M,na))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],S=M.rows[0].cells,ca=z=0;ca<S.length;ca++){var fa=S[ca].getAttribute("colspan");z+=null!=fa?parseInt(fa):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 S=0;S<M.rows.length;S++){var ca=document.createElement("th");M.rows[S].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)S=z.rows[M].insertCell(L),mxUtils.br(S);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 S;S=M.firstChild;)lastNode=z.appendChild(S);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,fa){ca.length>fa&&(ca=ca.substring(0,Math.round(fa/2))+"..."+ca.substring(ca.length-Math.round(fa/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 S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(z));S.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,M(L,40));this.isCustomLink(z)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));
+return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(fa,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(fa){fa=z.apply(this,arguments);if(mxEvent.isTouchEvent(fa.getEvent())&&null==fa.getState()){var na=this.getCellAt(fa.graphX,fa.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,fa.graphX,fa.graphY)||
+(fa.state=this.view.getState(na),null!=fa.state&&null!=fa.state.shape&&(this.container.style.cursor=fa.state.shape.node.style.cursor))}null==fa.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return fa};var L=!1,M=!1,S=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(fa,na,ra){fa==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),L=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
+mxUtils.bind(this,function(fa,na){var ra=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ra&&(M&&null==na.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(na.getCell())));ra=!L||ra?null:mxUtils.bind(this,function(pa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+
+ya.x+1,na.getY()+ya.y+1,pa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[fa,na,ra])})};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),S="\t";if(null!=z)for(S="";0<z;)S+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(S));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 S=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):S=!1});S&&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,S=z.rangeCount;M<S;++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(S){}};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=
+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 S=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=S&&S.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,fa){fa.originalNode=ca;ca=ca.firstChild;for(var na=fa.firstChild;null!=ca&&null!=na;)L(ca,na),ca=ca.nextSibling,na=na.nextSibling;return fa}function M(ca,fa){if(null!=ca)if(fa.originalNode!=ca)S(ca);else for(ca=ca.firstChild,fa=fa.firstChild;null!=ca;){var na=ca.nextSibling;null==fa?S(ca):(M(ca,fa),
+fa=fa.nextSibling);ca=na}}function S(ca){for(var fa=ca.firstChild;null!=fa;){var na=fa.nextSibling;S(fa);fa=na}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 fa=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,fa):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){ra=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ra.length&&"\n"==ra.charAt(ra.length-1)&&(ra=ra.substring(0,ra.length-1));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"<br/>"):ra,!0);this.textarea.className="mxCellEditor geContentEditable";pa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=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,fa=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(pa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=fa?"italic":"";this.textarea.style.fontFamily=
+L;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=ra&&(this.textarea.innerHTML=ra,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 ra=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ra=mxUtils.replaceTrailingNewlines(ra,
+"<div><br></div>"));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ra,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var pa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(pa)+"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!=ra&&(this.textarea.innerHTML=ra);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 S=null!=z.text?z.text.margin:null;null==S&&(S=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+=S.x*this.bounds.width;this.bounds.y+=S.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);
@@ -2593,31 +2594,31 @@ try{Y.apply(this,arguments),""==L&&this.graph.isCellDeletable(z.cell)&&0==this.g
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=
+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 S=this.graph.model.getParent(z),ca=null!=S?this.graph.getCellGeometry(S):
+null;if(null!=ca&&(M=this.graph.getCellStyle(S),"stackLayout"==M.childLayout)){var fa=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(S);ca=ca.clone();M?ca.height=L.height+na.y+na.height+2*fa:ca.width=L.width+na.x+na.width+2*fa;this.graph.model.setGeometry(S,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
+function(){function z(ra){M.get(ra)||(M.put(ra,!0),ca.push(ra))}for(var L=O.apply(this,arguments),M=new mxDictionary,S=this.graph.model,ca=[],fa=0;fa<L.length;fa++){var na=L[fa];this.graph.isTableCell(na)?z(S.getParent(S.getParent(na))):this.graph.isTableRow(na)&&z(S.getParent(na));z(na)}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=
+var V=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,Ma,ua){for(var za=[],Ia=0;Ia<Ta.length;Ia++){var Da=Ta[Ia];za.push(null==Da?null:new mxPoint((pa+Da.x+Ma)*fa,(ya+Da.y+ua)*fa))}return za},M=this,S=this.graph,ca=S.model,fa=S.view.scale,na=this.state,ra=this.selectionBorder,pa=this.state.origin.x+
+S.view.translate.x,ya=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Fa=S.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ca.getChildCells(Fa[0].cell,!0),Pa=S.getTableLines(this.state.cell,!1,!0),Qa=S.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Fa.length;ca++)mxUtils.bind(this,function(Ta){var Ma=Fa[Ta],ua=Ta<Fa.length-1?Fa[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua.cell):null;var za=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=
+Qa[Ta]?new V(Qa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"row-resize",null,ua);Ma.tableHandle=!0;var Ia=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ia?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Qa[Ta],0,Ia),this.shape.updateBoundsFromLine();else{var La=S.getActualStartSize(na.cell,
+!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ia*fa;this.shape.bounds.x=na.x+(Ta==Fa.length-1?0:La.x*fa);this.shape.bounds.width=na.width-(Ta==Fa.length-1?0:La.width+La.x+fa)}this.shape.redraw()}};var Da=!1;Ma.setPosition=function(La,db,ab){Ia=Math.max(Graph.minTableRowHeight-La.height,db.y-La.y-La.height);Da=mxEvent.isShiftDown(ab.getEvent());null!=za&&Da&&(Ia=Math.min(Ia,za.height-Graph.minTableRowHeight))};Ma.execute=function(La){if(0!=Ia)S.setTableRowHeight(this.state.cell,
+Ia,!Da);else if(!M.blockDelayedSelection){var db=S.getCellAt(La.getGraphX(),La.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(db,La)}Ia=0};Ma.reset=function(){Ia=0};z.push(Ma)})(ca);for(ca=0;ca<Na.length;ca++)mxUtils.bind(this,function(Ta){var Ma=S.view.getState(Na[Ta]),ua=S.getCellGeometry(Na[Ta]),za=null!=ua.alternateBounds?ua.alternateBounds:ua;null==Ma&&(Ma=new mxCellState(S.view,Na[Ta],S.getCellStyle(Na[Ta])),Ma.x=na.x+ua.x*fa,Ma.y=na.y+ua.y*fa,Ma.width=za.width*fa,Ma.height=za.height*
+fa,Ma.updateCachedBounds());ua=Ta<Na.length-1?Na[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua):null;var Ia=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Pa[Ta]?new V(Pa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"col-resize",null,ua);Ma.tableHandle=!0;var Da=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==Da?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Ta],Da,0),this.shape.updateBoundsFromLine();else{var db=S.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(za.width+Da)*fa;this.shape.bounds.y=na.y+(Ta==Na.length-1?0:db.y*fa);this.shape.bounds.height=na.height-(Ta==Na.length-1?0:(db.height+db.y)*fa)}this.shape.redraw()}};var La=!1;Ma.setPosition=function(db,ab,fb){Da=Math.max(Graph.minTableColumnWidth-za.width,ab.x-db.x-za.width);
+La=mxEvent.isShiftDown(fb.getEvent());null==Ia||La||(Da=Math.min(Da,Ia.width-Graph.minTableColumnWidth))};Ma.execute=function(db){if(0!=Da)S.setTableColumnWidth(this.state.cell,Da,La);else if(!M.blockDelayedSelection){var ab=S.getCellAt(db.getGraphX(),db.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(ab,db)}Da=0};Ma.positionChanged=function(){};Ma.reset=function(){Da=0};z.push(Ma)})(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)||
+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 S=mxUtils.createImage(Editor.rowMoveImage);S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=M;mxEvent.addGestureListeners(S,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));
+this.moveHandles.push(S);this.graph.container.appendChild(S)}})(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 ha=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 S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var ca=this.customHandles[S].shape.bounds,fa=ca.getCenterX(),na=ca.getCenterY();if(Math.abs(this.state.x-fa)<ca.width/2||Math.abs(this.state.y-
+na)<ca.height/2||Math.abs(this.state.x+this.state.width-fa)<ca.width/2||Math.abs(this.state.y+this.state.height-na)<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=ha.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+
+"none")};var sa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){sa.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,S=this.graph.view.scale,ca=this.roundLength(L.x/S-M.x);M=this.roundLength(L.y/S-M.y);S=this.graph.view.unit;this.hint.innerHTML=
+e(ca,S)+", "+e(M,S);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"/>');
@@ -2630,367 +2631,368 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(z,L){u.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,T=null,ca=null,ia=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(T=this.first.x,ca=this.first.y,z=(this.currentX-T)/this.graph.view.scale,ia=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var ma=this.graph.getCellsBeyond(T,ca,this.graph.getDefaultParent(),
-!0,!0);for(M=0;M<ma.length;M++)if(this.graph.isCellMovable(ma[M])){var pa=this.graph.view.getState(ma[M]),ua=this.graph.getCellGeometry(ma[M]);null!=pa&&null!=ua&&(ua=ua.clone(),ua.translate(z,ia),this.graph.model.setGeometry(ma[M],ua))}}finally{this.graph.model.endUpdate()}}else ma=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ma,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var T=this.first.x-z,ca=this.first.y-M,ia=this.graph.tolerance;if(null!=this.div||Math.abs(T)>ia||Math.abs(ca)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,T=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/T)*T,this.height=this.graph.snap(this.height/T)*T,
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,S=null,ca=null,fa=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,ca=this.first.y,z=(this.currentX-S)/this.graph.view.scale,fa=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),fa=this.graph.snap(fa),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(fa)<this.graph.tolerance&&(fa=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(S,ca,this.graph.getDefaultParent(),
+!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var ra=this.graph.view.getState(na[M]),pa=this.graph.getCellGeometry(na[M]);null!=ra&&null!=pa&&(pa=pa.clone(),pa.translate(z,fa),this.graph.model.setGeometry(na[M],pa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var S=this.first.x-z,ca=this.first.y-M,fa=this.graph.tolerance;if(null!=this.div||Math.abs(S)>fa||Math.abs(ca)>fa)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,
this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=M-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?
"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle=
-"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var N=(new Date).getTime(),W=0,S=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,T){S.apply(this,arguments);M!=this.currentTerminalState?
-(N=(new Date).getTime(),W=0):W=(new Date).getTime()-N;this.currentTerminalState=M};var P=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&P.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,L,M){L=null!=z&&0==z;var T=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,T,L):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=T?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
+"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var N=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,S){T.apply(this,arguments);M!=this.currentTerminalState?
+(N=(new Date).getTime(),W=0):W=(new Date).getTime()-N;this.currentTerminalState=M};var Q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,L,M){L=null!=z&&0==z;var S=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,S,L):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=S?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,M){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Z.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),T=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=T&&T.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return oa.apply(this,arguments)};var va=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=va.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Aa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),T=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=T&&T.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Aa.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),T=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(T)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&sa.apply(this,
+return Z.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=S&&S.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return oa.apply(this,arguments)};var wa=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=wa.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Aa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Aa.apply(this,arguments)};var ta=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),S=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(S)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ta.apply(this,
arguments)};mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ba.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 ta=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){ta.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 Na=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Na.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var T=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(ca,ia){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));T()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,ia){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
+var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ba.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 va=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){va.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 Oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Oa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var S=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(ca,fa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,fa){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);L=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(L,M);if(null!=L||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var M=document.createElement("img");M.setAttribute("src",Editor.editImage);M.setAttribute("title",
-mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ca){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ca)}));this.linkHint.appendChild(Graph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),mxUtils.bind(this,function(ca){this.graph.setLinkForCell(this.state.cell,
-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 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":"");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 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,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 E(){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 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,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,
-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 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,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 Ea(){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),
-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 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,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/Ta);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Wa);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Wa)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ta));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Wa)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Wa)*l),c.lineTo(.5*l,(1-Wa)*l)):(c.translate((p-
-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Wa),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Wa)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);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(F,mxActor);F.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",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,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,
+mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var S=M.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}if(null!=L)for(M=0;M<L.length;M++){var ca=document.createElement("div");ca.style.marginTop=null!=z||0<M?"6px":"0px";ca.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(ca)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};
+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(S,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 Sa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Sa.apply(this,arguments);this.constraintHandler.isEnabled=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":"");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 Va=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Va.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.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 P(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function la(){mxShape.call(this)}function sa(){mxEllipse.call(this)}
+function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function T(){mxShape.call(this)}function Q(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function va(){mxDoubleEllipse.call(this)}function Oa(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Sa(){mxActor.call(this)}function Ua(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Va(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function fa(){mxActor.call(this)}function na(){mxEllipse.call(this)}
+function ra(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function Ma(){mxActor.call(this)}function ua(){mxActor.call(this)}function za(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 Ia(){mxConnector.call(this)}function Da(c,m,x,p,v,A,B,ia,K,xa){B+=K;var ma=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(ma.x-v-B,ma.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(),ia=this.getTitleSize();0==ia||this.outline?Pa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-x));A||this.outline||!(B&&ia<v||!B&&ia<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 ia=A;A=B;B=ia}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)))),ia=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!=ia&&(c.setFillAlpha(Math.abs(ia)),c.setFillColor(0>ia?"#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 La=Math.tan(mxUtils.toRadians(30)),db=(.5-La)/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/La);c.translate((p-m)/2,(v-m)/2+m/4);c.moveTo(0,.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",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+La));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((p-
+m)/2,(v-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(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),ia=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));ia||(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 fb=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)):fb.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 gb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){gb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+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 ab=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)):ab.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(ma){return"number"===
+typeof ma?ma?0>ma?-1:1:ma===ma?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),ia=this.defaultVariation;5>B&&(B=5,ia/=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)*ia;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 fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.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,l,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,
+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,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=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-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,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);
-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(Ua,mxRectangleShape);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.isHtmlAllowed=function(){return!1};Ua.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",Ua);
-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(Va,mxActor);Va.prototype.dx=20;Va.prototype.dy=20;Va.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",Va);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(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",
+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)))),ia=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+ia),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(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.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};P.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 ia=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+$a,eb=this.style["symbol"+A+"ArcSpacing"];null!=eb&&(eb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=eb,jb+=eb);eb=m;var Ea=x;eb=ia==mxConstants.ALIGN_CENTER?eb+(p-xa)/2:ia==mxConstants.ALIGN_RIGHT?eb+(p-xa-$a):eb+$a;Ea=K==mxConstants.ALIGN_MIDDLE?Ea+(v-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ea+(v-ma-jb):Ea+jb;c.save();ia=new B;ia.style=this.style;B.prototype.paintVertexShape.call(ia,c,eb,Ea,xa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",P);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(ha,mxShape);ha.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",ha);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(sa,mxEllipse);sa.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",sa);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)))),ia=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,ia-1.5*A));c.lineTo(m+Math.max(0,B-A),x+ia);c.lineTo(m,x+ia);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+ia);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,ia=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)),ia=[new mxPoint(B,ia),new mxPoint(B+K,ia+v),new mxPoint(B+
+K,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,ia+xa),new mxPoint(B,ia+xa),new mxPoint(B+v,ia)]);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(ia,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,ia=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)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,ia+xa),new mxPoint(B,ia+xa),new mxPoint(B+
+v,ia)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,ia+xa),new mxPoint(B+v,ia+xa),new mxPoint(B,ia)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia+v),new mxPoint(B+K,ia),new mxPoint(B+K,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+
+K,ia+v),new mxPoint(B+K,ia+xa-v),new mxPoint(B,ia+xa),new mxPoint(B,ia)]);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(ia,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,
+ia=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,c),new mxPoint(B+K-v,ia+xa),new mxPoint(B,ia+xa),new mxPoint(B+v,c),new mxPoint(B,ia)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K,ia),new mxPoint(B+K-v,c),new mxPoint(B+K,ia+xa),new mxPoint(B+v,ia+xa),new mxPoint(B,c),new mxPoint(B+v,ia)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia+v),new mxPoint(ma,ia),new mxPoint(B+K,ia+v),new mxPoint(B+K,ia+xa),new mxPoint(ma,ia+xa-v),new mxPoint(B,ia+xa),new mxPoint(B,ia+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(B,ia),new mxPoint(ma,ia+
+v),new mxPoint(B+K,ia),new mxPoint(B+K,ia+xa-v),new mxPoint(ma,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ia,ma,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,ia=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ia=[new mxPoint(ma,ia),new mxPoint(B+K,ia+v),new mxPoint(B+K,ia+xa-v),new mxPoint(ma,ia+xa),new mxPoint(B,ia+xa-v),new mxPoint(B,ia+v),new mxPoint(ma,ia)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),ia=[new mxPoint(B+v,ia),new mxPoint(B+K-v,ia),new mxPoint(B+K,c),new mxPoint(B+K-v,ia+xa),new mxPoint(B+v,ia+xa),new mxPoint(B,c),new mxPoint(B+v,ia)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ia,ma,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(T,mxShape);T.prototype.size=10;T.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",T);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.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",Q);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(wa,mxCylinder);wa.prototype.jettyWidth=20;wa.prototype.jettyHeight=10;wa.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 ia=Math.min(m,v-m),K=Math.min(ia+2*m,v-m);A?(c.moveTo(x,ia),c.lineTo(B,ia),c.lineTo(B,ia+m),c.lineTo(x,ia+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,ia+m),c.lineTo(0,ia+m),c.lineTo(0,ia),c.lineTo(x,ia),c.close());c.end()};mxCellRenderer.registerShape("module",wa);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 ia=.3*v-m/2,K=.7*v-m/2;A?(c.moveTo(x,ia),c.lineTo(B,ia),c.lineTo(B,ia+m),c.lineTo(x,ia+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,ia+m),c.lineTo(0,ia+m),c.lineTo(0,ia),c.lineTo(x,ia),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,m,x,p,v){var A=p/2,B=v/2,ia=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,ia,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",ta);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(va,Ba);va.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",va);mxUtils.extend(Oa,mxArrowConnector);
+Oa.prototype.defaultWidth=4;Oa.prototype.isOpenEnded=function(){return!0};Oa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Oa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Oa);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(Sa,mxActor);Sa.prototype.size=30;Sa.prototype.isRoundable=function(){return!0};Sa.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",Sa);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(Za,
+mxActor);Za.prototype.arrowWidth=.3;Za.prototype.arrowSize=.2;Za.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",Za);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",Za.prototype.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.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(S,mxActor);S.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",S);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(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.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",fa);mxUtils.extend(na,mxEllipse);na.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",na);mxUtils.extend(ra,mxEllipse);ra.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",ra);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+.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",pa);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(Na,mxEllipse);Na.prototype.paintVertexShape=function(c,m,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ia=x+v-B/2;c.begin();c.moveTo(m,x);c.lineTo(m,x+v);c.moveTo(m+A,ia);c.lineTo(m+A+B,ia-B/2);c.moveTo(m+A,ia);c.lineTo(m+A+B,ia+B/2);c.moveTo(m+A,ia);c.lineTo(m+p-A,ia);c.moveTo(m+p,x);c.lineTo(m+p,x+v);c.moveTo(m+p-A,ia);c.lineTo(m+p-B-A,ia-B/2);c.moveTo(m+
+p-A,ia);c.lineTo(m+p-B-A,ia+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Na);mxUtils.extend(Pa,mxEllipse);Pa.prototype.drawHidden=!0;Pa.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 ia="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ia||xa||ma||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||ia?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||ma?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",Pa);mxUtils.extend(Qa,mxEllipse);Qa.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",Qa);mxUtils.extend(Ta,mxActor);Ta.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",Ta);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.2;Ma.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",Ma);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.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",ua);mxUtils.extend(za,
+mxActor);za.prototype.cst={RECT2:"mxgraph.basic.rect"};za.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(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};Da.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),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");
+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"}]}];za.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,
+x);this.strictDrawShape(c,0,0,p,v)};za.prototype.strictDrawShape=function(c,m,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ia=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),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),$a=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),eb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ha=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=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");
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=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,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,Xa,K,Ja),Ja&&A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
-l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),Ja&&Ga&&A.paintNEInner(c,l,x,p,v,B,Xa,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,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,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,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,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,Za,K,na,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&Ja&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):!Ga&&
-Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,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,l,x,p,v,B,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),A.lineNEInner(c,
-l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,
-K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,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,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,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,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),c.close(),c.fillAndStroke()):Ga&&!Ja&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
-K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,
-x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,
-l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,K,na,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,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,Za,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,
-B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),A.paintNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.paintSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.paintSW(c,l,x,p,v,B,Za,K,Ia),
-A.paintLeft(c,l,x,p,v,B,Ra,K,Ga),c.close(),A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintSWInner(c,l,x,p,v,B,Za,K,na,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,K,na),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),A.paintNEInner(c,l,x,p,v,B,Xa,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,Za,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,Xa,K,Ja),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Xa,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,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Ga),A.paintRight(c,l,x,p,v,B,Ya,K,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,K,na,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,K,na,Ga,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,na,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,na,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ja),A.paintBottom(c,l,x,p,v,B,Za,K,Ha),A.lineSWInner(c,l,x,p,v,B,Za,K,na,Ha),
-A.paintBottomInner(c,l,x,p,v,B,Ya,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,Za,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,Za,K,na,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Xa,
-Ya,Za,K,Ga,Ja,Ia,Ha);c.stroke()};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.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)};Da.prototype.paintFolds=function(c,l,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,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;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,l,x])))};mxCellRenderer.registerShape("filledEdge",Ea);"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),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,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),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,l,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,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 hb=
-function(c,l,x){return lb(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})},lb=function(c,l,x,p,v){return eb(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 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(l){return[eb(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))})]}},vb=function(c){return function(l){return[eb(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)]}},ob=function(c,l,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",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}},Ab=function(c,l,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)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,l,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: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}},ub=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 eb(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=za.prototype;c.setDashed($a);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ia||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ia||(ma=Math.min(eb*Math.min(p,v)/100));ma=Math.min(ma,.5*Math.min(p,v)-K);(Ea||Ja||Ha||Ga)&&"frame"!=xa&&(c.begin(),Ea?A.moveNW(c,m,x,p,v,B,Ra,K,Ga):c.moveTo(0,0),Ea&&A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),Ja&&A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),Ha&&
+A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),Ga&&A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),$a=ia=Hb,"none"==Cb&&(ia=0),"none"==Db&&($a=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ia,$a),c.begin(),Ea?A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga):c.moveTo(ma,0),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),Ga&&Ha&&A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),Ha&&Ja&&A.paintSEInner(c,
+m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),Ja&&Ea&&A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),Ea&&Ga&&A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,m,x,p,v,B,Ra,Wa,Xa,Ya,K,Ea,Ja,Ha,Ga),c.stroke()));Ea||Ja||Ha||!Ga?Ea||Ja||!Ha||Ga?!Ea&&!Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==
+xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),
+c.fillAndStroke()):Ea||!Ja||Ha||Ga?!Ea&&Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,
+K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,
+m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&
+Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea||Ja||Ha||Ga?
+Ea&&!Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,
+m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,
+K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,
+K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,
+x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,
+m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,
+m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,
+m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,
+v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke()):Ea&&Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,
+m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke()):
+Ea&&Ja&&Ha&&Ga&&("frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),c.close(),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,
+B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.paintNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.paintSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.paintSW(c,m,x,p,v,B,Ya,K,Ha),
+A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),c.close(),A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintSWInner(c,m,x,p,v,B,Ya,K,ma,Ha),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),A.paintSEInner(c,m,x,p,v,B,Xa,K,ma),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,m,x,p,v,B,Wa,K,ma),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),A.paintNWInner(c,m,x,p,v,B,Ra,K,ma),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,
+m,x,p,v,B,Wa,K,Ja),"double"==xa&&(A.moveNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Ra,K,Ga),A.paintTop(c,m,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,m,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,m,x,p,v,B,Ra,K,ma,Ga,Ea),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),"double"==xa&&(A.moveSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Wa,K,Ea),A.paintRight(c,m,x,p,v,B,Xa,K,Ha),A.lineSEInner(c,m,x,p,v,B,Xa,K,ma,Ha),A.paintRightInner(c,m,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),"double"==xa&&(A.moveSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Xa,K,Ja),A.paintBottom(c,m,x,p,v,B,Ya,K,Ga),A.lineSWInner(c,m,x,p,v,B,Ya,K,ma,Ga),
+A.paintBottomInner(c,m,x,p,v,B,Xa,K,ma,Ja,Ha),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),"double"==xa&&(A.moveNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Ra,K,Ha),A.paintLeft(c,m,x,p,v,B,Ra,K,Ea),A.lineNWInner(c,m,x,p,v,B,Ra,K,ma,Ea,Ga),A.paintLeftInner(c,m,x,p,v,B,Ya,K,ma,Ha,Ga),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,x,p,v,B,Ra,Wa,
+Xa,Ya,K,Ea,Ja,Ha,Ga);c.stroke()};za.prototype.moveNW=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ia)};za.prototype.moveNE=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ia,0)};za.prototype.moveSE=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ia)};za.prototype.moveSW=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+v):c.moveTo(ia,v)};za.prototype.paintNW=function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,ia,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ia,0);else c.lineTo(0,0)};za.prototype.paintTop=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ia,0)};za.prototype.paintNE=
+function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,p,ia)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ia);else c.lineTo(p,0)};za.prototype.paintRight=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ia)};za.prototype.paintLeft=function(c,m,x,p,v,A,B,ia,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ia)};za.prototype.paintSE=function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,p-ia,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ia,v);else c.lineTo(p,v)};za.prototype.paintBottom=function(c,m,x,p,v,A,B,ia,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+v):c.lineTo(ia,v)};za.prototype.paintSW=function(c,m,x,p,v,A,B,ia,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(ia,ia,0,0,m,0,v-ia)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ia);else c.lineTo(0,v)};za.prototype.paintNWInner=function(c,m,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,K,.5*K+ia);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,K,K+ia);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ia);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ia,K+ia),c.lineTo(K,K+ia)};za.prototype.paintTopInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(0,K):xa&&!ma?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(ia+.5*K,K):c.lineTo(ia+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};za.prototype.paintNEInner=function(c,m,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,p-ia-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,p-ia-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ia-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ia-K,ia+K),c.lineTo(p-ia-K,K)};za.prototype.paintRightInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p-K,0):xa&&!ma?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,ia+.5*K):c.lineTo(p-K,ia+K):c.lineTo(p-K,0):c.lineTo(p,0)};za.prototype.paintLeftInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,v):xa&&!ma?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-ia-.5*K):c.lineTo(K,v-ia-K):
+c.lineTo(K,v):c.lineTo(0,v)};za.prototype.paintSEInner=function(c,m,x,p,v,A,B,ia,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ia-.5*K,ia-.5*K,0,0,0,p-K,v-ia-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ia+K,ia+K,0,0,1,p-K,v-ia-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ia-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ia-K,v-ia-K),c.lineTo(p-K,v-ia-K)};za.prototype.paintBottomInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p,
+v-K):xa&&!ma?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-ia-.5*K,v-K):c.lineTo(p-ia-K,v-K):c.lineTo(p,v)};za.prototype.paintSWInner=function(c,m,x,p,v,A,B,ia,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(ia-.5*K,ia-.5*K,0,0,0,ia+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ia+K,ia+K,0,0,1,ia+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ia+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ia,v-ia-K),c.lineTo(K+ia,v-K)};za.prototype.moveSWInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ia-K):
+c.moveTo(0,v-K)};za.prototype.lineSWInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ia-K):c.lineTo(0,v-K)};za.prototype.moveSEInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ia-K):c.moveTo(p-K,v)};za.prototype.lineSEInner=function(c,m,x,p,v,A,B,ia,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-ia-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ia-K):
+c.lineTo(p-K,v)};za.prototype.moveNEInner=function(c,m,x,p,v,A,B,ia,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,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ia+K):c.moveTo(p,K)};za.prototype.lineNEInner=function(c,m,x,p,v,A,B,ia,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,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ia+K):c.lineTo(p,K)};za.prototype.moveNWInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.moveTo(K,0):xa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,ia+K):c.moveTo(0,0)};za.prototype.lineNWInner=function(c,m,x,p,v,A,B,ia,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,0):xa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ia+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ia+K):c.lineTo(0,0)};za.prototype.paintFolds=function(c,m,x,p,v,A,B,ia,K,xa,ma,$a,jb,eb,Ea){if("fold"==
+A||"fold"==B||"fold"==ia||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&$a&&Ea&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ia||"default"==ia&&"fold"==A)&&$a&&jb&&(c.moveTo(p-ma,0),c.lineTo(p-ma,ma),c.lineTo(p,ma)),("fold"==K||"default"==K&&"fold"==A)&&eb&&jb&&(c.moveTo(p-ma,v),c.lineTo(p-ma,v-ma),c.lineTo(p,v-ma)),("fold"==xa||"default"==xa&&"fold"==A)&&eb&&Ea&&(c.moveTo(0,v-ma),c.lineTo(ma,v-ma),c.lineTo(ma,v))};mxCellRenderer.registerShape(za.prototype.cst.RECT2,za);
+za.prototype.constraints=null;mxUtils.extend(Ia,mxConnector);Ia.prototype.origPaintEdgeShape=Ia.prototype.paintEdgeShape;Ia.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;Ia.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),Ia.prototype.origPaintEdgeShape.apply(this,
+[c,m,x])))};mxCellRenderer.registerShape("filledEdge",Ia);"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,ia,K,xa){var ma=v*(B+K+1),$a=A*(B+K+1);return function(){c.begin();
+c.moveTo(p.x-ma/2-$a/2,p.y-$a/2+ma/2);c.lineTo(p.x+$a/2-3*ma/2,p.y-3*$a/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,x,p,v,A,B,ia,K,xa){var ma=v*(B+K+1),$a=A*(B+K+1),jb=p.x+ma/2,eb=p.y+$a/2;p.x-=ma;p.y-=$a;return function(){c.begin();c.moveTo(jb-ma/2-$a/2,eb-$a/2+ma/2);c.lineTo(jb-ma/2+$a/2,eb-$a/2-ma/2);c.lineTo(jb+$a/2-3*ma/2,eb-3*$a/2-ma/2);c.lineTo(jb-$a/2-3*ma/2,eb-3*$a/2+ma/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,x,p,v,A,B,ia,K,
+xa){var ma=v*(B+K+1),$a=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-ma/2-$a/2,p.y-$a/2+ma/2);c.lineTo(p.x+$a/2-3*ma/2,p.y-3*$a/2-ma/2);c.moveTo(p.x-ma/2+$a/2,p.y-$a/2-ma/2);c.lineTo(p.x-$a/2-3*ma/2,p.y-3*$a/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",Da);mxMarker.addMarker("circlePlus",function(c,m,x,p,v,A,B,ia,K,xa){var ma=p.clone(),$a=Da.apply(this,arguments),jb=v*(B+2*K),eb=A*(B+2*K);return function(){$a.apply(this,arguments);c.begin();c.moveTo(ma.x-v*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+v*K,ma.y-2*eb+A*K);c.moveTo(ma.x-jb-eb+A*K,ma.y-eb+jb-v*K);c.lineTo(ma.x+eb-jb-A*K,ma.y-eb-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,x,p,v,A,B,ia,K,xa){var ma=v*(B+K+1),$a=A*(B+K+1),jb=p.clone();p.x-=ma;p.y-=$a;return function(){c.begin();c.moveTo(jb.x-$a,jb.y+ma);c.quadTo(p.x-$a,p.y+ma,p.x,p.y);c.quadTo(p.x+$a,p.y-ma,jb.x+$a,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,m,x,p,v,A,B,ia,K,xa){m=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var ma=p.clone();ma.x-=m;ma.y-=
+x;p.x+=-v-m;p.y+=-A-x;return function(){c.begin();c.moveTo(ma.x,ma.y);ia?c.lineTo(ma.x-v-A/2,ma.y-A+v/2):c.lineTo(ma.x+A/2-v,ma.y-A-v/2);c.lineTo(ma.x-v,ma.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,ia,K,xa,ma){A*=ia+xa;B*=ia+xa;var $a=v.clone();return function(){m.begin();m.moveTo($a.x,$a.y);K?m.lineTo($a.x-A-B/c,$a.y-B+A/c):m.lineTo($a.x+B/c-A,$a.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,ia){ia=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ia/2,B.y+A*p/4-v*ia/2)},function(p,v,A,B,ia,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},lb=function(c,m,x,p,v){return gb(c,m,function(A){var B=c.absolutePoints,ia=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ia];B=x?B[1]:B[ia-1];ia=B.x-xa.x;var ma=B.y-xa.y,$a=Math.sqrt(ia*ia+ma*ma);xa=
+p.call(this,$a,ia/$a,ma/$a,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ia){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var ma=c.view.scale,$a=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-$a.x;var jb=K.y-$a.y,eb=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;v.call(this,eb,xa/eb,jb/eb,$a,K,B,ia)})},rb=function(c){return function(m){return[gb(m,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Za.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Za.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[gb(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=[gb(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=[gb(A,["size"],function(ia){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(ia.x+Math.max(0,Math.min(.5*ia.width,xa*(K?1:ia.width))),ia.getCenterY())},function(ia,K,xa){ia=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ia.x:Math.max(0,Math.min(x,(K.x-ia.x)/ia.width));this.state.style.size=
+ia},!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=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ia=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ia*(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 gb(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))))})},eb=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[hb(c,!0,10),hb(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(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(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(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(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,
+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))))})},gb=function(c,m,x,p,v,A,B){var ia=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ia.execute=function(xa){for(var ma=0;ma<m.length;ma++)this.copyStyle(m[ma]);B&&B(xa)};ia.getPosition=x;ia.setPosition=p;ia.ignoreGrid=null!=v?v:!0;if(A){var K=ia.positionChanged;ia.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return ia},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,ia){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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]))<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,ia){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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]))<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,ia){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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]))<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,ia){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ia+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ia+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ia,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ia.x,ia.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(eb(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(gb(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:ub(),ext:ub(),rectangle:ub(),
-triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[eb(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[eb(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=[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)&&l.push(kb(c));return l},cross:function(c){return[eb(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[eb(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[eb(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=[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)&&l.push(kb(c));return l},dataStorage:function(c){return[eb(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=[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)&&l.push(kb(c));return l},internalStorage:function(c){var l=[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)&&l.push(kb(c));return l},module:function(c){return[eb(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[eb(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[eb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Va.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:rb(1),doubleArrow:rb(.5),folder:function(c){return[eb(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[eb(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[eb(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[eb(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:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[eb(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: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 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 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,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=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,l){if(l==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,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=[],ia=0;ia<A.length;ia++)A[ia]!=c.cell&&v.isSwimlane(A[ia])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ia]))==p&&B.push(A[ia]);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[gb(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[gb(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=[gb(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[gb(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",Ma.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[gb(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[gb(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=[gb(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Sa.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[gb(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=[gb(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),gb(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),gb(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=[gb(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[gb(c,["jettyWidth","jettyHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",wa.prototype.jettyWidth))),p=Math.max(0,Math.min(m.height,
+mxUtils.getValue(this.state.style,"jettyHeight",wa.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[gb(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[gb(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[gb(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[gb(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[gb(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[gb(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[gb(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.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(ua.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=gb;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,ia=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==ia&&null!=m&&(ia=new mxPoint(m.getCenterX(),m.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=pb.x,xa=pb.y,ma=xb.x,$a=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ia){c=function(Ea,Ja,Ha){Ea-=eb.x;var Ga=Ja-eb.y;Ja=($a*Ea-ma*Ga)/(K*$a-xa*ma);Ea=(xa*Ea-K*Ga)/(xa*ma-K*$a);jb?(Ha&&(eb=new mxPoint(eb.x+K*Ja,eb.y+xa*Ja),v.push(eb)),eb=new mxPoint(eb.x+ma*Ea,eb.y+$a*Ea)):(Ha&&(eb=new mxPoint(eb.x+ma*Ea,eb.y+$a*Ea),v.push(eb)),
+eb=new mxPoint(eb.x+K*Ja,eb.y+xa*Ja));v.push(eb)};var eb=ia;null==p&&(p=new mxPoint(ia.x+(B.x-ia.x)/2,ia.y+(B.y-ia.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};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,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,
-.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),!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))];Pa.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,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;na.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;
+pa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;ua.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};wa.prototype.getConstraints=function(c,m,x){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",wa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",wa.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;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ha.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)];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,
+.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)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];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;Va.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,
-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,
+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)];Za.prototype.getConstraints=
+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",Za.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.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};Ma.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,
+.9),!1)];S.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,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,m,[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,
-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=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
+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(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 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{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 F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(y.getRoot(),n.copiedValue);else for(m=0;m<F.length;m++)q(F[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+
+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,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,m,q){g=mxUtils.trim(g);if(0<g.length){var y=null,F=t.getLinkTitle(g);null!=m&&0<m.length&&(y=m[0].iconUrl,
-F=m[0].name||m[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));m=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=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=E;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"),
-F=0;F<y.length&&null==m;F++)y[F].textContent==g.textContent&&(m=y[F]);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=E;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 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,[m[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,[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=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=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,m,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,m,F);(m&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?t.updateLabelElements(F,function(H){H.style.fontWeight=null;"B"==H.nodeName&&t.replaceElement(H)}):(m&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(H){H.style.fontStyle=null;"I"==H.nodeName&&t.replaceElement(H)}):(m&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],
+"/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,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));m.addPointAt(m.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,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 F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=m&&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")+"):",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 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;")];
+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=E;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(F,C,H){k(g,F,C,H,t)}),n.showDialog(m.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"))})),
+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=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]};
+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;
@@ -2998,23 +3000,24 @@ 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(),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]),m=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",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(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: "+m+"\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=
+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 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),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf(".");E="xml";0<m&&(E=g.substring(m));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+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(g){var l=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+l+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==n?t(g):t(null)}),function(){})}else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown",f=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")";EditorUi.logError("Checksum Error in "+D+" "+f,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-"+f,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(g){}}}catch(g){}};
+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 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,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,m=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());m.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,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=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!=E.mathEnabled?
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var n=this.ui.editor.graph,D=n.getSelectionCells(),t=n.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,t,D);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)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+k()}catch(n){null!=e&&e(n)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(n){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(n.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(n.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
+DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var 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(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};
@@ -3061,7 +3064,7 @@ null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.i
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 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();
+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,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var t=this.isAutosaveRevision();
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};
@@ -3069,9 +3072,9 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,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 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 m=mxUtils.bind(this,
+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,m);this.removeDraft()}catch(G){m(G)}}),m)}),m)}),m):(this.inConflictState=!0,m())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;m(F)}))}),m)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,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";
+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"}},
@@ -3122,32 +3125,32 @@ isVisible:function(u,J){J=J.editorUi.editor.graph.model;return 0<u.vertices.leng
J.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,J){var N=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return J.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==N||N==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,J){return 0<u.vertices.length&&J.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 J=rough.canvas({getContext:function(){return u}});J.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var S=0;S<W.length;S++){var P=W[S];switch(P.type){case "path":null!=N.stroke&&this._drawToContext(u,P,N);break;case "fillPath":this._drawToContext(u,P,N);break;case "fillSketch":this.fillSketch(u,P,N)}}};J.fillSketch=function(N,W,S){var P=u.state.strokeColor,Z=u.state.strokeWidth,oa=u.state.strokeAlpha,va=u.state.dashed,Aa=S.fillWeight;
-0>Aa&&(Aa=S.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(S.fill||"");u.setStrokeWidth(Aa);u.setDashed(!1);this._drawToContext(N,W,S);u.setDashed(va);u.setStrokeWidth(Z);u.setStrokeColor(P);u.setStrokeAlpha(oa)};J._drawToContext=function(N,W,S){N.begin();for(var P=0;P<W.ops.length;P++){var Z=W.ops[P],oa=Z.data;switch(Z.op){case "move":N.moveTo(oa[0],oa[1]);break;case "bcurveTo":N.curveTo(oa[0],oa[1],oa[2],oa[3],oa[4],oa[5]);break;case "lineTo":N.lineTo(oa[0],oa[1])}}N.end();
-"fillPath"===W.type&&S.filled?N.fill():N.stroke()};return J};(function(){function u(P,Z,oa){this.canvas=P;this.rc=Z;this.shape=oa;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;
+Editor.createRoughCanvas=function(u){var J=rough.canvas({getContext:function(){return u}});J.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var Q=W[T];switch(Q.type){case "path":null!=N.stroke&&this._drawToContext(u,Q,N);break;case "fillPath":this._drawToContext(u,Q,N);break;case "fillSketch":this.fillSketch(u,Q,N)}}};J.fillSketch=function(N,W,T){var Q=u.state.strokeColor,Z=u.state.strokeWidth,oa=u.state.strokeAlpha,wa=u.state.dashed,Aa=T.fillWeight;
+0>Aa&&(Aa=T.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(T.fill||"");u.setStrokeWidth(Aa);u.setDashed(!1);this._drawToContext(N,W,T);u.setDashed(wa);u.setStrokeWidth(Z);u.setStrokeColor(Q);u.setStrokeAlpha(oa)};J._drawToContext=function(N,W,T){N.begin();for(var Q=0;Q<W.ops.length;Q++){var Z=W.ops[Q],oa=Z.data;switch(Z.op){case "move":N.moveTo(oa[0],oa[1]);break;case "bcurveTo":N.curveTo(oa[0],oa[1],oa[2],oa[3],oa[4],oa[5]);break;case "lineTo":N.lineTo(oa[0],oa[1])}}N.end();
+"fillPath"===W.type&&T.filled?N.fill():N.stroke()};return J};(function(){function u(Q,Z,oa){this.canvas=Q;this.rc=Z;this.shape=oa;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(P,Z){var oa=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var Aa=0;Aa<va.length;Aa++)oa=(oa<<5)-oa+va.charCodeAt(Aa)<<0}oa={strokeWidth:this.canvas.state.strokeWidth,seed:oa,preserveVertices:!0};va=this.rc.getDefaultOptions();oa.stroke=P?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;P=null;(oa.filled=Z)?(oa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):oa.fill="";oa.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);oa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);oa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
-oa.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);oa.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);oa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);oa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);oa.hachureGap="auto"==Z?-1:Z;oa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-Z);oa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);oa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);oa.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=oa.fill&&(null!=P||null!=Z&&oa.fill==Z)?"solid":va.fillStyle);oa.fillStyle=
-Z;return oa};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 P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=
-function(P,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,P,Z),this.lastX=P,this.lastY=Z)};u.prototype.moveTo=function(P,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,Z),this.lastX=P,this.lastY=Z,this.firstX=P,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(P,Z,oa,va){this.passThrough?this.originalQuadTo.apply(this.canvas,
-arguments):(this.addOp(this.quadOp,P,Z,oa,va),this.lastX=oa,this.lastY=va)};u.prototype.curveTo=function(P,Z,oa,va,Aa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,Z,oa,va,Aa,sa),this.lastX=Aa,this.lastY=sa)};u.prototype.arcTo=function(P,Z,oa,va,Aa,sa,Ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ta=mxUtils.arcToCurves(this.lastX,this.lastY,P,Z,oa,va,Aa,sa,Ba);if(null!=ta)for(var Na=0;Na<ta.length;Na+=6)this.curveTo(ta[Na],
-ta[Na+1],ta[Na+2],ta[Na+3],ta[Na+4],ta[Na+5]);this.lastX=sa;this.lastY=Ba}};u.prototype.rect=function(P,Z,oa,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,Z,oa,va,this.getStyle(!0,!0)))};u.prototype.ellipse=function(P,Z,oa,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+oa/2,Z+va/2,oa,va,this.getStyle(!0,!0)))};u.prototype.roundrect=function(P,
-Z,oa,va,Aa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(P+Aa,Z),this.lineTo(P+oa-Aa,Z),this.quadTo(P+oa,Z,P+oa,Z+sa),this.lineTo(P+oa,Z+va-sa),this.quadTo(P+oa,Z+va,P+oa-Aa,Z+va),this.lineTo(P+Aa,Z+va),this.quadTo(P,Z+va,P,Z+va-sa),this.lineTo(P,Z+sa),this.quadTo(P,Z,P+Aa,Z))};u.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(oa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in P)this.nextShape.options[Z]=
-P[Z];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};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?
+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,Z){var oa=1;if(null!=this.shape.state){var wa=this.shape.state.cell.id;if(null!=wa)for(var Aa=0;Aa<wa.length;Aa++)oa=(oa<<5)-oa+wa.charCodeAt(Aa)<<0}oa={strokeWidth:this.canvas.state.strokeWidth,seed:oa,preserveVertices:!0};wa=this.rc.getDefaultOptions();oa.stroke=Q?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(oa.filled=Z)?(oa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):oa.fill="";oa.bowing=mxUtils.getValue(this.shape.style,"bowing",wa.bowing);oa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",wa.hachureAngle);oa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",wa.curveFitting);
+oa.roughness=mxUtils.getValue(this.shape.style,"jiggle",wa.roughness);oa.simplification=mxUtils.getValue(this.shape.style,"simplification",wa.simplification);oa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",wa.disableMultiStroke);oa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",wa.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);oa.hachureGap="auto"==Z?-1:Z;oa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+Z);oa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);oa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);oa.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=oa.fill&&(null!=Q||null!=Z&&oa.fill==Z)?"solid":wa.fillStyle);oa.fillStyle=
+Z;return oa};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,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,Z),this.lastX=Q,this.lastY=Z)};u.prototype.moveTo=function(Q,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,Z),this.lastX=Q,this.lastY=Z,this.firstX=Q,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,Z,oa,wa){this.passThrough?this.originalQuadTo.apply(this.canvas,
+arguments):(this.addOp(this.quadOp,Q,Z,oa,wa),this.lastX=oa,this.lastY=wa)};u.prototype.curveTo=function(Q,Z,oa,wa,Aa,ta){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,Z,oa,wa,Aa,ta),this.lastX=Aa,this.lastY=ta)};u.prototype.arcTo=function(Q,Z,oa,wa,Aa,ta,Ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var va=mxUtils.arcToCurves(this.lastX,this.lastY,Q,Z,oa,wa,Aa,ta,Ba);if(null!=va)for(var Oa=0;Oa<va.length;Oa+=6)this.curveTo(va[Oa],
+va[Oa+1],va[Oa+2],va[Oa+3],va[Oa+4],va[Oa+5]);this.lastX=ta;this.lastY=Ba}};u.prototype.rect=function(Q,Z,oa,wa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,Z,oa,wa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,Z,oa,wa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+oa/2,Z+wa/2,oa,wa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,
+Z,oa,wa,Aa,ta){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+Aa,Z),this.lineTo(Q+oa-Aa,Z),this.quadTo(Q+oa,Z,Q+oa,Z+ta),this.lineTo(Q+oa,Z+wa-ta),this.quadTo(Q+oa,Z+wa,Q+oa-Aa,Z+wa),this.lineTo(Q+Aa,Z+wa),this.quadTo(Q,Z+wa,Q,Z+wa-ta),this.lineTo(Q,Z+ta),this.quadTo(Q,Z,Q+Aa,Z))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(oa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in Q)this.nextShape.options[Z]=
+Q[Z];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(P){return new u(P,Editor.createRoughCanvas(P),this)};var J=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?J.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,Z,oa,va,Aa){null!=P.handJiggle&&P.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var Z=P.addTolerance,oa=!0;null!=this.style&&(oa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==u&&!this.outline){P.save();
-var va=this.fill,Aa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,Ba=P.setStrokeColor;P.setStrokeColor=function(){};var ta=P.setFillColor;P.setFillColor=function(){};oa||null==va||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;W.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ta;P.setStrokeColor=Ba;this.configurePointerEvents=sa;this.stroke=Aa;this.fill=va;P.restore();oa&&null!=va&&(P.addTolerance=function(){})}W.apply(this,arguments);
-P.addTolerance=Z};var S=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,Z,oa,va,Aa,sa){null!=P.handJiggle&&P.handJiggle.constructor==u?(P.handJiggle.passThrough=!0,S.apply(this,arguments),P.handJiggle.passThrough=!1):S.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,J,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),S=[];if(null!=W&&0<W.length)for(var P=0;P<W.length;P++)if("mxgraph"==W[P].getAttribute("class")){S.push(W[P]);break}0<S.length&&(W=S[0].getAttribute("data-mxgraph"),null!=W?(S=JSON.parse(W),null!=S&&null!=S.xml&&(u=mxUtils.parseXml(S.xml),u=u.documentElement)):(S=S[0].getElementsByTagName("div"),0<S.length&&
-(W=mxUtils.getTextContent(S[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||J||(S=null,"diagram"==u.nodeName?S=u:"mxfile"==
-u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(S=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=S&&(u=Editor.parseDiagramNode(S,N)));null==u||"mxGraphModel"==u.nodeName||J&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,J){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,J),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
+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 J=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?J.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
+"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,Z,oa,wa,Aa){null!=Q.handJiggle&&Q.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var Z=Q.addTolerance,oa=!0;null!=this.style&&(oa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
+var wa=this.fill,Aa=this.stroke;this.stroke=this.fill=null;var ta=this.configurePointerEvents,Ba=Q.setStrokeColor;Q.setStrokeColor=function(){};var va=Q.setFillColor;Q.setFillColor=function(){};oa||null==wa||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;W.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=va;Q.setStrokeColor=Ba;this.configurePointerEvents=ta;this.stroke=Aa;this.fill=wa;Q.restore();oa&&null!=wa&&(Q.addTolerance=function(){})}W.apply(this,arguments);
+Q.addTolerance=Z};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,Z,oa,wa,Aa,ta){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,T.apply(this,arguments),Q.handJiggle.passThrough=!1):T.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,J,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var Q=0;Q<W.length;Q++)if("mxgraph"==W[Q].getAttribute("class")){T.push(W[Q]);break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(u=mxUtils.parseXml(T.xml),u=u.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
+(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||J||(T=null,"diagram"==u.nodeName?T=u:"mxfile"==
+u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(u=Editor.parseDiagramNode(T,N)));null==u||"mxGraphModel"==u.nodeName||J&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,J){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,J),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var J=mxUtils.getTextContent(u),N=null;0<J.length?N=Graph.decompress(J):null!=u.firstChild&&(N=mxUtils.getXml(u.firstChild));return N};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 J=u.indexOf("EmbeddedFile");if(-1<J){var N=u.indexOf("stream",J)+9;if(0<u.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile"))return J=
-u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,J)),{to:"string"})}return null}N=null;J="";for(var W=0,S=0,P=[],Z=null;S<u.length;){var oa=u.charCodeAt(S);S+=1;10!=oa&&(J+=String.fromCharCode(oa));oa=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var va=u.indexOf("%3C%2Fmxfile%3E)",S)+15;S-=9;if(va>S){N=u.substring(S,va);break}}10==oa&&("endobj"==J?Z=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(Z=[],P[J.split(" ")[0]]=Z):null!=Z&&
-Z.push(J),J="")}null==N&&(N=Editor.extractGraphModelFromXref(P));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var J=u.trailer,N=null;null!=J&&(J=/.* \/Info (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(J=u[J[1]],null!=J&&(J=/.* \/Subject (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(u=u[J[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
+u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,J)),{to:"string"})}return null}N=null;J="";for(var W=0,T=0,Q=[],Z=null;T<u.length;){var oa=u.charCodeAt(T);T+=1;10!=oa&&(J+=String.fromCharCode(oa));oa=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var wa=u.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(wa>T){N=u.substring(T,wa);break}}10==oa&&("endobj"==J?Z=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(Z=[],Q[J.split(" ")[0]]=Z):null!=Z&&
+Z.push(J),J="")}null==N&&(N=Editor.extractGraphModelFromXref(Q));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var J=u.trailer,N=null;null!=J&&(J=/.* \/Info (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(J=u[J[1]],null!=J&&(J=/.* \/Subject (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(u=u[J[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
J){var N=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(N=J||mxResources.get("invalidChars"),J=u[0].getElementsByTagName("div"),0<J.length&&(N=mxUtils.getTextContent(J[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(u,J){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=J))};Editor.configure=function(u,J){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!=
@@ -3159,52 +3162,52 @@ u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyl
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&&(N=parseInt(u.sidebarTitleSize),!isNaN(N)&&0<N?Sidebar.prototype.sidebarTitleSize=N: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&&(N=parseInt(u.autosaveDelay),!isNaN(N)&&0<N?DrawioFile.prototype.autosaveDelay=N:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!J)for(App.initPluginCallback(),J=0;J<u.plugins.length;J++)mxscript(u.plugins[J]);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 J=document.getElementsByTagName("script")[0];if(null!=J&&null!=J.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(u));
-J.parentNode.insertBefore(N,J);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var S=document.createElement("link");S.setAttribute("rel","preload");S.setAttribute("href",W);S.setAttribute("as","font");S.setAttribute("crossorigin","");J.parentNode.insertBefore(S,J)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
+J.parentNode.insertBefore(N,J);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");J.parentNode.insertBefore(T,J)}}}};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 J=[],N=0;N<u;N++)J.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return J.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 J=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(J)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[J]),Error(mxResources.get("notADiagramFile")+" ("+J+")");if("mxGraphModel"==u.nodeName){J=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=J&&""!=
J)J!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[J]:mxUtils.load(STYLE_PATH+"/"+J+".xml").getDocumentElement(),null!=N&&(W=new mxCodec(N.ownerDocument),W.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=N){var W=new mxCodec(N.ownerDocument);W.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=J;this.graph.mathEnabled="1"==urlParams.math||
"1"==u.getAttribute("math");J=u.getAttribute("backgroundImage");null!=J?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(J)):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(J=u.getAttribute("extFonts"))try{for(J=
-J.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}}),N=0;N<J.length;N++)this.graph.addExtFont(J[N].name,J[N].url)}catch(S){console.log("ExtFonts format error: "+S.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,J){u=null!=
-u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,J);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(S){return S.name+
-"^"+S.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var J=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=J&&(null!=J&&"<"!=J.charAt(0)&&"%"!=J.charAt(0)&&(J=unescape(window.atob?atob(J):Base64.decode(cont,J))),null!=J&&"%"==J.charAt(0)&&(J=decodeURIComponent(J)),null!=J&&0<J.length)){var N=mxUtils.parseXml(J).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
+J.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),N=0;N<J.length;N++)this.graph.addExtFont(J[N].name,J[N].url)}catch(T){console.log("ExtFonts format error: "+T.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,J){u=null!=
+u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,J);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+
+"^"+T.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var J=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=J&&(null!=J&&"<"!=J.charAt(0)&&"%"!=J.charAt(0)&&(J=unescape(window.atob?atob(J):Base64.decode(cont,J))),null!=J&&"%"==J.charAt(0)&&(J=decodeURIComponent(J)),null!=J&&0<J.length)){var N=mxUtils.parseXml(J).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
function(u,J,N){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;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();k.apply(this,arguments)};
var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.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,J){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(Z){window.setTimeout(function(){"hidden"!=Z.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,Z])},0)};var N=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";J=null!=J?J:{"HTML-CSS":{availableFonts:[N],imageFont:null},
SVG:{font:N,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(J);MathJax.Hub.Register.StartupHook("Begin",function(){for(var Z=0;Z<Editor.mathJaxQueue.length;Z++)Editor.doMathJaxRender(Editor.mathJaxQueue[Z])})}};Editor.MathJaxRender=function(Z){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(Z):Editor.mathJaxQueue.push(Z)};
-Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,oa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var S=document.createElement("script");S.setAttribute("type","text/javascript");S.setAttribute("src",
-u);N[0].parentNode.appendChild(S)}try{if(mxClient.IS_GC||mxClient.IS_SF){var P=document.createElement("style");P.type="text/css";P.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(P)}}catch(Z){}}};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 J=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,S,P){void 0!==W?J.push(W.replace(/\\'/g,"'")):void 0!==S?J.push(S.replace(/\\"/g,'"')):void 0!==P&&J.push(P);return""});/,\s*$/.test(u)&&J.push("");return J};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 J=u.convert,N=this;u.convert=function(W){if(null!=W){var S="http://"==W.substring(0,7)||"https://"==
-W.substring(0,8);S&&!navigator.onLine?W=Editor.svgBrokenImage.src:!S||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=J.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,J){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
-function(){N=!1;J(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(P){window.clearTimeout(W);N&&J(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)});else{var S=new Image;this.crossOriginImages&&(S.crossOrigin="anonymous");S.onload=function(){window.clearTimeout(W);if(N)try{var P=document.createElement("canvas"),Z=P.getContext("2d");P.height=S.height;P.width=S.width;Z.drawImage(S,0,0);
-J(P.toDataURL())}catch(oa){J(Editor.svgBrokenImage.src)}};S.onerror=function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)};S.src=u}}catch(P){J(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,J,N,W){null==W&&(W=this.createImageUrlConverter());var S=0,P=N||{};N=mxUtils.bind(this,function(Z,oa){Z=u.getElementsByTagName(Z);for(var va=0;va<Z.length;va++)mxUtils.bind(this,function(Aa){try{if(null!=Aa){var sa=W.convert(Aa.getAttribute(oa));if(null!=sa&&"data:"!=sa.substring(0,
-5)){var Ba=P[sa];null==Ba?(S++,this.convertImageToDataUri(sa,function(ta){null!=ta&&(P[sa]=ta,Aa.setAttribute(oa,ta));S--;0==S&&J(u)})):Aa.setAttribute(oa,Ba)}else null!=sa&&Aa.setAttribute(oa,sa)}}catch(ta){}})(Z[va])});N("image","xlink:href");N("img","src");0==S&&J(u)};Editor.base64Encode=function(u){for(var J="",N=0,W=u.length,S,P,Z;N<W;){S=u.charCodeAt(N++)&255;if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&
-3)<<4);J+="==";break}P=u.charCodeAt(N++);if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&3)<<4|(P&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);J+="=";break}Z=u.charCodeAt(N++);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&
-3)<<4|(P&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(Z&192)>>6);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return J};Editor.prototype.loadUrl=function(u,J,N,W,S,P,Z,oa){try{var va=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));S=null!=S?S:!0;var Aa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&
-299>=sa.getStatus()){if(null!=J){var Ba=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();Ba=Array(sa.length);for(var ta=0;ta<sa.length;ta++)Ba[ta]=String.fromCharCode(sa[ta]);Ba=Ba.join("")}P=null!=P?P:"data:image/png;base64,";Ba=P+Editor.base64Encode(Ba)}J(Ba)}}else null!=N&&(0==sa.getStatus()?N({message:mxResources.get("accessDenied")},sa):N({message:mxResources.get("error")+
-" "+sa.getStatus()},sa))}),function(sa){null!=N&&N({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){S&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Aa})},oa)});Aa()}catch(sa){null!=N&&N(sa)}};Editor.prototype.absoluteCssFonts=function(u){var J=null;if(null!=u){var N=u.split("url(");if(0<N.length){J=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var S=null;null!=W&&0<W.length&&
-(S=W[0].getAttribute("href"));for(var P=1;P<N.length;P++)if(W=N[P].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[P].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=S?S+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);J.push('url("'+Z+'"'+N[P].substring(W))}else J.push(N[P])}else J=[u]}return null!=J?J.join(""):null};Editor.prototype.mapFontUrl=function(u,J,N){/^https?:\/\//.test(J)&&!this.isCorsEnabledForUrl(J)&&(J=PROXY_URL+"?url="+encodeURIComponent(J));N(u,
-J)};Editor.prototype.embedCssFonts=function(u,J){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var S=mxUtils.bind(this,function(){if(0==W){for(var va=[N[0]],Aa=1;Aa<N.length;Aa++){var sa=N[Aa].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(N[Aa].substring(0,sa))]);va.push('"'+N[Aa].substring(sa))}J(va.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var P=N[u].indexOf(")"),Z=null,oa=N[u].indexOf("format(",P);0<oa&&(Z=Editor.trimCssUrl(N[u].substring(oa+
-7,N[u].indexOf(")",oa))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;W++;var Aa="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(va))Aa="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(va))Aa="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(va))Aa="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(va))Aa="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(va))Aa=
-"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(va))Aa="application/font-sfnt";this.mapFontUrl(Aa,va,mxUtils.bind(this,function(sa,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(ta){this.cachedFonts[va]=ta;W--;S()}),mxUtils.bind(this,function(ta){W--;S()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,P)),Z)}S()}else J(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
-mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},J;for(J in Graph.fontMapping)Graph.isCssFontUrl(J)&&(u[J]=Graph.fontMapping[J]);return u};Editor.prototype.embedExtFonts=function(u){var J=this.graph.getCustomFonts();if(0<J.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var S=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),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");
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,oa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",
+u);N[0].parentNode.appendChild(T)}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(Z){}}};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 J=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,T,Q){void 0!==W?J.push(W.replace(/\\'/g,"'")):void 0!==T?J.push(T.replace(/\\"/g,'"')):void 0!==Q&&J.push(Q);return""});/,\s*$/.test(u)&&J.push("");return J};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 J=u.convert,N=this;u.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==
+W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=J.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,J){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
+function(){N=!1;J(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(W);N&&J(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(N)try{var Q=document.createElement("canvas"),Z=Q.getContext("2d");Q.height=T.height;Q.width=T.width;Z.drawImage(T,0,0);
+J(Q.toDataURL())}catch(oa){J(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)};T.src=u}}catch(Q){J(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,J,N,W){null==W&&(W=this.createImageUrlConverter());var T=0,Q=N||{};N=mxUtils.bind(this,function(Z,oa){Z=u.getElementsByTagName(Z);for(var wa=0;wa<Z.length;wa++)mxUtils.bind(this,function(Aa){try{if(null!=Aa){var ta=W.convert(Aa.getAttribute(oa));if(null!=ta&&"data:"!=ta.substring(0,
+5)){var Ba=Q[ta];null==Ba?(T++,this.convertImageToDataUri(ta,function(va){null!=va&&(Q[ta]=va,Aa.setAttribute(oa,va));T--;0==T&&J(u)})):Aa.setAttribute(oa,Ba)}else null!=ta&&Aa.setAttribute(oa,ta)}}catch(va){}})(Z[wa])});N("image","xlink:href");N("img","src");0==T&&J(u)};Editor.base64Encode=function(u){for(var J="",N=0,W=u.length,T,Q,Z;N<W;){T=u.charCodeAt(N++)&255;if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4);J+="==";break}Q=u.charCodeAt(N++);if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);J+="=";break}Z=u.charCodeAt(N++);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(Z&192)>>6);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return J};Editor.prototype.loadUrl=function(u,J,N,W,T,Q,Z,oa){try{var wa=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));T=null!=T?T:!0;var Aa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ta){if(200<=ta.getStatus()&&
+299>=ta.getStatus()){if(null!=J){var Ba=ta.getText();if(wa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ta=mxUtilsBinaryToArray(ta.request.responseBody).toArray();Ba=Array(ta.length);for(var va=0;va<ta.length;va++)Ba[va]=String.fromCharCode(ta[va]);Ba=Ba.join("")}Q=null!=Q?Q:"data:image/png;base64,";Ba=Q+Editor.base64Encode(Ba)}J(Ba)}}else null!=N&&(0==ta.getStatus()?N({message:mxResources.get("accessDenied")},ta):N({message:mxResources.get("error")+
+" "+ta.getStatus()},ta))}),function(ta){null!=N&&N({message:mxResources.get("error")+" "+ta.getStatus()})},wa,this.timeout,function(){T&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Aa})},oa)});Aa()}catch(ta){null!=N&&N(ta)}};Editor.prototype.absoluteCssFonts=function(u){var J=null;if(null!=u){var N=u.split("url(");if(0<N.length){J=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&
+(T=W[0].getAttribute("href"));for(var Q=1;Q<N.length;Q++)if(W=N[Q].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[Q].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=T?T+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);J.push('url("'+Z+'"'+N[Q].substring(W))}else J.push(N[Q])}else J=[u]}return null!=J?J.join(""):null};Editor.prototype.mapFontUrl=function(u,J,N){/^https?:\/\//.test(J)&&!this.isCorsEnabledForUrl(J)&&(J=PROXY_URL+"?url="+encodeURIComponent(J));N(u,
+J)};Editor.prototype.embedCssFonts=function(u,J){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var wa=[N[0]],Aa=1;Aa<N.length;Aa++){var ta=N[Aa].indexOf(")");wa.push('url("');wa.push(this.cachedFonts[Editor.trimCssUrl(N[Aa].substring(0,ta))]);wa.push('"'+N[Aa].substring(ta))}J(wa.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var Q=N[u].indexOf(")"),Z=null,oa=N[u].indexOf("format(",Q);0<oa&&(Z=Editor.trimCssUrl(N[u].substring(oa+
+7,N[u].indexOf(")",oa))));mxUtils.bind(this,function(wa){if(null==this.cachedFonts[wa]){this.cachedFonts[wa]=wa;W++;var Aa="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(wa))Aa="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(wa))Aa="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(wa))Aa="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(wa))Aa="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(wa))Aa=
+"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(wa))Aa="application/font-sfnt";this.mapFontUrl(Aa,wa,mxUtils.bind(this,function(ta,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(va){this.cachedFonts[wa]=va;W--;T()}),mxUtils.bind(this,function(va){W--;T()}),!0,null,"data:"+ta+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,Q)),Z)}T()}else J(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},J;for(J in Graph.fontMapping)Graph.isCssFontUrl(J)&&(u[J]=Graph.fontMapping[J]);return u};Editor.prototype.embedExtFonts=function(u){var J=this.graph.getCustomFonts();if(0<J.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),u)}),
+Q=0;Q<J.length;Q++)mxUtils.bind(this,function(Z,oa){Graph.isCssFontUrl(oa)?null==this.cachedGoogleFonts[oa]?(W++,this.loadUrl(oa,mxUtils.bind(this,function(wa){this.cachedGoogleFonts[oa]=wa;N.push(wa+"\n");W--;T()}),mxUtils.bind(this,function(wa){W--;N.push("@import url("+oa+");\n");T()}))):N.push(this.cachedGoogleFonts[oa]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+oa+'")}\n')})(J[Q].name,J[Q].url);T()}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,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=
+W,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa,Ca,Sa,Ua,Ka){try{Q=null!=Q?Q:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;va=null!=va?va:0;var bb=wa?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==wa&&(bb=Sa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,va,Oa,null,Z,null,null,null,Aa,null,Sa,Ua,Ka),mxUtils.bind(this,function(Va){try{var Za=new Image;Za.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){fa.drawImage(Za,
+0,0);u(M,Va)},0):(fa.drawImage(Za,0,0),u(M,Va))},M=document.createElement("canvas"),S=parseInt(Va.getAttribute("width")),ca=parseInt(Va.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=Q?Math.min(1,Math.min(3*J/(4*ca),J/S)):J/S);oa=this.getMaxCanvasScale(S,ca,oa);S=Math.ceil(oa*S);ca=Math.ceil(oa*ca);M.setAttribute("width",S);M.setAttribute("height",ca);var fa=M.getContext("2d");null!=bb&&(fa.beginPath(),fa.rect(0,0,S,ca),fa.fillStyle=bb,fa.fill());1!=oa&&fa.scale(oa,oa);if(Ca){var na=Ba.view,
+ra=na.scale;na.scale=1;var pa=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=ra;pa="data:image/svg+xml;base64,"+pa;var ya=Ba.gridSize*na.gridSteps*oa,Fa=Ba.getGraphBounds(),Na=na.translate.x*ra,Pa=na.translate.y*ra,Qa=Na+(Fa.x-Na)/ra-va,Ta=Pa+(Fa.y-Pa)/ra-va,Ma=new Image;Ma.onload=function(){try{for(var ua=-Math.round(ya-mxUtils.mod((Na-Qa)*oa,ya)),za=-Math.round(ya-mxUtils.mod((Pa-Ta)*oa,ya));ua<S;ua+=ya)for(var Ia=za;Ia<ca;Ia+=ya)fa.drawImage(Ma,ua/oa,Ia/oa);L()}catch(Da){null!=
+T&&T(Da)}};Ma.onerror=function(ua){null!=T&&T(ua)};Ma.src=pa}else L()}catch(ua){null!=T&&T(ua)}});Za.onerror=function(L){null!=T&&T(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),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Va))}catch(L){null!=T&&T(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Va,L),this.loadFonts(z)}catch(M){null!=
+T&&T(M)}}))}catch(L){null!=T&&T(L)}}),N,ta)}catch(Va){null!=T&&T(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 T=0;T<W;T++)u=Editor.crcTable[(u^J.charCodeAt(N+T))&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,T){function Q(ta,Ba){var va=
+wa;wa+=Ba;return ta.substring(va,wa)}function Z(ta){ta=Q(ta,4);return ta.charCodeAt(3)+(ta.charCodeAt(2)<<8)+(ta.charCodeAt(1)<<16)+(ta.charCodeAt(0)<<24)}function oa(ta){return String.fromCharCode(ta>>24&255,ta>>16&255,ta>>8&255,ta&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var wa=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(Q(u,4),"IHDR"!=Q(u,4))null!=T&&T();else{Q(u,17);T=u.substring(0,wa);do{var Aa=Z(u);if("IDAT"==
+Q(u,4)){T=u.substring(0,wa-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);T+=oa(N.length)+J+N+oa(W^4294967295);T+=u.substring(wa-8,u.length);break}T+=u.substring(wa-8,wa-4+Aa);Q(u,Aa);Q(u,4)}while(Aa);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!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=
-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()&&
-N.isEnabled()&&"undefined"!==typeof MathJax){S=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){J.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};J.addListener("mathEnabledChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});S.style.paddingTop="5px";u.appendChild(S);var P=J.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position=
-"relative";P.style.marginLeft="6px";P.style.top="2px";S.appendChild(P)}return u};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=
+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(T){var Q=new ChangePageSetup(J);
+Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=T;N.model.execute(Q)},{install:function(T){this.listener=function(){T(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 T=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(T)}}if(this.isMathOptionVisible()&&
+N.isEnabled()&&"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){J.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};J.addListener("mathEnabledChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});T.style.paddingTop="5px";u.appendChild(T);var Q=J.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position=
+"relative";Q.style.marginLeft="6px";Q.style.top="2px";T.appendChild(Q)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
@@ -3226,92 +3229,92 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:
stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(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 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,
-!0);ma.style.position="absolute";ma.style.left=ya.x-ua.x+"px";ma.style.top=ya.y-ua.y+"px";ma.style.width=ia.offsetWidth+"px";ma.style.height=ia.offsetHeight-(pa?4:0)+"px";ma.style.zIndex=5}function P(ia,ma,pa){var ua=document.createElement("div");ua.style.width="32px";ua.style.height="4px";ua.style.margin="2px";ua.style.border="1px solid black";ua.style.background=ma&&"none"!=ma?ma:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(ya){this.editorUi.pickColor(ma,
-function(Fa){ua.style.background="none"==Fa?"url('"+Dialog.prototype.noColorImage+"')":Fa;W(ia,Fa,pa)});mxEvent.consume(ya)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ua);return btn}function Z(ia,ma,pa,ua,ya,Fa,Ma){null!=ma&&(ma=ma.split(","),ta.push({name:ia,values:ma,type:pa,defVal:ua,countProperty:ya,parentRow:Fa,isDeletable:!0,flipBkg:Ma}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Oa){for(var Pa=Fa,Sa=0;null!=Pa.nextSibling;)if(Pa.nextSibling.getAttribute("data-pName")==
-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 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 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 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)":
+{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(Q){if(null!=Q)if(N)for(var Z=0;Z<Q.length;Z++)J[Q[Z].name]=Q[Z];else for(var oa in J){var wa=!1;for(Z=0;Z<Q.length;Z++)if(Q[Z].name==oa&&Q[Z].type==J[oa].type){wa=!0;break}wa||delete J[oa]}},
+T=this.editorUi.editor.graph.view.getState(u);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),W(T.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(Q){}}};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,T=0;T<N.length;T++)this.findCommonProperties(N[T],J,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],J,0==N.length&&0==T);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(fa,na,ra,pa){Ba.getModel().beginUpdate();try{var ya=[],Fa=[];if(null!=ra.index){for(var Na=[],Pa=ra.parentRow.nextSibling;Pa&&Pa.getAttribute("data-pName")==
+fa;)Na.push(Pa.getAttribute("data-pValue")),Pa=Pa.nextSibling;ra.index<Na.length?null!=pa?Na.splice(pa,1):Na[ra.index]=na:Na.push(na);null!=ra.size&&Na.length>ra.size&&(Na=Na.slice(0,ra.size));na=Na.join(",");null!=ra.countProperty&&(Ba.setCellStyles(ra.countProperty,Na.length,Ba.getSelectionCells()),ya.push(ra.countProperty),Fa.push(Na.length))}Ba.setCellStyles(fa,na,Ba.getSelectionCells());ya.push(fa);Fa.push(na);if(null!=ra.dependentProps)for(fa=0;fa<ra.dependentProps.length;fa++){var Qa=ra.dependentPropsDefVal[fa],
+Ta=ra.dependentPropsVals[fa];if(Ta.length>na)Ta=Ta.slice(0,na);else for(var Ma=Ta.length;Ma<na;Ma++)Ta.push(Qa);Ta=Ta.join(",");Ba.setCellStyles(ra.dependentProps[fa],Ta,Ba.getSelectionCells());ya.push(ra.dependentProps[fa]);Fa.push(Ta)}if("function"==typeof ra.onChange)ra.onChange(Ba,na);ta.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ya,"values",Fa,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function T(fa,na,ra){var pa=mxUtils.getOffset(u,!0),ya=mxUtils.getOffset(fa,
+!0);na.style.position="absolute";na.style.left=ya.x-pa.x+"px";na.style.top=ya.y-pa.y+"px";na.style.width=fa.offsetWidth+"px";na.style.height=fa.offsetHeight-(ra?4:0)+"px";na.style.zIndex=5}function Q(fa,na,ra){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=na&&"none"!=na?na:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ta,function(ya){this.editorUi.pickColor(na,
+function(Fa){pa.style.background="none"==Fa?"url('"+Dialog.prototype.noColorImage+"')":Fa;W(fa,Fa,ra)});mxEvent.consume(ya)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function Z(fa,na,ra,pa,ya,Fa,Na){null!=na&&(na=na.split(","),va.push({name:fa,values:na,type:ra,defVal:pa,countProperty:ya,parentRow:Fa,isDeletable:!0,flipBkg:Na}));btn=mxUtils.button("+",mxUtils.bind(ta,function(Pa){for(var Qa=Fa,Ta=0;null!=Qa.nextSibling;)if(Qa.nextSibling.getAttribute("data-pName")==
+fa)Qa=Qa.nextSibling,Ta++;else break;var Ma={type:ra,parentRow:Fa,index:Ta,isDeletable:!0,defVal:pa,countProperty:ya};Ta=Aa(fa,"",Ma,0==Ta%2,Na);W(fa,pa,Ma);Qa.parentNode.insertBefore(Ta,Qa.nextSibling);mxEvent.consume(Pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function oa(fa,na,ra,pa,ya,Fa,Na){if(0<ya){var Pa=Array(ya);na=null!=na?na.split(","):[];for(var Qa=0;Qa<ya;Qa++)Pa[Qa]=null!=na[Qa]?na[Qa]:null!=pa?pa:"";va.push({name:fa,values:Pa,type:ra,
+defVal:pa,parentRow:Fa,flipBkg:Na,size:ya})}return document.createElement("div")}function wa(fa,na,ra){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==na;mxEvent.addListener(pa,"change",function(){W(fa,pa.checked?"1":"0",ra)});return pa}function Aa(fa,na,ra,pa,ya){var Fa=ra.dispName,Na=ra.type,Pa=document.createElement("tr");Pa.className="gePropRow"+(ya?"Dark":"")+(pa?"Alt":"")+" gePropNonHeaderRow";Pa.setAttribute("data-pName",fa);Pa.setAttribute("data-pValue",na);pa=!1;
+null!=ra.index&&(Pa.setAttribute("data-index",ra.index),Fa=(null!=Fa?Fa:"")+"["+ra.index+"]",pa=!0);var Qa=document.createElement("td");Qa.className="gePropRowCell";Fa=mxResources.get(Fa,null,Fa);mxUtils.write(Qa,Fa);Qa.setAttribute("title",Fa);pa&&(Qa.style.textAlign="right");Pa.appendChild(Qa);Qa=document.createElement("td");Qa.className="gePropRowCell";if("color"==Na)Qa.appendChild(Q(fa,na,ra));else if("bool"==Na||"boolean"==Na)Qa.appendChild(wa(fa,na,ra));else if("enum"==Na){var Ta=ra.enumList;
+for(ya=0;ya<Ta.length;ya++)if(Fa=Ta[ya],Fa.val==na){mxUtils.write(Qa,mxResources.get(Fa.dispName,null,Fa.dispName));break}mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){var Ma=document.createElement("select");T(Qa,Ma);for(var ua=0;ua<Ta.length;ua++){var za=Ta[ua],Ia=document.createElement("option");Ia.value=mxUtils.htmlEntities(za.val);mxUtils.write(Ia,mxResources.get(za.dispName,null,za.dispName));Ma.appendChild(Ia)}Ma.value=na;u.appendChild(Ma);mxEvent.addListener(Ma,"change",function(){var Da=
+mxUtils.htmlEntities(Ma.value);W(fa,Da,ra)});Ma.focus();mxEvent.addListener(Ma,"blur",function(){u.removeChild(Ma)})}))}else"dynamicArr"==Na?Qa.appendChild(Z(fa,na,ra.subType,ra.subDefVal,ra.countProperty,Pa,ya)):"staticArr"==Na?Qa.appendChild(oa(fa,na,ra.subType,ra.subDefVal,ra.size,Pa,ya)):"readOnly"==Na?(ya=document.createElement("input"),ya.setAttribute("readonly",""),ya.value=na,ya.style.width="96px",ya.style.borderWidth="0px",Qa.appendChild(ya)):(Qa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(na)),
+mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){function Ma(){var za=ua.value;za=0==za.length&&"string"!=Na?0:za;ra.allowAuto&&(null!=za.trim&&"auto"==za.trim().toLowerCase()?(za="auto",Na="string"):(za=parseFloat(za),za=isNaN(za)?0:za));null!=ra.min&&za<ra.min?za=ra.min:null!=ra.max&&za>ra.max&&(za=ra.max);za=encodeURIComponent(("int"==Na?parseInt(za):za)+"");W(fa,za,ra)}var ua=document.createElement("input");T(Qa,ua,!0);ua.value=decodeURIComponent(na);ua.className="gePropEditor";"int"!=
+Na&&"float"!=Na||ra.allowAuto||(ua.type="number",ua.step="int"==Na?"1":"any",null!=ra.min&&(ua.min=parseFloat(ra.min)),null!=ra.max&&(ua.max=parseFloat(ra.max)));u.appendChild(ua);mxEvent.addListener(ua,"keypress",function(za){13==za.keyCode&&Ma()});ua.focus();mxEvent.addListener(ua,"blur",function(){Ma()})})));ra.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(ta,function(Ma){W(fa,"",ra,ra.index);mxEvent.consume(Ma)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
+"geColorBtn",Qa.appendChild(ya));Pa.appendChild(Qa);return Pa}var ta=this,Ba=this.editorUi.editor.graph,va=[];u.style.position="relative";u.style.padding="0";var Oa=document.createElement("table");Oa.className="geProperties";Oa.style.whiteSpace="nowrap";Oa.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Sa=document.createElement("th");Sa.className="gePropHeaderCell";var Ua=document.createElement("img");Ua.src=Sidebar.prototype.expandedImage;Ua.style.verticalAlign=
+"middle";Sa.appendChild(Ua);mxUtils.write(Sa,mxResources.get("property"));Ca.style.cursor="pointer";var Ka=function(){var fa=Oa.querySelectorAll(".gePropNonHeaderRow");if(ta.editorUi.propertiesCollapsed){Ua.src=Sidebar.prototype.collapsedImage;var na="none";for(var ra=u.childNodes.length-1;0<=ra;ra--)try{var pa=u.childNodes[ra],ya=pa.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(pa)}catch(Fa){}}else Ua.src=Sidebar.prototype.expandedImage,na="";for(ra=0;ra<fa.length;ra++)fa[ra].style.display=
+na};mxEvent.addListener(Ca,"click",function(){ta.editorUi.propertiesCollapsed=!ta.editorUi.propertiesCollapsed;Ka()});Ca.appendChild(Sa);Sa=document.createElement("th");Sa.className="gePropHeaderCell";Sa.innerHTML=mxResources.get("value");Ca.appendChild(Sa);Oa.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&&Oa.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
+!0,!1));for(var Za in J)if(Ca=J[Za],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[Za]?mxUtils.htmlEntities(N.style[Za]+""):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=[],S=[];for(Sa=0;Sa<L.length;Sa++){var ca=N.style[L[Sa]];S.push(J[L[Sa]].subDefVal);M.push(null!=
+ca?ca.split(","):[])}Ca.dependentPropsDefVal=S;Ca.dependentPropsVals=M}Oa.appendChild(Aa(Za,z,Ca,bb,Va));bb=!bb}}for(Sa=0;Sa<va.length;Sa++)for(Ca=va[Sa],J=Ca.parentRow,N=0;N<Ca.values.length;N++)Za=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(Za,J.nextSibling),J=Za;u.appendChild(Oa);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,T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.paddingLeft="24px";T.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(T);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(" "),
+Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var oa=[],wa=0;wa<this.defaultColorSchemes.length;wa++){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(){ta(Ca)}))})(wa);oa.push(Aa);Z.appendChild(Aa)}var ta=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 Sa=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 S=W.getModel().getStyle(L[M]),ca=0;ca<Q.length;ca++)S=mxUtils.removeStylename(S,Q[ca]);var fa=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ka?(mxEvent.isShiftDown(z)||(S=""==Ka.fill?mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,Ka.fill||mxUtils.getValue(fa,
+mxConstants.STYLE_FILLCOLOR,null)),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,Ka.gradient||mxUtils.getValue(fa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,Ka.font||mxUtils.getValue(fa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(S=""==Ka.stroke?mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,
+Ka.stroke||mxUtils.getValue(fa,mxConstants.STYLE_STROKECOLOR,null)))):(S=mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(fa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),S=mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(fa,mxConstants.STYLE_STROKECOLOR,"#000000")),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(fa,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(fa,
+mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],S)}}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",
-mxResources.get("editShape")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),u.appendChild(J)):J.image&&0<J.cells.length&&(J=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(S){this.editorUi.actions.get("image").funct()})),J.setAttribute("title",mxResources.get("editImage")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),
+""==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 Za=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
+Va;bb.style.border="1px solid "+Za}bb.style.borderRadius="0";T.appendChild(bb)});T.innerHTML="";for(var Ua=0;Ua<Ca.length;Ua++)0<Ua&&0==mxUtils.mod(Ua,4)&&mxUtils.br(T),Sa(Ca[Ua])});null==this.format.currentScheme?ta(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ta(this.format.currentScheme);wa=10>=this.defaultColorSchemes.length?28:8;var va=document.createElement("div");va.style.cssText="position:absolute;left:10px;top:8px;bottom:"+wa+"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(va,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Oa=document.createElement("div");Oa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+wa+"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(va),u.appendChild(Oa));mxEvent.addListener(Oa,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));J(va);J(Oa);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(T){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(T){this.editorUi.actions.get("editShape").funct()})),J.setAttribute("title",
+mxResources.get("editShape")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),u.appendChild(J)):J.image&&0<J.cells.length&&(J=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),J.setAttribute("title",mxResources.get("editImage")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),
u.appendChild(J));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,
J){var N=Graph.fontMapping[J];null==N&&Graph.isCssFontUrl(J)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",J)):(null==N&&(N='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+J+'");\n}'),u=document.createElement("style"),mxUtils.write(u,N));return u};Graph.addFont=function(u,J,N){if(null!=u&&0<u.length&&null!=J&&0<J.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
-W){var S=Graph.customFontElements[W];null!=S&&S.url!=J&&(S.elt.parentNode.removeChild(S.elt),S=null);null==S?(S=J,"http:"==J.substring(0,5)&&(S=PROXY_URL+"?url="+encodeURIComponent(J)),S={name:u,url:J,elt:Graph.createFontElement(u,S)},Graph.customFontElements[W]=S,Graph.recentCustomFonts[W]=S,J=document.getElementsByTagName("head")[0],null!=N&&("link"==S.elt.nodeName.toLowerCase()?(S.elt.onload=N,S.elt.onerror=N):N()),null!=J&&J.appendChild(S.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
+W){var T=Graph.customFontElements[W];null!=T&&T.url!=J&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=J,"http:"==J.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(J)),T={name:u,url:J,elt:Graph.createFontElement(u,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,J=document.getElementsByTagName("head")[0],null!=N&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=N,T.elt.onerror=N):N()),null!=J&&J.appendChild(T.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
return u};Graph.getFontUrl=function(u,J){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(J=u.url);return J};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var J=0;J<u.length;J++){var N=u[J].getAttribute("data-font-src");if(null!=N){var W="FONT"==u[J].nodeName?u[J].getAttribute("face"):u[J].style.fontFamily;null!=W&&Graph.addFont(W,N)}}};Graph.processFontStyle=function(u){if(null!=u){var J=mxUtils.getValue(u,"fontSource",null);if(null!=J){var N=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
null);null!=N&&Graph.addFont(N,decodeURIComponent(J))}}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 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=[],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,
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(T){J=T}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(T){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(T){var Q=this.graph.getCellStyle(T);if(null!=Q&&"rack"==Q.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=Q.marginLeft||0;Z.marginRight=Q.marginRight||0;Z.marginTop=Q.marginTop||0;Z.marginBottom=
+Q.marginBottom||0;Z.allowGaps=Q.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(Q,"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,T,Q,Z,oa,wa,Aa,ta){aa.apply(this,arguments);
+Graph.processFontAttributes(ta)};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(),Sa=[],Ua=0;Ua<Ca.length;Ua++)Z.isCellVisible(Ca[Ua])&&Sa.push(Ca[Ua]);Z.setSelectionCells(Sa)}function T(Ca){Z.hiddenTags=Ca?[]:oa.slice();W();Z.refresh()}function Q(Ca,Sa){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 Za=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",Za?Editor.visibleImage:Editor.hiddenImage);
+M.setAttribute("title",mxResources.get(Za?"hideIt":"show",[Va]));mxUtils.setOpacity(M,Za?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 fa=mxUtils.indexOf(Z.hiddenTags,Va);mxEvent.isShiftDown(ca)?T(0<=mxUtils.indexOf(Z.hiddenTags,Va)):(0>fa?Z.hiddenTags.push(Va):0<=fa&&Z.hiddenTags.splice(fa,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,Za?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){T(!0);var fa=Z.getCellsForTags([Va],null,null,!0);Z.isEnabled()?Z.setSelectionCells(fa):
+Z.highlightCells(fa)}else if(Za&&0<Z.hiddenTags.length)T(!0);else{fa=oa.slice();var na=mxUtils.indexOf(fa,Va);fa.splice(na,1);Z.hiddenTags=fa;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==Sa){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,Za?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 fa=mxUtils.indexOf(oa,Va);0<=fa&&oa.splice(fa,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Va]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px";S.defaultChecked=
+null!=Sa&&0<=mxUtils.indexOf(Sa,Va);S.checked=S.defaultChecked;S.style.background="transparent";S.setAttribute("title",mxResources.get(S.defaultChecked?"removeIt":"add",[Va]));mxEvent.addListener(S,"change",function(ca){S.checked?Z.addTagsForCells(Z.getSelectionCells(),[Va]):Z.removeTagsForCells(Z.getSelectionCells(),[Va]);mxEvent.consume(ca)});L.appendChild(S)}z.appendChild(L)}Ka.appendChild(z)})(Ca[bb]);Ua.appendChild(Ka);Aa.appendChild(Ua)}}var Z=this,oa=Z.hiddenTags.slice(),wa=document.createElement("div");
+wa.style.userSelect="none";wa.style.overflow="hidden";wa.style.padding="10px";wa.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";wa.appendChild(Aa);var ta=mxUtils.button(mxResources.get("reset"),
+function(Ca){Z.hiddenTags=[];mxEvent.isShiftDown(Ca)||(oa=Z.hiddenTags.slice());W();Z.refresh()});ta.setAttribute("title",mxResources.get("reset"));ta.className="geBtn";ta.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(oa,function(Ca){oa=Ca;va()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";Z.addListener(mxEvent.ROOT,function(){oa=Z.hiddenTags.slice()});var va=mxUtils.bind(this,function(Ca,Sa){if(u()){Ca=Z.getAllTags();
+for(Sa=0;Sa<Ca.length;Sa++)0>mxUtils.indexOf(oa,Ca[Sa])&&oa.push(Ca[Sa]);oa.sort();Z.isSelectionEmpty()?Q(oa):Q(oa,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,va);Z.model.addListener(mxEvent.CHANGE,va);Z.addListener(mxEvent.REFRESH,va);var Oa=document.createElement("div");Oa.style.boxSizing="border-box";Oa.style.whiteSpace="nowrap";Oa.style.position="absolute";Oa.style.overflow="hidden";Oa.style.bottom="0px";Oa.style.height="42px";Oa.style.right=
+"10px";Oa.style.left="10px";Z.isEnabled()&&(Oa.appendChild(ta),Oa.appendChild(Ba),wa.appendChild(Oa));return{div:wa,refresh:va}};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,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};
+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,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa){var Ca=null,Sa=null,Ua=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Sa=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(ta&&0<bb.length){var Va=Ka.ownerDocument,Za=null!=Va.createElementNS?Va.createElementNS(mxConstants.NS_SVG,"style"):Va.createElement("style");null!=Va.setAttributeNS?Za.setAttributeNS("type","text/css"):Za.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var S=
+bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+S+'";\nsrc: url("'+ca+'");\n}\n'}Za.appendChild(Va.createTextNode(z+L));Ka.getElementsByTagName("defs")[0].appendChild(Za)}null!=Ca&&(this.shapeBackgroundColor=Ua,this.shapeForegroundColor=Sa,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 T=N.text.getContentNode();if(null!=T){T=T.cloneNode(!0);if(T.getElementsByTagNameNS)for(var Q=T.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=T.innerHTML&&(Q=N.text.value,N.text.value=T.innerHTML,J.apply(this,arguments),N.text.value=Q)}}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?
(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)):J||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);J=u.secondLabel;if(null!=J){var N=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*N,u.y+4*N,0,0):mxRectangle.fromPoint(u.view.getPoint(u));
J.bounds.equals(u)&&J.value==W&&J.scale==N||(J.bounds=u,J.value=W,J.scale=N,J.redraw())}};var ja=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ja.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 U=Graph.prototype.refresh;Graph.prototype.refresh=function(){U.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(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,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,S=0,P=mxUtils.bind(this,function(){N||
-(N=!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),oa=mxUtils.bind(this,function(){0<W&&W--;0==W&&va()}),va=mxUtils.bind(this,function(){if(S<u.length){var Aa=this.stoppingCustomActions,sa=u[S++],Ba=[];if(null!=sa.open)if(Z(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||Aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
-null;oa()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=sa.wait?parseInt(sa.wait):1E3),Z());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,oa,Aa?0:sa.fadeIn.delay));null!=sa.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),
-1,0,oa,Aa?0:sa.fadeOut.delay));null!=sa.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,!0),!0)));null!=sa.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(P(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){P();var ta=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ta),1);this.setCellsVisible(ta,!0)}null!=sa.hide&&(P(),ta=this.getCellsForAction(sa.hide,
-!0),Graph.setOpacityForNodes(this.getNodesForCells(ta),0),this.setCellsVisible(ta,!1));null!=sa.toggleStyle&&null!=sa.toggleStyle.key&&(P(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(P(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));ta=[];null!=sa.select&&this.isEnabled()&&(ta=this.getCellsForAction(sa.select),this.setSelectionCells(ta));
-null!=sa.highlight&&(ta=this.getCellsForAction(sa.highlight),this.highlightCells(ta,sa.highlight.color,sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(ta=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<ta.length&&this.scrollCellToVisible(ta[0]);if(null!=sa.tags){ta=[];null!=sa.tags.hidden&&(ta=ta.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Na=this.getAllTags(),Ca=0;Ca<Na.length;Ca++)0>mxUtils.indexOf(sa.tags.visible,Na[Ca])&&
-0>mxUtils.indexOf(ta,Na[Ca])&&ta.push(Na[Ca]);this.hiddenTags=ta;this.refresh()}0<Ba.length&&(W++,this.executeAnimations(Ba,oa,Aa?1:sa.steps,Aa?0:sa.delay));0==W?va():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=J&&J()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,J){var N=this.getLinkForCell(J);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(J,this.updateCustomLink(u,N));if(this.isHtmlLabel(J)){var W=document.createElement("div");
-W.innerHTML=this.sanitizeHtml(this.getLabel(J));for(var S=W.getElementsByTagName("a"),P=!1,Z=0;Z<S.length;Z++)N=S[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(S[Z].setAttribute("href",this.updateCustomLink(u,N)),P=!0);P&&this.labelChanged(J,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,J){if("data:action/json,"==J.substring(0,17))try{var N=JSON.parse(J.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),J="data:action/json,"+JSON.stringify(N))}catch(W){}return J};
-Graph.prototype.updateCustomLinkActions=function(u,J){for(var N=0;N<J.length;N++){var W=J[N],S;for(S in W)this.updateCustomLinkAction(u,W[S],"cells"),this.updateCustomLinkAction(u,W[S],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,J,N){if(null!=J&&null!=J[N]){for(var W=[],S=0;S<J[N].length;S++)if("*"==J[N][S])W.push(J[N][S]);else{var P=u[J[N][S]];null!=P?""!=P&&W.push(P):W.push(J[N][S])}J[N]=W}};Graph.prototype.getCellsForAction=function(u,J){J=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
-null,J));if(null!=u.excludeCells){for(var N=[],W=0;W<J.length;W++)0>u.excludeCells.indexOf(J[W].id)&&N.push(J[W]);J=N}return J};Graph.prototype.getCellsById=function(u){var J=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();J=J.concat(this.model.filterDescendants(function(P){return P!=W},W))}else{var S=this.model.getCell(u[N]);null!=S&&J.push(S)}return J};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.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 J=0;J<u.length;J++)if(0>mxUtils.indexOf(this.hiddenTags,u[J]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,J,N,W){var S=[];if(null!=u){J=null!=J?J:this.model.getDescendants(this.model.getRoot());for(var P=0,Z={},oa=0;oa<u.length;oa++)0<u[oa].length&&(Z[u[oa]]=!0,P++);
-for(oa=0;oa<J.length;oa++)if(N&&this.model.getParent(J[oa])==this.model.root||this.model.isVertex(J[oa])||this.model.isEdge(J[oa])){var va=this.getTagsForCell(J[oa]),Aa=!1;if(0<va.length&&(va=va.split(" "),va.length>=u.length)){for(var sa=Aa=0;sa<va.length&&Aa<P;sa++)null!=Z[va[sa]]&&Aa++;Aa=Aa==P}Aa&&(1!=W||this.isCellVisible(J[oa]))&&S.push(J[oa])}}return S};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=
-function(u){for(var J=null,N=[],W=0;W<u.length;W++){var S=this.getTagsForCell(u[W]);N=[];if(0<S.length){S=S.split(" ");for(var P={},Z=0;Z<S.length;Z++)if(null==J||null!=J[S[Z]])P[S[Z]]=!0,N.push(S[Z]);J=P}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var J=[],N={},W=0;W<u.length;W++){var S=this.getTagsForCell(u[W]);if(0<S.length){S=S.split(" ");for(var P=0;P<S.length;P++)null==N[S[P]]&&(N[S[P]]=!0,J.push(S[P]))}}return J};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,
-"tags","")};Graph.prototype.addTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),S=W.split(" "),P=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.trim(J[Z]);""!=oa&&0>mxUtils.indexOf(S,oa)&&(W=0<W.length?W+" "+oa:oa,P=!0)}P&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=
-0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var S=W.split(" "),P=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.indexOf(S,J[Z]);0<=oa&&(S.splice(oa,1),P=!0)}P&&this.setAttributeForCell(u[N],"tags",S.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var J=0;J<u.length;J++)this.model.setVisible(u[J],!this.model.isVisible(u[J]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,J){this.model.beginUpdate();
-try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],J)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,J,N,W){for(var S=0;S<u.length;S++)this.highlightCell(u[S],J,N,W)};Graph.prototype.highlightCell=function(u,J,N,W,S){J=null!=J?J:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var P=null;null!=u&&(S=null!=S?S:4,S=Math.max(S+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+S),P=new mxCellHighlight(this,J,S,!1),null!=W&&(P.opacity=
-W),P.highlight(u),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},N));return P};Graph.prototype.addSvgShadow=function(u,J,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var S=u.ownerDocument,P=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"filter"):S.createElement("filter");P.setAttribute("id",this.shadowId);var Z=null!=S.createElementNS?
-S.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):S.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");P.appendChild(Z);Z=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feOffset"):S.createElement("feOffset");Z.setAttribute("in","blur");Z.setAttribute("dx",this.svgShadowSize);Z.setAttribute("dy",this.svgShadowSize);Z.setAttribute("result","offsetBlur");P.appendChild(Z);Z=null!=S.createElementNS?
-S.createElementNS(mxConstants.NS_SVG,"feFlood"):S.createElement("feFlood");Z.setAttribute("flood-color",this.svgShadowColor);Z.setAttribute("flood-opacity",this.svgShadowOpacity);Z.setAttribute("result","offsetColor");P.appendChild(Z);Z=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feComposite"):S.createElement("feComposite");Z.setAttribute("in","offsetColor");Z.setAttribute("in2","offsetBlur");Z.setAttribute("operator","in");Z.setAttribute("result","offsetBlur");P.appendChild(Z);
-Z=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"feBlend"):S.createElement("feBlend");Z.setAttribute("in","SourceGraphic");Z.setAttribute("in2","offsetBlur");P.appendChild(Z);Z=u.getElementsByTagName("defs");0==Z.length?(S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=u.firstChild?u.insertBefore(S,u.firstChild):u.appendChild(S)):S=Z[0];S.appendChild(P);N||(J=null!=J?J:u.getElementsByTagName("g")[0],null!=J&&(J.setAttribute("filter",
-"url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),J=u.getAttribute("viewBox"),null!=J&&0<J.length&&(J=J.split(" "),3<J.length&&(w=parseFloat(J[2])+6,h=parseFloat(J[3])+6,u.setAttribute("viewBox",J[0]+" "+J[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(u,J){mxClient.IS_SVG&&!mxClient.IS_SF&&(J=null!=J?J:!0,(this.shadowVisible=u)?
+u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,T=0,Q=mxUtils.bind(this,function(){N||
+(N=!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),oa=mxUtils.bind(this,function(){0<W&&W--;0==W&&wa()}),wa=mxUtils.bind(this,function(){if(T<u.length){var Aa=this.stoppingCustomActions,ta=u[T++],Ba=[];if(null!=ta.open)if(Z(),this.isCustomLink(ta.open)){if(!this.customLinkClicked(ta.open))return}else this.openLink(ta.open);null==ta.wait||Aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
+null;oa()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ta.wait?parseInt(ta.wait):1E3),Z());null!=ta.opacity&&null!=ta.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ta.opacity,!0)),ta.opacity.value);null!=ta.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeIn,!0)),0,1,oa,Aa?0:ta.fadeIn.delay));null!=ta.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeOut,!0)),
+1,0,oa,Aa?0:ta.fadeOut.delay));null!=ta.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeIn,!0),!0)));null!=ta.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeOut,!0),!1)));null!=ta.toggle&&(Q(),this.toggleCells(this.getCellsForAction(ta.toggle,!0)));if(null!=ta.show){Q();var va=this.getCellsForAction(ta.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(va),1);this.setCellsVisible(va,!0)}null!=ta.hide&&(Q(),va=this.getCellsForAction(ta.hide,
+!0),Graph.setOpacityForNodes(this.getNodesForCells(va),0),this.setCellsVisible(va,!1));null!=ta.toggleStyle&&null!=ta.toggleStyle.key&&(Q(),this.toggleCellStyles(ta.toggleStyle.key,null!=ta.toggleStyle.defaultValue?ta.toggleStyle.defaultValue:"0",this.getCellsForAction(ta.toggleStyle,!0)));null!=ta.style&&null!=ta.style.key&&(Q(),this.setCellStyles(ta.style.key,ta.style.value,this.getCellsForAction(ta.style,!0)));va=[];null!=ta.select&&this.isEnabled()&&(va=this.getCellsForAction(ta.select),this.setSelectionCells(va));
+null!=ta.highlight&&(va=this.getCellsForAction(ta.highlight),this.highlightCells(va,ta.highlight.color,ta.highlight.duration,ta.highlight.opacity));null!=ta.scroll&&(va=this.getCellsForAction(ta.scroll));null!=ta.viewbox&&this.fitWindow(ta.viewbox,ta.viewbox.border);0<va.length&&this.scrollCellToVisible(va[0]);if(null!=ta.tags){va=[];null!=ta.tags.hidden&&(va=va.concat(ta.tags.hidden));if(null!=ta.tags.visible)for(var Oa=this.getAllTags(),Ca=0;Ca<Oa.length;Ca++)0>mxUtils.indexOf(ta.tags.visible,Oa[Ca])&&
+0>mxUtils.indexOf(va,Oa[Ca])&&va.push(Oa[Ca]);this.hiddenTags=va;this.refresh()}0<Ba.length&&(W++,this.executeAnimations(Ba,oa,Aa?1:ta.steps,Aa?0:ta.delay));0==W?wa():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=J&&J()});wa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,J){var N=this.getLinkForCell(J);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(J,this.updateCustomLink(u,N));if(this.isHtmlLabel(J)){var W=document.createElement("div");
+W.innerHTML=this.sanitizeHtml(this.getLabel(J));for(var T=W.getElementsByTagName("a"),Q=!1,Z=0;Z<T.length;Z++)N=T[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(T[Z].setAttribute("href",this.updateCustomLink(u,N)),Q=!0);Q&&this.labelChanged(J,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,J){if("data:action/json,"==J.substring(0,17))try{var N=JSON.parse(J.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),J="data:action/json,"+JSON.stringify(N))}catch(W){}return J};
+Graph.prototype.updateCustomLinkActions=function(u,J){for(var N=0;N<J.length;N++){var W=J[N],T;for(T in W)this.updateCustomLinkAction(u,W[T],"cells"),this.updateCustomLinkAction(u,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,J,N){if(null!=J&&null!=J[N]){for(var W=[],T=0;T<J[N].length;T++)if("*"==J[N][T])W.push(J[N][T]);else{var Q=u[J[N][T]];null!=Q?""!=Q&&W.push(Q):W.push(J[N][T])}J[N]=W}};Graph.prototype.getCellsForAction=function(u,J){J=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
+null,J));if(null!=u.excludeCells){for(var N=[],W=0;W<J.length;W++)0>u.excludeCells.indexOf(J[W].id)&&N.push(J[W]);J=N}return J};Graph.prototype.getCellsById=function(u){var J=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();J=J.concat(this.model.filterDescendants(function(Q){return Q!=W},W))}else{var T=this.model.getCell(u[N]);null!=T&&J.push(T)}return J};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.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 J=0;J<u.length;J++)if(0>mxUtils.indexOf(this.hiddenTags,u[J]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,J,N,W){var T=[];if(null!=u){J=null!=J?J:this.model.getDescendants(this.model.getRoot());for(var Q=0,Z={},oa=0;oa<u.length;oa++)0<u[oa].length&&(Z[u[oa]]=!0,Q++);
+for(oa=0;oa<J.length;oa++)if(N&&this.model.getParent(J[oa])==this.model.root||this.model.isVertex(J[oa])||this.model.isEdge(J[oa])){var wa=this.getTagsForCell(J[oa]),Aa=!1;if(0<wa.length&&(wa=wa.split(" "),wa.length>=u.length)){for(var ta=Aa=0;ta<wa.length&&Aa<Q;ta++)null!=Z[wa[ta]]&&Aa++;Aa=Aa==Q}Aa&&(1!=W||this.isCellVisible(J[oa]))&&T.push(J[oa])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=
+function(u){for(var J=null,N=[],W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);N=[];if(0<T.length){T=T.split(" ");for(var Q={},Z=0;Z<T.length;Z++)if(null==J||null!=J[T[Z]])Q[T[Z]]=!0,N.push(T[Z]);J=Q}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var J=[],N={},W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);if(0<T.length){T=T.split(" ");for(var Q=0;Q<T.length;Q++)null==N[T[Q]]&&(N[T[Q]]=!0,J.push(T[Q]))}}return J};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,
+"tags","")};Graph.prototype.addTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.trim(J[Z]);""!=oa&&0>mxUtils.indexOf(T,oa)&&(W=0<W.length?W+" "+oa:oa,Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=
+0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.indexOf(T,J[Z]);0<=oa&&(T.splice(oa,1),Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var J=0;J<u.length;J++)this.model.setVisible(u[J],!this.model.isVisible(u[J]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,J){this.model.beginUpdate();
+try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],J)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,J,N,W){for(var T=0;T<u.length;T++)this.highlightCell(u[T],J,N,W)};Graph.prototype.highlightCell=function(u,J,N,W,T){J=null!=J?J:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var Q=null;null!=u&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+T),Q=new mxCellHighlight(this,J,T,!1),null!=W&&(Q.opacity=
+W),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)},N));return Q};Graph.prototype.addSvgShadow=function(u,J,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var T=u.ownerDocument,Q=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");Q.setAttribute("id",this.shadowId);var Z=null!=T.createElementNS?
+T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feOffset"):T.createElement("feOffset");Z.setAttribute("in","blur");Z.setAttribute("dx",this.svgShadowSize);Z.setAttribute("dy",this.svgShadowSize);Z.setAttribute("result","offsetBlur");Q.appendChild(Z);Z=null!=T.createElementNS?
+T.createElementNS(mxConstants.NS_SVG,"feFlood"):T.createElement("feFlood");Z.setAttribute("flood-color",this.svgShadowColor);Z.setAttribute("flood-opacity",this.svgShadowOpacity);Z.setAttribute("result","offsetColor");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feComposite"):T.createElement("feComposite");Z.setAttribute("in","offsetColor");Z.setAttribute("in2","offsetBlur");Z.setAttribute("operator","in");Z.setAttribute("result","offsetBlur");Q.appendChild(Z);
+Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feBlend"):T.createElement("feBlend");Z.setAttribute("in","SourceGraphic");Z.setAttribute("in2","offsetBlur");Q.appendChild(Z);Z=u.getElementsByTagName("defs");0==Z.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(T,u.firstChild):u.appendChild(T)):T=Z[0];T.appendChild(Q);N||(J=null!=J?J:u.getElementsByTagName("g")[0],null!=J&&(J.setAttribute("filter",
+"url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),J=u.getAttribute("viewBox"),null!=J&&0<J.length&&(J=J.split(" "),3<J.length&&(w=parseFloat(J[2])+6,h=parseFloat(J[3])+6,u.setAttribute("viewBox",J[0]+" "+J[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,J){mxClient.IS_SVG&&!mxClient.IS_SF&&(J=null!=J?J:!0,(this.shadowVisible=u)?
this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),J&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),J=0;do var N=this.model.getChildAt(this.model.root,J);while(J++<u&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}};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",
@@ -3324,289 +3327,289 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.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 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,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(),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 yb=hb.renderPage;hb.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=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 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);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){}})();
+[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 P=mxMarker.createMarker;mxMarker.createMarker=function(u,J,N,W,T,Q,Z,oa,wa,Aa){if(null!=N&&null==mxMarker.markers[N]){var ta=this.getPackageForType(N);null!=ta&&mxStencilRegistry.getStencil(ta)}return P.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=
+function(u,J,N,W,T,Q){"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(){va.value=Math.max(1,Math.min(oa,Math.max(parseInt(va.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(va.value),parseInt(Ba.value))))}function W(Fa){function Na(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,gb=0,mb=pa.get(),wb=1/cb.pageScale,pb=Ka.checked;if(pb){wb=parseInt(na.value);var xb=parseInt(ra.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)&&(Pa=1/cb.pageScale,Ua.value="100 %");
+mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Pa);mb.height=Math.ceil(mb.height*Pa);wb*=Pa;!pb&&cb.pageVisible?(ub=cb.getPageLayout(),kb-=ub.x*mb.width,gb-=ub.y*mb.height):pb=!0;if(null==hb){hb=PrintDialog.createPrintPreview(cb,wb,mb,0,kb,gb,pb);hb.pageSelector=!1;hb.mathEnabled=!1;Oa.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;gb=T.shapeForegroundColor;pb=T.shapeBackgroundColor;mb=T.enableFlowAnimation;T.enableFlowAnimation=!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(kb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());hb.open(null,null,lb,!0);T.enableFlowAnimation=mb;null!=kb&&
+(T.shapeForegroundColor=gb,T.shapeBackgroundColor=pb,T.stylesheet=kb,T.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,gb,lb,!0);lb=cb.getCustomFonts();if(null!=hb.wnd)for(kb=0;kb<lb.length;kb++)gb=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(gb)+'";\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 Pa=parseInt(ya.value)/100;isNaN(Pa)&&(Pa=1,ya.value="100 %");Pa*=.75;var Qa=null,Ta=T.shapeForegroundColor,Ma=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(Qa=T.stylesheet,T.stylesheet=
+T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var ua=Ba.value,za=va.value,Ia=!Aa.checked,Da=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,ua,za,Ka.checked,na.value,ra.value,parseInt(Ua.value)/100,parseInt(ya.value)/100,pa.get());else{Ia&&(Ia=Oa.checked||ua==wa&&za==wa);if(!Ia&&null!=u.pages&&u.pages.length){var La=0;Ia=u.pages.length-1;Aa.checked||(La=parseInt(ua)-1,Ia=parseInt(za)-1);for(var db=La;db<=Ia;db++){var ab=
+u.pages[db];ua=ab==u.currentPage?T:null;if(null==ua){ua=u.createTemporaryGraph(T.stylesheet);ua.shapeForegroundColor=T.shapeForegroundColor;ua.shapeBackgroundColor=T.shapeBackgroundColor;za=!0;La=!1;var fb=null,ib=null;null==ab.viewState&&null==ab.root&&u.updatePageRoot(ab);null!=ab.viewState&&(za=ab.viewState.pageVisible,La=ab.viewState.mathEnabled,fb=ab.viewState.background,ib=ab.viewState.backgroundImage,ua.extFonts=ab.viewState.extFonts);null!=ib&&null!=ib.originalSrc&&(ib=u.createImageForPageLink(ib.originalSrc,
+ab));ua.background=fb;ua.backgroundImage=null!=ib?new mxImage(ib.src,ib.width,ib.height,ib.x,ib.y):null;ua.pageVisible=za;ua.mathEnabled=La;var tb=ua.getGraphBounds;ua.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=ua.getGlobalVariable;ua.getGlobalVariable=
+function(cb){return"page"==cb?ab.getName():"pagenumber"==cb?db+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:qb.apply(this,arguments)};document.body.appendChild(ua.container);u.updatePageRoot(ab);ua.model.setRoot(ab.root)}Da=Na(ua,Da,db!=Ia);ua!=T&&ua.container.parentNode.removeChild(ua.container)}}else Da=Na(T);null==Da?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Da.mathEnabled&&(Ia=Da.wnd.document,Fa&&(Da.wnd.IMMEDIATE_PRINT=!0),Ia.writeln('<script type="text/javascript" src="'+
+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Da.closeDocument(),!Da.mathEnabled&&Fa&&PrintDialog.printPreview(Da));null!=Qa&&(T.shapeForegroundColor=Ta,T.shapeBackgroundColor=Ma,T.stylesheet=Qa,T.refresh())}}var T=u.editor.graph,Q=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"));Q.appendChild(Z);var oa=1,wa=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 ta=Aa.cloneNode(!0);Aa.setAttribute("checked","checked");ta.setAttribute("value","range");Z.appendChild(ta);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 va=Ba.cloneNode(!0);Z.appendChild(va);mxEvent.addListener(Ba,"focus",function(){ta.checked=!0});mxEvent.addListener(va,"focus",function(){ta.checked=!0});mxEvent.addListener(Ba,"change",
+N);mxEvent.addListener(va,"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]){wa=J+1;Ba.value=wa;va.value=wa;break}Ba.setAttribute("max",oa);va.setAttribute("max",oa);u.isPagesEnabled()?1<oa&&(Q.appendChild(Z),ta.checked=!0):ta.checked=!0;mxUtils.br(Z);var Oa=document.createElement("input");Oa.setAttribute("value","all");Oa.setAttribute("type","radio");Oa.style.marginRight="8px";T.isSelectionEmpty()&&Oa.setAttribute("disabled",
+"disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==oa?(Oa.setAttribute("type","checkbox"),Oa.style.marginBottom="12px",Ca.appendChild(Oa)):(Oa.setAttribute("name","pages-printdialog"),Oa.style.marginBottom="8px",Z.appendChild(Oa));J=document.createElement("span");mxUtils.write(J,mxResources.get("selectionOnly"));Oa.parentNode.appendChild(J);1==oa&&mxUtils.br(Oa.parentNode);var Sa=document.createElement("input");Sa.style.marginRight="8px";Sa.setAttribute("value","adjust");
+Sa.setAttribute("type","radio");Sa.setAttribute("name","printZoom");Ca.appendChild(Sa);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(){Sa.checked=!0});Q.appendChild(Ca);Z=Z.cloneNode(!1);var Ka=Sa.cloneNode(!0);Ka.setAttribute("value","fit");Sa.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"),Za=Va.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),S=z.cloneNode(!0),ca=z.cloneNode(!0),fa=z.cloneNode(!0);z.style.textAlign="right";S.style.textAlign="right";mxUtils.write(z,
+mxResources.get("fitTo"));var na=document.createElement("input");na.style.cssText="margin:0 8px 0 8px;";na.setAttribute("value","1");na.setAttribute("min","1");na.setAttribute("type","number");na.style.width="40px";L.appendChild(na);J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsAcross"));M.appendChild(J);mxUtils.write(S,mxResources.get("fitToBy"));var ra=na.cloneNode(!0);ca.appendChild(ra);mxEvent.addListener(na,"focus",function(){Ka.checked=!0});mxEvent.addListener(ra,
+"focus",function(){Ka.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));fa.appendChild(J);Va.appendChild(z);Va.appendChild(L);Va.appendChild(M);Za.appendChild(S);Za.appendChild(ca);Za.appendChild(fa);bb.appendChild(Va);bb.appendChild(Za);Ca.appendChild(bb);Z.appendChild(Ca);Q.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 pa=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);Q.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(){T.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);Q.appendChild(J);this.container=Q};var ha=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var 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 ha.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),
+null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),sa=new Image;sa.onload=function(){try{la.getContext("2d").drawImage(sa,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(J){}};sa.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.1.3";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(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.2.0";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,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!=m?":colno:"+
-encodeURIComponent(m):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(H){}try{F||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 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(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)&&
+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 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,
+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 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!=
+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,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=
+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,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=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&&(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||(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],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,m);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,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),F=F.cloneNode(!1),mxUtils.setTextContent(F,
-Graph.compressNode(C))));d(F)}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&&
+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][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");
+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,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());
+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,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 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!=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));
+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;">'+
-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,
+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(),
-F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[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,F,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,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,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,F,C,H,
+ha){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var sa=this.createDownloadRequest(R,d,l,ha,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return sa}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 P=this.editor.graph.getSvg(V,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(P);this.editor.convertImages(P,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!=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 m=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 m};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,
+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 F=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&&(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 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(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+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 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"));
+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 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 F=d[y].node.cloneNode(!1);F.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");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 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,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
-f,g)+this.hashValue(F,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,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+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,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!=m?m:!0,mxUtils.bind(this,function(ka){F(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==
-LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,I){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var Q=ba.getCellGeometry(ka[V]);null!=Q&&Q.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,I||
+LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,I){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var P=ba.getCellGeometry(ka[V]);null!=P&&P.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,I||
"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),w:ja.width,h:ja.height};null!=I&&(ka.title=I);f.push(ka);O(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ea=mxUtils.bind(this,function(ka){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(ka),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=ba.getSelectionCells(),
U=ba.view.getBounds(ja),I=ba.view.scale;U.x/=I;U.y/=I;U.width/=I;U.height/=I;U.x-=ba.view.translate.x;U.y-=ba.view.translate.y;X(ja,U)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,
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));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=
+this.maxImageSize,mxUtils.bind(this,function(ja,U,I,V,P,R,ha,la,sa){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,P,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,P,R),ka,mxEvent.isAltDown(ka)?null:ha.substring(0,ha.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 T=JSON.parse(mxUtils.getTextContent(N.documentElement));F(T,C);f=f.concat(T);O(ka);this.spinner.stop();u=!0}catch(wa){}else if("mxfile"==N.documentElement.nodeName)try{var Q=N.documentElement.getElementsByTagName("diagram");for(T=0;T<Q.length;T++){var Z=this.stringToCells(Editor.getDiagramNodeXml(Q[T])),
+oa=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,oa.width,oa.height),ka)}u=!0}catch(wa){null!=window.console&&console.log("error in drop handler:",wa)}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!=sa&&null!=ha&&(/(\.v(dx|sdx?))($|\?)/i.test(ha)||/(\.vs(x|sx?))($|\?)/i.test(ha))?this.importVisio(sa,function(N){J(N,"text/xml")},null,ha):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(ja,ha)&&null!=sa?this.isExternalDataComms()?this.parseFile(sa,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)});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,F){d=new ImageDialog(this,d,f,g,m,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,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,F){var C=null!=this.spinner&&null!=this.spinner.pause?
+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,
-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;
+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?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,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 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()},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:"+
+")"),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 F=document.createElement("input");
-F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";if(!m){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||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=
+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,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 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(m?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,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 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,m,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,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,F,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=
+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 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,F){return this.createEchoRequest(g,y,m,q,f,F)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,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!=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,F,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,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);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,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,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);m&&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 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,
+(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+
-"')");F.innerHTML="";F.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",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 m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,F){F=null!=F?F:[];m&&("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,m,q,y,F,C,
-H,G){H=this.createUrlParameters(d,f,g,m,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(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,F,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)||
+"')");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,m){var q=document.createElement("div");
+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(){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,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,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";
+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"),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,m,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=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);F=this.editor.graph;var da=m?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)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(d,f,g,m,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=
+!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"),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 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&&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<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
+"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),P=null;if("png"==C||"jpeg"==C)P=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
+this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var ha=document.createElement("input");ha.style.marginBottom="16px";ha.style.marginRight="8px";ha.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ha.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?(ha.checked=!0,
+ha.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",sa.style.display="none"):"disabled"==ha.getAttribute("disabled")&&(ha.checked=!1,ha.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",sa.style.display="")}));f&&(G.appendChild(ha),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
+mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var sa=document.createElement("select");sa.style.maxWidth="260px";sa.style.marginLeft="8px";sa.style.marginRight="10px";sa.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));sa.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));sa.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));sa.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(sa),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,ha.checked,qa.value,X.checked,!1,sa.value,null!=P?P.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,F,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)+'"');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=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,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")}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){F('<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('"+
+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,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,
+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,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=(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,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,m,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,m,q,y,F){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)}}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(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"),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&&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 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(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(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=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: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,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(F)}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,
+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(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(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 m({message:mxResources.get("invalidInput")})}catch(da){m(da)}})}catch(F){m(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,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+
+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){m(ea)}};aa.src=H.result};H.onerror=function(G){m(G)}}else m(C)};
-F.onerror=function(C){m(C)};F.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,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()?
+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)+";"))}),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;"+(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;":""));
+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(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 m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
+"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=m;y.apply(q,arguments);F&&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 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&&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,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,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="+
+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,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(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,F,C,H,G,aa,da,ba){m=null!=m?m: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==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 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=
-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,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};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,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),H=Math.max(1,d.height);if(m&&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 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?
+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,sa,u,J,N,W,T,Q,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+la,T)),null):this.importFile(la,sa,u,J,N,W,T,Q,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,P=[],R=mxUtils.bind(this,function(la,sa){P[la]=sa;if(0==--V){this.spinner.stop();if(null!=C)C(P);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<P.length;la++){var J=P[la]();null!=J&&(u=u.concat(J))}}finally{ja.getModel().endUpdate()}}y(u)}}),
+ha=0;ha<I;ha++)mxUtils.bind(this,function(la){var sa=d[la];if(null!=sa){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==F||F(sa))if("image/"==sa.type.substring(0,6))if("image/svg"==sa.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var T=mxUtils.parseXml(W);W=T.getElementsByTagName("svg");if(0<W.length){W=W[0];var Q=da?null:W.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)?R(la,mxUtils.bind(this,function(){try{if(null!=T){var wa=T.getElementsByTagName("svg");if(0<wa.length){var Aa=wa[0],ta=Aa.getAttribute("width"),Ba=Aa.getAttribute("height");ta=null!=ta&&"%"!=ta.charAt(ta.length-1)?parseFloat(ta):NaN;Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;var va=Aa.getAttribute("viewBox");
+if(null==va||0==va.length)Aa.setAttribute("viewBox","0 0 "+ta+" "+Ba);else if(isNaN(ta)||isNaN(Ba)){var Oa=va.split(" ");3<Oa.length&&(ta=parseFloat(Oa[2]),Ba=parseFloat(Oa[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(l/Math.max(1,ta)),l/Math.max(1,Ba)),Sa=q(N,sa.type,f+la*U,g+la*U,Math.max(1,Math.round(ta*Ca)),Math.max(1,Math.round(Ba*Ca)),sa.name);if(isNaN(ta)||isNaN(Ba)){var Ua=new Image;Ua.onload=mxUtils.bind(this,function(){ta=Math.max(1,Ua.width);Ba=Math.max(1,
+Ua.height);Sa[0].geometry.width=ta;Sa[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+ta+" "+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,[Sa[0]])});Ua.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Sa}}}catch(Ka){}return null})):R(la,mxUtils.bind(this,function(){return q(Q,"text/xml",f+la*U,g+la*U,0,0,sa.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
+!1;if("image/png"==sa.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,sa.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(wa){this.resizeImage(wa,J.target.result,mxUtils.bind(this,function(Aa,ta,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var va=qa&&this.isResampleImageSize(sa.size,aa)?Math.min(1,Math.min(l/ta,l/Ba)):1;return q(Aa,sa.type,f+la*U,g+la*U,Math.round(ta*va),Math.round(Ba*va),sa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,l,aa,sa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
+J.target.result,q(N,sa.type,f+la*U,g+la*U,240,160,sa.name,function(wa){R(la,function(){return wa})},sa)});/(\.v(dx|sdx?))($|\?)/i.test(sa.name)||/(\.vs(x|sx?))($|\?)/i.test(sa.name)?q(null,sa.type,f+la*U,g+la*U,240,160,sa.name,function(J){R(la,function(){return J})},sa):"image"==sa.type.substring(0,5)||"application/pdf"==sa.type?u.readAsDataURL(sa):u.readAsText(sa)}})(ha)});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(){},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)&&
+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(I,V,P){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=P,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,P){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,P),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 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 F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
@@ -3617,27 +3620,27 @@ null!=ea&&(X.filename=ea.getTitle());X.pagecount=null!=d.pages?d.pages.length:1;
1:1:"pagecount"==X?null!=d.pages?d.pages.length:1:da.apply(this,arguments)};var ba=f.labelLinkClicked;f.labelLinkClicked=function(X,ea,ka){var ja=ea.getAttribute("href");if(null==ja||!f.isCustomLink(ja)||!mxEvent.isTouchEvent(ka)&&mxEvent.isPopupTrigger(ka))ba.apply(this,arguments);else{if(!f.isEnabled()||null!=X&&f.isCellLocked(X.cell))f.customLinkClicked(ja),f.getRubberband().reset();mxEvent.consume(ka)}};this.editor.getOrCreateFilename=function(){var X=d.defaultFilename,ea=d.getCurrentFile();null!=
ea&&(X=null!=ea.getTitle()?ea.getTitle():X);return X};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(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&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(X){var ea=f.cellEditor.text2,ka=null;null!=ea&&(mxEvent.addListener(ea,"dragleave",function(ja){null!=ka&&(ka.parentNode.removeChild(ka),
-ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(I,V,Q,R,fa,la){f.insertImage(I,fa,la)},
-function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var V=0;V<I.length;V++)I[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(I){var V=Math.max(1,I.width);I=Math.max(1,I.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,V)),Q/Math.max(1,I));f.insertImage(decodeURIComponent(U),
-V*Q,I*Q)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
+ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(I,V,P,R,ha,la){f.insertImage(I,ha,la)},
+function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var V=0;V<I.length;V++)I[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(I){var V=Math.max(1,I.width);I=Math.max(1,I.height);var P=this.maxImageSize;P=Math.min(1,Math.min(P/Math.max(1,V)),P/Math.max(1,I));f.insertImage(decodeURIComponent(U),
+V*P,I*P)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
function(X,ea){mxSettings.setUnit(ea.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,Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top=
"14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,ea){0<this.editor.graph.getSelectionCount()?(X=this.editor.graph.getSelectionCell(),
X=this.editor.graph.getModel().getStyle(X),this.styleInput.value=X||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=this.isSelectionAllowed;this.isSelectionAllowed=function(X){return mxEvent.getSource(X)==this.styleInput?!0:qa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var O=null;mxEvent.addListener(f.container,"dragleave",
function(X){f.isEnabled()&&(null!=O&&(O.parentNode.removeChild(O),O=null),X.stopPropagation(),X.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(X){null==O&&(!mxClient.IS_IE||10<document.documentMode)&&(O=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(X){null!=O&&(O.parentNode.removeChild(O),O=null);if(f.isEnabled()){var ea=
mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka=X.dataTransfer.files,ja=f.view.translate,U=f.view.scale,I=ea.x/U-ja.x,V=ea.y/U-ja.y;if(0<ka.length)ea=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ea)?(!mxEvent.isShiftDown(X)&&ea&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,
-!0)):(mxEvent.isAltDown(X)&&(V=I=null),this.importFiles(ka,I,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=I=0);var Q=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,I,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
-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 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]()});
+!0)):(mxEvent.isAltDown(X)&&(V=I=null),this.importFiles(ka,I,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=I=0);var P=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,I,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
+ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var ha=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)||(ha=!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,sa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
+I,V,!0,ha,null,la,mxEvent.isControlDown(X)))});ha&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;sa()},mxEvent.isControlDown(X)):sa()}else null!=P&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),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="+
+P+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(P,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,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 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 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)||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 F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=F&&91!=F&&93!=F||(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),
+"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:"==
@@ -3647,150 +3650,150 @@ 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"),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(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 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(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
+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,m){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,
+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,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,
+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)}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();
+"/")+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 F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}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(F){this.handleError(F)}});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(),
-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,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),
+(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 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=
+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));
+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!=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?
+""))}}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&&
-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.executeLayouts(this.editor.graph.createLayouts(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}),
+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(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(Z){}return Q});if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[H],"data",[G])}catch(Q){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):
+G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(Q){null!=Q?F.postMessage(JSON.stringify({event:"prompt",value:Q,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?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.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(Q){Q&&this.actions.get("exit").funct()}));try{Y.init()}catch(Q){F.postMessage(JSON.stringify({event:"draft",error:Q.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(Q,Z,oa){Q=Q||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==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(Q,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,Q,Z)}):null,X?mxUtils.bind(this,function(Q,Z,oa,wa){this.remoteInvoke("searchDiagrams",[Q,wa],null,Z,oa)}):null,mxUtils.bind(this,function(Q,Z,oa){this.remoteInvoke("getFileContent",[Q.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},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(Q,Z,oa,wa){Q=Q||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:wa,builtIn:!0,message:G}),"*"):(d(Q,H,Q!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],
+null,Q,function(){Q(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(Q,Z){this.remoteInvoke("searchDiagrams",[Q,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:Q,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();
+Q&&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;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);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}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;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.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,R=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=Q;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),ha=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==G.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(V)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);
+R(Q)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var sa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var Q=P.getGlobalVariable;P=this.createTemporaryGraph(P.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);P.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():
+"pagenumber"==Ba?1:Q.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(Z.root)}if(null!=G.layerIds){var wa=P.model,Aa=wa.getChildCells(wa.getRoot()),ta={};for(oa=0;oa<G.layerIds.length;oa++)ta[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)wa.setVisible(Aa[oa],ta[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){ha(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ha(null)}),null,null,G.scale,G.transparent,G.shadow,
+null,P,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(sa)},0):sa()):sa()}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(Q){200<=Q.getStatus()&&299>=Q.getStatus()?R("data:image/png;base64,"+Q.getText()):ha(null)}),mxUtils.bind(this,function(){ha(null)}))}}else sa=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Q.xml=mxUtils.getXml(Z);Q.data=this.getFileData(null,null,!0,null,null,null,Z);Q.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
+Q.data=this.getHtml(Z,this.editor.graph),Q.xml=mxUtils.getXml(Z),Q.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var oa=mxUtils.bind(this,function(wa){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(wa);F.postMessage(JSON.stringify(Q),"*")});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(Q.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(wa){G.embedImages||null==G.embedImages?this.editor.convertImages(wa,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(wa))}));return}F.postMessage(JSON.stringify(Q),"*")}),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(sa)},0):sa()):sa();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(){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();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,
+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var Q=this.editor.graph,Z=Q.maxFitScale;Q.maxFitScale=G.maxFitScale;Q.fit(2*J);Q.maxFitScale=Z;Q.container.scrollTop-=2*J;Q.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(Q){}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(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(Q){F.postMessage(JSON.stringify({event:"merge",message:G,error:Q}),"*")}))}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(Q){this.handleError(Q)}}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())}),T=mxUtils.bind(this,function(Q,Z){g=!0;try{d(Q,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,wa){oa=W();oa==q||g||(wa=this.createLoadMessage("autosave"),wa.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));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,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 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 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&&
+"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Q,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(Q){T(Q,H)},mxUtils.bind(this,function(Q){this.handleError(Q)}),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(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==Q.responseText.substring(0,13)&&T(Q.responseText,H)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(Q){T(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==G||"object"!==typeof G||null==G.format||null==
+G.data&&null==G.url?(G=da(G),T(G,H)):this.loadDescriptor(G,mxUtils.bind(this,function(Q){T(W(),H)}),mxUtils.bind(this,function(Q){this.handleError(Q,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.importCsv=function(d,f){try{var g=d.split("\n"),m=[],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 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!=
+":",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.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,P=null,R=40,ha=40,la=100,sa=0,u=function(){null!=f?f(na):(H.setSelectionCells(na),H.scrollCellToVisible(H.getSelectionCell()))},J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var T=null,Q="auto";ka=null;for(var Z=[],oa=null,wa=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 ta=d.indexOf(":");if(0<ta){var Ba=mxUtils.trim(d.substring(1,ta)),va=mxUtils.trim(d.substring(ta+1));"label"==Ba?T=H.sanitizeHtml(va):"labelname"==Ba&&0<va.length&&"-"!=va?Y=va:"labels"==Ba&&0<va.length&&"-"!=va?O=JSON.parse(va):"style"==Ba?aa=va:"parentstyle"==Ba?X=va:"unknownStyle"==Ba&&"-"!=va?qa=va:"stylename"==Ba&&0<va.length&&"-"!=va?ba=va:"styles"==Ba&&0<va.length&&"-"!=va?da=JSON.parse(va):"vars"==Ba&&0<va.length&&"-"!=va?G=JSON.parse(va):"identity"==Ba&&0<va.length&&
+"-"!=va?ea=va:"parent"==Ba&&0<va.length&&"-"!=va?ka=va:"namespace"==Ba&&0<va.length&&"-"!=va?ja=va:"width"==Ba?U=va:"height"==Ba?I=va:"left"==Ba&&0<va.length?V=va:"top"==Ba&&0<va.length?P=va:"ignore"==Ba?wa=va.split(","):"connect"==Ba?Z.push(JSON.parse(va)):"link"==Ba?oa=va:"padding"==Ba?sa=parseFloat(va):"edgespacing"==Ba?R=parseFloat(va):"nodespacing"==Ba?ha=parseFloat(va):"levelspacing"==Ba?la=parseFloat(va):"layout"==Ba&&(Q=va)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));
+var Oa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));ta=d=null;Ba=[];for(va=0;va<Oa.length;va++)ea==Oa[va]&&(d=va),ka==Oa[va]&&(ta=va),Ba.push(mxUtils.trim(Oa[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==T&&(T="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&(C[Z[Ca].to]={});ea=[];for(va=Aa+1;va<g.length;va++){var Sa=this.editor.csvToArray(g[va].replace(/\r$/,""));if(null==Sa){var Ua=40<g[va].length?g[va].substring(0,40)+"...":g[va];throw Error(Ua+
+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Sa.length&&ea.push(Sa)}H.model.beginUpdate();try{for(va=0;va<ea.length;va++){Sa=ea[va];var Ka=null,bb=null!=d?ja+Sa[d]:null;null!=bb&&(Ka=H.model.getCell(bb));g=null!=Ka;var Va=new mxCell(T,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");Va.vertex=!0;Va.id=bb;Ua=null!=Ka?Ka:Va;for(var Za=0;Za<Sa.length;Za++)H.setAttributeForCell(Ua,Ba[Za],Sa[Za]);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)):(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(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<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 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.executeLayouts(H.createLayouts(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 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="?",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||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();
+this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=ta?H.model.getCell(ja+Sa[ta]):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!=P&&null!=Ka.getAttribute(P)&&(Ka.geometry.y=Aa+parseFloat(Ka.getAttribute(P)));var S="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=S&&"auto"!=S?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==S?M.width+sa: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+sa:parseFloat(I);J+=Ka.geometry.height+ha}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(va=0;va<q.length;va++)S="@"==U.charAt(0)?q[va].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[va].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=S||"auto"!=
+I&&"auto"!=ca||H.updateGroupBounds([q[va]],sa,!0);var fa=y.slice(),na=y.slice();for(Ca=0;Ca<Z.length;Ca++){var ra=Z[Ca];for(va=0;va<l.length;va++){Ka=l[va];var pa=mxUtils.bind(this,function(Ia,Da,La){var db=Da.getAttribute(La.from);if(null!=db&&""!=db){db=db.split(",");for(var ab=0;ab<db.length;ab++){var fb=C[La.to][db[ab]];if(null==fb&&null!=qa){fb=new mxCell(db[ab],new mxGeometry(N,W,0,0),qa);fb.style=H.replacePlaceholders(Da,fb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(fb);fb.geometry.width=
+ib.width+sa;fb.geometry.height=ib.height+sa;C[La.to][db[ab]]=fb;fb.vertex=!0;fb.id=db[ab];y.push(H.addCell(fb))}if(null!=fb){ib=La.label;null!=La.fromlabel&&(ib=(Da.getAttribute(La.fromlabel)||"")+(ib||""));null!=La.sourcelabel&&(ib=H.replacePlaceholders(Da,La.sourcelabel,G)+(ib||""));null!=La.tolabel&&(ib=(ib||"")+(fb.getAttribute(La.tolabel)||""));null!=La.targetlabel&&(ib=(ib||"")+H.replacePlaceholders(fb,La.targetlabel,G));var tb="target"==La.placeholders==!La.invert?fb:Ia;tb=null!=La.style?H.replacePlaceholders(tb,
+La.style,G):H.createCurrentEdgeStyle();ib=H.insertEdge(null,null,ib||"",La.invert?fb:Ia,La.invert?Ia:fb,tb);if(null!=La.labels)for(tb=0;tb<La.labels.length;tb++){var qb=La.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==!La.invert?fb:Ia,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)}na.push(ib);mxUtils.remove(La.invert?Ia:fb,fa)}}}});pa(Ka,Ka,ra);if(null!=F[Ka.id])for(Za=0;Za<F[Ka.id].length;Za++)pa(Ka,F[Ka.id][Za],ra)}}if(null!=wa)for(va=0;va<l.length;va++)for(Ka=l[va],Za=0;Za<wa.length;Za++)H.setAttributeForCell(Ka,mxUtils.trim(wa[Za]),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 Ia=0;Ia<y.length;Ia++){var Da=
+H.getCellGeometry(y[Ia]);Da.x=Math.round(H.snap(Da.x));Da.y=Math.round(H.snap(Da.y));"auto"==U&&(Da.width=Math.round(H.snap(Da.width)));"auto"==I&&(Da.height=Math.round(H.snap(Da.height)))}};if("["==Q.charAt(0)){var Na=u;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(Q)),function(){Fa();Na()});u=null}else if("circle"==Q){var Pa=new mxCircleLayout(H);Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Qa=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Ia){return Qa.apply(this,arguments)||
+0>mxUtils.indexOf(y,Ia)};this.executeLayout(function(){Pa.execute(H.getDefaultParent());Fa()},!0,u);u=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&na.length==2*y.length-1&&1==fa.length){H.view.validate();var Ta=new mxCompactTreeLayout(H,"horizontaltree"==Q);Ta.levelDistance=ha;Ta.edgeRouting=!1;Ta.resetEdges=!1;this.executeLayout(function(){Ta.execute(H.getDefaultParent(),0<fa.length?fa[0]:null)},!0,u);u=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==fa.length){H.view.validate();
+var Ma=new mxHierarchicalLayout(H,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ma.intraCellSpacing=ha;Ma.parallelEdgeSpacing=R;Ma.interRankCellSpacing=la;Ma.disableEdgeStyle=!1;this.executeLayout(function(){Ma.execute(H.getDefaultParent(),na);H.moveCells(na,N,W)},!0,u);u=null}else if("organic"==Q||"auto"==Q&&na.length>y.length){H.view.validate();var ua=new mxFastOrganicLayout(H);ua.forceConstant=3*ha;ua.disableEdgeStyle=!1;ua.resetEdges=!1;var za=ua.isVertexIgnored;
+ua.isVertexIgnored=function(Ia){return za.apply(this,arguments)||0>mxUtils.indexOf(y,Ia)};this.executeLayout(function(){ua.execute(H.getDefaultParent());Fa()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=u&&u()}}catch(Ia){this.handleError(Ia)}};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"!=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 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,m,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(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<F?"&dpi="+F:"")+"&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,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 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 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)));
+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(),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(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,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&&m.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,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+
-q.allowedDomains[F]){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(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&
+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,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 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)}});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()}});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 F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;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!=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(F){null!=g&&g(F)}}),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(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(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=
+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,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,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,F,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,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,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>"===
+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,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=
-"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",
-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);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){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));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()?
+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 P(){U.removeChild(la);U.removeChild(sa);ha.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),ha=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 sa=document.createElement("div");sa.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):P();H=null});u.className="geCommentEditBtn";sa.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);P();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";sa.appendChild(J);U.insertBefore(sa,R);ha.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 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,P){function R(T,Q,Z){var oa=document.createElement("li");oa.className=
+"geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,T);oa.appendChild(wa);mxEvent.addListener(wa,"click",function(Aa){Q(Aa,ja);Aa.preventDefault();mxEvent.consume(Aa)});W.appendChild(oa);Z&&(oa.style.display="none")}function ha(){function T(oa){Q.push(Z);if(null!=oa.replies)for(var wa=0;wa<oa.replies.length;wa++)Z=Z.nextSibling,T(oa.replies[wa])}var Q=[],Z=sa;T(ja);return{pdiv:Z,replies:Q}}function la(T,Q,Z,oa,wa){function Aa(){g(Oa);ja.addReply(va,
+function(Ca){va.id=Ca;ja.replies.push(va);q(Oa);Z&&Z()},function(Ca){ta();l(Oa);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,wa)}function ta(){d(va,Oa,function(Ca){Aa()},!0)}var Ba=ha().pdiv,va=b.newComment(T,b.getCurrentUser());va.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Oa=y(va,ja.replies,Ba,V+1);Q?ta():Aa()}if(P||!ja.isResolved){ba.style.display="none";var sa=document.createElement("div");sa.className="geCommentContainer";sa.setAttribute("data-commentId",
+ja.id);sa.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(sa.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);sa.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");sa.appendChild(u);ja.isLocked&&(sa.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 T(){d(ja,sa,function(){g(sa);ja.editComment(ja.content,function(){q(sa)},function(Q){l(sa);T();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(sa);ja.deleteComment(function(T){if(!0===T){T=sa.querySelector(".geCommentTxt");
+T.innerHTML="";mxUtils.write(T,mxResources.get("msgDeleted"));var Q=sa.querySelectorAll(".geCommentAction");for(T=0;T<Q.length;T++)Q[T].parentNode.removeChild(Q[T]);q(sa);sa.style.opacity="0.5"}else{Q=ha(ja).replies;for(T=0;T<Q.length;T++)da.removeChild(Q[T]);for(T=0;T<U.length;T++)if(U[T]==ja){U.splice(T,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(T){l(sa);b.handleError(T,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(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",wa=ha(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",ta=0;ta<wa.length;ta++){wa[ta].style.backgroundColor=Aa;for(var Ba=wa[ta].querySelectorAll(".geCommentAction"),
+va=0;va<Ba.length;va++)Ba[va]!=Z.parentNode&&(Ba[va].style.display=oa);O||(wa[ta].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});sa.appendChild(u);null!=I?da.insertBefore(sa,I.nextSibling):da.appendChild(sa);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,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,sa,H.saveCallback,
+H.deleteOnCancel),ja.content=P):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return sa}}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(!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){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(P){g(V);b.addComment(P,function(R){P.id=R;X.push(P);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="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function V(Q){if(null!=Q){Q.sort(function(fa,la){return new Date(fa.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<Q.length;R++)V(Q[R].replies)}}I.sort(function(Q,R){return new Date(Q.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=I;for(I=0;I<X.length;I++)V(X[I].replies),
-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,
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function V(P){if(null!=P){P.sort(function(ha,la){return new Date(ha.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}I.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=I;for(I=0;I<X.length;I++)V(X[I].replies),
+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 ha=I[R.id];if(null!=ha)for(f(R,ha),ha=0;null!=R.replies&&ha<R.replies.length;ha++)ja(R.replies[ha])}
+if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),I={},V=0;V<U.length;V++){var P=U[V];I[P.getAttribute("data-commentId")]=P}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,E,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!=
+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")};
@@ -3838,8 +3841,8 @@ EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push
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);
+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()};
@@ -3847,9 +3850,9 @@ 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(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 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)}),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),E=mxEvent.getClientY(n);D.popup(t,E,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();
@@ -3857,7 +3860,7 @@ this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var E=new mxPopupMenu(th
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,E,d,f,g,m){t=this.createUrlParameters(t,E,d,f,g,m);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}))));
+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)})();
@@ -3867,30 +3870,30 @@ n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPag
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],
-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?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)};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!=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()):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!=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?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)||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)||
+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 P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),ha=C.cloneCells([R[0],I]);C.model.setTerminal(ha[0],C.model.getTerminal(R[0],
+!0),!0);var la=d(I),sa=P.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ha[1].geometry.x+=V?I.geometry.width+10:-ha[1].geometry.width-10:ha[1].geometry.y+=V?I.geometry.height+10:-ha[1].geometry.height-10;C.view.currentRoot!=P&&(ha[1].geometry.x-=sa.x,ha[1].geometry.y-=sa.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:-ha[1].geometry.width-
+10)*J:N.y+=(V?I.geometry.height+10:-ha[1].geometry.height-10)*J;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var T=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,Q=sa=R=0;Q<W.length;Q++){var Z=C.model.getTerminal(W[Q],!1);if(la==d(Z)){var oa=C.view.getState(Z);Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&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),sa=10+Math.max(sa,(Math.min(N.y+N.height,oa.y+oa.height)-Math.max(N.y,oa.y))/J))}}T?sa=0:R=0;for(Q=0;Q<W.length;Q++)if(Z=C.model.getTerminal(W[Q],!1),la==d(Z)&&(oa=C.view.getState(Z),Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&V!=oa.getCenterY()<u.getCenterY()))){var wa=[];C.traverse(oa.cell,!0,function(Aa,ta){var Ba=null!=ta&&C.isTreeEdge(ta);Ba&&wa.push(ta);(null==ta||Ba)&&wa.push(Aa);return null==ta||Ba});C.moveCells(wa,(V?1:-1)*R,(V?1:-1)*sa)}}}return C.addCells(ha,P)}finally{C.model.endUpdate()}}
+function g(I){C.model.beginUpdate();try{var V=d(I),P=C.getIncomingTreeEdges(I),R=C.cloneCells([P[0],I]);C.model.setTerminal(P[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],I,!1);var ha=C.model.getParent(I),la=ha.geometry,sa=[];C.view.currentRoot!=ha&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(I,!0,function(N,W){var T=null!=W&&C.isTreeEdge(W);T&&sa.push(W);(null==W||T)&&sa.push(N);return null==W||T});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(sa,u,J);return C.addCells(R,ha)}finally{C.model.endUpdate()}}function l(I,V){C.model.beginUpdate();try{var P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),ha=d(I);0==R.length&&(R=[C.createEdge(P,null,"",null,null,C.createCurrentEdgeStyle())],ha=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 sa=C.getCellStyle(la[1]).newEdgeStyle;if(null!=sa)try{var u=JSON.parse(sa),J;for(J in u)C.setCellStyles(J,u[J],[la[0]]),"edgeStyle"==J&&"elbowEdgeStyle"==u[J]&&C.setCellStyles("elbow",ha==mxConstants.DIRECTION_SOUTH||ha==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(oa){}}R=C.getOutgoingTreeEdges(I);var N=P.geometry;V=[];C.view.currentRoot==P&&(N=new mxRectangle);for(sa=0;sa<R.length;sa++){var W=C.model.getTerminal(R[sa],!1);null!=W&&V.push(W)}var T=C.view.getBounds(V),
+Q=C.view.translate,Z=C.view.scale;ha==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):ha==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=ha==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==T?I.geometry.y+(I.geometry.height-la[1].geometry.height)/2:(T.y+T.height)/Z-Q.y+-N.y+10);return C.addCells(la,P)}finally{C.model.endUpdate()}}function q(I,V,P){I=C.getOutgoingTreeEdges(I);P=C.view.getState(P);var R=[];if(null!=P&&null!=I){for(var ha=0;ha<I.length;ha++){var la=C.view.getState(C.model.getTerminal(I[ha],!1));null!=la&&(!V&&Math.min(la.x+la.width,P.x+P.width)>=Math.max(la.x,P.x)||V&&Math.min(la.y+la.height,P.y+
+P.height)>=Math.max(la.y,P.y))&&R.push(la)}R.sort(function(sa,u){return V?sa.x+sa.width-u.x-u.width:sa.y+sa.height-u.y-u.height})}return R}function y(I,V){var P=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=V?F.actions.get("selectParent").funct():P==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(P=C.getIncomingTreeEdges(I),null!=P&&0<P.length&&(R=q(C.model.getTerminal(P[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,P){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,P),this.addMenuItems(I,["selectDescendants"],null,P));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,P)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,P)}};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=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],
+!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=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],!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 P=[];C.traverse(I,!0,function(R,ha){var la=null!=ha&&C.isTreeEdge(ha);la&&P.push(ha);
+null!=ha&&!la||null!=V&&mxEvent.isShiftDown(V)||P.push(R);return null==ha||la})}C.setSelectionCells(P)}},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 P=[],R=0;R<I.length;R++){var ha=I[R];H.isEdge(ha)&&t(ha)&&(P.push(ha),ha=H.getTerminal(ha,!1));if(n(ha)){var la=[];C.traverse(ha,!0,function(sa,u){var J=null!=u&&C.isTreeEdge(u);J&&la.push(u);
+(null==u||J)&&la.push(sa);return null==u||J});0<la.length&&(P=P.concat(la),ha=C.getIncomingTreeEdges(I[R]),I=I.concat(ha))}else null!=ha&&P.push(I[R])}I=P;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(I,V,P){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,P))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var P=I.slice(0),R=0;R<P.length;R++){var ha=C.view.getState(P[R]);if(null!=ha&&n(ha.cell)){var la=C.getIncomingTreeEdges(ha.cell);
+for(ha=0;ha<la.length;ha++)mxUtils.remove(la[ha],I)}}this.model.beginUpdate();try{var sa=da.call(this,I,V);if(sa.length==I.length)for(R=0;R<I.length;R++)if(n(I[R])){var u=C.getIncomingTreeEdges(sa[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),sa[R])}}}finally{this.model.endUpdate()}return sa};var ba=C.moveCells;C.moveCells=function(I,V,P,R,ha,la,sa){var u=null;this.model.beginUpdate();
+try{var J=ha,N=this.getCurrentCellStyle(ha);if(null!=I&&n(ha)&&"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)){ha=C.model.getParent(I[W]);break}if(null!=J&&ha!=J&&null!=this.view.getState(I[0])){var T=C.getIncomingTreeEdges(I[0]);if(0<T.length){var Q=C.view.getState(C.model.getTerminal(T[0],!0));if(null!=Q){var Z=C.view.getState(J);null!=Z&&(V=(Z.getCenterX()-Q.getCenterX())/C.view.scale,P=(Z.getCenterY()-
+Q.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])&&(T=C.getIncomingTreeEdges(I[W]),0<T.length))if(!R)n(J)&&0>mxUtils.indexOf(I,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[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(T[0],
+!0);R=this.cloneCell(T[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,P,R){var ha=C.model,la=null;ha.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var sa=0;sa<la.length;sa++)if(ha.isEdge(la[sa])&&null==ha.getTerminal(la[sa],!0)){ha.setTerminal(la[sa],I,!0);var u=C.getCellGeometry(la[sa]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{ha.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 P=qa[I.keyCode];null!=P&&(P.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,P,R,ha,la,sa){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(P,R){var ha=null!=R&&C.isTreeEdge(R);ha&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||ha)&&0>mxUtils.indexOf(V,P)&&V.push(P);return null==R||ha});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"!==
@@ -3898,23 +3901,23 @@ typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.c
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 m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=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(m);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;');
+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 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 m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(f);t.insert(m);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",
+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)}));
+"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 P=O.menus.get(I);I=U.addMenu(V,mxUtils.bind(this,function(){P.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";X.appendChild(I);return I}var ka=document.createElement("div");ka.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;";ka.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
"5px";ja.innerHTML="+";ka.appendChild(ja);mxUtils.write(ka,mxResources.get("moreShapes"));X.appendChild(ka);mxEvent.addListener(ka,"click",function(){O.actions.get("shapes").funct()});var U=new Menubar(O,X);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?ka.style.bottom="0":null!=O.actions.get("newLibrary")?(ka=document.createElement("div"),ka.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
ka.className="geTitle",ja=document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("newLibrary")),ka.appendChild(ja),X.appendChild(ka),mxEvent.addListener(ka,"click",O.actions.get("newLibrary").funct),ka=document.createElement("div"),ka.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;",ka.className="geTitle",ja=
@@ -3923,8 +3926,8 @@ ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft
"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ea.container.clientHeight-ka)/2):56,X-6,ka-6,function(ja){e(O,ja)});O.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.sidebarWindow.window.fit()}));O.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);O.sidebarWindow.window.setVisible(!0);O.getLocalData("sidebar",function(ja){O.sidebar.showEntries(ja,null,!0)});O.restoreLibraries()}else O.sidebarWindow.window.setVisible(null!=
X?X:!O.sidebarWindow.window.isVisible())}else null==O.sidebarElt&&(O.sidebarElt=D(),e(O,O.sidebarElt),O.sidebarElt.style.border="none",O.sidebarElt.style.width="210px",O.sidebarElt.style.borderRight="1px solid gray"),ea=O.diagramContainer.parentNode,null!=O.sidebarElt.parentNode?(O.sidebarElt.parentNode.removeChild(O.sidebarElt),ea.style.left="0px"):(ea.parentNode.appendChild(O.sidebarElt),ea.style.left=O.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,X,ea,ka,ja,U,I){var V=D();I(V);this.window=new mxWindow(X,V,ea,ka,
-ja,U,!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(Q,R){var fa=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;Q=Math.max(0,Math.min(Q,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,fa-la.clientHeight-
-2));this.getX()==Q&&this.getY()==R||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(Q){null==Q&&(Q=window.event);return null!=Q&&O.isSelectionAllowed(Q)}))};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=
+ja,U,!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(P,R){var ha=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;P=Math.max(0,Math.min(P,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,ha-la.clientHeight-
+2));this.getX()==P&&this.getY()==R||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&O.isSelectionAllowed(P)}))};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;
@@ -3942,8 +3945,8 @@ 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=
@@ -3963,81 +3966,81 @@ mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("
ea=O.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(R){O.setSketchMode(!Editor.sketchMode)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.sketchMode});ea=O.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(R){O.setPagesVisible(!Editor.pagesVisible)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.pagesVisible});O.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){X.popupMenuHandler.hideMenu();
O.showImportCsvDialog()}));O.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var R=new ParseDialog(O,"Insert from Text");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var R=new ParseDialog(O,"Insert from Text","formatSql");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(O)},
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.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("insertAdvanced",la,ra,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,ra)):(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%;";
+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,ha){var la=this.editorUi.editor.graph,sa=la.getSelectionCell();ka.call(this,R,sa,null,ha);this.addMenuItems(R,["editTooltip"],ha);la.model.isVertex(sa)&&this.addMenuItems(R,["editGeometry"],ha);this.addMenuItems(R,["-","edit"],ha)})));this.addPopupMenuCellEditItems=function(R,ha,la,sa){R.addSeparator();
+this.addSubmenu("editCell",R,sa,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(R,ha){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],ha);O.menus.addSubmenu("openFrom",R,ha);isLocalStorage&&this.addSubmenu("openRecent",R,ha);R.addSeparator(ha);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],ha):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],ha),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&
+"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ha):O.menus.addMenuItems(R,["makeCopy"],ha));R.addSeparator(ha);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ha),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],ha));O.menus.addMenuItems(R,["autosave"],ha);if(null!=la&&(R.addSeparator(ha),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ha),null!=O.fileNode&&
+"1"!=urlParams.embedInline)){var sa=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(sa)&&!/(\.svg)$/i.test(sa))&&this.addMenuItems(R,["-","properties"],ha)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,ha){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,ha,mxResources.get("preferences"));R.addSeparator(ha);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),
+ha);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],ha);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],ha),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ha);R.addSeparator(ha)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],ha):"1"!=urlParams.noFileMenu&&
+("1"!=urlParams.sketch?(O.menus.addMenuItems(R,["new"],ha),O.menus.addSubmenu("openFrom",R,ha),isLocalStorage&&this.addSubmenu("openRecent",R,ha),R.addSeparator(ha),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ha),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],ha)),R.addSeparator(ha),O.menus.addSubmenu("save",R,ha)):O.menus.addSubmenu("file",R,ha));O.menus.addSubmenu("exportAs",R,ha);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp?O.menus.addMenuItems(R,["import"],ha):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,ha);O.commentsSupported()&&O.menus.addMenuItems(R,["-","comments"],ha);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),ha);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],ha);"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(ha);O.menus.addSubmenu("help",R,ha);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],ha):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,ha){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy",
+"-","rename","moveToFolder"],ha):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],ha),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ha):O.menus.addMenuItems(R,["makeCopy"],ha));O.menus.addMenuItems(R,["-","autosave"],ha);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],ha)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,ha){ja.funct(R,ha);mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp||O.menus.addMenuItems(R,["publishLink"],ha);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(ha),O.menus.addSubmenu("embed",R,ha))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,ha){O.menus.addInsertTableCellItem(R,ha)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,ha){I.funct(R,ha);this.addMenuItems(R,["-","pageScale","-","ruler"],ha)})))}this.put("extras",new Menu(mxUtils.bind(this,
+function(R,ha){null!=U&&O.menus.addSubmenu("language",R,ha);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,ha);O.menus.addSubmenu("units",R,ha);R.addSeparator(ha);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),ha);"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"],ha);R.addSeparator(ha);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),ha):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",ha),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",ha));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],ha);
+R.addSeparator(ha);O.mode!=App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],ha);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],ha);R.addSeparator(ha)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,ha){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ha)})));mxUtils.bind(this,function(){var R=this.get("insert"),ha=R.funct;R.funct=function(la,
+sa){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],sa),O.menus.addMenuItems(la,["insertImage","insertLink","-"],sa),O.menus.addSubmenu("insertAdvanced",la,sa,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,sa)):(ha.apply(this,arguments),O.menus.addSubmenu("table",la,sa))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),P=function(R,ha,la,sa){R.addItem(la,null,mxUtils.bind(this,
+function(){var u=new CreateGraphDialog(O,la,sa);O.showDialog(u.container,620,420,!0,!1);u.init()}),ha)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,ha){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(ha):P(R,ha,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,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=
+function(){function O(ua,za,Ia){var Da=U.menus.get(ua),La=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Da.funct.apply(this,arguments)}),P);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(ua));U.menus.menuCreated(Da,
+La,"geMenuItem");null!=Ia?(La.style.backgroundImage="url("+Ia+")",La.style.backgroundPosition="center center",La.style.backgroundRepeat="no-repeat",La.style.backgroundSize="24px 24px",La.style.width="34px",La.innerHTML=""):za||(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(ua,za,Ia,Da,La,db){var ab=document.createElement("a");ab.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ab.style.display="inline-block";ab.style.boxSizing="border-box";ab.style.height="30px";ab.style.padding="6px";ab.style.position="relative";ab.style.verticalAlign="top";ab.style.top="0px";"1"==urlParams.sketch&&(ab.style.borderStyle="none",ab.style.boxShadow="none",ab.style.padding="6px",ab.style.margin="0px");null!=U.statusContainer?V.insertBefore(ab,U.statusContainer):V.appendChild(ab);null!=db?(ab.style.backgroundImage="url("+db+")",ab.style.backgroundPosition=
+"center center",ab.style.backgroundRepeat="no-repeat",ab.style.backgroundSize="24px 24px",ab.style.width="34px"):mxUtils.write(ab,ua);mxEvent.addListener(ab,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(ab,"click",function(fb){"disabled"!=ab.getAttribute("disabled")&&za(fb);mxEvent.consume(fb)});null==Ia&&(ab.style.marginRight="4px");null!=Da&&ab.setAttribute("title",Da);null!=La&&(ua=function(){La.isEnabled()?(ab.removeAttribute("disabled"),
+ab.style.cursor="pointer"):(ab.setAttribute("disabled","disabled"),ab.style.cursor="default")},La.addListener("stateChanged",ua),I.addListener("enabledChanged",ua),ua());return ab}function ea(ua,za,Ia){Ia=document.createElement("div");Ia.className="geMenuItem";Ia.style.display="inline-block";Ia.style.verticalAlign="top";Ia.style.marginRight="6px";Ia.style.padding="0 4px 0 4px";Ia.style.height="30px";Ia.style.position="relative";Ia.style.top="0px";"1"==urlParams.sketch&&(Ia.style.boxShadow="none");
+for(var Da=0;Da<ua.length;Da++)null!=ua[Da]&&("1"==urlParams.sketch&&(ua[Da].style.padding="10px 8px",ua[Da].style.width="30px"),ua[Da].style.margin="0px",ua[Da].style.boxShadow="none",Ia.appendChild(ua[Da]));null!=za&&mxUtils.setOpacity(Ia,za);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ia,U.statusContainer):V.appendChild(Ia);return Ia}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var ua=
+V.firstChild;null!=ua;){var za=ua.nextSibling;"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}P=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>n||"1"==urlParams.sketch;var Ia=null;ua||(Ia=O("diagram"));za=ua?O("diagram",null,Editor.drawLogoImage):null;null!=za&&(Ia=za);ea([Ia,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),ua?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"),ua?Editor.formatImage:null)],ua?60:null);za=O("insert",!0,ua?J:null);ea([za,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ya,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!=Ia&&(mxEvent.disableContextMenu(Ia),mxEvent.addGestureListeners(Ia,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));za=U.menus.get("language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+n&&"1"!=urlParams.sketch?(null==Na&&(za=R.addMenu("",za.funct),za.setAttribute("title",mxResources.get("language")),za.className="geToolbarButton",za.style.backgroundImage="url("+Editor.globeImage+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.position="absolute",za.style.height="24px",za.style.width="24px",za.style.zIndex="1",za.style.right="8px",za.style.cursor="pointer",za.style.top="1"==urlParams.embed?"12px":
+"11px",V.appendChild(za),Na=za),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Na&&(Na.parentNode.removeChild(Na),Na=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),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",
+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 ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Ia=U.embedViewport.x+
+U.embedViewport.width,Da=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),db=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(ua,Ia-za))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Da,db-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");
-U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var ra=document.createElement("div");
-ra.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){ra.style.top="20px";U.titlebar=document.createElement("div");U.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;";
-U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}var J=U.menus.get("viewZoom"),N="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,W="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null;u=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});U.addListener("darkModeChanged",u);U.addListener("sketchModeChanged",
-u);var Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)P.style.left="10px",P.style.top="10px",S.style.left="10px",S.style.top="60px",W.style.top="10px",W.style.right="12px",W.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
-"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var za=U.diagramContainer.getAttribute("data-bounds");if(null!=za){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var wa=I.getGraphBounds();za=za.split(" ");U.diagramContainer.style.top=za[0];U.diagramContainer.style.left=za[1];U.diagramContainer.style.width=wa.width+50+"px";U.diagramContainer.style.height=wa.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
-"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}P.style.left=U.diagramContainer.offsetLeft+"px";P.style.top=U.diagramContainer.offsetTop-P.offsetHeight-4+"px";S.style.display="";S.style.left=U.diagramContainer.offsetLeft-S.offsetWidth-4+"px";S.style.top=U.diagramContainer.offsetTop+"px";W.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-W.offsetWidth+"px";W.style.top=P.style.top;
-W.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
-2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";P.style.visibility="";W.style.visibility=""}),oa=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});u=mxUtils.bind(this,
-function(){oa();b(U,!0);U.initFormatWindow();var za=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(za.x+za.width+4,za.y)});U.addListener("inlineFullscreenChanged",oa);U.addListener("editInlineStart",u);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",u);U.addListener("editInlineStop",mxUtils.bind(this,function(za){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
-"hidden";U.rightResizer.style.visibility="hidden";P.style.visibility="hidden";W.style.visibility="hidden";S.style.display="none"}));if(null!=U.hoverIcons){var va=U.hoverIcons.update;U.hoverIcons.update=function(){I.freehand.isDrawing()||va.apply(this,arguments)}}if(null!=I.freehand){var Aa=I.freehand.createStyle;I.freehand.createStyle=function(za){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";W.className="geToolbarContainer";P.className="geToolbarContainer";
-V.className="geToolbarContainer";U.picker=S;var sa=!1;"1"!=urlParams.embed&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){sa||(U.statusContainer.style.display="none")}));var Ba=mxUtils.bind(this,function(za){null!=U.notificationBtn&&(null!=za?U.notificationBtn.setAttribute("title",za):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":"";U.editor.addListener("statusChanged",
-mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",sa=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var za=null!=U.statusContainer.firstChild&&
-"function"===typeof U.statusContainer.firstChild.getAttribute?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(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()},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("",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%",
-J.funct);pa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.textDecoration="none";pa.style.overflow="hidden";pa.style.visibility="hidden";pa.style.textAlign="center";pa.style.cursor="pointer";pa.style.height=parseInt(U.tabContainerHeight)-1+"px";pa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";pa.style.position="absolute";pa.style.display="block";pa.style.fontSize="12px";pa.style.width=
-"59px";pa.style.right="0px";pa.style.bottom="0px";pa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";pa.style.backgroundPosition="right 6px center";pa.style.backgroundRepeat="no-repeat";ra.appendChild(pa)}(function(za){var wa=mxUtils.bind(this,function(){za.innerHTML="";mxUtils.write(za,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,wa);U.editor.addListener("resetGraphView",wa);U.editor.addListener("pageSelected",wa)})(pa);var ya=
-U.setGraphEnabled;U.setGraphEnabled=function(){ya.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==W?this.tabContainerHeight+"px":"0px")}}ra.appendChild(V);ra.appendChild(U.diagramContainer);ja.appendChild(ra);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==W&&ra.appendChild(U.tabContainer);
-var Fa=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";S.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(za){mxEvent.getSource(za)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(za),mxEvent.getClientY(za)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
-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,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\nconfAIgnoreCollectErr=Ignore collecting current pages errors\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;
+mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var P=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 ha=U.hideCurrentMenu;U.hideCurrentMenu=function(){ha.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
+var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var ua=U.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);V.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
+U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var sa=document.createElement("div");
+sa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){sa.style.top="20px";U.titlebar=document.createElement("div");U.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;";
+U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}u=U.menus.get("viewZoom");var J="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});U.addListener("darkModeChanged",Q);U.addListener("sketchModeChanged",
+Q);var Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)T.style.left="10px",T.style.top="10px",W.style.left="10px",W.style.top="60px",N.style.top="10px",N.style.right="12px",N.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
+"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var ua=U.diagramContainer.getAttribute("data-bounds");if(null!=ua){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var za=I.getGraphBounds();ua=ua.split(" ");U.diagramContainer.style.top=ua[0];U.diagramContainer.style.left=ua[1];U.diagramContainer.style.width=za.width+50+"px";U.diagramContainer.style.height=za.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
+"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}T.style.left=U.diagramContainer.offsetLeft+"px";T.style.top=U.diagramContainer.offsetTop-T.offsetHeight-4+"px";W.style.display="";W.style.left=U.diagramContainer.offsetLeft-W.offsetWidth-4+"px";W.style.top=U.diagramContainer.offsetTop+"px";N.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-N.offsetWidth+"px";N.style.top=T.style.top;
+N.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
+2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";T.style.visibility="";N.style.visibility=""}),oa=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});Q=mxUtils.bind(this,
+function(){oa();b(U,!0);U.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y)});U.addListener("inlineFullscreenChanged",oa);U.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",Q);U.addListener("editInlineStop",mxUtils.bind(this,function(ua){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
+"hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}));if(null!=U.hoverIcons){var wa=U.hoverIcons.update;U.hoverIcons.update=function(){I.freehand.isDrawing()||wa.apply(this,arguments)}}if(null!=I.freehand){var Aa=I.freehand.createStyle;I.freehand.createStyle=function(ua){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";N.className="geToolbarContainer";T.className="geToolbarContainer";
+V.className="geToolbarContainer";U.picker=W;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){ta||(U.statusContainer.style.display="none")}));var Ba=mxUtils.bind(this,function(ua){null!=U.notificationBtn&&(null!=ua?U.notificationBtn.setAttribute("title",ua):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":
+"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",ta=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var ua=
+null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ba(ua);var za=U.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",ta=!0):6<U.buttonContainer.clientWidth&&
+(U.statusContainer.style.display="none",ta=!1)}else U.statusContainer.style.display="inline-block",Ba(null),ta=!0;V.style.visibility=20>V.clientWidth&&!ta?"hidden":""}}));pa=O("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";T.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
+this.appIconClicked(ua)}),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 va=document.createElement("a");
+va.style.padding="0px";va.style.boxShadow="none";va.className="geMenuItem";va.style.display="inline-block";va.style.width="40px";va.style.height="12px";va.style.marginBottom="-2px";va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";va.style.backgroundPosition="top center";va.style.backgroundRepeat="no-repeat";va.setAttribute("title","Minimize");var Oa=!1,Ca=mxUtils.bind(this,function(){W.innerHTML="";if(!Oa){var ua=function(Da,La,db){Da=X("",Da.funct,null,La,Da,db);Da.style.width=
+"40px";Da.style.opacity="0.7";return za(Da,null,"pointer")},za=function(Da,La,db){null!=La&&Da.setAttribute("title",La);Da.style.cursor=null!=db?db:"default";Da.style.margin="2px 0px";W.appendChild(Da);mxUtils.br(W);return Da};za(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)");za(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"));za(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");za(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;za(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=za(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"})();ua(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Ia=U.actions.get("toggleShapes");ua(Ia,mxResources.get("shapes")+
+" ("+Ia.shortcut+")",J);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";za(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";za(pa,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(va)});mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Oa?(mxUtils.setPrefixedStyle(W.style,
+"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.width="40px",va.style.height="12px",va.setAttribute("title","Minimize"),Oa=!1,Ca()):(W.innerHTML="",W.appendChild(va),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",va.style.height="24px",va.style.backgroundImage=
+"url("+Editor.plusImage+")",va.setAttribute("title",mxResources.get("insert")),va.style.width="24px",Oa=!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!=u){var Sa=function(ua){mxEvent.isShiftDown(ua)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(ua)):mxEvent.isAltDown(ua)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
+mxEvent.consume(ua))},Ua=U.actions.get("zoomIn"),Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Va=U.actions.get("undo"),Za=U.actions.get("redo"),z=X("",Va.funct,null,mxResources.get("undo")+" ("+Va.shortcut+")",Va,Editor.undoImage),L=X("",Za.funct,null,mxResources.get("redo")+" ("+Za.shortcut+")",Za,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){bb=function(){ra.style.display=null!=U.pages&&("0"!=
+urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,za=U.getPageIndex(U.currentPage);za=null!=za?za+1:1;var Ia=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+za+"/"+ua+")"+(null!=Ia?" ["+Ia+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),fa=X("",ca.funct,null,mxResources.get("delete"),ca,
+Editor.trashImage);fa.style.opacity="0.1";T.appendChild(fa);ca.addListener("stateChanged",function(){fa.style.opacity=ca.enabled?"":"0.1"});var na=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=Za.enabled?"":"0.1"};T.appendChild(z);T.appendChild(L);Va.addListener("stateChanged",na);Za.addListener("stateChanged",na);na();var ra=this.createPageMenuTab(!1,!0);ra.style.display=
+"none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";N.appendChild(ra);U.editor.addListener("pagesPatched",
+S);U.editor.addListener("pageSelected",S);U.editor.addListener("pageRenamed",S);U.editor.addListener("fileLoaded",S);S();U.addListener("fileDescriptorChanged",bb);U.addListener("pagesVisibleChanged",bb);U.editor.addListener("pagesPatched",bb);bb();bb=X("",Ka.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ka,Editor.zoomOutImage);N.appendChild(bb);var pa=R.addMenu("100%",u.funct);pa.setAttribute("title",mxResources.get("zoom"));pa.innerHTML="100%";pa.style.display="inline-block";
+pa.style.color="inherit";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";N.appendChild(pa);u=X("",Ua.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ua,Editor.zoomInImage);N.appendChild(u);Q.visible&&(N.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"),N.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;";
+T.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;";N.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;";sa.appendChild(T);sa.appendChild(N);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(W.style.touchAction="none");sa.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(sa)}else{var ya=X("",Sa,!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%",
+u.funct);pa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.textDecoration="none";pa.style.overflow="hidden";pa.style.visibility="hidden";pa.style.textAlign="center";pa.style.cursor="pointer";pa.style.height=parseInt(U.tabContainerHeight)-1+"px";pa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";pa.style.position="absolute";pa.style.display="block";pa.style.fontSize="12px";pa.style.width=
+"59px";pa.style.right="0px";pa.style.bottom="0px";pa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";pa.style.backgroundPosition="right 6px center";pa.style.backgroundRepeat="no-repeat";sa.appendChild(pa)}(function(ua){mxEvent.addListener(ua,"click",Sa);var za=mxUtils.bind(this,function(){ua.innerHTML="";mxUtils.write(ua,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);U.editor.addListener("resetGraphView",za);U.editor.addListener("pageSelected",
+za)})(pa);var Fa=U.setGraphEnabled;U.setGraphEnabled=function(){Fa.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==N?this.tabContainerHeight+"px":"0px")}}sa.appendChild(V);sa.appendChild(U.diagramContainer);ja.appendChild(sa);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==N&&sa.appendChild(U.tabContainer);
+var Na=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";W.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
+ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Pa=null,Qa=null,Ta=null,Ma=null;mxEvent.addGestureListeners(ja,function(ua){Ma=parseInt(U.diagramContainer.style.height);Qa=mxEvent.getClientY(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(ua){Ta=parseInt(U.diagramContainer.style.width);Pa=
+mxEvent.getClientX(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=Pa&&(U.diagramContainer.style.width=Math.max(20,Ta+mxEvent.getClientX(ua)-Pa)+"px",za=!0);null!=Qa&&(U.diagramContainer.style.height=Math.max(20,Ma+mxEvent.getClientY(ua)-Qa)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
+"*"),Z(),U.refresh())},function(ua){null==Pa&&null==Qa||mxEvent.consume(ua);Qa=Pa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.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,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\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\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"]?
@@ -4047,7 +4050,7 @@ this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageI
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 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=
@@ -4073,11 +4076,11 @@ GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.
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)}),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,m=0,q=null,y=null,F=null,C=null,H=0;H<g.length;H++){var G=
+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(),
@@ -4087,8 +4090,8 @@ q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style
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!=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*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():
+(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"}))};
@@ -4100,8 +4103,8 @@ 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 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(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&&(E.isMoveCellsEvent=function(m){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+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))};
@@ -4113,6 +4116,6 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewe
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,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 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 m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<
+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 f5ac5985..7d1dd7b5 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"18.1.3",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"18.2.0",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 58d1d541..25c8ecd2 100644
--- a/src/main/webapp/resources/dia.txt
+++ b/src/main/webapp/resources/dia.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txt
index fa44cebf..1569009e 100644
--- a/src/main/webapp/resources/dia_am.txt
+++ b/src/main/webapp/resources/dia_am.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txt
index 45dd68bf..aab07076 100644
--- a/src/main/webapp/resources/dia_ar.txt
+++ b/src/main/webapp/resources/dia_ar.txt
@@ -98,7 +98,7 @@ chatWindowTitle=‫دردشة‬
chooseAnOption=‫اختر خيارا‬
chromeApp=‫تطبيق Chrome‬
collaborativeEditingNotice=‫ملاحظات مهمة عن مشاركة التعديل‬
-compare=‫يقارن‬
+compare=‫قارن‬
compressed=‫مضغوط‬
commitMessage=‫أكد علي تسجيل الرسالة‬
configLinkWarn=‫هذة الوصلة تقوم بتغيرات علي draw.io . اضغط علي موافق لو كنت تثق فيمن ارسله اليك‬
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txt
index 6c04f982..0e394ee3 100644
--- a/src/main/webapp/resources/dia_bg.txt
+++ b/src/main/webapp/resources/dia_bg.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txt
index 1e50817e..1bb86950 100644
--- a/src/main/webapp/resources/dia_bn.txt
+++ b/src/main/webapp/resources/dia_bn.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txt
index 2a19e2f7..e0917202 100644
--- a/src/main/webapp/resources/dia_bs.txt
+++ b/src/main/webapp/resources/dia_bs.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txt
index 5a203ae1..4b35364a 100644
--- a/src/main/webapp/resources/dia_ca.txt
+++ b/src/main/webapp/resources/dia_ca.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txt
index d58f42ae..c730e213 100644
--- a/src/main/webapp/resources/dia_cs.txt
+++ b/src/main/webapp/resources/dia_cs.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txt
index e0ca543e..5086acfe 100644
--- a/src/main/webapp/resources/dia_da.txt
+++ b/src/main/webapp/resources/dia_da.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txt
index afd8b586..0b5684c7 100644
--- a/src/main/webapp/resources/dia_de.txt
+++ b/src/main/webapp/resources/dia_de.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txt
index 0d64e40d..941ba0b0 100644
--- a/src/main/webapp/resources/dia_el.txt
+++ b/src/main/webapp/resources/dia_el.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txt
index cf52ebc6..81d105d9 100644
--- a/src/main/webapp/resources/dia_eo.txt
+++ b/src/main/webapp/resources/dia_eo.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txt
index 7a6054af..3f0bd57d 100644
--- a/src/main/webapp/resources/dia_es.txt
+++ b/src/main/webapp/resources/dia_es.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txt
index da2e7248..ff17b89a 100644
--- a/src/main/webapp/resources/dia_et.txt
+++ b/src/main/webapp/resources/dia_et.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_eu.txt b/src/main/webapp/resources/dia_eu.txt
index f8fde7e9..3520b909 100644
--- a/src/main/webapp/resources/dia_eu.txt
+++ b/src/main/webapp/resources/dia_eu.txt
@@ -1199,3 +1199,5 @@ brush=Brotxa
openDevTools=Ireki garatzaileen tresnak
autoBkp=Babeskopia automatikoa
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txt
index a4bbcc6e..72962857 100644
--- a/src/main/webapp/resources/dia_fa.txt
+++ b/src/main/webapp/resources/dia_fa.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txt
index ead49854..e07d9525 100644
--- a/src/main/webapp/resources/dia_fi.txt
+++ b/src/main/webapp/resources/dia_fi.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txt
index 422f1253..64852696 100644
--- a/src/main/webapp/resources/dia_fil.txt
+++ b/src/main/webapp/resources/dia_fil.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txt
index 0c0c29a2..d05315a4 100644
--- a/src/main/webapp/resources/dia_fr.txt
+++ b/src/main/webapp/resources/dia_fr.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_gl.txt b/src/main/webapp/resources/dia_gl.txt
index 3c686237..cadedff6 100644
--- a/src/main/webapp/resources/dia_gl.txt
+++ b/src/main/webapp/resources/dia_gl.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txt
index 403ffcf5..481c49a7 100644
--- a/src/main/webapp/resources/dia_gu.txt
+++ b/src/main/webapp/resources/dia_gu.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txt
index 2e5b25bb..d2bda56c 100644
--- a/src/main/webapp/resources/dia_he.txt
+++ b/src/main/webapp/resources/dia_he.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txt
index 0bcc635e..6bc0a621 100644
--- a/src/main/webapp/resources/dia_hi.txt
+++ b/src/main/webapp/resources/dia_hi.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txt
index 262ac93c..5973586b 100644
--- a/src/main/webapp/resources/dia_hr.txt
+++ b/src/main/webapp/resources/dia_hr.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txt
index 0838c3f4..309d25bd 100644
--- a/src/main/webapp/resources/dia_hu.txt
+++ b/src/main/webapp/resources/dia_hu.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txt
index d5ae088d..211c54a4 100644
--- a/src/main/webapp/resources/dia_i18n.txt
+++ b/src/main/webapp/resources/dia_i18n.txt
@@ -1199,3 +1199,5 @@ brush=brush
openDevTools=openDevTools
autoBkp=autoBkp
confAIgnoreCollectErr=confAIgnoreCollectErr
+drafts=drafts
+draftSaveInt=draftSaveInt
diff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txt
index 537b04b8..8af361bb 100644
--- a/src/main/webapp/resources/dia_id.txt
+++ b/src/main/webapp/resources/dia_id.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txt
index 1fec373a..ef2af352 100644
--- a/src/main/webapp/resources/dia_it.txt
+++ b/src/main/webapp/resources/dia_it.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txt
index 1fb13729..f0d3d231 100644
--- a/src/main/webapp/resources/dia_ja.txt
+++ b/src/main/webapp/resources/dia_ja.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txt
index 79891ed7..0211835b 100644
--- a/src/main/webapp/resources/dia_kn.txt
+++ b/src/main/webapp/resources/dia_kn.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txt
index 8bec18a7..3efe1d30 100644
--- a/src/main/webapp/resources/dia_ko.txt
+++ b/src/main/webapp/resources/dia_ko.txt
@@ -1199,3 +1199,5 @@ brush=브러시
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt
index 37e4fed6..c737d00f 100644
--- a/src/main/webapp/resources/dia_lt.txt
+++ b/src/main/webapp/resources/dia_lt.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txt
index 4aefa920..48049ca2 100644
--- a/src/main/webapp/resources/dia_lv.txt
+++ b/src/main/webapp/resources/dia_lv.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txt
index fd436e25..ddd2da84 100644
--- a/src/main/webapp/resources/dia_ml.txt
+++ b/src/main/webapp/resources/dia_ml.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txt
index 6613ba23..a2ba93a6 100644
--- a/src/main/webapp/resources/dia_mr.txt
+++ b/src/main/webapp/resources/dia_mr.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txt
index b149bf1e..48111fcb 100644
--- a/src/main/webapp/resources/dia_ms.txt
+++ b/src/main/webapp/resources/dia_ms.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_my.txt b/src/main/webapp/resources/dia_my.txt
index 58d1d541..25c8ecd2 100644
--- a/src/main/webapp/resources/dia_my.txt
+++ b/src/main/webapp/resources/dia_my.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index 8d4d5495..dd07660d 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -1199,3 +1199,5 @@ brush=Kwast
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txt
index 0302166c..159c8057 100644
--- a/src/main/webapp/resources/dia_no.txt
+++ b/src/main/webapp/resources/dia_no.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txt
index 8d1c23ab..cd7edad3 100644
--- a/src/main/webapp/resources/dia_pl.txt
+++ b/src/main/webapp/resources/dia_pl.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txt
index 98f1ee59..76eff736 100644
--- a/src/main/webapp/resources/dia_pt-br.txt
+++ b/src/main/webapp/resources/dia_pt-br.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txt
index 3eb11d0b..0f1b74b4 100644
--- a/src/main/webapp/resources/dia_pt.txt
+++ b/src/main/webapp/resources/dia_pt.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txt
index 91d5c202..01be95f0 100644
--- a/src/main/webapp/resources/dia_ro.txt
+++ b/src/main/webapp/resources/dia_ro.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txt
index c1ee4f3e..c352ba96 100644
--- a/src/main/webapp/resources/dia_ru.txt
+++ b/src/main/webapp/resources/dia_ru.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_si.txt b/src/main/webapp/resources/dia_si.txt
index 58d1d541..25c8ecd2 100644
--- a/src/main/webapp/resources/dia_si.txt
+++ b/src/main/webapp/resources/dia_si.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txt
index 46beff20..aa15de52 100644
--- a/src/main/webapp/resources/dia_sk.txt
+++ b/src/main/webapp/resources/dia_sk.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txt
index 248874fe..a7518c0b 100644
--- a/src/main/webapp/resources/dia_sl.txt
+++ b/src/main/webapp/resources/dia_sl.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txt
index d3e3f6eb..31cc3c01 100644
--- a/src/main/webapp/resources/dia_sr.txt
+++ b/src/main/webapp/resources/dia_sr.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txt
index 38b0ea6e..66d4ade5 100644
--- a/src/main/webapp/resources/dia_sv.txt
+++ b/src/main/webapp/resources/dia_sv.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txt
index 811d0762..305a528b 100644
--- a/src/main/webapp/resources/dia_sw.txt
+++ b/src/main/webapp/resources/dia_sw.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txt
index 9f72ab6d..da48896e 100644
--- a/src/main/webapp/resources/dia_ta.txt
+++ b/src/main/webapp/resources/dia_ta.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txt
index 38fb204f..2f3a09fc 100644
--- a/src/main/webapp/resources/dia_te.txt
+++ b/src/main/webapp/resources/dia_te.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txt
index 7cbf1ece..16a65b96 100644
--- a/src/main/webapp/resources/dia_th.txt
+++ b/src/main/webapp/resources/dia_th.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txt
index a2239414..499afefd 100644
--- a/src/main/webapp/resources/dia_tr.txt
+++ b/src/main/webapp/resources/dia_tr.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt
index 33e10260..c6dce445 100644
--- a/src/main/webapp/resources/dia_uk.txt
+++ b/src/main/webapp/resources/dia_uk.txt
@@ -1199,3 +1199,5 @@ brush=Пензлик
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txt
index 6ba2ffca..8bca221a 100644
--- a/src/main/webapp/resources/dia_vi.txt
+++ b/src/main/webapp/resources/dia_vi.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txt
index 50a16090..0dc89629 100644
--- a/src/main/webapp/resources/dia_zh-tw.txt
+++ b/src/main/webapp/resources/dia_zh-tw.txt
@@ -1199,3 +1199,5 @@ brush=筆刷
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txt
index 5b54cfbf..d9e86613 100644
--- a/src/main/webapp/resources/dia_zh.txt
+++ b/src/main/webapp/resources/dia_zh.txt
@@ -1199,3 +1199,5 @@ brush=Brush
openDevTools=Open Developer Tools
autoBkp=Automatic Backup
confAIgnoreCollectErr=Ignore collecting current pages errors
+drafts=Drafts
+draftSaveInt=Draft save interval [sec] (0 to disable)
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 1b871197..71d3d3d7 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:"de7e2ebbf6510fef384c84056345ad54"},{url:"js/extensions.min.js",revision:"b2a9feb52ee2b2eaf0228f5d19f4c3b2"},{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:"a9663bf33027689e3cfa51cd0003fc22"},{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:"ecd1272c2f82949798a04cb8f66ff3ee"},{url:"resources/dia_am.txt",revision:"c6e8d4d3c87ac58bc27910395478d53a"},{url:"resources/dia_ar.txt",revision:"ab53b54466bb6d8fffdda985a98904fa"},{url:"resources/dia_bg.txt",revision:"277860dcd73984aacb184807b8d62c1a"},{url:"resources/dia_bn.txt",revision:"15c2219c6df0fd0435dd20e540f660b3"},{url:"resources/dia_bs.txt",revision:"9ae286629a23096d8f9762856f766d10"},{url:"resources/dia_ca.txt",revision:"1a8dadcc44bcb01edcfc963abbde6b7e"},{url:"resources/dia_cs.txt",revision:"92e03c81f1e504dca34e6684f8b6a5db"},{url:"resources/dia_da.txt",revision:"57571c1ffdcb1f38b88536a2e4458f9c"},{url:"resources/dia_de.txt",revision:"4ec5758340635d39267a2d2f4a44733c"},{url:"resources/dia_el.txt",revision:"9e443a6f508e6a56d53b424b5d339459"},{url:"resources/dia_eo.txt",revision:"2e2907adc02b8e5bcf01f427d7819386"},{url:"resources/dia_es.txt",revision:"998b9d2f3baf9feb51f27b991c418f2b"},{url:"resources/dia_et.txt",revision:"213e2532fcb5246935186e4125cbc02f"},{url:"resources/dia_eu.txt",revision:"a58e60cd45cfd326d724e868ef914946"},{url:"resources/dia_fa.txt",revision:"9120574954a1b9e585fceebd91e41b2a"},{url:"resources/dia_fi.txt",revision:"c3d2afb2f671914c507a5e76be743dd5"},{url:"resources/dia_fil.txt",revision:"5267fbfd3de10a73ce5f02abf284440d"},{url:"resources/dia_fr.txt",revision:"15ec3d98bcf1f5c6706bd8148abe924b"},{url:"resources/dia_gl.txt",revision:"6bb32f99a71eca6c085fa9e9e0c668f1"},{url:"resources/dia_gu.txt",revision:"51e1f57f871a1bb461f4aa23433863be"},{url:"resources/dia_he.txt",revision:"82f44b58e13d35b65073de4592905b5f"},{url:"resources/dia_hi.txt",revision:"66727087d16f3d7a896ac96c0ed4bb12"},{url:"resources/dia_hr.txt",revision:"09cae77fd2b68f8aa72024668a620d02"},{url:"resources/dia_hu.txt",revision:"4aabd810c5eff7066bf7aa60791baa89"},{url:"resources/dia_id.txt",revision:"68c9ad519cc43d9a489ede9664090d82"},{url:"resources/dia_it.txt",revision:"b95b119986f220bf7ff83588a312fd39"},{url:"resources/dia_ja.txt",revision:"45663f3802a3413c570ddde795d558a5"},{url:"resources/dia_kn.txt",revision:"5afb57332ab236a738c3e4b726610fd6"},{url:"resources/dia_ko.txt",revision:"2d21536ebc634b5733a4bb76d3a8463b"},{url:"resources/dia_lt.txt",revision:"759a18f3980636d68960c589c369685f"},{url:"resources/dia_lv.txt",revision:"a60a93d03224b0b45424dc82d414d4e7"},{url:"resources/dia_ml.txt",revision:"6a612de626f2a97bde4dc7324f39d1bb"},{url:"resources/dia_mr.txt",revision:"3ad007afaf6d9ea9d62e0fceacd444ba"},{url:"resources/dia_ms.txt",revision:"4d656b8d5941af0210047bd0a4a8b220"},{url:"resources/dia_my.txt",revision:"ecd1272c2f82949798a04cb8f66ff3ee"},{url:"resources/dia_nl.txt",revision:"b7bdb116504c66e5fcf5a7b04caea637"},{url:"resources/dia_no.txt",revision:"c7305c4f9d931ac0998cbeaf4ad18001"},{url:"resources/dia_pl.txt",revision:"d27c3f414da4d10b6f6f2855b9a39bbf"},{url:"resources/dia_pt-br.txt",revision:"71fb61fc0e4071311448f35a1b609e4d"},{url:"resources/dia_pt.txt",revision:"14760b220857a06ff21d92a645c534df"},{url:"resources/dia_ro.txt",revision:"35fd67bfefa319adeee13881768f28de"},{url:"resources/dia_ru.txt",revision:"a314f456b1dd8f1e1c1b098a1097fcb3"},{url:"resources/dia_si.txt",revision:"ecd1272c2f82949798a04cb8f66ff3ee"},{url:"resources/dia_sk.txt",revision:"0eabe3919053707b3d048ac2aa1401e2"},{url:"resources/dia_sl.txt",revision:"a09b6ffcb3f14723bae58725764580e0"},{url:"resources/dia_sr.txt",revision:"d9c78f7d9fab3321e1319b8598217cad"},{url:"resources/dia_sv.txt",revision:"f6c6cb1e29d30bc8f73bcb01f00cc211"},{url:"resources/dia_sw.txt",revision:"dac7a32667a57b89753495e0e2c3a816"},{url:"resources/dia_ta.txt",revision:"0cd6675983bc4c9a8ef55428673ecb1d"},{url:"resources/dia_te.txt",revision:"0761babe2bca09ac6f7149595209e66e"},{url:"resources/dia_th.txt",revision:"a9231170c124a621417de04786cf790a"},{url:"resources/dia_tr.txt",revision:"d2930cbea7421f94be60d67a6eb27d42"},{url:"resources/dia_uk.txt",revision:"546d91953769b655a6409d03bf8dd5b6"},{url:"resources/dia_vi.txt",revision:"c149d086ec329f2c088c7d914119597e"},{url:"resources/dia_zh-tw.txt",revision:"c5ce2fbc85a9955ecf43f2b4550c09e2"},{url:"resources/dia_zh.txt",revision:"1038621ef1951547208eb39d49344a09"},{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-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:"20f4a694daf6c8783547ff523f3a4fa6"},{url:"js/extensions.min.js",revision:"b2a9feb52ee2b2eaf0228f5d19f4c3b2"},{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:"562e98c3e827aea7ba9688bc53515ce6"},{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:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_am.txt",revision:"d767c66fc3d828f01790d5145a43f944"},{url:"resources/dia_ar.txt",revision:"326cf12a2eb475cfd18ca0aa8f454c27"},{url:"resources/dia_bg.txt",revision:"d935ebdf513f6d6c8b2488ca53edc48d"},{url:"resources/dia_bn.txt",revision:"9a066d6e0cb91240a5de909c09ad5f00"},{url:"resources/dia_bs.txt",revision:"834558d329362244813342c858ee0bb3"},{url:"resources/dia_ca.txt",revision:"7ea27e2cedf5a72c2d6acc3882f1107f"},{url:"resources/dia_cs.txt",revision:"73d43bc65e16f28055cc70302d8f5b23"},{url:"resources/dia_da.txt",revision:"9684d36e43a503a7923220702367e1bd"},{url:"resources/dia_de.txt",revision:"492ec6381d7a44fbc5da1adf674cdd3c"},{url:"resources/dia_el.txt",revision:"134ef55f7ede4d1ec364fc275c1dc560"},{url:"resources/dia_eo.txt",revision:"df44330c02c251217f68199902bb71b4"},{url:"resources/dia_es.txt",revision:"f4782a7a893fc58ac5138a94ee506ff1"},{url:"resources/dia_et.txt",revision:"ab5d6547dbef2866651d5854cd44ad54"},{url:"resources/dia_eu.txt",revision:"78de7c722cdc7079dbce68df02ab0ef9"},{url:"resources/dia_fa.txt",revision:"44639b4c2018027b39e998d527c444e3"},{url:"resources/dia_fi.txt",revision:"01b3890a6db98ef3a43485ba49ac7992"},{url:"resources/dia_fil.txt",revision:"53c542d5fea30e409eca8fe10048859b"},{url:"resources/dia_fr.txt",revision:"ff0e55a0b6321a7d0fbe35a4d37a9908"},{url:"resources/dia_gl.txt",revision:"fd421cae2d65a12f45743d029d1f2d1e"},{url:"resources/dia_gu.txt",revision:"54fffb1c7c7da120cb22f71d4fef3c49"},{url:"resources/dia_he.txt",revision:"9bb0be8fd970a9640d5b5f59afb22326"},{url:"resources/dia_hi.txt",revision:"353564fdcbdec14435e22cc10ea340a9"},{url:"resources/dia_hr.txt",revision:"cfefa39b02d5ff3a718c5ca688675a22"},{url:"resources/dia_hu.txt",revision:"b1e4b3e78529cbae7f9b41b95d8d015f"},{url:"resources/dia_id.txt",revision:"43353905b8e9180461055b1ed17dc53d"},{url:"resources/dia_it.txt",revision:"c55df5f591ed818e1ff6f60bf2eb0dcd"},{url:"resources/dia_ja.txt",revision:"185602e27366d4c4155de476bb5010ff"},{url:"resources/dia_kn.txt",revision:"7f4970fd5a35520e5871334bb8154c03"},{url:"resources/dia_ko.txt",revision:"6478a7552215d6c5b782cba0908ffa0e"},{url:"resources/dia_lt.txt",revision:"521711aef9fcf41ee833e5e669de1b6e"},{url:"resources/dia_lv.txt",revision:"70558cca334ed3d090ecda7423aad8df"},{url:"resources/dia_ml.txt",revision:"d827e98625dfa9d320d2a00fa5709f54"},{url:"resources/dia_mr.txt",revision:"3510ad556be2f84f7aefc617e49fa773"},{url:"resources/dia_ms.txt",revision:"fe33d70d3b621e0f511388d9ef3667aa"},{url:"resources/dia_my.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_nl.txt",revision:"ec08e8294289a952b8ec15ef9615b927"},{url:"resources/dia_no.txt",revision:"62c693c6ea9a58bc0dd4eec7b1b1ea7d"},{url:"resources/dia_pl.txt",revision:"db85c32f7458bbdb4dabd8ee04c5e6e5"},{url:"resources/dia_pt-br.txt",revision:"2cffd3b30b81113406236b29ec19fcf4"},{url:"resources/dia_pt.txt",revision:"faa525cfd933d9b28bab4ba9958d2a91"},{url:"resources/dia_ro.txt",revision:"4f0c51dc49be417530a88e264acc8ac7"},{url:"resources/dia_ru.txt",revision:"2454d71cf5eda2fca6da0a4ac02c0ce0"},{url:"resources/dia_si.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_sk.txt",revision:"a65bba3698e3cb60764146a1d6a1b494"},{url:"resources/dia_sl.txt",revision:"03e8bdd1584030ef4bd3e59311806bde"},{url:"resources/dia_sr.txt",revision:"7377e7c4b5f5e768bd4f9a32c40f0143"},{url:"resources/dia_sv.txt",revision:"3106d87ab7710b789ca481df9f9eaa20"},{url:"resources/dia_sw.txt",revision:"a4b2cdef952b5e6b5a1cb569ecb48347"},{url:"resources/dia_ta.txt",revision:"cfd99e1386d7a0310a1ba24a1bd39f26"},{url:"resources/dia_te.txt",revision:"f0ded6e2695a8715bbbfb9868a42be5e"},{url:"resources/dia_th.txt",revision:"991c7523fdab1db1590ecf71075f85de"},{url:"resources/dia_tr.txt",revision:"ebe2bdd67274dc832f2a1c06e0415c99"},{url:"resources/dia_uk.txt",revision:"352152d7c79d70c2d7451d10cb9db4d1"},{url:"resources/dia_vi.txt",revision:"077de6f062ffe2fdf09369c41490caf6"},{url:"resources/dia_zh-tw.txt",revision:"0c405f3473c213c97287b9706bdaf5e6"},{url:"resources/dia_zh.txt",revision:"1379897fd5f960954a075507b559b7e9"},{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 21594265..2c5e2a3d 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/df76f32b6f79f3ca89dcf550eb1c7568/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\": \"de7e2ebbf6510fef384c84056345ad54\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"b2a9feb52ee2b2eaf0228f5d19f4c3b2\"\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\": \"a9663bf33027689e3cfa51cd0003fc22\"\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\": \"ecd1272c2f82949798a04cb8f66ff3ee\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"c6e8d4d3c87ac58bc27910395478d53a\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"ab53b54466bb6d8fffdda985a98904fa\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"277860dcd73984aacb184807b8d62c1a\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"15c2219c6df0fd0435dd20e540f660b3\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"9ae286629a23096d8f9762856f766d10\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"1a8dadcc44bcb01edcfc963abbde6b7e\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"92e03c81f1e504dca34e6684f8b6a5db\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"57571c1ffdcb1f38b88536a2e4458f9c\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"4ec5758340635d39267a2d2f4a44733c\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"9e443a6f508e6a56d53b424b5d339459\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"2e2907adc02b8e5bcf01f427d7819386\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"998b9d2f3baf9feb51f27b991c418f2b\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"213e2532fcb5246935186e4125cbc02f\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"a58e60cd45cfd326d724e868ef914946\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"9120574954a1b9e585fceebd91e41b2a\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"c3d2afb2f671914c507a5e76be743dd5\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"5267fbfd3de10a73ce5f02abf284440d\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"15ec3d98bcf1f5c6706bd8148abe924b\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6bb32f99a71eca6c085fa9e9e0c668f1\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"51e1f57f871a1bb461f4aa23433863be\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"82f44b58e13d35b65073de4592905b5f\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"66727087d16f3d7a896ac96c0ed4bb12\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"09cae77fd2b68f8aa72024668a620d02\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"4aabd810c5eff7066bf7aa60791baa89\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"68c9ad519cc43d9a489ede9664090d82\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"b95b119986f220bf7ff83588a312fd39\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"45663f3802a3413c570ddde795d558a5\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"5afb57332ab236a738c3e4b726610fd6\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"2d21536ebc634b5733a4bb76d3a8463b\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"759a18f3980636d68960c589c369685f\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"a60a93d03224b0b45424dc82d414d4e7\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"6a612de626f2a97bde4dc7324f39d1bb\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"3ad007afaf6d9ea9d62e0fceacd444ba\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"4d656b8d5941af0210047bd0a4a8b220\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"ecd1272c2f82949798a04cb8f66ff3ee\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"b7bdb116504c66e5fcf5a7b04caea637\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"c7305c4f9d931ac0998cbeaf4ad18001\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"d27c3f414da4d10b6f6f2855b9a39bbf\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"71fb61fc0e4071311448f35a1b609e4d\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"14760b220857a06ff21d92a645c534df\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"35fd67bfefa319adeee13881768f28de\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"a314f456b1dd8f1e1c1b098a1097fcb3\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"ecd1272c2f82949798a04cb8f66ff3ee\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"0eabe3919053707b3d048ac2aa1401e2\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a09b6ffcb3f14723bae58725764580e0\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"d9c78f7d9fab3321e1319b8598217cad\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"f6c6cb1e29d30bc8f73bcb01f00cc211\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"dac7a32667a57b89753495e0e2c3a816\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"0cd6675983bc4c9a8ef55428673ecb1d\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"0761babe2bca09ac6f7149595209e66e\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"a9231170c124a621417de04786cf790a\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"d2930cbea7421f94be60d67a6eb27d42\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"546d91953769b655a6409d03bf8dd5b6\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"c149d086ec329f2c088c7d914119597e\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"c5ce2fbc85a9955ecf43f2b4550c09e2\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"1038621ef1951547208eb39d49344a09\"\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/e115dd4d933d946b2a5d6c1ea9f83d86/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\": \"20f4a694daf6c8783547ff523f3a4fa6\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"b2a9feb52ee2b2eaf0228f5d19f4c3b2\"\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\": \"562e98c3e827aea7ba9688bc53515ce6\"\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\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"d767c66fc3d828f01790d5145a43f944\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"326cf12a2eb475cfd18ca0aa8f454c27\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"d935ebdf513f6d6c8b2488ca53edc48d\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"9a066d6e0cb91240a5de909c09ad5f00\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"834558d329362244813342c858ee0bb3\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"7ea27e2cedf5a72c2d6acc3882f1107f\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"73d43bc65e16f28055cc70302d8f5b23\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"9684d36e43a503a7923220702367e1bd\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"492ec6381d7a44fbc5da1adf674cdd3c\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"134ef55f7ede4d1ec364fc275c1dc560\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"df44330c02c251217f68199902bb71b4\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"f4782a7a893fc58ac5138a94ee506ff1\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"ab5d6547dbef2866651d5854cd44ad54\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"78de7c722cdc7079dbce68df02ab0ef9\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"44639b4c2018027b39e998d527c444e3\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"01b3890a6db98ef3a43485ba49ac7992\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"53c542d5fea30e409eca8fe10048859b\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ff0e55a0b6321a7d0fbe35a4d37a9908\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"fd421cae2d65a12f45743d029d1f2d1e\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"54fffb1c7c7da120cb22f71d4fef3c49\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"9bb0be8fd970a9640d5b5f59afb22326\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"353564fdcbdec14435e22cc10ea340a9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"cfefa39b02d5ff3a718c5ca688675a22\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"b1e4b3e78529cbae7f9b41b95d8d015f\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"43353905b8e9180461055b1ed17dc53d\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"c55df5f591ed818e1ff6f60bf2eb0dcd\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"185602e27366d4c4155de476bb5010ff\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7f4970fd5a35520e5871334bb8154c03\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"6478a7552215d6c5b782cba0908ffa0e\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"521711aef9fcf41ee833e5e669de1b6e\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"70558cca334ed3d090ecda7423aad8df\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"d827e98625dfa9d320d2a00fa5709f54\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"3510ad556be2f84f7aefc617e49fa773\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"fe33d70d3b621e0f511388d9ef3667aa\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"ec08e8294289a952b8ec15ef9615b927\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"62c693c6ea9a58bc0dd4eec7b1b1ea7d\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"db85c32f7458bbdb4dabd8ee04c5e6e5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"2cffd3b30b81113406236b29ec19fcf4\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"faa525cfd933d9b28bab4ba9958d2a91\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"4f0c51dc49be417530a88e264acc8ac7\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"2454d71cf5eda2fca6da0a4ac02c0ce0\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"a65bba3698e3cb60764146a1d6a1b494\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"03e8bdd1584030ef4bd3e59311806bde\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"7377e7c4b5f5e768bd4f9a32c40f0143\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3106d87ab7710b789ca481df9f9eaa20\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"a4b2cdef952b5e6b5a1cb569ecb48347\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"cfd99e1386d7a0310a1ba24a1bd39f26\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"f0ded6e2695a8715bbbfb9868a42be5e\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"991c7523fdab1db1590ecf71075f85de\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"ebe2bdd67274dc832f2a1c06e0415c99\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"352152d7c79d70c2d7451d10cb9db4d1\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"077de6f062ffe2fdf09369c41490caf6\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"0c405f3473c213c97287b9706bdaf5e6\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"1379897fd5f960954a075507b559b7e9\"\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-fa8c4ce5.js.map b/src/main/webapp/workbox-fa8c4ce5.js.map
index 44bb1e8a..48710c45 100644
--- a/src/main/webapp/workbox-fa8c4ce5.js.map
+++ b/src/main/webapp/workbox-fa8c4ce5.js.map
@@ -1 +1 @@
-{"version":3,"file":"workbox-fa8c4ce5.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,EAAU,IAQlBnJ,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,EAAU,IAClBA,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
+{"version":3,"file":"workbox-fa8c4ce5.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,UACb,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,UAASD,UAClDE,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,UAASD,cAKzCA,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,QACAC,UACAsB,aACAtC,QAEJ,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,MAAKgB,UAASD,QAAOwB,WAE5D,MAAOK,GACH3B,EAAkBQ,QAAQoB,OAAOD,GAGrC,MAAM/C,EAAe2C,GAASA,EAAM3C,aAsCpC,OArCIoB,aAA2BQ,UAAYrC,KAAK0D,GAAiBjD,KAC7DoB,EAAkBA,EAAgB8B,OAAMC,UAEpC,GAAInD,EAUA,IACI,aAAaA,EAAaL,OAAO,CAAEQ,MAAKgB,UAASD,QAAOwB,WAE5D,MAAOU,GACCA,aAAoBlE,QACpB6D,EAAMK,GAIlB,GAAI7D,KAAK0D,EAUL,OAAO1D,KAAK0D,EAActD,OAAO,CAAEQ,MAAKgB,UAASD,UAErD,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,MAAKsC,aAAYtB,UAASD,UAC5D,GAAImC,EA6BA,OAjBAX,EAASW,GACLC,MAAMC,QAAQb,IAA6B,IAAlBA,EAAO5D,QAI1BuE,EAAYlE,cAAgBqE,QACE,IAApCA,OAAOC,KAAKJ,GAAavE,QAIG,kBAAhBuE,KAPZX,OAASgB,GAcN,CAAEf,QAAOD,UAIxB,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,UAIlE,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,UAIlE,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,UAAS6E,YAElCA,IACAA,EAAMC,gBAAkB9E,IAGhC5B,KAAK2G,yBAA2B/C,OAASjC,QAAO8E,QAAOG,qBACnD,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,UAASuB,aAGxC,MAAM6C,GAAY7C,aAAuC,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,WAE3D,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,UAGvD,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,QACAC,QAAS0I,EACTjD,SAAUkD,IAGlB,OAAOA,EAEX,MAAOtC,GAeH,MARIvB,SACM1G,KAAK2K,aAAa,eAAgB,CACpC1C,MAAOA,EACPtG,QACA+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,cAC3EsB,QAAuBuE,OAAO7K,MAAM0K,EAAkBE,GAStD,IAAK,MAAMR,KAAY1K,KAAKmK,iBAAiB,4BACzCvD,QAAwB8D,EAAS,CAC7BpF,YACAyF,eACAnE,iBACAhF,QAASoJ,EACTrJ,MAAO3B,KAAK2B,cACTwC,EAEX,OAAOyC,EAiBGhD,eAACkH,EAAKzD,GAChB,MAAMzF,EAAUmH,EAAU+B,GCtP3B,IAAiBM,UDyPF,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,MF2RhB,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,YACAwG,cACAQ,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,OACAjI,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,UAGhE,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,EAAU,IAQlBnJ,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,QAAOC,UAASuB,WACtD0J,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,QAAOC,YAExD,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,QAAOtG,QAAOC,YACtCyF,EACA,MAIZ,IAAKA,EACD,MAAMY,EAQd,IAAK,MAAMyC,KAAYvK,EAAQgK,iBAAiB,sBAC5C9C,QAAiBqD,EAAS,CAAE/I,QAAOC,UAASyF,aAEhD,OAAOA,EAESzD,QAACiJ,EAAc1M,EAASyB,EAASD,GACjD,IAAI0F,EACAY,EACJ,IACIZ,QAAiBwF,EAErB,MAAO5E,IAKP,UACU9H,EAAQwK,aAAa,oBAAqB,CAC5ChJ,QACAC,UACAyF,mBAEElH,EAAQ+M,cAElB,MAAOC,GACCA,aAA0BxN,QAC1BsI,EAAQkF,GAUhB,SAPMhN,EAAQwK,aAAa,qBAAsB,CAC7ChJ,QACAC,UACAyF,WACAY,MAAOA,IAEX9H,EAAQuM,UACJzE,EACA,MAAMA,IDlKdrI,YAAYuJ,EAAU,IAClBA,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,sBAGJrN,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,QAGRZ,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,YACAhC,MAAOoD,EACPO,YAAa,sBAEXjN,QAAQC,IAAItC,KAAKkJ,SAAS4D,UAAU,CACtC3J,OAAQ,CAAE6C,YACVpE,UACAD,WAGR,MAAM2E,YAAEA,EAAFC,eAAeA,GAAmB8I,EAIxC,MAAO,CAAE/I,cAAaC,qBAa9BoI,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,kBASjBC,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,QAElD,OAAQuI,IACJA,EAAQvH,QAAU,IAAIc,QAAQ9B,GAC9BuI,EAAQhG,OAASc,OAAOoF,OAAO,CAAErD,YAAYmD,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,cACb,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,WAAU2H,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,SASdA,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,MAAI8Q,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