gojs 无水印版

直接复制新建go.js文件即可 

/*
 * GoJS v1.7.24 JavaScript Library for HTML Diagrams
 * Northwoods Software, https://www.nwoods.com/
 * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation.
 * Copyright (C) 1998-2017 by Northwoods Software Corporation.  All Rights Reserved.
 * THIS SOFTWARE IS LICENSED.  THE LICENSE AGREEMENT IS AT: https://gojs.net/1.7.24/doc/license.html.
 */
(function(window) { var g,ca={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript");
    Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b});
    (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c=a.length?a.push(c):a.splice(b,0,c):w.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Lg:function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Ay:[],K:function(){var a=w.Ay.pop();return void 0===a?new z:a},xb:function(a,b){var c=w.Ay.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){w.Ay.push(a)},PB:[],mm:function(){var a=w.PB.pop();return void 0===a?new ia:a},Ck:function(a){w.PB.push(a)},By:[],Jf:function(){var a=w.By.pop();return void 0===a?new B:a},mg:function(a,b,c,d){var e=w.By.pop();
            if(void 0===e)return new B(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Db:function(a){w.By.push(a)},QB:[],Kf:function(){var a=w.QB.pop();return void 0===a?new ka:a},we:function(a){w.QB.push(a)},Cy:null,s:function(){var a=w.Cy;return null!==a?(w.Cy=null,a):new la},q:function(a){a.reset();w.Cy=a},OB:[],cb:function(){var a=w.OB.pop();return void 0===a?[]:a},ta:function(a){a.length=0;w.OB.push(a)},jo:Object.freeze([]),qm:1,nc:function(a){a.__gohashid=w.qm++},Vp:function(a){var b=a.__gohashid;
            void 0===b&&(b=w.qm++,a.__gohashid=b);return b},Od:function(a){return a.__gohashid},ga:function(a,b){b.Ly=a;ca[a]=b},Ka:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},ni:function(a){a.ZG=!0},defineProperty:function(a,b,c,d,e){w.j(a,"function","Util.defineProperty:classfunc");w.j(b,"object","Util.defineProperty:propobj");w.j(c,"function","Util.defineProperty:getter");w.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d,
            enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,f,c);e=Object.getOwnPropertyDescriptor(a.prototype,f);b&&e&&Object.defineProperty(a.prototype,b,e);break}},aK:!1,u:function(a,b,c,d){w.j(a,"function","Util.defineReadOnlyProperty:classfunc");w.j(b,"object","Util.defineReadOnlyProperty:propobj");w.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){w.k('The property "'+f+'" is read-only and cannot be set to '+
            a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);break}},ce:function(a,b){for(var c in b)b[c]=!0;a.prototype.VG=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?w.lf(a):null===a?"*":""},lf:function(a){if("function"===typeof a){if(a.Ly)return a.Ly;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,
            c).trim();if(""!==b)return a.Ly=b}else if("object"===typeof a&&a.constructor)return w.lf(a.constructor);return typeof a},p:function(a,b,c){w.j(a,"function","Util.defineEnumValue:classfunc");w.j(b,"string","Util.defineEnumValue:name");w.j(c,"number","Util.defineEnumValue:num");c=new da(a,b,c);Object.freeze(c);a[b]=c;var d=a.Uu;d instanceof ma||(d=new ma("string",da),a.Uu=d);d.add(b,c);return c},tb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute?
            (c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c},La:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}},Ju:function(a,b){w.j(a,"object","Setting properties requires Objects as arguments");w.j(b,"object","Setting properties requires Objects as arguments");var c=a instanceof C,d=a instanceof D,e;for(e in b){""===e&&w.k("Setting properties requires non-empty property names");var f=a,h=e;if(c||d){var k=
            e.indexOf(".");if(0c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,f="",h=0;hc;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;cd;d++)b[w.Mg("7ca11abfd7330390")](w.Mg(c[d-1]),10,15*d+0);b[w.Mg("7ca11abfd022028846")]=w.Mg("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Mg("7ca11abfd7330390")](w.Mg(c[d-
    1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])w.p=function(a,b){var c=new da(a,b,2);Object.freeze(c);a[b]=c;var d=a.Uu;d instanceof ma||(d=new ma("string",da),a.Uu=d);d.add(b,c);return c};return a}();function da(a,b,c){w.nc(this);this.dC=a;this.Sb=b;this.cH=c}w.ga("EnumValue",da);da.prototype.toString=function(){return w.lf(this.dC)+"."+this.Sb};w.u(da,{Ee:"classType"},function(){return this.dC});w.u(da,{name:"name"},function(){return this.Sb});w.u(da,{value:"value"},function(){return this.cH});
    var pa;da.findName=pa=function(a,b){if(void 0===b||null===b||""===b)return null;w.j(a,"function","findName:classfunc");w.j(b,"string","EnumValue.findName:name");var c=a.Uu;return c instanceof ma?c.ka(b):null};function qa(){this.bC=[]}qa.prototype.toString=function(){return this.bC.join("")};qa.prototype.add=function(a){""!==a&&this.bC.push(a)};function ra(){}
    function sa(a){void 0===a&&(a=42);this.seed=a;this.wy=48271;this.Tu=2147483647;this.NB=this.Tu/this.wy;this.KG=this.Tu%this.wy;this.JG=1/this.Tu;this.random()}sa.prototype.random=function(){var a=this.seed%this.NB*this.wy-this.seed/this.NB*this.KG;this.seed=0this.key)return!1;w.Ma(a)}var a=a.n,b=a.length,c=++this.wc,d=this.$h;if(null!==d)for(;cthis.key)return!1;w.Ma(a)}var b=--this.wc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.Nf();return!1};Aa.prototype.hasNext=function(){return this.next()};
    Aa.prototype.first=Aa.prototype.first=function(){var a=this.xc;this.Sa=a.F;var b=a.n;this.wc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};Aa.prototype.any=function(a){var b=this.xc;b.Oi=null;var c=b.F,d=b.n,e=d.length;this.wc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.F!==c&&w.Ma(b)}return!1};Aa.prototype.all=function(a){var b=this.xc;b.Oi=null;var c=b.F,d=b.n,e=d.length;this.wc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.F!==c&&w.Ma(b)}return!0};
    Aa.prototype.each=function(a){var b=this.xc;b.Oi=null;var c=b.F,d=b.n,e=d.length;this.wc=e;for(e-=1;0<=e;e--)a(d[e]),b.F!==c&&w.Ma(b);return this};Aa.prototype.map=function(a){var b=this.xc;b.Oi=null;var c=b.F,d=[],e=b.n,f=e.length;this.wc=f;for(f-=1;0<=f;f--)d.push(a(e[f])),b.F!==c&&w.Ma(b);a=new H;a.n=d;a.Hc();return a.i};
    Aa.prototype.filter=function(a){var b=this.xc;b.Oi=null;var c=b.F,d=[],e=b.n,f=e.length;this.wc=f;for(f-=1;0<=f;f--){var h=e[f];a(h)&&d.push(h);b.F!==c&&w.Ma(b)}a=new H(b.na);a.n=d;a.Hc();return a.i};Aa.prototype.concat=function(a){this.xc.Oi=null;return new xa(this,a.i)};w.u(Aa,{count:"count"},function(){return this.xc.n.length});Aa.prototype.Nf=function(){this.key=-1;this.value=null;this.Sa=-1;this.xc.Oi=this};
    Aa.prototype.toString=function(){return"ListIteratorBackwards("+this.wc+"/"+this.xc.count+")"};
    function H(a){w.nc(this);this.P=!1;this.n=[];this.F=0;this.Oi=this.Qb=null;void 0===a||null===a?this.na=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.na=a:w.Fa(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.na=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:w.Fa(a,"null, a primitive type name, or a class type",
        "List constructor: type")}w.ga("List",H);H.prototype.Hc=function(){var a=this.F;a++;999999999a||a>=b.length)&&w.Fa(a,"0 <= i < length",H,"elt:i");return b[a]};H.prototype.get=H.prototype.get=function(a){return this.ea(a)};H.prototype.setElt=H.prototype.kg=function(a,b){var c=this.n;(0>a||a>=c.length)&&w.Fa(a,"0 <= i < length",H,"setElt:i");this.P&&w.ma(this,a);c[a]=b};H.prototype.set=H.prototype.set=function(a,b){this.kg(a,b)};
    H.prototype.first=H.prototype.first=function(){var a=this.n;return 0===a.length?null:a[0]};H.prototype.last=H.prototype.fe=function(){var a=this.n,b=a.length;return 0a&&w.Fa(a,">= 0",H,"insertAt:i");this.P&&w.ma(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Hc();return!0};
    H.prototype.remove=H.prototype["delete"]=H.prototype.remove=function(a){if(null===a)return!1;this.P&&w.ma(this,a);var b=this.n;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Hc();return!0};H.prototype.removeAt=H.prototype.bd=function(a){var b=this.n;(0>a||a>=b.length)&&w.Fa(a,"0 <= i < length",H,"removeAt:i");this.P&&w.ma(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Hc()};
    H.prototype.removeRange=H.prototype.removeRange=function(a,b){var c=this.n,d=c.length;if(0>a)a=0;else if(a>=d)return this;if(0>b)return this;b>=d&&(b=d-1);if(a>b)return this;this.P&&w.ma(this);for(var e=a,f=b+1;f=f)return this;(0>b||b>=e-1)&&w.Fa(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0=e)d.sort(a);else for(f=d.slice(0,c),f.sort(a),a=0;a=e)for(f=d.slice(b),f.sort(a),a=b;a=this.n.length)return ua;var a=this.Qb;return null!==a?(a.reset(),a):new za(this)});
    w.u(H,{Kn:"iteratorBackwards"},function(){if(0>=this.n.length)return ua;var a=this.Oi;return null!==a?(a.reset(),a):new Aa(this)});function Ba(a){this.bi=a;a.Qb=null;this.Sa=a.F;this.Va=null}w.ce(Ba,{key:!0,value:!0});w.u(Ba,{i:"iterator"},function(){return this});Ba.prototype.reset=Ba.prototype.reset=function(){var a=this.bi;a.Qb=null;this.Sa=a.F;this.Va=null};
    Ba.prototype.next=Ba.prototype.next=function(){var a=this.bi;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Nf();return!1};Ba.prototype.hasNext=function(){return this.next()};Ba.prototype.first=Ba.prototype.first=function(){var a=this.bi;this.Sa=a.F;a=a.Ea;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null};
    Ba.prototype.any=function(a){var b=this.bi;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d.value))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};Ba.prototype.all=function(a){var b=this.bi;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d.value))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0};Ba.prototype.each=function(a){var b=this.bi;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d.value),b.F!==c&&w.Ma(b),d=d.Xa;return this};
    Ba.prototype.map=function(a){var b=this.bi;b.Qb=null;for(var c=new H,d=b.F,e=b.Ea;null!==e;)c.add(a(e.value)),b.F!==d&&w.Ma(b),e=e.Xa;return c.i};Ba.prototype.filter=function(a){var b=this.bi;b.Qb=null;for(var c=new H(b.na),d=b.F,e=b.Ea;null!==e;){var f=e.value;a(f)&&c.add(f);b.F!==d&&w.Ma(b);e=e.Xa}return c.i};Ba.prototype.concat=function(a){this.bi.Qb=null;return new xa(this,a.i)};w.u(Ba,{count:"count"},function(){return this.bi.pd});
    Ba.prototype.Nf=function(){this.value=this.key=null;this.Sa=-1;this.bi.Qb=this};Ba.prototype.toString=function(){return null!==this.Va?"SetIterator@"+this.Va.value:"SetIterator"};
    function I(a){w.nc(this);this.P=!1;void 0===a||null===a?this.na=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.na=a:w.Fa(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.na=a===Object?"object":a===String?"string":a===Number?"number":a:w.Fa(a,"null, a primitive type name, or a class type","Set constructor: type");this.qd={};this.pd=0;this.Qb=null;this.F=0;this.Uh=this.Ea=null}w.ga("Set",I);
    I.prototype.Hc=function(){var a=this.F;a++;999999999=this.pd)return ua;var a=this.Qb;return null!==a?(a.reset(),a):new Ba(this)});function Da(a){this.Ga=a;this.Sa=a.F;this.Va=null}w.ce(Da,{key:!0,value:!0});w.u(Da,{i:"iterator"},function(){return this});Da.prototype.reset=Da.prototype.reset=function(){this.Sa=this.Ga.F;this.Va=null};
    Da.prototype.next=Da.prototype.next=function(){var a=this.Ga;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.value=this.key=a=b.key,!0;this.Nf();return!1};Da.prototype.hasNext=function(){return this.next()};Da.prototype.first=Da.prototype.first=function(){var a=this.Ga;this.Sa=a.F;a=a.Ea;return null!==a?(this.Va=a,this.value=this.key=a=a.key):null};
    Da.prototype.any=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d.key))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};Da.prototype.all=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d.key))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0};Da.prototype.each=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d.key),b.F!==c&&w.Ma(b),d=d.Xa;return this};
    Da.prototype.map=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e.key)),b.F!==c&&w.Ma(b),e=e.Xa;return d.i};Da.prototype.filter=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=new H(b.Th),e=b.Ea;null!==e;){var f=e.key;a(f)&&d.add(f);b.F!==c&&w.Ma(b);e=e.Xa}return d.i};Da.prototype.concat=function(a){return new xa(this,a.i)};w.u(Da,{count:"count"},function(){return this.Ga.pd});Da.prototype.Nf=function(){this.value=this.key=null;this.Sa=-1};
    Da.prototype.toString=function(){return null!==this.Va?"MapKeySetIterator@"+this.Va.value:"MapKeySetIterator"};function Ea(a){w.nc(this);this.P=!0;this.Ga=a}w.Ka(Ea,I);Ea.prototype.freeze=function(){return this};Ea.prototype.Qa=function(){return this};Ea.prototype.toString=function(){return"MapKeySet("+this.Ga.toString()+")"};Ea.prototype.add=Ea.prototype.add=function(){w.k("This Set is read-only: "+this.toString());return!1};
    Ea.prototype.set=Ea.prototype.set=function(){w.k("This Set is read-only: "+this.toString());return!1};Ea.prototype.contains=Ea.prototype.contains=function(a){return this.Ga.contains(a)};Ea.prototype.has=Ea.prototype.has=function(a){return this.contains(a)};Ea.prototype.remove=Ea.prototype["delete"]=Ea.prototype.remove=function(){w.k("This Set is read-only: "+this.toString());return!1};Ea.prototype.clear=Ea.prototype.clear=function(){w.k("This Set is read-only: "+this.toString())};
    Ea.prototype.first=Ea.prototype.first=function(){var a=this.Ga.Ea;return null!==a?a.key:null};Ea.prototype.any=function(a){for(var b=this.Ga.Ea;null!==b;){if(a(b.key))return!0;b=b.Xa}return!1};Ea.prototype.all=function(a){for(var b=this.Ga.Ea;null!==b;){if(!a(b.key))return!1;b=b.Xa}return!0};Ea.prototype.each=function(a){for(var b=this.Ga.Ea;null!==b;)a(b.key),b=b.Xa;return this};Ea.prototype.map=function(a){for(var b=new I,c=this.Ga.Ea;null!==c;)b.add(a(c.key)),c=c.Xa;return b};
    Ea.prototype.filter=function(a){for(var b=new I(this.Ga.Th),c=this.Ga.Ea;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Xa}return b};Ea.prototype.concat=function(a){return this.yG().Jc(a)};Ea.prototype.copy=function(){return new Ea(this.Ga)};Ea.prototype.toSet=Ea.prototype.yG=function(){var a=new I(this.Ga.Th),b=this.Ga.qd,c;for(c in b)a.add(b[c].key);return a};Ea.prototype.toArray=Ea.prototype.gc=function(){var a=this.Ga.qd,b=Array(this.Ga.pd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};
    Ea.prototype.toList=function(){var a=new H(this.Ga.Th),b=this.Ga.qd,c;for(c in b)a.add(b[c].key);return a};w.u(Ea,{count:"count"},function(){return this.Ga.pd});w.u(Ea,{size:"size"},function(){return this.Ga.pd});w.u(Ea,{i:"iterator"},function(){return 0>=this.Ga.pd?ua:new Da(this.Ga)});function Ga(a){this.Ga=a;a.Pi=null;this.Sa=a.F;this.Va=null}w.ce(Ga,{key:!0,value:!0});w.u(Ga,{i:"iterator"},function(){return this});
    Ga.prototype.reset=Ga.prototype.reset=function(){var a=this.Ga;a.Pi=null;this.Sa=a.F;this.Va=null};Ga.prototype.next=Ga.prototype.next=function(){var a=this.Ga;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Nf();return!1};Ga.prototype.hasNext=function(){return this.next()};
    Ga.prototype.first=Ga.prototype.first=function(){var a=this.Ga;this.Sa=a.F;a=a.Ea;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null};Ga.prototype.any=function(a){var b=this.Ga;b.Pi=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d.value))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};Ga.prototype.all=function(a){var b=this.Ga;b.Pi=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d.value))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0};
    Ga.prototype.each=function(a){var b=this.Ga;b.Pi=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d.value),b.F!==c&&w.Ma(b),d=d.Xa;return this};Ga.prototype.map=function(a){var b=this.Ga;b.Pi=null;var c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e.value)),b.F!==c&&w.Ma(b),e=e.Xa;return d.i};Ga.prototype.filter=function(a){var b=this.Ga;b.Pi=null;var c=b.F;this.Va=null;for(var d=new H(b.Th),e=b.Ea;null!==e;){var f=e.value;a(f)&&d.add(f);b.F!==c&&w.Ma(b);e=e.Xa}return d.i};
    Ga.prototype.concat=function(a){this.Ga.Pi=null;return new xa(this,a.i)};w.u(Ga,{count:"count"},function(){return this.Ga.pd});Ga.prototype.Nf=function(){this.value=this.key=null;this.Sa=-1;this.Ga.Pi=this};Ga.prototype.toString=function(){return null!==this.Va?"MapValueSetIterator@"+this.Va.value:"MapValueSetIterator"};function Ca(a,b){this.key=a;this.value=b;this.hp=this.Xa=null}w.ce(Ca,{key:!0,value:!0});Ca.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};
    function Ha(a){this.Ga=a;a.Qb=null;this.Sa=a.F;this.Va=null}w.ce(Ha,{key:!0,value:!0});w.u(Ha,{i:"iterator"},function(){return this});Ha.prototype.reset=Ha.prototype.reset=function(){var a=this.Ga;a.Qb=null;this.Sa=a.F;this.Va=null};Ha.prototype.next=Ha.prototype.next=function(){var a=this.Ga;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.key=b.key,this.value=b.value,!0;this.Nf();return!1};Ha.prototype.hasNext=function(){return this.next()};
    Ha.prototype.first=Ha.prototype.first=function(){var a=this.Ga;this.Sa=a.F;a=a.Ea;return null!==a?(this.Va=a,this.key=a.key,this.value=a.value,a):null};Ha.prototype.any=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};Ha.prototype.all=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0};
    Ha.prototype.each=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d),b.F!==c&&w.Ma(b),d=d.Xa;return this};Ha.prototype.map=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e)),b.F!==c&&w.Ma(b),e=e.Xa;return d.i};Ha.prototype.filter=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)a(e)&&d.add(e),b.F!==c&&w.Ma(b),e=e.Xa;return d.i};
    Ha.prototype.concat=function(a){this.Ga.Qb=null;return new xa(this,a.i)};w.u(Ha,{count:"count"},function(){return this.Ga.pd});Ha.prototype.Nf=function(){this.value=this.key=null;this.Sa=-1;this.Ga.Qb=this};Ha.prototype.toString=function(){return null!==this.Va?"MapIterator@"+this.Va:"MapIterator"};
    function ma(a,b){w.nc(this);this.P=!1;void 0===a||null===a?this.Th=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Th=a:w.Fa(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Th=a===Object?"object":a===String?"string":a===Number?"number":a:w.Fa(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.st=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"===
    b||"function"===b?this.st=b:w.Fa(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.st=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:w.Fa(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.qd={};this.pd=0;this.Pi=this.Qb=null;this.F=0;this.Uh=this.Ea=null}w.ga("Map",ma);
    ma.prototype.Hc=function(){var a=this.F;a++;999999999=this.count)return ua;var a=this.Qb;return null!==a?(a.reset(),a):new Ha(this)});w.u(ma,{BF:"iteratorKeys"},function(){return 0>=this.count?ua:new Da(this)});w.u(ma,{CF:"iteratorValues"},function(){if(0>=this.count)return ua;var a=this.Pi;return null!==a?(a.reset(),a):new Ga(this)});function z(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b)}w.ga("Point",z);w.ni(z);w.ce(z,{x:!0,y:!0});z.prototype.assign=function(a){this.x=a.x;this.y=a.y};
    z.prototype.setTo=z.prototype.m=function(a,b){this.x=a;this.y=b;return this};z.prototype.set=z.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};z.prototype.copy=function(){var a=new z;a.x=this.x;a.y=this.y;return a};z.prototype.Ha=function(){Object.freeze(this);return this};z.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};z.prototype.freeze=function(){return this};z.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this};
    z.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new z(c,e)}return new z};z.stringify=function(a){return a.x.toString()+" "+a.y.toString()};z.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};z.prototype.equals=z.prototype.L=function(a){return a instanceof z?this.x===a.x&&this.y===a.y:!1};
    z.prototype.equalTo=z.prototype.kx=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Kc=function(a){return J(this.x,a.x)&&J(this.y,a.y)};z.prototype.add=z.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.Ej=function(a){this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this};
    z.prototype.rotate=z.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.x=d*b-e*c;this.y=e*b+d*c;return this};z.prototype.scale=z.prototype.scale=function(a,b){this.x*=a;this.y*=b;return this};z.prototype.distanceSquaredPoint=z.prototype.zf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};
    z.prototype.distanceSquared=z.prototype.Pp=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};z.prototype.normalize=z.prototype.normalize=function(){var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0b?270:0;if(0===b)return 0a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}z.prototype.projectOntoLineSegment=function(a,b,c,d){La(a,b,c,d,this.x,this.y,this);return this};z.prototype.projectOntoLineSegmentPoint=function(a,b){La(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};z.prototype.snapToGrid=function(a,b,c,d){Na(this.x,this.y,a,b,c,d,this);return this};
    z.prototype.snapToGridPoint=function(a,b){Na(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Zn=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};z.prototype.setSpot=z.prototype.Lu=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};z.prototype.transform=function(a){a.nb(this);return this};function Pa(a,b){b.pi(a);return a}var Ra;
    z.distanceLineSegmentSquared=Ra=function(a,b,c,d,e,f){var h=e-c,k=f-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=f-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var Sa;z.distanceSquared=Sa=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var Ta;z.direction=Ta=function(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0b?270:0;if(0===b)return 0a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d};
    z.prototype.isReal=z.prototype.I=function(){return isFinite(this.x)&&isFinite(this.y)};function ia(a,b){void 0===a?this.height=this.width=0:(this.width=a,this.height=b)}w.ga("Size",ia);w.ni(ia);w.ce(ia,{width:!0,height:!0});ia.prototype.assign=function(a){this.width=a.width;this.height=a.height};ia.prototype.setTo=ia.prototype.m=function(a,b){this.width=a;this.height=b;return this};ia.prototype.set=ia.prototype.set=function(a){this.width=a.width;this.height=a.height;return this};
    ia.prototype.copy=function(){var a=new ia;a.width=this.width;a.height=this.height;return a};ia.prototype.Ha=function(){Object.freeze(this);return this};ia.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};ia.prototype.freeze=function(){return this};ia.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this};
    ia.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new ia(c,e)}return new ia};ia.stringify=function(a){return a.width.toString()+" "+a.height.toString()};ia.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};ia.prototype.equals=ia.prototype.L=function(a){return a instanceof ia?this.width===a.width&&this.height===a.height:!1};
    ia.prototype.equalTo=ia.prototype.kx=function(a,b){return this.width===a&&this.height===b};ia.prototype.equalsApprox=ia.prototype.Kc=function(a){return J(this.width,a.width)&&J(this.height,a.height)};ia.prototype.isReal=ia.prototype.I=function(){return isFinite(this.width)&&isFinite(this.height)};
    function B(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof z?b instanceof z?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof ia?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):w.k("Incorrect arguments supplied to Rect constructor"):(this.x=a,this.y=b,this.width=c,this.height=d)}w.ga("Rect",B);w.ni(B);w.ce(B,{x:!0,y:!0,width:!0,height:!0});
    B.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};function Ua(a,b,c){a.width=b;a.height=c}B.prototype.setTo=B.prototype.m=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};B.prototype.set=B.prototype.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};B.prototype.setPoint=B.prototype.Yg=function(a){this.x=a.x;this.y=a.y;return this};
    B.prototype.setSize=function(a){this.width=a.width;this.height=a.height;return this};B.prototype.copy=function(){var a=new B;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};B.prototype.Ha=function(){Object.freeze(this);return this};B.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};B.prototype.freeze=function(){return this};B.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this};
    B.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new B(c,e,f,h)}return new B};B.stringify=function(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()};
    B.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};B.prototype.equals=B.prototype.L=function(a){return a instanceof B?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};B.prototype.equalTo=B.prototype.kx=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};B.prototype.equalsApprox=B.prototype.Kc=function(a){return J(this.x,a.x)&&J(this.y,a.y)&&J(this.width,a.width)&&J(this.height,a.height)};
    function Va(a,b){return Wa(a.x,b.x)&&Wa(a.y,b.y)&&Wa(a.width,b.width)&&Wa(a.height,b.height)}B.prototype.containsPoint=B.prototype.Ia=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y};B.prototype.containsRect=B.prototype.xk=function(a){return this.x<=a.x&&a.x+a.width<=this.x+this.width&&this.y<=a.y&&a.y+a.height<=this.y+this.height};
    B.prototype.contains=B.prototype.contains=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.x<=a&&a+c<=this.x+this.width&&this.y<=b&&b+d<=this.y+this.height};B.prototype.reset=function(){this.height=this.width=this.y=this.x=0};B.prototype.offset=B.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this};B.prototype.inflate=B.prototype.Af=function(a,b){return Xa(this,b,a,b,a)};B.prototype.addMargin=B.prototype.Ow=function(a){return Xa(this,a.top,a.right,a.bottom,a.left)};
    B.prototype.subtractMargin=B.prototype.MJ=function(a){return Xa(this,-a.top,-a.right,-a.bottom,-a.left)};B.prototype.grow=function(a,b,c,d){return Xa(this,a,b,c,d)};function Xa(a,b,c,d,e){var f=a.width;c+e<=-f?(a.x+=f/2,a.width=0):(a.x-=e,a.width+=c+e);c=a.height;b+d<=-c?(a.y+=c/2,a.height=0):(a.y-=b,a.height+=b+d);return a}B.prototype.intersectRect=function(a){return Ya(this,a.x,a.y,a.width,a.height)};B.prototype.intersect=B.prototype.lF=function(a,b,c,d){return Ya(this,a,b,c,d)};
    function Ya(a,b,c,d,e){var f=Math.max(a.x,b),h=Math.max(a.y,c);b=Math.min(a.x+a.width,b+d);c=Math.min(a.y+a.height,c+e);a.x=f;a.y=h;a.width=Math.max(0,b-f);a.height=Math.max(0,c-h);return a}B.prototype.intersectsRect=B.prototype.Zf=function(a){return this.mF(a.x,a.y,a.width,a.height)};
    B.prototype.intersects=B.prototype.mF=function(a,b,c,d){var e=this.width,f=this.x;if(Infinity!==e&&Infinity!==c&&(e+=f,c+=a,isNaN(c)||isNaN(e)||f>c||a>e))return!1;a=this.height;c=this.y;return Infinity!==a&&Infinity!==d&&(a+=c,d+=b,isNaN(d)||isNaN(a)||c>d||b>a)?!1:!0};function $a(a,b){var c=a.width,d=b.width+10+10,e=a.x,f=b.x-10;if(e>d+f||f>c+e)return!1;c=a.height;d=b.height+10+10;e=a.y;f=b.y-10;return e>d+f||f>c+e?!1:!0}B.prototype.unionPoint=B.prototype.vi=function(a){return ab(this,a.x,a.y,0,0)};
    B.prototype.unionRect=B.prototype.Jh=function(a){return ab(this,a.x,a.y,a.width,a.height)};B.prototype.union=B.prototype.DG=function(a,b,c,d){void 0===c&&(c=0);void 0===d&&(d=0);return ab(this,a,b,c,d)};function ab(a,b,c,d,e){var f=Math.min(a.x,b),h=Math.min(a.y,c);b=Math.max(a.x+a.width,b+d);c=Math.max(a.y+a.height,c+e);a.x=f;a.y=h;a.width=b-f;a.height=c-h;return a}B.prototype.setSpot=B.prototype.Lu=function(a,b,c){this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};
    var db;B.contains=db=function(a,b,c,d,e,f,h,k){void 0===h&&(h=0);void 0===k&&(k=0);return a<=e&&e+h<=a+c&&b<=f&&f+k<=b+d};B.intersects=function(a,b,c,d,e,f,h,k){c+=a;h+=e;if(a>h||e>c)return!1;a=d+b;k+=f;return b>k||f>a?!1:!0};w.defineProperty(B,{left:"left"},function(){return this.x},function(a){this.x=a});w.defineProperty(B,{top:"top"},function(){return this.y},function(a){this.y=a});w.defineProperty(B,{right:"right"},function(){return this.x+this.width},function(a){this.x+=a-(this.x+this.width)});
    w.defineProperty(B,{bottom:"bottom"},function(){return this.y+this.height},function(a){this.y+=a-(this.y+this.height)});w.defineProperty(B,{position:"position"},function(){return new z(this.x,this.y)},function(a){this.x=a.x;this.y=a.y});w.defineProperty(B,{size:"size"},function(){return new ia(this.width,this.height)},function(a){this.width=a.width;this.height=a.height});
    w.defineProperty(B,{Ml:"center"},function(){return new z(this.x+this.width/2,this.y+this.height/2)},function(a){this.x=a.x-this.width/2;this.y=a.y-this.height/2});w.defineProperty(B,{la:"centerX"},function(){return this.x+this.width/2},function(a){this.x=a-this.width/2});w.defineProperty(B,{ra:"centerY"},function(){return this.y+this.height/2},function(a){this.y=a-this.height/2});B.prototype.isReal=B.prototype.I=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};
    B.prototype.isEmpty=function(){return 0===this.width&&0===this.height};function hb(a,b,c,d){void 0===a?this.left=this.bottom=this.right=this.top=0:void 0===b?this.left=this.bottom=this.right=this.top=a:void 0===c?(d=b,this.top=a,this.right=b,this.bottom=a,this.left=d):void 0!==d?(this.top=a,this.right=b,this.bottom=c,this.left=d):w.k("Invalid arguments to Margin constructor")}w.ga("Margin",hb);w.ni(hb);w.ce(hb,{top:!0,right:!0,bottom:!0,left:!0});
    hb.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left};hb.prototype.setTo=hb.prototype.m=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d;return this};hb.prototype.set=hb.prototype.set=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};hb.prototype.copy=function(){var a=new hb;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};
    hb.prototype.Ha=function(){Object.freeze(this);return this};hb.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};hb.prototype.freeze=function(){return this};hb.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this};
    hb.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=NaN;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));if(isNaN(c))return new hb;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new hb(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new hb(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new hb(c,e):new hb(c,e,f,h)}return new hb};
    hb.stringify=function(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()};hb.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};hb.prototype.equals=hb.prototype.L=function(a){return a instanceof hb?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1};
    hb.prototype.equalTo=hb.prototype.kx=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};hb.prototype.equalsApprox=hb.prototype.Kc=function(a){return J(this.top,a.top)&&J(this.right,a.right)&&J(this.bottom,a.bottom)&&J(this.left,a.left)};hb.prototype.isReal=hb.prototype.I=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ka(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}w.ni(ka);
    w.ce(ka,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ka.prototype.set=ka.prototype.set=function(a){this.m11=a.m11;this.m12=a.m12;this.m21=a.m21;this.m22=a.m22;this.dx=a.dx;this.dy=a.dy;return this};ka.prototype.copy=function(){var a=new ka;a.m11=this.m11;a.m12=this.m12;a.m21=this.m21;a.m22=this.m22;a.dx=this.dx;a.dy=this.dy;return a};ka.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"};
    ka.prototype.equals=ka.prototype.L=function(a){return a instanceof ka?this.m11===a.m11&&this.m12===a.m12&&this.m21===a.m21&&this.m22===a.m22&&this.dx===a.dx&&this.dy===a.dy:!1};ka.prototype.isIdentity=ka.prototype.hu=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};ka.prototype.reset=ka.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this};
    ka.prototype.multiply=ka.prototype.multiply=function(a){var b=this.m12*a.m11+this.m22*a.m12,c=this.m11*a.m21+this.m21*a.m22,d=this.m12*a.m21+this.m22*a.m22,e=this.m11*a.dx+this.m21*a.dy+this.dx,f=this.m12*a.dx+this.m22*a.dy+this.dy;this.m11=this.m11*a.m11+this.m21*a.m12;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=f;return this};
    ka.prototype.multiplyInverted=ka.prototype.KF=function(a){var b=1/(a.m11*a.m22-a.m12*a.m21),c=a.m22*b,d=-a.m12*b,e=-a.m21*b,f=a.m11*b,h=b*(a.m21*a.dy-a.m22*a.dx),k=b*(a.m12*a.dx-a.m11*a.dy);a=this.m12*c+this.m22*d;b=this.m11*e+this.m21*f;e=this.m12*e+this.m22*f;f=this.m11*h+this.m21*k+this.dx;h=this.m12*h+this.m22*k+this.dy;this.m11=this.m11*c+this.m21*d;this.m12=a;this.m21=b;this.m22=e;this.dx=f;this.dy=h;return this};
    ka.prototype.invert=ka.prototype.vx=function(){var a=1/(this.m11*this.m22-this.m12*this.m21),b=-this.m12*a,c=-this.m21*a,d=this.m11*a,e=a*(this.m21*this.dy-this.m22*this.dx),f=a*(this.m12*this.dx-this.m11*this.dy);this.m11=this.m22*a;this.m12=b;this.m21=c;this.m22=d;this.dx=e;this.dy=f;return this};
    ka.prototype.rotate=ka.prototype.rotate=function(a,b,c){360<=a?a-=360:0>a&&(a+=360);if(0===a)return this;this.translate(b,c);var d=0,e=0;90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(e=a*Math.PI/180,d=Math.cos(e),e=Math.sin(e));a=this.m12*d+this.m22*e;var f=this.m11*-e+this.m21*d,h=this.m12*-e+this.m22*d;this.m11=this.m11*d+this.m21*e;this.m12=a;this.m21=f;this.m22=h;this.translate(-b,-c);return this};
    ka.prototype.translate=ka.prototype.translate=function(a,b){this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};ka.prototype.scale=ka.prototype.scale=function(a,b){void 0===b&&(b=a);this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this};ka.prototype.transformPoint=ka.prototype.nb=function(a){var b=a.x,c=a.y;a.x=b*this.m11+c*this.m21+this.dx;a.y=b*this.m12+c*this.m22+this.dy;return a};
    ka.prototype.invertedTransformPoint=ka.prototype.pi=function(a){var b=1/(this.m11*this.m22-this.m12*this.m21),c=-this.m12*b,d=this.m11*b,e=b*(this.m12*this.dx-this.m11*this.dy),f=a.x,h=a.y;a.x=f*this.m22*b+h*-this.m21*b+b*(this.m21*this.dy-this.m22*this.dx);a.y=f*c+h*d+e;return a};
    ka.prototype.transformRect=ka.prototype.CG=function(a){var b=a.x,c=a.y,d=b+a.width,e=c+a.height,f=this.m11,h=this.m12,k=this.m21,l=this.m22,m=this.dx,n=this.dy,p=b*f+c*k+m,q=b*h+c*l+n,r=d*f+c*k+m,c=d*h+c*l+n,s=b*f+e*k+m,b=b*h+e*l+n,f=d*f+e*k+m,d=d*h+e*l+n,e=p,h=q,p=Math.min(p,r),e=Math.max(e,r),h=Math.min(h,c),q=Math.max(q,c),p=Math.min(p,s),e=Math.max(e,s),h=Math.min(h,b),q=Math.max(q,b),p=Math.min(p,f),e=Math.max(e,f),h=Math.min(h,d),q=Math.max(q,d);a.x=p;a.y=h;a.width=e-p;a.height=q-h;return a};
    function L(a,b,c,d){void 0===a?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===b&&(b=0),void 0===c&&(c=0),void 0===d&&(d=0),this.x=a,this.y=b,this.offsetX=c,this.offsetY=d)}w.ga("Spot",L);w.ni(L);w.ce(L,{x:!0,y:!0,offsetX:!0,offsetY:!0});L.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY};L.prototype.setTo=L.prototype.m=function(a,b,c,d){this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this};
    L.prototype.set=L.prototype.set=function(a){this.x=a.x;this.y=a.y;this.offsetX=a.offsetX;this.offsetY=a.offsetY;return this};L.prototype.copy=function(){var a=new L;a.x=this.x;a.y=this.y;a.offsetX=this.offsetX;a.offsetY=this.offsetY;return a};L.prototype.Ha=function(){Object.freeze(this);return this};L.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};L.prototype.freeze=function(){return this};
    L.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this};function ib(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a}var xb;
    L.parse=xb=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return yb;if("TopLeft"===a)return Ab;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return Bb;if("TopRight"===a)return Gb;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return Ib;if("Center"===a)return Jb;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Pb;if("BottomLeft"===a)return Qb;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Rb;if("BottomRight"===a)return Sb;if("TopSide"===a)return Xb;if("LeftSide"===
        a)return Yb;if("RightSide"===a)return Zb;if("BottomSide"===a)return $b;if("TopBottomSides"===a)return ac;if("LeftRightSides"===a)return bc;if("TopLeftSides"===a)return ec;if("TopRightSides"===a)return fc;if("BottomLeftSides"===a)return gc;if("BottomRightSides"===a)return hc;if("NotTopSide"===a)return ic;if("NotLeftSide"===a)return jc;if("NotRightSide"===a)return nc;if("NotBottomSide"===a)return oc;if("AllSides"===a)return pc;if("Default"===a)return qc;a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;
        var d=a[b++];void 0!==d&&0b.offset?1:-1});for(k=0;k=2*Math.PI?(Rc(a,b,c,d,e,e+Math.PI,h),Rc(a,b,c,d,e+Math.PI,e+2*Math.PI,h),a.path.push(["M",l,f])):(b+=d*Math.cos(e),c+=d*Math.sin(e),k=180*k/Math.PI,e=h?0:1,h=180<=k===!!h?0:1,0!==a.path.length?a.path.push(["L",b,c]):a.path.push(["M",b,c]),a.path.push(["A",d,d,k,h,e,l,f]))}}function Qc(a,b,c,d,e,f,h){var k=new Kc;k.Ub=[b,c,d,e,f,h];b={};Tc(a,"g",b,k);k=a.addElement("g",b);a.mf.push(k)}
    g.bb=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+w.qm++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,f,h;c=Pc(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",PL:this.shadowBlur/2});d=Pc(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=Pc(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});f=Pc(this,"feOffset",{"in":"comp",result:"offsetBlur",
        dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=Pc(this,"feMerge",{});h.appendChild(Pc(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(Pc(this,"feMergeNode",{"in":"SourceGraphic"}));b.appendChild(c);b.appendChild(d);b.appendChild(e);b.appendChild(f);b.appendChild(h);0b?(this.scale(b/a,1),this.translate((a-b)/2,0)):b>a&&(this.scale(1,a/b),this.translate(0,(b-a)/2));this.Tq?this.clip():this.fill();a>b?(this.translate(-(a-b)/2,0),this.scale(1/(b/a),1)):b>a&&(this.translate(0,-(b-a)/2),this.scale(1,1/(a/b)))}else this.Tq?this.clip():this.fill()};
    g.Dj=function(){this.Tq||this.stroke()};w.defineProperty(Xc,{Hp:"clipInsteadOfFill"},function(){return this.Tq},function(a){this.Tq=a});g=Xc.prototype;g.sB=function(a,b,c){this.$s=a;this.at=b;this.Gg=c};g.$n=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.ao=function(){this.shadowOffsetX=this.$s;this.shadowOffsetY=this.at;this.shadowBlur=this.Gg};
    g.lA=function(a,b){var c=this.ua;if(void 0!==c.setLineDash)c.setLineDash(a),c.lineDashOffset=b;else if(void 0!==c.webkitLineDash)c.webkitLineDash=a,c.webkitLineDashOffset=b;else if(void 0!==c.mozDash)c.mozDash=a,c.mozDashOffset=b;else return!1;return!0};g.iA=function(){var a=this.ua;void 0!==a.setLineDash?(a.setLineDash(w.jo),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=w.jo,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)};
    g.Fe=function(a){a&&(this.Jy="");this.Iy=this.Ky=""};
    var cd=(Math.sqrt(2)-1)/3*4,dd=(new z(0,0)).Ha(),ed=(new B(0,0,0,0)).Ha(),fd=(new hb(0,0,0,0)).Ha(),nd=(new hb(2,2,2,2)).Ha(),od=(new z(6,6)).Ha(),pd=(new z(-Infinity,-Infinity)).Ha(),qd=(new z(Infinity,Infinity)).Ha(),rd=(new ia(0,0)).Ha(),Ad=(new ia(1,1)).Ha(),Bd=(new ia(6,6)).Ha(),Cd=(new ia(8,8)).Ha(),Dd=(new ia(10,10)).Ha(),Ed=(new ia(Infinity,Infinity)).Ha(),Fd=(new z(NaN,NaN)).Ha(),Gd=(new ia(NaN,NaN)).Ha(),Nd=(new B(NaN,NaN,NaN,NaN)).Ha(),Od=(new L(.156,.156)).Ha(),Pd=(new L(.844,.844)).Ha(),
        Qd=new ra,Rd=new ra,Sd=null;function Td(a){if(0>=a)return 0;var b=Sd;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);Sd=b}return 1>a?(c=1/a,2E3>=c?1/b[c|0]:Math.sqrt(a)):2E3>=a?b[a|0]:Math.sqrt(a)}function J(a,b){var c=a-b;return.5>c&&-.5c&&-5E-8=e&&(e=1E-6);var k=0,l=0,m=0,n=0;am-n)if(a-c>e||c-a>e){if(f=(d-b)/(c-a)*(f-a)+b,f-e<=h&&h<=f+e)return!0}else return!0;else if(b-d>e||d-b>e){if(h=(c-a)/(d-b)*(h-b)+a,h-e<=f&&f<=h+e)return!0}else return!0;return!1}
    function Vd(a,b,c,d,e,f,h,k,l,m,n,p){if(Ud(a,b,h,k,p,c,d)&&Ud(a,b,h,k,p,e,f))return Ud(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,u=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(q+s)/2;c=(r+u)/2;var s=(s+e)/2,u=(u+f)/2,t=(d+s)/2,x=(c+u)/2;return Vd(a,b,q,r,d,c,t,x,l,m,n,p)||Vd(t,x,s,u,e,f,h,k,l,m,n,p)}
    function Wd(a,b,c,d,e,f,h,k,l,m){if(Ud(a,b,h,k,l,c,d)&&Ud(a,b,h,k,l,e,f))ab(m,a,b,0,0),ab(m,h,k,0,0);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,u=(c+r)/2;Wd(a,b,n,p,d,c,s,u,l,m);Wd(s,u,q,r,e,f,h,k,l,m)}}
    function Xd(a,b,c,d,e,f,h,k,l,m){if(Ud(a,b,h,k,l,c,d)&&Ud(a,b,h,k,l,e,f))0===m.length&&(m.push(a),m.push(b)),m.push(h),m.push(k);else{var n=(a+c)/2,p=(b+d)/2,q=(c+e)/2,r=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(n+q)/2;c=(p+r)/2;var q=(q+e)/2,r=(r+f)/2,s=(d+q)/2,u=(c+r)/2;Xd(a,b,n,p,d,c,s,u,l,m);Xd(s,u,q,r,e,f,h,k,l,m)}}
    function ee(a,b,c,d,e,f,h,k,l,m,n,p,q,r){var s=1-l;a=a*s+c*l;b=b*s+d*l;c=c*s+e*l;d=d*s+f*l;e=e*s+h*l;f=f*s+k*l;k=a*s+c*l;h=b*s+d*l;c=c*s+e*l;d=d*s+f*l;m.x=a;m.y=b;n.x=k;n.y=h;p.x=k*s+c*l;p.y=h*s+d*l;q.x=c;q.y=d;r.x=e;r.y=f}function fe(a,b,c,d,e,f,h,k,l,m){if(Ud(a,b,e,f,m,c,d))return Ud(a,b,e,f,m,k,l);var n=(a+c)/2,p=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var q=(n+c)/2,r=(p+d)/2;return fe(a,b,n,p,q,r,h,k,l,m)||fe(q,r,c,d,e,f,h,k,l,m)}
    function ge(a,b,c,d,e,f,h,k){if(Ud(a,b,e,f,h,c,d))ab(k,a,b,0,0),ab(k,e,f,0,0);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;ge(a,b,l,m,n,p,h,k);ge(n,p,c,d,e,f,h,k)}}function he(a,b,c,d,e,f,h,k){if(Ud(a,b,e,f,h,c,d))0===k.length&&(k.push(a),k.push(b)),k.push(e),k.push(f);else{var l=(a+c)/2,m=(b+d)/2;c=(c+e)/2;d=(d+f)/2;var n=(l+c)/2,p=(m+d)/2;he(a,b,l,m,n,p,h,k);he(n,p,c,d,e,f,h,k)}}
    function ie(a,b,c,d,e,f,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(Ud(a,b,h,k,q,c,d)&&Ud(a,b,h,k,q,e,f)){var s=(a-h)*(m-p)-(b-k)*(l-n);if(0===s)return!1;q=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/s;s=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/s;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(h=l=0,bh)return!1}else if(ah)return!1;r.x=q;r.y=s;return!0}var s=(a+c)/2,u=(b+d)/2;c=(c+e)/2;d=(d+f)/2;e=(e+h)/2;f=(f+k)/2;var t=(s+c)/2,x=(u+d)/2;c=(c+e)/2;d=(d+f)/2;var v=(t+c)/2,A=(x+d)/2,
        y=(n-l)*(n-l)+(p-m)*(p-m),K=!1;ie(a,b,s,u,t,x,v,A,l,m,n,p,q,r)&&(b=(r.x-l)*(r.x-l)+(r.y-m)*(r.y-m),b=q&&(q=1E-6);if(Ud(a,b,h,k,q,c,d)&&Ud(a,b,h,k,q,e,f)){q=(a-h)*(m-p)-(b-k)*(l-n);if(0===q)return r;var s=((a*k-b*h)*(l-n)-(a-h)*(l*p-m*n))/q,u=((a*k-b*h)*(m-p)-(b-k)*(l*p-m*n))/q;if(s>=n)return r;if((l>n?l-n:n-l)<(m>p?m-p:p-m)){if(a=l=0,ba)return r}else if(aa)return r;0q&&r--}else{var s=(a+c)/2,u=(b+d)/2,t=(c+e)/2,x=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(s+t)/2;c=(u+x)/2;var t=(t+e)/2,x=(x+f)/2,
        v=(d+t)/2,A=(c+x)/2,r=r+je(a,b,s,u,d,c,v,A,l,m,n,p,q),r=r+je(v,A,t,x,e,f,h,k,l,m,n,p,q)}return r}
    function La(a,b,c,d,e,f,h){if(Wa(a,c)){var k=0;c=0;bc)return h.x=a,h.y=c,!1;h.x=a;h.y=d;return!0}if(Wa(b,d)){ac)return h.x=c,h.y=b,!1;h.x=d;h.y=b;return!0}k=((a-e)*(a-c)+(b-f)*(b-d))/((c-a)*(c-a)+(d-b)*(d-b));if(-5E-6>k)return h.x=a,h.y=b,!1;if(1.000005c)return l.x=a,l.y=c,!1;l.x=a;l.y=f;return!0}h=(d-b)/(c-a);if(Wa(k,h))return La(a,b,c,d,e,f,l),!1;e=(h*a-k*e+f-b)/(h-k);if(Wa(h,0)){ac)return l.x=c,l.y=b,!1;l.x=e;l.y=b;return!0}f=
        h*(e-a)+b;return La(a,b,c,d,e,f,l)}function le(a,b,c,d,e,f,h,k,l){var m=1E21,n=a,p=b;if(ke(a,b,a,d,e,f,h,k,l)){var q=(l.x-e)*(l.x-e)+(l.y-f)*(l.y-f);qm}
    function me(a,b,c,d,e,f,h,k,l){c=a-c;var m=e-h,n=h=0;0===c||0===m?0===c?(k=(f-k)/m,h=a,n=k*h+(f-k*e)):(d=(b-d)/c,h=e,n=d*h+(b-d*a)):(d=(b-d)/c,k=(f-k)/m,a=b-d*a,h=(f-k*e-a)/(d-k),n=d*h+a);l.m(h,n);return l}
    function ne(a,b,c){var d=b.x,e=b.y,f=c.x,h=c.y,k=a.left,l=a.right,m=a.top,n=a.bottom;return d===f?(f=a=0,e=m):e===h?(d=k):a.Ia(b)||a.Ia(c)||oe(k,m,l,m,d,e,f,h)||oe(l,m,l,n,d,e,f,h)||oe(l,n,k,n,d,e,f,h)||oe(k,n,k,m,d,e,f,h)?!0:!1}function oe(a,b,c,d,e,f,h,k){return 0>=xe(a,b,c,d,e,f)*xe(a,b,c,d,h,k)&&0>=xe(e,f,h,k,a,b)*xe(e,f,h,k,c,d)}
    function xe(a,b,c,d,e,f){c-=a;d-=b;a=e-a;b=f-b;f=a*d-b*c;0===f&&(f=a*c+b*d,0f&&(f=0)));return 0>f?-1:0a&&(a+=360);360<=a&&(a-=360);return a}
    function ze(a,b,c,d){var e=Math.PI;d||(b*=e/180,c*=e/180);d=bc,f=0>d,h=0,k=h=0;af;++f){m=.5*(d+e);if(m===d||m===e)break;k=l/(m+b);h=c/(m+a);k=k*k+h*h-1;if(0k)e=m;else break}n=b*n/(m+b)-n;p=a*p/(m+a)-p;a=Math.sqrt(n*n+p*p)}else a=Math.abs(p-m);else p=l*l-m*m,a=l*n,aa?"M"+this.ha.toString()+" "+this.fa.toString()+"L"+this.C.toString()+" "+this.D.toString():"M"+this.ha.toFixed(a)+" "+this.fa.toFixed(a)+"L"+this.C.toFixed(a)+" "+this.D.toFixed(a);case He:var b=new B(this.ha,this.fa,0,0);b.DG(this.C,this.D,0,0);return 0>a?"M"+b.x.toString()+" "+b.y.toString()+"H"+b.right.toString()+"V"+b.bottom.toString()+"H"+b.left.toString()+"z":"M"+b.x.toFixed(a)+" "+b.y.toFixed(a)+"H"+b.right.toFixed(a)+
        "V"+b.bottom.toFixed(a)+"H"+b.left.toFixed(a)+"z";case Le:b=new B(this.ha,this.fa,0,0);b.DG(this.C,this.D,0,0);if(0>a){var c=b.left.toString()+" "+(b.y+b.height/2).toString(),d=b.right.toString()+" "+(b.y+b.height/2).toString();return"M"+c+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+d+"A"+(b.width/2).toString()+" "+(b.height/2).toString()+" 0 0 1 "+c}c=b.left.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);d=b.right.toFixed(a)+" "+(b.y+b.height/2).toFixed(a);return"M"+c+"A"+(b.width/
        2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+d+"A"+(b.width/2).toFixed(a)+" "+(b.height/2).toFixed(a)+" 0 0 1 "+c;case De:for(var b="",c=this.fc.n,d=c.length,e=0;e=u-1?!0:null!==l[m+1].match(/[A-Za-z]/)}function d(){m++;return l[m]}function e(){var a=new z(parseFloat(d()),parseFloat(d()));n===n.toLowerCase()&&(a.x=s.x+a.x,a.y=s.y+a.y);return a}function f(){return s=e()}function h(){return r=e()}function k(){return"c"!==p.toLowerCase()&&"s"!==p.toLowerCase()?s:new z(2*s.x-r.x,2*s.y-r.y)}void 0===b&&(b=!1);"string"!==typeof a&&w.Bd(a,"string",Ce,"parse:str");a=a.replace(/,/gm," ");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,
        "$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm,"$1 $2");a=a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm,"$1 $2");a=a.replace(/([0-9])([+\-])/gm,"$1 $2");a=a.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");a=a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");a=a.replace(/[\s\r\t\n]+/gm," ");a=a.replace(/^\s+|\s+$/g,"");for(var l=a.split(" "),m=-1,n="",p="",q=new z(0,0),r=new z(0,0),s=new z(0,
        0),u=l.length,t=w.s(),x=!1,v=!1,A=!0,y=null;!(m>=u-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":A=!0;v=x=!1;break;case "M":y=f();null===t.Xb||!0===A?(M(t,y.x,y.y,x,!1,!v),A=!1):t.moveTo(y.x,y.y);for(q=s;!c();)y=f(),t.lineTo(y.x,y.y);break;case "L":for(;!c();)y=f(),t.lineTo(y.x,y.y);break;case "H":for(;!c();)s=y=new z((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),t.lineTo(s.x,s.y);break;case "V":for(;!c();)s=y=new z(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),t.lineTo(s.x,s.y);
        break;case "C":for(;!c();){var K=e(),E=h(),y=f();N(t,K.x,K.y,E.x,E.y,y.x,y.y)}break;case "S":for(;!c();)K=k(),E=h(),y=f(),N(t,K.x,K.y,E.x,E.y,y.x,y.y);break;case "Q":for(;!c();)E=h(),y=f(),Qe(t,E.x,E.y,y.x,y.y);break;case "T":for(;!c();)r=E=k(),y=f(),Qe(t,E.x,E.y,y.x,y.y);break;case "B":for(;!c();){var y=parseFloat(d()),K=parseFloat(d()),E=parseFloat(d()),P=parseFloat(d()),$=parseFloat(d()),S=$,ba=!1;c()||(S=parseFloat(d()),c()||(ba=0!==parseFloat(d())));n===n.toLowerCase()&&(E+=s.x,P+=s.y);t.arcTo(y,
        K,E,P,$,S,ba)}break;case "A":for(;!c();)K=Math.abs(parseFloat(d())),E=Math.abs(parseFloat(d())),P=parseFloat(d()),$=!!parseFloat(d()),S=!!parseFloat(d()),y=f(),Re(t,K,E,P,$,S,y.x,y.y);break;case "Z":y=t.o.fc.n[t.o.fc.length-1];O(t);s=q;break;case "F":y="";for(K=1;l[m+K];)if(null!==l[m+K].match(/[Uu]/))K++;else if(null===l[m+K].match(/[A-Za-z]/))K++;else{y=l[m+K];break}y.match(/[Mm]/)?x=!0:Se(t);break;case "U":y="";for(K=1;l[m+K];)if(null!==l[m+K].match(/[Ff]/))K++;else if(null===l[m+K].match(/[A-Za-z]/))K++;
    else{y=l[m+K];break}y.match(/[Mm]/)?v=!0:t.bb(!1)}q=t.o;w.q(t);if(b)for(t=q.fc.i;t.next();)y=t.value,y.gu=!0;return q};function Te(a,b){for(var c=a.length,d=w.K(),e=0;eh&&(h+=360),s.ze+=h);0>a&&(s.ze=180-s.ze,s.rf=-s.rf);0>d&&(s.ze=-s.ze,s.rf=-s.rf);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case rf:h=s.C;k=s.D;s.C=h*
        a+k*c+e;s.D=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.Hj+=h);0>a&&(s.Hj=180-s.Hj,s.am=!s.am);0>d&&(s.Hj=-s.Hj,s.am=!s.am);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:w.k("Unknown Segment type: "+s.type)}}}}this.fb=!0;return this};
    Ce.prototype.Ia=function(a,b,c,d){var e=a.x,f=a.y,h=this.gb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.fc.n,s=r.length,u=0;u=a)return 0;if((e>h?e-h:h-e)<(f>k?f-k:k-f)){if(e=a=0,fe)return 0}else if(ee)return 0;return 0a?a=0:1=f)return d=(f-h)/p,c=c[k],k=c[2*n],e=c[2*n+1],b.m(k+(c[2*n+2]-k)*d,e+(c[2*n+3]-e)*d),b;h+=p}b.m(NaN,NaN);return b};
    Ce.prototype.getAngleAlongPath=Ce.prototype.ZE=function(a){0>a?a=0:1=e)return b=b[h],b=180*Math.atan2(b[2*a+3]-b[2*a+1],b[2*a+2]-b[2*a])/Math.PI;f+=m}}return NaN};
    Ce.prototype.getFractionForPoint=Ce.prototype.$H=function(a){if(this.type===Ge){var b=this.ha,c=this.fa,d=this.C,e=this.D;if(b!==d||c!==e){var f=a.x;a=a.y;var h=0,k=0;return b===d?(c=k?k===c?0:1:Math.abs(a-c)/(k-h)):c===e?(b=k?k===b?0:1:Math.abs(f-b)/(k-h)):((f-b)*(f-b)+(a-c)*(a-c))/((d-b)*(d-b)+(e-c)*(e-c))}}else if(this.type===He){if(b=this.ha,c=this.fa,d=this.C,e=this.D,b!==d||c!==e){var h=d-b,k=e-c,l=2*h+2*k,f=a.x;
        a=a.y;f=Math.min(Math.max(f,b),d);a=Math.min(Math.max(a,c),e);var b=Math.abs(f-b),d=Math.abs(f-d),c=Math.abs(a-c),e=Math.abs(a-e),m=Math.min(b,d,c,e);if(m===c)return f/l;if(m===d)return(h+a)/l;if(m===e)return(2*h+k-f)/l;if(m===b)return(2*h+2*k-a)/l}}else{for(var e=this.qx,h=this.Rt,k=this.St,l=w.K(),c=Infinity,b=d=0,f=e.length,n=m=0,p=0;pa?0:1a?"M"+this.ha.toString()+" "+this.fa.toString():"M"+this.ha.toFixed(a)+" "+this.fa.toFixed(a),c=this.vb.n,d=c.length,e=0;ea&&(a+=360),this.Fd=a,this.Ye=0,this.oh=Math.max(d,0),this.Fg=Math.max(e,0),this.Vo="boolean"===typeof h?!!h:!1,this.qo=!!k):(this.Fd=d,this.Ye=e,a===qf&&(f=Math.max(f,0)),this.oh=f,"number"===typeof h?(a===qf&&(h=Math.max(h,0)),this.Fg=h):this.Fg=0,this.qo=this.Vo=!1);this.Sh=!1;this.fb=
        !0;this.pg=null}w.ga("PathSegment",xf);w.ni(xf);xf.prototype.copy=function(){var a=new xf;a.na=this.na;a.yb=this.yb;a.Gb=this.Gb;a.Fd=this.Fd;a.Ye=this.Ye;a.oh=this.oh;a.Fg=this.Fg;a.Vo=this.Vo;a.qo=this.qo;a.Sh=this.Sh;a.fb=this.fb;return a};
    xf.prototype.equalsApprox=xf.prototype.Kc=function(a){if(!(a instanceof xf)||this.type!==a.type||this.xx!==a.xx)return!1;switch(this.type){case nf:case Ne:return J(this.C,a.C)&&J(this.D,a.D);case of:return J(this.C,a.C)&&J(this.D,a.D)&&J(this.uc,a.uc)&&J(this.Qc,a.Qc)&&J(this.Ch,a.Ch)&&J(this.Dh,a.Dh);case pf:return J(this.C,a.C)&&J(this.D,a.D)&&J(this.uc,a.uc)&&J(this.Qc,a.Qc);case qf:return J(this.ze,a.ze)&&J(this.rf,a.rf)&&J(this.la,a.la)&&J(this.ra,a.ra)&&J(this.radiusX,a.radiusX)&&J(this.radiusY,
            a.radiusY);case rf:return this.am===a.am&&this.Bx===a.Bx&&J(this.Hj,a.Hj)&&J(this.C,a.C)&&J(this.D,a.D)&&J(this.radiusX,a.radiusX)&&J(this.radiusY,a.radiusY);default:return!1}};xf.prototype.ic=function(a){a.Ee===xf?this.type=a:w.Fj(this,a)};
    xf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case nf:b=0>a?"M"+this.C.toString()+" "+this.D.toString():"M"+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case Ne:b=0>a?"L"+this.C.toString()+" "+this.D.toString():"L"+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case of:b=0>a?"C"+this.uc.toString()+" "+this.Qc.toString()+" "+this.Ch.toString()+" "+this.Dh.toString()+" "+this.C.toString()+" "+this.D.toString():"C"+this.uc.toFixed(a)+" "+this.Qc.toFixed(a)+" "+this.Ch.toFixed(a)+
        " "+this.Dh.toFixed(a)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case pf:b=0>a?"Q"+this.uc.toString()+" "+this.Qc.toString()+" "+this.C.toString()+" "+this.D.toString():"Q"+this.uc.toFixed(a)+" "+this.Qc.toFixed(a)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;case qf:b=0>a?"B"+this.ze.toString()+" "+this.rf.toString()+" "+this.la.toString()+" "+this.ra.toString()+" "+this.radiusX:"B"+this.ze.toFixed(a)+" "+this.rf.toFixed(a)+" "+this.la.toFixed(a)+" "+this.ra.toFixed(a)+" "+this.radiusX;
        break;case rf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.Hj.toString()+" "+(this.Bx?1:0)+" "+(this.am?1:0)+" "+this.C.toString()+" "+this.D.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.Hj.toFixed(a)+" "+(this.Bx?1:0)+" "+(this.am?1:0)+" "+this.C.toFixed(a)+" "+this.D.toFixed(a);break;default:b=this.type.toString()}return b+(this.Sh?"z":"")};var nf;xf.Move=nf=w.p(xf,"Move",0);var Ne;xf.Line=Ne=w.p(xf,"Line",1);var of;
    xf.Bezier=of=w.p(xf,"Bezier",2);var pf;xf.QuadraticBezier=pf=w.p(xf,"QuadraticBezier",3);var qf;xf.Arc=qf=w.p(xf,"Arc",4);var rf;xf.SvgArc=rf=w.p(xf,"SvgArc",4);xf.prototype.freeze=function(){this.P=!0;return this};xf.prototype.Qa=function(){this.P=!1;return this};xf.prototype.close=xf.prototype.close=function(){this.Sh=!0;return this};
    function sf(a,b){if(null!==a.pg&&!1===b.fb)return a.pg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.pg=[],a.pg;var e=a.Fd,f=a.Ye,h=ze(c=r?h=Math.PI:1<=r&&(h=0);!l&&0h&&(h+=2*Math.PI);l=b>f?1:b/f;r=b>f?f/b:1;b=ze(b>f?b:f,n,n+h,!0);f=w.Kf();f.reset();f.translate(c,d);f.rotate(a.Fd,0,0);f.scale(l,r);Te(b,f);w.we(f);a.pg=b;return a.pg}
    w.defineProperty(xf,{xx:"isClosed"},function(){return this.Sh},function(a){this.Sh!==a&&(this.Sh=a,this.fb=!0)});w.defineProperty(xf,{type:"type"},function(){return this.na},function(a){this.P&&w.ma(this,a);this.na=a;this.fb=!0});w.defineProperty(xf,{C:"endX"},function(){return this.yb},function(a){this.P&&w.ma(this,a);this.yb=a;this.fb=!0});w.defineProperty(xf,{D:"endY"},function(){return this.Gb},function(a){this.P&&w.ma(this,a);this.Gb=a;this.fb=!0});
    w.defineProperty(xf,{uc:"point1X"},function(){return this.Fd},function(a){this.P&&w.ma(this,a);this.Fd=a;this.fb=!0});w.defineProperty(xf,{Qc:"point1Y"},function(){return this.Ye},function(a){this.P&&w.ma(this,a);this.Ye=a;this.fb=!0});w.defineProperty(xf,{Ch:"point2X"},function(){return this.oh},function(a){this.P&&w.ma(this,a);this.oh=a;this.fb=!0});w.defineProperty(xf,{Dh:"point2Y"},function(){return this.Fg},function(a){this.P&&w.ma(this,a);this.Fg=a;this.fb=!0});
    w.defineProperty(xf,{la:"centerX"},function(){return this.Fd},function(a){this.P&&w.ma(this,a);this.Fd=a;this.fb=!0});w.defineProperty(xf,{ra:"centerY"},function(){return this.Ye},function(a){this.P&&w.ma(this,a);this.Ye=a;this.fb=!0});w.defineProperty(xf,{radiusX:"radiusX"},function(){return this.oh},function(a){0>a&&w.Fa(a,">= zero",xf,"radiusX");this.P&&w.ma(this,a);this.oh=a;this.fb=!0});
    w.defineProperty(xf,{radiusY:"radiusY"},function(){return this.Fg},function(a){0>a&&w.Fa(a,">= zero",xf,"radiusY");this.P&&w.ma(this,a);this.Fg=a;this.fb=!0});w.defineProperty(xf,{ze:"startAngle"},function(){return this.yb},function(a){this.yb!==a&&(this.P&&w.ma(this,a),a%=360,0>a&&(a+=360),this.yb=a,this.fb=!0)});w.defineProperty(xf,{rf:"sweepAngle"},function(){return this.Gb},function(a){this.P&&w.ma(this,a);360a&&(a=-360);this.Gb=a;this.fb=!0});
    w.defineProperty(xf,{am:"isClockwiseArc"},function(){return this.qo},function(a){this.P&&w.ma(this,a);this.qo=a;this.fb=!0});w.defineProperty(xf,{Bx:"isLargeArc"},function(){return this.Vo},function(a){this.P&&w.ma(this,a);this.Vo=a;this.fb=!0});w.defineProperty(xf,{Hj:"xAxisRotation"},function(){return this.Fd},function(a){a%=360;0>a&&(a+=360);this.P&&w.ma(this,a);this.Fd=a;this.fb=!0});
    function zf(){this.Z=null;this.Pz=(new z(0,0)).freeze();this.Wy=(new z(0,0)).freeze();this.gv=this.dw=0;this.hv=1;this.Tv="";this.Iw=this.vv=!1;this.sv=this.iv=0;this.Jj=this.Ev=this.Pv=!1;this.vr=null;this.Gw=0;this.Ig=this.Fw=null}w.ga("InputEvent",zf);
    zf.prototype.copy=function(){var a=new zf;a.Z=this.Z;a.Pz.assign(this.ef);a.Wy.assign(this.da);a.dw=this.dw;a.gv=this.gv;a.hv=this.hv;a.Tv=this.Tv;a.vv=this.vv;a.Iw=this.Iw;a.iv=this.iv;a.sv=this.sv;a.Pv=this.Pv;a.Ev=this.Ev;a.Jj=this.Jj;a.vr=this.vr;a.Gw=this.Gw;a.Fw=this.Fw;a.Ig=this.Ig;return a};
    zf.prototype.toString=function(){var a="^";0!==this.zd&&(a+="M:"+this.zd);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ge&&(a+="C:"+this.Ge);0!==this.Sl&&(a+="D:"+this.Sl);this.Cc&&(a+="h");this.bubbles&&(a+="b");null!==this.da&&(a+="@"+this.da.toString());return a};w.defineProperty(zf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(zf,{ef:"viewPoint"},function(){return this.Pz},function(a){w.G(a,z,zf,"viewPoint");this.Pz.assign(a)});
    w.defineProperty(zf,{da:"documentPoint"},function(){return this.Wy},function(a){w.G(a,z,zf,"documentPoint");this.Wy.assign(a)});zf.prototype.getMultiTouchViewPoint=zf.prototype.tx=function(a,b){var c=this.g;if(null===c)return b;Af(c,this.event,a,b);return b};zf.prototype.getMultiTouchDocumentPoint=function(a,b){var c=this.g;if(null===c)return b;Af(c,this.event,a,b);b.assign(c.CB(b));return b};w.defineProperty(zf,{zd:"modifiers"},function(){return this.dw},function(a){this.dw=a});
    w.defineProperty(zf,{button:"button"},function(){return this.gv},function(a){this.gv=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}});w.defineProperty(zf,{buttons:"buttons"},function(){return this.hv},function(a){this.hv=a});w.defineProperty(zf,{key:"key"},function(){return this.Tv},function(a){this.Tv=a});w.defineProperty(zf,{Tl:"down"},function(){return this.vv},function(a){this.vv=a});
    w.defineProperty(zf,{up:"up"},function(){return this.Iw},function(a){this.Iw=a});w.defineProperty(zf,{Ge:"clickCount"},function(){return this.iv},function(a){this.iv=a});w.defineProperty(zf,{Sl:"delta"},function(){return this.sv},function(a){this.sv=a});w.defineProperty(zf,{iu:"isMultiTouch"},function(){return this.Pv},function(a){this.Pv=a});w.defineProperty(zf,{Cc:"handled"},function(){return this.Ev},function(a){this.Ev=a});
    w.defineProperty(zf,{bubbles:"bubbles"},function(){return this.Jj},function(a){this.Jj=a});w.defineProperty(zf,{event:"event"},function(){return this.vr},function(a){this.vr=a});w.u(zf,{vj:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});w.u(zf,{Hk:"isMac"},function(){return w.Hk});w.defineProperty(zf,{timestamp:"timestamp"},function(){return this.Gw},function(a){this.Gw=a});
    w.defineProperty(zf,{lg:"targetDiagram"},function(){return this.Fw},function(a){this.Fw=a});w.defineProperty(zf,{Re:"targetObject"},function(){return this.Ig},function(a){this.Ig=a});w.defineProperty(zf,{control:"control"},function(){return 0!==(this.zd&1)},function(a){this.zd=a?this.zd|1:this.zd&-2});w.defineProperty(zf,{shift:"shift"},function(){return 0!==(this.zd&4)},function(a){this.zd=a?this.zd|4:this.zd&-5});
    w.defineProperty(zf,{alt:"alt"},function(){return 0!==(this.zd&2)},function(a){this.zd=a?this.zd|2:this.zd&-3});w.defineProperty(zf,{ru:"meta"},function(){return 0!==(this.zd&8)},function(a){this.zd=a?this.zd|8:this.zd&-9});w.defineProperty(zf,{left:"left"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?0===this.button:0!==(this.buttons&1)},function(a){this.buttons=a?this.buttons|1:this.buttons&-2});
    w.defineProperty(zf,{right:"right"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?2===this.button:0!==(this.buttons&2)},function(a){this.buttons=a?this.buttons|2:this.buttons&-3});w.defineProperty(zf,{tL:"middle"},function(){var a=this.event;return null!==a&&a instanceof MouseEvent&&("mousedown"===a.type||"mouseup"===a.type)?1===this.button:0!==(this.buttons&4)},function(a){this.buttons=a?this.buttons|4:this.buttons&-5});
    function Bf(){this.Z=null;this.Sb="";this.mw=this.Dw=null;this.Qq=!1}w.ga("DiagramEvent",Bf);Bf.prototype.copy=function(){var a=new Bf;a.Z=this.Z;a.Sb=this.Sb;a.Dw=this.Dw;a.mw=this.mw;a.Qq=this.Qq;return a};Bf.prototype.toString=function(){var a="*"+this.name;null!==this.uB&&(a+=":"+this.uB.toString());null!==this.XA&&(a+="("+this.XA.toString()+")");return a};w.defineProperty(Bf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});
    w.defineProperty(Bf,{name:"name"},function(){return this.Sb},function(a){this.Sb=a});w.defineProperty(Bf,{uB:"subject"},function(){return this.Dw},function(a){this.Dw=a});w.defineProperty(Bf,{XA:"parameter"},function(){return this.mw},function(a){this.mw=a});w.defineProperty(Bf,{cancel:"cancel"},function(){return this.Qq},function(a){this.Qq!==a&&w.It("DiagramEvent.cancel","2.0");this.Qq=a});function Cf(){this.Rq=Nf;this.Xm=this.cw="";this.ss=this.ts=this.xs=this.ys=this.ws=this.Z=this.me=null}
    w.ga("ChangedEvent",Cf);var Of;Cf.Transaction=Of=w.p(Cf,"Transaction",-1);var Nf;Cf.Property=Nf=w.p(Cf,"Property",0);var Pf;Cf.Insert=Pf=w.p(Cf,"Insert",1);var Qf;Cf.Remove=Qf=w.p(Cf,"Remove",2);Cf.prototype.clear=Cf.prototype.clear=function(){this.ss=this.ts=this.xs=this.ys=this.ws=this.Z=this.me=null};
    Cf.prototype.copy=function(){var a=new Cf;a.Rq=this.Rq;a.cw=this.cw;a.Xm=this.Xm;a.me=this.me;a.Z=this.Z;a.ws=this.ws;var b=this.ys;a.ys=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.xs;a.xs=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.ts;a.ts=w.Pa(b)&&"function"===typeof b.S?b.S():b;b=this.ss;a.ss=w.Pa(b)&&"function"===typeof b.S?b.S():b;return a};Cf.prototype.ic=function(a){a.Ee===Cf?this.Ac=a:w.Fj(this,a)};
    Cf.prototype.toString=function(){var a="",a=this.Ac===Of?a+"* ":this.Ac===Nf?a+(null!==this.aa?"!m":"!d"):a+((null!==this.aa?"!m":"!d")+this.Ac);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.qf&&this.qf!==this.propertyName&&(a+=" "+this.qf);a+=": ";this.Ac===Of?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Rf(this.object)),null!==this.oldValue&&(a+="  old: "+Rf(this.oldValue)),null!==this.Aj&&(a+=" "+this.Aj),null!==this.newValue&&
    (a+="  new: "+Rf(this.newValue)),null!==this.zj&&(a+=" "+this.zj));return a};Cf.prototype.getValue=Cf.prototype.ka=function(a){return a?this.oldValue:this.newValue};Cf.prototype.getParam=function(a){return a?this.Aj:this.zj};Cf.prototype.canUndo=Cf.prototype.canUndo=function(){return null!==this.aa||null!==this.g?!0:!1};Cf.prototype.undo=Cf.prototype.undo=function(){this.canUndo()&&(null!==this.aa?this.aa.qn(this,!0):null!==this.g&&this.g.qn(this,!0))};
    Cf.prototype.canRedo=Cf.prototype.canRedo=function(){return null!==this.aa||null!==this.g?!0:!1};Cf.prototype.redo=Cf.prototype.redo=function(){this.canRedo()&&(null!==this.aa?this.aa.qn(this,!1):null!==this.g&&this.g.qn(this,!1))};w.defineProperty(Cf,{aa:"model"},function(){return this.me},function(a){this.me=a});w.defineProperty(Cf,{g:"diagram"},function(){return this.Z},function(a){this.Z=a});w.defineProperty(Cf,{Ac:"change"},function(){return this.Rq},function(a){this.Rq=a});
    w.defineProperty(Cf,{qf:"modelChange"},function(){return this.cw},function(a){this.cw=a});w.defineProperty(Cf,{propertyName:"propertyName"},function(){return this.Xm},function(a){this.Xm=a});w.u(Cf,{AF:"isTransactionFinished"},function(){return this.Rq===Of&&("CommittedTransaction"===this.Xm||"FinishedUndo"===this.Xm||"FinishedRedo"===this.Xm)});w.defineProperty(Cf,{object:"object"},function(){return this.ws},function(a){this.ws=a});
    w.defineProperty(Cf,{oldValue:"oldValue"},function(){return this.ys},function(a){this.ys=a});w.defineProperty(Cf,{Aj:"oldParam"},function(){return this.xs},function(a){this.xs=a});w.defineProperty(Cf,{newValue:"newValue"},function(){return this.ts},function(a){this.ts=a});w.defineProperty(Cf,{zj:"newParam"},function(){return this.ss},function(a){this.ss=a});
    function F(a){1f?b+("\\u000"+a.charCodeAt(d).toString(16)):32>f?b+("\\u00"+a.charCodeAt(d).toString(16)):8232===f?b+"\\u2028":8233===f?b+"\\u2029":b+e}return'"'+b+'"'};
    F.prototype.writeJsonValue=F.prototype.Su=function(a){return void 0===a?"undefined":null===a?"null":!0===a?"true":!1===a?"false":"string"===typeof a?this.quote(a):"number"===typeof a?Infinity===a?"9e9999":-Infinity===a?"-9e9999":isNaN(a)?'{"class":"NaN"}':a.toString():a instanceof Date?'{"class":"Date", "value":"'+a.toJSON()+'"}':a instanceof Number?this.Su(a.valueOf()):w.isArray(a)?Xf(this,a):w.Pa(a)?Uf(this,a):"function"===typeof a?"null":a.toString()};
    function Xf(a,b,c){void 0===c&&(c=!1);var d=w.Za(b);if(0>=d)return"[]";var e=new qa;e.add("[ ");c&&1d)return;w.Lg(a.De,d)}vg(a,"nodeDataArray",Qf,"nodeDataArray",a,b,null,d,null);a.Ru(b)}
    F.prototype.removeNodeDataCollection=function(a){if(w.isArray(a))for(var b=w.Za(a),c=0;cb&&(b=w.Za(a));w.sh(a,b,c);vg(this,"",Pf,"",a,null,c,null,b)};F.prototype.removeArrayItem=F.prototype.WF=function(a,b){void 0===b&&(b=-1);a===this.De&&w.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=w.Za(a)-1);var c=w.Ba(a,b);w.Lg(a,b);vg(this,"",Qf,"",a,c,null,b,null)};
    w.defineProperty(F,{Vn:"nodeCategoryProperty"},function(){return this.Sm},function(a){var b=this.Sm;b!==a&&(wg(a,F,"nodeCategoryProperty"),this.Sm=a,this.h("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.sA=function(a){if(null===a)return"";var b=this.Sm;if(""===b)return"";b=w.tb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;w.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""};
    F.prototype.setCategoryForNodeData=F.prototype.ky=function(a,b){w.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.Sm;if(""!==c)if(this.He(a)){var d=w.tb(a,c);void 0===d&&(d="");d!==b&&(w.La(a,c,b),vg(this,"nodeCategory",Nf,c,a,d,b))}else w.La(a,c,b)}};
    function Q(a,b){F.call(this);2w.Kl(d,a.newValue)&&w.sh(d,c,a.newValue));return}}else if(a.Ac===
        Qf){c=a.Aj;if("linkDataArray"===a.qf){d=a.oldValue;w.Pa(d)&&"number"===typeof c&&(e=this.bf(d),b?(this.Ri.add(d),w.Ba(this.gf,c)!==d&&w.sh(this.gf,c,d),void 0!==e&&this.ed.add(e,d)):(this.Ri.remove(d),w.Ba(this.gf,c)===d&&w.Lg(this.gf,c),void 0!==e&&this.ed.remove(e)));return}if("linkLabelKeys"===a.qf){d=this.Dk(a.object);w.isArray(d)&&"number"===typeof c&&(b?0>w.Kl(d,a.newValue)&&w.sh(d,c,a.newValue):(c=w.Kl(d,a.newValue),0<=c&&w.Lg(d,c)));return}}F.prototype.qn.call(this,a,b)};
    w.defineProperty(Q,{Vz:"archetypeNodeData"},function(){return this.vm},function(a){var b=this.vm;b!==a&&(null!==a&&w.G(a,Object,Q,"archetypeNodeData"),this.vm=a,this.h("archetypeNodeData",b,a))});Q.prototype.On=function(a){if(void 0!==a){var b=this.vm;if(null!==b){var c=this.ve(a);null===c&&(c=this.copyNodeData(b),w.La(c,this.fk,a),this.Hl(c))}return a}};
    w.defineProperty(Q,{Mn:"linkFromKeyProperty"},function(){return this.Vh},function(a){var b=this.Vh;b!==a&&(wg(a,Q,"linkFromKeyProperty"),this.Vh=a,this.h("linkFromKeyProperty",b,a))});Q.prototype.getFromKeyForLinkData=Q.prototype.Xl=function(a){if(null!==a){var b=this.Vh;if(""!==b&&(b=w.tb(a,b),void 0!==b)){if(xg(b))return b;w.k("FromKey value for link data "+a+" is not a number or a string: "+b)}}};
    Q.prototype.setFromKeyForLinkData=Q.prototype.kB=function(a,b){null===b&&(b=void 0);void 0===b||xg(b)||w.Bd(b,"number or string",Q,"setFromKeyForLinkData:key");if(null!==a){var c=this.Vh;if(""!==c)if(b=this.On(b),this.vh(a)){var d=w.tb(a,c);d!==b&&(Ug(this,d,a),w.La(a,c,b),null===this.ve(b)&&Bg(this,b,a),vg(this,"linkFromKey",Nf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.La(a,c,b)}};
    w.defineProperty(Q,{Nn:"linkToKeyProperty"},function(){return this.Wh},function(a){var b=this.Wh;b!==a&&(wg(a,Q,"linkToKeyProperty"),this.Wh=a,this.h("linkToKeyProperty",b,a))});Q.prototype.getToKeyForLinkData=Q.prototype.Yl=function(a){if(null!==a){var b=this.Wh;if(""!==b&&(b=w.tb(a,b),void 0!==b)){if(xg(b))return b;w.k("ToKey value for link data "+a+" is not a number or a string: "+b)}}};
    Q.prototype.setToKeyForLinkData=Q.prototype.qB=function(a,b){null===b&&(b=void 0);void 0===b||xg(b)||w.Bd(b,"number or string",Q,"setToKeyForLinkData:key");if(null!==a){var c=this.Wh;if(""!==c)if(b=this.On(b),this.vh(a)){var d=w.tb(a,c);d!==b&&(Ug(this,d,a),w.La(a,c,b),null===this.ve(b)&&Bg(this,b,a),vg(this,"linkToKey",Nf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.La(a,c,b)}};
    w.defineProperty(Q,{nu:"linkFromPortIdProperty"},function(){return this.Nm},function(a){var b=this.Nm;b!==a&&(wg(a,Q,"linkFromPortIdProperty"),a!==this.Mn&&a!==this.Nn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Nm=a,this.h("linkFromPortIdProperty",b,a))});Q.prototype.getFromPortIdForLinkData=Q.prototype.aI=function(a){if(null===a)return"";var b=this.Nm;if(""===b)return"";a=w.tb(a,b);return void 0===a?"":a};
    Q.prototype.setFromPortIdForLinkData=Q.prototype.lB=function(a,b){w.j(b,"string",Q,"setFromPortIdForLinkData:portname");if(null!==a){var c=this.Nm;if(""!==c)if(this.vh(a)){var d=w.tb(a,c);void 0===d&&(d="");d!==b&&(w.La(a,c,b),vg(this,"linkFromPortId",Nf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.La(a,c,b)}};
    w.defineProperty(Q,{pu:"linkToPortIdProperty"},function(){return this.Om},function(a){var b=this.Om;b!==a&&(wg(a,Q,"linkToPortIdProperty"),a!==this.Mn&&a!==this.Nn||w.k("linkFromPortIdProperty name must not be the same as the GraphLinksModel.linkFromKeyProperty or linkToKeyProperty: "+a),this.Om=a,this.h("linkToPortIdProperty",b,a))});Q.prototype.getToPortIdForLinkData=Q.prototype.eI=function(a){if(null===a)return"";var b=this.Om;if(""===b)return"";a=w.tb(a,b);return void 0===a?"":a};
    Q.prototype.setToPortIdForLinkData=Q.prototype.rB=function(a,b){w.j(b,"string",Q,"setToPortIdForLinkData:portname");if(null!==a){var c=this.Om;if(""!==c)if(this.vh(a)){var d=w.tb(a,c);void 0===d&&(d="");d!==b&&(w.La(a,c,b),vg(this,"linkToPortId",Nf,c,a,d,b),"string"===typeof c&&this.Ib(a,c))}else w.La(a,c,b)}};w.defineProperty(Q,{ou:"linkLabelKeysProperty"},function(){return this.Bg},function(a){var b=this.Bg;b!==a&&(wg(a,Q,"linkLabelKeysProperty"),this.Bg=a,this.h("linkLabelKeysProperty",b,a))});
    Q.prototype.getLabelKeysForLinkData=Q.prototype.Dk=function(a){if(null===a)return w.jo;var b=this.Bg;if(""===b)return w.jo;a=w.tb(a,b);return void 0===a?w.jo:a};
    Q.prototype.setLabelKeysForLinkData=Q.prototype.nG=function(a,b){w.Xz(b,Q,"setLabelKeysForLinkData:arr");if(null!==a){var c=this.Bg;if(""!==c)if(this.vh(a)){var d=w.tb(a,c);void 0===d&&(d=w.jo);if(d!==b){for(var e=w.Za(d),f=0;fe||(w.Lg(d,e),this.vh(a)&&(Ug(this,b,a),vg(this,"linkLabelKeys",Qf,c,a,b,null,e,null)))}else void 0!==d&&w.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}};
    w.defineProperty(Q,{Rg:"linkDataArray"},function(){return this.gf},function(a){var b=this.gf;if(b!==a){w.Xz(a,Q,"linkDataArray");this.ed.clear();for(var c=w.Za(a),d=0;dd)return;w.Lg(a.gf,d)}vg(a,"linkDataArray",Qf,"linkDataArray",a,b,null,d,null);c=a.Xl(b);Ug(a,c,b);c=a.Yl(b);Ug(a,c,b);d=a.Dk(b);if(w.isArray(d))for(var e=w.Za(d),f=0;fa.Ih&&w.trace("Ending transaction without having started a transaction: "+c);var d=1===a.Ih;d&&b&&a.gd("CommittingTransaction",c,a.mj);var e=0;if(0a.rj;e--)f=d.ea(e),null!==f&&f.clear(),
        d.bd(e),a.pz=!0;e=a.GF;0===e&&(e=1);0=e&&(f=d.ea(0),null!==f&&f.clear(),d.bd(0),a.fh--);d.add(b);a.fh++;d.freeze();f=b}a.gd("CommittedTransaction",c,f)}else{a.Pf=!0;try{a.isEnabled&&null!==f&&(f.eu=!0,f.undo())}finally{a.gd("RolledBackTransaction",c,f),a.Pf=!1}null!==f&&f.clear()}a.rv=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Xf;for(b=c.count-1;b>=a;b--)d=c.ea(b),null!==d&&d.undo(),c.Qa(),c.bd(b);c.freeze()}return!1}
    Sf.prototype.canUndo=Sf.prototype.canUndo=function(){if(!this.isEnabled||0=this.Ih&&!this.fz&&(a=a.g,null!==a&&!1===a.Jn||w.trace("Change not within a transaction: "+c.toString()))}};
    Sf.prototype.skipsEvent=function(a){if(null===a||0>a.Ac.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Mc)return!0}else if(a instanceof qg&&a.Mc)return!0;return!1};w.u(Sf,{$I:"models"},function(){return this.vz.i});w.defineProperty(Sf,{isEnabled:"isEnabled"},function(){return this.ff},function(a){this.ff=a});w.u(Sf,{AG:"transactionToUndo"},function(){return 0<=this.rj&&this.rj<=this.history.count-1?this.history.ea(this.rj):null});
    w.u(Sf,{zG:"transactionToRedo"},function(){return this.rjb.zh||(b.scale=a))};sg.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.vy);w.wd(a,sg,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.Ll!==ph)return!1;a*=b.scale;return ab.zh?!1:b.Vw};
    sg.prototype.increaseZoom=function(a){void 0===a&&(a=this.vy);w.wd(a,sg,"increaseZoom:factor");var b=this.g;null!==b&&b.Ll===ph&&(a*=b.scale,ab.zh||(b.scale=a))};sg.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.vy);w.wd(a,sg,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.Ll!==ph)return!1;a*=b.scale;return ab.zh?!1:b.Vw};sg.prototype.resetZoom=function(a){void 0===a&&(a=this.ex);w.wd(a,sg,"resetZoom:newscale");var b=this.g;null===b||ab.zh||(b.scale=a)};
    sg.prototype.canResetZoom=function(a){void 0===a&&(a=this.ex);w.wd(a,sg,"canResetZoom:newscale");var b=this.g;return null===b||ab.zh?!1:b.Vw};sg.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.Sz&&!isNaN(this.qz)&&a.se.L(this.Rz)?(a.scale=this.qz,a.position=this.cD,this.Sz=NaN,this.Rz=ed):(this.qz=b,this.cD=c.copy(),a.zoomToFit(),this.Sz=a.scale,this.Rz=a.se.copy())}};sg.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.Vw};
    sg.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&w.G(a,R,sg,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.cj&&(this.cj.next()?a=this.cj.value:this.cj=null)}catch(c){this.cj=null}null===a&&(0e||Math.abs(b.y-a.y)>d};w.u(rg,{g:"diagram"},function(){return this.Z});w.defineProperty(rg,{name:"name"},function(){return this.Sb},function(a){w.j(a,"string",rg,"name");this.Sb=a});
    w.defineProperty(rg,{isEnabled:"isEnabled"},function(){return this.ff},function(a){w.j(a,"boolean",rg,"isEnabled");this.ff=a});w.defineProperty(rg,{sa:"isActive"},function(){return this.QC},function(a){w.j(a,"boolean",rg,"isActive");this.QC=a});w.defineProperty(rg,{Lf:"transactionResult"},function(){return this.bE},function(a){null!==a&&w.j(a,"string",rg,"transactionResult");this.bE=a});
    function oh(){rg.call(this);0e&&(e=k),l>f&&(f=l))}}Infinity===c?b.m(0,0,0,0):b.m(c,d,e-c,f-d)}
    function Di(a,b){if(null===a.dc){var c=a.g;if(!(null===c||b&&(c.hb||c.Cf))&&null!==a.Zb){var d=c.ia;d.isEnabled&&d.vF?null!==d.mj&&0c.qa)){var d=a.g;if(null!==d&&!d.hb){var e=a.aj;if(null!==e){var f=null,h=null;null===c.Y&&(f=Ni(a,c.l(0),!1),null!==f&&(h=f.U));var k=null,l=null;null===c.$&&(k=Ni(a,c.l(c.qa-1),!0),null!==k&&(l=k.U));e.isValidLink(h,f,l,k)?b?(c.Lp=c.l(0),c.Mp=c.l(c.qa-1),c.jm=!1,c.Y=h,null!==f&&(c.Pg=f.Ud),c.$=l,null!==k&&(c.Hh=k.Ud),c.Lc!==a.gw&&d.Aa("LinkRelinked",c,a.gw),c.ld!==a.hw&&d.Aa("LinkRelinked",c,a.hw)):Oi(e,h,f,l,k):Oi(e,null,null,null,null)}}}}
    oh.prototype.doDragOver=function(){};
    function Pi(a,b){var c=a.g;if(null!==c){a.oj&&Ki(a,!0);Zh(a);var d=Li(c,b,null,function(b){return!Ii(a,b)}),e=c.R;e.Re=d;if(null!==d){e.Cc=!1;for(var f=d;null!==f;){var h=f.PA;if(null!==h&&(h(e,f),e.Cc))break;f=Mi(f)}}else f=c.PA,null!==f&&f(e);if(a.sa||null!==Sh){for(e=(a.dc||a.Zb).i;e.next();)f=e.key,f instanceof T&&f.ge.each(function(a){a.jm=!1});a.doDropOnto(b,d);if(a.sa||null!==Sh){d=w.Jf();for(e=c.selection.i;e.next();)f=e.value,f instanceof T&&Qi(c,f.getAvoidableRect(d));w.Db(d)}}}}
    function Qi(a,b){var c=!1;a.qb.xk(b)&&(c=!0);c=a.nA(b,function(a){return a.U},function(a){return a instanceof W},!0,function(a){return a instanceof W},c);if(0!==c.count)for(c=c.i;c.next();){var d=c.value;d.$l&&d.$b()}}oh.prototype.doDropOnto=function(){};
    oh.prototype.doMouseMove=function(){if(this.sa){var a=this.g;null!==a&&null!==this.xn&&null!==this.Zb&&(this.mayCopy()?(a.ec="copy",Di(this,!1),Rh(this,this.dc),Ei(this,this.dc,!1),$h(this,this.dc)):this.mayMove()?(a.ec="default",ci(this),Ei(this,this.Zb,!0)):this.mayDragOut()?(a.ec="no-drop",Di(this,!1),Ei(this,this.dc,!1)):ci(this),Ji(this,a.R.da))}};
    oh.prototype.doMouseUp=function(){if(this.sa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.dc?(ci(this),Di(this,!0),Rh(this,this.dc),Ei(this,this.dc,!1),$h(this,this.dc),null!==this.dc&&a.jG(this.dc.Gj())):(b=!0,ci(this),this.mayMove()&&(Ei(this,this.Zb,!0),Ji(this,a.R.da)));this.qr=!0;Pi(this,a.R.da);if(this.sa){this.dc=null;if(b&&null!==this.Zb)for(b=this.Zb.i;b.next();){var d=b.key;d instanceof T&&(d=d.Da,null===d||null===d.placeholder||this.Zb.contains(d)||d.placeholder.H())}a.sc();
        $h(this,this.Zb);this.Lf=c?"Copy":"Move";a.Aa(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};oh.prototype.mayCopy=function(){if(!this.qF)return!1;var a=this.g;if(null===a||a.hb||a.Cf||!a.Dp||!a.tk||(w.Hk?!a.R.alt:!a.R.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.ee()&&b.canCopy())return!0}return null!==this.jd&&this.oj&&this.jd.canCopy()?!0:!1};
    oh.prototype.mayDragOut=function(){if(!this.qF)return!1;var a=this.g;if(null===a||!a.Bt||!a.tk||a.Jl)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.ee()&&b.canCopy())return!0}return null!==this.jd&&this.oj&&this.jd.canCopy()?!0:!1};oh.prototype.mayMove=function(){var a=this.g;if(null===a||a.hb||!a.Jl)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.ee()&&b.canMove())return!0}return null!==this.jd&&this.oj&&this.jd.canMove()?!0:!1};var ai=new H(oh),Sh=null,Th=null;
    oh.prototype.getDraggingSource=function(){return Sh};oh.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.pE||a.hb||a.Cf||!a.Dp)return!1;var b=Sh;return null===b||null===b.g||b.g.aa.Ql!==a.aa.Ql?!1:!0};oh.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Oa.Gh();Ri(a);a.Oa.Gh();a=Sh;null!==a&&null!==a.g&&(a.g.ec="copy")}};oh.prototype.doSimulatedDragLeave=function(){var a=Sh;null!==a&&a.doSimulatedDragOut();this.doCancel()};
    oh.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=Sh;null!==b&&null!==b.Zb&&this.mayDragIn()&&(a.ec="copy",Si(this,b.Zb.Gj(),!1),Ei(this,this.dc,!1),Ji(this,a.R.da))}};
    oh.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=Sh;if(null!==b){var c=b.g;b.qr=!0;ci(this);this.mayDragIn()&&(this.Hb("Drop"),Si(this,b.Zb.Gj(),!0),Ei(this,this.dc,!1),null!==this.dc&&a.jG(this.dc.Gj()),Pi(this,a.R.da),a.sc(),b=a.selection,null!==this.dc?this.Lf="ExternalCopy":b=new I(R),this.dc=null,a.doFocus(),a.Aa("ExternalObjectsDropped",b,c),this.Nk())}}};
    function Si(a,b,c){if(null===a.dc){var d=a.g;if(null!==d&&!d.hb&&!d.Cf){d.wb=!c;d.Fq=!c;a.Mk=d.R.da;c=d.Kp(b,d,!0);var e=w.Jf();Ci(b,e);var d=e.x+e.width/2,f=e.y+e.height/2;w.Db(e);var e=a.Bw,h=new ma(R),k=w.K();for(b=b.i;b.next();){var l=b.value,m=c.ka(l);l.ee()&&l.canCopy()?(l=l.location,k.m(e.x-(d-l.x),e.y-(f-l.y)),m.location=k,m.Je(),h.add(m,Wh(k))):l instanceof W&&l.canCopy()&&(m.Jk(e.x-d,e.y-f),h.add(m,Wh()))}w.v(k);a.dc=h;Qh(a,h.Gj());null!==a.jd&&(c=a.jd,d=c.Yn,c.Jk(a.Mk.x-(d.x+d.width/2),
        a.Mk.y-(d.y+d.height/2)))}}}oh.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.ec="":a.ec="no-drop")};function Xh(a){this.point=a;this.oG=dd}w.ga("DraggingInfo",Xh);function Fi(a,b,c){this.Pc=a;this.info=b;this.hI=c}
    function Ti(){0=d&&(d=.1);for(var e=this,f=b.zn(c,d,function(b){return e.findValidLinkablePort(b,a)},null,!0),d=Infinity,b=null,f=f.i;f.next();){var h=f.value,k=h.U;if(k instanceof T){var l=h.Wa(Jb,w.K()),m=c.x-l.x,n=c.y-l.y;w.v(l);l=m*m+n*n;lc){if(null!==this.lc&&a===this.Tg&&b===this.Ug)return!0;var d=b.Ud;null===d&&(d="");if(a.nx(d).count>=c)return!1}return!0};
    Ti.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.aq;if(null!==this.g&&this.g.$a===this&&(null!==a.layer&&!a.layer.Ct||!0!==b.wG))return!1;var c=b.SJ;if(Infinity>c){if(null!==this.lc&&a===this.Vg&&b===this.Wg)return!0;var d=b.Ud;null===d&&(d="");if(a.Og(d).count>=c)return!1}return!0};Ti.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.U,d=b.U;return null!==c&&c===d};
    Ti.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.U;if(!(c instanceof T))return!1;var d=a.Ud;null===d&&(d="");var e=b.U;if(!(e instanceof T))return!1;var f=b.Ud;null===f&&(f="");for(e=e.Og(f);e.next();)if(f=e.value,f.Y===c&&f.Pg===d)return!0;return!1};
    Ti.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.YH&&d.RJ||!this.isInSameNode(b,d))&&(b.XH&&d.QJ||!this.isLinked(b,d)))||null!==this.lc&&(null!==a&&this.isLabelDependentOnLink(a,this.lc)||null!==c&&this.isLabelDependentOnLink(c,this.lc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.lc))return!1;if(null!==a){var e=a.Kx;if(null!==e&&!e(a,b,c,d,this.lc))return!1}if(null!==
        c&&(e=c.Kx,null!==e&&!e(a,b,c,d,this.lc)))return!1;e=this.Kx;return null!==e?e(a,b,c,d,this.lc):!0};Ti.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.Wb;if(null===c)return!1;if(c===b)return!0;var d=new I(T);d.add(a);return Ui(this,c,b,d)};function Ui(a,b,c,d){if(b===c)return!0;var e=b.Y;if(null!==e&&e.Bf&&(d.add(e),Ui(a,e.Wb,c,d)))return!0;b=b.$;return null!==b&&b.Bf&&(d.add(b),Ui(a,b.Wb,c,d))?!0:!1}
    Ti.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.aq;var d=null!==this.g?this.g.YJ:Vi;if(d!==Vi){if(d===Wi){if(null!==c&&!c.Nc)return!0;for(d=b.ge;d.next();){var e=d.value;if(e!==c&&e.Nc&&e.$===b)return!1}return!Xi(this,a,b,c,!0)}if(d===Yi){if(null!==c&&!c.Nc)return!0;for(d=a.ge;d.next();)if(e=d.value,e!==c&&e.Nc&&e.Y===a)return!1;return!Xi(this,a,b,c,!0)}if(d===Zi)return a===b?a=!0:(d=new I(T),d.add(b),a=$i(this,d,a,b,c)),!a;if(d===aj)return!Xi(this,
        a,b,c,!1);if(d===bj)return a===b?a=!0:(d=new I(T),d.add(b),a=cj(this,d,a,b,c)),!a}return!0};function Xi(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.ge;f.next();){var h=f.value;if(h!==d&&(!e||h.Nc)&&h.$===b&&(h=h.Y,h!==b&&Xi(a,h,c,d,e)))return!0}return!1}function $i(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.ge;f.next();){var h=f.value;if(h!==e&&h.$===c&&(h=h.Y,h!==c&&$i(a,b,h,d,e)))return!0}return!1}
    function cj(a,b,c,d,e){if(c===d)return!0;if(null===c||null===d||b.contains(c))return!1;b.add(c);for(var f=c.ge;f.next();){var h=f.value;if(h!==e){var k=h.Y,h=h.$,k=k===c?h:k;if(k!==c&&cj(a,b,k,d,e))return!0}}return!1}w.defineProperty(Ti,{Kx:"linkValidation"},function(){return this.sl},function(a){null!==a&&w.j(a,"function",Ti,"linkValidation");this.sl=a});w.defineProperty(Ti,{Vx:"portTargeted"},function(){return this.BD},function(a){null!==a&&w.j(a,"function",Ti,"portTargeted");this.BD=a});
    function dj(){0b.Qt+1&&c=c.x)d=0>=c.y?d+225:1<=c.y?d+135:d+180;else if(1<=c.x)0>=c.y?d+=315:1<=c.y&&(d+=45);else if(0>=c.y)d+=270;else if(1<=c.y)d+=90;else break a;0>d?d+=360:360<=d&&(d-=360);a.cursor=22.5>d?"e-resize":67.5>d?"se-resize":112.5>d?"s-resize":157.5>d?"sw-resize":202.5>d?"w-resize":247.5>d?"nw-resize":292.5>d?"n-resize":337.5>d?
        "ne-resize":"e-resize"}else if(a instanceof C)for(c=a.elements;c.next();)this.updateResizeHandles(c.value,b)};w.defineProperty(Lj,{$t:"handleArchetype"},function(){return this.fl},function(a){null!==a&&w.G(a,G,Lj,"handleArchetype");this.fl=a});w.u(Lj,{handle:"handle"},function(){return this.hc});w.defineProperty(Lj,{sb:"adornedObject"},function(){return this.Fc},function(a){null!==a&&w.G(a,G,Lj,"adornedObject");this.Fc=a});
    Lj.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.hb&&a.Dt&&a.R.left?null!==this.findToolHandleAt(a.Bc.da,this.name):!1};
    Lj.prototype.doActivate=function(){var a=this.g;null!==a&&(this.hc=this.findToolHandleAt(a.Bc.da,this.name),null!==this.hc&&(this.Fc=this.hc.U.sb,this.fp.set(this.sb.Wa(this.handle.alignment.OF())),this.wD.set(this.Fc.U.location),this.rD.set(this.Fc.Ca),this.bz=this.computeCellSize(),this.dz=this.computeMinSize(),this.cz=this.computeMaxSize(),a.cf=!0,this.oD=a.Oa.isEnabled,a.Oa.isEnabled=!1,this.Hb(this.name),this.sa=!0))};
    Lj.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.Nk(),this.Fc=this.hc=null,this.sa=a.cf=!1,a.Oa.isEnabled=this.oD)};Lj.prototype.doCancel=function(){null!==this.sb&&(this.sb.Ca=this.PF,this.sb.U.location=this.hJ);this.stopTool()};Lj.prototype.doMouseMove=function(){var a=this.g;if(this.sa&&null!==a){var b=this.dz,c=this.cz,d=this.bz,e=this.sb.$E(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);a.cg();w.v(e)}};
    Lj.prototype.doMouseUp=function(){var a=this.g;if(this.sa&&null!==a){var b=this.dz,c=this.cz,d=this.bz,e=this.sb.$E(a.R.da,w.K()),f=this.computeReshape(),b=this.computeResize(e,this.handle.alignment,b,c,d,f);this.resize(b);w.v(e);a.sc();this.Lf=this.name;a.Aa("PartResized",this.sb,this.PF)}this.stopTool()};
    Lj.prototype.resize=function(a){var b=this.g;if(null!==b){var c=this.sb,d=c.U;c.Ca=a.size;d.Je();a=this.sb.Wa(this.handle.alignment.OF());d instanceof V?(c=new H(R),c.add(d),b.moveParts(c,this.fp.copy().Ej(a),!0)):d.location=d.location.copy().Ej(a).add(this.fp)}};
    Lj.prototype.computeResize=function(a,b,c,d,e,f){b.Sd()&&(b=Jb);var h=this.sb.Ja,k=h.x,l=h.y,m=h.x+h.width,n=h.y+h.height,p=1;if(!f){var p=h.width,q=h.height;0>=p&&(p=1);0>=q&&(q=1);p=q/p}q=w.K();Na(a.x,a.y,k,l,e.width,e.height,q);a=h.copy();0>=b.x?0>=b.y?(a.x=Math.max(q.x,m-d.width),a.x=Math.min(a.x,m-c.width),a.width=Math.max(m-a.x,c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.width=Math.max(Math.min(q.x-k,d.width),c.width),a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),
        a.height=Math.max(n-a.y,c.height),f||(b=a.height/a.width,p=b.y?(a.y=Math.max(q.y,n-d.height),a.y=Math.min(a.y,n-c.height),a.height=n-a.y,f||(a.width=a.height/p,a.x=
        k+.5*(m-k-a.width))):1<=b.y&&(a.height=Math.max(Math.min(q.y-l,d.height),c.height),f||(a.width=a.height/p,a.x=k+.5*(m-k-a.width)));w.v(q);return a};Lj.prototype.computeReshape=function(){var a=Oj;this.sb instanceof X&&(a=Pj(this.sb));return!(a===Qj||a===Rj||null!==this.g&&this.g.R.shift)};Lj.prototype.computeMinSize=function(){var a=this.sb.si.copy(),b=this.si;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a};
    Lj.prototype.computeMaxSize=function(){var a=this.sb.Gf.copy(),b=this.Gf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.IJ),180),c=Math.min(Math.abs(this.HJ),b/2);(null===this.g||!this.g.R.shift)&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};w.defineProperty(Sj,{IJ:"snapAngleMultiple"},function(){return this.JD},function(a){w.j(a,"number",Sj,"snapAngleMultiple");this.JD=a});
    w.defineProperty(Sj,{HJ:"snapAngleEpsilon"},function(){return this.HD},function(a){w.j(a,"number",Sj,"snapAngleEpsilon");this.HD=a});w.u(Sj,{zL:"originalAngle"},function(){return this.iw});function Uj(){rg.call(this);0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ya.R.Ge?!1:!0};gk.prototype.doStart=function(){this.sa||null===this.$g||this.doActivate()};
    gk.prototype.doActivate=function(){if(!this.sa){var a=this.g;if(null!==a){var b=this.$g;null===b&&(b=a.Le(a.R.da,function(a){return a instanceof Lh?a:null}));if(null!==b&&(this.$g=b,null!==b.U)){this.sa=!0;this.Sa=pk;var c=this.KH;null!==b.vG&&(c=b.vG);this.lk=this.$g.copy();var d=new B(this.$g.Wa(Ab),this.$g.Wa(Sb));a.gG(d);if(c instanceof Xj)c.show(b,a,this);else{c.style.position="absolute";c.style.zIndex="100";c.textEditingTool=this;if("function"===typeof c.onActivate)c.onActivate();a.nj.appendChild(c);
        "function"===typeof c.focus&&c.focus();"function"===typeof c.select&&this.jy&&(c.select(),c.setSelectionRange(0,9999))}this.lj=c}}}};gk.prototype.doCancel=function(){null!==this.wl&&this.lj instanceof HTMLElement&&(this.lj.style.border=this.wl,this.wl=null);this.stopTool()};gk.prototype.doMouseUp=function(){!this.sa&&this.canStart()&&this.doActivate()};gk.prototype.doMouseDown=function(){this.sa&&this.acceptText(lk)};
    gk.prototype.acceptText=function(a){switch(a){case lk:if(this.Sa===tk)this.lj instanceof HTMLElement&&this.lj.focus();else if(this.Sa===pk||this.Sa===sk||this.Sa===qk)this.Sa=rk,wk(this);break;case kk:case nk:case mk:if(nk===a&&!0===this.Lz.Cx)break;if(this.Sa===pk||this.Sa===sk||this.Sa===qk)this.Sa=rk,wk(this)}};
    function wk(a){var b=a.$g,c=a.g,d=a.lj;if(null!==b&&null!==d){var e=b.text,f="";d instanceof Xj?null!==d.GB&&(f=d.GB()):(f=d.value,f="function"===typeof f?f():f);a.isValidText(b,e,f)?(a.Hb(a.name),a.Sa=tk,d instanceof Xj?d.show(b,c,a):null!==a.wl&&(d.style.border=a.wl,a.wl=null),a.Lf=a.name,b.text=f,null!==b.uG&&b.uG(b,e,f),null!==c&&c.Aa("TextEdited",b,e),a.Nk(),a.stopTool(),null!==c&&c.doFocus()):(a.Sa=sk,null!==b.mA&&b.mA(a,e,f),d instanceof Xj?d.show(b,c,a):(null===a.wl&&(a.wl=d.style.border,
        d.style.border="3px solid red"),"function"===typeof d.focus&&d.focus()))}}gk.prototype.doDeactivate=function(){var a=this.g;if(null!==a){this.Sa=ik;this.$g=null;if(null!==this.lj){var b=this.lj;if(b instanceof Xj)b.Gn(a,this);else{if("function"===typeof b.onDeactivate)b.onDeactivate();null!==b&&a.nj.removeChild(b)}}this.sa=!1}};gk.prototype.doFocus=function(){uk(this)};gk.prototype.doBlur=function(){vk(this)};
    function uk(a){if(null!==a.lj){var b=a.Ry;a.Sa===pk&&(a.Sa=qk);"function"===typeof b.select&&a.jy&&(b.select(),b.setSelectionRange(0,9999))}}function vk(a){if(null!==a.lj){var b=a.Ry;"function"===typeof b.focus&&b.focus();"function"===typeof b.select&&a.jy&&(b.select(),b.setSelectionRange(0,9999))}}gk.prototype.isValidText=function(a,b,c){w.G(a,Lh,gk,"isValidText:textblock");var d=this.wB;if(null!==d&&!d(a,b,c))return!1;d=a.wB;return null===d||d(a,b,c)?!0:!1};
    w.defineProperty(gk,{wB:"textValidation"},function(){return this.Cl},function(a){null!==a&&w.j(a,"function",gk,"textValidation");this.Cl=a});w.defineProperty(gk,{JF:"minimumEditorScale"},function(){return this.iD},function(a){null!==a&&w.j(a,"number",gk,"minimumEditorScale");this.iD=a});w.defineProperty(gk,{jy:"selectsTextOnActivate"},function(){return this.FD},function(a){null!==a&&w.j(a,"boolean",gk,"selectsTextOnActivate");this.FD=a});
    w.defineProperty(gk,{state:"state"},function(){return this.Sa},function(a){this.Sa!==a&&(w.mb(a,gk,gk,"starting"),this.Sa=a)});gk.prototype.measureTemporaryTextBlock=gk.prototype.VI=function(a){var b=this.lk;b.text=a;xk(b,this.$g.Wo,Infinity);return b};function ih(){rg.call(this);this.name="ToolManager";this.RG=new H(rg);this.SG=new H(rg);this.TG=new H(rg);this.NC=this.OC=850;this.DC=(new ia(2,2)).Ha();this.ZD=5E3;this.mD=Ph;this.LC=yk;this.qv=this.rC=null;this.hn=-1}w.Ka(ih,rg);
    w.ga("ToolManager",ih);var Ph;ih.WheelScroll=Ph=w.p(ih,"WheelScroll",0);var Oh;ih.WheelZoom=Oh=w.p(ih,"WheelZoom",1);ih.WheelNone=w.p(ih,"WheelNone",2);var yk;ih.GestureZoom=yk=w.p(ih,"GestureZoom",3);var zk;ih.GestureCancel=zk=w.p(ih,"GestureCancel",4);var Ak;ih.GestureNone=Ak=w.p(ih,"GestureNone",5);w.defineProperty(ih,{uu:"mouseWheelBehavior"},function(){return this.mD},function(a){w.mb(a,ih,ih,"mouseWheelBehavior");this.mD=a});
    w.defineProperty(ih,{Up:"gestureBehavior"},function(){return this.LC},function(a){w.mb(a,ih,ih,"gestureBehavior");this.LC=a});ih.prototype.initializeStandardTools=function(){this.dH=new Vj;this.VF=new Uh;this.MI=new mj;this.eG=new Lj;this.xJ=new Sj;this.FF=new dj;this.te=new oh;this.PH=new ek;this.iJ=new fk;this.cA=new Zj;this.vB=new gk;this.rH=new Wj;this.sH=new Uj};
    ih.prototype.updateAdornments=function(a){var b=this.Pl;if(b instanceof kh&&this.qv===a){var c=b.sb;(null!==a?c.U===a:null===c)?this.showToolTip(b,c):this.hideToolTip()}};
    ih.prototype.doMouseDown=function(){var a=this.g;if(null!==a){var b=a.R;b.vj&&this.Up===zk&&(b.bubbles=!1);if(b.iu){this.cancelWaitAfter();if(this.Up===Ak){b.bubbles=!0;return}if(this.Up===zk)return;if(a.$a.canStartMultiTouch()){a.$a.standardPinchZoomStart();return}}var c=a.ia;c.Yz&&0!==c.Ih&&w.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");for(var c=this.df.length,d=0;de.right&&(c.x-=d.width+5);c.xe.bottom?c.y-(d.height+5):c.y+20;c.ya?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b}w.u(Xg,{zK:"animationReasons"},function(){return this.dv});
    Xg.prototype.canStart=function(){return!0};Xg.prototype.prepareAutomaticAnimation=Xg.prototype.Wn=function(a){this.ff&&(this.kl||this.Z.Jn)&&(this.dv.add(a),this.canStart(a)&&(this.Xj&&this.Gh(),this.qc=!0))};function Rk(a){if(a.ff&&(a.dv.clear(),a.qc))if(!a.no)a.qc=!1;else if(0===a.tm){var b=+new Date;a.tm=b;requestAnimationFrame(function(){if(!1!==a.qc&&!a.Xj&&a.tm===b){var c=a.Z;c.qj("temporaryPixelRatio")&&(c.kk=1);Sk(c);a.qc=!1;c.Aa("AnimationStarting");Tk(a,b)}})}}
    function Yk(a,b,c,d,e,f){if(!(!a.qc||"position"===c&&d.L(e)||b instanceof R&&!b.oF)){var h=a.Tm;if(h.contains(b)){var h=h.ka(b),k=h.start,l=h.end;void 0===k[c]&&(k[c]=Zk(d));h.$w&&void 0!==l[c]?h.Lt[c]=Zk(e):(f||(h.Lt[c]=Zk(e)),l[c]=Zk(e));f&&0===c.indexOf("position:")&&b instanceof R&&(h.Lt.location=Zk(b.location))}else k=new ra,l=new ra,k[c]=Zk(d),l[c]=Zk(e),d=l,e=k.position,e instanceof z&&!e.I()&&a.dv.contains("Expand SubGraph")&&e.assign(d.position),k=new Qk(k,l,f),f&&0===c.indexOf("position:")&&
    b instanceof R&&(k.Lt.location=Zk(b.location)),h.add(b,k);a.no=!0}}function Zk(a){return a instanceof z?a.copy():a instanceof ia?a.copy():a}
    function Tk(a,b){var c;function d(){if(!1!==f.Xj&&f.tm===b){var a=+new Date,c=a>s?m:a-r;$k(f);al(f,e,q,h,c,m);f.nv&&f.nv();Ri(e);bl(f);a>s?cl(f):requestAnimationFrame(d)}}void 0===c&&(c=new ra);var e=a.Z;if(null!==e){a.Xj=!0;var f=a,h=c.YK||a.sC,k=c.xL||null,l=c.yL||null,m=c.duration||a.Zy,n=a.UG;for(c=a.Tm.i;c.next();){var p=c.value.start.position;p instanceof z&&(p.I()||p.assign(n))}a.nC=h;a.nv=k;a.ov=l;a.mC=m;a.pv=a.Tm;var q=a.pv;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l=
        k["position:placeholder"],n=l.Wa(Ab),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);$k(a);al(a,e,q,h,0,m);Ri(a.Z);bl(a);var r=+new Date,s=r+m;f.tm===b&&requestAnimationFrame(function(){d()})}}function $k(a){if(!a.So){var b=a.Z;a.cE=b.wb;a.$B=b.Pe;a.aC=b.Nu;b.wb=!0;b.Pe=!0;b.Nu=!0;a.So=!0}}function bl(a){var b=a.Z;b.wb=a.cE;b.Pe=a.$B;b.Nu=a.aC;a.So=!1}
    function al(a,b,c,d,e,f){for(c=c.i;c.next();){var h=c.key,k=c.value,l=k.start,k=k.end,m;for(m in k)if(("position"!==m||!k["position:placeholder"]&&!k["position:node"])&&void 0!==dl[m])dl[m](h,l[m],k[m],d,e,f)}d=b.DA;b.DA=!0;m=a.sC;0!==a.nr&&0!==a.mr&&(c=a.nr,b.ub=m(e,c,a.mr-c,f));null!==a.lr&&null!==a.kr&&(c=a.lr,a=a.kr,b.jb=new z(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.DA=d}
    Xg.prototype.stopAnimation=Xg.prototype.Gh=function(){!0===this.qc&&(this.qc=!1,this.tm=0,this.no&&this.Z.Ne());this.Xj&&this.ff&&cl(this)};
    function cl(a){a.Xj=!1;a.no=!1;$k(a);for(var b=a.Z,c=a.nC,d=a.mC,e=a.pv.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.Lt,n;for(n in l)if(void 0!==dl[n]){var p=n;!h.$w||"position:node"!==p&&"position:placeholder"!==p||(p="position");dl[p](f,k[n],void 0!==m[n]?m[n]:h.$w?k[n]:l[n],c,d,d)}h.$w&&void 0!==m.location&&f instanceof R&&(f.location=m.location);h.Zx&&f instanceof R&&f.yd(!1)}for(c=a.Z.links;c.next();)d=c.value,null!==d.kp&&(d.points=d.kp,d.kp=null);b.Lx.clear();b.kk=null;b.sc();b.oa();
        b.cg();el(b);bl(a);a.ov&&a.ov();a.tm=0;a.pv=null;a.ov=null;a.nv=null;a.lr=null;a.kr=null;a.nr=0;a.mr=0;a.Tm=new ma(G,Qk);b.Aa("AnimationFinished");b.Ne()}
    function fl(a,b,c){var d=b.W,e=c.W,f=null;c instanceof V&&(f=c.placeholder);null!==f?(d=f.Wa(Ab),d.x+=f.padding.left,d.y+=f.padding.top,Yk(a,b,"position",d,b.position,!1)):Yk(a,b,"position",new z(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Yk(a,b,"scale",.01,b.scale,!1);if(b instanceof V)for(b=b.Oc;b.next();)f=b.value,f instanceof T&&fl(a,f,c)}
    function gl(a,b,c){if(b.isVisible()){var d=null;c instanceof V&&(d=c.placeholder);null!==d?Yk(a,b,"position:placeholder",b.position,d,!0):Yk(a,b,"position:node",b.position,c,!0);Yk(a,b,"scale",b.scale,.01,!0);a.qc&&(d=a.Tm,d.contains(b)&&(d.ka(b).Zx=!0));if(b instanceof V)for(b=b.Oc;b.next();)d=b.value,d instanceof T&&gl(a,d,c)}}function hl(a,b,c){a.qc&&(null===a.lr&&b.I()&&null===a.kr&&(a.lr=b.copy()),a.kr=c.copy(),a.no=!0)}
    function il(a,b,c){a.qc&&a.Z.Jn&&(0===a.nr&&0===a.mr&&(a.nr=b),a.mr=c,a.no=!0)}w.defineProperty(Xg,{isEnabled:"isEnabled"},function(){return this.ff},function(a){w.j(a,"boolean",Xg,"isEnabled");this.ff=a});w.defineProperty(Xg,{duration:"duration"},function(){return this.Zy},function(a){w.j(a,"number",Xg,"duration");1>a&&w.Fa(a,">= 1",Xg,"duration");this.Zy=a});w.u(Xg,{of:"isAnimating"},function(){return this.Xj});w.u(Xg,{EI:"isTicking"},function(){return this.So});
    w.defineProperty(Xg,{wF:"isInitial"},function(){return this.kl},function(a){w.j(a,"boolean",Xg,"isInitial");this.kl=a});function Qk(a,b,c){this.start=a;this.end=b;this.Lt=new ra;this.$w=c;this.Zx=!1}
    var dl={opacity:function(a,b,c,d,e,f){a.opacity=d(e,b,c-b,f)},position:function(a,b,c,d,e,f){e!==f?a.ny(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):a.position=new z(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},"position:node":function(a,b,c,d,e,f){var h=a.W,k=c.W;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.ny(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f)):a.position=new z(d(e,b.x,c-b.x,f),d(e,b.y,h-b.y,f))},"position:placeholder":function(a,b,c,d,e,f){e!==f?a.ny(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f)):
        a.position=new z(d(e,b.x,c.x-b.x,f),d(e,b.y,c.y-b.y,f))},scale:function(a,b,c,d,e,f){a.scale=d(e,b,c-b,f)},visible:function(a,b,c,d,e,f){a.visible=e!==f?b:c}};function qg(){0=a)return b;for(var c=0,d=0,e=0,f=0,h=0,k=this.zb.i;k.next();){var l=k.value;l instanceof V?e++:l instanceof T?d++:l instanceof W?f++:l instanceof kh?h++:c++}k="";0=d.count)a=d.count;else if(d.ea(a)===b)return-1;d.Qd(a,b);b.au(c);d=this.g;null!==d&&(c?d.oa():d.Xp(b));ol(this,a,b);return a};
    g.nf=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.nf(a,b,c);var d=this.zb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.ea(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.bu(c);d.bd(a);d=this.g;null!==d&&(c?d.oa():d.nf(b));b.Uv=null;return a};
    function ol(a,b,c){b=pl(a,b,c);if(c instanceof V&&null!==c&&isNaN(c.io)){if(0!==c.Oc.count){for(var d=-1,e=a.zb.n,f=e.length,h=0;hd&&k.Da===c&&(d=h,0<=b))break}!(0>d)&&d=e)return b;0>b&&(b=a.indexOf(c));if(0>b)return-1;for(var f=b-1,h=NaN;0<=f;){h=a.ea(f).io;if(!isNaN(h))break;f--}for(var k=b+1,l=NaN;kd)for(;;){if(-1===f||h<=d){f++;if(f===b)break;a.bd(b);a.Qd(f,c);return f}for(h=NaN;0<=--f&&(h=a.ea(f).io,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.bd(b);a.Qd(k,c);return k}for(l=NaN;++ka||1parseInt(e[1],10)&&(w.trace("Warning: You have entered a license key for GoJS version 1.7 or later, but this library is version "+
            w.vfo+". This license key will do nothing until you upgrade to GoJS 1.7 or later."),w.hx.licenseKey=!0);this.pl=1;this.Km=0;this.dD=new z;this.aE=500;this.ev=new z;this.bt=null;this.ml=!1;this.preventDefault=this.Yx=this.RF=this.SF=this.QF=this.Sn=this.Sg=this.Tn=this.Qn=this.Rn=this.HB=this.zB=this.AB=this.BB=this.zl=this.Ps=this.yl=this.Os=null;this.nD=1;this.Ov=!1;this.hl=new Cl;void 0!==a&&Dl(this,a);this.Tc=!1}w.ga("Diagram",D);
    D.prototype.clear=D.prototype.clear=function(){var a=null;null!==this.rd&&(a=this.rd.U);this.aa.clear();for(var b=this.cc.length,c=0;c=a)return b;for(var c=this.cc.i;c.next();)b+="\n  "+c.value.toString(a-1);return b};D.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.Z instanceof D?b.Z:null};
    w.defineProperty(D,{nj:"div"},function(){return this.Nb},function(a){null!==a&&w.G(a,HTMLDivElement,D,"div");if(this.Nb!==a){rl=[];var b=this.Nb;null!==b?(b.Z=void 0,b.innerHTML="",null!==this.Fb&&(this.Fb.removeEventListener("touchstart",this.BB,!1),this.Fb.removeEventListener("touchmove",this.AB,!1),this.Fb.removeEventListener("touchend",this.zB,!1),this.Fb.Kd.Z=null),b=this.eb,null!==b&&(b.df.each(function(a){a.cancelWaitAfter()}),b.dg.each(function(a){a.cancelWaitAfter()}),b.eg.each(function(a){a.cancelWaitAfter()})),
        b.cancelWaitAfter(),this.$a.doCancel(),this.tf=this.Fb=null,window.removeEventListener("resize",this.HB,!1),window.removeEventListener("mousemove",this.Rn,!0),window.removeEventListener("mousedown",this.Qn,!0),window.removeEventListener("mouseup",this.Tn,!0),window.removeEventListener("mousewheel",this.Sg,!0),window.removeEventListener("DOMMouseScroll",this.Sg,!0),window.removeEventListener("mouseout",this.Sn,!0)):this.gh=!1;this.Nb=null;if(null!==a){if(b=a.Z)b.nj=null;Dl(this,a);this.Xx()}}});
    function Gl(a){var b=a.Fb;b.addEventListener("touchstart",a.BB,!1);b.addEventListener("touchmove",a.AB,!1);b.addEventListener("touchend",a.zB,!1);b.addEventListener("mousemove",a.Rn,!1);b.addEventListener("mousedown",a.Qn,!1);b.addEventListener("mouseup",a.Tn,!1);b.addEventListener("mousewheel",a.Sg,!1);b.addEventListener("DOMMouseScroll",a.Sg,!1);b.addEventListener("mouseout",a.Sn,!1);b.addEventListener("keydown",a.GI,!1);b.addEventListener("keyup",a.HI,!1);b.addEventListener("selectstart",function(a){a.preventDefault();
        return!1},!1);b.addEventListener("contextmenu",function(a){a.preventDefault();return!1},!1);b.addEventListener("gesturechange",function(b){a.eb.Up===zk&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.QF,!1);b.addEventListener("pointermove",a.SF,!1);b.addEventListener("pointerleave",a.RF,!1);window.addEventListener("resize",a.HB,!1)}D.prototype.computePixelRatio=function(){return null!==this.kk?this.kk:this.nD};D.prototype.doMouseMove=function(){this.$a.doMouseMove()};
    D.prototype.doMouseDown=function(){this.$a.doMouseDown()};D.prototype.doMouseUp=function(){this.$a.doMouseUp()};D.prototype.doMouseWheel=function(){this.$a.doMouseWheel()};D.prototype.doKeyDown=function(){this.$a.doKeyDown()};D.prototype.doKeyUp=function(){this.$a.doKeyUp()};D.prototype.doFocus=function(){this.focus()};D.prototype.focus=D.prototype.focus=function(){this.Fb&&this.Fb.focus()};
    function Sk(a){if(null!==a.Fb){var b=a.Nb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.gl?a.Hd:0,d=a.Vj?a.Hd:0,e=a.Ed;a.Ed=a.computePixelRatio();a.Ed!==e&&(a.Ir=!0,a.Ne());if(b.clientWidth!==a.Jb+c||b.clientHeight!==a.Mb+d)a.Fm=!0,a.Ce=!0,b=a.Tb,null!==b&&b.Ex&&a.Ll===ph&&b.J(),a.$d||a.Ne()}}}
    function Al(a){var b=new qg;b.name="Background";a.wt(b);b=new qg;b.name="";a.wt(b);b=new qg;b.name="Foreground";a.wt(b);b=new qg;b.name="Adornment";b.Mc=!0;a.wt(b);b=new qg;b.name="Tool";b.Mc=!0;b.pF=!0;a.wt(b);b=new qg;b.name="Grid";b.yf=!1;b.Xg=!1;b.Mc=!0;a.gH(b,a.Nt("Background"))}
    function Hl(a){a.rd=new C(Il);a.rd.name="GRID";var b=new X;b.Cb="LineH";b.stroke="lightgray";b.lb=.5;b.interval=1;a.rd.add(b);b=new X;b.Cb="LineH";b.stroke="gray";b.lb=.5;b.interval=5;a.rd.add(b);b=new X;b.Cb="LineH";b.stroke="gray";b.lb=1;b.interval=10;a.rd.add(b);b=new X;b.Cb="LineV";b.stroke="lightgray";b.lb=.5;b.interval=1;a.rd.add(b);b=new X;b.Cb="LineV";b.stroke="gray";b.lb=.5;b.interval=5;a.rd.add(b);b=new X;b.Cb="LineV";b.stroke="gray";b.lb=1;b.interval=10;a.rd.add(b);b=new R;b.add(a.rd);
        b.ag="Grid";b.io=0;b.FA=!1;b.oF=!1;b.Xg=!1;b.KA="GRID";a.add(b);a.zb.remove(b);a.rd.visible=!1}function Jl(){this.Z.isEnabled?this.Z.OH(this):Kl(this.Z)}function Ll(a){this.Z.isEnabled?(this.Z.Dz=!0,this.Z.Fz=a.target.scrollTop,this.Z.Ez=a.target.scrollLeft):Kl(this.Z)}
    D.prototype.diagramScroll=D.prototype.OH=function(a){if(this.Dz&&null!==this.Fb){this.sw=!0;var b=this.se,c=this.qb,d=this.hy,e=b.x-d.left,f=b.y-d.top,h=b.width+d.left+d.right,k=b.height+d.top+d.bottom,l=b.right+d.right,d=b.bottom+d.bottom,m=c.x,b=c.y,n=c.width,p=c.height,q=c.right,r=c.bottom,c=this.scale,s;s=a.scrollLeft;if(this.Mr)switch(this.Bz){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var u=s;nq&&(this.position=s.m(-(this.ww.scrollWidth-this.Jb)+u-this.Jb/c+l,this.position.y))),a.YG&&this.pe&&(fr&&(this.position=s.m(this.position.x,-(this.ww.scrollHeight-this.Mb)+a.scrollTop-this.Mb/c+d))),w.v(s),Ml(this),
        this.Fm=this.sw=!1,b=this.se,c=this.qb,l=b.right,q=c.right,d=b.bottom,r=c.bottom,e=b.x,m=c.x,f=b.y,b=c.y,n>=h&&e>=m&&l<=q&&(this.Ts.style.width="1px"),p>=k&&f>=b&&d<=r&&(this.Ts.style.height="1px"))}};D.prototype.computeBounds=D.prototype.uh=function(){0c&&(e=c),ea.zh&&(e=a.zh),e):b===Tl?(e=l>k?(h-a.Hd)/d:(f-a.Hd)/e,e>c&&(e=c),ea.zh&&(e=a.zh),e):a.scale}D.prototype.zoomToFit=D.prototype.zoomToFit=function(){this.scale=Pl(this,Sl)};
    D.prototype.zoomToRect=function(a,b){void 0===b&&(b=Sl);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Sl||b===Tl)if(isNaN(c))e=this.qb.height*this.scale/d;else if(isNaN(d))e=this.qb.width*this.scale/c;else var e=this.Jb,f=this.Mb,e=b===Tl?f/d>e/c?(f-(this.Vj?this.Hd:0))/d:(e-(this.gl?this.Hd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new z(a.x,a.y)}};w.defineProperty(D,{DA:null},function(){return this.Tc},function(a){this.Tc=a});
    D.prototype.alignDocument=function(a,b){this.Wj&&Rl(this,this.uh());var c=this.se,d=this.qb;this.position=new z(c.x+(a.x*c.width+a.offsetX)-(b.x*d.width-b.offsetX),c.y+(a.y*c.height+a.offsetY)-(b.y*d.height-b.offsetY))};
    function Ql(a,b,c,d,e,f,h){var k=b.x,l=b.y;if(h||a.gB===sl)f.Yc()&&(d>c.width&&(k=c.x+(f.x*c.width+f.offsetX)-(f.x*d-f.offsetX)),e>c.height&&(l=c.y+(f.y*c.height+f.offsetY)-(f.y*e-f.offsetY))),f=a.hy,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.targetTouches.length)return;e=b.targetTouches[c]}else if(null!==a.Zh[0])e=a.Zh[c];else return;c=a.Fb;b=a.Jb;a=a.Mb;var f=0,h=0;null!==c&&null!==e&&(c=c.getBoundingClientRect(),f=e.clientX-b/c.width*c.left,h=e.clientY-a/c.height*c.top);d.m(f,h)}D.prototype.invalidateDocumentBounds=D.prototype.sc=function(){this.Wj||(this.Wj=!0,this.Ne(!0))};function el(a){a.$d||Hi(a);a.Wj&&Rl(a,a.uh())}
    D.prototype.redraw=D.prototype.Xx=function(){this.Tc||this.$d||(this.oa(),Zl(this),Ml(this),this.sc(),this.cg())};D.prototype.isUpdateRequested=function(){return this.Uf};D.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Oa,c=b.isEnabled;b.Gh();b.isEnabled=!1;Ri(this);this.gh=!1;b.isEnabled=c;null!==a&&w.setTimeout(a,1)};
    D.prototype.requestUpdate=D.prototype.Ne=function(a){void 0===a&&(a=!1);if(!0!==this.Uf&&!(this.Tc||!1===a&&this.$d)){this.Uf=!0;var b=this;requestAnimationFrame(function(){b.Uf&&b.cg()})}};D.prototype.maybeUpdate=D.prototype.cg=function(){if(!this.Ho||this.Uf)this.Ho&&(this.Ho=!1),Ri(this)};function $l(a,b){a.Oa.of||a.Tc||!a.Fm||Kl(a)||(b&&Hi(a),Ol(a,!1))}
    function Ri(a){if(!a.$d&&(a.Uf=!1,null!==a.Nb)){a.$d=!0;var b=a.Oa,c=a.zz;if(!b.So&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.xg.i;if(null===c||0===a.xg.count)break;a.xg=new I(R);a.FB(c,a.xg)}a.ig.each(function(a){a instanceof V&&0!==(a.ya&65536)!==!1&&(a.ya^=65536)})}}
    D.prototype.FB=function(a,b){for(a.reset();a.next();){var c=a.value;!c.ee()||c instanceof V||(c.cm()?(xk(c,Infinity,Infinity),c.jc()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof V&&c.isVisible()&&Bm(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.cm()?(xk(c,Infinity,Infinity),c.jc()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof kh&&c.isVisible()&&(c.cm()?(xk(c,Infinity,Infinity),c.jc()):b.add(c))};
    function Bm(a,b){for(var c=w.cb(),d=w.cb(),e=b.Oc;e.next();){var f=e.value;f.isVisible()&&(f instanceof V?(Cm(f)||Dm(f)||Em(f))&&Bm(a,f):f instanceof W?f.Y===b||f.$===b?d.push(f):c.push(f):(xk(f,Infinity,Infinity),f.jc()))}for(var e=c.length,h=0;hm&&(q=t.left,r=t.right),p.height>c&&(s=t.top,u=t.bottom)):(q=t.left,r=t.right,s=t.top,u=t.bottom);var t=p.width+q+r,x=p.height+s+u,q=p.x-q,v=n.x,r=p.right+r,A=n.right+
        k,s=p.y-s,y=n.y,u=p.bottom+u,n=n.bottom+l,K="1px",E="1px",p=a.scale,P=!(tA+1&&(K=Math.max((r-A)*p+a.Jb,K)),m+k+1n+1&&(E=Math.max((u-n)*p+a.Mb,E)),c+l+1A+1&&(K=Math.max((r-A)*p+a.Jb,K)),m+1n+1&&(E=Math.max((u-n)*p+k,E)),c+1A+1&&(k=a.position.x*p));if(a.Mr)switch(a.Bz){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=
        k;a.yA&&a.pe&&(c+1n+1&&(b.scrollTop=a.position.y*p));h&&(a.Ir=!0);m=a.Jb;c=a.Mb;b.style.width=m+(a.gl?a.Hd:0)+"px";b.style.height=c+(a.Vj?a.Hd:0)+"px";a.Dz=!1;return d!==m||e!==c||a.Oa.qc?(n=a.qb,a.yu(f,n,p,a.scale,h),!1):!0}
    D.prototype.add=D.prototype.add=function(a){w.G(a,R,D,"add:part");var b=a.g;if(b!==this){null!==b&&w.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Fq&&(a.ql="Tool");var c=a.ag,b=this.Nt(c);null===b&&(b=this.Nt(""));null===b&&w.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.Xp(99999999,a,a.g===this),0<=c&&this.ad(Pf,"parts",b,null,a,null,c),b.Mc||this.sc(),a.J(Lm),c=a.Hx,null!==
    c&&c(a,null,b))}};
    D.prototype.Xp=function(a){if(a instanceof T){if(this.ep.add(a),a instanceof V){var b=a.Da;null===b?this.Dl.add(a):b.bp.add(a);b=a.Tb;null!==b&&(b.g=this)}}else a instanceof W?this.Yo.add(a):a instanceof kh||this.zb.add(a);var c=this;Mm(a,function(a){Nm(c,a)});(a instanceof kh||a instanceof V&&null!==a.Lb)&&a.H();b=a.data;null!==b&&(a instanceof kh||(a instanceof W?this.Lj.add(b,a):this.Ei.add(b,a)),Mm(a,function(a){Om(c,a)}));!0!==Dm(a)&&!0!==Em(a)||this.xg.add(a);Pm(a,!0,this);Qm(a)?(a.W.I()&&this.oa(nl(a,
        a.W)),this.sc()):a.isVisible()&&a.W.I()&&this.oa(nl(a,a.W));this.Ne()};
    D.prototype.nf=function(a){a.Et();if(a instanceof T){if(this.ep.remove(a),a instanceof V){var b=a.Da;null===b?this.Dl.remove(a):b.bp.remove(a);b=a.Tb;null!==b&&(b.g=null)}}else a instanceof W?this.Yo.remove(a):a instanceof kh||this.zb.remove(a);var c=this;Mm(a,function(a){Rm(c,a)});b=a.data;null!==b&&(a instanceof kh||(a instanceof W?this.Lj.remove(b):this.Ei.remove(b)),Mm(a,function(a){Sm(c,a)}));this.xg.remove(a);Qm(a)?(a.W.I()&&this.oa(nl(a,a.W)),this.sc()):a.isVisible()&&a.W.I()&&this.oa(nl(a,
            a.W));this.Ne()};D.prototype.remove=D.prototype.remove=function(a){w.G(a,R,D,"remove:part");Tm(this,a,!0)};function Tm(a,b,c){var d=b.layer;null!==d&&d.g===a&&(b.ib=!1,b.Qg=!1,b.J(Um),c&&b.yn(),c=d.nf(-1,b,!1),0<=c&&a.ad(Qf,"parts",d,b,null,c,null),a=b.Hx,null!==a&&a(b,d,null))}
    D.prototype.removeParts=D.prototype.cB=function(a,b){if(w.isArray(a))for(var c=w.Za(a),d=0;dd&&this.sc()};
    D.prototype.addLayerAfter=function(a,b){Vm(this,a,b);a.Rc(this);var c=this.cc,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.me&&this.ad(Qf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.sc()};
    D.prototype.removeLayer=function(a){w.G(a,qg,D,"removeLayer:layer");a.g!==this&&w.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.cc,c=b.indexOf(a);if(b.remove(a)){for(b=a.zb.copy().i;b.next();){var d=b.value,e=d.ag;d.ag=e!==a.name?e:""}null!==this.me&&this.ad(Qf,"layers",this,a,null,c,null);this.oa();this.sc()}}};D.prototype.findLayer=D.prototype.Nt=function(a){for(var b=this.Ix;b.next();){var c=b.value;if(c.name===a)return c}return null};
    D.prototype.addModelChangedListener=D.prototype.iH=function(a){w.j(a,"function",D,"addModelChangedListener:listener");null===this.ih&&(this.ih=new H("function"));this.ih.add(a);this.aa.jn(a)};D.prototype.removeModelChangedListener=function(a){w.j(a,"function",D,"removeModelChangedListener:listener");null!==this.ih&&(this.ih.remove(a),0===this.ih.count&&(this.ih=null));this.aa.Bu(a)};
    D.prototype.addChangedListener=D.prototype.jn=function(a){w.j(a,"function",D,"addChangedListener:listener");null===this.zi&&(this.zi=new H("function"));this.zi.add(a)};D.prototype.removeChangedListener=D.prototype.Bu=function(a){w.j(a,"function",D,"removeChangedListener:listener");null!==this.zi&&(this.zi.remove(a),0===this.zi.count&&(this.zi=null))};
    D.prototype.Ww=function(a){this.wb||this.ia.iF(a);a.Ac!==Of&&(this.ri=!0);if(null!==this.zi){var b=this.zi,c=b.length;if(1===c)b=b.ea(0),b(a);else if(0!==c)for(var d=b.gc(),e=0;ea.zh&&(c=a.zh);e=w.xb(a.jb.x+h/b-h/c,a.jb.y+k/b-k/c);a.position=e;w.v(e);a.ub=c;a.yu(d,a.qb,b,c,!1);a.Tc=!1;Ol(a,
        !1);c=a.Oa;c.qc&&il(c,b,a.ub);a.oa();Zl(a)}}
    D.prototype.yu=function(a,b,c,d,e){a.L(b)||(void 0===e&&(e=!1),e||Zl(this),Ml(this),d=this.Tb,null===d||!d.Ex||this.Ll!==ph||e||a.width===b.width&&a.height===b.height||d.J(),d=this.$a,!0===this.ll&&d instanceof ih&&(this.R.da=this.CB(this.R.ef),Bk(d,this)),this.Tc||this.nF(a,b),bm(this),this.ph.scale=c,this.ph.position.x=a.x,this.ph.position.y=a.y,this.ph.bounds.set(a),this.ph.isScroll=e,this.Aa("ViewportBoundsChanged",this.ph,a),this.GA&&this.links.each(function(a){a.$l&&a.W.Zf(b)&&a.$b()}))};
    function bm(a,b){void 0===b&&(b=null);var c=a.rd;if(null!==c&&c.visible){for(var d=w.mm(),e=1,f=1,h=c.xa.n,k=h.length,l=0;ln||(Xm(m.Cb)?f=f*n/Ae(f,n):e=e*n/Ae(e,n))}h=c.ux;d.m(f*h.width,e*h.height);h=f=l=k=0;if(null!==b)k=b.width,l=b.height,f=b.x,h=b.y;else{e=w.Jf();f=a.qb;e.m(f.x,f.y,f.width,f.height);for(h=a.lw.i;h.next();)f=h.value.qb,f.I()&&ab(e,f.x,f.y,f.width,f.height);if(!e.I()){w.Db(e);return}k=e.width;l=e.height;f=e.x;h=e.y;w.Db(e)}c.width=k+2*d.width;c.height=
        l+2*d.height;e=w.K();Na(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);w.Ck(d);c.U.location=e;w.v(e)}}D.prototype.clearSelection=D.prototype.Xw=function(){var a=0a&&w.Fa(a,">= 0",D,"scrollHorizontalLineChange"),this.tw=a,this.h("scrollHorizontalLineChange",b,a))});
    w.defineProperty(D,{Hu:"scrollVerticalLineChange"},function(){return this.xw},function(a){var b=this.xw;b!==a&&(w.j(a,"number",D,"scrollVerticalLineChange"),0>a&&w.Fa(a,">= 0",D,"scrollVerticalLineChange"),this.xw=a,this.h("scrollVerticalLineChange",b,a))});w.defineProperty(D,{R:"lastInput"},function(){return this.Rb},function(a){this.Rb=a});w.defineProperty(D,{Bc:"firstInput"},function(){return this.Li},function(a){this.Li=a});
    w.defineProperty(D,{ec:"currentCursor"},function(){return this.mv},function(a){""===a&&(a=this.jr);var b=this.mv;if(b!==a){w.j(a,"string",D,"currentCursor");var c=this.Fb,d=this.Nb;null!==c&&(this.mv=a,c.style.cursor=a,d.style.cursor=a,c.style.cursor===b&&(c.style.cursor="-webkit-"+a,d.style.cursor="-webkit-"+a,c.style.cursor===b&&(c.style.cursor="-moz-"+a,d.style.cursor="-moz-"+a,c.style.cursor===b&&(c.style.cursor=a,d.style.cursor=a))))}});
    w.defineProperty(D,{MK:"defaultCursor"},function(){return this.jr},function(a){""===a&&(a="auto");var b=this.jr;b!==a&&(w.j(a,"string",D,"defaultCursor"),this.jr=a,this.h("defaultCursor",b,a))});w.defineProperty(D,{click:"click"},function(){return this.Ai},function(a){var b=this.Ai;b!==a&&(null!==a&&w.j(a,"function",D,"click"),this.Ai=a,this.h("click",b,a))});
    w.defineProperty(D,{Jt:"doubleClick"},function(){return this.Ii},function(a){var b=this.Ii;b!==a&&(null!==a&&w.j(a,"function",D,"doubleClick"),this.Ii=a,this.h("doubleClick",b,a))});w.defineProperty(D,{bA:"contextClick"},function(){return this.Ci},function(a){var b=this.Ci;b!==a&&(null!==a&&w.j(a,"function",D,"contextClick"),this.Ci=a,this.h("contextClick",b,a))});
    w.defineProperty(D,{SA:"mouseOver"},function(){return this.Xi},function(a){var b=this.Xi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseOver"),this.Xi=a,this.h("mouseOver",b,a))});w.defineProperty(D,{RA:"mouseHover"},function(){return this.Wi},function(a){var b=this.Wi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHover"),this.Wi=a,this.h("mouseHover",b,a))});
    w.defineProperty(D,{QA:"mouseHold"},function(){return this.Vi},function(a){var b=this.Vi;b!==a&&(null!==a&&w.j(a,"function",D,"mouseHold"),this.Vi=a,this.h("mouseHold",b,a))});w.defineProperty(D,{cJ:"mouseDragOver"},function(){return this.ew},function(a){var b=this.ew;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDragOver"),this.ew=a,this.h("mouseDragOver",b,a))});
    w.defineProperty(D,{PA:"mouseDrop"},function(){return this.Ui},function(a){var b=this.Ui;b!==a&&(null!==a&&w.j(a,"function",D,"mouseDrop"),this.Ui=a,this.h("mouseDrop",b,a))});w.defineProperty(D,{yB:"toolTip"},function(){return this.ej},function(a){var b=this.ej;b!==a&&(this.ej=a,this.h("toolTip",b,a))});w.defineProperty(D,{contextMenu:"contextMenu"},function(){return this.Di},function(a){var b=this.Di;b!==a&&(this.Di=a,this.h("contextMenu",b,a))});
    w.defineProperty(D,{ob:"commandHandler"},function(){return this.My},function(a){var b=this.My;b!==a&&(w.G(a,sg,D,"commandHandler"),null!==a.g&&w.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Rc(null),this.My=a,a.Rc(this))});w.defineProperty(D,{eb:"toolManager"},function(){return this.Mz},function(a){var b=this.Mz;b!==a&&(w.G(a,ih,D,"toolManager"),null!==a.g&&w.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Rc(null),this.Mz=a,a.Rc(this))});
    w.defineProperty(D,{Ht:"defaultTool"},function(){return this.Sy},function(a){var b=this.Sy;b!==a&&(w.G(a,rg,D,"defaultTool"),this.Sy=a,this.$a===b&&(this.$a=a))});w.defineProperty(D,{$a:"currentTool"},function(){return this.Py},function(a){var b=this.Py;null!==b&&(b.sa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.Ht);null!==a&&(w.G(a,rg,D,"currentTool"),this.Py=a,a.Rc(this),a.doStart())});w.u(D,{selection:"selection"},function(){return this.zw});
    w.defineProperty(D,{UI:"maxSelectionCount"},function(){return this.aw},function(a){var b=this.aw;if(b!==a)if(w.j(a,"number",D,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.aw=a,this.h("maxSelectionCount",b,a),!this.ia.ab&&(a=this.selection.count-a,0= 0",D,"maxSelectionCount")});
    w.defineProperty(D,{fJ:"nodeSelectionAdornmentTemplate"},function(){return this.fw},function(a){var b=this.fw;b!==a&&(w.G(a,kh,D,"nodeSelectionAdornmentTemplate"),this.fw=a,this.h("nodeSelectionAdornmentTemplate",b,a))});w.defineProperty(D,{iI:"groupSelectionAdornmentTemplate"},function(){return this.Dv},function(a){var b=this.Dv;b!==a&&(w.G(a,kh,D,"groupSelectionAdornmentTemplate"),this.Dv=a,this.h("groupSelectionAdornmentTemplate",b,a))});
    w.defineProperty(D,{NI:"linkSelectionAdornmentTemplate"},function(){return this.Wv},function(a){var b=this.Wv;b!==a&&(w.G(a,kh,D,"linkSelectionAdornmentTemplate"),this.Wv=a,this.h("linkSelectionAdornmentTemplate",b,a))});w.u(D,{Zl:"highlighteds"},function(){return this.Hv});
    w.defineProperty(D,{ri:"isModified"},function(){var a=this.ia;return a.isEnabled?null!==a.mj?!0:this.Ov&&this.fh!==a.rj:this.Ov},function(a){if(this.Ov!==a){w.j(a,"boolean",D,"isModified");this.Ov=a;var b=this.ia;!a&&b.isEnabled&&(this.fh=b.rj);a||$m(this)}});function $m(a){var b=a.ri;a.fE!==b&&(a.fE=b,a.Aa("Modified"))}
    w.defineProperty(D,{aa:"model"},function(){return this.me},function(a){var b=this.me;if(b!==a){w.G(a,F,D,"model");this.$a.doCancel();null!==b&&b.ia!==a.ia&&b.ia.vF&&w.k("Do not replace a Diagram.model while a transaction is in progress.");this.Oa.Gh();this.Xw();this.gh=!1;this.Ho=!0;this.fh=-2;this.Uf=!1;var c=this.$d;this.$d=!0;this.Oa.Wn("Model");null!==b&&(null!==this.ih&&this.ih.each(function(a){b.Bu(a)}),b.Bu(this.kD),b instanceof Q&&an(this,b.Rg),an(this,b.hg));this.me=a;a.jn(this.jD);bn(this,
        a.hg);a instanceof Q&&cn(this,a.Rg);a.Bu(this.jD);a.jn(this.kD);null!==this.ih&&this.ih.each(function(b){a.jn(b)});this.$d=c;this.Tc||this.oa();null!==b&&(a.ia.isEnabled=b.ia.isEnabled)}});w.defineProperty(D,{Ta:null},function(){return this.bD},function(a){this.bD=a});w.u(D,{Lx:null},function(){return this.QG});
    function wl(a,b){if(b.aa===a.aa){var c=b.Ac,d=b.propertyName;if(c===Of&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.eb,c.df.each(function(b){b.Rc(a)}),c.dg.each(function(b){b.Rc(a)}),c.eg.each(function(b){b.Rc(a)}),a.$d||a.gh||(a.tv=!0,a.Ho&&(a.Uf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Oa;e.of&&!a.wb&&e.Gh();a.Aa("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Oa,e.of&&!a.wb&&e.Gh());else if(a.Ta){a.Ta=!1;try{var f=b.qf;if(""!==f)if(c===Nf){if("linkFromKey"===f){var h=
        b.object,k=a.Yf(h);if(null!==k){var l=b.newValue,m=a.Ke(l);k.Y=m}}else if("linkToKey"===f)h=b.object,k=a.Yf(h),null!==k&&(l=b.newValue,m=a.Ke(l),k.$=m);else if("linkFromPortId"===f){if(h=b.object,k=a.Yf(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.Pg=n)}}else if("linkToPortId"===f)h=b.object,k=a.Yf(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.Hh=n));else if("nodeGroupKey"===f){var h=b.object,p=a.xh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Ke(q);p.Da=r instanceof V?r:
        null}else p.Da=null}}else if("linkLabelKeys"===f){if(h=b.object,k=a.Yf(h),null!==k){var s=b.oldValue,u=b.newValue;if(w.isArray(s))for(var t=w.Za(s),x=0;xl)){var m=l;kn(k)&&m++;k.nf(m,!0);ln(k,m,l)}}}}function Om(a,b){var c=b.$j;if(w.isArray(c)){var d=a.Im.ka(c);if(null===d)d=[],d.push(b),a.Im.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):w.Fa(a,"> 0",D,"minScale"))});w.defineProperty(D,{zh:"maxScale"},function(){return this.$v},function(a){w.wd(a,D,"maxScale");var b=this.$v;b!==a&&(0 0",D,"maxScale"))});
    w.defineProperty(D,{pm:"zoomPoint"},function(){return this.Mw},function(a){this.Mw.L(a)||(w.G(a,z,D,"zoomPoint"),this.Mw=a=a.S())});w.defineProperty(D,{aA:"contentAlignment"},function(){return this.to},function(a){var b=this.to;b.L(a)||(w.G(a,L,D,"contentAlignment"),this.to=a=a.S(),this.h("contentAlignment",b,a),Ol(this,!1))});
    w.defineProperty(D,{dL:"initialContentAlignment"},function(){return this.Mo},function(a){var b=this.Mo;b.L(a)||(w.G(a,L,D,"initialContentAlignment"),this.Mo=a=a.S(),this.h("initialContentAlignment",b,a))});w.defineProperty(D,{padding:"padding"},function(){return this.hf},function(a){"number"===typeof a?a=new hb(a):w.G(a,hb,D,"padding");var b=this.hf;b.L(a)||(this.hf=a=a.S(),this.sc(),this.h("padding",b,a))});w.u(D,{ig:"nodes"},function(){return this.ep.i});w.u(D,{links:"links"},function(){return this.Yo.i});
    w.u(D,{Lk:"parts"},function(){return this.zb.i});D.prototype.findTopLevelNodesAndLinks=function(){for(var a=new I(R),b=this.ep.i;b.next();){var c=b.value;c.$p&&a.add(c)}for(b=this.Yo.i;b.next();)c=b.value,c.$p&&a.add(c);return a.i};D.prototype.findTopLevelGroups=function(){return this.Dl.i};
    w.defineProperty(D,{Tb:"layout"},function(){return this.ke},function(a){var b=this.ke;b!==a&&(w.G(a,tg,D,"layout"),null!==b&&(b.g=null,b.group=null),this.ke=a,a.g=this,a.group=null,this.um=!0,this.h("layout",b,a),this.Ne())});D.prototype.layoutDiagram=function(a){Hi(this);a&&qn(this,!0);cm(this,!1)};function qn(a,b){for(var c=a.Dl.i;c.next();)yn(a,c.value,b);null!==a.Tb&&(b?a.Tb.Df=!1:a.Tb.J())}
    function yn(a,b,c){if(null!==b){for(var d=b.bp.i;d.next();)yn(a,d.value,c);null!==b.Tb&&(c?b.Tb.Df=!1:b.Tb.J())}}function cm(a,b){if(a.um&&!a.Ty){var c=a.Ta;a.Ta=!0;try{var d=a.ia.Ih;0===d&&a.Hb("Layout");var e=a.Oa;1!==a.ia.Ih||e.of||e.qc||b||e.Wn("Layout");a.um=!1;for(var f=a.Dl.i;f.next();)zn(a,f.value,b);var h=a.Tb;h.Df||(!b||h.zF||0===d?(h.doLayout(a),Hi(a),h.Df=!0):a.um=!0)}finally{0===d&&a.Wc("Layout"),a.Ta=c}}}
    function zn(a,b,c){if(null!==b){for(var d=b.bp.i;d.next();)zn(a,d.value,c);d=b.Tb;null===d||d.Df||(!c||d.zF?(b.Un=!b.location.I(),d.doLayout(b),b.J(An),Bm(a,b),d.Df=!0):a.um=!0)}}w.defineProperty(D,{Td:"isTreePathToChildren"},function(){return this.Rv},function(a){var b=this.Rv;if(b!==a&&(w.j(a,"boolean",D,"isTreePathToChildren"),this.Rv=a,this.h("isTreePathToChildren",b,a),!this.ia.ab))for(a=this.ig;a.next();)Bn(a.value)});
    D.prototype.findTreeRoots=function(){for(var a=new H(T),b=this.ig;b.next();){var c=b.value;c.$p&&null===c.An()&&a.add(c)}return a.i};w.defineProperty(D,{DB:"treeCollapsePolicy"},function(){return this.Hw},function(a){var b=this.Hw;b!==a&&(a!==ul&&a!==Ym&&a!==Zm&&w.k("Unknown Diagram.treeCollapsePolicy: "+a),this.Hw=a,this.h("treeCollapsePolicy",b,a))});w.defineProperty(D,{yh:null},function(){return this.RC},function(a){this.RC=a});
    function tl(a){function b(a){var b=a.toLowerCase(),h=new H("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new ma("string",H),d=new ma("string","string");b("AnimationStarting");b("AnimationFinished");b("BackgroundSingleClicked");b("BackgroundDoubleClicked");b("BackgroundContextClicked");b("ClipboardChanged");b("ClipboardPasted");b("DocumentBoundsChanged");b("ExternalObjectsDropped");b("InitialLayoutCompleted");b("LayoutCompleted");b("LinkDrawn");b("LinkRelinked");b("LinkReshaped");b("Modified");
        b("ObjectSingleClicked");b("ObjectDoubleClicked");b("ObjectContextClicked");b("PartCreated");b("PartResized");b("PartRotated");b("SelectionMoved");b("SelectionCopied");b("SelectionDeleting");b("SelectionDeleted");b("SelectionGrouped");b("SelectionUngrouped");b("ChangingSelection");b("ChangedSelection");b("SubGraphCollapsed");b("SubGraphExpanded");b("TextEdited");b("TreeCollapsed");b("TreeExpanded");b("ViewportBoundsChanged");a.Vy=c;a.Uy=d}
    function oa(a,b){var c=a.Uy.ka(b);return null!==c?c:a.Uy.ka(b.toLowerCase())}function Cn(a,b){var c=a.Vy.ka(b);if(null!==c)return c;c=a.Vy.ka(b.toLowerCase());if(null!==c)return c;w.k("Unknown DiagramEvent name: "+b);return null}D.prototype.addDiagramListener=D.prototype.Nw=function(a,b){w.j(a,"string",D,"addDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=Cn(this,a);null!==c&&c.add(b)};
    D.prototype.removeDiagramListener=D.prototype.bB=function(a,b){w.j(a,"string",D,"removeDiagramListener:name");w.j(b,"function",D,"addDiagramListener:listener");var c=Cn(this,a);null!==c&&c.remove(b)};D.prototype.raiseDiagramEvent=D.prototype.Aa=function(a,b,c){var d=Cn(this,a),e=new Bf;e.g=this;a=oa(this,a);null!==a&&(e.name=a);void 0!==b&&(e.uB=b);void 0!==c&&(e.XA=c);b=d.length;if(1===b)d=d.ea(0),d(e);else if(0!==b)for(c=d.gc(),a=0;a=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.qb,f=a.scale,e=w.mg(0,0,e.width*f,e.height*f),h=w.xb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Gu,1),k|=0,h.x+=k,b.x>e.x+e.width-d.right/2&&(h.x+=k),b.x>e.x+e.width-d.right/4&&(h.x+=4*k));b.y>=e.y&&b.ye.y+e.height-d.bottom&&(k=Math.max(a.Hu,1),k|=0,h.y+=k,b.y>e.y+e.height-d.bottom/2&&(h.y+=k),b.y>e.y+e.height-d.bottom/4&&(h.y+=4*k));h.Kc(dd)||(c=new z(c.x+h.x/f,c.y+h.y/f));w.Db(e);w.v(h);return c}D.prototype.makeSvg=D.prototype.makeSVG=function(a){void 0===a&&(a=new ra);a.context="svg";a=Kn(this,a);return null!==a?a.km:null};
    D.prototype.makeImage=function(a){void 0===a&&(a=new ra);var b=(a.document||document).createElement("img");b.src=this.OI(a);return b};
    D.prototype.makeImageData=D.prototype.OI=function(a){void 0===a&&(a=new ra);var b=Kn(this,a);if(null!==b){var c=a.returnType,c=void 0===c?"string":c.toLowerCase();switch(c){case "imagedata":return b.yk.getImageData(0,0,b.width,b.height);case "blob":b=b.Kd;c=a.callback;if("function"!==typeof c){w.k('Error: Diagram.makeImageData called with "returnType: toBlob", but no "callback" function property defined.');break}if("function"===typeof b.toBlob)return b.toBlob(c,a.type,a.details),"toBlob";if("function"===
        typeof b.msToBlob)return c(b.msToBlob()),"msToBlob";c(null);break;default:return b.toDataURL(a.type,a.details)}}return""};var Ln=!1;
    function Kn(a,b){a.Oa.Gh();a.cg();if(null===a.Fb)return null;"object"!==typeof b&&w.k("properties argument must be an Object.");var c=!1,d=b.size||null,e=b.scale||null;void 0!==b.scale&&isNaN(b.scale)&&(e="NaN");var f=b.maxSize;void 0===b.maxSize&&(c=!0,f="svg"===b.context?new ia(Infinity,Infinity):new ia(2E3,2E3));var h=b.position||null,k=b.parts||null,l=void 0===b.padding?1:b.padding,m=b.background||null,n=b.omitTemporary;void 0===n&&(n=!0);var p=b.document||document,q=b.elementFinished||null,r=
        b.showTemporary;void 0===r&&(r=!n);n=b.showGrid;void 0===n&&(n=r);null!==d&&isNaN(d.width)&&isNaN(d.height)&&(d=null);"number"===typeof l?l=new hb(l):l instanceof hb||(l=new hb(0));l.left=Math.max(l.left,0);l.right=Math.max(l.right,0);l.top=Math.max(l.top,0);l.bottom=Math.max(l.bottom,0);a.tf.Fe(!0);var s=new Wc(null,p),u=s.yk;if(!(d||e||k||h)){s.width=a.Jb+Math.ceil(l.left+l.right);s.height=a.Mb+Math.ceil(l.top+l.bottom);if("svg"===b.context)return u=new Oc(s.Kd,p,q),Im(a,u,l,new ia(s.width,s.height),
        a.ub,a.jb,k,m,r,n),u;a.pr=!1;Im(a,u,l,new ia(s.width,s.height),a.ub,a.jb,k,m,r,n);a.pr=!0;return s}var t=a.ob.ex,x=new z(0,0),v=a.se.copy();v.MJ(a.padding);if(r)for(var A=!0,A=a.cc.n,y=A.length,K=0;Kt?(e=t,h=v.width,ba=v.height):(h=f.width,ba=f.height)):(h=v.width*e,ba=v.height*e):(e=t,h=v.width,ba=v.height);null!==l?(h+=S,ba+=A):l=new hb(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!Ln&&(h>d||ba>f)&&(w.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(ba)+" vs 2000x2000) Consider increasing the max size."),
        Ln=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&(ba=Math.min(ba,f)));s.width=Math.ceil(h);s.height=Math.ceil(ba);if("svg"===b.context)return u=new Oc(s.Kd,p,q),Im(a,u,l,new ia(Math.ceil(h),Math.ceil(ba)),e,x,k,m,r,n),u;a.pr=!1;Im(a,u,l,new ia(Math.ceil(h),Math.ceil(ba)),e,x,k,m,r,n);a.pr=!0;return s}D.inherit=function(a,b){w.j(a,"function",D,"inherit");w.j(b,"function",D,"inherit");b.ZG&&w.k("Cannot inherit from "+w.lf(b));w.Ka(a,b)};
    function Cl(){this.OD=null;this.aH="63ad05bbe23a1786468a4c741b6d2";this.Ji=this.aH===this._tk?!0:null}
    function Mn(a){var b="f",c=window[w.Mg("76a715b2f73f148a")][w.Mg("72ba13b5")],d=w.Mg;if(window[d("7da7")]&&window[d("7da7")][d("76a115b6ed251eaf4692")]){a.Ji=!0;var e=window[d("7da7")][d("76a115b6ed251eaf4692")],e=d(e).split(d("39e9"));if(6>e.length)return;var f=d(e[1]).split(".");if("7da71ca0"!==e[4])return;var h=d(w[d("6cae19")]).split(".");if(f[0]>h[0]||f[0]===h[0]&&f[1]>=h[1]){f=c[d("76ad18b4f73e")];for(h=c[d("73a612b6fb191d")](d("35e7"))+2;h
    f&&d(e[2])!==d("7da71ca0ad381e90")&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));0>f&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Ji=!(0<=f&&ff&&d(w.adym)!==d("7da71ca0ad381e90")&&(f=b[d("73a612b6fb191d")](d("76a715b2ef3e149757")));a.Ji=!(0<=f&&fb.timeStamp-a.Km)b.preventDefault();else if(a.ml)b.preventDefault();else{a.Vc=a.Rb;a.Rb=c;Ul(a,a,b,c,!0);c.Tl=!0;c.Ge=b.detail;if(w.sF||w.tF)b.timeStamp-a.Kmb.timeStamp-a.Km){b.preventDefault();return}a.Km=b.timeStamp}if(w.Hn&&null!==a.bt)a.bt=null,b.preventDefault();else{a.Vc=a.Rb;a.Rb=c;Ul(a,
        a,b,c,!0);c.up=!0;c.Ge=b.detail;if(w.sF||w.tF)c.Ge=a.pl;c.bubbles=b.bubbles;var d=b.path||b.vk&&b.vk();c.lg=b.target.Z||d[0].Z||null;a.simulatedMouseUp(b,null,new z,c.lg)||(a.doMouseUp(),Yh(a),Yl(c,b))}}};a.Sg=function(b){if(a.isEnabled){var c=a.Vc;a.Vc=a.Rb;a.Rb=c;Ul(a,a,b,c,!0);c.bubbles=!0;c.Sl=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();Yl(c,b)}};a.Sn=function(){if(a.isEnabled){a.ll=!1;var b=a.$a;b.cancelWaitAfter();b.standardMouseOver()}};a.BB=function(b){if(a.isEnabled){a.jt=
        !1;a.ml=!0;var c=a.Vc;a.Vc=a.Rb;a.Rb=c;Wl(a,b,b.targetTouches[0],c,1a.ow)){var c=a.Zh;c[0].pointerId===b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&c[1]!==b&&(c=a.Vc,a.Vc=a.Rb,a.Rb=c,Xl(a,b,b,c,!0),a.simulatedMouseMove(b,null,c.lg)||(a.doMouseMove(),Yl(c,b)))}};a.RF=function(b){if("touch"===b.pointerType){var c=a.zD;void 0!==c[b.pointerId]&&(a.ow--,delete c[b.pointerId],c=a.Zh,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};
        d.Fe(!0);Gl(a)}function Nn(a){1a)&&w.Fa(a,"0 <= loc <= 1",ha,"addColorStop:loc");w.j(b,"string",ha,"addColorStop:color");null===this.dh&&(this.dh=new ma("number","string"));this.dh.add(a,b);this.na===og&&(this.type=pg);this.eh=null};
    w.defineProperty(ha,{type:"type"},function(){return this.na},function(a){this.P&&w.ma(this,a);w.mb(a,ha,ha,"type");this.na=a;this.start.Sd()&&(a===pg?this.start=Bb:a===bd&&(this.start=Jb));this.end.Sd()&&(a===pg?this.end=Rb:a===bd&&(this.end=Jb));this.eh=null});w.defineProperty(ha,{color:"color"},function(){return this.ro},function(a){this.P&&w.ma(this,a);this.ro=a;this.eh=null});
    w.defineProperty(ha,{start:"start"},function(){return this.pp},function(a){this.P&&w.ma(this,a);w.G(a,L,ha,"start");this.pp=a.S();this.eh=null});w.defineProperty(ha,{end:"end"},function(){return this.Fo},function(a){this.P&&w.ma(this,a);w.G(a,L,ha,"end");this.Fo=a.S();this.eh=null});w.defineProperty(ha,{Ou:"startRadius"},function(){return this.Cw},function(a){this.P&&w.ma(this,a);w.wd(a,ha,"startRadius");0>a&&w.Fa(a,">= zero",ha,"startRadius");this.Cw=a;this.eh=null});
    w.defineProperty(ha,{Kt:"endRadius"},function(){return this.yv},function(a){this.P&&w.ma(this,a);w.wd(a,ha,"endRadius");0>a&&w.Fa(a,">= zero",ha,"endRadius");this.yv=a;this.eh=null});w.defineProperty(ha,{uk:"colorStops"},function(){return this.dh},function(a){this.P&&w.ma(this,a);this.dh=a;this.eh=null});w.defineProperty(ha,{pattern:"pattern"},function(){return this.nw},function(a){this.P&&w.ma(this,a);this.nw=a;this.eh=null});
    ha.randomColor=function(a,b){void 0===a&&(a=128);void 0===b&&(b=Math.max(a,255));var c=Math.abs(b-a),d=Math.floor(a+Math.random()*c).toString(16),e=Math.floor(a+Math.random()*c).toString(16),c=Math.floor(a+Math.random()*c).toString(16);2>d.length&&(d="0"+d);2>e.length&&(e="0"+e);2>c.length&&(c="0"+c);return"#"+d+e+c};var Xn=(new Wc(null)).yk,ea;
    ha.isValidColor=ea=function(a){if("black"===a)return!0;if(""===a)return!1;Xn.fillStyle="#000000";var b=Xn.fillStyle;Xn.fillStyle=a;if(Xn.fillStyle!==b)return!0;Xn.fillStyle="#FFFFFF";b=Xn.fillStyle;Xn.fillStyle=a;return Xn.fillStyle!==b};var Yn=new Tn,Zn=new Tn,$n=new Tn,ao=new Tn;ha.lighten=function(a){return bo(a)};
    ha.prototype.lightenBy=function(a,b){this.P&&w.ma(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Vn:b;if(this.type===og)co(this.color),this.color=eo(c,d);else if((this.type===pg||this.type===bd)&&null!==this.uk)for(var e=this.uk.i;e.next();)co(e.value),this.addColorStop(e.key,eo(c,d));return this};var bo;ha.lightenBy=bo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Vn:c;co(a);return eo(b,c)};ha.darken=function(a){return fo(a)};
    ha.prototype.darkenBy=function(a,b){this.P&&w.ma(this);var c=void 0===a||"number"!==typeof a?.2:a,d=void 0===b?Vn:b;if(this.type===og)co(this.color),this.color=eo(-c,d);else if((this.type===pg||this.type===bd)&&null!==this.uk)for(var e=this.uk.i;e.next();)co(e.value),this.addColorStop(e.key,eo(-c,d));return this};var fo;ha.darkenBy=fo=function(a,b,c){b=void 0===b||"number"!==typeof b?.2:b;c=void 0===c?Vn:c;co(a);return eo(-b,c)};
    function eo(a,b){switch(b){case Vn:var c=100*ho(Yn.Dc),d=100*ho(Yn.Ad),e=100*ho(Yn.$c);$n.Dc=.4124564*c+.3575761*d+.1804375*e;$n.Ad=.2126729*c+.7151522*d+.072175*e;$n.$c=.0193339*c+.119192*d+.9503041*e;$n.gg=Yn.gg;c=io($n.Dc/jo[0]);d=io($n.Ad/jo[1]);e=io($n.$c/jo[2]);ao.Dc=116*d-16;ao.Ad=500*(c-d);ao.$c=200*(d-e);ao.gg=$n.gg;ao.Dc=Math.min(100,Math.max(0,ao.Dc+100*a));c=(ao.Dc+16)/116;d=c-ao.$c/200;$n.Dc=jo[0]*ko(ao.Ad/500+c);$n.Ad=jo[1]*(ao.Dc>lo*mo?Math.pow(c,3):ao.Dc/lo);$n.$c=jo[2]*ko(d);$n.gg=
        ao.gg;c=-.969266*$n.Dc+1.8760108*$n.Ad+.041556*$n.$c;d=.0556434*$n.Dc+-.2040259*$n.Ad+1.0572252*$n.$c;Yn.Dc=255*no((3.2404542*$n.Dc+-1.5371385*$n.Ad+-.4985314*$n.$c)/100);Yn.Ad=255*no(c/100);Yn.$c=255*no(d/100);Yn.gg=$n.gg;Yn.Dc=Math.round(Yn.Dc);255Yn.Dc&&(Yn.Dc=0);Yn.Ad=Math.round(Yn.Ad);255Yn.Ad&&(Yn.Ad=0);Yn.$c=Math.round(Yn.$c);255Yn.$c&&(Yn.$c=0);return"rgba("+Yn.Dc+", "+Yn.Ad+", "+Yn.$c+", "+Yn.gg+")";case Wn:var e=Yn.Dc/255,f=Yn.Ad/
        255,h=Yn.$c/255,k=Math.max(e,f,h),d=Math.min(e,f,h),l=k-d,d=(k+d)/2;if(0===l)c=e=0;else{switch(k){case e:c=(f-h)/l%6;break;case f:c=(h-e)/l+2;break;case h:c=(e-f)/l+4}c*=60;0>c&&(c+=360);e=l/(1-Math.abs(2*d-1))}Zn.Dc=Math.round(c);Zn.Ad=Math.round(100*e);Zn.$c=Math.round(100*d);Zn.gg=Yn.gg;Zn.$c=Math.min(100,Math.max(0,Zn.$c+100*a));return"hsla("+Zn.Dc+", "+Zn.Ad+"%, "+Zn.$c+"%, "+Zn.gg+")";default:return w.k("Unknown color space: "+b),"rgba(0, 0, 0, 1)"}}
    function co(a){Xn.clearRect(0,0,1,1);Xn.fillStyle="#000000";var b=Xn.fillStyle;Xn.fillStyle=a;Xn.fillStyle!==b?(Xn.fillRect(0,0,1,1),a=Xn.getImageData(0,0,1,1).data,Yn.Dc=a[0],Yn.Ad=a[1],Yn.$c=a[2],Yn.gg=a[3]/255):(Xn.fillStyle="#FFFFFF",Xn.fillStyle=a,Yn.Dc=0,Yn.Ad=0,Yn.$c=0,Yn.gg=1)}function ho(a){a/=255;return.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function no(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}var mo=216/24389,lo=24389/27,jo=[95.047,100,108.883];
    function io(a){return a>mo?Math.pow(a,1/3):(lo*a+16)/116}function ko(a){var b=a*a*a;return b>mo?b:(116*a-16)/lo}
    function G(){w.nc(this);this.O=4225027;this.yc=1;this.nh=null;this.Sb="";this.bc=this.Eb=null;this.jb=(new z(NaN,NaN)).freeze();this.Te=Gd;this.Yh=rd;this.Xh=Ed;this.hd=new ka;this.sm=new ka;this.Si=new ka;this.ub=this.Do=1;this.ng=0;this.Hg=oo;this.Pm=fd;this.sd=(new B(NaN,NaN,NaN,NaN)).freeze();this.oc=(new B(NaN,NaN,NaN,NaN)).freeze();this.Uc=(new B(0,0,NaN,NaN)).freeze();this.V=this.Ds=this.Es=null;this.rm=this.ie=qc;this.Qs=0;this.bj=1;this.Uq=0;this.Bi=1;this.ft=null;this.Us=-Infinity;this.$m=
        0;this.an=dd;this.bn=kj;this.cr="";this.vc=this.ja=null;this.po=-1;this.fn=this.qg=this.bl=this.op=null;this.Az=nj;this.Wm=null}w.ni(G);w.ga("GraphObject",G);
    G.prototype.cloneProtected=function(a){a.O=this.O|6144;a.yc=this.yc;a.Sb=this.Sb;a.Eb=this.Eb;a.bc=this.bc;a.jb.assign(this.jb);a.Te=this.Te.S();a.Yh=this.Yh.S();a.Xh=this.Xh.S();a.Si=this.Si.copy();a.ub=this.ub;a.ng=this.ng;a.Hg=this.Hg;a.Pm=this.Pm.S();a.sd.assign(this.sd);a.oc.assign(this.oc);a.Uc.assign(this.Uc);a.Ds=this.Ds;null!==this.V&&(a.V=this.V.copy());a.ie=this.ie.S();a.rm=this.rm.S();a.Qs=this.Qs;a.bj=this.bj;a.Uq=this.Uq;a.Bi=this.Bi;a.ft=this.ft;a.Us=this.Us;a.$m=this.$m;a.an=this.an.S();
        a.bn=this.bn;a.cr=this.cr;null!==this.ja&&(a.ja=this.ja.copy());a.vc=this.vc;a.po=this.po;null!==this.bl&&(a.bl=w.Nl(this.bl));null!==this.qg&&(a.qg=this.qg.copy());a.fn=this.fn};G.prototype.addCopyProperty=G.prototype.fH=function(a){var b=this.bl;if(w.isArray(b))for(var c=0;ck;)k+=f[n++%l],p=!p;q=!1}else k=f[n++%l];k>m&&(k=m);var r=Math.sqrt(k*k/(1+e*e));0>d&&(r=-r);b+=r;c+=e*r;p?a.lineTo(b,c):a.moveTo(b,c);m-=k;p=!p}}
    G.prototype.raiseChangedEvent=G.prototype.ad=function(a,b,c,d,e,f,h){var k=this.U;if(null!==k&&(k.Xn(a,b,c,d,e,f,h),zo(this)&&c===this&&a===Nf&&Ao(this,k,b),c===k&&0!==(k.O&16777216)&&null!==k.data))for(a=this.xa.n,c=a.length,d=0;da&&(a+=360));return a};G.prototype.getDocumentScale=G.prototype.pj=function(){if(0!==(this.O&4096)===!1)return this.Do;var a=this.ub;return null!==this.Q?a*this.Q.pj():a};G.prototype.getLocalPoint=G.prototype.$E=function(a,b){void 0===b&&(b=new z);b.assign(a);this.rh.pi(b);return b};
    G.prototype.getNearestIntersectionPoint=G.prototype.aF=function(a,b,c){return this.Dn(a.x,a.y,b.x,b.y,c)};g=G.prototype;g.Dn=function(a,b,c,d,e){var f=this.transform,h=1/(f.m11*f.m22-f.m12*f.m21),k=f.m22*h,l=-f.m12*h,m=-f.m21*h,n=f.m11*h,p=h*(f.m21*f.dy-f.m22*f.dx),q=h*(f.m12*f.dx-f.m11*f.dy);if(null!==this.mn)return f=this.W,le(f.left,f.top,f.right,f.bottom,a,b,c,d,e);h=a*k+b*m+p;a=a*l+b*n+q;b=c*k+d*m+p;c=c*l+d*n+q;e.m(0,0);d=this.Ja;c=le(0,0,d.width,d.height,h,a,b,c,e);e.transform(f);return c};
    function xk(a,b,c,d,e){if(!1!==Cm(a)){var f=a.margin,h=f.right+f.left,f=f.top+f.bottom;b=Math.max(b-h,0);c=Math.max(c-f,0);e=e||0;d=Math.max((d||0)-h,0);e=Math.max(e-f,0);var h=a.angle,f=0,f=a.Ca,k=0;a instanceof X&&(k=a.lb);90===h||270===h?(b=isFinite(f.height)?f.height+k:b,c=isFinite(f.width)?f.width+k:c):(b=isFinite(f.width)?f.width+k:b,c=isFinite(f.height)?f.height+k:c);var f=d||0,k=e||0,l=a instanceof C;switch(Eo(a,!0)){case Oj:k=f=0;l&&(c=b=Infinity);break;case Fe:isFinite(b)&&b>d&&(f=b);isFinite(c)&&
    c>e&&(k=c);break;case qo:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case po:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.Gf,m=a.si;f>l.width&&m.widthl.height&&m.heighta.height||this.vf.We>a.width))&&(c=!0);this.O=c?this.O|256:this.O&-257;this.oc.I()||
    w.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.oc.toString());this.Qx(f,this.oc);Fo(this,!1);w.Db(f)};g.jj=function(){};
    function Go(a,b,c,d,e){var f=a.W;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.Ca.I()){f=a.sd;c=a.margin;b=c.right+c.left;var h=c.top+c.bottom;c=f.width+b;f=f.height+h;d+=b;e+=h;b=Eo(a,!0);c===d&&f===e&&(b=Oj);switch(b){case Oj:if(c>d||f>e)am(a,!0),xk(a,c>d?d:c,f>e?e:f);break;case Fe:am(a,!0);xk(a,d,e,0,0);break;case qo:am(a,!0);xk(a,d,f,0,0);break;case po:am(a,!0),xk(a,c,e,0,0)}}}
    g.Qx=function(a,b){var c=this.U;null!==c&&null!==c.g&&(c.Iu!==this&&c.cG!==this&&c.eB!==this||Ho(c,!0),this.oa(),Va(a,b)||(c.Gk(),this.vs(c)))};g.vs=function(a){null!==this.Ud&&(Ho(a,!0),a instanceof T&&Io(a,this))};w.defineProperty(G,{uq:"shadowVisible"},function(){return this.fn},function(a){var b=this.fn;b!==a&&(this.fn=a,this.oa(),this.h("shadowVisible",b,a))});
    G.prototype.ue=function(a,b){if(this.visible){var c=this.oc;if(0!==c.width&&0!==c.height&&!isNaN(c.x)&&!isNaN(c.y)){var d=this.opacity,e=1;if(1!==d){if(0===d)return;e=a.globalAlpha;a.globalAlpha=e*d}if(a instanceof Oc)a:{if(this.visible){var f=null,h=a.Fx;if(this instanceof C&&(this.type===Jo||this.type===Ko))Lo(this,a,b);else{var k=this.oc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.Q;0!==(this.O&4096)===!0&&Mo(this);var c=0!==(this.O&256),n=!1;this instanceof
    Lh&&(a.font=this.font);if(c){n=m.ah()?m.Ja:m.W;if(null!==this.qg)var p=this.qg,q=p.x,r=p.y,s=p.width,p=p.height;else q=Math.max(k.x,n.x),r=Math.max(k.y,n.y),s=Math.min(k.right,n.right)-q,p=Math.min(k.bottom,n.bottom)-r;if(q>k.width+k.x||k.x>n.width+n.x||r>k.height+k.y||k.y>n.height+n.y)break a;n=!0;Qc(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}if(this.tj()){var u=this;if(!u.isVisible())break a}a.wh.Ub=[1,0,0,1,0,0];this instanceof Lh&&1c.width+c.x||c.x>n.width+n.x||l>c.height+c.y||c.y>n.height+n.y){1!==d&&(a.globalAlpha=e);return}a.save();a.beginPath();a.rect(k,l,u,q);a.clip()}if(this.tj()){if(!this.isVisible()){1!==d&&(a.globalAlpha=
            e);return}this.dm&&b.qj("drawShadows")&&(n=this.en,a.sB(n.x*b.scale*b.Ed,n.y*b.scale*b.Ed,this.Gg),a.ao(),a.shadowColor=this.dn)}n=!1;this.U&&b.qj("drawShadows")&&(n=this.U.dm);!0===this.uq?a.ao():!1===this.uq&&a.$n();null!==this.bc&&(No(this,a,this.bc,!0,!0),this.bc instanceof ha&&this.bc.type===bd?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.Ng(this.bc)):a.fillRect(c.x,c.y,c.width,c.height));f.hu()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Eb&&(u=this.Ja,k=c=0,l=u.width,u=
            u.height,q=0,this instanceof X&&(u=this.Ua.gb,c=u.x,k=u.y,l=u.width,u=u.height,q=this.ji),No(this,a,this.Eb,!0,!1),this.Eb instanceof ha&&this.Eb.type===bd?(a.beginPath(),a.rect(c-q/2,k-q/2,l+q,u+q),a.Ng(this.Eb)):a.fillRect(c-q/2,k-q/2,l+q,u+q));n&&(null!==this.Eb||null!==this.bc||null!==h&&0!==(h.O&512)||null!==h&&(h.type===Fl||h.type===Mj)&&h.Ld()!==this)?(Oo(this,!0),null===this.uq&&a.$n()):Oo(this,!1);this.zk(a,b);n&&0!==(this.O&512)===!0&&a.ao();this.tj()&&n&&a.$n();m?(a.restore(),this instanceof
        C?a.Fe(!0):a.Fe(!1)):f.hu()||(h=1/(f.m11*f.m22-f.m12*f.m21),a.transform(f.m22*h,-f.m12*h,-f.m21*h,f.m11*h,h*(f.m21*f.dy-f.m22*f.dx),h*(f.m12*f.dx-f.m11*f.dy)))}1!==d&&(a.globalAlpha=e)}}};
    function Lo(a,b,c){var d=a.oc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.bc&&(No(a,b,a.bc,!0,!0),a.bc instanceof ha&&a.bc.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Ng(a.bc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Eb&&(No(a,b,a.Eb,!0,!1),a.Eb instanceof ha&&a.Eb.type===bd?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.Ng(a.Eb)):b.fillRect(d.x,d.y,d.width,d.height)),a.zk(b,c))}G.prototype.zk=function(){};
    function No(a,b,c,d,e){if(null!==c){var f=1,h=1;if("string"===typeof c)d?b.fillStyle=c:b.strokeStyle=c;else if(c.type===og)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ja,f=h.width,h=h.height;if(e)var l=a.W,f=l.width,h=l.height;var m=b instanceof Xc;if(m&&c.eh&&(c.type===Un||c.so===f&&c.Ny===h))k=c.eh;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.W,f=l.width,h=l.height,r=l.x,s=l.y);l=c.start.x*f+c.start.offsetX;n=c.start.y*h+c.start.offsetY;p=c.end.x*f+c.end.offsetX;q=c.end.y*h+c.end.offsetY;
        l+=r;p+=r;n+=s;q+=s;if(c.type===pg)k=b.createLinearGradient(l,n,p,q);else if(c.type===bd)s=isNaN(c.Kt)?Math.max(f,h)/2:c.Kt,isNaN(c.Ou)?(r=0,s=Math.max(f,h)/2):r=c.Ou,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===Un)try{k=b.createPattern(c.pattern,"repeat")}catch(u){k=null}else w.Bd(c.type,"Brush type");if(c.type!==Un&&(e=c.uk,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.eh=k,null!==k&&(c.so=f,c.Ny=h),null===k&&c.type===Un&&-1!==c.so)){c.so=-1;var t=a.g;null!==t&&
        -1===c.so&&w.setTimeout(function(){t.Xx()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.bm=function(a){if(a instanceof C)a:{if(this!==a&&null!==a)for(var b=this.Q;null!==b;){if(b===a){a=!0;break a}b=b.Q}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.xj=function(){if(!this.visible)return!1;var a=this.Q;return null!==a?a.xj():!0};
    G.prototype.isEnabledObject=G.prototype.fu=function(){for(var a=this instanceof C?this:this.Q;null!==a&&a.isEnabled;)a=a.Q;return null===a};w.defineProperty(G,{NE:"enabledChanged"},function(){return null!==this.ja?this.ja.tr:null},function(a){uo(this);var b=this.ja.tr;b!==a&&(null!==a&&w.j(a,"function",G,"enabledChanged"),this.ja.tr=a,this.h("enabledChanged",b,a))});
    function Mo(a){if(0!==(a.O&2048)===!0){var b=a.hd;b.reset();if(!a.oc.I()||!a.sd.I()){Po(a,!1);return}b.translate(a.oc.x,a.oc.y);b.translate(-a.za.x,-a.za.y);var c=a.Ja;Co(a,b,c.x,c.y,c.width,c.height);Po(a,!1);Qo(a,!0)}0!==(a.O&4096)===!0&&(b=a.Q,null===b?(a.sm.set(a.hd),a.Do=a.scale,Qo(a,!1)):null!==b.rh&&(c=a.sm,c.reset(),b.ah()?c.multiply(b.sm):null!==b.Q&&c.multiply(b.Q.sm),c.multiply(a.hd),a.Do=a.scale*b.Do,Qo(a,!1)))}
    function Co(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=Jb;a.tj()&&a.Ff.Yc()&&(h=a.Ff);var k=w.K();if(a instanceof R&&a.bg!==a)for(c=a.bg,d=c.Ja,k.Lu(d.x,d.y,d.width,d.height,h),c.Si.nb(k),k.offset(-c.za.x,-c.za.y),h=c.Q;null!==h&&h!==a;)h.Si.nb(k),k.offset(-h.za.x,-h.za.y),h=h.Q;else k.Lu(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);w.v(k)}}g=G.prototype;g.H=function(a){void 0===a&&(a=!1);if(!0!==Cm(this)){am(this,!0);Fo(this,!0);var b=this.Q;null===b||a||b.H()}};
    g.Zp=function(){!0!==Cm(this)&&(am(this,!0),Fo(this,!0))};function Ro(a){if(!1===Dm(a)){var b=a.Q;null!==b?b.H():a.tj()&&(b=a.g,null!==b&&(b.xg.add(a),a instanceof T&&a.$f(),b.Ne()));Fo(a,!0)}}g.Mi=function(){0!==(this.O&2048)===!1&&(Po(this,!0),Qo(this,!0))};g.BA=function(){Qo(this,!0)};g.oa=function(){var a=this.U;null!==a&&a.oa()};
    function Eo(a,b){var c=a.stretch,d=a.Q;if(null!==d&&d.na===So)return To(a,d.Nd(a.Vb),d.Md(a.column),b);if(null!==d&&d.na===Fl&&d.Ld()===a)return Uo(a,Fe,b);if(c===oo){if(null!==d){if(d.na===Mj&&d.Ld()===a)return Uo(a,Fe,b);c=d.be;return c===oo?Uo(a,Oj,b):Uo(a,c,b)}return Uo(a,Oj,b)}return Uo(a,c,b)}
    function To(a,b,c,d){var e=a.stretch;if(e!==oo)return Uo(a,e,d);var f=e=null;switch(b.stretch){case po:f=!0;break;case Fe:f=!0}switch(c.stretch){case qo:e=!0;break;case Fe:e=!0}b=a.Q.be;null===e&&(e=b===qo||b===Fe);null===f&&(f=b===po||b===Fe);return!0===e&&!0===f?Uo(a,Fe,d):!0===e?Uo(a,qo,d):!0===f?Uo(a,po,d):Uo(a,Oj,d)}
    function Uo(a,b,c){if(c)return b;if(b===Oj)return Oj;c=a.Ca;if(c.I())return Oj;a=a.angle;if(!isNaN(c.width))if(90!==a&&270!==a){if(b===qo)return Oj;if(b===Fe)return po}else{if(b===po)return Oj;if(b===Fe)return qo}if(!isNaN(c.height))if(90!==a&&270!==a){if(b===po)return Oj;if(b===Fe)return qo}else{if(b===qo)return Oj;if(b===Fe)return po}return b}
    w.defineProperty(G,{qq:"segmentOrientation"},function(){return this.bn},function(a){var b=this.bn;b!==a&&(this.bn=a,this.H(),this.h("segmentOrientation",b,a),a===kj&&(this.angle=0))});w.defineProperty(G,{Oe:"segmentIndex"},function(){return this.Us},function(a){a=Math.round(a);var b=this.Us;b!==a&&(this.Us=a,this.H(),this.h("segmentIndex",b,a))});
    w.defineProperty(G,{hB:"segmentFraction"},function(){return this.$m},function(a){isNaN(a)?a=0:0>a?a=0:1a||1=a&&w.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.ub=a,this.Mi(),this.H(),this.h("scale",b,a))});w.defineProperty(G,{angle:"angle"},function(){return this.ng},function(a){var b=this.ng;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.ng=a,Vo(this),this.H(),this.Mi(),this.h("angle",b,a)))});
    w.defineProperty(G,{Ca:"desiredSize"},function(){return this.Te},function(a){var b=a.width,c=a.height,d=this.Te,e=d.width,f=d.height;(e===b||isNaN(e)&&isNaN(b))&&(f===c||isNaN(f)&&isNaN(c))||(this.Te=a=a.S(),this.H(),this instanceof X&&this.Me(),this.h("desiredSize",d,a),zo(this)&&(a=this.U,null!==a&&(Ao(this,a,"width"),Ao(this,a,"height"))))});
    w.defineProperty(G,{width:"width"},function(){return this.Te.width},function(a){var b=this.Te.width;b===a||isNaN(b)&&isNaN(a)||(b=this.Te,this.Te=a=(new ia(a,this.Te.height)).freeze(),this.H(),this instanceof X&&this.Me(),this.h("desiredSize",b,a),zo(this)&&(a=this.U,null!==a&&Ao(this,a,"width")))});
    w.defineProperty(G,{height:"height"},function(){return this.Te.height},function(a){var b=this.Te.height;b===a||isNaN(b)&&isNaN(a)||(b=this.Te,this.Te=a=(new ia(this.Te.width,a)).freeze(),this.H(),this instanceof X&&this.Me(),this.h("desiredSize",b,a),zo(this)&&(a=this.U,null!==a&&Ao(this,a,"height")))});
    w.defineProperty(G,{si:"minSize"},function(){return this.Yh},function(a){var b=this.Yh;b.L(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Yh=a,this.H(),this.h("minSize",b,a))});w.defineProperty(G,{Gf:"maxSize"},function(){return this.Xh},function(a){var b=this.Xh;b.L(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Xh=a,this.H(),this.h("maxSize",b,a))});w.u(G,{za:"measuredBounds"},function(){return this.sd});
    w.u(G,{Ja:"naturalBounds"},function(){return this.Uc},{configurable:!0});w.defineProperty(G,{margin:"margin"},function(){return this.Pm},function(a){"number"===typeof a&&(a=new hb(a));var b=this.Pm;b.L(a)||(this.Pm=a=a.S(),this.H(),this.h("margin",b,a))});w.u(G,{transform:null},function(){0!==(this.O&2048)===!0&&Mo(this);return this.hd});w.u(G,{rh:null},function(){0!==(this.O&4096)===!0&&Mo(this);return this.sm});
    w.defineProperty(G,{alignment:"alignment"},function(){return this.ie},function(a){var b=this.ie;b.L(a)||(a.Sd()&&!a.Xc()&&w.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.ie=a=a.S(),Ro(this),this.h("alignment",b,a))});w.defineProperty(G,{column:"column"},function(){return this.Uq},function(a){a=Math.round(a);var b=this.Uq;b!==a&&(0>a&&w.Fa(a,">= 0",G,"column"),this.Uq=a,this.H(),this.h("column",b,a))});
    w.defineProperty(G,{xH:"columnSpan"},function(){return this.Bi},function(a){a=Math.round(a);var b=this.Bi;b!==a&&(1>a&&w.Fa(a,">= 1",G,"columnSpan"),this.Bi=a,this.H(),this.h("columnSpan",b,a))});w.defineProperty(G,{Vb:"row"},function(){return this.Qs},function(a){a=Math.round(a);var b=this.Qs;b!==a&&(0>a&&w.Fa(a,">= 0",G,"row"),this.Qs=a,this.H(),this.h("row",b,a))});
    w.defineProperty(G,{rowSpan:"rowSpan"},function(){return this.bj},function(a){a=Math.round(a);var b=this.bj;b!==a&&(1>a&&w.Fa(a,">= 1",G,"rowSpan"),this.bj=a,this.H(),this.h("rowSpan",b,a))});w.defineProperty(G,{oy:"spanAllocation"},function(){return this.ft},function(a){var b=this.ft;b!==a&&(null!==a&&w.j(a,"function",G,"spanAllocation"),this.ft=a,this.H(),this.h("spanAllocation",b,a))});
    w.defineProperty(G,{qh:"alignmentFocus"},function(){return this.rm},function(a){var b=this.rm;b.L(a)||(!a.Sd()||a.Xc()||a.L(yb)&&this instanceof T||w.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.rm=a=a.S(),this.H(),this.h("alignmentFocus",b,a))});
    w.defineProperty(G,{Ud:"portId"},function(){return this.Ds},function(a){var b=this.Ds;if(b!==a){var c=this.U;null===c||c instanceof T||(w.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Xo(c,this);this.Ds=a;if(null!==a&&c){c.Fk=!0;null===c.ne&&Yo(c);var d=this.Ud;null!==d&&c.ne.add(d,this)}this.h("portId",b,a)}});function Zo(a){var b=a.U;if(b instanceof T&&(null!==a.Ud||a===b.port)){var c=b.g;null===c||c.ia.ab||Io(b,a)}}
    function Vo(a){var b=a.g;null===b||b.ia.ab||(a instanceof C?a instanceof T?a.$f():$o(a,a,function(a){Zo(a)}):Zo(a))}w.defineProperty(G,{Bb:"toSpot"},function(){return null!==this.V?this.V.pk:yb},function(a){this.Pd();var b=this.V.pk;b.L(a)||(a=a.S(),this.V.pk=a,this.h("toSpot",b,a),Zo(this))});
    w.defineProperty(G,{nm:"toEndSegmentLength"},function(){return null!==this.V?this.V.nk:10},function(a){this.Pd();var b=this.V.nk;b!==a&&(0>a&&w.Fa(a,">= 0",G,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),Zo(this))});w.defineProperty(G,{Pu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:xo},function(a){this.Pd();var b=this.V.mk;b!==a&&(w.It("GraphObject.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),Zo(this))});
    w.defineProperty(G,{Qu:"toShortLength"},function(){return null!==this.V?this.V.ok:0},function(a){this.Pd();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),Zo(this))});w.defineProperty(G,{wG:"toLinkable"},function(){return null!==this.V?this.V.nt:null},function(a){this.Pd();var b=this.V.nt;b!==a&&(this.V.nt=a,this.h("toLinkable",b,a))});
    w.defineProperty(G,{SJ:"toMaxLinks"},function(){return null!==this.V?this.V.ot:Infinity},function(a){this.Pd();var b=this.V.ot;b!==a&&(0>a&&w.Fa(a,">= 0",G,"toMaxLinks"),this.V.ot=a,this.h("toMaxLinks",b,a))});w.defineProperty(G,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Tj:yb},function(a){this.Pd();var b=this.V.Tj;b.L(a)||(a=a.S(),this.V.Tj=a,this.h("fromSpot",b,a),Zo(this))});
    w.defineProperty(G,{Vl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Rj:10},function(a){this.Pd();var b=this.V.Rj;b!==a&&(0>a&&w.Fa(a,">= 0",G,"fromEndSegmentLength"),this.V.Rj=a,this.h("fromEndSegmentLength",b,a),Zo(this))});w.defineProperty(G,{Wt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Qj:xo},function(a){this.Pd();var b=this.V.Qj;b!==a&&(w.It("GraphObject.fromEndSegmentDirection","2.0"),this.V.Qj=a,this.h("fromEndSegmentDirection",b,a),Zo(this))});
    w.defineProperty(G,{Xt:"fromShortLength"},function(){return null!==this.V?this.V.Sj:0},function(a){this.Pd();var b=this.V.Sj;b!==a&&(this.V.Sj=a,this.h("fromShortLength",b,a),Zo(this))});w.defineProperty(G,{XE:"fromLinkable"},function(){return null!==this.V?this.V.wr:null},function(a){this.Pd();var b=this.V.wr;b!==a&&(this.V.wr=a,this.h("fromLinkable",b,a))});
    w.defineProperty(G,{qA:"fromMaxLinks"},function(){return null!==this.V?this.V.xr:Infinity},function(a){this.Pd();var b=this.V.xr;b!==a&&(0>a&&w.Fa(a,">= 0",G,"fromMaxLinks"),this.V.xr=a,this.h("fromMaxLinks",b,a))});w.defineProperty(G,{cursor:"cursor"},function(){return this.cr},function(a){var b=this.cr;b!==a&&(w.j(a,"string",G,"cursor"),this.cr=a,this.h("cursor",b,a))});
    w.defineProperty(G,{click:"click"},function(){return null!==this.ja?this.ja.Ai:null},function(a){uo(this);var b=this.ja.Ai;b!==a&&(null!==a&&w.j(a,"function",G,"click"),this.ja.Ai=a,this.h("click",b,a))});w.defineProperty(G,{Jt:"doubleClick"},function(){return null!==this.ja?this.ja.Ii:null},function(a){uo(this);var b=this.ja.Ii;b!==a&&(null!==a&&w.j(a,"function",G,"doubleClick"),this.ja.Ii=a,this.h("doubleClick",b,a))});
    w.defineProperty(G,{bA:"contextClick"},function(){return null!==this.ja?this.ja.Ci:null},function(a){uo(this);var b=this.ja.Ci;b!==a&&(null!==a&&w.j(a,"function",G,"contextClick"),this.ja.Ci=a,this.h("contextClick",b,a))});w.defineProperty(G,{su:"mouseEnter"},function(){return null!==this.ja?this.ja.ns:null},function(a){uo(this);var b=this.ja.ns;b!==a&&(null!==a&&w.j(a,"function",G,"mouseEnter"),this.ja.ns=a,this.h("mouseEnter",b,a))});
    w.defineProperty(G,{tu:"mouseLeave"},function(){return null!==this.ja?this.ja.os:null},function(a){uo(this);var b=this.ja.os;b!==a&&(null!==a&&w.j(a,"function",G,"mouseLeave"),this.ja.os=a,this.h("mouseLeave",b,a))});w.defineProperty(G,{SA:"mouseOver"},function(){return null!==this.ja?this.ja.Xi:null},function(a){uo(this);var b=this.ja.Xi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseOver"),this.ja.Xi=a,this.h("mouseOver",b,a))});
    w.defineProperty(G,{RA:"mouseHover"},function(){return null!==this.ja?this.ja.Wi:null},function(a){uo(this);var b=this.ja.Wi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHover"),this.ja.Wi=a,this.h("mouseHover",b,a))});w.defineProperty(G,{QA:"mouseHold"},function(){return null!==this.ja?this.ja.Vi:null},function(a){uo(this);var b=this.ja.Vi;b!==a&&(null!==a&&w.j(a,"function",G,"mouseHold"),this.ja.Vi=a,this.h("mouseHold",b,a))});
    w.defineProperty(G,{aJ:"mouseDragEnter"},function(){return null!==this.ja?this.ja.ls:null},function(a){uo(this);var b=this.ja.ls;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragEnter"),this.ja.ls=a,this.h("mouseDragEnter",b,a))});w.defineProperty(G,{bJ:"mouseDragLeave"},function(){return null!==this.ja?this.ja.ms:null},function(a){uo(this);var b=this.ja.ms;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDragLeave"),this.ja.ms=a,this.h("mouseDragLeave",b,a))});
    w.defineProperty(G,{PA:"mouseDrop"},function(){return null!==this.ja?this.ja.Ui:null},function(a){uo(this);var b=this.ja.Ui;b!==a&&(null!==a&&w.j(a,"function",G,"mouseDrop"),this.ja.Ui=a,this.h("mouseDrop",b,a))});w.defineProperty(G,{jE:"actionDown"},function(){return null!==this.ja?this.ja.Cq:null},function(a){uo(this);var b=this.ja.Cq;b!==a&&(null!==a&&w.j(a,"function",G,"actionDown"),this.ja.Cq=a,this.h("actionDown",b,a))});
    w.defineProperty(G,{kE:"actionMove"},function(){return null!==this.ja?this.ja.Dq:null},function(a){uo(this);var b=this.ja.Dq;b!==a&&(null!==a&&w.j(a,"function",G,"actionMove"),this.ja.Dq=a,this.h("actionMove",b,a))});w.defineProperty(G,{lE:"actionUp"},function(){return null!==this.ja?this.ja.Eq:null},function(a){uo(this);var b=this.ja.Eq;b!==a&&(null!==a&&w.j(a,"function",G,"actionUp"),this.ja.Eq=a,this.h("actionUp",b,a))});
    w.defineProperty(G,{iE:"actionCancel"},function(){return null!==this.ja?this.ja.Bq:null},function(a){uo(this);var b=this.ja.Bq;b!==a&&(null!==a&&w.j(a,"function",G,"actionCancel"),this.ja.Bq=a,this.h("actionCancel",b,a))});w.defineProperty(G,{yB:"toolTip"},function(){return null!==this.ja?this.ja.ej:null},function(a){uo(this);var b=this.ja.ej;b!==a&&(this.ja.ej=a,this.h("toolTip",b,a))});
    w.defineProperty(G,{contextMenu:"contextMenu"},function(){return null!==this.ja?this.ja.Di:null},function(a){uo(this);var b=this.ja.Di;b!==a&&(this.ja.Di=a,this.h("contextMenu",b,a))});G.prototype.bind=G.prototype.bind=function(a){a.Ig=this;var b=this.Ul();null!==b&&ap(b)&&w.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.vc&&(this.vc=new H(bh));this.vc.add(a)};
    G.prototype.findTemplateBinder=G.prototype.Ul=function(){for(var a=this instanceof C?this:this.Q;null!==a;){if(null!==a.$k)return a;a=a.Q}return null};G.prototype.setProperties=function(a){w.Ju(this,a)};var bp;
    G.make=bp=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=cp.ka(a);"function"===typeof f?(c=w.Nl(arguments),d=f(c),w.Pa(d)||w.k('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):e=ca[a]}null===d&&(void 0!==e&&null!==e&&e.constructor||w.k("GraphObject.make requires a class function or GoJS class name or name of an object builder, not: "+a),d=new e);f=1;if(d instanceof D&&1e)&&w.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.xe=!0,
        a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&w.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.xe=!1,a.index=e);e=new ra;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);w.Ju(a,e)}else w.Ju(a,b);else w.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)}var cp=new ma("string","function");
    G.getBuilders=function(){var a=new ma("string","function"),b;for(b in cp)if(b!==b.toLowerCase()){var c=cp.ka(b);"function"===typeof c&&a.add(b,c)}a.freeze();return a};var ep;G.defineBuilder=ep=function(a,b){w.j(a,"string",G,"defineBuilder:name");w.j(b,"function",G,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||w.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);cp.add(a,b)};var fp;
    G.takeBuilderArgument=fp=function(a,b,c){void 0===c&&(c=null);var d=a[1];if("function"===typeof c?c(d):"string"===typeof d)return a.splice(1,1),d;if(void 0===b)throw Error("no "+("function"===typeof c?"satisfactory":"string")+" argument for GraphObject builder "+a[0]);return b};
    ep("Button",function(){var a=new ha(pg);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ha(pg);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=bp(C,Fl,{wx:!0,NE:function(a,b){var e=a.xd("ButtonBorder");null!==e&&(e.fill=b?a._buttonFillNormal:a._buttonFillDisabled)},_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue",_buttonFillDisabled:"darkgray"},bp(X,{name:"ButtonBorder",Cb:"Rectangle",A:new L(0,0,2.761423749153968,2.761423749153968),
        B:new L(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.su=function(a,b){if(b.fu()){var e=b.xd("ButtonBorder");if(e instanceof X){var f=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=f;f=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=f}}};a.tu=function(a,b){if(b.fu()){var e=b.xd("ButtonBorder");e instanceof X&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)}};return a});
    ep("TreeExpanderButton",function(){var a=bp("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},bp(X,{name:"ButtonIcon",Cb:"MinusLine",Ca:Bd},(new bh("figure","isTreeExpanded",function(a,c){var d=c.Q;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Px()),{visible:!1},(new bh("visible","isTreeLeaf",function(a){return!a})).Px());a.click=function(a,c){var d=c.U;d instanceof kh&&(d=d.xf);if(d instanceof T){var e=d.g;if(null!==e){e=e.ob;if(d.tc){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return;
        a.Cc=!0;d.tc?e.collapseTree(d):e.expandTree(d)}}};return a});
    ep("SubGraphExpanderButton",function(){var a=bp("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},bp(X,{name:"ButtonIcon",Cb:"MinusLine",Ca:Bd},(new bh("figure","isSubGraphExpanded",function(a,c){var d=c.Q;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Px()));a.click=function(a,c){var d=c.U;d instanceof kh&&(d=d.xf);if(d instanceof V){var e=d.g;if(null!==e){e=e.ob;if(d.Zc){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.Cc=
        !0;d.Zc?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});ep("ContextMenuButton",function(){var a=bp("Button");a.stretch=qo;var b=a.xd("ButtonBorder");b instanceof X&&(b.Cb="Rectangle",b.A=new L(0,0,2,3),b.B=new L(1,1,-2,-2));return a});
    ep("PanelExpanderButton",function(a){var b=fp(a,"COLLAPSIBLE"),c=bp("Button",{_buttonExpandedFigure:"TriangleUp",_buttonCollapsedFigure:"TriangleDown"},bp(X,"TriangleUp",{name:"ButtonIcon",Ca:new ia(6,4)},(new bh("figure","visible",function(a){return a?c._buttonExpandedFigure:c._buttonCollapsedFigure})).Px(b)));a=c.xd("ButtonBorder");a instanceof X&&(a.stroke=null,a.fill="transparent");c.click=function(a,c){var f=c.g;if(null!==f&&!f.hb){var h=c.Ul();null===h&&(h=c.U);null!==h&&(h=h.xd(b),null!==h&&
    (f.Hb("Collapse/Expand Panel"),h.visible=!h.visible,f.Wc("Collapse/Expand Panel")))}};return c});
    ep("CheckBoxButton",function(a){var b=fp(a);a=bp("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},bp(X,{name:"ButtonIcon",ZH:"M0 4 L3 9 9 0",lb:2,stretch:Fe,rA:Qj,visible:!1},""!==b?(new bh("visible",b)).QI():[]));a.click=function(a,d){var e=a.g;if(!(null===e||e.hb||""!==b&&e.aa.hb)){a.Cc=!0;var f=d.xd("ButtonIcon");e.Hb("checkbox");f.visible=!f.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.Wc("checkbox")}};return a});
    ep("CheckBox",function(a){a=fp(a);a=bp("CheckBoxButton",a,{name:"Button",margin:new hb(0,1,0,0)});var b=bp(C,"Horizontal",a,{wx:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillDisabled:a._buttonFillDisabled,su:a.su,tu:a.tu,click:a.click,_buttonClick:a.click});a.su=null;a.tu=null;a.click=null;return b});
    function vo(){this.tr=this.Di=this.ej=this.Bq=this.Eq=this.Dq=this.Cq=this.Ui=this.ms=this.ls=this.Vi=this.Wi=this.Xi=this.os=this.ns=this.Ci=this.Ii=this.Ai=null}vo.prototype.copy=function(){var a=new vo;a.Ai=this.Ai;a.Ii=this.Ii;a.Ci=this.Ci;a.ns=this.ns;a.os=this.os;a.Xi=this.Xi;a.Wi=this.Wi;a.Vi=this.Vi;a.ls=this.ls;a.ms=this.ms;a.Ui=this.Ui;a.Cq=this.Cq;a.Dq=this.Dq;a.Eq=this.Eq;a.Bq=this.Bq;a.ej=this.ej;a.Di=this.Di;a.tr=this.tr;return a};
    function C(a){G.call(this);void 0===a?this.na=Tj:(w.mb(a,C,C,"type"),this.na=a);this.xa=new H(G);this.hf=fd;this.na===Il&&(this.In=!0);this.gr=qc;this.Gi=oo;this.na===So&&gp(this);this.Bp=Qj;this.Fr=Dd;this.Gr=dd;this.Cr=0;this.Br=100;this.Er=10;this.Dr=0;this.$k=this.Zd=this.Uj=this.Cm=this.Em=null;this.Tr=NaN;this.zg=this.$j=null;this.To="category";this.yg=null;this.gj=new B(NaN,NaN,NaN,NaN);this.lk=this.Rs=this.Al=null;this.Ij=""}w.Ka(C,G);w.ni(C);w.ga("Panel",C);
    function gp(a){a.Mj=fd;a.Ph=1;a.Fi=null;a.Am=null;a.Oh=1;a.Nh=null;a.zm=null;a.ae=[];a.Xd=[];a.Zm=hp;a.ym=hp;a.fj=0;a.Qi=0}
    C.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.na=this.na;a.hf=this.hf.S();a.gr=this.gr.S();a.Gi=this.Gi;if(a.na===So){a.Mj=this.Mj.S();a.Ph=this.Ph;a.Fi=this.Fi;a.Am=this.Am;a.Oh=this.Oh;a.Nh=this.Nh;a.zm=this.zm;var b=[];if(0a&&w.Fa(a,">= 0",C,"padding"),a=new hb(a)):(w.G(a,hb,C,"padding"),0>a.left&&w.Fa(a.left,">= 0",C,"padding:value.left"),0>a.right&&w.Fa(a.right,">= 0",C,"padding:value.right"),0>a.top&&w.Fa(a.top,">= 0",C,"padding:value.top"),0>a.bottom&&w.Fa(a.bottom,">= 0",C,"padding:value.bottom"));var b=this.hf;b.L(a)||(this.hf=a=a.S(),this.H(),this.h("padding",b,a))});
    w.defineProperty(C,{Rl:"defaultAlignment"},function(){return this.gr},function(a){var b=this.gr;b.L(a)||(this.gr=a=a.S(),this.H(),this.h("defaultAlignment",b,a))});w.defineProperty(C,{be:"defaultStretch"},function(){return this.Gi},function(a){var b=this.Gi;b!==a&&(w.mb(a,G,C,"defaultStretch"),this.Gi=a,this.H(),this.h("defaultStretch",b,a))});
    w.defineProperty(C,{SK:"defaultSeparatorPadding"},function(){return void 0===this.Mj?fd:this.Mj},function(a){if(void 0!==this.Mj){"number"===typeof a&&(a=new hb(a));var b=this.Mj;b.L(a)||(this.Mj=a=a.S(),this.H(),this.h("defaultSeparatorPadding",b,a))}});
    w.defineProperty(C,{QK:"defaultRowSeparatorStroke"},function(){return void 0===this.Fi?null:this.Fi},function(a){var b=this.Fi;b!==a&&(null===a||"string"===typeof a||a instanceof ha)&&(a instanceof ha&&a.freeze(),this.Fi=a,this.oa(),this.h("defaultRowSeparatorStroke",b,a))});
    w.defineProperty(C,{RK:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.Ph?1:this.Ph},function(a){if(void 0!==this.Ph){var b=this.Ph;b!==a&&isFinite(a)&&0<=a&&(this.Ph=a,this.H(),this.h("defaultRowSeparatorStrokeWidth",b,a))}});
    w.defineProperty(C,{PK:"defaultRowSeparatorDashArray"},function(){return void 0===this.Am?null:this.Am},function(a){if(void 0!==this.Am){var b=this.Am;if(b!==a){null===a||Array.isArray(a)||w.Bd(a,"Array",C,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.ux,e=d.width,d=d.height,f=this.Ja,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.gF;a.save();a.beginPath();a.rect(0,0,h,f);a.clip();for(var n=[],p=this.xa.n,q=p.length,r=0;r
        e*u*c))){s=v.opacity;t=1;if(1!==s){if(0===s)continue;t=a.globalAlpha;a.globalAlpha=t*s}var x=n[r],A=!1,y=!0,K=v.tG;null!==K&&(A=!0,y=a.lA(K,v.wf));if("LineV"===v.Cb&&null!==v.stroke){a.lineWidth=v.lb;No(this,a,v.stroke,!1,!1);a.beginPath();for(var E=Math.floor(-m.x/e),P=E;P<=E+k;P++){var $=P*e+m.x;0<=$&&$<=h&&jp(P,u,x)&&(A&&!y?yo(a,$,0,$,f,K,v.wf):(a.moveTo($,0),a.lineTo($,f)))}a.stroke()}else if("LineH"===v.Cb&&null!==v.stroke){a.lineWidth=v.lb;No(this,a,v.stroke,!1,!1);a.beginPath();for(P=E=Math.floor(-m.y/
        d);P<=E+l;P++)$=P*d+m.y,0<=$&&$<=f&&jp(P,u,x)&&(A&&!y?yo(a,0,$,h,$,K,v.wf):(a.moveTo(0,$),a.lineTo(h,$)));a.stroke()}else if("BarV"===v.Cb&&null!==v.fill)for(No(this,a,v.fill,!0,!1),v=v.width,isNaN(v)&&(v=e),P=E=Math.floor(-m.x/e);P<=E+k;P++)$=P*e+m.x,0<=$&&$<=h&&jp(P,u,x)&&a.fillRect($,0,v,f);else if("BarH"===v.Cb&&null!==v.fill)for(No(this,a,v.fill,!0,!1),v=v.height,isNaN(v)&&(v=d),P=E=Math.floor(-m.y/d);P<=E+l;P++)$=P*d+m.y,0<=$&&$<=f&&jp(P,u,x)&&a.fillRect(0,$,h,v);A&&a.iA();1!==s&&(a.globalAlpha=
        t)}}a.restore();a.Fe(!1)}else if(this.na===ip){e=this.Ja;c=e.width;e=e.height;a.save();a.beginPath();a.rect(-1,-1,c+1,e+1);a.clip();c=this.Ld();c.ue(a,b);e=this.pj()*b.scale;0>=e&&(e=1);d=c.W;h=this.xa.n;f=this.Em;k=h.length;for(l=0;lthis.vA*q.interval*c.kf.St/this.Zt*e))for(r=q.za,u=q.lb*q.scale,s=q.qh,s.Sd()&&(s=Bb),p=0;pf.height)continue}else if(l.position>f.width)continue;var m=l.sq;isNaN(m)&&(m=c?a.Ph:a.Oh);var n=l.rq;null===n&&(n=c?a.Fi:a.Nh);0!==m&&null!==n&&(No(a,b,n,!1,!1),b.beginPath(),n=l.position+m,c?n>f.height&&(m-=n-f.height):n>f.width&&(m-=n-f.width),l=l.position+m/2,b.lineWidth=m,n=a.padding,c?(l+=n.top,m=n.left,n=f.width-n.right,b.moveTo(m,l),b.lineTo(n,l)):(l+=
        n.left,m=n.top,n=f.height-n.bottom,b.moveTo(l,m),b.lineTo(l,n)),b.stroke())}}}
    function lp(a,b,c,d,e){for(var f=d.length,h=a.W,k=0;km)){var n=l.$e(),p=l.sq;isNaN(p)&&(p=c?a.Ph:a.Oh);var q=l.rq;null===q&&(q=c?a.Fi:a.Nh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ya;p+n>m&&(n=m-p);0>=n||(m=a.padding,No(a,b,l.background,!0,!1),c?b.fillRect(m.left,p+m.top,h.width-(m.left+m.right),n):b.fillRect(p+m.left,m.top,n,h.height-(m.top+m.bottom)))}}}}
    function jp(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dm&&e.set(s),w.v(s));w.v(n);f&&e.transform(h)}return c};
    g.H=function(a){G.prototype.H.call(this,a);if(this.na===Fl||this.na===hj)a=this.Ld(),null!==a&&a.H(!0);a=this.xa.n;for(var b=a.length,c=0;cJd&&(lc=Math.max(Jd-mc,0));var ig=0===Y.Ya;Y.Ya+=lc;Jd=Math.max(Jd-(lc+(ig?mc:0)),0)}1!==aa.Bi||Ob!==Oj&&Ob!==po||(Y=this.Md(Fb),mc=Y.$e(),lc=Math.max(bf-Y.Ya,0),lc+mc>$c&&(lc=Math.max($c-mc,0)),ig=0===Y.Ya,Y.Ya+=lc,$c=Math.max($c-(lc+(ig?mc:0)),0));ki&&aa.Zp()}}}w.ta(Ye);for(var Dc=0,zb=0,Eb=this.Ip,fa=0;fa=this.pq);cb++)Y=this.Nd(aa.Vb+cb),lc=Ob===Fe||Ob===
    po?Math.max(Y.Bh,0===wd[aa.Vb+cb]?Y.he:Math.min(wd[aa.Vb+cb],Y.he)):Math.max(Y.Bh,isNaN(Y.jf)?Y.he:Math.min(Y.jf,Y.he)),Kd.height+=lc;for(cb=1;cb=this.Ip);cb++)Y=this.Md(aa.column+cb),lc=Ob===Fe||Ob===qo?Math.max(Y.Bh,0===ef[aa.column+cb]?Y.he:Math.min(ef[aa.column+cb],Y.he)):Math.max(Y.Bh,isNaN(Y.jf)?Y.he:Math.min(Y.jf,Y.he)),Kd.width+=lc;ob.width+=Kd.width;ob.height+=Kd.height;xc=aa.margin;Hf=xc.right+xc.left;hg=xc.top+xc.bottom;xk(aa,ob.width,ob.height,qj,rj);for(var If=
        aa.za,bf=Math.max(If.width+Hf,0),cf=Math.max(If.height+hg,0),ff=0,cb=0;cb=this.pq);cb++)Y=this.Nd(aa.Vb+cb),ff+=Y.total||0;if(ff=ld)&&!(aa.Vb+cb>=this.pq);cb++){var Y=this.Nd(aa.Vb+cb),Fc=Y.Ra||0,mi=gf(aa,Y,Kg);Y.Ya=Math.min(Y.he,Fc+mi);Y.Ra!==Fc&&(ld-=Y.Ra-Fc)}for(;0Fc&&(Y.Ya=Math.min(Y.he,Fc+ld),Y.Ra!==Fc&&(ld-=Y.Ra-Fc));if(0===Y.index)break;Y=this.Nd(Y.index-
        1)}}for(var Ke=0,cb=0;cb=this.Ip);cb++)Y=this.Md(aa.column+cb),Ke+=Y.total||0;if(Ke=ld)&&!(aa.column+cb>=this.Ip);cb++)Y=this.Md(aa.column+cb),Fc=Y.Ra||0,mi=gf(aa,Y,Kg),Y.Ya=Math.min(Y.he,Fc+mi),Y.Ra!==Fc&&(ld-=Y.Ra-Fc);for(;0Fc&&(Y.Ya=Math.min(Y.he,Fc+ld),Y.Ra!==Fc&&(ld-=Y.Ra-Fc));if(0===Y.index)break;Y=this.Md(Y.index-1)}}}w.ta(Je);w.Ck(Kd);w.Ck(ob);void 0!==wd&&w.ta(wd);
        void 0!==ef&&w.ta(ef);for(var Lg=0,Mg=0,Ob=Eo(this,!0),tj=this.Ca,Hk=this.Gf,ve=zb=Dc=0,ad=0,Eb=this.Ip,fa=0;fapi)xk(Ub,Infinity,Infinity),we=Ub.za,jf.Jh(we),this.bh.add(we);else{var xd=Ub.Oe,vt=Ub.hB,op=Ub.qh;op.Sd()&&(op=Jb);var jg=Ub.qq,cw=Ub.iB,Nk=0,Ok=0,mm=0;if(xd<-pi||xd>=pi){var wt=Lk.IF,Kf=Lk.HF;jg!==kj&&(mm=Lk.computeAngle(Ub,jg,Kf),Ub.ng=mm);Nk=wt.x-Ng.x;Ok=wt.y-Ng.y}else{var Ld,
            kf;if(0<=xd)Ld=Dh.ea(xd),kf=xdyt+10?0<=xd?ri.Pb(Ld):Ld.Pb(ri):yt>xt+10?0<=xd?kf.Pb(si):si.Pb(kf):0<=xd?ri.Pb(si):si.Pb(ri)}else Kf=0<=xd?Ld.Pb(kf):kf.Pb(Ld);jg!==kj&&(mm=Lk.computeAngle(Ub,jg,Kf),Ub.ng=mm);Nk=Ld.x+(kf.x-Ld.x)*vt-Ng.x;Ok=Ld.y+(kf.y-Ld.y)*vt-Ng.y}xk(Ub,
            Infinity,Infinity);var we=Ub.za,km=Ub.Ja,Pk=0;Ub instanceof X&&(Pk=Ub.lb);var ti=km.width+Pk,vj=km.height+Pk;Og.reset();Og.translate(-we.x,-we.y);Og.scale(Ub.scale,Ub.scale);Og.rotate(jg===kj?Ub.angle:Kf,ti/2,vj/2);jg!==Rp&&jg!==Sp||Og.rotate(90,ti/2,vj/2);jg!==Tp&&jg!==Up||Og.rotate(-90,ti/2,vj/2);jg===Vp&&(45Kf||225Kf)&&Og.rotate(-Kf,ti/2,vj/2);var wj=new B(0,0,ti,vj);Mk.Zn(wj,op);Og.nb(Mk);var dw=-Mk.x+Pk/2*Ub.scale,ew=-Mk.y+Pk/2*Ub.scale;Pg.assign(cw);isNaN(Pg.x)&&(Pg.x=0<=xd?
            ti/2+3:-(ti/2+3));isNaN(Pg.y)&&(Pg.y=-(vj/2+3));Pg.rotate(Kf);Nk+=Pg.x;Ok+=Pg.y;wj.set(we);wj.x=Nk+dw;wj.y=Ok+ew;this.bh.add(wj);jf.Jh(wj)}}if(this instanceof W)for(var zt=this.Ef;zt.next();)xk(zt.value,Infinity,Infinity);this.gj=jf;var pp=this.Ti;pp.m(pp.x+jf.x,pp.y+jf.y);Ua(e,jf.width||0,jf.height||0);w.we(Og);w.v(Mk);w.v(Pg)}}}break;case "Grid":break;case "Graduated":var fw=a,gw=b,hw=c,iw=d,Qg=this.Ld();this.Cm=[];var xj=Qg.margin,jw=xj.right+xj.left,kw=xj.top+xj.bottom;xk(Qg,fw,gw,hw,iw);var At=
        Qg.za,lw=At.height,mw=Math.max(At.width+jw,0),nw=Math.max(lw+kw,0),Bt=new B(-xj.left,-xj.top,mw,nw);this.Cm.push(Bt);e.assign(Bt);for(var Uk=Qg.kf,Ct=Qg.lb,qp=Uk.qx,yj=Uk.Rt,ui=Uk.St,ow=qp.length,rp=0,sp=0,zj=w.cb(),tp=0;tpyd&&(yd+=360);Dt.push(yd)}rp=Et;sp=Ft}zj.push(Dt)}var Gt;if(null===this.Uj){for(var Ht=[],vp=this.xa.n,It=vp.length,wp=0;wp<
    It;wp++){var Vk=vp[wp],Jt=[];Ht.push(Jt);if(Vk.visible)for(var qw=Vk.interval,xp=0;xpqw&&Jt.push(Kt)}}}this.Uj=Ht}Gt=this.Uj;var Lt=this.xa.n,rw=Lt.length,Eh=0,Mt=0,Nt=ui;this.Em=[];for(var om=[],pm=0;pmPt*Ot*ui/this.Zt)){var ce=this.fF,Qt=Gt[pm],vi=yj[0][0],Lf=
        0,zd=0,Mt=ui*Fh.eF-1E-4,Nt=ui*Fh.cF+1E-4,Bj=Pt*Ot;if(cethis.Ek+Bj&&(wi=Math.floor((ce-this.Ek)/Bj),ce-=wi*Bj);for(;ce<=this.uA;){var yp;a:{for(var sw=Qt.length,zp=0;zpui&&(Eh=ui),Mt<=Eh&&Eh<=Nt)){for(var yd=zj[Lf][zd],Cj=yj[Lf][zd];Lfvi&&zdqm?0vm;vm++){switch(vm){case 0:de.m(sm,tm);break;case 1:de.m(sm+Ep,tm);break;case 2:de.m(sm,tm+Fp);break;case 3:de.m(sm+Ep,tm+Fp)}de.rotate(Yt+Gh.angle);de.offset(Wt,Xt);0===um&&0===vm?yi.m(de.x,de.y,0,0):yi.vi(de);de.offset(-Wt,-Xt);de.rotate(-Yt-Gh.angle)}w.v(de);this.Cm.push(yi);ab(vw,yi.x,yi.y,yi.width,yi.height)}else if(xi instanceof Lh){var wm=xi,Zt=Cp,yw=
        e;null===this.lk&&(this.lk=new Lh);var Mf=this.lk;kp(wm,Mf);var Hp=wm.qh;Hp.Sd()&&(Hp=Bb);for(var Hh=wm.qq,zw=wm.iB,zi=null,xm=0,ym=0,Rg=0,Ip=0,Aw=Zt.length,zm=0;zmRg||225Rg)&&Sg.rotate(-Rg,Fj/2,Gj/2);var $t=w.mg(0,0,Fj,Gj),Xk=w.K();Xk.Zn($t,Hp);Sg.nb(Xk);var Bw=-Xk.x,Cw=-Xk.y,Tg=w.K();Tg.assign(zw);isNaN(Tg.x)&&(Tg.x=Fj/2+3);isNaN(Tg.y)&&(Tg.y=-(Gj/2+3));Tg.rotate(Rg);var xm=xm+(Tg.x+Bw),ym=ym+(Tg.y+Cw),Jp=new B(xm,ym,Ih.width,Ih.height),Dw=new B(Ih.x,Ih.y,Ih.width,Ih.height),Ew=new B(Ej.x,Ej.y,Ej.width,Ej.height),au=new Wp;au.Jp(Mf.vf);lg.push(Ip);lg.push(Mf.le);lg.push(au);lg.push(Jp);
        lg.push(Dw);lg.push(Ew);0===zm?zi=Jp.copy():zi.Jh(Jp);w.v(Tg);w.v(Xk);w.Db($t);w.we(Sg)}this.Cm.push(zi);ab(yw,zi.x,zi.y,zi.width,zi.height)}am(xi,!1)}}break;case "TableRow":case "TableColumn":w.k(this.toString()+" is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");break;default:w.k("Unknown panel type: "+n)}}var lf=e.width,mf=e.height,Am=this.padding,Fw=Am.top+Am.bottom,lf=lf+(Am.left+Am.right),mf=mf+Fw;isFinite(f.width)&&(lf=f.width);isFinite(f.height)&&
    (mf=f.height);lf=Math.min(k.width,lf);mf=Math.min(k.height,mf);lf=Math.max(h.width,lf);mf=Math.max(h.height,mf);lf=Math.max(c,lf);mf=Math.max(d,mf);e.width=lf;e.height=mf;Ua(this.Uc,lf,mf);Bo(this,0,0,lf,mf)};C.prototype.findMainElement=C.prototype.Ld=function(){if(null===this.Al){var a=this.xa.n,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.H(),xk(this,n>c?c:n,p>d?d:p);break;case Fe:this.H(!0);xk(this,c+r,d+s,0,0);break;case qo:this.H(!0);xk(this,c+r,p+s,0,0);break;case po:this.H(!0),xk(this,n+r,d+s,0,0)}}k=this.W;k.x=a;k.y=b;
        k.width=c;k.height=d;var u=this.na.Sb;switch(u){case "Position":for(var t=f.length,x=e.x-this.padding.left,v=e.y-this.padding.top,A=0;A=this.pq);Ie++){var fi=this.Nd(jb+Ie);se.height+=fi.total}for(Ie=1;Ie=this.Ip);Ie++){var gi=this.Md(Zc+Ie);se.width+=gi.total}var qj=Gf.Ra+se.width,rj=Xe.Ra+se.height;h.x=Id;h.y=cc;h.width=qj;h.height=rj;var Eb=Id,xh=cc,yh=qj,fa=rj;Id+qj>e.width&&(yh=Math.max(e.width-Id,0));cc+rj>e.height&&(fa=Math.max(e.height-cc,0));var aa=wb.alignment,be=0,fg=0,hi=0,Fb=0;if(aa.Xc()){aa=this.Rl;aa.Yc()||(aa=Jb);var be=aa.x,fg=aa.y,hi=aa.offsetX,Fb=aa.offsetY,ii=Gf.alignment,
            Tb=Xe.alignment;ii.Yc()&&(be=ii.x,hi=ii.offsetX);Tb.Yc()&&(fg=Tb.y,Fb=Tb.offsetY)}else be=aa.x,fg=aa.y,hi=aa.offsetX,Fb=aa.offsetY;if(isNaN(be)||isNaN(fg))fg=be=.5,Fb=hi=0;var Ye=ae.width,Je=ae.height,Ze=wb.margin,te=Ze.left+Ze.right,ue=Ze.top+Ze.bottom,$c=To(wb,Xe,Gf,!1);!isNaN(wb.Ca.width)||$c!==Fe&&$c!==qo||(Ye=Math.max(qj-te,0));!isNaN(wb.Ca.height)||$c!==Fe&&$c!==po||(Je=Math.max(rj-ue,0));var Jd=wb.Gf,zh=wb.si,Ye=Math.min(Jd.width,Ye),Je=Math.min(Jd.height,Je),Ye=Math.max(zh.width,Ye),Je=Math.max(zh.height,
            Je),Y=Je+ue;h.x+=h.width*be-(Ye+te)*be+hi+Ze.left;h.y+=h.height*fg-Y*fg+Fb+Ze.top;wb.visible&&(db(Eb,xh,yh,fa,h.x,h.y,ae.width,ae.height)?wb.jc(h.x,h.y,Ye,Je):wb.jc(h.x,h.y,Ye,Je,new B(Eb,xh,yh,fa)))}else{wb.Mi();wb.oc.Qa();var kd=wb.oc,gg=w.mg(kd.x,kd.y,kd.width,kd.height);kd.x=jd.type===Jo?vh:Id;kd.y=jd.type===Ko?Eg:cc;kd.width=ae.width;kd.height=ae.height;wb.oc.freeze();Fo(wb,!1);if(!Va(gg,kd)){var ji=wb.U;null!==ji&&(ji.Gk(),wb.vs(ji))}w.Db(gg)}}}}w.Ck(se);for(jb=0;jb<$d;jb++)wb=f[jb],jd=wb instanceof
        C?wb:null,null===jd||jd.type!==Jo&&jd.type!==Ko||(kd=wb.oc,wb.Uc.Qa(),wb.Uc.m(0,0,kd.width,kd.height),wb.Uc.freeze());break;case "Viewbox":var Ah=f[0],lc=Ah.za,Bh=Ah.margin,mb=Bh.top+Bh.bottom,nb=Math.max(lc.width+(Bh.right+Bh.left),0),dm=Math.max(lc.height+mb,0),$e=Ah.alignment;$e.Xc()&&($e=this.Rl);$e.Yc()||($e=Jb);h.x=e.width*$e.x-nb*$e.x+$e.offsetX;h.y=e.height*$e.y-dm*$e.y+$e.offsetY;h.width=lc.width;h.height=lc.height;Ah.jc(h.x,h.y,h.width,h.height);break;case "Link":var Fk=f.length;if(this instanceof
            kh||this instanceof W){var ki=null;this instanceof W&&(ki=this);this instanceof kh&&(ki=this.xf);var xc=ki,Hf=this instanceof kh?null:xc.path;if(null!==this.bh){var hg=this.bh.n,Ob=0;if(null!==Hf&&Ob=ig){var Jg=this.IF,ob=this.HF;sj!==kj&&(Ig=this.computeAngle(mc,sj,ob),mc.angle=Ig);Hg=Jg.x;Jf=Jg.y}else{var Wb=void 0,Ec=void 0;if(0<=zb)Wb=Dc.n[zb],Ec=zb
        cb+10?0<=zb?Kd.Pb(Wb):Wb.Pb(Kd):cb>ef+10?0<=zb?Ec.Pb(wd):wd.Pb(Ec):0<=zb?Kd.Pb(wd):wd.Pb(Kd)}else ob=0<=zb?Wb.Pb(Ec):Ec.Pb(Wb);sj!==kj&&(Ig=this.computeAngle(mc,sj,ob),mc.angle=Ig);Hg=Wb.x+(Ec.x-Wb.x)*li;Jf=Wb.y+(Ec.y-Wb.y)*li}if(Gg.L(yb))mc.location=new z(Hg,Jf);else{Gg.Sd()&&(Gg=Jb);var ff=w.Kf();ff.reset();ff.scale(mc.scale,mc.scale);ff.rotate(mc.angle,0,0);var ld=mc.Ja,Kg=w.mg(0,0,ld.width,ld.height),gf=w.K();gf.Zn(Kg,Gg);ff.nb(gf);var Fc=-gf.x,mi=-gf.y,Ke=mp.copy();isNaN(Ke.x)&&(Ke.x=0<=zb?gf.x+
            3:-(gf.x+3));isNaN(Ke.y)&&(Ke.y=-(gf.y+3));Ke.rotate(ob);Hg+=Ke.x;Jf+=Ke.y;ff.CG(Kg);var Fc=Fc+Kg.x,mi=mi+Kg.y,Lg=w.xb(Hg+Fc,Jf+mi);mc.move(Lg);w.v(Lg);w.v(gf);w.Db(Kg);w.we(ff)}}this.qu(!1)}break;case "Grid":break;case "Graduated":if(null!==this.Cm){var Mg=this.Ld(),tj=this.Em,Hk=this.Cm,ve=0,ad=Hk[ve];ve++;Mg.jc(ad.x-e.x,ad.y-e.y,ad.width,ad.height);for(var Ik=f.length,Ch=0;Chq.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=n;n=n instanceof C?n:null;q=w.Kf();q.set(h);if(null!==n?n.Ak(a,b,c,d,e,q):Do(p,a,d,
            q))null!==b&&(p=b(p)),null===p||null!==c&&!c(p)||e.add(p);w.we(q)}}}void 0===f&&w.we(h);return d}void 0===f&&w.we(h);return!1};function aq(a,b,c,d){for(var e=a.xa.n,f=e.length;f--;){var h=e[f];if(h.visible){var k=h.W,l=a.Ja;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof C&&aq(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}}
    g.zn=function(a,b,c,d,e,f){if(!1===this.Xg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ja,k=this.ah(),l=k?a:Pa(w.xb(a.x,a.y),this.transform),m=k?b:Pa(w.xb(b.x,b.y),this.transform),n=l.zf(m),p=0u.width||s.y>u.height||0>s.x+s.width||0>s.y+s.height||(r.ah()?(s=r.transform,Pa(k.set(a),s),Pa(l.set(b),s)):(k.set(a),l.set(b)),s=r,r=r instanceof C?r:null,null!==r?!r.zn(k,l,c,d,e,f):!s.UE(k,l,e))||(null!==c&&(s=c(s)),null===s||null!==d&&!d(s)||f.add(s))}}w.v(k);w.v(l)}return e?
        p:h}return!1};function Mp(a){var b=null;a instanceof X&&(b=a.A,b===qc&&(b=null),a=a.kf,null!==a&&null===b&&(b=a.A));null===b&&(b=Ab);return b}function Np(a){var b=null;a instanceof X&&(b=a.B,b===qc&&(b=null),a=a.kf,null!==a&&null===b&&(b=a.B));null===b&&(b=Sb);return b}C.prototype.add=C.prototype.add=function(a){w.G(a,G,C,"add:element");this.Qd(this.xa.count,a)};C.prototype.elt=C.prototype.ea=function(a){return this.xa.ea(a)};
    C.prototype.insertAt=C.prototype.Qd=function(a,b){b instanceof R&&w.k("Cannot add a Part to a Panel: "+b+"; use a Panel instead");if(this===b||this.bm(b))this===b&&w.k("Cannot make a Panel contain itself: "+this.toString()),w.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.Q;null!==c&&c!==this&&w.k("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+b.toString()+", already contained by "+c.toString()+", cannot be shared by this Panel: "+
        this.toString());this.na!==Il||b instanceof X||w.k("Can only add Shapes to a Grid Panel, not: "+b);this.na!==ip||b instanceof X||b instanceof Lh||w.k("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+b);b.hm(this);b.Wm=null;if(null!==this.cq){var d=b.data;null!==d&&"object"===typeof d&&(null===this.yg&&(this.yg=new ma(Object,C)),this.yg.add(d,b))}var e=this.xa,d=-1;if(c===this){for(var f=-1,h=this.xa.n,k=h.length,l=0;l=e.count&&
        a>=e.count)return;e.bd(f);d=f}else w.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0>a||a>e.count)a=e.count;e.Qd(a,b);if(0===a||b.pf)this.Al=null;this.H();b.H();null!==b.Ud?this.Fk=!0:b instanceof C&&!0===b.Fk&&(this.Fk=!0);this.Uj=null;c=this.U;null!==c&&(c.Rm=null,c.ck=NaN,this.Fk&&c instanceof T&&(c.Fk=!0),c.Fk&&c instanceof T&&(c.ne=null),e=this.g,null!==e&&e.ia.ab||(-1!==d&&c.ad(Qf,"elements",this,b,null,d,null),c.ad(Pf,"elements",this,null,b,null,a),
    this.fu()||bq(this,b,!1)))};w.defineProperty(C,{Fk:null},function(){return 0!==(this.O&8388608)},function(a){0!==(this.O&8388608)!==a&&(this.O^=8388608)});function cq(a,b){a.O=b?a.O|16777216:a.O&-16777217}C.prototype.remove=C.prototype.remove=function(a){w.G(a,G,C,"remove:element");for(var b=this.xa.n,c=b.length,d=-1,e=0;ea&&w.Fa(a,">= 0",C,"getRowDefinition:idx");a=Math.round(a);var b=this.ae;if(void 0===b[a]){var c=new Wg;c.hm(this);c.xe=!0;c.index=a;b[a]=c}return b[a]};C.prototype.removeRowDefinition=C.prototype.ZF=function(a){0>a&&w.Fa(a,">= 0",C,"removeRowDefinition:idx");a=Math.round(a);var b=this.ae;this.ad(Qf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()};w.u(C,{Ip:"columnCount"},function(){return void 0===this.Xd?0:this.Xd.length});
    C.prototype.getColumnDefinition=C.prototype.Md=function(a){0>a&&w.Fa(a,">= 0",C,"getColumnDefinition:idx");a=Math.round(a);var b=this.Xd;if(void 0===b[a]){var c=new Wg;c.hm(this);c.xe=!1;c.index=a;b[a]=c}return b[a]};C.prototype.removeColumnDefinition=C.prototype.XF=function(a){0>a&&w.Fa(a,">= 0",C,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Xd;this.ad(Qf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.H()};
    w.defineProperty(C,{zJ:"rowSizing"},function(){return void 0===this.Zm?hp:this.Zm},function(a){if(void 0!==this.Zm){var b=this.Zm;b!==a&&(a!==hp&&a!==Pp&&w.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Zm=a,this.H(),this.h("rowSizing",b,a))}});
    w.defineProperty(C,{wH:"columnSizing"},function(){return void 0===this.ym?hp:this.ym},function(a){if(void 0!==this.ym){var b=this.ym;b!==a&&(a!==hp&&a!==Pp&&w.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.ym=a,this.H(),this.h("columnSizing",b,a))}});
    w.defineProperty(C,{XL:"topIndex"},function(){return void 0===this.fj?0:this.fj},function(a){if(void 0!==this.fj){var b=this.fj;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.fj=a,this.H(),this.h("topIndex",b,a))}});
    w.defineProperty(C,{kL:"leftIndex"},function(){return void 0===this.Qi?0:this.Qi},function(a){if(void 0!==this.Qi){var b=this.Qi;b!==a&&((!isFinite(a)||0>a)&&w.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.Qi=a,this.H(),this.h("leftIndex",b,a))}});C.prototype.findRowForLocalY=function(a){if(0>a||this.type!==So)return-1;for(var b=0,c=this.ae,d=c.length,e=this.fj;ea||this.type!==So)return-1;for(var b=0,c=this.Xd,d=c.length,e=this.Qi;ea;)this.nf(this.xa.length-1,!1);a=this.cq;if(null!==a)for(var b=w.Za(a),c=0;cc)){var d;d=dq(a,b);var e=a.FI,f=null;null!==e&&(f=e.ka(d));null===f&&(eq||(eq=!0,w.trace('No item template Panel found for category "'+d+'" on '+a),w.trace("  Using default item template."),d=new C,e=new Lh,e.bind(new bh("text","",Rf)),d.add(e),fq=d),f=fq);d=f;null!==d&&(mh(d),d=d.copy(),0!==(d.O&16777216)&&(e=a.Ul(),null!==e&&cq(e,!0)),"object"===typeof b&&(null===a.yg&&(a.yg=new ma(Object,C)),a.yg.add(b,d)),e=c,kn(a)&&e++,a.Qd(e,d),d.Zd=b,ln(a,e,
        c),d.Zd=null,d.data=b)}}function ln(a,b,c){for(a=a.xa;ba&&w.Fa(a,">= 0",Wg,"height"),this.jf=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.gd("height",b,a))});w.defineProperty(Wg,{width:"width"},function(){return this.jf},function(a){var b=this.jf;b!==a&&(0>a&&w.Fa(a,">= 0",Wg,"width"),this.jf=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.gd("width",b,a))});
    w.defineProperty(Wg,{Bh:"minimum"},function(){return this.ek},function(a){var b=this.ek;b!==a&&((0>a||!isFinite(a))&&w.Fa(a,">= 0",Wg,"minimum"),this.ek=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.gd("minimum",b,a))});w.defineProperty(Wg,{he:"maximum"},function(){return this.dk},function(a){var b=this.dk;b!==a&&(0>a&&w.Fa(a,">= 0",Wg,"maximum"),this.dk=a,this.Ya=this.Ra,null!==this.Q&&this.Q.H(),this.gd("maximum",b,a))});
    w.defineProperty(Wg,{alignment:"alignment"},function(){return this.ie},function(a){var b=this.ie;b.L(a)||(this.ie=a.S(),null!==this.Q&&this.Q.H(),this.gd("alignment",b,a))});w.defineProperty(Wg,{stretch:"stretch"},function(){return this.Hg},function(a){var b=this.Hg;b!==a&&(this.Hg=a,null!==this.Q&&this.Q.H(),this.gd("stretch",b,a))});
    w.defineProperty(Wg,{kG:"separatorPadding"},function(){return this.ik},function(a){"number"===typeof a&&(a=new hb(a));var b=this.ik;null!==a&&null!==b&&b.L(a)||(null!==a&&(a=a.S()),this.ik=a,null!==this.Q&&this.Q.H(),this.gd("separatorPadding",b,a))});w.defineProperty(Wg,{rq:"separatorStroke"},function(){return this.Ys},function(a){var b=this.Ys;b!==a&&(null===a||"string"===typeof a||a instanceof ha)&&(a instanceof ha&&a.freeze(),this.Ys=a,null!==this.Q&&this.Q.H(),this.gd("separatorStroke",b,a))});
    w.defineProperty(Wg,{sq:"separatorStrokeWidth"},function(){return this.Zs},function(a){var b=this.Zs;b!==a&&(this.Zs=a,null!==this.Q&&this.Q.H(),this.gd("separatorStrokeWidth",b,a))});
    w.defineProperty(Wg,{LL:"separatorDashArray"},function(){return this.ai},function(a){var b=this.ai;if(b!==a){null===a||Array.isArray(a)||w.Bd(a,"Array",Wg,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var f=d.za,h=Math.max(1,f.width),f=f.height,k=c[0],l=c[1],m=0,n=0,p=0,q=0,r=0,s=0,u=q=0,t=w.cb(),x=2;xp&&(p=1);for(var e=c=p,m=h/2,n=0===m?!1:!0,x=0,q=t[x],p=q[0],s=q[1],r=q[2],q=q[3],v=0;.1<=u;){0===v&&(n?(e=c,e-=m,u-=m,n=!1):e=c,0===e&&(e=1));if(e>u){w.ta(t);return}e>
    q?(v=e-q,e=q):v=0;var A=Math.sqrt(e*e/(1+r*r));0>p&&(A=-A);k+=A;l+=r*A;a.translate(k,l);a.rotate(s);a.translate(-(h/2),-(f/2));0===v&&d.zk(a,b);a.translate(h/2,f/2);a.rotate(-s);a.translate(-k,-l);u-=e;q-=e;if(0!==v){x++;if(x===t.length){w.ta(t);return}q=t[x];p=q[0];s=q[1];r=q[2];q=q[3];e=v}}w.ta(t)}}
    X.prototype.zk=function(a,b){if(null!==this.rc||null!==this.Dd){null!==this.Dd&&No(this,a,this.Dd,!0,!1);null!==this.rc&&No(this,a,this.rc,!1,!1);var c=this.ji;if(0===c){var d=this.U;d instanceof kh&&d.type===hj&&"Selection"===d.vd&&d.sb instanceof X&&d.xf.Ld()===d.sb&&(c=d.sb.lb)}a.lineWidth=c;a.lineJoin=this.tp;a.lineCap=this.rp;a.miterLimit=this.gn;var e=!1;this.U&&b.qj("drawShadows")&&(e=this.U.dm);var f=!0;null!==this.rc&&null===this.Dd&&(f=!1);var d=!1,h=!0,k=this.tG;null!==k&&(d=!0,h=a.lA(k,
        this.wf));var l=this.Ua;if(null!==l){if(l.na===Ge)a.beginPath(),d&&!h?yo(a,l.zc,l.Ic,l.yb,l.Gb,k,this.wf):(a.moveTo(l.zc,l.Ic),a.lineTo(l.yb,l.Gb)),null!==this.Dd&&a.Ng(this.Dd),0!==c&&null!==this.rc&&a.Dj();else if(l.na===He){var m=l.zc,n=l.Ic,p=l.yb,q=l.Gb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.Dd&&(a.beginPath(),a.rect(l,r,m,n),a.Ng(this.Dd));if(null!==this.rc){var s=p=0,u=0;f&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=
        0,a.shadowBlur=0);d&&!h?(h=w.cb(),h.push(l),h.push(r),h.push(l+m),h.push(r),h.push(l+m),h.push(r+n),h.push(l),h.push(r+n),h.push(l),h.push(r),a.beginPath(),iq(a,h,k,this.wf),a.Dj(),w.ta(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.Dj());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u)}}else if(l.na===Le)m=l.zc,n=l.Ic,p=l.yb,q=l.Gb,l=Math.abs(p-m)/2,r=Math.abs(q-n)/2,m=Math.min(m,p)+l,n=Math.min(n,q)+r,a.beginPath(),a.moveTo(m,n-r),a.bezierCurveTo(m+cd*l,n-r,m+l,n-cd*r,m+l,n),a.bezierCurveTo(m+
        l,n+cd*r,m+cd*l,n+r,m,n+r),a.bezierCurveTo(m-cd*l,n+r,m-l,n+cd*r,m-l,n),a.bezierCurveTo(m-l,n-cd*r,m-cd*l,n-r,m,n-r),a.closePath(),null!==this.Dd&&a.Ng(this.Dd),d&&!h&&(h=w.cb(),Xd(m,n-r,m+cd*l,n-r,m+l,n-cd*r,m+l,n,.5,h),Xd(m+l,n,m+l,n+cd*r,m+cd*l,n+r,m,n+r,.5,h),Xd(m,n+r,m-cd*l,n+r,m-l,n+cd*r,m-l,n,.5,h),Xd(m-l,n,m-l,n-cd*r,m-cd*l,n-r,m,n-r,.5,h),a.beginPath(),iq(a,h,k,this.wf),w.ta(h)),0!==c&&null!==this.rc&&(f&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,u=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY=
        0,a.shadowBlur=0,a.Dj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=u):a.Dj());else if(l.na===De){r=l.Oj;n=r.length;for(q=0;qx.rf);else{var t=sf(x,m),v=t.length;if(0===v){a.lineTo(x.la,x.ra);break}for(var A=0;Ae)){var f=.001,h=c.length,k=b[0],l=b[1];if(4===e)yo(a,k,l,b[2],b[3],c,d);else{a.moveTo(k,l);for(var m=f=0,n=0,p=0,q=0,r=p=0,s=w.cb(),u=2;ur&&(f=r);f>p?(t=f-p,f=p):t=0;var x=Math.sqrt(f*f/(1+q*q));0>n&&(x=-x);k+=x;l+=
        q*x;e?a.lineTo(k,l):a.moveTo(k,l);r-=f;p-=f;if(0!==t){u++;if(u===s.length){w.ta(s);return}p=s[u];n=p[0];q=p[1];p=p[2];f=t}else e=!e}w.ta(s)}}}X.prototype.getDocumentPoint=X.prototype.Wa=function(a,b){void 0===b&&(b=new z);if(a instanceof L){a.Sd()&&w.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ja,d=this.lb;b.m(a.x*(c.width+d)-d/2+c.x+a.offsetX,a.y*(c.height+d)-d/2+c.y+a.offsetY)}else b.set(a);this.rh.nb(b);return b};
    X.prototype.wk=function(a,b){var c=this.kf;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.gb,e=this.lb/2;c.type!==Ge||b||(e+=2);var f=w.Jf();f.assign(d);f.Af(e+2,e+2);if(!f.Ia(a))return w.Db(f),!1;d=e+1E-4;if(c.type===Ge){if(null===this.stroke)return!1;d=(c.C-c.ha)*(a.x-c.ha)+(c.D-c.fa)*(a.y-c.fa);if(0>(c.ha-c.C)*(a.x-c.C)+(c.fa-c.D)*(a.y-c.D)||0>d)return!1;w.Db(f);return Ud(c.ha,c.fa,c.C,c.D,e,a.x,a.y)}if(c.type===He){var h=c.ha,k=c.fa,l=c.C,m=c.D;f.x=Math.min(h,l);f.y=Math.min(k,
        m);f.width=Math.abs(l-h);f.height=Math.abs(m-k);if(null===this.fill){f.Af(-d,-d);if(f.Ia(a))return w.Db(f),!1;f.Af(d,d)}null!==this.stroke&&f.Af(e,e);e=f.Ia(a);w.Db(f);return e}if(c.type===Le){var h=c.ha,k=c.fa,l=c.C,m=c.D,c=Math.min(h,l),n=Math.min(k,m),h=Math.abs(l-h)/2,k=Math.abs(m-k)/2,c=a.x-(c+h),n=a.y-(n+k);if(null===this.fill){h-=d;k-=d;if(0>=h||0>=k||1>=c*c/(h*h)+n*n/(k*k))return w.Db(f),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);w.Db(f);return 0>=h||0>=k?!1:1>=c*c/(h*h)+n*n/(k*k)}if(c.type===
        De)return w.Db(f),null===this.fill?vf(c,a.x,a.y,e):c.Ia(a,e,1=this.lb)n=ke(p.zc,p.Ic,p.yb,p.Gb,f,h,k,l,e);else{var r=0,s=0;p.zc===p.yb?(r=m,s=0):(b=(p.Gb-p.Ic)/(p.yb-p.zc),s=m/Math.sqrt(1+b*b),r=s*b);d=w.cb();b=new z;ke(p.zc+
        r,p.Ic+s,p.yb+r,p.Gb+s,f,h,k,l,b)&&d.push(b);b=new z;ke(p.zc-r,p.Ic-s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=new z;ke(p.zc+r,p.Ic+s,p.zc-r,p.Ic-s,f,h,k,l,b)&&d.push(b);b=new z;ke(p.yb+r,p.Gb+s,p.yb-r,p.Gb-s,f,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return w.ta(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(f-d);if(0>a*a*c*c+t*t-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+t*t-n*n);k=(-(a*a*c*n)+a*t*m)/(t*t+a*a*c*c)+d;a=(-(a*a*c*n)-a*t*m)/(t*t+a*a*c*c)+d;l=c*(k-d)+n+b;b=c*(a-d)+n+b;d=Math.abs((f-k)*(f-k))+Math.abs((h-l)*(h-l));h=Math.abs((f-a)*(f-a))+Math.abs((h-b)*(h-
            b));dk){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(k);l=b+m;b-=m;d=Math.abs(l-h);h=Math.abs(b-h);dc?a-c:c-a)<(b>d?b-d:d-b)?(e=be||Wa(l.y,e))&&(l.ye||Wa(l.x,e))&&(l.x=h&&d<=a}a=h&&f<=a}
    X.prototype.UE=function(a,b,c){function d(a,b){for(var c=a.length,d=0;de)return!0;return!1}if(c&&null!==this.fill&&this.wk(a,!0))return!0;var e=a.zf(b);b=e;1.5=e||Sa(b,f,0,-p)>=e||Sa(b,f,0,p)>=e||Sa(b,f,n,0)>=
    e?!1:!0}else if(f.type===De){h=f.gb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Ra(a.x,a.y,k,l,m,l)>e&&Ra(a.x,a.y,m,h,k,h)>e&&Ra(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?vf(f,a.x,a.y,b):f.Ia(a,b,!0))return!0}else{c=f.fc;for(b=0;be)return!1;l=k.vb.n;m=l.length;for(h=0;he)return!1;break;case of:f=w.cb();
        Xd(n,p,q.uc,q.Qc,q.Ch,q.Dh,q.C,q.D,.8,f);n=d(f,a);w.ta(f);if(n)return!1;n=q.C;p=q.D;if(a.Pp(n,p)>e)return!1;break;case pf:f=w.cb();he(n,p,q.uc,q.Qc,q.C,q.D,.8,f);n=d(f,a);w.ta(f);if(n)return!1;n=q.C;p=q.D;if(a.Pp(n,p)>e)return!1;break;case qf:case rf:var r=q.type===qf?sf(q,k):tf(q,k,n,p),s=r.length;if(0===s){n=q.la;p=q.ra;if(a.Pp(n,p)>e)return!1;break}q=null;f=w.cb();for(b=0;b= 0",X,"strokeWidth:value")});w.defineProperty(X,{QL:"strokeCap"},function(){return this.rp},function(a){var b=this.rp;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?w.Fa(a,'"butt", "round", or "square"',X,"strokeCap"):(this.rp=a,this.oa(),this.h("strokeCap",b,a)))});
    w.defineProperty(X,{SL:"strokeJoin"},function(){return this.tp},function(a){var b=this.tp;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?w.Fa(a,'"miter", "bevel", or "round"',X,"strokeJoin"):(this.tp=a,this.oa(),this.h("strokeJoin",b,a)))});w.defineProperty(X,{TL:"strokeMiterLimit"},function(){return this.gn},function(a){var b=this.gn;if(b!==a)if(1<=a){this.gn=a;this.oa();var c=this.U;null!==c&&(c.ck=NaN);this.h("strokeMiterLimit",b,a)}else w.Fa(a,"value >= 1",X,"strokeWidth:value")});
    w.defineProperty(X,{tG:"strokeDashArray"},function(){return this.sp},function(a){var b=this.sp;if(b!==a){null===a||Array.isArray(a)||w.Bd(a,"Array",X,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ea?a=0:1a?a=0:1a?a=0:1a?a=0:1n*l*l&&(h=!0);b.tf!==a&&(h=!1);!1===b.qj("textGreeking")&&(h=!1);n=this.fi;l=this.gi;switch(this.Tt){case so:a.translate(c,
        0);a.scale(-1,1);break;case ro:a.translate(0,d);a.scale(1,-1);break;case to:a.translate(c,d),a.scale(-1,-1)}var m=this.le,p=(n+e+l)*m;d>p&&(k=this.Fl,k=k.y*d-k.y*p+k.offsetY);for(var p=this.vf,q=0;qc&&(r=c);var k=k+n,u=s,s=a,t=k,x=c,v=e,A=f,y=0;h?("left"===A?y=0:"right"===A?y=x-r:"center"===A&&(y=(x-r)/2),s.fillRect(0+y,t+.25*v,r,1)):("left"===A?y=0:"right"===A?y=x:"center"===A&&(y=x/2),s.fillText(u,0+y,t+v-.25*v),u=v/20|0,0===u&&(u=1),"right"===A?y-=r:"center"===
        A&&(y-=r/2),this.Zj&&(s.beginPath(),s.lineWidth=u,s.moveTo(0+y,t+v-.2*v),s.lineTo(0+y+r,t+v-.2*v),s.stroke()),this.Yj&&(s.beginPath(),s.lineWidth=u,t=t+v-v/2.2|0,0!==u%2&&(t+=.5),s.moveTo(0+y,t),s.lineTo(0+y+r,t),s.stroke()));k+=e+l}switch(this.Tt){case so:a.scale(-1,1);a.translate(-c,0);break;case ro:a.scale(1,-1);a.translate(0,-d);break;case to:a.scale(-1,-1),a.translate(-c,-d)}}};
    Lh.prototype.Pn=function(a,b,c,d){this.Wo=a;var e=this.vf;e.reset();var f=0,h=0;if(isNaN(this.Ca.width)){f=this.Jd.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.Cx){for(var k=h=0,l=!1;!l;){var m=f.indexOf("\n",k);-1===m&&(m=f.length,l=!0);k=Hq(f.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.sg);k>h&&(h=k);k=m+1}f=h}else h=f.indexOf("\n",0),0<=h&&(f=f.substr(0,h)),f=k=Hq(f,this.sg);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.Ca.width;null!==this.Q&&(f=Math.min(f,
        this.Q.Gf.width));h=Fq(this,f,e);m=h=isNaN(this.Ca.height)?Math.min(h,b/this.scale):this.Ca.height;if(0!==e.We&&1!==e.Se.length&&this.Zi===Dq&&(b=this.sg,l=this.Zi===Dq?Iq(b):0,k=this.fi+this.gi,k=Math.max(0,Gq(this)+k),m=Math.min(this.SI-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Se.length))){k=e.Se[m];for(a=Math.max(1,a-l);Hq(k,b)>a&&1=a.hh)return new ia(0,l);if(a.rk===Bq){c.hj=1;f=Hq(b,k);if(0===h||f<=d)return c.We=Math.max(c.We,f),c.sf.push(c.We),c.Se.push(b),new ia(f,l);var m=Jq(b);b=b.substr(m.length);for(var n=Jq(b),f=Hq(m+n,k);0d&&1d;){n=1;f=Hq(m.substr(0,n),k);for(h=0;f<=d;)n++,h=f,f=Hq(m.substr(0,n),k);1===n?(c.sf[a.le+p]=f,e=Math.max(e,f)):(c.sf[a.le+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Se[a.le+p]=m.substr(0,n);p++;m=m.substr(n);if(a.le+p>a.hh)break}n=Jq(b);for(f=Hq(m+n,k);0a.hh))break}c.hj=Math.min(a.hh,p);c.We=Math.max(c.We,e);return new ia(c.We,l*c.hj)}function Jq(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)}
    function Hq(a,b){zq!==b&&(zq=Aq.font=b);return Aq.measureText(a).width}function Gq(a){if(null!==a.vf.Pj)return a.vf.Pj;var b=a.sg;zq!==b&&(zq=Aq.font=b);var c=0;void 0!==uq[b]&&5E3>vq?c=uq[b]:(c=1.3*Aq.measureText("M").width,uq[b]=c,vq++);return a.vf.Pj=c}function Iq(a){zq!==a&&(zq=Aq.font=a);var b=0;void 0!==wq[a]&&5E3>xq?b=wq[a]:(b=Aq.measureText(yq).width,wq[a]=b,xq++);return b}
    function Fq(a,b,c){var d=a.Jd.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.fi+a.gi,e=Math.max(0,Gq(a)+e);if(0===d.length)return c.We=0,a.le=1,e;if(!a.Cx){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.le=0,k=-1,l=!1;!l;)k=d.indexOf("\n",h),-1===k&&(k=d.length,l=!0),h<=k&&(h=d.substr(h,k-h),a.rk!==Bq?(c.hj=0,h=Eq(a,h,c,b),f+=h.height,a.le+=c.hj):(Eq(a,h,c,b),f+=e,a.le++),a.le===a.hh&&(l=!0)),h=k+1;return a.Zv=f}
    w.defineProperty(Lh,{wB:"textValidation"},function(){return this.Cl},function(a){var b=this.Cl;b!==a&&(null!==a&&w.j(a,"function",Lh,"textValidation"),this.Cl=a,this.h("textValidation",b,a))});w.defineProperty(Lh,{uG:"textEdited"},function(){return this.lt},function(a){var b=this.lt;b!==a&&(null!==a&&w.j(a,"function",Lh,"textEdited"),this.lt=a,this.h("textEdited",b,a))});
    w.defineProperty(Lh,{NL:"spacingAbove"},function(){return this.fi},function(a){var b=this.fi;b!==a&&(this.fi=a,this.h("spacingAbove",b,a))});w.defineProperty(Lh,{OL:"spacingBelow"},function(){return this.gi},function(a){var b=this.gi;b!==a&&(this.gi=a,this.h("spacingBelow",b,a))});w.defineProperty(Lh,{SI:"maxLines"},function(){return this.hh},function(a){var b=this.hh;b!==a&&(a=Math.floor(a),0>=a&&w.Fa(a,"> 0",Lh,"maxLines"),this.hh=a,this.h("maxLines",b,a),this.H())});w.u(Lh,{sL:"metrics"},function(){return this.vf});
    w.defineProperty(Lh,{EK:"choices"},function(){return this.Sq},function(a){var b=this.Sq;b!==a&&(null===a||Array.isArray(a)||w.Bd(a,"Array",Lh,"choices:value"),this.Sq=a,this.h("choices",b,a))});function Wp(){this.We=this.hj=0;this.sf=[];this.Se=[];this.Pj=null}Wp.prototype.reset=function(){this.We=this.hj=0;this.Pj=null;this.sf=[];this.Se=[]};Wp.prototype.Jp=function(a){this.hj=a.hj;this.Pj=a.Pj;this.We=a.We;this.sf=w.Nl(a.sf);this.Se=w.Nl(a.Se)};w.u(Wp,{AK:"arrSize"},function(){return this.sf});
    w.u(Wp,{BK:"arrText"},function(){return this.Se});w.u(Wp,{rL:"maxLineWidth"},function(){return this.We});w.u(Wp,{ZK:"fontHeight"},function(){return this.Pj});function xl(){G.call(this);this.Ue=null;this.et="";this.jk=Nd;this.Lo=Fe;this.ki=this.Ve=null;this.Ko=Jb;this.rg=Oj;this.vp=null;this.mz=!1;this.Av=!0;this.Xv=!1;this.mp=null}w.Ka(xl,G);w.ga("Picture",xl);
    xl.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Ue;a.et=this.et;a.jk=this.jk.S();a.Lo=this.Lo;a.rg=this.rg;a.Ve=this.Ve;a.ki=this.ki;a.Ko=this.Ko.S();a.Av=this.Av;a.mp=this.mp};xl.prototype.ic=function(a){a===Oj||a===Qj||a===Rj?this.oI=a:G.prototype.ic.call(this,a)};xl.prototype.toString=function(){return"Picture("+this.source+")#"+w.Od(this)};var Kq=new ra,Lq=0,rl=[];
    function Mq(){var a=rl;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;d=d.width&&(e=e+r.offsetX+(n*r.x-d.width*r.x));p>=d.height&&(f=f+r.offsetY+(p*r.y-d.height*r.y));k=Math.min(d.width,n);h=Math.min(d.height,p);break;case Fe:n=d.width;p=d.height;break;case Qj:case Rj:var s=0;q===Qj?(s=Math.min(d.height/p,d.width/n),n*=s,p*=s):q===Rj&&(s=Math.max(d.height/p,d.width/n),n*=s,p*=s,n>=d.width&&(e=(e+r.offsetX+(n*r.x-d.width*r.x)/n)*k),p>=d.height&&(f=(f+r.offsetY+(p*r.y-d.height*r.y)/p)*h),k*=1/(n/d.width),h*=1/(p/d.height),
            n=d.width,p=d.height)}var q=this.pj()*b.scale,u=k*h/(n*q*p*q),s=Kq[this.source],q=null;if(void 0!==s&&16s.Ep.length&&(Rq(s,4,l,m),Rq(s,16,l,m));for(var l=s.Ep,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.2,.22);b.B=new L(.8,
            .9);w.q(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=Vq(6);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;6>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.07,.25);b.B=new L(.93,.75);w.q(a);return b},Heptagon:function(a,b,c){var d=Vq(7);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;7>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.2,.15);b.B=new L(.8,.85);w.q(a);return b},Octagon:function(a,b,c){var d=Vq(8);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);
            for(var e=1;8>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.15,.15);b.B=new L(.85,.85);w.q(a);return b},Nonagon:function(a,b,c){var d=Vq(9);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;9>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.17,.13);b.B=new L(.82,.82);w.q(a);return b},Decagon:function(a,b,c){var d=Vq(10);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.16,.16);b.B=new L(.84,.84);w.q(a);return b},
        Dodecagon:function(a,b,c){var d=Vq(12);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.16,.16);b.B=new L(.84,.84);w.q(a);return b},FivePointedStar:function(a,b,c){var d=Uq(5);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;10>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.312,.383);b.B=new L(.693,.765);w.q(a);return b},SixPointedStar:function(a,b,c){var d=Uq(6);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;12>e;e++)a.lineTo(d[e].x*
            b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.17,.251);b.B=new L(.833,.755);w.q(a);return b},SevenPointedStar:function(a,b,c){var d=Uq(7);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;14>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.363,.361);b.B=new L(.641,.709);w.q(a);return b},EightPointedStar:function(a,b,c){var d=Uq(8);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;16>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.252,.255);b.B=new L(.75,.75);w.q(a);return b},NinePointedStar:function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        b,c){var d=Uq(9);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;18>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.355,.361);b.B=new L(.645,.651);w.q(a);return b},TenPointedStar:function(a,b,c){var d=Uq(10);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;20>e;e++)a.lineTo(d[e].x*b,d[e].y*c);w.ta(d);O(a);b=a.o;b.A=new L(.281,.261);b.B=new L(.723,.748);w.q(a);return b},FivePointedBurst:function(a,b,c){var d=Tq(5);a=w.s();M(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=w.s(),e=.2*cd;M(d,0,.2*c,!0);N(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);N(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);N(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);N(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c);
            M(d,0,a*c,!1);d.lineTo(1*b,a*c);d.bb(!1);b=d.o;b.A=new L(0,a);b.B=new L(1,1-a);w.q(d);return b},DividedProcess:function(a,b,c){a=a?a.Ec:NaN;if(isNaN(a)||.1>a)a=.1;var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);M(d,0,a*c,!1);d.lineTo(1*b,a*c);d.bb(!1);b=d.o;b.A=new L(0,a);b.B=Sb;w.q(d);return b},Document:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);b=a.o;b.A=Ab;b.B=new L(1,.6);w.q(a);
            return b},ExternalOrganization:function(a,b,c){a=a?a.Ec:NaN;if(isNaN(a)||.2>a)a=.2;var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);M(d,a*b,0,!1);d.lineTo(0,a*c);d.moveTo(1*b,a*c);d.lineTo((1-a)*b,0);d.moveTo(0,(1-a)*c);d.lineTo(a*b,1*c);d.moveTo((1-a)*b,1*c);d.lineTo(1*b,(1-a)*c);d.bb(!1);b=d.o;b.A=new L(a/2,a/2);b.B=new L(1-a/2,1-a/2);w.q(d);return b},ExternalProcess:function(a,b,c){a=w.s();M(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);O(a);
            M(a,.1*b,.4*c,!1);a.lineTo(.1*b,.6*c);a.moveTo(.9*b,.6*c);a.lineTo(.9*b,.4*c);a.moveTo(.6*b,.1*c);a.lineTo(.4*b,.1*c);a.moveTo(.4*b,.9*c);a.lineTo(.6*b,.9*c);a.bb(!1);b=a.o;b.A=new L(.25,.25);b.B=new L(.75,.75);w.q(a);return b},File:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);O(a);M(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.bb(!1);b=a.o;b.A=new L(0,.25);b.B=Sb;w.q(a);return b},Interrupt:function(a,b,c){a=w.s();M(a,1*b,
            .5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);M(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.o;b.A=new L(0,.25);b.B=new L(.5,.75);w.q(a);return b},InternalStorage:function(a,b,c){var d=a?a.Ec:NaN;a=a?a.zu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=w.s();M(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);O(e);M(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.bb(!1);b=e.o;b.A=new L(d,a);b.B=Sb;w.q(e);return b},Junction:function(a,b,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             c){a=w.s();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,f=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+f)*c,(.5+f)*b,1*c,.5*b,1*c);N(a,(.5-f)*b,1*c,0,(.5+f)*c,0,.5*c);N(a,0,(.5-f)*c,(.5-f)*b,0,.5*b,0);N(a,(.5+f)*b,0,1*b,(.5-f)*c,1*b,.5*c);M(a,(e+d)*b,(e+d)*c,!1);a.lineTo(e*b,e*c);a.moveTo(e*b,(e+d)*c);a.lineTo((e+d)*b,e*c);a.bb(!1);b=a.o;b.be=Qj;w.q(a);return b},LinedDocument:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);M(a,.1*
            b,0,!1);a.lineTo(.1*b,.75*c);a.bb(!1);b=a.o;b.A=new L(.1,0);b.B=new L(1,.6);w.q(a);return b},LoopLimit:function(a,b,c){a=w.s();M(a,0,1*c,!0);a.lineTo(0,.25*c);a.lineTo(.25*b,0);a.lineTo(.75*b,0);a.lineTo(1*b,.25*c);a.lineTo(1*b,1*c);O(a);b=a.o;b.A=new L(0,.25);b.B=Sb;w.q(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=w.s();var d=.5*cd;M(a,.5*b,1*c,!0);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+
            d)*c,(.5+d)*b,.9*c,.6*b,.9*c);a.lineTo(1*b,.9*c);a.lineTo(1*b,1*c);a.lineTo(.5*b,1*c);b=a.o;b.A=new L(.15,.15);b.B=new L(.85,.8);w.q(a);return b},ManualInput:function(a,b,c){a=w.s();M(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);O(a);b=a.o;b.A=new L(0,.25);b.B=Sb;w.q(a);return b},MessageFromUser:function(a,b,c){a=a?a.Ec:NaN;isNaN(a)&&(a=.7);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(a*b,.5*c);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);b=d.o;b.A=Ab;b.B=new L(a,1);w.q(d);return b},
        MicroformProcessing:function(a,b,c){a=a?a.Ec:NaN;isNaN(a)&&(a=.25);var d=w.s();M(d,0,0,!0);d.lineTo(.5*b,a*c);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.5*b,(1-a)*c);d.lineTo(0,1*c);O(d);b=d.o;b.A=new L(0,a);b.B=new L(1,1-a);w.q(d);return b},MicroformRecording:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.15*c);a.lineTo(1*b,.85*c);a.lineTo(.75*b,.75*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=new L(0,.25);b.B=new L(1,.75);w.q(a);return b},MultiDocument:function(a,b,c){c/=.8;a=w.s();
            M(a,b,0,!0);a.lineTo(b,.5*c);N(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);N(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);N(a,.4*b,.4*c,.4*b,1*c,0,.7*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);a.lineTo(.1*b,.1*c);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);O(a);M(a,.1*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.54*c);a.moveTo(.2*b,.1*c);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.44*c);a.bb(!1);b=a.o;b.A=new L(0,.25);b.B=new L(.8,.77);w.q(a);return b},MultiProcess:function(a,b,c){a=w.s();
            M(a,.1*b,.1*c,!0);a.lineTo(.2*b,.1*c);a.lineTo(.2*b,0);a.lineTo(1*b,0);a.lineTo(1*b,.8*c);a.lineTo(.9*b,.8*c);a.lineTo(.9*b,.9*c);a.lineTo(.8*b,.9*c);a.lineTo(.8*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.2*c);a.lineTo(.1*b,.2*c);O(a);M(a,.2*b,.1*c,!1);a.lineTo(.9*b,.1*c);a.lineTo(.9*b,.8*c);a.moveTo(.1*b,.2*c);a.lineTo(.8*b,.2*c);a.lineTo(.8*b,.9*c);a.bb(!1);b=a.o;b.A=new L(0,.2);b.B=new L(.8,1);w.q(a);return b},OfflineStorage:function(a,b,c){a=a?a.Ec:NaN;isNaN(a)&&(a=.1);var d=1-a,e=w.s();M(e,0,0,!0);e.lineTo(1*
            b,0);e.lineTo(.5*b,1*c);O(e);M(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.bb(!1);b=e.o;b.A=new L(d/4+.5*a,a);b.B=new L(3*d/4+.5*a,a+.5*d);w.q(e);return b},OffPageConnector:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(.75*b,0);a.lineTo(1*b,.5*c);a.lineTo(.75*b,1*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=Ab;b.B=new L(.75,1);w.q(a);return b},Or:function(a,b,c){a=w.s();var d=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,
            (.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.bb(!1);b=a.o;b.be=Qj;w.q(a);return b},PaperTape:function(a,b,c){c/=.8;a=w.s();M(a,0,.7*c,!0);a.lineTo(0,.3*c);N(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);N(a,.5*b,.4*c,.5*b,1*c,0,.7*c);O(a);b=a.o;b.A=new L(0,.49);b.B=new L(1,.75);w.q(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Ec:NaN;a=a?a.zu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.s();M(e,0,0,!0);e.lineTo(1*b,0);e.lineTo((1-
            a)*b,.5*c);e.lineTo(1*b,1*c);e.lineTo(0,1*c);O(e);b=e.o;b.A=new L(d,0);b.B=new L(1-a,1);w.q(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Ec:NaN;a=a?a.zu:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=w.s();M(e,0,0,!0);e.lineTo((1-a)*b,0);e.lineTo(1*b,.5*c);e.lineTo((1-a)*b,1*c);e.lineTo(0,1*c);O(e);b=e.o;b.A=new L(d,0);b.B=new L(1-a,1);w.q(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Ec:NaN;isNaN(a)&&(a=.1);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,
            1*c);O(d);M(d,(1-a)*b,0,!1);d.lineTo((1-a)*b,1*c);d.moveTo(a*b,0);d.lineTo(a*b,1*c);d.bb(!1);b=d.o;b.A=new L(a,0);b.B=new L(1-a,1);w.q(d);return b},Process:function(a,b,c){a=a?a.Ec:NaN;isNaN(a)&&(a=.1);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);O(d);M(d,a*b,0,!1);d.lineTo(a*b,1*c);d.bb(!1);b=d.o;b.A=new L(a,0);b.B=Sb;w.q(d);return b},Sort:function(a,b,c){a=w.s();M(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);O(a);M(a,0,.5*c,!1);a.lineTo(1*b,.5*
            c);a.bb(!1);b=a.o;b.A=new L(.25,.25);b.B=new L(.75,.5);w.q(a);return b},Start:function(a,b,c){a=w.s();M(a,.25*b,0,!0);M(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);M(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.bb(!1);b=a.o;b.A=new L(.25,0);b.B=new L(.75,1);w.q(a);return b},Terminator:function(a,b,c){a=w.s();M(a,.25*b,0,!0);a.arcTo(270,180,.75*b,.5*c,.25*b,.5*c);a.arcTo(90,180,.25*b,.5*c,.25*b,.5*c);b=a.o;b.A=new L(.23,0);
            b.B=new L(.77,1);w.q(a);return b},TransmittalTape:function(a,b,c){a=a?a.Ec:NaN;isNaN(a)&&(a=.1);var d=w.s();M(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(.75*b,(1-a)*c);d.lineTo(0,(1-a)*c);O(d);b=d.o;b.A=Ab;b.B=new L(1,1-a);w.q(d);return b},AndGate:function(a,b,c){a=w.s();var d=.5*cd;M(a,0,0,!0);a.lineTo(.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=Ab;b.B=new L(.55,1);w.q(a);return b},Buffer:function(a,b,c){a=w.s();M(a,
            0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);O(a);b=a.o;b.A=new L(0,.25);b.B=new L(.5,.75);w.q(a);return b},Clock:function(a,b,c){a=w.s();var d=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);M(a,.8*b,.75*c,!1);a.lineTo(.8*b,.25*c);a.lineTo(.6*b,.25*c);a.lineTo(.6*b,.75*c);a.lineTo(.4*b,.75*c);a.lineTo(.4*b,.25*c);a.lineTo(.2*b,.25*c);a.lineTo(.2*
            b,.75*c);a.bb(!1);b=a.o;b.be=Qj;w.q(a);return b},Ground:function(a,b,c){a=w.s();M(a,.5*b,0,!1);a.lineTo(.5*b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.3*b,.8*c);a.lineTo(.7*b,.8*c);a.moveTo(.4*b,1*c);a.lineTo(.6*b,1*c);b=a.o;w.q(a);return b},Inverter:function(a,b,c){a=w.s();var d=.1*cd;M(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);N(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);N(a,.8*b,(.5-d)*c,(.9-d)*b,.4*
            c,.9*b,.4*c);N(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.o;b.A=new L(0,.25);b.B=new L(.4,.75);w.q(a);return b},NandGate:function(a,b,c){a=w.s();var d=.5*cd,e=.4*cd,f=.1*cd;M(a,.8*b,.5*c,!0);N(a,.8*b,(.5+e)*c,(.4+d)*b,1*c,.4*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.4*b,0);N(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);M(a,1*b,.5*c,!0);N(a,1*b,(.5+f)*c,(.9+f)*b,.6*c,.9*b,.6*c);N(a,(.9-f)*b,.6*c,.8*b,(.5+f)*c,.8*b,.5*c);N(a,.8*b,(.5-f)*c,(.9-f)*b,.4*c,.9*b,.4*c);N(a,(.9+f)*b,.4*c,1*b,(.5-f)*c,1*b,.5*
            c);b=a.o;b.A=new L(0,.05);b.B=new L(.55,.95);w.q(a);return b},NorGate:function(a,b,c){a=w.s();var d=.5,e=cd*d,f=0,h=.5;M(a,.8*b,.5*c,!0);N(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);N(a,(f+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*cd;f=.9;h=.5;M(a,(f-d)*b,h*c,!0);N(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);N(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);N(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);N(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.A=
            new L(.2,.25);b.B=new L(.6,.75);w.q(a);return b},OrGate:function(a,b,c){a=w.s();var d=.5*cd;M(a,0,0,!0);N(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);N(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);N(a,.25*b,.75*c,.25*b,.25*c,0,0);O(a);b=a.o;b.A=new L(.2,.25);b.B=new L(.75,.75);w.q(a);return b},XnorGate:function(a,b,c){a=w.s();var d=.5,e=cd*d,f=.2,h=.5;M(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);M(a,.8*b,.5*c,!0);N(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);N(a,(f+e)*
            b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*cd;f=.9;h=.5;M(a,(f-d)*b,h*c,!0);N(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);N(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);N(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);N(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.A=new L(.4,.25);b.B=new L(.65,.75);w.q(a);return b},XorGate:function(a,b,c){a=w.s();var d=.5*cd;M(a,.1*b,0,!1);N(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);M(a,.2*b,0,!0);N(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);N(a,.9*b,(.5+d)*
            c,(.2+d)*b,1*c,.2*b,1*c);N(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);O(a);b=a.o;b.A=new L(.4,.25);b.B=new L(.8,.75);w.q(a);return b},Capacitor:function(a,b,c){a=w.s();M(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},Resistor:function(a,b,c){a=w.s();M(a,0,.5*c,!1);a.lineTo(.1*b,0);a.lineTo(.2*b,1*c);a.lineTo(.3*b,0);a.lineTo(.4*b,1*c);a.lineTo(.5*b,0);a.lineTo(.6*b,1*c);a.lineTo(.7*b,.5*c);b=a.o;w.q(a);return b},Inductor:function(a,b,c){a=w.s();var d=.1*cd,e=.1;M(a,(e-.5*
            d)*b,c,!1);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;N(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);N(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;N(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.o;w.q(a);return b},ACvoltageSource:function(a,b,c){a=w.s();var d=.5*cd;M(a,0*b,.5*c,!1);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*
            c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);N(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.o;b.be=Qj;w.q(a);return b},DCvoltageSource:function(a,b,c){a=w.s();M(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},Diode:function(a,b,c){a=w.s();M(a,1*b,0,!1);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);a.lineTo(1*b,1*c);b=a.o;b.A=new L(0,.25);b.B=new L(.5,.75);w.q(a);return b},Wifi:function(a,b,c){var d=b,e=c;
            b*=.38;c*=.6;a=w.s();var f=.8*cd,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;M(a,k*b+d,(l+h)*c+e,!0);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);N(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);N(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a);f=.4*cd;h=.4;k=.2;l=.5;M(a,k*b+d,(l+h)*c+e,!0);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*
                b+d,(l-h)*c+e);N(a,k*b+d,(l-h)*c+e,(k-h+.5*f)*b+d,(l-f)*c+e,(k-h+.5*f)*b+d,l*c+e);N(a,(k-h+.5*f)*b+d,(l+f)*c+e,k*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(a);f=.2*cd;h=.2;l=k=.5;M(a,(k-h)*b+d,l*c+e,!0);N(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);N(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);f=.4*cd;h=.4;k=.8;l=.5;M(a,k*b+d,(l-h)*c+e,!0);N(a,(k+f)*b+d,(l-
                h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);N(a,(k+h-.5*f)*b+d,(l-f)*c+e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a);f=.8*cd;h=.8;k=1;l=.5;M(a,k*b+d,(l-h)*c+e,!0);N(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);N(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);N(a,k*b+d,(l+h)*c+e,(k+h-.5*f)*b+d,(l+f)*c+e,(k+h-.5*f)*b+d,l*c+e);N(a,(k+h-.5*f)*b+d,(l-f)*c+
                e,k*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a);b=a.o;w.q(a);return b},Email:function(a,b,c){a=w.s();M(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);O(a);M(a,0,0,!1);a.lineTo(.5*b,.6*c);a.lineTo(1*b,0);a.moveTo(0,1*c);a.lineTo(.45*b,.54*c);a.moveTo(1*b,1*c);a.lineTo(.55*b,.54*c);a.bb(!1);b=a.o;w.q(a);return b},Ethernet:function(a,b,c){a=w.s();M(a,.35*b,0,!0);a.lineTo(.65*b,0);a.lineTo(.65*b,.4*c);a.lineTo(.35*b,.4*c);a.lineTo(.35*b,0);O(a);M(a,.1*b,1*c,!0,!0);a.lineTo(.4*b,1*c);
            a.lineTo(.4*b,.6*c);a.lineTo(.1*b,.6*c);a.lineTo(.1*b,1*c);O(a);M(a,.6*b,1*c,!0,!0);a.lineTo(.9*b,1*c);a.lineTo(.9*b,.6*c);a.lineTo(.6*b,.6*c);a.lineTo(.6*b,1*c);O(a);M(a,0,.5*c,!1);a.lineTo(1*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.5*b,.4*c);a.moveTo(.75*b,.5*c);a.lineTo(.75*b,.6*c);a.moveTo(.25*b,.5*c);a.lineTo(.25*b,.6*c);a.bb(!1);b=a.o;w.q(a);return b},Power:function(a,b,c){a=w.s();var d=.4*cd,e=.4,f=w.K(),h=w.K(),k=w.K(),l=w.K();ee(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);var m=w.xb(h.x,
            h.y);M(a,h.x*b,h.y*c,!0);N(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);N(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);N(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);ee(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);N(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*cd;e=.3;ee(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);a.lineTo(h.x*b,h.y*c);N(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);N(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);N(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+
            e)*b,.5*c);ee(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);N(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);O(a);M(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);O(a);w.v(f);w.v(h);w.v(k);w.v(l);w.v(m);b=a.o;b.A=new L(.25,.55);b.B=new L(.75,.8);w.q(a);return b},Fallout:function(a,b,c){a=w.s();var d=.5*cd;M(a,0*b,.5*c,!0);N(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);N(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,
            .5*c);var e=d=0;M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.4;e=0;O(a);M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);d=.2;e=-.3;O(a);M(a,(.3+d)*b,(.8+e)*c,!0,!0);a.lineTo((.5+d)*b,(.5+e)*c);a.lineTo((.1+d)*b,(.5+e)*c);a.lineTo((.3+d)*b,(.8+e)*c);O(a);b=a.o;b.be=Qj;w.q(a);return b},IrritationHazard:function(a,b,c){a=w.s();M(a,.2*b,0*c,!0);a.lineTo(.5*b,.3*c);a.lineTo(.8*
            b,0*c);a.lineTo(1*b,.2*c);a.lineTo(.7*b,.5*c);a.lineTo(1*b,.8*c);a.lineTo(.8*b,1*c);a.lineTo(.5*b,.7*c);a.lineTo(.2*b,1*c);a.lineTo(0*b,.8*c);a.lineTo(.3*b,.5*c);a.lineTo(0*b,.2*c);O(a);b=a.o;b.A=new L(.3,.3);b.B=new L(.7,.7);w.q(a);return b},ElectricalHazard:function(a,b,c){a=w.s();M(a,.37*b,0*c,!0);a.lineTo(.5*b,.11*c);a.lineTo(.77*b,.04*c);a.lineTo(.33*b,.49*c);a.lineTo(1*b,.37*c);a.lineTo(.63*b,.86*c);a.lineTo(.77*b,.91*c);a.lineTo(.34*b,1*c);a.lineTo(.34*b,.78*c);a.lineTo(.44*b,.8*c);a.lineTo(.65*
            b,.56*c);a.lineTo(0*b,.68*c);O(a);b=a.o;w.q(a);return b},FireHazard:function(a,b,c){a=w.s();M(a,.1*b,1*c,!0);N(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);N(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);N(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);N(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);N(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);N(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);O(a);b=a.o;b.A=new L(.05,.645);b.B=new L(.884,.908);w.q(a);return b},BpmnActivityLoop:function(a,b,c){a=w.s();var d=4*(Math.SQRT2-1)/3*.5;M(a,.65*b,1*c,
            !1);N(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);N(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);N(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);N(a,0*b,(.5+d+0)*c,(.5-d+0)*b,1*c,.35*b,.98*c);a.moveTo(.25*b,.8*c);a.lineTo(.35*b,1*c);a.lineTo(.1*b,1*c);b=a.o;w.q(a);return b},BpmnActivityParallel:function(a,b,c){a=w.s();M(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(.5*b,0);a.lineTo(.5*b,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},BpmnActivitySequential:function(a,b,c){a=w.s();M(a,0,0,!1);a.lineTo(1*
            b,0);a.moveTo(0,.5*c);a.lineTo(1*b,.5*c);a.moveTo(0,1*c);a.lineTo(1*b,1*c);b=a.o;w.q(a);return b},BpmnActivityAdHoc:function(a,b,c){a=w.s();M(a,0,0,!1);M(a,1*b,1*c,!1);M(a,0,.5*c,!1);N(a,.2*b,.35*c,.3*b,.35*c,.5*b,.5*c);N(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.o;w.q(a);return b},BpmnActivityCompensation:function(a,b,c){a=w.s();M(a,0,.5*c,!0);a.lineTo(.5*b,0);a.lineTo(.5*b,.5*c);a.lineTo(1*b,1*c);a.lineTo(1*b,0);a.lineTo(.5*b,.5*c);a.lineTo(.5*b,1*c);O(a);b=a.o;w.q(a);return b},BpmnTaskMessage:function(a,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      b,c){a=w.s();M(a,0,.2*c,!0);a.lineTo(1*b,.2*c);a.lineTo(1*b,.8*c);a.lineTo(0,.8*c);a.lineTo(0,.8*c);O(a);M(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.bb(!1);b=a.o;w.q(a);return b},BpmnTaskScript:function(a,b,c){a=w.s();M(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);N(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);N(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);O(a);M(a,.45*b,.73*c,!1);a.lineTo(.7*b,.73*c);a.moveTo(.38*b,.5*c);a.lineTo(.63*b,.5*c);a.moveTo(.31*b,.27*c);a.lineTo(.56*b,.27*c);a.bb(!1);b=a.o;w.q(a);return b},
        BpmnTaskUser:function(a,b,c){a=w.s();M(a,0,0,!1);M(a,.335*b,(1-.555)*c,!0);a.lineTo(.335*b,.595*c);a.lineTo(.665*b,.595*c);a.lineTo(.665*b,(1-.555)*c);N(a,.88*b,.46*c,.98*b,.54*c,1*b,.68*c);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.68*c);N(a,.02*b,.54*c,.12*b,.46*c,.335*b,(1-.555)*c);a.lineTo(.365*b,.405*c);var d=.5-.285,e=Math.PI/4,f=4*(1-Math.cos(e))/(3*Math.sin(e)),e=f*d,f=f*d;N(a,(.5-(e+d)/2)*b,(d+(d+f)/2)*c,(.5-d)*b,(d+f)*c,(.5-d)*b,d*c);N(a,(.5-d)*b,(d-f)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c);
            N(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-f)*c,(.5+d)*b,d*c);N(a,(.5+d)*b,(d+f)*c,(.5+(e+d)/2)*b,(d+(d+f)/2)*c,.635*b,.405*c);a.lineTo(.635*b,.405*c);a.lineTo(.665*b,(1-.555)*c);a.lineTo(.665*b,.595*c);a.lineTo(.335*b,.595*c);M(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);M(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.o;w.q(a);return b},BpmnEventConditional:function(a,b,c){a=w.s();M(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);O(a);M(a,.2*b,.2*c,!1);a.lineTo(.8*b,.2*c);a.moveTo(.2*b,.4*c);a.lineTo(.8*
            b,.4*c);a.moveTo(.2*b,.6*c);a.lineTo(.8*b,.6*c);a.moveTo(.2*b,.8*c);a.lineTo(.8*b,.8*c);a.bb(!1);b=a.o;w.q(a);return b},BpmnEventError:function(a,b,c){a=w.s();M(a,0,1*c,!0);a.lineTo(.33*b,0);a.lineTo(.66*b,.5*c);a.lineTo(1*b,0);a.lineTo(.66*b,1*c);a.lineTo(.33*b,.5*c);O(a);b=a.o;w.q(a);return b},BpmnEventEscalation:function(a,b,c){a=w.s();M(a,0,0,!1);M(a,1*b,1*c,!1);M(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);O(a);b=a.o;w.q(a);return b},BpmnEventTimer:function(a,b,c){a=
            w.s();var d=.5*cd;M(a,1*b,.5*c,!0);N(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);N(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);N(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);N(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);M(a,.5*b,0,!1);a.lineTo(.5*b,.15*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,.85*c);a.moveTo(0,.5*c);a.lineTo(.15*b,.5*c);a.moveTo(1*b,.5*c);a.lineTo(.85*b,.5*c);a.moveTo(.5*b,.5*c);a.lineTo(.58*b,.1*c);a.moveTo(.5*b,.5*c);a.lineTo(.78*b,.54*c);a.bb(!1);b=a.o;b.be=Qj;w.q(a);return b}},Wq;for(Wq in jq)jq[Wq.toLowerCase()]=Wq;
    var qq={"":"",Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z",Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z",Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z",BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z",Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z",BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z",SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z",BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z",OpenTriangle:"m 0,0 l 8,4 -8,4",BackwardOpenTriangle:"m 8,0 l -8,4 8,4",OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",
        BackwardOpenTriangleLine:"m 8,0 l  -8,4 8,4 m -8.5,0 l 0,-8",OpenTriangleTop:"m 0,0 l 8,4 m 0,4",BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4",OpenTriangleBottom:"m 0,8 l 8,-4",BackwardOpenTriangleBottom:"m 0,4 l 8,4",HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8",BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8",HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z",BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z",ForwardSemiCircle:"m 4,0 b 270 180 0 4 4",BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4",Feather:"m 0,0 l 3,4 -3,4",
        BackwardFeather:"m 3,0 l -3,4 3,4",DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4",TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4",BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4",ForwardSlash:"m 0,8 l 5,-8",BackSlash:"m 0,0 l 5,8",DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8",DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8",TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",
        TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8",Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4",LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4",BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8",CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3",CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",
        BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3",Circle:"F1 m 8,4 b 0 360 -4 0 4 z",Block:"F1 m 0,0 l 0,8 8,0 0,-8 z",StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z",Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z",Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z",StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z",NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z",X:"m 0,0 l 8,8 m 0,-8 l -8,8",TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",
        DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z  m 4,0 l 4,4 -4,4 0,-8 z",BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z",ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z",RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z",SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z",AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z",BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",
        TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8",CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z",DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z",EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3",FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z",Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z",HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8",HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",
        OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z",PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z",LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z",DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z",CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8",DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z",PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",
        OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4",OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0",Line:"m 0,0 l 0,8",DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8",TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8",PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"};
    function nq(a){var b=Rd[a];if(void 0===b){var c=a.toLowerCase();if("none"===c)return"None";b=Rd[c];if(void 0===b){var d=null,e;for(e in qq)if(e.toLowerCase()===c){d=e;break}if(null!==d)return a=Pe(qq[d],!1),Rd[d]=a,c!==d&&(Rd[c]=d),d}}return"string"===typeof b?b:b instanceof Ce?a:null}
    function R(a){C.call(this,a);this.N=2408959;this.ql=this.yi="";this.Ms=this.Js=this.Vs=this.Vr=null;this.Xs="";this.wi=this.Hr=this.Ws=this.cn=null;this.Ls="";this.ip=null;this.Ks=Gd;this.Ns="";this.jp=null;this.Jd="";this.Uv=this.Vq=this.al=null;this.Ti=(new z(NaN,NaN)).freeze();this.$r="";this.tl=null;this.as=Ab;this.js=pd;this.bs=qd;this.or=null;this.Wr=Xq;this.en=od;this.dn="gray";this.Gg=4;this.eD=-1;this.vt=NaN;this.NG=new B;this.Rm=null;this.ck=NaN}w.Ka(R,C);w.ga("Part",R);
    R.prototype.cloneProtected=function(a){C.prototype.cloneProtected.call(this,a);a.N=this.N&-4097|49152;a.yi=this.yi;a.ql=this.ql;a.Vr=this.Vr;a.Vs=this.Vs;a.Js=this.Js;a.Ms=this.Ms;a.Xs=this.Xs;a.Ws=this.Ws;a.Hr=this.Hr;a.wi=null;a.Ls=this.Ls;a.Ks=this.Ks.S();a.Ns=this.Ns;a.Jd=this.Jd;a.Vq=this.Vq;a.Ti.assign(this.Ti);a.$r=this.$r;a.as=this.as.S();a.js=this.js.S();a.bs=this.bs.S();a.or=this.or;a.Wr=this.Wr;a.en=this.en.S();a.dn=this.dn;a.Gg=this.Gg;a.vt=this.vt};
    R.prototype.oi=function(a){C.prototype.oi.call(this,a);a.Gk();a.cn=null;a.ip=null;a.jp=null;a.tl=null;a.Rm=null};R.prototype.toString=function(){var a=w.lf(Object.getPrototypeOf(this))+"#"+w.Od(this);null!==this.data&&(a+="("+Rf(this.data)+")");return a};R.LayoutNone=0;var Lm;R.LayoutAdded=Lm=1;var Um;R.LayoutRemoved=Um=2;R.LayoutShown=4;R.LayoutHidden=8;R.LayoutNodeSized=16;var An;R.LayoutGroupLayout=An=32;R.LayoutNodeReplaced=64;var Xq;R.LayoutStandard=Xq=Lm|Um|28|An|64;R.LayoutAll=16777215;
    R.prototype.Xn=function(a,b,c,d,e,f,h){var k=this.g;null!==k&&(a===Pf&&"elements"===b?e instanceof C?Mm(e,function(a){Om(k,a);Nm(k,a)}):e instanceof xl&&mn(k,e):a===Qf&&"elements"===b&&(e instanceof C?Mm(e,function(a){Sm(k,a);Rm(k,a)}):e instanceof xl&&nn(k,e)),k.ad(a,b,c,d,e,f,h))};R.prototype.updateTargetBindings=R.prototype.Ib=function(a){C.prototype.Ib.call(this,a);if(null!==this.data){a=this.xa.n;for(var b=a.length,c=0;ch&&a.y>k&&a.righth&&b.y>k&&b.right=c.UI)){this.N^=4096;var d=!1;if(null!==c){d=c.wb;c.wb=!0;var e=c.selection;e.Qa();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.de();a=this.DJ;null!==a&&a(this);null!==c&&(c.Ne(),c.wb=d)}}});
    w.defineProperty(R,{Qg:"isHighlighted"},function(){return 0!==(this.N&524288)},function(a){var b=0!==(this.N&524288);if(b!==a){this.N^=524288;var c=this.g;null!==c&&(c=c.Zl,c.Qa(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.oa();a=this.mI;null!==a&&a(this)}});w.defineProperty(R,{dm:"isShadowed"},function(){return 0!==(this.N&8192)},function(a){var b=0!==(this.N&8192);b!==a&&(this.N^=8192,this.h("isShadowed",b,a),this.oa())});function Em(a){return 0!==(a.N&32768)}
    function $q(a,b){a.N=b?a.N|32768:a.N&-32769}function Ho(a,b){a.N=b?a.N|65536:a.N&-65537}function jl(a){return 0!==(a.N&131072)}R.prototype.Hf=function(a){this.N=a?this.N|131072:this.N&-131073};function ir(a,b){a.N=b?a.N|1048576:a.N&-1048577}w.defineProperty(R,{oF:"isAnimated"},function(){return 0!==(this.N&262144)},function(a){var b=0!==(this.N&262144);b!==a&&(this.N^=262144,this.h("isAnimated",b,a))});
    w.defineProperty(R,{mI:"highlightedChanged"},function(){return this.Hr},function(a){var b=this.Hr;b!==a&&(null!==a&&w.j(a,"function",R,"highlightedChanged"),this.Hr=a,this.h("highlightedChanged",b,a))});w.defineProperty(R,{jB:"selectionObjectName"},function(){return this.Xs},function(a){var b=this.Xs;b!==a&&(this.Xs=a,this.cn=null,this.h("selectionObjectName",b,a))});
    w.defineProperty(R,{CJ:"selectionAdornmentTemplate"},function(){return this.Vs},function(a){var b=this.Vs;b!==a&&(this instanceof W&&(a.type=hj),this.Vs=a,this.h("selectionAdornmentTemplate",b,a))});w.u(R,{Iu:"selectionObject"},function(){if(null===this.cn){var a=this.jB;null!==a&&""!==a?(a=this.xd(a),this.cn=null!==a?a:this):this instanceof W?(a=this.path,this.cn=null!==a?a:this):this.cn=this}return this.cn});
    w.defineProperty(R,{DJ:"selectionChanged"},function(){return this.Ws},function(a){var b=this.Ws;b!==a&&(null!==a&&w.j(a,"function",R,"selectionChanged"),this.Ws=a,this.h("selectionChanged",b,a))});w.defineProperty(R,{bG:"resizeAdornmentTemplate"},function(){return this.Js},function(a){var b=this.Js;b!==a&&(this.Js=a,this.h("resizeAdornmentTemplate",b,a))});
    w.defineProperty(R,{dG:"resizeObjectName"},function(){return this.Ls},function(a){var b=this.Ls;b!==a&&(this.Ls=a,this.ip=null,this.h("resizeObjectName",b,a))});w.u(R,{cG:"resizeObject"},function(){if(null===this.ip){var a=this.dG;null!==a&&""!==a?(a=this.xd(a),this.ip=null!==a?a:this):this.ip=this}return this.ip});w.defineProperty(R,{sJ:"resizeCellSize"},function(){return this.Ks},function(a){var b=this.Ks;b.L(a)||(this.Ks=a=a.S(),this.h("resizeCellSize",b,a))});
    w.defineProperty(R,{vJ:"rotateAdornmentTemplate"},function(){return this.Ms},function(a){var b=this.Ms;b!==a&&(this.Ms=a,this.h("rotateAdornmentTemplate",b,a))});w.defineProperty(R,{wJ:"rotateObjectName"},function(){return this.Ns},function(a){var b=this.Ns;b!==a&&(this.Ns=a,this.jp=null,this.h("rotateObjectName",b,a))});w.u(R,{eB:"rotateObject"},function(){if(null===this.jp){var a=this.wJ;null!==a&&""!==a?(a=this.xd(a),this.jp=null!==a?a:this):this.jp=this}return this.jp});
    w.defineProperty(R,{text:"text"},function(){return this.Jd},function(a){var b=this.Jd;b!==a&&(this.Jd=a,this.h("text",b,a))});
    w.defineProperty(R,{Da:"containingGroup"},function(){return this.al},function(a){if(this.ee()){var b=this.al;if(b!==a){null===a||this!==a&&!a.qi(this)||(this===a&&w.k("Cannot make a Group a member of itself: "+this.toString()),w.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.J(Um);var c=this.g;null!==b?jr(b,this):this instanceof V&&null!==c&&c.Dl.remove(this);this.al=a;null!==a?kr(a,this):this instanceof V&&null!==c&&c.Dl.add(this);this.J(Lm);
        if(null!==c){var d=this.data,e=c.aa;null!==d&&e instanceof Q&&e.mB(d,e.pb(null!==a?a.data:null))}d=this.BE;null!==d&&(e=!0,null!==c&&(e=c.Ta,c.Ta=!0),d(this,b,a),null!==c&&(c.Ta=e));if(this instanceof V)for(c=new I(R),jh(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof T)for(d=d.ge;d.next();)pn(d.value);if(this instanceof T){for(d=this.ge;d.next();)pn(d.value);c=this.Wb;null!==c&&pn(c)}this.h("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&ol(b,-1,a))}}else w.k("cannot set the Part.containingGroup of a Link or Adornment")});
    g=R.prototype;g.Gk=function(){var a=this.Da;null!==a&&(a.H(),null!==a.Lb&&a.Lb.H(),a.$f())};g.oa=function(){var a=this.g;null!==a&&!Dm(this)&&!Em(this)&&this.isVisible()&&this.oc.I()&&a.oa(nl(this,this.oc))};g.H=function(){C.prototype.H.call(this);var a=this.g;null!==a&&(a.xg.add(this),this instanceof T&&null!==this.Wb&&Ro(this.Wb),a.Ne(!0))};g.au=function(a){a||(a=this.al,null!==a&&kr(a,this))};g.bu=function(a){a||(a=this.al,null!==a&&jr(a,this))};
    g.yn=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.aa,null!==b&&b.by(a))}};w.defineProperty(R,{BE:"containingGroupChanged"},function(){return this.Vq},function(a){var b=this.Vq;b!==a&&(null!==a&&w.j(a,"function",R,"containingGroupChanged"),this.Vq=a,this.h("containingGroupChanged",b,a))});R.prototype.findSubGraphLevel=function(){return lr(this,this)};function lr(a,b){var c=b.Da;return null!==c?1+lr(a,c):b instanceof T&&(c=b.Wb,null!==c)?lr(a,c):0}
    R.prototype.findTopLevelPart=function(){return mr(this,this)};function mr(a,b){var c=b.Da;return null!==c?mr(a,c):b instanceof T&&(c=b.Wb,null!==c)?mr(a,c):b}w.u(R,{$p:"isTopLevel"},function(){return null!==this.Da||this instanceof T&&null!==this.Wb?!1:!0});R.prototype.isMemberOf=R.prototype.qi=function(a){return a instanceof V?nr(this,this,a):!1};function nr(a,b,c){if(b===c||null===c)return!1;var d=b.Da;return null===d||d!==c&&!nr(a,d,c)?b instanceof T&&(b=b.Wb,null!==b)?nr(a,b,c):!1:!0}
    R.prototype.findCommonContainingGroup=R.prototype.TH=function(a){if(null===a)return null;if(this===a)return this.Da;for(var b=this;null!==b;){b instanceof V&&ir(b,!0);if(b instanceof T){var c=b.Wb;null!==c&&(b=c)}b=b.Da}for(var d=null,b=a;null!==b;){if(0!==(b.N&1048576)){d=b;break}b instanceof T&&(c=b.Wb,null!==c&&(b=c));b=b.Da}for(b=this;null!==b;)b instanceof V&&ir(b,!1),b instanceof T&&(c=b.Wb,null!==c&&(b=c)),b=b.Da;return d};
    w.defineProperty(R,{JI:"layoutConditions"},function(){return this.Wr},function(a){var b=this.Wr;b!==a&&(this.Wr=a,this.h("layoutConditions",b,a))});R.prototype.canLayout=function(){if(!this.xF||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Mc||this instanceof T&&this.Bf?!1:!0};
    R.prototype.invalidateLayout=R.prototype.J=function(a){void 0===a&&(a=16777215);var b;this.xF&&0!==(a&this.JI)?(b=this.layer,null!==b&&b.Mc||this instanceof T&&this.Bf?b=!1:(b=this.g,b=null!==b&&b.ia.ab?!1:!0)):b=!1;if(b)if(b=this.al,null!==b){var c=b.Tb;null!==c?c.J():b.J(a)}else a=this.g,null!==a&&(c=a.Tb,null!==c&&c.J())};function Qm(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Mc?!1:!0}
    w.defineProperty(R,{LE:"dragComputation"},function(){return this.or},function(a){var b=this.or;b!==a&&(null!==a&&w.j(a,"function",R,"dragComputation"),this.or=a,this.h("dragComputation",b,a))});w.defineProperty(R,{GJ:"shadowOffset"},function(){return this.en},function(a){var b=this.en;b.L(a)||(this.en=a=a.S(),this.oa(),this.h("shadowOffset",b,a))});
    w.defineProperty(R,{shadowColor:"shadowColor"},function(){return this.dn},function(a){var b=this.dn;b!==a&&(this.dn=a,this.oa(),this.h("shadowColor",b,a))});w.defineProperty(R,{shadowBlur:"shadowBlur"},function(){return this.Gg},function(a){var b=this.Gg;b!==a&&(this.Gg=a,this.oa(),this.h("shadowBlur",b,a))});function kh(a){0===arguments.length?R.call(this,Tj):R.call(this,a);this.N&=-257;this.ql="Adornment";this.Fc=null;this.pD=0;this.gE=!1;this.Lb=this.bh=null}w.Ka(kh,R);w.ga("Adornment",kh);
    kh.prototype.toString=function(){var a=this.xf;return"Adornment("+this.vd+")"+(null!==a?a.toString():"")};kh.prototype.updateRelationshipsFromData=function(){};kh.prototype.qu=function(a){var b=this.sb.U,c=this.sb;if(b instanceof W&&c instanceof X){var d=b.path,c=d.kf;b.qu(a);c=d.kf;a=this.xa.n;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.yh){b.yh=!0;var c=new I(T);c.add(this);zr(this,c,b.Td,a,b.Oa,this,b.DB===ul);b.yh=!1}};
    function zr(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.yh){b.yh=!0;var c=new I(T);c.add(this);Br(this,c,b.Td,a,b.Oa,this,b.DB===ul);b.yh=!1}};function Br(a,b,c,d,e,f,h){for(var k=f===a?!1:a.tc,l=c?a.nx():a.Og();l.next();){var m=l.value;m.Nc&&(k||m.Mf||m.$b(),m=m.tA(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.yd(!0),m.Gk(),h&&fl(e,m,f)),2c&&(c-=180);break;case Sp:c=ye(b+90);90c&&(c-=180);break;case Up:c=ye(b-90);90c&&(c-=180);break;case Vp:c=ye(b);if(45c||225c)return 0;90c&&(c-=180)}return ye(c)};
    w.defineProperty(W,{Y:"fromNode"},function(){return this.tg},function(a){var b=this.tg;if(b!==a){var c=this.Lc;null!==b&&(this.Jg!==b&&wr(b,this,c),Jr(this),this.J(Um));this.tg=a;null!==a&&this.yd(a.isVisible());this.Ki=null;this.$b();var d=this.g;if(null!==d){var e=this.data,f=d.aa;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.kB(e,f.pb(h))}else f instanceof $f&&(h=null!==a?a.data:null,d.Td?f.ti(e,f.pb(h)):(null!==b&&f.ti(b.data,void 0),f.ti(h,f.pb(null!==this.Jg?this.Jg.data:null))))}e=
        this.Lc;f=this.YE;null!==f&&(h=!0,null!==d&&(h=d.Ta,d.Ta=!0),f(this,c,e),null!==d&&(d.Ta=h));null!==a&&(this.Jg!==a&&vr(a,this,e),Kr(this),this.J(Lm));this.h("fromNode",b,a);pn(this)}});
    w.defineProperty(W,{Pg:"fromPortId"},function(){return this.Qh},function(a){var b=this.Qh;if(b!==a){var c=this.Y,d=this.Lc;null!==d&&ur(c,d);Jr(this);this.Qh=a;var e=this.Lc;null!==e&&ur(c,e);c=this.g;if(null!==c){var f=this.data,h=c.aa;null!==f&&h instanceof Q&&h.lB(f,a)}d!==e&&(this.Ki=null,this.$b(),f=this.YE,null!==f&&(h=!0,null!==c&&(h=c.Ta,c.Ta=!0),f(this,d,e),null!==c&&(c.Ta=h)));Kr(this);this.h("fromPortId",b,a)}});w.u(W,{Lc:"fromPort"},function(){var a=this.tg;return null===a?null:a.oA(this.Qh)});
    w.defineProperty(W,{YE:"fromPortChanged"},function(){return this.yr},function(a){var b=this.yr;b!==a&&(null!==a&&w.j(a,"function",W,"fromPortChanged"),this.yr=a,this.h("fromPortChanged",b,a))});
    w.defineProperty(W,{$:"toNode"},function(){return this.Jg},function(a){var b=this.Jg;if(b!==a){var c=this.ld;null!==b&&(this.tg!==b&&wr(b,this,c),Jr(this),this.J(Um));this.Jg=a;null!==a&&this.yd(a.isVisible());this.Ki=null;this.$b();var d=this.g;if(null!==d){var e=this.data,f=d.aa;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.qB(e,f.pb(h))}else f instanceof $f&&(h=null!==a?a.data:null,d.Td?(null!==b&&f.ti(b.data,void 0),f.ti(h,f.pb(null!==this.tg?this.tg.data:null))):f.ti(e,f.pb(h)))}e=
        this.ld;f=this.xG;null!==f&&(h=!0,null!==d&&(h=d.Ta,d.Ta=!0),f(this,c,e),null!==d&&(d.Ta=h));null!==a&&(this.tg!==a&&vr(a,this,e),Kr(this),this.J(Lm));this.h("toNode",b,a);pn(this)}});
    w.defineProperty(W,{Hh:"toPortId"},function(){return this.li},function(a){var b=this.li;if(b!==a){var c=this.$,d=this.ld;null!==d&&ur(c,d);Jr(this);this.li=a;var e=this.ld;null!==e&&ur(c,e);c=this.g;if(null!==c){var f=this.data,h=c.aa;null!==f&&h instanceof Q&&h.rB(f,a)}d!==e&&(this.Ki=null,this.$b(),f=this.xG,null!==f&&(h=!0,null!==c&&(h=c.Ta,c.Ta=!0),f(this,d,e),null!==c&&(c.Ta=h)));Kr(this);this.h("toPortId",b,a)}});w.u(W,{ld:"toPort"},function(){var a=this.Jg;return null===a?null:a.oA(this.li)});
    w.defineProperty(W,{xG:"toPortChanged"},function(){return this.pt},function(a){var b=this.pt;b!==a&&(null!==a&&w.j(a,"function",W,"toPortChanged"),this.pt=a,this.h("toPortChanged",b,a))});w.defineProperty(W,{Ab:"fromSpot"},function(){return null!==this.V?this.V.Tj:qc},function(a){this.Pd();var b=this.V.Tj;b.L(a)||(a=a.S(),this.V.Tj=a,this.h("fromSpot",b,a),this.$b())});
    w.defineProperty(W,{Vl:"fromEndSegmentLength"},function(){return null!==this.V?this.V.Rj:NaN},function(a){this.Pd();var b=this.V.Rj;b!==a&&(0>a&&w.Fa(a,">= 0",W,"fromEndSegmentLength"),this.V.Rj=a,this.h("fromEndSegmentLength",b,a),this.$b())});w.defineProperty(W,{Wt:"fromEndSegmentDirection"},function(){return null!==this.V?this.V.Qj:pr},function(a){this.Pd();var b=this.V.Qj;b!==a&&(w.It("Link.fromEndSegmentDirection","2.0"),this.V.Qj=a,this.h("fromEndSegmentDirection",b,a),this.$b())});
    w.defineProperty(W,{Xt:"fromShortLength"},function(){return null!==this.V?this.V.Sj:NaN},function(a){this.Pd();var b=this.V.Sj;b!==a&&(this.V.Sj=a,this.h("fromShortLength",b,a),this.$b())});w.defineProperty(W,{Bb:"toSpot"},function(){return null!==this.V?this.V.pk:qc},function(a){this.Pd();var b=this.V.pk;b.L(a)||(a=a.S(),this.V.pk=a,this.h("toSpot",b,a),this.$b())});
    w.defineProperty(W,{nm:"toEndSegmentLength"},function(){return null!==this.V?this.V.nk:NaN},function(a){this.Pd();var b=this.V.nk;b!==a&&(0>a&&w.Fa(a,">= 0",W,"toEndSegmentLength"),this.V.nk=a,this.h("toEndSegmentLength",b,a),this.$b())});w.defineProperty(W,{Pu:"toEndSegmentDirection"},function(){return null!==this.V?this.V.mk:pr},function(a){this.Pd();var b=this.V.mk;b!==a&&(w.It("Link.toEndSegmentDirection","2.0"),this.V.mk=a,this.h("toEndSegmentDirection",b,a),this.$b())});
    w.defineProperty(W,{Qu:"toShortLength"},function(){return null!==this.V?this.V.ok:NaN},function(a){this.Pd();var b=this.V.ok;b!==a&&(this.V.ok=a,this.h("toShortLength",b,a),this.$b())});
    function pn(a){var b=a.Y,c=a.$,d=null,b=d=null!==b?null!==c?b.TH(c):b.Da:null!==c?c.Da:null,c=a.al;if(c!==b){null!==c&&jr(c,a);a.al=b;null!==b&&kr(b,a);var e=a.BE;if(null!==e){var f=!0,h=a.g;null!==h&&(f=h.Ta,h.Ta=!0);e(a,c,b);null!==h&&(h.Ta=f)}!a.Mf||a.RD!==c&&a.SD!==c||a.$b()}if(a.yI)for(a=a.Ef;a.next();)a.value.Da=d}W.prototype.Gk=function(){var a=this.Da;null!==a&&this.Y!==a&&this.$!==a&&a.Yw&&R.prototype.Gk.call(this)};
    W.prototype.getOtherNode=W.prototype.tA=function(a){var b=this.Y;return a===b?this.$:b};W.prototype.getOtherPort=function(a){var b=this.Lc;return a===b?this.ld:b};w.u(W,{yI:"isLabeledLink"},function(){return null===this.uf?!1:0=d&&(h=d-1);var l=this.l(h-1),f=this.l(h);Wd(e.x,e.y,k.x,k.y,l.x,l.y,f.x,f.y,.5,a);b=Math.min(f.x,b);c=Math.min(f.y,c);e=f}else for(e=this.l(0),f=this.l(1),b=Math.min(e.x,f.x),c=Math.min(e.y,f.y),a.m(e.x,e.y,0,0),a.vi(f),h=2;hc&&(c=-c)):Wa(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.zf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}w.ta(f);b=this.l(h);f=this.l(h+1);b.x===f.x?b.y>f.y?a.m(b.x,b.y-(e/2-c)):a.m(b.x,b.y+(e/2-c)):b.y===f.y?b.x>f.x?a.m(b.x-(e/2-c),b.y):a.m(b.x+(e/2-c),b.y):(c=(e/2-c)/d,a.m(b.x+c*(f.x-b.x),b.y+c*(f.y-b.y)));return a};w.u(W,{HF:"midAngle"},function(){this.eo();return this.computeMidAngle()});
    W.prototype.computeMidAngle=function(){var a=this.qa;if(2>a)return NaN;if(this.computeCurve()===Jj&&4<=a&&!this.ac){var b=(a-1)/3|0,c=3*(b/2|0);if(1===b%2){var c=Math.floor(c),b=this.l(c),d=this.l(c+1),a=this.l(c+2),c=this.l(c+3),e=d.x,d=d.y,f=a.x,a=a.y,h=(e+f)/2,k=(d+a)/2;return Ta(((b.x+e)/2+h)/2,((b.y+d)/2+k)/2,(h+(f+c.x)/2)/2,(k+(a+c.y)/2)/2)}if(0e+10?b.Pb(d):e>c+10?d.Pb(a):b.Pb(a)):null===this.Ua||this.ac?b.Pb(d):this.Ua.ZE(.5);if(null!==this.Ua&&!this.ac)return this.Ua.ZE(.5);b=this.l(c-1);d=this.l(c);a=this.l(c+1);c=b.zf(d);e=d.zf(a);return c>e+10?b.Pb(d):e>c+10?d.Pb(a):b.Pb(a)};
    w.defineProperty(W,{points:"points"},function(){return this.fd},function(a){var b=this.fd;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;em&&(p=-p),u=(0>
        l?-1:1)*p+r,t=n*(u-r)+s);var r=h.x+2*k/3,s=h.y+2*l/3,x=r,v=s;J(l,0)?v=0l?-1:1)*p+r,v=n*(x-r)+s);this.Gp();this.mi(h);this.ij(u,t);this.ij(x,v);this.mi(q);this.Yg(0,this.getLinkPoint(b,c,d,!0,!1,e,f));this.Yg(3,this.getLinkPoint(e,f,a,!1,!1,b,c))}else d=this.getLinkPoint(b,c,d,!0,!1,e,f),a=this.getLinkPoint(e,f,a,!1,!1,b,c),this.hasCurviness()?(q=a.x-d.x,e=a.y-d.y,f=this.computeCurviness(),b=d.x+q/2,c=d.y+e/2,h=b,k=c,J(e,0)?k=0f&&(h=-h),
        h=(0>e?-1:1)*h+b,k=q*(h-b)+c),this.mi(d),this.ij(h,k)):this.mi(d),this.mi(a)}else{p=this.$l;q&&(n&&p||m)&&this.Gp();var A=m?this.computeCurviness():0,p=this.getLinkPoint(b,c,d,!0,n,e,f),r=u=s=0;if(n||!k||m)if(t=this.computeEndSegmentLength(b,c,d,!0),r=this.getLinkDirection(b,c,p,d,!0,n,e,f),m&&(k||d.L(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(r-=n?90:30,0>A&&(r-=180)),0>r?r+=360:360<=r&&(r-=360),m&&(t+=Math.abs(A)*(n?1:2)),0===r?s=t:90===r?u=t:180===r?s=-t:270===r?u=-t:(s=t*Math.cos(r*Math.PI/180),u=t*
            Math.sin(r*Math.PI/180)),d.Sd()&&m){var y=c.Wa(Jb,w.K()),K=w.xb(y.x+1E3*s,y.y+1E3*u);this.getLinkPointFromPoint(b,c,y,K,!0,p);w.v(y);w.v(K)}var t=this.getLinkPoint(e,f,a,!1,n,b,c),E=v=x=0;if(n||!l||m)y=this.computeEndSegmentLength(e,f,a,!1),E=this.getLinkDirection(e,f,t,a,!1,n,b,c),m&&(l||d.L(a)||!n&&1===d.x+a.x&&1===d.y+a.y)&&(E+=n?0:30,0>A&&(E+=180)),0>E?E+=360:360<=E&&(E-=360),m&&(y+=Math.abs(A)*(n?1:2)),0===E?x=y:90===E?v=y:180===E?x=-y:270===E?v=-y:(x=y*Math.cos(E*Math.PI/180),v=y*Math.sin(E*
            Math.PI/180)),a.Sd()&&m&&(y=f.Wa(Jb,w.K()),K=w.xb(y.x+1E3*x,y.y+1E3*v),this.getLinkPointFromPoint(e,f,y,K,!1,t),w.v(y),w.v(K));a=p;if(n||!k||m)a=new z(p.x+s,p.y+u);d=t;if(n||!l||m)d=new z(t.x+x,t.y+v);!q&&!n&&k&&3Math.abs(b.y-a.y)?(b.x=b.x>=a.x?a.x+9E9:a.x-9E9,b.y=a.y):(b.y=b.y>=a.y?a.y+9E9:a.y-9E9,b.x=a.x);return b}
    W.prototype.getLinkPointFromPoint=function(a,b,c,d,e,f){void 0===f&&(f=new z);if(null===a||null===b)return f.assign(c),f;a.isVisible()||(e=a.findVisibleNode(),null!==e&&e!==a&&(b=e.port));var h=e=0,k=0,l=0;a=null;e=b.Q;null===e||e.ah()||(e=e.Q);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.rh;e=1/(a.m11*a.m22-a.m12*a.m21);var k=a.m22*e,l=-a.m12*e,m=-a.m21*e,n=a.m11*e,p=e*(a.m21*a.dy-a.m22*a.dx),q=e*(a.m12*a.dx-a.m11*a.dy);e=d.x*k+d.y*m+p;h=d.x*l+d.y*n+q;k=c.x*k+c.y*m+p;l=c.x*l+c.y*n+q}b.Dn(e,h,k,l,
        f);null!==a&&f.transform(a);return f};function Pr(a,b){var c=b.Es;null===c&&(c=new Qr,c.port=b,c.Pc=b.U,b.Es=c);return Rr(c,a)}
    W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new z);if(c.Yc())return b.Wa(c,k),k;if(c.uj()){var l=Pr(this,b);if(null!==l){k.assign(l.dq);if(e&&this.gy===Gr){var m=Pr(this,h);if(null!==m&&l.wn=n.y&&a.y<=n.y+n.height?k.y=a.y:(c.sj(Xb)||c.sj($b))&&a.x>=n.x&&a.x<=n.x+n.width&&(k.x=a.x);w.v(l);w.v(m)}}return k}}c=b.Wa(Jb,w.K());l=f=null;
        this.qa>(e?6:2)?(l=d?this.l(1):this.l(this.qa-2),e&&(l=Or(c,l.copy()))):(f=w.K(),l=h.Wa(Jb,f),e&&(l=Or(c,l)),w.v(f));this.getLinkPointFromPoint(a,b,c,l,d,k);w.v(c);return k};
    W.prototype.getLinkDirection=function(a,b,c,d,e,f,h,k){a:if(d.Yc())c=d.x>d.y?d.x>1-d.y?0:d.x<1-d.y?270:315:d.x1-d.y?90:d.x<1-d.y?180:135:.5>d.x?225:.5(f?6:2)?(n=e?this.l(1):this.l(this.qa-2),n=f?Or(l,n.copy()):c):(m=w.K(),n=k.Wa(Jb,m),w.v(m));c=0;c=Math.abs(n.x-l.x)>Math.abs(n.y-
        l.y)?n.x>=l.x?0:180:n.y>=l.y?90:270;w.v(l)}d.Sd()&&h.qi(a)&&(c+=180,360<=c&&(c-=360));a=pr;a=e?this.Wt:this.Pu;a===pr&&(a=e?b.Wt:b.Pu);switch(a){case qr:b=b.Wl();c+=b;360<=c&&(c-=360);break;case pr:case xo:if(d.BI())break;b=b.Wl();if(0===b)break;45<=b&&135>b?c+=90:135<=b&&225>b?c+=180:225<=b&&315>b&&(c+=270);360<=c&&(c-=360)}return c};
    W.prototype.computeEndSegmentLength=function(a,b,c,d){if(null!==b&&c.uj()&&(a=Pr(this,b),null!==a))return a.jx;a=NaN;a=d?this.Vl:this.nm;null!==b&&isNaN(a)&&(a=d?b.Vl:b.nm);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a,b){var c;if(a)if(c=b?b:this.Lc,null===c)c=Jb;else{var d=this.Ab;d.Xc()&&null!==c&&(d=c.Ab);c=d===qc?yb:d}else c=b?b:this.ld,null===c?c=Jb:(d=this.Bb,d.Xc()&&null!==c&&(d=c.Bb),c=d===qc?yb:d);return c};
    W.prototype.computeOtherPoint=function(a,b){var c=b.Wa(Jb),d;d=b.Es;d=null!==d?Rr(d,this):null;null!==d&&(c=d.dq);return c};W.prototype.computeShortLength=function(a){if(a){if(a=this.Xt,isNaN(a)){var b=this.Lc;null!==b&&(a=b.Xt)}}else a=this.Qu,isNaN(a)&&(b=this.ld,null!==b&&(a=b.Qu));return isNaN(a)?0:a};
    W.prototype.Ak=function(a,b,c,d,e,f){if(!1===this.Xg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=w.Kf(),h.reset());h.multiply(this.transform);if(this.tn(a,h))return aq(this,b,c,e),void 0===f&&w.we(h),!0;if(this.Zf(a,h)){var k=!1;if(!this.In)for(var l=this.xa.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.bg){var p=n.W,q=this.Ja;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=w.Kf();p.set(h);if(n instanceof C)k=n.Ak(a,b,c,d,e,p);else if(this.path===
        n){if(n instanceof X){var k=n,r=a,s=d,q=p;if(!1===k.Xg)k=!1;else if(q.multiply(k.transform),s)b:{var u=r,t=q;if(k.tn(u,t))k=!0;else{if(void 0===t&&(t=k.transform,u.xk(k.W))){k=!0;break b}var q=u.left,r=u.right,s=u.top,u=u.bottom,x=w.K(),v=w.K(),A=w.K(),y=w.Kf();y.set(t);y.KF(k.transform);y.vx();v.x=r;v.y=s;v.transform(y);x.x=q;x.y=s;x.transform(y);t=!1;mq(k,x,v,A)?t=!0:(x.x=r,x.y=u,x.transform(y),mq(k,x,v,A)?t=!0:(v.x=q,v.y=u,v.transform(y),mq(k,x,v,A)?t=!0:(x.x=q,x.y=s,x.transform(y),mq(k,x,v,A)&&
    (t=!0))));w.we(y);w.v(x);w.v(v);w.v(A);k=t}}else k=k.tn(r,q)}}else k=Do(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&(e instanceof I&&e.add(n),e instanceof H&&e.add(n)));w.we(p)}}}void 0===f&&w.we(h);return k||null!==this.background||null!==this.mn}void 0===f&&w.we(h);return!1};w.u(W,{ac:"isOrthogonal"},function(){return 2===(this.Ym.value&2)});w.u(W,{$l:"isAvoiding"},function(){return 4===(this.Ym.value&4)});
    W.prototype.computeCurve=function(){if(null===this.Ki){var a=this.Lc,b=this.ac;this.Ki=null!==a&&a===this.ld&&!b}return this.Ki?Jj:this.af};W.prototype.computeCorner=function(){if(this.af===Jj)return 0;var a=this.fA;if(isNaN(a)||0>a)a=10;return a};W.prototype.findMidLabel=function(){for(var a=this.path,b=this.xa.n,c=b.length,d=0;dl?-Math.PI/2:Math.PI/2:(n=Math.atan(l/Math.abs(k)),0>k&&(n=Math.PI-n));var h=b.x,p=b.y,l=d.x-h,q=d.y-p,r=Math.sqrt(l*l+q*q),k=0;Wa(l,0)?k=0>q?-Math.PI/2:Math.PI/2:(k=Math.atan(q/Math.abs(l)),0>l&&(k=Math.PI-k));m=r/m;n=k-n;this.Yg(a,b);for(a+=
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1;al?-Math.PI/2:Math.PI/2:(q=Math.atan(l/Math.abs(k)),0>k&&(q=Math.PI-q)),k=q+n,b*=m,this.ca(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.Yg(c,d)}}return!0;case Fr:f=this.l(a);p=this.l(c);if(!f.Kc(b)||!p.Kc(d)){var e=f.x,f=f.y,h=p.x,p=p.y,m=(h-e)*(h-e)+(p-f)*(p-f),k=b.x,n=b.y,l=d.x,q=d.y,r=0,s=1;0!==l-k?(r=(q-n)/(l-k),s=Math.sqrt(1+1/(r*r))):r=9E9;this.Yg(a,b);for(a+=1;ab?0:45<=b&&135>b?90:135<=b&&225>b?180:270;d=-45<=d&&45>d?0:45<=d&&135>d?90:135<=d&&225>d?180:270;var h=e.W.copy(),k=f.W.copy();if(h.I()&&k.I()){h.Af(8,8);k.Af(8,8);h.vi(a);k.vi(c);var l,m;if(0===b)if(c.x>a.x||270===d&&c.ya.x||90===d&&c.y>a.y&&k.right>a.x)l=new z(c.x,a.y),m=new z(c.x,(a.y+c.y)/2),180===d?(l.x=this.computeMidOrthoPosition(a.x,c.x,!1),m.x=l.x,m.y=c.y):270===d&&c.ya.y?(l.x=a.xk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.right,m.x=l.x,m.y=c.y):0===d&&a.xk.top&&a.yh.bottom)180===d&&(k.Ia(a)||h.Ia(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(180===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=h.left&&c.x<=a.x||a.x<=k.right&&a.x>=c.x){if(90===d||270===d)l=new z(Math.max((a.x+c.x)/2,a.x),a.y),m=new z(l.x,c.y)}else l.y=270===d||(0===d||180===d)&&c.ya.y&&k.lefta.y?(l.x=a.x>k.right?this.computeMidOrthoPosition(a.x,k.right,!1):a.x>k.left&&(270===d&&a.yk.bottom)?this.computeMidOrthoPosition(a.x,c.x,!1):k.left,m.x=l.x,m.y=c.y):180===d&&a.x>k.right&&a.y>k.top&&a.yh.bottom)0===d&&(k.Ia(a)||h.Ia(c))?l.y=this.computeMidOrthoPosition(a.y,c.y,!0):c.ya.y&&(0===d||270===d)&&(l.y=this.computeMidOrthoPosition(h.bottom,Math.min(c.y,k.top),!0)),m.x=c.x,m.y=l.y;if(l.y>h.top&&l.y=a.x||a.x>=k.left&&a.x<=c.x){if(90===d||270===d)l=new z(Math.min((a.x+c.x)/2,a.x),a.y),m=new z(l.x,c.y)}else l.y=270===
    d||(0===d||180===d)&&c.ya.y||180===d&&c.xa.y||0===d&&c.x>a.x&&k.bottom>a.y)l=new z(a.x,c.y),m=new z((a.x+c.x)/2,c.y),270===d?(l.y=this.computeMidOrthoPosition(a.y,c.y,!0),m.x=c.x,m.y=l.y):180===d&&c.xa.x?(l.y=a.yk.right)?
        this.computeMidOrthoPosition(a.y,c.y,!0):k.bottom,m.x=c.x,m.y=l.y):90===d&&a.yk.left&&a.xh.right)270===d&&(k.Ia(a)||h.Ia(c))?l.x=this.computeMidOrthoPosition(a.x,c.x,!1):c.xa.x&&(270===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,
            Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=h.top&&c.y<=a.y||a.y<=k.bottom&&a.y>=c.y){if(0===d||180===d)l=new z(a.x,Math.max((a.y+c.y)/2,a.y)),m=new z(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xa.x&&k.top=a.x?(l.y=a.y>k.bottom?this.computeMidOrthoPosition(a.y,k.bottom,!0):a.y>k.top&&(180===d&&a.xk.right)?this.computeMidOrthoPosition(a.y,c.y,!0):k.top,m.x=c.x,m.y=l.y):270===d&&a.y>k.bottom&&a.x>k.left&&a.xh.right)90===d&&(k.Ia(a)||h.Ia(c))?l.x=this.computeMidOrthoPosition(a.x,
        c.x,!1):c.xa.x&&(90===d||180===d)&&(l.x=this.computeMidOrthoPosition(h.right,Math.min(c.x,k.left),!1)),m.x=l.x,m.y=c.y;if(l.x>h.left&&l.x=a.y||a.y>=k.top&&a.y<=c.y){if(0===d||180===d)l=new z(a.x,Math.min((a.y+c.y)/2,a.y)),m=new z(c.x,l.y)}else l.x=180===d||(90===d||270===d)&&c.xk&&0!==Ur(s,c.x,c.y)){Vr(this,s,c.x,c.y,d,!0);h=this.l(2);if(4>this.qa)0===b||180===
        b?(h.x=a.x,h.y=c.y):(h.x=c.x,h.y=a.y),this.ca(2,h.x,h.y),this.w(3,h.x,h.y);else if(c=this.l(3),0===b||180===b)J(h.x,c.x)?(h=0===b?Math.max(h.x,a.x):Math.min(h.x,a.x),this.ca(2,h,a.y),this.ca(3,h,c.y)):J(h.y,c.y)?(Math.abs(a.y-h.y)<=s.on/2&&(this.ca(2,h.x,a.y),this.ca(3,c.x,a.y)),this.w(2,h.x,a.y)):this.ca(2,a.x,h.y);else if(90===b||270===b)J(h.y,c.y)?(h=90===b?Math.max(h.y,a.y):Math.min(h.y,a.y),this.ca(2,a.x,h),this.ca(3,c.x,h)):J(h.x,c.x)?(Math.abs(a.x-h.x)<=s.pn/2&&(this.ca(2,a.x,h.y),this.ca(3,
            a.x,c.y)),this.w(2,a.x,h.y)):this.ca(2,h.x,a.y);null!==r&&(a=this.l(1),c=this.l(2),a.x!==c.x&&a.y!==c.y?0===b||180===b?this.w(2,a.x,c.y):this.w(2,c.x,a.y):0===b||180===b?this.w(2,e.x,r.y):this.w(2,r.x,e.y));null!==u&&(0===d||180===d?this.ij(f.x,u.y):this.ij(u.x,f.y));b=!0}else b=!1}}}else b=!1;b||(this.mi(l),this.mi(m))}};W.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};
    function Bi(a){if(null===a.g||!a.$l)return!1;var b=a.points.n,c=b.length;if(4>c)return!1;a=Dn(a.g,!0,a.Da,null);for(var d=1;da)return new Ce(Ge);var b=!1,c=this.g;null!==c&&Lr(this)&&c.cl.contains(this)&&null!==this.qw&&(b=!0);var d=c=0,e=this.l(0).copy(),f=e.copy(),c=this.fd.n,h=this.computeCurve();if(h===Jj&&3<=a&&!Wa(this.vq,0))if(3===a)var k=this.l(1),c=Math.min(e.x,k.x),d=Math.min(e.y,k.y),k=this.l(2),c=Math.min(c,k.x),d=Math.min(d,k.y);else{if(this.ac)for(k=0;k=a&&(k=a-1),c=this.l(k),
        f.x=Math.min(c.x,f.x),f.y=Math.min(c.y,f.y);c=f.x;d=f.y}else{for(k=0;kx?r>q?(u.x=v-y,u.y=q-y,t.x=v+s,t.y=q+s):(u.x=v-y,u.y=q+y,t.x=v+s,t.y=q-s):r>q?(u.x=v+y,u.y=q-y,t.x=v-s,t.y=q+s):(u.x=v+y,u.y=q+y,t.x=v-s,t.y=q-s));Wa(x,v)&&Wa(q,r)&&(q>p?(A>v?(u.x=
        v-y,u.y=q-y,t.x=v+s):(u.x=v+y,u.y=q-y,t.x=v-s),t.y=q+s):(A>v?(u.x=v-y,u.y=q+y,t.x=v+s):(u.x=v+y,u.y=q+y,t.x=v-s),t.y=q-s));if(Wa(x,v)&&Wa(v,A)||Wa(p,q)&&Wa(q,r))x=.5*(x+A),p=.5*(p+r),u.x=x,u.y=p,t.x=x,t.y=p;1===k?(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y)):2===k&&Wa(b.x,this.l(0).x)&&Wa(b.y,this.l(0).y)&&(e.x=.5*(b.x+m.x),e.y=.5*(b.y+m.y));N(l,e.x-c,e.y-d,h.x-c,h.y-d,m.x-c,m.y-d);f.set(h);e.set(a);b=m}}k=b.x;b=b.y;f=this.l(this.qa-1);0!==this.computeShortLength(!1)&&(f=Wr(this,f.copy(),!1,dd));k=.5*(k+f.x);
        b=.5*(b+f.y);N(l,a.x-c,a.y-d,k-c,b-d,f.x-c,f.y-d)}else for(k=3;k=a&&(k=a-1),f=this.l(k-1),e=this.l(k),k===a-1&&0!==this.computeShortLength(!1)&&(e=Wr(this,e.copy(),!1,dd)),N(l,b.x-c,b.y-d,f.x-c,f.y-d,e.x-c,e.y-d);else{f=w.K();f.assign(this.l(0));k=1;for(e=0;k=a-1){if(!f.L(u))0!==this.computeShortLength(!1)&&(u=Wr(this,u.copy(),!1,dd)),Zr(this,l,-c,-d,f,u,b);else if(0===e)for(k=1;kn.x?u.x-s:u.x+s,y=t.y>u.y?u.y+v:u.y-v,Zr(this,k,h,m,n,new z(q,A),p),Qe(k,u.x+h,u.y+m,r+h,y+m),x.m(r,y))):J(n.x,u.x)&&J(u.y,t.y)?(s=this.computeCorner(),v=Math.min(s,Math.abs(u.y-n.y)/2),v=s=Math.min(v,Math.abs(t.x-u.x)/2),J(s,0)?(Zr(this,k,h,m,n,u,
        p),x.assign(u)):(q=u.x,y=A=u.y,A=u.y>n.y?u.y-v:u.y+v,r=t.x>u.x?u.x+s:u.x-s,Zr(this,k,h,m,n,new z(q,A),p),Qe(k,u.x+h,u.y+m,r+h,y+m),x.m(r,y))):(Zr(this,k,h,m,n,u,p),x.assign(u));k=e}w.v(f)}c=l.o;w.q(l)}else l=this.l(1).copy(),l.x-=c,l.y-=d,0!==this.computeShortLength(!0)&&(e=Wr(this,e,!0,f)),0!==this.computeShortLength(!1)&&(l=Wr(this,l,!1,f)),c=new Ce(Ge),c.ha=e.x,c.fa=e.y,c.C=l.x,c.D=l.y;return c};
    function Yr(a,b,c,d){a=c-a;if(isNaN(a)||Infinity===a||-Infinity===a)return NaN;0>a&&(a=-a);b=d-b;if(isNaN(b)||Infinity===b||-Infinity===b)return NaN;0>b&&(b=-b);return Wa(a,0)?b:Wa(b,0)?a:Math.sqrt(a*a+b*b)}
    function Wr(a,b,c,d){var e=a.qa;if(2>e)return b;if(c){var f=a.l(1);c=f.x-d.x;d=f.y-d.y;f=Yr(b.x,b.y,c,d);if(0===f)return b;e=2===e?.5*f:f;a=a.computeShortLength(!0);a>e&&(a=e);c=a*(c-b.x)/f;a=a*(d-b.y)/f;b.x+=c;b.y+=a}else{f=a.l(e-2);c=f.x-d.x;d=f.y-d.y;f=Yr(b.x,b.y,c,d);if(0===f)return b;e=2===e?.5*f:f;a=a.computeShortLength(!1);a>e&&(a=e);c=a*(b.x-c)/f;a=a*(b.y-d)/f;b.x-=c;b.y-=a}return b}
    function Xr(a,b,c,d){for(var e=a.qa,f=b;Wa(b.x,f.x)&&Wa(b.y,f.y);){if(c>=e)return e-1;f=a.l(c++)}if(!Wa(b.x,f.x)&&!Wa(b.y,f.y))return c-1;for(var h=f;Wa(b.x,f.x)&&Wa(f.x,h.x)&&(!d||(b.y>=f.y?f.y>=h.y:f.y<=h.y))||Wa(b.y,f.y)&&Wa(f.y,h.y)&&(!d||(b.x>=f.x?f.x>=h.x:f.x<=h.x));){if(c>=e)return e-1;h=a.l(c++)}return c-2}
    function Zr(a,b,c,d,e,f,h){if(!h&&Lr(a)){h=[];var k=0;a.isVisible()&&(k=$r(a,e,f,h));var l=e.x,l=e.y;if(0p-10)m--,p=Math.max(q-5,f.x);else break;q=f.y-10+d;n=p+c;p=f.y+d;a.af===jj?M(b,n,p,!1,!1):N(b,l,q,n,q,n,p)}else if(J(e.x,f.x))if(e.yp-10)m--,p=Math.max(q-5,f.y);else break;q=f.x-10+c;n=f.x+c;p+=d;a.af===jj?M(b,n,p,!1,!1):N(b,q,l,q,p,n,p)}}b.lineTo(f.x+c,f.y+d)}
    function $r(a,b,c,d){var e=a.g;if(null===e||b.L(c))return 0;for(e=e.Ix;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.zb.n,h=f.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yu&&Math.min(h,x)q&&!J(h,x)){n.x=u;n.y=q;n=!0;break a}}else if(!J(q,s)&&J(h,x)&&Math.min(q,s)h&&Math.min(u,t)p&&!J(u,t)){n.x=p;n.y=h;n=!0;break a}n.x=0;n.y=0;n=!1}n&&(e?c.push(k.x):c.push(k.y));h=m}w.v(k)}w.u(W,{Qt:"firstPickIndex"},function(){var a;2>=this.qa?a=0:((a=this.ac)||(a=this.computeSpot(!0)!==yb),a=a?1:0);return a});w.u(W,{Gx:"lastPickIndex"},function(){var a=this.qa;if(0===a)a=0;else if(2>=a)a-=1;else{var b;(b=this.ac)||(b=this.computeSpot(!1)!==yb);a=b?a-2:a-1}return a});function Lr(a){a=a.af;return a===ij||a===jj}
    function Nr(a,b){if(b||Lr(a)){var c=a.g;null===c||c.cl.contains(a)||null===a.qw||c.cl.add(a,a.qw)}}function lj(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Mc){var d=c.g;if(null!==d)for(var e=!1,d=d.Ix;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,h=!1,f=f.zb.n,k=f.length,l=0;l=a.width||0>=a.height)){var b=a.y,c=a.x+a.width,d=a.y+a.height;this.Cg=Math.floor((a.x-this.Ae)/this.Ae)*this.Ae;this.Dg=Math.floor((b-this.Be)/this.Be)*this.Be;this.cs=Math.ceil((c+2*this.Ae)/this.Ae)*this.Ae;this.ds=Math.ceil((d+2*this.Be)/this.Be)*this.Be;a=1+(Math.ceil((this.cs-this.Cg)/this.Ae)|0);b=1+(Math.ceil((this.ds-this.Dg)/this.Be)|0);if(null===this.od||this.zpthis.cs||a+cthis.ds||b+da&&(c+=a,a=0);0>b&&(e+=b,b=0);if(0>c||0>e)return!0;d=Math.min(a+c-1,this.zp)|0;for(c=Math.min(b+e-1,this.Ap)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.od[a][e])return!1;return!0};
    function cs(a,b,c,d,e,f,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.od[m][n];if(1<=p&&999999>p)for(e?n+=d:m+=d,p+=1;f<=m&&m<=h&&k<=n&&n<=l&&!(p>=a.od[m][n]);)a.od[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)cs(a,b,c,1,!e,f,h,k,l),cs(a,b,c,-1,!e,f,h,k,l);else if(0m;b+=d)cs(a,b,c,1,!e,f,h,k,l),cs(a,b,c,-1,!e,f,h,
        k,l)}}function ds(a,b,c,d,e,f,h,k,l){b|=0;c|=0;var m=0,n=1;for(a.od[b][c]=n;0===m&&b>f&&bk&&cf&&bk&&c=Math.abs(h-b)&&1>=Math.abs(k-d))a.abort=!0;else{var l=f.x,m=f.y,n=f.x+f.width,p=f.y+f.height,l=l-a.Cg,l=l/a.Ae,m=m-a.Dg,m=m/a.Be,n=n-a.Cg,n=n/a.Ae,p=p-a.Dg,p=p/a.Be;f=Math.max(0,Math.min(a.zp,l|0));n=Math.min(a.zp,Math.max(0,n|0));m=Math.max(0,Math.min(a.Ap,m|0));p=Math.min(a.Ap,Math.max(0,p|0));h|=0;k|=0;b|=0;d|=0;l=0===c||
    90===c?1:-1;c=90===c||270===c;0===a.od[h][k]?(ds(a,h,k,l,c,f,n,m,p),ds(a,h,k,1,!c,f,n,m,p),ds(a,h,k,-1,!c,f,n,m,p)):ds(a,h,k,l,c,h,k,h,k);0===a.od[b][d]?(es(a,b,d,0===e||90===e?1:-1,90===e||270===e,f,n,m,p),es(a,b,d,1,!(90===e||270===e),f,n,m,p),es(a,b,d,-1,!(90===e||270===e),f,n,m,p)):es(a,b,d,l,c,b,d,b,d);a.abort||(cs(a,h,k,1,!1,f,n,m,p),cs(a,h,k,-1,!1,f,n,m,p),cs(a,h,k,1,!0,f,n,m,p),cs(a,h,k,-1,!0,f,n,m,p))}}}function Qr(){w.nc(this);this.port=this.Pc=null;this.fg=[];this.fq=!1}
    w.ce(Qr,{Pc:!0,port:!0,fg:!0,fq:!0});Qr.prototype.toString=function(){for(var a=this.fg,b=this.Pc.toString()+" "+a.length.toString()+":",c=0;c=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case w.Sc|w.md:return c>a&&c<=180+a?180:270;case w.md|w.dd:return c>180-a&&c<=360-a?270:0;case w.dd|w.cd:return c>a&&c<=180+a?90:0;case w.cd|w.Sc:return c>180-a&&c<=360-a?180:90;case w.Sc|w.md|w.dd:return 90180+a&&c<=360-
    a?270:0;case w.md|w.dd|w.cd:return 180a&&180>=c?90:0;case w.dd|w.cd|w.Sc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case w.cd|w.Sc|w.md:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(w.Sc|w.md|w.dd|w.cd)&&(c-=15,0>c&&(c+=360));return c>a&&c<180-a?90:c>=180-a&&c<=180+a?180:c>180+a&&c<360-a?270:0}Qr.prototype.Yp=function(){this.fg.length=0};
    function Rr(a,b){var c=a.fg;if(0===c.length){a:if(!a.fq){c=a.fq;a.fq=!0;var d,e=null,f=a.Pc,f=f instanceof V?f:null;if(null===f||f.Zc)d=a.Pc.QE(a.port.Ud);else{if(!f.W.I()){a.fq=c;break a}e=f;d=e.PE()}var h=a.fg.length=0,k=a.port.Wa(Ab,w.K()),l=a.port.Wa(Sb,w.K()),f=w.mg(k.x,k.y,0,0);f.vi(l);w.v(k);w.v(l);k=w.xb(f.x+f.width/2,f.y+f.height/2);l=a.port.Wl();for(d=d.i;d.next();){var m=d.value;if(m.isVisible()){var n=m.Lc===a.port||m.Y.qi(e),p=m.computeSpot(n,a.port);if(p.uj()&&(n=n?m.ld:m.Lc,null!==
        n)){var q=n.U;if(null!==q){var r=q.findVisibleNode();null!==r&&r!==q&&(q=r,n=q.port);n=m.computeOtherPoint(q,n);q=k.Pb(n);q-=l;0>q&&(q+=360);p=fs(f,p,q,m.ac);r=0;0===p?(r=w.dd,180Math.abs(E)?(A=Math.abs(E)/q,q=Math.abs(E)):A=1;break;case w.Sc:r>Math.abs(K)?(A=Math.abs(K)/r,r=Math.abs(K)):A=1;break;case w.md:p>Math.abs(E)?(A=Math.abs(E)/p,p=Math.abs(E)):A=1;break;default:case w.dd:n>Math.abs(K)?(A=Math.abs(K)/n,n=Math.abs(K)):A=1}v=0}var P=u.dq;if(e===rr){t=u.link.computeThickness();t*=A;P.set(y);switch(x){case w.cd:P.x=y.x+E/2+q/2-v-t/2;break;case w.Sc:P.y=y.y+K/2+r/2-v-t/2;break;case w.md:P.x=y.x+E/2-
        p/2+v+t/2;break;default:case w.dd:P.y=y.y+K/2-n/2+v+t/2}v+=t}else t=.5,e===or&&(t=(u.Wp+1)/(u.wn+1)),P.x=y.x+E*t,P.y=y.y+K*t}w.v(k);w.v(l);w.v(d);w.v(m);y=a.fg;for(E=0;Eb.ye?1:a.angleb.angle?1:0};
    Qr.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Pc,this.port,yb,b.Lc===this.port),d=a.Wp;if(0>d)return c;var e=a.wn;if(1>=e||!b.ac)return c;var b=a.Rx,f=a.dq;if(a.ye===w.Sc||a.ye===w.cd)d=e-1-d;return((a=a.ye===w.Sc||a.ye===w.dd)?b.ye&&(e=k.right);k.bottom>f&&(f=k.bottom)}}isFinite(c)&&isFinite(d)?a.m(c,d,e-c,f-d):(b=b.location,c=this.padding,a.m(b.x+c.left,b.y+c.top,0,0));return a};
    w.defineProperty(Nj,{padding:"padding"},function(){return this.hf},function(a){"number"===typeof a?a=new hb(a):w.G(a,hb,Nj,"padding");var b=this.hf;b.L(a)||(this.hf=a=a.S(),this.h("padding",b,a))});function tg(){0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.Wc("Layout")}this.Df=!0};tg.prototype.Un=function(a){return!a.location.I()||a instanceof V&&a.Un?!0:!1};
    function js(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.$p||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof T?l.Bf||(l instanceof V?null===l.Tb?js(a,b,l.Oc,!1,e,f,h,k):(ks(l),b.add(l)):(ks(l),b.add(l))):h&&l instanceof W?b.add(l):!k||!l.ee()||l instanceof T||(ks(l),b.add(l)))}}function ks(a){var b=a.W;(0===b.width||0===b.height||isNaN(b.width)||isNaN(b.height))&&a.Je()}
    tg.prototype.collectParts=tg.prototype.tH=function(a){var b=new I(R);a instanceof D?(js(this,b,a.ig,!0,null,!0,!0,!0),js(this,b,a.links,!0,null,!0,!0,!0),js(this,b,a.Lk,!0,null,!0,!0,!0)):a instanceof V?js(this,b,a.Oc,!1,null,!0,!0,!0):js(this,b,a.i,!1,null,!0,!0,!0);return b};w.defineProperty(tg,{qe:"arrangementOrigin"},function(){return this.Kq},function(a){w.G(a,z,tg,"arrangementOrigin");this.Kq.L(a)||(this.Kq.assign(a),this.J())});
    tg.prototype.initialOrigin=function(a){var b=this.group;if(null!==b){var c=b.position.copy();(isNaN(c.x)||isNaN(c.y))&&c.set(a);b=b.placeholder;null!==b&&(c=b.Wa(Ab),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};
    function ug(){w.nc(this);this.ke=null;if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new I(ls);this.edges=new I(ms);this.Ox=new ma(T,ls);this.Jx=new ma(W,ms)}w.ga("LayoutNetwork",ug);
    ug.prototype.clear=function(){if(this.vertexes)for(var a=this.vertexes.i;a.next();){var b=a.value;b.clear();b.network=null}if(this.edges)for(a=this.edges.i;a.next();)b=a.value,b.clear(),b.network=null;this.vertexes=new I(ls);this.edges=new I(ms);this.Ox=new ma(T,ls);this.Jx=new ma(W,ms)};
    ug.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Tb?"("+this.Tb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0};
    ls.smartComparer=function(a,b){if(null!==a){if(null!==b){var c=a.td,d=b.td;if(null!==c){if(null!==d){for(var c=c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=f&&0>=h&&(f=1);a=this.spacing.width;isFinite(a)||(a=0);c=this.spacing.height;isFinite(c)||(c=0);null!==b&&b.Hb("Layout");d=[];switch(this.alignment){case As:var k=a,l=c,m=Math.max(this.Fp.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0h)d.push(new B(0,x,h+k,A)),v=0,t=u,x+=A,A=0;A=Math.max(A,K);K=0;switch(s){case zs:K=-q.width;break;default:K=0}p.moveTo(t+K,x);switch(s){case zs:t-=y;break;
        default:t+=y}v++}d.push(new B(0,x,h+k,A));break;case ss:k=f;l=a;m=c;n=Math.max(this.Fp.width,1);p=x=y=0;q=w.K();for(f=0;f=y&&(h-=y);for(var y=K=0,E=Math.max(this.Fp.height,1),$=p=0,S=!0,ba=w.K(),f=0;fk-1||0h){d.push(new B(0,S?v-p:v,h+l,$+p+m));for(P=0;Py&&(e.width+=e.x-y,e.x=y)}for(k=f=h=e=0;kd?1:0};
    On.smartComparer=function(a,b){if(null!==a){if(null!==b){for(var c=a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),d=b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/),e=0;e=a.count)1===a.count&&(a=a.first(),a.la=0,a.ra=0);else{var b=new H(Ts);b.Jc(a.i);a=new H(Ts);var c=new H(Ts),d;d=this.sort(b);var e=this.$y,f=this.IC,h=this.Cd,k=this.Eo,l=this.az,m=this.rr,b=this.dl,n=this.$D,p=this.Vf,q=this.kv,
        e=this.Wf,f=this.Nx,h=this.kJ;if(!isFinite(h)||0>=h)h=NaN;k=this.nH;if(!isFinite(k)||0>=k)k=1;l=this.ze;isFinite(l)||(l=0);m=this.rf;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Qs&&f===Rs?e=Cs:e===Qs&&f!==Rs&&(f=Rs,e=this.Wf);if((this.direction===Ls||this.direction===Ms)&&this.sorting!==Fs){for(var r=0;!(r>=d.length);r+=2){a.add(d.ea(r));if(r+1>=d.length)break;c.add(d.ea(r+1))}this.direction===Ls?(this.Wf===Qs&&a.reverse(),d=new H(Ts),d.Jc(a),d.Jc(c)):(this.Wf===Qs&&
    c.reverse(),d=new H(Ts),d.Jc(c),d.Jc(a))}for(var s=d.length,u=n=0,r=0;rm&&(0===r||r===d.length-1)&&(t/=2);n+=t;u++}if(isNaN(h)||e===Qs){isNaN(b)&&(b=6);if(e!==Cs&&e!==Qs){t=-Infinity;for(r=0;rh?(h=r,p=h*k):q=u/(360<=m?s:s-1)}this.$y=e;this.IC=f;this.Cd=h;this.Eo=k;this.az=l;this.rr=m;this.dl=b;this.$D=n;this.Vf=p;this.kv=q;b=d;d=this.$y;e=this.Cd;f=this.az;k=this.rr;l=this.dl;m=this.Vf;n=this.kv;if(this.direction!==Ls&&this.direction!==Ms||d!==Qs)if(this.direction===Ls||this.direction===Ms){h=0;switch(d){case Ps:h=180*Xs(this,e,m,f,n)/Math.PI;break;case Cs:n=b=0;h=a.first();null!==h&&(b=Us(h,Math.PI/2));h=c.first();null!==
    h&&(n=Us(h,Math.PI/2));h=180*Xs(this,e,m,f,l+(b+n)/2)/Math.PI;break;case Os:h=k/b.length}if(this.direction===Ls){switch(d){case Ps:Ys(this,a,f,Ns);break;case Cs:Zs(this,a,f,Ns);break;case Os:$s(this,a,k/2,f,Ns)}switch(d){case Ps:Ys(this,c,f+h,Es);break;case Cs:Zs(this,c,f+h,Es);break;case Os:$s(this,c,k/2,f+h,Es)}}else{switch(d){case Ps:Ys(this,c,f,Ns);break;case Cs:Zs(this,c,f,Ns);break;case Os:$s(this,c,k/2,f,Ns)}switch(d){case Ps:Ys(this,a,f+h,Es);break;case Cs:Zs(this,a,f+h,Es);break;case Os:$s(this,
        a,k/2,f+h,Es)}}}else switch(d){case Ps:Ys(this,b,f,this.direction);break;case Cs:Zs(this,b,f,this.direction);break;case Os:$s(this,b,k,f,this.direction);break;case Qs:at(this,b,k,f,this.direction)}else at(this,b,k,f-k/2,Es)}this.updateParts();this.network=null;this.Df=!0};
    function $s(a,b,c,d,e){var f=a.rr,h=a.Cd;a=a.Vf;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(f=d+(e===Es?f:-f);0>f;)f+=360;f%=360;180=n.length-1)break;dt(a,l,m,n,p,e,f)||et(a,l,m,n,p,e,f);l=f.x;m=f.y}w.v(f);a.Um++;if(!(23Math.abs(r)?Math.abs(l-f)<(n[0].width+n[n.length-1].width)/2&&(h=0):h=0Math.abs(q)?0:q;q=!1;q=Math.abs(f)>Math.abs(p)?0p:0a.Um?a.Cd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;dt(a,l,m,p,q,e,n)||et(a,l,m,p,q,e,n);l=n.x;m=n.y}w.v(n);a.Um++;if(!(23a.Um?a.Cd-f/(2*Math.PI):a.Cd-(0k){m=b-a;if(m<-k)return h.x=m,h.y=n,!1;p=!0}}else if(m=b-a,m<-k){m=b+a;if(m>k)return h.x=m,h.y=n,!1;p=!0}n=Math.sqrt(1-Math.min(1,m*m/(k*k)))*l;0>c!==p&&(n=-n);if(Math.abs(c-n)>(d[e].height+d[e+1].height)/2)return h.x=m,h.y=n,!1;h.x=m;h.y=n;return!0}
    function et(a,b,c,d,e,f,h){var k=a.Cd,l=a.Vf,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.dl;d=!1;if(0<=b!==(f===Es)){if(n=c-a,n<-l){n=c+a;if(n>l){h.x=m;h.y=n;return}d=!0}}else if(n=c+a,n>l){n=c-a;if(n<-l){h.x=m;h.y=n;return}d=!0}m=Math.sqrt(1-Math.min(1,n*n/(l*l)))*k;0>b!==d&&(m=-m);h.x=m;h.y=n}Bs.prototype.commitLayout=function(){this.commitNodes();this.ju&&this.commitLinks()};
    Bs.prototype.commitNodes=function(){var a=this.eH,b=null!==this.group&&null!==this.group.placeholder&&this.group.Zc,c=b?this.group.location.copy():null;b?a=new z(0,0):(a.x=this.qe.x+this.Cd,a.y=this.qe.y+this.Vf);for(var d=this.network.vertexes.i;d.next();){var e=d.value;e.x+=a.x;e.y+=a.y;e.commit()}b&&(this.group.Je(),a=this.group.position.copy(),b=this.group.location.copy(),c=c.Ej(b.Ej(a)),this.group.move(c),this.TB=c.Ej(a))};Bs.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};
    function Ws(a,b,c,d,e){var f=a.WG;if(.001>Math.abs(a.Eo-1))return void 0!==d&&void 0!==e?e*b:2*Math.PI*b;a=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c;for(var h=0,k=0,k=void 0!==d&&void 0!==e?e/(f+1):Math.PI/(2*(f+1)),l=0,m=0;m<=f;m++)l=void 0!==d&&void 0!==e?d+m*e/f:m*Math.PI/(2*f),l=Math.sin(l),h+=Math.sqrt(1-a*a*l*l)*k;return void 0!==d&&void 0!==e?(b>c?b:c)*h:4*(b>c?b:c)*h}function Vs(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Ws(a,1,c,d,e):Ws(a,1,c);return b/f}
    function Xs(a,b,c,d,e){if(.001>Math.abs(a.Eo-1))return e/b;var f=b>c?Math.sqrt(b*b-c*c)/b:Math.sqrt(c*c-b*b)/c,h=0;a=2*Math.PI/(700*a.network.vertexes.count);b>c&&(d+=Math.PI/2);for(var k=0;;k++){var l=Math.sin(d+k*a),h=h+(b>c?b:c)*Math.sqrt(1-f*f*l*l)*a;if(h>=e)return k*a}}
    Bs.prototype.sort=function(a){switch(this.sorting){case Js:break;case Ks:a.reverse();break;case Hs:a.sort(this.comparer);break;case Is:a.sort(this.comparer);a.reverse();break;case Fs:for(var b=[],c=0;ce&&(e=k,f=h)}else for(h=0;he&&(e=k,f=h);d.add(a.ea(f));b[f]=-1;f=a.ea(f);e=0;for(h=f.mc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&&
    b[e]++;for(f=f.kc;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(f=0;fa[f].indexOf(l)&&a[f].push(l);for(b=b.mc;b.next();)l=d.indexOf(b.value.fromVertex),l!==f&&0>a[f].indexOf(l)&&a[f].push(l)}h=[];for(f=0;fa[b[p]].indexOf(b[p===b.length-1?0:p+1])&&u.push(p===b.length-1?0:p+1);if(0===u.length)for(p=0;pK.indexOf(S)||baK.indexOf(S)||ba<
    A[S]&&A[S]=t?l+1:l)),v+=l=t&&l++,y>=t&&y++,l>y&&(K=y,y=l,l=K),y-l<(b.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qh-s?1:-1);b.splice(0>p?l:l+1,0,m);c.splice(k,1);k--}else f=!1;if(f)break;else b.push(c[0]),c.splice(0,1)}for(f=0;f=a?a:360,this.J())});
    w.defineProperty(Bs,{Wf:"arrangement"},function(){return this.nd},function(a){this.nd!==a&&(w.mb(a,Bs,Bs,"arrangement"),a===Qs||a===Cs||a===Ps||a===Os)&&(this.nd=a,this.J())});w.defineProperty(Bs,{direction:"direction"},function(){return this.ba},function(a){this.ba!==a&&(w.mb(a,Bs,Bs,"direction"),a===Es||a===Ns||a===Ls||a===Ms)&&(this.ba=a,this.J())});
    w.defineProperty(Bs,{sorting:"sorting"},function(){return this.di},function(a){this.di!==a&&(w.mb(a,Bs,Bs,"sorting"),a===Js||a===Ks||a===Hs||Is||a===Fs)&&(this.di=a,this.J())});w.defineProperty(Bs,{comparer:"comparer"},function(){return this.Mh},function(a){this.Mh!==a&&(w.j(a,"function",Bs,"comparer"),this.Mh=a,this.J())});w.defineProperty(Bs,{spacing:"spacing"},function(){return this.ei},function(a){this.ei!==a&&(w.j(a,"number",Bs,"spacing"),this.ei=a,this.J())});
    w.defineProperty(Bs,{Nx:"nodeDiameterFormula"},function(){return this.us},function(a){this.us!==a&&(w.mb(a,Bs,Bs,"nodeDiameterFormula"),a===Gs||a===Rs)&&(this.us=a,this.J())});w.u(Bs,{cK:"actualXRadius"},function(){return this.Cd});w.u(Bs,{dK:"actualYRadius"},function(){return this.Vf});w.u(Bs,{bK:"actualSpacing"},function(){return this.dl});w.u(Bs,{eH:"actualCenter"},function(){return this.TB});var Cs;Bs.ConstantSpacing=Cs=w.p(Bs,"ConstantSpacing",0);var Ps;
    Bs.ConstantDistance=Ps=w.p(Bs,"ConstantDistance",1);var Os;Bs.ConstantAngle=Os=w.p(Bs,"ConstantAngle",2);var Qs;Bs.Packed=Qs=w.p(Bs,"Packed",3);var Es;Bs.Clockwise=Es=w.p(Bs,"Clockwise",4);var Ns;Bs.Counterclockwise=Ns=w.p(Bs,"Counterclockwise",5);var Ls;Bs.BidirectionalLeft=Ls=w.p(Bs,"BidirectionalLeft",6);var Ms;Bs.BidirectionalRight=Ms=w.p(Bs,"BidirectionalRight",7);var Js;Bs.Forwards=Js=w.p(Bs,"Forwards",8);var Ks;Bs.Reverse=Ks=w.p(Bs,"Reverse",9);var Hs;Bs.Ascending=Hs=w.p(Bs,"Ascending",10);
    var Is;Bs.Descending=Is=w.p(Bs,"Descending",11);var Fs;Bs.Optimized=Fs=w.p(Bs,"Optimized",12);var Gs;Bs.Pythagorean=Gs=w.p(Bs,"Pythagorean",13);var Rs;Bs.Circular=Rs=w.p(Bs,"Circular",14);function Ds(){this.Tp=-Infinity;this.Aq=this.ho=null}Ds.prototype.compare=function(a,b){if(0this.Tp||Math.abs(a)a&&0f?(e=n.x+n.width/2,k=n.y+n.height/2,l[0]=new z(n.x+n.width+d.width,n.y),l[1]=new z(n.x,n.y+n.height+d.height),f=2):(p=jt(l,f,e,k,n.width,n.height,d),q=l[p],r=new z(q.x+n.width+d.width,
            q.y),s=new z(q.x,q.y+n.height+d.height),p+1this.network.vertexes.count)return!1;for(var a=0,b=0,c=this.network.vertexes.first().gb,d=this.network.vertexes.i;d.next();){if(d.value.gb.Zf(c)&&(a++,2a.network.vertexes.count)return!1;null===a.Kg?a.Kg=new H(du):a.Kg.clear();a.Kg.Jc(a.network.vertexes);var c=a.Kg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.jg-a.jg});for(var d=c.count-1;0<=d&&1>=c.ea(d).jg;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=Td((m+s+n*n*4/(h*h))/
        s);h=(m-1)*p/2;m=(m-1)*q/2;f.gb=new B(k-r.x-h,l-r.y-m,p+2*h,q+2*m);f.focus=new z(r.x+h,r.y+m)}a.network=d;return c}function cu(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.Fh){var e=d.Fh.ea(d.fB);d.jg=e.yy;var f=e.LB,h=e.MB;d.gb=new B(d.la-f,d.ra-h,e.zy,e.xy);d.focus=new z(f,h);d.fB--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b}
    function eu(a,b){var c=b.sn;if(null!==c&&0!==c.count){var d=b.la,e=b.ra,f=b.width,h=b.height;null!==b.Fh&&0=p.jg?l++:(k=!0,m++,h+=Math.atan2(b.ra-p.ra,b.la-p.la))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.la=d+p*Math.cos(q);l.ra=e+p*Math.sin(q);k++}}}function jt(a,b,c,d,e,f,h){var k=9E19,l=-1,m=0;a:for(;mn.y&&a[q].x-n.xn.x&&a[q].y-n.yl+h?(d=d+f-k,e=e-l-h,Td(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,Td(d*d+e*e)):e+cl+h?e-(l+h):e+c=b.length)return!1;var c=b[0];c.forceX=0;c.forceY=0;for(var d=c.la,e=d,f=c.ra,h=f,c=1;ch-f)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.la-b.la}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.ra-b.ra});for(var h=a.Rh,m=0,n=0,p=0,c=0;ch||p-d>h){if(f)break}else if(l-r>h||r-l>h){if(!f)break}else{var s=gu(k,e);1>s?(n=a.Wx,null===n&&(a.Wx=n=new sa(0)),m=n.random(),s=n.random(),d>p?(n=Math.abs(e.M.right-k.M.x),n=(1+n)*m):dr?(p=Math.abs(e.M.bottom-k.M.y),p=(1+p)*s):ds?(n=a.Wx,null===n&&(a.Wx=n=new sa(0)),m=n.random(),s=
        n.random(),n=(d>p?1:-1)*(1+(e.width>k.width?e.width:k.width))*m,p=(l>r?1:-1)*(1+(e.height>k.height?e.height:k.height))*s):(m=f.stiffness*(s-f.length),n=(p-d)/s*m,p=(r-l)/s*m),k.forceX+=n,k.forceY+=p,e.forceX-=n,e.forceY-=p;c=0;d=Math.max(a.Rh/20,50);for(e=0;ed&&(f=d),h<-d?h=-d:h>d&&(h=d),k.la+=f,k.ra+=h,c=Math.max(c,f*f+h*h));return c>a.OE*a.OE}gt.prototype.moveFixedVertex=function(){};
    gt.prototype.commitLayout=function(){this.nB();this.commitNodes();this.ju&&this.commitLinks()};gt.prototype.nB=function(){if(this.tq)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.Ab=qc,b.Bb=qc)}};gt.prototype.commitNodes=function(){var a=0,b=0;if(this.mH){var c=w.Jf();this.uh(this.network,c);b=this.qe;a=b.x-c.x;b=b.y-c.y;w.Db(c)}for(var c=w.Jf(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.gb),c.x+=a,c.y+=b,e.gb=c;e.commit()}w.Db(c)};
    gt.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};gt.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Bo:a};gt.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Ao:a};gt.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.yo:a};gt.prototype.electricalFieldX=function(){return 0};gt.prototype.electricalFieldY=function(){return 0};
    gt.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.zo:a};gt.prototype.gravitationalFieldX=function(){return 0};gt.prototype.gravitationalFieldY=function(){return 0};gt.prototype.isFixed=function(a){return a.isFixed};w.u(gt,{IK:"currentIteration"},function(){return this.Ur});w.defineProperty(gt,{tE:"arrangementSpacing"},function(){return this.og},function(a){w.G(a,ia,gt,"arrangementSpacing");this.og.L(a)||(this.og.assign(a),this.J())});
    w.defineProperty(gt,{mH:"arrangesToOrigin"},function(){return this.Lq},function(a){this.Lq!==a&&(w.j(a,"boolean",gt,"arrangesToOrigin"),this.Lq=a,this.J())});w.defineProperty(gt,{tq:"setsPortSpots"},function(){return this.ci},function(a){this.ci!==a&&(w.j(a,"boolean",gt,"setsPortSpots"),this.ci=a,this.J())});w.defineProperty(gt,{comments:"comments"},function(){return this.Lh},function(a){this.Lh!==a&&(w.j(a,"boolean",gt,"comments"),this.Lh=a,this.J())});
    w.defineProperty(gt,{NA:"maxIterations"},function(){return this.ap},function(a){this.ap!==a&&(w.j(a,"number",gt,"maxIterations"),0<=a&&(this.ap=a,this.J()))});w.defineProperty(gt,{OE:"epsilonDistance"},function(){return this.ur},function(a){this.ur!==a&&(w.j(a,"number",gt,"epsilonDistance"),0b.toVertex.index&&(a.ey(b),b.rev=!0);break;case ku:for(d=this.network.vertexes.i;d.next();)a=d.value,a.Op=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.qs=0;for(d.reset();d.next();)b=d.value,0===b.mc.count&&uu(this,b);for(d.reset();d.next();)b=d.value,-1===b.Op&&uu(this,b);for(a.reset();a.next();)d=a.value,d.forest||(b=d.fromVertex,c=b.finish,e=d.toVertex,f=e.finish,e.Opu&&0u&&0d[this.Sf]&&(this.Yv=d[b]-1,this.Sf=b),d[b]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.nn===m.nn||k++;var m=0,q,r=q=p=l=0,s,u=0,t=0;s=0;var x;if(0<=c)for(n=d[h].Qe,m=0;mu||l===u&&q>s)&&k++,tl||u===l&&s>q)&&k++);if(0>=c)for(n=d[h].Ie,m=0;mu||l===u&&p>t)&&k++,sl||u===l&&t>p)&&k++);f[h*e+h]=k;for(n=h+1;n=c)for(k=d[h].Ie,x=d[n].Ie,m=0;m=c&&(l=k.Qe);var m=null;0<=c&&(m=k.Ie);var n=0,p=0,q=k.near;null!==q&&q.layer===k.layer&&(n+=q.column-1,p++);if(null!==l)for(q=0;q=c&&(l=k.Qe);var m=null;0<=c&&(m=k.Ie);var n=0,p=[],q=k.near;null!==q&&q.layer===k.layer&&(p[n]=q.column-1,n++);if(null!==l)for(q=0;q>1,f[h]=0!==(n&1)?p[m]:p[m-1]+p[m]>>1)}yu(a,b,d);return f}function Gu(a,b,c,d,e,f){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.kc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Gu(a,m,c,d,e,f)}if(f)for(l=b.mc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Gu(a,m,c,d,e,f)}}
    function Hu(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var h=b.kc;h.next();)Hu(a,h.value.toVertex,c,d,e,f);if(f)for(b=b.mc;b.next();)Hu(a,b.value.fromVertex,c,d,e,f)}}function ru(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function su(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.kc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null}
    function tu(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.mc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function uu(a,b){b.Op=a.qs;a.qs++;for(var c=b.kc;c.next();){var d=c.value,e=d.toVertex;-1===e.Op&&(d.forest=!0,uu(a,e))}b.finish=a.qs;a.qs++}
    ju.prototype.assignLayers=function(){switch(this.Xo){case Iu:Ju(this);break;case Ku:for(var a=0,b=this.network.vertexes.i;b.next();)a=Lu(this,b.value),this.rb=Math.max(a,this.rb);for(b.reset();b.next();)a=b.value,a.layer=this.rb-a.layer;break;default:case lu:Ju(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.mc.count&&Mu(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.rb=-1;for(b.reset();b.next();){var c=b.value;c.layer-=
        a;this.rb=Math.max(this.rb,c.layer)}}};function Ju(a){for(var b=a.network.vertexes.i;b.next();){var c=Nu(a,b.value);a.rb=Math.max(c,a.rb)}}function Nu(a,b){var c=0;if(-1===b.layer){for(var d=b.kc;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Nu(a,f)+e);b.layer=c}else c=b.layer;return c}function Lu(a,b){var c=0;if(-1===b.layer){for(var d=b.mc;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Lu(a,f)+e);b.layer=c}else c=b.layer;return c}
    function Mu(a,b){if(!b.valid){b.valid=!0;for(var c=b.kc;c.next();)Mu(a,c.value.toVertex);for(c=a.network.vertexes.i;c.next();)c.value.component=-1;for(var d=b.Qe.n,e=d.length,f=0;fh&&Gu(a,k,0,-1,!0,!1)}for(Gu(a,b,1,-1,!0,!0);0!==b.component;){for(var k=0,d=Infinity,l=0,m=null,n=a.network.vertexes.i;n.next();){var p=n.value;if(1===p.component){for(var q=0,r=!1,s=p.Qe.n,e=s.length,f=0;fd)&&!n&&(h=l,d=m)}if(0>f){for(c.reset();c.next();)f=c.value,1===f.component&&(f.layer-=e);b.component=0}else h.component=0}}}
    function wu(a,b,c){return 90===a.ba?c&&!b.rev||!c&&b.rev?270:90:180===a.ba?c&&!b.rev||!c&&b.rev?0:180:270===a.ba?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0}
    ju.prototype.initializeIndices=function(){switch(this.No){default:case Ou:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.je[c];this.je[c]++}break;case mu:a=this.network.vertexes.i;for(b=this.rb;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Pu(this,c);break;case Qu:for(a=this.network.vertexes.i,b=0;b<=this.rb;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Ru(this,c)}};
    function Pu(a,b){var c=b.layer;b.index=a.je[c];a.je[c]++;for(var c=b.Ie.gc(),d=!0;d;)for(var d=!1,e=0;eh.portFromColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;eh.portToColOffset&&(d=!0,c[e]=h,c[e+1]=f)}for(e=0;e=h;d--)f=Tu(this,d,-1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              d=h;d<=c;d++)f=Tu(this,d,-1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this))}break;default:case nu:for(c=this.rb,h=0,k=a+1;(d=this.countCrossings())=h;d--)f=Tu(this,d,-1)||f;e=this.countCrossings();e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,1)||f;e=this.countCrossings();
        e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,-1)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Tu(this,d,0)||f;e>=a?Bu(this,b):(a=e,b=Au(this))}}Bu(this,b)};
    function Su(a,b,c){var d=0,e=xu(a,b),f=a.je[b],h=Fu(a,b,c);c=Eu(a,b,c);for(d=0;df+1&&(q+=4*(v-f),r+=4*(v-(f+1)))}y=d[f].kc.i;for(y.reset();y.next();)if(v=y.value,A=v.toVertex,v.valid&&A.layer===b){for(v=0;d[v]!==A;)v++;v===f+1&&(r+=1)}y=d[f+1].mc.i;for(y.reset();y.next();)if(v=y.value,A=v.fromVertex,v.valid&&A.layer===b){for(v=0;d[v]!==A;)v++;vf+1&&(q+=4*(v-(f+1)),r+=4*(v-f))}y=d[f+1].kc.i;for(y.reset();y.next();)if(v=y.value,A=v.toVertex,v.valid&&
        A.layer===b){for(v=0;d[v]!==A;)v++;v===f&&(q+=1)}var v=A=0,y=h[d[f].index],K=k[d[f].index],E=h[d[f+1].index],P=k[d[f+1].index];-1!==y&&(A+=Math.abs(y-s),v+=Math.abs(y-x));-1!==K&&(A+=Math.abs(K-s),v+=Math.abs(K-x));-1!==E&&(A+=Math.abs(E-u),v+=Math.abs(E-t));-1!==P&&(A+=Math.abs(P-u),v+=Math.abs(P-t));if(r>1)+8*d;this.Kb*=8}if(0!==(this.$i&Xu))for(b=!0;b;){b=!1;for(a=this.Sf+1;a<=this.rb;a++)b=Yu(this,a,1)||b;
        for(a=this.Sf-1;0<=a;a--)b=Yu(this,a,-1)||b;b=Yu(this,this.Sf,0)||b}if(0!==(this.$i&Zu)){for(a=this.Sf+1;a<=this.rb;a++)$u(this,a,1);for(a=this.Sf-1;0<=a;a--)$u(this,a,-1);$u(this,this.Sf,0)}c&&(av(this,-1),av(this,1));if(0!==(this.$i&Xu))for(b=!0;b;){b=!1;b=Yu(this,this.Sf,0)||b;for(a=this.Sf+1;a<=this.rb;a++)b=Yu(this,a,0)||b;for(a=this.Sf-1;0<=a;a--)b=Yu(this,a,0)||b}};function Yu(a,b,c){for(var d=!1;bv(a,b,c);)d=!0;return d}
    function bv(a,b,c){var d=0,e=xu(a,b),f=a.je[b],h=Eu(a,b,-1);if(0c)for(d=0;dd-1||n-e[d-1].column-1>p+a.nodeMinColumnSpace(e[d-1],!1)?n-1:n,p=0,p=d+1>=f||e[d+1].column-n-1>q+a.nodeMinColumnSpace(e[d+1],!0)?n+1:n,s=q=0,u=0,t=0,x=0,v=0;if(0>=c)for(var A=e[d].mc.i;A.next();){var v=A.value,y=v.fromVertex;v.valid&&
    y.layer!==b&&(t=zu(v),x=v.portFromColOffset,v=v.portToColOffset,y=y.column,q+=(Math.abs(n+v-(y+x))+1)*t,s+=(Math.abs(r+v-(y+x))+1)*t,u+=(Math.abs(p+v-(y+x))+1)*t)}if(0<=c)for(A=e[d].kc.i;A.next();)v=A.value,y=v.toVertex,v.valid&&y.layer!==b&&(t=zu(v),x=v.portFromColOffset,v=v.portToColOffset,y=y.column,q+=(Math.abs(n+x-(y+v))+1)*t,s+=(Math.abs(r+x-(y+v))+1)*t,u+=(Math.abs(p+x-(y+v))+1)*t);v=x=t=0;A=h[e[d].index];y=k[e[d].index];-1!==A&&(t+=Math.abs(A-n),x+=Math.abs(A-r),v+=Math.abs(A-p));-1!==y&&
    (t+=Math.abs(y-n),x+=Math.abs(y-r),v+=Math.abs(y-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}yu(a,b,e);a.normalize()}
    function cv(a,b){for(var c=!0,d=a.network.vertexes.i;d.next();){var e=d.value,f=a.nodeMinColumnSpace(e,!0),h=a.nodeMinColumnSpace(e,!1);if(e.column-f<=b&&e.column+h>=b){c=!1;break}}e=!1;if(c)for(d.reset();d.next();)c=d.value,c.column>b&&(c.column-=1,e=!0);return e}
    function dv(a,b){for(var c=b,c=b+1,d=0,e=[],f=[],d=0;d<=a.rb;d++)e[d]=!1,f[d]=!1;for(var h=a.network.vertexes.i;h.next();){var d=h.value,k=d.column-a.nodeMinColumnSpace(d,!0),l=d.column+a.nodeMinColumnSpace(d,!1);k<=b&&l>=b&&(e[d.layer]=!0);k<=c&&l>=c&&(f[d.layer]=!0)}k=!0;c=!1;for(d=0;d<=a.rb;d++)k=k&&!(e[d]&&f[d]);if(k)for(h.reset();h.next();)e=h.value,e.column>b&&(e.column-=1,c=!0);return c}
    function av(a,b){for(var c=0;c<=a.Kb;c++)for(;cv(a,c););a.normalize();for(c=0;ce?Bu(a,d):hb)for(c=a.Kb;0<=c;c--)for(d=Au(a),e=Du(a),f=e+1;ee?Bu(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.Eg);a.Eg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Hu(a,b,a.Eg,-1,!0,!0),a.Eg++);var f=0;b=[];for(f=0;fc)for(k=a.Kb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)}
    ju.prototype.commitLayout=function(){if(this.tq)for(var a=vu(this,!0),b=vu(this,!1),c=this.network.edges.i;c.next();){var d=c.value.link;null!==d&&(d.Ab=a,d.Bb=b)}this.commitNodes();this.Zz();this.ju&&this.commitLinks()};function vu(a,b){return 270===a.ba?b?Gc:Jc:90===a.ba?b?Jc:Gc:180===a.ba?b?Hc:Ic:b?Ic:Hc}
    ju.prototype.commitNodes=function(){this.Ag=[];this.Rf=[];this.Qf=[];this.Ob=[];for(var a=0;a<=this.rb;a++)this.Ag[a]=0,this.Rf[a]=0,this.Qf[a]=0,this.Ob[a]=0;for(a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;this.Ag[c]=Math.max(this.Ag[c],this.nodeMinLayerSpace(b,!0));this.Rf[c]=Math.max(this.Rf[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.Lm,c=0;c<=this.rb;c++){var e=d;0>=this.Ag[c]+this.Rf[c]&&(e=0);0=r.M.bottom?(Ma=r.M.y+r.M.height,
            b.w(U++,na,Ma+kb),b.w(U++,na,Ma),b.w(U++,na,Ma-Ia)):(b.w(U++,na,ja+kb),b.w(U++,na,ja),b.w(U++,na,ja-Ia)):270===this.ba?ja<=r.M.y?(Ma=r.M.y,b.w(U++,na,Ma-Ia),b.w(U++,na,Ma),b.w(U++,na,Ma+kb)):(b.w(U++,na,ja-Ia),b.w(U++,na,ja),b.w(U++,na,ja+kb)):0===this.ba&&(na>=r.M.right?(Ma=r.M.x+r.M.width,b.w(U++,Ma+kb,ja),b.w(U++,Ma,ja),b.w(U++,Ma-Ia,ja)):(b.w(U++,na+kb,ja),b.w(U++,na,ja),b.w(U++,na-Ia,ja)));else{b.w(U++,fb,pb);var sd=0;if(180===this.ba||0===this.ba){if(180===this.ba?na>=r.M.right:na<=r.M.x)sd=
            (0===this.ba?-Ia:kb)/2;b.w(U++,fb+sd,ja)}else{if(270===this.ba?ja>=r.M.bottom:ja<=r.M.y)sd=(90===this.ba?-Ia:kb)/2;b.w(U++,na,pb+sd)}b.w(U++,na,ja)}else Ia=Math.max(10,this.Ag[Oa.layer]),kb=Math.max(10,this.Rf[Oa.layer]),180===this.ba?(Fa&&b.w(U++,na-Ia,ja),b.w(U++,na,ja),Fa&&b.w(U++,na+kb,ja)):90===this.ba?(Fa&&b.w(U++,na,ja+kb),b.w(U++,na,ja),Fa&&b.w(U++,na,ja-Ia)):270===this.ba?(Fa&&b.w(U++,na,ja-Ia),b.w(U++,na,ja),Fa&&b.w(U++,na,ja+kb)):(Fa&&b.w(U++,na+kb,ja),b.w(U++,na,ja),Fa&&b.w(U++,na-Ia,
            ja));r=Oa}if(null===k||n!==yb||eb)if(fb=b.l(U-1).x,pb=b.l(U-1).y,na=b.l(U).x,ja=b.l(U).y,eb){var td=this.Rf[q.layer],Nc=0;180===this.ba||0===this.ba?(Nc=pb,Nc>=q.M.y&&Nc<=q.M.bottom&&(180===this.ba?na>=q.M.x:na<=q.M.right)&&(Ma=q.la+(180===this.ba?-td:td),Nc=Nc=q.M.x&&Nc<=q.M.right&&(270===this.ba?ja>=q.M.y:ja<=q.M.bottom)&&(Ma=q.ra+(270===this.ba?-td:td),Nc=Nc=q.M.x?(Ma=q.M.x+q.M.width,b.ca(U-2,Ma,pb),b.ca(U-1,Ma+kb,pb)):90===this.ba&&ja<=q.M.bottom?(Ma=q.M.y,b.ca(U-2,fb,Ma),b.ca(U-1,fb,Ma-Ia)):270===this.ba&&ja>=q.M.y?(Ma=q.M.y+q.M.height,b.ca(U-2,fb,Ma),b.ca(U-1,fb,Ma+kb)):0===this.ba&&na<=q.M.right&&(Ma=q.M.x,b.ca(U-2,Ma,pb),b.ca(U-1,Ma-Ia,pb));else{Ia=Math.max(10,
            this.Ag[q.layer]);kb=Math.max(10,this.Rf[q.layer]);sd=0;if(180===this.ba||0===this.ba){if(180===this.ba?na<=q.M.x:na>=q.M.right)sd=(0===this.ba?kb:-Ia)/2;b.w(U++,na+sd,pb)}else{if(270===this.ba?ja<=q.M.y:ja>=q.M.bottom)sd=(90===this.ba?kb:-Ia)/2;b.w(U++,fb,ja+sd)}b.w(U++,na,ja)}}else{for(;null!==q&&q!==r;){Mc=Oa=null;for(var qh=q.kc.i;qh.next();){var Ve=qh.value;if(Ve.link===c.link&&(Oa=Ve.toVertex,Mc=Ve.fromVertex,null!==Mc.td&&(Mc=null),null===Oa.td))break}var fb=0,pb=0,na=0,ja=0,Za=0,Ia=0,kb=0;
            if(Oa!==r)if(fb=b.l(U-1).x,pb=b.l(U-1).y,na=Oa.la,ja=Oa.ra,eb)if(180===this.ba||0===this.ba){var Hd=null!==Mc?Mc.ra:pb;Hd!==ja&&(Za=this.Ob[Oa.layer],2===U&&(Za=0===this.ba?Math.max(Za,fb):Math.min(Za,fb)),b.w(U++,Za,pb),b.w(U++,Za,ja))}else{var Df=null!==Mc?Mc.la:fb;Df!==na&&(Za=this.Ob[Oa.layer],2===U&&(Za=90===this.ba?Math.max(Za,pb):Math.min(Za,pb)),b.w(U++,fb,Za),b.w(U++,na,Za))}else Ia=Math.max(10,this.Ag[Oa.layer]),kb=Math.max(10,this.Rf[Oa.layer]),180===this.ba?(b.w(U++,na+kb,ja),Fa&&b.w(U++,
                na,ja),b.w(U++,na-Ia,ja)):90===this.ba?(b.w(U++,na,ja-Ia),Fa&&b.w(U++,na,ja),b.w(U++,na,ja+kb)):270===this.ba?(b.w(U++,na,ja+kb),Fa&&b.w(U++,na,ja),b.w(U++,na,ja-Ia)):(b.w(U++,na-Ia,ja),Fa&&b.w(U++,na,ja),b.w(U++,na+kb,ja));q=Oa}eb&&(fb=b.l(U-1).x,pb=b.l(U-1).y,na=b.l(U).x,ja=b.l(U).y,180===this.ba||0===this.ba?pb!==ja&&(Za=0===this.ba?Math.min(Math.max((na+fb)/2,this.Ob[r.layer]),na):Math.max(Math.min((na+fb)/2,this.Ob[r.layer]),na),b.w(U++,Za,pb),b.w(U++,Za,ja)):fb!==na&&(Za=90===this.ba?Math.min(Math.max((ja+
                pb)/2,this.Ob[r.layer]),ja):Math.max(Math.min((ja+pb)/2,this.Ob[r.layer]),ja),b.w(U++,fb,Za),b.w(U++,na,Za)))}if(null!==d&&Fa){if(null!==h){if(n===yb){var pe=b.l(0),Yd=b.l(2);pe.L(Yd)||b.ca(1,(pe.x+Yd.x)/2,(pe.y+Yd.y)/2)}ya=b.getLinkPoint(e,h,yb,!0,!1,f,k);ya.I()||ya.set(e.W.Ml);b.ca(0,ya.x,ya.y)}null!==k&&(p===yb&&(pe=b.l(b.qa-1),Yd=b.l(b.qa-3),pe.L(Yd)||b.ca(b.qa-2,(pe.x+Yd.x)/2,(pe.y+Yd.y)/2)),ya=b.getLinkPoint(f,k,yb,!1,!1,e,h),ya.I()||ya.set(f.W.Ml),b.ca(b.qa-1,ya.x,ya.y))}b.kj();c.commit()}}}for(var gd=
        new H(W),rh=this.network.edges.i;rh.next();){var Ef=rh.value.link;null!==Ef&&Ef.ac&&!gd.contains(Ef)&&gd.add(Ef)}if(0Ac.y&&(tc=gb.y>Ac.y?0:Zd.xCc.x&&(Eg=vh.x>Cc.x?0:wc.yb.layer?1:a.Zeb.Ze?1:a.reb.re?1:0:0};ju.prototype.hG=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.firstb.first||a.uib.ui||a.Zeb.Ze?1:a.reb.re?1:0:0};
    ju.prototype.iy=function(a,b){return a instanceof fv&&b instanceof fv&&a!==b?a.feb.fe||a.uib.ui||a.Zeb.Ze?1:a.reb.re?1:0:0};function gv(a,b){var c=a-b;return-1c}function xu(a,b){var c,d=a.je[b];if(d>=a.jh.length){c=[];for(var e=0;ea&&(this.$i=a,this.J()))});w.defineProperty(ju,{tq:"setsPortSpots"},function(){return this.ci},function(a){this.ci!==a&&(w.j(a,"boolean",ju,"setsPortSpots"),this.ci=a,this.J())});w.defineProperty(ju,{EF:"linkSpacing"},function(){return this.Zr},function(a){this.Zr!==a&&(w.j(a,"number",ju,"linkSpacing"),0<=a&&(this.Zr=a,this.J()))});w.u(ju,{RI:"maxLayer"},function(){return this.rb});
    w.u(ju,{pL:"maxIndex"},function(){return this.Yv});w.u(ju,{oL:"maxColumn"},function(){return this.Kb});w.u(ju,{uL:"minIndexLayer"},function(){return this.hs});w.u(ju,{qL:"maxIndexLayer"},function(){return this.Sf});var ku;ju.CycleDepthFirst=ku=w.p(ju,"CycleDepthFirst",0);var qu;ju.CycleGreedy=qu=w.p(ju,"CycleGreedy",1);var lu;ju.LayerOptimalLinkLength=lu=w.p(ju,"LayerOptimalLinkLength",0);var Iu;ju.LayerLongestPathSink=Iu=w.p(ju,"LayerLongestPathSink",1);var Ku;
    ju.LayerLongestPathSource=Ku=w.p(ju,"LayerLongestPathSource",2);var mu;ju.InitDepthFirstOut=mu=w.p(ju,"InitDepthFirstOut",0);var Qu;ju.InitDepthFirstIn=Qu=w.p(ju,"InitDepthFirstIn",1);var Ou;ju.InitNaive=Ou=w.p(ju,"InitNaive",2);var Uu;ju.AggressiveNone=Uu=w.p(ju,"AggressiveNone",0);var nu;ju.AggressiveLess=nu=w.p(ju,"AggressiveLess",1);var Vu;ju.AggressiveMore=Vu=w.p(ju,"AggressiveMore",2);ju.PackNone=0;var Wu;ju.PackExpand=Wu=1;var Xu;ju.PackStraighten=Xu=2;var Zu;ju.PackMedian=Zu=4;var ou;
    ju.PackAll=ou=7;function fv(){this.index=this.re=this.Ze=this.fe=this.first=this.layer=0;this.link=null;this.ui=0}w.ce(fv,{layer:!0,first:!0,fe:!0,Ze:!0,re:!0,index:!0,link:!0,ui:!0});function pu(){ug.call(this)}w.Ka(pu,ug);w.ga("LayeredDigraphNetwork",pu);pu.prototype.createVertex=function(){return new hv};pu.prototype.createEdge=function(){return new iv};
    function hv(){ls.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.Op=NaN;this.nn=0;this.TA=this.UA=null}w.Ka(hv,ls);w.ga("LayeredDigraphVertex",hv);function iv(){ms.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}w.Ka(iv,ms);w.ga("LayeredDigraphEdge",iv);
    function Z(){0b.level)return!1;a.removeChild(c.parent,c)}return!0}Z.prototype.removeChild=function(a,b){if(null!==a&&null!==b){for(var c=a.children,d=0,e=0;ef?Zv(a,k,wa,A,y):$v(a,k,wa,A,y);wa=y.x;A=y.width;y=y.height;break;case Nv:for(m=0;ms&&(basb&&(Jw(a,-sb,0,eb,m-1),Kw(E,-sb,0),Kw(P,-sb,0),sb=0)}n.pa.m(sb,ga);A=Math.max(A,$);y=Math.max(y,K+(0===ya?0:x)+U.height);ba=$}else{0s&&(gasb&&(Jw(a,0,-sb,eb,m-1),Kw(E,0,-sb),Kw(P,0,-sb),sb=0);n.pa.m(ba,sb);y=Math.max(y,S);A=Math.max(A,K+(0===ya?0:x)+U.width);ga=S}Fa++}0q&&(q=0),135v&&(v=0),p===Ov&&(l+=u/2+a.T.y),k+=d+c):b?(null===a.comments?d>A&&(p=Ow(p,d-A,0),k=p.x,l=p.y,A=d,q=0):A=Mw(a,A,q),0>q&&(k-=q,q=0),135y&&(p=Ow(p,0,e-y),k=p.x,l=p.y,y=e,v=0):y=Nw(a,y,v),0>v&&(l-=v,v=0),k+=d+c);if(0f[0].x?f[2].assign(f[1]):f[1].assign(f[2])),f[3].yf[0].x?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(q+d,0),p[1].m(p[0].x,e),p[2].yf[0].y?f[2].assign(f[1]):f[1].assign(f[2])),f[3].xf[0].y?f[3].assign(f[2]):f[2].assign(f[3])),p[0].m(0,v+e),p[1].m(d,p[0].y),p[2].xc?Zv(b,e,Fa,K,E):$v(b,e,Fa,K,E);Fa=E.x;K=E.width;E=E.height;break;case Nv:for(k=0;kr&&($r&&(Sp&&(p=0),135A&&(A=0));b.Na.m(p,A);b.kb.m(K,E)}}
    function Zv(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.kb.width;e=h.kb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Uv(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(v,
            q)+b+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(d+b,c+k/2-h.T.y-h.Na.y),d=Math.max(d,Math.max(x,p)+b+s.width),m=c+k/2-h.T.y-h.Na.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));return new B(c,0,d,e)}
    function $v(a,b,c,d,e){var f=b.length;if(0===f)return new B(c,0,d,e);if(1===f){var h=b[0];d=h.kb.width;e=h.kb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Uv(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(v,
            q))+l+s.height),0>h.pa.x&&(c=Sw(a,h.pa.x,!1,c,k))):(h.pa.m(-d-s.width-l,c+k/2-h.T.y-h.Na.y),d=Math.max(d,Math.abs(Math.min(x,p))+l+s.width),p=c+k/2-h.T.y-h.Na.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.pa.y&&(c=Sw(a,h.pa.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Vv:return a.width>b?a.width:b;case Wv:return 2*a.T.x>b?a.width:b+a.width-2*a.T.x;case Mv:case Bv:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Nv:return a.width-a.T.x+a.nodeSpacing/2+b;case Ov:return Math.max(a.width,a.T.x+a.nodeSpacing/2+b);default:return b}}
    function Nw(a,b,c){switch(a.alignment){case Kv:case Lw:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Vv:return a.height>b?a.height:b;case Wv:return 2*a.T.y>b?a.height:b+a.height-2*a.T.y;case Mv:case Bv:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Nv:return a.height-a.T.y+a.nodeSpacing/2+b;case Ov:return Math.max(a.height,a.T.y+a.nodeSpacing/2+b);default:return b}}
    function Ow(a,b,c){switch(a){case Lw:b/=2;c/=2;break;case Kv:b/=2;c/=2;break;case Vv:c=b=0;break;case Wv:break;default:w.k("Unhandled alignment value "+a.toString())}return new z(b,c)}function Gw(a,b,c,d,e,f){b=Ow(b,c,d);Jw(a,b.x,b.y,e,f)}function Jw(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].pa;f.x+=b;f.y+=c}}
    function Hw(a,b,c,d){var e=b.parent;switch(a.Of){case kv:for(a=b.mc;a.next();)b=a.value,b.fromVertex===e&&b.Is.m(c,d);break;case rv:for(a=b.kc;a.next();)b=a.value,b.toVertex===e&&b.Is.m(c,d);break;default:w.k("Unhandled path value "+a.Of.toString())}}function Kw(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m=l=0;lt&&e.ye.y&&tb.length||null===l||2>l.length)d=null;else{n=aw(a,b.length+l.length);for(d=f=e=0;fe;)t=l[f++],n[d++].m(t.x+m,t.y);l=aw(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=aw(a,p.length+f.length);for(m=x=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=aw(a,m);for(l=0;lp.length||null===q||2>q.length))for(m=l=0;lf&&e.xe.x&&fb.length||null===l||2>l.length)d=null;else{n=aw(a,
        b.length+l.length);for(d=f=e=0;fe;)t=l[f++],n[d++].m(t.x,t.y+m);l=aw(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=aw(a,p.length+f.length);for(m=x=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=aw(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0}
    function Xv(a){var b=Uv(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.va.nodeIndentPastParent=a,this.J()))});
    w.defineProperty(Z,{nodeSpacing:"nodeSpacing"},function(){return this.va.nodeSpacing},function(a){this.va.nodeSpacing!==a&&(w.j(a,"number",Z,"nodeSpacing"),this.va.nodeSpacing=a,this.J())});w.defineProperty(Z,{layerSpacing:"layerSpacing"},function(){return this.va.layerSpacing},function(a){this.va.layerSpacing!==a&&(w.j(a,"number",Z,"layerSpacing"),this.va.layerSpacing=a,this.J())});
    w.defineProperty(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.va.layerSpacingParentOverlap},function(a){this.va.layerSpacingParentOverlap!==a&&(w.j(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.va.layerSpacingParentOverlap=a,this.J()))});w.defineProperty(Z,{compaction:"compaction"},function(){return this.va.compaction},function(a){this.va.compaction!==a&&(w.mb(a,Z,Z,"compaction"),a===Rv||a===Tv)&&(this.va.compaction=a,this.J())});
    w.defineProperty(Z,{breadthLimit:"breadthLimit"},function(){return this.va.breadthLimit},function(a){this.va.breadthLimit!==a&&(w.j(a,"number",Z,"breadthLimit"),0<=a&&(this.va.breadthLimit=a,this.J()))});w.defineProperty(Z,{rowSpacing:"rowSpacing"},function(){return this.va.rowSpacing},function(a){this.va.rowSpacing!==a&&(w.j(a,"number",Z,"rowSpacing"),this.va.rowSpacing=a,this.J())});
    w.defineProperty(Z,{rowIndent:"rowIndent"},function(){return this.va.rowIndent},function(a){this.va.rowIndent!==a&&(w.j(a,"number",Z,"rowIndent"),0<=a&&(this.va.rowIndent=a,this.J()))});w.defineProperty(Z,{commentSpacing:"commentSpacing"},function(){return this.va.commentSpacing},function(a){this.va.commentSpacing!==a&&(w.j(a,"number",Z,"commentSpacing"),this.va.commentSpacing=a,this.J())});
    w.defineProperty(Z,{commentMargin:"commentMargin"},function(){return this.va.commentMargin},function(a){this.va.commentMargin!==a&&(w.j(a,"number",Z,"commentMargin"),this.va.commentMargin=a,this.J())});w.defineProperty(Z,{setsPortSpot:"setsPortSpot"},function(){return this.va.setsPortSpot},function(a){this.va.setsPortSpot!==a&&(w.j(a,"boolean",Z,"setsPortSpot"),this.va.setsPortSpot=a,this.J())});
    w.defineProperty(Z,{portSpot:"portSpot"},function(){return this.va.portSpot},function(a){w.G(a,L,Z,"portSpot");this.va.portSpot.L(a)||(this.va.portSpot=a,this.J())});w.defineProperty(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.va.setsChildPortSpot},function(a){this.va.setsChildPortSpot!==a&&(w.j(a,"boolean",Z,"setsChildPortSpot"),this.va.setsChildPortSpot=a,this.J())});
    w.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.va.childPortSpot},function(a){w.G(a,L,Z,"childPortSpot");this.va.childPortSpot.L(a)||(this.va.childPortSpot=a,this.J())});w.defineProperty(Z,{yK:"alternateSorting"},function(){return this.wa.sorting},function(a){this.wa.sorting!==a&&(w.mb(a,Z,Z,"alternateSorting"),a===Gv||a===Hv||a===Iv||Jv)&&(this.wa.sorting=a,this.J())});
    w.defineProperty(Z,{mK:"alternateComparer"},function(){return this.wa.comparer},function(a){this.wa.comparer!==a&&(w.j(a,"function",Z,"alternateComparer"),this.wa.comparer=a,this.J())});w.defineProperty(Z,{gK:"alternateAngle"},function(){return this.wa.angle},function(a){this.wa.angle!==a&&(w.j(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.wa.angle=a,this.J())});
    w.defineProperty(Z,{fK:"alternateAlignment"},function(){return this.wa.alignment},function(a){this.wa.alignment!==a&&(w.mb(a,Z,Z,"alternateAlignment"),this.wa.alignment=a,this.J())});w.defineProperty(Z,{qK:"alternateNodeIndent"},function(){return this.wa.nodeIndent},function(a){this.wa.nodeIndent!==a&&(w.j(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.wa.nodeIndent=a,this.J()))});
    w.defineProperty(Z,{rK:"alternateNodeIndentPastParent"},function(){return this.wa.nodeIndentPastParent},function(a){this.wa.nodeIndentPastParent!==a&&(w.j(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.wa.nodeIndentPastParent=a,this.J()))});w.defineProperty(Z,{sK:"alternateNodeSpacing"},function(){return this.wa.nodeSpacing},function(a){this.wa.nodeSpacing!==a&&(w.j(a,"number",Z,"alternateNodeSpacing"),this.wa.nodeSpacing=a,this.J())});
    w.defineProperty(Z,{oK:"alternateLayerSpacing"},function(){return this.wa.layerSpacing},function(a){this.wa.layerSpacing!==a&&(w.j(a,"number",Z,"alternateLayerSpacing"),this.wa.layerSpacing=a,this.J())});w.defineProperty(Z,{pK:"alternateLayerSpacingParentOverlap"},function(){return this.wa.layerSpacingParentOverlap},function(a){this.wa.layerSpacingParentOverlap!==a&&(w.j(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.wa.layerSpacingParentOverlap=a,this.J()))});
    w.defineProperty(Z,{lK:"alternateCompaction"},function(){return this.wa.compaction},function(a){this.wa.compaction!==a&&(w.mb(a,Z,Z,"alternateCompaction"),a===Rv||a===Tv)&&(this.wa.compaction=a,this.J())});w.defineProperty(Z,{hK:"alternateBreadthLimit"},function(){return this.wa.breadthLimit},function(a){this.wa.breadthLimit!==a&&(w.j(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.wa.breadthLimit=a,this.J()))});
    w.defineProperty(Z,{vK:"alternateRowSpacing"},function(){return this.wa.rowSpacing},function(a){this.wa.rowSpacing!==a&&(w.j(a,"number",Z,"alternateRowSpacing"),this.wa.rowSpacing=a,this.J())});w.defineProperty(Z,{uK:"alternateRowIndent"},function(){return this.wa.rowIndent},function(a){this.wa.rowIndent!==a&&(w.j(a,"number",Z,"alternateRowIndent"),0<=a&&(this.wa.rowIndent=a,this.J()))});
    w.defineProperty(Z,{kK:"alternateCommentSpacing"},function(){return this.wa.commentSpacing},function(a){this.wa.commentSpacing!==a&&(w.j(a,"number",Z,"alternateCommentSpacing"),this.wa.commentSpacing=a,this.J())});w.defineProperty(Z,{jK:"alternateCommentMargin"},function(){return this.wa.commentMargin},function(a){this.wa.commentMargin!==a&&(w.j(a,"number",Z,"alternateCommentMargin"),this.wa.commentMargin=a,this.J())});
    w.defineProperty(Z,{xK:"alternateSetsPortSpot"},function(){return this.wa.setsPortSpot},function(a){this.wa.setsPortSpot!==a&&(w.j(a,"boolean",Z,"alternateSetsPortSpot"),this.wa.setsPortSpot=a,this.J())});w.defineProperty(Z,{tK:"alternatePortSpot"},function(){return this.wa.portSpot},function(a){w.G(a,L,Z,"alternatePortSpot");this.wa.portSpot.L(a)||(this.wa.portSpot=a,this.J())});
    w.defineProperty(Z,{wK:"alternateSetsChildPortSpot"},function(){return this.wa.setsChildPortSpot},function(a){this.wa.setsChildPortSpot!==a&&(w.j(a,"boolean",Z,"alternateSetsChildPortSpot"),this.wa.setsChildPortSpot=a,this.J())});w.defineProperty(Z,{iK:"alternateChildPortSpot"},function(){return this.wa.childPortSpot},function(a){w.G(a,L,Z,"alternateChildPortSpot");this.wa.childPortSpot.L(a)||(this.wa.childPortSpot=a,this.J())});var jv;Z.PathDefault=jv=w.p(Z,"PathDefault",-1);var kv;
    Z.PathDestination=kv=w.p(Z,"PathDestination",0);var rv;Z.PathSource=rv=w.p(Z,"PathSource",1);var Gv;Z.SortingForwards=Gv=w.p(Z,"SortingForwards",10);var Hv;Z.SortingReverse=Hv=w.p(Z,"SortingReverse",11);var Iv;Z.SortingAscending=Iv=w.p(Z,"SortingAscending",12);var Jv;Z.SortingDescending=Jv=w.p(Z,"SortingDescending",13);var Lw;Z.AlignmentCenterSubtrees=Lw=w.p(Z,"AlignmentCenterSubtrees",20);var Kv;Z.AlignmentCenterChildren=Kv=w.p(Z,"AlignmentCenterChildren",21);var Vv;
    Z.AlignmentStart=Vv=w.p(Z,"AlignmentStart",22);var Wv;Z.AlignmentEnd=Wv=w.p(Z,"AlignmentEnd",23);var Mv;Z.AlignmentBus=Mv=w.p(Z,"AlignmentBus",24);var Bv;Z.AlignmentBusBranching=Bv=w.p(Z,"AlignmentBusBranching",25);var Nv;Z.AlignmentTopLeftBus=Nv=w.p(Z,"AlignmentTopLeftBus",26);var Ov;Z.AlignmentBottomRightBus=Ov=w.p(Z,"AlignmentBottomRightBus",27);var Rv;Z.CompactionNone=Rv=w.p(Z,"CompactionNone",30);var Tv;Z.CompactionBlock=Tv=w.p(Z,"CompactionBlock",31);var lv;
    Z.StyleLayered=lv=w.p(Z,"StyleLayered",40);var Fv;Z.StyleLastParents=Fv=w.p(Z,"StyleLastParents",41);var Ev;Z.StyleAlternating=Ev=w.p(Z,"StyleAlternating",42);var Dv;Z.StyleRootOnly=Dv=w.p(Z,"StyleRootOnly",43);var nv;Z.ArrangementVertical=nv=w.p(Z,"ArrangementVertical",50);var Uw;Z.ArrangementHorizontal=Uw=w.p(Z,"ArrangementHorizontal",51);var qv;Z.ArrangementFixedRoots=qv=w.p(Z,"ArrangementFixedRoots",52);var mv;Z.LayerIndividual=mv=w.p(Z,"LayerIndividual",60);var zv;
    Z.LayerSiblings=zv=w.p(Z,"LayerSiblings",61);var yv;Z.LayerUniform=yv=w.p(Z,"LayerUniform",62);function pv(){ug.call(this)}w.Ka(pv,ug);w.ga("TreeNetwork",pv);pv.prototype.createVertex=function(){return new ov};pv.prototype.createEdge=function(){return new Ww};
    function ov(){ls.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.pa=new z(0,0);this.kb=new ia(0,0);this.Na=new z(0,0);this.oq=this.nq=this.yJ=!1;this.Fu=this.lu=null;this.sorting=Gv;this.comparer=rs;this.angle=0;this.alignment=Kv;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Tv;this.breadthLimit=
        0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=qc;this.setsChildPortSpot=!0;this.childPortSpot=qc}w.Ka(ov,ls);w.ga("TreeVertex",ov);
    ov.prototype.copyInheritedPropertiesFrom=function(a){null!==a&&(this.sorting=a.sorting,this.comparer=a.comparer,this.angle=a.angle,this.alignment=a.alignment,this.nodeIndent=a.nodeIndent,this.nodeIndentPastParent=a.nodeIndentPastParent,this.nodeSpacing=a.nodeSpacing,this.layerSpacing=a.layerSpacing,this.layerSpacingParentOverlap=a.layerSpacingParentOverlap,this.compaction=a.compaction,this.breadthLimit=a.breadthLimit,this.rowSpacing=a.rowSpacing,this.rowIndent=a.rowIndent,this.commentSpacing=a.commentSpacing,
        this.commentMargin=a.commentMargin,this.setsPortSpot=a.setsPortSpot,this.portSpot=a.portSpot,this.setsChildPortSpot=a.setsChildPortSpot,this.childPortSpot=a.childPortSpot)};w.u(ov,{rn:"childrenCount"},function(){return this.children.length});w.defineProperty(ov,{IL:"relativePosition"},function(){return this.pa},function(a){this.pa.set(a)});w.defineProperty(ov,{VL:"subtreeSize"},function(){return this.kb},function(a){this.kb.set(a)});
    w.defineProperty(ov,{UL:"subtreeOffset"},function(){return this.Na},function(a){this.Na.set(a)});function Ww(){ms.call(this);this.Is=new z(0,0)}w.Ka(Ww,ms);w.ga("TreeEdge",Ww);
    Ww.prototype.commit=function(){var a=this.link;if(null!==a&&!a.$l){var b=this.network.Tb,c=null,d=null;switch(b.Of){case kv:c=this.fromVertex;d=this.toVertex;break;case rv:c=this.toVertex;d=this.fromVertex;break;default:w.k("Unhandled path value "+b.Of.toString())}if(null!==c&&null!==d)if(b=this.Is,0!==b.x||0!==b.y||c.yJ){var d=c.gb,e=Uv(c),f=Xv(c),h=c.rowSpacing;a.eo();var k=a.af===Jj,l=a.ac,m=0,n,p;a.im();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Yv(c))))):c.alignment===Vv?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Yv(c))))):c.alignment===Vv?(r=d.left+b.x,0===b.x&&n.x

 

你可能感兴趣的:(gojs)