From 884146df91c43adff52fd4d73a65f0b0e2274a33 Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Mon, 12 Sep 2016 13:14:09 +0200 Subject: [PATCH] 5.6.0.4 release --- ChangeLog | 14 + README.md | 2 +- VERSION | 2 +- etc/build/build.xml | 1 + etc/mxgraph/mxClient.js | 20 +- etc/sandstorm/build.sh | 0 etc/sandstorm/stage.sh | 0 .../importer/GliffyDiagramConverter.java | 2 +- war/cache.manifest | 3 +- war/images/glyphicons_github.png | Bin 0 -> 393 bytes war/index.html | 4 + war/js/app.min.js | 1143 +- war/js/atlas-viewer.min.js | 92 +- war/js/atlas.min.js | 11557 ++++++++-------- war/js/diagramly/App.js | 301 +- war/js/diagramly/EditorUi.js | 2 +- war/js/embed-static.min.js | 20 +- war/js/mxgraph/Dialogs.js | 8 +- war/js/mxgraph/EditorUi.js | 125 +- war/js/mxgraph/Sidebar.js | 25 +- war/js/mxgraph/Toolbar.js | 9 +- war/js/reader.min.js | 20 +- war/js/viewer.min.js | 92 +- war/plugins/voice.js | 36 +- 24 files changed, 6751 insertions(+), 6727 deletions(-) mode change 100755 => 100644 etc/sandstorm/build.sh mode change 100755 => 100644 etc/sandstorm/stage.sh create mode 100644 war/images/glyphicons_github.png diff --git a/ChangeLog b/ChangeLog index fa6c8f15..7f610b23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +12-SEP-2016: 5.6.0.4 + +- Uses mxGraph 3.6.0.1 +- Adds reset for undo history of in-place editor +- Fixes inconsistent selection check for cursor keys +- Adds hash listener for pages with url parameters +- Fixes PDF, image with XML export for multiple pages +- File ID has precedence over create, url parameters +- Adds validation for grid size in page setup dialog +- Fixes fullscreen toggle in embed mode for Kennedy +- Adds keyboard shortcuts in toolbar tooltips +- Uses mxfile wrapper for embedded HTML files +- Adds optional callback argument in App.main + 07-SEP-2016: 5.6.0.3 - Uses mxGraph 3.6 diff --git a/README.md b/README.md index e8474834..2233e212 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ The simplest way to run draw.io initially is to fork this project, [publish the Supported Browsers ------------------ -draw.io supports IE 9+, Chrome 30+, Firefox 31+, Safari versions actively patched by Apple (6.2.x, 7.1.x, 8.0.x and 9.x at time of writing), Opera 20+, Native Android browser 5.x+, the default browser in the current and previous major iOS versions (e.g. 9.x and 8.x) and Edge 20+. +draw.io supports IE 9+, Chrome 30+, Firefox 31+, Safari versions actively patched by Apple (6.2.x, 7.1.x, 8.0.x and 9.x at time of writing), Opera 20+, Native Android browser 5.x+, the default browser in the current and previous major iOS versions (e.g. 9.x and 8.x) and Edge 20+. \ No newline at end of file diff --git a/VERSION b/VERSION index a78d9fa9..5ec6b1eb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.6.0.3 \ No newline at end of file +5.6.0.4 \ No newline at end of file diff --git a/etc/build/build.xml b/etc/build/build.xml index fa09a7aa..1352ba36 100644 --- a/etc/build/build.xml +++ b/etc/build/build.xml @@ -488,6 +488,7 @@ + diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js index 14d97663..279ed2af 100644 --- a/etc/mxgraph/mxClient.js +++ b/etc/mxgraph/mxClient.js @@ -1,4 +1,4 @@ -var mxClient={VERSION:"3.6.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& +var mxClient={VERSION:"3.6.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -862,16 +862,16 @@ mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c@TK2_ z#ozWGl<7Hr_2O%xp3_=stIzcM$h&UPzEc+V=U@Ny2bP0l+XkK-NL8R literal 0 HcmV?d00001 diff --git a/war/index.html b/war/index.html index 2cf50da2..e5cecbd7 100644 --- a/war/index.html +++ b/war/index.html @@ -353,6 +353,10 @@ draw.io on Twitter +   + + draw.io on GitHub + diff --git a/war/js/app.min.js b/war/js/app.min.js index c74b1220..d814232f 100644 --- a/war/js/app.min.js +++ b/war/js/app.min.js @@ -1,9 +1,9 @@ !function(a,c){"object"==typeof exports?module.exports=c():"function"==typeof define&&define.amd?define(c):a.Spinner=c()}(this,function(){function a(b,a){var d,e=document.createElement(b||"div");for(d in a)e[d]=a[d];return e}function c(b){for(var a=1,d=arguments.length;d>a;a++)b.appendChild(arguments[a]);return b}function f(b,a,d,e){var c=["opacity",a,~~(100*b),d,e].join("-");d=0.01+100*(d/e);e=Math.max(1-(1-b)/a*(100-d),b);var f=l.substring(0,l.indexOf("Animation")).toLowerCase();return m[c]||(p.insertRule("@"+ (f&&"-"+f+"-"||"")+"keyframes "+c+"{0%{opacity:"+e+"}"+d+"%{opacity:"+b+"}"+(d+0.01)+"%{opacity:1}"+(d+a)%100+"%{opacity:"+b+"}100%{opacity:"+e+"}}",p.cssRules.length),m[c]=1),c}function d(b,a){var d,e,c=b.style;a=a.charAt(0).toUpperCase()+a.slice(1);for(e=0;e>1,filter:n}),d("fill",{color:"string"==typeof e.color?e.color:e.color[a%e.color.length],opacity:e.opacity}),d("stroke",{opacity:0}))))}var k,l=e.length+e.width,n=2*l;k=2*-(e.width+e.length)+"px";var m=b(f(),{position:"absolute",top:k,left:k});if(e.shadow)for(k=1;k<=e.lines;k++)g(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(k=1;k<=e.lines;k++)g(k);return c(a,m)};g.prototype.opacity=function(b,a,d,e){b=b.firstChild;e=e.shadow&& -e.lines||0;b&&a+e>1)+"px"})}for(var k, n=0,m=(e.lines-1)*(1-e.direction)/2;n>10),56320+(d&1023))):d==d?String.fromCharCode(d):" ">a[1]?"":a[1]}function a(b,d){return'"'+b.replace(/[\u0000-\u001f\\\"<>]/g, d)+'"'}function d(b){return c[b]||(c[b]="\\"+b.charCodeAt(0).toString(16)+" ")}function e(b){return f[b]||(f[b]=("\u0010">b?"%0":"%")+b.charCodeAt(0).toString(16))}var c={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])", -"gi"),n=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),m=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(a){return a.replace(n,b)};k=function(b){b=(""+b).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,n=b.length;k=q?" ":/url\(/i.test(t)?"url("+a(t.replace(m,""),e)+")":t;if(f!=t||" "!=t)b[c++]=f=t}b.length=c;return b}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var n=function(){function b(a){a=(""+a).match(m);return!a?f:new g(k(a[1]),k(a[2]),k(a[3]),k(a[4]),k(a[5]),k(a[6]),k(a[7]))}function a(b,e){return"string"==typeof b?encodeURI(b).replace(e,d):f}function d(b){b=b.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function e(b){if(b=== +"gi"),n=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),m=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(a){return a.replace(n,b)};k=function(b){b=(""+b).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,n=b.length;k=r?" ":/url\(/i.test(t)?"url("+a(t.replace(m,""),e)+")":t;if(f!=t||" "!=t)b[c++]=f=t}b.length=c;return b}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var n=function(){function b(a){a=(""+a).match(m);return!a?f:new g(k(a[1]),k(a[2]),k(a[3]),k(a[4]),k(a[5]),k(a[6]),k(a[7]))}function a(b,e){return"string"==typeof b?encodeURI(b).replace(e,d):f}function d(b){b=b.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function e(b){if(b=== f)return f;b=b.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var a=l,d;(d=b.replace(a,"$1"))!=b;b=d);return b}function c(b,a){var d=b.T(),f=a.K();f?d.ga(a.j):f=a.X();f?d.da(a.n):f=a.Y();f?d.ea(a.k):f=a.$();var g=a.g,k=e(g);if(f)d.ca(a.V()),k=k&&k.replace(n,"");else if(f=!!g){if(47!==k.charCodeAt(0))var k=e(d.g||"").replace(n,""),l=k.lastIndexOf("/")+1,k=e((l?k.substring(0,l):"")+e(g)).replace(n,"")}else k=k&&k.replace(n,""),k!==g&&d.G(k);f?d.G(k):f=a.aa();f?d.O(a.l):f=a.Z();f&&d.fa(a.o); return d}function g(b,a,d,e,c,f,k){this.j=b;this.n=a;this.k=d;this.h=e;this.g=c;this.l=f;this.o=k}function k(b){return"string"==typeof b&&0]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", -"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function O(d,c,f,g,n){d=D(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var t=m.cssPropBits,q=t&80,p=t&1536,z=NaN,r=0,s=0;r]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", +"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,G=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function O(d,c,f,g,n){d=D(d);var m=e[d];if(!m||"object"!==typeof m)c.length=0;else{for(var t=m.cssPropBits,r=t&80,p=t&1536,z=NaN,q=0,s=0;q=E)F=t&1?F:"";else if(G=F.charCodeAt(1),B=F.charCodeAt(2),H=48<=G&&57>=G,A=48<=B&&57>=B,43===E&&(H||46===G&&A))F=t&1?(H?"":"0")+F.substring(1):"";else if(45===E&&(H||46===G&&A))F=t&4?(H?"-":"-0")+F.substring(1):t&1?"0":"";else if(46===E&&H)F=t&1?"0"+F:"";else if('url("'===F.substring(0,5))F= -f&&t&16?b(u(k(g,c[r].substring(5,F.length-2)),d,f)):"";else if("("===F.charAt(F.length-1))a:{Q=c;ca=r;F=1;$=ca+1;for(E=Q.length;$g&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();fg&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();fn)return n=~n,n===k?n+1:n;var m=b[n];if("{"!==m)return n===k?n+1:n;a=n+1;n>k&&" "===b[n-1]&&--n;for(g.startRuleset&&g.startRuleset(b.slice(k,n));am)m=~m;else{for(var t=[],u=0,q=a;qm)m=~m;else{for(var t=[],u=0,r=a;r])/g;c=b+"";if(ga)c=c.split(g);else{for(var k=[],l=0,n;(n=g.exec(c))!==f;)k.push(c.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(c.substring(l));c=k}u(a,c,0,{r:d,C:d},e)}}function t(b,a,d,e,c){return function(){u(b,a,d,e,c)}}function u(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,n,m=d.length;ec)){for(f=g.length;--f>c;){var k=g[f].v;b.f[k]&b.c.OPTIONAL_ENDTAG||e.push("\x3c/",k,"\x3e")}c/g,W=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,$={},fa={},ia=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=r;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=X;ba.wa=ba.normalizeRCData=l;ba.xa= +function X(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:T(f,g,d,e,c)}}}function R(b,a){var d=[];q(a)(b,d);return d.join("")}var C,N;"undefined"!==typeof window&&(C=window.parseCssDeclarations,N=window.sanitizeCssProperty);var P={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,U=/^#x([0-9A-Fa-f]+)$/,J=/^[A-Za-z][A-za-z0-9]+$/,K="undefined"!==typeof window&&window.document?window.document.createElement("textarea"): +f,S=/\0/g,Z=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ea=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,da=/&/g,V=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Y=/[<]/g,aa=/>/g,W=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,$={},fa={},ia=/^(?:https?|mailto|data)$/i,ba={};ba.pa=ba.escapeAttrib=k;ba.ra=ba.makeHtmlSanitizer=q;ba.sa=ba.makeSaxParser=m;ba.ta=ba.makeTagPolicy=X;ba.wa=ba.normalizeRCData=l;ba.xa= ba.sanitize=function(b,a,d,e){return R(b,X(a,d,e))};ba.ya=ba.sanitizeAttribs=T;ba.za=ba.sanitizeWithPolicy=R;ba.Ba=ba.unescapeEntities=g;return ba}(t);g=b.sanitize;"undefined"!==typeof window&&(window.html=b,window.html_sanitize=g)})();!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function c(f,d,b){function e(k,n){if(!d[k]){if(!f[k]){var m="function"==typeof require&&require;if(!n&&m)return m(k,!0);if(g)return g(k,!0);m=Error("Cannot find module '"+k+"'");throw m.code="MODULE_NOT_FOUND",m;}m=d[k]={exports:{}}; -f[k][0].call(m.exports,function(b){var d=f[k][1][b];return e(d?d:b)},m,m.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;kd.windowBits&&(d.windowBits+=16);this.err=0;this.msg= -"";this.ended=!1;this.chunks=[];this.strm=new m;this.strm.avail_out=0;var e=g.deflateInit2(this.strm,d.level,d.method,d.windowBits,d.memLevel,d.strategy);if(e!==r)throw Error(n[e]);if(d.header&&g.deflateSetHeader(this.strm,d.header),d.dictionary){var c;if(c="string"==typeof d.dictionary?l.string2buf(d.dictionary):"[object ArrayBuffer]"===p.call(d.dictionary)?new Uint8Array(d.dictionary):d.dictionary,e=g.deflateSetDictionary(this.strm,c),e!==r)throw Error(n[e]);this._dict_set=!0}}function e(d,e){var c= -new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/deflate"),k=c("./utils/common"),l=c("./utils/strings"),n=c("./zlib/messages"),m=c("./zlib/zstream"),p=Object.prototype.toString,r=0,s=-1,q=0,u=8;b.prototype.push=function(b,d){var e,c,f=this.strm,n=this.options.chunkSize;if(this.ended)return!1;c=d===~~d?d:!0===d?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0=== -f.avail_out&&(f.output=new k.Buf8(n),f.next_out=0,f.avail_out=n),e=g.deflate(f,c),1!==e&&e!==r)return this.onEnd(e),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==c&&2!==c)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0d.windowBits&&(d.windowBits+=16);this.err=0;this.msg= +"";this.ended=!1;this.chunks=[];this.strm=new m;this.strm.avail_out=0;var e=g.deflateInit2(this.strm,d.level,d.method,d.windowBits,d.memLevel,d.strategy);if(e!==q)throw Error(n[e]);if(d.header&&g.deflateSetHeader(this.strm,d.header),d.dictionary){var c;if(c="string"==typeof d.dictionary?l.string2buf(d.dictionary):"[object ArrayBuffer]"===p.call(d.dictionary)?new Uint8Array(d.dictionary):d.dictionary,e=g.deflateSetDictionary(this.strm,c),e!==q)throw Error(n[e]);this._dict_set=!0}}function e(d,e){var c= +new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/deflate"),k=c("./utils/common"),l=c("./utils/strings"),n=c("./zlib/messages"),m=c("./zlib/zstream"),p=Object.prototype.toString,q=0,s=-1,r=0,u=8;b.prototype.push=function(b,d){var e,c,f=this.strm,n=this.options.chunkSize;if(this.ended)return!1;c=d===~~d?d:!0===d?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0=== +f.avail_out&&(f.output=new k.Buf8(n),f.next_out=0,f.avail_out=n),e=g.deflate(f,c),1!==e&&e!==q)return this.onEnd(e),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==c&&2!==c)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0e.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15));!(0<=e.windowBits&&16>e.windowBits)||d&&d.windowBits||(e.windowBits+=32);15e.windowBits&&0===(15&e.windowBits)&&(e.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;d=g.inflateInit2(this.strm,e.windowBits);if(d!==n.Z_OK)throw Error(m[d]); -this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),n=c("./zlib/constants"),m=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,m,p,r,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?n.Z_FINISH:n.Z_NO_FLUSH; -"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,n.Z_NO_FLUSH),e===n.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,r)),e===n.Z_BUF_ERROR&&!0===G&&(e=n.Z_OK,G=!1),e!==n.Z_STREAM_END&&e!==n.Z_OK)return this.onEnd(e), +this.header=new q;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),n=c("./zlib/constants"),m=c("./zlib/messages"),p=c("./zlib/zstream"),q=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,m,p,q,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,G=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?n.Z_FINISH:n.Z_NO_FLUSH; +"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,n.Z_NO_FLUSH),e===n.Z_NEED_DICT&&E&&(q="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,q)),e===n.Z_BUF_ERROR&&!0===G&&(e=n.Z_OK,G=!1),e!==n.Z_STREAM_END&&e!==n.Z_OK)return this.onEnd(e), this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&e!==n.Z_STREAM_END&&(0!==A.avail_in||c!==n.Z_FINISH&&c!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),m=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=m,A.avail_out=B-m,m&&k.arraySet(A.output,A.output,f,m,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(G=!0)}while((0>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6 2===k?31:3===k?15:7;1g?n[f++]=g:(g-=65536,n[f++]=55296|g>>10&1023,n[f++]=56320|1023&g)}return b(n,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+m[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var l=65535&b|0;b=b>>>16&65535|0;for(var n=0;0!==c;){n=2E3c;c++){b=c; for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=E[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(x.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out= -0))}function k(b,d){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function n(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function m(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-Z?b.strstart-(b.w_size-Z):0,m=b.window,t=b.w_mask,u=b.prev,q=b.strstart+S,v=m[g+k-1],p=m[g+k];b.prev_length>=b.good_match&& -(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,m[e+k]===p&&m[e+k-1]===v&&m[e]===m[g]&&m[++e]===m[g+1]){g+=2;e++;do;while(m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&gk){if(b.match_start=d,k=c,c>=l)break;v=m[g+k-1];p=m[g+k]}}while((d=u[d&t])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>= +0))}function k(b,d){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function n(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function m(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,n=b.strstart>b.w_size-Z?b.strstart-(b.w_size-Z):0,m=b.window,t=b.w_mask,u=b.prev,r=b.strstart+S,v=m[g+k-1],p=m[g+k];b.prev_length>=b.good_match&& +(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,m[e+k]===p&&m[e+k-1]===v&&m[e]===m[g]&&m[++e]===m[g+1]){g+=2;e++;do;while(m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&m[++g]===m[++e]&&gk){if(b.match_start=d,k=c,c>=l)break;v=m[g+k-1];p=m[g+k]}}while((d=u[d&t])>n&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>= g+(g-Z)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)), -b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<< +b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<< b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-Z&&(b.match_length=m(b,e)),b.match_length>=K)if(c=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===O||b.match_length===K&&4096= K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?ea:da,d.adler=2===e.wrap?0:1,e.last_flush=G,D._tr_init(e),H):b(d,I)}function v(b){var d=t(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start= 0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15g||g>C||c!==R||8>f||15e||9k||k>T)return b(d,I);8===f&&(f=9);var n=new u;return d.state=n,n.strm=d,n.wrap=l,n.gzhead=null,n.w_bits=f,n.w_size=1<b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return V;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-Z&&(k(b,!1),0===b.strm.avail_out))return V}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?aa:W):(b.strstart>b.block_start&&k(b,!1),V)}),new q(4,4,8, -4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,R,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,H):I};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5c)return d?b(d,I):I;if(m=d.state,!d.output||!d.input&&0!==d.avail_in|| +n.w_size),n.head=new x.Buf16(n.hash_size),n.prev=new x.Buf16(n.w_size),n.lit_bufsize=1<b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===G)return V;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-Z&&(k(b,!1),0===b.strm.avail_out))return V}return b.insert=0,d===F?(k(b,!0),0===b.strm.avail_out?aa:W):(b.strstart>b.block_start&&k(b,!1),V)}),new r(4,4,8, +4,q),new r(4,5,16,8,q),new r(4,6,32,32,q),new r(4,4,16,16,s),new r(8,16,32,32,s),new r(8,16,128,128,s),new r(8,32,128,256,s),new r(32,128,258,1024,s),new r(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,R,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,H):I};d.deflate=function(d,c){var f,m,t,u;if(!d||!d.state||5c)return d?b(d,I):I;if(m=d.state,!d.output||!d.input&&0!==d.avail_in|| 666===m.status&&c!==F)return b(d,0===d.avail_out?-5:I);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(d.adler=0,l(m,31),l(m,139),l(m,8),m.gzhead?(l(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),l(m,255&m.gzhead.time),l(m,m.gzhead.time>>8&255),l(m,m.gzhead.time>>16&255),l(m,m.gzhead.time>>24&255),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(l(m,255&m.gzhead.extra.length), l(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(d.adler=B(d.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(l(m,0),l(m,0),l(m,0),l(m,0),l(m,0),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,3),m.status=da)):(t=R+(m.w_bits-8<<4)<<8,u=-1,u=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,t|=u<<6,0!==m.strstart&&(t|=32),m.status=da,n(m,t+(31-t%31)),0!==m.strstart&&(n(m,d.adler>>>16),n(m,65535&d.adler)),d.adler=1);if(69===m.status)if(m.gzhead.extra){for(t=m.pending;m.gzindex< (65535&m.gzhead.extra.length)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending!==m.pending_buf_size));)l(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending> t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)),g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindext&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));0===u&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){t=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>t&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t)), g(d),t=m.pending,m.pending===m.pending_buf_size)){u=1;break}u=m.gzindext&&(d.adler=B(d.adler,m.pending_buf,m.pending-t,t));0===u&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(d),m.pending+2<=m.pending_buf_size&&(l(m,255&d.adler),l(m,d.adler>>8&255),d.adler=0,m.status=da)):m.status=da),0!==m.pending){if(g(d),0===d.avail_out)return m.last_flush= --1,H}else if(0===d.avail_in&&(c<<1)-(4=K&&0m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>= -K?(q=D._tr_tally(m,1,m.match_length-K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(k(m,!1),0===m.strm.avail_out)){q=V;break a}}q=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:W):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?V:Y)}else q=y[m.level].func(m,c);if(q!==aa&&q!==W||(m.status=666),q===V||q===aa)return 0===d.avail_out&&(m.last_flush=-1),H;if(q===Y&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m, +-1,H}else if(0===d.avail_in&&(c<<1)-(4=K&&0m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>= +K?(r=D._tr_tally(m,1,m.match_length-K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(r=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),r&&(k(m,!1),0===m.strm.avail_out)){r=V;break a}}r=(m.insert=0,c===F?(k(m,!0),0===m.strm.avail_out?aa:W):m.last_lit&&(k(m,!1),0===m.strm.avail_out)?V:Y)}else r=y[m.level].func(m,c);if(r!==aa&&r!==W||(m.status=666),r===V||r===aa)return 0===d.avail_out&&(m.last_flush=-1),H;if(r===Y&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m, 0,0,!1),3===c&&(e(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(d),0===d.avail_out))return m.last_flush=-1,H}return c!==F?H:0>=m.wrap?1:(2===m.wrap?(l(m,255&d.adler),l(m,d.adler>>8&255),l(m,d.adler>>16&255),l(m,d.adler>>24&255),l(m,255&d.total_in),l(m,d.total_in>>8&255),l(m,d.total_in>>16&255),l(m,d.total_in>>24&255)):(n(m,d.adler>>>16),n(m,65535&d.adler)),g(d),0=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;n=b.next_in;m=b.input;b.avail_in=f;b.next_in= -0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in= +0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<z&&(v+=I[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[n++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<>>=E,z-=E);15>z&&(v+=I[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255, -!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=n-m,F>E){if(E=F-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=t,0===u){if(B+=s-E,Eq){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=n-m,F>E){if(E=F-E,E>r&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=t,0===u){if(B+=s-E,E>3;f-=G;z-=G<<3;b.next_in=f;b.next_out=n;b.avail_in=f>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work= new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(D),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state, 0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e- -c,f,b.wnext),c-=f,c?(s.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whaveC;){if(0===n)break a;n--;A+=f[k++]<>>8&255;c.check=u(c.check,Q,2,0);C=A=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1), !(1&c.wrap)||(((255&A)<<8)+(A>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&A)){d.msg="unknown compression method";c.mode=30;break}if(A>>>=4,C-=4,V=(15&A)+8,0===c.wbits)c.wbits=V;else if(V>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<C;){if(0===n)break a;n--;A+=f[k++]<>8&1);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,c.check=u(c.check,Q,2,0));C=A=0;c.mode=3;case 3:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,c.check=u(c.check,Q,4,0));C=A=0;c.mode=4;case 4:for(;16>C;){if(0===n)break a;n--;A+=f[k++]<>8);512&c.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,c.check=u(c.check,Q,2,0));C=A=0;c.mode= 5;case 5:if(1024&c.flags){for(;16>C;){if(0===n)break a;n--;A+=f[k++]<>>8&255,c.check=u(c.check,Q,2,0));C=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>n&&(M=n),M&&(c.head&&(V=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,M,V)),512&c.flags&&(c.check=u(c.check,f,M,k)),n-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode= 7;case 7:if(2048&c.flags){if(0===n)break a;M=0;do V=f[k+M++],c.head&&V&&65536>c.length&&(c.head.name+=String.fromCharCode(V));while(V&&Mc.length&&(c.head.comment+=String.fromCharCode(V));while(V&&MC;){if(0===n)break a;n--;A+=f[k++]<>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>C;){if(0===n)break a;n--;A+=f[k++]<>>= -7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:J=c;if(B){S=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(S=0;144>S;)J.lens[S++]=8;for(;256>S;)J.lens[S++]=9;for(;280>S;)J.lens[S++]=7;for(;288>S;)J.lens[S++]=8;v(1,J.lens,0,288,p,0,J.work,{bits:9});for(S=0;32>S;)J.lens[S++]=5;v(2,J.lens,0,32,r,0,J.work,{bits:5});B=!1}J.lencode=p;J.lenbits=9;J.distcode=r;J.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break; +7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===n)break a;n--;A+=f[k++]<>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:J=c;if(B){S=void 0;p=new s.Buf32(512);q=new s.Buf32(32);for(S=0;144>S;)J.lens[S++]=8;for(;256>S;)J.lens[S++]=9;for(;280>S;)J.lens[S++]=7;for(;288>S;)J.lens[S++]=8;v(1,J.lens,0,288,p,0,J.work,{bits:9});for(S=0;32>S;)J.lens[S++]=5;v(2,J.lens,0,32,q,0,J.work,{bits:5});B=!1}J.lencode=p;J.lenbits=9;J.distcode=q;J.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break; case 2:c.mode=17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;C-=2;break;case 14:A>>>=7&C;for(C-=7&C;32>C;){if(0===n)break a;n--;A+=f[k++]<>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,C=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>n&&(M=n),M>D&&(M=D),0===M)break a;s.arraySet(g,f,k,M,l);n-=M;k+=M;D-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>C;){if(0===n)break a;n--;A+=f[k++]<< C;C+=8}if(c.nlen=(31&A)+257,A>>>=5,C-=5,c.ndist=(31&A)+1,A>>>=5,C-=5,c.ncode=(15&A)+4,A>>>=4,C-=4,286C;){if(0===n)break a;n--;A+=f[k++]<>>=3;C-=3}for(;19>c.have;)c.lens[ga[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,aa={bits:c.lenbits},Y=v(0,c.lens,0,19,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Y){d.msg="invalid code lengths set"; c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have>>24,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<S)A>>>=K,C-=K,c.lens[c.have++]=S;else{if(16===S){for(J=K+2;C>>=K,C-=K,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}V=c.lens[c.have-1];M=3+(3&A);A>>>=2;C-=2}else if(17===S){for(J=K+3;C>>=K;C-=K;V=0;M=3+(7&A); @@ -163,25 +163,25 @@ c.distdyn,aa={bits:c.distbits},Y=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,a C);){if(0===n)break a;n--;A+=f[k++]<>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,c.length=S,0===J){c.mode=26;break}if(32&J){c.back=-1;c.mode=12;break}if(64&J){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&J;c.mode=22;case 22:if(c.extra){for(J=c.extra;C>>=c.extra;C-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;W=c.distcode[A&(1<>>24,J=W>>>16&255,S=65535&W,!(K<=C);){if(0===n)break a;n--;A+=f[k++]<>Z)],K=W>>>24,J=W>>>16&255,S=65535&W,!(Z+K<=C);){if(0===n)break a;n--;A+=f[k++]<>>=Z;C-=Z;c.back+=Z}if(A>>>=K,C-=K,c.back+=K,64&J){d.msg="invalid distance code";c.mode=30;break}c.offset=S;c.extra=15&J;c.mode=24;case 24:if(c.extra){for(J= c.extra;C>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(M=P-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,U=c.wsize-M):U=c.wnext-M;M>c.length&&(M=c.length);J=c.window}else J=g,U=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=J[U++];while(--M); -0===c.length&&(c.mode=21);break;case 26:if(0===D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>C;){if(0===n)break a;n--;A|=f[k++]<C;){if(0===n)break a;n--;A+=f[k++]<c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(N-=d.avail_in,P-=d.avail_out,d.total_in+=N,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?u(c.check,g,P,d.next_out-P):q(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128: -0)+(20===c.mode||15===c.mode?256:0),(0===N&&0===P||4===e)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:m(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)): +0===c.length&&(c.mode=21);break;case 26:if(0===D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>C;){if(0===n)break a;n--;A|=f[k++]<C;){if(0===n)break a;n--;A+=f[k++]<c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(N-=d.avail_in,P-=d.avail_out,d.total_in+=N,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?u(c.check,g,P,d.next_out-P):r(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128: +0)+(20===c.mode||15===c.mode?256:0),(0===N&&0===P||4===e)&&Y===z&&(Y=-5),Y)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=r(c,d,f,0),c!==e.check)?-3:m(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)): y};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16, -16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,u,t){var v,z,y,x,D,A,B,E;x=t.bits;for(var G=0,F=0,H=0,I=0,L=0,O=0,T=0,X=v=0,R=0,C=null,N=0,P=new b.Buf16(16),O=new b.Buf16(16),M=null,U=0,G=0;15>=G;G++)P[G]=0;for(F=0;FI&&(L=I),0===I)return s[q++]=20971520,s[q++]=20971520,t.bits=1,0;for(H=1;H=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0< -v&&(0===d||1!==I))return-1;O[1]=0;for(G=1;15>G;G++)O[G+1]=O[G]+P[G];for(F=0;FD?(B=M[U+u[F]],E=C[N+u[F]]):(B=96,E=0);v=1<>T)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<>=1;if(0!==v?(R&=v-1,R+=v):R=0,F++,0===--P[G]){if(G===I)break; -G=c[f+u[F]]}if(G>L&&(R&r)!==y){0===T&&(T=L);x+=H;O=G-T;for(v=1<=v));)O++,v<<=1;if(X+=1<=G;G++)P[G]=0;for(F=0;FI&&(L=I),0===I)return s[r++]=20971520,s[r++]=20971520,t.bits=1,0;for(H=1;H=G;G++)if(v<<=1,v-=P[G],0>v)return-1;if(0< +v&&(0===d||1!==I))return-1;O[1]=0;for(G=1;15>G;G++)O[G+1]=O[G]+P[G];for(F=0;FD?(B=M[U+u[F]],E=C[N+u[F]]):(B=96,E=0);v=1<>T)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<>=1;if(0!==v?(R&=v-1,R+=v):R=0,F++,0===--P[G]){if(G===I)break; +G=c[f+u[F]]}if(G>L&&(R&q)!==y){0===T&&(T=L);x+=H;O=G-T;for(v=1<=v));)O++,v<<=1;if(X+=1<>>8&255}function l(b,d,e){b.bi_valid>X-e?(b.bi_buf|=d<>X-b.bi_valid,b.bi_valid+=e-X):(b.bi_buf|=d<>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(T+1),g=0;for(c=1;c<=T;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function r(b){var d;for(d=0;d>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(T+1),g=0;for(c=1;c<=T;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function q(b){var d;for(d=0;dc?ea[c]:ea[256+(c>>>7)],n(b,g,e),k=U[g],0!==k&&(c-=Y[g],l(b,c,k)));while(mb.heap_len;)f=b.heap[++b.heap_len]=2>n?++n:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=n;for(e=b.heap_len>>1;1<=e;e--)u(b,g,e);f=l; -do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,u(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,t,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,v=d.stat_desc.has_stree,z=d.stat_desc.extra_bits,y=d.stat_desc.extra_base,x=d.stat_desc.max_length,r=0;for(c=0;c<=T;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+ -1]=0;for(e=b.heap_max+1;ex&&(c=x,r++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=y&&(m=z[f-y]),t=k[2*f],b.opt_len+=t*(c+m),v&&(b.static_len+=t*(q[2*f+1]+m)));if(0!==r){do{for(c=x-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[x]--;r-=2}while(0l||(k[2*m+1]!==c&&(b.opt_len+=(c-k[2*m+1])*k[2*m],k[2*m+1]=c),f--)}p(g,n,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,n=7, +do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],u(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,u(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,t,k=d.dyn_tree,l=d.max_code,r=d.stat_desc.static_tree,v=d.stat_desc.has_stree,z=d.stat_desc.extra_bits,y=d.stat_desc.extra_base,x=d.stat_desc.max_length,q=0;for(c=0;c<=T;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+ +1]=0;for(e=b.heap_max+1;ex&&(c=x,q++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=y&&(m=z[f-y]),t=k[2*f],b.opt_len+=t*(c+m),v&&(b.static_len+=t*(r[2*f+1]+m)));if(0!==q){do{for(c=x-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[x]--;q-=2}while(0l||(k[2*m+1]!==c&&(b.opt_len+=(c-k[2*m+1])*k[2*m],k[2*m+1]=c),f--)}p(g,n,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,n=7, m=4;0===k&&(n=138,m=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l=l?b.bl_tree[2*N]++:b.bl_tree[2*P]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,d,e){var c,f,g=-1,k=d[1],m=0,t=7,u=4;0===k&&(t=138,u=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m=m? (n(b,N,b.bl_tree),l(b,m-3,3)):(n(b,P,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(t=138,u=3):f===k?(t=6,u=3):(t=7,u=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;df;f++){V[f]=c;for(d=0;d<1<f;f++){Y[f]=c;for(d=0;d<1<>=7;f=d;)S[2*d+1]=8,d++,k[8]++;for(;255>=d;)S[2*d+1]=9,d++,k[9]++;for(;279>=d;)S[2*d+1]=7,d++,k[7]++;for(;287>=d;)S[2*d+1]=8,d++,k[8]++;p(S,H+1,k);for(d=0;d>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e, -c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),t(b,S,Z);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++, +aa);b.d_desc=new g(b.dyn_dtree,W);b.bl_desc=new g(b.bl_tree,Q);b.bi_buf=0;b.bi_valid=0;q(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e, +c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),t(b,S,Z);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++, d--,b.dyn_ltree[2*(da[e]+F+1)]++,b.dyn_dtree[2*(256>d?ea[d]:ea[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,R,S);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state= null;this.data_type=2;this.adler=0}},{}],"/":[function(c,f,d){d=c("./lib/utils/common").assign;var b=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,b,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,c){var f="",d,b,e,g,k,l,n=0;for(null!=c&&c||(a=Base64._utf8_encode(a));n>2,d=(d&3)<<4|b>>4,k=(b&15)<<2|e>>6,l=e&63,isNaN(b)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(a,c){c=null!=c?c:!1;var f="",d,b,e,g,k,l=0;for(a= a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,b=(b&15)<<4|g>>2,e=(g&3)<<6|k,f+=String.fromCharCode(d),64!=g&&(f+=String.fromCharCode(b)),64!=k&&(f+=String.fromCharCode(e));c||(f=Base64._utf8_decode(f));return f},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var c="",f=0;fd?c+=String.fromCharCode(d): @@ -192,7 +192,7 @@ ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",sr:"\u0421\u0440\u043f\u0441\u04 if(null==window.mxLanguages){window.mxLanguages=[];for(var lang in mxLanguageMap)"en"!=lang&&window.mxLanguages.push(lang)}window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;if(null==a&&"undefined"!==typeof JSON&&isLocalStorage)try{var c=localStorage.getItem(".drawio-config");null!=c&&(a=JSON.parse(c).ui||null)}catch(f){isLocalStorage=!1}return a}();function setCurrentXml(a,c){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,c)} (function(){if("undefined"!==typeof JSON&&isLocalStorage)try{var a=localStorage.getItem(".drawio-config"),c=!0;null!=a&&(c=JSON.parse(a).showStartScreen);!1==c&&(urlParams.splash="0")}catch(f){}})();var ex=urlParams["export"];null!=ex&&("http://"!=ex.substring(0,7)&&"https://"!=ex.substring(0,8)&&(ex="http://"+ex),EXPORT_URL=ex); if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local)urlParams.analytics="0",urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0";if("1"==urlParams.offline||"1"==urlParams.local)urlParams.math="0";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||1E8;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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.6.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& +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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.6.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -224,8 +224,8 @@ mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,c,f,d mxRectangle.prototype.add=function(a){if(null!=a){var c=Math.min(this.x,a.x),f=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=c;this.y=f;this.width=d-c;this.height=a-f}};mxRectangle.prototype.intersect=function(a){if(null!=a){var c=this.x+this.width,f=a.x+a.width,d=this.y+this.height,b=a.y+a.height;this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.width=Math.min(c,f)-this.x;this.height=Math.min(d,b)-this.y}}; mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height}; mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)}; -var mxEffects={animateChanges:function(a,c,f){var d=0,b=function(){for(var g=!1,k=0;kd&&g?(d++,window.setTimeout(b,e)):null!=f&&f()},e=30;b()},cascadeOpacity:function(a,c,f){for(var d=a.model.getChildCount(c),b=0;bd&&g?(d++,window.setTimeout(b,e)):null!=f&&f()},e=30;b()},cascadeOpacity:function(a,c,f){for(var d=a.model.getChildCount(c),b=0;bdocument.documentMode&&(a="ms");return function(c,f,d){c[f]=d;null!=a&&0mxUtils.indexOf(c,b)))d[b]=!f&&"object"==typeof a[b]?mxUtils.clone(a[b]):a[b]}return d},equalPoints:function(a,c){if(null==a&&null!=c||null!=a&&null==c||null!=a&&null!=c&&a.length!=c.length)return!1;if(null!=a&&null!=c)for(var f=0;fb&&(b+=2*Math.PI);g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;n=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);m=p*f;p*=d;f*=r;d*=r;for(var v=Math.cos(e),z=Math.sin(e),s=-n*(m*z+d*v),q=-n*(f*z-p*v),r=[],y=0;yb&&(b+=2*Math.PI);g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;n=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);m=p*f;p*=d;f*=q;d*=q;for(var v=Math.cos(e),z=Math.sin(e),s=-n*(m*z+d*v),r=-n*(f*z-p*v),q=[],y=0;yf&&(a=3,-135>=f&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:c|=mxConstants.DIRECTION_MASK_EAST;break;case 2:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:c|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_WEST;break;case 1:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:c|=mxConstants.DIRECTION_MASK_EAST;break;case 3:c|= @@ -478,15 +478,15 @@ mxXmlCanvas2D.prototype.image=function(a,c,f,d,b,e,g,k){b=this.converter.convert mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,c){var f=this.createElement("move");f.setAttribute("x",this.format(a));f.setAttribute("y",this.format(c));this.root.appendChild(f);this.lastX=a;this.lastY=c}; mxXmlCanvas2D.prototype.lineTo=function(a,c){var f=this.createElement("line");f.setAttribute("x",this.format(a));f.setAttribute("y",this.format(c));this.root.appendChild(f);this.lastX=a;this.lastY=c};mxXmlCanvas2D.prototype.quadTo=function(a,c,f,d){var b=this.createElement("quad");b.setAttribute("x1",this.format(a));b.setAttribute("y1",this.format(c));b.setAttribute("x2",this.format(f));b.setAttribute("y2",this.format(d));this.root.appendChild(b);this.lastX=f;this.lastY=d}; mxXmlCanvas2D.prototype.curveTo=function(a,c,f,d,b,e){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(c));g.setAttribute("x2",this.format(f));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(b));g.setAttribute("y3",this.format(e));this.root.appendChild(g);this.lastX=b;this.lastY=e};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))}; -mxXmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p,r){if(this.textEnabled&&null!=b){mxUtils.isNode(b)&&(b=mxUtils.getOuterHtml(b));var s=this.createElement("text");s.setAttribute("x",this.format(a));s.setAttribute("y",this.format(c));s.setAttribute("w",this.format(f));s.setAttribute("h",this.format(d));s.setAttribute("str",b);null!=e&&s.setAttribute("align",e);null!=g&&s.setAttribute("valign",g);s.setAttribute("wrap",k?"1":"0");null==l&&(l="");s.setAttribute("format",l);null!=n&&s.setAttribute("overflow", -n);null!=m&&s.setAttribute("clip",m?"1":"0");null!=p&&s.setAttribute("rotation",p);null!=r&&s.setAttribute("dir",r);this.root.appendChild(s)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))}; +mxXmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p,q){if(this.textEnabled&&null!=b){mxUtils.isNode(b)&&(b=mxUtils.getOuterHtml(b));var s=this.createElement("text");s.setAttribute("x",this.format(a));s.setAttribute("y",this.format(c));s.setAttribute("w",this.format(f));s.setAttribute("h",this.format(d));s.setAttribute("str",b);null!=e&&s.setAttribute("align",e);null!=g&&s.setAttribute("valign",g);s.setAttribute("wrap",k?"1":"0");null==l&&(l="");s.setAttribute("format",l);null!=n&&s.setAttribute("overflow", +n);null!=m&&s.setAttribute("clip",m?"1":"0");null!=p&&s.setAttribute("rotation",p);null!=q&&s.setAttribute("dir",q);this.root.appendChild(s)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))}; function mxSvgCanvas2D(a,c){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=c?c:!1;var f=null;if(a.ownerDocument!=document)for(f=a;null!=f&&"svg"!=f.nodeName;)f=f.parentNode;null!=f&&(0l.alpha||1>l.fillAlpha)&&n.setAttribute("opacity",l.alpha*l.fillAlpha);b=this.state.transform||"";if(g||k){var m=e=1,p=0,r=0;g&&(e=-1,p=-f-2*a);k&&(m=-1,r=-d-2*c);b+="scale("+e+","+m+")translate("+p*l.scale+","+r*l.scale+")"}0l.alpha||1>l.fillAlpha)&&n.setAttribute("opacity",l.alpha*l.fillAlpha);b=this.state.transform||"";if(g||k){var m=e=1,p=0,q=0;g&&(e=-1,p=-f-2*a);k&&(m=-1,q=-d-2*c);b+="scale("+e+","+m+")translate("+p*l.scale+","+q*l.scale+")"}0/g,"\x26gt;");a=c.value.replace(/&/g,"\x26amp;").replace(/&lt;/g, @@ -516,27 +516,27 @@ mxSvgCanvas2D.prototype.createDiv=function(a,c,f,d,b){f=this.state;d="display:in mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");c==mxConstants.ALIGN_CENTER?d+="text-align:center;":c==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");c="";null!=f.fontBackgroundColor&&(c+="background-color:"+f.fontBackgroundColor+";");null!=f.fontBorderColor&&(c+="border:1px solid "+f.fontBorderColor+";");mxUtils.isNode(a)||(a=this.convertHtml(a),"fill"!=b&&"width"!=b?a='\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;text-align:inherit;text-decoration:inherit;'+ c+'"\x3e'+a+"\x3c/div\x3e":d+=c);if(!mxClient.IS_IE&&document.createElementNS)return b=document.createElementNS("http://www.w3.org/1999/xhtml","div"),b.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?b.appendChild(a.cloneNode(!0)):b.appendChild(a):b.innerHTML=a,b;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"'+d+'"\x3e'+a+"\x3c/div\x3e").documentElement}; mxSvgCanvas2D.prototype.invalidateCachedOffsetSize=function(a){delete a.firstChild.mxCachedOffsetWidth;delete a.firstChild.mxCachedFinalOffsetWidth;delete a.firstChild.mxCachedFinalOffsetHeight}; -mxSvgCanvas2D.prototype.updateText=function(a,c,f,d,b,e,g,k,l,n,m){if(null!=m&&null!=m.firstChild&&null!=m.firstChild.firstChild&&null!=m.firstChild.firstChild.firstChild){m=m.firstChild;var p=m.firstChild,r=p.firstChild;n=null!=n?n:0;var s=this.state;a+=s.dx;c+=s.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(f)+"px"):"fill"==k?(r.style.width=Math.round(f+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(f+1)+"px",0s.alpha&&u.setAttribute("opacity",s.alpha);var t=this.createElement("foreignObject");t.setAttribute("style","overflow:visible;");t.setAttribute("pointer-events","all");q=this.createDiv(b,e,g,q,n);if(null!=q){null!=r&&q.setAttribute("dir",r);u.appendChild(t);this.root.appendChild(u);var v=0,z=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y= -document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";z=document.createElement("div");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;y.appendChild(z);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0< -f){var x=z.offsetWidth;if(!m&&k&&0s.alpha&&u.setAttribute("opacity",s.alpha);r=q=0;e==mxConstants.ALIGN_CENTER?q-=f/2:e==mxConstants.ALIGN_RIGHT&&(q-=f);a+=q;g==mxConstants.ALIGN_MIDDLE? -r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);c+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(a*=s.scale,c*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+ -")"+y);t.setAttribute("width",Math.round(Math.max(1,f)));t.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(t,a,c,f,d,b,e,g,k,l,n,m,p),null!=a&&(t.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(t),f.appendChild(a),u.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,n,m,p,r)}}; +mxSvgCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p,q){if(this.textEnabled&&null!=b){p=null!=p?p:0;var s=this.state;a+=s.dx;c+=s.dy;if(this.foEnabled&&"html"==l){var r="vertical-align:top;";m?r+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(f)+"px;":"fill"==n?r+="width:"+Math.round(f+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==n&&(r+="width:"+Math.round(f+1)+"px;",0s.alpha&&u.setAttribute("opacity",s.alpha);var t=this.createElement("foreignObject");t.setAttribute("style","overflow:visible;");t.setAttribute("pointer-events","all");r=this.createDiv(b,e,g,r,n);if(null!=r){null!=q&&r.setAttribute("dir",q);u.appendChild(t);this.root.appendChild(u);var v=0,z=0;q=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y= +document.createElement("div");y.style.cssText=r.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";z=document.createElement("div");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;y.appendChild(z);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,q+=2);if(k&&0< +f){var x=z.offsetWidth;if(!m&&k&&0s.alpha&&u.setAttribute("opacity",s.alpha);q=r=0;e==mxConstants.ALIGN_CENTER?r-=f/2:e==mxConstants.ALIGN_RIGHT&&(r-=f);a+=r;g==mxConstants.ALIGN_MIDDLE? +q-=d/2:g==mxConstants.ALIGN_BOTTOM&&(q-=d);"fill"!=n&&mxClient.IS_FF&&mxClient.IS_WIN&&(q-=2);c+=q;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(a*=s.scale,c*=s.scale);0!=p&&(y+="rotate("+p+","+-r+","+-q+")");u.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+ +")"+y);t.setAttribute("width",Math.round(Math.max(1,f)));t.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(t,a,c,f,d,b,e,g,k,l,n,m,p),null!=a&&(t.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(t),f.appendChild(a),u.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,n,m,p,q)}}; mxSvgCanvas2D.prototype.createClip=function(a,c,f,d){a=Math.round(a);c=Math.round(c);f=Math.round(f);d=Math.round(d);for(var b="mx-clip-"+a+"-"+c+"-"+f+"-"+d,e=0,g=b+"-"+e;null!=document.getElementById(g);)g=b+"-"+ ++e;clip=this.createElement("clipPath");clip.setAttribute("id",g);b=this.createElement("rect");b.setAttribute("x",a);b.setAttribute("y",c);b.setAttribute("width",f);b.setAttribute("height",d);clip.appendChild(b);return clip}; -mxSvgCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,n,m,p){m=null!=m?m:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=m&&(q+="rotate("+m+","+this.format(a*k.scale)+","+this.format(c*k.scale)+")");null!=p&&s.setAttribute("direction",p);n&&0k.alpha&&s.setAttribute("opacity",k.alpha);q=b.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var u=r+(q.length-1)*p;m=c+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?m-=d/2:(n=(this.matchHtmlAlignment&&n&&0k.alpha&&s.setAttribute("opacity",k.alpha);r=b.split("\n");p=Math.round(q*mxConstants.LINE_HEIGHT);var u=q+(r.length-1)*p;m=c+q-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?m-=d/2:(n=(this.matchHtmlAlignment&&n&&0v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var z=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(b.style.display="inline-block",e.style.display="inline-block",q.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);q=b;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;m?(f=Math.min(f,v), -q=Math.min(q,d)):f=v;k&&(b.style.width=f+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&q>d)q=d,b.style.height=q+"px";d=q;m=(d-d*g+f*-z)/2-r*f*(t+0.5)+p*d*(u+0.5);k=(f-f*g+d*-z)/2+p*f*(t+0.5)+r*d*(u+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-f/2)*s.scale)+"px",n.style.top=this.format(c+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&& -!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-f/2)*s)+"px",l.style.top=this.format(c+(m-d/2)*s)+"px");e.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";e.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(e.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");e.appendChild(b);b.style.position="";b.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(b.style.verticalAlign= -"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=b.parentNode,b.style.visibility="hidden",document.body.appendChild(b),f=b.offsetWidth,q=b.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,b.style.height=q+"px"),d=q,b.style.visibility="",s.appendChild(b),l.style.left=this.format(a+f*t*this.state.scale)+"px",l.style.top=this.format(c+d*u*this.state.scale)+"px"):(1>this.state.alpha&&(b.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*t+ -"%",q.style.top=100*u+"%")}else this.plainText(a,c,f,d,mxUtils.htmlEntities(b,!1),e,g,k,l,n,m,p,r)}}; -mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,n,m,p,r){k=this.state;a=(a+k.dx)*k.scale;c=(c+k.dy)*k.scale;f=this.createVmlElement("shape");f.style.width="1px";f.style.height="1px";f.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.alpha+"%";f.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);f.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText= +mxVmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p,q){if(this.textEnabled&&null!=b){var s=this.state;if("html"==l){null!=s.rotation&&(c=this.rotatePoint(a,c,s.rotation,s.rotationCx,s.rotationCy),a=c.x,c=c.y);8==document.documentMode&&!mxClient.IS_EM?(a+=s.dx,c+=s.dy,"fill"!=n&&g==mxConstants.ALIGN_TOP&&(c-=1)):(a*=s.scale,c*=s.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline"; +l.style.left=this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=s.scale;var r=this.createElement("div");r.style.position="relative";r.style.display="inline";var u=mxUtils.getAlignmentAsPoint(e,g),t=u.x,u=u.y;b=this.createDiv(b,e,g,n);e=this.createElement("div");null!=q&&b.setAttribute("dir",q);if(k&&0v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var z=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(b.style.display="inline-block",e.style.display="inline-block",r.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);r=b;null!=r.firstChild&&"DIV"==r.firstChild.nodeName&&(r=r.firstChild);v=r.offsetWidth+3;r=r.offsetHeight;m?(f=Math.min(f,v), +r=Math.min(r,d)):f=v;k&&(b.style.width=f+"px");if(mxClient.IS_QUIRKS&&(m||"width"==n)&&r>d)r=d,b.style.height=r+"px";d=r;m=(d-d*g+f*-z)/2-q*f*(t+0.5)+p*d*(u+0.5);k=(f-f*g+d*-z)/2+p*f*(t+0.5)+q*d*(u+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(n=this.createElement("div"),n.style.display="inline-block",n.style.position="absolute",n.style.left=this.format(a+(k-f/2)*s.scale)+"px",n.style.top=this.format(c+(m-d/2)*s.scale)+"px",l.parentNode.appendChild(n),n.appendChild(l)):(s=8==document.documentMode&& +!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-f/2)*s)+"px",l.style.top=this.format(c+(m-d/2)*s)+"px");e.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+q+", M21\x3d"+-q+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";e.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(e.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");e.appendChild(b);b.style.position="";b.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(b.style.verticalAlign= +"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=b.parentNode,b.style.visibility="hidden",document.body.appendChild(b),f=b.offsetWidth,r=b.offsetHeight,mxClient.IS_QUIRKS&&m&&r>d&&(r=d,b.style.height=r+"px"),d=r,b.style.visibility="",s.appendChild(b),l.style.left=this.format(a+f*t*this.state.scale)+"px",l.style.top=this.format(c+d*u*this.state.scale)+"px"):(1>this.state.alpha&&(b.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),r.style.left=100*t+ +"%",r.style.top=100*u+"%")}else this.plainText(a,c,f,d,mxUtils.htmlEntities(b,!1),e,g,k,l,n,m,p,q)}}; +mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,n,m,p,q){k=this.state;a=(a+k.dx)*k.scale;c=(c+k.dy)*k.scale;f=this.createVmlElement("shape");f.style.width="1px";f.style.height="1px";f.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.alpha+"%";f.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);f.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText= "v-text-align:"+e;d.style.align=e;d.style.fontFamily=k.fontFamily;d.string=b;d.on="true";e=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=e+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");b=b.split("\n");k=e+(b.length-1)*e*mxConstants.LINE_HEIGHT;e=b=0; g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=p*(Math.PI/180),b=Math.sin(g)*e,e*=Math.cos(g));f.appendChild(d);f.style.left=this.format(a-b)+"px";f.style.top=this.format(c+e)+"px";this.root.appendChild(f)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)}; function mxGuide(a,c){this.graph=a;this.setStates(c)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2}; mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a}; -mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=this.graph.getView().translate,b=this.graph.getView().scale,e=c.x,g=c.y,k=!1,l=null,n=null,m=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,u=s,s=a.clone();s.x+=c.x;s.y+=c.y;var t=s.x,v=s.x+s.width,z=s.getCenterX(),y=s.y,x=s.y+s.height,D=s.getCenterY();c=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-z)n&&(n+=2*Math.PI);n%=Math.PI;n>Math.PI/2&&(n=Math.PI-n);var k=Math.cos(n),m=Math.sin(-n),c=l*-(c+0.5),p=g*-(f+0.5),r=(g-g*k+l*m)/2+e*c-b*p;0!=n&&(f="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+b+", M12\x3d"+e+", M21\x3d"+-e+", M22\x3d"+b+", sizingMethod\x3d'auto expand')",a.filter=null!=a.filter&&0n&&(n+=2*Math.PI);n%=Math.PI;n>Math.PI/2&&(n=Math.PI-n);var k=Math.cos(n),m=Math.sin(-n),c=l*-(c+0.5),p=g*-(f+0.5),q=(g-g*k+l*m)/2+e*c-b*p;0!=n&&(f="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+b+", M12\x3d"+e+", M21\x3d"+-e+", M22\x3d"+b+", sizingMethod\x3d'auto expand')",a.filter=null!=a.filter&&0c)break;k=f}e=b.getIndex(a);e=Math.max(0,g-(g>e?1:0));d.add(b,a,e)}}; mxStackLayout.prototype.getParentSize=function(a){var c=this.graph.getModel(),f=c.getGeometry(a);if(null!=this.graph.container&&(null==f&&c.isLayer(a)||a==this.graph.getView().currentRoot))f=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return f}; mxStackLayout.prototype.execute=function(a){if(null!=a){var c=this.getParentSize(a),f=this.isHorizontal(),d=this.graph.getModel(),b=null;null!=c&&(b=f?c.height-this.marginTop-this.marginBottom:c.width-this.marginLeft-this.marginRight);var b=b-(2*this.spacing+2*this.border),e=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k, -mxConstants.STYLE_HORIZONTAL,!0);null!=c&&(l=k?Math.min(l,c.height):Math.min(l,c.width));f==k&&(b-=l);k?g+=l:e+=l}d.beginUpdate();try{for(var l=0,k=null,n=0,m=null,p=d.getChildCount(a),r=0;rthis.wrap||!f&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,f?g+=l+this.spacing:e+=l+this.spacing,l= -0;var l=Math.max(l,f?q.height:q.width),u=0;if(!this.borderCollapse)var t=this.graph.getCellStyle(s),u=mxUtils.getNumber(t,mxConstants.STYLE_STROKEWIDTH,1);null!=k?f?q.x=n+this.spacing+Math.floor(u/2):q.y=n+this.spacing+Math.floor(u/2):this.keepFirstLocation||(f?q.x=e:q.y=g);f?q.y=g:q.x=e;this.fill&&null!=b&&(f?q.height=b:q.width=b);this.setChildGeometry(s,q);m=s;k=q;n=f?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}}this.resizeParent&&null!=c&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a, +mxConstants.STYLE_HORIZONTAL,!0);null!=c&&(l=k?Math.min(l,c.height):Math.min(l,c.width));f==k&&(b-=l);k?g+=l:e+=l}d.beginUpdate();try{for(var l=0,k=null,n=0,m=null,p=d.getChildCount(a),q=0;qthis.wrap||!f&&k.y+k.height+r.height+2*this.spacing>this.wrap))k=null,f?g+=l+this.spacing:e+=l+this.spacing,l= +0;var l=Math.max(l,f?r.height:r.width),u=0;if(!this.borderCollapse)var t=this.graph.getCellStyle(s),u=mxUtils.getNumber(t,mxConstants.STYLE_STROKEWIDTH,1);null!=k?f?r.x=n+this.spacing+Math.floor(u/2):r.y=n+this.spacing+Math.floor(u/2):this.keepFirstLocation||(f?r.x=e:r.y=g);f?r.y=g:r.x=e;this.fill&&null!=b&&(f?r.height=b:r.width=b);this.setChildGeometry(s,r);m=s;k=r;n=f?k.x+k.width+Math.floor(u/2):k.y+k.height+Math.floor(u/2)}}}this.resizeParent&&null!=c&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a, c,k):this.resizeLast&&null!=c&&(null!=k&&null!=m)&&(f?k.width=c.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=c.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(m,k))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,c){var f=this.graph.getCellGeometry(a);(null==f||c.x!=f.x||c.y!=f.y||c.width!=f.width||c.height!=f.height)&&this.graph.getModel().setGeometry(a,c)}; mxStackLayout.prototype.updateParentGeometry=function(a,c,f){var d=this.isHorizontal(),b=this.graph.getModel(),e=c.clone();d?(f=f.x+f.width+this.spacing+this.marginRight,e.width=this.resizeParentMax?Math.max(e.width,f):f):(f=f.y+f.height+this.spacing+this.marginBottom,e.height=this.resizeParentMax?Math.max(e.height,f):f);(c.x!=e.x||c.y!=e.y||c.width!=e.width||c.height!=e.height)&&b.setGeometry(a,e)}; function mxPartitionLayout(a,c,f,d){mxGraphLayout.call(this,a);this.horizontal=null!=c?c:!0;this.spacing=f||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal}; @@ -785,7 +785,7 @@ mxCompactTreeLayout.prototype.apply=function(a,c){var f=this.graph.getModel(),d= mxCompactTreeLayout.prototype.createLine=function(a,c,f){var d={};d.dx=a;d.dy=c;d.next=f;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],c;for(c in this.parentsChanged)a.push(this.parentsChanged[c]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding,this.groupPaddingTop,this.groupPaddingRight,this.groupPaddingBottom,this.groupPaddingLeft)}; mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next}; mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var c=a.child,f=a.cell,d=0,b=[];null!=c;){d++;var e=c.x;this.horizontal&&(e=c.y);b.push(new WeightedCellSorter(c,e));c=c.next}b.sort(WeightedCellSorter.prototype.compare);var e=a.width,g=(d+1)*this.prefHozEdgeSep;e>g+2*this.prefHozEdgeSep&&(e-=2*this.prefHozEdgeSep);a=e/d;c=a/2;e>g+2*this.prefHozEdgeSep&&(c+=this.prefHozEdgeSep);for(var e=this.minEdgeJetty-this.prefVertEdgeOff,g=0,k=this.getVertexBounds(f),l=0;ld/2&&(e-=this.prefVertEdgeOff);c+=a;g=Math.max(g,e)}}; +b[l].cell.cell,m=this.getVertexBounds(n),n=this.graph.getEdgesBetween(f,n,!1),p=[],q=0,s=0,r=0;rd/2&&(e-=this.prefVertEdgeOff);c+=a;g=Math.max(g,e)}}; function WeightedCellSorter(a,c){this.cell=a;this.weightedValue=c}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,c){return null!=a&&null!=c?c.weightedValue>a.weightedValue?1:c.weightedValuethis.forceConstant&&(this.forceConstant= -0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;dc&&(c=0.001);var f=this.dispX[a]/c*Math.min(c,this.temperature),c=this.dispY[a]/c*Math.min(c,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=f;this.cellLocation[a][1]+=c}}; mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a>1,++b[l]}return f}; -mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;em&&(m=l);k[m]=n}for(var p=null,r=null,s=null,q=null,u=null,t=null,v=null,z=null,l=0;lu[A]&&x++,s[y]t[A]&&x++,q[y]d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;em&&(m=l);k[m]=n}for(var p=null,q=null,s=null,r=null,u=null,t=null,v=null,z=null,l=0;lu[A]&&x++,s[y]t[A]&&x++,r[y]a.medianValue?-1:c.medianValuet+1&&(n==d[l].length-1?(b.setGeneralPurposeVariable(l,v),p=!0):(n=d[l][n+1],t=n.getGeneralPurposeVariable(l),t=t-n.width/2-this.intraCellSpacing-b.width/2,t>v?(b.setGeneralPurposeVariable(l, +mxCoordinateAssignment.prototype.minNode=function(a){for(var c=[],f=new mxDictionary,d=[],b=0;b<=a.maxRank;b++){d[b]=a.ranks[b];for(var e=0;et+1&&(n==d[l].length-1?(b.setGeneralPurposeVariable(l,v),p=!0):(n=d[l][n+1],t=n.getGeneralPurposeVariable(l),t=t-n.width/2-this.intraCellSpacing-b.width/2,t>v?(b.setGeneralPurposeVariable(l, v),p=!0):t>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,t),p=!0)));if(p){for(b=0;b=k&&l<=r?g.setGeneralPurposeVariable(a,l):lr&&(g.setGeneralPurposeVariable(a,r),this.currentXDelta+=l-r);d[e].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,c){for(var f=0,d=0;d=k&&l<=q?g.setGeneralPurposeVariable(a,l):lq&&(g.setGeneralPurposeVariable(a,q),this.currentXDelta+=l-q);d[e].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,c){for(var f=0,d=0;dthis.widestRankValue&&(this.widestRankValue=k,this.widestRank=b);this.rankWidths[b]=k}!0==l&&mxLog.warn("At least one cell has no bounds");this.rankY[b]=f;k=e/2+d/2+this.interRankCellSpacing;d=e;f=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?f+k:f- k;for(n=0;nb.maxRank-b.minRank-1)){for(var e=b.getGeneralPurposeVariable(b.minRank+1),g=!0,k=0,l=b.minRank+2;lb.minRank+1;l--)r=b.getX(l-1),p==r?(m[l-b.minRank-2]=p,g++):this.repositionValid(c,b,l-1,p)?(m[l-b.minRank-2]=p,g++):(m[l-b.minRank-2]=b.getX(l-1),p=r);if(g>k||e>k)if(g>=e)for(l=b.maxRank-2;l>b.minRank;l--)b.setX(l,m[l-b.minRank-1]);else if(e>g)for(l=b.minRank+2;lb.maxRank-b.minRank-1)){for(var e=b.getGeneralPurposeVariable(b.minRank+1),g=!0,k=0,l=b.minRank+2;lb.minRank+1;l--)q=b.getX(l-1),p==q?(m[l-b.minRank-2]=p,g++):this.repositionValid(c,b,l-1,p)?(m[l-b.minRank-2]=p,g++):(m[l-b.minRank-2]=b.getX(l-1),p=q);if(g>k||e>k)if(g>=e)for(l=b.maxRank-2;l>b.minRank;l--)b.setX(l,m[l-b.minRank-1]);else if(e>g)for(l=b.minRank+2;lb)return!1;e=c.getGeneralPurposeVariable(f);if(de){if(b==a.length-1)return!0;a=a[b+1];f=a.getGeneralPurposeVariable(f);f=f-a.width/2-this.intraCellSpacing-c.width/2;if(!(f>=d))return!1}return!0}; mxCoordinateAssignment.prototype.setCellLocations=function(a,c){this.rankTopY=[];this.rankBottomY=[];for(var f=0;fk;k++){if(-1(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-m)/e;m+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(n=r=0;ne/2&&(p-=this.prefVertEdgeOff);for(u=0;uk;k++){if(-1(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-m)/e;m+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(n=q=0;ne/2&&(p-=this.prefVertEdgeOff);for(u=0;ua.weightedValue?-1:c.weightedValuee&&(e=l,b=k)}}0==f.length&&null!=b&&f.push(b)}return f}; +mxSwimlaneLayout.prototype.findRoots=function(a,c){var f=[];if(null!=a&&null!=c){var d=this.graph.model,b=null,e=-1E5,g;for(g in c){var k=c[g];if(null!=k&&d.isVertex(k)&&this.graph.isCellVisible(k)&&d.isAncestor(a,k)){for(var l=this.getEdges(k),n=0,m=0,p=0;pe&&(e=l,b=k)}}0==f.length&&null!=b&&f.push(b)}return f}; mxSwimlaneLayout.prototype.getEdges=function(a){var c=this.edgesCache.get(a);if(null!=c)return c;for(var f=this.graph.model,c=[],d=this.graph.isCellCollapsed(a),b=f.getChildCount(a),e=0;e=this.swimlanes.length)&&(r>k||(!c||p)&&r==k))b= -this.traverse(m,c,n[f],d,b,e,g,r)}}else if(null==b[l])for(f=0;f=this.swimlanes.length)&&(q>k||(!c||p)&&q==k))b= +this.traverse(m,c,n[f],d,b,e,g,q)}}else if(null==b[l])for(f=0;f=a.x&&f.x<=a.x+a.width?g.x=f.x:f.y>=a.y&&f.y<=a.y+a.height&&(g.y=f.y),f.xa.x+a.width&&(g.x=a.x+a.width),f.ya.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,c,f,d){var b=a.x,e=a.y,g=a.width/2,k=a.height/2,l=b+g,n=e+k;c=f.x;f=f.y;var m=parseInt(c-l),p=parseInt(f-n);if(0==m&&0!=p)return new mxPoint(l, n+k*p/Math.abs(p));if(0==m&&0==p)return new mxPoint(c,f);if(d){if(f>=e&&f<=e+a.height)return a=f-n,a=Math.sqrt(g*g*(1-a*a/(k*k)))||0,c<=b&&(a=-a),new mxPoint(l+a,f);if(c>=b&&c<=b+a.width)return a=c-l,a=Math.sqrt(k*k*(1-a*a/(g*g)))||0,f<=e&&(a=-a),new mxPoint(c,n+a)}b=p/m;n-=b*l;e=g*g*b*b+k*k;a=-2*l*e;k=Math.sqrt(a*a-4*e*(g*g*b*b*l*l+k*k*l*l-g*g*k*k));g=(-a+k)/(2*e);k=(-a-k)/(2*e);l=b*g+n;n=b*k+n;b=Math.sqrt(Math.pow(g-c,2)+Math.pow(l-f,2));c=Math.sqrt(Math.pow(k-c,2)+Math.pow(n-f,2));e=f=0;bf?new mxPoint(g,b):new mxPoint(g,b+a);if(k==f)return g>l?new mxPoint(c,k):new mxPoint(c+e,k);var n=g,m=k;d&&(l>=c&&l<=c+e?n=l:f>=b&&f<=b+a&&(m=f));return l-u&&sMath.PI-u,u=null;q?u=d&&(b&&f.x>=m.x&&f.x<=r.x||!b&&f.y>=m.y&&f.y<=r.y)?b?new mxPoint(f.x,m.y):new mxPoint(m.x,f.y):c==mxConstants.DIRECTION_NORTH?new mxPoint(e+k/2+a*Math.tan(s)/2,g+a):c==mxConstants.DIRECTION_SOUTH?new mxPoint(e+k/2-a*Math.tan(s)/2,g):c==mxConstants.DIRECTION_WEST?new mxPoint(e+k,g+a/2+k*Math.tan(s)/2):new mxPoint(e, -g+a/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,n),f.y>=g&&f.y<=g+a?(d.x=b?l:c==mxConstants.DIRECTION_WEST?e+k:e,d.y=f.y):f.x>=e&&f.x<=e+k&&(d.x=f.x,d.y=!b?n:c==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,n=d.y),u=b&&f.x<=e+k/2||!b&&f.y<=g+a/2?mxUtils.intersection(f.x,f.y,l,n,m.x,m.y,p.x,p.y):mxUtils.intersection(f.x,f.y,l,n,p.x,p.y,r.x,r.y));null==u&&(u=new mxPoint(l,n));return u},HexagonPerimeter:function(a,c,f,d){var b=a.x,e=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var n=f.x,m=f.y,p= --Math.atan2(m-a,n-l),r=Math.PI,s=Math.PI/2,q=new mxPoint(l,a);c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var u=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH;c=new mxPoint;q=new mxPoint;if(ne+k||n>b+g&&mb+g&&m>e+k)d=!1;if(d){if(u){if(n==l){if(m<=e)return new mxPoint(l,e);if(m>=e+k)return new mxPoint(l,e+k)}else if(nb+g){if(m==e+k/4)return new mxPoint(b+g,e+k/4);if(m==e+3*k/4)return new mxPoint(b+g,e+3*k/4)}else if(n==b){if(ma)return new mxPoint(b,e+3*k/4)}else if(n==b+g){if(ma)return new mxPoint(b+g,e+3*k/4)}if(m==e)return new mxPoint(l,e);if(m==e+k)return new mxPoint(l,e+k);ne+k/4&&me+3*k/4&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+g,e+Math.floor(1.25*k))):n>l&&(m>e+k/4&&me+3*k/4&&(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b,e+Math.floor(1.25*k))))}else{if(m==a){if(n<=b)return new mxPoint(b,e+k/2);if(n>=b+g)return new mxPoint(b+g,e+k/ -2)}else if(me+k){if(n==b+g/4)return new mxPoint(b+g/4,e+k);if(n==b+3*g/4)return new mxPoint(b+3*g/4,e+k)}else if(m==e){if(nl)return new mxPoint(b+3*g/4,e)}else if(m==e+k){if(na)return new mxPoint(b+3*g/4,e+k)}if(n==b)return new mxPoint(b,a);if(n==b+g)return new mxPoint(b+g,a);mb+g/4&&nb+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e-Math.floor(0.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e+k)):m>a&&(n>b+g/4&&nb+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e)))}d= -l;p=a;n>=b&&n<=b+g?(d=n,p=m=e&&m<=e+k&&(p=m,d=n-n?(c=new mxPoint(b+g,e), -q=new mxPoint(b+g,e+k)):p>n&&ps&&pr-n&&p<=r||p<-r+n&&p>=-r?(c=new mxPoint(b,e),q=new mxPoint(b,e+k)):p<-n&&p>-s?(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b,e+Math.floor(1.25*k))):p<-s&&p>-r+n&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+g,e+ -Math.floor(1.25*k)))}else{n=Math.atan2(k/2,g/4);if(p==n)return new mxPoint(b+Math.floor(0.75*g),e);if(p==r-n)return new mxPoint(b+Math.floor(0.25*g),e);if(p==r||p==-r)return new mxPoint(b,e+Math.floor(0.5*k));if(0==p)return new mxPoint(b+g,e+Math.floor(0.5*k));if(p==-n)return new mxPoint(b+Math.floor(0.75*g),e+k);if(p==-r+n)return new mxPoint(b+Math.floor(0.25*g),e+k);0n&&pr-n&&pp&&p>-n?(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e)):p<-n&&p>-r+n?(c=new mxPoint(b,e+k),q=new mxPoint(b+g,e+k)):p<-r+n&&p>-r&&(c=new mxPoint(b-Math.floor(0.25*g),e),q=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)))}q=mxUtils.intersection(l,a,f.x,f.y,c.x,c.y,q.x,q.y)}return null==q?new mxPoint(l,a):q}}; +c,f,d){c=null!=c?c.style[mxConstants.STYLE_DIRECTION]:null;var b=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH,e=a.x,g=a.y,k=a.width;a=a.height;var l=e+k/2,n=g+a/2,m=new mxPoint(e,g),p=new mxPoint(e+k,n),q=new mxPoint(e,g+a);c==mxConstants.DIRECTION_NORTH?(m=q,p=new mxPoint(l,g),q=new mxPoint(e+k,g+a)):c==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(l,g+a),q=new mxPoint(e+k,g)):c==mxConstants.DIRECTION_WEST&&(m=new mxPoint(e+k,g),p=new mxPoint(e,n),q=new mxPoint(e+k,g+a));var s=f.x- +l,r=f.y-n,s=b?Math.atan2(s,r):Math.atan2(r,s),u=b?Math.atan2(k,a):Math.atan2(a,k),r=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_WEST?s>-u&&sMath.PI-u,u=null;r?u=d&&(b&&f.x>=m.x&&f.x<=q.x||!b&&f.y>=m.y&&f.y<=q.y)?b?new mxPoint(f.x,m.y):new mxPoint(m.x,f.y):c==mxConstants.DIRECTION_NORTH?new mxPoint(e+k/2+a*Math.tan(s)/2,g+a):c==mxConstants.DIRECTION_SOUTH?new mxPoint(e+k/2-a*Math.tan(s)/2,g):c==mxConstants.DIRECTION_WEST?new mxPoint(e+k,g+a/2+k*Math.tan(s)/2):new mxPoint(e, +g+a/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,n),f.y>=g&&f.y<=g+a?(d.x=b?l:c==mxConstants.DIRECTION_WEST?e+k:e,d.y=f.y):f.x>=e&&f.x<=e+k&&(d.x=f.x,d.y=!b?n:c==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,n=d.y),u=b&&f.x<=e+k/2||!b&&f.y<=g+a/2?mxUtils.intersection(f.x,f.y,l,n,m.x,m.y,p.x,p.y):mxUtils.intersection(f.x,f.y,l,n,p.x,p.y,q.x,q.y));null==u&&(u=new mxPoint(l,n));return u},HexagonPerimeter:function(a,c,f,d){var b=a.x,e=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var n=f.x,m=f.y,p= +-Math.atan2(m-a,n-l),q=Math.PI,s=Math.PI/2,r=new mxPoint(l,a);c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var u=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH;c=new mxPoint;r=new mxPoint;if(ne+k||n>b+g&&mb+g&&m>e+k)d=!1;if(d){if(u){if(n==l){if(m<=e)return new mxPoint(l,e);if(m>=e+k)return new mxPoint(l,e+k)}else if(nb+g){if(m==e+k/4)return new mxPoint(b+g,e+k/4);if(m==e+3*k/4)return new mxPoint(b+g,e+3*k/4)}else if(n==b){if(ma)return new mxPoint(b,e+3*k/4)}else if(n==b+g){if(ma)return new mxPoint(b+g,e+3*k/4)}if(m==e)return new mxPoint(l,e);if(m==e+k)return new mxPoint(l,e+k);ne+k/4&&me+3*k/4&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),r=new mxPoint(b+g,e+Math.floor(1.25*k))):n>l&&(m>e+k/4&&me+3*k/4&&(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),r=new mxPoint(b,e+Math.floor(1.25*k))))}else{if(m==a){if(n<=b)return new mxPoint(b,e+k/2);if(n>=b+g)return new mxPoint(b+g,e+k/ +2)}else if(me+k){if(n==b+g/4)return new mxPoint(b+g/4,e+k);if(n==b+3*g/4)return new mxPoint(b+3*g/4,e+k)}else if(m==e){if(nl)return new mxPoint(b+3*g/4,e)}else if(m==e+k){if(na)return new mxPoint(b+3*g/4,e+k)}if(n==b)return new mxPoint(b,a);if(n==b+g)return new mxPoint(b+g,a);mb+g/4&&nb+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e-Math.floor(0.5*k)),r=new mxPoint(b+Math.floor(1.25*g),e+k)):m>a&&(n>b+g/4&&nb+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),r=new mxPoint(b+Math.floor(1.25*g),e)))}d= +l;p=a;n>=b&&n<=b+g?(d=n,p=m=e&&m<=e+k&&(p=m,d=n-n?(c=new mxPoint(b+g,e), +r=new mxPoint(b+g,e+k)):p>n&&ps&&pq-n&&p<=q||p<-q+n&&p>=-q?(c=new mxPoint(b,e),r=new mxPoint(b,e+k)):p<-n&&p>-s?(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),r=new mxPoint(b,e+Math.floor(1.25*k))):p<-s&&p>-q+n&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),r=new mxPoint(b+g,e+ +Math.floor(1.25*k)))}else{n=Math.atan2(k/2,g/4);if(p==n)return new mxPoint(b+Math.floor(0.75*g),e);if(p==q-n)return new mxPoint(b+Math.floor(0.25*g),e);if(p==q||p==-q)return new mxPoint(b,e+Math.floor(0.5*k));if(0==p)return new mxPoint(b+g,e+Math.floor(0.5*k));if(p==-n)return new mxPoint(b+Math.floor(0.75*g),e+k);if(p==-q+n)return new mxPoint(b+Math.floor(0.25*g),e+k);0n&&pq-n&&pp&&p>-n?(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),r=new mxPoint(b+Math.floor(1.25*g),e)):p<-n&&p>-q+n?(c=new mxPoint(b,e+k),r=new mxPoint(b+g,e+k)):p<-q+n&&p>-q&&(c=new mxPoint(b-Math.floor(0.25*g),e),r=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)))}r=mxUtils.intersection(l,a,f.x,f.y,c.x,c.y,r.x,r.y)}return null==r?new mxPoint(l,a):r}}; function mxPrintPreview(a,c,f,d,b,e,g,k,l){this.graph=a;this.scale=null!=c?c:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=f?f:a.pageFormat;this.title=null!=k?k:"Printer-friendly version";this.x0=null!=b?b:0;this.y0=null!=e?e:0;this.borderColor=g;this.pageSelector=null!=l?l:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.marginTop=0; mxPrintPreview.prototype.marginBottom=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printControls=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.backgroundColor="#ffffff";mxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null; mxPrintPreview.prototype.targetWindow=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.clipping=!0;mxPrintPreview.prototype.getWindow=function(){return this.wnd}; mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d5"\x3e':8==document.documentMode?a='\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d8"\x3e':8m,k=e.xn;else l=Math.max(c.x,f.x),n=Math.min(c.x+c.width c.x=k.x,c.y=k.y);null!=g&&(f=new mxCellState,f.x=g.x,f.y=g.y);null!=c&&null!=f&&(a=Math.max(c.x,f.x),k=Math.min(c.x+c.width,f.x+f.width),a=null!=d?d.x:Math.round(k+(a-k)/2),k=e.getRoutingCenterY(c),e=e.getRoutingCenterY(f),null!=d&&(d.y>=c.y&&d.y<=c.y+c.height&&(k=d.y),d.y>=f.y&&d.y<=f.y+f.height&&(e=d.y)),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),!mxUtils.contains(f,a,e)&&!mxUtils.contains(c,a,e)&&b.push(new mxPoint(a,e)),1==b.length&&(null!=d?!mxUtils.contains(f, a,d.y)&&!mxUtils.contains(c,a,d.y)&&b.push(new mxPoint(a,d.y)):(e=Math.max(c.y,f.y),c=Math.min(c.y+c.height,f.y+f.height),b.push(new mxPoint(a,e+(c-e)/2)))))},TopToBottom:function(a,c,f,d,b){var e=a.view;d=null!=d&&0=c.x&&d.x<=c.x+c.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),a=null!=d&&d.x>=f.x&&d.x<=f.x+f.width?d.x:e.getRoutingCenterX(f),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),1==b.length&&(null!=d&&1==b.length?!mxUtils.contains(f,d.x,k)&&!mxUtils.contains(c,d.x,k)&&b.push(new mxPoint(d.x,k)):(e=Math.max(c.x,f.x),c=Math.min(c.x+c.width,f.x+f.width),b.push(new mxPoint(e+(c-e)/ -2,k)))))},SegmentConnector:function(a,c,f,d,b){function e(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)b.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0s;s++){var y=null!=t&&t.x==v.x,x=null!=t&&t.y==v.y,D=null!=u&&v.y>=u.y&& -v.y<=u.y+u.height,u=null!=u&&v.x>=u.x&&v.x<=u.x+u.width,v=x||null==t&&D,z=y||null==t&&u;if(!(0==s&&(v&&z||y&&x))){if(null!=t&&!x&&!y&&(D||u)){n=D?!1:!0;break}if(z||v){n=v;1==s&&(n=0==d.length%2?v:z);break}}u=f;t=g[r];null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),u=null);v=d[d.length-1];y&&x&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=c&&(m.yc.y+c.height))?e(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=c&&(m.xc.x+c.width))&&e(new mxPoint(m.x, -p.y));n?p.y=m.y:p.x=m.x;for(s=0;sf.y+f.height))?e(new mxPoint(p.x,m.y)):!n&&(null!=g[r]&&g[r].x!=m.x||null==g[r]&&null!=f&&(m.xf.x+f.width))&&e(new mxPoint(m.x,p.y))));if(null==g[0]&&null!=c)for(;1< -b.length&&null!=b[1]&&mxUtils.contains(c,b[1].x,b[1].y);)b.splice(1,1);if(null==g[r]&&null!=f)for(;1=k||Math.abs(l.y-a.y)>=k)b.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0s;s++){var y=null!=t&&t.x==v.x,x=null!=t&&t.y==v.y,D=null!=u&&v.y>=u.y&& +v.y<=u.y+u.height,u=null!=u&&v.x>=u.x&&v.x<=u.x+u.width,v=x||null==t&&D,z=y||null==t&&u;if(!(0==s&&(v&&z||y&&x))){if(null!=t&&!x&&!y&&(D||u)){n=D?!1:!0;break}if(z||v){n=v;1==s&&(n=0==d.length%2?v:z);break}}u=f;t=g[q];null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),u=null);v=d[d.length-1];y&&x&&(d=d.slice(1))}n&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=c&&(m.yc.y+c.height))?e(new mxPoint(p.x,m.y)):!n&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=c&&(m.xc.x+c.width))&&e(new mxPoint(m.x, +p.y));n?p.y=m.y:p.x=m.x;for(s=0;sf.y+f.height))?e(new mxPoint(p.x,m.y)):!n&&(null!=g[q]&&g[q].x!=m.x||null==g[q]&&null!=f&&(m.xf.x+f.width))&&e(new mxPoint(m.x,p.y))));if(null==g[0]&&null!=c)for(;1< +b.length&&null!=b[1]&&mxUtils.contains(c,b[1].x,b[1].y);)b.splice(1,1);if(null==g[q]&&null!=f)for(;1 +p,q,s),x),m=x.x,p=x.y,q=x.width,s=x.height));null!=f&&(d[1]=mxUtils.getPortConstraints(f,a,!1,mxConstants.DIRECTION_MASK_ALL),x=mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0),0!=x&&(x=mxUtils.getBoundingBox(new mxRectangle(r,u,t,v),x),r=x.x,u=x.y,t=x.width,v=x.height));m=Math.round(10*m)/10;p=Math.round(10*p)/10;q=Math.round(10*q)/10;s=Math.round(10*s)/10;r=Math.round(10*r)/10;u=Math.round(10*u)/10;t=Math.round(10*t)/10;v=Math.round(10*v)/10;a=[0,0];m=[[m,p,q,s],[r,u,t,v]];z=[e,z];for(x=0;2> x;x++)mxEdgeStyle.limits[x][1]=m[x][0]-z[x],mxEdgeStyle.limits[x][2]=m[x][1]-z[x],mxEdgeStyle.limits[x][4]=m[x][0]+m[x][2]+z[x],mxEdgeStyle.limits[x][8]=m[x][1]+m[x][3]+z[x];z=m[0][1]+m[0][3]/2;p=m[1][1]+m[1][3]/2;x=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);D=z-p;z=0;0>x?z=0>D?2:1:0>=D&&(z=3,0==x&&(z=2));p=null;null!=c&&(p=l);c=[[0.5,0.5],[0.5,0.5]];for(x=0;2>x;x++)null!=p&&(c[x][0]=(p.x-m[x][0])/m[x][2],1>=Math.abs(p.x-m[x][0])?a[x]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-m[x][0]-m[x][2])&&(a[x]= -mxConstants.DIRECTION_MASK_EAST),c[x][1]=(p.y-m[x][1])/m[x][3],1>=Math.abs(p.y-m[x][1])?a[x]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-m[x][1]-m[x][3])&&(a[x]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=n);x=m[0][1]-(m[1][1]+m[1][3]);n=m[0][0]-(m[1][0]+m[1][2]);p=m[1][1]-(m[0][1]+m[0][3]);r=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(n-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]= -Math.max(r-y,0);y=[];f=[];l=[];f[0]=n>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=x>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);n=n>=r?n:r;p=x>=p?x:p;r=[[0,0],[0,0]];s=!1;for(x=0;2>x;x++)0==a[x]&&(0==(f[x]&d[x])&&(f[x]=mxUtils.reversePortConstraints(f[x])),0==(l[x]&d[x])&&(l[x]=mxUtils.reversePortConstraints(l[x])),r[x][0]=l[x],r[x][1]=f[x]);0x;x++)if(0==a[x]&&(0==(r[x][0]&d[x])&&(r[x][0]=r[x][1]),y[x]=r[x][0]&d[x],y[x]|=(r[x][1]&d[x])<<8,y[x]|=(r[1-x][x]&d[x])<<16,y[x]|=(r[1-x][1-x]&d[x])<<24,0==(y[x]&15)&&(y[x]<<=8),0==(y[x]&3840)&&(y[x]= +mxConstants.DIRECTION_MASK_EAST),c[x][1]=(p.y-m[x][1])/m[x][3],1>=Math.abs(p.y-m[x][1])?a[x]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-m[x][1]-m[x][3])&&(a[x]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=n);x=m[0][1]-(m[1][1]+m[1][3]);n=m[0][0]-(m[1][0]+m[1][2]);p=m[1][1]-(m[0][1]+m[0][3]);q=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(n-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]= +Math.max(q-y,0);y=[];f=[];l=[];f[0]=n>=q?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=x>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);n=n>=q?n:q;p=x>=p?x:p;q=[[0,0],[0,0]];s=!1;for(x=0;2>x;x++)0==a[x]&&(0==(f[x]&d[x])&&(f[x]=mxUtils.reversePortConstraints(f[x])),0==(l[x]&d[x])&&(l[x]=mxUtils.reversePortConstraints(l[x])),q[x][0]=l[x],q[x][1]=f[x]);0x;x++)if(0==a[x]&&(0==(q[x][0]&d[x])&&(q[x][0]=q[x][1]),y[x]=q[x][0]&d[x],y[x]|=(q[x][1]&d[x])<<8,y[x]|=(q[1-x][x]&d[x])<<16,y[x]|=(q[1-x][1-x]&d[x])<<24,0==(y[x]&15)&&(y[x]<<=8),0==(y[x]&3840)&&(y[x]= y[x]&15|y[x]>>8),0==(y[x]&983040)&&(y[x]=y[x]&65535|(y[x]&251658240)>>8),a[x]=y[x]&15,d[x]==mxConstants.DIRECTION_MASK_WEST||d[x]==mxConstants.DIRECTION_MASK_NORTH||d[x]==mxConstants.DIRECTION_MASK_EAST||d[x]==mxConstants.DIRECTION_MASK_SOUTH))a[x]=d[x];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=z;y-=z;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-= e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+e;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=e}e=0;f=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))? -0:1;for(x=0;x>5,p<<=z,15>=4),r=0<(d[x]&mxEdgeStyle.CENTER_MASK),(s||u)&&9>p?(s=s?0:1,q=r&&0==l?m[s][0]+c[s][0]*m[s][2]:r?m[s][1]+c[s][1]* -m[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[e][0])*n[0],0>5,p<<=z,15>=4),q=0<(d[x]&mxEdgeStyle.CENTER_MASK),(s||u)&&9>p?(s=s?0:1,r=q&&0==l?m[s][0]+c[s][0]*m[s][2]:q?m[s][1]+c[s][1]* +m[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(r-mxEdgeStyle.wayPoints1[e][0])*n[0],0b&&(b+=4);1>a&&(a+=4);c=routePatterns[b-1][a-1];if(0==f||0==d)null!=inlineRoutePatterns[b-1][a- 1]&&(c=inlineRoutePatterns[b-1][a-1]);return c}},mxStyleRegistry={values:[],putValue:function(a,c){mxStyleRegistry.values[a]=c},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var c in mxStyleRegistry.values)if(mxStyleRegistry.values[c]==a)return c;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation); mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter); @@ -1219,7 +1219,7 @@ mxGraphView.prototype.updateEdgeBounds=function(a){var c=a.absolutePoints,f=c[0] Math.max(1,n-k)}}; mxGraphView.prototype.getPoint=function(a,c){var f=a.getCenterX(),d=a.getCenterY();if(null!=a.segments&&(null==c||c.relative)){for(var b=a.absolutePoints.length,e=Math.round(((null!=c?c.x/2:0)+0.5)*a.length),g=a.segments[0],k=0,l=1;e>=Math.round(k+g)&&l=e?0:e*e/(a*a+n*n));a>b&&(a=b);b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,c,f));-1==mxUtils.relativeCcw(g.x,g.y,k.x,k.y,c,f)&&(b=-b);return new mxPoint(-2*((d/2-p-a)/d),b/this.scale)}}return new mxPoint}; mxGraphView.prototype.updateEdgeLabelOffset=function(a){var c=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=c&&0this.model.getChildCount(c)&&f--;this.model.add(c,a[k],f+k);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[k],!0);this.isExtendParentsOnAdd(a[k])&&this.isExtendParent(a[k])&&this.extendParent(a[k]);(null==g||g)&&this.constrainChild(a[k]);null!=d&&this.cellConnected(a[k],d,!0);null!=b&&this.cellConnected(a[k],b,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",c,"index",f,"source",d,"target", b,"absolute",e))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,c){if(null!=c?c:1)for(var f=this.model.getChildCount(a),d=0;d=a&&r.y+r.height<=l&&r.y>=c&&r.x+r.width<=k?e.push(p):this.getCells(a, +mxGraph.prototype.getCells=function(a,c,f,d,b,e){e=null!=e?e:[];if(0=a&&q.y+q.height<=l&&q.y>=c&&q.x+q.width<=k?e.push(p):this.getCells(a, c,f,d,p,e)}}}return e};mxGraph.prototype.getCellsBeyond=function(a,c,f,d,b){var e=[];if(d||b)if(null==f&&(f=this.getDefaultParent()),null!=f)for(var g=this.model.getChildCount(f),k=0;k=a)&&(!b||n.y>=c)&&e.push(l)}return e}; -mxGraph.prototype.findTreeRoots=function(a,c,f){c=null!=c?c:!1;f=null!=f?f:!1;var d=[];if(null!=a){for(var b=this.getModel(),e=b.getChildCount(a),g=null,k=0,l=0;lk&&(k=m,g=n)}}0==d.length&&null!=g&&d.push(g)}return d}; +mxGraph.prototype.findTreeRoots=function(a,c,f){c=null!=c?c:!1;f=null!=f?f:!1;var d=[];if(null!=a){for(var b=this.getModel(),e=b.getChildCount(a),g=null,k=0,l=0;lk&&(k=m,g=n)}}0==d.length&&null!=g&&d.push(g)}return d}; mxGraph.prototype.traverse=function(a,c,f,d,b){if(null!=f&&null!=a&&(c=null!=c?c:!0,b=b||new mxDictionary,!b.get(a)&&(b.put(a,!0),d=f(a,d),null==d||d)))if(d=this.model.getEdgeCount(a),0d&&(a+=f,b&&(a=this.graph.snap(a/e)*e));if(0==d||3==d||5==d)p+=c,b&&(p=this.graph.snap(p/e)*e);else if(2==d||4==d||7==d)r+=c,b&&(r=this.graph.snap(r/ -e)*e);b=r-p;f=s-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?b=f*k:f=b/k,0==d&&(p=r-b,a=s-f)));l&&(b+=b-n,f+=f-m,p+=q-(p+b/2),a+=u-(a+f/2));0>b&&(p+=b,b=Math.abs(b));0>f&&(a+=f,f=Math.abs(f));d=new mxRectangle(p+g.x*e,a+g.y*e,b,f);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*e+this.minBounds.width*e+Math.max(0,this.x0*e-d.x)),d.height=Math.max(d.height,this.minBounds.y*e+this.minBounds.height*e+Math.max(0,this.y0*e-d.y))); +mxVertexHandler.prototype.union=function(a,c,f,d,b,e,g,k,l){if(this.singleSizer)return d=a.x+a.width+c,g=a.y+a.height+f,b&&(d=this.graph.snap(d/e)*e,g=this.graph.snap(g/e)*e),e=new mxRectangle(a.x,a.y,0,0),e.add(new mxRectangle(d,g,0,0)),e;var n=a.width,m=a.height,p=a.x-g.x*e,q=p+n;a=a.y-g.y*e;var s=a+m,r=p+n/2,u=a+m/2;4d&&(a+=f,b&&(a=this.graph.snap(a/e)*e));if(0==d||3==d||5==d)p+=c,b&&(p=this.graph.snap(p/e)*e);else if(2==d||4==d||7==d)q+=c,b&&(q=this.graph.snap(q/ +e)*e);b=q-p;f=s-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?b=f*k:f=b/k,0==d&&(p=q-b,a=s-f)));l&&(b+=b-n,f+=f-m,p+=r-(p+b/2),a+=u-(a+f/2));0>b&&(p+=b,b=Math.abs(b));0>f&&(a+=f,f=Math.abs(f));d=new mxRectangle(p+g.x*e,a+g.y*e,b,f);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*e+this.minBounds.width*e+Math.max(0,this.x0*e-d.x)),d.height=Math.max(d.height,this.minBounds.y*e+this.minBounds.height*e+Math.max(0,this.y0*e-d.y))); return d};mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()}; mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;if(null!=this.sizers&&0this.minPageBreakDist)?Math.ceil(a/e.width)-1:0;b=b?Math.ceil(d/e.height)-1:0;a=q.x+a;d=q.y+d;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(a/e.width)-1:0;b=b?Math.ceil(d/e.height)-1:0;a=r.x+a;d=r.y+d;null==this.horizontalPageBreaks&&0mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),a.push(b));b=e}b=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;cmxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),a.push(b));b=e}b=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;cmxUtils.indexOf(z,q))&&d.setCellStyles(q,A,[k])}}}finally{d.getModel().endUpdate()}}; +l?l.split(";"):[],m=v.slice(),f=0;fmxUtils.indexOf(z,r))&&d.setCellStyles(r,A,[k])}}}finally{d.getModel().endUpdate()}}; d.addListener("cellsInserted",function(b,a){A(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){A(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,a){var d=[a.getProperty("cell")];a.getProperty("terminalInserted")&&d.push(a.getProperty("terminal"));A(d)});this.addListener("styleChanged",mxUtils.bind(this,function(b,a){var e=a.getProperty("cells"),c=!1,f=!1;if(0this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= (this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=c&&c(!1);if(null!=u&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container), d=a.container.offsetHeight/2-u.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/2-u.x+b.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,d){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var e=mxEvent.getSource(b);null!=e;){if(e==a.container){u= @@ -2133,17 +2133,17 @@ EditorUi.prototype.showImageDialog=function(a,c,f,d){d=this.editor.graph.cellEdi EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var c=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=c&&0R&&null!=l&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(N,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(N,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=m||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var n=b.model.isEdge(l.cell)?b.view.getPoint(l): new mxPoint(l.getCenterX(),l.getCenterY()),n=new mxRectangle(n.x-this.refreshTarget.width/2,n.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(n.x)+"px";B.style.top=Math.floor(n.y)+"px";null==E&&(b.container.appendChild(B),E=B.parentNode);g(a,c,n,B)}else null==v||!mxUtils.contains(v,a,c)||1500R&&R>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=u&&n){k=[G,F,y,x,D,A];for(n=0;nR&&R>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=u&&n){k=[G,F,y,x,D,A];for(n=0;nmxUtils.indexOf(b,c)){e=this.getTagsForStencil(a,c);var q=null!=k?k[c]:null;null!=q&&e.push(q);l.push(this.createVertexTemplateEntry("shape\x3d"+a+c.toLowerCase()+d,Math.round(f*g),Math.round(s*g),"",c.replace(/_/g," "),null,null,this.filterTags(e.join(" "))))}}),!0,!0);this.addPaletteFunctions(a,c,!1, +Sidebar.prototype.addStencilPalette=function(a,c,f,d,b,e,g,k){g=null!=g?g:1;if(this.addStencilsToIndex){var l=[];mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(a,c,e,f,s){if(null==b||0>mxUtils.indexOf(b,c)){e=this.getTagsForStencil(a,c);var r=null!=k?k[c]:null;null!=r&&e.push(r);l.push(this.createVertexTemplateEntry("shape\x3d"+a+c.toLowerCase()+d,Math.round(f*g),Math.round(s*g),"",c.replace(/_/g," "),null,null,this.filterTags(e.join(" "))))}}),!0,!0);this.addPaletteFunctions(a,c,!1, l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==d&&(d="");null!=e&&e.call(this,a);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(c,e,f,k,l){(null==b||0>mxUtils.indexOf(b,e))&&a.appendChild(this.createVertexTemplate("shape\x3d"+c+e.toLowerCase()+d,Math.round(k*g),Math.round(l*g),"",e.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)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0);mxConstants.SHADOW_OPACITY=0.25;mxConstants.SHADOWCOLOR="#000000"; @@ -2348,12 +2348,12 @@ a){l=e=g=k=null})})}this.cellRenderer.getLabelValue=function(b){var a=mxCellRend !0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,a){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var b=m.apply(this,arguments);if(this.graph.pageVisible){for(var a=[],d=this.graph.pageFormat,c=this.graph.pageScale,e=d.width*c,d=d.height* c,c=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;kmxUtils.indexOf(a,e)&&d.push(e)): -d.push(a[c])}return d};this.connectionHandler.createTargetVertex=function(b,a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(a),this.graph.model.isVertex(d)&&(a=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove= -function(){var b=this.currentState;q.apply(this,arguments);b!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var u=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3=b&&(u.y+u.height<=l&&u.y>=a&&u.x+u.width<=k)&&f.push(t);this.getAllCells(b,a,d,c,t,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:D.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style, +this.getLinkForCell(b))return"pointer"};this.selectRegion=function(b,a){var d=this.getAllCells(b.x,b.y,b.width,b.height);this.selectCellsForEvent(d,a);return d};this.getAllCells=function(b,a,d,c,e,f){f=null!=f?f:[];if(0=b&&(u.y+u.height<=l&&u.y>=a&&u.x+u.width<=k)&&f.push(t);this.getAllCells(b,a,d,c,t,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:D.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style, "locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),c=a.getProperty("cell"); null==c?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:f?"UTC":(String(a).match(b)||[""]).pop().replace(e,""),o:(0q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:f?"UTC":(String(a).match(b)||[""]).pop().replace(e,""),o:(0a&& @@ -2510,13 +2510,13 @@ function(b,a){return!(!this.graph.isSwimlane(b.cell)&&0e)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(e/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN}, -l=k(b-this.lastX)*d/f,k=k(a-this.lastY)*c/f,d=d/e,c=c/e,e=0;ee)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(e/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN}, +l=k(b-this.lastX)*d/f,k=k(a-this.lastY)*c/f,d=d/e,c=c/e,e=0;eMAX_AREA||0>=u.value?"red":"";t.style.backgroundColor=u.value*t.value>MAX_AREA||0>=t.value?"red":""}function d(){var a=Math.max(0,parseInt(v.value))+1,d=parseInt(u.value)/k,c=null;""!=s.value&&s.value!=mxConstants.NONE&&!q.checked&&(c=s.value);return b.getSvg(c, +0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(p));a.hideDialog()}catch(q){c=q}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});e.className="geBtn gePrimaryBtn";c.appendChild(e);a.editor.cancelFirst||c.appendChild(d);this.container=c},ExportDialog=function(a){function c(){var b=p.value,a=b.lastIndexOf(".");p.value=0MAX_AREA||0>=u.value?"red":"";t.style.backgroundColor=u.value*t.value>MAX_AREA||0>=t.value?"red":""}function d(){var a=Math.max(0,parseInt(v.value))+1,d=parseInt(u.value)/k,c=null;""!=s.value&&s.value!=mxConstants.NONE&&!r.checked&&(c=s.value);return b.getSvg(c, d,a)}var b=a.editor.graph,e=b.getGraphBounds(),g=b.view.scale,k=Math.ceil(e.width/g),l=Math.ceil(e.height/g),n,g=document.createElement("table"),m=document.createElement("tbody"),e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";n.style.width="100px";mxUtils.write(n,mxResources.get("filename")+":");e.appendChild(n);var p=document.createElement("input");p.setAttribute("value",a.editor.getOrCreateFilename());p.style.width="180px";n=document.createElement("td");n.appendChild(p); -e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("format")+":");e.appendChild(n);var r=document.createElement("select");r.style.width="180px";n=document.createElement("option");n.setAttribute("value","png");mxUtils.write(n,mxResources.get("formatPng"));r.appendChild(n);n=document.createElement("option");ExportDialog.showGifOption&&(n.setAttribute("value","gif"),mxUtils.write(n,mxResources.get("formatGif")), -r.appendChild(n));n=document.createElement("option");n.setAttribute("value","jpg");mxUtils.write(n,mxResources.get("formatJpg"));r.appendChild(n);n=document.createElement("option");n.setAttribute("value","pdf");mxUtils.write(n,mxResources.get("formatPdf"));r.appendChild(n);n=document.createElement("option");n.setAttribute("value","svg");mxUtils.write(n,mxResources.get("formatSvg"));r.appendChild(n);ExportDialog.showXmlOption&&(n=document.createElement("option"),n.setAttribute("value","xml"),mxUtils.write(n, -mxResources.get("formatXml")),r.appendChild(n));n=document.createElement("td");n.appendChild(r);e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("backgroundColor")+":");e.appendChild(n);var s=document.createElement("input");s.setAttribute("value",null==b.background||b.background==mxConstants.NONE?"#ffffff":b.background);s.style.width="80px";var q=document.createElement("input");q.setAttribute("type", -"checkbox");q.checked=null==b.background||b.background==mxConstants.NONE;n=document.createElement("td");n.appendChild(s);n.appendChild(q);mxUtils.write(n,mxResources.get("transparent"));e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("width")+":");e.appendChild(n);var u=document.createElement("input");u.setAttribute("value",k);u.style.width="180px";n=document.createElement("td");n.appendChild(u); +e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("format")+":");e.appendChild(n);var q=document.createElement("select");q.style.width="180px";n=document.createElement("option");n.setAttribute("value","png");mxUtils.write(n,mxResources.get("formatPng"));q.appendChild(n);n=document.createElement("option");ExportDialog.showGifOption&&(n.setAttribute("value","gif"),mxUtils.write(n,mxResources.get("formatGif")), +q.appendChild(n));n=document.createElement("option");n.setAttribute("value","jpg");mxUtils.write(n,mxResources.get("formatJpg"));q.appendChild(n);n=document.createElement("option");n.setAttribute("value","pdf");mxUtils.write(n,mxResources.get("formatPdf"));q.appendChild(n);n=document.createElement("option");n.setAttribute("value","svg");mxUtils.write(n,mxResources.get("formatSvg"));q.appendChild(n);ExportDialog.showXmlOption&&(n=document.createElement("option"),n.setAttribute("value","xml"),mxUtils.write(n, +mxResources.get("formatXml")),q.appendChild(n));n=document.createElement("td");n.appendChild(q);e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("backgroundColor")+":");e.appendChild(n);var s=document.createElement("input");s.setAttribute("value",null==b.background||b.background==mxConstants.NONE?"#ffffff":b.background);s.style.width="80px";var r=document.createElement("input");r.setAttribute("type", +"checkbox");r.checked=null==b.background||b.background==mxConstants.NONE;n=document.createElement("td");n.appendChild(s);n.appendChild(r);mxUtils.write(n,mxResources.get("transparent"));e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("width")+":");e.appendChild(n);var u=document.createElement("input");u.setAttribute("value",k);u.style.width="180px";n=document.createElement("td");n.appendChild(u); e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("height")+":");e.appendChild(n);var t=document.createElement("input");t.setAttribute("value",l);t.style.width="180px";n=document.createElement("td");n.appendChild(t);e.appendChild(n);m.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("borderWidth")+":");e.appendChild(n); -var v=document.createElement("input");v.setAttribute("value",k);v.style.width="180px";v.value="0";n=document.createElement("td");n.appendChild(v);e.appendChild(n);m.appendChild(e);g.appendChild(m);mxEvent.addListener(r,"change",c);c();mxEvent.addListener(u,"change",function(){t.value=0=parseInt(u.value)&&0>=parseInt(t.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=r.value,e=p.value;if("xml"==c)a.hideDialog(),ExportDialog.saveLocalFile(mxUtils.getXml(a.editor.getGraphXml()),e,c);else if("svg"==c){var f=mxUtils.getXml(d());f.length=parseInt(u.value)&&0>=parseInt(t.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=q.value,e=p.value;if("xml"==c)a.hideDialog(),ExportDialog.saveLocalFile(mxUtils.getXml(a.editor.getGraphXml()),e,c);else if("svg"==c){var f=mxUtils.getXml(d());f.lengthb&&(d= var d=mxUtils.getCurrentStyle(g.container);k.style.backgroundColor=d.backgroundColor;return a};l.init(k);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var m=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(b,a){for(var d=!1,c=mxEvent.getSource(b);null!= c;){if(c==l.outline.view.canvas.ownerSVGElement){d=!0;break}c=c.parentNode}d&&(a?m.funct():p.funct(),mxEvent.consume(b))})}},LayersWindow=function(a,c,f,d,b){function e(b){if(k.isEnabled()&&null!=b){var d=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&k.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(d.container,300,100,!0,!0);d.init()}}function g(){function b(a,d,c,f){var l=document.createElement("div"); l.className="geToolbarContainer";l.style.overflow="hidden";l.style.position="relative";l.style.padding="4px";l.style.height="22px";l.style.display="block";l.style.backgroundColor="whiteSmoke";l.style.borderWidth="0px 0px 1px 0px";l.style.borderColor="#c3c3c3";l.style.borderStyle="solid";l.style.whiteSpace="nowrap";var n=document.createElement("div");n.style.display="inline-block";n.style.width="100%";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxEvent.addListener(l,"dragover",function(b){b.dataTransfer.dropEffect= -"move";r=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"dragstart",function(b){p=l;mxClient.IS_FF&&b.dataTransfer.setData("Text","\x3clayer/\x3e")});mxEvent.addListener(l,"dragend",function(b){null!=p&&(k.addCell(c,k.model.root,r),r=p=null);b.stopPropagation();b.preventDefault()});var t=document.createElement("img");t.setAttribute("draggable","false");t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.padding="4px";t.setAttribute("title", +"move";q=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"dragstart",function(b){p=l;mxClient.IS_FF&&b.dataTransfer.setData("Text","\x3clayer/\x3e")});mxEvent.addListener(l,"dragend",function(b){null!=p&&(k.addCell(c,k.model.root,q),q=p=null);b.stopPropagation();b.preventDefault()});var t=document.createElement("img");t.setAttribute("draggable","false");t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.padding="4px";t.setAttribute("title", mxResources.get("lockUnlock"));var u=k.view.getState(c),v=null!=u?u.style:k.getCellStyle(c);"1"==mxUtils.getValue(v,"locked","0")?t.setAttribute("src",Dialog.prototype.lockedImage):t.setAttribute("src",Dialog.prototype.unlockedImage);mxEvent.addListener(t,"click",function(b){if(k.isEnabled()){var a=null;k.getModel().beginUpdate();try{a="1"==mxUtils.getValue(v,"locked","0")?null:"1",k.setCellStyles("locked",a,[c])}finally{k.getModel().endUpdate()}"1"==a&&k.removeSelectionCells(k.getModel().getDescendants(c)); mxEvent.consume(b)}});n.appendChild(t);t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));t.style.marginLeft="4px";t.style.marginRight="6px";t.style.marginTop="4px";n.appendChild(t);k.isEnabled()||t.setAttribute("disabled","disabled");k.model.isVisible(c)&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);mxEvent.addListener(t,"click",function(b){k.isEnabled()&&(k.model.setVisible(c, !k.model.isVisible(c)),mxEvent.consume(b))});mxUtils.write(n,d);l.appendChild(n);if(k.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)d=document.createElement("div"),d.style.display="block",d.style.textAlign="right",d.style.whiteSpace="nowrap",d.style.position="absolute",d.style.right="6px",d.style.top="6px",0b&&(d=Math.max(0,b-this.window.table.clientWidth));c+this.window.table.clientHeight>a&&(c=Math.max(0,a-this.window.table.clientHeight)); @@ -3140,9 +3140,9 @@ mxUtils.get(this.searchFileUrl,mxUtils.bind(this,function(b){b=b.getDocumentElem parseInt(b[a].getAttribute("w")),parseInt(b[a].getAttribute("h")),"",c.replace(/_/g," "),null,null,this.filterTags(e.join(" ")))}}}}}}))};"1"==urlParams.savesidebar&&(Sidebar.prototype.addFoldingHandler=function(b,a,d){var c=!1;if(!mxClient.IS_IE||8<=document.documentMode)b.style.backgroundImage="none"==a.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="0% 50%";var f=document.createElement("button");f.style.marginLeft= "4px";mxUtils.write(f,"Save");mxEvent.addListener(b,"click",mxUtils.bind(this,function(n){if("BUTTON"==mxEvent.getSource(n).nodeName){var m=b.cloneNode(!0);m.style.backgroundImage="";m.style.textDecoration="none";m.style.fontWeight="bold";m.style.fontSize="14px";m.style.color="rgb(80, 80, 80)";m.style.width="456px";m.style.backgroundColor="#ffffff";m.style.paddingLeft="6px";n=m.getElementsByTagName("button")[0];n.parentNode.removeChild(n);n=a.cloneNode(!0);n.style.backgroundColor="#ffffff";n.style.borderColor= "transparent";n.style.width="456px";m='\x3c!DOCTYPE html\x3e\x3chtml\x3e\x3chead\x3e\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"https://www.draw.io/styles/grapheditor.css"\x3e\x3c/head\x3e\x3cbody style\x3d"background:#ffffff;font-family:Helvetica,Arial;"\x3e'+m.outerHTML+n.outerHTML+"\x3c/body\x3e\x3c/html\x3e";n.style.position="absolute";window.document.body.appendChild(n);var p=n.clientHeight+18;n.parentNode.removeChild(n);(new mxXmlRequest(EXPORT_URL,"w\x3d456\x26h\x3d"+p+"\x26html\x3d"+ -encodeURIComponent(this.editorUi.editor.compress(m)))).simulate(document,"_blank")}else{if("none"==a.style.display){if(c)b.appendChild(f);else if(c=!0,null!=d){null!=f.parentNode&&f.parentNode.removeChild(f);b.style.cursor="wait";var r=b.innerHTML;b.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){d(a);b.style.cursor="";b.innerHTML=r;b.appendChild(f)},0)}else b.appendChild(f);b.style.backgroundImage="url('"+this.expandedImage+"')";a.style.display="block"}else b.style.backgroundImage= +encodeURIComponent(this.editorUi.editor.compress(m)))).simulate(document,"_blank")}else{if("none"==a.style.display){if(c)b.appendChild(f);else if(c=!0,null!=d){null!=f.parentNode&&f.parentNode.removeChild(f);b.style.cursor="wait";var q=b.innerHTML;b.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){d(a);b.style.cursor="";b.innerHTML=q;b.appendChild(f)},0)}else b.appendChild(f);b.style.backgroundImage="url('"+this.expandedImage+"')";a.style.display="block"}else b.style.backgroundImage= "url('"+this.collapsedImage+"')",a.style.display="none",null!=f.parentNode&&f.parentNode.removeChild(f);mxEvent.consume(n)}}))});Sidebar.prototype.extractShapeStyle=function(b){if(null!=b&&"shape\x3d"==b.substring(0,6)){var a=b.indexOf(";");0>a&&(a=b.length);return b.substring(6,a)}return null};var a=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(b,d,c){var f=a.apply(this,arguments);null!=this.shapetags&&(b=b.toLowerCase(),d=d.toLowerCase(),null!=this.shapetags[b]&& -f.push(this.shapetags[b]),d=b+"."+d,null!=this.shapetags[d]&&f.push(this.shapetags[d]));return f};Sidebar.prototype.initPalettes=function(){var b=GRAPH_IMAGE_PATH,a=STENCIL_PATH,d=this.signs,c=this.rack,f=this.pids,n=this.cisco,m=this.sysml,p=this.eip,r=this.gmdl;"1"==urlParams.createindex&&(mxLog.textarea.value="");this.addSearchPalette(!0);this.addGeneralPalette(!0);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addUmlPalette(!1);this.addErPalette();this.addBasicPalette();this.addFlowchartPalette(); +f.push(this.shapetags[b]),d=b+"."+d,null!=this.shapetags[d]&&f.push(this.shapetags[d]));return f};Sidebar.prototype.initPalettes=function(){var b=GRAPH_IMAGE_PATH,a=STENCIL_PATH,d=this.signs,c=this.rack,f=this.pids,n=this.cisco,m=this.sysml,p=this.eip,q=this.gmdl;"1"==urlParams.createindex&&(mxLog.textarea.value="");this.addSearchPalette(!0);this.addGeneralPalette(!0);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addUmlPalette(!1);this.addErPalette();this.addBasicPalette();this.addFlowchartPalette(); this.addNetworkPalette();this.addAzurePalette();this.addCitrixPalette();this.addMSCAEPalette();this.addBpmnPalette(a,!1);this.addAWSPalette();this.addAWS3DPalette();this.addLeanMappingPalette();this.addIos7Palette();this.addIosPalette();this.addAndroidPalette();this.addMockupPalette();this.addElectricalPalette();this.addOfficePalette();this.addStencilPalette("arrows",mxResources.get("arrows"),a+"/arrows.xml",";html\x3d1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"\x3dbottom;"+mxConstants.STYLE_VERTICAL_ALIGN+ "\x3dtop;"+mxConstants.STYLE_STROKEWIDTH+"\x3d2;strokeColor\x3d#000000;");this.addArrows2Palette();this.addImagePalette("computer","Clipart / Computer",b+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "), "Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.addImagePalette("finance","Clipart / Finance",b+"/lib/clip_art/finance/", @@ -3155,13 +3155,13 @@ for(b=0;bmxUtils.indexOf(l,a))d=null!=p?p[a]:null,mxLog.debug('\x3cshape style\x3d"shape\x3d'+b+a+f+'" w\x3d"'+Math.round(c*m)+'" h\x3d"'+Math.round(e*m)+'"'+(null!=d?' tags\x3d"'+d+'"':"")+"/\x3e")}),!0)}}var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(b,a,d,c,l){var n=c;this.editorUi.enableLogging&&!this.editorUi.isOffline()&&0==d&&((new Image).src= "images/log.png?search\x3d"+encodeURIComponent(b)+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION));c=mxUtils.bind(this,function(c,f,k){!this.editorUi.isOffline()&&c.length<=a/4?(k=d-Math.ceil((f-a/4)/a),mxUtils.get(ICONFINDER_PATH+"?q\x3d"+encodeURIComponent(b)+"\x26l\x3d1\x26p\x3d"+k+"\x26c\x3d"+a,mxUtils.bind(this,function(b){b=b.getXml().getElementsByTagName("icon");for(var f=0;f=t.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in x){var e=document.createElement("div"), f=mxResources.get(d),k=x[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18c.lastIndexOf(".")&& -(!u||0>e)){b=null!=b?b:y.value;var f="";b==App.MODE_GOOGLE?f=a.drive.extension:b==App.MODE_DROPBOX?f=a.dropbox.extension:b==App.MODE_ONEDRIVE?f=a.oneDrive.extension:b==App.MODE_DEVICE&&(f=".xml");0<=e&&(d=d.substring(0,e));v.value=d+f}}}function s(b){var c=v.value;if(null==b||null!=c&&0c.lastIndexOf(".")&& +(!u||0>e)){b=null!=b?b:y.value;var f="";b==App.MODE_GOOGLE?f=a.drive.extension:b==App.MODE_DROPBOX?f=a.dropbox.extension:b==App.MODE_ONEDRIVE?f=a.oneDrive.extension:b==App.MODE_DEVICE&&(f=".xml");0<=e&&(d=d.substring(0,e));v.value=d+f}}}function s(b){var c=v.value;if(null==b||null!=c&&0mxUtils.indexOf(b,f[a])&&b.push(f[a]);c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(d.container,300,80,!0,!0);d.init()});e.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var k=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(b);mxSettings.save();a.hideDialog(); a.alert(mxResources.get("restartForChangeRequired"))});k.className="geBtn gePrimaryBtn";var l=document.createElement("div");l.style.marginTop="14px";l.style.textAlign="right";a.editor.cancelFirst?(l.appendChild(g),l.appendChild(e),l.appendChild(k)):(l.appendChild(e),l.appendChild(k),l.appendChild(g));f.appendChild(l);this.container=f},EditGeometryDialog=function(a,c){var f=a.editor.graph,d=1==c.length?f.getCellGeometry(c[0]):null,b=document.createElement("div"),e=document.createElement("table"),g= document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td"),n=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=d?d.x:"";this.init=function(){m.focus();m.select()};n.appendChild(m);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td"); -mxUtils.write(l,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";n.appendChild(p);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.width="100px";r.value=null!=d?d.width:"";n.appendChild(r);k.appendChild(l); +mxUtils.write(l,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";n.appendChild(p);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=d?d.width:"";n.appendChild(q);k.appendChild(l); k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var s=document.createElement("input");s.setAttribute("type","text");s.style.width="100px";s.value=null!=d?d.height:"";n.appendChild(s);k.appendChild(l);k.appendChild(n);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":"); -var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=1==c.length?mxUtils.getValue(f.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";n.appendChild(q);k.appendChild(l);k.appendChild(n);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),u=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;ba.maxImageSize||l>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=C;l*=C}r>A?(A=Math.round(A*t/r),r=t):(r=Math.round(r*v/A),A=v);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";N.style.position="relative"; -N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=b){var P=document.createElement("img");P.setAttribute("src",D.convert(b));P.style.width=r+"px";P.style.height=A+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((v-A)/2)+"px";P.style.paddingLeft=Math.floor((t-r)/2)+"px";N.appendChild(P)}else if(null!=n){var M=a.stringToCells(a.editor.graph.decompress(n.xml));0a.maxImageSize||l>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=C;l*=C}q>A?(A=Math.round(A*t/q),q=t):(q=Math.round(q*v/A),A=v);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";N.style.position="relative"; +N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=b){var P=document.createElement("img");P.setAttribute("src",D.convert(b));P.style.width=q+"px";P.style.height=A+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((v-A)/2)+"px";P.style.paddingLeft=Math.floor((t-q)/2)+"px";N.appendChild(P)}else if(null!=n){var M=a.stringToCells(a.editor.graph.decompress(n.xml));0z?y-1:y,0,m.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(m.push(m.splice(z,1)[0]),s.appendChild(s.children[z]));else if(0f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+I.value+"/"+r.value; +n.value+"/"+p.value+"/contents/"+q.value+"?ref\x3d"+encodeURIComponent(I.value);d();mxUtils.get(a,mxUtils.bind(this,function(c){if(200==c.getStatus()||404==c.getStatus()){c=JSON.parse(c.getText());var e={path:q.value,message:L.value,content:b};null!=c.sha&&(e.sha=c.sha);var f=new XMLHttpRequest;f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&300>f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+n.value+"/"+p.value+"/blob/"+I.value+"/"+q.value; var b=new ErrorDialog(this,mxResources.get("published"),mxResources.get("publishedAt",['\x3ca href\x3d"'+a+'" target\x3d"_blank"\x3e'+a+"\x3c/a\x3e"]),mxResources.get("close"),mxUtils.bind(this,function(){this.hideDialog()}),null,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){window.open(a)}),!1);this.showDialog(b.container,340,170,!0,!1);b.init()}else d=this.spinner.pause(),this.handleError(JSON.parse(f.responseText))});f.open("PUT",a,!0);f.setRequestHeader("Authorization","Basic "+ btoa(l.value+":"+m.value));f.send(JSON.stringify(e))}else this.hideDialog(),this.spinner.stop(),this.handleError(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){this.hideDialog();this.spinner.stop();this.handleError({message:mxResources.get("unknownError")})}))}),null,null,c,null,!1);this.showDialog(c.container,260,260,!0,!1);c.init()};EditorUi.prototype.uploadToImgur=function(a,b,c){var d=this.spinner.pause(),e=new ErrorDialog(this,mxResources.get("warning"),'\x3cimg style\x3d"max-width:300px;max-height:80px;margin-bottom:20px;padding:6px;border:1px solid gray;" src\x3d"data:image/png;base64,'+ b+'"/\x3e\x3cbr\x3e'+mxResources.get("publishConfirmation"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("publish"),mxUtils.bind(this,function(){d();var e=null!=a.getTitle()?a.getTitle():this.defaultFilename,f=e.lastIndexOf("."),g=e;0>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e& 3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g& -63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,k,l,m,n){var p=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;m=null!=m?m:this.maxImageBytes;l=null!=l?l:!0;var r=this.editor.graph,s=r.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):this.importFile(a,b,c,d,e,f,g,k,l,p)});f=null!=f?f:mxUtils.bind(this,function(a){r.setSelectionCells(a)}); -if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=a.length,L=I,O=[],T=mxUtils.bind(this,function(a,b){O[a]=b;if(0==--L){this.spinner.stop();if(null!=k)k(O);else{var c=[];r.getModel().beginUpdate();try{for(var d=0;db};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),k=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var l=Math.max(g/e,k/e);if(1a;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a}})(); +m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.lengtha;a++)for(var b=a,c=0;8>c;c++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[a]=b;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e>>8;return a}})(); EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,k);do{var l=g(a);if("IDAT"==f(a,4)){e= a.substring(0,k-8);l=4294967295;l=this.updateCRC(l,b,0,4);l=this.updateCRC(l,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((l^4294967295)>>24&255,(l^4294967295)>>16&255,(l^4294967295)>>8&255,(l^4294967295)&255);e+=a.substring(k-8,a.length);break}e+=a.substring(k- 8,k-4+l);d=f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g, @@ -7251,21 +7251,21 @@ e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a= document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&& (b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b, -"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl= -function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d= -b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/ -a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected", -function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b}; -var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c); -this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed|| -null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet= -function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init= -function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d= -this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments), +c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&& +null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2), +f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()}; +this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root, +!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c); +this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"== +urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet; +Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var q=Graph.prototype.init; +Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}q.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this, +arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1=this.settings.version&&(this.settings.currentEdgeStyle.orthogonalLoop=1,this.settings.currentEdgeStyle.jettySize="auto"),null==this.settings.currentVertexStyle&& (this.settings.currentVertexStyle={}),null==this.settings.createTarget&&(this.settings.createTarget=!1),null==this.settings.pageFormat&&(this.settings.pageFormat=mxGraph.prototype.pageFormat),null==this.settings.search&&(this.settings.search=!0),null==this.settings.showStartScreen&&(this.settings.showStartScreen=!0),null==this.settings.gridColor&&(this.settings.gridColor=mxGraphView.prototype.gridColor),null==this.settings.autosave&&(this.settings.autosave=!0),null!=this.settings.scratchpadSeen&& -delete this.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('\x3cmxStylesheet\x3e\x3cadd as\x3d"defaultVertex"\x3e\x3cadd as\x3d"shape" value\x3d"label"/\x3e\x3cadd as\x3d"perimeter" value\x3d"rectanglePerimeter"/\x3e\x3cadd as\x3d"fontSize" value\x3d"12"/\x3e\x3cadd as\x3d"fontFamily" value\x3d"Helvetica"/\x3e\x3cadd as\x3d"align" value\x3d"center"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"middle"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#000000"/\x3e\x3cadd as\x3d"fontColor" value\x3d"#000000"/\x3e\x3c/add\x3e\x3cadd as\x3d"defaultEdge"\x3e\x3cadd as\x3d"shape" value\x3d"connector"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"endArrow" value\x3d"classic"/\x3e\x3cadd as\x3d"fontSize" value\x3d"11"/\x3e\x3cadd as\x3d"fontFamily" value\x3d"Helvetica"/\x3e\x3cadd as\x3d"align" value\x3d"center"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"middle"/\x3e\x3cadd as\x3d"rounded" value\x3d"1"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#000000"/\x3e\x3cadd as\x3d"fontColor" value\x3d"#000000"/\x3e\x3c/add\x3e\x3cadd as\x3d"fancy"\x3e\x3cadd as\x3d"shadow" value\x3d"1"/\x3e\x3cadd as\x3d"glass" value\x3d"1"/\x3e\x3c/add\x3e\x3cadd as\x3d"gray" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B3B3B3"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F5F5F5"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#666666"/\x3e\x3c/add\x3e\x3cadd as\x3d"blue" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#7EA6E0"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#DAE8FC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6C8EBF"/\x3e\x3c/add\x3e\x3cadd as\x3d"green" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#97D077"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#82B366"/\x3e\x3c/add\x3e\x3cadd as\x3d"turquoise" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#67AB9F"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6A9153"/\x3e\x3c/add\x3e\x3cadd as\x3d"yellow" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFD966"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFF2CC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D6B656"/\x3e\x3c/add\x3e\x3cadd as\x3d"orange" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFA500"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFCD28"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D79B00"/\x3e\x3c/add\x3e\x3cadd as\x3d"red" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#EA6B66"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F8CECC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#B85450"/\x3e\x3c/add\x3e\x3cadd as\x3d"pink" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B5739D"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E6D0DE"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#996185"/\x3e\x3c/add\x3e\x3cadd as\x3d"purple" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#8C6C9C"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E1D5E7"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#9673A6"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-gray"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B3B3B3"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F5F5F5"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#666666"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-blue"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#7EA6E0"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#DAE8FC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6C8EBF"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-green"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#97D077"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#82B366"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-turquoise"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#67AB9F"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6A9153"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-yellow"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFD966"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFF2CC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D6B656"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-orange"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFA500"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFCD28"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D79B00"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-red"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#EA6B66"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F8CECC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#B85450"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-pink"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B5739D"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E6D0DE"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#996185"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-purple"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#8C6C9C"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E1D5E7"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#9673A6"/\x3e\x3c/add\x3e\x3cadd as\x3d"text"\x3e\x3cadd as\x3d"fillColor" value\x3d"none"/\x3e\x3cadd as\x3d"gradientColor" value\x3d"none"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"none"/\x3e\x3cadd as\x3d"align" value\x3d"left"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3c/add\x3e\x3cadd as\x3d"label"\x3e\x3cadd as\x3d"fontStyle" value\x3d"1"/\x3e\x3cadd as\x3d"align" value\x3d"left"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"middle"/\x3e\x3cadd as\x3d"spacing" value\x3d"2"/\x3e\x3cadd as\x3d"spacingLeft" value\x3d"52"/\x3e\x3cadd as\x3d"imageWidth" value\x3d"42"/\x3e\x3cadd as\x3d"imageHeight" value\x3d"42"/\x3e\x3cadd as\x3d"rounded" value\x3d"1"/\x3e\x3c/add\x3e\x3cadd as\x3d"icon" extend\x3d"label"\x3e\x3cadd as\x3d"align" value\x3d"center"/\x3e\x3cadd as\x3d"imageAlign" value\x3d"center"/\x3e\x3cadd as\x3d"verticalLabelPosition" value\x3d"bottom"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"spacingTop" value\x3d"4"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"spacing" value\x3d"0"/\x3e\x3cadd as\x3d"spacingLeft" value\x3d"0"/\x3e\x3cadd as\x3d"spacingTop" value\x3d"6"/\x3e\x3cadd as\x3d"fontStyle" value\x3d"0"/\x3e\x3cadd as\x3d"imageWidth" value\x3d"48"/\x3e\x3cadd as\x3d"imageHeight" value\x3d"48"/\x3e\x3c/add\x3e\x3cadd as\x3d"swimlane"\x3e\x3cadd as\x3d"shape" value\x3d"swimlane"/\x3e\x3cadd as\x3d"fontSize" value\x3d"12"/\x3e\x3cadd as\x3d"fontStyle" value\x3d"1"/\x3e\x3cadd as\x3d"startSize" value\x3d"23"/\x3e\x3c/add\x3e\x3cadd as\x3d"group"\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"fillColor" value\x3d"none"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"none"/\x3e\x3cadd as\x3d"gradientColor" value\x3d"none"/\x3e\x3cadd as\x3d"pointerEvents" value\x3d"0"/\x3e\x3c/add\x3e\x3cadd as\x3d"ellipse"\x3e\x3cadd as\x3d"shape" value\x3d"ellipse"/\x3e\x3cadd as\x3d"perimeter" value\x3d"ellipsePerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"rhombus"\x3e\x3cadd as\x3d"shape" value\x3d"rhombus"/\x3e\x3cadd as\x3d"perimeter" value\x3d"rhombusPerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"triangle"\x3e\x3cadd as\x3d"shape" value\x3d"triangle"/\x3e\x3cadd as\x3d"perimeter" value\x3d"trianglePerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"line"\x3e\x3cadd as\x3d"shape" value\x3d"line"/\x3e\x3cadd as\x3d"strokeWidth" value\x3d"4"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"spacingTop" value\x3d"8"/\x3e\x3c/add\x3e\x3cadd as\x3d"image"\x3e\x3cadd as\x3d"shape" value\x3d"image"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"white"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"verticalLabelPosition" value\x3d"bottom"/\x3e\x3c/add\x3e\x3cadd as\x3d"roundImage" extend\x3d"image"\x3e\x3cadd as\x3d"perimeter" value\x3d"ellipsePerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"rhombusImage" extend\x3d"image"\x3e\x3cadd as\x3d"perimeter" value\x3d"rhombusPerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"arrow"\x3e\x3cadd as\x3d"shape" value\x3d"arrow"/\x3e\x3cadd as\x3d"edgeStyle" value\x3d"none"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#ffffff"/\x3e\x3c/add\x3e\x3c/mxStylesheet\x3e').documentElement;(!/\bMSIE 6/.test(navigator.userAgent)||window.opera)&&function(){var a,c,f,d,b,e,g,k,l,n,m,p={}.hasOwnProperty,r=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},s=function(a,b){function c(){this.constructor=a}for(var d in b)p.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};if(m=function(){return function(){throw Error("Not implemented. Did you mean to use Dropbox.Client?");}}(),m.Util=function(){return function(){}}(), +delete this.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('\x3cmxStylesheet\x3e\x3cadd as\x3d"defaultVertex"\x3e\x3cadd as\x3d"shape" value\x3d"label"/\x3e\x3cadd as\x3d"perimeter" value\x3d"rectanglePerimeter"/\x3e\x3cadd as\x3d"fontSize" value\x3d"12"/\x3e\x3cadd as\x3d"fontFamily" value\x3d"Helvetica"/\x3e\x3cadd as\x3d"align" value\x3d"center"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"middle"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#000000"/\x3e\x3cadd as\x3d"fontColor" value\x3d"#000000"/\x3e\x3c/add\x3e\x3cadd as\x3d"defaultEdge"\x3e\x3cadd as\x3d"shape" value\x3d"connector"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"endArrow" value\x3d"classic"/\x3e\x3cadd as\x3d"fontSize" value\x3d"11"/\x3e\x3cadd as\x3d"fontFamily" value\x3d"Helvetica"/\x3e\x3cadd as\x3d"align" value\x3d"center"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"middle"/\x3e\x3cadd as\x3d"rounded" value\x3d"1"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#000000"/\x3e\x3cadd as\x3d"fontColor" value\x3d"#000000"/\x3e\x3c/add\x3e\x3cadd as\x3d"fancy"\x3e\x3cadd as\x3d"shadow" value\x3d"1"/\x3e\x3cadd as\x3d"glass" value\x3d"1"/\x3e\x3c/add\x3e\x3cadd as\x3d"gray" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B3B3B3"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F5F5F5"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#666666"/\x3e\x3c/add\x3e\x3cadd as\x3d"blue" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#7EA6E0"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#DAE8FC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6C8EBF"/\x3e\x3c/add\x3e\x3cadd as\x3d"green" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#97D077"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#82B366"/\x3e\x3c/add\x3e\x3cadd as\x3d"turquoise" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#67AB9F"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6A9153"/\x3e\x3c/add\x3e\x3cadd as\x3d"yellow" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFD966"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFF2CC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D6B656"/\x3e\x3c/add\x3e\x3cadd as\x3d"orange" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFA500"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFCD28"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D79B00"/\x3e\x3c/add\x3e\x3cadd as\x3d"red" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#EA6B66"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F8CECC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#B85450"/\x3e\x3c/add\x3e\x3cadd as\x3d"pink" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B5739D"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E6D0DE"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#996185"/\x3e\x3c/add\x3e\x3cadd as\x3d"purple" extend\x3d"fancy"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#8C6C9C"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E1D5E7"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#9673A6"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-gray"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B3B3B3"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F5F5F5"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#666666"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-blue"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#7EA6E0"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#DAE8FC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6C8EBF"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-green"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#97D077"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#82B366"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-turquoise"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#67AB9F"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#D5E8D4"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#6A9153"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-yellow"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFD966"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFF2CC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D6B656"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-orange"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#FFA500"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#FFCD28"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#D79B00"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-red"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#EA6B66"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#F8CECC"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#B85450"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-pink"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#B5739D"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E6D0DE"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#996185"/\x3e\x3c/add\x3e\x3cadd as\x3d"plain-purple"\x3e\x3cadd as\x3d"gradientColor" value\x3d"#8C6C9C"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#E1D5E7"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"#9673A6"/\x3e\x3c/add\x3e\x3cadd as\x3d"text"\x3e\x3cadd as\x3d"fillColor" value\x3d"none"/\x3e\x3cadd as\x3d"gradientColor" value\x3d"none"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"none"/\x3e\x3cadd as\x3d"align" value\x3d"left"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3c/add\x3e\x3cadd as\x3d"label"\x3e\x3cadd as\x3d"fontStyle" value\x3d"1"/\x3e\x3cadd as\x3d"align" value\x3d"left"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"middle"/\x3e\x3cadd as\x3d"spacing" value\x3d"2"/\x3e\x3cadd as\x3d"spacingLeft" value\x3d"52"/\x3e\x3cadd as\x3d"imageWidth" value\x3d"42"/\x3e\x3cadd as\x3d"imageHeight" value\x3d"42"/\x3e\x3cadd as\x3d"rounded" value\x3d"1"/\x3e\x3c/add\x3e\x3cadd as\x3d"icon" extend\x3d"label"\x3e\x3cadd as\x3d"align" value\x3d"center"/\x3e\x3cadd as\x3d"imageAlign" value\x3d"center"/\x3e\x3cadd as\x3d"verticalLabelPosition" value\x3d"bottom"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"spacingTop" value\x3d"4"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"spacing" value\x3d"0"/\x3e\x3cadd as\x3d"spacingLeft" value\x3d"0"/\x3e\x3cadd as\x3d"spacingTop" value\x3d"6"/\x3e\x3cadd as\x3d"fontStyle" value\x3d"0"/\x3e\x3cadd as\x3d"imageWidth" value\x3d"48"/\x3e\x3cadd as\x3d"imageHeight" value\x3d"48"/\x3e\x3c/add\x3e\x3cadd as\x3d"swimlane"\x3e\x3cadd as\x3d"shape" value\x3d"swimlane"/\x3e\x3cadd as\x3d"fontSize" value\x3d"12"/\x3e\x3cadd as\x3d"fontStyle" value\x3d"1"/\x3e\x3cadd as\x3d"startSize" value\x3d"23"/\x3e\x3c/add\x3e\x3cadd as\x3d"group"\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"fillColor" value\x3d"none"/\x3e\x3cadd as\x3d"strokeColor" value\x3d"none"/\x3e\x3cadd as\x3d"gradientColor" value\x3d"none"/\x3e\x3cadd as\x3d"pointerEvents" value\x3d"0"/\x3e\x3c/add\x3e\x3cadd as\x3d"ellipse"\x3e\x3cadd as\x3d"shape" value\x3d"ellipse"/\x3e\x3cadd as\x3d"perimeter" value\x3d"ellipsePerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"rhombus"\x3e\x3cadd as\x3d"shape" value\x3d"rhombus"/\x3e\x3cadd as\x3d"perimeter" value\x3d"rhombusPerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"triangle"\x3e\x3cadd as\x3d"shape" value\x3d"triangle"/\x3e\x3cadd as\x3d"perimeter" value\x3d"trianglePerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"line"\x3e\x3cadd as\x3d"shape" value\x3d"line"/\x3e\x3cadd as\x3d"strokeWidth" value\x3d"4"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"#ffffff"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"spacingTop" value\x3d"8"/\x3e\x3c/add\x3e\x3cadd as\x3d"image"\x3e\x3cadd as\x3d"shape" value\x3d"image"/\x3e\x3cadd as\x3d"labelBackgroundColor" value\x3d"white"/\x3e\x3cadd as\x3d"verticalAlign" value\x3d"top"/\x3e\x3cadd as\x3d"verticalLabelPosition" value\x3d"bottom"/\x3e\x3c/add\x3e\x3cadd as\x3d"roundImage" extend\x3d"image"\x3e\x3cadd as\x3d"perimeter" value\x3d"ellipsePerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"rhombusImage" extend\x3d"image"\x3e\x3cadd as\x3d"perimeter" value\x3d"rhombusPerimeter"/\x3e\x3c/add\x3e\x3cadd as\x3d"arrow"\x3e\x3cadd as\x3d"shape" value\x3d"arrow"/\x3e\x3cadd as\x3d"edgeStyle" value\x3d"none"/\x3e\x3cadd as\x3d"fillColor" value\x3d"#ffffff"/\x3e\x3c/add\x3e\x3c/mxStylesheet\x3e').documentElement;(!/\bMSIE 6/.test(navigator.userAgent)||window.opera)&&function(){var a,c,f,d,b,e,g,k,l,n,m,p={}.hasOwnProperty,q=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},s=function(a,b){function c(){this.constructor=a}for(var d in b)p.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};if(m=function(){return function(){throw Error("Not implemented. Did you mean to use Dropbox.Client?");}}(),m.Util=function(){return function(){}}(), m.Http=function(){return function(){}}(),m.File=function(){return function(){}}(),"undefined"!=typeof global&&"undefined"!=typeof module&&"exports"in module)c=global,f=module.require.bind(module),module.exports=m;else if("undefined"!=typeof window&&"undefined"!=typeof navigator)c=window,f=null,window.Dropbox&&!function(){var a,b,c,d;c=window.Dropbox;d=[];for(a in c)p.call(c,a)&&(b=c[a],d.push(m[a]=b));return d}(),window.Dropbox=m;else{if("undefined"==typeof self||"undefined"==typeof navigator)throw Error("dropbox.js loaded in an unsupported JavaScript environment."); -c=self;f=self.importScripts.bind(self);self.Dropbox=m}if(m.Env=function(){function a(){}return a.global=c,a.require=f,a}(),m.Util.EventSource=function(){function a(b){this._cancelable=b&&b.cancelable;this._listeners=[]}return a.prototype.addListener=function(a){if("function"!=typeof a)throw new TypeError("Invalid listener type; expected function");return 0>r.call(this._listeners,a)&&this._listeners.push(a),this},a.prototype.removeListener=function(a){var b,c,d,e,f;if(this._listeners.indexOf)a=this._listeners.indexOf(a), +c=self;f=self.importScripts.bind(self);self.Dropbox=m}if(m.Env=function(){function a(){}return a.global=c,a.require=f,a}(),m.Util.EventSource=function(){function a(b){this._cancelable=b&&b.cancelable;this._listeners=[]}return a.prototype.addListener=function(a){if("function"!=typeof a)throw new TypeError("Invalid listener type; expected function");return 0>q.call(this._listeners,a)&&this._listeners.push(a),this},a.prototype.removeListener=function(a){var b,c,d,e,f;if(this._listeners.indexOf)a=this._listeners.indexOf(a), -1!==a&&this._listeners.splice(a,1);else{f=this._listeners;b=d=0;for(e=f.length;e>d;b=++d)if(c=f[b],c===a){this._listeners.splice(b,1);break}}return this},a.prototype.dispatch=function(a){var b,c,d,e,f;f=this._listeners;d=0;for(e=f.length;e>d;d++)if(b=f[d],c=b(a),this._cancelable&&!1===c)return!1;return!0},a}(),m.AccountInfo=function(){function a(b){var c;this._json=b;this.name=b.display_name;this.email=b.email;this.countryCode=b.country||null;this.uid=b.uid.toString();b.public_app_url?(this.publicAppUrl= b.public_app_url,c=this.publicAppUrl.length-1,0<=c&&"/"===this.publicAppUrl.substring(c)&&(this.publicAppUrl=this.publicAppUrl.substring(0,c))):this.publicAppUrl=null;this.referralUrl=b.referral_link;this.quota=b.quota_info.quota;this.privateBytes=b.quota_info.normal||0;this.sharedBytes=b.quota_info.shared||0;this.usedQuota=this.privateBytes+this.sharedBytes}return a.parse=function(a){return a&&"object"==typeof a?new m.AccountInfo(a):a},a.prototype.name=null,a.prototype.email=null,a.prototype.countryCode= null,a.prototype.uid=null,a.prototype.referralUrl=null,a.prototype.publicAppUrl=null,a.prototype.quota=null,a.prototype.usedQuota=null,a.prototype.privateBytes=null,a.prototype.sharedBytes=null,a.prototype.json=function(){return this._json},a}(),m.ApiError=function(){function a(b,c,d){var e;if(this.method=c,this.url=d,this.status=b.status,b.responseType)try{e=b.response||b.responseText}catch(f){try{e=b.responseText}catch(g){e=null}}else try{e=b.responseText}catch(k){e=null}if(e)try{this.responseText= @@ -7364,10 +7364,10 @@ null,this.offset=a.offset||0,this.expiresAt=m.Util.parseDate(a.expires)||Date.no d,e;e=[];b=c=0;for(d=a.length;0<=d?d>c:c>d;b=0<=d?++c:--c)e.push(String.fromCharCode(a[b]));return e.join("")},m.Util.btoa=function(a){var b,c,d=Buffer,e,f,g;g=[];c=e=0;for(f=a.length;0<=f?f>e:e>f;c=0<=f?++e:--e)g.push(a.charCodeAt(c));return b=new d(g),b.toString("base64")}):!function(){var a,b;return b=function(a,b,c){var d,e;e=3-b;a<<=8*e;for(d=3;d>=e;)c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>6*d&63)),d-=1;for(d=b;3>d;)c.push("\x3d"),d+=1;return null}, a=function(a,b,c){var d;d=4-b;a<<=6*d;for(b=2;b>=d;)c.push(String.fromCharCode(a>>8*b&255)),b-=1;return null},m.Util.btoa=function(a){var c,d,e,f,g,k;f=[];e=g=d=c=0;for(k=a.length;0<=k?k>g:g>k;e=0<=k?++g:--g)c=c<<8|a.charCodeAt(e),d+=1,3===d&&(b(c,d,f),c=d=0);return 0k:k>l)&&(d=b.charAt(f),"\x3d"!==d);f=0<=l?++k:--k)c=c<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(d), e+=1,4===e&&(a(c,e,g),c=e=0);return 0a;g=++a)c.push(909522486^b[g]);return c}(),l=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(1549556828^b[g]);return c}(),f=d(k.concat(a),64+c),d(l.concat(f),84)},d=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,t,u,r,s,v,z;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>> -6<<4)+15]=b<<3;s=Array(80);c=1732584193;e=4023233417;g=2562383102;l=271733878;n=3285377520;q=0;for(u=a.length;u>q;){d=c;f=e;k=g;m=l;p=n;for(t=z=0;80>z;t=++z)16>t?s[t]=0|a[q+t<<2>>2]:(r=(0|s[t-3<<2>>2])^(0|s[t-8<<2>>2])^(0|s[t-14<<2>>2])^(0|s[t-16<<2>>2]),s[t]=r<<1|r>>>31),v=((c<<5|c>>>27)+n|0)+s[t<<2>>2]|0,v=20>t?v+((e&g|~e&l)+1518500249|0)|0:40>t?v+((e^g^l)+1859775393|0)|0:60>t?v+((e&g|e&l|g&l)-1894007588)|0:v+((e^g^l)-899497514|0)|0,n=l,l=g,g=e<<30|e>>>2,e=c,c=v;c=d+c|0;e=f+e|0;g=k+g|0;l=m+l|0; -n=p+n|0;q=q+16|0}return[c,e,g,l,n]},e=function(a,b){var c,d,e,k,l,m,n,p,q,t,u,r,s,v,z,y,A,B,E,Y,aa,W,Q,ga,ca,$,fa,ia,ba,ka;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>6<<4)+15]=b<<3;ba=Array(80);c=f[0];e=f[1];l=f[2];p=f[3];t=f[4];r=f[5];v=f[6];Y=f[7];W=0;for(ga=a.length;ga>W;){d=c;k=e;m=l;q=p;u=t;s=r;z=v;aa=Y;for(Q=ka=0;64>ka;Q=++ka)16>Q?ia=ba[Q]=0|a[W+Q<<2>>2]:(A=0|ba[Q-15<<2>>2],y=(A<<25|A>>>7)^(A<<14|A>>>18)^A>>>3,E=0|ba[Q-2<<2>>2],B=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10,ia=ba[Q]=(y+(0|ba[Q-7<<2>>2])|0)+ -(B+(0|ba[Q-16<<2>>2])|0)|0),n=t&r^~t&v,ca=c&e^c&l^e&l,$=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),fa=(t<<26|t>>>6)^(t<<21|t>>>11)^(t<<7|t>>>25),n=((Y+fa|0)+(n+ia|0)|0)+(0|g[Q<<2>>2])|0,ca=$+ca|0,Y=v,v=r,r=t,t=p+n|0,p=l,l=e,e=c,c=n+ca|0;c=d+c|0;e=k+e|0;l=m+l|0;p=q+p|0;t=u+t|0;r=s+r|0;v=z+v|0;Y=aa+Y|0;W+=16}return[c,e,l,p,t,r,v,Y]},f=[],g=[],function(){var a,b,c,d,e,k,l;b=function(a){return 4294967296*(a-Math.floor(a))|0};e=2;l=[];for(c=k=0;64>k;c=++k){for(;;){d=!0;for(a=2;e>=a*a;){if(0===e%a){d= +c.update(a),c.digest("base64")},m.Util.sha256=function(a){var c;return c=b.createHash("sha256"),c.update(a),c.digest("base64")})}catch(n){}return c=function(a,b,c,e){var f,g,k,l;return 16a;g=++a)c.push(909522486^b[g]);return c}(),l=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(1549556828^b[g]);return c}(),f=d(k.concat(a),64+c),d(l.concat(f),84)},d=function(a,b){var c,d,e,f,g,k,l,m,n,p,r,t,u,q,s,v,z;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>> +6<<4)+15]=b<<3;s=Array(80);c=1732584193;e=4023233417;g=2562383102;l=271733878;n=3285377520;r=0;for(u=a.length;u>r;){d=c;f=e;k=g;m=l;p=n;for(t=z=0;80>z;t=++z)16>t?s[t]=0|a[r+t<<2>>2]:(q=(0|s[t-3<<2>>2])^(0|s[t-8<<2>>2])^(0|s[t-14<<2>>2])^(0|s[t-16<<2>>2]),s[t]=q<<1|q>>>31),v=((c<<5|c>>>27)+n|0)+s[t<<2>>2]|0,v=20>t?v+((e&g|~e&l)+1518500249|0)|0:40>t?v+((e^g^l)+1859775393|0)|0:60>t?v+((e&g|e&l|g&l)-1894007588)|0:v+((e^g^l)-899497514|0)|0,n=l,l=g,g=e<<30|e>>>2,e=c,c=v;c=d+c|0;e=f+e|0;g=k+g|0;l=m+l|0; +n=p+n|0;r=r+16|0}return[c,e,g,l,n]},e=function(a,b){var c,d,e,k,l,m,n,p,r,t,u,q,s,v,z,y,A,B,E,Y,aa,W,Q,ga,ca,$,fa,ia,ba,ka;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>6<<4)+15]=b<<3;ba=Array(80);c=f[0];e=f[1];l=f[2];p=f[3];t=f[4];q=f[5];v=f[6];Y=f[7];W=0;for(ga=a.length;ga>W;){d=c;k=e;m=l;r=p;u=t;s=q;z=v;aa=Y;for(Q=ka=0;64>ka;Q=++ka)16>Q?ia=ba[Q]=0|a[W+Q<<2>>2]:(A=0|ba[Q-15<<2>>2],y=(A<<25|A>>>7)^(A<<14|A>>>18)^A>>>3,E=0|ba[Q-2<<2>>2],B=(E<<15|E>>>17)^(E<<13|E>>>19)^E>>>10,ia=ba[Q]=(y+(0|ba[Q-7<<2>>2])|0)+ +(B+(0|ba[Q-16<<2>>2])|0)|0),n=t&q^~t&v,ca=c&e^c&l^e&l,$=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),fa=(t<<26|t>>>6)^(t<<21|t>>>11)^(t<<7|t>>>25),n=((Y+fa|0)+(n+ia|0)|0)+(0|g[Q<<2>>2])|0,ca=$+ca|0,Y=v,v=q,q=t,t=p+n|0,p=l,l=e,e=c,c=n+ca|0;c=d+c|0;e=k+e|0;l=m+l|0;p=r+p|0;t=u+t|0;q=s+q|0;v=z+v|0;Y=aa+Y|0;W+=16}return[c,e,l,p,t,q,v,Y]},f=[],g=[],function(){var a,b,c,d,e,k,l;b=function(a){return 4294967296*(a-Math.floor(a))|0};e=2;l=[];for(c=k=0;64>k;c=++k){for(;;){d=!0;for(a=2;e>=a*a;){if(0===e%a){d= !1;break}a+=1}if(d)break;e+=1}8>c&&(f[c]=b(Math.pow(e,0.5)));g[c]=b(Math.pow(e,1/3));l.push(e+=1)}return l}(),a=function(a){var b,c,d,e,f;e="";b=0;for(d=4*a.length;d>b;)c=b,f=(a[c>>2]>>(3-(3&c)<<3)&255)<<16,c+=1,f|=(a[c>>2]>>(3-(3&c)<<3)&255)<<8,c+=1,f|=a[c>>2]>>(3-(3&c)<<3)&255,e+=l[f>>18&63],e+=l[f>>12&63],b+=1,e+=b>=d?"\x3d":l[f>>6&63],b+=1,e+=b>=d?"\x3d":l[63&f],b+=1;return e},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=function(a){var b,c,d,e;b=[];c=d=0;for(e=a.length;0<= e?e>d:d>e;c=0<=e?++d:--d)b[c>>2]|=(a.charCodeAt(c)&255)<<(3-(3&c)<<3);return b}}(),m.Util.Oauth=function(){function a(b){this._loaded=this._appHash=this._error=this._tokenKid=this._tokenKey=this._token=this._authCode=this._stateParam=this._secret=this._id=null;this.setCredentials(b)}return a.prototype.setCredentials=function(a){if(a.key)this._id=a.key;else{if(!a.token)throw Error("No API key supplied");this._id=null}return this._secret=a.secret||null,this._appHash=null,this._error=null,this._loaded= !0,this.reset(),a.token?(this._token=a.token,a.tokenKey&&(this._tokenKey=a.tokenKey,this._tokenKid=a.tokenKid)):a.oauthCode?this._authCode=a.oauthCode:a.oauthStateParam&&(this._stateParam=a.oauthStateParam),this},a.prototype.credentials=function(){var a;return a={},this._id&&(a.key=this._id),this._secret&&(a.secret=this._secret),null!==this._token?(a.token=this._token,this._tokenKey&&(a.tokenKey=this._tokenKey,a.tokenKid=this._tokenKid)):null!==this._authCode?a.oauthCode=this._authCode:null!==this._stateParam&& @@ -7380,7 +7380,7 @@ d=0;for(e=f.length;e>d;d++)a=f[d],b=a.indexOf("\x3d"),-1!==b&&(c[decodeURICompon this._id).replace(/[\/+=]/g,"")},a.prototype.reset=function(){return this._stateParam=null,this._authCode=null,this._token=null,this._tokenKey=null,this._tokenKid=null,this._error=null,this},a.timestamp=function(){return Math.floor(Date.now()/1E3)},a.randomAuthStateParam=function(){return["oas",Date.now().toString(36),Math.random().toString(36)].join("_")},a}(),null==Date.now&&(m.Util.Oauth.timestamp=function(){return Math.floor((new Date).getTime()/1E3)}),2274814865E3===(new Date("Fri, 31 Jan 2042 21:01:05 +0000")).valueOf()? m.Util.parseDate=function(a){return new Date(a)}:2274814865E3===Date.parse("Fri, 31 Jan 2042 21:01:05 +0000")?m.Util.parseDate=function(a){return new Date(Date.parse(a))}:!function(){var a,b;return b=/^\w+\, (\d+) (\w+) (\d+) (\d+)\:(\d+)\:(\d+) (\+\d+|UTC|GMT)$/,a={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},m.Util.parseDate=function(c){var d;return(d=b.exec(c))?new Date(Date.UTC(parseInt(d[3]),a[d[2]],parseInt(d[1]),parseInt(d[4]),parseInt(d[5]),parseInt(d[6]),0)): 0/0}}(),m.Env.global.XMLHttpRequest?(!m.Env.global.XDomainRequest||"withCredentials"in new XMLHttpRequest?(k=XMLHttpRequest,g=!1,b="undefined"!=typeof FormData&&-1===navigator.userAgent.indexOf("Firefox")):(k=XDomainRequest,g=!0,b=!1),e=!0):(k=m.Env.require("xhr2"),g=!1,b=!1,e=!1),m.Env.global.Uint8Array)if(Object.getPrototypeOf?d=Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array(0))).constructor:Object.__proto__&&(d=(new Uint8Array(0)).__proto__.__proto__.constructor),m.Env.global.Blob){try{!(2=== -(new Blob([new Uint8Array(2)])).size?(n=!0,l=!0):(l=!1,n=2===(new Blob([new ArrayBuffer(2)])).size))}catch(q){n=l=!1,m.Env.global.WebKitBlobBuilder&&-1!==navigator.userAgent.indexOf("Android")&&(b=!1)}d===Object&&(l=!1)}else n=!1,l=!0;else d=null,l=n=!1;m.Util.Xhr=function(){function a(b,c){this.method=b;this.isGet="GET"===this.method;this.url=c;this.wantHeaders=!1;this.headers={};this.body=this.params=null;this.preflight=!(this.isGet||"POST"===this.method);this.completed=this.signed=!1;this.onError= +(new Blob([new Uint8Array(2)])).size?(n=!0,l=!0):(l=!1,n=2===(new Blob([new ArrayBuffer(2)])).size))}catch(r){n=l=!1,m.Env.global.WebKitBlobBuilder&&-1!==navigator.userAgent.indexOf("Android")&&(b=!1)}d===Object&&(l=!1)}else n=!1,l=!0;else d=null,l=n=!1;m.Util.Xhr=function(){function a(b,c){this.method=b;this.isGet="GET"===this.method;this.url=c;this.wantHeaders=!1;this.headers={};this.body=this.params=null;this.preflight=!(this.isGet||"POST"===this.method);this.completed=this.signed=!1;this.onError= this.xhr=this.callback=this.responseType=null}return a.Request=k,a.ieXdr=g,a.canSendForms=b,a.doesPreflight=e,a.ArrayBufferView=d,a.sendArrayBufferView=l,a.wrapBlob=n,a.prototype.xhr=null,a.prototype.onError=null,a.prototype.setParams=function(a){if(this.signed)throw Error("setParams called after addOauthParams or addOauthHeader");if(this.params)throw Error("setParams cannot be called twice");return this.params=a,this},a.prototype.setCallback=function(a){return this.callback=a,this},a.prototype.signWithOauth= function(a,b){return m.Util.Xhr.ieXdr?this.addOauthParams(a):this.preflight||!m.Util.Xhr.doesPreflight?this.addOauthHeader(a):this.isGet&&b?this.addOauthHeader(a):this.addOauthParams(a)},a.prototype.addOauthParams=function(a){if(this.signed)throw Error("Request already has an OAuth signature");return this.params||(this.params={}),a.addAuthParams(this.method,this.url,this.params),this.signed=!0,this},a.prototype.addOauthHeader=function(a){if(this.signed)throw Error("Request already has an OAuth signature"); return this.params||(this.params={}),this.signed=!0,this.setHeader("Authorization",a.authHeader(this.method,this.url,this.params))},a.prototype.setBody=function(a){if(this.isGet)throw Error("setBody cannot be called on GET requests");if(null!==this.body)throw Error("Request already has a body");return"string"==typeof a||"undefined"!=typeof FormData&&a instanceof FormData||(this.headers["Content-Type"]="application/octet-stream",this.preflight=!0),this.body=a,this},a.prototype.setResponseType=function(a){return this.responseType= @@ -7401,7 +7401,7 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a}; mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,c,f,d){};mxAsyncCanvas.prototype.roundrect=function(a,c,f,d,b,e){};mxAsyncCanvas.prototype.ellipse=function(a,c,f,d){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url\x3d"+encodeURIComponent(a);return a}; mxAsyncCanvas.prototype.image=function(a,c,f,d,b,e,g,k){b=this.rewriteImageSource(b);a=this.htmlCanvas.images[b];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[b]=a,a.src=b)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){}; -mxAsyncCanvas.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p){if(!(null==b||0==b.length))if(a=this.state.scale,"html"==l&&"function"===typeof html2canvas){this.incWaitCounter();var r=this.canvasIndex++;html2canvas(b,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[r]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null; +mxAsyncCanvas.prototype.text=function(a,c,f,d,b,e,g,k,l,n,m,p){if(!(null==b||0==b.length))if(a=this.state.scale,"html"==l&&"function"===typeof html2canvas){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(b,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null; mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,f,d,b){return f+f+d+d+b+b});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++}; mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily}; mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,c){this.state.dx+=a;this.state.dy+=c;this.ctx.translate(a,c)}; @@ -7554,8 +7554,8 @@ DriveClient.prototype.loadRealtime=function(a,c,f){if("1"!=urlParams.ignoremime& gapi.drive.realtime.load(a.id,mxUtils.bind(this,function(a){window.clearTimeout(e);b&&c(a)}))});d()}else c()}; DriveClient.prototype.getXmlFile=function(a,c,f,d,b,e){var g=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"\x26access_token\x3d"+g,mxUtils.bind(this,function(g){if(null==g)d({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||e)a.mimeType==this.libraryMimeType&&!e?d({message:mxResources.get("notADiagramFile")}):f(new DriveLibrary(this.ui,g,a));else{var l=new DriveFile(this.ui,g,a,c);!b&&"850530949725"!=this.appId&&l.isEditable()&&a.mimeType!= this.mimeType?this.saveFile(l,!0,mxUtils.bind(this,function(a){l.desc=a;f(l)}),d,!0):f(l)}}),d,"image/png"==a.mimeType)}; -DriveClient.prototype.saveFile=function(a,c,f,d,b,e){if(a.isEditable()){var g=(new Date).getTime();b=null!=b?b:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;e=null!=e?e:!1;var k=mxUtils.bind(this,function(b,k,l){var r={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null==b&&!e&&(b=this.placeholderThumbnail,k=this.placeholderMimeType),null!=b&&null!=k&&(r.thumbnail={image:b,mimeType:k}));this.executeRequest(this.createUploadRequest(a.getId(), -r,a.getData(),c||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType),function(){a.saveDelay=(new Date).getTime()-g;f.apply(this,arguments)},d)}),l=mxUtils.bind(this,function(){var b=null!=this.ui.currentPage&&this.ui.currentPage!=this.ui.pages[0];(e||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||b||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(c){}b=null==b||b.length> +DriveClient.prototype.saveFile=function(a,c,f,d,b,e){if(a.isEditable()){var g=(new Date).getTime();b=null!=b?b:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;e=null!=e?e:!1;var k=mxUtils.bind(this,function(b,k,l){var q={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null==b&&!e&&(b=this.placeholderThumbnail,k=this.placeholderMimeType),null!=b&&null!=k&&(q.thumbnail={image:b,mimeType:k}));this.executeRequest(this.createUploadRequest(a.getId(), +q,a.getData(),c||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType),function(){a.saveDelay=(new Date).getTime()-g;f.apply(this,arguments)},d)}),l=mxUtils.bind(this,function(){var b=null!=this.ui.currentPage&&this.ui.currentPage!=this.ui.pages[0];(e||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||b||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(c){}b=null==b||b.length> this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");k(b,"image/png")})))&&k(null,null,a.constructor!=DriveLibrary&&b)});b||!c?l():this.verifyMimeType(a.getId(),l,!0)}else this.ui.editor.graph.reset(),null!=d&&d({message:mxResources.get("readOnly")})}; DriveClient.prototype.verifyMimeType=function(a,c,f,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var b=(new Date).getTime();if(f||b-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=b,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType"}),mxUtils.bind(this,function(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!=c&&c()})))}; DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var f=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash".split(" "))+"#G"+c;null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=f}),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"), @@ -7577,7 +7577,7 @@ b=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(n DropboxClient.prototype.logout=function(){this.client.signOut(mxUtils.bind(this,function(){this.setUser(null)}))};DropboxClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DropboxClient.prototype.getUser=function(){return this.user};DropboxClient.prototype.updateUser=function(a,c,f){this.client.getUserInfo(null,mxUtils.bind(this,function(a,b){null==a?this.setUser(new DrawioUser(b.uid,b.email,b.name)):this.setUser(null)}))}; DropboxClient.prototype.execute=function(a){this.client.isAuthenticated()?a():this.authorize(!1,mxUtils.bind(this,function(c,f){null!=c?this.ui.handleError(c):this.client.isAuthenticated()?(this.updateUser(),a()):this.ui.showAuthDialog(this,!1,mxUtils.bind(this,function(c,b){this.authorize(!0,mxUtils.bind(this,function(c,d){null!=c?this.ui.handleError(c):this.client.isAuthenticated()&&(this.updateUser(),null!=b&&b(),a())}))}))}))}; DropboxClient.prototype.authorize=function(a,c){this.client.authenticate({interactive:a},mxUtils.bind(this,function(a,d){null!=a?null!=window.console&&console.log(a):c()}))};DropboxClient.prototype.getLibrary=function(a,c,f){this.getFile(a,c,f,!1,!0)}; -DropboxClient.prototype.getFile=function(a,c,f,d,b){b=null!=b?b:!1;var e=mxUtils.bind(this,function(){this.execute(mxUtils.bind(this,function(){var d=!0,k=window.setTimeout(mxUtils.bind(this,function(){d=!1;f({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),l=null;null!=urlParams.rev&&(l={versionTag:urlParams.rev});this.client.readFile("/"+a,l,mxUtils.bind(this,function(a,e,l){try{window.clearTimeout(k),d&&(null!=a?f(a):b?c(new DropboxLibrary(this.ui,e,l)):c(new DropboxFile(this.ui,e,l)))}catch(r){f(r)}}))}))}); +DropboxClient.prototype.getFile=function(a,c,f,d,b){b=null!=b?b:!1;var e=mxUtils.bind(this,function(){this.execute(mxUtils.bind(this,function(){var d=!0,k=window.setTimeout(mxUtils.bind(this,function(){d=!1;f({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),l=null;null!=urlParams.rev&&(l={versionTag:urlParams.rev});this.client.readFile("/"+a,l,mxUtils.bind(this,function(a,e,l){try{window.clearTimeout(k),d&&(null!=a?f(a):b?c(new DropboxLibrary(this.ui,e,l)):c(new DropboxFile(this.ui,e,l)))}catch(q){f(q)}}))}))}); e()};DropboxClient.prototype.checkExists=function(a,c){this.client.stat(a,mxUtils.bind(this,function(f,d){null!=f&&404==f.status||null!=d&&d.isRemoved?c(!0):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){c(!0)},function(){c(!1)})}))}; DropboxClient.prototype.renameFile=function(a,c,f,d){null!=a&&null!=c&&this.execute(mxUtils.bind(this,function(){this.checkExists(c,mxUtils.bind(this,function(b){b?this.writeFile(c,a.getData(),mxUtils.bind(this,function(b){this.client.remove(a.getTitle(),function(a,c){null!=a?d(a):f(b)})}),d):d()}))}))};DropboxClient.prototype.insertLibrary=function(a,c,f,d){this.insertFile(a,c,f,d,!0)}; DropboxClient.prototype.insertFile=function(a,c,f,d,b){b=null!=b?b:!1;this.execute(mxUtils.bind(this,function(){this.checkExists(a,mxUtils.bind(this,function(e){e?this.writeFile(a,c,mxUtils.bind(this,function(a){b?f(new DropboxLibrary(this.ui,c,a)):f(new DropboxFile(this.ui,c,a))}),d):d()}))}))};DropboxClient.prototype.saveFile=function(a,c,f,d){this.execute(mxUtils.bind(this,function(){this.writeFile(a,c,f,d)}))}; @@ -7636,13 +7636,13 @@ null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G null,"dropboxjs",App.DROPBOX_APPKEY):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(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("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient= null),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0c.indexOf("DocumentClosedError")){a=c;var k=new Image;d=0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"images/3x3.png":"images/2x2.png";k.src=d+"?msg\x3d"+encodeURIComponent(c)+"\x26url\x3d"+encodeURIComponent(window.location.href)+"\x26lnum\x3d"+encodeURIComponent(b)+ -"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+(null!=e?"\x26colno\x3d"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"\x26stack\x3d"+encodeURIComponent(g.stack):"")}}catch(l){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height","0");c.setAttribute("src", -"offline.html");document.body.appendChild(c);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,c,b){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,c,!1)};for(c=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=c;)"shapes"==c.nodeName&&null!=c.getAttribute("name")&& -(mxStencilRegistry.stencilSet[c.getAttribute("name").toLowerCase()]=c,mxStencilRegistry.parseStencilSet(c)),c=c.nextSibling}"0"!=urlParams.picker&&(!mxClient.IS_QUIRKS&&8!=document.documentMode)&&mxscript(document.location.protocol+"//www.google.com/jsapi?autoload\x3d%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");"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\x3dDrawGapiClientCallback")}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml"],function(a){mxResources.parse(a[0].getText()); -1navigator.userAgent.indexOf("MSIE")||10<=document.documentMode))&&mxscript("https://js.live.net/v5.0/wl.js",window.DrawOneDriveClientCallback));"0"!=urlParams.chrome&&"1"==urlParams.test&& +App.main=function(a){var c=null;window.onerror=function(a,b,e,f,k){try{if(!(a==c||null!=a&&null!=b&&(-1!=a.indexOf("Script error")||-1!=a.indexOf("extension")))&&null!=a&&0>a.indexOf("DocumentClosedError")){c=a;var l=new Image;b=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"images/3x3.png":"images/2x2.png";l.src=b+"?msg\x3d"+encodeURIComponent(a)+"\x26url\x3d"+encodeURIComponent(window.location.href)+"\x26lnum\x3d"+encodeURIComponent(e)+ +"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+(null!=f?"\x26colno\x3d"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"\x26stack\x3d"+encodeURIComponent(k.stack):"")}}catch(n){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var f=document.createElement("iframe");f.setAttribute("width","0");f.setAttribute("height","0");f.setAttribute("src", +"offline.html");document.body.appendChild(f);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,b,c){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,b,!1)};for(f=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=f;)"shapes"==f.nodeName&&null!=f.getAttribute("name")&& +(mxStencilRegistry.stencilSet[f.getAttribute("name").toLowerCase()]=f,mxStencilRegistry.parseStencilSet(f)),f=f.nextSibling}"0"!=urlParams.picker&&(!mxClient.IS_QUIRKS&&8!=document.documentMode)&&mxscript(document.location.protocol+"//www.google.com/jsapi?autoload\x3d%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");"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\x3dDrawGapiClientCallback")}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;f=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[f]:[f,STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText()); +1navigator.userAgent.indexOf("MSIE")||10<=document.documentMode))&&mxscript("https://js.live.net/v5.0/wl.js",window.DrawOneDriveClientCallback));null!=a&&a(c);"0"!=urlParams.chrome&&"1"==urlParams.test&& (mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. \x3ca href\x3d"javascript:void(0);" onclick\x3d"location.reload();"\x3ePlease try refreshing.\x3c/a\x3e'})};mxUtils.extend(App,EditorUi); App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz\x3d30";App.prototype.micImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA5UlEQVR4Xr3SMYrCQBTGcSfIQiAgRIS9hOANBCurPUAuIAp7A7FVsFkIbLGYA9gKtoKNYG3jll5AFNKG518YMD6SISD4wY9J4MvkMYwRkZqOMSZkifGFe1b4pnvW3TqK8oMo14twxUgXPRSlDxU7TcUNPqATlG7wCi93cA2Iq2x7l7IJsgofB6UTiEjKklFqsabQSdFA5jqDAzrYQGeNNv5d9yDBEAME6NreFmP8Yuma4A8hFpiLSFNAYYYYn0jwCIUnxMcER4h1whS+7hseXKcu9ifGeQ+qeO8GjN7DPve+Q6+oewPhmE63Qfsb6AAAAABJRU5ErkJggg\x3d\x3d"; App.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg\x3d\x3d"; @@ -7656,7 +7656,9 @@ App.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";App.protot App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);if(this.isLocalFileSave()){var a=this;ExportDialog.saveLocalFile=function(b,c,d){var e="text/xml";"svg"===d&&(e="image/svg+xml");a.saveLocalFile(b,c,e)};ExportDialog.saveRequest=function(b,c,d,e){a.saveRequest(b,c,d,e)}}this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);if("1"!=urlParams.embed){this.bg=this.createBackground();document.body.appendChild(this.bg); this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";var c=mxUtils.bind(this,function(){"undefined"!==typeof WL?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=c)});c();var f=mxUtils.bind(this,function(){if("undefined"!== typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='\x3ca href\x3d"https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target\x3d"_blank" title\x3d"IMPORTANT NOTICE" \x3eIMPORTANT NOTICE\x3c/a\x3e'))}));this.drive.addListener("userChanged", -mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load("auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})), +mxUtils.bind(this,function(){null!=this.updateAd&&(this.adsHtml=['\x3ca title\x3d"Quick start video" href\x3d"https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Quick start video\x3c/a\x3e','\x3ca title\x3d"Google Docs Add-on" href\x3d"https://chrome.google.com/webstore/detail/drawio-diagrams/clpbjldiohnnmfmkngmaohehlnfkmoea" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Google Docs Add-on\x3c/a\x3e', +'\x3ca title\x3d"Google Chrome App" href\x3d"https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Google Chrome App\x3c/a\x3e','\x3ca title\x3d"Please help us to 5 stars" href\x3d"https://chrome.google.com/webstore/detail/drawio-pro/onlkggianjhjenigcpigpjehhpplldkc/reviews" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Please help us to 5 stars\x3c/a\x3e'], +this.updateAd(this.adsHtml.length-1));this.updateUserElement();this.restoreLibraries();this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load("auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})), window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f();var d=mxUtils.bind(this,function(){null!=window.Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&& (window.DrawDropboxClientCallback=d)});d();"1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();var b=document.getElementById("geFooterItem2");if(null!=b){this.adsHtml=['\x3ca title\x3d"Quick start video" href\x3d"https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Quick start video\x3c/a\x3e']; this.adsHtml.push(b.innerHTML);mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");var e=this.adsHtml.length-1;this.updateAd=function(a){a==e&&(a=this.adsHtml.length-1);a!=e&&(mxUtils.setPrefixedStyle(b.style,"transform","scale(0)"),b.style.opacity="0",e=a,window.setTimeout(mxUtils.bind(this,function(){b.innerHTML=this.adsHtml[a];mxUtils.setPrefixedStyle(b.style,"transform","scale(1)");b.style.opacity="1"}),1E3))};window.setInterval(mxUtils.bind(this,function(){if(3==this.adsHtml.length)this.updateAd(mxUtils.mod(e+ @@ -7677,12 +7679,13 @@ App.prototype.onBeforeUnload=function(){var a=this.getCurrentFile();if(null!=a){ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var a=this.editor.appName,c=this.getCurrentFile();null!=c&&(a=(null!=c.getTitle()?c.getTitle():this.defaultFilename)+" - "+a);this.isOfflineApp()&&(a+=" ["+mxResources.get("offline")+"]");document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],c,f=0;256>f;f++){c=f;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[f]=c}return a}; App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,f=0;f>>8^this.crcTable[(c^a.charCodeAt(f))&255];return(c^-1)>>>0}; App.prototype.getThumbnail=function(a,c){var f=!1;try{if(null==this.thumbImageCache&&(this.thumbImageCache={}),this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()}),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var d=this.editor.graph,b=document.createElement("canvas"),e=d.getGraphBounds(),g=a/e.width,g=Math.min(1,Math.min(3*a/(4*e.height),g)),k=Math.floor(e.x),l=Math.floor(e.y);b.setAttribute("width",Math.ceil(g* -(e.width+4)));b.setAttribute("height",Math.ceil(g*(e.height+4)));var n=b.getContext("2d");n.scale(g,g);n.translate(-k,-l);var m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";n.save();n.fillStyle=m;n.fillRect(k,l,Math.ceil(e.width+4),Math.ceil(e.height+4));n.restore();var p=new mxJsCanvas(b),r=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var s=new mxImageExport;s.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(0.5, -0.5),a.shape.paint(b),b.translate(-0.5,-0.5),b.restore())};s.drawText=function(a,b){};s.drawState(d.getView().getState(d.model.root),r);r.finish(function(){s.drawState(d.getView().getState(d.model.root),p);c(b)});f=!0}}catch(q){}return f};App.prototype.getPublicUrl=function(a,c){c(null)}; -App.prototype.createFileData=function(a,c,f,d,b,e,g,k,l){b=null!=b?b:!1;l=null!=l?l:!0;var n=null,m=null;null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER?n="_blank":m=n=d;if(!e&&!b&&(g||null!=f&&/(\.html)$/i.test(f.getTitle())))return this.getHtml2(a,c,f.getTitle(),n,m,l);if(null==a)return"";g=a;if("mxfile"!=g.nodeName.toLowerCase()){n=this.editor.graph.zapGremlins(mxUtils.getXml(a));g=this.editor.graph.compress(n);if(this.editor.graph.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram"); -mxUtils.setTextContent(n,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}g.setAttribute("userAgent",navigator.userAgent);g.setAttribute("version",EditorUi.VERSION);g.setAttribute("editor","www.draw.io");a=null!=f?f.getMode():this.mode;null!=a&&g.setAttribute("type",a);a=mxUtils.getXml(g);if(e||!b&&null!=f&&/(\.svg)$/i.test(f.getTitle())){if(null!=f&&(f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,c,d,null,k,l,m)}return a}; -App.prototype.getFileData=function(a,c,f,d,b){b=null!=b?b:!0;var e=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var g=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(e)));mxUtils.setTextContent(this.currentPage.node,g);for(var e=this.fileNode.cloneNode(!1),k=0;k=window.location.hash.length)&&(null!=urlParams.state&& -null!=this.stateArg&&"open"==this.stateArg.action)&&null!=this.stateArg.ids)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?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):(mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){a=this.getDiagramId();var b=this.getCurrentFile();(null==b||b.getHash()!=a)&&this.loadFile(a,!0)})),b())}}}; +a):(/(\.png)($|\?)/i.test(a)&&(c=this.extractGraphModelFromPng(c)),b(c))}),c,/(\.png)($|\?)/i.test(a))});"1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){a=this.getDiagramId();var b=this.getCurrentFile();(null==b||b.getHash()!=a)&&this.loadFile(a,!0)}));if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("loading")))try{var c=mxUtils.bind(this,function(){this.spinner.spin(document.body, +mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["url"]))});a(decodeURIComponent(urlParams.url),mxUtils.bind(this,function(a){this.spinner.stop();if(null!=a&&0=window.location.hash.length)&&null!=e&&0=window.location.hash.length)&&(null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action)&&null!=this.stateArg.ids)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?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):b()}}}; App.prototype.showSplash=function(a){this.editor.chromeless?this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()})):null==this.mode||a?(a=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();var a=new SplashDialog(this);this.showDialog(a.container,340,260,!0,!0);a.init()})),this.showDialog(a.container,isLocalStorage&&"1"==urlParams.browser?480:380,300,!0,!1),a.init()):null==urlParams.create&& (a=new SplashDialog(this),this.showDialog(a.container,340,mxClient.IS_CHROMEAPP?180:260,!0,!0),a.init())}; App.prototype.addLanguageMenu=function(a){var c=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language"))c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geSprite geSprite-globe",c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right="20px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(this.menus.get("language").funct); @@ -7729,9 +7733,8 @@ App.prototype.createFile=function(a,c,f,d,b,e,g){d=null!=d?d:this.mode;if(null!= this.fileCreated(a,f,e,b)}),k)):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){this.spinner.stop();this.fileCreated(a,f,e,b)}),k):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){this.spinner.stop();this.fileCreated(a,f,e,b)}),k,!1,g):d==App.MODE_BROWSER?(this.spinner.stop(),d=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d, f,e,b)}),k)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(this.spinner.stop(),this.fileCreated(new LocalFile(this,c,a),f,e,b))}}; App.prototype.fileCreated=function(a,c,f,d){var b=window.location.pathname;null!=c&&0=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0)}}; +"atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding="2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement); +var f=this.hsplitPosition,d=!1;mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!d);this.toggleFormatPanel(!d);this.hsplitPosition=!d?0:f;this.hideFooter();d=!d;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top= +"8px",this.fullscreenElement.style.top="8px");"1"!=urlParams.embed&&""!=urlParams.url&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("href","javascript:void(0);"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color= +"#666",this.toggleElement.style.top="5px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat",mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(a){this.toggleCompactMode();mxEvent.consume(a)})), +"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement));740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0)}}; App.prototype.toggleCompactMode=function(a){!a&&"none"==this.appIcon.style.display?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility= "visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="4px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none", this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')")}; @@ -7900,10 +7901,10 @@ mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,3 a.actions.addAction("imgur...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToImgur))}));a.actions.addAction("github...",mxUtils.bind(this,function(){a.publishImage(mxUtils.bind(a,a.uploadToGithub))}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){if(null==document.documentMode||10<=document.documentMode)"undefined"!==typeof XMLHttpRequest&&this.addMenuItems(b,["github"],c),this.addMenuItems(b,["imgur"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b, ["publishLink"],c)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("http://www.draw.io/app")}));a.actions.put("chromeApp",new Action(mxResources.get("chromeApp")+"...",function(){window.open("https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())})); this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);!navigator.standalone&&!a.isOffline()&&this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","-"],b);this.addSubmenu("direction",a,b);this.addMenuItems(a,["turn", -"-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var r="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a, +"-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - editGeometry clearWaypoints autosize".split(" "),b)})));var q="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),s=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a, d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};a.actions.addAction("insertText",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("Text",new mxGeometry(a.x,a.y,40,20),"text;html\x3d1;resizable\x3d0;autosize\x3d1;align\x3dleft;verticalAlign\x3dtop;spacingTop\x3d-4;points\x3d[];");a.vertex=!0;d.startEditingAtCell(d.addCell(a))}}, null,null,"Ctrl+Shift+X").isEnabled=b;a.actions.addAction("insertRectangle",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,120,60),"whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+K").isEnabled=b;a.actions.addAction("insertEllipse",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=d.getInsertPoint(),a=new mxCell("",new mxGeometry(a.x,a.y,80,80), -"ellipse;whiteSpace\x3dwrap;html\x3d1;");a.vertex=!0;d.setSelectionCell(d.addCell(a))}},null,null,"Ctrl+Shift+K").isEnabled=b;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c]/g,E={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", -"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function R(b,c,d,g,n){b=C(b);var m=f[b];if(!m||"object"!==typeof m)c.length=0;else{for(var q=m.cssPropBits,p=q&80,x=q&1536,G=NaN,D=0,s=0;D=A)r=q&1?r:"";else if(F=r.charCodeAt(1),H=r.charCodeAt(2),E=48<=F&&57>=F,y=48<=H&&57>=H,43===A&&(E||46===F&&y))r=q&1?(E?"":"0")+r.substring(1):"";else if(45===A&&(E||46===F&&y))r=q&4?(E?"-":"-0")+r.substring(1):q&1?"0":"";else if(46===A&&E)r=q&1?"0"+r:"";else if('url("'===r.substring(0,5))r= -d&&q&16?e(t(k(g,c[D].substring(5,r.length-2)),b,d)):"";else if("("===r.charAt(r.length-1))a:{Q=c;ea=D;r=1;W=ea+1;for(A=Q.length;Wg&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[k].toLowerCase(),b.slice(g,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,g,k){++f;for(k.startBlock&&k.startBlock();fn)return n=~n,n===k?n+1:n;var m=a[n];if("{"!==m)return n===k?n+1:n;c=n+1;n>k&&" "===a[n-1]&&--n;for(g.startRuleset&&g.startRuleset(a.slice(k,n));cm)m=~m;else{for(var q=[],p=0,t=b;tnavigator.userAgent.indexOf("MSIE")&& +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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"3.6.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -1062,16 +1062,16 @@ mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;cmxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl= -function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d= -b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/ -a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected", -function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b}; -var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c); -this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed|| -null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet= -function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init;Graph.prototype.init= -function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d= -this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments), +c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&& +null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2), +f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()}; +this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root, +!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c); +this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"== +urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet; +Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init; +Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this, +arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1a;a++)b.appendChild(arguments[a]);return b}function f(b,a,d,e){var c=["opacity",a,~~(100*b),d,e].join("-");d=0.01+100*(d/e);e=Math.max(1-(1-b)/a*(100-d),b);var f=l.substring(0,l.indexOf("Animation")).toLowerCase();return n[c]||(p.insertRule("@"+ -(f&&"-"+f+"-"||"")+"keyframes "+c+"{0%{opacity:"+e+"}"+d+"%{opacity:"+b+"}"+(d+0.01)+"%{opacity:1}"+(d+a)%100+"%{opacity:"+b+"}100%{opacity:"+e+"}}",p.cssRules.length),n[c]=1),c}function d(b,a){var d,e,c=b.style;a=a.charAt(0).toUpperCase()+a.slice(1);for(e=0;e>1,filter:m}),d("fill",{color:"string"==typeof e.color?e.color:e.color[a%e.color.length],opacity:e.opacity}),d("stroke",{opacity:0}))))}var k,l=e.length+e.width,m=2*l;k=2*-(e.width+e.length)+"px";var n=b(f(),{position:"absolute",top:k,left:k});if(e.shadow)for(k=1;k<=e.lines;k++)g(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(k=1;k<=e.lines;k++)g(k);return c(a,n)};g.prototype.opacity=function(b,a,d,e){b=b.firstChild;e=e.shadow&& -e.lines||0;b&&a+e>1)+"px"})}for(var k, -m=0,n=(e.lines-1)*(1-e.direction)/2;mb;b++)a.appendChild(arguments[b]);return a}function f(a,b,d,e){var c=["opacity",b,~~(100*a),d,e].join("-");d=0.01+100*(d/e);e=Math.max(1-(1-a)/b*(100-d),a);var f=l.substring(0,l.indexOf("Animation")).toLowerCase();return n[c]||(p.insertRule("@"+ +(f&&"-"+f+"-"||"")+"keyframes "+c+"{0%{opacity:"+e+"}"+d+"%{opacity:"+a+"}"+(d+0.01)+"%{opacity:1}"+(d+b)%100+"%{opacity:"+a+"}100%{opacity:"+e+"}}",p.cssRules.length),n[c]=1),c}function d(a,b){var d,e,c=a.style;b=b.charAt(0).toUpperCase()+b.slice(1);for(e=0;e>1,filter:m}),d("fill",{color:"string"==typeof e.color?e.color:e.color[b%e.color.length],opacity:e.opacity}),d("stroke",{opacity:0}))))}var k,l=e.length+e.width,m=2*l;k=2*-(e.width+e.length)+"px";var n=a(f(),{position:"absolute",top:k,left:k});if(e.shadow)for(k=1;k<=e.lines;k++)g(k,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(k=1;k<=e.lines;k++)g(k);return c(b,n)};g.prototype.opacity=function(a,b,d,e){a=a.firstChild;e=e.shadow&& +e.lines||0;a&&b+e>1)+"px"})}for(var k, +m=0,n=(e.lines-1)*(1-e.direction)/2;m>10),56320+(d&1023))):d==d?String.fromCharCode(d):" ">a[1]?"":a[1]}function a(b,d){return'"'+b.replace(/[\u0000-\u001f\\\"<>]/g,d)+'"'}function d(b){return c[b]||(c[b]="\\"+b.charCodeAt(0).toString(16)+" ")}function e(b){return f[b]||(f[b]=("\u0010">b?"%0":"%")+b.charCodeAt(0).toString(16))}var c={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])", -"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(a){return a.replace(m,b)};k=function(b){b=(""+b).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,m=b.length;k=t?" ":/url\(/i.test(q)?"url("+a(q.replace(n,""),e)+")":q;if(f!=q||" "!=q)b[c++]=f=q}b.length=c;return b}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function b(a){a=(""+a).match(n);return!a?f:new g(k(a[1]),k(a[2]),k(a[3]),k(a[4]),k(a[5]),k(a[6]),k(a[7]))}function a(b,e){return"string"==typeof b?encodeURI(b).replace(e,d):f}function d(b){b=b.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(b&15)}function e(b){if(b=== -f)return f;b=b.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var a=l,d;(d=b.replace(a,"$1"))!=b;b=d);return b}function c(b,a){var d=b.T(),f=a.K();f?d.ga(a.j):f=a.X();f?d.da(a.n):f=a.Y();f?d.ea(a.k):f=a.$();var g=a.g,k=e(g);if(f)d.ca(a.V()),k=k&&k.replace(m,"");else if(f=!!g){if(47!==k.charCodeAt(0))var k=e(d.g||"").replace(m,""),l=k.lastIndexOf("/")+1,k=e((l?k.substring(0,l):"")+e(g)).replace(m,"")}else k=k&&k.replace(m,""),k!==g&&d.G(k);f?d.G(k):f=a.aa();f?d.O(a.l):f=a.Z();f&&d.fa(a.o); -return d}function g(b,a,d,e,c,f,k){this.j=b;this.n=a;this.k=d;this.h=e;this.g=c;this.l=f;this.o=k}function k(b){return"string"==typeof b&&0]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", -"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function O(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,u=q&1536,r=NaN,s=0,G=0;s=E)z=q&1?z:"";else if(F=z.charCodeAt(1),B=z.charCodeAt(2),H=48<=F&&57>=F,A=48<=B&&57>=B,43===E&&(H||46===F&&A))z=q&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===F&&A))z=q&4?(H?"-":"-0")+z.substring(1):q&1?"0":"";else if(46===E&&H)z=q&1?"0"+z:"";else if('url("'===z.substring(0, -5))z=f&&q&16?b(t(k(g,c[s].substring(5,z.length-2)),d,f)):"";else if("("===z.charAt(z.length-1))a:{U=c;ea=s;z=1;aa=ea+1;for(E=U.length;aa>10),56320+(d&1023))):d==d?String.fromCharCode(d):" ">b[1]?"":b[1]}function b(a,d){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,d)+'"'}function d(a){return c[a]||(c[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function e(a){return f[a]||(f[a]=("\u0010">a?"%0":"%")+a.charCodeAt(0).toString(16))}var c={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])", +"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(b){return b.replace(m,a)};k=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(g)||[];for(var c=0,f=" ",k=0,m=a.length;k=t?" ":/url\(/i.test(q)?"url("+b(q.replace(n,""),e)+")":q;if(f!=q||" "!=q)a[c++]=f=q}a.length=c;return a}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function a(b){b=(""+b).match(n);return!b?f:new g(k(b[1]),k(b[2]),k(b[3]),k(b[4]),k(b[5]),k(b[6]),k(b[7]))}function b(a,e){return"string"==typeof a?encodeURI(a).replace(e,d):f}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(a=== +f)return f;a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var b=l,d;(d=a.replace(b,"$1"))!=a;a=d);return a}function c(a,b){var d=a.T(),f=b.K();f?d.ga(b.j):f=b.X();f?d.da(b.n):f=b.Y();f?d.ea(b.k):f=b.$();var g=b.g,k=e(g);if(f)d.ca(b.V()),k=k&&k.replace(m,"");else if(f=!!g){if(47!==k.charCodeAt(0))var k=e(d.g||"").replace(m,""),l=k.lastIndexOf("/")+1,k=e((l?k.substring(0,l):"")+e(g)).replace(m,"")}else k=k&&k.replace(m,""),k!==g&&d.G(k);f?d.G(k):f=b.aa();f?d.O(b.l):f=b.Z();f&&d.fa(b.o); +return d}function g(a,b,d,e,c,f,k){this.j=a;this.n=b;this.k=d;this.h=e;this.g=c;this.l=f;this.o=k}function k(a){return"string"==typeof a&&0]/g,B={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", +"\x3c":"%3c","\x3e":"%3e"},E=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var b={};return function O(d,c,f,g,m){d=D(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var q=n.cssPropBits,p=q&80,u=q&1536,r=NaN,s=0,G=0;s=E)z=q&1?z:"";else if(F=z.charCodeAt(1),B=z.charCodeAt(2),H=48<=F&&57>=F,A=48<=B&&57>=B,43===E&&(H||46===F&&A))z=q&1?(H?"":"0")+z.substring(1):"";else if(45===E&&(H||46===F&&A))z=q&4?(H?"-":"-0")+z.substring(1):q&1?"0":"";else if(46===E&&H)z=q&1?"0"+z:"";else if('url("'===z.substring(0, +5))z=f&&q&16?a(t(k(g,c[s].substring(5,z.length-2)),d,f)):"";else if("("===z.charAt(z.length-1))a:{U=c;ea=s;z=1;aa=ea+1;for(E=U.length;aag&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?a(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function a(c,f,g,k){++f;for(k.startBlock&&k.startBlock();fm)return m=~m,m===k?m+1:m;var n=b[m];if("{"!==n)return m===k?m+1:m;a=m+1;m>k&&" "===b[m-1]&&--m;for(g.startRuleset&&g.startRuleset(b.slice(k,m));an)n=~n;else{for(var q=[],p=0,t=a;tg&&" "===d[l-1]&&--l;f.startAtrule&&f.startAtrule(d[k].toLowerCase(),d.slice(g,l));e="{"===d[e]?b(d,e,c,f):e+1;f.endAtrule&&f.endAtrule()}return e}function b(c,f,g,k){++f;for(k.startBlock&&k.startBlock();fm)return m=~m,m===k?m+1:m;var n=a[m];if("{"!==n)return m===k?m+1:m;b=m+1;m>k&&" "===a[m-1]&&--m;for(g.startRuleset&&g.startRuleset(a.slice(k,m));bn)n=~n;else{for(var q=[],p=0,t=b;t])/g;c=b+"";if(ia)c=c.split(g);else{for(var k=[],l=0,m;(m=g.exec(c))!==f;)k.push(c.substring(l,m.index)),k.push(m[0]),l=m.index+m[0].length;k.push(c.substring(l));c=k}p(a,c,0,{r:d,C:d},e)}}function q(b,a,d,e,c){return function(){p(b,a,d,e,c)}}function p(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,m,n=d.length;ec)){for(f=g.length;--f>c;){var k=g[f].v;b.f[k]&b.c.OPTIONAL_ENDTAG||e.push("\x3c/",k,"\x3e")}c/g,Y=/\"/g,U=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ia=3==="a,b".split(/(,)/).length,ea=b.c.CDATA|b.c.RCDATA,aa={},fa={},ja=/^(?:https?|mailto|data)$/i,ga={};ga.pa=ga.escapeAttrib=k;ga.ra=ga.makeHtmlSanitizer=r;ga.sa=ga.makeSaxParser=n;ga.ta=ga.makeTagPolicy=W;ga.wa=ga.normalizeRCData=l;ga.xa= -ga.sanitize=function(b,a,d,e){return Q(b,W(a,d,e))};ga.ya=ga.sanitizeAttribs=S;ga.za=ga.sanitizeWithPolicy=Q;ga.Ba=ga.unescapeEntities=g;return ga}(u);g=b.sanitize;"undefined"!==typeof window&&(window.html=b,window.html_sanitize=g)})(); -!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function c(f,d,b){function e(k,m){if(!d[k]){if(!f[k]){var n="function"==typeof require&&require;if(!m&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=d[k]={exports:{}}; -f[k][0].call(n.exports,function(b){var d=f[k][1][b];return e(d?d:b)},n,n.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;kd.windowBits&&(d.windowBits+=16);this.err=0;this.msg= +u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);a=function(a){function e(a,b){var d;if(P.hasOwnProperty(b))d=P[b];else{var c=b.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=b.match(V))?String.fromCharCode(parseInt(c[1], +16)):K&&J.test(b)?(K.innerHTML="\x26"+b+";",c=K.textContent,P[b]=c):"\x26"+b+";"}return d}function g(a){return a.replace(X,e)}function k(a){return(""+a).replace(ca,"\x26amp;").replace(Z,"\x26lt;").replace(ba,"\x26gt;").replace(Y,"\x26#34;")}function l(a){return a.replace(T,"\x26amp;$1").replace(Z,"\x26lt;").replace(ba,"\x26gt;")}function n(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a, +e){var c,g=/(<\/|<\!--|<[!?]|[&<>])/g;c=a+"";if(ia)c=c.split(g);else{for(var k=[],l=0,m;(m=g.exec(c))!==f;)k.push(c.substring(l,m.index)),k.push(m[0]),l=m.index+m[0].length;k.push(c.substring(l));c=k}p(b,c,0,{r:d,C:d},e)}}function q(a,b,d,e,c){return function(){p(a,b,d,e,c)}}function p(b,d,e,f,g){try{b.H&&0==e&&b.H(g);for(var k,l,m,n=d.length;ec)){for(f=g.length;--f>c;){var k=g[f].v;a.f[k]&a.c.OPTIONAL_ENDTAG||e.push("\x3c/",k,"\x3e")}c/g,Y=/\"/g,U=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ia=3==="a,b".split(/(,)/).length,ea=a.c.CDATA|a.c.RCDATA,aa={},fa={},ja=/^(?:https?|mailto|data)$/i,ga={};ga.pa=ga.escapeAttrib=k;ga.ra=ga.makeHtmlSanitizer=r;ga.sa=ga.makeSaxParser=n;ga.ta=ga.makeTagPolicy=W;ga.wa=ga.normalizeRCData=l;ga.xa= +ga.sanitize=function(a,b,d,e){return Q(a,W(b,d,e))};ga.ya=ga.sanitizeAttribs=S;ga.za=ga.sanitizeWithPolicy=Q;ga.Ba=ga.unescapeEntities=g;return ga}(u);g=a.sanitize;"undefined"!==typeof window&&(window.html=a,window.html_sanitize=g)})(); +!function(b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=b()}(function(){return function c(f,d,a){function e(k,m){if(!d[k]){if(!f[k]){var n="function"==typeof require&&require;if(!m&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=d[k]={exports:{}}; +f[k][0].call(n.exports,function(a){var d=f[k][1][a];return e(d?d:a)},n,n.exports,c,f,d,a)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;kd.windowBits&&(d.windowBits+=16);this.err=0;this.msg= "";this.ended=!1;this.chunks=[];this.strm=new n;this.strm.avail_out=0;var e=g.deflateInit2(this.strm,d.level,d.method,d.windowBits,d.memLevel,d.strategy);if(e!==r)throw Error(m[e]);if(d.header&&g.deflateSetHeader(this.strm,d.header),d.dictionary){var c;if(c="string"==typeof d.dictionary?l.string2buf(d.dictionary):"[object ArrayBuffer]"===p.call(d.dictionary)?new Uint8Array(d.dictionary):d.dictionary,e=g.deflateSetDictionary(this.strm,c),e!==r)throw Error(m[e]);this._dict_set=!0}}function e(d,e){var c= -new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/deflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/messages"),n=c("./zlib/zstream"),p=Object.prototype.toString,r=0,s=-1,q=0,t=8;b.prototype.push=function(b,d){var e,c,f=this.strm,m=this.options.chunkSize;if(this.ended)return!1;c=d===~~d?d:!0===d?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0=== -f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),e=g.deflate(f,c),1!==e&&e!==r)return this.onEnd(e),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==c&&2!==c)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0e.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15));!(0<=e.windowBits&&16>e.windowBits)||d&&d.windowBits||(e.windowBits+=32);15e.windowBits&&0===(15&e.windowBits)&&(e.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;d=g.inflateInit2(this.strm,e.windowBits);if(d!==m.Z_OK)throw Error(n[d]); -this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new b(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;b.prototype.push=function(b,d){var e,c,f,n,p,r,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,F=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH; -"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,r)),e===m.Z_BUF_ERROR&&!0===F&&(e=m.Z_OK,F=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e), +new a(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/deflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/messages"),n=c("./zlib/zstream"),p=Object.prototype.toString,r=0,s=-1,q=0,t=8;a.prototype.push=function(a,d){var e,c,f=this.strm,m=this.options.chunkSize;if(this.ended)return!1;c=d===~~d?d:!0===d?4:0;"string"==typeof a?f.input=l.string2buf(a):"[object ArrayBuffer]"===p.call(a)?f.input=new Uint8Array(a):f.input=a;f.next_in=0;f.avail_in=f.input.length;do{if(0=== +f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),e=g.deflate(f,c),1!==e&&e!==r)return this.onEnd(e),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==c&&2!==c)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0e.windowBits&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15));!(0<=e.windowBits&&16>e.windowBits)||d&&d.windowBits||(e.windowBits+=32);15e.windowBits&&0===(15&e.windowBits)&&(e.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;d=g.inflateInit2(this.strm,e.windowBits);if(d!==m.Z_OK)throw Error(n[d]); +this.header=new r;g.inflateGetHeader(this.strm,this.header)}function e(d,e){var c=new a(e);if(c.push(d,!0),c.err)throw c.msg;return c.result}var g=c("./zlib/inflate"),k=c("./utils/common"),l=c("./utils/strings"),m=c("./zlib/constants"),n=c("./zlib/messages"),p=c("./zlib/zstream"),r=c("./zlib/gzheader"),s=Object.prototype.toString;a.prototype.push=function(a,d){var e,c,f,n,p,r,A=this.strm,B=this.options.chunkSize,E=this.options.dictionary,F=!1;if(this.ended)return!1;c=d===~~d?d:!0===d?m.Z_FINISH:m.Z_NO_FLUSH; +"string"==typeof a?A.input=l.binstring2buf(a):"[object ArrayBuffer]"===s.call(a)?A.input=new Uint8Array(a):A.input=a;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(B),A.next_out=0,A.avail_out=B),e=g.inflate(A,m.Z_NO_FLUSH),e===m.Z_NEED_DICT&&E&&(r="string"==typeof E?l.string2buf(E):"[object ArrayBuffer]"===s.call(E)?new Uint8Array(E):E,e=g.inflateSetDictionary(this.strm,r)),e===m.Z_BUF_ERROR&&!0===F&&(e=m.Z_OK,F=!1),e!==m.Z_STREAM_END&&e!==m.Z_OK)return this.onEnd(e), this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&e!==m.Z_STREAM_END&&(0!==A.avail_in||c!==m.Z_FINISH&&c!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),n=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=n,A.avail_out=B-n,n&&k.arraySet(A.output,A.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(F=!0)}while((0d&&(b.subarray&&k||!b.subarray&&g))return String.fromCharCode.apply(null,e.shrinkBuf(b,d));for(var c="",f=0;fc;c++)n[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;n[254]=n[254]=1;d.string2buf=function(b){var d,c,f,g,k,l=b.length,m=0;for(g=0;gc?1:2048>c?2:65536>c?3:4;d=new e.Buf8(m);for(g=k=0;kc?d[k++]=c:2048> -c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6&63,d[k++]=128|63&c):(d[k++]=240|c>>>18,d[k++]=128|c>>>12&63,d[k++]=128|c>>>6&63,d[k++]=128|63&c);return d};d.buf2binstring=function(d){return b(d,d.length)};d.binstring2buf=function(b){for(var d=new e.Buf8(b.length),c=0,f=d.length;cg)m[f++]=g;else if(k=n[g],4g?m[f++]=g:(g-=65536,m[f++]=55296|g>>10&1023,m[f++]=56320|1023&g)}return b(m,f)};d.utf8border=function(b,d){var e;d=d||b.length;d>b.length&&(d=b.length);for(e=d-1;0<=e&&128===(192&b[e]);)e--;return 0>e?d:0===e?d:e+n[b[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(b,d,c,f){var l=65535&b|0;b=b>>>16&65535|0;for(var m=0;0!==c;){m=2E3c;c++){b=c; -for(var f=0;8>f;f++)b=1&b?3988292384^b>>>1:b>>>1;d[c]=b}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l>>8^b[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function b(b,d){return b.msg=E[d],d}function e(b){for(var d=b.length;0<=--d;)b[d]=0}function g(b){var d=b.state,e=d.pending;e>b.avail_out&&(e=b.avail_out);0!==e&&(x.arraySet(b.output,d.pending_buf,d.pending_out,e,b.next_out),b.next_out+=e,d.pending_out+=e,b.total_out+=e,b.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out= -0))}function k(b,d){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;g(b.strm)}function l(b,d){b.pending_buf[b.pending++]=d}function m(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=255&d}function n(b,d){var e,c,f=b.max_chain_length,g=b.strstart,k=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-X?b.strstart-(b.w_size-X):0,n=b.window,q=b.w_mask,p=b.prev,t=b.strstart+R,u=n[g+k-1],r=n[g+k];b.prev_length>=b.good_match&& -(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===r&&n[e+k-1]===u&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;e++;do;while(n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&gk){if(b.match_start=d,k=c,c>=l)break;u=n[g+k-1];r=n[g+k]}}while((d=p[d&q])>m&&0!==--f);return k<=b.lookahead?k:b.lookahead}function p(b){var d,e,c,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>= -g+(g-X)){x.arraySet(b.window,b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;d=e=b.hash_size;do c=b.head[--d],b.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=b.prev[--d],b.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===b.strm.avail_in)break;d=b.strm;c=b.window;var k=b.strstart+b.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)), -b.lookahead+=e,b.lookahead+b.insert>=K){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<< -b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==e&&b.strstart-e<=b.w_size-X&&(b.match_length=n(b,e)),b.match_length>=K)if(c=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=K&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===O||b.match_length===K&&4096= -K&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-K;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<d&&(a.subarray&&k||!a.subarray&&g))return String.fromCharCode.apply(null,e.shrinkBuf(a,d));for(var c="",f=0;fc;c++)n[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;n[254]=n[254]=1;d.string2buf=function(a){var d,c,f,g,k,l=a.length,m=0;for(g=0;gc?1:2048>c?2:65536>c?3:4;d=new e.Buf8(m);for(g=k=0;kc?d[k++]=c:2048> +c?(d[k++]=192|c>>>6,d[k++]=128|63&c):65536>c?(d[k++]=224|c>>>12,d[k++]=128|c>>>6&63,d[k++]=128|63&c):(d[k++]=240|c>>>18,d[k++]=128|c>>>12&63,d[k++]=128|c>>>6&63,d[k++]=128|63&c);return d};d.buf2binstring=function(d){return a(d,d.length)};d.binstring2buf=function(a){for(var d=new e.Buf8(a.length),c=0,f=d.length;cg)m[f++]=g;else if(k=n[g],4g?m[f++]=g:(g-=65536,m[f++]=55296|g>>10&1023,m[f++]=56320|1023&g)}return a(m,f)};d.utf8border=function(a,d){var e;d=d||a.length;d>a.length&&(d=a.length);for(e=d-1;0<=e&&128===(192&a[e]);)e--;return 0>e?d:0===e?d:e+n[a[e]]>d?e:d}},{"./common":3}],5:[function(c,f,d){f.exports=function(a,d,c,f){var l=65535&a|0;a=a>>>16&65535|0;for(var m=0;0!==c;){m=2E3c;c++){a=c; +for(var f=0;8>f;f++)a=1&a?3988292384^a>>>1:a>>>1;d[c]=a}return d}();f.exports=function(d,c,f,l){f=l+f;for(d^=-1;l>>8^a[255&(d^c[l])];return d^-1}},{}],8:[function(c,f,d){function a(a,d){return a.msg=E[d],d}function e(a){for(var d=a.length;0<=--d;)a[d]=0}function g(a){var d=a.state,e=d.pending;e>a.avail_out&&(e=a.avail_out);0!==e&&(x.arraySet(a.output,d.pending_buf,d.pending_out,e,a.next_out),a.next_out+=e,d.pending_out+=e,a.total_out+=e,a.avail_out-=e,d.pending-=e,0===d.pending&&(d.pending_out= +0))}function k(a,d){D._tr_flush_block(a,0<=a.block_start?a.block_start:-1,a.strstart-a.block_start,d);a.block_start=a.strstart;g(a.strm)}function l(a,d){a.pending_buf[a.pending++]=d}function m(a,d){a.pending_buf[a.pending++]=d>>>8&255;a.pending_buf[a.pending++]=255&d}function n(a,d){var e,c,f=a.max_chain_length,g=a.strstart,k=a.prev_length,l=a.nice_match,m=a.strstart>a.w_size-X?a.strstart-(a.w_size-X):0,n=a.window,q=a.w_mask,p=a.prev,t=a.strstart+R,u=n[g+k-1],r=n[g+k];a.prev_length>=a.good_match&& +(f>>=2);l>a.lookahead&&(l=a.lookahead);do if(e=d,n[e+k]===r&&n[e+k-1]===u&&n[e]===n[g]&&n[++e]===n[g+1]){g+=2;e++;do;while(n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&n[++g]===n[++e]&&gk){if(a.match_start=d,k=c,c>=l)break;u=n[g+k-1];r=n[g+k]}}while((d=p[d&q])>m&&0!==--f);return k<=a.lookahead?k:a.lookahead}function p(a){var d,e,c,f,g=a.w_size;do{if(f=a.window_size-a.lookahead-a.strstart,a.strstart>= +g+(g-X)){x.arraySet(a.window,a.window,g,g,0);a.match_start-=g;a.strstart-=g;a.block_start-=g;d=e=a.hash_size;do c=a.head[--d],a.head[d]=c>=g?c-g:0;while(--e);d=e=g;do c=a.prev[--d],a.prev[d]=c>=g?c-g:0;while(--e);f+=g}if(0===a.strm.avail_in)break;d=a.strm;c=a.window;var k=a.strstart+a.lookahead,l=d.avail_in;if(e=(l>f&&(l=f),0===l?0:(d.avail_in-=l,x.arraySet(c,d.input,d.next_in,l,k),1===d.state.wrap?d.adler=A(d.adler,c,l,k):2===d.state.wrap&&(d.adler=B(d.adler,c,l,k)),d.next_in+=l,d.total_in+=l,l)), +a.lookahead+=e,a.lookahead+a.insert>=K){f=a.strstart-a.insert;a.ins_h=a.window[f];for(a.ins_h=(a.ins_h<=K&&(a.ins_h=(a.ins_h<< +a.hash_shift^a.window[a.strstart+K-1])&a.hash_mask,e=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==e&&a.strstart-e<=a.w_size-X&&(a.match_length=n(a,e)),a.match_length>=K)if(c=D._tr_tally(a,a.strstart-a.match_start,a.match_length-K),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=K){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=K&&(a.ins_h=(a.ins_h<=a.match_length&&(a.strategy===O||a.match_length===K&&4096= +K&&a.match_length<=a.prev_length){f=a.strstart+a.lookahead-K;c=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-K);a.lookahead-=a.prev_length-1;a.prev_length-=2;do++a.strstart<=f&&(a.ins_h=(a.ins_h<e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=F,D._tr_init(e),H):b(d,I)}function v(b){var d=u(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start= -0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=K-1,b.match_available=0,b.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15g||g>C||c!==Q||8>f||15e||9k||k>S)return b(d,I);8===f&&(f=9);var m=new t;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===F)return T;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return T}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?ba:Y):(b.strstart>b.block_start&&k(b,!1),T)}),new q(4,4,8, -4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,d){return z(b,d,Q,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?I:(b.state.gzhead=d,H):I};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5c)return d?b(d,I):I;if(n=d.state,!d.output||!d.input&&0!==d.avail_in|| -666===n.status&&c!==G)return b(d,0===d.avail_out?-5:I);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length), +this.lit_bufsize=this.l_buf=0}function u(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=W,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=F,D._tr_init(e),H):a(d,I)}function v(a){var d=u(a);d===H&&(a=a.state,a.window_size=2*a.w_size,e(a.head),a.max_lazy_match=y[a.level].max_lazy,a.good_match=y[a.level].good_length,a.nice_match=y[a.level].nice_length,a.max_chain_length=y[a.level].max_chain,a.strstart=0,a.block_start= +0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=K-1,a.match_available=0,a.ins_h=0);return d}function z(d,e,c,f,g,k){if(!d)return I;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15g||g>C||c!==Q||8>f||15e||9k||k>S)return a(d,I);8===f&&(f=9);var m=new t;return d.state=m,m.strm=d,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<a.pending_buf_size-5&&(e=a.pending_buf_size-5);;){if(1>=a.lookahead){if(p(a),0===a.lookahead&&d===F)return T;if(0===a.lookahead)break}a.strstart+=a.lookahead;a.lookahead=0;var c=a.block_start+e;if((0===a.strstart||a.strstart>=c)&&(a.lookahead=a.strstart-c,a.strstart=c,k(a,!1),0===a.strm.avail_out)||a.strstart-a.block_start>=a.w_size-X&&(k(a,!1),0===a.strm.avail_out))return T}return a.insert=0,d===G?(k(a,!0),0===a.strm.avail_out?ba:Y):(a.strstart>a.block_start&&k(a,!1),T)}),new q(4,4,8, +4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(a,d){return z(a,d,Q,15,8,0)};d.deflateInit2=z;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(a,d){return a&&a.state?2!==a.state.wrap?I:(a.state.gzhead=d,H):I};d.deflate=function(d,c){var f,n,q,t;if(!d||!d.state||5c)return d?a(d,I):I;if(n=d.state,!d.output||!d.input&&0!==d.avail_in|| +666===n.status&&c!==G)return a(d,0===d.avail_out?-5:I);if(n.strm=d,f=n.last_flush,n.last_flush=c,n.status===da)2===n.wrap?(d.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length), l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(d.adler=B(d.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ca)):(q=Q+(n.w_bits-8<<4)<<8,t=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=t<<6,0!==n.strstart&&(q|=32),n.status=ca,m(n,q+(31-q%31)),0!==n.strstart&&(m(n,d.adler>>>16),m(n,65535&d.adler)),d.adler=1);if(69===n.status)if(n.gzhead.extra){for(q=n.pending;n.gzindex<(65535& n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&& (d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d),q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindexq&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){q=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>q&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q)),g(d), q=n.pending,n.pending===n.pending_buf_size)){t=1;break}t=n.gzindexq&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===t&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(d),n.pending+2<=n.pending_buf_size&&(l(n,255&d.adler),l(n,d.adler>>8&255),d.adler=0,n.status=ca)):n.status=ca),0!==n.pending){if(g(d),0===d.avail_out)return n.last_flush= --1,H}else if(0===d.avail_in&&(c<<1)-(4=K&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>= K?(u=D._tr_tally(n,1,n.match_length-K),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(u=D._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),u&&(k(n,!1),0===n.strm.avail_out)){u=T;break a}}u=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:Y):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?T:Z)}else u=y[n.level].func(n,c);if(u!==ba&&u!==Y||(n.status=666),u===T||u===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(u===Z&&(1===c?D._tr_align(n):5!==c&&(D._tr_stored_block(n, 0,0,!1),3===c&&(e(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(d),0===d.avail_out))return n.last_flush=-1,H}return c!==G?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&d.adler),l(n,d.adler>>8&255),l(n,d.adler>>16&255),l(n,d.adler>>24&255),l(n,255&d.total_in),l(n,d.total_in>>8&255),l(n,d.total_in>>16&255),l(n,d.total_in>>24&255)):(m(n,d.adler>>>16),m(n,65535&d.adler)),g(d),0=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=f;b.next_in= -0;b.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<z&&(v+=I[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<>>=E,z-=E);15>z&&(v+=I[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255, -!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<r){b.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=m-n,G>E){if(E=G-E,E>q&&c.sane){b.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=u,0===t){if(B+=s-E,E>3;f-=F;z-=F<<3;b.next_in=f;b.next_out=m;b.avail_in=f>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work= -new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(D),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state, -0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15=b.wsize?(s.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),s.arraySet(b.window,d,e- -c,f,b.wnext),c-=f,c?(s.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave=c.w_size&&(0===k&&(e(c.head),c.strstart=0,c.block_start=0,c.insert=0),l=new x.Buf8(c.w_size),x.arraySet(l,d,f-c.w_size,c.w_size,0),d=l,f=c.w_size);l=a.avail_in;m=a.next_in;n=a.input;a.avail_in=f;a.next_in= +0;a.input=d;for(p(c);c.lookahead>=K;){f=c.strstart;g=c.lookahead-(K-1);do c.ins_h=(c.ins_h<z&&(v+=I[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=y[(65535&B)+(v&(1<>>=E,z-=E);15>z&&(v+=I[f++]<>>24,v>>>=E,z-=E,E=B>>>16&255, +!(16&E)){if(0===(64&E)){B=x[(65535&B)+(v&(1<r){a.msg="invalid distance too far back";c.mode=30;break a}if(v>>>=E,z-=E,E=m-n,G>E){if(E=G-E,E>q&&c.sane){a.msg="invalid distance too far back";c.mode=30;break a}if(B=0,H=u,0===t){if(B+=s-E,E>3;f-=F;z-=F<<3;a.next_in=f;a.next_out=m;a.avail_in=f>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work= +new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(a){var d;return a&&a.state?(d=a.state,a.total_in=a.total_out=d.total=0,a.msg="",d.wrap&&(a.adler=1&d.wrap),d.mode=x,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new s.Buf32(D),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,z):y}function k(a){var d;return a&&a.state?(d=a.state,d.wsize=0,d.whave=0,d.wnext=0,g(a)):y}function l(a,d){var e,c;return a&&a.state?(c=a.state, +0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15=a.wsize?(s.arraySet(a.window,d,e-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(f=a.wsize-a.wnext,f>c&&(f=c),s.arraySet(a.window,d,e- +c,f,a.wnext),c-=f,c?(s.arraySet(a.window,d,e-c,c,0),a.wnext=c,a.whave=a.wsize):(a.wnext+=f,a.wnext===a.wsize&&(a.wnext=0),a.whaveC;){if(0===m)break a;m--;A+=f[k++]<>>8&255;c.check=t(c.check,U,2,0);C=A=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1), !(1&c.wrap)||(((255&A)<<8)+(A>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&A)){d.msg="unknown compression method";c.mode=30;break}if(A>>>=4,C-=4,T=(15&A)+8,0===c.wbits)c.wbits=T;else if(T>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<C;){if(0===m)break a;m--;A+=f[k++]<>8&1);512&c.flags&&(U[0]=255&A,U[1]=A>>>8&255,c.check=t(c.check,U,2,0));C=A=0;c.mode=3;case 3:for(;32>C;){if(0===m)break a;m--;A+=f[k++]<>>8&255,U[2]=A>>>16&255,U[3]=A>>>24&255,c.check=t(c.check,U,4,0));C=A=0;c.mode=4;case 4:for(;16>C;){if(0===m)break a;m--;A+=f[k++]<>8);512&c.flags&&(U[0]=255&A,U[1]=A>>>8&255,c.check=t(c.check,U,2,0));C=A=0;c.mode= 5;case 5:if(1024&c.flags){for(;16>C;){if(0===m)break a;m--;A+=f[k++]<>>8&255,c.check=t(c.check,U,2,0));C=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>m&&(M=m),M&&(c.head&&(T=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,M,T)),512&c.flags&&(c.check=t(c.check,f,M,k)),m-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode= 7;case 7:if(2048&c.flags){if(0===m)break a;M=0;do T=f[k+M++],c.head&&T&&65536>c.length&&(c.head.name+=String.fromCharCode(T));while(T&&Mc.length&&(c.head.comment+=String.fromCharCode(T));while(T&&MC;){if(0===m)break a;m--;A+=f[k++]<>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>C;){if(0===m)break a;m--;A+=f[k++]<>>= +9;case 9:if(512&c.flags){for(;16>C;){if(0===m)break a;m--;A+=f[k++]<>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>C;){if(0===m)break a;m--;A+=f[k++]<>>= 7&C;C-=7&C;c.mode=27;break}for(;3>C;){if(0===m)break a;m--;A+=f[k++]<>>=1,C-=1,3&A){case 0:c.mode=14;break;case 1:J=c;if(B){p=new s.Buf32(512);r=new s.Buf32(32);for(R=0;144>R;)J.lens[R++]=8;for(;256>R;)J.lens[R++]=9;for(;280>R;)J.lens[R++]=7;for(;288>R;)J.lens[R++]=8;v(1,J.lens,0,288,p,0,J.work,{bits:9});for(R=0;32>R;)J.lens[R++]=5;v(2,J.lens,0,32,r,0,J.work,{bits:5});B=!1}J.lencode=p;J.lenbits=9;J.distcode=r;J.distbits=5;if(c.mode=20,6===e){A>>>=2;C-=2;break a}break;case 2:c.mode= 17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;C-=2;break;case 14:A>>>=7&C;for(C-=7&C;32>C;){if(0===m)break a;m--;A+=f[k++]<>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&A,A=0,C=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>m&&(M=m),M>D&&(M=D),0===M)break a;s.arraySet(g,f,k,M,l);m-=M;k+=M;D-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>C;){if(0===m)break a;m--;A+=f[k++]<>>=5,C-=5,c.ndist=(31&A)+1,A>>>=5,C-=5,c.ncode=(15&A)+4,A>>>=4,C-=4,286C;){if(0===m)break a;m--;A+=f[k++]<>>=3;C-=3}for(;19>c.have;)c.lens[ia[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ba={bits:c.lenbits},Z=v(0,c.lens,0,19,c.lencode,0,c.work,ba),c.lenbits=ba.bits,Z){d.msg="invalid code lengths set";c.mode=30;break}c.have= @@ -164,135 +164,135 @@ Z=v(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.bits,Z){d.msg= C;C+=8}if(J&&0===(240&J)){X=K;da=J;for(ca=R;Y=c.lencode[ca+((A&(1<>X)],K=Y>>>24,J=Y>>>16&255,R=65535&Y,!(X+K<=C);){if(0===m)break a;m--;A+=f[k++]<>>=X;C-=X;c.back+=X}if(A>>>=K,C-=K,c.back+=K,c.length=R,0===J){c.mode=26;break}if(32&J){c.back=-1;c.mode=12;break}if(64&J){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&J;c.mode=22;case 22:if(c.extra){for(J=c.extra;C>>=c.extra;C-=c.extra;c.back+= c.extra}c.was=c.length;c.mode=23;case 23:for(;Y=c.distcode[A&(1<>>24,J=Y>>>16&255,R=65535&Y,!(K<=C);){if(0===m)break a;m--;A+=f[k++]<>X)],K=Y>>>24,J=Y>>>16&255,R=65535&Y,!(X+K<=C);){if(0===m)break a;m--;A+=f[k++]<>>=X;C-=X;c.back+=X}if(A>>>=K,C-=K,c.back+=K,64&J){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&J;c.mode=24;case 24:if(c.extra){for(J=c.extra;C>>=c.extra;C-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(M=P-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,V=c.wsize-M):V=c.wnext-M;M>c.length&&(M=c.length);J=c.window}else J=g,V=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=J[V++];while(--M);0===c.length&&(c.mode= -21);break;case 26:if(0===D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>C;){if(0===m)break a;m--;A|=f[k++]<C;){if(0===m)break a;m--;A+=f[k++]<C;){if(0===m)break a;m--;A|=f[k++]<C;){if(0===m)break a;m--;A+=f[k++]<c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,P-d.avail_out)?(c.mode=31,-4):(N-=d.avail_in,P-=d.avail_out,d.total_in+=N,d.total_out+=P,c.total+=P,c.wrap&&P&&(d.adler=c.check=c.flags?t(c.check,g,P,d.next_out-P):q(c.check,g,P,d.next_out-P)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15=== -c.mode?256:0),(0===N&&0===P||4===e)&&Z===z&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,z};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:n(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):y};d.inflateInfo="pako inflate (from Nodeca project)"}, -{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24, -25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,u){var v,z,y,x,D,A,B,E;x=u.bits;for(var F=0,G=0,H=0,I=0,L=0,O=0,S=0,W=0,Q=0,C=null,N=0,P=new b.Buf16(16),O=new b.Buf16(16),M=null,V=0,F=0;15>=F;F++)P[F]=0;for(G=0;GI&&(L=I),0===I)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H=F;F++)if(v<<=1,v-=P[F],0>v)return-1;if(0F;F++)O[F+ +c.mode?256:0),(0===N&&0===P||4===e)&&Z===z&&(Z=-5),Z)};d.inflateEnd=function(a){if(!a||!a.state)return y;var d=a.state;return d.window&&(d.window=null),a.state=null,z};d.inflateGetHeader=function(a,d){var e;return a&&a.state?(e=a.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,z)):y};d.inflateSetDictionary=function(a,d){var e,c,f=d.length;return a&&a.state?(e=a.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:n(a,d,f,f)?(e.mode=31,-4):(e.havedict=1,z)):y};d.inflateInfo="pako inflate (from Nodeca project)"}, +{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var a=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24, +25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,r,s,q,t,u){var v,z,y,x,D,A,B,E;x=u.bits;for(var F=0,G=0,H=0,I=0,L=0,O=0,S=0,W=0,Q=0,C=null,N=0,P=new a.Buf16(16),O=new a.Buf16(16),M=null,V=0,F=0;15>=F;F++)P[F]=0;for(G=0;GI&&(L=I),0===I)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H=F;F++)if(v<<=1,v-=P[F],0>v)return-1;if(0F;F++)O[F+ 1]=O[F]+P[F];for(G=0;GD?(B=M[V+t[G]],E=C[N+t[G]]):(B=96,E=0);v=1<>S)+z]=A<<24|B<<16|E|0;while(0!==z);for(v=1<>=1;if(0!==v?(Q&=v-1,Q+=v):Q=0,G++,0===--P[F]){if(F===I)break;F=c[f+t[G]]}if(F>L&&(Q&r)!==y){0===S&&(S=L);x+=H;O= -F-S;for(v=1<=v));)O++,v<<=1;if(W+=1<>>8&255}function l(b,d,e){b.bi_valid>W-e?(b.bi_buf|=d<>W-b.bi_valid,b.bi_valid+=e-W):(b.bi_buf|=d<>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(S+1),g=0;for(c=1;c<=S;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=n(f[c]++,c))}function r(b){var d;for(d=0;dc?da[c]:da[256+(c>>>7)],m(b,g,e),k=V[g], -0!==k&&(c-=Z[g],l(b,c,k)));while(nb.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=m;for(e=b.heap_len>>1;1<=e;e--)t(b,g,e);f=l;do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1), -c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,u=d.stat_desc.static_tree,r=d.stat_desc.has_stree,v=d.stat_desc.extra_bits,s=d.stat_desc.extra_base,x=d.stat_desc.max_length,y=0;for(c=0;c<=S;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;ex&&(c=x,y++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=s&&(n=v[f-s]),q=k[2*f],b.opt_len+=q*(c+n),r&&(b.static_len+=q*(u[2*f+1]+n)));if(0!==y){do{for(c=x-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[x]--;y-=2}while(0l||(k[2*n+1]!==c&&(b.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,b.bl_count)}function z(b,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<= -e;c++)f=k,k=d[2*(c+1)+1],++l=l?b.bl_tree[2*N]++:b.bl_tree[2*P]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function y(b,d,e){var c,f,g=-1,k=d[1],n=0,q=7,p=4;0===k&&(q=138,p=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n=n?(m(b,N,b.bl_tree),l(b,n-3,3)):(m(b,P,b.bl_tree),l(b, -n-11,7));n=0;g=f;0===k?(q=138,p=3):f===k?(q=6,p=3):(q=7,p=4)}}function x(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return B;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return E;for(d=32;df;f++){T[f]=c;for(d=0;d<1<f;f++){Z[f]=c;for(d=0;d<1<>=7;f=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,H+1,k);for(d=0;d>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e,c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),u(b,R,X); -else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(ca[e]+G+1)]++,b.dyn_dtree[2*(256> -d?da[d]:da[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,Q,R);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(c, -f,d){d=c("./lib/utils/common").assign;var b=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,b,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); -var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,c){var f="",d,b,e,g,k,l,m=0;for(null!=c&&c||(a=Base64._utf8_encode(a));m>2,d=(d&3)<<4|b>>4,k=(b&15)<<2|e>>6,l=e&63,isNaN(b)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(a,c){c=null!=c?c:!1;var f="",d,b,e,g,k,l=0;for(a= -a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,b=(b&15)<<4|g>>2,e=(g&3)<<6|k,f+=String.fromCharCode(d),64!=g&&(f+=String.fromCharCode(b)),64!=k&&(f+=String.fromCharCode(e));c||(f=Base64._utf8_decode(f));return f},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var c="",f=0;fd?c+=String.fromCharCode(d): -(127d?c+=String.fromCharCode(d>>6|192):(c+=String.fromCharCode(d>>12|224),c+=String.fromCharCode(d>>6&63|128)),c+=String.fromCharCode(d&63|128))}return c},_utf8_decode:function(a){for(var c="",f=0,d=c1=c2=0;fd?(c+=String.fromCharCode(d),f++):191d?(c2=a.charCodeAt(f+1),c+=String.fromCharCode((d&31)<<6|c2&63),f+=2):(c2=a.charCodeAt(f+1),c3=a.charCodeAt(f+2),c+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),f+=3);return c}},JSON;JSON||(JSON={}); -(function(){function a(b){return 10>b?"0"+b:b}function c(a){b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(b){var a=k[b];return"string"===typeof a?a:"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(b,a){var d,k,s,q,t=e,u,v=a[b];v&&"object"===typeof v&&"function"===typeof v.toJSON&&(v=v.toJSON(b));"function"===typeof l&&(v=l.call(a,b,v));switch(typeof v){case "string":return c(v);case "number":return isFinite(v)?""+v:"null";case "boolean":case "null":return""+ +F-S;for(v=1<=v));)O++,v<<=1;if(W+=1<>>8&255}function l(a,d,e){a.bi_valid>W-e?(a.bi_buf|=d<>W-a.bi_valid,a.bi_valid+=e-W):(a.bi_buf|=d<>>=1,e<<=1;while(0<--d);return e>>>1}function p(a,d,e){var c,f=Array(S+1),g=0;for(c=1;c<=S;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=a[2*e+1],0!==c&&(a[2*e]=n(f[c]++,c))}function r(a){var d;for(d=0;dc?da[c]:da[256+(c>>>7)],m(a,g,e),k=V[g], +0!==k&&(c-=Z[g],l(a,c,k)));while(na.heap_len;)f=a.heap[++a.heap_len]=2>m?++m:0,g[2*f]=1,a.depth[f]=0,a.opt_len--,k&&(a.static_len-=c[2*f+1]);d.max_code=m;for(e=a.heap_len>>1;1<=e;e--)t(a,g,e);f=l;do e=a.heap[1],a.heap[1]=a.heap[a.heap_len--],t(a,g,1), +c=a.heap[1],a.heap[--a.heap_max]=e,a.heap[--a.heap_max]=c,g[2*f]=g[2*e]+g[2*c],a.depth[f]=(a.depth[e]>=a.depth[c]?a.depth[e]:a.depth[c])+1,g[2*e+1]=g[2*c+1]=f,a.heap[1]=f++,t(a,g,1);while(2<=a.heap_len);a.heap[--a.heap_max]=a.heap[1];var n,q,k=d.dyn_tree,l=d.max_code,u=d.stat_desc.static_tree,r=d.stat_desc.has_stree,v=d.stat_desc.extra_bits,s=d.stat_desc.extra_base,x=d.stat_desc.max_length,y=0;for(c=0;c<=S;c++)a.bl_count[c]=0;k[2*a.heap[a.heap_max]+1]=0;for(e=a.heap_max+1;ex&&(c=x,y++),k[2*f+1]=c,f>l||(a.bl_count[c]++,n=0,f>=s&&(n=v[f-s]),q=k[2*f],a.opt_len+=q*(c+n),r&&(a.static_len+=q*(u[2*f+1]+n)));if(0!==y){do{for(c=x-1;0===a.bl_count[c];)c--;a.bl_count[c]--;a.bl_count[c+1]+=2;a.bl_count[x]--;y-=2}while(0l||(k[2*n+1]!==c&&(a.opt_len+=(c-k[2*n+1])*k[2*n],k[2*n+1]=c),f--)}p(g,m,a.bl_count)}function z(a,d,e){var c,f,g=-1,k=d[1],l=0,m=7,n=4;0===k&&(m=138,n=3);d[2*(e+1)+1]=65535;for(c=0;c<= +e;c++)f=k,k=d[2*(c+1)+1],++l=l?a.bl_tree[2*N]++:a.bl_tree[2*P]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function y(a,d,e){var c,f,g=-1,k=d[1],n=0,q=7,p=4;0===k&&(q=138,p=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n=n?(m(a,N,a.bl_tree),l(a,n-3,3)):(m(a,P,a.bl_tree),l(a, +n-11,7));n=0;g=f;0===k?(q=138,p=3):f===k?(q=6,p=3):(q=7,p=4)}}function x(a){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==a.dyn_ltree[2*d])return B;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return E;for(d=32;df;f++){T[f]=c;for(d=0;d<1<f;f++){Z[f]=c;for(d=0;d<1<>=7;f=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,H+1,k);for(d=0;d>>3;g=a.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(a,d,e,c);else if(4===a.strategy||g===f)l(a,2+(c?1:0),3),u(a,R,X); +else{l(a,4+(c?1:0),3);d=a.l_desc.max_code+1;e=a.d_desc.max_code+1;k+=1;l(a,d-257,5);l(a,e-1,5);l(a,k-4,4);for(f=0;f>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&d,a.pending_buf[a.l_buf+a.last_lit]=255&e,a.last_lit++,0===d?a.dyn_ltree[2*e]++:(a.matches++,d--,a.dyn_ltree[2*(ca[e]+G+1)]++,a.dyn_dtree[2*(256> +d?da[d]:da[256+(d>>>7)])]++),a.last_lit===a.lit_bufsize-1};d._tr_align=function(a){l(a,2,3);m(a,Q,R);16===a.bi_valid?(k(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):8<=a.bi_valid&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(c, +f,d){d=c("./lib/utils/common").assign;var a=c("./lib/deflate"),e=c("./lib/inflate");c=c("./lib/zlib/constants");var g={};d(g,a,e,c);f.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")}); +var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(b,c){var f="",d,a,e,g,k,l,m=0;for(null!=c&&c||(b=Base64._utf8_encode(b));m>2,d=(d&3)<<4|a>>4,k=(a&15)<<2|e>>6,l=e&63,isNaN(a)?k=l=64:isNaN(e)&&(l=64),f=f+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return f},decode:function(b,c){c=null!=c?c:!1;var f="",d,a,e,g,k,l=0;for(b= +b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,a=(a&15)<<4|g>>2,e=(g&3)<<6|k,f+=String.fromCharCode(d),64!=g&&(f+=String.fromCharCode(a)),64!=k&&(f+=String.fromCharCode(e));c||(f=Base64._utf8_decode(f));return f},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");for(var c="",f=0;fd?c+=String.fromCharCode(d): +(127d?c+=String.fromCharCode(d>>6|192):(c+=String.fromCharCode(d>>12|224),c+=String.fromCharCode(d>>6&63|128)),c+=String.fromCharCode(d&63|128))}return c},_utf8_decode:function(b){for(var c="",f=0,d=c1=c2=0;fd?(c+=String.fromCharCode(d),f++):191d?(c2=b.charCodeAt(f+1),c+=String.fromCharCode((d&31)<<6|c2&63),f+=2):(c2=b.charCodeAt(f+1),c3=b.charCodeAt(f+2),c+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),f+=3);return c}},JSON;JSON||(JSON={}); +(function(){function b(a){return 10>a?"0"+a:a}function c(b){a.lastIndex=0;return a.test(b)?'"'+b.replace(a,function(a){var b=k[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'}function f(a,b){var d,k,s,q,t=e,u,v=b[a];v&&"object"===typeof v&&"function"===typeof v.toJSON&&(v=v.toJSON(a));"function"===typeof l&&(v=l.call(b,a,v));switch(typeof v){case "string":return c(v);case "number":return isFinite(v)?""+v:"null";case "boolean":case "null":return""+ v;case "object":if(!v)return"null";e+=g;u=[];if("[object Array]"===Object.prototype.toString.apply(v)){q=v.length;for(d=0;dnavigator.userAgent.indexOf("MSIE")&& +var mxClient={VERSION:"3.6.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| 0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_WIN:0document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,c,f){f=f||document;if(mxClient.IS_IE6)f.write('\x3clink rel\x3d"'+a+'" href\x3d"'+c+'" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=f.createElement("link");d.setAttribute("rel", -a);d.setAttribute("href",c);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");f.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('\x3cscript src\x3d"'+a+'"\x3e\x3c/script\x3e')},dispose:function(){for(var a=0;adocument.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(b,c,f){f=f||document;if(mxClient.IS_IE6)f.write('\x3clink rel\x3d"'+b+'" href\x3d"'+c+'" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e');else{var d=f.createElement("link");d.setAttribute("rel", +b);d.setAttribute("href",c);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");f.getElementsByTagName("head")[0].appendChild(d)}},include:function(b){document.write('\x3cscript src\x3d"'+b+'"\x3e\x3c/script\x3e')},dispose:function(){for(var b=0;bd&&g?(d++,window.setTimeout(b,e)):null!=f&&f()},e=30;b()},cascadeOpacity:function(a,c,f){for(var d=a.model.getChildCount(c),b=0;bdocument.documentMode&&(a="ms");return function(c,f,d){c[f]=d;null!=a&&0document.documentMode))switch(c.nodeType){case 1:var d=a.createElement(c.nodeName);if(c.attributes&&0/g,"\x26gt;");if(null==c||c)a=a.replace(/\n/g,"\x26#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,c){var f="";null!=window.XMLSerializer?f=(new XMLSerializer).serializeToString(a):null!=a.xml&&(f=a.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,"\x3e").replace(/\r\n/g,"\n"));return f.replace(/\n/g,c||"\x26#xa;")},extractTextWithWhitespace:function(a){for(var c= -!1,f=[],d=0;a[d];d++){var b=a[d];if(3===b.nodeType||4===b.nodeType){if(11==document.documentMode&&d==a.length-1&&0==b.nodeValue.length)break;f.push(b.nodeValue+(null==b.nextSibling||3!=b.nextSibling.nodeType?"\n":""));c=!0}else 8!==b.nodeType&&((mxClient.IS_IE||mxClient.IS_IE11)&&"P"==b.nodeName&&0==b.innerHTML.length||!c&&"BR"==b.nodeName||"DIV"==b.nodeName&&"\x3cbr\x3e"==b.innerHTML?f.push("\n"):f.push(mxUtils.extractTextWithWhitespace(b.childNodes)),c=!1)}return f.join("")},replaceTrailingNewlines:function(a, -c){for(var f="";0k&&(a.style.left=Math.max(b,k-f)+"px");c=parseInt(a.offsetTop); -f=parseInt(a.offsetHeight);e=d+Math.max(e.clientHeight||0,g.clientHeight);c+f>e&&(a.style.top=Math.max(d,e-f)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,c,f,d,b,e){a=new mxXmlRequest(a,null,"GET");null!=d&&a.setBinary(d);a.send(c,f,b,e);return a},getAll:function(a,c,f){for(var d=a.length,b=[],e=0,g=function(){0==e&&null!=f&&f();e++},k=0;kf||299mxUtils.indexOf(c,b)))d[b]=!f&&"object"==typeof a[b]?mxUtils.clone(a[b]):a[b]}return d},equalPoints:function(a,c){if(null==a&&null!=c||null!=a&&null==c||null!=a&&null!=c&&a.length!=c.length)return!1;if(null!=a&&null!=c)for(var f=0;fb&&(b+=2*Math.PI);g=2*b/Math.PI;g=Math.ceil(0>g?-1*g:g);b/=g;m=8/3*Math.sin(b/4)*Math.sin(b/4)/Math.sin(b/2);n=p*f;p*=d;f*=r;d*=r;for(var v=Math.cos(e),z=Math.sin(e),s=-m*(n*z+d*v),q=-m*(f*z-p*v),r=[],y=0;yf&&(a=3,-135>=f&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:c|=mxConstants.DIRECTION_MASK_EAST;break;case 2:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:c|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_WEST;break;case 1:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:c|=mxConstants.DIRECTION_MASK_EAST;break;case 3:c|= -mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:c|=mxConstants.DIRECTION_MASK_WEST;break;case 2:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:c|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:c|=mxConstants.DIRECTION_MASK_EAST;break;case 1:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:c|=mxConstants.DIRECTION_MASK_WEST;break;case 3:c|=mxConstants.DIRECTION_MASK_NORTH}return c}, -reversePortConstraints:function(a){var c=0,c=(a&mxConstants.DIRECTION_MASK_WEST)<<3,c=c|(a&mxConstants.DIRECTION_MASK_NORTH)<<1,c=c|(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return c|(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,c,f){var d=-1;if(0f.x&&(a=f.x,k=c.x);k>g&&(k=g);ak)return!1;var b=c.y,g=f.y,l=f.x-c.x;1E-7g&&(c=g,g=b,b=c);g>e&&(g=e);bg?!1:!0},contains:function(a,c,f){return a.x<=c&&a.x+a.width>=c&&a.y<=f&&a.y+a.height>=f},intersects:function(a,c){var f=a.width,d=a.height,b=c.width,e=c.height;if(0>=b||0>=e||0>=f||0>=d)return!1;var g=a.x,k=a.y,l=c.x,m=c.y,b=b+l,e=e+m,f=f+ -g,d=d+k;return(bg)&&(ek)&&(fl)&&(dm)},intersectsHotspot:function(a,c,f,d,b,e){d=null!=d?d:1;b=null!=b?b:0;e=null!=e?e:0;if(0a.toLowerCase().indexOf("0x"))},isInteger:function(a){return String(parseInt(a))===String(a)},mod:function(a,c){return(a%c+c)%c},intersection:function(a,c,f,d,b,e,g,k){var l=(k-e)*(f-a)-(g-b)*(d-c);g=((g-b)*(c-e)-(k-e)*(a-b))/l;b=((f-a)*(c-e)-(d-c)*(a-b))/l;return 0<=g&&1>=g&&0<=b&&1>=b?new mxPoint(a+g*(f-a),c+g*(d-c)):null},ptSegDistSq:function(a,c,f,d,b,e){f-=a;d-=c;b-=a;e-=c;0>=b*f+e*d?f=0:(b=f-b,e=d-e,a=b*f+e*d,f=0>=a?0:a*a/(f*f+d*d));b=b*b+e*e-f;0>b&&(b=0); -return b},ptLineDist:function(a,c,f,d,b,e){return Math.abs((d-c)*b-(f-a)*e+f*c-d*a)/Math.sqrt((d-c)*(d-c)+(f-a)*(f-a))},relativeCcw:function(a,c,f,d,b,e){f-=a;d-=c;b-=a;e-=c;a=b*d-e*f;0==a&&(a=b*f+e*d,0a&&(a=0)));return 0>a?-1:0document.documentMode)?a.style.filter=100<=c?"":"alpha(opacity\x3d"+c+")":a.style.opacity=c/100},createImage:function(a){var c=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a),c.style.borderStyle="none"):(c=document.createElement("img"),c.setAttribute("src",a),c.setAttribute("border", -"0"));return c},sortCells:function(a,c){c=null!=c?c:!0;var f=new mxDictionary;a.sort(function(a,b){var e=f.get(a);null==e&&(e=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),f.put(a,e));var g=f.get(b);null==g&&(g=mxCellPath.create(b).split(mxCellPath.PATH_SEPARATOR),f.put(b,g));e=mxCellPath.compare(e,g);return 0==e?0:0a.indexOf("\x3d"))?a:""},getStylenames:function(a){var c=[];if(null!=a){a=a.split(";");for(var f= -0;fa[f].indexOf("\x3d")&&c.push(a[f])}return c},indexOfStylename:function(a,c){if(null!=a&&null!=c)for(var f=a.split(";"),d=0,b=0;bmxUtils.indexOfStylename(a,c)&&(null==a?a="":0b?";":a.substring(b)):0>b||b==a.length-1?"":a.substring(b+1)}else{var e=a.indexOf(";"+c+"\x3d");0>e?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+c+"\x3d"+f+";"):(b=a.indexOf(";",e+1),a=d?a.substring(0,e+1)+c+"\x3d"+f+(0>b?";":a.substring(b)):a.substring(0,e)+(0>b?";":a.substring(b)))}return a},setCellStyleFlags:function(a,c,f,d,b){if(null!=c&&0b)b=";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+b+c+"\x3d"+f:a+b+c+"\x3d0";else{var e=a.indexOf(";",b),g="",g=0>e?a.substring(b+c.length+1):a.substring(b+c.length+1,e),g=null==d?parseInt(g)^f:d?parseInt(g)|f:parseInt(g)&~f;a=a.substring(0,b)+c+"\x3d"+g+(0<=e?a.substring(e):"")}}return a},getAlignmentAsPoint:function(a,c){var f= -0,d=0;a==mxConstants.ALIGN_CENTER?f=-0.5:a==mxConstants.ALIGN_RIGHT&&(f=-1);c==mxConstants.ALIGN_MIDDLE?d=-0.5:c==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(f,d)},getSizeForString:function(a,c,f,d){c=null!=c?c:mxConstants.DEFAULT_FONTSIZE;f=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;var b=document.createElement("div");b.style.fontFamily=f;b.style.fontSize=Math.round(c)+"px";b.style.lineHeight=Math.round(c*mxConstants.LINE_HEIGHT)+"px";b.style.position="absolute";b.style.visibility="hidden"; -b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.zoom="1";null!=d?(b.style.width=d+"px",b.style.whiteSpace="normal"):b.style.whiteSpace="nowrap";b.innerHTML=a;document.body.appendChild(b);a=new mxRectangle(0,0,b.offsetWidth,b.offsetHeight);document.body.removeChild(b);return a},getViewXml:function(a,c,f,d,b){d=null!=d?d:0;b=null!=b?b:0;c=null!=c?c:1;null==f&&(f=[a.getModel().getRoot()]);var e=a.getView(),g=null,k=e.isEventsEnabled();e.setEventsEnabled(!1);var l=e.drawPane,m=e.overlayPane; -a.dialect==mxConstants.DIALECT_SVG?(e.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),e.canvas.appendChild(e.drawPane),e.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(e.drawPane=e.drawPane.cloneNode(!1),e.canvas.appendChild(e.drawPane),e.overlayPane=e.overlayPane.cloneNode(!1));e.canvas.appendChild(e.overlayPane);var n=e.getTranslate();e.translate=new mxPoint(d,b);c=new mxTemporaryCellStates(a.getView(),c,f);try{g=(new mxCodec).encode(a.getView())}finally{c.destroy(),e.translate= -n,e.canvas.removeChild(e.drawPane),e.canvas.removeChild(e.overlayPane),e.drawPane=l,e.overlayPane=m,e.setEventsEnabled(k)}return g},getScaleForPageCount:function(a,c,f,d){if(1>a)return 1;f=null!=f?f:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var b=f.width-2*d;f=f.height-2*d;d=c.getGraphBounds().clone();c=c.getView().getScale();d.width/=c;d.height/=c;c=d.width;f=c/d.height/(b/f);d=Math.sqrt(a);var e=Math.sqrt(f);f=d*e;d/=e;if(1>f&&d>a){var g=d/a;d=a;f/=g}1>d&&f>a&&(g=f/a,f=a,d/=g);g=Math.ceil(f)* -Math.ceil(d);for(e=0;g>a;){var g=Math.floor(f)/f,k=Math.floor(d)/d;1==g&&(g=Math.floor(f-1)/f);1==k&&(k=Math.floor(d-1)/d);g=g>k?g:k;f*=g;d*=g;g=Math.ceil(f)*Math.ceil(d);e++;if(10d&&g?(d++,window.setTimeout(a,e)):null!=f&&f()},e=30;a()},cascadeOpacity:function(b,c,f){for(var d=b.model.getChildCount(c),a=0;adocument.documentMode&&(b="ms");return function(c,f,d){c[f]=d;null!=b&&0document.documentMode))switch(c.nodeType){case 1:var d=b.createElement(c.nodeName);if(c.attributes&&0/g,"\x26gt;");if(null==c||c)b=b.replace(/\n/g,"\x26#xa;");return b},isVml:function(b){return null!=b&&"urn:schemas-microsoft-com:vml"==b.tagUrn},getXml:function(b,c){var f="";null!=window.XMLSerializer?f=(new XMLSerializer).serializeToString(b):null!=b.xml&&(f=b.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,"\x3e").replace(/\r\n/g,"\n"));return f.replace(/\n/g,c||"\x26#xa;")},extractTextWithWhitespace:function(b){for(var c= +!1,f=[],d=0;b[d];d++){var a=b[d];if(3===a.nodeType||4===a.nodeType){if(11==document.documentMode&&d==b.length-1&&0==a.nodeValue.length)break;f.push(a.nodeValue+(null==a.nextSibling||3!=a.nextSibling.nodeType?"\n":""));c=!0}else 8!==a.nodeType&&((mxClient.IS_IE||mxClient.IS_IE11)&&"P"==a.nodeName&&0==a.innerHTML.length||!c&&"BR"==a.nodeName||"DIV"==a.nodeName&&"\x3cbr\x3e"==a.innerHTML?f.push("\n"):f.push(mxUtils.extractTextWithWhitespace(a.childNodes)),c=!1)}return f.join("")},replaceTrailingNewlines:function(b, +c){for(var f="";0k&&(b.style.left=Math.max(a,k-f)+"px");c=parseInt(b.offsetTop); +f=parseInt(b.offsetHeight);e=d+Math.max(e.clientHeight||0,g.clientHeight);c+f>e&&(b.style.top=Math.max(d,e-f)+"px")},load:function(b){b=new mxXmlRequest(b,null,"GET",!1);b.send();return b},get:function(b,c,f,d,a,e){b=new mxXmlRequest(b,null,"GET");null!=d&&b.setBinary(d);b.send(c,f,a,e);return b},getAll:function(b,c,f){for(var d=b.length,a=[],e=0,g=function(){0==e&&null!=f&&f();e++},k=0;kf||299mxUtils.indexOf(c,a)))d[a]=!f&&"object"==typeof b[a]?mxUtils.clone(b[a]):b[a]}return d},equalPoints:function(b,c){if(null==b&&null!=c||null!=b&&null==c||null!=b&&null!=c&&b.length!=c.length)return!1;if(null!=b&&null!=c)for(var f=0;fa&&(a+=2*Math.PI);g=2*a/Math.PI;g=Math.ceil(0>g?-1*g:g);a/=g;m=8/3*Math.sin(a/4)*Math.sin(a/4)/Math.sin(a/2);n=p*f;p*=d;f*=r;d*=r;for(var v=Math.cos(e),z=Math.sin(e),s=-m*(n*z+d*v),q=-m*(f*z-p*v),r=[],y=0;yf&&(b=3,-135>=f&&(b=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(b){case 0:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:c|=mxConstants.DIRECTION_MASK_EAST;break;case 2:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:c|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(b){case 0:c|=mxConstants.DIRECTION_MASK_WEST;break;case 1:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:c|=mxConstants.DIRECTION_MASK_EAST;break;case 3:c|= +mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(b){case 0:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:c|=mxConstants.DIRECTION_MASK_WEST;break;case 2:c|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:c|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(b){case 0:c|=mxConstants.DIRECTION_MASK_EAST;break;case 1:c|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:c|=mxConstants.DIRECTION_MASK_WEST;break;case 3:c|=mxConstants.DIRECTION_MASK_NORTH}return c}, +reversePortConstraints:function(b){var c=0,c=(b&mxConstants.DIRECTION_MASK_WEST)<<3,c=c|(b&mxConstants.DIRECTION_MASK_NORTH)<<1,c=c|(b&mxConstants.DIRECTION_MASK_SOUTH)>>1;return c|(b&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(b,c,f){var d=-1;if(0f.x&&(b=f.x,k=c.x);k>g&&(k=g);bk)return!1;var a=c.y,g=f.y,l=f.x-c.x;1E-7g&&(c=g,g=a,a=c);g>e&&(g=e);ag?!1:!0},contains:function(b,c,f){return b.x<=c&&b.x+b.width>=c&&b.y<=f&&b.y+b.height>=f},intersects:function(b,c){var f=b.width,d=b.height,a=c.width,e=c.height;if(0>=a||0>=e||0>=f||0>=d)return!1;var g=b.x,k=b.y,l=c.x,m=c.y,a=a+l,e=e+m,f=f+ +g,d=d+k;return(ag)&&(ek)&&(fl)&&(dm)},intersectsHotspot:function(b,c,f,d,a,e){d=null!=d?d:1;a=null!=a?a:0;e=null!=e?e:0;if(0b.toLowerCase().indexOf("0x"))},isInteger:function(b){return String(parseInt(b))===String(b)},mod:function(b,c){return(b%c+c)%c},intersection:function(b,c,f,d,a,e,g,k){var l=(k-e)*(f-b)-(g-a)*(d-c);g=((g-a)*(c-e)-(k-e)*(b-a))/l;a=((f-b)*(c-e)-(d-c)*(b-a))/l;return 0<=g&&1>=g&&0<=a&&1>=a?new mxPoint(b+g*(f-b),c+g*(d-c)):null},ptSegDistSq:function(b,c,f,d,a,e){f-=b;d-=c;a-=b;e-=c;0>=a*f+e*d?f=0:(a=f-a,e=d-e,b=a*f+e*d,f=0>=b?0:b*b/(f*f+d*d));a=a*a+e*e-f;0>a&&(a=0); +return a},ptLineDist:function(b,c,f,d,a,e){return Math.abs((d-c)*a-(f-b)*e+f*c-d*b)/Math.sqrt((d-c)*(d-c)+(f-b)*(f-b))},relativeCcw:function(b,c,f,d,a,e){f-=b;d-=c;a-=b;e-=c;b=a*d-e*f;0==b&&(b=a*f+e*d,0b&&(b=0)));return 0>b?-1:0document.documentMode)?b.style.filter=100<=c?"":"alpha(opacity\x3d"+c+")":b.style.opacity=c/100},createImage:function(b){var c=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",b),c.style.borderStyle="none"):(c=document.createElement("img"),c.setAttribute("src",b),c.setAttribute("border", +"0"));return c},sortCells:function(b,c){c=null!=c?c:!0;var f=new mxDictionary;b.sort(function(b,a){var e=f.get(b);null==e&&(e=mxCellPath.create(b).split(mxCellPath.PATH_SEPARATOR),f.put(b,e));var g=f.get(a);null==g&&(g=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),f.put(a,g));e=mxCellPath.compare(e,g);return 0==e?0:0b.indexOf("\x3d"))?b:""},getStylenames:function(b){var c=[];if(null!=b){b=b.split(";");for(var f= +0;fb[f].indexOf("\x3d")&&c.push(b[f])}return c},indexOfStylename:function(b,c){if(null!=b&&null!=c)for(var f=b.split(";"),d=0,a=0;amxUtils.indexOfStylename(b,c)&&(null==b?b="":0a?";":b.substring(a)):0>a||a==b.length-1?"":b.substring(a+1)}else{var e=b.indexOf(";"+c+"\x3d");0>e?d&&(d=";"==b.charAt(b.length-1)?"":";",b=b+d+c+"\x3d"+f+";"):(a=b.indexOf(";",e+1),b=d?b.substring(0,e+1)+c+"\x3d"+f+(0>a?";":b.substring(a)):b.substring(0,e)+(0>a?";":b.substring(a)))}return b},setCellStyleFlags:function(b,c,f,d,a){if(null!=c&&0a)a=";"==b.charAt(b.length-1)?"":";",b=d||null==d?b+a+c+"\x3d"+f:b+a+c+"\x3d0";else{var e=b.indexOf(";",a),g="",g=0>e?b.substring(a+c.length+1):b.substring(a+c.length+1,e),g=null==d?parseInt(g)^f:d?parseInt(g)|f:parseInt(g)&~f;b=b.substring(0,a)+c+"\x3d"+g+(0<=e?b.substring(e):"")}}return b},getAlignmentAsPoint:function(b,c){var f= +0,d=0;b==mxConstants.ALIGN_CENTER?f=-0.5:b==mxConstants.ALIGN_RIGHT&&(f=-1);c==mxConstants.ALIGN_MIDDLE?d=-0.5:c==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(f,d)},getSizeForString:function(b,c,f,d){c=null!=c?c:mxConstants.DEFAULT_FONTSIZE;f=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;var a=document.createElement("div");a.style.fontFamily=f;a.style.fontSize=Math.round(c)+"px";a.style.lineHeight=Math.round(c*mxConstants.LINE_HEIGHT)+"px";a.style.position="absolute";a.style.visibility="hidden"; +a.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a.style.zoom="1";null!=d?(a.style.width=d+"px",a.style.whiteSpace="normal"):a.style.whiteSpace="nowrap";a.innerHTML=b;document.body.appendChild(a);b=new mxRectangle(0,0,a.offsetWidth,a.offsetHeight);document.body.removeChild(a);return b},getViewXml:function(b,c,f,d,a){d=null!=d?d:0;a=null!=a?a:0;c=null!=c?c:1;null==f&&(f=[b.getModel().getRoot()]);var e=b.getView(),g=null,k=e.isEventsEnabled();e.setEventsEnabled(!1);var l=e.drawPane,m=e.overlayPane; +b.dialect==mxConstants.DIALECT_SVG?(e.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),e.canvas.appendChild(e.drawPane),e.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(e.drawPane=e.drawPane.cloneNode(!1),e.canvas.appendChild(e.drawPane),e.overlayPane=e.overlayPane.cloneNode(!1));e.canvas.appendChild(e.overlayPane);var n=e.getTranslate();e.translate=new mxPoint(d,a);c=new mxTemporaryCellStates(b.getView(),c,f);try{g=(new mxCodec).encode(b.getView())}finally{c.destroy(),e.translate= +n,e.canvas.removeChild(e.drawPane),e.canvas.removeChild(e.overlayPane),e.drawPane=l,e.overlayPane=m,e.setEventsEnabled(k)}return g},getScaleForPageCount:function(b,c,f,d){if(1>b)return 1;f=null!=f?f:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var a=f.width-2*d;f=f.height-2*d;d=c.getGraphBounds().clone();c=c.getView().getScale();d.width/=c;d.height/=c;c=d.width;f=c/d.height/(a/f);d=Math.sqrt(b);var e=Math.sqrt(f);f=d*e;d/=e;if(1>f&&d>b){var g=d/b;d=b;f/=g}1>d&&f>b&&(g=f/b,f=b,d/=g);g=Math.ceil(f)* +Math.ceil(d);for(e=0;g>b;){var g=Math.floor(f)/f,k=Math.floor(d)/d;1==g&&(g=Math.floor(f-1)/f);1==k&&(k=Math.floor(d-1)/d);g=g>k?g:k;f*=g;d*=g;g=Math.ceil(f)*Math.ceil(d);e++;if(10document.documentMode)?function(a){mxEvent.addListener(a, -"contextmenu",function(){return!1})}:function(a){a.setAttribute("oncontextmenu","return false;")}}(),getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&& -null!=a.touches&&1document.documentMode)?function(b){mxEvent.addListener(b, +"contextmenu",function(){return!1})}:function(b){b.setAttribute("oncontextmenu","return false;")}}(),getSource:function(b){return null!=b.srcElement?b.srcElement:b.target},isConsumed:function(b){return null!=b.isConsumed&&b.isConsumed},isTouchEvent:function(b){return null!=b.pointerType?"touch"==b.pointerType||b.pointerType===b.MSPOINTER_TYPE_TOUCH:null!=b.mozInputSource?5==b.mozInputSource:0==b.type.indexOf("touch")},isMultiTouchEvent:function(b){return null!=b.type&&0==b.type.indexOf("touch")&& +null!=b.touches&&1navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=a?"auto":"hidden")}; -mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement()),a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var c=mxWindow.activeWindow.getElement();null!=c&&null!=c.style&&(c.style.zIndex=a)}c=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",c))}};mxWindow.prototype.getElement=function(){return this.div}; +mxWindow.prototype.init=function(b,c,f,d,a){a=null!=a?a:"mxWindow";this.div=document.createElement("div");this.div.className=a;this.div.style.left=b+"px";this.div.style.top=c+"px";this.table=document.createElement("table");this.table.className=a;mxClient.IS_POINTER&&(this.div.style.touchAction="none");null!=f&&(mxClient.IS_QUIRKS||(this.div.style.width=f+"px"),this.table.style.width=f+"px");null!=d&&(mxClient.IS_QUIRKS||(this.div.style.height=d+"px"),this.table.style.height=d+"px");b=document.createElement("tbody"); +c=document.createElement("tr");this.title=document.createElement("td");this.title.className=a+"Title";c.appendChild(this.title);b.appendChild(c);c=document.createElement("tr");this.td=document.createElement("td");this.td.className=a+"Pane";7==document.documentMode&&(this.td.style.height="100%");this.contentWrapper=document.createElement("div");this.contentWrapper.className=a+"Pane";this.contentWrapper.style.width="100%";this.contentWrapper.appendChild(this.content);if(mxClient.IS_QUIRKS||"DIV"!=this.content.nodeName.toUpperCase())this.contentWrapper.style.height= +"100%";this.td.appendChild(this.contentWrapper);c.appendChild(this.td);b.appendChild(c);this.table.appendChild(b);this.div.appendChild(this.table);a=mxUtils.bind(this,function(a){this.activate()});mxEvent.addGestureListeners(this.title,a);mxEvent.addGestureListeners(this.table,a);this.hide()};mxWindow.prototype.setTitle=function(b){for(var c=this.title.firstChild;null!=c;){var f=c.nextSibling;c.nodeType==mxConstants.NODETYPE_TEXT&&c.parentNode.removeChild(c);c=f}mxUtils.write(this.title,b||"")}; +mxWindow.prototype.setScrollable=function(b){0>navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=b?"auto":"hidden")}; +mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var b=mxUtils.getCurrentStyle(this.getElement()),b=null!=b?b.zIndex:3;if(mxWindow.activeWindow){var c=mxWindow.activeWindow.getElement();null!=c&&null!=c.style&&(c.style.zIndex=b)}c=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(b)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",c))}};mxWindow.prototype.getElement=function(){return this.div}; mxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?"none"!=this.resize.style.display:!1}; -mxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="2px";this.resize.style.right="2px";this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif");this.resize.style.cursor="nw-resize";var c=null,f=null,d=null,b=null;a=mxUtils.bind(this,function(a){this.activate();c=mxEvent.getClientX(a);f=mxEvent.getClientY(a);d=this.div.offsetWidth;b=this.div.offsetHeight;mxEvent.addGestureListeners(document, -null,e,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",a));mxEvent.consume(a)});var e=mxUtils.bind(this,function(a){if(null!=c&&null!=f){var e=mxEvent.getClientX(a)-c,g=mxEvent.getClientY(a)-f;this.setSize(d+e,b+g);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",a));mxEvent.consume(a)}}),g=mxUtils.bind(this,function(b){null!=c&&null!=f&&(f=c=null,mxEvent.removeGestureListeners(document,null,e,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",b)),mxEvent.consume(b))}); -mxEvent.addGestureListeners(this.resize,a,e,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")}; -mxWindow.prototype.setSize=function(a,c){a=Math.max(this.minimumSize.width,a);c=Math.max(this.minimumSize.height,c);mxClient.IS_QUIRKS||(this.div.style.width=a+"px",this.div.style.height=c+"px");this.table.style.width=a+"px";this.table.style.height=c+"px";mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")};mxWindow.prototype.setMinimizable=function(a){this.minimize.style.display=a?"":"none"}; +mxWindow.prototype.setResizable=function(b){if(b)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="2px";this.resize.style.right="2px";this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif");this.resize.style.cursor="nw-resize";var c=null,f=null,d=null,a=null;b=mxUtils.bind(this,function(b){this.activate();c=mxEvent.getClientX(b);f=mxEvent.getClientY(b);d=this.div.offsetWidth;a=this.div.offsetHeight;mxEvent.addGestureListeners(document, +null,e,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",b));mxEvent.consume(b)});var e=mxUtils.bind(this,function(b){if(null!=c&&null!=f){var e=mxEvent.getClientX(b)-c,g=mxEvent.getClientY(b)-f;this.setSize(d+e,a+g);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",b));mxEvent.consume(b)}}),g=mxUtils.bind(this,function(a){null!=c&&null!=f&&(f=c=null,mxEvent.removeGestureListeners(document,null,e,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",a)),mxEvent.consume(a))}); +mxEvent.addGestureListeners(this.resize,b,e,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")}; +mxWindow.prototype.setSize=function(b,c){b=Math.max(this.minimumSize.width,b);c=Math.max(this.minimumSize.height,c);mxClient.IS_QUIRKS||(this.div.style.width=b+"px",this.div.style.height=c+"px");this.table.style.width=b+"px";this.table.style.height=c+"px";mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")};mxWindow.prototype.setMinimizable=function(b){this.minimize.style.display=b?"":"none"}; mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)}; -mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img");this.minimize.setAttribute("src",this.minimizeImage);this.minimize.setAttribute("align","right");this.minimize.setAttribute("title","Minimize");this.minimize.style.cursor="pointer";this.minimize.style.marginRight="1px";this.minimize.style.display="none";this.title.appendChild(this.minimize);var a=!1,c=null,f=null,d=mxUtils.bind(this,function(b){this.activate();if(a)a=!1,this.minimize.setAttribute("src", -this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=c,mxClient.IS_QUIRKS||(this.div.style.height=f),this.table.style.height=f,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",b));else{a=!0;this.minimize.setAttribute("src",this.normalizeImage);this.minimize.setAttribute("title","Normalize");this.contentWrapper.style.display="none";c=this.maximize.style.display; -this.maximize.style.display="none";f=this.table.style.height;var d=this.getMinimumSize();0=b.x-e.x&&d>=b.y-e.y&&f<=b.x-e.x+a.container.offsetWidth&&d<=b.y-e.y+a.container.offsetHeight}; -mxDragSource.prototype.mouseMove=function(a){var c=this.getGraphForEvent(a);null!=c&&!this.graphContainsEvent(c,a)&&(c=null);c!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=c,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null!=this.dragElement&&(null==this.previewElement||"visible"!=this.previewElement.style.visibility)){var c=mxEvent.getClientX(a),f=mxEvent.getClientY(a); -null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(c+=this.dragOffset.x,f+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=c+d.x+"px";this.dragElement.style.top=f+d.y+"px"}else null!=this.dragElement&&(this.dragElement.style.visibility="hidden");mxEvent.consume(a)}; -mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var c=this.currentGraph.view.scale,f=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/c-f.x,this.currentPoint.y/c-f.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(a)}; +mxDragSource.prototype.mouseDown=function(b){this.enabled&&!mxEvent.isConsumed(b)&&null==this.mouseMoveHandler&&(this.startDrag(b),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(b)&&(this.eventSource=mxEvent.getSource(b),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)))}; +mxDragSource.prototype.startDrag=function(b){this.dragElement=this.createDragElement(b);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(){this.removeDragElement()}; +mxDragSource.prototype.removeDragElement=function(){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};mxDragSource.prototype.graphContainsEvent=function(b,c){var f=mxEvent.getClientX(c),d=mxEvent.getClientY(c),a=mxUtils.getOffset(b.container),e=mxUtils.getScrollOrigin();return f>=a.x-e.x&&d>=a.y-e.y&&f<=a.x-e.x+b.container.offsetWidth&&d<=a.y-e.y+b.container.offsetHeight}; +mxDragSource.prototype.mouseMove=function(b){var c=this.getGraphForEvent(b);null!=c&&!this.graphContainsEvent(c,b)&&(c=null);c!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,b),this.currentGraph=c,null!=this.currentGraph&&this.dragEnter(this.currentGraph,b));null!=this.currentGraph&&this.dragOver(this.currentGraph,b);if(null!=this.dragElement&&(null==this.previewElement||"visible"!=this.previewElement.style.visibility)){var c=mxEvent.getClientX(b),f=mxEvent.getClientY(b); +null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(c+=this.dragOffset.x,f+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=c+d.x+"px";this.dragElement.style.top=f+d.y+"px"}else null!=this.dragElement&&(this.dragElement.style.visibility="hidden");mxEvent.consume(b)}; +mxDragSource.prototype.mouseUp=function(b){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var c=this.currentGraph.view.scale,f=this.currentGraph.view.translate;this.drop(this.currentGraph,b,this.currentDropTarget,this.currentPoint.x/c-f.x,this.currentPoint.y/c-f.y)}this.dragExit(this.currentGraph);this.currentGraph=null}this.stopDrag();this.removeListeners();mxEvent.consume(b)}; mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.mouseUpHandler=this.mouseMoveHandler=null}; -mxDragSource.prototype.dragEnter=function(a,c){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(c);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR));a.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)}; -mxDragSource.prototype.dragExit=function(a,c){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;a.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)}; -mxDragSource.prototype.dragOver=function(a,c){var f=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),b=mxEvent.getClientX(c)-f.x+d.x-a.panDx,f=mxEvent.getClientY(c)-f.y+d.y-a.panDy;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(b,f,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,b,f,c),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null== -this.previewElement.parentNode&&(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(c),e=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(c))var e=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),e=new mxRectangle(0,0,e,g),f=new mxPoint(b,f),f=this.currentGuide.move(e,f,d),e=!1,b=f.x,f=f.y;else if(d)var d=a.view.scale, -g=a.view.translate,k=a.gridSize/2,b=(a.snap(b/d-g.x-k)+g.x)*d,f=(a.snap(f/d-g.y-k)+g.y)*d;null!=this.currentGuide&&e&&this.currentGuide.hide();null!=this.previewOffset&&(b+=this.previewOffset.x,f+=this.previewOffset.y);this.previewElement.style.left=Math.round(b)+"px";this.previewElement.style.top=Math.round(f)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(b,f)}; -mxDragSource.prototype.drop=function(a,c,f,d,b){this.dropHandler(a,c,f,d,b);"hidden"!=a.container.style.visibility&&a.container.focus()};function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0; -mxToolbar.prototype.addItem=function(a,c,f,d,b,e){var g=document.createElement(null!=c?"img":"button"),k=b||(null!=e?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",c);null!=a&&(null!=c?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=f&&(mxEvent.addListener(g,"click",f),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",f));a=mxUtils.bind(this,function(b){null!=d?g.setAttribute("src",c):g.style.backgroundColor=""});mxEvent.addGestureListeners(g, -mxUtils.bind(this,function(b){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=e){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var a=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();a!=g&&(this.currentImg=g,this.menu.factoryMethod=e,a=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(a.x,a.y,null,b),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this); -g.className=k;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var c=document.createElement("div");c.style.display="inline";c.className="mxToolbarComboContainer";var f=document.createElement("select");f.className=a||"mxToolbarCombo";c.appendChild(f);this.container.appendChild(c);return f}; -mxToolbar.prototype.addActionCombo=function(a,c){var f=document.createElement("select");f.className=c||"mxToolbarCombo";this.addOption(f,a,null);mxEvent.addListener(f,"change",function(a){var b=f.options[f.selectedIndex];f.selectedIndex=0;null!=b.funct&&b.funct(a)});this.container.appendChild(f);return f};mxToolbar.prototype.addOption=function(a,c,f){var d=document.createElement("option");mxUtils.writeln(d,c);"function"==typeof f?d.funct=f:d.setAttribute("value",f);a.appendChild(d);return d}; -mxToolbar.prototype.addSwitchMode=function(a,c,f,d,b){var e=document.createElement("img");e.initialClassName=b||"mxToolbarMode";e.className=e.initialClassName;e.setAttribute("src",c);e.altIcon=d;null!=a&&e.setAttribute("title",a);mxEvent.addListener(e,"click",mxUtils.bind(this,function(b){b=this.selectedMode.altIcon;null!=b?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",b)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&& -(this.defaultMode=e);this.selectedMode=e;b=e.altIcon;null!=b?(e.altIcon=e.getAttribute("src"),e.setAttribute("src",b)):e.className=e.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));f()}));this.container.appendChild(e);null==this.defaultMode&&(this.defaultMode=e,this.selectMode(e),f());return e}; -mxToolbar.prototype.addMode=function(a,c,f,d,b,e){e=null!=e?e:!0;var g=document.createElement(null!=c?"img":"button");g.initialClassName=b||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",c);g.altIcon=d;null!=a&&g.setAttribute("title",a);this.enabled&&e&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(b){this.selectMode(g,f);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(b){this.selectMode(g,f);this.noReset=!0})),null==this.defaultMode&& +mxDragSource.prototype.dragEnter=function(b,c){b.isMouseDown=!0;b.isMouseTrigger=mxEvent.isMouseEvent(c);this.previewElement=this.createPreviewElement(b);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(b,b.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(b,mxConstants.DROP_TARGET_COLOR));b.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)}; +mxDragSource.prototype.dragExit=function(b,c){this.currentPoint=this.currentDropTarget=null;b.isMouseDown=!1;b.removeListener(this.eventConsumer);null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)}; +mxDragSource.prototype.dragOver=function(b,c){var f=mxUtils.getOffset(b.container),d=mxUtils.getScrollOrigin(b.container),a=mxEvent.getClientX(c)-f.x+d.x-b.panDx,f=mxEvent.getClientY(c)-f.y+d.y-b.panDy;b.autoScroll&&(null==this.autoscroll||this.autoscroll)&&b.scrollPointToVisible(a,f,b.autoExtend);null!=this.currentHighlight&&b.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(b,a,f,c),d=b.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null== +this.previewElement.parentNode&&(b.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&b.isGridEnabledEvent(c),e=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(c))var e=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),e=new mxRectangle(0,0,e,g),f=new mxPoint(a,f),f=this.currentGuide.move(e,f,d),e=!1,a=f.x,f=f.y;else if(d)var d=b.view.scale, +g=b.view.translate,k=b.gridSize/2,a=(b.snap(a/d-g.x-k)+g.x)*d,f=(b.snap(f/d-g.y-k)+g.y)*d;null!=this.currentGuide&&e&&this.currentGuide.hide();null!=this.previewOffset&&(a+=this.previewOffset.x,f+=this.previewOffset.y);this.previewElement.style.left=Math.round(a)+"px";this.previewElement.style.top=Math.round(f)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(a,f)}; +mxDragSource.prototype.drop=function(b,c,f,d,a){this.dropHandler(b,c,f,d,a);"hidden"!=b.container.style.visibility&&b.container.focus()};function mxToolbar(b){this.container=b}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0; +mxToolbar.prototype.addItem=function(b,c,f,d,a,e){var g=document.createElement(null!=c?"img":"button"),k=a||(null!=e?"mxToolbarMode":"mxToolbarItem");g.className=k;g.setAttribute("src",c);null!=b&&(null!=c?g.setAttribute("title",b):mxUtils.write(g,b));this.container.appendChild(g);null!=f&&(mxEvent.addListener(g,"click",f),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",f));b=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",c):g.style.backgroundColor=""});mxEvent.addGestureListeners(g, +mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=e){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=e,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=k+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this); +g.className=k;this.currentImg=null}))}}),null,b);mxEvent.addListener(g,"mouseout",b);return g};mxToolbar.prototype.addCombo=function(b){var c=document.createElement("div");c.style.display="inline";c.className="mxToolbarComboContainer";var f=document.createElement("select");f.className=b||"mxToolbarCombo";c.appendChild(f);this.container.appendChild(c);return f}; +mxToolbar.prototype.addActionCombo=function(b,c){var f=document.createElement("select");f.className=c||"mxToolbarCombo";this.addOption(f,b,null);mxEvent.addListener(f,"change",function(b){var a=f.options[f.selectedIndex];f.selectedIndex=0;null!=a.funct&&a.funct(b)});this.container.appendChild(f);return f};mxToolbar.prototype.addOption=function(b,c,f){var d=document.createElement("option");mxUtils.writeln(d,c);"function"==typeof f?d.funct=f:d.setAttribute("value",f);b.appendChild(d);return d}; +mxToolbar.prototype.addSwitchMode=function(b,c,f,d,a){var e=document.createElement("img");e.initialClassName=a||"mxToolbarMode";e.className=e.initialClassName;e.setAttribute("src",c);e.altIcon=d;null!=b&&e.setAttribute("title",b);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){a=this.selectedMode.altIcon;null!=a?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",a)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&& +(this.defaultMode=e);this.selectedMode=e;a=e.altIcon;null!=a?(e.altIcon=e.getAttribute("src"),e.setAttribute("src",a)):e.className=e.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));f()}));this.container.appendChild(e);null==this.defaultMode&&(this.defaultMode=e,this.selectMode(e),f());return e}; +mxToolbar.prototype.addMode=function(b,c,f,d,a,e){e=null!=e?e:!0;var g=document.createElement(null!=c?"img":"button");g.initialClassName=a||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",c);g.altIcon=d;null!=b&&g.setAttribute("title",b);this.enabled&&e&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){this.selectMode(g,f);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(a){this.selectMode(g,f);this.noReset=!0})),null==this.defaultMode&& (this.defaultMode=g,this.defaultFunction=f,this.selectMode(g,f)));this.container.appendChild(g);return g}; -mxToolbar.prototype.selectMode=function(a,c){if(this.selectedMode!=a){if(null!=this.selectedMode){var f=this.selectedMode.altIcon;null!=f?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",f)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;f=this.selectedMode.altIcon;null!=f?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",f)):this.selectedMode.className=this.selectedMode.initialClassName+ -"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",c))}};mxToolbar.prototype.resetMode=function(a){(a||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)}; -mxToolbar.prototype.addLine=function(){var a=document.createElement("hr");a.style.marginRight="6px";a.setAttribute("size","1");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};function mxUndoableEdit(a,c){this.source=a;this.changes=[];this.significant=null!=c?c:!0}mxUndoableEdit.prototype.source=null; -mxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){}; -mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var c=this.changes[a];null!=c.execute?c.execute():null!=c.undo&&c.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()}; -mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,c=0;cthis.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),c=0;cthis.dx&&Math.abs(this.dx)this.indexOfNextAdd)for(var b=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),c=0;cthis.dx&&Math.abs(this.dx)this.dy&&Math.abs(this.dy)b.x+(document.body.clientWidth||e.clientWidth))c.div.style.left=a.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(c.div)}}; -mxPopupMenu.prototype.addSeparator=function(a,c){a=a||this;if(this.smartSeparators&&!c)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var f=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";f.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var b=document.createElement("hr");b.setAttribute("size","1");d.appendChild(b);f.appendChild(d);a.tbody.appendChild(f)}}; -mxPopupMenu.prototype.popup=function(a,c,f,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=c+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,f,d);0a.x+(document.body.clientWidth||e.clientWidth))c.div.style.left=b.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(c.div)}}; +mxPopupMenu.prototype.addSeparator=function(b,c){b=b||this;if(this.smartSeparators&&!c)b.willAddSeparator=!0;else if(null!=b.tbody){b.willAddSeparator=!1;var f=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";f.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var a=document.createElement("hr");a.setAttribute("size","1");d.appendChild(a);f.appendChild(d);b.tbody.appendChild(f)}}; +mxPopupMenu.prototype.popup=function(b,c,f,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=b+"px";for(this.div.style.top=c+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,f,d);0this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)}; -function mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))}; -mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,c,f,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=c?c:6;this.ease=null!=f?f:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null; -mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var c=0;c=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()}; -mxMorphing.prototype.animateCell=function(a,c,f){var d=this.graph.getView().getState(a),b=null;if(null!=d&&(b=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=b.x||0!=b.y))){var e=this.graph.view.getTranslate(),g=this.graph.view.getScale();b.x+=e.x*g;b.y+=e.y*g;c.moveState(d,-b.x/this.ease,-b.y/this.ease)}if(f&&!this.stopRecursion(d,b)){d=this.graph.getModel().getChildCount(a);for(b=0;bthis.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&b>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)}; +function mxAnimation(b){this.delay=null!=b?b:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))}; +mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(b,c,f,d){mxAnimation.call(this,d);this.graph=b;this.steps=null!=c?c:6;this.ease=null!=f?f:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null; +mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){var b=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var c=0;c=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(b){b.show()}; +mxMorphing.prototype.animateCell=function(b,c,f){var d=this.graph.getView().getState(b),a=null;if(null!=d&&(a=this.getDelta(d),this.graph.getModel().isVertex(b)&&(0!=a.x||0!=a.y))){var e=this.graph.view.getTranslate(),g=this.graph.view.getScale();a.x+=e.x*g;a.y+=e.y*g;c.moveState(d,-a.x/this.ease,-a.y/this.ease)}if(f&&!this.stopRecursion(d,a)){d=this.graph.getModel().getChildCount(b);for(a=0;af?";stop-opacity:"+f:"";b=this.createElement("stop"); -b.setAttribute("offset","0%");b.setAttribute("style","stop-color:"+a+f);e.appendChild(b);f=1>d?";stop-opacity:"+d:"";b=this.createElement("stop");b.setAttribute("offset","100%");b.setAttribute("style","stop-color:"+c+f);e.appendChild(b);return e}; -mxSvgCanvas2D.prototype.addNode=function(a,c){var f=this.node,d=this.state;if(null!=f){if("path"==f.nodeName)if(null!=this.path&&0f?";stop-opacity:"+f:"";a=this.createElement("stop"); +a.setAttribute("offset","0%");a.setAttribute("style","stop-color:"+b+f);e.appendChild(a);f=1>d?";stop-opacity:"+d:"";a=this.createElement("stop");a.setAttribute("offset","100%");a.setAttribute("style","stop-color:"+c+f);e.appendChild(a);return e}; +mxSvgCanvas2D.prototype.addNode=function(b,c){var f=this.node,d=this.state;if(null!=f){if("path"==f.nodeName)if(null!=this.path&&0a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);if(null!=a.fillColor)if(null!=a.gradientColor)if(a=this.getSvgGradient(a.fillColor,a.gradientColor,a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document){var c=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");this.node.setAttribute("fill", -"url("+c+"#"+a+")")}else this.node.setAttribute("fill","url(#"+a+")");else this.node.setAttribute("fill",a.fillColor.toLowerCase())};mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(1,this.format(this.state.strokeWidth*this.state.scale))}; -mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",a.strokeColor.toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var c=this.getCurrentStrokeWidth();1!=c&&this.node.setAttribute("stroke-width",c);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(a.strokeWidth*a.scale))}; -mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var c=a.lineCap;"flat"==c&&(c="butt");"butt"!=c&&this.node.setAttribute("stroke-linecap",c)}null!=a.miterLimit&&(!this.styleEnabled||10!=a.miterLimit)&&this.node.setAttribute("stroke-miterlimit",a.miterLimit)}; -mxSvgCanvas2D.prototype.createDashPattern=function(a){var c=[];if("string"===typeof this.state.dashPattern){var f=this.state.dashPattern.split(" ");if(0l.alpha||1>l.fillAlpha)&&m.setAttribute("opacity",l.alpha*l.fillAlpha);b=this.state.transform||"";if(g||k){var n=e=1,p=0,r=0;g&&(e=-1,p=-f-2*a);k&&(n=-1,r=-d-2*c);b+="scale("+e+","+n+")translate("+p*l.scale+","+r*l.scale+")"}0/g,"\x26gt;");a=c.value.replace(/&/g,"\x26amp;").replace(/&lt;/g, -"\x26lt;").replace(/&gt;/g,"\x26gt;").replace(/&amp;/g,"\x26amp;").replace(/
/g,"\x3cbr /\x3e").replace(/
/g,"\x3chr /\x3e").replace(/(]+)>/gm,"$1 /\x3e")}return a}; -mxSvgCanvas2D.prototype.createDiv=function(a,c,f,d,b){f=this.state;d="display:inline-block;font-size:"+f.fontSize+"px;font-family:"+f.fontFamily+";color:"+f.fontColor+";line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?f.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection)+";"+d;(f.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(f.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");(f.fontStyle& -mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");c==mxConstants.ALIGN_CENTER?d+="text-align:center;":c==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");c="";null!=f.fontBackgroundColor&&(c+="background-color:"+f.fontBackgroundColor+";");null!=f.fontBorderColor&&(c+="border:1px solid "+f.fontBorderColor+";");mxUtils.isNode(a)||(a=this.convertHtml(a),"fill"!=b&&"width"!=b?a='\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;text-align:inherit;text-decoration:inherit;'+ -c+'"\x3e'+a+"\x3c/div\x3e":d+=c);if(!mxClient.IS_IE&&document.createElementNS)return b=document.createElementNS("http://www.w3.org/1999/xhtml","div"),b.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?b.appendChild(a.cloneNode(!0)):b.appendChild(a):b.innerHTML=a,b;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"'+d+'"\x3e'+a+"\x3c/div\x3e").documentElement}; -mxSvgCanvas2D.prototype.invalidateCachedOffsetSize=function(a){delete a.firstChild.mxCachedOffsetWidth;delete a.firstChild.mxCachedFinalOffsetWidth;delete a.firstChild.mxCachedFinalOffsetHeight}; -mxSvgCanvas2D.prototype.updateText=function(a,c,f,d,b,e,g,k,l,m,n){if(null!=n&&null!=n.firstChild&&null!=n.firstChild.firstChild&&null!=n.firstChild.firstChild.firstChild){n=n.firstChild;var p=n.firstChild,r=p.firstChild;m=null!=m?m:0;var s=this.state;a+=s.dx;c+=s.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(f)+"px"):"fill"==k?(r.style.width=Math.round(f+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(f+1)+"px",0b.alpha||1>b.fillAlpha)&&this.node.setAttribute("fill-opacity",b.alpha*b.fillAlpha);if(null!=b.fillColor)if(null!=b.gradientColor)if(b=this.getSvgGradient(b.fillColor,b.gradientColor,b.gradientFillAlpha,b.gradientAlpha,b.gradientDirection),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document){var c=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");this.node.setAttribute("fill", +"url("+c+"#"+b+")")}else this.node.setAttribute("fill","url(#"+b+")");else this.node.setAttribute("fill",b.fillColor.toLowerCase())};mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(1,this.format(this.state.strokeWidth*this.state.scale))}; +mxSvgCanvas2D.prototype.updateStroke=function(){var b=this.state;this.node.setAttribute("stroke",b.strokeColor.toLowerCase());(1>b.alpha||1>b.strokeAlpha)&&this.node.setAttribute("stroke-opacity",b.alpha*b.strokeAlpha);var c=this.getCurrentStrokeWidth();1!=c&&this.node.setAttribute("stroke-width",c);"path"==this.node.nodeName&&this.updateStrokeAttributes();b.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(b.strokeWidth*b.scale))}; +mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var b=this.state;null!=b.lineJoin&&"miter"!=b.lineJoin&&this.node.setAttribute("stroke-linejoin",b.lineJoin);if(null!=b.lineCap){var c=b.lineCap;"flat"==c&&(c="butt");"butt"!=c&&this.node.setAttribute("stroke-linecap",c)}null!=b.miterLimit&&(!this.styleEnabled||10!=b.miterLimit)&&this.node.setAttribute("stroke-miterlimit",b.miterLimit)}; +mxSvgCanvas2D.prototype.createDashPattern=function(b){var c=[];if("string"===typeof this.state.dashPattern){var f=this.state.dashPattern.split(" ");if(0l.alpha||1>l.fillAlpha)&&m.setAttribute("opacity",l.alpha*l.fillAlpha);a=this.state.transform||"";if(g||k){var n=e=1,p=0,r=0;g&&(e=-1,p=-f-2*b);k&&(n=-1,r=-d-2*c);a+="scale("+e+","+n+")translate("+p*l.scale+","+r*l.scale+")"}0/g,"\x26gt;");b=c.value.replace(/&/g,"\x26amp;").replace(/&lt;/g, +"\x26lt;").replace(/&gt;/g,"\x26gt;").replace(/&amp;/g,"\x26amp;").replace(/
/g,"\x3cbr /\x3e").replace(/
/g,"\x3chr /\x3e").replace(/(]+)>/gm,"$1 /\x3e")}return b}; +mxSvgCanvas2D.prototype.createDiv=function(b,c,f,d,a){f=this.state;d="display:inline-block;font-size:"+f.fontSize+"px;font-family:"+f.fontFamily+";color:"+f.fontColor+";line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?f.fontSize*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection)+";"+d;(f.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(f.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");(f.fontStyle& +mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");c==mxConstants.ALIGN_CENTER?d+="text-align:center;":c==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");c="";null!=f.fontBackgroundColor&&(c+="background-color:"+f.fontBackgroundColor+";");null!=f.fontBorderColor&&(c+="border:1px solid "+f.fontBorderColor+";");mxUtils.isNode(b)||(b=this.convertHtml(b),"fill"!=a&&"width"!=a?b='\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;text-align:inherit;text-decoration:inherit;'+ +c+'"\x3e'+b+"\x3c/div\x3e":d+=c);if(!mxClient.IS_IE&&document.createElementNS)return a=document.createElementNS("http://www.w3.org/1999/xhtml","div"),a.setAttribute("style",d),mxUtils.isNode(b)?this.root.ownerDocument!=document?a.appendChild(b.cloneNode(!0)):a.appendChild(b):a.innerHTML=b,a;mxUtils.isNode(b)&&this.root.ownerDocument!=document&&(b=b.outerHTML);return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"'+d+'"\x3e'+b+"\x3c/div\x3e").documentElement}; +mxSvgCanvas2D.prototype.invalidateCachedOffsetSize=function(b){delete b.firstChild.mxCachedOffsetWidth;delete b.firstChild.mxCachedFinalOffsetWidth;delete b.firstChild.mxCachedFinalOffsetHeight}; +mxSvgCanvas2D.prototype.updateText=function(b,c,f,d,a,e,g,k,l,m,n){if(null!=n&&null!=n.firstChild&&null!=n.firstChild.firstChild&&null!=n.firstChild.firstChild.firstChild){n=n.firstChild;var p=n.firstChild,r=p.firstChild;m=null!=m?m:0;var s=this.state;b+=s.dx;c+=s.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(f)+"px"):"fill"==k?(r.style.width=Math.round(f+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(f+1)+"px",0s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(b,e,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,z=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y= -document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";z=document.createElement("div");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;y.appendChild(z);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0< +g=0;a==mxConstants.ALIGN_CENTER?g-=f/2:a==mxConstants.ALIGN_RIGHT&&(g-=f);b+=g;e==mxConstants.ALIGN_MIDDLE?l-=d/2:e==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);c+=l;a=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(a+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((b+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),b=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(b*=s.scale,c*=s.scale);0!=m&&(a+="rotate("+m+","+-g+","+ +-l+")");n.setAttribute("transform","translate("+Math.round(b)+","+Math.round(c)+")"+a);p.setAttribute("width",Math.round(Math.max(1,f)));p.setAttribute("height",Math.round(Math.max(1,d)))}}; +mxSvgCanvas2D.prototype.text=function(b,c,f,d,a,e,g,k,l,m,n,p,r){if(this.textEnabled&&null!=a){p=null!=p?p:0;var s=this.state;b+=s.dx;c+=s.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";n?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(f)+"px;":"fill"==m?q+="width:"+Math.round(f+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(q+="width:"+Math.round(f+1)+"px;",0s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(a,e,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,z=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y= +document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";z=document.createElement("div");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.wordWrap=mxConstants.WORD_WRAP;z.innerHTML=mxUtils.isNode(a)?a.outerHTML:a;y.appendChild(z);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0< f){var x=z.offsetWidth;if(!n&&k&&0s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;e==mxConstants.ALIGN_CENTER?q-=f/2:e==mxConstants.ALIGN_RIGHT&&(q-=f);a+=q;g==mxConstants.ALIGN_MIDDLE? -r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);c+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((a+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(a*=s.scale,c*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+ -")"+y);u.setAttribute("width",Math.round(Math.max(1,f)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,c,f,d,b,e,g,k,l,m,n,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(u),f.appendChild(a),t.appendChild(f)))}}else this.plainText(a,c,f,d,b,e,g,k,m,n,p,r)}}; -mxSvgCanvas2D.prototype.createClip=function(a,c,f,d){a=Math.round(a);c=Math.round(c);f=Math.round(f);d=Math.round(d);for(var b="mx-clip-"+a+"-"+c+"-"+f+"-"+d,e=0,g=b+"-"+e;null!=document.getElementById(g);)g=b+"-"+ ++e;clip=this.createElement("clipPath");clip.setAttribute("id",g);b=this.createElement("rect");b.setAttribute("x",a);b.setAttribute("y",c);b.setAttribute("width",f);b.setAttribute("height",d);clip.appendChild(b);return clip}; -mxSvgCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=n&&(q+="rotate("+n+","+this.format(a*k.scale)+","+this.format(c*k.scale)+")");null!=p&&s.setAttribute("direction",p);m&&0s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;e==mxConstants.ALIGN_CENTER?q-=f/2:e==mxConstants.ALIGN_RIGHT&&(q-=f);b+=q;g==mxConstants.ALIGN_MIDDLE? +r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);c+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+f/2+","+d/2+")",c=this.rotatePoint((b+f/2)*s.scale,(c+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),b=c.x-f*s.scale/2,c=c.y-d*s.scale/2):(b*=s.scale,c*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(b)+this.foOffset)+","+(Math.round(c)+this.foOffset)+ +")"+y);u.setAttribute("width",Math.round(Math.max(1,f)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(b=this.createAlternateContent(u,b,c,f,d,a,e,g,k,l,m,n,p),null!=b&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(u),f.appendChild(b),t.appendChild(f)))}}else this.plainText(b,c,f,d,a,e,g,k,m,n,p,r)}}; +mxSvgCanvas2D.prototype.createClip=function(b,c,f,d){b=Math.round(b);c=Math.round(c);f=Math.round(f);d=Math.round(d);for(var a="mx-clip-"+b+"-"+c+"-"+f+"-"+d,e=0,g=a+"-"+e;null!=document.getElementById(g);)g=a+"-"+ ++e;clip=this.createElement("clipPath");clip.setAttribute("id",g);a=this.createElement("rect");a.setAttribute("x",b);a.setAttribute("y",c);a.setAttribute("width",f);a.setAttribute("height",d);clip.appendChild(a);return clip}; +mxSvgCanvas2D.prototype.plainText=function(b,c,f,d,a,e,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=n&&(q+="rotate("+n+","+this.format(b*k.scale)+","+this.format(c*k.scale)+")");null!=p&&s.setAttribute("direction",p);m&&0k.alpha&&s.setAttribute("opacity",k.alpha);q=b.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var t=r+(q.length-1)*p;n=c+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0k.alpha&&s.setAttribute("opacity",k.alpha);q=a.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var t=r+(q.length-1)*p;n=c+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0a.alpha||1>a.fillAlpha)c.opacity=100*a.alpha*a.fillAlpha+"%";return c}; -mxVmlCanvas2D.prototype.createStroke=function(){var a=this.state,c=this.createVmlElement("stroke");c.endcap=a.lineCap||"flat";c.joinstyle=a.lineJoin||"miter";c.miterlimit=a.miterLimit||"10";if(1>a.alpha||1>a.strokeAlpha)c.opacity=100*a.alpha*a.strokeAlpha+"%";a.dashed&&(c.dashstyle=this.getVmlDashStyle());return c};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var a="dash";if("string"===typeof this.state.dashPattern){var c=this.state.dashPattern.split(" ");0b.alpha||1>b.fillAlpha)c.opacity=100*b.alpha*b.fillAlpha+"%";return c}; +mxVmlCanvas2D.prototype.createStroke=function(){var b=this.state,c=this.createVmlElement("stroke");c.endcap=b.lineCap||"flat";c.joinstyle=b.lineJoin||"miter";c.miterlimit=b.miterLimit||"10";if(1>b.alpha||1>b.strokeAlpha)c.opacity=100*b.alpha*b.strokeAlpha+"%";b.dashed&&(c.dashstyle=this.getVmlDashStyle());return c};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var b="dash";if("string"===typeof this.state.dashPattern){var c=this.state.dashPattern.split(" ");0this.state.alpha||1>this.state.fillAlpha)l.style.filter+="alpha(opacity\x3d"+100*this.state.alpha*this.state.fillAlpha+")";this.root.appendChild(l)}; -mxVmlCanvas2D.prototype.createDiv=function(a,c,f,d){f=this.createElement("div");var b=this.state,e="";null!=b.fontBackgroundColor&&(e+="background-color:"+b.fontBackgroundColor+";");null!=b.fontBorderColor&&(e+="border:1px solid "+b.fontBorderColor+";");mxUtils.isNode(a)?f.appendChild(a):"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=e,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.style.textDecoration="inherit",d.innerHTML=a,f.appendChild(d)):(f.style.cssText= -e,f.innerHTML=a);a=f.style;a.fontSize=b.fontSize/this.vmlScale+"px";a.fontFamily=b.fontFamily;a.color=b.fontColor;a.verticalAlign="top";a.textAlign=c||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?b.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&& -(a.textDecoration="underline");return f}; -mxVmlCanvas2D.prototype.text=function(a,c,f,d,b,e,g,k,l,m,n,p,r){if(this.textEnabled&&null!=b){var s=this.state;if("html"==l){null!=s.rotation&&(c=this.rotatePoint(a,c,s.rotation,s.rotationCx,s.rotationCy),a=c.x,c=c.y);8==document.documentMode&&!mxClient.IS_EM?(a+=s.dx,c+=s.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&(c-=1)):(a*=s.scale,c*=s.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline"; -l.style.left=this.format(a)+"px";l.style.top=this.format(c)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(e,g),u=t.x,t=t.y;b=this.createDiv(b,e,g,m);e=this.createElement("div");null!=r&&b.setAttribute("dir",r);if(k&&0v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var z=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(b.style.display="inline-block",e.style.display="inline-block",q.style.display="inline-block");b.style.visibility="hidden";b.style.position="absolute";document.body.appendChild(b);q=b;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;n?(f=Math.min(f,v), -q=Math.min(q,d)):f=v;k&&(b.style.width=f+"px");if(mxClient.IS_QUIRKS&&(n||"width"==m)&&q>d)q=d,b.style.height=q+"px";d=q;n=(d-d*g+f*-z)/2-r*f*(u+0.5)+p*d*(t+0.5);k=(f-f*g+d*-z)/2+p*f*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-f/2)*s.scale)+"px",m.style.top=this.format(c+(n-d/2)*s.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(s=8==document.documentMode&& -!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-f/2)*s)+"px",l.style.top=this.format(c+(n-d/2)*s)+"px");e.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";e.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(e.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");e.appendChild(b);b.style.position="";b.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(b.style.verticalAlign= -"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=b.parentNode,b.style.visibility="hidden",document.body.appendChild(b),f=b.offsetWidth,q=b.offsetHeight,mxClient.IS_QUIRKS&&n&&q>d&&(q=d,b.style.height=q+"px"),d=q,b.style.visibility="",s.appendChild(b),l.style.left=this.format(a+f*u*this.state.scale)+"px",l.style.top=this.format(c+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(b.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*u+ -"%",q.style.top=100*t+"%")}else this.plainText(a,c,f,d,mxUtils.htmlEntities(b,!1),e,g,k,l,m,n,p,r)}}; -mxVmlCanvas2D.prototype.plainText=function(a,c,f,d,b,e,g,k,l,m,n,p,r){k=this.state;a=(a+k.dx)*k.scale;c=(c+k.dy)*k.scale;f=this.createVmlElement("shape");f.style.width="1px";f.style.height="1px";f.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.alpha+"%";f.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);f.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText= -"v-text-align:"+e;d.style.align=e;d.style.fontFamily=k.fontFamily;d.string=b;d.on="true";e=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=e+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");b=b.split("\n");k=e+(b.length-1)*e*mxConstants.LINE_HEIGHT;e=b=0; -g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=p*(Math.PI/180),b=Math.sin(g)*e,e*=Math.cos(g));f.appendChild(d);f.style.left=this.format(a-b)+"px";f.style.top=this.format(c+e)+"px";this.root.appendChild(f)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)}; -function mxGuide(a,c){this.graph=a;this.setStates(c)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2}; -mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a}; -mxGuide.prototype.move=function(a,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=c){var d=this.graph.getView().translate,b=this.graph.getView().scale,e=c.x,g=c.y,k=!1,l=null,m=null,n=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=c.x;s.y+=c.y;var u=s.x,v=s.x+s.width,z=s.getCenterX(),y=s.y,x=s.y+s.height,D=s.getCenterY();c=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-z)this.state.alpha||1>this.state.fillAlpha)l.style.filter+="alpha(opacity\x3d"+100*this.state.alpha*this.state.fillAlpha+")";this.root.appendChild(l)}; +mxVmlCanvas2D.prototype.createDiv=function(b,c,f,d){f=this.createElement("div");var a=this.state,e="";null!=a.fontBackgroundColor&&(e+="background-color:"+a.fontBackgroundColor+";");null!=a.fontBorderColor&&(e+="border:1px solid "+a.fontBorderColor+";");mxUtils.isNode(b)?f.appendChild(b):"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=e,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.style.textDecoration="inherit",d.innerHTML=b,f.appendChild(d)):(f.style.cssText= +e,f.innerHTML=b);b=f.style;b.fontSize=a.fontSize/this.vmlScale+"px";b.fontFamily=a.fontFamily;b.color=a.fontColor;b.verticalAlign="top";b.textAlign=c||"left";b.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?a.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b.fontWeight="bold");(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b.fontStyle="italic");(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&& +(b.textDecoration="underline");return f}; +mxVmlCanvas2D.prototype.text=function(b,c,f,d,a,e,g,k,l,m,n,p,r){if(this.textEnabled&&null!=a){var s=this.state;if("html"==l){null!=s.rotation&&(c=this.rotatePoint(b,c,s.rotation,s.rotationCx,s.rotationCy),b=c.x,c=c.y);8==document.documentMode&&!mxClient.IS_EM?(b+=s.dx,c+=s.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&(c-=1)):(b*=s.scale,c*=s.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline"; +l.style.left=this.format(b)+"px";l.style.top=this.format(c)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(e,g),u=t.x,t=t.y;a=this.createDiv(a,e,g,m);e=this.createElement("div");null!=r&&a.setAttribute("dir",r);if(k&&0v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var z=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(a.style.display="inline-block",e.style.display="inline-block",q.style.display="inline-block");a.style.visibility="hidden";a.style.position="absolute";document.body.appendChild(a);q=a;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;n?(f=Math.min(f,v), +q=Math.min(q,d)):f=v;k&&(a.style.width=f+"px");if(mxClient.IS_QUIRKS&&(n||"width"==m)&&q>d)q=d,a.style.height=q+"px";d=q;n=(d-d*g+f*-z)/2-r*f*(u+0.5)+p*d*(t+0.5);k=(f-f*g+d*-z)/2+p*f*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(b+(k-f/2)*s.scale)+"px",m.style.top=this.format(c+(n-d/2)*s.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(s=8==document.documentMode&& +!mxClient.IS_EM?1:s.scale,l.style.left=this.format(b+(k-f/2)*s)+"px",l.style.top=this.format(c+(n-d/2)*s)+"px");e.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";e.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(e.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");e.appendChild(a);a.style.position="";a.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(a.style.verticalAlign= +"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=a.parentNode,a.style.visibility="hidden",document.body.appendChild(a),f=a.offsetWidth,q=a.offsetHeight,mxClient.IS_QUIRKS&&n&&q>d&&(q=d,a.style.height=q+"px"),d=q,a.style.visibility="",s.appendChild(a),l.style.left=this.format(b+f*u*this.state.scale)+"px",l.style.top=this.format(c+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(a.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*u+ +"%",q.style.top=100*t+"%")}else this.plainText(b,c,f,d,mxUtils.htmlEntities(a,!1),e,g,k,l,m,n,p,r)}}; +mxVmlCanvas2D.prototype.plainText=function(b,c,f,d,a,e,g,k,l,m,n,p,r){k=this.state;b=(b+k.dx)*k.scale;c=(c+k.dy)*k.scale;f=this.createVmlElement("shape");f.style.width="1px";f.style.height="1px";f.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.alpha+"%";f.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);f.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText= +"v-text-align:"+e;d.style.align=e;d.style.fontFamily=k.fontFamily;d.string=a;d.on="true";e=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=e+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");a=a.split("\n");k=e+(a.length-1)*e*mxConstants.LINE_HEIGHT;e=a=0; +g==mxConstants.ALIGN_BOTTOM?e=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(e=k/2);null!=p&&(f.style.rotation=p,g=p*(Math.PI/180),a=Math.sin(g)*e,e*=Math.cos(g));f.appendChild(d);f.style.left=this.format(b-a)+"px";f.style.top=this.format(c+e)+"px";this.root.appendChild(f)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)}; +function mxGuide(b,c){this.graph=b;this.setStates(c)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(b){this.states=b};mxGuide.prototype.isEnabledForEvent=function(b){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2}; +mxGuide.prototype.createGuideShape=function(b){b=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);b.isDashed=!0;return b}; +mxGuide.prototype.move=function(b,c,f){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=b&&null!=c){var d=this.graph.getView().translate,a=this.graph.getView().scale,e=c.x,g=c.y,k=!1,l=null,m=null,n=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=b.clone();s.x+=c.x;s.y+=c.y;var u=s.x,v=s.x+s.width,z=s.getCenterX(),y=s.y,x=s.y+s.height,D=s.getCenterY();c=function(a,d){a+=this.graph.panDx;var c=!1;Math.abs(a-z)this.opacity&&(c+="alpha(opacity\x3d"+this.opacity+")");this.isShadow&&(c+="progid:DXImageTransform.Microsoft.dropShadow (OffX\x3d'"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY\x3d'"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color\x3d'"+mxConstants.VML_SHADOWCOLOR+"')");if(null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE){var f=this.fill,d=this.gradient,b="0",e={east:0, -south:1,west:2,north:3},g=null!=this.direction?e[this.direction]:0;null!=this.gradientDirection&&(g=mxUtils.mod(g+e[this.gradientDirection]-1,4));1==g?(b="1",e=f,f=d,d=e):2==g?(e=f,f=d,d=e):3==g&&(b="1");c+="progid:DXImageTransform.Microsoft.gradient(startColorStr\x3d'"+f+"', endColorStr\x3d'"+d+"', gradientType\x3d'"+b+"')"}a.style.filter=c}; -mxShape.prototype.updateHtmlColors=function(a){var c=this.stroke;null!=c&&c!=mxConstants.NONE?(a.style.borderColor=c,this.isDashed?a.style.borderStyle="dashed":0this.opacity&&(c+="alpha(opacity\x3d"+this.opacity+")");this.isShadow&&(c+="progid:DXImageTransform.Microsoft.dropShadow (OffX\x3d'"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY\x3d'"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color\x3d'"+mxConstants.VML_SHADOWCOLOR+"')");if(null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE){var f=this.fill,d=this.gradient,a="0",e={east:0, +south:1,west:2,north:3},g=null!=this.direction?e[this.direction]:0;null!=this.gradientDirection&&(g=mxUtils.mod(g+e[this.gradientDirection]-1,4));1==g?(a="1",e=f,f=d,d=e):2==g?(e=f,f=d,d=e):3==g&&(a="1");c+="progid:DXImageTransform.Microsoft.gradient(startColorStr\x3d'"+f+"', endColorStr\x3d'"+d+"', gradientType\x3d'"+a+"')"}b.style.filter=c}; +mxShape.prototype.updateHtmlColors=function(b){var c=this.stroke;null!=c&&c!=mxConstants.NONE?(b.style.borderColor=c,this.isDashed?b.style.borderStyle="dashed":0=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var a=this.createCanvas(); -null!=a&&null!=a.updateText&&null!=a.invalidateCachedOffsetSize?(this.paint(a,!0),this.destroyCanvas(a),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null}; +mxText.prototype.paint=function(b,c){var f=this.scale,d=this.bounds.x/f,a=this.bounds.y/f,e=this.bounds.width/f,f=this.bounds.height/f;this.updateTransform(b,d,a,e,f);this.configureCanvas(b,d,a,e,f);if(c){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&b.invalidateCachedOffsetSize(this.node);b.updateText(d,a,e,f,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)|| +this.dialect==mxConstants.DIALECT_STRICTHTML)||b instanceof mxVmlCanvas2D?"html":"",l=this.value;!g&&"html"==k&&(l=mxUtils.htmlEntities(l,!1));"html"==k&&!mxUtils.isNode(this.value)&&(l=mxUtils.replaceTrailingNewlines(l,"\x3cdiv\x3e\x3cbr\x3e\x3c/div\x3e"));var l=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==k?l.replace(/\n/g,"\x3cbr/\x3e"):l,m=this.textDirection;m==mxConstants.TEXT_DIRECTION_AUTO&&!g&&(m=this.getAutoDirection());m!=mxConstants.TEXT_DIRECTION_LTR&&m!=mxConstants.TEXT_DIRECTION_RTL&& +(m=null);b.text(d,a,e,f,l,this.align,this.valign,this.wrap,k,this.overflow,this.clipped,this.getTextRotation(),m)}this.lastUnscaledWidth=null!=this.state?this.state.unscaledWidth:null}; +mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"==this.node.nodeName&&(this.isHtmlAllowed()||!mxClient.IS_VML))this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform(),this.updateBoundingBox();else{var b=this.createCanvas(); +null!=b&&null!=b.updateText&&null!=b.invalidateCachedOffsetSize?(this.paint(b,!0),this.destroyCanvas(b),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null}; mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.valign=this.align="";this.family=mxConstants.DEFAULT_FONTFAMILY;this.size=mxConstants.DEFAULT_FONTSIZE;this.fontStyle=mxConstants.DEFAULT_FONTSTYLE;this.spacing=2;this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=0;this.horizontal=!0;delete this.background;delete this.border;this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION;delete this.margin}; -mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign= +mxText.prototype.apply=function(b){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign= mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop)+this.spacing,this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight)+this.spacing,this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom)+this.spacing,this.spacingLeft=mxUtils.getValue(this.style, mxConstants.STYLE_SPACING_LEFT,this.spacingLeft)+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.updateMargin());this.flipH=this.flipV= -null};mxText.prototype.getAutoDirection=function(){var a=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=a&&0=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()}; -mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),c=this.node.style,f=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(c,"transformOrigin",100*-f+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(c,"transform","translate("+100*f+"%,"+100*d+"%)scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(c,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(c,"transform","scale("+this.scale+")translate("+100*f+"%,"+100*d+"%)"));c.left=Math.round(this.bounds.x-Math.ceil(f* +mxText.prototype.redrawHtmlShape=function(){var b=this.node.style;b.whiteSpace="normal";b.overflow="";b.width="";b.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node,null==this.state||null==this.state.view.textDiv);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()}; +mxText.prototype.updateHtmlTransform=function(){var b=this.getTextRotation(),c=this.node.style,f=this.margin.x,d=this.margin.y;0!=b?(mxUtils.setPrefixedStyle(c,"transformOrigin",100*-f+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(c,"transform","translate("+100*f+"%,"+100*d+"%)scale("+this.scale+") rotate("+b+"deg)")):(mxUtils.setPrefixedStyle(c,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(c,"transform","scale("+this.scale+")translate("+100*f+"%,"+100*d+"%)"));c.left=Math.round(this.bounds.x-Math.ceil(f* ("fill"!=this.overflow&&"width"!=this.overflow?3:1)))+"px";c.top=Math.round(this.bounds.y-d*("fill"!=this.overflow?3:1))+"px";c.opacity=100>this.opacity?this.opacity/100:""}; -mxText.prototype.updateInnerHtml=function(a){if(mxUtils.isNode(this.value))a.innerHTML=this.value.outerHTML;else{var c=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(c=mxUtils.htmlEntities(c,!1));c=mxUtils.replaceTrailingNewlines(c,"\x3cdiv\x3e\x26nbsp;\x3c/div\x3e");c=this.replaceLinefeeds?c.replace(/\n/g,"\x3cbr/\x3e"):c;a.innerHTML='\x3cdiv style\x3d"display:inline-block;_display:inline;"\x3e'+c+"\x3c/div\x3e"}}; -mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,c=this.margin.x,f=this.margin.y,d=this.scale;mxUtils.setOpacity(this.node,this.opacity);var b=0,e=0,g=null!=this.state?this.state.view.textDiv:null,k=this.node;if(null!=g){g.style.overflow="";g.style.height="";g.style.width="";this.updateFont(g);this.updateSize(g,!1);this.updateInnerHtml(g);var l=Math.round(this.bounds.width/this.scale);this.wrap&&0m&&(m+=2*Math.PI);m%=Math.PI;m>Math.PI/2&&(m=Math.PI-m);var k=Math.cos(m),n=Math.sin(-m),c=l*-(c+0.5),p=g*-(f+0.5),r=(g-g*k+l*n)/2+e*c-b*p;0!=m&&(f="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+b+", M12\x3d"+e+", M21\x3d"+-e+", M22\x3d"+b+", sizingMethod\x3d'auto expand')",a.filter=null!=a.filter&&0m&&(m+=2*Math.PI);m%=Math.PI;m>Math.PI/2&&(m=Math.PI-m);var k=Math.cos(m),n=Math.sin(-m),c=l*-(c+0.5),p=g*-(f+0.5),r=(g-g*k+l*n)/2+e*c-a*p;0!=m&&(f="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+a+", M12\x3d"+e+", M21\x3d"+-e+", M22\x3d"+a+", sizingMethod\x3d'auto expand')",b.filter=null!=b.filter&&0=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");a.setAttribute("border","0");a.style.position="absolute";a.src=this.image;c=100>this.opacity?"alpha(opacity\x3d"+this.opacity+")":"";this.node.style.filter=c;this.flipH&&this.flipV?c+="progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2)":this.flipH?c+="progid:DXImageTransform.Microsoft.BasicImage(mirror\x3d1)": -this.flipV&&(c+="progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2, mirror\x3d1)");a.style.filter!=c&&(a.style.filter=c);"image"==a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)}; -function mxLabel(a,c,f,d){mxRectangleShape.call(this,a,c,f,d)}mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))}; +mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),c=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor=b; +this.node.style.borderColor=c;b=document.createElement(mxClient.IS_IE6||(null==document.documentMode||8>=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");b.setAttribute("border","0");b.style.position="absolute";b.src=this.image;c=100>this.opacity?"alpha(opacity\x3d"+this.opacity+")":"";this.node.style.filter=c;this.flipH&&this.flipV?c+="progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2)":this.flipH?c+="progid:DXImageTransform.Microsoft.BasicImage(mirror\x3d1)": +this.flipV&&(c+="progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2, mirror\x3d1)");b.style.filter!=c&&(b.style.filter=c);"image"==b.nodeName?b.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(b.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(b.style,"transform","");b.style.width=this.node.style.width;b.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(b)}else this.setTransparentBackgroundImage(this.node)}; +function mxLabel(b,c,f,d){mxRectangleShape.call(this,b,c,f,d)}mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(b){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))}; mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection);mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape}; -mxLabel.prototype.paintForeground=function(a,c,f,d,b){this.paintImage(a,c,f,d,b);this.paintIndicator(a,c,f,d,b);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,c,f,d,b){null!=this.image&&(c=this.getImageBounds(c,f,d,b),a.image(c.x,c.y,c.width,c.height,this.image,!1,!1,!1))}; -mxLabel.prototype.getImageBounds=function(a,c,f,d){var b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),l=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=b==mxConstants.ALIGN_CENTER? -a+(f-g)/2:b==mxConstants.ALIGN_RIGHT?a+(f-g-l):a+l;c=e==mxConstants.ALIGN_TOP?c+l:e==mxConstants.ALIGN_BOTTOM?c+(d-k-l):c+(d-k)/2;return new mxRectangle(a,c,g,k)};mxLabel.prototype.paintIndicator=function(a,c,f,d,b){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(c,f,d,b),this.indicator.paint(a)):null!=this.indicatorImage&&(c=this.getIndicatorBounds(c,f,d,b),a.image(c.x,c.y,c.width,c.height,this.indicatorImage,!1,!1,!1))}; -mxLabel.prototype.getIndicatorBounds=function(a,c,f,d){var b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),k=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),l=this.spacing+5;a=b==mxConstants.ALIGN_RIGHT?a+(f-g-l):b==mxConstants.ALIGN_CENTER?a+(f-g)/ -2:a+l;c=e==mxConstants.ALIGN_BOTTOM?c+(d-k-l):e==mxConstants.ALIGN_TOP?c+l:c+(d-k)/2;return new mxRectangle(a,c,g,k)}; -mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var c=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);c.x-=this.bounds.x;c.y-=this.bounds.y;a.style.left=Math.round(c.x)+"px";a.style.top=Math.round(c.y)+"px";a.style.width= -Math.round(c.width)+"px";a.style.height=Math.round(c.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,c,f,d){mxShape.call(this);this.bounds=a;this.fill=c;this.stroke=f;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;mxCylinder.prototype.svgStrokeTolerance=0; -mxCylinder.prototype.paintVertexShape=function(a,c,f,d,b){a.translate(c,f);a.begin();this.redrawPath(a,c,f,d,b,!1);a.fillAndStroke();a.setShadow(!1);a.begin();this.redrawPath(a,c,f,d,b,!0);a.stroke()}; -mxCylinder.prototype.redrawPath=function(a,c,f,d,b,e){c=Math.min(this.maxHeight,Math.round(b/5));if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin());e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,b-c),a.curveTo(d,b+c/3,0,b+c/3,0,b-c),a.close())};function mxConnector(a,c,f){mxPolyline.call(this,a,c,f)}mxUtils.extend(mxConnector,mxPolyline); -mxConnector.prototype.updateBoundingBox=function(){this.useSvgBoundingBox=null!=this.style&&1==this.style[mxConstants.STYLE_CURVED];mxShape.prototype.updateBoundingBox.apply(this,arguments)};mxConnector.prototype.paintEdgeShape=function(a,c){var f=this.createMarker(a,c,!0),d=this.createMarker(a,c,!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=f&&f();null!=d&&d()}; -mxConnector.prototype.createMarker=function(a,c,f){var d=null,b=c.length,e=mxUtils.getValue(this.style,f?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW),g=f?c[1]:c[b-2],k=f?c[0]:c[b-1];if(null!=e&&null!=g&&null!=k){for(d=1;d=b)&&a.close(),a.fillAndStroke(),e=d)&&a.close(), -a.fillAndStroke(),e=b)&&a.close(),a.fillAndStroke(),e=d)&&a.close(),a.fillAndStroke(),e=a)&&b.close(),b.fillAndStroke(),e=d)&&b.close(), +b.fillAndStroke(),e=a)&&b.close(),b.fillAndStroke(),e=d)&&b.close(),b.fillAndStroke(),ec)break;k=f}e=b.getIndex(a);e=Math.max(0,g-(g>e?1:0));d.add(b,a,e)}}; -mxStackLayout.prototype.getParentSize=function(a){var c=this.graph.getModel(),f=c.getGeometry(a);if(null!=this.graph.container&&(null==f&&c.isLayer(a)||a==this.graph.getView().currentRoot))f=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return f}; -mxStackLayout.prototype.execute=function(a){if(null!=a){var c=this.getParentSize(a),f=this.isHorizontal(),d=this.graph.getModel(),b=null;null!=c&&(b=f?c.height-this.marginTop-this.marginBottom:c.width-this.marginLeft-this.marginRight);var b=b-(2*this.spacing+2*this.border),e=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k, -mxConstants.STYLE_HORIZONTAL,!0);null!=c&&(l=k?Math.min(l,c.height):Math.min(l,c.width));f==k&&(b-=l);k?g+=l:e+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(a),r=0;rthis.wrap||!f&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,f?g+=l+this.spacing:e+=l+this.spacing,l= -0;var l=Math.max(l,f?q.height:q.width),t=0;if(!this.borderCollapse)var u=this.graph.getCellStyle(s),t=mxUtils.getNumber(u,mxConstants.STYLE_STROKEWIDTH,1);null!=k?f?q.x=m+this.spacing+Math.floor(t/2):q.y=m+this.spacing+Math.floor(t/2):this.keepFirstLocation||(f?q.x=e:q.y=g);f?q.y=g:q.x=e;this.fill&&null!=b&&(f?q.height=b:q.width=b);this.setChildGeometry(s,q);n=s;k=q;m=f?k.x+k.width+Math.floor(t/2):k.y+k.height+Math.floor(t/2)}}}this.resizeParent&&null!=c&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a, -c,k):this.resizeLast&&null!=c&&null!=k&&null!=n&&(f?k.width=c.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=c.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,c){var f=this.graph.getCellGeometry(a);(null==f||c.x!=f.x||c.y!=f.y||c.width!=f.width||c.height!=f.height)&&this.graph.getModel().setGeometry(a,c)}; -mxStackLayout.prototype.updateParentGeometry=function(a,c,f){var d=this.isHorizontal(),b=this.graph.getModel(),e=c.clone();d?(f=f.x+f.width+this.spacing+this.marginRight,e.width=this.resizeParentMax?Math.max(e.width,f):f):(f=f.y+f.height+this.spacing+this.marginBottom,e.height=this.resizeParentMax?Math.max(e.height,f):f);(c.x!=e.x||c.y!=e.y||c.width!=e.width||c.height!=e.height)&&b.setGeometry(a,e)}; -function mxPartitionLayout(a,c,f,d){mxGraphLayout.call(this,a);this.horizontal=null!=c?c:!0;this.spacing=f||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal}; -mxPartitionLayout.prototype.moveCell=function(a,c,f){f=this.graph.getModel();var d=f.getParent(a);if(null!=a&&null!=d){for(var b=0,e=0,g=f.getChildCount(d),b=0;bc)break;e=k}}c=d.getIndex(a);c=Math.max(0,b-(b>c?1:0));f.add(d,a,c)}}; -mxPartitionLayout.prototype.execute=function(a){var c=this.isHorizontal(),f=this.graph.getModel(),d=f.getGeometry(a);if(null!=this.graph.container&&(null==d&&f.isLayer(a)||a==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var b=[],e=f.getChildCount(a),g=0;gc)break;k=f}e=a.getIndex(b);e=Math.max(0,g-(g>e?1:0));d.add(a,b,e)}}; +mxStackLayout.prototype.getParentSize=function(b){var c=this.graph.getModel(),f=c.getGeometry(b);if(null!=this.graph.container&&(null==f&&c.isLayer(b)||b==this.graph.getView().currentRoot))f=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return f}; +mxStackLayout.prototype.execute=function(b){if(null!=b){var c=this.getParentSize(b),f=this.isHorizontal(),d=this.graph.getModel(),a=null;null!=c&&(a=f?c.height-this.marginTop-this.marginBottom:c.width-this.marginLeft-this.marginRight);var a=a-(2*this.spacing+2*this.border),e=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(b)){var k=this.graph.getCellStyle(b),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k, +mxConstants.STYLE_HORIZONTAL,!0);null!=c&&(l=k?Math.min(l,c.height):Math.min(l,c.width));f==k&&(a-=l);k?g+=l:e+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(b),r=0;rthis.wrap||!f&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,f?g+=l+this.spacing:e+=l+this.spacing,l= +0;var l=Math.max(l,f?q.height:q.width),t=0;if(!this.borderCollapse)var u=this.graph.getCellStyle(s),t=mxUtils.getNumber(u,mxConstants.STYLE_STROKEWIDTH,1);null!=k?f?q.x=m+this.spacing+Math.floor(t/2):q.y=m+this.spacing+Math.floor(t/2):this.keepFirstLocation||(f?q.x=e:q.y=g);f?q.y=g:q.x=e;this.fill&&null!=a&&(f?q.height=a:q.width=a);this.setChildGeometry(s,q);n=s;k=q;m=f?k.x+k.width+Math.floor(t/2):k.y+k.height+Math.floor(t/2)}}}this.resizeParent&&null!=c&&null!=k&&!this.graph.isCellCollapsed(b)?this.updateParentGeometry(b, +c,k):this.resizeLast&&null!=c&&null!=k&&null!=n&&(f?k.width=c.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=c.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(b,c){var f=this.graph.getCellGeometry(b);(null==f||c.x!=f.x||c.y!=f.y||c.width!=f.width||c.height!=f.height)&&this.graph.getModel().setGeometry(b,c)}; +mxStackLayout.prototype.updateParentGeometry=function(b,c,f){var d=this.isHorizontal(),a=this.graph.getModel(),e=c.clone();d?(f=f.x+f.width+this.spacing+this.marginRight,e.width=this.resizeParentMax?Math.max(e.width,f):f):(f=f.y+f.height+this.spacing+this.marginBottom,e.height=this.resizeParentMax?Math.max(e.height,f):f);(c.x!=e.x||c.y!=e.y||c.width!=e.width||c.height!=e.height)&&a.setGeometry(b,e)}; +function mxPartitionLayout(b,c,f,d){mxGraphLayout.call(this,b);this.horizontal=null!=c?c:!0;this.spacing=f||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal}; +mxPartitionLayout.prototype.moveCell=function(b,c,f){f=this.graph.getModel();var d=f.getParent(b);if(null!=b&&null!=d){for(var a=0,e=0,g=f.getChildCount(d),a=0;ac)break;e=k}}c=d.getIndex(b);c=Math.max(0,a-(a>c?1:0));f.add(d,b,c)}}; +mxPartitionLayout.prototype.execute=function(b){var c=this.isHorizontal(),f=this.graph.getModel(),d=f.getGeometry(b);if(null!=this.graph.container&&(null==d&&f.isLayer(b)||b==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var a=[],e=f.getChildCount(b),g=0;gk.x&&(b=Math.abs(g-k.x));0>k.y&&(l=Math.abs(d-k.y));(0!=b||0!=l)&&this.moveNode(this.node,b,l);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(this.node)}null!=this.parentX&&null!=this.parentY&&(e=this.graph.getCellGeometry(a),null!=e&&(e=e.clone(),e.x=this.parentX,e.y=this.parentY,f.setGeometry(a,e)))}}finally{f.endUpdate()}}}; -mxCompactTreeLayout.prototype.moveNode=function(a,c,f){a.x+=c;a.y+=f;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,c,f),a=a.next}; -mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,c){var f=new mxDictionary;c.sort(function(d,b){var e=d.getTerminal(d.getTerminal(!1)==a),c=f.get(e);null==c&&(c=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),f.put(e,c));var e=b.getTerminal(b.getTerminal(!1)==a),k=f.get(e);null==k&&(k=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),f.put(e,k));return mxCellPath.compare(c,k)})}; -mxCompactTreeLayout.prototype.findRankHeights=function(a,c){if(null==this.maxRankHeight[c]||this.maxRankHeight[c]a.height&&(a.height=this.maxRankHeight[c]);for(var f=a.child;null!=f;)this.setCellHeights(f,c+1),f=f.next}; -mxCompactTreeLayout.prototype.dfs=function(a,c){var f=mxCellPath.create(a),d=null;if(null!=a&&null==this.visited[f]&&!this.isVertexIgnored(a)){this.visited[f]=a;var d=this.createNode(a),f=this.graph.getModel(),b=null,e=this.graph.getEdges(a,c,this.invert,!this.invert,!1,!0),g=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,e);for(var k=0;k=a+f)return 0;g=0a?a*d/f-c:0a+f?(f+a)*e/b-(c+d):e-(c+d);return 0g+2*this.prefHozEdgeSep&&(e-=2*this.prefHozEdgeSep);a=e/d;c=a/2;e>g+2*this.prefHozEdgeSep&&(c+=this.prefHozEdgeSep);for(var e=this.minEdgeJetty-this.prefVertEdgeOff,g=0,k=this.getVertexBounds(f),l=0;ld/2&&(e-=this.prefVertEdgeOff);c+=a;g=Math.max(g,e)}}; -function WeightedCellSorter(a,c){this.cell=a;this.weightedValue=c}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,c){return null!=a&&null!=c?c.weightedValue>a.weightedValue?1:c.weightedValuek.x&&(a=Math.abs(g-k.x));0>k.y&&(l=Math.abs(d-k.y));(0!=a||0!=l)&&this.moveNode(this.node,a,l);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(this.node)}null!=this.parentX&&null!=this.parentY&&(e=this.graph.getCellGeometry(b),null!=e&&(e=e.clone(),e.x=this.parentX,e.y=this.parentY,f.setGeometry(b,e)))}}finally{f.endUpdate()}}}; +mxCompactTreeLayout.prototype.moveNode=function(b,c,f){b.x+=c;b.y+=f;this.apply(b);for(b=b.child;null!=b;)this.moveNode(b,c,f),b=b.next}; +mxCompactTreeLayout.prototype.sortOutgoingEdges=function(b,c){var f=new mxDictionary;c.sort(function(d,a){var e=d.getTerminal(d.getTerminal(!1)==b),c=f.get(e);null==c&&(c=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),f.put(e,c));var e=a.getTerminal(a.getTerminal(!1)==b),k=f.get(e);null==k&&(k=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),f.put(e,k));return mxCellPath.compare(c,k)})}; +mxCompactTreeLayout.prototype.findRankHeights=function(b,c){if(null==this.maxRankHeight[c]||this.maxRankHeight[c]b.height&&(b.height=this.maxRankHeight[c]);for(var f=b.child;null!=f;)this.setCellHeights(f,c+1),f=f.next}; +mxCompactTreeLayout.prototype.dfs=function(b,c){var f=mxCellPath.create(b),d=null;if(null!=b&&null==this.visited[f]&&!this.isVertexIgnored(b)){this.visited[f]=b;var d=this.createNode(b),f=this.graph.getModel(),a=null,e=this.graph.getEdges(b,c,this.invert,!this.invert,!1,!0),g=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(b,e);for(var k=0;k=b+f)return 0;g=0b?b*d/f-c:0b+f?(f+b)*e/a-(c+d):e-(c+d);return 0g+2*this.prefHozEdgeSep&&(e-=2*this.prefHozEdgeSep);b=e/d;c=b/2;e>g+2*this.prefHozEdgeSep&&(c+=this.prefHozEdgeSep);for(var e=this.minEdgeJetty-this.prefVertEdgeOff,g=0,k=this.getVertexBounds(f),l=0;ld/2&&(e-=this.prefVertEdgeOff);c+=b;g=Math.max(g,e)}}; +function WeightedCellSorter(b,c){this.cell=b;this.weightedValue=c}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(b,c){return null!=b&&null!=c?c.weightedValue>b.weightedValue?1:c.weightedValued.theta&&bd.theta&&athis.forceConstant&&(this.forceConstant= +mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(b){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(b).length}; +mxFastOrganicLayout.prototype.execute=function(b){var c=this.graph.getModel();this.vertexArray=[];for(var f=this.graph.getChildVertices(b),d=0;dthis.forceConstant&&(this.forceConstant= 0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;dc&&(c=0.001);var f=this.dispX[a]/c*Math.min(c,this.temperature),c=this.dispY[a]/c*Math.min(c,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=f;this.cellLocation[a][1]+=c}}; -mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;athis.maxDistanceLimit||(gc&&(c=0.001);var f=this.dispX[b]/c*Math.min(c,this.temperature),c=this.dispY[b]/c*Math.min(c,this.temperature);this.dispX[b]=0;this.dispY[b]=0;this.cellLocation[b][0]+=f;this.cellLocation[b][1]+=c}}; +mxFastOrganicLayout.prototype.calcAttraction=function(){for(var b=0;bthis.maxDistanceLimit||(ga?a+"-"+f:f+"-"+a):null}; -mxParallelEdgeLayout.prototype.layout=function(a){var c=a[0],f=this.graph.getView(),d=this.graph.getModel(),b=d.getGeometry(f.getVisibleTerminal(c,!0)),d=d.getGeometry(f.getVisibleTerminal(c,!1));if(b==d)for(var c=b.x+b.width+this.spacing,f=b.y+b.height/2,e=0;eb?b+"-"+f:f+"-"+b):null}; +mxParallelEdgeLayout.prototype.layout=function(b){var c=b[0],f=this.graph.getView(),d=this.graph.getModel(),a=d.getGeometry(f.getVisibleTerminal(c,!0)),d=d.getGeometry(f.getVisibleTerminal(c,!1));if(a==d)for(var c=a.x+a.width+this.spacing,f=a.y+a.height/2,e=0;emxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}f[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null; +mxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(b){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(b){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(b){return null}; +mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(b,c){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(b,c){this.isVertex()?this.x[0]=c:this.isEdge()&&(this.x[b-this.minRank-1]=c)};mxGraphAbstractHierarchyCell.prototype.getX=function(b){return this.isVertex()?this.x[0]:this.isEdge()?this.x[b-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(b,c){this.isVertex()?this.y[0]=c:this.isEdge()&&(this.y[b-this.minRank-1]=c)}; +function mxGraphHierarchyNode(b){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=b;this.id=mxObjectIdentity.get(b);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null; +mxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(b){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(b){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var c=0;cmxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}f[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null; mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1; -mxGraphHierarchyModel.prototype.createInternalCells=function(a,c,f){for(var d=a.getGraph(),b=0;b=l.length){for(var k= -new mxGraphHierarchyEdge(l),m=0;mmxUtils.indexOf(f[b].connectsAsSource,k)&&f[b].connectsAsSource.push(k)}}}f[b].temp[0]=0}}; -mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var c=0;cd.maxRank&&0>d.minRank&&(a[d.temp[0]].push(d),d.maxRank=d.temp[0],d.minRank=d.temp[0],d.temp[0]=a[d.maxRank].length-1);if(null!=b&&null!=c&&1mxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}f[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0; +mxGraphHierarchyModel.prototype.createInternalCells=function(b,c,f){for(var d=b.getGraph(),a=0;a=l.length){for(var k= +new mxGraphHierarchyEdge(l),m=0;mmxUtils.indexOf(f[a].connectsAsSource,k)&&f[a].connectsAsSource.push(k)}}}f[a].temp[0]=0}}; +mxGraphHierarchyModel.prototype.initialRank=function(){var b=[];if(null!=this.roots)for(var c=0;cd.maxRank&&0>d.minRank&&(b[d.temp[0]].push(d),d.maxRank=d.temp[0],d.minRank=d.temp[0],d.temp[0]=b[d.maxRank].length-1);if(null!=a&&null!=c&&1mxUtils.indexOf(l.connectsAsTarget,g)&&l.connectsAsTarget.push(g))}}f[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0; mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;mxSwimlaneModel.prototype.ranksPerGroup=null; -mxSwimlaneModel.prototype.createInternalCells=function(a,c,f){for(var d=a.getGraph(),b=a.swimlanes,e=0;e=m.length){for(var l=new mxGraphHierarchyEdge(m),n=0;nmxUtils.indexOf(f[e].connectsAsSource,l)&&f[e].connectsAsSource.push(l)}}}f[e].temp[0]=0}}; -mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],c={};if(null!=this.roots)for(var f=0;fc[d.swimlaneIndex]&&(k=c[d.swimlaneIndex]);d.temp[0]=k;if(null!=e)for(f=0;fd.maxRank&&0>d.minRank&&(a[d.temp[0]].push(d),d.maxRank=d.temp[0],d.minRank=d.temp[0],d.temp[0]=a[d.maxRank].length-1);if(null!=b&&null!=c&&1=m.length){for(var l=new mxGraphHierarchyEdge(m),n=0;nmxUtils.indexOf(f[e].connectsAsSource,l)&&f[e].connectsAsSource.push(l)}}}f[e].temp[0]=0}}; +mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var b=[],c={};if(null!=this.roots)for(var f=0;fc[d.swimlaneIndex]&&(k=c[d.swimlaneIndex]);d.temp[0]=k;if(null!=e)for(f=0;fd.maxRank&&0>d.minRank&&(b[d.temp[0]].push(d),d.maxRank=d.temp[0],d.minRank=d.temp[0],d.temp[0]=b[d.maxRank].length-1);if(null!=a&&null!=c&&1>1,++b[l]}return f}; -mxMedianHybridCrossingReduction.prototype.transpose=function(a,c){for(var f=!0,d=0;f&&10>d++;)for(var b=1==a%2&&1==d%2,f=!1,e=0;en&&(n=l);k[n]=m}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,z=null,l=0;lt[A]&&x++,s[y]u[A]&&x++,q[y]a.medianValue?-1:c.medianValue>1,++a[l]}return f}; +mxMedianHybridCrossingReduction.prototype.transpose=function(b,c){for(var f=!0,d=0;f&&10>d++;)for(var a=1==b%2&&1==d%2,f=!1,e=0;en&&(n=l);k[n]=m}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,z=null,l=0;lt[A]&&x++,s[y]u[A]&&x++,q[y]b.medianValue?-1:c.medianValueu+1&&(m==d[l].length-1?(b.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m+1],u=m.getGeneralPurposeVariable(l),u=u-m.width/2-this.intraCellSpacing-b.width/2,u>v?(b.setGeneralPurposeVariable(l, -v),p=!0):u>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,u),p=!0)));if(p){for(b=0;b=k&&l<=r?g.setGeneralPurposeVariable(a,l):lr&&(g.setGeneralPurposeVariable(a,r),this.currentXDelta+=l-r);d[e].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,c){for(var f=0,d=0;dthis.widestRankValue&&(this.widestRankValue=k,this.widestRank=b);this.rankWidths[b]=k}!0==l&&mxLog.warn("At least one cell has no bounds");this.rankY[b]=f;k=e/2+d/2+this.interRankCellSpacing;d=e;f=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?f+k:f- -k;for(m=0;mb.maxRank-b.minRank-1)){for(var e=b.getGeneralPurposeVariable(b.minRank+1),g=!0,k=0,l=b.minRank+2;lb.minRank+1;l--)r=b.getX(l-1),p==r?(n[l-b.minRank-2]=p,g++):this.repositionValid(c,b,l-1,p)?(n[l-b.minRank-2]=p,g++):(n[l-b.minRank-2]=b.getX(l-1),p=r);if(g>k||e>k)if(g>=e)for(l=b.maxRank-2;l>b.minRank;l--)b.setX(l,n[l-b.minRank-1]);else if(e>g)for(l=b.minRank+2;lb)return!1;e=c.getGeneralPurposeVariable(f);if(de){if(b==a.length-1)return!0;a=a[b+1];f=a.getGeneralPurposeVariable(f);f=f-a.width/2-this.intraCellSpacing-c.width/2;if(!(f>=d))return!1}return!0}; -mxCoordinateAssignment.prototype.setCellLocations=function(a,c){this.rankTopY=[];this.rankBottomY=[];for(var f=0;fu+1&&(m==d[l].length-1?(a.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m+1],u=m.getGeneralPurposeVariable(l),u=u-m.width/2-this.intraCellSpacing-a.width/2,u>v?(a.setGeneralPurposeVariable(l, +v),p=!0):u>a.getGeneralPurposeVariable(l)+1&&(a.setGeneralPurposeVariable(l,u),p=!0)));if(p){for(a=0;a=k&&l<=r?g.setGeneralPurposeVariable(b,l):lr&&(g.setGeneralPurposeVariable(b,r),this.currentXDelta+=l-r);d[e].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(b,c){for(var f=0,d=0;dthis.widestRankValue&&(this.widestRankValue=k,this.widestRank=a);this.rankWidths[a]=k}!0==l&&mxLog.warn("At least one cell has no bounds");this.rankY[a]=f;k=e/2+d/2+this.interRankCellSpacing;d=e;f=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?f+k:f- +k;for(m=0;ma.maxRank-a.minRank-1)){for(var e=a.getGeneralPurposeVariable(a.minRank+1),g=!0,k=0,l=a.minRank+2;la.minRank+1;l--)r=a.getX(l-1),p==r?(n[l-a.minRank-2]=p,g++):this.repositionValid(c,a,l-1,p)?(n[l-a.minRank-2]=p,g++):(n[l-a.minRank-2]=a.getX(l-1),p=r);if(g>k||e>k)if(g>=e)for(l=a.maxRank-2;l>a.minRank;l--)a.setX(l,n[l-a.minRank-1]);else if(e>g)for(l=a.minRank+2;la)return!1;e=c.getGeneralPurposeVariable(f);if(de){if(a==b.length-1)return!0;b=b[a+1];f=b.getGeneralPurposeVariable(f);f=f-b.width/2-this.intraCellSpacing-c.width/2;if(!(f>=d))return!1}return!0}; +mxCoordinateAssignment.prototype.setCellLocations=function(b,c){this.rankTopY=[];this.rankBottomY=[];for(var f=0;fk;k++){if(-1(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/e;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=r=0;me/2&&(p-=this.prefVertEdgeOff);for(t=0;ta.weightedValue?-1:c.weightedValuek;k++){if(-1(e+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/e;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=r=0;me/2&&(p-=this.prefVertEdgeOff);for(t=0;tb.weightedValue?-1:c.weightedValuee&&(e=l,b=k)}}0==f.length&&null!=b&&f.push(b)}return f}; -mxHierarchicalLayout.prototype.getEdges=function(a){var c=this.edgesCache.get(a);if(null!=c)return c;for(var f=this.graph.model,c=[],d=this.graph.isCellCollapsed(a),b=f.getChildCount(a),e=0;ee&&(e=l,a=k)}}0==f.length&&null!=a&&f.push(a)}return f}; +mxHierarchicalLayout.prototype.getEdges=function(b){var c=this.edgesCache.get(b);if(null!=c)return c;for(var f=this.graph.model,c=[],d=this.graph.isCellCollapsed(b),a=f.getChildCount(b),e=0;ec.length)){null==a&&(a=f.getParent(c[0]));this.parentY=this.parentX=null;if(a!=this.root&&null!=f.isVertex(a)&&this.maintainParentLocation){var d=this.graph.getCellGeometry(a);null!=d&&(this.parentX=d.x,this.parentY=d.y)}this.swimlanes=c;this.dummyVertices=[];for(var b=0;be&&(e=l,b=k)}}0==f.length&&null!=b&&f.push(b)}return f}; -mxSwimlaneLayout.prototype.getEdges=function(a){var c=this.edgesCache.get(a);if(null!=c)return c;for(var f=this.graph.model,c=[],d=this.graph.isCellCollapsed(a),b=f.getChildCount(a),e=0;e=this.swimlanes.length)&&(r>k||(!c||p)&&r==k))b= -this.traverse(n,c,m[f],d,b,e,g,r)}}else if(null==b[l])for(f=0;fc.length)){null==b&&(b=f.getParent(c[0]));this.parentY=this.parentX=null;if(b!=this.root&&null!=f.isVertex(b)&&this.maintainParentLocation){var d=this.graph.getCellGeometry(b);null!=d&&(this.parentX=d.x,this.parentY=d.y)}this.swimlanes=c;this.dummyVertices=[];for(var a=0;ae&&(e=l,a=k)}}0==f.length&&null!=a&&f.push(a)}return f}; +mxSwimlaneLayout.prototype.getEdges=function(b){var c=this.edgesCache.get(b);if(null!=c)return c;for(var f=this.graph.model,c=[],d=this.graph.isCellCollapsed(b),a=f.getChildCount(b),e=0;e=this.swimlanes.length)&&(r>k||(!c||p)&&r==k))a= +this.traverse(n,c,m[f],d,a,e,g,r)}}else if(null==a[l])for(f=0;fmxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,c){if(null!=a){if(a.getTerminal(!c)!=this&&null!=this.edges){var f=this.getEdgeIndex(a);0<=f&&this.edges.splice(f,1)}a.setTerminal(null,c)}return a}; -mxCell.prototype.removeFromTerminal=function(a){var c=this.getTerminal(a);null!=c&&c.removeEdge(this,a)};mxCell.prototype.getAttribute=function(a,c){var f=this.getValue();return(null!=f&&f.nodeType==mxConstants.NODETYPE_ELEMENT?f.getAttribute(a):null)||c};mxCell.prototype.setAttribute=function(a,c){var f=this.getValue();null!=f&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&f.setAttribute(a,c)}; -mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,c,f,d){mxRectangle.call(this,a,c,f,d)}mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0; +mxCell.prototype.setId=function(b){this.id=b};mxCell.prototype.getValue=function(){return this.value};mxCell.prototype.setValue=function(b){this.value=b};mxCell.prototype.valueChanged=function(b){var c=this.getValue();this.setValue(b);return c};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(b){this.geometry=b};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(b){this.style=b}; +mxCell.prototype.isVertex=function(){return 0!=this.vertex};mxCell.prototype.setVertex=function(b){this.vertex=b};mxCell.prototype.isEdge=function(){return 0!=this.edge};mxCell.prototype.setEdge=function(b){this.edge=b};mxCell.prototype.isConnectable=function(){return 0!=this.connectable};mxCell.prototype.setConnectable=function(b){this.connectable=b};mxCell.prototype.isVisible=function(){return 0!=this.visible};mxCell.prototype.setVisible=function(b){this.visible=b}; +mxCell.prototype.isCollapsed=function(){return 0!=this.collapsed};mxCell.prototype.setCollapsed=function(b){this.collapsed=b};mxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(b){this.parent=b};mxCell.prototype.getTerminal=function(b){return b?this.source:this.target};mxCell.prototype.setTerminal=function(b,c){c?this.source=b:this.target=b;return b};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length}; +mxCell.prototype.getIndex=function(b){return mxUtils.indexOf(this.children,b)};mxCell.prototype.getChildAt=function(b){return null==this.children?null:this.children[b]};mxCell.prototype.insert=function(b,c){null!=b&&(null==c&&(c=this.getChildCount(),b.getParent()==this&&c--),b.removeFromParent(),b.setParent(this),null==this.children?(this.children=[],this.children.push(b)):this.children.splice(c,0,b));return b}; +mxCell.prototype.remove=function(b){var c=null;null!=this.children&&0<=b&&(c=this.getChildAt(b),null!=c&&(this.children.splice(b,1),c.setParent(null)));return c};mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var b=this.parent.getIndex(this);this.parent.remove(b)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(b){return mxUtils.indexOf(this.edges,b)}; +mxCell.prototype.getEdgeAt=function(b){return null==this.edges?null:this.edges[b]};mxCell.prototype.insertEdge=function(b,c){if(null!=b&&(b.removeFromTerminal(c),b.setTerminal(this,c),null==this.edges||b.getTerminal(!c)!=this||0>mxUtils.indexOf(this.edges,b)))null==this.edges&&(this.edges=[]),this.edges.push(b);return b};mxCell.prototype.removeEdge=function(b,c){if(null!=b){if(b.getTerminal(!c)!=this&&null!=this.edges){var f=this.getEdgeIndex(b);0<=f&&this.edges.splice(f,1)}b.setTerminal(null,c)}return b}; +mxCell.prototype.removeFromTerminal=function(b){var c=this.getTerminal(b);null!=c&&c.removeEdge(this,b)};mxCell.prototype.getAttribute=function(b,c){var f=this.getValue();return(null!=f&&f.nodeType==mxConstants.NODETYPE_ELEMENT?f.getAttribute(b):null)||c};mxCell.prototype.setAttribute=function(b,c){var f=this.getValue();null!=f&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&f.setAttribute(b,c)}; +mxCell.prototype.clone=function(){var b=mxUtils.clone(this,this.mxTransient);b.setValue(this.cloneValue());return b};mxCell.prototype.cloneValue=function(){var b=this.getValue();null!=b&&("function"==typeof b.clone?b=b.clone():isNaN(b.nodeType)||(b=b.cloneNode(!0)));return b};function mxGeometry(b,c,f,d){mxRectangle.call(this,b,c,f,d)}mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0; mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1; -mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,c){c?this.sourcePoint=a:this.targetPoint=a;return a}; -mxGeometry.prototype.rotate=function(a,c){var f=mxUtils.toRadians(a),d=Math.cos(f),f=Math.sin(f);if(!this.relative){var b=new mxPoint(this.getCenterX(),this.getCenterY()),b=mxUtils.getRotatedPoint(b,d,f,c);this.x=Math.round(b.x-this.width/2);this.y=Math.round(b.y-this.height/2)}null!=this.sourcePoint&&(b=mxUtils.getRotatedPoint(this.sourcePoint,d,f,c),this.sourcePoint.x=Math.round(b.x),this.sourcePoint.y=Math.round(b.y));null!=this.targetPoint&&(b=mxUtils.getRotatedPoint(this.targetPoint,d,f,c),this.targetPoint.x= -Math.round(b.x),this.targetPoint.y=Math.round(b.y));if(null!=this.points)for(var e=0;ec[b]?1:-1:(f=parseInt(a[b]),b=parseInt(c[b]),d=f==b?0:f>b?1:-1);break}0==d&&(f=a.length,b=c.length,f!=b&&(d=f>b?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,c,f,d){c=a.getCenterX();var b=a.getCenterY(),e=Math.atan2(f.y-b,f.x-c),g=new mxPoint(0,0),k=Math.PI,l=Math.PI/2-e,m=Math.atan2(a.height,a.width);e<-k+m||e>k-m?(g.x=a.x,g.y=b-a.width* -Math.tan(e)/2):e<-m?(g.y=a.y,g.x=c-a.height*Math.tan(l)/2):e=a.x&&f.x<=a.x+a.width?g.x=f.x:f.y>=a.y&&f.y<=a.y+a.height&&(g.y=f.y),f.xa.x+a.width&&(g.x=a.x+a.width),f.ya.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,c,f,d){var b=a.x,e=a.y,g=a.width/2,k=a.height/2,l=b+g,m=e+k;c=f.x;f=f.y;var n=parseInt(c-l),p=parseInt(f-m);if(0==n&&0!=p)return new mxPoint(l, -m+k*p/Math.abs(p));if(0==n&&0==p)return new mxPoint(c,f);if(d){if(f>=e&&f<=e+a.height)return a=f-m,a=Math.sqrt(g*g*(1-a*a/(k*k)))||0,c<=b&&(a=-a),new mxPoint(l+a,f);if(c>=b&&c<=b+a.width)return a=c-l,a=Math.sqrt(k*k*(1-a*a/(g*g)))||0,f<=e&&(a=-a),new mxPoint(c,m+a)}b=p/n;m-=b*l;e=g*g*b*b+k*k;a=-2*l*e;k=Math.sqrt(a*a-4*e*(g*g*b*b*l*l+k*k*l*l-g*g*k*k));g=(-a+k)/(2*e);k=(-a-k)/(2*e);l=b*g+m;m=b*k+m;b=Math.sqrt(Math.pow(g-c,2)+Math.pow(l-f,2));c=Math.sqrt(Math.pow(k-c,2)+Math.pow(m-f,2));e=f=0;bf?new mxPoint(g,b):new mxPoint(g,b+a);if(k==f)return g>l?new mxPoint(c,k):new mxPoint(c+e,k);var m=g,n=k;d&&(l>=c&&l<=c+e?m=l:f>=b&&f<=b+a&&(n=f));return l-t&&sMath.PI-t,t=null;q?t=d&&(b&&f.x>=n.x&&f.x<=r.x||!b&&f.y>=n.y&&f.y<=r.y)?b?new mxPoint(f.x,n.y):new mxPoint(n.x,f.y):c==mxConstants.DIRECTION_NORTH?new mxPoint(e+k/2+a*Math.tan(s)/2,g+a):c==mxConstants.DIRECTION_SOUTH?new mxPoint(e+k/2-a*Math.tan(s)/2,g):c==mxConstants.DIRECTION_WEST?new mxPoint(e+k,g+a/2+k*Math.tan(s)/2):new mxPoint(e, -g+a/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,m),f.y>=g&&f.y<=g+a?(d.x=b?l:c==mxConstants.DIRECTION_WEST?e+k:e,d.y=f.y):f.x>=e&&f.x<=e+k&&(d.x=f.x,d.y=!b?m:c==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,m=d.y),t=b&&f.x<=e+k/2||!b&&f.y<=g+a/2?mxUtils.intersection(f.x,f.y,l,m,n.x,n.y,p.x,p.y):mxUtils.intersection(f.x,f.y,l,m,p.x,p.y,r.x,r.y));null==t&&(t=new mxPoint(l,m));return t},HexagonPerimeter:function(a,c,f,d){var b=a.x,e=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var m=f.x,n=f.y,p= --Math.atan2(n-a,m-l),r=Math.PI,s=Math.PI/2,q=new mxPoint(l,a);c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var t=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH;c=new mxPoint;q=new mxPoint;if(me+k||m>b+g&&nb+g&&n>e+k)d=!1;if(d){if(t){if(m==l){if(n<=e)return new mxPoint(l,e);if(n>=e+k)return new mxPoint(l,e+k)}else if(mb+g){if(n==e+k/4)return new mxPoint(b+g,e+k/4);if(n==e+3*k/4)return new mxPoint(b+g,e+3*k/4)}else if(m==b){if(na)return new mxPoint(b,e+3*k/4)}else if(m==b+g){if(na)return new mxPoint(b+g,e+3*k/4)}if(n==e)return new mxPoint(l,e);if(n==e+k)return new mxPoint(l,e+k);me+k/4&&ne+3*k/4&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+g,e+Math.floor(1.25*k))):m>l&&(n>e+k/4&&ne+3*k/4&&(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b,e+Math.floor(1.25*k))))}else{if(n==a){if(m<=b)return new mxPoint(b,e+k/2);if(m>=b+g)return new mxPoint(b+g,e+k/ -2)}else if(ne+k){if(m==b+g/4)return new mxPoint(b+g/4,e+k);if(m==b+3*g/4)return new mxPoint(b+3*g/4,e+k)}else if(n==e){if(ml)return new mxPoint(b+3*g/4,e)}else if(n==e+k){if(ma)return new mxPoint(b+3*g/4,e+k)}if(m==b)return new mxPoint(b,a);if(m==b+g)return new mxPoint(b+g,a);nb+g/4&&mb+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e-Math.floor(0.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e+k)):n>a&&(m>b+g/4&&mb+3*g/4&&(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e)))}d= -l;p=a;m>=b&&m<=b+g?(d=m,p=n=e&&n<=e+k&&(p=n,d=m-m?(c=new mxPoint(b+g,e), -q=new mxPoint(b+g,e+k)):p>m&&ps&&pr-m&&p<=r||p<-r+m&&p>=-r?(c=new mxPoint(b,e),q=new mxPoint(b,e+k)):p<-m&&p>-s?(c=new mxPoint(b+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b,e+Math.floor(1.25*k))):p<-s&&p>-r+m&&(c=new mxPoint(b-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(b+g,e+ -Math.floor(1.25*k)))}else{m=Math.atan2(k/2,g/4);if(p==m)return new mxPoint(b+Math.floor(0.75*g),e);if(p==r-m)return new mxPoint(b+Math.floor(0.25*g),e);if(p==r||p==-r)return new mxPoint(b,e+Math.floor(0.5*k));if(0==p)return new mxPoint(b+g,e+Math.floor(0.5*k));if(p==-m)return new mxPoint(b+Math.floor(0.75*g),e+k);if(p==-r+m)return new mxPoint(b+Math.floor(0.25*g),e+k);0m&&pr-m&&pp&&p>-m?(c=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(b+Math.floor(1.25*g),e)):p<-m&&p>-r+m?(c=new mxPoint(b,e+k),q=new mxPoint(b+g,e+k)):p<-r+m&&p>-r&&(c=new mxPoint(b-Math.floor(0.25*g),e),q=new mxPoint(b+Math.floor(0.5*g),e+Math.floor(1.5*k)))}q=mxUtils.intersection(l,a,f.x,f.y,c.x,c.y,q.x,q.y)}return null==q?new mxPoint(l,a):q}}; -function mxPrintPreview(a,c,f,d,b,e,g,k,l){this.graph=a;this.scale=null!=c?c:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=f?f:a.pageFormat;this.title=null!=k?k:"Printer-friendly version";this.x0=null!=b?b:0;this.y0=null!=e?e:0;this.borderColor=g;this.pageSelector=null!=l?l:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.marginTop=0; +mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var b=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=b}};mxGeometry.prototype.getTerminalPoint=function(b){return b?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(b,c){c?this.sourcePoint=b:this.targetPoint=b;return b}; +mxGeometry.prototype.rotate=function(b,c){var f=mxUtils.toRadians(b),d=Math.cos(f),f=Math.sin(f);if(!this.relative){var a=new mxPoint(this.getCenterX(),this.getCenterY()),a=mxUtils.getRotatedPoint(a,d,f,c);this.x=Math.round(a.x-this.width/2);this.y=Math.round(a.y-this.height/2)}null!=this.sourcePoint&&(a=mxUtils.getRotatedPoint(this.sourcePoint,d,f,c),this.sourcePoint.x=Math.round(a.x),this.sourcePoint.y=Math.round(a.y));null!=this.targetPoint&&(a=mxUtils.getRotatedPoint(this.targetPoint,d,f,c),this.targetPoint.x= +Math.round(a.x),this.targetPoint.y=Math.round(a.y));if(null!=this.points)for(var e=0;ec[a]?1:-1:(f=parseInt(b[a]),a=parseInt(c[a]),d=f==a?0:f>a?1:-1);break}0==d&&(f=b.length,a=c.length,f!=a&&(d=f>a?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(b,c,f,d){c=b.getCenterX();var a=b.getCenterY(),e=Math.atan2(f.y-a,f.x-c),g=new mxPoint(0,0),k=Math.PI,l=Math.PI/2-e,m=Math.atan2(b.height,b.width);e<-k+m||e>k-m?(g.x=b.x,g.y=a-b.width* +Math.tan(e)/2):e<-m?(g.y=b.y,g.x=c-b.height*Math.tan(l)/2):e=b.x&&f.x<=b.x+b.width?g.x=f.x:f.y>=b.y&&f.y<=b.y+b.height&&(g.y=f.y),f.xb.x+b.width&&(g.x=b.x+b.width),f.yb.y+b.height&&(g.y=b.y+b.height));return g},EllipsePerimeter:function(b,c,f,d){var a=b.x,e=b.y,g=b.width/2,k=b.height/2,l=a+g,m=e+k;c=f.x;f=f.y;var n=parseInt(c-l),p=parseInt(f-m);if(0==n&&0!=p)return new mxPoint(l, +m+k*p/Math.abs(p));if(0==n&&0==p)return new mxPoint(c,f);if(d){if(f>=e&&f<=e+b.height)return b=f-m,b=Math.sqrt(g*g*(1-b*b/(k*k)))||0,c<=a&&(b=-b),new mxPoint(l+b,f);if(c>=a&&c<=a+b.width)return b=c-l,b=Math.sqrt(k*k*(1-b*b/(g*g)))||0,f<=e&&(b=-b),new mxPoint(c,m+b)}a=p/n;m-=a*l;e=g*g*a*a+k*k;b=-2*l*e;k=Math.sqrt(b*b-4*e*(g*g*a*a*l*l+k*k*l*l-g*g*k*k));g=(-b+k)/(2*e);k=(-b-k)/(2*e);l=a*g+m;m=a*k+m;a=Math.sqrt(Math.pow(g-c,2)+Math.pow(l-f,2));c=Math.sqrt(Math.pow(k-c,2)+Math.pow(m-f,2));e=f=0;af?new mxPoint(g,a):new mxPoint(g,a+b);if(k==f)return g>l?new mxPoint(c,k):new mxPoint(c+e,k);var m=g,n=k;d&&(l>=c&&l<=c+e?m=l:f>=a&&f<=a+b&&(n=f));return l-t&&sMath.PI-t,t=null;q?t=d&&(a&&f.x>=n.x&&f.x<=r.x||!a&&f.y>=n.y&&f.y<=r.y)?a?new mxPoint(f.x,n.y):new mxPoint(n.x,f.y):c==mxConstants.DIRECTION_NORTH?new mxPoint(e+k/2+b*Math.tan(s)/2,g+b):c==mxConstants.DIRECTION_SOUTH?new mxPoint(e+k/2-b*Math.tan(s)/2,g):c==mxConstants.DIRECTION_WEST?new mxPoint(e+k,g+b/2+k*Math.tan(s)/2):new mxPoint(e, +g+b/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,m),f.y>=g&&f.y<=g+b?(d.x=a?l:c==mxConstants.DIRECTION_WEST?e+k:e,d.y=f.y):f.x>=e&&f.x<=e+k&&(d.x=f.x,d.y=!a?m:c==mxConstants.DIRECTION_NORTH?g+b:g),l=d.x,m=d.y),t=a&&f.x<=e+k/2||!a&&f.y<=g+b/2?mxUtils.intersection(f.x,f.y,l,m,n.x,n.y,p.x,p.y):mxUtils.intersection(f.x,f.y,l,m,p.x,p.y,r.x,r.y));null==t&&(t=new mxPoint(l,m));return t},HexagonPerimeter:function(b,c,f,d){var a=b.x,e=b.y,g=b.width,k=b.height,l=b.getCenterX();b=b.getCenterY();var m=f.x,n=f.y,p= +-Math.atan2(n-b,m-l),r=Math.PI,s=Math.PI/2,q=new mxPoint(l,b);c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var t=c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH;c=new mxPoint;q=new mxPoint;if(me+k||m>a+g&&na+g&&n>e+k)d=!1;if(d){if(t){if(m==l){if(n<=e)return new mxPoint(l,e);if(n>=e+k)return new mxPoint(l,e+k)}else if(ma+g){if(n==e+k/4)return new mxPoint(a+g,e+k/4);if(n==e+3*k/4)return new mxPoint(a+g,e+3*k/4)}else if(m==a){if(nb)return new mxPoint(a,e+3*k/4)}else if(m==a+g){if(nb)return new mxPoint(a+g,e+3*k/4)}if(n==e)return new mxPoint(l,e);if(n==e+k)return new mxPoint(l,e+k);me+k/4&&ne+3*k/4&&(c=new mxPoint(a-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(a+g,e+Math.floor(1.25*k))):m>l&&(n>e+k/4&&ne+3*k/4&&(c=new mxPoint(a+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(a,e+Math.floor(1.25*k))))}else{if(n==b){if(m<=a)return new mxPoint(a,e+k/2);if(m>=a+g)return new mxPoint(a+g,e+k/ +2)}else if(ne+k){if(m==a+g/4)return new mxPoint(a+g/4,e+k);if(m==a+3*g/4)return new mxPoint(a+3*g/4,e+k)}else if(n==e){if(ml)return new mxPoint(a+3*g/4,e)}else if(n==e+k){if(mb)return new mxPoint(a+3*g/4,e+k)}if(m==a)return new mxPoint(a,b);if(m==a+g)return new mxPoint(a+g,b);na+g/4&&ma+3*g/4&&(c=new mxPoint(a+Math.floor(0.5*g),e-Math.floor(0.5*k)),q=new mxPoint(a+Math.floor(1.25*g),e+k)):n>b&&(m>a+g/4&&ma+3*g/4&&(c=new mxPoint(a+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(a+Math.floor(1.25*g),e)))}d= +l;p=b;m>=a&&m<=a+g?(d=m,p=n=e&&n<=e+k&&(p=n,d=m-m?(c=new mxPoint(a+g,e), +q=new mxPoint(a+g,e+k)):p>m&&ps&&pr-m&&p<=r||p<-r+m&&p>=-r?(c=new mxPoint(a,e),q=new mxPoint(a,e+k)):p<-m&&p>-s?(c=new mxPoint(a+Math.floor(1.5*g),e+Math.floor(0.5*k)),q=new mxPoint(a,e+Math.floor(1.25*k))):p<-s&&p>-r+m&&(c=new mxPoint(a-Math.floor(0.5*g),e+Math.floor(0.5*k)),q=new mxPoint(a+g,e+ +Math.floor(1.25*k)))}else{m=Math.atan2(k/2,g/4);if(p==m)return new mxPoint(a+Math.floor(0.75*g),e);if(p==r-m)return new mxPoint(a+Math.floor(0.25*g),e);if(p==r||p==-r)return new mxPoint(a,e+Math.floor(0.5*k));if(0==p)return new mxPoint(a+g,e+Math.floor(0.5*k));if(p==-m)return new mxPoint(a+Math.floor(0.75*g),e+k);if(p==-r+m)return new mxPoint(a+Math.floor(0.25*g),e+k);0m&&pr-m&&pp&&p>-m?(c=new mxPoint(a+Math.floor(0.5*g),e+Math.floor(1.5*k)),q=new mxPoint(a+Math.floor(1.25*g),e)):p<-m&&p>-r+m?(c=new mxPoint(a,e+k),q=new mxPoint(a+g,e+k)):p<-r+m&&p>-r&&(c=new mxPoint(a-Math.floor(0.25*g),e),q=new mxPoint(a+Math.floor(0.5*g),e+Math.floor(1.5*k)))}q=mxUtils.intersection(l,b,f.x,f.y,c.x,c.y,q.x,q.y)}return null==q?new mxPoint(l,b):q}}; +function mxPrintPreview(b,c,f,d,a,e,g,k,l){this.graph=b;this.scale=null!=c?c:1/b.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=f?f:b.pageFormat;this.title=null!=k?k:"Printer-friendly version";this.x0=null!=a?a:0;this.y0=null!=e?e:0;this.borderColor=g;this.pageSelector=null!=l?l:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.marginTop=0; mxPrintPreview.prototype.marginBottom=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printControls=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.backgroundColor="#ffffff";mxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null; mxPrintPreview.prototype.targetWindow=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.clipping=!0;mxPrintPreview.prototype.getWindow=function(){return this.wnd}; -mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d5"\x3e':8==document.documentMode?a='\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d8"\x3e':8b&&(this.textarea.style.width=this.textarea.scrollWidth+"px")):(this.textarea.style.whiteSpace="nowrap",this.textarea.style.width="");8==document.documentMode&&(this.textarea.style.zoom="1",this.textarea.style.height="auto");a=this.textarea.scrollWidth;b=this.textarea.scrollHeight;8==document.documentMode? -(this.textarea.style.left=Math.max(0,Math.ceil((this.bounds.x-d.x*(this.bounds.width-(a+1)*f)+0*a*(f-1)+2*(d.x+0.5))/f))+"px",this.textarea.style.top=Math.max(0,Math.ceil((this.bounds.y-d.y*(this.bounds.height-(b+0.5)*f)+0*b*(f-1)+1*Math.abs(d.y+0.5))/f))+"px",this.textarea.style.width=Math.round(a*f)+"px",this.textarea.style.height=Math.round(b*f)+"px"):mxClient.IS_QUIRKS?(this.textarea.style.left=Math.max(0,Math.ceil(this.bounds.x-d.x*(this.bounds.width-(a+1)*f)+0*a*(f-1)+2*(d.x+0.5)))+"px",this.textarea.style.top= -Math.max(0,Math.ceil(this.bounds.y-d.y*(this.bounds.height-(b+0.5)*f)+0*b*(f-1)+1*Math.abs(d.y+0.5)))+"px"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-d.x*(this.bounds.width-2))+1)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-d.y*(this.bounds.height-4)+(-1==d.y?3:0))+1)+"px")}mxClient.IS_VML?this.textarea.style.zoom=f:(mxUtils.setPrefixedStyle(this.textarea.style,"transformOrigin","0px 0px"),mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+ -","+f+")"+(null==d?"":" translate("+100*d.x+"%,"+100*d.y+"%)")))}};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};mxCellEditor.prototype.getBackgroundColor=function(a){return null}; -mxCellEditor.prototype.startEditing=function(a,c){null==this.textarea&&this.init();null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();this.stopEditing(!0);var f=this.graph.getView().getState(a);if(null!=f){this.graph.getView();var d=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(f.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(f.style, +mxCellState.prototype.getPerimeterBounds=function(b,c){b=b||0;c=null!=c?c:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil&&"fixed"==this.shape.stencil.aspect){var f=this.shape.stencil.computeAspect(this.style,c.x,c.y,c.width,c.height);c.x=f.x;c.y=f.y;c.width=this.shape.stencil.w0*f.width;c.height=this.shape.stencil.h0*f.height}0!=b&&c.grow(b);return c}; +mxCellState.prototype.setAbsoluteTerminalPoint=function(b,c){c?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(b):this.absolutePoints[0]=b):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(b)):1==this.absolutePoints.length?this.absolutePoints.push(b):this.absolutePoints[this.absolutePoints.length-1]=b}; +mxCellState.prototype.setCursor=function(b){null!=this.shape&&this.shape.setCursor(b);null!=this.text&&this.text.setCursor(b)};mxCellState.prototype.getVisibleTerminal=function(b){b=this.getVisibleTerminalState(b);return null!=b?b.cell:null};mxCellState.prototype.getVisibleTerminalState=function(b){return b?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(b,c){c?this.visibleSourceState=b:this.visibleTargetState=b}; +mxCellState.prototype.getCellBounds=function(){return this.cellBounds};mxCellState.prototype.getPaintBounds=function(){return this.paintBounds};mxCellState.prototype.updateCachedBounds=function(){var b=this.view.translate,c=this.view.scale;this.cellBounds=new mxRectangle(this.x/c-b.x,this.y/c-b.y,this.width/c,this.height/c);this.paintBounds=mxRectangle.fromRectangle(this.cellBounds);null!=this.shape&&this.shape.isPaintBoundsInverted()&&this.paintBounds.rotate90()}; +mxCellState.prototype.setState=function(b){this.view=b.view;this.cell=b.cell;this.style=b.style;this.absolutePoints=b.absolutePoints;this.origin=b.origin;this.absoluteOffset=b.absoluteOffset;this.boundingBox=b.boundingBox;this.terminalDistance=b.terminalDistance;this.segments=b.segments;this.length=b.length;this.x=b.x;this.y=b.y;this.width=b.width;this.height=b.height;this.unscaledWidth=b.unscaledWidth}; +mxCellState.prototype.clone=function(){var b=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){b.absolutePoints=[];for(var c=0;ca&&(this.textarea.style.width=this.textarea.scrollWidth+"px")):(this.textarea.style.whiteSpace="nowrap",this.textarea.style.width="");8==document.documentMode&&(this.textarea.style.zoom="1",this.textarea.style.height="auto");b=this.textarea.scrollWidth;a=this.textarea.scrollHeight;8==document.documentMode? +(this.textarea.style.left=Math.max(0,Math.ceil((this.bounds.x-d.x*(this.bounds.width-(b+1)*f)+0*b*(f-1)+2*(d.x+0.5))/f))+"px",this.textarea.style.top=Math.max(0,Math.ceil((this.bounds.y-d.y*(this.bounds.height-(a+0.5)*f)+0*a*(f-1)+1*Math.abs(d.y+0.5))/f))+"px",this.textarea.style.width=Math.round(b*f)+"px",this.textarea.style.height=Math.round(a*f)+"px"):mxClient.IS_QUIRKS?(this.textarea.style.left=Math.max(0,Math.ceil(this.bounds.x-d.x*(this.bounds.width-(b+1)*f)+0*b*(f-1)+2*(d.x+0.5)))+"px",this.textarea.style.top= +Math.max(0,Math.ceil(this.bounds.y-d.y*(this.bounds.height-(a+0.5)*f)+0*a*(f-1)+1*Math.abs(d.y+0.5)))+"px"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-d.x*(this.bounds.width-2))+1)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-d.y*(this.bounds.height-4)+(-1==d.y?3:0))+1)+"px")}mxClient.IS_VML?this.textarea.style.zoom=f:(mxUtils.setPrefixedStyle(this.textarea.style,"transformOrigin","0px 0px"),mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+ +","+f+")"+(null==d?"":" translate("+100*d.x+"%,"+100*d.y+"%)")))}};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};mxCellEditor.prototype.getBackgroundColor=function(b){return null}; +mxCellEditor.prototype.startEditing=function(b,c){null==this.textarea&&this.init();null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();this.stopEditing(!0);var f=this.graph.getView().getState(b);if(null!=f){this.graph.getView();var d=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(f.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(f.style, mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),k=(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,l=(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,m=(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT; -this.textarea.style.backgroundColor=this.getBackgroundColor(f);this.textarea.style.textDecoration=m?"underline":"";this.textarea.style.fontWeight=k?"bold":"normal";this.textarea.style.fontStyle=l?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.zIndex=this.zIndex;this.textarea.style.fontFamily=b;this.textarea.style.textAlign=g;this.textarea.style.outline="none";this.textarea.style.color=e;d=this.textDirection=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION, +this.textarea.style.backgroundColor=this.getBackgroundColor(f);this.textarea.style.textDecoration=m?"underline":"";this.textarea.style.fontWeight=k?"bold":"normal";this.textarea.style.fontStyle=l?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.zIndex=this.zIndex;this.textarea.style.fontFamily=a;this.textarea.style.textAlign=g;this.textarea.style.outline="none";this.textarea.style.color=e;d=this.textDirection=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION, mxConstants.DEFAULT_TEXT_DIRECTION);d==mxConstants.TEXT_DIRECTION_AUTO&&null!=f&&null!=f.text&&f.text.dialect!=mxConstants.DIALECT_STRICTHTML&&!mxUtils.isNode(f.text.value)&&(d=f.text.getAutoDirection());d==mxConstants.TEXT_DIRECTION_LTR||d==mxConstants.TEXT_DIRECTION_RTL?this.textarea.setAttribute("dir",d):this.textarea.removeAttribute("dir");this.textarea.innerHTML=this.getInitialValue(f,c)||"";this.initialValue=this.textarea.innerHTML;0==this.textarea.innerHTML.length||"\x3cbr\x3e"==this.textarea.innerHTML? -(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=this.textarea.innerHTML==this.getEmptyLabelText();this.graph.container.appendChild(this.textarea);this.editingCell=a;this.trigger=c;this.textNode=null;null!=f.text&&this.isHideLabel(f)&&(this.textNode=f.text.node,this.textNode.style.visibility="hidden");this.autoSize&&(this.graph.model.isEdge(f.cell)||"fill"!=f.style[mxConstants.STYLE_OVERFLOW])&&window.setTimeout(mxUtils.bind(this,function(){this.resize()}), +(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=this.textarea.innerHTML==this.getEmptyLabelText();this.graph.container.appendChild(this.textarea);this.editingCell=b;this.trigger=c;this.textNode=null;null!=f.text&&this.isHideLabel(f)&&(this.textNode=f.text.node,this.textNode.style.visibility="hidden");this.autoSize&&(this.graph.model.isEdge(f.cell)||"fill"!=f.style[mxConstants.STYLE_OVERFLOW])&&window.setTimeout(mxUtils.bind(this,function(){this.resize()}), 0);this.resize();if(null!=this.textarea)try{this.textarea.focus(),this.isSelectText()&&0=l.x:null!=f&&(k=f.x+f.width=a.x:null!=c&&(l=c.x+c.widthc.x+c.width?null!=f?(d=f.x,m=Math.max(Math.abs(l-f.y),m)):a==mxConstants.DIRECTION_NORTH? -l=c.y-2*k:a==mxConstants.DIRECTION_SOUTH?l=c.y+c.height+2*k:d=a==mxConstants.DIRECTION_EAST?c.x-2*m:c.x+c.width+2*m:null!=f&&(d=e.getRoutingCenterX(c),k=Math.max(Math.abs(d-f.x),m),l=f.y,m=0);b.push(new mxPoint(d-k,l-m));b.push(new mxPoint(d+k,l+m))}},ElbowConnector:function(a,c,f,d,b){var e=null!=d&&0n,k=e.xm;else l=Math.max(c.x,f.x),m=Math.min(c.x+c.width,f.x+f.width),(g=l==m)||(k=Math.max(c.y,f.y),n=Math.min(c.y+c.height,f.y+f.height),k=k==n);!k&&(g||a.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(a,c,f,d,b):mxEdgeStyle.SideToSide(a,c,f,d,b)},SideToSide:function(a,c,f,d,b){var e=a.view;d=null!=d&&0=c.y&&d.y<=c.y+c.height&&(k=d.y),d.y>=f.y&&d.y<=f.y+f.height&&(e=d.y)),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),!mxUtils.contains(f,a,e)&&!mxUtils.contains(c,a,e)&&b.push(new mxPoint(a,e)),1==b.length&&(null!=d?!mxUtils.contains(f, -a,d.y)&&!mxUtils.contains(c,a,d.y)&&b.push(new mxPoint(a,d.y)):(e=Math.max(c.y,f.y),c=Math.min(c.y+c.height,f.y+f.height),b.push(new mxPoint(a,e+(c-e)/2)))))},TopToBottom:function(a,c,f,d,b){var e=a.view;d=null!=d&&0=c.x&&d.x<=c.x+c.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),a=null!=d&&d.x>=f.x&&d.x<=f.x+f.width?d.x:e.getRoutingCenterX(f),!mxUtils.contains(f,a,k)&&!mxUtils.contains(c,a,k)&&b.push(new mxPoint(a,k)),1==b.length&&(null!=d&&1==b.length?!mxUtils.contains(f,d.x,k)&&!mxUtils.contains(c,d.x,k)&&b.push(new mxPoint(d.x,k)):(e=Math.max(c.x,f.x),c=Math.min(c.x+c.width,f.x+f.width),b.push(new mxPoint(e+(c-e)/ -2,k)))))},SegmentConnector:function(a,c,f,d,b){function e(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)b.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0=l.x:null!=f&&(k=f.x+f.width=b.x:null!=c&&(l=c.x+c.widthc.x+c.width?null!=f?(d=f.x,m=Math.max(Math.abs(l-f.y),m)):b==mxConstants.DIRECTION_NORTH? +l=c.y-2*k:b==mxConstants.DIRECTION_SOUTH?l=c.y+c.height+2*k:d=b==mxConstants.DIRECTION_EAST?c.x-2*m:c.x+c.width+2*m:null!=f&&(d=e.getRoutingCenterX(c),k=Math.max(Math.abs(d-f.x),m),l=f.y,m=0);a.push(new mxPoint(d-k,l-m));a.push(new mxPoint(d+k,l+m))}},ElbowConnector:function(b,c,f,d,a){var e=null!=d&&0n,k=e.xm;else l=Math.max(c.x,f.x),m=Math.min(c.x+c.width,f.x+f.width),(g=l==m)||(k=Math.max(c.y,f.y),n=Math.min(c.y+c.height,f.y+f.height),k=k==n);!k&&(g||b.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(b,c,f,d,a):mxEdgeStyle.SideToSide(b,c,f,d,a)},SideToSide:function(b,c,f,d,a){var e=b.view;d=null!=d&&0=c.y&&d.y<=c.y+c.height&&(k=d.y),d.y>=f.y&&d.y<=f.y+f.height&&(e=d.y)),!mxUtils.contains(f,b,k)&&!mxUtils.contains(c,b,k)&&a.push(new mxPoint(b,k)),!mxUtils.contains(f,b,e)&&!mxUtils.contains(c,b,e)&&a.push(new mxPoint(b,e)),1==a.length&&(null!=d?!mxUtils.contains(f, +b,d.y)&&!mxUtils.contains(c,b,d.y)&&a.push(new mxPoint(b,d.y)):(e=Math.max(c.y,f.y),c=Math.min(c.y+c.height,f.y+f.height),a.push(new mxPoint(b,e+(c-e)/2)))))},TopToBottom:function(b,c,f,d,a){var e=b.view;d=null!=d&&0=c.x&&d.x<=c.x+c.width&&(b=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(f,b,k)&&!mxUtils.contains(c,b,k)&&a.push(new mxPoint(b,k)),b=null!=d&&d.x>=f.x&&d.x<=f.x+f.width?d.x:e.getRoutingCenterX(f),!mxUtils.contains(f,b,k)&&!mxUtils.contains(c,b,k)&&a.push(new mxPoint(b,k)),1==a.length&&(null!=d&&1==a.length?!mxUtils.contains(f,d.x,k)&&!mxUtils.contains(c,d.x,k)&&a.push(new mxPoint(d.x,k)):(e=Math.max(c.x,f.x),c=Math.min(c.x+c.width,f.x+f.width),a.push(new mxPoint(e+(c-e)/ +2,k)))))},SegmentConnector:function(b,c,f,d,a){function e(b){if(null==l||Math.abs(l.x-b.x)>=k||Math.abs(l.y-b.y)>=k)a.push(b),l=b;return l}var g=b.absolutePoints,k=Math.max(1,b.view.scale),l=0s;s++){var y=null!=u&&u.x==v.x,x=null!=u&&u.y==v.y,D=null!=t&&v.y>=t.y&& v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=x||null==u&&D,z=y||null==u&&t;if(!(0==s&&(v&&z||y&&x))){if(null!=u&&!x&&!y&&(D||t)){m=D?!1:!0;break}if(z||v){m=v;1==s&&(m=0==d.length%2?v:z);break}}t=f;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];y&&x&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=c&&(n.yc.y+c.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=c&&(n.xc.x+c.width))&&e(new mxPoint(n.x, -p.y));m?p.y=n.y:p.x=n.x;for(s=0;sf.y+f.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[r]&&g[r].x!=n.x||null==g[r]&&null!=f&&(n.xf.x+f.width))&&e(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=c)for(;1< -b.length&&null!=b[1]&&mxUtils.contains(c,b[1].x,b[1].y);)b.splice(1,1);if(null==g[r]&&null!=f)for(;1f.y+f.height))?e(new mxPoint(p.x,n.y)):!m&&(null!=g[r]&&g[r].x!=n.x||null==g[r]&&null!=f&&(n.xf.x+f.width))&&e(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=c)for(;1< +a.length&&null!=a[1]&&mxUtils.contains(c,a[1].x,a[1].y);)a.splice(1,1);if(null==g[r]&&null!=f)for(;1x;x++)mxEdgeStyle.limits[x][1]= -n[x][0]-z[x],mxEdgeStyle.limits[x][2]=n[x][1]-z[x],mxEdgeStyle.limits[x][4]=n[x][0]+n[x][2]+z[x],mxEdgeStyle.limits[x][8]=n[x][1]+n[x][3]+z[x];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;x=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);D=z-p;z=0;0>x?z=0>D?2:1:0>=D&&(z=3,0==x&&(z=2));p=null;null!=c&&(p=l);c=[[0.5,0.5],[0.5,0.5]];for(x=0;2>x;x++)null!=p&&(c[x][0]=(p.x-n[x][0])/n[x][2],1>=Math.abs(p.x-n[x][0])?a[x]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[x][0]-n[x][2])&&(a[x]=mxConstants.DIRECTION_MASK_EAST), -c[x][1]=(p.y-n[x][1])/n[x][3],1>=Math.abs(p.y-n[x][1])?a[x]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[x][1]-n[x][3])&&(a[x]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=m);x=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);r=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-y,0);y=[]; -f=[];l=[];f[0]=m>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=x>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=r?m:r;p=x>=p?x:p;r=[[0,0],[0,0]];s=!1;for(x=0;2>x;x++)0==a[x]&&(0==(f[x]&d[x])&&(f[x]=mxUtils.reversePortConstraints(f[x])),0==(l[x]&d[x])&&(l[x]=mxUtils.reversePortConstraints(l[x])),r[x][0]=l[x],r[x][1]=f[x]);0x;x++)if(0==a[x]&&(0==(r[x][0]&d[x])&&(r[x][0]=r[x][1]),y[x]=r[x][0]&d[x],y[x]|=(r[x][1]&d[x])<<8,y[x]|=(r[1-x][x]&d[x])<<16,y[x]|=(r[1-x][1-x]&d[x])<<24,0==(y[x]&15)&&(y[x]<<=8),0==(y[x]&3840)&&(y[x]=y[x]&15|y[x]>>8),0== -(y[x]&983040)&&(y[x]=y[x]&65535|(y[x]&251658240)>>8),a[x]=y[x]&15,d[x]==mxConstants.DIRECTION_MASK_WEST||d[x]==mxConstants.DIRECTION_MASK_NORTH||d[x]==mxConstants.DIRECTION_MASK_EAST||d[x]==mxConstants.DIRECTION_MASK_SOUTH))a[x]=d[x];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=z;y-=z;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-= -e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+e;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=e}e=0;f=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))? +getJettySize:function(b,c,f,d,a){c=mxUtils.getValue(b.style,a?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(b.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==c&&(mxUtils.getValue(b.style,a?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(b=mxUtils.getNumber(b.style,a?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),c=Math.max(2,Math.ceil((b+mxEdgeStyle.orthBuffer)/ +mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):c=2*mxEdgeStyle.orthBuffer);return c},OrthConnector:function(b,c,f,d,a){var e=b.view.graph,g=null==c?!1:e.getModel().isEdge(c.cell),k=null==f?!1:e.getModel().isEdge(f.cell),e=b.absolutePoints,l=e[0],m=e[e.length-1],n=null!=c?c.x:l.x,p=null!=c?c.y:l.y,r=null!=c?c.width:0,s=null!=c?c.height:0,q=null!=f?f.x:m.x,t=null!=f?f.y:m.y,u=null!=f?f.width:0,v=null!=f?f.height:0,e=b.view.scale*mxEdgeStyle.getJettySize(b,c,f,d,!0),z=b.view.scale*mxEdgeStyle.getJettySize(b, +c,f,d,!1);null!=c&&f==c&&(e=z=Math.max(e,z));var y=z+e,x=!1;if(null!=l&&null!=m)var x=m.x-l.x,D=m.y-l.y,x=x*x+D*Dx;x++)mxEdgeStyle.limits[x][1]= +n[x][0]-z[x],mxEdgeStyle.limits[x][2]=n[x][1]-z[x],mxEdgeStyle.limits[x][4]=n[x][0]+n[x][2]+z[x],mxEdgeStyle.limits[x][8]=n[x][1]+n[x][3]+z[x];z=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;x=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);D=z-p;z=0;0>x?z=0>D?2:1:0>=D&&(z=3,0==x&&(z=2));p=null;null!=c&&(p=l);c=[[0.5,0.5],[0.5,0.5]];for(x=0;2>x;x++)null!=p&&(c[x][0]=(p.x-n[x][0])/n[x][2],1>=Math.abs(p.x-n[x][0])?b[x]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[x][0]-n[x][2])&&(b[x]=mxConstants.DIRECTION_MASK_EAST), +c[x][1]=(p.y-n[x][1])/n[x][3],1>=Math.abs(p.y-n[x][1])?b[x]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[x][1]-n[x][3])&&(b[x]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=f&&(p=m);x=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);r=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-y,0);y=[]; +f=[];l=[];f[0]=m>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=x>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;f[1]=mxUtils.reversePortConstraints(f[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=r?m:r;p=x>=p?x:p;r=[[0,0],[0,0]];s=!1;for(x=0;2>x;x++)0==b[x]&&(0==(f[x]&d[x])&&(f[x]=mxUtils.reversePortConstraints(f[x])),0==(l[x]&d[x])&&(l[x]=mxUtils.reversePortConstraints(l[x])),r[x][0]=l[x],r[x][1]=f[x]);0x;x++)if(0==b[x]&&(0==(r[x][0]&d[x])&&(r[x][0]=r[x][1]),y[x]=r[x][0]&d[x],y[x]|=(r[x][1]&d[x])<<8,y[x]|=(r[1-x][x]&d[x])<<16,y[x]|=(r[1-x][1-x]&d[x])<<24,0==(y[x]&15)&&(y[x]<<=8),0==(y[x]&3840)&&(y[x]=y[x]&15|y[x]>>8),0== +(y[x]&983040)&&(y[x]=y[x]&65535|(y[x]&251658240)>>8),b[x]=y[x]&15,d[x]==mxConstants.DIRECTION_MASK_WEST||d[x]==mxConstants.DIRECTION_MASK_NORTH||d[x]==mxConstants.DIRECTION_MASK_EAST||d[x]==mxConstants.DIRECTION_MASK_SOUTH))b[x]=d[x];d=b[0]==mxConstants.DIRECTION_MASK_EAST?3:b[0];y=b[1]==mxConstants.DIRECTION_MASK_EAST?3:b[1];d-=z;y-=z;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(b[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-= +e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+e;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+e;mxEdgeStyle.wayPoints1[0][1]+=c[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=c[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=e}e=0;f=y=0<(b[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))? 0:1;for(x=0;x>5,p<<=z,15>=4),r=0<(d[x]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?n[s][0]+c[s][0]*n[s][2]:r?n[s][1]+c[s][1]* -n[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[e][0])*m[0],0b&&(b+=4);1>a&&(a+=4);c=routePatterns[b-1][a-1];if(0==f||0==d)null!=inlineRoutePatterns[b-1][a- -1]&&(c=inlineRoutePatterns[b-1][a-1]);return c}},mxStyleRegistry={values:[],putValue:function(a,c){mxStyleRegistry.values[a]=c},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var c in mxStyleRegistry.values)if(mxStyleRegistry.values[c]==a)return c;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation); +n[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[e][0])*m[0],0a&&(a+=4);1>b&&(b+=4);c=routePatterns[a-1][b-1];if(0==f||0==d)null!=inlineRoutePatterns[a-1][b- +1]&&(c=inlineRoutePatterns[a-1][b-1]);return c}},mxStyleRegistry={values:[],putValue:function(b,c){mxStyleRegistry.values[b]=c},getValue:function(b){return mxStyleRegistry.values[b]},getName:function(b){for(var c in mxStyleRegistry.values)if(mxStyleRegistry.values[c]==b)return c;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation); mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter); -mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource; +mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(b){this.graph=b;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource; mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.optimizeVmlReflows=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null; -mxGraphView.prototype.graphBounds=null;mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastForegroundNode=null;mxGraphView.prototype.lastForegroundHtmlNode=null;mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a}; -mxGraphView.prototype.getBounds=function(a){var c=null;if(null!=a&&0 -f.length||null==f[0]||null==f[f.length-1])?this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a)))}; -mxGraphView.prototype.updateVertexLabelOffset=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);if(c==mxConstants.ALIGN_LEFT)c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),c=null!=c?c*this.scale:a.width,a.absoluteOffset.x-=c;else if(c==mxConstants.ALIGN_RIGHT)a.absoluteOffset.x+=a.width;else if(c==mxConstants.ALIGN_CENTER&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_WIDTH,null),null!=c)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN, -mxConstants.ALIGN_CENTER),d=0;f==mxConstants.ALIGN_CENTER?d=0.5:f==mxConstants.ALIGN_RIGHT&&(d=1);0!=d&&(a.absoluteOffset.x-=(c*this.scale-a.width)*d)}c=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);c==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:c==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};mxGraphView.prototype.resetValidationState=function(){this.lastForegroundHtmlNode=this.lastForegroundNode=this.lastHtmlNode=this.lastNode=null}; -mxGraphView.prototype.stateValidated=function(a){var c=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground||this.graph.getModel().isVertex(a.cell)&&this.graph.keepEdgesInBackground;a=this.graph.cellRenderer.insertStateAfter(a,c?this.lastForegroundNode||this.lastNode:this.lastNode,c?this.lastForegroundHtmlNode||this.lastHtmlNode:this.lastHtmlNode);c?(this.lastForegroundHtmlNode=a[1],this.lastForegroundNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])}; -mxGraphView.prototype.updateFixedTerminalPoints=function(a,c,f){this.updateFixedTerminalPoint(a,c,!0,this.graph.getConnectionConstraint(a,c,!0));this.updateFixedTerminalPoint(a,f,!1,this.graph.getConnectionConstraint(a,f,!1))};mxGraphView.prototype.updateFixedTerminalPoint=function(a,c,f,d){a.setAbsoluteTerminalPoint(this.getFixedTerminalPoint(a,c,f,d),f)}; -mxGraphView.prototype.getFixedTerminalPoint=function(a,c,f,d){var b=null;null!=d&&(b=this.graph.getConnectionPoint(c,d));if(null==b&&null==c){c=this.scale;d=this.translate;var e=a.origin,b=this.graph.getCellGeometry(a.cell).getTerminalPoint(f);null!=b&&(b=new mxPoint(c*(d.x+b.x+e.x),c*(d.y+b.y+e.y)))}return b}; -mxGraphView.prototype.updateBoundsFromStencil=function(a){var c=null;if(null!=a&&null!=a.shape&&null!=a.shape.stencil&&"fixed"==a.shape.stencil.aspect){var c=mxRectangle.fromRectangle(a),f=a.shape.stencil.computeAspect(a.style,a.x,a.y,a.width,a.height);a.setRect(f.x,f.y,a.shape.stencil.w0*f.width,a.shape.stencil.h0*f.height)}return c}; -mxGraphView.prototype.updatePoints=function(a,c,f,d){if(null!=a){var b=[];b.push(a.absolutePoints[0]);var e=this.getEdgeStyle(a,c,f,d);if(null!=e){f=this.getTerminalPort(a,f,!0);d=this.getTerminalPort(a,d,!1);var g=this.updateBoundsFromStencil(f),k=this.updateBoundsFromStencil(d);e(a,f,d,c,b);null!=g&&f.setRect(g.x,g.y,g.width,g.height);null!=k&&d.setRect(k.x,k.y,k.width,k.height)}else if(null!=c)for(e=0;e +f.length||null==f[0]||null==f[f.length-1])?this.clear(b.cell,!0):(this.updateEdgeBounds(b),this.updateEdgeLabelOffset(b)))}; +mxGraphView.prototype.updateVertexLabelOffset=function(b){var c=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);if(c==mxConstants.ALIGN_LEFT)c=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_WIDTH,null),c=null!=c?c*this.scale:b.width,b.absoluteOffset.x-=c;else if(c==mxConstants.ALIGN_RIGHT)b.absoluteOffset.x+=b.width;else if(c==mxConstants.ALIGN_CENTER&&(c=mxUtils.getValue(b.style,mxConstants.STYLE_LABEL_WIDTH,null),null!=c)){var f=mxUtils.getValue(b.style,mxConstants.STYLE_ALIGN, +mxConstants.ALIGN_CENTER),d=0;f==mxConstants.ALIGN_CENTER?d=0.5:f==mxConstants.ALIGN_RIGHT&&(d=1);0!=d&&(b.absoluteOffset.x-=(c*this.scale-b.width)*d)}c=mxUtils.getValue(b.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);c==mxConstants.ALIGN_TOP?b.absoluteOffset.y-=b.height:c==mxConstants.ALIGN_BOTTOM&&(b.absoluteOffset.y+=b.height)};mxGraphView.prototype.resetValidationState=function(){this.lastForegroundHtmlNode=this.lastForegroundNode=this.lastHtmlNode=this.lastNode=null}; +mxGraphView.prototype.stateValidated=function(b){var c=this.graph.getModel().isEdge(b.cell)&&this.graph.keepEdgesInForeground||this.graph.getModel().isVertex(b.cell)&&this.graph.keepEdgesInBackground;b=this.graph.cellRenderer.insertStateAfter(b,c?this.lastForegroundNode||this.lastNode:this.lastNode,c?this.lastForegroundHtmlNode||this.lastHtmlNode:this.lastHtmlNode);c?(this.lastForegroundHtmlNode=b[1],this.lastForegroundNode=b[0]):(this.lastHtmlNode=b[1],this.lastNode=b[0])}; +mxGraphView.prototype.updateFixedTerminalPoints=function(b,c,f){this.updateFixedTerminalPoint(b,c,!0,this.graph.getConnectionConstraint(b,c,!0));this.updateFixedTerminalPoint(b,f,!1,this.graph.getConnectionConstraint(b,f,!1))};mxGraphView.prototype.updateFixedTerminalPoint=function(b,c,f,d){b.setAbsoluteTerminalPoint(this.getFixedTerminalPoint(b,c,f,d),f)}; +mxGraphView.prototype.getFixedTerminalPoint=function(b,c,f,d){var a=null;null!=d&&(a=this.graph.getConnectionPoint(c,d));if(null==a&&null==c){c=this.scale;d=this.translate;var e=b.origin,a=this.graph.getCellGeometry(b.cell).getTerminalPoint(f);null!=a&&(a=new mxPoint(c*(d.x+a.x+e.x),c*(d.y+a.y+e.y)))}return a}; +mxGraphView.prototype.updateBoundsFromStencil=function(b){var c=null;if(null!=b&&null!=b.shape&&null!=b.shape.stencil&&"fixed"==b.shape.stencil.aspect){var c=mxRectangle.fromRectangle(b),f=b.shape.stencil.computeAspect(b.style,b.x,b.y,b.width,b.height);b.setRect(f.x,f.y,b.shape.stencil.w0*f.width,b.shape.stencil.h0*f.height)}return c}; +mxGraphView.prototype.updatePoints=function(b,c,f,d){if(null!=b){var a=[];a.push(b.absolutePoints[0]);var e=this.getEdgeStyle(b,c,f,d);if(null!=e){f=this.getTerminalPort(b,f,!0);d=this.getTerminalPort(b,d,!1);var g=this.updateBoundsFromStencil(f),k=this.updateBoundsFromStencil(d);e(b,f,d,c,a);null!=g&&f.setRect(g.x,g.y,g.width,g.height);null!=k&&d.setRect(k.x,k.y,k.width,k.height)}else if(null!=c)for(e=0;e=Math.round(k+g)&&l=Math.round(k+g)&&l=e?0:e*e/(a*a+m*m));a>b&&(a=b);b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,c,f));-1==mxUtils.relativeCcw(g.x,g.y,k.x,k.y,c,f)&&(b=-b);return new mxPoint(-2*((d/2-p-a)/d),b/this.scale)}}return new mxPoint}; -mxGraphView.prototype.updateEdgeLabelOffset=function(a){var c=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=c&&0f&&a.x>f+2&&a.x<=c)return!0;c=this.graph.container.offsetHeight;f=this.graph.container.clientHeight;return c>f&&a.y>f+2&&a.y<=c?!0:!1}; -mxGraphView.prototype.init=function(){this.installListeners();var a=this.graph;a.dialect==mxConstants.DIALECT_SVG?this.createSvg():a.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()}; -mxGraphView.prototype.installListeners=function(){var a=this.graph,c=a.container;if(null!=c){mxClient.IS_TOUCH&&(mxEvent.addListener(c,"gesturestart",mxUtils.bind(this,function(d){a.fireGestureEvent(d);mxEvent.consume(d)})),mxEvent.addListener(c,"gesturechange",mxUtils.bind(this,function(d){a.fireGestureEvent(d);mxEvent.consume(d)})),mxEvent.addListener(c,"gestureend",mxUtils.bind(this,function(d){a.fireGestureEvent(d);mxEvent.consume(d)})));mxEvent.addGestureListeners(c,mxUtils.bind(this,function(d){this.isContainerEvent(d)&& -(!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(d))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){this.isContainerEvent(d)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){this.isContainerEvent(d)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))}));mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(d){this.isContainerEvent(d)&&a.dblClick(d)})); -var f=function(d){var b=null;mxClient.IS_TOUCH&&(b=mxEvent.getClientX(d),d=mxEvent.getClientY(d),d=mxUtils.convertPoint(c,b,d),b=a.view.getState(a.getCellAt(d.x,d.y)));return b};a.addMouseListener({mouseDown:function(d,b){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(d){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();this.captureDocumentGesture&&a.isMouseDown&&null!=a.container&&(!this.isContainerEvent(d)&& -"none"!=a.container.style.display&&"hidden"!=a.container.style.visibility&&!mxEvent.isConsumed(d))&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,f(d)))});this.endHandler=mxUtils.bind(this,function(d){this.captureDocumentGesture&&a.isMouseDown&&null!=a.container&&(!this.isContainerEvent(d)&&"none"!=a.container.style.display&&"hidden"!=a.container.style.visibility)&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}}; -mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.decoratorPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),this.canvas.appendChild(this.decoratorPane),a.appendChild(this.canvas), -this.updateContainerStyle(a),mxClient.IS_QUIRKS&&(a=mxUtils.bind(this,function(a){a=this.getGraphBounds();this.updateHtmlCanvasSize(a.x+a.width+this.graph.border,a.y+a.height+this.graph.border)}),mxEvent.addListener(window,"resize",a)))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,c){if(null!=this.graph.container){var f=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth=e?0:e*e/(b*b+m*m));b>a&&(b=a);a=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,k.x,k.y,c,f));-1==mxUtils.relativeCcw(g.x,g.y,k.x,k.y,c,f)&&(a=-a);return new mxPoint(-2*((d/2-p-b)/d),a/this.scale)}}return new mxPoint}; +mxGraphView.prototype.updateEdgeLabelOffset=function(b){var c=b.absolutePoints;b.absoluteOffset.x=b.getCenterX();b.absoluteOffset.y=b.getCenterY();if(null!=c&&0f&&b.x>f+2&&b.x<=c)return!0;c=this.graph.container.offsetHeight;f=this.graph.container.clientHeight;return c>f&&b.y>f+2&&b.y<=c?!0:!1}; +mxGraphView.prototype.init=function(){this.installListeners();var b=this.graph;b.dialect==mxConstants.DIALECT_SVG?this.createSvg():b.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()}; +mxGraphView.prototype.installListeners=function(){var b=this.graph,c=b.container;if(null!=c){mxClient.IS_TOUCH&&(mxEvent.addListener(c,"gesturestart",mxUtils.bind(this,function(d){b.fireGestureEvent(d);mxEvent.consume(d)})),mxEvent.addListener(c,"gesturechange",mxUtils.bind(this,function(d){b.fireGestureEvent(d);mxEvent.consume(d)})),mxEvent.addListener(c,"gestureend",mxUtils.bind(this,function(d){b.fireGestureEvent(d);mxEvent.consume(d)})));mxEvent.addGestureListeners(c,mxUtils.bind(this,function(d){this.isContainerEvent(d)&& +(!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(d))&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){this.isContainerEvent(d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){this.isContainerEvent(d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))}));mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(d){this.isContainerEvent(d)&&b.dblClick(d)})); +var f=function(d){var a=null;mxClient.IS_TOUCH&&(a=mxEvent.getClientX(d),d=mxEvent.getClientY(d),d=mxUtils.convertPoint(c,a,d),a=b.view.getState(b.getCellAt(d.x,d.y)));return a};b.addMouseListener({mouseDown:function(d,a){b.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(d){null!=b.tooltipHandler&&b.tooltipHandler.isHideOnHover()&&b.tooltipHandler.hide();this.captureDocumentGesture&&b.isMouseDown&&null!=b.container&&(!this.isContainerEvent(d)&& +"none"!=b.container.style.display&&"hidden"!=b.container.style.visibility&&!mxEvent.isConsumed(d))&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,f(d)))});this.endHandler=mxUtils.bind(this,function(d){this.captureDocumentGesture&&b.isMouseDown&&null!=b.container&&(!this.isContainerEvent(d)&&"none"!=b.container.style.display&&"hidden"!=b.container.style.visibility)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}}; +mxGraphView.prototype.createHtml=function(){var b=this.graph.container;null!=b&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.decoratorPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),this.canvas.appendChild(this.decoratorPane),b.appendChild(this.canvas), +this.updateContainerStyle(b),mxClient.IS_QUIRKS&&(b=mxUtils.bind(this,function(b){b=this.getGraphBounds();this.updateHtmlCanvasSize(b.x+b.width+this.graph.border,b.y+b.height+this.graph.border)}),mxEvent.addListener(window,"resize",b)))};mxGraphView.prototype.updateHtmlCanvasSize=function(b,c){if(null!=this.graph.container){var f=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidthmxUtils.indexOf(c,b)&&c.push(b)}}return this.getModel().getTopmostCells(c)}; -mxGraph.prototype.graphModelChanged=function(a){for(var c=0;c=b.scrollLeft&&c>=b.scrollTop&&a<=b.scrollLeft+b.clientWidth&&c<=b.scrollTop+b.clientHeight){var e=b.scrollLeft+b.clientWidth-a;if(emxUtils.indexOf(c,a)&&c.push(a)}}return this.getModel().getTopmostCells(c)}; +mxGraph.prototype.graphModelChanged=function(b){for(var c=0;c=a.scrollLeft&&c>=a.scrollTop&&b<=a.scrollLeft+a.clientWidth&&c<=a.scrollTop+a.clientHeight){var e=a.scrollLeft+a.clientWidth-b;if(ethis.minPageBreakDist)? -Math.ceil(d.width/e.width)+1:0,k=a?Math.ceil(d.height/e.height)+1:0,l=(g-1)*e.width,m=(k-1)*e.height;null==this.horizontalPageBreaks&&0this.model.getChildCount(c)&&f--;this.model.add(c,a[k],f+k);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[k],!0);this.isExtendParentsOnAdd(a[k])&&this.isExtendParent(a[k])&&this.extendParent(a[k]);(null==g||g)&&this.constrainChild(a[k]);null!=d&&this.cellConnected(a[k],d,!0);null!=b&&this.cellConnected(a[k],b,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",c,"index",f,"source",d,"target", -b,"absolute",e))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,c){if(null!=c?c:1)for(var f=this.model.getChildCount(a),d=0;db.width&&(e=f.width-b.width,f.width-=e);d.x+d.width>b.x+b.width&&(e-=d.x+d.width-b.x-b.width-e);g=0;f.height>b.height&&(g=f.height-b.height,f.height-=g);d.y+d.height> -b.y+b.height&&(g-=d.y+d.height-b.y-b.height-g);d.xe&&(n=0),c>g&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=(a-e)/ -2,this.container.scrollTop=(c-g)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*f/m):l.x,c?Math.floor(l.y-k.y*m+p*d/m):l.y)}; -mxGraph.prototype.zoom=function(a,c){c=null!=c?c:this.centerZoom;var f=Math.round(100*this.view.scale*a)/100,d=this.view.getState(this.getSelectionCell());a=f/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=f,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(f));else if(d=mxUtils.hasScrollbars(this.container),c&&!d){var d=this.container.offsetWidth,b=this.container.offsetHeight;if(1c?(c=a.height/c,f=(c-a.height)/2,a.height=c,c=Math.min(a.y,f),a.y-=c,d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(c*=a.width,f=(c-a.width)/2,a.width=c,c=Math.min(a.x,f),a.x-=c, -f=Math.min(this.container.scrollWidth,a.x+a.width),a.width=f-a.x);c=this.container.clientWidth/a.width;f=this.view.scale*c;mxUtils.hasScrollbars(this.container)?(this.view.setScale(f),this.container.scrollLeft=Math.round(a.x*c),this.container.scrollTop=Math.round(a.y*c)):this.view.scaleAndTranslate(f,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)}; -mxGraph.prototype.scrollCellToVisible=function(a,c){var f=-this.view.translate.x,d=-this.view.translate.y,b=this.view.getState(a);null!=b&&(f=new mxRectangle(f+b.x,d+b.y,b.width,b.height),c&&null!=this.container&&(d=this.container.clientWidth,b=this.container.clientHeight,f.x=f.getCenterX()-d/2,f.width=d,f.y=f.getCenterY()-b/2,f.height=b),d=new mxPoint(this.view.translate.x,this.view.translate.y),this.scrollRectToVisible(f)&&(f=new mxPoint(this.view.translate.x,this.view.translate.y),this.view.translate.x= +this.view.canvas.style.minHeight=Math.max(1,c)+"px");this.updatePageBreaks(this.pageBreaksVisible,f,c)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",b))};mxGraph.prototype.doResizeContainer=function(b,c){null!=this.maximumContainerSize&&(b=Math.min(this.maximumContainerSize.width,b),c=Math.min(this.maximumContainerSize.height,c));this.container.style.width=Math.ceil(b)+"px";this.container.style.height=Math.ceil(c)+"px"}; +mxGraph.prototype.updatePageBreaks=function(b,c,f){c=this.view.scale;f=this.view.translate;var d=this.pageFormat,a=c*this.pageScale,e=new mxRectangle(0,0,d.width*a,d.height*a),d=mxRectangle.fromRectangle(this.getGraphBounds());e.x=Math.floor((d.x-f.x*c)/e.width)*e.width+f.x*c;e.y=Math.floor((d.y-f.y*c)/e.height)*e.height+f.y*c;d.width=Math.ceil((d.width+(d.x-e.x))/e.width)*e.width;d.height=Math.ceil((d.height+(d.y-e.y))/e.height)*e.height;var g=(b=b&&Math.min(e.width,e.height)>this.minPageBreakDist)? +Math.ceil(d.width/e.width)+1:0,k=b?Math.ceil(d.height/e.height)+1:0,l=(g-1)*e.width,m=(k-1)*e.height;null==this.horizontalPageBreaks&&0this.model.getChildCount(c)&&f--;this.model.add(c,b[k],f+k);this.autoSizeCellsOnAdd&&this.autoSizeCell(b[k],!0);this.isExtendParentsOnAdd(b[k])&&this.isExtendParent(b[k])&&this.extendParent(b[k]);(null==g||g)&&this.constrainChild(b[k]);null!=d&&this.cellConnected(b[k],d,!0);null!=a&&this.cellConnected(b[k],a,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",b,"parent",c,"index",f,"source",d,"target", +a,"absolute",e))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(b,c){if(null!=c?c:1)for(var f=this.model.getChildCount(b),d=0;da.width&&(e=f.width-a.width,f.width-=e);d.x+d.width>a.x+a.width&&(e-=d.x+d.width-a.x-a.width-e);g=0;f.height>a.height&&(g=f.height-a.height,f.height-=g);d.y+d.height> +a.y+a.height&&(g-=d.y+d.height-a.y-a.height-g);d.xe&&(n=0),c>g&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=(b-e)/ +2,this.container.scrollTop=(c-g)/2):this.view.setTranslate(b?Math.floor(l.x-k.x*m+n*f/m):l.x,c?Math.floor(l.y-k.y*m+p*d/m):l.y)}; +mxGraph.prototype.zoom=function(b,c){c=null!=c?c:this.centerZoom;var f=Math.round(100*this.view.scale*b)/100,d=this.view.getState(this.getSelectionCell());b=f/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*b,d.y*b,d.width*b,d.height*b),this.view.scale=f,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(f));else if(d=mxUtils.hasScrollbars(this.container),c&&!d){var d=this.container.offsetWidth,a=this.container.offsetHeight;if(1c?(c=b.height/c,f=(c-b.height)/2,b.height=c,c=Math.min(b.y,f),b.y-=c,d=Math.min(this.container.scrollHeight,b.y+b.height),b.height=d-b.y):(c*=b.width,f=(c-b.width)/2,b.width=c,c=Math.min(b.x,f),b.x-=c, +f=Math.min(this.container.scrollWidth,b.x+b.width),b.width=f-b.x);c=this.container.clientWidth/b.width;f=this.view.scale*c;mxUtils.hasScrollbars(this.container)?(this.view.setScale(f),this.container.scrollLeft=Math.round(b.x*c),this.container.scrollTop=Math.round(b.y*c)):this.view.scaleAndTranslate(f,this.view.translate.x-b.x/this.view.scale,this.view.translate.y-b.y/this.view.scale)}; +mxGraph.prototype.scrollCellToVisible=function(b,c){var f=-this.view.translate.x,d=-this.view.translate.y,a=this.view.getState(b);null!=a&&(f=new mxRectangle(f+a.x,d+a.y,a.width,a.height),c&&null!=this.container&&(d=this.container.clientWidth,a=this.container.clientHeight,f.x=f.getCenterX()-d/2,f.width=d,f.y=f.getCenterY()-a/2,f.height=a),d=new mxPoint(this.view.translate.x,this.view.translate.y),this.scrollRectToVisible(f)&&(f=new mxPoint(this.view.translate.x,this.view.translate.y),this.view.translate.x= d.x,this.view.translate.y=d.y,this.view.setTranslate(f.x,f.y)))}; -mxGraph.prototype.scrollRectToVisible=function(a){var c=!1;if(null!=a){var f=this.container.offsetWidth,d=this.container.offsetHeight,b=Math.min(f,a.width),e=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){f=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=f.scrollLeft-a.x,d=Math.max(g-f.scrollLeft,0);0g+f&&(this.view.translate.x-=(a.x+b-f-g)/l,c=!0);a.y+e>k+d&&(this.view.translate.y-=(a.y+e-d-k)/l,c=!0);a.xmxUtils.indexOf(a,g);)g=this.model.getParent(g);return!this.model.isLayer(f)&&null==g?f:null};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a}; -mxGraph.prototype.getSwimlaneAt=function(a,c,f){f=f||this.getDefaultParent();if(null!=f)for(var d=this.model.getChildCount(f),b=0;ba.width*b||0a.height*b)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)}; -mxGraph.prototype.getChildCells=function(a,c,f){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=c?c:!1,null!=f?f:!1);c=[];for(f=0;f=a&&r.y+r.height<=l&&r.y>=c&&r.x+r.width<=k?e.push(p):this.getCells(a, -c,f,d,p,e)}}}return e};mxGraph.prototype.getCellsBeyond=function(a,c,f,d,b){var e=[];if(d||b)if(null==f&&(f=this.getDefaultParent()),null!=f)for(var g=this.model.getChildCount(f),k=0;k=a)&&(!b||m.y>=c)&&e.push(l)}return e}; -mxGraph.prototype.findTreeRoots=function(a,c,f){c=null!=c?c:!1;f=null!=f?f:!1;var d=[];if(null!=a){for(var b=this.getModel(),e=b.getChildCount(a),g=null,k=0,l=0;lk&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d}; -mxGraph.prototype.traverse=function(a,c,f,d,b){if(null!=f&&null!=a&&(c=null!=c?c:!0,b=b||new mxDictionary,!b.get(a)&&(b.put(a,!0),d=f(a,d),null==d||d)))if(d=this.model.getEdgeCount(a),0g+f&&(this.view.translate.x-=(b.x+a-f-g)/l,c=!0);b.y+e>k+d&&(this.view.translate.y-=(b.y+e-d-k)/l,c=!0);b.xmxUtils.indexOf(b,g);)g=this.model.getParent(g);return!this.model.isLayer(f)&&null==g?f:null};mxGraph.prototype.getDefaultParent=function(){var b=this.getCurrentRoot();null==b&&(b=this.defaultParent,null==b&&(b=this.model.getRoot(),b=this.model.getChildAt(b,0)));return b};mxGraph.prototype.setDefaultParent=function(b){this.defaultParent=b};mxGraph.prototype.getSwimlane=function(b){for(;null!=b&&!this.isSwimlane(b);)b=this.model.getParent(b);return b}; +mxGraph.prototype.getSwimlaneAt=function(b,c,f){f=f||this.getDefaultParent();if(null!=f)for(var d=this.model.getChildCount(f),a=0;ab.width*a||0b.height*a)return!0}return!1};mxGraph.prototype.getChildVertices=function(b){return this.getChildCells(b,!0,!1)};mxGraph.prototype.getChildEdges=function(b){return this.getChildCells(b,!1,!0)}; +mxGraph.prototype.getChildCells=function(b,c,f){b=null!=b?b:this.getDefaultParent();b=this.model.getChildCells(b,null!=c?c:!1,null!=f?f:!1);c=[];for(f=0;f=b&&r.y+r.height<=l&&r.y>=c&&r.x+r.width<=k?e.push(p):this.getCells(b, +c,f,d,p,e)}}}return e};mxGraph.prototype.getCellsBeyond=function(b,c,f,d,a){var e=[];if(d||a)if(null==f&&(f=this.getDefaultParent()),null!=f)for(var g=this.model.getChildCount(f),k=0;k=b)&&(!a||m.y>=c)&&e.push(l)}return e}; +mxGraph.prototype.findTreeRoots=function(b,c,f){c=null!=c?c:!1;f=null!=f?f:!1;var d=[];if(null!=b){for(var a=this.getModel(),e=a.getChildCount(b),g=null,k=0,l=0;lk&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d}; +mxGraph.prototype.traverse=function(b,c,f,d,a){if(null!=f&&null!=b&&(c=null!=c?c:!0,a=a||new mxDictionary,!a.get(b)&&(a.put(b,!0),d=f(b,d),null==d||d)))if(d=this.model.getEdgeCount(b),0c?e-1:c)),this.setSelectionCell(a))};mxGraph.prototype.selectAll=function(a,c){a=a||this.getDefaultParent();var f=c?this.model.filterDescendants(function(d){return d!=a},a):this.model.getChildren(a);null!=f&&this.setSelectionCells(f)};mxGraph.prototype.selectVertices=function(a){this.selectCells(!0,!1,a)};mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)}; -mxGraph.prototype.selectCells=function(a,c,f){f=f||this.getDefaultParent();var d=mxUtils.bind(this,function(b){return null!=this.view.getState(b)&&(0==this.model.getChildCount(b)&&this.model.isVertex(b)&&a&&!this.model.isEdge(this.model.getParent(b))||this.model.isEdge(b)&&c)});f=this.model.filterDescendants(d,f);this.setSelectionCells(f)}; -mxGraph.prototype.selectCellForEvent=function(a,c){var f=this.isCellSelected(a);this.isToggleEvent(c)?f?this.removeSelectionCell(a):this.addSelectionCell(a):(!f||1!=this.getSelectionCount())&&this.setSelectionCell(a)};mxGraph.prototype.selectCellsForEvent=function(a,c){this.isToggleEvent(c)?this.addSelectionCells(a):this.setSelectionCells(a)}; -mxGraph.prototype.createHandler=function(a){var c=null;if(null!=a)if(this.model.isEdge(a.cell))var c=a.getVisibleTerminalState(!0),f=a.getVisibleTerminalState(!1),d=this.getCellGeometry(a.cell),c=this.view.getEdgeStyle(a,null!=d?d.points:null,c,f),c=this.createEdgeHandler(a,c);else c=this.createVertexHandler(a);return c};mxGraph.prototype.createVertexHandler=function(a){return new mxVertexHandler(a)}; -mxGraph.prototype.createEdgeHandler=function(a,c){return c==mxEdgeStyle.Loop||c==mxEdgeStyle.ElbowConnector||c==mxEdgeStyle.SideToSide||c==mxEdgeStyle.TopToBottom?this.createElbowEdgeHandler(a):c==mxEdgeStyle.SegmentConnector||c==mxEdgeStyle.OrthConnector?this.createEdgeSegmentHandler(a):new mxEdgeHandler(a)};mxGraph.prototype.createEdgeSegmentHandler=function(a){return new mxEdgeSegmentHandler(a)};mxGraph.prototype.createElbowEdgeHandler=function(a){return new mxElbowEdgeHandler(a)}; -mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var c=0;cthis.doubleClickCounter){if(this.doubleClickCounter++,d=!1,a==mxEvent.MOUSE_UP?c.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=0,d=this.lastTouchCell,this.lastTouchCell=null,mxClient.IS_QUIRKS&&c.getSource().fireEvent("ondblclick"),this.dblClick(c.getEvent(),d),d=!0):(this.fireDoubleClick= -!0,this.lastTouchTime=0),!mxClient.IS_QUIRKS||d){mxEvent.consume(c.getEvent());return}}else{if(null==this.lastTouchEvent||this.lastTouchEvent!=c.getEvent())this.lastTouchCell=c.getCell(),this.lastTouchX=c.getX(),this.lastTouchY=c.getY(),this.lastTouchTime=d,this.lastTouchEvent=c.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;d=this.lastTouchCell;this.lastTouchCell=null;this.isMouseDown=!1;(null!=d||mxEvent.isTouchEvent(c.getEvent())&& -(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-c.getX())c?e-1:c)),this.setSelectionCell(b))};mxGraph.prototype.selectAll=function(b,c){b=b||this.getDefaultParent();var f=c?this.model.filterDescendants(function(d){return d!=b},b):this.model.getChildren(b);null!=f&&this.setSelectionCells(f)};mxGraph.prototype.selectVertices=function(b){this.selectCells(!0,!1,b)};mxGraph.prototype.selectEdges=function(b){this.selectCells(!1,!0,b)}; +mxGraph.prototype.selectCells=function(b,c,f){f=f||this.getDefaultParent();var d=mxUtils.bind(this,function(a){return null!=this.view.getState(a)&&(0==this.model.getChildCount(a)&&this.model.isVertex(a)&&b&&!this.model.isEdge(this.model.getParent(a))||this.model.isEdge(a)&&c)});f=this.model.filterDescendants(d,f);this.setSelectionCells(f)}; +mxGraph.prototype.selectCellForEvent=function(b,c){var f=this.isCellSelected(b);this.isToggleEvent(c)?f?this.removeSelectionCell(b):this.addSelectionCell(b):(!f||1!=this.getSelectionCount())&&this.setSelectionCell(b)};mxGraph.prototype.selectCellsForEvent=function(b,c){this.isToggleEvent(c)?this.addSelectionCells(b):this.setSelectionCells(b)}; +mxGraph.prototype.createHandler=function(b){var c=null;if(null!=b)if(this.model.isEdge(b.cell))var c=b.getVisibleTerminalState(!0),f=b.getVisibleTerminalState(!1),d=this.getCellGeometry(b.cell),c=this.view.getEdgeStyle(b,null!=d?d.points:null,c,f),c=this.createEdgeHandler(b,c);else c=this.createVertexHandler(b);return c};mxGraph.prototype.createVertexHandler=function(b){return new mxVertexHandler(b)}; +mxGraph.prototype.createEdgeHandler=function(b,c){return c==mxEdgeStyle.Loop||c==mxEdgeStyle.ElbowConnector||c==mxEdgeStyle.SideToSide||c==mxEdgeStyle.TopToBottom?this.createElbowEdgeHandler(b):c==mxEdgeStyle.SegmentConnector||c==mxEdgeStyle.OrthConnector?this.createEdgeSegmentHandler(b):new mxEdgeHandler(b)};mxGraph.prototype.createEdgeSegmentHandler=function(b){return new mxEdgeSegmentHandler(b)};mxGraph.prototype.createElbowEdgeHandler=function(b){return new mxElbowEdgeHandler(b)}; +mxGraph.prototype.addMouseListener=function(b){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(b)};mxGraph.prototype.removeMouseListener=function(b){if(null!=this.mouseListeners)for(var c=0;cthis.doubleClickCounter){if(this.doubleClickCounter++,d=!1,b==mxEvent.MOUSE_UP?c.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=0,d=this.lastTouchCell,this.lastTouchCell=null,mxClient.IS_QUIRKS&&c.getSource().fireEvent("ondblclick"),this.dblClick(c.getEvent(),d),d=!0):(this.fireDoubleClick= +!0,this.lastTouchTime=0),!mxClient.IS_QUIRKS||d){mxEvent.consume(c.getEvent());return}}else{if(null==this.lastTouchEvent||this.lastTouchEvent!=c.getEvent())this.lastTouchCell=c.getCell(),this.lastTouchX=c.getX(),this.lastTouchY=c.getY(),this.lastTouchTime=d,this.lastTouchEvent=c.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||b==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;d=this.lastTouchCell;this.lastTouchCell=null;this.isMouseDown=!1;(null!=d||mxEvent.isTouchEvent(c.getEvent())&& +(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-c.getX())f.x&&(e-=f.x);0>f.y&&(g-=f.y); -if(d.translate.x!=e||d.translate.y!=g)d.translate.x=e,d.translate.y=g,a=!0;var f=d.translate,b=this.source.getView().scale,e=b/d.scale,g=1/d.scale,k=this.source.container;this.bounds=new mxRectangle((f.x-c.x-this.source.panDx)/g,(f.y-c.y-this.source.panDy)/g,k.clientWidth/e,k.clientHeight/e);this.bounds.x+=this.source.container.scrollLeft*d.scale/b;this.bounds.y+=this.source.container.scrollTop*d.scale/b;f=this.selectionBorder.bounds;if(f.x!=this.bounds.x||f.y!=this.bounds.y||f.width!=this.bounds.width|| -f.height!=this.bounds.height)this.selectionBorder.bounds=this.bounds,this.selectionBorder.redraw();f=this.sizer.bounds;d=new mxRectangle(this.bounds.x+this.bounds.width-f.width/2,this.bounds.y+this.bounds.height-f.height/2,f.width,f.height);if(f.x!=d.x||f.y!=d.y||f.width!=d.width||f.height!=d.height)this.sizer.bounds=d,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();a&&this.outline.view.revalidate()}}}; -mxOutline.prototype.mouseDown=function(a,c){if(this.enabled&&this.showViewport){var f=!mxEvent.isMouseEvent(c.getEvent())?this.source.tolerance:0,f=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0f.x&&(e-=f.x);0>f.y&&(g-=f.y); +if(d.translate.x!=e||d.translate.y!=g)d.translate.x=e,d.translate.y=g,b=!0;var f=d.translate,a=this.source.getView().scale,e=a/d.scale,g=1/d.scale,k=this.source.container;this.bounds=new mxRectangle((f.x-c.x-this.source.panDx)/g,(f.y-c.y-this.source.panDy)/g,k.clientWidth/e,k.clientHeight/e);this.bounds.x+=this.source.container.scrollLeft*d.scale/a;this.bounds.y+=this.source.container.scrollTop*d.scale/a;f=this.selectionBorder.bounds;if(f.x!=this.bounds.x||f.y!=this.bounds.y||f.width!=this.bounds.width|| +f.height!=this.bounds.height)this.selectionBorder.bounds=this.bounds,this.selectionBorder.redraw();f=this.sizer.bounds;d=new mxRectangle(this.bounds.x+this.bounds.width-f.width/2,this.bounds.y+this.bounds.height-f.height/2,f.width,f.height);if(f.x!=d.x||f.y!=d.y||f.width!=d.width||f.height!=d.height)this.sizer.bounds=d,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();b&&this.outline.view.revalidate()}}}; +mxOutline.prototype.mouseDown=function(b,c){if(this.enabled&&this.showViewport){var f=!mxEvent.isMouseEvent(c.getEvent())?this.source.tolerance:0,f=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0=this.max)||!this.source&&(0==this.max||e>=this.max)))g+=this.countError+"\n";null!=this.validNeighbors&&null!=this.typeError&&0mxUtils.indexOf(a,e)&&(e=this.getLayout(e),null!=e&&e.moveCell(a[b],f.x,f.y))}}; -mxLayoutManager.prototype.getCellsForChanges=function(a){for(var c=new mxDictionary,f=[],d=0;d=this.max)||!this.source&&(0==this.max||e>=this.max)))g+=this.countError+"\n";null!=this.validNeighbors&&null!=this.typeError&&0mxUtils.indexOf(b,e)&&(e=this.getLayout(e),null!=e&&e.moveCell(b[a],f.x,f.y))}}; +mxLayoutManager.prototype.getCellsForChanges=function(b){for(var c=new mxDictionary,f=[],d=0;de||Math.abs(d)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=f.isGridEnabledEvent(c.getEvent()), -e=!0;if(null!=this.guide&&this.useGuidesForEvent(c))d=this.guide.move(this.bounds,new mxPoint(b,d),g),e=!1,b=d.x,d=d.y;else if(g)var k=f.getView().translate,l=f.getView().scale,g=this.bounds.x-(f.snap(this.bounds.x/l-k.x)+k.x)*l,k=this.bounds.y-(f.snap(this.bounds.y/l-k.y)+k.y)*l,d=this.snap(new mxPoint(b,d)),b=d.x-g,d=d.y-k;null!=this.guide&&e&&this.guide.hide();f.isConstrainedEvent(c.getEvent())&&(Math.abs(b)>Math.abs(d)?d=0:b=0);this.currentDx=b;this.currentDy=d;this.updatePreviewShape();e=null; -d=c.getCell();g=f.isCloneEvent(c.getEvent())&&f.isCellsCloneable()&&this.isCloneEnabled();f.isDropEnabled()&&this.highlightEnabled&&(e=f.getDropTarget(this.cells,c.getEvent(),d,g));b=f.getView().getState(e);k=!1;null!=b&&(f.model.getParent(this.cell)!=e||g)?(this.target!=e&&(this.target=e,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),k=!0):(this.target=null,this.connectOnDrop&&null!=d&&1==this.cells.length&&(f.getModel().isVertex(d)&&f.isCellConnectable(d))&&(b=f.getView().getState(d),null!= -b&&(f=null==f.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(f),k=!0)));null!=b&&k?this.highlight.highlight(b):this.highlight.hide()}this.updateHint(c);c.consume();mxEvent.consume(c.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!c.isConsumed()&&null!=c.getState()&&!f.isMouseDown)b=f.getCursorForMouseEvent(c),null==b&&f.isEnabled()&&f.isCellMovable(c.getCell())&&(b=f.getModel().isEdge(c.getCell())? -mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=c.sourceState&&c.sourceState.setCursor(b)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)}; -mxGraphHandler.prototype.mouseUp=function(a,c){if(!c.isConsumed()){var f=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&f.getModel().isVertex(d)&&f.isCellConnectable(d)&&f.isEdgeValid(null,this.cell,d))f.connectionHandler.connect(this.cell,d,c.getEvent());else{var d=f.isCloneEvent(c.getEvent())&&f.isCellsCloneable()&&this.isCloneEnabled(),b=f.getView().scale,e=this.roundLength(this.currentDx/ -b),b=this.roundLength(this.currentDy/b),g=this.target;f.isSplitEnabled()&&f.isSplitTarget(g,this.cells,c.getEvent())?f.splitEdge(g,this.cells,null,e,b):this.moveCells(this.cells,e,b,d,this.target,c.getEvent())}}else this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(c)}this.cellWasClicked&&c.consume();this.reset()}; -mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.removeHint();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null}; -mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,f){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);f=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){c=Math.cos(-d);var d=Math.sin(-d),b=new mxPoint(a.getCenterX(),a.getCenterY());f=mxUtils.getRotatedPoint(f,c,d,b)}return null!=a&&!mxUtils.contains(a,f.x,f.y)}return!1}; -mxGraphHandler.prototype.moveCells=function(a,c,f,d,b,e){d&&(a=this.graph.getCloneableCells(a));null==b&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,e)&&(b=this.graph.getDefaultParent());a=this.graph.moveCells(a,c-this.graph.panDx/this.graph.view.scale,f-this.graph.panDy/this.graph.view.scale,d,b,e);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)}; +mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(b){this.enabled=b};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled}; +mxGraphHandler.prototype.setCloneEnabled=function(b){this.cloneEnabled=b};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};mxGraphHandler.prototype.setMoveEnabled=function(b){this.moveEnabled=b};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(b){this.selectEnabled=b};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent}; +mxGraphHandler.prototype.setRemoveCellsFromParent=function(b){this.removeCellsFromParent=b};mxGraphHandler.prototype.getInitialCellForEvent=function(b){return b.getCell()};mxGraphHandler.prototype.isDelayedSelection=function(b,c){return this.graph.isCellSelected(b)}; +mxGraphHandler.prototype.mouseDown=function(b,c){if(!c.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=c.getState()&&!mxEvent.isMultiTouchEvent(c.getEvent())){var f=this.getInitialCellForEvent(c);this.delayedSelection=this.isDelayedSelection(f,c);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(f,c.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,a=d.getGeometry(f);this.graph.isCellMovable(f)&&(!d.isEdge(f)||1e||Math.abs(d)>e){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=f.isGridEnabledEvent(c.getEvent()), +e=!0;if(null!=this.guide&&this.useGuidesForEvent(c))d=this.guide.move(this.bounds,new mxPoint(a,d),g),e=!1,a=d.x,d=d.y;else if(g)var k=f.getView().translate,l=f.getView().scale,g=this.bounds.x-(f.snap(this.bounds.x/l-k.x)+k.x)*l,k=this.bounds.y-(f.snap(this.bounds.y/l-k.y)+k.y)*l,d=this.snap(new mxPoint(a,d)),a=d.x-g,d=d.y-k;null!=this.guide&&e&&this.guide.hide();f.isConstrainedEvent(c.getEvent())&&(Math.abs(a)>Math.abs(d)?d=0:a=0);this.currentDx=a;this.currentDy=d;this.updatePreviewShape();e=null; +d=c.getCell();g=f.isCloneEvent(c.getEvent())&&f.isCellsCloneable()&&this.isCloneEnabled();f.isDropEnabled()&&this.highlightEnabled&&(e=f.getDropTarget(this.cells,c.getEvent(),d,g));a=f.getView().getState(e);k=!1;null!=a&&(f.model.getParent(this.cell)!=e||g)?(this.target!=e&&(this.target=e,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),k=!0):(this.target=null,this.connectOnDrop&&null!=d&&1==this.cells.length&&(f.getModel().isVertex(d)&&f.isCellConnectable(d))&&(a=f.getView().getState(d),null!= +a&&(f=null==f.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(f),k=!0)));null!=a&&k?this.highlight.highlight(a):this.highlight.hide()}this.updateHint(c);c.consume();mxEvent.consume(c.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!c.isConsumed()&&null!=c.getState()&&!f.isMouseDown)a=f.getCursorForMouseEvent(c),null==a&&f.isEnabled()&&f.isCellMovable(c.getCell())&&(a=f.getModel().isEdge(c.getCell())? +mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),null!=c.sourceState&&c.sourceState.setCursor(a)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(b){null!=this.highlight&&this.highlight.setHighlightColor(b)}; +mxGraphHandler.prototype.mouseUp=function(b,c){if(!c.isConsumed()){var f=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&f.getModel().isVertex(d)&&f.isCellConnectable(d)&&f.isEdgeValid(null,this.cell,d))f.connectionHandler.connect(this.cell,d,c.getEvent());else{var d=f.isCloneEvent(c.getEvent())&&f.isCellsCloneable()&&this.isCloneEnabled(),a=f.getView().scale,e=this.roundLength(this.currentDx/ +a),a=this.roundLength(this.currentDy/a),g=this.target;f.isSplitEnabled()&&f.isSplitTarget(g,this.cells,c.getEvent())?f.splitEdge(g,this.cells,null,e,a):this.moveCells(this.cells,e,a,d,this.target,c.getEvent())}}else this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(c)}this.cellWasClicked&&c.consume();this.reset()}; +mxGraphHandler.prototype.selectDelayed=function(b){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(b))&&this.graph.selectCellForEvent(this.cell,b.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.removeHint();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null}; +mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,c,f){if(this.graph.getModel().isVertex(b)){b=this.graph.getView().getState(b);f=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));var d=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){c=Math.cos(-d);var d=Math.sin(-d),a=new mxPoint(b.getCenterX(),b.getCenterY());f=mxUtils.getRotatedPoint(f,c,d,a)}return null!=b&&!mxUtils.contains(b,f.x,f.y)}return!1}; +mxGraphHandler.prototype.moveCells=function(b,c,f,d,a,e){d&&(b=this.graph.getCloneableCells(b));null==a&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),b,e)&&(a=this.graph.getDefaultParent());b=this.graph.moveCells(b,c-this.graph.panDx/this.graph.view.scale,f-this.graph.panDy/this.graph.view.scale,d,a,e);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(b[0]);d&&this.graph.setSelectionCells(b)}; mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null);this.destroyShapes();this.removeHint()}; -function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,f){var d=f.getProperty("eventName"),b=f.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(b)&&(this.start(b),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",b)),b.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(a,f){if(this.isPinchEnabled()){var d= -f.getProperty("event");!mxEvent.isConsumed(d)&&"gesturestart"==d.type?(this.initialScale=this.graph.view.scale,!this.active&&null!=this.mouseDownEvent&&(this.start(this.mouseDownEvent),this.mouseDownEvent=null)):"gestureend"==d.type&&null==this.initialScale&&(this.initialScale=null);if(null!=this.initialScale){var b=Math.round(100*this.initialScale*d.scale)/100;null!=this.minScale&&(b=Math.max(this.minScale,b));null!=this.maxScale&&(b=Math.min(this.maxScale,b));this.graph.view.scale!=b&&(this.graph.zoomTo(b), +function mxPanningHandler(b){null!=b&&(this.graph=b,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(b,f){var d=f.getProperty("eventName"),a=f.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(a)&&(this.start(a),this.active=!0,this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",a)),a.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler),this.gestureHandler=mxUtils.bind(this,function(b,f){if(this.isPinchEnabled()){var d= +f.getProperty("event");!mxEvent.isConsumed(d)&&"gesturestart"==d.type?(this.initialScale=this.graph.view.scale,!this.active&&null!=this.mouseDownEvent&&(this.start(this.mouseDownEvent),this.mouseDownEvent=null)):"gestureend"==d.type&&null==this.initialScale&&(this.initialScale=null);if(null!=this.initialScale){var a=Math.round(100*this.initialScale*d.scale)/100;null!=this.minScale&&(a=Math.max(this.minScale,a));null!=this.maxScale&&(a=Math.min(this.maxScale,a));this.graph.view.scale!=a&&(this.graph.zoomTo(a), mxEvent.consume(d))}}}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;mxPanningHandler.prototype.panningEnabled=!0; mxPanningHandler.prototype.pinchEnabled=!0;mxPanningHandler.prototype.maxScale=8;mxPanningHandler.prototype.minScale=0.01;mxPanningHandler.prototype.dx=null;mxPanningHandler.prototype.dy=null;mxPanningHandler.prototype.startX=0;mxPanningHandler.prototype.startY=0;mxPanningHandler.prototype.isActive=function(){return this.active||null!=this.initialScale};mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled}; -mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};mxPanningHandler.prototype.isPinchEnabled=function(){return this.pinchEnabled};mxPanningHandler.prototype.setPinchEnabled=function(a){this.pinchEnabled=a};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return this.useLeftButtonForPanning&&null==a.getState()&&mxEvent.isLeftMouseButton(c)||mxEvent.isControlDown(c)&&mxEvent.isShiftDown(c)||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)}; -mxPanningHandler.prototype.isForcePanningEvent=function(a){return this.ignoreCell||mxEvent.isMultiTouchEvent(a.getEvent())};mxPanningHandler.prototype.mouseDown=function(a,c){this.mouseDownEvent=c;!c.isConsumed()&&this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(c)&&(this.start(c),this.consumePanningTrigger(c))}; -mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.dy=this.dx=null;this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()}; -mxPanningHandler.prototype.mouseMove=function(a,c){this.dx=c.getX()-this.startX;this.dy=c.getY()-this.startY;if(this.active)this.previewEnabled&&(this.useGrid&&(this.dx=this.graph.snap(this.dx),this.dy=this.graph.snap(this.dy)),this.graph.panGraph(this.dx+this.dx0,this.dy+this.dy0)),this.fireEvent(new mxEventObject(mxEvent.PAN,"event",c));else if(this.panningTrigger){var f=this.active;this.active=Math.abs(this.dx)>this.graph.tolerance||Math.abs(this.dy)>this.graph.tolerance;!f&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START, +mxPanningHandler.prototype.setPanningEnabled=function(b){this.panningEnabled=b};mxPanningHandler.prototype.isPinchEnabled=function(){return this.pinchEnabled};mxPanningHandler.prototype.setPinchEnabled=function(b){this.pinchEnabled=b};mxPanningHandler.prototype.isPanningTrigger=function(b){var c=b.getEvent();return this.useLeftButtonForPanning&&null==b.getState()&&mxEvent.isLeftMouseButton(c)||mxEvent.isControlDown(c)&&mxEvent.isShiftDown(c)||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)}; +mxPanningHandler.prototype.isForcePanningEvent=function(b){return this.ignoreCell||mxEvent.isMultiTouchEvent(b.getEvent())};mxPanningHandler.prototype.mouseDown=function(b,c){this.mouseDownEvent=c;!c.isConsumed()&&this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(c)&&(this.start(c),this.consumePanningTrigger(c))}; +mxPanningHandler.prototype.start=function(b){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=b.getX();this.startY=b.getY();this.dy=this.dx=null;this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(b){b.consume()}; +mxPanningHandler.prototype.mouseMove=function(b,c){this.dx=c.getX()-this.startX;this.dy=c.getY()-this.startY;if(this.active)this.previewEnabled&&(this.useGrid&&(this.dx=this.graph.snap(this.dx),this.dy=this.graph.snap(this.dy)),this.graph.panGraph(this.dx+this.dx0,this.dy+this.dy0)),this.fireEvent(new mxEventObject(mxEvent.PAN,"event",c));else if(this.panningTrigger){var f=this.active;this.active=Math.abs(this.dx)>this.graph.tolerance||Math.abs(this.dy)>this.graph.tolerance;!f&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START, "event",c))}(this.active||this.panningTrigger)&&c.consume()}; -mxPanningHandler.prototype.mouseUp=function(a,c){if(this.active){if(null!=this.dx&&null!=this.dy){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){var f=this.graph.getView().scale,d=this.graph.getView().translate;this.graph.panGraph(0,0);this.panGraph(d.x+this.dx/f,d.y+this.dy/f)}c.consume()}this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",c))}this.panningTrigger=!1;this.mouseDownEvent=null;this.active=!1;this.dy=this.dx=null}; -mxPanningHandler.prototype.panGraph=function(a,c){this.graph.getView().setTranslate(a,c)};mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.forcePanningHandler);this.graph.removeListener(this.gestureHandler)}; -function mxPopupMenuHandler(a,c){null!=a&&(this.graph=a,this.factoryMethod=c,this.graph.addMouseListener(this),this.gestureHandler=mxUtils.bind(this,function(a,d){this.inTolerance=!1}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPopupMenuHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0; -mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.screenX=null;mxPopupMenuHandler.prototype.screenY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup}; -mxPopupMenuHandler.prototype.mouseDown=function(a,c){this.isEnabled()&&!mxEvent.isMultiTouchEvent(c.getEvent())&&(this.hideMenu(),this.triggerX=c.getGraphX(),this.triggerY=c.getGraphY(),this.screenX=mxEvent.getMainEvent(c.getEvent()).screenX,this.screenY=mxEvent.getMainEvent(c.getEvent()).screenY,this.popupTrigger=this.isPopupTrigger(c),this.inTolerance=!0)}; -mxPopupMenuHandler.prototype.mouseMove=function(a,c){if(this.inTolerance&&null!=this.screenX&&null!=this.screenY&&(Math.abs(mxEvent.getMainEvent(c.getEvent()).screenX-this.screenX)>this.graph.tolerance||Math.abs(mxEvent.getMainEvent(c.getEvent()).screenY-this.screenY)>this.graph.tolerance))this.inTolerance=!1}; -mxPopupMenuHandler.prototype.mouseUp=function(a,c){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var f=this.getCellForPopupEvent(c);this.graph.isEnabled()&&this.isSelectOnPopup(c)&&null!=f&&!this.graph.isCellSelected(f)?this.graph.setSelectionCell(f):this.clearSelectionOnBackground&&null==f&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(c.getX()+d.x+1,c.getY()+d.y+1,f,c.getEvent());c.consume()}this.inTolerance= -this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.gestureHandler);mxPopupMenu.prototype.destroy.apply(this)}; -function mxCellMarker(a,c,f,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=c?c:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=c?f:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1; -mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot}; -mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())}; -mxCellMarker.prototype.process=function(a){var c=null;this.isEnabled()&&(c=this.getState(a),this.setCurrentState(c,a));return c};mxCellMarker.prototype.setCurrentState=function(a,c,f){var d=null!=a?this.isValidState(a):!1;f=null!=f?f:this.getMarkerColor(c.getEvent(),a,d);this.validState=d?a:null;if(a!=this.markedState||f!=this.currentColor)this.currentColor=f,null!=a&&null!=this.currentColor?(this.markedState=a,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}; -mxCellMarker.prototype.markCell=function(a,c){var f=this.graph.getView().getState(a);null!=f&&(this.currentColor=null!=c?c:this.validColor,this.markedState=f,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0}; -mxCellMarker.prototype.getMarkerColor=function(a,c,f){return f?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var c=this.graph.getView();cell=this.getCell(a);c=this.getStateToMark(c.getState(cell));return null!=c&&this.intersects(c,a)?c:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a}; -mxCellMarker.prototype.intersects=function(a,c){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,c.getGraphX(),c.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()}; -function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(a,f){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler); +mxPanningHandler.prototype.mouseUp=function(b,c){if(this.active){if(null!=this.dx&&null!=this.dy){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){var f=this.graph.getView().scale,d=this.graph.getView().translate;this.graph.panGraph(0,0);this.panGraph(d.x+this.dx/f,d.y+this.dy/f)}c.consume()}this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",c))}this.panningTrigger=!1;this.mouseDownEvent=null;this.active=!1;this.dy=this.dx=null}; +mxPanningHandler.prototype.panGraph=function(b,c){this.graph.getView().setTranslate(b,c)};mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.forcePanningHandler);this.graph.removeListener(this.gestureHandler)}; +function mxPopupMenuHandler(b,c){null!=b&&(this.graph=b,this.factoryMethod=c,this.graph.addMouseListener(this),this.gestureHandler=mxUtils.bind(this,function(b,d){this.inTolerance=!1}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPopupMenuHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0; +mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.screenX=null;mxPopupMenuHandler.prototype.screenY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(b){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(b){return this.selectOnPopup}; +mxPopupMenuHandler.prototype.mouseDown=function(b,c){this.isEnabled()&&!mxEvent.isMultiTouchEvent(c.getEvent())&&(this.hideMenu(),this.triggerX=c.getGraphX(),this.triggerY=c.getGraphY(),this.screenX=mxEvent.getMainEvent(c.getEvent()).screenX,this.screenY=mxEvent.getMainEvent(c.getEvent()).screenY,this.popupTrigger=this.isPopupTrigger(c),this.inTolerance=!0)}; +mxPopupMenuHandler.prototype.mouseMove=function(b,c){if(this.inTolerance&&null!=this.screenX&&null!=this.screenY&&(Math.abs(mxEvent.getMainEvent(c.getEvent()).screenX-this.screenX)>this.graph.tolerance||Math.abs(mxEvent.getMainEvent(c.getEvent()).screenY-this.screenY)>this.graph.tolerance))this.inTolerance=!1}; +mxPopupMenuHandler.prototype.mouseUp=function(b,c){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var f=this.getCellForPopupEvent(c);this.graph.isEnabled()&&this.isSelectOnPopup(c)&&null!=f&&!this.graph.isCellSelected(f)?this.graph.setSelectionCell(f):this.clearSelectionOnBackground&&null==f&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(c.getX()+d.x+1,c.getY()+d.y+1,f,c.getEvent());c.consume()}this.inTolerance= +this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){return b.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.gestureHandler);mxPopupMenu.prototype.destroy.apply(this)}; +function mxCellMarker(b,c,f,d){mxEventSource.call(this);null!=b&&(this.graph=b,this.validColor=null!=c?c:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=c?f:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(b))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1; +mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(b){this.enabled=b};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(b){this.hotspot=b};mxCellMarker.prototype.getHotspot=function(){return this.hotspot}; +mxCellMarker.prototype.setHotspotEnabled=function(b){this.hotspotEnabled=b};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())}; +mxCellMarker.prototype.process=function(b){var c=null;this.isEnabled()&&(c=this.getState(b),this.setCurrentState(c,b));return c};mxCellMarker.prototype.setCurrentState=function(b,c,f){var d=null!=b?this.isValidState(b):!1;f=null!=f?f:this.getMarkerColor(c.getEvent(),b,d);this.validState=d?b:null;if(b!=this.markedState||f!=this.currentColor)this.currentColor=f,null!=b&&null!=this.currentColor?(this.markedState=b,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}; +mxCellMarker.prototype.markCell=function(b,c){var f=this.graph.getView().getState(b);null!=f&&(this.currentColor=null!=c?c:this.validColor,this.markedState=f,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(b){return!0}; +mxCellMarker.prototype.getMarkerColor=function(b,c,f){return f?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(b){var c=this.graph.getView();cell=this.getCell(b);c=this.getStateToMark(c.getState(cell));return null!=c&&this.intersects(c,b)?c:null};mxCellMarker.prototype.getCell=function(b){return b.getCell()};mxCellMarker.prototype.getStateToMark=function(b){return b}; +mxCellMarker.prototype.intersects=function(b,c){return this.hotspotEnabled?mxUtils.intersectsHotspot(b,c.getGraphX(),c.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()}; +function mxSelectionCellsHandler(b){mxEventSource.call(this);this.graph=b;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(b,f){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler); this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100; -mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,c){c.reset.apply(c)})}; -mxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var c=this.graph.getSelectionCells(),f=0;fthis.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(),null!=this.edgeState&&this.shape.apply(this.edgeState), -this.updateCurrentState(c,f);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(f=[b],null!=this.waypoints&&(f=f.concat(this.waypoints)),f.push(d),this.shape.points=f),this.drawPreview());null!=this.cursor&&(this.graph.container.style.cursor=this.cursor);mxEvent.consume(c.getEvent());c.consume()}else!this.isEnabled()||!this.graph.isEnabled()?this.constraintHandler.reset():this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&& -null==this.error&&null==this.constraintHandler.currentConstraint&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),c.consume())),this.previous=this.currentState):this.previous==this.currentState&&null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown&&c.consume();if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){f=!1;d=c.getSource();for(b=0;bthis.graph.tolerance||c>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),f=this.graph.view.scale,c=new mxPoint(this.graph.snap(a.getGraphX()/f)*f,this.graph.snap(a.getGraphY()/f)*f),this.waypoints.push(c)}; -mxConnectionHandler.prototype.mouseUp=function(a,c){if(!c.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(c)){this.addWaypointForEvent(c);c.consume();return}if(null==this.error){var f=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&null!=this.currentState&&(d=this.currentState.cell);this.connect(f,d,c.getEvent(),c.getCell())}else null!= +f.y)?f.x=this.previous.getCenterX():f.y=this.previous.getCenterY());a=this.first;if(null!=this.selectedIcon){var g=this.selectedIcon.bounds.width,k=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(g=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=g.x,this.selectedIcon.bounds.y=g.y):(g=new mxRectangle(c.getGraphX()+this.connectIconOffset.x,c.getGraphY()+this.connectIconOffset.y,g,k),this.selectedIcon.bounds=g);this.selectedIcon.redraw()}null!= +this.edgeState?(this.updateEdgeState(d,e),d=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1],a=this.edgeState.absolutePoints[0]):(null!=this.currentState&&null==this.constraintHandler.currentConstraint&&(g=this.getTargetPerimeterPoint(this.currentState,c),null!=g&&(d=g)),null==this.sourceConstraint&&null!=this.previous&&(g=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0this.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(),null!=this.edgeState&&this.shape.apply(this.edgeState), +this.updateCurrentState(c,f);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(f=[a],null!=this.waypoints&&(f=f.concat(this.waypoints)),f.push(d),this.shape.points=f),this.drawPreview());null!=this.cursor&&(this.graph.container.style.cursor=this.cursor);mxEvent.consume(c.getEvent());c.consume()}else!this.isEnabled()||!this.graph.isEnabled()?this.constraintHandler.reset():this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&& +null==this.error&&null==this.constraintHandler.currentConstraint&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),c.consume())),this.previous=this.currentState):this.previous==this.currentState&&null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown&&c.consume();if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){f=!1;d=c.getSource();for(a=0;athis.graph.tolerance||c>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),f=this.graph.view.scale,c=new mxPoint(this.graph.snap(b.getGraphX()/f)*f,this.graph.snap(b.getGraphY()/f)*f),this.waypoints.push(c)}; +mxConnectionHandler.prototype.mouseUp=function(b,c){if(!c.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(c)){this.addWaypointForEvent(c);c.consume();return}if(null==this.error){var f=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&null!=this.currentState&&(d=this.currentState.cell);this.connect(f,d,c.getEvent(),c.getCell())}else null!= this.previous&&null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell&&this.graph.selectCellForEvent(this.marker.source,evt),0g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,f),c.consume()}}; -mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);return this.sharedDiv};mxRubberband.prototype.mouseUp=function(a,c){var f=null!=this.div&&"none"!=this.div.style.display;this.reset();f&&(f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,c.getEvent()),c.consume())}; -mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,c){this.currentX=a;this.currentY=c;this.repaint()}; -mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,c=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,c);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,c)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1, -this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxHandle(a,c,f){this.graph=a.view.graph;this.state=a;this.cursor=null!=c?c:this.cursor;this.image=null!=f?f:this.image;this.init()}mxHandle.prototype.cursor="default";mxHandle.prototype.image=null; -mxHandle.prototype.ignoreGrid=!1;mxHandle.prototype.getPosition=function(a){};mxHandle.prototype.setPosition=function(a,c,f){};mxHandle.prototype.execute=function(){};mxHandle.prototype.copyStyle=function(a){this.graph.setCellStyles(a,this.state.style[a],[this.state.cell])}; -mxHandle.prototype.processEvent=function(a){var c=this.graph.view.scale,f=this.graph.view.translate,f=new mxPoint(a.getGraphX()/c-f.x,a.getGraphY()/c-f.y);null!=this.shape&&null!=this.shape.bounds&&(f.x-=this.shape.bounds.width/c/4,f.y-=this.shape.bounds.height/c/4);var c=-mxUtils.toRadians(this.getRotation()),d=-mxUtils.toRadians(this.getTotalRotation())-c,f=this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(f,c),this.ignoreGrid||!this.graph.isGridEnabledEvent(a.getEvent())),d));this.setPosition(this.state.getPaintBounds(), -f,a);this.positionChanged();this.redraw()};mxHandle.prototype.positionChanged=function(){null!=this.state.text&&this.state.text.apply(this.state);null!=this.state.shape&&this.state.shape.apply(this.state);this.graph.cellRenderer.redraw(this.state,!0)};mxHandle.prototype.getRotation=function(){return null!=this.state.shape?this.state.shape.getRotation():0};mxHandle.prototype.getTotalRotation=function(){return null!=this.state.shape?this.state.shape.getShapeRotation():0}; -mxHandle.prototype.init=function(){var a=this.isHtmlRequired();null!=this.image?(this.shape=new mxImageShape(new mxRectangle(0,0,this.image.width,this.image.height),this.image.src),this.shape.preserveImageAspect=!1):this.shape=this.createShape(a);this.initShape(a)};mxHandle.prototype.createShape=function(a){a=new mxRectangle(0,0,mxConstants.HANDLE_SIZE,mxConstants.HANDLE_SIZE);return new mxRectangleShape(a,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)}; -mxHandle.prototype.initShape=function(a){a&&this.shape.isHtmlAllowed()?(this.shape.dialect=mxConstants.DIALECT_STRICTHTML,this.shape.init(this.graph.container)):(this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,null!=this.cursor&&this.shape.init(this.graph.getView().getOverlayPane()));mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.shape.node.style.cursor=this.cursor}; -mxHandle.prototype.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var a=this.getPosition(this.state.getPaintBounds());if(null!=a){var c=mxUtils.toRadians(this.getTotalRotation()),a=this.rotatePoint(this.flipPoint(a),c),c=this.graph.view.scale,f=this.graph.view.translate;this.shape.bounds.x=Math.floor((a.x+f.x)*c-this.shape.bounds.width/2);this.shape.bounds.y=Math.floor((a.y+f.y)*c-this.shape.bounds.height/2);this.state.unscaledWidth=null;this.shape.redraw()}}}; -mxHandle.prototype.isHtmlRequired=function(){return null!=this.state.text&&this.state.text.node.parentNode==this.graph.container};mxHandle.prototype.rotatePoint=function(a,c){var f=this.state.getCellBounds(),f=new mxPoint(f.getCenterX(),f.getCenterY()),d=Math.cos(c),b=Math.sin(c);return mxUtils.getRotatedPoint(a,d,b,f)}; -mxHandle.prototype.flipPoint=function(a){if(null!=this.state.shape){var c=this.state.getCellBounds();this.state.shape.flipH&&(a.x=2*c.x+c.width-a.x);this.state.shape.flipV&&(a.y=2*c.y+c.height-a.y)}return a};mxHandle.prototype.snapPoint=function(a,c){c||(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));return a};mxHandle.prototype.setVisible=function(a){null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display=a?"":"none")}; +function mxRubberband(b){null!=b&&(this.graph=b,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(b,f){var d=f.getProperty("eventName"),a=f.getProperty("event");if(d==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(a)){var d=mxUtils.getOffset(this.graph.container),e=mxUtils.getScrollOrigin(this.graph.container);e.x-=d.x;e.y-=d.y;this.start(a.getX()+e.x,a.getY()+e.y);a.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler), +this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),this.gestureHandler=mxUtils.bind(this,function(b,f){null!=this.first&&this.reset()}),this.graph.addListener(mxEvent.GESTURE,this.gestureHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null; +mxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.isEnabled=function(){return this.enabled};mxRubberband.prototype.setEnabled=function(b){this.enabled=b};mxRubberband.prototype.isForceRubberbandEvent=function(b){return mxEvent.isAltDown(b.getEvent())}; +mxRubberband.prototype.mouseDown=function(b,c){if(!c.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null==c.getState()&&!mxEvent.isMultiTouchEvent(c.getEvent())){var f=mxUtils.getOffset(this.graph.container),d=mxUtils.getScrollOrigin(this.graph.container);d.x-=f.x;d.y-=f.y;this.start(c.getX()+d.x,c.getY()+d.y);c.consume(!1)}}; +mxRubberband.prototype.start=function(b,c){function f(a){a=new mxMouseEvent(a);var b=mxUtils.convertPoint(d,a.getX(),a.getY());a.graphX=b.x;a.graphY=b.y;return a}this.first=new mxPoint(b,c);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(a){this.mouseMove(this.graph,f(a))});this.dropHandler=mxUtils.bind(this,function(a){this.mouseUp(this.graph,f(a))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)}; +mxRubberband.prototype.mouseMove=function(b,c){if(!c.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);f.x-=d.x;f.y-=d.y;var d=c.getX()+f.x,f=c.getY()+f.y,a=this.first.x-d,e=this.first.y-f,g=this.graph.tolerance;if(null!=this.div||Math.abs(a)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,f),c.consume()}}; +mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);return this.sharedDiv};mxRubberband.prototype.mouseUp=function(b,c){var f=null!=this.div&&"none"!=this.div.style.display;this.reset();f&&(f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,c.getEvent()),c.consume())}; +mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(b,c){this.currentX=b;this.currentY=c;this.repaint()}; +mxRubberband.prototype.repaint=function(){if(null!=this.div){var b=this.currentX-this.graph.panDx,c=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,b);this.y=Math.min(this.first.y,c);this.width=Math.max(this.first.x,b)-this.x;this.height=Math.max(this.first.y,c)-this.y;b=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+b+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1, +this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxHandle(b,c,f){this.graph=b.view.graph;this.state=b;this.cursor=null!=c?c:this.cursor;this.image=null!=f?f:this.image;this.init()}mxHandle.prototype.cursor="default";mxHandle.prototype.image=null; +mxHandle.prototype.ignoreGrid=!1;mxHandle.prototype.getPosition=function(b){};mxHandle.prototype.setPosition=function(b,c,f){};mxHandle.prototype.execute=function(){};mxHandle.prototype.copyStyle=function(b){this.graph.setCellStyles(b,this.state.style[b],[this.state.cell])}; +mxHandle.prototype.processEvent=function(b){var c=this.graph.view.scale,f=this.graph.view.translate,f=new mxPoint(b.getGraphX()/c-f.x,b.getGraphY()/c-f.y);null!=this.shape&&null!=this.shape.bounds&&(f.x-=this.shape.bounds.width/c/4,f.y-=this.shape.bounds.height/c/4);var c=-mxUtils.toRadians(this.getRotation()),d=-mxUtils.toRadians(this.getTotalRotation())-c,f=this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(f,c),this.ignoreGrid||!this.graph.isGridEnabledEvent(b.getEvent())),d));this.setPosition(this.state.getPaintBounds(), +f,b);this.positionChanged();this.redraw()};mxHandle.prototype.positionChanged=function(){null!=this.state.text&&this.state.text.apply(this.state);null!=this.state.shape&&this.state.shape.apply(this.state);this.graph.cellRenderer.redraw(this.state,!0)};mxHandle.prototype.getRotation=function(){return null!=this.state.shape?this.state.shape.getRotation():0};mxHandle.prototype.getTotalRotation=function(){return null!=this.state.shape?this.state.shape.getShapeRotation():0}; +mxHandle.prototype.init=function(){var b=this.isHtmlRequired();null!=this.image?(this.shape=new mxImageShape(new mxRectangle(0,0,this.image.width,this.image.height),this.image.src),this.shape.preserveImageAspect=!1):this.shape=this.createShape(b);this.initShape(b)};mxHandle.prototype.createShape=function(b){b=new mxRectangle(0,0,mxConstants.HANDLE_SIZE,mxConstants.HANDLE_SIZE);return new mxRectangleShape(b,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)}; +mxHandle.prototype.initShape=function(b){b&&this.shape.isHtmlAllowed()?(this.shape.dialect=mxConstants.DIALECT_STRICTHTML,this.shape.init(this.graph.container)):(this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,null!=this.cursor&&this.shape.init(this.graph.getView().getOverlayPane()));mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.shape.node.style.cursor=this.cursor}; +mxHandle.prototype.redraw=function(){if(null!=this.shape&&null!=this.state.shape){var b=this.getPosition(this.state.getPaintBounds());if(null!=b){var c=mxUtils.toRadians(this.getTotalRotation()),b=this.rotatePoint(this.flipPoint(b),c),c=this.graph.view.scale,f=this.graph.view.translate;this.shape.bounds.x=Math.floor((b.x+f.x)*c-this.shape.bounds.width/2);this.shape.bounds.y=Math.floor((b.y+f.y)*c-this.shape.bounds.height/2);this.state.unscaledWidth=null;this.shape.redraw()}}}; +mxHandle.prototype.isHtmlRequired=function(){return null!=this.state.text&&this.state.text.node.parentNode==this.graph.container};mxHandle.prototype.rotatePoint=function(b,c){var f=this.state.getCellBounds(),f=new mxPoint(f.getCenterX(),f.getCenterY()),d=Math.cos(c),a=Math.sin(c);return mxUtils.getRotatedPoint(b,d,a,f)}; +mxHandle.prototype.flipPoint=function(b){if(null!=this.state.shape){var c=this.state.getCellBounds();this.state.shape.flipH&&(b.x=2*c.x+c.width-b.x);this.state.shape.flipV&&(b.y=2*c.y+c.height-b.y)}return b};mxHandle.prototype.snapPoint=function(b,c){c||(b.x=this.graph.snap(b.x),b.y=this.graph.snap(b.y));return b};mxHandle.prototype.setVisible=function(b){null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display=b?"":"none")}; mxHandle.prototype.reset=function(){this.setVisible(!0);this.state.style=this.graph.getCellStyle(this.state.cell);this.positionChanged()};mxHandle.prototype.destroy=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null)}; -function mxVertexHandler(a){null!=a&&(this.state=a,this.init(),this.escapeHandler=mxUtils.bind(this,function(a,f){this.livePreview&&null!=this.index&&(this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate());this.reset()}),this.state.view.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1; +function mxVertexHandler(b){null!=b&&(this.state=b,this.init(),this.escapeHandler=mxUtils.bind(this,function(b,f){this.livePreview&&null!=this.index&&(this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate());this.reset()}),this.state.view.graph.addListener(mxEvent.ESCAPE,this.escapeHandler))}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1; mxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.parentHighlightEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.rotationCursor="crosshair";mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1; mxVertexHandler.prototype.rotationHandleVSpacing=-16;mxVertexHandler.prototype.horizontalOffset=0;mxVertexHandler.prototype.verticalOffset=0; mxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;this.selectionBorder.pointerEvents=!1;this.selectionBorder.rotation= -Number(this.state.style[mxConstants.STYLE_ROTATION]||"0");this.selectionBorder.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&this.selectionBorder.setCursor(mxConstants.CURSOR_MOVABLE_VERTEX);if(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()this.state.width&&2>this.state.height&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,mxEvent.LABEL_HANDLE, +Number(this.state.style[mxConstants.STYLE_ROTATION]||"0");this.selectionBorder.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&this.selectionBorder.setCursor(mxConstants.CURSOR_MOVABLE_VERTEX);if(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()this.state.width&&2>this.state.height&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,mxEvent.LABEL_HANDLE, null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}this.isRotationHandleVisible()&&(this.rotationShape=this.createSizer(this.rotationCursor,mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape));this.customHandles=this.createCustomHandles();this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()}; -mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance))this.inTolerance=!1};mxVertexHandler.prototype.updateHint=function(a){};mxVertexHandler.prototype.removeHint=function(){};mxVertexHandler.prototype.roundAngle=function(a){return Math.round(10*a)/10}; -mxVertexHandler.prototype.roundLength=function(a){return Math.round(a)}; -mxVertexHandler.prototype.mouseMove=function(a,c){!c.isConsumed()&&null!=this.index?(this.checkTolerance(c),this.inTolerance||(this.index<=mxEvent.CUSTOM_HANDLE?null!=this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(c):this.index==mxEvent.LABEL_HANDLE?this.moveLabel(c):this.index==mxEvent.ROTATION_HANDLE?this.rotateVertex(c):this.resizeVertex(c),this.updateHint(c)),c.consume()):!this.graph.isMouseDown&&null!=this.getHandleForEvent(c)&&c.consume(!1)}; -mxVertexHandler.prototype.moveLabel=function(a){var c=new mxPoint(a.getGraphX(),a.getGraphY()),f=this.graph.view.translate,d=this.graph.view.scale;this.graph.isGridEnabledEvent(a.getEvent())&&(c.x=(this.graph.snap(c.x/d-f.x)+f.x)*d,c.y=(this.graph.snap(c.y/d-f.y)+f.y)*d);this.moveSizerTo(this.sizers[null!=this.rotationShape?this.sizers.length-2:this.sizers.length-1],c.x,c.y)}; -mxVertexHandler.prototype.rotateVertex=function(a){var c=new mxPoint(a.getGraphX(),a.getGraphY()),f=this.state.x+this.state.width/2-c.x,d=this.state.y+this.state.height/2-c.y;this.currentAlpha=0!=f?180*Math.atan(d/f)/Math.PI+90:0>d?180:0;0this.graph.tolerance||Math.abs(b.getGraphY()-this.startY)>this.graph.tolerance))this.inTolerance=!1};mxVertexHandler.prototype.updateHint=function(b){};mxVertexHandler.prototype.removeHint=function(){};mxVertexHandler.prototype.roundAngle=function(b){return Math.round(10*b)/10}; +mxVertexHandler.prototype.roundLength=function(b){return Math.round(b)}; +mxVertexHandler.prototype.mouseMove=function(b,c){!c.isConsumed()&&null!=this.index?(this.checkTolerance(c),this.inTolerance||(this.index<=mxEvent.CUSTOM_HANDLE?null!=this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(c):this.index==mxEvent.LABEL_HANDLE?this.moveLabel(c):this.index==mxEvent.ROTATION_HANDLE?this.rotateVertex(c):this.resizeVertex(c),this.updateHint(c)),c.consume()):!this.graph.isMouseDown&&null!=this.getHandleForEvent(c)&&c.consume(!1)}; +mxVertexHandler.prototype.moveLabel=function(b){var c=new mxPoint(b.getGraphX(),b.getGraphY()),f=this.graph.view.translate,d=this.graph.view.scale;this.graph.isGridEnabledEvent(b.getEvent())&&(c.x=(this.graph.snap(c.x/d-f.x)+f.x)*d,c.y=(this.graph.snap(c.y/d-f.y)+f.y)*d);this.moveSizerTo(this.sizers[null!=this.rotationShape?this.sizers.length-2:this.sizers.length-1],c.x,c.y)}; +mxVertexHandler.prototype.rotateVertex=function(b){var c=new mxPoint(b.getGraphX(),b.getGraphY()),f=this.state.x+this.state.width/2-c.x,d=this.state.y+this.state.height/2-c.y;this.currentAlpha=0!=f?180*Math.atan(d/f)/Math.PI+90:0>d?180:0;0k.x+k.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-k.x-k.width),this.unscaledBounds.y+this.unscaledBounds.height> -k.y+k.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+this.unscaledBounds.height-k.y-k.height)));this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:b.x*e)+this.unscaledBounds.x*e,(null!=this.parentState?this.parentState.y:b.y*e)+this.unscaledBounds.y*e,this.unscaledBounds.width*e,this.unscaledBounds.height*e);g.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y);g=Math.cos(f);k=Math.sin(f); -f=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());l=f.x-c.x;d=f.y-c.y;c=g*l-k*d-l;f=k*l+g*d-d;l=this.bounds.x-this.state.x;d=this.bounds.y-this.state.y;b=g*l-k*d;g=k*l+g*d;this.bounds.x+=c;this.bounds.y+=f;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+c/e);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+f/e);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);!this.graph.isCellCollapsed(this.state.cell)&& -(0!=c||0!=f)?(this.childOffsetX=this.state.x-this.bounds.x+b,this.childOffsetY=this.state.y-this.bounds.y+g):this.childOffsetY=this.childOffsetX=0;this.livePreview&&this.updateLivePreview(a);null!=this.preview&&this.drawPreview()}; -mxVertexHandler.prototype.updateLivePreview=function(a){var c=this.graph.view.scale,f=this.graph.view.translate;a=this.state.clone();this.state.x=this.bounds.x;this.state.y=this.bounds.y;this.state.origin=new mxPoint(this.state.x/c-f.x,this.state.y/c-f.y);this.state.width=this.bounds.width;this.state.height=this.bounds.height;this.state.unscaledWidth=null;c=this.state.absoluteOffset;new mxPoint(c.x,c.y);this.state.absoluteOffset.x=0;this.state.absoluteOffset.y=0;c=this.graph.getCellGeometry(this.state.cell); -null!=c&&(f=c.offset||this.EMPTY_POINT,null!=f&&!c.relative&&(this.state.absoluteOffset.x=this.state.view.scale*f.x,this.state.absoluteOffset.y=this.state.view.scale*f.y),this.state.view.updateVertexLabelOffset(this.state));this.state.view.graph.cellRenderer.redraw(this.state,!0);this.state.view.invalidate(this.state.cell);this.state.invalid=!1;this.state.view.validate();this.redrawHandles();this.state.setState(a)}; -mxVertexHandler.prototype.mouseUp=function(a,c){if(null!=this.index&&null!=this.state){var f=new mxPoint(c.getGraphX(),c.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index<=mxEvent.CUSTOM_HANDLE)null!=this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].execute();else if(this.index==mxEvent.ROTATION_HANDLE)if(null!=this.currentAlpha){var d=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=d&&this.rotateCell(this.state.cell,d)}else this.rotateClick(); -else{var b=this.graph.isGridEnabledEvent(c.getEvent()),e=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),g=Math.cos(-e),k=Math.sin(-e),l=f.x-this.startX,m=f.y-this.startY,f=k*l+g*m,l=g*l-k*m,m=f,n=this.graph.view.scale,p=this.isRecursiveResize(this.state,c);this.resizeCell(this.state.cell,this.roundLength(l/n),this.roundLength(m/n),this.index,b,this.isConstrainedEvent(c),p)}}finally{this.graph.getModel().endUpdate()}c.consume();this.reset()}}; -mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveResize(this.state)};mxVertexHandler.prototype.rotateClick=function(){}; -mxVertexHandler.prototype.rotateCell=function(a,c,f){if(0!=c){var d=this.graph.getModel();if(d.isVertex(a)||d.isEdge(a)){if(!d.isEdge(a)){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);null!=b&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(b[mxConstants.STYLE_ROTATION]||0)+c,[a])}b=this.graph.getCellGeometry(a);if(null!=b){var e=this.graph.getCellGeometry(f);null!=e&&!d.isEdge(f)&&(b=b.clone(),b.rotate(c,new mxPoint(e.width/2,e.height/2)),d.setGeometry(a,b)); -if(d.isVertex(a)&&!b.relative||d.isEdge(a)){f=d.getChildCount(a);for(b=0;bd&&(a+=f,b&&(a=this.graph.snap(a/e)*e));if(0==d||3==d||5==d)p+=c,b&&(p=this.graph.snap(p/e)*e);else if(2==d||4==d||7==d)r+=c,b&&(r=this.graph.snap(r/ -e)*e);b=r-p;f=s-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?b=f*k:f=b/k,0==d&&(p=r-b,a=s-f)));l&&(b+=b-m,f+=f-n,p+=q-(p+b/2),a+=t-(a+f/2));0>b&&(p+=b,b=Math.abs(b));0>f&&(a+=f,f=Math.abs(f));d=new mxRectangle(p+g.x*e,a+g.y*e,b,f);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*e+this.minBounds.width*e+Math.max(0,this.x0*e-d.x)),d.height=Math.max(d.height,this.minBounds.y*e+this.minBounds.height*e+Math.max(0,this.y0*e-d.y))); +mxVertexHandler.prototype.resizeCell=function(b,c,f,d,a,e,g){a=this.graph.model.getGeometry(b);null!=a&&(d==mxEvent.LABEL_HANDLE?(f=this.graph.view.scale,c=Math.round((this.labelShape.bounds.getCenterX()-this.startX)/f),f=Math.round((this.labelShape.bounds.getCenterY()-this.startY)/f),a=a.clone(),null==a.offset?a.offset=new mxPoint(c,f):(a.offset.x+=c,a.offset.y+=f),this.graph.model.setGeometry(b,a)):null!=this.unscaledBounds&&(f=this.graph.view.scale,(0!=this.childOffsetX||0!=this.childOffsetY)&& +this.moveChildren(b,Math.round(this.childOffsetX/f),Math.round(this.childOffsetY/f)),this.graph.resizeCell(b,this.unscaledBounds,g)))};mxVertexHandler.prototype.moveChildren=function(b,c,f){for(var d=this.graph.getModel(),a=d.getChildCount(b),e=0;ed&&(b+=f,a&&(b=this.graph.snap(b/e)*e));if(0==d||3==d||5==d)p+=c,a&&(p=this.graph.snap(p/e)*e);else if(2==d||4==d||7==d)r+=c,a&&(r=this.graph.snap(r/ +e)*e);a=r-p;f=s-b;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?a=f*k:f=a/k,0==d&&(p=r-a,b=s-f)));l&&(a+=a-m,f+=f-n,p+=q-(p+a/2),b+=t-(b+f/2));0>a&&(p+=a,a=Math.abs(a));0>f&&(b+=f,f=Math.abs(f));d=new mxRectangle(p+g.x*e,b+g.y*e,a,f);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*e+this.minBounds.width*e+Math.max(0,this.x0*e-d.x)),d.height=Math.max(d.height,this.minBounds.y*e+this.minBounds.height*e+Math.max(0,this.y0*e-d.y))); return d};mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()}; -mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;if(null!=this.sizers&&0=mxGraphHandler.prototype.maxCells)this.bends=this.createBends(),this.isVirtualBendsEnabled()&&(this.virtualBends=this.createVirtualBends());this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=this.createLabelHandleShape();this.initBend(this.labelShape);this.labelShape.setCursor(mxConstants.CURSOR_LABEL_HANDLE);this.customHandles=this.createCustomHandles();this.redraw()};mxEdgeHandler.prototype.createCustomHandles=function(){return null}; -mxEdgeHandler.prototype.isVirtualBendsEnabled=function(a){return this.virtualBendsEnabled&&(null==this.state.style[mxConstants.STYLE_EDGE]||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.NONE||1==this.state.style[mxConstants.STYLE_NOEDGESTYLE])&&"arrow"!=mxUtils.getValue(this.state.style,mxConstants.STYLE_SHAPE,null)};mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)}; -mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a}; -mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};mxEdgeHandler.prototype.getCellAt=function(a,c){return!this.outlineConnect?this.graph.getCellAt(a,c):null}; -mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),c=this;a.getCell=function(a){var d=mxCellMarker.prototype.getCell.apply(this,arguments);if((d==c.state.cell||null==d)&&null!=c.currentPoint)d=c.graph.getCellAt(c.currentPoint.x,c.currentPoint.y);if(null!=d&&!this.graph.isCellConnectable(d)){var b=this.graph.getModel().getParent(d);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(d=b)}b=c.graph.getModel();if(this.graph.isSwimlane(d)&&null!=c.currentPoint&& -this.graph.hitsSwimlaneContent(d,c.currentPoint.x,c.currentPoint.y)||!c.isConnectableCell(d)||d==c.state.cell||null!=d&&!c.graph.connectableEdges&&b.isEdge(d)||b.isAncestor(c.state.cell,d))d=null;this.graph.isCellConnectable(d)||(d=null);return d};a.isValidState=function(a){var d=c.graph.getModel(),d=c.graph.view.getTerminalPort(a,c.graph.view.getState(d.getTerminal(c.state.cell,!c.isSource)),!c.isSource),d=null!=d?d.cell:null;c.error=c.validateConnection(c.isSource?a.cell:d,c.isSource?d:a.cell); -return null==c.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,c){return this.graph.getEdgeValidationError(this.state.cell,a,c)}; -mxEdgeHandler.prototype.createBends=function(){for(var a=this.state.cell,c=[],f=0;f -mxEvent.VIRTUAL_HANDLE&&null!=this.customHandles)for(f=0;fmxEvent.VIRTUAL_HANDLE&&(f[this.index-1]=d)}else this.graph.resetEdgesOnConnect&&(f=null);return null!=b?b:f}; -mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){var c=mxUtils.getOffset(this.graph.container),f=a.getEvent(),d=mxEvent.getClientX(f),f=mxEvent.getClientY(f),b=document.documentElement,e=this.currentPoint.x-this.graph.container.scrollLeft+c.x-((window.pageXOffset||b.scrollLeft)-(b.clientLeft||0)),c=this.currentPoint.y-this.graph.container.scrollTop+c.y-((window.pageYOffset||b.scrollTop)-(b.clientTop||0));return this.outlineConnect&&!mxEvent.isShiftDown(a.getEvent())&&(a.isSource(this.marker.highlight.shape)|| -mxEvent.isAltDown(a.getEvent())&&null!=a.getState()||this.marker.highlight.isHighlightAt(d,f)||(e!=d||c!=f)&&null==a.getState()&&this.marker.highlight.isHighlightAt(e,c))}; -mxEdgeHandler.prototype.updatePreviewState=function(a,c,f,d,b){var e=this.isSource?f:this.state.getVisibleTerminalState(!0),g=this.isTarget?f:this.state.getVisibleTerminalState(!1),k=this.graph.getConnectionConstraint(a,e,!0),l=this.graph.getConnectionConstraint(a,g,!1),m=this.constraintHandler.currentConstraint;null==m&&b&&(null!=f?(d.isSource(this.marker.highlight.shape)&&(c=new mxPoint(d.getGraphX(),d.getGraphY())),m=this.graph.getOutlineConstraint(c,f,d),this.constraintHandler.setFocus(d,f,this.isSource), -this.constraintHandler.currentConstraint=m,this.constraintHandler.currentPoint=c):m=new mxConnectionConstraint);if(this.outlineConnect&&null!=this.marker.highlight&&null!=this.marker.highlight.shape){var n=this.graph.view.scale;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(this.marker.highlight.shape.stroke=b?mxConstants.OUTLINE_HIGHLIGHT_COLOR:"transparent",this.marker.highlight.shape.strokewidth=mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH/n/n,this.marker.highlight.repaint()): -this.marker.hasValidState()&&(this.marker.highlight.shape.stroke=this.marker.getValidState()==d.getState()?mxConstants.DEFAULT_VALID_COLOR:"transparent",this.marker.highlight.shape.strokewidth=mxConstants.HIGHLIGHT_STROKEWIDTH/n/n,this.marker.highlight.repaint())}this.isSource?k=m:this.isTarget&&(l=m);if(this.isSource||this.isTarget)null!=m&&null!=m.point?(a.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X]=m.point.x,a.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]= -m.point.y):(delete a.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X],delete a.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]);a.setVisibleTerminalState(e,!0);a.setVisibleTerminalState(g,!1);(!this.isSource||null!=e)&&a.view.updateFixedTerminalPoint(a,e,!0,k);(!this.isTarget||null!=g)&&a.view.updateFixedTerminalPoint(a,g,!1,l);if((this.isSource||this.isTarget)&&null==f)a.setAbsoluteTerminalPoint(c,this.isSource),null==this.marker.getMarkedState()&&(this.error= -this.graph.allowDanglingEdges?null:"");a.view.updatePoints(a,this.points,e,g);a.view.updateFloatingTerminalPoints(a,e,g)}; -mxEdgeHandler.prototype.mouseMove=function(a,c){if(null!=this.index&&null!=this.marker){this.currentPoint=this.getPointForEvent(c);this.error=null;!this.graph.isIgnoreTerminalEvent(c.getEvent())&&mxEvent.isShiftDown(c.getEvent())&&null!=this.snapPoint&&(Math.abs(this.snapPoint.x-this.currentPoint.x)mxEvent.VIRTUAL_HANDLE)null!= +mxEdgeHandler.prototype.start=function(b,c,f){this.startX=b;this.startY=c;this.isSource=null==this.bends?!1:0==f;this.isTarget=null==this.bends?!1:f==this.bends.length-1;this.isLabel=f==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(b=this.state.cell,c=this.graph.model.getTerminal(b,this.isSource),null==c&&this.graph.isTerminalPointMovable(b,this.isSource)||null!=c&&this.graph.isCellDisconnectable(b,c,this.isSource))this.index=f}else this.index=f;if(this.index<=mxEvent.CUSTOM_HANDLE&&this.index> +mxEvent.VIRTUAL_HANDLE&&null!=this.customHandles)for(f=0;fmxEvent.VIRTUAL_HANDLE&&(f[this.index-1]=d)}else this.graph.resetEdgesOnConnect&&(f=null);return null!=a?a:f}; +mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){var c=mxUtils.getOffset(this.graph.container),f=b.getEvent(),d=mxEvent.getClientX(f),f=mxEvent.getClientY(f),a=document.documentElement,e=this.currentPoint.x-this.graph.container.scrollLeft+c.x-((window.pageXOffset||a.scrollLeft)-(a.clientLeft||0)),c=this.currentPoint.y-this.graph.container.scrollTop+c.y-((window.pageYOffset||a.scrollTop)-(a.clientTop||0));return this.outlineConnect&&!mxEvent.isShiftDown(b.getEvent())&&(b.isSource(this.marker.highlight.shape)|| +mxEvent.isAltDown(b.getEvent())&&null!=b.getState()||this.marker.highlight.isHighlightAt(d,f)||(e!=d||c!=f)&&null==b.getState()&&this.marker.highlight.isHighlightAt(e,c))}; +mxEdgeHandler.prototype.updatePreviewState=function(b,c,f,d,a){var e=this.isSource?f:this.state.getVisibleTerminalState(!0),g=this.isTarget?f:this.state.getVisibleTerminalState(!1),k=this.graph.getConnectionConstraint(b,e,!0),l=this.graph.getConnectionConstraint(b,g,!1),m=this.constraintHandler.currentConstraint;null==m&&a&&(null!=f?(d.isSource(this.marker.highlight.shape)&&(c=new mxPoint(d.getGraphX(),d.getGraphY())),m=this.graph.getOutlineConstraint(c,f,d),this.constraintHandler.setFocus(d,f,this.isSource), +this.constraintHandler.currentConstraint=m,this.constraintHandler.currentPoint=c):m=new mxConnectionConstraint);if(this.outlineConnect&&null!=this.marker.highlight&&null!=this.marker.highlight.shape){var n=this.graph.view.scale;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(this.marker.highlight.shape.stroke=a?mxConstants.OUTLINE_HIGHLIGHT_COLOR:"transparent",this.marker.highlight.shape.strokewidth=mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH/n/n,this.marker.highlight.repaint()): +this.marker.hasValidState()&&(this.marker.highlight.shape.stroke=this.marker.getValidState()==d.getState()?mxConstants.DEFAULT_VALID_COLOR:"transparent",this.marker.highlight.shape.strokewidth=mxConstants.HIGHLIGHT_STROKEWIDTH/n/n,this.marker.highlight.repaint())}this.isSource?k=m:this.isTarget&&(l=m);if(this.isSource||this.isTarget)null!=m&&null!=m.point?(b.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X]=m.point.x,b.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]= +m.point.y):(delete b.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X],delete b.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]);b.setVisibleTerminalState(e,!0);b.setVisibleTerminalState(g,!1);(!this.isSource||null!=e)&&b.view.updateFixedTerminalPoint(b,e,!0,k);(!this.isTarget||null!=g)&&b.view.updateFixedTerminalPoint(b,g,!1,l);if((this.isSource||this.isTarget)&&null==f)b.setAbsoluteTerminalPoint(c,this.isSource),null==this.marker.getMarkedState()&&(this.error= +this.graph.allowDanglingEdges?null:"");b.view.updatePoints(b,this.points,e,g);b.view.updateFloatingTerminalPoints(b,e,g)}; +mxEdgeHandler.prototype.mouseMove=function(b,c){if(null!=this.index&&null!=this.marker){this.currentPoint=this.getPointForEvent(c);this.error=null;!this.graph.isIgnoreTerminalEvent(c.getEvent())&&mxEvent.isShiftDown(c.getEvent())&&null!=this.snapPoint&&(Math.abs(this.snapPoint.x-this.currentPoint.x)mxEvent.VIRTUAL_HANDLE)null!= this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(c);else if(this.isLabel)this.label.x=this.currentPoint.x,this.label.y=this.currentPoint.y;else{this.points=this.getPreviewPoints(this.currentPoint,c);var f=this.isSource||this.isTarget?this.getPreviewTerminalState(c):null;if(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint)this.currentPoint=this.constraintHandler.currentPoint.clone(); -else if(this.outlineConnect){var d=this.isSource||this.isTarget?this.isOutlineConnectEvent(c):!1;d?f=this.marker.highlight.state:null!=f&&f!=c.getState()&&null!=this.marker.highlight.shape&&(this.marker.highlight.shape.stroke="transparent",this.marker.highlight.repaint(),f=null)}var b=this.clonePreviewState(this.currentPoint,null!=f?f.cell:null);this.updatePreviewState(b,this.currentPoint,f,c,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints= -b.absolutePoints;this.active=!0}this.updateHint(c,this.currentPoint);this.drawPreview();mxEvent.consume(c.getEvent());c.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(c)&&c.consume(!1)}; -mxEdgeHandler.prototype.mouseUp=function(a,c){if(null!=this.index&&null!=this.marker){var f=this.state.cell;if(c.getX()!=this.startX||c.getY()!=this.startY){var d=!this.graph.isIgnoreTerminalEvent(c.getEvent())&&this.graph.isCloneEvent(c.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable();if(null!=this.error)0mxEvent.VIRTUAL_HANDLE){if(null!=this.customHandles){d=this.graph.getModel(); -d.beginUpdate();try{this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].execute()}finally{d.endUpdate()}}}else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var b=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(b=this.constraintHandler.currentFocus.cell);null==b&&this.marker.hasValidState()&&null!=this.marker.highlight&&(null!=this.marker.highlight.shape&&"transparent"!=this.marker.highlight.shape.stroke&& -"white"!=this.marker.highlight.shape.stroke)&&(b=this.marker.validState.cell);if(null!=b)f=this.connect(f,b,this.isSource,d,c);else if(this.graph.isAllowDanglingEdges()){b=this.abspoints[this.isSource?0:this.abspoints.length-1];b.x=this.roundLength(b.x/this.graph.view.scale-this.graph.view.translate.x);b.y=this.roundLength(b.y/this.graph.view.scale-this.graph.view.translate.y);var e=this.graph.getView().getState(this.graph.getModel().getParent(f));null!=e&&(b.x-=e.origin.x,b.y-=e.origin.y);b.x-=this.graph.panDx/ -this.graph.view.scale;b.y-=this.graph.panDy/this.graph.view.scale;f=this.changeTerminalPoint(f,b,this.isSource,d)}}else this.active?f=this.changePoints(f,this.points,d):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().validate(this.state.cell))}null!=this.marker&&(this.reset(),f!=this.state.cell&&this.graph.setSelectionCell(f));c.consume()}}; -mxEdgeHandler.prototype.reset=function(){this.snapPoint=this.points=this.label=this.index=this.error=null;this.isTarget=this.isSource=this.isLabel=this.active=!1;if(this.livePreview&&null!=this.sizers)for(var a=0;amxEvent.VIRTUAL_HANDLE){if(null!=this.customHandles){d=this.graph.getModel(); +d.beginUpdate();try{this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].execute()}finally{d.endUpdate()}}}else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var a=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(a=this.constraintHandler.currentFocus.cell);null==a&&this.marker.hasValidState()&&null!=this.marker.highlight&&(null!=this.marker.highlight.shape&&"transparent"!=this.marker.highlight.shape.stroke&& +"white"!=this.marker.highlight.shape.stroke)&&(a=this.marker.validState.cell);if(null!=a)f=this.connect(f,a,this.isSource,d,c);else if(this.graph.isAllowDanglingEdges()){a=this.abspoints[this.isSource?0:this.abspoints.length-1];a.x=this.roundLength(a.x/this.graph.view.scale-this.graph.view.translate.x);a.y=this.roundLength(a.y/this.graph.view.scale-this.graph.view.translate.y);var e=this.graph.getView().getState(this.graph.getModel().getParent(f));null!=e&&(a.x-=e.origin.x,a.y-=e.origin.y);a.x-=this.graph.panDx/ +this.graph.view.scale;a.y-=this.graph.panDy/this.graph.view.scale;f=this.changeTerminalPoint(f,a,this.isSource,d)}}else this.active?f=this.changePoints(f,this.points,d):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().validate(this.state.cell))}null!=this.marker&&(this.reset(),f!=this.state.cell&&this.graph.setSelectionCell(f));c.consume()}}; +mxEdgeHandler.prototype.reset=function(){this.snapPoint=this.points=this.label=this.index=this.error=null;this.isTarget=this.isSource=this.isLabel=this.active=!1;if(this.livePreview&&null!=this.sizers)for(var b=0;bn&&(f-=f+k-n);n=l.y+l.height;d+m>n&&(d-=d+m-n)}}else null!=k&&(f-=k.x*e,d-=k.y*e)}}g=g.clone();g.x=this.graph.snap(f/e-this.graph.getView().translate.x-this.graph.gridSize/2);g.y=this.graph.snap(d/e-this.graph.getView().translate.y-this.graph.gridSize/2);c.setGeometry(g);null==a&&(a=this.graph.getDefaultParent());this.cycleAttribute(c);this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",c,"parent",a));b.beginUpdate();try{c=this.graph.addCell(c, -a),null!=c&&(this.graph.constrainChild(c),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",c)))}finally{b.endUpdate()}null!=c&&(this.graph.setSelectionCell(c),this.graph.scrollCellToVisible(c),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",c)));return c}; +mxEditor.prototype.showTasks=function(){if(null==this.tasks){var b=document.createElement("div");b.style.padding="4px";b.style.paddingLeft="20px";var c=document.body.clientWidth,c=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,b,c-220,this.tasksTop,200);c.setClosable(!0);c.destroyOnClose=!1;var f=mxUtils.bind(this,function(d){mxEvent.release(b);b.innerHTML="";this.createTasks(b)});this.graph.getModel().addListener(mxEvent.CHANGE,f);this.graph.getSelectionModel().addListener(mxEvent.CHANGE, +f);this.graph.addListener(mxEvent.ROOT,f);null!=this.tasksWindowImage&&c.setImage(this.tasksWindowImage);this.tasks=c;this.createTasks(b)}this.tasks.setVisible(!0)};mxEditor.prototype.refreshTasks=function(b){null!=this.tasks&&(b=this.tasks.content,mxEvent.release(b),b.innerHTML="",this.createTasks(b))};mxEditor.prototype.createTasks=function(b){}; +mxEditor.prototype.showHelp=function(b){if(null==this.help){var c=document.createElement("iframe");c.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp);c.setAttribute("height","100%");c.setAttribute("width","100%");c.setAttribute("frameBorder","0");c.style.backgroundColor="white";b=document.body.clientWidth;var f=document.body.clientHeight||document.documentElement.clientHeight,d=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,c,(b-this.helpWidth)/2,(f-this.helpHeight)/ +3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(b=function(a){c.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,b),d.addListener(mxEvent.MAXIMIZE,b),d.addListener(mxEvent.NORMALIZE,b),d.addListener(mxEvent.SHOW,b));this.help=d}this.help.setVisible(!0)}; +mxEditor.prototype.showOutline=function(){if(null==this.outline){var b=document.createElement("div");b.style.overflow="hidden";b.style.position="relative";b.style.width="100%";b.style.height="100%";b.style.background="white";b.style.cursor="move";8==document.documentMode&&(b.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity\x3d100)");var c=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,b,600,480,200,200,!1),f=new mxOutline(this.graph,b);c.setClosable(!0);c.setResizable(!0); +c.destroyOnClose=!1;c.addListener(mxEvent.RESIZE_END,function(){f.update()});this.outline=c;this.outline.outline=f}this.outline.setVisible(!0);this.outline.outline.update(!0)};mxEditor.prototype.setMode=function(b){"select"==b?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==b?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==b&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))}; +mxEditor.prototype.createPopupMenu=function(b,c,f){this.popupHandler.createMenu(this,b,c,f)};mxEditor.prototype.createEdge=function(b,c){var f=null;if(null!=this.defaultEdge)f=this.graph.getModel().cloneCell(this.defaultEdge);else{f=new mxCell("");f.setEdge(!0);var d=new mxGeometry;d.relative=!0;f.setGeometry(d)}d=this.getEdgeStyle();null!=d&&f.setStyle(d);return f};mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle}; +mxEditor.prototype.consumeCycleAttribute=function(b){return null!=this.cycleAttributeValues&&0n&&(f-=f+k-n);n=l.y+l.height;d+m>n&&(d-=d+m-n)}}else null!=k&&(f-=k.x*e,d-=k.y*e)}}g=g.clone();g.x=this.graph.snap(f/e-this.graph.getView().translate.x-this.graph.gridSize/2);g.y=this.graph.snap(d/e-this.graph.getView().translate.y-this.graph.gridSize/2);c.setGeometry(g);null==b&&(b=this.graph.getDefaultParent());this.cycleAttribute(c);this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",c,"parent",b));a.beginUpdate();try{c=this.graph.addCell(c, +b),null!=c&&(this.graph.constrainChild(c),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",c)))}finally{a.endUpdate()}null!=c&&(this.graph.setSelectionCell(c),this.graph.scrollCellToVisible(c),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",c)));return c}; mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)}; -var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var c=a.getName();mxCodecRegistry.codecs[c]=a;var f=mxUtils.getFunctionName(a.template.constructor);f!=c&&mxCodecRegistry.addAlias(f,c)}return a},addAlias:function(a,c){mxCodecRegistry.aliases[a]=c},getCodec:function(a){var c=null;if(null!=a){var c=mxUtils.getFunctionName(a),f=mxCodecRegistry.aliases[c];null!=f&&(c=f);c=mxCodecRegistry.codecs[c];if(null==c)try{c=new mxObjectCodec(new a),mxCodecRegistry.register(c)}catch(d){}}return c}}; -function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.elements=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,c){return this.objects[a]=c};mxCodec.prototype.getObject=function(a){var c=null;null!=a&&(c=this.objects[a],null==c&&(c=this.lookup(a),null==c&&(a=this.getElementById(a),null!=a&&(c=this.decode(a)))));return c};mxCodec.prototype.lookup=function(a){return null}; -mxCodec.prototype.getElementById=function(a){null==this.elements&&(this.elements={},this.addElement(this.document.documentElement));return this.elements[a]};mxCodec.prototype.addElement=function(a){if(a.nodeType==mxConstants.NODETYPE_ELEMENT){var c=a.getAttribute("id");null!=c&&null==this.elements[c]&&(this.elements[c]=a)}for(a=a.firstChild;null!=a;)this.addElement(a),a=a.nextSibling}; -mxCodec.prototype.getId=function(a){var c=null;null!=a&&(c=this.reference(a),null==c&&a instanceof mxCell&&(c=a.getId(),null==c&&(c=mxCellPath.create(a),0==c.length&&(c="root"))));return c};mxCodec.prototype.reference=function(a){return null};mxCodec.prototype.encode=function(a){var c=null;if(null!=a&&null!=a.constructor){var f=mxCodecRegistry.getCodec(a.constructor);null!=f?c=f.encode(this,a):mxUtils.isNode(a)?c=mxUtils.importNode(this.document,a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return c}; -mxCodec.prototype.decode=function(a,c){var f=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){f=null;try{f=window[a.nodeName]}catch(d){}f=mxCodecRegistry.getCodec(f);null!=f?f=f.decode(this,a,c):(f=a.cloneNode(!0),f.removeAttribute("as"))}return f};mxCodec.prototype.encodeCell=function(a,c,f){c.appendChild(this.encode(a));if(null==f||f){f=a.getChildCount();for(var d=0;dthis.minPageBreakDist)?Math.ceil(a/e.width)-1:0;b=b?Math.ceil(d/e.height)-1:0;a=q.x+a;d=q.y+d;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(b/e.width)-1:0;a=a?Math.ceil(d/e.height)-1:0;b=q.x+b;d=q.y+d;null==this.horizontalPageBreaks&&0document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c;d.init(this.diagramContainer);d.cellRenderer.initializeLabel=function(b,a){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(a.node,"click",function(b){for(var d=mxEvent.getSource(b);null!=d&&d!=a.node;){if("A"==d.nodeName){null==d.getAttribute("target")&&null!=d.getAttribute("href")&&(window.open(d.getAttribute("href")),mxEvent.consume(b));break}d= -d.parentNode}})};this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(b){var a=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),a.push(b));b=e}b=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;cdocument.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",c):this.diagramContainer.oncontextmenu=c;d.init(this.diagramContainer);d.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);mxEvent.addListener(b.node,"click",function(a){for(var d=mxEvent.getSource(a);null!=d&&d!=b.node;){if("A"==d.nodeName){null==d.getAttribute("target")&&null!=d.getAttribute("href")&&(window.open(d.getAttribute("href")),mxEvent.consume(a));break}d= +d.parentNode}})};this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var b=mxUtils.getOffset(this.diagramContainer);0mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var c=0;cmxUtils.indexOf(z,t))&&d.setCellStyles(t,A,[k])}}}finally{d.getModel().endUpdate()}}; -d.addListener("cellsInserted",function(b,a){A(a.getProperty("cells"))});d.addListener("textInserted",function(b,a){A(a.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(b,a){var d=[a.getProperty("cell")];a.getProperty("terminalInserted")&&d.push(a.getProperty("terminal"));A(d)});this.addListener("styleChanged",mxUtils.bind(this,function(b,a){var e=a.getProperty("cells"),c=!1,f=!1;if(0=screen.width?116:204;EditorUi.prototype.allowAnimation=!0; -EditorUi.prototype.init=function(){var a=this.editor.graph;mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(d){9==d.which&&a.isEnabled()&&(a.isEditing()&&a.stopEditing(!1),a.selectCell(!mxEvent.isShiftDown(d)),mxEvent.consume(d))}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(d){if(this.isImmediateEditingEvent(d)&&!a.isEditing()&&!a.isSelectionEmpty()&&(0!==d.which&&!mxEvent.isAltDown(d)&&!mxEvent.isControlDown(d)&&!mxEvent.isMetaDown(d))&&(a.escape(), -a.startEditing(),mxClient.IS_FF)){var b=a.cellEditor;b.textarea.innerHTML=String.fromCharCode(d.which);d=document.createRange();d.selectNodeContents(b.textarea);d.collapse(!1);b=window.getSelection();b.removeAllRanges();b.addRange(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 c= -a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){c.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.isImmediateEditingEvent=function(a){return!0}; -EditorUi.prototype.getCssClassForMarker=function(a,c,f,d){return"flexArrow"==c?null!=f&&f!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":f==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":f==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"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"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":f==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":f==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":f==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":f==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"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"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==f||"circlePlus"==f?"1"==d||"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.updatePasteActionStates=function(){var a=this.editor.graph,c=this.actions.get("paste"),f=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(c.isEnabled())}; -EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};var f=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):f.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste", -!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var b=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){b.apply(this,arguments);a.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){e.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()}; -EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.scrollTileSize=new mxRectangle(0,0,400,400);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.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};a.getPageLayout= -function(){var b=this.pageVisible?this.getPageSize():this.scrollTileSize,a=this.getGraphBounds();if(0==a.width||0==a.height)return new mxRectangle(0,0,1,1);var d=Math.ceil(a.x/this.view.scale-this.view.translate.x),e=Math.ceil(a.y/this.view.scale-this.view.translate.y),c=Math.floor(a.height/this.view.scale),f=Math.floor(d/b.width),g=Math.floor(e/b.height),a=Math.ceil((d+Math.floor(a.width/this.view.scale))/b.width)-f,b=Math.ceil((e+c)/b.height)-g;return new mxRectangle(f,g,a,b)};a.view.getBackgroundPageBounds= -function(){var b=this.graph.getPageLayout(),a=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*a.width),this.scale*(this.translate.y+b.y*a.height),this.scale*b.width*a.width,this.scale*b.height*a.height)};a.getPreferredPageSize=function(b,a,d){b=this.getPageLayout();a=this.getPageSize();return new mxRectangle(0,0,b.width*a.width,b.height*a.height)};var c=null;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b){if(null!=a.container){var d= -a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=a.view.translate,c=a.view.scale,d=mxRectangle.fromRectangle(d);d.x=d.x/c-e.x;d.y=d.y/c-e.y;d.width/=c;d.height/=c;var e=a.container.scrollTop,f=a.container.scrollLeft,g=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)g+=3;var k=a.container.offsetWidth-g,g=a.container.offsetHeight-g;b=b?Math.max(0.3,Math.min(1,k/d.width)):c;k=Math.max((k-b*d.width)/2,0)/b;g=Math.max((g-b*d.height)/ -4,0)/b;a.view.scaleAndTranslate(b,k-d.x,g-d.y);a.container.scrollTop=e*b/c;a.container.scrollLeft=f*b/c}});var f=mxUtils.bind(this,function(){c(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){c(!0)}));this.actions.get("zoomIn").funct=function(b){a.zoomIn();c(!1)};this.actions.get("zoomOut").funct=function(b){a.zoomOut();c(!1)};this.chromelessToolbar= +EditorUi.prototype.init=function(){var b=this.editor.graph;mxEvent.addListener(b.container,"keydown",mxUtils.bind(this,function(d){9==d.which&&b.isEnabled()&&(b.isEditing()&&b.stopEditing(!1),b.selectCell(!mxEvent.isShiftDown(d)),mxEvent.consume(d))}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(d){if(this.isImmediateEditingEvent(d)&&!b.isEditing()&&!b.isSelectionEmpty()&&(0!==d.which&&!mxEvent.isAltDown(d)&&!mxEvent.isControlDown(d)&&!mxEvent.isMetaDown(d))&&(b.escape(), +b.startEditing(),mxClient.IS_FF)){var a=b.cellEditor;a.textarea.innerHTML=String.fromCharCode(d.which);d=document.createRange();d.selectNodeContents(a.textarea);d.collapse(!1);a=window.getSelection();a.removeAllRanges();a.addRange(d)}}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c= +b.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){c.apply(this,arguments);f.updateActionStates()};b.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()};EditorUi.prototype.isImmediateEditingEvent=function(b){return!0}; +EditorUi.prototype.getCssClassForMarker=function(b,c,f,d){return"flexArrow"==c?null!=f&&f!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":f==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+b+"classic":"geSprite geSprite-"+b+"classictrans":f==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+b+"classicthin":"geSprite geSprite-"+b+"classicthintrans":f==mxConstants.ARROW_OPEN?"geSprite geSprite-"+b+"open":f==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+ +b+"openthin":f==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+b+"block":"geSprite geSprite-"+b+"blocktrans":f==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+b+"blockthin":"geSprite geSprite-"+b+"blockthintrans":f==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+b+"oval":"geSprite geSprite-"+b+"ovaltrans":f==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+b+"diamond":"geSprite geSprite-"+b+"diamondtrans":f==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+b+"thindiamond": +"geSprite geSprite-"+b+"thindiamondtrans":"openAsync"==f?"geSprite geSprite-"+b+"openasync":"dash"==f?"geSprite geSprite-"+b+"dash":"cross"==f?"geSprite geSprite-"+b+"cross":"async"==f?"1"==d?"geSprite geSprite-"+b+"async":"geSprite geSprite-"+b+"asynctrans":"circle"==f||"circlePlus"==f?"1"==d||"circle"==f?"geSprite geSprite-"+b+"circle":"geSprite geSprite-"+b+"circleplus":"ERone"==f?"geSprite geSprite-"+b+"erone":"ERmandOne"==f?"geSprite geSprite-"+b+"eronetoone":"ERmany"==f?"geSprite geSprite-"+ +b+"ermany":"ERoneToMany"==f?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==f?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==f?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null}; +EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,c=this.actions.get("paste"),f=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));f.setEnabled(c.isEnabled())}; +EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(a){a.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};var f=mxClipboard.copy;mxClipboard.copy=function(a){a.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):f.apply(this,arguments);b.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(a){var e=null;a.cellEditor.isContentEditing()?document.execCommand("paste", +!1,null):e=d.apply(this,arguments);b.updatePasteActionStates();return e};var a=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){a.apply(this,arguments);b.updatePasteActionStates()};var e=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(a,d){e.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()}; +EditorUi.prototype.initCanvas=function(){var b=this.editor.graph,b=this.editor.graph;b.timerAutoScroll=!0;b.scrollTileSize=new mxRectangle(0,0,400,400);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.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};b.getPageLayout= +function(){var a=this.pageVisible?this.getPageSize():this.scrollTileSize,b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var d=Math.ceil(b.x/this.view.scale-this.view.translate.x),e=Math.ceil(b.y/this.view.scale-this.view.translate.y),c=Math.floor(b.height/this.view.scale),f=Math.floor(d/a.width),g=Math.floor(e/a.height),b=Math.ceil((d+Math.floor(b.width/this.view.scale))/a.width)-f,a=Math.ceil((e+c)/a.height)-g;return new mxRectangle(f,g,b,a)};b.view.getBackgroundPageBounds= +function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.getPreferredPageSize=function(a,b,d){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(a){if(null!=b.container){var d= +b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),e=b.view.translate,c=b.view.scale,d=mxRectangle.fromRectangle(d);d.x=d.x/c-e.x;d.y=d.y/c-e.y;d.width/=c;d.height/=c;var e=b.container.scrollTop,f=b.container.scrollLeft,g=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)g+=3;var k=b.container.offsetWidth-g,g=b.container.offsetHeight-g;a=a?Math.max(0.3,Math.min(1,k/d.width)):c;k=Math.max((k-a*d.width)/2,0)/a;g=Math.max((g-a*d.height)/ +4,0)/a;b.view.scaleAndTranslate(a,k-d.x,g-d.y);b.container.scrollTop=e*a/c;b.container.scrollLeft=f*a/c}});var f=mxUtils.bind(this,function(){c(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){c(!0)}));this.actions.get("zoomIn").funct=function(a){b.zoomIn();c(!1)};this.actions.get("zoomOut").funct=function(a){b.zoomOut();c(!1)};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.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style, -"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var b=0,d=mxUtils.bind(this,function(a,d,e){b++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c, -"click",a);null!=e&&c.setAttribute("title",e);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);return c});d(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutLargeImage,(mxResources.get("zoomOut")||"Zoom Out")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInLargeImage,(mxResources.get("zoomIn")|| -"Zoom In")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(b){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),c(!1)):c(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit")||"Fit");var e=null,g=null,k=mxUtils.bind(this,function(b){null!=e&&(window.clearTimeout(e),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);e=null;g=window.setTimeout(mxUtils.bind(this, -function(){this.chromelessToolbar.style.display="none";g=null}),600)}),b||200)}),l=mxUtils.bind(this,function(b){null!=e&&(window.clearTimeout(e),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var m=d(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog= -a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var d=m.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color= -"#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=d.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=d.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),n=a.getModel();n.addListener(mxEvent.CHANGE,function(){m.style.display= -1this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= -(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=c&&c(!1);if(null!=t&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container), -d=a.container.offsetHeight/2-t.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/2-t.x+b.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,d){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var e=mxEvent.getSource(b);null!=e;){if(e==a.container){t= -new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(d);mxEvent.consume(b);break}e=e.parentNode}}))};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= +(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=c&&c(!1);if(null!=t&&mxUtils.hasScrollbars(b.container)){var a=mxUtils.getOffset(b.container), +d=b.container.offsetHeight/2-t.y+a.y;b.container.scrollLeft-=(b.container.offsetWidth/2-t.x+a.x)*(this.cumulativeZoomFactor-1);b.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(a,d){if((mxEvent.isAltDown(a)||mxEvent.isControlDown(a)&&!mxClient.IS_MAC||b.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var e=mxEvent.getSource(a);null!=e;){if(e==b.container){t= +new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));b.lazyZoom(d);mxEvent.consume(a);break}e=e.parentNode}}))};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0f&&(c=a.substring(f,d+21).replace(/>/g,"\x3e").replace(/</g,"\x3c").replace(/\n/g,""))}}catch(b){}return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),f=this.editor.extractGraphModel(c.documentElement);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(d){}return!1}; -EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,f=null;if(null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a)){if(10==document.documentMode||11==document.documentMode)f=a.getData("Text");else if(f=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==f||0==f.length))f=a.getData("text/plain");null!=f&&(f=this.editor.graph.zapGremlins(mxUtils.trim(f)),a=this.extractGraphModelFromHtml(f),null!=a&&(f=a))}null!=f&&this.isCompatibleString(f)&& -(c=f);return c};EditorUi.prototype.saveFile=function(a){!a&&null!=this.editor.filename?this.save(this.editor.getOrCreateFilename()):(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0navigator.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()}}}; -EditorUi.prototype.showImageDialog=function(a,c,f,d){d=this.editor.graph.cellEditor;var b=d.saveSelection(),e=mxUtils.prompt(a,c);d.restoreSelection(b);if(null!=e&&0f&&(c=b.substring(f,d+21).replace(/>/g,"\x3e").replace(/</g,"\x3c").replace(/\n/g,""))}}catch(a){}return c};EditorUi.prototype.isCompatibleString=function(b){try{var c=mxUtils.parseXml(b),f=this.editor.extractGraphModel(c.documentElement);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(d){}return!1}; +EditorUi.prototype.extractGraphModelFromEvent=function(b){var c=null,f=null;if(null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b)){if(10==document.documentMode||11==document.documentMode)f=b.getData("Text");else if(f=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,mxUtils.indexOf(b.types,null==f||0==f.length))f=b.getData("text/plain");null!=f&&(f=this.editor.graph.zapGremlins(mxUtils.trim(f)),b=this.extractGraphModelFromHtml(f),null!=b&&(f=b))}null!=f&&this.isCompatibleString(f)&& +(c=f);return c};EditorUi.prototype.saveFile=function(b){!b&&null!=this.editor.filename?this.save(this.editor.getOrCreateFilename()):(b=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&&0navigator.userAgent.indexOf("Camino")?(b=new mxMorphing(d),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),b.startAnimation()):d.getModel().endUpdate()}}}; +EditorUi.prototype.showImageDialog=function(b,c,f,d){d=this.editor.graph.cellEditor;var a=d.saveSelection(),e=mxUtils.prompt(b,c);d.restoreSelection(a);if(null!=e&&0this.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;this.graph2.addCells(c);var g=this.graph2.getGraphBounds(),l=g.width+2*this.tooltipBorder+4,m= -g.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(m+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=b&&0Q&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(N,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(N,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){v=l;var m=b.model.isEdge(l.cell)?b.view.getPoint(l): -new mxPoint(l.getCenterX(),l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(m.x)+"px";B.style.top=Math.floor(m.y)+"px";null==E&&(b.container.appendChild(B),E=B.parentNode);g(a,e,m,B)}else null==v||!mxUtils.contains(v,a,e)||1500Q&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(N,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(N,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(a.model.isVertex(l.cell)&&null!=n||a.model.isEdge(l.cell)&&a.model.isEdge(d[0]))){v=l;var m=a.model.isEdge(l.cell)?a.view.getPoint(l): +new mxPoint(l.getCenterX(),l.getCenterY()),m=new mxRectangle(m.x-this.refreshTarget.width/2,m.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);B.style.left=Math.floor(m.x)+"px";B.style.top=Math.floor(m.y)+"px";null==E&&(a.container.appendChild(B),E=B.parentNode);g(b,e,m,B)}else null==v||!mxUtils.contains(v,b,e)||1500Q&&Q>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,y,x,D,A];for(m=0;mQ&&Q>this.dropTargetDelay||a.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,y,x,D,A];for(m=0;mmxUtils.indexOf(b,e)){c=this.getTagsForStencil(a,e);var q=null!=k?k[e]:null;null!=q&&c.push(q);l.push(this.createVertexTemplateEntry("shape\x3d"+a+e.toLowerCase()+d,Math.round(f*g),Math.round(s*g),"",e.replace(/_/g," "),null,null,this.filterTags(c.join(" "))))}}),!0,!0);this.addPaletteFunctions(a,c,!1, -l)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==d&&(d="");null!=e&&e.call(this,a);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(e,c,f,k,l){(null==b||0>mxUtils.indexOf(b,c))&&a.appendChild(this.createVertexTemplate("shape\x3d"+e+c.toLowerCase()+d,Math.round(k*g),Math.round(l*g),"",c.replace(/_/g," "),!0))}),!0)}))}; +2)+"px",D.style.left=y.style.left,D.style.top=Math.floor(m.y+m.height)+"px",A.style.left=Math.floor(m.x-this.triangleLeft.width)+"px",A.style.top=x.style.top,"eastwest"!=l.style.portConstraint&&(a.container.appendChild(y),a.container.appendChild(D)),a.container.appendChild(x),a.container.appendChild(A));null!=l&&(u=a.selectionCellsHandler.getHandler(l.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));z=!0}else{k=[F,G,y,x,D,A];for(m=0;mmxUtils.indexOf(a,e)){c=this.getTagsForStencil(b,e);var q=null!=k?k[e]:null;null!=q&&c.push(q);l.push(this.createVertexTemplateEntry("shape\x3d"+b+e.toLowerCase()+d,Math.round(f*g),Math.round(s*g),"",e.replace(/_/g," "),null,null,this.filterTags(c.join(" "))))}}),!0,!0);this.addPaletteFunctions(b,c,!1, +l)}else this.addPalette(b,c,!1,mxUtils.bind(this,function(b){null==d&&(d="");null!=e&&e.call(this,b);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(e,c,f,k,l){(null==a||0>mxUtils.indexOf(a,c))&&b.appendChild(this.createVertexTemplate("shape\x3d"+e+c.toLowerCase()+d,Math.round(k*g),Math.round(l*g),"",c.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)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0);mxConstants.SHADOW_OPACITY=0.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(c){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1; +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(c){}})();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\x3d":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]"; -Graph=function(a,c,f,d,b){mxGraph.call(this,a,c,f,d);this.themes=b||this.defaultThemes;a=this.baseUrl;c=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0d*this.view.scale||Math.abs(e.y-a.getGraphY())> +Graph=function(b,c,f,d,a){mxGraph.call(this,b,c,f,d);this.themes=a||this.defaultThemes;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0d*this.view.scale||Math.abs(e.y-b.getGraphY())> d*this.view.scale){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var f=this.selectionCellsHandler.getHandler(c.cell);if(null!=f&&null!=f.bends&&0mxUtils.indexOf(a,c)&&d.push(c)): -d.push(a[e])}return d};this.connectionHandler.createTargetVertex=function(b,a){var d=this.graph.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(a),this.graph.model.isVertex(d)&&(a=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove= -function(){var b=this.currentState;q.apply(this,arguments);b!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3=b&&t.y+t.height<=l&&(t.y>=a&&t.x+t.width<=k)&&f.push(q);this.getAllCells(b,a,d,e,q,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:D.apply(this,arguments)};this.isCellLocked=function(b){for(b=this.view.getState(b);null!=b;){if("1"==mxUtils.getValue(b.style, -"locked","0"))return!0;b=this.view.getState(this.model.getParent(b.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,a){if("mouseDown"==a.getProperty("eventName")){var d=a.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,a){if(!mxEvent.isMultiTouchEvent(a)){var d=a.getProperty("event"),e=a.getProperty("cell"); -null==e?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1mxUtils.indexOf(b,c)&&d.push(c)): +d.push(b[e])}return d};this.connectionHandler.createTargetVertex=function(a,b){var d=this.graph.view.getState(b),d=null!=d?d.style:this.graph.getCellStyle(b);mxUtils.getValue(d,"part",!1)&&(d=this.graph.model.getParent(b),this.graph.model.isVertex(d)&&(b=d));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove= +function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&t.y+t.height<=l&&(t.y>=b&&t.x+t.width<=k)&&f.push(q);this.getAllCells(a,b,d,e,q,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,d){return this.graph.isCellSelected(a)?!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style, +"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var d=b.getProperty("event").getState();A=null!=d&&!this.isSelectionEmpty()&&!this.isCellSelected(d.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var d=b.getProperty("event"),e=b.getProperty("cell"); +null==e?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),p.start(d.x,d.y)):null!=A?this.addSelectionCells(A):1r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:f?"UTC":(String(a).match(b)||[""]).pop().replace(e,""),o:(0d&&"%"==c.charAt(match.index-1))e=b.substring(1);else{var g=b.substring(1,b.length-1);if(0>g.indexOf("{"))for(var k=a;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.value.getAttribute(g)),k=this.model.getParent(k);null==e&&(e=this.getGlobalVariable(g))}f.push(c.substring(d,match.index)+(e|| -b));d=match.index+b.length}}f.push(c.substring(d));return f.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,c,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=f&&(mxEvent.isTouchEvent(c)?f.update(f.getState(this.view.getState(a[1]))):f.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)}; -Graph.prototype.connectVertex=function(a,c,f,d,b){var e=a.geometry.relative?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);c==mxConstants.DIRECTION_NORTH?(e.x+=a.geometry.width/2,e.y-=f):c==mxConstants.DIRECTION_SOUTH?(e.x+=a.geometry.width/2,e.y+=a.geometry.height+f):(e.x=c==mxConstants.DIRECTION_WEST?e.x-f:e.x+(a.geometry.width+f),e.y+=a.geometry.height/2);f=this.view.getState(this.model.getParent(a));var g=this.view.scale, -k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(f.cell)&&(l=f.x,k=f.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(e.x+=a.parent.geometry.x,e.y+=a.parent.geometry.y);f=mxEvent.isControlDown(d)&&!b?null:this.getCellAt(l+e.x*g,k+e.y*g);this.model.isAncestor(f,a)&&(f=null);for(g=f;null!=g;){if(this.isCellLocked(g)){f=null;break}g=this.model.getParent(g)}null!=f&&(g=this.view.getState(a),l=this.view.getState(f),null!=g&&null!=l&&mxUtils.intersects(g,l)&&(f=null));if(b=!mxEvent.isShiftDown(d)|| -b)c==mxConstants.DIRECTION_NORTH?e.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?e.y+=a.geometry.height/2:e.x=c==mxConstants.DIRECTION_WEST?e.x-a.geometry.width/2:e.x+a.geometry.width/2;null!=f&&!this.isCellConnectable(f)&&(g=this.getModel().getParent(f),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(f=g));if(f==a||this.model.isEdge(f)||!this.isCellConnectable(f))f=null;g=[];this.model.beginUpdate();try{l=f;if(null==l&&b){for(var k=a,m=this.getCellGeometry(a);null!=m&&m.relative;)k= -this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);m.x=e.x-m.width/2;m.y=e.y-m.height/2}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&b||null==f&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a), -null,"",a,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==s.parent&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==f&&null!=l&&null!=m&&(null!=a.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,q));null!=s&&g.push(s);null==f&&null!=l&&g.push(l); -null==l&&null!=s&&s.geometry.setTerminalPoint(e,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};Graph.prototype.convertValueToString=function(a){return null!=a.value&&"object"==typeof a.value?this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")?this.getModel().getRoot().getAttribute(a.getAttribute("placeholder"))||"":a.value.getAttribute("label"):mxGraph.prototype.convertValueToString.apply(this,arguments)}; -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.getCellStyle=function(a){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return c}; -Graph.prototype.updateAlternateBounds=function(a,c,f){if(null!=a&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)}; -Graph.prototype.foldCells=function(a,c,f,d,b){c=null!=c?c:!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;ethis.view.scale?this.zoom((this.view.scale+0.01)/this.view.scale):this.zoom(Math.round(20*this.view.scale*this.zoomFactor)/20/this.view.scale)};Graph.prototype.zoomOut=function(){0.15>=this.view.scale?this.zoom((this.view.scale-0.01)/this.view.scale):this.zoom(Math.round(20*this.view.scale*(1/this.zoomFactor))/20/this.view.scale)}; -Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var f=a.value.getAttribute("tooltip");if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),c=this.sanitizeHtml(f);else{f=["label","tooltip","placeholders"];a=a.value.attributes;this.isEnabled()&&f.push("link");for(var d=0;dmxUtils.indexOf(f,a[d].nodeName)&&0r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:f?"UTC":(String(b).match(a)||[""]).pop().replace(e,""),o:(0d&&"%"==c.charAt(match.index-1))e=a.substring(1);else{var g=a.substring(1,a.length-1);if(0>g.indexOf("{"))for(var k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.value.getAttribute(g)),k=this.model.getParent(k);null==e&&(e=this.getGlobalVariable(g))}f.push(c.substring(d,match.index)+(e|| +a));d=match.index+a.length}}f.push(c.substring(d));return f.join("")};Graph.prototype.selectCellsForConnectVertex=function(b,c,f){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),null!=f&&(mxEvent.isTouchEvent(c)?f.update(f.getState(this.view.getState(b[1]))):f.reset()),this.scrollCellToVisible(b[1])):this.setSelectionCells(b)}; +Graph.prototype.connectVertex=function(b,c,f,d,a){var e=b.geometry.relative?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(b.geometry.x,b.geometry.y);c==mxConstants.DIRECTION_NORTH?(e.x+=b.geometry.width/2,e.y-=f):c==mxConstants.DIRECTION_SOUTH?(e.x+=b.geometry.width/2,e.y+=b.geometry.height+f):(e.x=c==mxConstants.DIRECTION_WEST?e.x-f:e.x+(b.geometry.width+f),e.y+=b.geometry.height/2);f=this.view.getState(this.model.getParent(b));var g=this.view.scale, +k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(f.cell)&&(l=f.x,k=f.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(e.x+=b.parent.geometry.x,e.y+=b.parent.geometry.y);f=mxEvent.isControlDown(d)&&!a?null:this.getCellAt(l+e.x*g,k+e.y*g);this.model.isAncestor(f,b)&&(f=null);for(g=f;null!=g;){if(this.isCellLocked(g)){f=null;break}g=this.model.getParent(g)}null!=f&&(g=this.view.getState(b),l=this.view.getState(f),null!=g&&null!=l&&mxUtils.intersects(g,l)&&(f=null));if(a=!mxEvent.isShiftDown(d)|| +a)c==mxConstants.DIRECTION_NORTH?e.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?e.y+=b.geometry.height/2:e.x=c==mxConstants.DIRECTION_WEST?e.x-b.geometry.width/2:e.x+b.geometry.width/2;null!=f&&!this.isCellConnectable(f)&&(g=this.getModel().getParent(f),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(f=g));if(f==b||this.model.isEdge(f)||!this.isCellConnectable(f))f=null;g=[];this.model.beginUpdate();try{l=f;if(null==l&&a){for(var k=b,m=this.getCellGeometry(b);null!=m&&m.relative;)k= +this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);m.x=e.x-m.width/2;m.y=e.y-m.height/2}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(b)));var s=mxEvent.isControlDown(d)&&a||null==f&&null!=m&&m.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(b), +null,"",b,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=b;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==s.parent&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==f&&null!=l&&null!=m&&(null!=b.parent&&m.constructor==mxStackLayout&&c==mxConstants.DIRECTION_WEST)&&(q=b.parent.getIndex(b),b.parent.insert(l,q));null!=s&&g.push(s);null==f&&null!=l&&g.push(l); +null==l&&null!=s&&s.geometry.setTerminalPoint(e,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};Graph.prototype.convertValueToString=function(b){return null!=b.value&&"object"==typeof b.value?this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")?this.getModel().getRoot().getAttribute(b.getAttribute("placeholder"))||"":b.value.getAttribute("label"):mxGraph.prototype.convertValueToString.apply(this,arguments)}; +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}; +Graph.prototype.getCellStyle=function(b){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);this.model.isVertex(f)&&this.isCellCollapsed(b)&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!f.horizontal))}return c}; +Graph.prototype.updateAlternateBounds=function(b,c,f){if(null!=b&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(b));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b){return mxEvent.isShiftDown(b)}; +Graph.prototype.foldCells=function(b,c,f,d,a){c=null!=c?c:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),b));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var e=0;ethis.view.scale?this.zoom((this.view.scale+0.01)/this.view.scale):this.zoom(Math.round(20*this.view.scale*this.zoomFactor)/20/this.view.scale)};Graph.prototype.zoomOut=function(){0.15>=this.view.scale?this.zoom((this.view.scale-0.01)/this.view.scale):this.zoom(Math.round(20*this.view.scale*(1/this.zoomFactor))/20/this.view.scale)}; +Graph.prototype.getTooltipForCell=function(b){var c="";if(mxUtils.isNode(b.value)){var f=b.value.getAttribute("tooltip");if(null!=f)null!=f&&this.isReplacePlaceholders(b)&&(f=this.replacePlaceholders(b,f)),c=this.sanitizeHtml(f);else{f=["label","tooltip","placeholders"];b=b.value.attributes;this.isEnabled()&&f.push("link");for(var d=0;dmxUtils.indexOf(f,b[d].nodeName)&&0this.activationDelay)if(this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==c||null==f||!mxUtils.contains(this.bbox,c,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()}else 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}; -(function(){var a=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,d,b){var e=a.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=b.state&&(e=b.state.view.graph.replacePlaceholders(b.state.cell,e));return e};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0, -8))try{var b=d.substring(8,d.length-1),e=mxUtils.parseXml(a.view.graph.decompress(b));return new mxShape(new mxStencil(e.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return c.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[]; -mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){c=mxStencilRegistry.libraries[f];if(null!=c){if(null==mxStencilRegistry.packages[f]){mxStencilRegistry.packages[f]=1;for(f=0;ff||e>f)&&this.clear()}}else"a"==a.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&(a.getState()==this.currentState||null==a.getState())&&g.intersects(this.currentState, -a.getGraphX(),a.getGraphY())||this.updateCurrentState(a)},mouseUp:function(b,e){var c=e.getSource(),k=this.currentLink;this.clear();if("a"!=c.nodeName.toLowerCase()&&!e.isConsumed()&&(null==e.getState()||!e.isSource(e.getState().control))&&(mxEvent.isLeftMouseButton(e.getEvent())||mxEvent.isTouchEvent(e.getEvent())))null!=k?(g.isBlankLink(k)?window.open(k):(null!=a&&a(e.getEvent()),"#"==k.charAt(0)?window!=window.top?window.open(g.baseUrl+k,"_top"):window.location.hash=k:window!=window.top?window.open(g.getAbsoluteUrl(k), -"_top"):window.location=k),e.consume()):null!=d&&!e.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)a&& -d[e].deleteCell(a)};Graph.prototype.pasteHtmlAtCaret=function(b){var a;if(window.getSelection){if(a=window.getSelection(),a.getRangeAt&&a.rangeCount){a=a.getRangeAt(0);a.deleteContents();var d=document.createElement("div");d.innerHTML=b;b=document.createDocumentFragment();for(var e;e=d.firstChild;)lastNode=b.appendChild(e);a.insertNode(b)}}else(a=document.selection)&&"Control"!=a.type&&a.createRange().pasteHTML(b)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!= -this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(b,a){this.popupMenuHandler.hideMenu()});var b=this.updateMouseEvent;this.updateMouseEvent=function(a){a=b.apply(this,arguments);if(mxEvent.isTouchEvent(a.getEvent())&&null==a.getState()){var d=this.getCellAt(a.graphX,a.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,a.graphX,a.graphY)||(a.state=this.view.getState(d),null!=a.state&&null!=a.state.shape&&(this.container.style.cursor=a.state.shape.node.style.cursor))}null== -a.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return a};var a=!1,d=!1,e=!1,c=this.fireMouseEvent;this.fireMouseEvent=function(b,f,g){b==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),a=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),e=this.popupMenuHandler.isMenuShowing());c.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(b,c){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==c.getState()||!c.isSource(c.getState().control))&& -(this.popupMenuHandler.popupTrigger||!e&&!mxEvent.isMouseEvent(c.getEvent())&&(d&&null==c.getCell()&&this.isSelectionEmpty()||a&&this.isCellSelected(c.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var b= -[],a=0,d=sel.rangeCount;athis.activationDelay)if(this.currentState!=b&&(d>this.updateDelay&&null!=b||null==this.bbox||null==c||null==f||!mxUtils.contains(this.bbox,c,f)))null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!= +b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset()}else this.reset()};HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b}; +(function(){var b=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,d,a){var e=b.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=a.state&&(e=a.state.view.graph.replacePlaceholders(a.state.cell,e));return e};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0, +8))try{var a=d.substring(8,d.length-1),e=mxUtils.parseXml(b.view.graph.decompress(a));return new mxShape(new mxStencil(e.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return c.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[]; +mxStencilRegistry.getStencil=function(b){var c=mxStencilRegistry.stencils[b];if(null==c&&null==mxCellRenderer.prototype.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(b);if(null!=f){c=mxStencilRegistry.libraries[f];if(null!=c){if(null==mxStencilRegistry.packages[f]){mxStencilRegistry.packages[f]=1;for(f=0;ff||e>f)&&this.clear()}}else"a"==b.getSource().nodeName.toLowerCase()?this.clear():null!=this.currentState&&(b.getState()==this.currentState||null==b.getState())&&g.intersects(this.currentState, +b.getGraphX(),b.getGraphY())||this.updateCurrentState(b)},mouseUp:function(a,e){var c=e.getSource(),k=this.currentLink;this.clear();if("a"!=c.nodeName.toLowerCase()&&!e.isConsumed()&&(null==e.getState()||!e.isSource(e.getState().control))&&(mxEvent.isLeftMouseButton(e.getEvent())||mxEvent.isTouchEvent(e.getEvent())))null!=k?(g.isBlankLink(k)?window.open(k):(null!=b&&b(e.getEvent()),"#"==k.charAt(0)?window!=window.top?window.open(g.baseUrl+k,"_top"):window.location.hash=k:window!=window.top?window.open(g.getAbsoluteUrl(k), +"_top"):window.location=k),e.consume()):null!=d&&!e.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)b&& +d[e].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var d=document.createElement("div");d.innerHTML=a;a=document.createDocumentFragment();for(var e;e=d.firstChild;)lastNode=a.appendChild(e);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!= +this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var d=this.getCellAt(b.graphX,b.graphY);null!=d&&this.isSwimlane(d)&&this.hitsSwimlaneContent(d,b.graphX,b.graphY)||(b.state=this.view.getState(d),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null== +b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,d=!1,e=!1,c=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),d=this.isSelectionEmpty(),e=this.popupMenuHandler.isMenuShowing());c.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,c){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==c.getState()||!c.isSource(c.getState().control))&& +(this.popupMenuHandler.popupTrigger||!e&&!mxEvent.isMouseEvent(c.getEvent())&&(d&&null==c.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(c.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a= +[],b=0,d=sel.rangeCount;bl||Math.abs(k)>l)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c, -f),this.isSpaceEvent(a)?(c=this.x+this.width,f=this.y+this.height,g=this.graph.view.scale,mxEvent.isAltDown(a.getEvent())||(this.width=this.graph.snap(this.width/g)*g,this.height=this.graph.snap(this.height/g)*g,this.xl||Math.abs(k)>l)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c, +f),this.isSpaceEvent(b)?(c=this.x+this.width,f=this.y+this.height,g=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/g)*g,this.height=this.graph.snap(this.height/g)*g,this.x=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==b)?this.graph.getConnectionConstraint(this.state,e,d):null,d=null!=(null!=c?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),c):null)?this.fixedHandleImage:null!=c&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0, -0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&(d-=1);return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?u:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var E=mxGraphHandler.prototype.getBoundingBox; -mxGraphHandler.prototype.getBoundingBox=function(b){if(null!=b&&1==b.length){var a=this.graph.getModel(),d=a.getParent(b[0]),e=this.graph.getCellGeometry(b[0]);if(a.isEdge(d)&&null!=e&&e.relative&&(a=this.graph.view.getState(b[0]),null!=a&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox))return mxRectangle.fromRectangle(a.text.boundingBox)}return E.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(b){var a= -this.graph.getModel(),d=a.getParent(b.cell),e=this.graph.getCellGeometry(b.cell);return a.isEdge(d)&&null!=e&&e.relative&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox?(a=b.text.unrotatedBoundingBox||b.text.boundingBox,new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))):F.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(b,a){var d=this.graph.getModel(),e=d.getParent(this.state.cell), -c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(a)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,e,d):null,d=null!=(null!=c?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(d),c):null)?this.fixedHandleImage:null!=c&&null!=e?this.terminalHandleImage:this.handleImage;if(null!=d)return d=new mxImageShape(new mxRectangle(0, +0,d.width,d.height),d.src),d.preserveImageAspect=!1,d;d=mxConstants.HANDLE_SIZE;this.preferHtml&&(d-=1);return new mxRectangleShape(new mxRectangle(0,0,d,d),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var B=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,d){this.handleImage=b==mxEvent.ROTATION_HANDLE?u:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return B.apply(this,arguments)};var E=mxGraphHandler.prototype.getBoundingBox; +mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),d=b.getParent(a[0]),e=this.graph.getCellGeometry(a[0]);if(b.isEdge(d)&&null!=e&&e.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return E.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b= +this.graph.getModel(),d=b.getParent(a.cell),e=this.graph.getCellGeometry(a.cell);return b.isEdge(d)&&null!=e&&e.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):F.apply(this,arguments)};var G=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var d=this.graph.getModel(),e=d.getParent(this.state.cell), +c=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!d.isEdge(e)||null==c||!c.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()c)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(c/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=function(b){return"number"===typeof b?b?0>b?-1:1:b===b?0:NaN:NaN}, -l=k(b-this.lastX)*d/f,k=k(a-this.lastY)*e/f,d=d/c,e=e/c,c=0;cc)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(c/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN}, +l=k(a-this.lastX)*d/f,k=k(b-this.lastY)*e/f,d=d/c,e=e/c,c=0;c/g,"\n"));else{var e=d.convertValueToString(b.cell);"0"!=mxUtils.getValue(b.style,"nl2Br","1")&&(e=e.replace(/\n/g,"\x3cbr/\x3e"));d.cellLabelChanged(b.cell,d.sanitizeHtml(e))}d.setCellStyles("html",a);c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!= -a?a:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var b=d.getView().getState(d.getSelectionCell()),a="wrap";d.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(a=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,a)});this.addAction("rotation",function(){var b="0",a=d.getView().getState(d.getSelectionCell());null!=a&&(b=a.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(c,b,mxResources.get("apply"),function(b){null!= -b&&0/g,"\n"));else{var e=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(e=e.replace(/\n/g,"\x3cbr/\x3e"));d.cellLabelChanged(a.cell,d.sanitizeHtml(e))}d.setCellStyles("html",b);c.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!= +b?b:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",function(){var a="0",b=d.getView().getState(d.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(c,a,mxResources.get("apply"),function(a){null!= +a&&0document.documentMode)?b.style.filter=a?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'#c5ecff', EndColorStr\x3d'#87d4fb', GradientType\x3d0)":"":b.style.backgroundImage=a?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,d=f.editor.graph,b=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";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";mxClient.IS_QUIRKS&&(e.style.display="block");if(d.cellEditor.isContentEditing()){var g=e.cloneNode(),k=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",g);k.style.color="rgb(112, 112, 112)";k.style.whiteSpace="nowrap";k.style.overflow= -"hidden";k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";k=k.getElementsByTagName("div")[0];k.style.cssFloat="right";a.appendChild(g)}a.appendChild(e);g=this.createPanel();g.style.marginTop="8px";g.style.borderTop="1px solid #c0c0c0";g.style.paddingTop="6px";g.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e);l.style.color="rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden"; +TextFormatPanel.prototype.addFont=function(b){function c(a,b){mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter=b?"progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'#c5ecff', EndColorStr\x3d'#87d4fb', GradientType\x3d0)":"":a.style.backgroundImage=b?"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,d=f.editor.graph,a=this.format.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="18px";e.style.paddingTop="10px"; +e.style.paddingBottom="6px";b.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";mxClient.IS_QUIRKS&&(e.style.display="block");if(d.cellEditor.isContentEditing()){var g=e.cloneNode(),k=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",g);k.style.color="rgb(112, 112, 112)";k.style.whiteSpace="nowrap";k.style.overflow= +"hidden";k.style.margin="0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";k=k.getElementsByTagName("div")[0];k.style.cssFloat="right";b.appendChild(g)}b.appendChild(e);g=this.createPanel();g.style.marginTop="8px";g.style.borderTop="1px solid #c0c0c0";g.style.paddingTop="6px";g.style.paddingBottom="6px";var l=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e);l.style.color="rgb(112, 112, 112)";l.style.whiteSpace="nowrap";l.style.overflow="hidden"; l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";k=e.cloneNode(!1);k.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold","italic","underline"],k,!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 n=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(k);this.styleButtons(m);this.styleButtons([n]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT]),p), +")");var n=this.editorUi.toolbar.addItems(["vertical"],k,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(b);b.appendChild(k);this.styleButtons(m);this.styleButtons([n]);var p=e.cloneNode(!1);p.style.marginLeft="-3px";p.style.paddingBottom="0px";var r=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT]),p), s=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),p),q=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT]),p);this.styleButtons([r,s,q]);if(d.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},k);this.styleButtons([t])}var u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),v=this.editorUi.toolbar.addButton("geSprite-middle", -mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([u,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var y,x,D,A,B,E,F;d.cellEditor.isContentEditing()?(u.style.display="none",v.style.display="none", +mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),z=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([u,v,z]);mxClient.IS_QUIRKS&&mxUtils.br(b);b.appendChild(p);var y,x,D,A,B,E,F;d.cellEditor.isContentEditing()?(u.style.display="none",v.style.display="none", z.style.display="none",n.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([D,y=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" (Ctrl+,)",function(){document.execCommand("subscript",!1,null)},p),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" (Ctrl+.)",function(){document.execCommand("superscript",!1,null)},p)]), D.style.marginRight="9px",t=p.cloneNode(!1),t.style.paddingTop="4px",p=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent", -!1,null)},t),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},t)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),t.style.height="40"),a.appendChild(t)):(m[2].style.marginRight="9px",q.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px"; +!1,null)},t),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},t)],this.styleButtons(p),p[p.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(b),t.style.height="40"),b.appendChild(t)):(m[2].style.marginRight="9px",q.style.marginRight="9px");p=e.cloneNode(!1);p.style.marginLeft="0px"; p.style.paddingTop="8px";p.style.paddingBottom="4px";p.style.fontWeight="normal";mxUtils.write(p,mxResources.get("position"));var G=document.createElement("select");G.style.position="absolute";G.style.right="20px";G.style.width="97px";G.style.marginTop="-2px";for(var H="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),I={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]},t=0;te.div.clientHeight&&(e.div.style.width="40px"); -e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}g=!0;mxEvent.consume(k)}));mxEvent.addListener(a,"mousedown",mxUtils.bind(this,function(b){g=this.currentElt!=a;null!=document.documentMode&&9<=document.documentMode&&b.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)}; -function Dialog(a,c,f,d,b,e,g){var k=0;if(mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode))k=80;f+=k;d+=k;var l=Math.max(0,Math.round((document.body.scrollWidth-f)/2)),m=Math.max(0,Math.round((Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)-d-a.footerHeight)/3));0e.div.clientHeight&&(e.div.style.width="40px"); +e.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}g=!0;mxEvent.consume(k)}));mxEvent.addListener(b,"mousedown",mxUtils.bind(this,function(a){g=this.currentElt!=b;null!=document.documentMode&&9<=document.documentMode&&a.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)}; +function Dialog(b,c,f,d,a,e,g){var k=0;if(mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode))k=80;f+=k;d+=k;var l=Math.max(0,Math.round((document.body.scrollWidth-f)/2)),m=Math.max(0,Math.round((Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)-d-b.footerHeight)/3));0document.documentMode)?20:0;a.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog= -function(a,c,f,d){function b(b,a,d){a=null!=a?a:12;var c=document.createElement("table");c.style.borderCollapse="collapse";c.setAttribute("cellspacing","0");c.style.marginBottom="20px";c.style.cellSpacing="0px";var f=document.createElement("tbody");c.appendChild(f);for(var k=b.length/a,m=0;mc&&ColorDialog.recentColors.pop())}; -var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");c.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");c.appendChild(f);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);f=document.createElement("a");f.setAttribute("href", -"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";c.appendChild(f);this.container=c},PageSetupDialog=function(a){function c(){null==D||D==mxConstants.NONE?(x.style.backgroundColor="",x.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(x.style.backgroundColor=D,x.style.backgroundImage="")}function f(){null== -E?(B.removeAttribute("title"),B.style.fontSize="",B.innerHTML=mxResources.get("change")+"..."):(B.setAttribute("title",E.src),B.style.fontSize="11px",B.innerHTML=E.src.substring(0,42)+"...")}var d=a.editor.graph,b,e,g=document.createElement("table");g.style.width="100%";g.style.height="100%";var k=document.createElement("tbody");b=document.createElement("tr");e=document.createElement("td");e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");b.appendChild(e);var l=document.createElement("input"); +Dialog.prototype.bgOpacity=80;Dialog.prototype.close=function(b){null!=this.onDialogClose&&(this.onDialogClose(b),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);this.container.parentNode.removeChild(this.container)}; +var OpenDialog=function(){var b=document.createElement("iframe");b.style.backgroundColor="transparent";b.allowTransparency="true";b.style.borderStyle="none";b.style.borderWidth="0px";b.style.overflow="hidden";b.frameBorder="0";var c=mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)?20:0;b.setAttribute("width",(Editor.useLocalStorage?640:320)+c+"px");b.setAttribute("height",(Editor.useLocalStorage?480:220)+c+"px");b.setAttribute("src",OPEN_FORM);this.container=b},ColorDialog= +function(b,c,f,d){function a(a,b,d){b=null!=b?b:12;var c=document.createElement("table");c.style.borderCollapse="collapse";c.setAttribute("cellspacing","0");c.style.marginBottom="20px";c.style.cellSpacing="0px";var f=document.createElement("tbody");c.appendChild(f);for(var k=a.length/b,m=0;mc&&ColorDialog.recentColors.pop())}; +var AboutDialog=function(b){var c=document.createElement("div");c.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");c.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");c.appendChild(f);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);f=document.createElement("a");f.setAttribute("href", +"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");c.appendChild(f);mxUtils.br(c);mxUtils.br(c);f=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});f.className="geBtn gePrimaryBtn";c.appendChild(f);this.container=c},PageSetupDialog=function(b){function c(){null==D||D==mxConstants.NONE?(x.style.backgroundColor="",x.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(x.style.backgroundColor=D,x.style.backgroundImage="")}function f(){null== +E?(B.removeAttribute("title"),B.style.fontSize="",B.innerHTML=mxResources.get("change")+"..."):(B.setAttribute("title",E.src),B.style.fontSize="11px",B.innerHTML=E.src.substring(0,42)+"...")}var d=b.editor.graph,a,e,g=document.createElement("table");g.style.width="100%";g.style.height="100%";var k=document.createElement("tbody");a=document.createElement("tr");e=document.createElement("td");e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");a.appendChild(e);var l=document.createElement("input"); l.setAttribute("name","format");l.setAttribute("type","radio");l.setAttribute("value","portrait");var m=document.createElement("input");m.setAttribute("name","format");m.setAttribute("type","radio");m.setAttribute("value","landscape");var n=document.createElement("tr");n.style.display="none";var p=document.createElement("tr");p.style.display="none";var r=document.createElement("select");e=!1;for(var s={},q=PageSetupDialog.getFormats(),t=0;tMAX_AREA||0>=t.value?"red":"";u.style.backgroundColor=t.value*u.value>MAX_AREA||0>=u.value?"red":""}function d(){var a=Math.max(0,parseInt(v.value))+1,d=parseInt(t.value)/k,e=null;""!=s.value&&s.value!=mxConstants.NONE&&!q.checked&&(e=s.value);return b.getSvg(e, -d,a)}var b=a.editor.graph,e=b.getGraphBounds(),g=b.view.scale,k=Math.ceil(e.width/g),l=Math.ceil(e.height/g),m,g=document.createElement("table"),n=document.createElement("tbody"),e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");e.appendChild(m);var p=document.createElement("input");p.setAttribute("value",a.editor.getOrCreateFilename());p.style.width="180px";m=document.createElement("td");m.appendChild(p); +function(){b.hideDialog();null!=a&&a()});c.className="geBtn";b.editor.cancelFirst&&p.appendChild(c);null!=l&&l(p);null!=d&&(l=mxUtils.button(mxResources.get("apply"),function(){m||b.hideDialog();d(q.value)}),l.className="geBtn gePrimaryBtn",p.appendChild(l));b.editor.cancelFirst||p.appendChild(c);n.appendChild(p);s.appendChild(n);r.appendChild(s);this.container=r},EditDiagramDialog=function(b){var c=document.createElement("div");c.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap", +"off");f.style.overflow="auto";f.style.resize="none";f.style.width="600px";f.style.height="370px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(b.editor.getGraphXml());c.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),f.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0MAX_AREA||0>=t.value?"red":"";u.style.backgroundColor=t.value*u.value>MAX_AREA||0>=u.value?"red":""}function d(){var b=Math.max(0,parseInt(v.value))+1,d=parseInt(t.value)/k,e=null;""!=s.value&&s.value!=mxConstants.NONE&&!q.checked&&(e=s.value);return a.getSvg(e, +d,b)}var a=b.editor.graph,e=a.getGraphBounds(),g=a.view.scale,k=Math.ceil(e.width/g),l=Math.ceil(e.height/g),m,g=document.createElement("table"),n=document.createElement("tbody"),e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");e.appendChild(m);var p=document.createElement("input");p.setAttribute("value",b.editor.getOrCreateFilename());p.style.width="180px";m=document.createElement("td");m.appendChild(p); e.appendChild(m);n.appendChild(e);e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");e.appendChild(m);var r=document.createElement("select");r.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));r.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")), r.appendChild(m));m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));r.appendChild(m);m=document.createElement("option");m.setAttribute("value","pdf");mxUtils.write(m,mxResources.get("formatPdf"));r.appendChild(m);m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));r.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m, -mxResources.get("formatXml")),r.appendChild(m));m=document.createElement("td");m.appendChild(r);e.appendChild(m);n.appendChild(e);e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("backgroundColor")+":");e.appendChild(m);var s=document.createElement("input");s.setAttribute("value",null==b.background||b.background==mxConstants.NONE?"#ffffff":b.background);s.style.width="80px";var q=document.createElement("input");q.setAttribute("type", -"checkbox");q.checked=null==b.background||b.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(s);m.appendChild(q);mxUtils.write(m,mxResources.get("transparent"));e.appendChild(m);n.appendChild(e);e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");e.appendChild(m);var t=document.createElement("input");t.setAttribute("value",k);t.style.width="180px";m=document.createElement("td");m.appendChild(t); +mxResources.get("formatXml")),r.appendChild(m));m=document.createElement("td");m.appendChild(r);e.appendChild(m);n.appendChild(e);e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("backgroundColor")+":");e.appendChild(m);var s=document.createElement("input");s.setAttribute("value",null==a.background||a.background==mxConstants.NONE?"#ffffff":a.background);s.style.width="80px";var q=document.createElement("input");q.setAttribute("type", +"checkbox");q.checked=null==a.background||a.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(s);m.appendChild(q);mxUtils.write(m,mxResources.get("transparent"));e.appendChild(m);n.appendChild(e);e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");e.appendChild(m);var t=document.createElement("input");t.setAttribute("value",k);t.style.width="180px";m=document.createElement("td");m.appendChild(t); e.appendChild(m);n.appendChild(e);e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");e.appendChild(m);var u=document.createElement("input");u.setAttribute("value",l);u.style.width="180px";m=document.createElement("td");m.appendChild(u);e.appendChild(m);n.appendChild(e);e=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");e.appendChild(m); var v=document.createElement("input");v.setAttribute("value",k);v.style.width="180px";v.value="0";m=document.createElement("td");m.appendChild(v);e.appendChild(m);n.appendChild(e);g.appendChild(n);mxEvent.addListener(r,"change",c);c();mxEvent.addListener(t,"change",function(){u.value=0=parseInt(t.value)&&0>=parseInt(u.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var e=r.value,c=p.value;if("xml"==e)a.hideDialog(),ExportDialog.saveLocalFile(mxUtils.getXml(a.editor.getGraphXml()),c,e);else if("svg"==e){var f=mxUtils.getXml(d());f.length=parseInt(t.value)&&0>=parseInt(u.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var e=r.value,c=p.value;if("xml"==e)b.hideDialog(),ExportDialog.saveLocalFile(mxUtils.getXml(b.editor.getGraphXml()),c,e);else if("svg"==e){var f=mxUtils.getXml(d());f.lengthb&&(d=Math.max(0,b-this.window.table.clientWidth));e+this.window.table.clientHeight>a&&(e=Math.max(0,a-this.window.table.clientHeight));(this.window.getX()!=d||this.window.getY()!=e)&&this.window.setLocation(d,e)}));var l=a.createOutline(this.window);this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,function(){l.update(!1);l.outline.sizeDidChange()}));this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){l.suspended= -!1;l.outline.refresh();l.update()}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){l.suspended=!0}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){l.suspended=!1;l.update()}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){l.suspended=!0}));var m=l.createGraph;l.createGraph=function(b){var a=m.apply(this,arguments);a.gridEnabled=!1;a.pageScale=g.pageScale;a.pageFormat=g.pageFormat;a.background=g.background;a.pageVisible=g.pageVisible; -var d=mxUtils.getCurrentStyle(g.container);k.style.backgroundColor=d.backgroundColor;return a};l.init(k);a.editor.addListener("resetGraphView",e);a.addListener("pageFormatChanged",e);a.addListener("backgroundColorChanged",e);a.addListener("backgroundImageChanged",e);a.addListener("pageViewChanged",function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var n=a.actions.get("zoomIn"),p=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(b,a){for(var d=!1,e=mxEvent.getSource(b);null!= -e;){if(e==l.outline.view.canvas.ownerSVGElement){d=!0;break}e=e.parentNode}d&&(a?n.funct():p.funct(),mxEvent.consume(b))})}},LayersWindow=function(a,c,f,d,b){function e(b){if(k.isEnabled()&&null!=b){var d=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&k.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(d.container,300,100,!0,!0);d.init()}}function g(){function b(a,d,c,f){var l=document.createElement("div"); -l.className="geToolbarContainer";l.style.overflow="hidden";l.style.position="relative";l.style.padding="4px";l.style.height="22px";l.style.display="block";l.style.backgroundColor="whiteSmoke";l.style.borderWidth="0px 0px 1px 0px";l.style.borderColor="#c3c3c3";l.style.borderStyle="solid";l.style.whiteSpace="nowrap";var m=document.createElement("div");m.style.display="inline-block";m.style.width="100%";m.style.textOverflow="ellipsis";m.style.overflow="hidden";mxEvent.addListener(l,"dragover",function(b){b.dataTransfer.dropEffect= -"move";r=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(l,"dragstart",function(b){p=l;mxClient.IS_FF&&b.dataTransfer.setData("Text","\x3clayer/\x3e")});mxEvent.addListener(l,"dragend",function(b){null!=p&&(k.addCell(c,k.model.root,r),r=p=null);b.stopPropagation();b.preventDefault()});var t=document.createElement("img");t.setAttribute("draggable","false");t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.padding="4px";t.setAttribute("title", -mxResources.get("lockUnlock"));var u=k.view.getState(c),v=null!=u?u.style:k.getCellStyle(c);"1"==mxUtils.getValue(v,"locked","0")?t.setAttribute("src",Dialog.prototype.lockedImage):t.setAttribute("src",Dialog.prototype.unlockedImage);mxEvent.addListener(t,"click",function(b){if(k.isEnabled()){var a=null;k.getModel().beginUpdate();try{a="1"==mxUtils.getValue(v,"locked","0")?null:"1",k.setCellStyles("locked",a,[c])}finally{k.getModel().endUpdate()}"1"==a&&k.removeSelectionCells(k.getModel().getDescendants(c)); -mxEvent.consume(b)}});m.appendChild(t);t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));t.style.marginLeft="4px";t.style.marginRight="6px";t.style.marginTop="4px";m.appendChild(t);k.isEnabled()||t.setAttribute("disabled","disabled");k.model.isVisible(c)&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);mxEvent.addListener(t,"click",function(b){k.isEnabled()&&(k.model.setVisible(c, -!k.model.isVisible(c)),mxEvent.consume(b))});mxUtils.write(m,d);l.appendChild(m);if(k.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)d=document.createElement("div"),d.style.display="block",d.style.textAlign="right",d.style.whiteSpace="nowrap",d.style.position="absolute",d.style.right="6px",d.style.top="6px",0a&&(d=Math.max(0,a-this.window.table.clientWidth));e+this.window.table.clientHeight>b&&(e=Math.max(0,b-this.window.table.clientHeight));(this.window.getX()!=d||this.window.getY()!=e)&&this.window.setLocation(d,e)}));var l=b.createOutline(this.window);this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,function(){l.update(!1);l.outline.sizeDidChange()}));this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){l.suspended= +!1;l.outline.refresh();l.update()}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){l.suspended=!0}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){l.suspended=!1;l.update()}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){l.suspended=!0}));var m=l.createGraph;l.createGraph=function(a){var b=m.apply(this,arguments);b.gridEnabled=!1;b.pageScale=g.pageScale;b.pageFormat=g.pageFormat;b.background=g.background;b.pageVisible=g.pageVisible; +var d=mxUtils.getCurrentStyle(g.container);k.style.backgroundColor=d.backgroundColor;return b};l.init(k);b.editor.addListener("resetGraphView",e);b.addListener("pageFormatChanged",e);b.addListener("backgroundColorChanged",e);b.addListener("backgroundImageChanged",e);b.addListener("pageViewChanged",function(){e();l.update(!0)});if(l.outline.dialect==mxConstants.DIALECT_SVG){var n=b.actions.get("zoomIn"),p=b.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var d=!1,e=mxEvent.getSource(a);null!= +e;){if(e==l.outline.view.canvas.ownerSVGElement){d=!0;break}e=e.parentNode}d&&(b?n.funct():p.funct(),mxEvent.consume(a))})}},LayersWindow=function(b,c,f,d,a){function e(a){if(k.isEnabled()&&null!=a){var d=new FilenameDialog(b,a.value||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&k.getModel().setValue(a,b)}),mxResources.get("enterName"));b.showDialog(d.container,300,100,!0,!0);d.init()}}function g(){function a(b,d,c,f){var l=document.createElement("div"); +l.className="geToolbarContainer";l.style.overflow="hidden";l.style.position="relative";l.style.padding="4px";l.style.height="22px";l.style.display="block";l.style.backgroundColor="whiteSmoke";l.style.borderWidth="0px 0px 1px 0px";l.style.borderColor="#c3c3c3";l.style.borderStyle="solid";l.style.whiteSpace="nowrap";var m=document.createElement("div");m.style.display="inline-block";m.style.width="100%";m.style.textOverflow="ellipsis";m.style.overflow="hidden";mxEvent.addListener(l,"dragover",function(a){a.dataTransfer.dropEffect= +"move";r=b;a.stopPropagation();a.preventDefault()});mxEvent.addListener(l,"dragstart",function(a){p=l;mxClient.IS_FF&&a.dataTransfer.setData("Text","\x3clayer/\x3e")});mxEvent.addListener(l,"dragend",function(a){null!=p&&(k.addCell(c,k.model.root,r),r=p=null);a.stopPropagation();a.preventDefault()});var t=document.createElement("img");t.setAttribute("draggable","false");t.setAttribute("align","top");t.setAttribute("border","0");t.style.cursor="pointer";t.style.padding="4px";t.setAttribute("title", +mxResources.get("lockUnlock"));var u=k.view.getState(c),v=null!=u?u.style:k.getCellStyle(c);"1"==mxUtils.getValue(v,"locked","0")?t.setAttribute("src",Dialog.prototype.lockedImage):t.setAttribute("src",Dialog.prototype.unlockedImage);mxEvent.addListener(t,"click",function(a){if(k.isEnabled()){var b=null;k.getModel().beginUpdate();try{b="1"==mxUtils.getValue(v,"locked","0")?null:"1",k.setCellStyles("locked",b,[c])}finally{k.getModel().endUpdate()}"1"==b&&k.removeSelectionCells(k.getModel().getDescendants(c)); +mxEvent.consume(a)}});m.appendChild(t);t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));t.style.marginLeft="4px";t.style.marginRight="6px";t.style.marginTop="4px";m.appendChild(t);k.isEnabled()||t.setAttribute("disabled","disabled");k.model.isVisible(c)&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);mxEvent.addListener(t,"click",function(a){k.isEnabled()&&(k.model.setVisible(c, +!k.model.isVisible(c)),mxEvent.consume(a))});mxUtils.write(m,d);l.appendChild(m);if(k.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)d=document.createElement("div"),d.style.display="block",d.style.textAlign="right",d.style.whiteSpace="nowrap",d.style.position="absolute",d.style.right="6px",d.style.top="6px",0b&&(d=Math.max(0,b-this.window.table.clientWidth));e+this.window.table.clientHeight>a&&(e=Math.max(0,a-this.window.table.clientHeight)); +mxEvent.addListener(u,"click",function(a){if(k.isEnabled()){k.model.beginUpdate();try{var b=k.model.root.getIndex(q);k.removeCells([q],!1);0==k.model.getChildCount(k.model.root)?(k.model.add(k.model.root,new mxCell),k.setDefaultParent(null)):0a&&(d=Math.max(0,a-this.window.table.clientWidth));e+this.window.table.clientHeight>b&&(e=Math.max(0,b-this.window.table.clientHeight)); (this.window.getX()!=d||this.window.getY()!=e)&&this.window.setLocation(d,e)}))}; (function(){Sidebar.prototype.tagIndex="vX3ZcttI0vXTTPz/XIihlrvb31xqt2YsWy3K9tw5QBISMSIBNhbL6qefczKrsJBYCosmgkGCJPJUoZasrNxq+/M69nbrmRfH0Uvyt+N/yAU+D16n1VtnZ36Y/u3k+KP/yI9TQ+aFTxt/hYs0i0NXjPvgaT0a5MuuhJDt2mH2Mc69zSbKCHMRZYuNX4JKXyJ8e/FeXRqlwPkj81YllMcoi3vArP0fcRSW6MMoXa7lYZLgKfQ2+CvobprzIF5mG48lW6AlftoE4ZNLNf6ZbXdHKMZSnxz/gvtif7fhUyy85TObOlxF8qt8uEOdDIUyI84L2b6VXo/idB09RWwex7HzyTTryfFcmrVcRbSV6QaHphrV3fONH658EuzNpuQ5CENChHZaJptg6wr2ICP3G+pQg7jScd4M3Yz7LVhxgjx4AafXuNo+xEGl4dJ17BPcseUOH/Hk+EMUB39FYSqjYF3+Mgjuqx+nwVLofxSXLVB/ZbE/O10u/SQB+TkKjyOSJP4yi4OUz/Xs8/3ghyasLI22XhrISPTwBR9PPmb18T825JyhTudlxPfHjZesW4DmqD+7Xe82MO2Pwnc2yAaPzxqAobBXwZKCRzSHqZgTxrmHObVXb1vjlZd6Cy/h36tFN9StFz/76W7jLUmxlW/CSoiZrCOuAN0o84t/8fboMX3x5IeV/8PfRLutLirPATGTZey/rOIA/e/6oPNsAapgZxpniVWBzHvnh8vgcPw0gHzzF0mQ8vEWWFfYXZtowa+t1Gdgplj/UAc//hFI69ji8SmMNkmj3YsH1scZF2zLkPtgQXqWLdm0HMoy7+fgbYK60D+6J8NZ8NeDt3kuqkRBw9api/ick07GmTwJFgd0TSCTcOXLirgKdhtMELZP5sVemIKDcIgt/VBG086Pt9KPh9hSh0pLOU+LPVoz1x+DpyzWKXFyfAUGKax2mcl4Ijzv6AmNqzv0qffEK4O5iH66tJ322GE9ugm3uyyV4b6NwiCNeLUKEky3Q758QIsekNlz4W84Z8hNP/mQo2KOPdvvdtqXWUEz6EUDc2i8P452Z2ijmlErLbczDdoBc4lHiXdxIAUvsmCz0oousiQIyeA76Pu3vFCodNSD6jpIP2QL+7RoZI9U0TKN9OrJjP8m+g8XNyEES0jhzXy4ntD3NumaY2KNOSNDfO0Lj8F3/ONATF6uY0zb1gIZQberAq+Y3lymuY/wl5EZb7deiO7lqHXlMx+9HbiizNF87HfR3GII6CjaQhjCh28/Q1lF9sbXPnW00OGxW0chP9MoE5bsQlXhpUnOv1qg9nGyTRqQOXgYJbJDyNI1WWu+opfkE7Nu7LyVuWrBfZ3/8ZGTvxhGyZ/CrZvH1R4EpPJCsoBAh5HNIa1bq+5e2SN/iHbBUuSWqvxSC7gH9RmDCzgYl2jv1yT1t7i42WqfR2z6tReTVYM3yqBf7Q21Pby76MWP52sfq/kQtnx/cSfDfIsnlDr1h5hzv5OhKYql30oFHXSUZoYVidEp5cW6zXO5X5e9s4zL6h+Zn8kw/5MXAwDu/bply4lUBg8vdLtZFutYI3AMGVtJVdxrL2J/ejgtaHtUqIr8oKKiwahndY1A89eQdd+fl4n+HPvL16V0dSvQvb/Dtls59z5SaYw86qhpgkrB8kVmffBkHrmLYXMwL52OKLtSRhvFPNjudBvkuDo8EJwPsrVM24lZfwmxVwZPfQxkp2xkkc+L//hLgmWP3Mt5m8DvHDVfwOPJYLKtx3t3fqQPoF+9H2j6clvtUX/9cGF5VQ2Tqr9fBwk/DG9Tanc2/jVAp4qq6hbbPshL3EKT83aIlJ0wYEK+B/0OAR/zqzpUKa4TtxBOw/yqq4W+nV6cX11L63hPYZRg3SSb6M8d7Sbv5PjaD/1Y2Ind5zVV5xCCMzGSouv3iG1EZGTOVKiOyFu2NJ2iOl/dKaXIVtInIcVAC5azX7kDigLZU5BVWAVbfXXLlL8fUiZB086pTPh/h4S+kY+7SM+8EP2oO5wmNWv5fuyXtCWjrZ+i/xv1SxWiOJLdx26DZQrzv35KlykuDpgxFDgiMnqUoNtIr9q3arU0kO1F2sq3ARuI5oLxfCgVlwlvI1lCQ8fW/kSN3fx1uxAd22MUL4IVWK4D5edCW4x1B3pImgtEaXkguNfSz7doRjIZEcewsxceudvVbpArhGYIY2/M5pdR1kWSEX0lPA3v0hFdNA+BSFt2PyafVJN10X3zpF5m9C7saG6l+bdRKolYHS599kXIta2uQwraKEqTFJez7krW0902bru2+dasHSHrva4ahN2WN5QUAbs4Ep0vV6KVtEAT3eyUwsCHiKzetZlJBpFUCwMThQhfiEttok+J/mOkPWStQk3Wvhoqo28tsbW8xqK/X8vDNGJgO65LranwmuJ0Z33zPYehMgwLgphuz1s5lwDk0ryTXFmiFHGrqG7f0bH0FuipVPScesnR+WcWqGK5sWxLNzs/o7Ut7y2ob06OF7HvaRfoirHTJdgJ5+T45y/H06CdNNWKltJ+OG216on2rrFWYlHqh4R6/TYV3K9NFTMiTB+glnr1QLs91/b/DW+/vzvlI99xTAdhYGXpHk/ugv+rC379EzTC//5Oyjh+s/qXC5j2ASLqOv9Ss/NLQDOMfYT8Hyyn+k+fetfhas3H43L3KrxEuvXXYzRLfSs4MLcqIB/+ZCq0dydaxwnw7mIsN0ujRAT4YMB7PwlWuvydZ3FsbSNmZTphB8XL9uXQEUs62xlrnsViUqo86C+EaFoR3GHkqZpYuDuMzIpmlusOJC3TyCNrcR5oNtTdwa/H2y0Hlq5Wi1p9aSfGBBDkSuNhfpvgabixPvltPM77nhh+wOUUw74wy2H75ONPo3rdeRQOD929lPxxE0UxdEP8HxqiZnvC3u1wMiNXNc5hqKgYcR/hYhSYBcERYY7dsyA00zaQR9HzUtVufUnP114g61NfOii3hcfBJ0KtS25UqheFTwVN8r3a6Pz+gUL314oOr6TXq6lHDcqFD6GdytZYNyh2d9SrKlUQNcgOA4qxY7OWyEQ2AnA1WcWqb2uAqsG53PjYbkg7+AmURObapQrQ38guamS7XvGKTmrelpOwXglRT1pnXN1xx7j1zDtmcaRuQLYy1HwmaeFeVAP7+RF2PvErMkN82TnUa1DuoPoRnyr4jnDpDEKoBurVt3XUeFNFV0x1OP6Aic+JEPZubYle8+seeio+Ml0xoW3aoPK9aTmYe9P6j3EAk7oZd33J58oOloY79OogMb5IO8lu3J1EW8mQDSjS+GGMoH83kv7XkfTcLg6ij6Dc5LAG68A4FbUL1R0RvCtoG8QMiaJD3859mG/w2hLZPILMxWEDrzM/XtpvLjWh3aBgA5sBjKRkiuDsBI8QzTSvlWWouwnUM4VnGYw6sVdrPMohZqchFFLWy4ADDXUyXANN3m0ObkDikBuMdB5t0GN86jWE3Sco7g99lOop9w3SUOcaw2o3aaOdt41KHFCOSrRb/uBkOStA7kQFSEWdaH07tan79POi1429k8t8o/7/gJyGa9P7cOoIdtJ+4mPv1HKWnn0+jD6CQ2RR9aZOa6DOtpDDxY8kC3WnRFcGDvsGg9I+wgOWzORR1cBGlYxFot42obQb3wu/b7F6qBnph7eBS8fJMfiJX5lv7ZRwkwuDRD33r6NoRZU4/KK5KUYTbIdWaHYt1iTxQMf2cZXZ7aPxmtE6y6wSE6Yj6ucsxa698EIUtXBR0STjWto2XitocEiHO3BJK21MGC60p4EwVVblPZtIhaXYmjb1v3qODNkojgKOii02aRJg08y+zc3qC/rTmNlPbWueidJ81WXm6QahLBquIA3LhJ0YEP7Xa+N9XT+E+kKPhZtjlEh0yBTtWAs2RXt2Ar9RQwyCvaO7pEjDpdFtHHxad0UW4I8MVlas0Fh2NVBALxbqaiBf9doVRNeCgUAwmOl94hRaItrDa8UAo9AtL/x+KEWSx15hVU7U2d51ULTiYDyYPurRWQXineypB1bHEg+qA+Rqowmw+oCWTWJOhJELD7CNxCLiWuQk/dpFSQ9NVBnjQ3h8n5pWSCkhSEt1N9hLIhNi6yFuihI7/IRyD2PxNZE40Vq6GZaZ7/ZWDWOYw9YqOz7raZfYH1rKb8ZhxM4V3uEq49ETbRTwpXEbMB99SOeXc/ElMm6E1gGhcMR2hPlUgdkLqRqCdnKsTwWvtj2wSQv58PBAV+Q3LcM6bk+G+kelsa038RAYuEPk/iUTAYqX8yRw367KMFSjma3uECRal5YQXtV1bipM4ww4GNLs/r+D2X03TpIUby/PdSPl0R2zzSHaDQoSxu1NEyBUDcanNTDxAH3Bha9BQyJM67AMG6A3rOYXtIaKcITIntQo6g4LUT/tYutP3WdZq9ejxEsDjhJpbDssS0w3w56m9RlGo3I9q6nuXlP0gb+9r0Bi+4VtelajLHWG43DBllEmzcTAHy6uyIC68NfeSv3HYEKATnABPInjU2k50egY56K/3p1z+298sOk9F0C92OCS74xYUgBAMQA8jSOfvpgbqu7p1vW2xdzDQildMj3017tPGrIaGiP52xUysoXaAxIbb59dvIbeNgIjBJ1cDqHFGpCa0T4VDtlNDgRzdY7eF/FGZ9yYShGiUh9soQ/VcN04uYmmb13MqmETA5TYsPmlPwrFUomC7QM2e4qjbCdxCbzo8QT3FxQrYxTGaSSDu1aCaUcwK3ZpoRuPmIMxTEvcdBGthbh47pomRYcaO1wt1DI0FvaWbxpbNmlj5HGpkzfzZ8Q1irFtSmiNUBPmlcvIvWnpsYLdYGVr1gWCERK90gIjHB0aZgi3/Krb8KsozlOR5JH8pd8mgZYBpfEAb1fEg48Gqa5AE5ViRfoWQX4YJHOwmNjlSaBvTm/J8SVCUcK8Pc1aI/7t5qbhyKjtanUkjfl2RcwfyHyH44dReGRm5vdkh50u9AszDJNMVkUMCLGGdbRwsnoWhetKcqvYXDKiQc5zySDHTyUHwyHCDGGIEjqYarhAV6Fq6pNmQfARU258R9iJJNwwox25qyQjgx3e5vsUqOQsL+EmklUFCl4VYvb4wqTlXa7EdeUjM1q8ZTlzsUSqWfStHuzyjKO2EE+s3yOJWvebnaiof+jtkP5IAk7epICv0QYW+jeAn9NZJl+nClO2gz6oC5fh/CZZ0RsXgNRlgeQ00SBv4QttJUY2FnxouaPLWQbJMprZ5DYEKiW6afHmrZLNzuAKIGuUccoTZ4x2PrYPYQOg2Zh5DXqj3F58yZ1JXuhUITAZfJ9q0Rpx5lsm3ZJEEDbEDz41sg3tqox1Tkqk3+ChEuzgHuhtktnNGVcthC2Gj/Av0oxTuSNTalwH6bClXk7i2jS0ELhIcBGeI1ijxmFq1AM8mJpOBNroHjoQD4kCcjewEqT6iBWtW/UwLQp0LyeAXdWm3Cn+GDVCRC9WqnRTdQdiUypDa6tXnmZ0mK7iVmG1nBY4d5SdCBA5EI1/2FSAOxsONBUg4r3VSlJ0+ERzY57hWwlrItg8QUqlBdROPhTSholMVskv+5NrDNhX7DrE5Qx8PKZKZaK+18QcZ0xIOuWQahxMDatNHbakMoXrrqIjzB1R6Mnsl+PrS/p2nEeXGvzO2HSXqtbDvfvlPQOd/j8jMFCvv5dME3k6VXUfLhDGFPdvLU6iG966sCI3Yh6geWvba3TDXQVIU6oySxH4buD5gC/z279PUc4B+BSYNrna9G1e5PnJ27xUCBrm6/z83fHxMdumV4ErtDdz54n+3Fz3IUNmBcTxlCixi3Ka5GtkG5NHfFLDCqcgfOASn9FTmi0PtwwCOufvo1HGUVvBexzKvunJ/NFghDrMtLRXwBbvs3/5r+zsarbmVor7uzle1AWLbcGJpjaxoxNlbtND6ltkN9FR5fa4NYgwomzNOkIRF4ND8xaK02TZU7KzbgdIH5B/JZebzWd/lDwVZp5tG54HRf2QhsZlNtXh4heTx6Vd/deEgGin3s+XJxexft1dBLBTcaXn4LJm4i6SUkrP0mU3FRM42vHoWJCQMJHwFltv1dmxh/JkkAxxyf/pgcgMa3k1WsJNmmjLdSB570eSTR+8InPCLX/IPSXbMWQF0qlt8zB00bxggUA1SfMC9XRr2AFuXGoOsZm3YIKjJaJzTin0rgLkABYuAL34RtLgYLFjRvuaFDotYP42Y/40DHgqWDBgf3Zkyq1DQT9osQjUWe26YpTqEG6zn0e2LtWatNesC/QArh+CyRdrkoqdIk7WBGpCM8ckkNMgqn/uYMQHZjRhrZApK8fGXo2xPBgTjHoxBsyGQhzgWcU3hKem+E3gGRJlLYSa/89GRDk1MgIcoHoyMmH+pT81DpKxtNpVkuVvDAg7ZDQIm13vijavqvqvwewByPDWrD3dZjcIY1xH10qiEbn+0pGxhMX9fVEUlzNJGKr8c4sYepGmIFxqNr+3K/NO0k3nZe4iZA11LXMVQELRbYp6xjhRmTY92voI9uNKvZmdHOnhKGYnZVO8DIX7CHsarK5Gd1ZcDcW7y6DyLe3zPnHlC2nV38g5Q5KBoSWwsSf65yo6GFJLjG47tqao1p0p+NDkda/BH1r7wF/++sv72en5EQQLQcyliFy06Al00QhUiC3ueExdPBmYpLrovdiWqKHKC3SPb5eqoWhILGuFJQiuXScU1NObJJ2D6C+48pYbtkamdAerGT4j8Q5GUYHXIOp2QAaPCG3Oo8PHDYXLcBm/IpklkxctezBhQ/4hGNPzH6Oh1N/RDcFStCriG6nqAzdqkcVUFLLXvWlnN5bSCNKa5uXAzaAPDqWYKXAodwzG0ch5sF/RQfLRAj1qbjQWJb3+WDbljfZWYwKcbnoyPRhufMN7t3B/yi8d5191zMm3prHXQQ69MpwS0Bgw3NM6Sf+Vj8Znzpxz4ARJ7Rq0SYiOB9Dsil4AptP8cRjSWb6ktxsOIruhRYKkKu6zsxaI4vjw2txs4BgEg505m+Qs21AfEthf83Pf7OdCb+hVhuSe0qa3WHkBdR4rzojsiKkQzXGm+w2gaIftMaQdPvmyRTWpuDqLGANvBukERURIFZIm7Du9lOMbWlJz1NDOLtSUQ70+DVCf51eXtHp8qm7DKPeG+zm4B0IzmK202xoEnYPdUEaZorJVxEnrSBuCpNXHANZDMSaqqkYMF8Bja/zpyJKVuovDq3FDPgiRw39aRDLsaRHJuadFpHQzLeLvYxDvmvq6UREyCJF9PS0i+3paRPb1tIjs62kR2dcDEdkFQ9eHk8l5QgPiCJ7QgDiCJzQgjuAJDYgjeEID4giecDI5T2hAHMETGhBH8IQGxBE8oQFxBE9oQBzCEyI4Bn83+kxoMpPZe7HfPpnzmRGgYbLZJoi1aT+pvT9q7suPYxeLElaIEoLStP7oHqfS/tHwDDhaaXjD1INWH8EUMP4JPl5SyVrehfk4YtkeA3hoZOgBWt6ITQFKqCOovMX1RVJwnzM5AzJiScgEwmGNqsR4flHFLtraPSWfU2mf8cMRctzCqCMnq+Br8W1YvwqkWDcRjCQaNN5S+WEYMNxk0sg2K5xU5Fz5egNRPd537A4lIZTsQavm2B62190GWkbkm/RjntzKAJIshW+qtVF3HPnqBCTW6EFAE9RlcC0YY4HEOXAvUbO2qlIrP4zBml0/fC6mQ/dEMPo3ZBDmbdHjoxzN8Ios/FIR52Jvrs/tOm1T90tZBl/8guCnLL+V8Ps/nylItBdvWtAncbu7uT4rnivBAVuV0hYBjp2Q5Hu1U3dYWfpo/5uyKLP8r8oSPeTblXX3iZqI/01/Vcp64/6qlPXG/VUp6437iyxKO6rHet2/AEm8+UYF3FgvPAlBq+M2zYjIVyk3i6enuXZl/HqI/vckzzusV8PIYarPcxjLucXMgWSYqTmMaAComG0NqEnYL+byKVEljf/kqJLcfwLUr5Js+0e0Sbtyd7dgiH13NAYbqidIigCjLeQ+2Nw0Za44GrUdaeEAodKp8eC2wmmtQ3ctXs5u5JD23rJyib6itvhnrTrpP65Kqg7YPZ3SINjyxrtU277b7g7IIRqRFxwrSxu1+DGb61baIErez8hExSStTNnlbpyuyum0RBqHDnNomUYSq0hORslkkDJ7LtktjFya/LIb40xz1sRIWdLkVV9Lw+OAJDoDQ592akK8oFhHAO6OkfCBe7BFdHi2dS2RTiQcIiR90O8pcRCVFBW1HdRbQ8aqFZkJmKu31X2xTBsH/qM5/CrF2SF1j9lAeu5t/BA5jzXLpfNwwHlCkosFRtEsSZoDFA4Jq+PHtrADIQIy4eBHpceqkiimg0qEFN0XiqrEnESMzXga1JxRUAsi6c7+g+NdXIs1p020J+arJQRDkF7AkNPzwN3IikNBllHNAdsdZLIgFRDwhWrzJKkAvIjGz6a6EUHQdx22l/Y0asQYXm536atEX+Z5g8Gf3KZ4GcekHSZSFtYiNIG8FqnxTTaLwqTfdrZMCUPOga+4cLiWfhVtlL9E8RM8Uv9y7nklNK5rHWduVMhiw1VDk28dfe5Eee1l0jucwO3yQploo6e5PeGzMYLzgOrgiHw3KmQ37UhFckAjSlDjZnLo5CK9XxkZnXChHqZdyh3qVg+bvCk/5agz+KdK/Sy7sZ23Mmy29rzIetqIaUnp3mHORGpIF99Abw6aL2Zv6ah5m/y9CyKnhTylrMwe8uRMLInN9nEcqMt5Sn5EKpmzeD3wDkwtekJ+HJvEPS4HmdXiFUcH5sYLt4pEGjBhxuAqCv+ffqJjkN3dJBfO5CS9dhxMZ6SiCvwXGRFbdXRsWgOh+5bwwy5QMHZzjlDOsODg2ecBoXiWikSZtOwWuYO44SfEBk/WDfAZsg5c9M0s4ZBXY4UvticcaWsnbG3L1yFKGJMGWEAUcn0QnJIhzs+6nSsa0EHMqIeD/WUphjr1QHeqBKIW7LKLQ4oknQ+ka8j1cpHKWXSdEPn9BUSO6gihtw2vxLzcaPXtut+emJFcUMCkmlFxBBcHG+xL+jxObTrHVkEO35L8P3L8SeY8vOdYhM1ZbTLOoSrQXHAUkRzIsWPI46Jbw8cPSXFSGhu83imzkSja2RSZiJ/pkMwbEA42LKvYazji85AceXwoJ7OBHWWvOhhzup1w7pbDSg7psFnam7RudDEEPSRJ0rXhVbPb4vBmV/ovnOH9huUXTXbDMyalo6l+ZaCSC22ekbCb/1ennwOoMUgjUE3qV5MZuo74G4KqRHujc8tszx3ogiuuvaWQ7w4ySftwbs8LLI4QdCLLD5AvJdVUtY6LSCcYvTd0SqXcwp7Q50Jy+XOnwool6uwJIfvoP7Ib+pT0EaPW8Efbrok5PMoN4N42BRI1dnnkl6iMTNSnqnreF/eFH6I4wHlNiHbi1rDhvDAHHBwuiAjUgSii7RO51G88xv2AqB9fFxphL23tpOkT9JzCmbdi6FeAJI4tR4PW0KEVRHWkody5GsmBDuk4En8DJ/qf6RHkqB9V5Z47wBBaHsupqUjkdDJIXghRMUfc2s9ulEKtZC5dqKjRpYeJVbmYSxdS3JdprZFsNxXVC/i3yTIspy2Fmay80c5IGqTohjVsLpF4rVMzYsTpyW0MVAE+KAfqS3+tQpxKdFiihHOZpaprcaoFNJtRKwoUG8L2ymBAiDnEgyag8/T4nRyGuAvMOa1FgFe+UMQwz8gS5YdP8CtDqrnKBC4jib1gGqiZx5hOY9mx17KtCLCatRy8XqGdnVpK8LzzOEqSozNkfZYUYPxGRlF3Hq0DGg/b94/O4Pwjx+/BB2gj6rqWPLbK3wRyt/PACjEXnOdRQSxJn4JH6K9k4ubfugmhh+GhiCZtRf6tD6HahnG+rGYsKBB6WYn3Qc/tQ0hkTgn35PiIaWihKaBLI/gE9pfqncmLPhX/fvQ9SMS62OO5Y6QCYJ65J4xUk6dYfqucCyZ/2k/NeaR0bpizc/4ikgib9toWxfTBtog9wMYKo1VUiyoX8vnatoUhjc7FYlbKlq3VZ6FEhRNZ1PInWQLN1Dg950ToPSDaIC8E0t0IX8aTdNN22o6sWwVrSKUefd8quuWqs0s1lNsxqLtEAO3tnxmYO3RcSocKnwWRBM2q3LcI2nN6KFi+0zKX3SQ43Q9+MaFhM3rVSQXlePrd/0kT9JM+bv5FVef66LxwR0ECqp/qCwxDt4nWfMgWGOxY5ImEhCylUlL81bei1O5XcbjSRHIypxTFlp4MGMehh/JA5inIMK68cNIy9ttqMPgXNvwaKo1ShQc3+6DIdRJuMQRkPMmF4+0I/z+C9UNOVIIqFro/5llX+iBEqvnuCh8AYQekSX96AqlAVQIaSy/KvWUviEw9wPnpdjNWWyxiBYl+aaFKfJGILM8wXzoLSzC+8HQ4MEaWSj0Qxq6a7aQ/eDy07H30ypUAWo2Mh6BpAk5ohnn54FlTWYqc/yoEwA6ARcYNU+hlOn+1lRmHNbouWC2QvNMmyx0FVGonZq+dCpPrGCEj7CRVpJ8O9D6KHt8AEh/cW05caeg9/NWUWDoSJ+t/BCmtZRGYrFUriFrbNxkQV8ioLsN2Qkhoy03mjMmaYw9zRPchOeKzyUdqU0SfQ1O/QdpuQprdbp4a7d3xyTE+oBHi0s7Qs7X/AmWout8sn9U3Y6KyfhlbVl8ius3qgTtPcrqZnAVbOunvdbsQjZn5v54eB/UzCE/UGHIlzm1IyStWYr2iAiL/sx0GlmdRl6lIHmFfjOCjdi2+0j9GkQTA1BTdSQf3OknqW/Au9dFR09FCvjvhXNE9h1Z3qcsWDjGONYeyHYcaZHBXtUFa5nlqMToBqKjqAaCeO9DXikeOdePZwoMP58+olw5MBwcp5xpR0J4SrPlRjs2ATWbN3EnBX205khuQbiS7slKKZFz63g9pHi01AZpzXvIGoIeLCw4vWgn2cj/n3uIr35OwMtyznzZ7DxfzLQPmJTTabHO4QuipeQlmb+eYM8T/zNA5esaGJX+SvsdohM47ehLb3R5gPdStp3k8P+oDYAJ4q3Z3yj1ykW/HVwNHu2TikTAeSl11EmywYVXsMGNVKD/5uzTT1OdjK3G3ycTzfzTQnB+y7xiNFEYv0OU+8054aXdpXqq0cqyPBDKp2asXncQnDaCTY/UG0DGqqx/dF7BRsVONbuWvNAiNAnJKp39IMLuCWUXoXnB0bg+6W6XqSWPHgymzF50kSulF900eyayT9jl70soS6UqbeAhiYWetvb/qRKomCkoz/cSYgg4L1VadPSnXPqntjZ+Q7jpXhmQJ97ulj6xwCzj+QNPAym9qTrGqId1FML3KwMRF6dOBimklcfyQirVbOX2UdsZGu2sNwr+8V0/CTyJwJbF0Q/bXpShqSpxQAbiXc28WEK+VPj8HRy/4R3fzWagXU/p+bZyov6rfEQN4VD744a8D9cRwoZ/TLEpxVEpM8K1LPb1HDudWVe0xi0aUqPCTWyuLQ7SgEBWTz8thQEEDNIxyouqj46rNvfEDYreLqGAxnrEiozVj001J/r0HBtYwIVG3UPutfN2a+rAKZkesDTXrM2pLxBpU5kScwqWh8TSaOuGxBWXvMDg9IxLv+QGS1WMXcas9lK4R090+f0B6P+dhQTQBcQ4EmqhUpS8cQwD3ybKrZh3AQ/70pjtaTp9pJZbuGEosCY6GEksuo6HEkrbIlZhRjhyHpQkNr3694Cm2/QBmsH6LvGKbXq77VqOMIn0wGkU6YzSK9MpoFOme0SiSSWo0yvvhKDgT2HYydP4yUPI7BkFJT08DJd09DZT0+VgoeJnb5N3YzDl4fbegyMk3o1EkAfhoFDbOGBQe1whjpXhKPuJamli/9oG5hrOgqN8kC/geN2vosE7QuVpjEScsIhS+LfSyJ44xOcHVXn2B+Cn6eUeJbh8OFmi7fxk9Li3YJFPPgk0y+QDGWPSpnpJYEz0kh6dWbMTgsjCs0wQwbPIJYDidJ4DhAjcBDFe4CWC4xPWEMQJQgxGgiWSmzrXI78wzgHGsTLo+8jXmVr6Y615I33KkF+jo7Rdz3QdpzjohJK+ok3wZUKc566RIph7ypUedkK/hSTcDm8xeOZPGC3HFYQiX6FQQn9CRT64KwNQNcNKU5QJZbOAxKf6aBo8pHfJEEriE9sOFQRNZQ0kQ31d48GiOODcjgUGBgx/Cf/Qo3EDiNhwJJTJYvYBtuJYjpeiL7pDHQve7fTROBuHOhHqql5+EONacaFZPy4YXjZG2ep8W/7LDnjRQrxh7sff6Lw\x3d\x3d";Sidebar.prototype.searchFileUrl= "search.xml";Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.defaultEntries="general;images;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.rack="General APC Cisco Dell F5 HP IBM Oracle".split(" ");Sidebar.prototype.pids="Agitators;Apparatus Elements;Centrifuges;Compressors;Compressors ISO;Crushers Grinding;Driers;Engines;Feeders;Filters;Fittings;Flow Sensors;Heat Exchangers;Instruments;Misc;Mixers;Piping;Pumps;Pumps DIN;Pumps ISO;Separators;Shaping Machines;Valves;Vessels".split(";"); @@ -3140,57 +3140,57 @@ Sidebar.prototype.gmdl="Bottom Navigation;Bottom Sheets;Buttons;Cards;Chips;Dial {id:"arrows"},{id:"arrows2"},{id:"lean_mapping"},{id:"citrix"},{id:"azure"},{id:"network"},{id:"mscae",prefix:"mscae",libs:"Cloud;Enterprise;General;Intune;Other;System Center;Deprecated".split(";")},{id:"bpmn",prefix:"bpmn",libs:["","Gateways","Events"]},{id:"clipart",prefix:null,libs:"computer finance clipart networking people telco".split(" ")},{id:"eip",prefix:"eip",libs:Sidebar.prototype.eip},{id:"mockups",prefix:"mockup",libs:"Buttons Containers Forms Graphics Markup Misc Navigation Text".split(" ")}, {id:"pid2",prefix:"pid2",libs:"Agitators;Apparatus Elements;Centrifuges;Compressors;Compressors ISO;Crushers Grinding;Driers;Engines;Feeders;Filters;Fittings;Flow Sensors;Heat Exchangers;Instruments;Misc;Mixers;Piping;Pumps;Pumps DIN;Pumps ISO;Separators;Shaping Machines;Valves;Vessels".split(";")},{id:"signs",prefix:"signs",libs:Sidebar.prototype.signs},{id:"rack",prefix:"rack",libs:Sidebar.prototype.rack},{id:"electrical",prefix:"ee",libs:"LogicGates Resistors Capacitors Inductors SwitchesRelays Diodes Sources Transistors Misc Audio PlcLadder Abstract Optical VacuumTubes Waveforms Instruments".split(" ")}, {id:"aws2",prefix:"aws2",libs:Sidebar.prototype.aws2},{id:"pid",prefix:"pid",libs:Sidebar.prototype.pids},{id:"cisco",prefix:"cisco",libs:Sidebar.prototype.cisco},{id:"office",prefix:"office",libs:Sidebar.prototype.office},{id:"cabinets",libs:["cabinets"]},{id:"floorplan",libs:["floorplan"]},{id:"bootstrap",libs:["bootstrap"]},{id:"gmdl",prefix:"gmdl",libs:Sidebar.prototype.gmdl},{id:"archimate3",prefix:"archimate3",libs:Sidebar.prototype.archimate3},{id:"archimate",libs:["archimate"]},{id:"sysml", -prefix:"sysml",libs:Sidebar.prototype.sysml}];Sidebar.prototype.togglePalettes=function(b,a){this.showPalettes(b,a)};Sidebar.prototype.togglePalette=function(b){this.showPalette(b)};Sidebar.prototype.showPalettes=function(b,a,d){for(var c=0;cg?"":d.substring(g+1));this.createVertexTemplateEntry(d, -parseInt(b[a].getAttribute("w")),parseInt(b[a].getAttribute("h")),"",e.replace(/_/g," "),null,null,this.filterTags(c.join(" ")))}}}}}}))};"1"==urlParams.savesidebar&&(Sidebar.prototype.addFoldingHandler=function(b,a,d){var c=!1;if(!mxClient.IS_IE||8<=document.documentMode)b.style.backgroundImage="none"==a.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="0% 50%";var f=document.createElement("button");f.style.marginLeft= -"4px";mxUtils.write(f,"Save");mxEvent.addListener(b,"click",mxUtils.bind(this,function(m){if("BUTTON"==mxEvent.getSource(m).nodeName){var n=b.cloneNode(!0);n.style.backgroundImage="";n.style.textDecoration="none";n.style.fontWeight="bold";n.style.fontSize="14px";n.style.color="rgb(80, 80, 80)";n.style.width="456px";n.style.backgroundColor="#ffffff";n.style.paddingLeft="6px";m=n.getElementsByTagName("button")[0];m.parentNode.removeChild(m);m=a.cloneNode(!0);m.style.backgroundColor="#ffffff";m.style.borderColor= +"/sidebar-pid.png"},{title:mxResources.get("signs"),id:"signs",image:IMAGE_PATH+"/sidebar-signs.png"}]}];this.addStencilsToIndex=this.editorUi.isOffline();this.shapetags={};if(null!=this.tagIndex)for(var a=this.editorUi.editor.graph.decompress(this.tagIndex).split("\n"),b=0;bg?"":d.substring(g+1));this.createVertexTemplateEntry(d, +parseInt(a[b].getAttribute("w")),parseInt(a[b].getAttribute("h")),"",e.replace(/_/g," "),null,null,this.filterTags(c.join(" ")))}}}}}}))};"1"==urlParams.savesidebar&&(Sidebar.prototype.addFoldingHandler=function(a,b,d){var c=!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%";var f=document.createElement("button");f.style.marginLeft= +"4px";mxUtils.write(f,"Save");mxEvent.addListener(a,"click",mxUtils.bind(this,function(m){if("BUTTON"==mxEvent.getSource(m).nodeName){var n=a.cloneNode(!0);n.style.backgroundImage="";n.style.textDecoration="none";n.style.fontWeight="bold";n.style.fontSize="14px";n.style.color="rgb(80, 80, 80)";n.style.width="456px";n.style.backgroundColor="#ffffff";n.style.paddingLeft="6px";m=n.getElementsByTagName("button")[0];m.parentNode.removeChild(m);m=b.cloneNode(!0);m.style.backgroundColor="#ffffff";m.style.borderColor= "transparent";m.style.width="456px";n='\x3c!DOCTYPE html\x3e\x3chtml\x3e\x3chead\x3e\x3clink rel\x3d"stylesheet" type\x3d"text/css" href\x3d"https://www.draw.io/styles/grapheditor.css"\x3e\x3c/head\x3e\x3cbody style\x3d"background:#ffffff;font-family:Helvetica,Arial;"\x3e'+n.outerHTML+m.outerHTML+"\x3c/body\x3e\x3c/html\x3e";m.style.position="absolute";window.document.body.appendChild(m);var p=m.clientHeight+18;m.parentNode.removeChild(m);(new mxXmlRequest(EXPORT_URL,"w\x3d456\x26h\x3d"+p+"\x26html\x3d"+ -encodeURIComponent(this.editorUi.editor.compress(n)))).simulate(document,"_blank")}else{if("none"==a.style.display){if(c)b.appendChild(f);else if(c=!0,null!=d){null!=f.parentNode&&f.parentNode.removeChild(f);b.style.cursor="wait";var r=b.innerHTML;b.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){d(a);b.style.cursor="";b.innerHTML=r;b.appendChild(f)},0)}else b.appendChild(f);b.style.backgroundImage="url('"+this.expandedImage+"')";a.style.display="block"}else b.style.backgroundImage= -"url('"+this.collapsedImage+"')",a.style.display="none",null!=f.parentNode&&f.parentNode.removeChild(f);mxEvent.consume(m)}}))});Sidebar.prototype.extractShapeStyle=function(b){if(null!=b&&"shape\x3d"==b.substring(0,6)){var a=b.indexOf(";");0>a&&(a=b.length);return b.substring(6,a)}return null};var a=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(b,d,c){var f=a.apply(this,arguments);null!=this.shapetags&&(b=b.toLowerCase(),d=d.toLowerCase(),null!=this.shapetags[b]&& -f.push(this.shapetags[b]),d=b+"."+d,null!=this.shapetags[d]&&f.push(this.shapetags[d]));return f};Sidebar.prototype.initPalettes=function(){var b=GRAPH_IMAGE_PATH,a=STENCIL_PATH,d=this.signs,c=this.rack,f=this.pids,m=this.cisco,n=this.sysml,p=this.eip,r=this.gmdl;"1"==urlParams.createindex&&(mxLog.textarea.value="");this.addSearchPalette(!0);this.addGeneralPalette(!0);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addUmlPalette(!1);this.addErPalette();this.addBasicPalette();this.addFlowchartPalette(); -this.addNetworkPalette();this.addAzurePalette();this.addCitrixPalette();this.addMSCAEPalette();this.addBpmnPalette(a,!1);this.addAWSPalette();this.addAWS3DPalette();this.addLeanMappingPalette();this.addIos7Palette();this.addIosPalette();this.addAndroidPalette();this.addMockupPalette();this.addElectricalPalette();this.addOfficePalette();this.addStencilPalette("arrows",mxResources.get("arrows"),a+"/arrows.xml",";html\x3d1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"\x3dbottom;"+mxConstants.STYLE_VERTICAL_ALIGN+ -"\x3dtop;"+mxConstants.STYLE_STROKEWIDTH+"\x3d2;strokeColor\x3d#000000;");this.addArrows2Palette();this.addImagePalette("computer","Clipart / Computer",b+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "), -"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.addImagePalette("finance","Clipart / Finance",b+"/lib/clip_art/finance/", -"_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.addImagePalette("clipart","Clipart / Various",b+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "), -"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.addImagePalette("networking","Clipart / Networking",b+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "), +encodeURIComponent(this.editorUi.editor.compress(n)))).simulate(document,"_blank")}else{if("none"==b.style.display){if(c)a.appendChild(f);else if(c=!0,null!=d){null!=f.parentNode&&f.parentNode.removeChild(f);a.style.cursor="wait";var r=a.innerHTML;a.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){d(b);a.style.cursor="";a.innerHTML=r;a.appendChild(f)},0)}else a.appendChild(f);a.style.backgroundImage="url('"+this.expandedImage+"')";b.style.display="block"}else a.style.backgroundImage= +"url('"+this.collapsedImage+"')",b.style.display="none",null!=f.parentNode&&f.parentNode.removeChild(f);mxEvent.consume(m)}}))});Sidebar.prototype.extractShapeStyle=function(a){if(null!=a&&"shape\x3d"==a.substring(0,6)){var b=a.indexOf(";");0>b&&(b=a.length);return a.substring(6,b)}return null};var b=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(a,d,c){var f=b.apply(this,arguments);null!=this.shapetags&&(a=a.toLowerCase(),d=d.toLowerCase(),null!=this.shapetags[a]&& +f.push(this.shapetags[a]),d=a+"."+d,null!=this.shapetags[d]&&f.push(this.shapetags[d]));return f};Sidebar.prototype.initPalettes=function(){var a=GRAPH_IMAGE_PATH,b=STENCIL_PATH,d=this.signs,c=this.rack,f=this.pids,m=this.cisco,n=this.sysml,p=this.eip,r=this.gmdl;"1"==urlParams.createindex&&(mxLog.textarea.value="");this.addSearchPalette(!0);this.addGeneralPalette(!0);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addUmlPalette(!1);this.addErPalette();this.addBasicPalette();this.addFlowchartPalette(); +this.addNetworkPalette();this.addAzurePalette();this.addCitrixPalette();this.addMSCAEPalette();this.addBpmnPalette(b,!1);this.addAWSPalette();this.addAWS3DPalette();this.addLeanMappingPalette();this.addIos7Palette();this.addIosPalette();this.addAndroidPalette();this.addMockupPalette();this.addElectricalPalette();this.addOfficePalette();this.addStencilPalette("arrows",mxResources.get("arrows"),b+"/arrows.xml",";html\x3d1;"+mxConstants.STYLE_VERTICAL_LABEL_POSITION+"\x3dbottom;"+mxConstants.STYLE_VERTICAL_ALIGN+ +"\x3dtop;"+mxConstants.STYLE_STROKEWIDTH+"\x3d2;strokeColor\x3d#000000;");this.addArrows2Palette();this.addImagePalette("computer","Clipart / Computer",a+"/lib/clip_art/computers/","_128x128.png","Antivirus Data_Filtering Database Database_Add Database_Minus Database_Move_Stack Database_Remove Fujitsu_Tablet Harddrive IBM_Tablet iMac iPad Laptop MacBook Mainframe Monitor Monitor_Tower Monitor_Tower_Behind Netbook Network Network_2 Printer Printer_Commercial Secure_System Server Server_Rack Server_Rack_Empty Server_Rack_Partial Server_Tower Software Stylus Touch USB_Hub Virtual_Application Virtual_Machine Virus Workstation".split(" "), +"Antivirus;Data Filtering;Database;Database Add;Database Minus;Database Move Stack;Database Remove;Fujitsu Tablet;Harddrive;IBMTablet;iMac;iPad;Laptop;MacBook;Mainframe;Monitor;Monitor Tower;Monitor Tower Behind;Netbook;Network;Network 2;Printer;Printer Commercial;Secure System;Server;Server Rack;Server Rack Empty;Server Rack Partial;Server Tower;Software;Stylus;Touch;USB Hub;Virtual Application;Virtual Machine;Virus;Workstation".split(";"));this.addImagePalette("finance","Clipart / Finance",a+"/lib/clip_art/finance/", +"_128x128.png","Arrow_Down Arrow_Up Coins Credit_Card Dollar Graph Pie_Chart Piggy_Bank Safe Shopping_Cart Stock_Down Stock_Up".split(" "),"Arrow_Down;Arrow Up;Coins;Credit Card;Dollar;Graph;Pie Chart;Piggy Bank;Safe;Shopping Basket;Stock Down;Stock Up".split(";"));this.addImagePalette("clipart","Clipart / Various",a+"/lib/clip_art/general/","_128x128.png","Battery_0 Battery_100 Battery_50 Battery_75 Battery_allstates Bluetooth Earth_globe Empty_Folder Full_Folder Gear Keys Lock Mouse_Pointer Plug Ships_Wheel Star Tire".split(" "), +"Battery 0%;Battery 100%;Battery 50%;Battery 75%;Battery;Bluetooth;Globe;Empty Folder;Full Folder;Gear;Keys;Lock;Mousepointer;Plug;Ships Wheel;Star;Tire".split(";"));this.addImagePalette("networking","Clipart / Networking",a+"/lib/clip_art/networking/","_128x128.png","Bridge Certificate Certificate_Off Cloud Cloud_Computer Cloud_Computer_Private Cloud_Rack Cloud_Rack_Private Cloud_Server Cloud_Server_Private Cloud_Storage Concentrator Email Firewall_02 Firewall Firewall-page1 Ip_Camera Modem power_distribution_unit Print_Server Print_Server_Wireless Repeater Router Router_Icon Switch UPS Wireless_Router Wireless_Router_N".split(" "), "Bridge;Certificate;Certificate Off;Cloud;Cloud Computer;Cloud Computer Private;Cloud Rack;Cloud Rack Private;Cloud Server;Cloud Server Private;Cloud Storage;Concentrator;Email;Firewall 1;Firewall 2;Firewall;Camera;Modem;Power Distribution Unit;Print Server;Print Server Wireless;Repeater;Router;Router Icon;Switch;UPS;Wireless Router;Wireless Router N".split(";"),{Wireless_Router:"wireless router switch wap wifi access point wlan",Wireless_Router_N:"wireless router switch wap wifi access point wlan", -Router:"router switch",Router_Icon:"router switch"});this.addImagePalette("people","Clipart / People",b+"/lib/clip_art/people/","_128x128.png","Suit_Man Suit_Man_Black Suit_Man_Blue Suit_Man_Green Suit_Man_Green_Black Suit_Woman Suit_Woman_Black Suit_Woman_Blue Suit_Woman_Green Suit_Woman_Green_Black Construction_Worker_Man Construction_Worker_Man_Black Construction_Worker_Woman Construction_Worker_Woman_Black Doctor_Man Doctor_Man_Black Doctor_Woman Doctor_Woman_Black Farmer_Man Farmer_Man_Black Farmer_Woman Farmer_Woman_Black Nurse_Man Nurse_Man_Black Nurse_Man_Green Nurse_Man_Red Nurse_Woman Nurse_Woman_Black Nurse_Woman_Green Nurse_Woman_Red Military_Officer Military_Officer_Black Military_Officer_Woman Military_Officer_Woman_Black Pilot_Man Pilot_Man_Black Pilot_Woman Pilot_Woman_Black Scientist_Man Scientist_Man_Black Scientist_Woman Scientist_Woman_Black Security_Man Security_Man_Black Security_Woman Security_Woman_Black Soldier Soldier_Black Tech_Man Tech_Man_Black Telesales_Man Telesales_Man_Black Telesales_Woman Telesales_Woman_Black Waiter Waiter_Black Waiter_Woman Waiter_Woman_Black Worker_Black Worker_Man Worker_Woman Worker_Woman_Black".split(" ")); -this.addImagePalette("telco","Clipart / Telecommunication",b+"/lib/clip_art/telecommunication/","_128x128.png","BlackBerry Cellphone HTC_smartphone iPhone Palm_Treo Signal_tower_off Signal_tower_on".split(" "),"BlackBerry;Cellphone;HTC smartphone;iPhone;Palm Treo;Signaltower off;Signaltower on".split(";"));for(b=0;bmxUtils.indexOf(l,a))d=null!=p?p[a]:null,mxLog.debug('\x3cshape style\x3d"shape\x3d'+b+a+f+'" w\x3d"'+Math.round(e*n)+'" h\x3d"'+Math.round(c*n)+'"'+(null!=d?' tags\x3d"'+d+'"':"")+"/\x3e")}),!0)}}var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(b,a,d,c,l){var m=c;this.editorUi.enableLogging&&!this.editorUi.isOffline()&&0==d&&((new Image).src= -"images/log.png?search\x3d"+encodeURIComponent(b)+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION));c=mxUtils.bind(this,function(c,f,k){!this.editorUi.isOffline()&&c.length<=a/4?(k=d-Math.ceil((f-a/4)/a),mxUtils.get(ICONFINDER_PATH+"?q\x3d"+encodeURIComponent(b)+"\x26l\x3d1\x26p\x3d"+k+"\x26c\x3d"+a,mxUtils.bind(this,function(b){b=b.getXml().getElementsByTagName("icon");for(var f=0;fmxUtils.indexOf(l,b))d=null!=p?p[b]:null,mxLog.debug('\x3cshape style\x3d"shape\x3d'+a+b+f+'" w\x3d"'+Math.round(e*n)+'" h\x3d"'+Math.round(c*n)+'"'+(null!=d?' tags\x3d"'+d+'"':"")+"/\x3e")}),!0)}}var f=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(a,b,d,c,l){var m=c;this.editorUi.enableLogging&&!this.editorUi.isOffline()&&0==d&&((new Image).src= +"images/log.png?search\x3d"+encodeURIComponent(a)+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION));c=mxUtils.bind(this,function(c,f,k){!this.editorUi.isOffline()&&c.length<=b/4?(k=d-Math.ceil((f-b/4)/b),mxUtils.get(ICONFINDER_PATH+"?q\x3d"+encodeURIComponent(a)+"\x26l\x3d1\x26p\x3d"+k+"\x26c\x3d"+b,mxUtils.bind(this,function(a){a=a.getXml().getElementsByTagName("icon");for(var f=0;fb;b++){var e=a.cloneCell(f);e.geometry.setTerminalPoint(new mxPoint(40+60*b,0),!0);c.insertEdge(e,!1);d.push(e)}for(b=0;4>b;b++)e=a.cloneCell(f),e.geometry.setTerminalPoint(new mxPoint(40+60*b,140),!0),c.insertEdge(e,!1),d.push(e);return a.createVertexTemplateFromCells(d,c.geometry.width,c.geometry.height+120,"Bus")}),this.createVertexTemplateEntry("html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.bus;gradientColor\x3dnone;gradientDirection\x3dnorth;fontColor\x3d#ffffff;perimeter\x3dbackbonePerimeter;backboneSize\x3d20;", +0),!0);f.geometry.relative=!0;f.edge=!0;for(var d=[c],a=0;4>a;a++){var e=b.cloneCell(f);e.geometry.setTerminalPoint(new mxPoint(40+60*a,0),!0);c.insertEdge(e,!1);d.push(e)}for(a=0;4>a;a++)e=b.cloneCell(f),e.geometry.setTerminalPoint(new mxPoint(40+60*a,140),!0),c.insertEdge(e,!1),d.push(e);return b.createVertexTemplateFromCells(d,c.geometry.width,c.geometry.height+120,"Bus")}),this.createVertexTemplateEntry("html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.bus;gradientColor\x3dnone;gradientDirection\x3dnorth;fontColor\x3d#ffffff;perimeter\x3dbackbonePerimeter;backboneSize\x3d20;", 200,20,"","Bus",null,null,this.getTagsForStencil("mxgraph.networks","bus backbone","computer network ").join(" ")),this.createEdgeTemplateEntry("html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.comm_link_edge;html\x3d1;",100,100,"","Comm Link",null,this.getTagsForStencil("mxgraph.networks","comm_link_edge","computer network ").join(" ")),this.createVertexTemplateEntry("fontColor\x3d#0066CC;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelPosition\x3dcenter;align\x3dcenter;html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.biometric_reader;", 60,100,"","Biometric Reader",null,null,this.getTagsForStencil("mxgraph.networks","biometric_reader","computer network ").join(" ")),this.createVertexTemplateEntry("fontColor\x3d#0066CC;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelPosition\x3dcenter;align\x3dcenter;html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.business_center;",90,100,"","Business Center",null,null,this.getTagsForStencil("mxgraph.networks", "business_center","computer network ").join(" ")),this.createVertexTemplateEntry("html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.cloud;fontColor\x3d#ffffff;",90,50,"","Cloud",null,null,this.getTagsForStencil("mxgraph.networks","cloud","computer network ").join(" ")),this.createVertexTemplateEntry("fontColor\x3d#0066CC;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelPosition\x3dcenter;align\x3dcenter;html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.community;", @@ -6057,7 +6057,7 @@ this.createVertexTemplateEntry("fontColor\x3d#0066CC;verticalAlign\x3dtop;vertic "computer network ").join(" ")),this.createVertexTemplateEntry("fontColor\x3d#0066CC;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelPosition\x3dcenter;align\x3dcenter;html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.web_server;",105,105,"","Web Server",null,null,this.getTagsForStencil("mxgraph.networks","web_server","computer network ").join(" ")),this.createVertexTemplateEntry("fontColor\x3d#0066CC;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelPosition\x3dcenter;align\x3dcenter;html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.wireless_hub;", 100,85,"","Wireless Hub",null,null,this.getTagsForStencil("mxgraph.networks","wireless_hub","computer network ").join(" ")),this.createVertexTemplateEntry("fontColor\x3d#0066CC;verticalAlign\x3dtop;verticalLabelPosition\x3dbottom;labelPosition\x3dcenter;align\x3dcenter;html\x3d1;fillColor\x3d#CCCCCC;strokeColor\x3d#6881B3;gradientColor\x3dnone;gradientDirection\x3dnorth;strokeWidth\x3d2;shape\x3dmxgraph.networks.wireless_modem;",100,85,"","Wireless Modem",null,null,this.getTagsForStencil("mxgraph.networks", "wireless_modem","computer network ").join(" "))])}})(); -(function(){Sidebar.prototype.addOfficePalette=function(){this.addOfficeCloudsPalette();this.addOfficeCommunicationsPalette();this.addOfficeConceptsPalette();this.addOfficeDatabasesPalette();this.addOfficeDevicesPalette();this.addOfficeSecurityPalette();this.addOfficeServersPalette();this.addOfficeServicesPalette();this.addOfficeSitesPalette();this.addOfficeUsersPalette()};Sidebar.prototype.addOfficeCloudsPalette=function(){var a=[this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.azure;",103, +(function(){Sidebar.prototype.addOfficePalette=function(){this.addOfficeCloudsPalette();this.addOfficeCommunicationsPalette();this.addOfficeConceptsPalette();this.addOfficeDatabasesPalette();this.addOfficeDevicesPalette();this.addOfficeSecurityPalette();this.addOfficeServersPalette();this.addOfficeServicesPalette();this.addOfficeSitesPalette();this.addOfficeUsersPalette()};Sidebar.prototype.addOfficeCloudsPalette=function(){var b=[this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.azure;",103, 66,"","Azure",null,null,this.getTagsForStencil("mxgraph.office.clouds","azure","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.cloud;",94,55,"","Cloud",null,null,this.getTagsForStencil("mxgraph.office.clouds","cloud","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.cloud_disaster;", 94,74,"","Cloud Disaster",null,null,this.getTagsForStencil("mxgraph.office.clouds","cloud disaster","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.cloud_disaster;fillColor\x3d#ff0000;",94,74,"","Cloud Disaster (Red)",null,null,this.getTagsForStencil("mxgraph.office.clouds","cloud disaster","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.cloud_exchange_online;", 100,61,"","Cloud Exchange Online",null,null,this.getTagsForStencil("mxgraph.office.clouds","cloud exchange online","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.cloud_service_request;",102,80,"","Cloud Service Request",null,null,this.getTagsForStencil("mxgraph.office.clouds","cloud service request","office cloud ").join(" ")), @@ -6065,7 +6065,7 @@ this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3 101,61,"","Office 365",null,null,this.getTagsForStencil("mxgraph.office.clouds","office 365","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.online_backup;",94,101,"","Online Backup",null,null,this.getTagsForStencil("mxgraph.office.clouds","online backup","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.online_user;", 93,74,"","Online User",null,null,this.getTagsForStencil("mxgraph.office.clouds","online user","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.private_cloud;",94,55,"","Private Cloud",null,null,this.getTagsForStencil("mxgraph.office.clouds","private cloud","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.public_cloud;", 101,81,"","Public Cloud",null,null,this.getTagsForStencil("mxgraph.office.clouds","public cloud","office cloud ").join(" ")),this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.public_im_cloud_service;",102,99,"","Public IM Cloud Service",null,null,this.getTagsForStencil("mxgraph.office.clouds","public im instant message cloud service", -"office cloud ").join(" "))];this.addPalette("officeClouds","Office / Clouds",!1,mxUtils.bind(this,function(c){for(var f=0;fthis.maxAutosaveRevisionDelay}; -DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,c){if(null!=a&&null!=c){var f=a.lastIndexOf("."),d=0this.maxAutosaveRevisionDelay}; +DrawioFile.prototype.close=function(b){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,c){if(null!=b&&null!=c){var f=b.lastIndexOf("."),d=0=u.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in x){var e=document.createElement("div"), +var BackgroundImageDialog=function(b,c){var f=document.createElement("div");f.style.whiteSpace="nowrap";var d=document.createElement("h2");mxUtils.write(d,mxResources.get("backgroundImage"));d.style.marginTop="0px";f.appendChild(d);mxUtils.write(f,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(f);var d=b.editor.graph.backgroundImage,a=document.createElement("input");a.setAttribute("type","text");a.style.marginTop="4px";a.style.marginBottom="4px";a.style.width="350px";a.value= +null!=d?d.src:"";var e=!1,g=function(){!e&&""!=a.value&&!b.isOffline()?b.loadImage(mxUtils.trim(a.value),function(a){k.value=a.width;l.value=a.height},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));a.value="";k.value="";l.value=""}):(k.value="",l.value="")};this.init=function(){a.focus();if(Graph.fileSupport){a.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=f.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(a){null!= +d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10=u.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in x){var e=document.createElement("div"), f=mxResources.get(d),k=x[d];null==f&&(f=d.substring(0,1).toUpperCase()+d.substring(1));18c.lastIndexOf(".")&& -(!t||0>e)){b=null!=b?b:y.value;var f="";b==App.MODE_GOOGLE?f=a.drive.extension:b==App.MODE_DROPBOX?f=a.dropbox.extension:b==App.MODE_ONEDRIVE?f=a.oneDrive.extension:b==App.MODE_DEVICE&&(f=".xml");0<=e&&(d=d.substring(0,e));v.value=d+f}}}function s(b){var c=v.value;if(null==b||null!=c&&0c.lastIndexOf(".")&& +(!t||0>e)){a=null!=a?a:y.value;var f="";a==App.MODE_GOOGLE?f=b.drive.extension:a==App.MODE_DROPBOX?f=b.dropbox.extension:a==App.MODE_ONEDRIVE?f=b.oneDrive.extension:a==App.MODE_DEVICE&&(f=".xml");0<=e&&(d=d.substring(0,e));v.value=d+f}}}function s(a){var c=v.value;if(null==a||null!=c&&0FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post("/email","email\x3d"+encodeURIComponent(d.value)+"\x26version\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26url\x3d"+encodeURIComponent(window.location.href)+ -"\x26body\x3d"+encodeURIComponent("Feedback:\n"+l.value+b),function(b){a.spinner.stop();200==b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});b.className="geBtn gePrimaryBtn";b.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(){0FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post("/email","email\x3d"+encodeURIComponent(d.value)+"\x26version\x3d"+encodeURIComponent(EditorUi.VERSION)+"\x26url\x3d"+encodeURIComponent(window.location.href)+ +"\x26body\x3d"+encodeURIComponent("Feedback:\n"+l.value+a),function(a){b.spinner.stop();200==a.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});a.className="geBtn gePrimaryBtn";a.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(){0mxUtils.indexOf(b,f[a])&&b.push(f[a]);c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(d.container,300,80,!0,!0);d.init()});e.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";var k=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(b);mxSettings.save();a.hideDialog(); -a.alert(mxResources.get("restartForChangeRequired"))});k.className="geBtn gePrimaryBtn";var l=document.createElement("div");l.style.marginTop="14px";l.style.textAlign="right";a.editor.cancelFirst?(l.appendChild(g),l.appendChild(e),l.appendChild(k)):(l.appendChild(e),l.appendChild(k),l.appendChild(g));f.appendChild(l);this.container=f},EditGeometryDialog=function(a,c){var f=a.editor.graph,d=1==c.length?f.getCellGeometry(c[0]):null,b=document.createElement("div"),e=document.createElement("table"),g= +mxClient.IS_QUIRKS&&(c.style.position="relative",c.style.top="-6px"),f.appendChild(c);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var a=[],c=0;cmxUtils.indexOf(a,f[b])&&a.push(f[b]);c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(d.container,300,80,!0,!0);d.init()});e.className="geBtn";var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";var k=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(a);mxSettings.save();b.hideDialog(); +b.alert(mxResources.get("restartForChangeRequired"))});k.className="geBtn gePrimaryBtn";var l=document.createElement("div");l.style.marginTop="14px";l.style.textAlign="right";b.editor.cancelFirst?(l.appendChild(g),l.appendChild(e),l.appendChild(k)):(l.appendChild(e),l.appendChild(k),l.appendChild(g));f.appendChild(l);this.container=f},EditGeometryDialog=function(b,c){var f=b.editor.graph,d=1==c.length?f.getCellGeometry(c[0]):null,a=document.createElement("div"),e=document.createElement("table"),g= document.createElement("tbody"),k=document.createElement("tr"),l=document.createElement("td"),m=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("left")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.x:"";this.init=function(){n.focus();n.select()};m.appendChild(n);k.appendChild(l);k.appendChild(m);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");m=document.createElement("td"); mxUtils.write(l,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";m.appendChild(p);k.appendChild(l);k.appendChild(m);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.width="100px";r.value=null!=d?d.width:"";m.appendChild(r);k.appendChild(l); k.appendChild(m);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var s=document.createElement("input");s.setAttribute("type","text");s.style.width="100px";s.value=null!=d?d.height:"";m.appendChild(s);k.appendChild(l);k.appendChild(m);g.appendChild(k);k=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":"); -var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=1==c.length?mxUtils.getValue(f.getCellStyle(c[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(q);k.appendChild(l);k.appendChild(m);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;ba.maxImageSize||l>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=C;l*=C}y>A?(A=Math.round(A*u/y),y=u):(y=Math.round(y*v/A),A=v);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";N.style.position="relative"; -N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=b){var P=document.createElement("img");P.setAttribute("src",D.convert(b));P.style.width=y+"px";P.style.height=A+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((v-A)/2)+"px";P.style.paddingLeft=Math.floor((u-y)/2)+"px";N.appendChild(P)}else if(null!=m){var M=a.stringToCells(a.editor.graph.decompress(m.xml));0z?y-1:y,0,n.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(n.push(n.splice(z,1)[0]),s.appendChild(s.children[z]));else if(0b.maxImageSize||l>b.maxImageSize){var C=Math.min(1,Math.min(b.maxImageSize/Math.max(1,f)),b.maxImageSize/Math.max(1,l));f*=C;l*=C}y>A?(A=Math.round(A*u/y),y=u):(y=Math.round(y*v/A),A=v);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";N.style.position="relative"; +N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=a){var P=document.createElement("img");P.setAttribute("src",D.convert(a));P.style.width=y+"px";P.style.height=A+"px";P.style.margin="10px";P.style.paddingBottom=Math.floor((v-A)/2)+"px";P.style.paddingLeft=Math.floor((u-y)/2)+"px";N.appendChild(P)}else if(null!=m){var M=b.stringToCells(b.editor.graph.decompress(m.xml));0z?y-1:y,0,n.splice(z,1)[0]),s.insertBefore(s.children[z],s.children[y])):(n.push(n.splice(z,1)[0]),s.appendChild(s.children[z]));else if(0c&&(b=a.substring(c,e+15).replace(/>/g,"\x3e").replace(/</g, "\x3c").replace(/\n/g,""))}else var f=mxUtils.parseXml(a),g=this.editor.extractGraphModel(f.documentElement),b=null!=g?mxUtils.getXml(g):""}catch(k){}return b};EditorUi.prototype.setFileData=function(a){this.pages=this.fileNode=this.currentPage=null;if(null!=a&&0=screen.height?5:46,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative", @@ -7270,21 +7270,21 @@ e.action?(b=1==e.autosave,null!=e.modified&&null==urlParams.modified&&(urlParams f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&d.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var d=window.opener||window.parent,c="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";d.postMessage(c,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a= document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&& (b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b, -"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="42px"}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl= -function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.apply(this,arguments),c=this.editor.graph,d= -b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/ -a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected", -function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b}; -var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c); -this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed|| -null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet= -function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init;Graph.prototype.init= -function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d= -this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=m.apply(this,arguments), +c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&& +null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2), +f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()}; +this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root, +!0);b.outline.view.validate()});return b};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c); +this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"== +urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet; +Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var r=Graph.prototype.init; +Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}r.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this, +arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1mxUtils.indexOf(this.settings.customLibraries,a)&&this.settings.customLibraries.push(a);mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(a){this.settings.plugins=a},getFormatWidth:function(){return parseInt(this.settings.formatWidth)},setFormatWidth:function(a){this.settings.formatWidth= -a},getCurrentEdgeStyle:function(){return this.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){this.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return this.settings.currentVertexStyle},setCurrentVertexStyle:function(a){this.settings.currentVertexStyle=a},isCreateTarget:function(){return this.settings.createTarget},setCreateTarget:function(a){this.settings.createTarget=a},getPageFormat:function(){return this.settings.pageFormat},setPageFormat:function(a){this.settings.pageFormat= -a},save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete this.settings.isNew,this.settings.version=12,localStorage.setItem(mxSettings.key,JSON.stringify(this.settings))}catch(a){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key))},parse:function(a){null!=a&&(this.settings=JSON.parse(a),null==this.settings.plugins&&(this.settings.plugins=[]),null==this.settings.libraries&&(this.settings.libraries=Sidebar.prototype.defaultEntries), +var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:{},createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:12,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(b){this.settings.language=b},getUi:function(){return this.settings.ui}, +setUi:function(b){this.settings.ui=b},getShowStartScreen:function(){return this.settings.showStartScreen},setShowStartScreen:function(b){this.settings.showStartScreen=b},getGridColor:function(){return this.settings.gridColor},setGridColor:function(b){this.settings.gridColor=b},getAutosave:function(){return this.settings.autosave},setAutosave:function(b){this.settings.autosave=b},getLibraries:function(){return this.settings.libraries},setLibraries:function(b){this.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load(); +0>mxUtils.indexOf(this.settings.customLibraries,b)&&this.settings.customLibraries.push(b);mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,this.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return this.settings.customLibraries},getPlugins:function(){return this.settings.plugins},setPlugins:function(b){this.settings.plugins=b},getFormatWidth:function(){return parseInt(this.settings.formatWidth)},setFormatWidth:function(b){this.settings.formatWidth= +b},getCurrentEdgeStyle:function(){return this.settings.currentEdgeStyle},setCurrentEdgeStyle:function(b){this.settings.currentEdgeStyle=b},getCurrentVertexStyle:function(){return this.settings.currentVertexStyle},setCurrentVertexStyle:function(b){this.settings.currentVertexStyle=b},isCreateTarget:function(){return this.settings.createTarget},setCreateTarget:function(b){this.settings.createTarget=b},getPageFormat:function(){return this.settings.pageFormat},setPageFormat:function(b){this.settings.pageFormat= +b},save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete this.settings.isNew,this.settings.version=12,localStorage.setItem(mxSettings.key,JSON.stringify(this.settings))}catch(b){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key))},parse:function(b){null!=b&&(this.settings=JSON.parse(b),null==this.settings.plugins&&(this.settings.plugins=[]),null==this.settings.libraries&&(this.settings.libraries=Sidebar.prototype.defaultEntries), null==this.settings.customLibraries&&(this.settings.customLibraries=[]),null==this.settings.ui&&(this.settings.ui=""),null==this.settings.formatWidth&&(this.settings.formatWidth="240"),null!=this.settings.lastAlert&&delete this.settings.lastAlert,null==this.settings.currentEdgeStyle?this.settings.currentEdgeStyle=Graph.prototype.defaultEdgeStyle:10>=this.settings.version&&(this.settings.currentEdgeStyle.orthogonalLoop=1,this.settings.currentEdgeStyle.jettySize="auto"),null==this.settings.currentVertexStyle&& (this.settings.currentVertexStyle={}),null==this.settings.createTarget&&(this.settings.createTarget=!1),null==this.settings.pageFormat&&(this.settings.pageFormat=mxGraph.prototype.pageFormat),null==this.settings.search&&(this.settings.search=!0),null==this.settings.showStartScreen&&(this.settings.showStartScreen=!0),null==this.settings.gridColor&&(this.settings.gridColor=mxGraphView.prototype.gridColor),null==this.settings.autosave&&(this.settings.autosave=!0),null!=this.settings.scratchpadSeen&& delete this.settings.scratchpadSeen)},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load(); -App=function(a,c,f){EditorUi.call(this,a,c,null!=f?f:"1"==urlParams.lightbox);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\x3d":(new Image).src= -mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,c){var f=window.open(a);null==f||void 0===f?this.showDialog((new PopupDialog(this,a,b,c)).container,320,140,!0,!0):null!=b&&b()});this.updateUi();a=document.createElement("canvas");this.canvasSupported=!(!a.getContext||!a.getContext("2d"));window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.isOffline()||(EditDataDialog.placeholderHelpLink= -"https://support.draw.io/questions/9338941");this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;anavigator.userAgent.indexOf("MSIE")||9<=document.documentMode;if(!mxClient.IS_CHROMEAPP&&("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE|| null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"==urlParams.chrome&&(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript("https://js.live.net/v5.0/wl.js"):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient= -null),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var a=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=a&&0c.indexOf("DocumentClosedError")){a=c;var k=new Image;d=0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"images/3x3.png":"images/2x2.png";k.src=d+"?msg\x3d"+encodeURIComponent(c)+"\x26url\x3d"+encodeURIComponent(window.location.href)+"\x26lnum\x3d"+encodeURIComponent(b)+ -"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+(null!=e?"\x26colno\x3d"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"\x26stack\x3d"+encodeURIComponent(g.stack):"")}}catch(l){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height","0");c.setAttribute("src", -"offline.html");document.body.appendChild(c);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(a){return mxStencilRegistry.stencils[a]};mxStencilRegistry.loadStencilSet=function(a,c,b){a=a.substring(a.indexOf("/")+1);a="mxgraph."+a.substring(0,a.length-4).replace(/\//g,".");a=mxStencilRegistry.stencilSet[a];null!=a&&mxStencilRegistry.parseStencilSet(a,c,!1)};for(c=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=c;)"shapes"==c.nodeName&&null!=c.getAttribute("name")&& -(mxStencilRegistry.stencilSet[c.getAttribute("name").toLowerCase()]=c,mxStencilRegistry.parseStencilSet(c)),c=c.nextSibling}"0"!=urlParams.picker&&!mxClient.IS_QUIRKS&&8!=document.documentMode&&mxscript(document.location.protocol+"//www.google.com/jsapi?autoload\x3d%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");"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\x3dDrawGapiClientCallback")}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,STYLE_PATH+"/default.xml"],function(a){mxResources.parse(a[0].getText()); -1navigator.userAgent.indexOf("MSIE")||10<=document.documentMode))&&mxscript("https://js.live.net/v5.0/wl.js",window.DrawOneDriveClientCallback));"0"!=urlParams.chrome&&"1"==urlParams.test&& +null),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")),"0"!=urlParams.plugins&&"1"!=urlParams.offline)){var b=mxSettings.getPlugins(),c=urlParams.p;if(null!=c||null!=b&&0b.indexOf("DocumentClosedError")){c=b;var l=new Image;a=0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"images/3x3.png":"images/2x2.png";l.src=a+"?msg\x3d"+encodeURIComponent(b)+"\x26url\x3d"+encodeURIComponent(window.location.href)+"\x26lnum\x3d"+encodeURIComponent(e)+ +"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+(null!=f?"\x26colno\x3d"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"\x26stack\x3d"+encodeURIComponent(k.stack):"")}}catch(m){}};"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var f=document.createElement("iframe");f.setAttribute("width","0");f.setAttribute("height","0");f.setAttribute("src", +"offline.html");document.body.appendChild(f);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(b){return mxStencilRegistry.stencils[b]};mxStencilRegistry.loadStencilSet=function(b,a,c){b=b.substring(b.indexOf("/")+1);b="mxgraph."+b.substring(0,b.length-4).replace(/\//g,".");b=mxStencilRegistry.stencilSet[b];null!=b&&mxStencilRegistry.parseStencilSet(b,a,!1)};for(f=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=f;)"shapes"==f.nodeName&&null!=f.getAttribute("name")&& +(mxStencilRegistry.stencilSet[f.getAttribute("name").toLowerCase()]=f,mxStencilRegistry.parseStencilSet(f)),f=f.nextSibling}"0"!=urlParams.picker&&!mxClient.IS_QUIRKS&&8!=document.documentMode&&mxscript(document.location.protocol+"//www.google.com/jsapi?autoload\x3d%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");"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\x3dDrawGapiClientCallback")}"0"!=urlParams.math&&Editor.initMath();mxResources.loadDefaultBundle=!1;f=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[f]:[f,STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText()); +1navigator.userAgent.indexOf("MSIE")||10<=document.documentMode))&&mxscript("https://js.live.net/v5.0/wl.js",window.DrawOneDriveClientCallback));null!=b&&b(c);"0"!=urlParams.chrome&&"1"==urlParams.test&& (mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:","1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. \x3ca href\x3d"javascript:void(0);" onclick\x3d"location.reload();"\x3ePlease try refreshing.\x3c/a\x3e'})};mxUtils.extend(App,EditorUi); App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz\x3d30";App.prototype.micImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA5UlEQVR4Xr3SMYrCQBTGcSfIQiAgRIS9hOANBCurPUAuIAp7A7FVsFkIbLGYA9gKtoKNYG3jll5AFNKG518YMD6SISD4wY9J4MvkMYwRkZqOMSZkifGFe1b4pnvW3TqK8oMo14twxUgXPRSlDxU7TcUNPqATlG7wCi93cA2Iq2x7l7IJsgofB6UTiEjKklFqsabQSdFA5jqDAzrYQGeNNv5d9yDBEAME6NreFmP8Yuma4A8hFpiLSFNAYYYYn0jwCIUnxMcER4h1whS+7hseXKcu9ifGeQ+qeO8GjN7DPve+Q6+oewPhmE63Qfsb6AAAAABJRU5ErkJggg\x3d\x3d"; App.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg\x3d\x3d"; @@ -7327,343 +7327,344 @@ App.prototype.formatHideImage=!mxClient.IS_SVG?IMAGE_PATH+"/format-hide.png":"da App.prototype.fullscreenImage=!mxClient.IS_SVG?IMAGE_PATH+"/fullscreen.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAQMAAABsu86kAAAABlBMVEUAAABEREQ3UJNbAAAAAXRSTlMAQObYZgAAABxJREFUCNdj+PkBhA4YgNB5AwZ+BiACMiAiEFkA9QQNgW8IGoYAAAAASUVORK5CYII\x3d";App.prototype.plusImage=!mxClient.IS_SVG?IMAGE_PATH+"/plus.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII\x3d"; App.prototype.spinImage=!mxClient.IS_SVG?IMAGE_PATH+"/spin.gif":"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw\x3d\x3d"; App.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";App.prototype.mode=null;App.prototype.timeout=25E3;App.prototype.enableLogging=!0;App.prototype.formatEnabled="0"!=urlParams.format;App.prototype.formatWidth=600>screen.width?0:mxSettings.getFormatWidth();"1"!=urlParams.embed&&(App.prototype.menubarHeight=60);Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null; -App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);if(this.isLocalFileSave()){var a=this;ExportDialog.saveLocalFile=function(b,c,d){var e="text/xml";"svg"===d&&(e="image/svg+xml");a.saveLocalFile(b,c,e)};ExportDialog.saveRequest=function(b,c,d,e){a.saveRequest(b,c,d,e)}}this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);if("1"!=urlParams.embed){this.bg=this.createBackground();document.body.appendChild(this.bg); +App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);if(this.isLocalFileSave()){var b=this;ExportDialog.saveLocalFile=function(a,c,d){var e="text/xml";"svg"===d&&(e="image/svg+xml");b.saveLocalFile(a,c,e)};ExportDialog.saveRequest=function(a,c,d,e){b.saveRequest(a,c,d,e)}}this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);if("1"!=urlParams.embed){this.bg=this.createBackground();document.body.appendChild(this.bg); this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";var c=mxUtils.bind(this,function(){"undefined"!==typeof WL?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=c)});c();var f=mxUtils.bind(this,function(){if("undefined"!== typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='\x3ca href\x3d"https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target\x3d"_blank" title\x3d"IMPORTANT NOTICE" \x3eIMPORTANT NOTICE\x3c/a\x3e'))}));this.drive.addListener("userChanged", -mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load("auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})), +mxUtils.bind(this,function(){null!=this.updateAd&&(this.adsHtml=['\x3ca title\x3d"Quick start video" href\x3d"https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Quick start video\x3c/a\x3e','\x3ca title\x3d"Google Docs Add-on" href\x3d"https://chrome.google.com/webstore/detail/drawio-diagrams/clpbjldiohnnmfmkngmaohehlnfkmoea" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Google Docs Add-on\x3c/a\x3e', +'\x3ca title\x3d"Google Chrome App" href\x3d"https://chrome.google.com/webstore/detail/drawio-desktop/pebppomjfocnoigkeepgbmcifnnlndla" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Google Chrome App\x3c/a\x3e','\x3ca title\x3d"Please help us to 5 stars" href\x3d"https://chrome.google.com/webstore/detail/drawio-pro/onlkggianjhjenigcpigpjehhpplldkc/reviews" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Please help us to 5 stars\x3c/a\x3e'], +this.updateAd(this.adsHtml.length-1));this.updateUserElement();this.restoreLibraries();this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load("auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})), window.DrawGapiClientCallback=null):a()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=f)});f();var d=mxUtils.bind(this,function(){null!=window.Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&& -(window.DrawDropboxClientCallback=d)});d();"1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();var b=document.getElementById("geFooterItem2");if(null!=b){this.adsHtml=['\x3ca title\x3d"Quick start video" href\x3d"https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Quick start video\x3c/a\x3e']; -this.adsHtml.push(b.innerHTML);mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");var e=this.adsHtml.length-1;this.updateAd=function(a){a==e&&(a=this.adsHtml.length-1);a!=e&&(mxUtils.setPrefixedStyle(b.style,"transform","scale(0)"),b.style.opacity="0",e=a,window.setTimeout(mxUtils.bind(this,function(){b.innerHTML=this.adsHtml[a];mxUtils.setPrefixedStyle(b.style,"transform","scale(1)");b.style.opacity="1"}),1E3))};window.setInterval(mxUtils.bind(this,function(){if(3==this.adsHtml.length)this.updateAd(mxUtils.mod(e+ +(window.DrawDropboxClientCallback=d)});d();"1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();var a=document.getElementById("geFooterItem2");if(null!=a){this.adsHtml=['\x3ca title\x3d"Quick start video" href\x3d"https://www.youtube.com/watch?v\x3d8OaMWa4R1SE\x26t\x3d1" target\x3d"_blank"\x3e\x3cimg border\x3d"0" align\x3d"absmiddle" style\x3d"margin-top:-4px;" src\x3d"images/glyphicons_star.png"/\x3e\x26nbsp;\x26nbsp;Quick start video\x3c/a\x3e']; +this.adsHtml.push(a.innerHTML);mxUtils.setPrefixedStyle(a.style,"transition","all 1s ease");var e=this.adsHtml.length-1;this.updateAd=function(b){b==e&&(b=this.adsHtml.length-1);b!=e&&(mxUtils.setPrefixedStyle(a.style,"transform","scale(0)"),a.style.opacity="0",e=b,window.setTimeout(mxUtils.bind(this,function(){a.innerHTML=this.adsHtml[b];mxUtils.setPrefixedStyle(a.style,"transform","scale(1)");a.style.opacity="1"}),1E3))};window.setInterval(mxUtils.bind(this,function(){if(3==this.adsHtml.length)this.updateAd(mxUtils.mod(e+ 1,3));else{var a=Math.random();this.updateAd(Math.round(a*(this.adsHtml.length-1)))}}),3E5)}null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display= "none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));if(isLocalStorage||mxClient.IS_CHROMEAPP){this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle(); this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged")); this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor); mxSettings.save()}));mxClient.IS_CHROMEAPP&&(this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave());null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);if(!this.editor.chromeless&&null!=this.sidebar&&(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0)))this.toggleScratchpad(),mxSettings.save();this.addListener("formatWidthChanged", function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname}; -App.prototype.checkLicense=function(){var a=this.drive.getUser(),a=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=a){var c=a.lastIndexOf("@"),f=a;0<=c&&(f=a.substring(c+1));mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200==a.getStatus()){var b=a.getText();if(0e){var g="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain\x3d"+encodeURIComponent(c);f.style.height="100%";f.style.margin="0px";f.style.display= -"";0>e?(this.footerHeight=80,f.innerHTML='\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert geBlink"\x3e\x3ca href\x3d"'+g+'" style\x3d"padding-top:16px;" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseHasExpired",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"):(this.footerHeight=46,f.innerHTML= -'\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert"\x3e\x3ca href\x3d"'+g+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseWillExpire",[c,b.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");this.refresh()}}return d}; -App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.chromeless&&this.editor.graph.lightbox&&null==a.realtime?a.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))}; -App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var c=this.getRecent();if(null==c)c=[];else for(var f=0;ff;f++){c=f;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;a[f]=c}return a}; -App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,f=0;f>>8^this.crcTable[(c^a.charCodeAt(f))&255];return(c^-1)>>>0}; -App.prototype.getThumbnail=function(a,c){var f=!1;try{if(null==this.thumbImageCache&&(this.thumbImageCache={}),this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){c(a)}),a,this.thumbImageCache,"#ffffff",function(){c()}),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var d=this.editor.graph,b=document.createElement("canvas"),e=d.getGraphBounds(),g=a/e.width,g=Math.min(1,Math.min(3*a/(4*e.height),g)),k=Math.floor(e.x),l=Math.floor(e.y);b.setAttribute("width",Math.ceil(g* -(e.width+4)));b.setAttribute("height",Math.ceil(g*(e.height+4)));var m=b.getContext("2d");m.scale(g,g);m.translate(-k,-l);var n=d.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";m.save();m.fillStyle=n;m.fillRect(k,l,Math.ceil(e.width+4),Math.ceil(e.height+4));m.restore();var p=new mxJsCanvas(b),r=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var s=new mxImageExport;s.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(0.5, -0.5),a.shape.paint(b),b.translate(-0.5,-0.5),b.restore())};s.drawText=function(a,b){};s.drawState(d.getView().getState(d.model.root),r);r.finish(function(){s.drawState(d.getView().getState(d.model.root),p);c(b)});f=!0}}catch(q){}return f};App.prototype.getPublicUrl=function(a,c){c(null)}; -App.prototype.createFileData=function(a,c,f,d,b,e,g,k,l){b=null!=b?b:!1;l=null!=l?l:!0;var m=null,n=null;null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER?m="_blank":n=m=d;if(!e&&!b&&(g||null!=f&&/(\.html)$/i.test(f.getTitle())))return this.getHtml2(a,c,f.getTitle(),m,n,l);if(null==a)return"";g=a;if("mxfile"!=g.nodeName.toLowerCase()){m=this.editor.graph.zapGremlins(mxUtils.getXml(a));g=this.editor.graph.compress(m);if(this.editor.graph.decompress(g)!=m)return m;m=a.ownerDocument.createElement("diagram"); -mxUtils.setTextContent(m,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(m)}g.setAttribute("userAgent",navigator.userAgent);g.setAttribute("version",EditorUi.VERSION);g.setAttribute("editor","www.draw.io");a=null!=f?f.getMode():this.mode;null!=a&&g.setAttribute("type",a);a=mxUtils.getXml(g);if(e||!b&&null!=f&&/(\.svg)$/i.test(f.getTitle())){if(null!=f&&(f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,c,d,null,k,l,n)}return a}; -App.prototype.getFileData=function(a,c,f,d,b){b=null!=b?b:!0;var e=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var g=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(e)));mxUtils.setTextContent(this.currentPage.node,g);for(var e=this.fileNode.cloneNode(!1),k=0;k=window.location.hash.length)&&null!=urlParams.state&& -(null!=this.stateArg&&"open"==this.stateArg.action)&&null!=this.stateArg.ids)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?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):(mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){a=this.getDiagramId();var b=this.getCurrentFile();(null==b||b.getHash()!=a)&&this.loadFile(a,!0)})),b())}}}; -App.prototype.showSplash=function(a){this.editor.chromeless?this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()})):null==this.mode||a?(a=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();var a=new SplashDialog(this);this.showDialog(a.container,340,260,!0,!0);a.init()})),this.showDialog(a.container,isLocalStorage&&"1"==urlParams.browser?480:380,300,!0,!1),a.init()):null==urlParams.create&& -(a=new SplashDialog(this),this.showDialog(a.container,340,mxClient.IS_CHROMEAPP?180:260,!0,!0),a.init())}; -App.prototype.addLanguageMenu=function(a){var c=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language"))c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geSprite geSprite-globe",c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right="20px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(this.menus.get("language").funct); -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 b=mxUtils.getOffset(c);d.popup(b.x,b.y+c.offsetHeight,null,a);this.setCurrentMenu(d)})),a.appendChild(c);return c}; +App.prototype.checkLicense=function(){var b=this.drive.getUser(),b=("1"==urlParams.dev?urlParams.lic:null)||(null!=b?b.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=b){var c=b.lastIndexOf("@"),f=b;0<=c&&(f=b.substring(c+1));mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26ts\x3d"+(new Date).getTime(),mxUtils.bind(this,function(b){try{if(200==b.getStatus()){var a=b.getText();if(0e){var g="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain\x3d"+encodeURIComponent(c);f.style.height="100%";f.style.margin="0px";f.style.display= +"";0>e?(this.footerHeight=80,f.innerHTML='\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert geBlink"\x3e\x3ca href\x3d"'+g+'" style\x3d"padding-top:16px;" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseHasExpired",[c,a.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e"):(this.footerHeight=46,f.innerHTML= +'\x3ctable height\x3d"100%"\x3e\x3ctr\x3e\x3ctd valign\x3d"middle" align\x3d"center" class\x3d"geStatusAlert"\x3e\x3ca href\x3d"'+g+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"'+mxGraph.prototype.warningImage.src+'" align\x3d"top" style\x3d"margin-right:6px"\x3e'+mxResources.get("licenseWillExpire",[c,a.toLocaleDateString()])+"\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e");this.refresh()}}return d}; +App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.chromeless&&this.editor.graph.lightbox&&null==b.realtime?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var b=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile))}; +App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var c=this.getRecent();if(null==c)c=[];else for(var f=0;ff;f++){c=f;for(var d=0;8>d;d++)c=c&1?3988292384^c>>>1:c>>>1;b[f]=c}return b}; +App.prototype.crc32=function(b){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,f=0;f>>8^this.crcTable[(c^b.charCodeAt(f))&255];return(c^-1)>>>0}; +App.prototype.getThumbnail=function(b,c){var f=!1;try{if(null==this.thumbImageCache&&(this.thumbImageCache={}),this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){c(a)}),b,this.thumbImageCache,"#ffffff",function(){c()}),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var d=this.editor.graph,a=document.createElement("canvas"),e=d.getGraphBounds(),g=b/e.width,g=Math.min(1,Math.min(3*b/(4*e.height),g)),k=Math.floor(e.x),l=Math.floor(e.y);a.setAttribute("width",Math.ceil(g* +(e.width+4)));a.setAttribute("height",Math.ceil(g*(e.height+4)));var m=a.getContext("2d");m.scale(g,g);m.translate(-k,-l);var n=d.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";m.save();m.fillStyle=n;m.fillRect(k,l,Math.ceil(e.width+4),Math.ceil(e.height+4));m.restore();var p=new mxJsCanvas(a),r=new mxAsyncCanvas(this.thumbImageCache);p.images=this.thumbImageCache.images;var s=new mxImageExport;s.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(0.5, +0.5),a.shape.paint(b),b.translate(-0.5,-0.5),b.restore())};s.drawText=function(a,b){};s.drawState(d.getView().getState(d.model.root),r);r.finish(function(){s.drawState(d.getView().getState(d.model.root),p);c(a)});f=!0}}catch(q){}return f};App.prototype.getPublicUrl=function(b,c){c(null)}; +App.prototype.createFileData=function(b,c,f,d,a,e,g,k,l){a=null!=a?a:!1;l=null!=l?l:!0;var m=null,n=null;null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER?m="_blank":n=m=d;if(null==b)return"";var p=b;if("mxfile"!=p.nodeName.toLowerCase()){var r=this.editor.graph.zapGremlins(mxUtils.getXml(b)),p=this.editor.graph.compress(r);if(this.editor.graph.decompress(p)!=r)return r;r=b.ownerDocument.createElement("diagram");mxUtils.setTextContent(r,p);p=b.ownerDocument.createElement("mxfile"); +p.appendChild(r)}p.setAttribute("userAgent",navigator.userAgent);p.setAttribute("version",EditorUi.VERSION);p.setAttribute("editor","www.draw.io");b=null!=f?f.getMode():this.mode;null!=b&&p.setAttribute("type",b);b=mxUtils.getXml(p);if(!e&&!a&&(g||null!=f&&/(\.html)$/i.test(f.getTitle())))b=this.getHtml2(p,c,f.getTitle(),m,n,l);else if(e||!a&&null!=f&&/(\.svg)$/i.test(f.getTitle())){if(null!=f&&(f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER))d=null;b=this.getEmbeddedSvg(b,c,d,null,k, +l,n)}return b}; +App.prototype.getFileData=function(b,c,f,d,a,e){a=null!=a?a:!0;e=null!=e?e:!1;var g=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var k=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(g)));mxUtils.setTextContent(this.currentPage.node,k);g=this.fileNode.cloneNode(!1);if(e)g.appendChild(this.currentPage.node);else for(e=0;e=window.location.hash.length)&&null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("loading")))try{var c=mxUtils.bind(this,function(){this.spinner.spin(document.body, +mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["url"]))});b(decodeURIComponent(urlParams.url),mxUtils.bind(this,function(a){this.spinner.stop();if(null!=a&&0=window.location.hash.length)&&null!=e&&0=window.location.hash.length)&&null!=urlParams.state&&(null!=this.stateArg&&"open"==this.stateArg.action)&&null!=this.stateArg.ids)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?(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}}; +App.prototype.showSplash=function(b){this.editor.chromeless?this.handleError({message:mxResources.get("noFileSelected")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()})):null==this.mode||b?(b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();var b=new SplashDialog(this);this.showDialog(b.container,340,260,!0,!0);b.init()})),this.showDialog(b.container,isLocalStorage&&"1"==urlParams.browser?480:380,300,!0,!1),b.init()):null==urlParams.create&& +(b=new SplashDialog(this),this.showDialog(b.container,340,mxClient.IS_CHROMEAPP?180:260,!0,!0),b.init())}; +App.prototype.addLanguageMenu=function(b){var c=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language"))c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geSprite geSprite-globe",c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right="20px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(this.menus.get("language").funct); +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 a=mxUtils.getOffset(c);d.popup(a.x,a.y+c.offsetHeight,null,b);this.setCurrentMenu(d)})),b.appendChild(c);return c}; App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style= gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children= gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell"); -App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_DROPBOX)null!=this.dropbox&&this.dropbox.pickFile();else if(a==App.MODE_ONEDRIVE)null!=this.oneDrive&&this.oneDrive.pickFile();else if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():window.open("https://drive.google.com");else if(a==App.MODE_DEVICE&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type", -"file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&this.openFiles(c.files)}));c.click()}else{this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var f=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){0<(".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a== -App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var d=this.dialog,b=d.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=f;b.apply(d,arguments);null==this.getCurrentFile()&&this.showSplash()})}}; -App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE){var c=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:this.dropbox;null!=c&&c.pickLibrary(mxUtils.bind(this,function(a,d){null!=d?this.loadLibrary(d):this.spinner.spin(document.body,mxResources.get("loading"))&&c.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(b){this.handleError(b,mxResources.get("errorLoadingFile"))}}), -mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a==App.MODE_DEVICE&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if(null!=f.files)for(var a=0;aa.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,c,f,null==this.mode,d)})):null!=c&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}), -mxResources.get("saveAs"),mxResources.get("download"),null,null,c,this.isOffline()?null:"https://support.draw.io/questions/9338901",!0);this.showDialog(a.container,440,380,!0,!0);a.init()}}}; -App.prototype.createFile=function(a,c,f,d,b,e,g){d=null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var k=mxUtils.bind(this,function(a){this.spinner.stop();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});d==App.MODE_GOOGLE&&null!=this.drive?(g=null!=this.stateArg?this.stateArg.folderId:g,this.drive.insertFile(a,c,g,mxUtils.bind(this,function(a){this.spinner.stop(); -this.fileCreated(a,f,e,b)}),k)):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){this.spinner.stop();this.fileCreated(a,f,e,b)}),k):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){this.spinner.stop();this.fileCreated(a,f,e,b)}),k,!1,g):d==App.MODE_BROWSER?(this.spinner.stop(),d=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d, -f,e,b)}),k)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(this.spinner.stop(),this.fileCreated(new LocalFile(this,c,a),f,e,b))}}; -App.prototype.fileCreated=function(a,c,f,d){var b=window.location.pathname;null!=c&&0a.indexOf("."),/(\.svg)$/i.test(a),/(\.html)$/i.test(a)),null,b,f,null==this.mode,c)})):null!=b&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}), +mxResources.get("saveAs"),mxResources.get("download"),null,null,c,this.isOffline()?null:"https://support.draw.io/questions/9338901",!0);this.showDialog(b.container,440,380,!0,!0);b.init()}}}; +App.prototype.createFile=function(b,c,f,d,a,e,g){d=null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var k=mxUtils.bind(this,function(a){this.spinner.stop();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});d==App.MODE_GOOGLE&&null!=this.drive?(g=null!=this.stateArg?this.stateArg.folderId:g,this.drive.insertFile(b,c,g,mxUtils.bind(this,function(b){this.spinner.stop(); +this.fileCreated(b,f,e,a)}),k)):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,c,mxUtils.bind(this,function(b){this.spinner.stop();this.fileCreated(b,f,e,a)}),k):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,c,mxUtils.bind(this,function(b){this.spinner.stop();this.fileCreated(b,f,e,a)}),k,!1,g):d==App.MODE_BROWSER?(this.spinner.stop(),d=mxUtils.bind(this,function(){var d=new StorageFile(this,c,b);d.saveFile(b,!1,mxUtils.bind(this,function(){this.fileCreated(d, +f,e,a)}),k)}),null==localStorage.getItem(b)?d():this.confirm(mxResources.get("replaceIt",[b]),d,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(this.spinner.stop(),this.fileCreated(new LocalFile(this,c,b),f,e,a))}}; +App.prototype.fileCreated=function(b,c,f,d){var a=window.location.pathname;null!=c&&0g.getStatus()|| -299c.getStatus()|| +299=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0)}}; -App.prototype.toggleCompactMode=function(a){!a&&"none"==this.appIcon.style.display?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility= +"atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding="2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement); +var f=this.hsplitPosition,d=!1;mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!d);this.toggleFormatPanel(!d);this.hsplitPosition=!d?0:f;this.hideFooter();d=!d;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top= +"8px",this.fullscreenElement.style.top="8px");"1"!=urlParams.embed&&""!=urlParams.url&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("href","javascript:void(0);"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color= +"#666",this.toggleElement.style.top="5px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat",mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,function(a){this.toggleCompactMode();mxEvent.consume(a)})), +"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement));740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0)}}; +App.prototype.toggleCompactMode=function(b){!b&&"none"==this.appIcon.style.display?(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display="block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility= "visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')"):(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="4px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none", this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility="hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')")}; App.prototype.updateUserElement=function(){if((null==this.drive||null==this.drive.getUser())&&(null==this.oneDrive||null==this.oneDrive.getUser())&&(null==this.dropbox||null==this.dropbox.getUser()))null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null);else{null==this.userElement&&(this.userElement=document.createElement("a"),this.userElement.setAttribute("href","javascript:void(0);"),this.userElement.className="geItem",this.userElement.style.position= "absolute",this.userElement.style.fontSize="8pt",this.userElement.style.top="4px",this.userElement.style.right="30px",this.userElement.style.color="#666",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement), -mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var f=document.createElement("div");f.className="geDialog";f.style.position="absolute";f.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";f.style.right="36px";f.style.padding="0px";this.userPanel=f}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var d=!1;this.userPanel.innerHTML="";f=document.createElement("img");f.setAttribute("src", +mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(b){if(null==this.userPanel){var f=document.createElement("div");f.className="geDialog";f.style.position="absolute";f.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";f.style.right="36px";f.style.padding="0px";this.userPanel=f}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var d=!1;this.userPanel.innerHTML="";f=document.createElement("img");f.setAttribute("src", Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get("close"));f.className="geDialogClose";f.style.top="8px";f.style.right="8px";mxEvent.addListener(f,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(f);null!=this.drive&&(f=this.drive.getUser(),null!=f&&(d=!0,this.userPanel.innerHTML+='\x3ctable title\x3d"User ID: '+f.id+'" style\x3d"font-size:10pt;padding:20px 20px 10px 10px;"\x3e\x3ctr\x3e\x3ctd valign\x3d"top"\x3e'+ (null!=f.pictureUrl?'\x3cimg style\x3d"margin-right:10px;border-radius:50%;" src\x3d"'+f.pictureUrl+'"/\x3e':'\x3cimg style\x3d"margin-right:4px;margin-top:2px;" src\x3d"'+this.defaultUserPicture+'"/\x3e')+'\x3c/td\x3e\x3ctd valign\x3d"top" style\x3d"white-space:nowrap;'+(null!=f.pictureUrl?"padding-top:14px;":"")+'"\x3e\x3cb\x3e'+mxUtils.htmlEntities(f.displayName)+"\x3c/b\x3e\x3cbr\x3e\x3csmall\x3e"+mxUtils.htmlEntities(f.email)+"\x3c/small\x3e\x3c/tr\x3e\x3c/table\x3e",f=document.createElement("div"), f.style.textAlign="center",f.style.padding="12px",f.style.background="whiteSmoke",f.style.borderTop="1px solid #e0e0e0",f.style.whiteSpace="nowrap",f.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";a.close();window.setTimeout(mxUtils.bind(this, -function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(f)));f=mxUtils.bind(this,function(a,c,f){null!=a&&(d&&this.userPanel.appendChild(document.createElement("hr")),d=!0,this.userPanel.innerHTML+='\x3ctable style\x3d"font-size:10pt;padding:20px 20px 10px 10px;"\x3e\x3ctr\x3e\x3ctd valign\x3d"top"\x3e'+ -(null!=c?'\x3cimg style\x3d"margin-right:10px;" src\x3d"'+c+'" width\x3d"40" height\x3d"40"/\x3e\x3c/td\x3e':"")+'\x3ctd valign\x3d"middle" style\x3d"white-space:nowrap;"\x3e\x3cb\x3e'+mxUtils.htmlEntities(a.displayName)+"\x3c/b\x3e"+(null!=a.email?'\x3cbr\x3e\x3cfont color\x3d"gray"\x3e'+mxUtils.htmlEntities(a.email)+"\x3c/font\x3e\x3c/td\x3e":"")+"\x3c/tr\x3e\x3c/table\x3e",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop= -"1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=f&&a.appendChild(mxUtils.button(mxResources.get("signOut"),f)),this.userPanel.appendChild(a))});null!=this.dropbox&&f(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),c):c()}else this.dropbox.logout()})); -null!=this.oneDrive&&f(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),c):c()}else this.oneDrive.logout()}));d||(f=document.createElement("div"),f.style.textAlign="center",f.style.padding="20px 20px 10px 10px",f.innerHTML=mxResources.get("notConnected"), -this.userPanel.appendChild(f));document.body.appendChild(this.userPanel)}mxEvent.consume(a)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){!mxEvent.isConsumed(a)&&null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()&& -(a=this.dropbox.getUser());null!=a?(this.userElement.innerHTML="",mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block"):this.userElement.style.display="none"}}; -(function(){var a=!1,c=EditorUi.prototype.pasteCells;EditorUi.prototype.pasteCells=function(f,d){var b=d.getElementsByTagName("span");if(null!=b&&0navigator.userAgent.indexOf("MSIE")||10<=document.documentMode);a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container, -320,220,!0,!0)};a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...", -function(){var b=a.getCurrentFile();null==b||b.constructor!=DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile?a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok")):a.spinner.spin(document.body,mxResources.get("loading"))&&(b.constructor==DropboxFile?a.dropbox.client.revisions(b.stat.path,{limit:100},function(c,d){a.spinner.stop();if(null==c){for(var e=[],g=d.length-1;0<=g;g--)(function(c){e.push({modifiedDate:c.clientModifiedAt, -fileSize:c.size,getXml:function(d,e){a.dropbox.client.readFile("/"+b.stat.path,{versionTag:c.versionTag},mxUtils.bind(this,function(a,b){null==a?d(b):e(a)}))},getUrl:function(){return a.getUrl(window.location.pathname+"?rev\x3d"+c.versionTag+"\x26chrome\x3d0\x26edit\x3d_blank")+window.location.hash}})})(d[g]);g=new RevisionDialog(a,e);a.showDialog(g.container,640,480,!0,!0);g.init()}else a.handleError(c)}):a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop(); -for(var d=0;dnavigator.userAgent.indexOf("MSIE")||10<=document.documentMode);b.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");b.actions.addAction("new...",function(){var a=b.isOffline(),c=new NewDialog(b,a);b.showDialog(c.container,a?350:620,a?70:440,!0,!0,function(a){a&&null==b.getCurrentFile()&&b.showSplash()});c.init()});b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container, +320,220,!0,!0)};b.actions.addAction("open...",function(){b.pickFile()});b.actions.addAction("close",function(){b.fileLoaded(null)});b.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var a=d.getSelectionCell(),c=d.view.getState(a);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(a=new EditShapeDialog(b,a,mxResources.get("editShape")+":",630,400),b.showDialog(a.container,640,480,!0,!1),a.init())}}));b.actions.addAction("revisionHistory...", +function(){var a=b.getCurrentFile();null==a||a.constructor!=DriveFile&&a.constructor!=DropboxFile||null==b.drive&&a.constructor==DriveFile||null==b.dropbox&&a.constructor==DropboxFile?b.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok")):b.spinner.spin(document.body,mxResources.get("loading"))&&(a.constructor==DropboxFile?b.dropbox.client.revisions(a.stat.path,{limit:100},function(c,d){b.spinner.stop();if(null==c){for(var e=[],g=d.length-1;0<=g;g--)(function(c){e.push({modifiedDate:c.clientModifiedAt, +fileSize:c.size,getXml:function(d,e){b.dropbox.client.readFile("/"+a.stat.path,{versionTag:c.versionTag},mxUtils.bind(this,function(a,b){null==a?d(b):e(a)}))},getUrl:function(){return b.getUrl(window.location.pathname+"?rev\x3d"+c.versionTag+"\x26chrome\x3d0\x26edit\x3d_blank")+window.location.hash}})})(d[g]);g=new RevisionDialog(b,e);b.showDialog(g.container,640,480,!0,!0);g.init()}else b.handleError(c)}):b.drive.executeRequest(gapi.client.drive.revisions.list({fileId:a.getId()}),function(c){b.spinner.stop(); +for(var d=0;d=a.pages.length,c=document.createElement("div");c.style.padding="6px";var e=document.createElement("input");e.style.marginRight="8px";e.setAttribute("type","checkbox");d.isSelectionEmpty()?e.setAttribute("disabled","disabled"):(e.setAttribute("checked","checked"),e.defaultChecked= -!0);c.appendChild(e);mxUtils.write(c,mxResources.get("selectionOnly"));var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";b&&(mxUtils.br(c),c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("xml",!g.checked,null,!e.checked)}),null,mxResources.get("export"));a.showDialog(c.container,300,b?120: -80,!0,!0)}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function l(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&& -a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,k=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;k.apply(g,arguments);b&&null==a.getCurrentFile()&& -"1"!=urlParams.embed&&a.showSplash()}}}function m(b){b.pickFile(function(c){if(a.spinner.spin(document.body,mxResources.get("loading")))if(b==a.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";a.loadUrl(c,function(a){n(a,d,c)},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else b.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"): -null)},!0)},!0)}var n=mxUtils.bind(this,function(b,c,e){"image/png"==c?a.loadImage(b,mxUtils.bind(this,function(g){a.resizeImage(g,b,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(a.maxImageSize/k,a.maxImageSize/l));a.importFile(b,c,0,0,Math.round(k*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b)})}),!0)})):a.importFile(b,c,0,0,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b)})});null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){m(a.drive)}, -c):e&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){m(a.dropbox)},c):g&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){m(a.oneDrive)},c):k&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){}, -c,null,!1);b.addSeparator(c);b.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0=b.pages.length,c=document.createElement("div");c.style.padding="6px";var e=document.createElement("input");e.style.marginRight="8px";e.setAttribute("type","checkbox");d.isSelectionEmpty()?e.setAttribute("disabled","disabled"):(e.setAttribute("checked","checked"),e.defaultChecked= +!0);c.appendChild(e);mxUtils.write(c,mxResources.get("selectionOnly"));var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;g.style.marginRight="8px";g.style.marginTop="16px";a&&(mxUtils.br(c),c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));c=new CustomDialog(b,c,mxUtils.bind(this,function(){b.downloadFile("xml",!g.checked,null,!e.checked)}),null,mxResources.get("export"));b.showDialog(c.container,300,a?120: +80,!0,!0)}),c);b.isOffline()||(a.addSeparator(c),this.addMenuItem(a,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(a,c){function l(a){if(a&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&& +b.importFiles(c.files,null,null,b.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!a;window.openFile=new OpenFile(function(a){b.hideDialog(a)});window.openFile.setConsumer(function(a,c){d.setSelectionCells(b.importXml(a))});b.showDialog((new OpenDialog(b)).container,360,220,!0,!0,function(){window.openFile=null});var g=b.dialog,k=g.close;b.dialog.close=function(a){Editor.useLocalStorage=e;k.apply(g,arguments);a&&null==b.getCurrentFile()&& +"1"!=urlParams.embed&&b.showSplash()}}}function m(a){a.pickFile(function(c){if(b.spinner.spin(document.body,mxResources.get("loading")))if(a==b.dropbox){var d=/(\.png)$/i.test(c)?"image/png":"text/xml";b.loadUrl(c,function(a){n(a,d,c)},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)},"image/png"==d)}else a.getFile(c,function(a){var b=/(\.png)$/i.test(a.getTitle())?"image/png":"text/xml";n(a.getData(),b,a.getTitle())},function(a){b.handleError(a,null!=a?mxResources.get("errorLoadingFile"): +null)},!0)},!0)}var n=mxUtils.bind(this,function(a,c,e){"image/png"==c?b.loadImage(a,mxUtils.bind(this,function(g){b.resizeImage(g,a,mxUtils.bind(this,function(g,k,l){g=Math.min(1,Math.min(b.maxImageSize/k,b.maxImageSize/l));b.importFile(a,c,0,0,Math.round(k*g),Math.round(l*g),e,function(a){b.spinner.stop();d.setSelectionCells(a)})}),!0)})):b.importFile(a,c,0,0,0,0,e,function(a){b.spinner.stop();d.setSelectionCells(a)})});null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){m(b.drive)}, +c):e&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){m(b.dropbox)},c):g&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){m(b.oneDrive)},c):k&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){}, +c,null,!1);a.addSeparator(c);a.addItem(mxResources.get("browser")+"...",null,function(){l(!1)},c);mxClient.IS_IOS||a.addItem(mxResources.get("device")+"...",null,function(){l(!0)},c);b.isOffline()||(a.addSeparator(c),a.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(b,"",mxResources.get("import"),function(a){if(null!=a&&0this.tabContainer.clientWidth- +Graph.prototype.setViewState=function(b){null!=b?(this.lastPasteXml=b.lastPasteXml,this.pasteCounter=b.pasteCounter||0,this.mathEnabled=b.mathEnabled,this.gridEnabled=b.gridEnabled,this.gridSize=b.gridSize,this.graphHandler.guidesEnabled=b.guidesEnabled,this.foldingEnabled=b.foldingEnabled,this.setShadowVisible(b.shadowVisible,!1),this.scrollbars=b.scrollbars,this.pageVisible=b.pageVisible,this.background=b.background,this.backgroundImage=b.backgroundImage,this.pageScale=b.pageScale,this.pageFormat= +b.pageFormat,this.view.scale=b.scale,this.view.currentRoot=b.currentRoot,this.defaultParent=b.defaultParent,this.setTooltips(b.tooltips),this.setConnectable(b.connect),null!=b.translate&&(this.view.translate=b.translate),this.preferPageSize=this.pageBreaksVisible=this.pageVisible):(this.lastPasteXml=this.view.currentRoot=null,this.pasteCounter=0,this.mathEnabled=!1)}; +EditorUi.prototype.updatePageRoot=function(b){if(null==b.root){var c=this.editor.extractGraphModel(b.node);if(null!=c){b.graphModelNode=c;b.viewState=this.editor.graph.createViewState(c);var f=new mxCodec(c.ownerDocument);b.root=f.decode(c).root}else b.root=this.editor.graph.model.createRoot()}}; +EditorUi.prototype.selectPage=function(b){this.editor.graph.stopEditing();b=new SelectPage(this,b);b.execute();var c=new mxUndoableEdit(this,!0);c.add(b);this.editor.graph.view.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))};EditorUi.prototype.selectNextPage=function(b){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),b&&cthis.tabContainer.clientWidth- f){null!=d&&(d.style.position="absolute",d.style.right="0px",c.style.marginRight="30px");var g=this.createControlTab(4,"\x26nbsp;\x26#10094;\x26nbsp;");g.style.position="absolute";g.style.right=this.editor.chromeless?"29px":"55px";g.style.fontSize="13pt";this.tabContainer.appendChild(g);var k=this.createControlTab(4,"\x26nbsp;\x26#10095;");k.style.position="absolute";k.style.right=this.editor.chromeless?"0px":"29px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var l=Math.max(0,this.tabContainer.clientWidth- (this.editor.chromeless?86:116));c.style.width=l+"px";mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){c.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(g,0a.getStatus()||299a.getStatus()||299' + -// '  Quick start video', -// '' + -// '  Google Docs Add-on', -// '' + -// '  Google Chrome App', -// '' + -// '  Please help us to 5 stars']; -// this.updateAd(this.adsHtml.length - 1); -// } + if (this.updateAd != null) + { + this.adsHtml = ['' + + '  Quick start video', + '' + + '  Google Docs Add-on', + '' + + '  Google Chrome App', + '' + + '  Please help us to 5 stars']; + this.updateAd(this.adsHtml.length - 1); + } this.updateUserElement(); this.restoreLibraries(); @@ -1596,11 +1603,7 @@ App.prototype.createFileData = function(node, graph, file, url, forceXml, forceS redirect = editLink; } - if (!forceSvg && !forceXml && (forceHtml || (file != null && /(\.html)$/i.test(file.getTitle())))) - { - return this.getHtml2(node, graph, file.getTitle(), editLink, redirect, ignoreSelection); - } - else if (node == null) + if (node == null) { return ''; } @@ -1608,7 +1611,7 @@ App.prototype.createFileData = function(node, graph, file, url, forceXml, forceS { var fileNode = node; - // Ignores case for for possible HTML or XML nodes + // Ignores case for possible HTML or XML nodes if (fileNode.nodeName.toLowerCase() != 'mxfile') { // Removes control chars in input for correct roundtrip check @@ -1643,9 +1646,14 @@ App.prototype.createFileData = function(node, graph, file, url, forceXml, forceS } var xml = mxUtils.getXml(fileNode); - + + // Writes the file as an embedded HTML file + if (!forceSvg && !forceXml && (forceHtml || (file != null && /(\.html)$/i.test(file.getTitle())))) + { + xml = this.getHtml2(fileNode, graph, file.getTitle(), editLink, redirect, ignoreSelection); + } // Maps the XML data to the content attribute in the SVG node - if (forceSvg || (!forceXml && file != null && /(\.svg)$/i.test(file.getTitle()))) + else if (forceSvg || (!forceXml && file != null && /(\.svg)$/i.test(file.getTitle()))) { if (file != null && (file.getMode() == App.MODE_DEVICE || file.getMode() == App.MODE_BROWSER)) { @@ -1665,9 +1673,11 @@ App.prototype.createFileData = function(node, graph, file, url, forceXml, forceS * @param {number} dx X-coordinate of the translation. * @param {number} dy Y-coordinate of the translation. */ -App.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection) +App.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCallback, ignoreSelection, currentPage) { ignoreSelection = (ignoreSelection != null) ? ignoreSelection : true; + currentPage = (currentPage != null) ? currentPage : false; + var node = this.editor.getGraphXml(ignoreSelection); if (ignoreSelection && this.fileNode != null && this.currentPage != null) @@ -1676,28 +1686,35 @@ App.prototype.getFileData = function(forceXml, forceSvg, forceHtml, embeddedCall mxUtils.setTextContent(this.currentPage.node, data); node = this.fileNode.cloneNode(false); - // Restores order of pages - for (var i = 0; i < this.pages.length; i++) + if (currentPage) { - var mapping = this.pages[i].mapping; - - // Updates XML of all pages for realtime - if (this.currentPage != this.pages[i] && mapping != null && mapping.needsUpdate) + node.appendChild(this.currentPage.node); + } + else + { + // Restores order of pages + for (var i = 0; i < this.pages.length; i++) { - var enc = new mxCodec(mxUtils.createXmlDocument()); - var temp = enc.encode(mapping.graphModel); - - // Uses the graph state from the realtime model - mapping.writeRealtimeToNode(temp); - - var data = this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(temp))); - mxUtils.setTextContent(this.pages[i].node, data); + var mapping = this.pages[i].mapping; - // Marks the page as up-to-date - mapping.needsUpdate = false; + // Updates XML of all pages for realtime + if (this.currentPage != this.pages[i] && mapping != null && mapping.needsUpdate) + { + var enc = new mxCodec(mxUtils.createXmlDocument()); + var temp = enc.encode(mapping.graphModel); + + // Uses the graph state from the realtime model + mapping.writeRealtimeToNode(temp); + + var data = this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(temp))); + mxUtils.setTextContent(this.pages[i].node, data); + + // Marks the page as up-to-date + mapping.needsUpdate = false; + } + + node.appendChild(this.pages[i].node); } - - node.appendChild(this.pages[i].node); } } @@ -1858,10 +1875,7 @@ App.prototype.getDiagramId = function() }; /** - * Main function. Program starts here. - * - * @param {number} dx X-coordinate of the translation. - * @param {number} dy Y-coordinate of the translation. + * Opens any file specified in the URL parameters. */ App.prototype.open = function() { @@ -2123,7 +2137,24 @@ App.prototype.start = function() }), onerror, /(\.png)($|\?)/i.test(url)); }); - if (urlParams['url'] != null && this.spinner.spin(document.body, mxResources.get('loading'))) + // Listens to changes of the hash if not in embed or client mode + if (urlParams['client'] != '1' && urlParams['embed'] != '1') + { + // KNOWN: Does not work in quirks mode + mxEvent.addListener(window, 'hashchange', mxUtils.bind(this, function(evt) + { + var id = this.getDiagramId(); + var file = this.getCurrentFile(); + + if (file == null || file.getHash() != id) + { + this.loadFile(id, true); + } + })); + } + + if ((window.location.hash == null || window.location.hash.length <= 1) && + urlParams['url'] != null && this.spinner.spin(document.body, mxResources.get('loading'))) { try { @@ -2308,7 +2339,8 @@ App.prototype.start = function() var value = decodeURIComponent(urlParams['create'] || ''); - if (value != null && value.length > 0 && this.spinner.spin(document.body, mxResources.get('loading'))) + if ((window.location.hash == null || window.location.hash.length <= 1) && + value != null && value.length > 0 && this.spinner.spin(document.body, mxResources.get('loading'))) { var reconnect = mxUtils.bind(this, function() { @@ -2422,19 +2454,6 @@ App.prototype.start = function() } else { - // Listens to changes of the hash - // Known: Does not work in quirks mode - mxEvent.addListener(window, 'hashchange', mxUtils.bind(this, function(evt) - { - var id = this.getDiagramId(); - var file = this.getCurrentFile(); - - if (file == null || file.getHash() != id) - { - this.loadFile(id, true); - } - })); - done(); } } @@ -3141,79 +3160,47 @@ App.prototype.fileCreated = function(file, libs, replace, done) { this.spinner.stop(); - if (this.mode == null && (urlParams['create'] != null || urlParams['url'] != null)) + var fn2 = mxUtils.bind(this, function() { + window.openFile = null; + this.fileLoaded(file); + + if (libs != null) + { + this.sidebar.showEntries(libs); + } + + if (done != null) + { + done(); + } + }); + + // Updates the file if it has been overwritten + if (!replace && this.getCurrentFile() != null && this.mode != null) + { + // Opens local file in a new window if (file.constructor == LocalFile) { - // LATER: Remove create, title and mode URL params - this.fileLoaded(file); - } - else if (this.spinner.spin(document.body, mxResources.get('inserting'))) - { - // Makes sure the file is not loaded when the hash changes - this.setCurrentFile(file); - window.location.hash = file.getHash(); - - // Removes create URL parameter and reloads page - window.location.search = this.getSearch(['create', 'title', 'notitle', 'mode', 'url']); + window.openFile = new OpenFile(function() + { + window.openFile = null; + }); + + window.openFile.setData(file.getData(), file.getTitle()); } + + window.openWindow(url, null, fn2); } else { - var fn2 = mxUtils.bind(this, function() - { - // Replaces current URL for non-local files if user wants to open in same window - if (file.constructor != LocalFile && (urlParams['create'] != null || urlParams['url'] != null)) - { - this.setCurrentFile(file); - window.location.hash = file.getHash(); - - // Removes URL parameters and reloads page - window.location.search = this.getSearch(['create', 'title', 'notitle', 'mode', 'url']); - } - else - { - window.openFile = null; - this.fileLoaded(file); - - if (libs != null) - { - this.sidebar.showEntries(libs); - } - } - - if (done != null) - { - done(); - } - }); - - // Updates the file if it has been overwritten - if (!replace && (this.getCurrentFile() != null && (decodeURIComponent(this.getDiagramId()) != - decodeURIComponent(file.getHash()) || file.constructor == LocalFile))) - { - // Opens local file in a new window - if (file.constructor == LocalFile) - { - window.openFile = new OpenFile(function() - { - window.openFile = null; - }); - - window.openFile.setData(file.getData(), file.getTitle()); - } - - window.openWindow(url, null, fn2); - } - else - { - fn2(); - } + fn2(); } }); - // Updates data in memory for local files - if (file.constructor == LocalFile) + // Updates data in memory for local files and save is implicit + // via start of realtime for DriveFiles + if (file.constructor == LocalFile || file.constructor == DriveFile) { fn(); } @@ -4087,8 +4074,10 @@ App.prototype.fileLoaded = function(file) { try { - file.open(); + // Order is significant, current file needed for correct + // file format for initial save after starting realtime this.setCurrentFile(file); + file.open(); this.diagramContainer.style.visibility = ''; this.formatContainer.style.visibility = ''; @@ -4560,44 +4549,6 @@ EditorUi.prototype.exportSvg = function(scale, transparentBackground, ignoreSele } }; -/** - * Translates this point by the given vector. - * - * @param {number} dx X-coordinate of the translation. - * @param {number} dy Y-coordinate of the translation. - */ -App.prototype.getOrCreateVoiceButton = function() -{ - if (this.voiceButton == null) - { - this.voiceButton = document.createElement('div'); - this.voiceButton.className = 'geBtn'; - this.voiceButton.style.width = '140px'; - this.voiceButton.style.minWidth = '140px'; - this.voiceButton.style.textOverflow = 'ellipsis'; - this.voiceButton.style.overflowX = 'hidden'; - this.voiceButton.style.fontWeight = 'bold'; - this.voiceButton.style.textAlign = 'center'; - this.voiceButton.style.display = 'inline-block'; - this.voiceButton.style.padding = '0 10px 0 10px'; - this.voiceButton.style.marginTop = '-4px'; - this.voiceButton.style.height = '28px'; - this.voiceButton.style.lineHeight = '28px'; - this.voiceButton.style.color = '#235695'; - - if (this.buttonContainer.firstChild != null) - { - this.buttonContainer.insertBefore(this.voiceButton, this.buttonContainer.firstChild); - } - else - { - this.buttonContainer.appendChild(this.voiceButton); - } - } - - return this.voiceButton; -}; - /** * Translates this point by the given vector. * @@ -5420,7 +5371,12 @@ App.prototype.downloadFile = function(format, nonCompressed, addShadow, ignoreSe else { var bounds = this.editor.graph.getGraphBounds(); - var data = this.getFileData(true, null, null, null, ignoreSelection); + + // Exports only current page for PDF since it does not contain file data, but for + // the other formats with XML included we need to send the complete data and use + // the from/to URL parameters to specify the page to be exported. + var data = this.getFileData(true, null, null, null, ignoreSelection, format != 'xmlpng'); + var range = ''; if (bounds.width * bounds.height <= MAX_AREA && data.length <= MAX_REQUEST_SIZE) { @@ -5431,11 +5387,24 @@ App.prototype.downloadFile = function(format, nonCompressed, addShadow, ignoreSe embed = '1'; format = 'png'; filename = basename + '.' + format; + + // Finds the current page number + if (this.pages != null && this.currentPage != null) + { + for (var i = 0; i < this.pages.length; i++) + { + if (this.pages[i] == this.currentPage) + { + range = '&from=' + i; + break; + } + } + } } this.saveRequest(data, filename, format, function(newTitle, base64) { - return new mxXmlRequest(EXPORT_URL, 'format=' + format + + return new mxXmlRequest(EXPORT_URL, 'format=' + format + range + '&base64=' + base64 + '&embedXml=' + embed + '&xml=' + encodeURIComponent(data) + ((newTitle != null) ? '&filename=' + encodeURIComponent(newTitle) : '')); @@ -5902,7 +5871,7 @@ App.prototype.updateHeader = function() this.toggleFormatElement.style.position = 'absolute'; this.toggleFormatElement.style.display = 'inline-block'; this.toggleFormatElement.style.top = '5px'; - this.toggleFormatElement.style.right = '26px'; + this.toggleFormatElement.style.right = (uiTheme != 'atlas' && urlParams['embed'] != '1') ? '26px' : '10px'; this.toggleFormatElement.style.padding = '2px'; this.toggleFormatElement.style.fontSize = '14px'; this.toggleFormatElement.className = (uiTheme != 'atlas') ? 'geButton' : ''; @@ -5935,7 +5904,7 @@ App.prototype.updateHeader = function() this.fullscreenElement.style.position = 'absolute'; this.fullscreenElement.style.display = 'inline-block'; this.fullscreenElement.style.top = '5px'; - this.fullscreenElement.style.right = '42px'; + this.fullscreenElement.style.right = (uiTheme != 'atlas' && urlParams['embed'] != '1') ? '42px' : '26px'; this.fullscreenElement.style.padding = '2px'; this.fullscreenElement.style.fontSize = '14px'; this.fullscreenElement.className = (uiTheme != 'atlas') ? 'geButton' : ''; @@ -5951,7 +5920,7 @@ App.prototype.updateHeader = function() mxEvent.addListener(this.fullscreenElement, 'click', mxUtils.bind(this, function(evt) { - if (uiTheme != 'atlas') + if (uiTheme != 'atlas' && urlParams['embed'] != '1') { this.toggleCompactMode(!collapsed); } diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js index bcfca07d..b3df598b 100644 --- a/war/js/diagramly/EditorUi.js +++ b/war/js/diagramly/EditorUi.js @@ -5195,7 +5195,7 @@ this.toolbar.container.appendChild(div); this.toolbar.staticElements.push(div); - div.style.right = '42px'; + div.style.right = (uiTheme != 'atlas') ? '52px' : '42px'; } }; diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js index 1ae3072d..9d8520fe 100644 --- a/war/js/embed-static.min.js +++ b/war/js/embed-static.min.js @@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;enavigator.userAgent.indexOf("MSIE")&& +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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.6.0.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -898,16 +898,16 @@ mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c 0) - { - if (cells.length == 1 && graph.model.isEdge(cells[0])) - { - graph.setSelectionCell(graph.model.getTerminal(cells[0], false)); - } - else - { - graph.setSelectionCell(cells[cells.length - 1]); - } - - if (editorUi.hoverIcons != null) - { - editorUi.hoverIcons.update(graph.view.getState(graph.getSelectionCell())); - } - } - }; - } - else - { - // Avoids consuming event if no vertex is selected by returning null below - // Cursor keys move and resize (ctrl) cells - if (this.isControlDown(evt)) - { - return function() - { - nudge(evt.keyCode, (mxEvent.isShiftDown(evt)) ? graph.gridSize : null, true); - }; - } - else - { - return function() - { - nudge(evt.keyCode, (mxEvent.isShiftDown(evt)) ? graph.gridSize : null); - }; - } - } - } - } - - return keyHandlerGetFunction.apply(this, arguments); - }; - var queue = []; var thread = null; @@ -3601,6 +3538,68 @@ EditorUi.prototype.createKeyHandler = function(editor) }, 200); }; + // Overridden to handle special alt+shift+cursor keyboard shortcuts + var directions = {37: mxConstants.DIRECTION_WEST, 38: mxConstants.DIRECTION_NORTH, + 39: mxConstants.DIRECTION_EAST, 40: mxConstants.DIRECTION_SOUTH}; + + var keyHandlerGetFunction = keyHandler.getFunction; + + mxKeyHandler.prototype.getFunction = function(evt) + { + if (directions[evt.keyCode] != null && !graph.isSelectionEmpty()) + { + if (mxEvent.isShiftDown(evt) && mxEvent.isAltDown(evt)) + { + if (graph.model.isVertex(graph.getSelectionCell())) + { + return function() + { + var cells = graph.connectVertex(graph.getSelectionCell(), directions[evt.keyCode], + graph.defaultEdgeLength, evt, true); + + if (cells != null && cells.length > 0) + { + if (cells.length == 1 && graph.model.isEdge(cells[0])) + { + graph.setSelectionCell(graph.model.getTerminal(cells[0], false)); + } + else + { + graph.setSelectionCell(cells[cells.length - 1]); + } + + if (editorUi.hoverIcons != null) + { + editorUi.hoverIcons.update(graph.view.getState(graph.getSelectionCell())); + } + } + }; + } + } + else + { + // Avoids consuming event if no vertex is selected by returning null below + // Cursor keys move and resize (ctrl) cells + if (this.isControlDown(evt)) + { + return function() + { + nudge(evt.keyCode, (mxEvent.isShiftDown(evt)) ? graph.gridSize : null, true); + }; + } + else + { + return function() + { + nudge(evt.keyCode, (mxEvent.isShiftDown(evt)) ? graph.gridSize : null); + }; + } + } + } + + return keyHandlerGetFunction.apply(this, arguments); + }; + // Binds keystrokes to actions keyHandler.bindAction = mxUtils.bind(this, function(code, control, key, shift) { diff --git a/war/js/mxgraph/Sidebar.js b/war/js/mxgraph/Sidebar.js index e87e657f..7f6d68b1 100644 --- a/war/js/mxgraph/Sidebar.js +++ b/war/js/mxgraph/Sidebar.js @@ -1731,24 +1731,13 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh this.graph.labelsVisible = (showLabel == null || showLabel); var fo = mxClient.NO_FO; mxClient.NO_FO = Editor.prototype.originalNoForeignObject; - - // Paints faster by using the known width and height - if (false && realWidth != null && realHeight != null) - { - var s = Math.floor(Math.min((width - 2 * this.thumbBorder) / realWidth, (height - 2 * this.thumbBorder) / realHeight) * 100) / 100; - this.graph.view.scaleAndTranslate(s, Math.floor((width - realWidth * s) / 2 / s), Math.floor((height - realHeight * s) / 2 / s)); - this.graph.addCells(cells); - } - else - { - this.graph.view.scaleAndTranslate(1, 0, 0); - this.graph.addCells(cells); - var bounds = this.graph.getGraphBounds(); - var s = Math.floor(Math.min((width - 2 * this.thumbBorder) / bounds.width, (height - 2 * this.thumbBorder) - / bounds.height) * 100) / 100; - this.graph.view.scaleAndTranslate(s, Math.floor((width - bounds.width * s) / 2 / s - bounds.x), - Math.floor((height - bounds.height * s) / 2 / s - bounds.y)); - } + this.graph.view.scaleAndTranslate(1, 0, 0); + this.graph.addCells(cells); + var bounds = this.graph.getGraphBounds(); + var s = Math.floor(Math.min((width - 2 * this.thumbBorder) / bounds.width, (height - 2 * this.thumbBorder) + / bounds.height) * 100) / 100; + this.graph.view.scaleAndTranslate(s, Math.floor((width - bounds.width * s) / 2 / s - bounds.x), + Math.floor((height - bounds.height * s) / 2 / s - bounds.y)); var node = null; diff --git a/war/js/mxgraph/Toolbar.js b/war/js/mxgraph/Toolbar.js index a9ac418a..1b214b6d 100644 --- a/war/js/mxgraph/Toolbar.js +++ b/war/js/mxgraph/Toolbar.js @@ -723,7 +723,14 @@ Toolbar.prototype.addItem = function(sprite, key, c, ignoreDisabled) if (action != null) { - elt = this.addButton(sprite, action.label, action.funct, c); + var tooltip = action.label; + + if (action.shortcut != null) + { + tooltip += ' (' + action.shortcut + ')'; + } + + elt = this.addButton(sprite, tooltip, action.funct, c); if (!ignoreDisabled) { diff --git a/war/js/reader.min.js b/war/js/reader.min.js index 7008c5f4..3ee1f0a5 100644 --- a/war/js/reader.min.js +++ b/war/js/reader.min.js @@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+u.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;enavigator.userAgent.indexOf("MSIE")&& +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||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"5.6.0.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -898,16 +898,16 @@ mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c]/g,E={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a", -"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;m=function(){var a={};return function R(b,c,d,g,n){b=C(b);var m=f[b];if(!m||"object"!==typeof m)c.length=0;else{for(var q=m.cssPropBits,p=q&80,x=q&1536,G=NaN,D=0,s=0;D=A)r=q&1?r:"";else if(F=r.charCodeAt(1),H=r.charCodeAt(2),E=48<=F&&57>=F,y=48<=H&&57>=H,43===A&&(E||46===F&&y))r=q&1?(E?"":"0")+r.substring(1):"";else if(45===A&&(E||46===F&&y))r=q&4?(E?"-":"-0")+r.substring(1):q&1?"0":"";else if(46===A&&E)r=q&1?"0"+r:"";else if('url("'===r.substring(0,5))r= -d&&q&16?e(t(k(g,c[D].substring(5,r.length-2)),b,d)):"";else if("("===r.charAt(r.length-1))a:{Q=c;ea=D;r=1;W=ea+1;for(A=Q.length;Wg&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[k].toLowerCase(),b.slice(g,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,g,k){++f;for(k.startBlock&&k.startBlock();fn)return n=~n,n===k?n+1:n;var m=a[n];if("{"!==m)return n===k?n+1:n;c=n+1;n>k&&" "===a[n-1]&&--n;for(g.startRuleset&&g.startRuleset(a.slice(k,n));cm)m=~m;else{for(var q=[],p=0,t=b;tnavigator.userAgent.indexOf("MSIE")&& +var mxClient={VERSION:"3.6.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&& 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT: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:0<=navigator.userAgent.indexOf("AppleWebKit/")&& 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&& 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")|| @@ -1068,16 +1068,16 @@ mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;cmxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl= -function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d= -b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a= -this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2),f=Math.max(0,(b.outline.container.clientHeight/ -a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected", -function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b}; -var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c); -this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed|| -null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet= -function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init;Graph.prototype.init= -function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d= -this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b}; +EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments), +c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&& +null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding(),e=Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2), +f=Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2);return new mxPoint(Math.round(e-d.x),Math.round(f-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()}; +this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root, +!0);b.outline.view.validate()});return b};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c); +this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"== +urlParams.embed||null!=b&&!b.isRestricted());this.actions.get("imgur").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.loadStylesheet; +Graph.prototype.loadStylesheet=function(){p.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.setShadowVisible=function(a,b){mxClient.IS_SVG&&(b=null!=b?b:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#dropShadow)"):this.view.getDrawPane().removeAttribute("filter"),b&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};var s=Graph.prototype.init; +Graph.prototype.init=function(){function a(c){b=c;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(c)}s.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this, +arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1