!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 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;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=s?" ":/url\(/i.test(p)?"url("+a(p.replace(n,""),e)+")":p;if(f!=p||" "!=p)b[c++]=f=p}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 P(d,c,f,g,m){d=C(d);var n=e[d];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,q=p&80,s=p&1536,r=NaN,v=0,G=0;v=E)y=p&1?y:"";else if(B=y.charCodeAt(1),F=y.charCodeAt(2),H=48<=B&&57>=B,A=48<=F&&57>=F,43===E&&(H||46===B&&A))y=p&1?(H?"":"0")+y.substring(1):"";else if(45===E&&(H||46===B&&A))y=p&4?(H?"-":"-0")+y.substring(1):p&1?"0":"";else if(46===E&&H)y=p&1?"0"+y:"";else if('url("'===y.substring(0, 5))y=f&&p&16?b(t(k(g,c[v].substring(5,y.length-2)),d,f)):"";else if("("===y.charAt(y.length-1))a:{R=c;ea=v;y=1;aa=ea+1;for(E=R.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 p=[],q=0,s=a;s])/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}q(a,c,0,{r:d,C:d},e)}}function p(b,a,d,e,c){return function(){q(b,a,d,e,c)}}function q(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,X=/\"/g,R=/^\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=t;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 O(b,W(a,d,e))};ga.ya=ga.sanitizeAttribs=U;ga.za=ga.sanitizeWithPolicy=O;ga.Ba=ga.unescapeEntities=g;return ga}(v);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= "";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), 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){C._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-V?b.strstart-(b.w_size-V):0,n=b.window,p=b.w_mask,q=b.prev,s=b.strstart+Q,r=n[g+k-1],t=n[g+k];b.prev_length>=b.good_match&& (f>>=2);l>b.lookahead&&(l=b.lookahead);do if(e=d,n[e+k]===t&&n[e+k-1]===r&&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;r=n[g+k-1];t=n[g+k]}}while((d=q[d&p])>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-V)){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>=I){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<=I&&(b.ins_h=(b.ins_h<< b.hash_shift^b.window[b.strstart+I-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-V&&(b.match_length=n(b,e)),b.match_length>=I)if(c=C._tr_tally(b,b.strstart-b.match_start,b.match_length-I),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=I){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<=I&&(b.ins_h=(b.ins_h<=b.match_length&&(b.strategy===P||b.match_length===I&&4096= I&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-I;c=C._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-I);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?da:ca,d.adler=2===e.wrap?0:1,e.last_flush=F,C._tr_init(e),H):b(d,J)}function u(b){var d=v(b);d===H&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start= 0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=I-1,b.match_available=0,b.ins_h=0);return d}function y(d,e,c,f,g,k){if(!d)return J;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15g||g>D||c!==O||8>f||15e||9k||k>U)return b(d,J);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 S;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-V&&(k(b,!1),0===b.strm.avail_out))return S}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?ba:X):(b.strstart>b.block_start&&k(b,!1),S)}),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 y(b,d,O,15,8,0)};d.deflateInit2=y;d.deflateReset=u;d.deflateResetKeep=v;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?J:(b.state.gzhead=d,H):J};d.deflate=function(d,c){var f,n,q,s;if(!d||!d.state||5c)return d?b(d,J):J;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:J);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=O+(n.w_bits-8<<4)<<8,s=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,q|=s<<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)){s=1;break}s=n.gzindexq&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===s&&(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)){s=1;break}s=n.gzindexq&&(d.adler=B(d.adler,n.pending_buf,n.pending-q,q));0===s&&(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=I&&0n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>= I?(r=C._tr_tally(n,1,n.match_length-I),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(r=C._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),r&&(k(n,!1),0===n.strm.avail_out)){r=S;break a}}r=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?ba:X):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?S:Z)}else r=z[n.level].func(n,c);if(r!==ba&&r!==X||(n.status=666),r===S||r===ba)return 0===d.avail_out&&(n.last_flush=-1),H;if(r===Z&&(1===c?C._tr_align(n):5!==c&&(C._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>=I;){f=c.strstart;g=c.lookahead-(I-1);do c.ins_h=(c.ins_h<y&&(u+=J[f++]<>>24,u>>>=E,y-=E,E=B>>>16&255,0===E)L[m++]=65535&B;else{if(!(16&E)){if(0===(64&E)){B=z[(65535&B)+(u&(1<>>=E,y-=E);15>y&&(u+=J[f++]<>>24,u>>>=E,y-=E,E=B>>>16&255, !(16&E)){if(0===(64&E)){B=x[(65535&B)+(u&(1<r){b.msg="invalid distance too far back";c.mode=30;break a}if(u>>>=E,y-=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=v,0===t){if(B+=s-E,E>3;f-=F;y-=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(C),d.distcode=d.distdyn=new s.Buf32(A),d.sane=1,d.back=-1,y):z}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):z}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.whaveD;){if(0===m)break a;m--;A+=f[k++]<>>8&255;c.check=t(c.check,R,2,0);D=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,D-=4,S=(15&A)+8,0===c.wbits)c.wbits=S;else if(S>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<D;){if(0===m)break a;m--;A+=f[k++]<>8&1);512&c.flags&&(R[0]=255&A,R[1]=A>>>8&255,c.check=t(c.check,R,2,0));D=A=0;c.mode=3;case 3:for(;32>D;){if(0===m)break a;m--;A+=f[k++]<>>8&255,R[2]=A>>>16&255,R[3]=A>>>24&255,c.check=t(c.check,R,4,0));D=A=0;c.mode=4;case 4:for(;16>D;){if(0===m)break a;m--;A+=f[k++]<>8);512&c.flags&&(R[0]=255&A,R[1]=A>>>8&255,c.check=t(c.check,R,2,0));D=A=0;c.mode= 5;case 5:if(1024&c.flags){for(;16>D;){if(0===m)break a;m--;A+=f[k++]<>>8&255,c.check=t(c.check,R,2,0));D=A=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(K=c.length,K>m&&(K=m),K&&(c.head&&(S=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),s.arraySet(c.head.extra,f,k,K,S)),512&c.flags&&(c.check=t(c.check,f,K,k)),m-=K,k+=K,c.length-=K),c.length))break a;c.length=0;c.mode= 7;case 7:if(2048&c.flags){if(0===m)break a;K=0;do S=f[k+K++],c.head&&S&&65536>c.length&&(c.head.name+=String.fromCharCode(S));while(S&&Kc.length&&(c.head.comment+=String.fromCharCode(S));while(S&&KD;){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>D;){if(0===m)break a;m--;A+=f[k++]<>>= 7&D;D-=7&D;c.mode=27;break}for(;3>D;){if(0===m)break a;m--;A+=f[k++]<>>=1,D-=1,3&A){case 0:c.mode=14;break;case 1:N=c;if(B){p=new s.Buf32(512);r=new s.Buf32(32);for(Q=0;144>Q;)N.lens[Q++]=8;for(;256>Q;)N.lens[Q++]=9;for(;280>Q;)N.lens[Q++]=7;for(;288>Q;)N.lens[Q++]=8;u(1,N.lens,0,288,p,0,N.work,{bits:9});for(Q=0;32>Q;)N.lens[Q++]=5;u(2,N.lens,0,32,r,0,N.work,{bits:5});B=!1}N.lencode=p;N.lenbits=9;N.distcode=r;N.distbits=5;if(c.mode=20,6===e){A>>>=2;D-=2;break a}break;case 2:c.mode= 17;break;case 3:d.msg="invalid block type",c.mode=30}A>>>=2;D-=2;break;case 14:A>>>=7&D;for(D-=7&D;32>D;){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,D=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(K=c.length){if(K>m&&(K=m),K>C&&(K=C),0===K)break a;s.arraySet(g,f,k,K,l);m-=K;k+=K;C-=K;l+=K;c.length-=K;break}c.mode=12;break;case 17:for(;14>D;){if(0===m)break a;m--;A+=f[k++]<>>=5,D-=5,c.ndist=(31&A)+1,A>>>=5,D-=5,c.ncode=(15&A)+4,A>>>=4,D-=4,286D;){if(0===m)break a;m--;A+=f[k++]<>>=3;D-=3}for(;19>c.have;)c.lens[ia[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ba={bits:c.lenbits},Z=u(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= 0;c.mode=19;case 19:for(;c.have>>24,Q=65535&X,!(I<=D);){if(0===m)break a;m--;A+=f[k++]<Q)A>>>=I,D-=I,c.lens[c.have++]=Q;else{if(16===Q){for(N=I+2;D>>=I,D-=I,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}S=c.lens[c.have-1];K=3+(3&A);A>>>=2;D-=2}else if(17===Q){for(N=I+3;D>>=I;D-=I;S=0;K=3+(7&A);A>>>=3;D-=3}else{for(N= I+7;D>>=I;D-=I;S=0;K=11+(127&A);A>>>=7;D-=7}if(c.have+K>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;K--;)c.lens[c.have++]=S}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,ba={bits:c.lenbits},Z=u(1,c.lens,0,c.nlen,c.lencode,0,c.work,ba),c.lenbits=ba.bits,Z){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,ba={bits:c.distbits}, Z=u(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ba),c.distbits=ba.bits,Z){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=m&&258<=C){d.next_out=l;d.avail_out=C;d.next_in=k;d.avail_in=m;c.hold=A;c.bits=D;v(d,M);l=d.next_out;g=d.output;C=d.avail_out;k=d.next_in;f=d.input;m=d.avail_in;A=c.hold;D=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;X=c.lencode[A&(1<>>24,N=X>>>16&255,Q=65535&X,!(I<=D);){if(0===m)break a;m--;A+=f[k++]<< D;D+=8}if(N&&0===(240&N)){V=I;da=N;for(ca=Q;X=c.lencode[ca+((A&(1<>V)],I=X>>>24,N=X>>>16&255,Q=65535&X,!(V+I<=D);){if(0===m)break a;m--;A+=f[k++]<>>=V;D-=V;c.back+=V}if(A>>>=I,D-=I,c.back+=I,c.length=Q,0===N){c.mode=26;break}if(32&N){c.back=-1;c.mode=12;break}if(64&N){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&N;c.mode=22;case 22:if(c.extra){for(N=c.extra;D>>=c.extra;D-=c.extra;c.back+= c.extra}c.was=c.length;c.mode=23;case 23:for(;X=c.distcode[A&(1<>>24,N=X>>>16&255,Q=65535&X,!(I<=D);){if(0===m)break a;m--;A+=f[k++]<>V)],I=X>>>24,N=X>>>16&255,Q=65535&X,!(V+I<=D);){if(0===m)break a;m--;A+=f[k++]<>>=V;D-=V;c.back+=V}if(A>>>=I,D-=I,c.back+=I,64&N){d.msg="invalid distance code";c.mode=30;break}c.offset=Q;c.extra=15&N;c.mode=24;case 24:if(c.extra){for(N=c.extra;D>>=c.extra;D-=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===C)break a;if(K=M-C,c.offset>K){if(K=c.offset-K,K>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}K>c.wnext?(K-=c.wnext,Y=c.wsize-K):Y=c.wnext-K;K>c.length&&(K=c.length);N=c.window}else N=g,Y=l-c.offset,K=c.length;K>C&&(K=C);C-=K;c.length-=K;do g[l++]=N[Y++];while(--K);0===c.length&&(c.mode= 21);break;case 26:if(0===C)break a;g[l++]=c.length;C--;c.mode=21;break;case 27:if(c.wrap){for(;32>D;){if(0===m)break a;m--;A|=f[k++]<D;){if(0===m)break a;m--;A+=f[k++]<c.mode&&(27>c.mode||4!==e))&&n(d,d.output,d.next_out,M-d.avail_out)?(c.mode=31,-4):(T-=d.avail_in,M-=d.avail_out,d.total_in+=T,d.total_out+=M,c.total+=M,c.wrap&&M&&(d.adler=c.check=c.flags?t(c.check,g,M,d.next_out-M):q(c.check,g,M,d.next_out-M)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:0)+(20===c.mode||15=== c.mode?256:0),(0===T&&0===M||4===e)&&Z===y&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return z;var d=b.state;return d.window&&(d.window=null),b.state=null,y};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?z:(e.head=d,d.done=!1,y)):z};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?z: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,y)):z};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,v){var u,y,z,x,C,A,B,E;x=v.bits;for(var F=0,G=0,H=0,J=0,L=0,P=0,U=0,W=0,O=0,D=null,T=0,M=new b.Buf16(16),P=new b.Buf16(16),K=null,Y=0,F=0;15>=F;F++)M[F]=0;for(G=0;GJ&&(L=J),0===J)return s[q++]=20971520,s[q++]=20971520,v.bits=1,0;for(H=1;H=F;F++)if(u<<=1,u-=M[F],0>u)return-1;if(0F;F++)P[F+ 1]=P[F]+M[F];for(G=0;GC?(B=K[Y+t[G]],E=D[T+t[G]]):(B=96,E=0);u=1<>U)+y]=A<<24|B<<16|E|0;while(0!==y);for(u=1<>=1;if(0!==u?(O&=u-1,O+=u):O=0,G++,0===--M[F]){if(F===J)break;F=c[f+t[G]]}if(F>L&&(O&r)!==z){0===U&&(U=L);x+=H;P= F-U;for(u=1<=u));)P++,u<<=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(U+1),g=0;for(c=1;c<=U;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=Y[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,s=d.stat_desc.static_tree,r=d.stat_desc.has_stree,v=d.stat_desc.extra_bits,u=d.stat_desc.extra_base,y=d.stat_desc.max_length,x=0;for(c=0;c<=U;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;ey&&(c=y,x++),k[2*f+1]=c,f>l||(b.bl_count[c]++,n=0,f>=u&&(n=v[f-u]),q=k[2*f],b.opt_len+=q*(c+n),r&&(b.static_len+=q*(s[2*f+1]+n)));if(0!==x){do{for(c=y-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[y]--;x-=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 y(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*T]++:b.bl_tree[2*M]++,l=0,g=f,0===k?(m=138,n=3):f===k?(m=6,n=3):(m=7,n=4))}function z(b,d,e){var c,f,g=-1,k=d[1],n=0,p=7,q=4;0===k&&(p=138,q=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++n=n?(m(b,T,b.bl_tree),l(b,n-3,3)):(m(b,M,b.bl_tree),l(b, n-11,7));n=0;g=f;0===k?(p=138,q=3):f===k?(p=6,q=3):(p=7,q=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++){S[f]=c;for(d=0;d<1<f;f++){Z[f]=c;for(d=0;d<1<>=7;f=d;)Q[2*d+1]=8,d++,k[8]++;for(;255>=d;)Q[2*d+1]=9,d++,k[9]++;for(;279>=d;)Q[2*d+1]=7,d++,k[7]++;for(;287>=d;)Q[2*d+1]=8,d++,k[8]++;p(Q,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)C(b,d,e,c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),v(b,Q,V); 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,O,Q);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}}; window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img"; window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1; window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var c=localStorage.getItem(".drawio-config");null!=c&&(a=JSON.parse(c).language||null)}catch(f){isLocalStorage=!1}return a}(); window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",ca:"Catal\u00e0",cs:"\u010ce\u0161tina",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Espa\u00f1ol",fil:"Filipino",fr:"Fran\u00e7ais",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Portugu\u00eas (Brasil)",pt:"Portugu\u00eas (Portugal)",ro:"Rom\u00e2n\u0103",fi:"Suomi",sv:"Svenska",vi:"Ti\u1ebfng Vi\u1ec7t",tr:"T\u00fcrk\u00e7e",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac", ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",sr:"\u0421\u0440\u043f\u0441\u043a\u0438",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",th:"\u0e44\u0e17\u0e22",ko:"\ud55c\uad6d\uc5b4",ja:"\u65e5\u672c\u8a9e",zh:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-tw":"\u4e2d\u6587\uff08\u53f0\u7063\uff09"};"undefined"===typeof window.mxBasePath&&(window.mxBasePath="mxgraph"); 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";var host=window.location.host,searchString="draw.io",position=host.length-searchString.length,lastIndex=host.lastIndexOf(searchString,position);-1!==lastIndex&&lastIndex===position&&"test.draw.io"!=host&&(window.DRAWIO_LOG_URL="https://log.draw.io"); 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.7.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")&& 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"UTF-8" type\x3d"text/css"/\x3e');else{var d=f.createElement("link");d.setAttribute("rel", a);d.setAttribute("href",c);d.setAttribute("charset","UTF-8");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;ad&&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 u=Math.cos(e),y=Math.sin(e),s=-m*(n*y+d*u),q=-m*(f*y-p*u),r=[],z=0;zf&&(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(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&&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.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.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.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&& (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.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);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;bf?";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&&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",0s.alpha&&t.setAttribute("opacity",s.alpha);var v=this.createElement("foreignObject");v.setAttribute("style","overflow:visible;");v.setAttribute("pointer-events","all");q=this.createDiv(b,e,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(v);this.root.appendChild(t);var u=0,y=0;r=u=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var z= document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";y=document.createElement("div");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.wordWrap=mxConstants.WORD_WRAP;y.innerHTML=mxUtils.isNode(b)?b.outerHTML:b;z.appendChild(y);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(u+=2,r+=2);if(k&&0< f){var x=y.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;z=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(z+="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&&(z+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(c)+this.foOffset)+ ")"+z);v.setAttribute("width",Math.round(Math.max(1,f)));v.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(v,a,c,f,d,b,e,g,k,l,m,n,p),null!=a&&(v.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),f=this.createElement("switch"),f.appendChild(v),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&&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&&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(" ");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),v=t.x,t=t.y;b=this.createDiv(b,e,g,m);e=this.createElement("div");null!=r&&b.setAttribute("dir",r);if(k&&0u&&(u+=2*Math.PI);u%=Math.PI;u>Math.PI/2&&(u=Math.PI-u);g=Math.cos(u);var y=Math.sin(u);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);u=q.offsetWidth+3;q=q.offsetHeight;n?(f=Math.min(f,u), q=Math.min(q,d)):f=u;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*-y)/2-r*f*(v+0.5)+p*d*(t+0.5);k=(f-f*g+d*-y)/2+p*f*(v+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*v*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*v+ "%",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 v=s.x,u=s.x+s.width,y=s.getCenterX(),z=s.y,x=s.y+s.height,C=s.getCenterY();c=function(b,d){b+=this.graph.panDx;var c=!1;Math.abs(b-y)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":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.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.color="black";this.align=mxConstants.ALIGN_CENTER;this.valign=mxConstants.ALIGN_MIDDLE;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= 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.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY, 100),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* ("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&&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))}; 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(),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 v=this.graph.getCellStyle(s),t=mxUtils.getNumber(v,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;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.weightedValued.theta&&bthis.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||(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;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; 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; 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>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,v=null,u=null,y=null,l=0;lt[A]&&x++,s[z]v[A]&&x++,q[z]a.medianValue?-1:c.medianValuev+1&&(m==d[l].length-1?(b.setGeneralPurposeVariable(l,u),p=!0):(m=d[l][m+1],v=m.getGeneralPurposeVariable(l),v=v-m.width/2-this.intraCellSpacing-b.width/2,v>u?(b.setGeneralPurposeVariable(l, u),p=!0):v>b.getGeneralPurposeVariable(l)+1&&(b.setGeneralPurposeVariable(l,v),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;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.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;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;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.hasAttribute=function(a){var c=this.getValue();return null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.hasAttribute?c.hasAttribute(a):null!=c.getAttribute(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;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=mxRectangle.fromRectangle(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':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){this.stopEditing(!0);null==this.textarea&&this.init();null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();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, 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, 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()}), 0);this.resize();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=0s;s++){var z=null!=v&&v.x==u.x,x=null!=v&&v.y==u.y,C=null!=t&&u.y>=t.y&& u.y<=t.y+t.height,t=null!=t&&u.x>=t.x&&u.x<=t.x+t.width,u=x||null==v&&C,y=z||null==v&&t;if(!(0==s&&(u&&y||z&&x))){if(null!=v&&!x&&!z&&(C||t)){m=C?!1:!0;break}if(y||u){m=u;1==s&&(m=0==d.length%2?u:y);break}}t=f;v=g[r];null!=v&&(v.x=Math.round(v.x),v.y=Math.round(v.y),t=null);u=d[d.length-1];z&&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(;1x;x++)mxEdgeStyle.limits[x][1]= n[x][0]-y[x],mxEdgeStyle.limits[x][2]=n[x][1]-y[x],mxEdgeStyle.limits[x][4]=n[x][0]+n[x][2]+y[x],mxEdgeStyle.limits[x][8]=n[x][1]+n[x][3]+y[x];y=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);C=y-p;y=0;0>x?y=0>C?2:1:0>=C&&(y=3,0==x&&(y=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-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(x-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-z,0);z=[]; 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]),z[x]=r[x][0]&d[x],z[x]|=(r[x][1]&d[x])<<8,z[x]|=(r[1-x][x]&d[x])<<16,z[x]|=(r[1-x][1-x]&d[x])<<24,0==(z[x]&15)&&(z[x]<<=8),0==(z[x]&3840)&&(z[x]=z[x]&15|z[x]>>8),0== (z[x]&983040)&&(z[x]=z[x]&65535|(z[x]&251658240)>>8),a[x]=z[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];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=y;z-=y;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-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=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))? 0:1;for(x=0;x>5,p<<=y,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); 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; 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.states=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=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.canvas.style.overflow="hidden",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.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(ethis.minPageBreakDist)?Math.ceil(d.height/e.height)+1:0,k=a?Math.ceil(d.width/e.width)+1:0,l=(k-1)*e.width,m=(g-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= 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),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())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||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;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),null!=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!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.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), 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, "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); 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!= 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.isActive=function(a,c){return null!=this.div&&"none"!=this.div.style.display};mxRubberband.prototype.mouseUp=function(a,c){var f=this.isActive();this.reset();f&&(this.execute(c.getEvent()),c.consume())}; mxRubberband.prototype.execute=function(a){var c=new mxRectangle(this.x,this.y,this.width,this.height);this.graph.selectRegion(c,a)};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")}; 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; 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, 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()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;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))); 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!= 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;an&&(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.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){if(null==this.elements){if(null==this.document.documentElement)throw Error("mxCodec constructor needs document parameter");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(d/t.height)-1:0,u=b?Math.ceil(a/t.width)-1:0,y=q.x+a,z=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;cmxUtils.indexOf(y,s))&&d.setCellStyles(s,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:208;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()&&!mxEvent.isAltDown(d)&&(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.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var 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=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}),e=d(mxUtils.bind(this, function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousLargeImage,mxResources.get("previousPage")||"Previous Page"),g=document.createElement("div");g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontFamily="Helvetica,Arial";g.style.marginTop="8px";g.style.color="#ffffff";this.chromelessToolbar.appendChild(g);var k=d(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();mxEvent.consume(b)}),Editor.nextLargeImage,mxResources.get("nextPage")|| "Next Page"),l=mxUtils.bind(this,function(){null!=this.pages&&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!=x&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-x.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/ 2-x.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){x=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(d);mxEvent.consume(b); break}e=e.parentNode}}))};EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a}; EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0a.container.scrollLeft+0.9*a.container.clientWidth&&(a.container.scrollLeft= Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+0.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{var c=a.getGraphBounds(),f=Math.max(c.width,a.scrollTileSize.width*a.view.scale),d=Math.max(c.height,a.scrollTileSize.height*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-d)/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth- f)/2)))}else a.pageVisible?(c=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x),Math.floor(Math.max(0,(a.container.clientHeight-c.height)/2)-c.y))):(c=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-c.width)/2)-c.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-c.height)/4))-c.y)))}else a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)|| a.view.setTranslate(0,0)}; EditorUi.prototype.setPageVisible=function(a){var c=this.editor.graph,f=mxUtils.hasScrollbars(c.container),d=0,b=0;f&&(d=c.view.translate.x*c.view.scale-c.container.scrollLeft,b=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=a;c.pageBreaksVisible=a;c.preferPageSize=a;c.view.validateBackground();f&&(a=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(a));c.sizeDidChange();f&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-d,c.container.scrollTop=c.view.translate.y* c.view.scale-b);this.fireEvent(new mxEventObject("pageViewChanged"))};EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))}; EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))}; EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))}; EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),c=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var b=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){b.apply(this,arguments);d()};var e=this.editor.graph.cellEditor.stopEditing; this.editor.graph.cellEditor.stopEditing=function(b,a){e.apply(this,arguments);d()};d()}; EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!a.isSelectionEmpty(),f=!1,d=!1,b=a.getSelectionCells();if(null!=b)for(var e=0;ef&&(c=a.substring(f,d+21).replace(/>/g,"\x3e").replace(/</g,"\x3c").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(b){}return c}; 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.isCompatibleString=function(a){return!1};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&&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&&0O&&null!=l&&!mxEvent.isShiftDown(c)&&(mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(T,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(l.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(T,mxConstants.STYLE_SHAPE)||1500this.dropTargetDelay&&(b.model.isVertex(l.cell)&&null!=n||b.model.isEdge(l.cell)&&b.model.isEdge(d[0]))){u=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==u||!mxUtils.contains(u,a,e)||1500O&&O>this.dropTargetDelay||b.model.isEdge(f)?l:null,null!=t&&m){k=[F,G,z,x,C,A];for(m=0;mmxUtils.indexOf(b,e)){c=this.getTagsForStencil(a,e);var n=null!=k?k[e]:null;null!=n&&c.push(n);m.push(this.createVertexTemplateEntry("shape\x3d"+a+e.toLowerCase()+d,Math.round(f*g),Math.round(l*g),"",e.replace(/_/g," "),null,null,this.filterTags(c.join(" "))))}}), !0,!0);this.addPaletteFunctions(a,c,!1,m)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==d&&(d="");null!=e&&e.call(this,a);if(null!=l)for(var c=0;cmxUtils.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)}))}; 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; 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())> 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&&q.y+q.height<=l&&(q.y>=a&&q.x+q.width<=k)&&f.push(p);this.getAllCells(b,a,d,e,p,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,a,d){return this.graph.isCellSelected(b)?!1:C.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):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.hasAttribute(g)?null!=k.getAttribute(g)?k.getAttribute(g):"":null),k=this.model.getParent(k);null==e&&(e=this.getGlobalVariable(g))}f.push(c.substring(d, match.index)+(null!=e?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&&null!=a.parent.geometry?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);null!=m&&(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.getIndexableText=function(){var a=document.createElement("div"),c=[],f="",d;for(d in this.model.cells)if(f=this.model.cells[d],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(a.innerHTML=this.getLabel(f),f=mxUtils.extractTextWithWhitespace([a])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0this.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)&&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=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(d,b,e,c){if(null!=b&&null!=d&&("1"==b.style.snapToPoint||"1"==d.style.snapToPoint)){b=this.getTerminalPort(d,b,c);var f=this.getNextPoint(d,e,c),l=this.graph.isOrthogonal(d),m=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=m)var p=Math.cos(-m),r=Math.sin(-m),f=mxUtils.getRotatedPoint(f,p,r,n);p=parseFloat(d.style[mxConstants.STYLE_PERIMETER_SPACING]|| 0);p+=parseFloat(d.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==m&&l,p);0!=m&&(p=Math.cos(m),r=Math.sin(m),f=mxUtils.getRotatedPoint(f,p,r,n));if(null!=b){m=this.graph.getAllConnectionConstraints(b);l=n=null;for(p=0;pf||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;ag||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(e,d),this.isSpaceEvent(a)?(e=this.x+this.width,d=this.y+this.height,c=this.graph.view.scale,mxEvent.isAltDown(a.getEvent())||(this.width=this.graph.snap(this.width/c)*c,this.height=this.graph.snap(this.height/c)*c,this.graph.isGridEnabled()||(this.width=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv= this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), this.secondDiv=null)),a.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),v=0,u=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(b,a,d,e){u.apply(this,arguments);d!=this.currentTerminalState?(t=(new Date).getTime(),v=0):v=(new Date).getTime()-t;this.currentTerminalState= d};var y=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(b){return null!=this.currentTerminalState&&b.getState()==this.currentTerminalState&&2E3=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 z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(b,a,d){this.handleImage=a==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:a==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var x=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 x.apply(this,arguments)};var C=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))):C.apply(this,arguments)};var A=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)&&A.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;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&&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"; l.style.margin="0px";this.addArrow(l);l.style.width="192px";l.style.height="15px";mxClient.IS_FF&&(l.getElementsByTagName("div")[0].style.marginTop="-18px");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),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 v=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),p),u=this.editorUi.toolbar.addButton("geSprite-middle", mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),p),y=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),p);this.styleButtons([v,u,y]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(p);var z,x,C,A,B,E,F;d.cellEditor.isContentEditing()?(v.style.display="none",u.style.display="none", y.style.display="none",n.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},p),this.styleButtons([C,z=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)]), C.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"; 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(" "),J={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));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(){var b=e(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);b.style.marginBottom="8px";return b}function e(a,d,e,c){d=null!=d?d:12;var f=document.createElement("table");f.style.borderCollapse="collapse";f.setAttribute("cellspacing","0");f.style.marginBottom="20px";f.style.cellSpacing="0px";var l=document.createElement("tbody");f.appendChild(l);for(var n=a.length/d,p=0;pc&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; 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==n||n==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=n,m.style.backgroundImage="")}function f(){null== s?(r.removeAttribute("title"),r.style.fontSize="",r.innerHTML=mxResources.get("change")+"..."):(r.setAttribute("title",s.src),r.style.fontSize="11px",r.innerHTML=s.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.verticalAlign="top";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("paperSize")+":");b.appendChild(e); e=document.createElement("td");e.style.verticalAlign="top";e.style.fontSize="10pt";var l=PageSetupDialog.addPageFormatPanel(e,"pagesetupdialog",d.pageFormat);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("background")+":");b.appendChild(e);e=document.createElement("td");e.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="18px"; m.style.height="18px";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";var n=d.background;c();mxEvent.addListener(m,"click",function(b){a.pickColor(n||"none",function(b){n=b;c()});mxEvent.consume(b)});e.appendChild(m);mxUtils.write(e,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=d.getGridSize();e.appendChild(p); mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?d.getGridSize():b)});b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");mxUtils.write(e,mxResources.get("image")+":");b.appendChild(e);e=document.createElement("td");var r=document.createElement("a");r.style.textDecoration="underline";r.style.cursor="pointer";r.style.color="#a0a0a0";var s=d.backgroundImage;mxEvent.addListener(r,"click",function(b){a.showBackgroundImageDialog(function(b){s= b;f()});mxEvent.consume(b)});f();e.appendChild(r);b.appendChild(e);k.appendChild(b);b=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="16px";e.setAttribute("align","right");var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&e.appendChild(q);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();a.setPageFormat(l.get());d.background!=n&&a.setBackgroundColor(n);d.backgroundImage!== s&&a.setBackgroundImage(s);d.gridSize!==p.value&&d.setGridSize(parseInt(p.value))});t.className="geBtn gePrimaryBtn";e.appendChild(t);a.editor.cancelFirst||e.appendChild(q);b.appendChild(e);k.appendChild(b);g.appendChild(k);this.container=g}; PageSetupDialog.addPageFormatPanel=function(a,c,f,d){function b(b,a,d){if(d||p!=document.activeElement&&r!=document.activeElement){b=!1;for(a=0;aMAX_AREA||0>=t.value?"red":"";v.style.backgroundColor=t.value*v.value>MAX_AREA||0>=v.value?"red":""}function d(){var a=Math.max(0,parseInt(u.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); 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); 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 v=document.createElement("input");v.setAttribute("value",l);v.style.width="180px";m=document.createElement("td");m.appendChild(v);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 u=document.createElement("input");u.setAttribute("value",k);u.style.width="180px";u.value="0";m=document.createElement("td");m.appendChild(u);e.appendChild(m);n.appendChild(e);g.appendChild(n);mxEvent.addListener(r,"change",c);c();mxEvent.addListener(t,"change",function(){v.value=0=parseInt(t.value)&&0>=parseInt(v.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.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 v=k.view.getState(c),u=null!=v?v.style:k.getCellStyle(c);"1"==mxUtils.getValue(u,"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(u,"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",0 b&&(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)}))}; (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(";"); Sidebar.prototype.cisco="Buildings;Computers and Peripherals;Controllers and Modules;Directors;Hubs and Gateways;Misc;Modems and Phones;People;Routers;Security;Servers;Storage;Switches;Wireless".split(";");Sidebar.prototype.sysml="Model Elements;Blocks;Ports and Flows;Constraint Blocks;Activities;Interactions;State Machines;Use Cases;Allocations;Requirements;Profiles;Stereotypes".split(";");Sidebar.prototype.eip="Message Construction;Message Routing;Message Transformation;Messaging Channels;Messaging Endpoints;Messaging Systems;System Management".split(";"); Sidebar.prototype.gmdl="Bottom Navigation;Bottom Sheets;Buttons;Cards;Chips;Dialogs;Dividers;Grid Lists;Icons;Lists;Menus;Misc;Pickers;Selection Controls;Sliders;Steppers;Tabs;Text Fields".split(";");Sidebar.prototype.aws2="Analytics;Application Services;Compute;Database;Developer Tools;Enterprise Applications;Game Development;General;Internet of Things;Management Tools;Mobile Services;Networking;On-Demand Workforce;SDKs;Security and Identity;Storage and Content Delivery;Groups".split(";");Sidebar.prototype.office= "Clouds Communications Concepts Databases Devices Security Servers Services Sites Users".split(" ");Sidebar.prototype.veeam=["2D","3D"];Sidebar.prototype.archimate3="Application;Business;Composite;Implementation and Migration;Motivation;Physical;Relationships;Strategy;Technology".split(";");Sidebar.prototype.electrical="LogicGates Resistors Capacitors Inductors SwitchesRelays Diodes Sources Transistors Misc Audio PlcLadder Abstract Optical VacuumTubes Waveforms Instruments RotMech Transmission".split(" "); Sidebar.prototype.configuration=[{id:"general",libs:["general","misc","advanced"]},{id:"uml"},{id:"search"},{id:"er"},{id:"ios",prefix:"ios",libs:["","7icons","7ui"]},{id:"android",prefix:"android",libs:[""]},{id:"aws3d"},{id:"flowchart"},{id:"basic"},{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:"electrical",libs:Sidebar.prototype.electrical},{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:"veeam",prefix:"veeam",libs:Sidebar.prototype.veeam},{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}];var a=Sidebar.prototype.insertSearchHint;Sidebar.prototype.insertSearchHint=function(b,d,c,f,m,n,p,r){if(null!=r&&1==f){var s=null;if(0<=mxUtils.indexOf(r,"text"))s="Double click anywhere in the diagram to insert text.";else for(var q= "line lines arrow arrows connect connection connections connector connectors curve curves link links".split(" "),t=0;tg?"":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(n){if("BUTTON"==mxEvent.getSource(n).nodeName){var p=b.cloneNode(!0);p.style.backgroundImage="";p.style.textDecoration="none";p.style.fontWeight="bold";p.style.fontSize="14px";p.style.color="rgb(80, 80, 80)";p.style.width="456px";p.style.backgroundColor="#ffffff";p.style.paddingLeft="6px";n=p.getElementsByTagName("button")[0]; n.parentNode.removeChild(n);n=a.cloneNode(!0);n.style.backgroundColor="#ffffff";n.style.borderColor="transparent";n.style.width="456px";p='\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'+p.outerHTML+n.outerHTML+"\x3c/body\x3e\x3c/html\x3e";n.style.position="absolute";window.document.body.appendChild(n);var r=n.clientHeight+ 18;n.parentNode.removeChild(n);(new mxXmlRequest(EXPORT_URL,"w\x3d456\x26h\x3d"+r+"\x26html\x3d"+encodeURIComponent(this.editorUi.editor.graph.compress(p)))).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 s=b.innerHTML;b.innerHTML=mxResources.get("loading")+"...";window.setTimeout(function(){d(a);b.style.cursor="";b.innerHTML=s;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 c=Sidebar.prototype.getTagsForStencil;Sidebar.prototype.getTagsForStencil=function(b,a,d){var f= c.apply(this,arguments);null!=this.shapetags&&(b=b.toLowerCase(),a=a.toLowerCase(),null!=this.shapetags[b]&&f.push(this.shapetags[b]),a=b+"."+a,null!=this.shapetags[a]&&f.push(this.shapetags[a]));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,p=this.sysml,r=this.eip,s=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.addVeeamPalette();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(" "), "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(m,a))d=null!=r?r[a]:null,mxLog.debug('\x3cshape style\x3d"shape\x3d'+b+a+c+'" w\x3d"'+Math.round(e*p)+'" h\x3d"'+Math.round(f*p)+'"'+(null!=d?' tags\x3d"'+d+'"':"")+"/\x3e")}),!0)}}var d=Sidebar.prototype.searchEntries;Sidebar.prototype.searchEntries=function(b,a,c,f,m){var n=f;this.editorUi.enableLogging&&!this.editorUi.isOffline()&&0==c&&((new Image).src= (null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3dCONFIG\x26msg\x3dshapesearch:"+encodeURIComponent(b)+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION));f=mxUtils.bind(this,function(d,f,l,m){!this.editorUi.isOffline()&&d.length<=a/4?(l=c-Math.ceil((f-a/4)/a),mxUtils.get(ICONSEARCH_PATH+"?v\x3d2\x26q\x3d"+encodeURIComponent(b)+"\x26p\x3d"+l+"\x26c\x3d"+a,mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var e=JSON.parse(b.getText());for(b=0;bb;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;", 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;", 95,100,"","Community",null,null,this.getTagsForStencil("mxgraph.networks","community","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.comm_link;",30,100,"","Comm Link (Icon)",null,null,this.getTagsForStencil("mxgraph.networks", "comm_link","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.copier;",100,100,"","Copier",null,null,this.getTagsForStencil("mxgraph.networks","copier","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.pc;", 100,70,"","PC",null,null,this.getTagsForStencil("mxgraph.networks","pc","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.desktop_pc;",30,60,"","Desktop PC",null,null,this.getTagsForStencil("mxgraph.networks","desktop_pc","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.external_storage;",90,100,"","External Storage",null,null,this.getTagsForStencil("mxgraph.networks","external_storage","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.firewall;", 100,100,"","Firewall",null,null,this.getTagsForStencil("mxgraph.networks","firewall","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.gamepad;",100,70,"","Gamepad",null,null,this.getTagsForStencil("mxgraph.networks","gamepad", "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.hub;",100,30,"","Hub",null,null,this.getTagsForStencil("mxgraph.networks","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.laptop;", 100,55,"","Laptop",null,null,this.getTagsForStencil("mxgraph.networks","laptop","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.load_balancer;",100,30,"","Load Balancer",null,null,this.getTagsForStencil("mxgraph.networks","load_balancer", "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.mail_server;",105,105,"","Mail Server",null,null,this.getTagsForStencil("mxgraph.networks","mail_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.mainframe;", 80,100,"","Mainframe",null,null,this.getTagsForStencil("mxgraph.networks","mainframe","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.mobile;",50,100,"","Mobile",null,null,this.getTagsForStencil("mxgraph.networks","mobile","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.modem;",100,30,"","Modem",null,null,this.getTagsForStencil("mxgraph.networks","modem","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.monitor;", 80,65,"","Monitor",null,null,this.getTagsForStencil("mxgraph.networks","monitor","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.nas_filer;",100,35,"","NAS Filer",null,null,this.getTagsForStencil("mxgraph.networks","NAS Filer", "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.patch_panel;",100,35,"","Patch Panel",null,null,this.getTagsForStencil("mxgraph.networks","patch_panel","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.pc;", 100,70,"","PC",null,null,this.getTagsForStencil("mxgraph.networks","pc","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.phone_1;",100,70,"","Phone",null,null,this.getTagsForStencil("mxgraph.networks","phone_1","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.phone_2;",100,90,"","Phone",null,null,this.getTagsForStencil("mxgraph.networks","phone_2","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.printer;", 100,100,"","Printer",null,null,this.getTagsForStencil("mxgraph.networks","printer","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.proxy_server;",105,105,"","Proxy Server",null,null,this.getTagsForStencil("mxgraph.networks","proxy_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.rack;",50,100,"","Rack",null,null,this.getTagsForStencil("mxgraph.networks","rack","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.radio_tower;", 55,100,"","Radio Tower",null,null,this.getTagsForStencil("mxgraph.networks","radio_tower","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.router;",100,30,"","Router",null,null,this.getTagsForStencil("mxgraph.networks","router", "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.satellite;",100,100,"","Satellite",null,null,this.getTagsForStencil("mxgraph.networks","satellite","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.satellite_dish;", 90,100,"","Satellite Dish",null,null,this.getTagsForStencil("mxgraph.networks","satellite_dish","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.scanner;",100,75,"","Scanner",null,null,this.getTagsForStencil("mxgraph.networks", "scanner","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.secured;",80,100,"","Secured",null,null,this.getTagsForStencil("mxgraph.networks","secured","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.security_camera;", 100,75,"","Security Camera",null,null,this.getTagsForStencil("mxgraph.networks","security_camera","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.server;",90,100,"","Server",null,null,this.getTagsForStencil("mxgraph.networks", "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.server_storage;",105,105,"","Server Storage",null,null,this.getTagsForStencil("mxgraph.networks","server_storage","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.storage;", 100,100,"","Storage",null,null,this.getTagsForStencil("mxgraph.networks","storage","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.supercomputer;",100,100,"","Supercomputer",null,null,this.getTagsForStencil("mxgraph.networks", "supercomputer","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.switch;",100,30,"","Switch",null,null,this.getTagsForStencil("mxgraph.networks","switch","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.tablet;", 100,70,"","Tablet",null,null,this.getTagsForStencil("mxgraph.networks","tablet","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.tape_storage;",105,105,"","Tape Storage",null,null,this.getTagsForStencil("mxgraph.networks","tape_storage", "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.terminal;",80,65,"","Terminal",null,null,this.getTagsForStencil("mxgraph.networks","terminal","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.unsecure;", 80,100,"","Unsecure",null,null,this.getTagsForStencil("mxgraph.networks","unsecure","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.ups_enterprise;",100,100,"","UPS Enterprise",null,null,this.getTagsForStencil("mxgraph.networks", "ups_enterprise","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.ups_small;",70,100,"","UPS Small",null,null,this.getTagsForStencil("mxgraph.networks","ups_small","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.usb_stick;", 45,100,"","USB Stick",null,null,this.getTagsForStencil("mxgraph.networks","usb_stick","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.users;",90,100,"","Users",null,null,this.getTagsForStencil("mxgraph.networks","users","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.user_female;",40,100,"","User Female",null,null,this.getTagsForStencil("mxgraph.networks","user_female","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.user_male;", 40,100,"","User Male",null,null,this.getTagsForStencil("mxgraph.networks","user_male","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.video_projector;",100,35,"","Video Projector",null,null,this.getTagsForStencil("mxgraph.networks", "video_projector","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.video_projector_screen;",80,100,"","Video Projector Screen",null,null,this.getTagsForStencil("mxgraph.networks","video_projector_screen","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.virtual_pc;",115,85,"","Virtual PC",null,null,this.getTagsForStencil("mxgraph.networks","virtual_pc","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.virtual_server;", 110,120,"","Virtual Server",null,null,this.getTagsForStencil("mxgraph.networks","virtual_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.virus;",100,90,"","Virus",null,null,this.getTagsForStencil("mxgraph.networks","virus", "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, 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(" ")), this.createVertexTemplateEntry("shadow\x3d0;dashed\x3d0;html\x3d1;strokeColor\x3dnone;fillColor\x3d#505050;labelPosition\x3dcenter;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;shape\x3dmxgraph.office.clouds.cloud_sharepoint;",101,61,"","Cloud SharePoint",null,null,this.getTagsForStencil("mxgraph.office.clouds","cloud sharepoint","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.office_365;", 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=0=m.getChildCount(m.getRoot())?q.setAttribute("disabled","disabled"):(q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q); mxUtils.write(k,mxResources.get("layers"));var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="10px";k.appendChild(t);mxUtils.write(k,mxResources.get("zoom"));t.setAttribute("checked","checked");t.defaultChecked=!0;var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="10px";null!=a.pages&&1= v.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:z.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));u.value=d+f}}}function s(b){var c=u.value;if(null==b||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(){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"),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 T=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=T;l*=T}z>B?(B=Math.round(B*v/z),z=v):(z=Math.round(z*u/B),B=u);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";M.style.position="relative";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition","transform .1s ease-in-out");if(null!=b){var K=document.createElement("img");K.setAttribute("src", C.convert(b));K.style.width=z+"px";K.style.height=B+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((u-B)/2)+"px";K.style.paddingLeft=Math.floor((v-z)/2)+"px";M.appendChild(K)}else if(null!=m){var Y=a.stringToCells(a.editor.graph.decompress(m.xml));0y?z-1:z,0,n.splice(y,1)[0]),s.insertBefore(s.children[y],s.children[z])):(n.push(n.splice(y,1)[0]),s.appendChild(s.children[y]));else if(0document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr\x3d'"+a.fill+"', EndColorStr\x3d'"+a.gradient+"', GradientType\x3d0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+ a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var k=0;k=document.documentMode)))g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px";this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&& (a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a});g=!0}return g};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13, 10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var g=d(a,4);if(null!=b&&b(f-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(d){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c= a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d){var e=b.lastIndexOf("\x26lt;/mxfile\x26gt;");e>d&&(c=b.substring(d,e+15).replace(/>/g,"\x3e").replace(/</g,"\x3c").replace(/\\"/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement),c=null!=g?mxUtils.getXml(g):""}catch(s){}return c};EditorUi.prototype.validateFileData=function(a){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",b.style.styleFloat="right",b.style.top="-30px",b.style.left= "164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog= function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer= function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError= function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxResources.get("unknownError");var f=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=e)if("undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxResources.get("forbidden");else if(404==e.code||404==e.status||"undefined"!= typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxResources.get("fileNotFoundOrDenied");var q=window.location.hash;null!=q&&"#G"==q.substring(0,2)&&(q=q.substring(2),a+=' \x3ca href\x3d"https://drive.google.com/open?id\x3d'+q+'" target\x3d"_blank"\x3e'+mxResources.get("tryOpeningViaThisPage")+"\x3c/a\x3e")}else e.code==App.ERROR_TIMEOUT?(a=mxResources.get("timeout"),null!=e.retry&&(f=mxResources.get("cancel"), g=function(){d();e.retry()})):e.code==App.ERROR_BUSY?a=mxResources.get("busy"):null!=e.message?a=e.message:null!=e.response&&null!=e.response.error&&(a=e.response.error);this.showError(b,a,f,c,g)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,e,f,g){a=new ErrorDialog(this,a,b,c,d,e,f,g);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()}; EditorUi.prototype.confirm=function(a,b,c,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=b&&b()},function(){f();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&& 0==a.getChildCount(a.getChildAt(a.root,0))};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createPngDataUri=function(a,b){var c=a.toDataURL("image/png");if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/png"))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c, "zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0e.getStatus()||299f.status){this.spinner.stop();this.hideDialog();a="https://github.com/"+u.value+"/"+y.value+"/blob/"+C.value+"/"+z.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(t.value+":"+v.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,d){var e=this.spinner.pause(),f=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(){e();var f=null!=a.getTitle()?a.getTitle():this.defaultFilename,g=f.lastIndexOf("."),r=f;0]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(e.value)&& g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024>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,q,t,v,u,y){var z=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;v=null!=v?v:this.maxImageBytes;t=null!=t?t:!0;var x=this.editor.graph,C=x.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,z,y)});f=null!=f?f:mxUtils.bind(this,function(a){x.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=a.length,B=A,E=[],F=mxUtils.bind(this,function(a,b){E[a]=b;if(0==--B){this.spinner.stop();if(null!=q)q(E);else{var c=[];x.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),q=Math.max(1,a.height);if(d&&this.isResampleImage(b, f))try{var t=Math.max(g/e,q/e);if(1c;c++)for(var f=c,d=0;8>d;d++)f=1==(f&1)?3988292384^f>>>1:f>>>1,EditorUi.prototype.crcTable[c]=f;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=q;q+=b;return a.substring(c,q)}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 q=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,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,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((t^4294967295)>>24&255,(t^4294967295)>> 16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);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," "),null!=a&&0document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(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 e=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=e.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 f=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 f.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 g=b.init;b.init=function(){g.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};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a= this.getCurrentFile(),b=null!=a||"1"==urlParams.embed;this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c="1"!=urlParams.embed&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);a="1"==urlParams.embed||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b); this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isOfflineApp()){if((mxClient.IS_GC||mxClient.IS_IOS&&mxClient.IS_SF)&&null!=applicationCache){var d=applicationCache;if(null== this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding="2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus); var e=window.setTimeout(mxUtils.bind(this,function(){d.status==d.IDLE&&(this.offlineStatus.innerHTML='[\x3cimg title\x3d"Cached" border\x3d"0" src\x3d"'+IMAGE_PATH+'/checkmark.gif"/\x3e]',window.clearTimeout(e))}),5E3)}}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.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("twitter").setEnabled(null!= b&&!b.isRestricted());this.actions.get("facebook").setEnabled(null!=b&&!b.isRestricted());this.actions.get("github").setEnabled(null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").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)}})(); var mxSettings={key:".drawio-config",settings:{language:"",libraries:Sidebar.prototype.defaultEntries,customLibraries:[],plugins:[],recentColors:[],formatWidth:"240",currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:{},createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!0,version:13,isNew:!0},getLanguage:function(){return this.settings.language},setLanguage:function(a){this.settings.language=a}, getUi:function(){return this.settings.ui},setUi:function(a){this.settings.ui=a},getShowStartScreen:function(){return this.settings.showStartScreen},setShowStartScreen:function(a){this.settings.showStartScreen=a},getGridColor:function(){return this.settings.gridColor},setGridColor:function(a){this.settings.gridColor=a},getAutosave:function(){return this.settings.autosave},setAutosave:function(a){this.settings.autosave=a},getLibraries:function(){return this.settings.libraries},setLibraries:function(a){this.settings.libraries= a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.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},getRecentColors:function(){return this.settings.recentColors}, setRecentColors:function(a){this.settings.recentColors=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.recentColors&&(this.settings.recentColors=[]),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,c,d){var f=window.open(a);null==f||void 0===f?this.showDialog((new PopupDialog(this,a,c,d)).container,320,140,!0,!0):null!=c&&c()});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");ColorDialog.recentColors=mxSettings.getRecentColors(ColorDialog.recentColors);this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(a=0;anavigator.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&&0a.indexOf("DocumentClosedError")){c=a;var l=new Image,m=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";l.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity\x3d"+m+"\x26v\x3d"+encodeURIComponent(EditorUi.VERSION)+ "\x26msg\x3dclientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=f?":colno:"+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.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"; App.prototype.chevronUpImage=!mxClient.IS_SVG?IMAGE_PATH+"/chevron-up.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII\x3d"; App.prototype.chevronDownImage=!mxClient.IS_SVG?IMAGE_PATH+"/chevron-down.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUI1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NUM1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1OTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1QTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsCtve8AAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAALUlEQVR42mJgRgMMRAkwQEXBNAOcBSPhclB1cNVwfcxI+vEZykSpoSR6DiDAAF23ApT99bZ+AAAAAElFTkSuQmCC"; App.prototype.formatShowImage=!mxClient.IS_SVG?IMAGE_PATH+"/format-show.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg\x3d\x3d"; App.prototype.formatHideImage=!mxClient.IS_SVG?IMAGE_PATH+"/format-hide.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII\x3d"; App.prototype.fullscreenImage=!mxClient.IS_SVG?IMAGE_PATH+"/fullscreen.png":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC";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); App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);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";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display= "none";var a=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=a)});a();var c=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(){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=c)});c();var f=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=f)});f();"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 d=document.getElementById("geFooterItem2");if(null!=d){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(d.innerHTML);mxUtils.setPrefixedStyle(d.style,"transition","all 1s ease");var b=this.adsHtml.length-1;this.updateAd=function(a){a==b&&(a=this.adsHtml.length-1);a!=b&&(mxUtils.setPrefixedStyle(d.style,"transform","scale(0)"),d.style.opacity="0",b=a,window.setTimeout(mxUtils.bind(this,function(){d.innerHTML=this.adsHtml[a];mxUtils.setPrefixedStyle(d.style,"transform","scale(1)");d.style.opacity="1"}),1E3))};window.setInterval(mxUtils.bind(this,function(){if(3==this.adsHtml.length)this.updateAd(mxUtils.mod(b+ 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),a=this.crc32(a.substring(0,c))+"@"+f);mxUtils.post("/license","domain\x3d"+encodeURIComponent(f)+"\x26email\x3d"+encodeURIComponent(a)+"\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.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a}; (function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(c,f){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if("undefined"!=typeof Storage&&f){var d=new Date;d.setYear(d.getFullYear()+1);document.cookie="MODE\x3d"+c+"; expires\x3d"+d.toUTCString()}null!=this.appIcon&&(d=this.getCurrentFile(),c=null!=d?d.getMode():null,c==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])), this.appIcon.style.cursor="pointer"):c==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):c==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})(); App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var c=this.getCurrentFile(),f=null!=c?c.getMode():null;f==App.MODE_GOOGLE?0=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){var c=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,mxClient.IS_CHROMEAPP?180:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,App.MODE_DEVICE),this.setMode(null),Editor.useLocalStorage=a)}));a.init()});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();c()})),this.showDialog(a.container,isLocalStorage&&"1"==urlParams.browser?480:380,300,!0,!1),a.init()):null==urlParams.create&&c()}; 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.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,b)})):null!= c&&this.save(a,f))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,d,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(){this.spinner.stop()}),l=mxUtils.bind(this,function(a){k();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){k();this.fileCreated(a,f,e,b)}),l)):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l,!1,g):d==App.MODE_BROWSER?(k(),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)}),l)}),null==localStorage.getItem(a)? d():this.confirm(mxResources.get("replaceIt",[a]),d,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(k(),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))}}; 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+"')")}; 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", 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.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display= "none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");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,null!=a.pages&&1=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");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";mxUtils.br(c);c.appendChild(g);b?mxUtils.write(c,mxResources.get("compressed")): (mxUtils.write(c,mxResources.get("allPages")),mxEvent.addListener(e,"change",function(){e.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")}));c=new CustomDialog(a,c,mxUtils.bind(this,function(){a.downloadFile("xml",b?!g.checked:null,null,!e.checked,!b?!g.checked:null)}),null,mxResources.get("export"));a.showDialog(c.container,300,120,!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);isLocalStorage&&"0"!=urlParams.browser&&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&&0this.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()||299