/* * GoJS v1.6.18 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-2016 by Northwoods Software Corporation. All Rights Reserved. * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.6.18/doc/license.html. */ (function(window) { var g,ea={};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):v.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Th:function(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):v.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},Ax:[],L:function(){var a=v.Ax.pop();return void 0===a?new z:a},Mb:function(a,b){var c=v.Ax.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){v.Ax.push(a)}, LA:[],Fl:function(){var a=v.LA.pop();return void 0===a?new ia:a},Zj:function(a){v.LA.push(a)},Bx:[],$f:function(){var a=v.Bx.pop();return void 0===a?new B:a},gk:function(a,b,c,d){var e=v.Bx.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},Vb:function(a){v.Bx.push(a)},MA:[],ph:function(){var a=v.MA.pop();return void 0===a?new ja:a},$e:function(a){v.MA.push(a)},Cx:null,s:function(){var a=v.Cx;return null!==a?(v.Cx=null,a):new ma},q:function(a){a.reset();v.Cx=a},KA:[], jb:function(){var a=v.KA.pop();return void 0===a?[]:a},sa:function(a){a.length=0;v.KA.push(a)},gj:Object.freeze([]),Jl:1,dc:function(a){a.__gohashid=v.Jl++},ot:function(a){var b=a.__gohashid;void 0===b&&(b=v.Jl++,a.__gohashid=b);return b},ld:function(a){return a.__gohashid},ea:function(a,b){b.Lx=a;ea[a]=b},Ja:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},Uh:function(a){a.RF=!0},defineProperty:function(a,b,c,d,e){v.j(a,"function","Util.defineProperty:classfunc"); v.j(b,"object","Util.defineProperty:propobj");v.j(c,"function","Util.defineProperty:getter");v.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}},XI:!1,u:function(a,b,c,d){v.j(a,"function","Util.defineReadOnlyProperty:classfunc");v.j(b,"object","Util.defineReadOnlyProperty:propobj"); v.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){v.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}},Kd:function(a,b){for(var c in b)b[c]=!0;a.prototype.NF=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"=== typeof a?v.af(a):null===a?"*":""},af:function(a){if("function"===typeof a){if(a.Lx)return a.Lx;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9,c).trim();if(""!==b)return a.Lx=b}else if("object"===typeof a&&a.constructor)return v.af(a.constructor);return typeof a},p:function(a,b,c){v.j(a,"function","Util.defineEnumValue:classfunc");v.j(b,"string","Util.defineEnumValue:name");v.j(c,"number","Util.defineEnumValue:num");c=new fa(a,b,c);Object.freeze(c);a[b]=c;var d=a.ku;d instanceof na||(d=new na("string",fa),a.ku=d);d.add(b,c);return c},qb: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},Ka: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){}},Xt:function(a,b){v.j(a,"object","Setting properties requires Objects as arguments");v.j(b,"object","Setting properties requires Objects as arguments"); var c=a instanceof D,d=a instanceof E,e;for(e in b){""===e&&v.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[v.tg("7ca11abfd7330390")](v.tg(c[d-1]),10,15*d+0);b[v.tg("7ca11abfd022028846")]=v.tg("39f046ebb36e4b");for(d=1;5>d;d++)b[v.tg("7ca11abfd7330390")](v.tg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])v.p=function(a,b){var c=new fa(a,b,2);Object.freeze(c);a[b]=c;var d=a.ku;d instanceof na||(d=new na("string",fa),a.ku=d);d.add(b,c);return c};return a}();function fa(a,b,c){v.dc(this);this.ZA=a;this.Ob=b;this.WF=c}v.ea("EnumValue",fa);fa.prototype.toString=function(){return v.af(this.ZA)+"."+this.Ob};v.u(fa,{pe:"classType"},function(){return this.ZA});v.u(fa,{name:"name"},function(){return this.Ob});v.u(fa,{value:"value"},function(){return this.WF}); var ra;fa.findName=ra=function(a,b){if(void 0===b||null===b||""===b)return null;v.j(a,"function","findName:classfunc");v.j(b,"string","EnumValue.findName:name");var c=a.ku;return c instanceof na?c.ja(b):null};function sa(){this.XA=[]}sa.prototype.toString=function(){return this.XA.join("")};sa.prototype.add=function(a){""!==a&&this.XA.push(a)};function ta(){} function va(a){void 0===a&&(a=42);this.seed=a;this.wx=48271;this.ju=2147483647;this.JA=this.ju/this.wx;this.zF=this.ju%this.wx;this.yF=1/this.ju;this.random()}va.prototype.random=function(){var a=this.seed%this.JA*this.wx-this.seed/this.JA*this.zF;this.seed=0this.key)return!1;v.La(a)}var a=a.n,b=a.length,c=++this.Oc,d=this.Gh;if(null!==d)for(;cthis.key)return!1;v.La(a)}var b=--this.Oc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.Cf();return!1};Ba.prototype.first=Ba.prototype.first=function(){var a=this.tc;this.eb=a.F;var b=a.n;this.Oc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null}; Ba.prototype.any=function(a){var b=this.tc;b.vj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.F!==c&&v.La(b)}return!1};Ba.prototype.all=function(a){var b=this.tc;b.vj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.F!==c&&v.La(b)}return!0};Ba.prototype.each=function(a){var b=this.tc;b.vj=null;var c=b.F,d=b.n,e=d.length;this.Oc=e;for(e-=1;0<=e;e--)a(d[e]),b.F!==c&&v.La(b);return this}; Ba.prototype.map=function(a){var b=this.tc;b.vj=null;var c=b.F,d=[],e=b.n,f=e.length;this.Oc=f;for(f-=1;0<=f;f--)d.push(a(e[f])),b.F!==c&&v.La(b);a=new I;a.n=d;a.Bc();return a.i};Ba.prototype.filter=function(a){var b=this.tc;b.vj=null;var c=b.F,d=[],e=b.n,f=e.length;this.Oc=f;for(f-=1;0<=f;f--){var h=e[f];a(h)&&d.push(h);b.F!==c&&v.La(b)}a=new I(b.ia);a.n=d;a.Bc();return a.i};Ba.prototype.concat=function(a){this.tc.vj=null;return new za(this,a.i)};v.u(Ba,{count:"count"},function(){return this.tc.n.length}); Ba.prototype.Cf=function(){this.key=-1;this.value=null;this.eb=-1;this.tc.vj=this};Ba.prototype.toString=function(){return"ListIteratorBackwards("+this.Oc+"/"+this.tc.count+")"}; function I(a){v.dc(this);this.D=!1;this.n=[];this.F=0;this.vj=this.Xb=null;void 0===a||null===a?this.ia=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ia=a:v.va(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ia=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:v.va(a,"null, a primitive type name, or a class type", "List constructor: type")}v.ea("List",I);I.prototype.Bc=function(){var a=this.F;a++;999999999a||a>=b.length)&&v.va(a,"0 <= i < length",I,"elt:i");return b[a]};I.prototype.setElt=I.prototype.set=I.prototype.Hg=function(a,b){var c=this.n;(0>a||a>=c.length)&&v.va(a,"0 <= i < length",I,"setElt:i");this.D&&v.ka(this,a);c[a]=b};I.prototype.first=I.prototype.first=function(){var a=this.n;return 0===a.length?null:a[0]}; I.prototype.last=I.prototype.Qd=function(){var a=this.n,b=a.length;return 0a&&v.va(a,">= 0",I,"insertAt:i");this.D&&v.ka(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Bc();return!0};I.prototype.remove=I.prototype["delete"]=I.prototype.remove=function(a){if(null===a)return!1;this.D&&v.ka(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.Bc();return!0}; I.prototype.removeAt=I.prototype.Vc=function(a){var b=this.n;(0>a||a>=b.length)&&v.va(a,"0 <= i < length",I,"removeAt:i");this.D&&v.ka(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Bc()};I.prototype.removeRange=I.prototype.removeRange=function(a,b){var c=this.n;(0>a||a>=c.length)&&v.va(a,"0 <= from < length",I,"elt:from");(0>b||b>=c.length)&&v.va(b,"0 <= to < length",I,"elt:to");this.D&&v.ka(this,a);var d=c.slice((b||a)+1||c.length);c.length=0>a?c.length+a:a;c.push.apply(c,d);this.Bc()}; I.prototype.copy=function(){var a=new I(this.ia),b=this.n;0=f)return this;(0>b||b>=e-1)&&v.va(b,"0 <= from < length",I,"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 xa;var a=this.Xb;return null!==a?(a.reset(),a):new Aa(this)}); v.u(I,{Sm:"iteratorBackwards"},function(){if(0>=this.n.length)return xa;var a=this.vj;return null!==a?(a.reset(),a):new Ba(this)});function Da(a){this.Ih=a;this.reset()}v.Kd(Da,{key:!0,value:!0});v.u(Da,{i:"iterator"},function(){return this});Da.prototype.reset=Da.prototype.reset=function(){var a=this.Ih;a.Xb=null;this.eb=a.F;this.cb=null}; Da.prototype.next=Da.prototype.hasNext=Da.prototype.next=function(){var a=this.Ih;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.value=b.value,this.key=b.key,!0;this.Cf();return!1};Da.prototype.first=Da.prototype.first=function(){var a=this.Ih;this.eb=a.F;a=a.Da;if(null!==a){this.cb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; Da.prototype.any=function(a){var b=this.Ih;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d.value))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};Da.prototype.all=function(a){var b=this.Ih;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d.value))return!1;b.F!==c&&v.La(b);d=d.Va}return!0};Da.prototype.each=function(a){var b=this.Ih;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d.value),b.F!==c&&v.La(b),d=d.Va;return this}; Da.prototype.map=function(a){var b=this.Ih;b.Xb=null;for(var c=new I,d=b.F,e=b.Da;null!==e;)c.add(a(e.value)),b.F!==d&&v.La(b),e=e.Va;return c.i};Da.prototype.filter=function(a){var b=this.Ih;b.Xb=null;for(var c=new I(b.ia),d=b.F,e=b.Da;null!==e;){var f=e.value;a(f)&&c.add(f);b.F!==d&&v.La(b);e=e.Va}return c.i};Da.prototype.concat=function(a){this.Ih.Xb=null;return new za(this,a.i)};v.u(Da,{count:"count"},function(){return this.Ih.fd}); Da.prototype.Cf=function(){this.value=this.key=null;this.eb=-1;this.Ih.Xb=this};Da.prototype.toString=function(){return null!==this.cb?"SetIterator@"+this.cb.value:"SetIterator"}; function J(a){v.dc(this);this.D=!1;void 0===a||null===a?this.ia=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ia=a:v.va(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ia=a===Object?"object":a===String?"string":a===Number?"number":a:v.va(a,"null, a primitive type name, or a class type","Set constructor: type");this.gd={};this.fd=0;this.Xb=null;this.F=0;this.Dh=this.Da=null}v.ea("Set",J); J.prototype.Bc=function(){var a=this.F;a++;999999999=this.fd)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Da(this)});function Ha(a){this.Ga=a;this.reset()}v.Kd(Ha,{key:!0,value:!0});v.u(Ha,{i:"iterator"},function(){return this});Ha.prototype.reset=Ha.prototype.reset=function(){this.eb=this.Ga.F;this.cb=null}; Ha.prototype.next=Ha.prototype.hasNext=Ha.prototype.next=function(){var a=this.Ga;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.value=this.key=a=b.key,!0;this.Cf();return!1};Ha.prototype.first=Ha.prototype.first=function(){var a=this.Ga;this.eb=a.F;a=a.Da;return null!==a?(this.cb=a,this.value=this.key=a=a.key):null}; Ha.prototype.any=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d.key))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};Ha.prototype.all=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d.key))return!1;b.F!==c&&v.La(b);d=d.Va}return!0};Ha.prototype.each=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d.key),b.F!==c&&v.La(b),d=d.Va;return this}; Ha.prototype.map=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)d.add(a(e.key)),b.F!==c&&v.La(b),e=e.Va;return d.i};Ha.prototype.filter=function(a){var b=this.Ga,c=b.F;this.cb=null;for(var d=new I(b.ui),e=b.Da;null!==e;){var f=e.key;a(f)&&d.add(f);b.F!==c&&v.La(b);e=e.Va}return d.i};Ha.prototype.concat=function(a){return new za(this,a.i)};v.u(Ha,{count:"count"},function(){return this.Ga.fd});Ha.prototype.Cf=function(){this.value=this.key=null;this.eb=-1}; Ha.prototype.toString=function(){return null!==this.cb?"MapKeySetIterator@"+this.cb.value:"MapKeySetIterator"};function Ja(a){v.dc(this);this.D=!0;this.Ga=a}v.Ja(Ja,J);Ja.prototype.freeze=function(){return this};Ja.prototype.Oa=function(){return this};Ja.prototype.toString=function(){return"MapKeySet("+this.Ga.toString()+")"};Ja.prototype.add=Ja.prototype.set=Ja.prototype.add=function(){v.k("This Set is read-only: "+this.toString());return!1}; Ja.prototype.contains=Ja.prototype.has=Ja.prototype.contains=function(a){return this.Ga.contains(a)};Ja.prototype.remove=Ja.prototype["delete"]=Ja.prototype.remove=function(){v.k("This Set is read-only: "+this.toString());return!1};Ja.prototype.clear=Ja.prototype.clear=function(){v.k("This Set is read-only: "+this.toString())};Ja.prototype.first=Ja.prototype.first=function(){var a=this.Ga.Da;return null!==a?a.key:null}; Ja.prototype.any=function(a){for(var b=this.Ga.Da;null!==b;){if(a(b.key))return!0;b=b.Va}return!1};Ja.prototype.all=function(a){for(var b=this.Ga.Da;null!==b;){if(!a(b.key))return!1;b=b.Va}return!0};Ja.prototype.each=function(a){for(var b=this.Ga.Da;null!==b;)a(b.key),b=b.Va;return this};Ja.prototype.map=function(a){for(var b=new J,c=this.Ga.Da;null!==c;)b.add(a(c.key)),c=c.Va;return b}; Ja.prototype.filter=function(a){for(var b=new J(this.Ga.ui),c=this.Ga.Da;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Va}return b};Ja.prototype.concat=function(a){return this.iF().Tc(a)};Ja.prototype.copy=function(){return new Ja(this.Ga)};Ja.prototype.toSet=Ja.prototype.iF=function(){var a=new J(this.Ga.ui),b=this.Ga.gd,c;for(c in b)a.add(b[c].key);return a};Ja.prototype.toArray=Ja.prototype.cc=function(){var a=this.Ga.gd,b=Array(this.Ga.fd),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; Ja.prototype.toList=function(){var a=new I(this.ia),b=this.Ga.gd,c;for(c in b)a.add(b[c].key);return a};v.u(Ja,{count:"count"},function(){return this.Ga.fd});v.u(Ja,{size:"size"},function(){return this.Ga.fd});v.u(Ja,{i:"iterator"},function(){return 0>=this.Ga.fd?xa:new Ha(this.Ga)});function La(a){this.Ga=a;this.reset()}v.Kd(La,{key:!0,value:!0});v.u(La,{i:"iterator"},function(){return this});La.prototype.reset=La.prototype.reset=function(){var a=this.Ga;a.wj=null;this.eb=a.F;this.cb=null}; La.prototype.next=La.prototype.hasNext=La.prototype.next=function(){var a=this.Ga;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.value=b.value,this.key=b.key,!0;this.Cf();return!1};La.prototype.first=La.prototype.first=function(){var a=this.Ga;this.eb=a.F;a=a.Da;if(null!==a){this.cb=a;var b=a.value;this.key=a.key;return this.value=b}return null}; La.prototype.any=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d.value))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};La.prototype.all=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d.value))return!1;b.F!==c&&v.La(b);d=d.Va}return!0};La.prototype.each=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d.value),b.F!==c&&v.La(b),d=d.Va;return this}; La.prototype.map=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)d.add(a(e.value)),b.F!==c&&v.La(b),e=e.Va;return d.i};La.prototype.filter=function(a){var b=this.Ga;b.wj=null;var c=b.F;this.cb=null;for(var d=new I(b.ui),e=b.Da;null!==e;){var f=e.value;a(f)&&d.add(f);b.F!==c&&v.La(b);e=e.Va}return d.i};La.prototype.concat=function(a){this.Ga.wj=null;return new za(this,a.i)};v.u(La,{count:"count"},function(){return this.Ga.fd}); La.prototype.Cf=function(){this.value=this.key=null;this.eb=-1;this.Ga.wj=this};La.prototype.toString=function(){return null!==this.cb?"MapValueSetIterator@"+this.cb.value:"MapValueSetIterator"};function Ea(a,b){this.key=a;this.value=b;this.mo=this.Va=null}v.Kd(Ea,{key:!0,value:!0});Ea.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};function Ma(a){this.Ga=a;this.reset()}v.Kd(Ma,{key:!0,value:!0});v.u(Ma,{i:"iterator"},function(){return this}); Ma.prototype.reset=Ma.prototype.reset=function(){var a=this.Ga;a.Xb=null;this.eb=a.F;this.cb=null};Ma.prototype.next=Ma.prototype.hasNext=Ma.prototype.next=function(){var a=this.Ga;if(a.F!==this.eb){if(null===this.key)return!1;v.La(a)}var b=this.cb,b=null===b?a.Da:b.Va;if(null!==b)return this.cb=b,this.key=b.key,this.value=b.value,!0;this.Cf();return!1}; Ma.prototype.first=Ma.prototype.first=function(){var a=this.Ga;this.eb=a.F;a=a.Da;return null!==a?(this.cb=a,this.key=a.key,this.value=a.value,a):null};Ma.prototype.any=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(a(d))return!0;b.F!==c&&v.La(b);d=d.Va}return!1};Ma.prototype.all=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;){if(!a(d))return!1;b.F!==c&&v.La(b);d=d.Va}return!0}; Ma.prototype.each=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=b.Da;null!==d;)a(d),b.F!==c&&v.La(b),d=d.Va;return this};Ma.prototype.map=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)d.add(a(e)),b.F!==c&&v.La(b),e=e.Va;return d.i};Ma.prototype.filter=function(a){var b=this.Ga;b.Xb=null;var c=b.F;this.cb=null;for(var d=new I,e=b.Da;null!==e;)a(e)&&d.add(e),b.F!==c&&v.La(b),e=e.Va;return d.i}; Ma.prototype.concat=function(a){this.Ga.Xb=null;return new za(this,a.i)};v.u(Ma,{count:"count"},function(){return this.Ga.fd});Ma.prototype.Cf=function(){this.value=this.key=null;this.eb=-1;this.Ga.Xb=this};Ma.prototype.toString=function(){return null!==this.cb?"MapIterator@"+this.cb:"MapIterator"}; function na(a,b){v.dc(this);this.D=!1;void 0===a||null===a?this.ui=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ui=a:v.va(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.ui=a===Object?"object":a===String?"string":a===Number?"number":a:v.va(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.Hs=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== b||"function"===b?this.Hs=b:v.va(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.Hs=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:v.va(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.gd={};this.fd=0;this.wj=this.Xb=null;this.F=0;this.Dh=this.Da=null}v.ea("Map",na); na.prototype.Bc=function(){var a=this.F;a++;999999999=this.count)return xa;var a=this.Xb;return null!==a?(a.reset(),a):new Ma(this)});v.u(na,{oE:"iteratorKeys"},function(){return 0>=this.count?xa:new Ha(this)});v.u(na,{pE:"iteratorValues"},function(){if(0>=this.count)return xa;var a=this.wj;return null!==a?(a.reset(),a):new La(this)});function z(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b);this.D=!1}v.ea("Point",z);v.Uh(z);v.Kd(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.Cb();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};g=z.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this}; g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};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 instanceof z?a.x.toString()+" "+a.y.toString():a.toString()};z.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};z.prototype.equals=z.prototype.K=function(a){return a instanceof z?this.x===a.x&&this.y===a.y:!1};z.prototype.equalTo=z.prototype.xw=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Fc=function(a){return K(this.x,a.x)&&K(this.y,a.y)}; z.prototype.add=z.prototype.add=function(a){this.Cb();this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.du=function(a){this.Cb();this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.Cb();this.x+=a;this.y+=b;return this}; z.prototype.rotate=z.prototype.rotate=function(a){this.Cb();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.rf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a};z.prototype.distanceSquared=z.prototype.So=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};z.prototype.normalize=z.prototype.normalize=function(){this.Cb();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){Oa(a,b,c,d,this.x,this.y,this);return this};z.prototype.projectOntoLineSegmentPoint=function(a,b){Oa(a.x,a.y,b.x,b.y,this.x,this.y,this);return this}; z.prototype.snapToGrid=function(a,b,c,d){Pa(this.x,this.y,a,b,c,d,this);return this};z.prototype.snapToGridPoint=function(a,b){Pa(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Yt=function(a,b){this.Cb();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.$t=function(a,b,c,d,e){this.Cb();this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this}; z.prototype.transform=function(a){a.ub(this);return this};function Qa(a,b){b.Wh(a);return a}var Sa;z.distanceLineSegmentSquared=Sa=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 Ta;z.distanceSquared=Ta=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var Va; z.direction=Va=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.G=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);this.D=!1}v.ea("Size",ia);v.Uh(ia);v.Kd(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.Cb();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};g=ia.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()}; g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};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 instanceof ia?a.width.toString()+" "+a.height.toString():a.toString()};ia.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};ia.prototype.equals=ia.prototype.K=function(a){return a instanceof ia?this.width===a.width&&this.height===a.height:!1};ia.prototype.equalTo=ia.prototype.xw=function(a,b){return this.width===a&&this.height===b};ia.prototype.equalsApprox=ia.prototype.Fc=function(a){return K(this.width,a.width)&&K(this.height,a.height)}; ia.prototype.isReal=ia.prototype.G=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):v.k("Incorrect arguments supplied to Rect constructor"):(this.x=a,this.y=b,this.width=c,this.height=d);this.D=!1}v.ea("Rect",B);v.Uh(B);v.Kd(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 Wa(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.Cb();this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};B.prototype.setPoint=B.prototype.zf=function(a){this.Cb();this.x=a.x;this.y=a.y;return this}; B.prototype.setSize=function(a){this.Cb();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};g=B.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this}; g.Cb=function(a){if(this.D){var b="The Rect is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};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 instanceof B?a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString():a.toString()};B.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};B.prototype.equals=B.prototype.K=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.xw=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d}; B.prototype.equalsApprox=B.prototype.Fc=function(a){return K(this.x,a.x)&&K(this.y,a.y)&&K(this.width,a.width)&&K(this.height,a.height)};B.prototype.containsPoint=B.prototype.Fa=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.Wj=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.Cb();this.height=this.width=this.y=this.x=0};B.prototype.offset=B.prototype.offset=function(a,b){this.Cb();this.x+=a;this.y+=b;return this};B.prototype.inflate=B.prototype.Pf=function(a,b){return Xa(this,b,a,b,a)}; B.prototype.addMargin=B.prototype.fw=function(a){return Xa(this,a.top,a.right,a.bottom,a.left)};B.prototype.subtractMargin=B.prototype.GI=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){a.Cb();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=function(a,b,c,d){return Ya(this,a,b,c,d)};function Ya(a,b,c,d,e){a.Cb();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.xg=function(a){return this.ZD(a.x,a.y,a.width,a.height)}; B.prototype.intersects=B.prototype.ZD=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 Za(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.ej=function(a){return $a(this,a.x,a.y,0,0)}; B.prototype.unionRect=B.prototype.ai=function(a){return $a(this,a.x,a.y,a.width,a.height)};B.prototype.union=B.prototype.rF=function(a,b,c,d){this.Cb();void 0===c&&(c=0);void 0===d&&(d=0);return $a(this,a,b,c,d)};function $a(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.$t=function(a,b,c){this.Cb();this.x=a-c.offsetX-c.x*this.width;this.y=b-c.offsetY-c.y*this.height;return this};var bb;B.contains=bb=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};v.defineProperty(B,{left:"left"},function(){return this.x},function(a){this.Cb(a);this.x=a}); v.defineProperty(B,{top:"top"},function(){return this.y},function(a){this.Cb(a);this.y=a});v.defineProperty(B,{right:"right"},function(){return this.x+this.width},function(a){this.Cb(a);this.x+=a-(this.x+this.width)});v.defineProperty(B,{bottom:"bottom"},function(){return this.y+this.height},function(a){this.Cb(a);this.y+=a-(this.y+this.height)});v.defineProperty(B,{position:"position"},function(){return new z(this.x,this.y)},function(a){this.Cb(a);this.x=a.x;this.y=a.y}); v.defineProperty(B,{size:"size"},function(){return new ia(this.width,this.height)},function(a){this.Cb(a);this.width=a.width;this.height=a.height});v.defineProperty(B,{cl:"center"},function(){return new z(this.x+this.width/2,this.y+this.height/2)},function(a){this.Cb(a);this.x=a.x-this.width/2;this.y=a.y-this.height/2});v.defineProperty(B,{na:"centerX"},function(){return this.x+this.width/2},function(a){this.Cb(a);this.x=a-this.width/2}); v.defineProperty(B,{ua:"centerY"},function(){return this.y+this.height/2},function(a){this.Cb(a);this.y=a-this.height/2});B.prototype.isReal=B.prototype.G=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 cb(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):v.k("Invalid arguments to Margin constructor");this.D=!1}v.ea("Margin",cb);v.Uh(cb);v.Kd(cb,{top:!0,right:!0,bottom:!0,left:!0});cb.prototype.assign=function(a){this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left}; cb.prototype.setTo=cb.prototype.m=function(a,b,c,d){this.Cb();this.top=a;this.right=b;this.bottom=c;this.left=d;return this};cb.prototype.set=cb.prototype.set=function(a){this.Cb();this.top=a.top;this.right=a.right;this.bottom=a.bottom;this.left=a.left;return this};cb.prototype.copy=function(){var a=new cb;a.top=this.top;a.right=this.right;a.bottom=this.bottom;a.left=this.left;return a};g=cb.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this}; g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this};g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Margin is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}}; cb.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 cb;for(var e=NaN;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));if(isNaN(e))return new cb(c);for(var f=NaN;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));if(isNaN(f))return new cb(c,e);for(var h=NaN;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return isNaN(h)?new cb(c,e):new cb(c,e,f,h)}return new cb}; cb.stringify=function(a){return a instanceof cb?a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString():a.toString()};cb.prototype.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"};cb.prototype.equals=cb.prototype.K=function(a){return a instanceof cb?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1}; cb.prototype.equalTo=cb.prototype.xw=function(a,b,c,d){return this.top===a&&this.right===b&&this.bottom===c&&this.left===d};cb.prototype.equalsApprox=cb.prototype.Fc=function(a){return K(this.top,a.top)&&K(this.right,a.right)&&K(this.bottom,a.bottom)&&K(this.left,a.left)};cb.prototype.isReal=cb.prototype.G=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)};function ja(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0}v.Uh(ja); v.Kd(ja,{m11:!0,m12:!0,m21:!0,m22:!0,dx:!0,dy:!0});ja.prototype.set=ja.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};ja.prototype.copy=function(){var a=new ja;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};ja.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"}; ja.prototype.equals=ja.prototype.K=function(a){return a instanceof ja?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};ja.prototype.isIdentity=ja.prototype.vt=function(){return 1===this.m11&&0===this.m12&&0===this.m21&&1===this.m22&&0===this.dx&&0===this.dy};ja.prototype.reset=ja.prototype.reset=function(){this.m11=1;this.m21=this.m12=0;this.m22=1;this.dy=this.dx=0;return this}; ja.prototype.multiply=ja.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}; ja.prototype.multiplyInverted=ja.prototype.xE=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}; ja.prototype.invert=ja.prototype.Dz=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}; ja.prototype.rotate=ja.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}; ja.prototype.translate=ja.prototype.translate=function(a,b){this.dx+=this.m11*a+this.m21*b;this.dy+=this.m12*a+this.m22*b;return this};ja.prototype.scale=ja.prototype.scale=function(a,b){void 0===b&&(b=a);this.m11*=a;this.m12*=a;this.m21*=b;this.m22*=b;return this};ja.prototype.transformPoint=ja.prototype.ub=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}; ja.prototype.invertedTransformPoint=ja.prototype.Wh=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}; ja.prototype.transformRect=ja.prototype.pF=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);this.D=!1}v.ea("Spot",L);v.Uh(L);v.Kd(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.Cb();this.x=a;this.y=b;this.offsetX=c;this.offsetY=d;return this}; L.prototype.set=L.prototype.set=function(a){this.Cb();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};g=L.prototype;g.Ea=function(){this.D=!0;Object.freeze(this);return this};g.R=function(){return Object.isFrozen(this)?this:this.copy().freeze()};g.freeze=function(){this.D=!0;return this}; g.Oa=function(){Object.isFrozen(this)&&v.k("cannot thaw constant: "+this);this.D=!1;return this};g.Cb=function(a){if(this.D){var b="The Spot is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v.k(b)}};function db(a,b){a.x=NaN;a.y=NaN;a.offsetX=b;return a}var gb; L.parse=gb=function(a){if("string"===typeof a){a=a.trim();if("None"===a)return rb;if("TopLeft"===a)return sb;if("Top"===a||"TopCenter"===a||"MiddleTop"===a)return tb;if("TopRight"===a)return ub;if("Left"===a||"LeftCenter"===a||"MiddleLeft"===a)return vb;if("Center"===a)return zb;if("Right"===a||"RightCenter"===a||"MiddleRight"===a)return Ab;if("BottomLeft"===a)return Cb;if("Bottom"===a||"BottomCenter"===a||"MiddleBottom"===a)return Db;if("BottomRight"===a)return Eb;if("TopSide"===a)return Fb;if("LeftSide"=== a)return Gb;if("RightSide"===a)return Nb;if("BottomSide"===a)return Ob;if("TopBottomSides"===a)return Pb;if("LeftRightSides"===a)return Tb;if("TopLeftSides"===a)return Ub;if("TopRightSides"===a)return Vb;if("BottomLeftSides"===a)return Zb;if("BottomRightSides"===a)return $b;if("NotTopSide"===a)return ac;if("NotLeftSide"===a)return bc;if("NotRightSide"===a)return cc;if("NotBottomSide"===a)return dc;if("AllSides"===a)return ec;if("Default"===a)return fc;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?(Fc(a,b,c,d,e,e+Math.PI,h),Fc(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 Ec(a,b,c,d,e,f,h){var k=new Ac;k.ff=[b,c,d,e,f,h];b={};Oc(a,"g",b,k);k=a.addElement("g",b);a.tf.push(k)} g.Za=function(){if(0!==this.shadowOffsetX||0!==this.shadowOffsetY||0!==this.shadowBlur){var a="SHADOW"+v.Jl++,b=this.addElement("filter",{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},null),c,d,e,f,h;c=Dc(this,"feGaussianBlur",{"in":"SourceAlpha",result:"blur",GK:this.shadowBlur/2});d=Dc(this,"feFlood",{"in":"blur",result:"flood","flood-color":this.shadowColor});e=Dc(this,"feComposite",{"in":"flood",in2:"blur",operator:"in",result:"comp"});f=Dc(this,"feOffset",{"in":"comp",result:"offsetBlur", dx:this.shadowOffsetX,dy:this.shadowOffsetY});h=Dc(this,"feMerge",{});h.appendChild(Dc(this,"feMergeNode",{"in":"offsetBlur"}));h.appendChild(Dc(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.pn?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.pn?this.clip():this.fill()};g.cj=function(){this.pn||this.stroke()};v.defineProperty(Sc,{pw:"clipInsteadOfFill"},function(){return this.pn},function(a){this.pn=a});g=Sc.prototype; g.rA=function(a,b,c){this.ns=a;this.os=b;this.ng=c};g.an=function(){this.shadowBlur=this.shadowOffsetY=this.shadowOffsetX=0};g.bn=function(){this.shadowOffsetX=this.ns;this.shadowOffsetY=this.os;this.shadowBlur=this.ng};g.pz=function(a,b){var c=this.wa;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.nz=function(){var a=this.wa;void 0!==a.setLineDash?(a.setLineDash(v.gj),a.lineDashOffset=0):void 0!==a.webkitLineDash?(a.webkitLineDash=v.gj,a.webkitLineDashOffset=0):void 0!==a.mozDash&&(a.mozDash=null,a.mozDashOffset=0)};function Zc(a,b){b&&(a.Jx="");a.Kx="";a.Ix=""} var $c=(Math.sqrt(2)-1)/3*4,ad=(new z(0,0)).Ea(),bd=(new B(0,0,0,0)).Ea(),cd=(new cb(0,0,0,0)).Ea(),ld=(new cb(2,2,2,2)).Ea(),md=(new z(6,6)).Ea(),nd=(new z(-Infinity,-Infinity)).Ea(),od=(new z(Infinity,Infinity)).Ea(),pd=(new ia(0,0)).Ea(),qd=(new ia(1,1)).Ea(),rd=(new ia(6,6)).Ea(),sd=(new ia(8,8)).Ea(),td=(new ia(10,10)).Ea(),Cd=(new ia(Infinity,Infinity)).Ea(),Dd=(new z(NaN,NaN)).Ea(),Ed=(new ia(NaN,NaN)).Ea(),Fd=(new B(NaN,NaN,NaN,NaN)).Ea(),Gd=(new L(.156,.156)).Ea(),Hd=(new L(.844,.844)).Ea(), Id=new ta,Jd=new ta,Kd=null;function Ld(a){if(0>=a)return 0;var b=Kd;if(null===b){for(var b=[],c=0;2E3>=c;c++)b[c]=Math.sqrt(c);Kd=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 K(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 Xd(a,b,c,d,e,f,h,k,l,m,n,p){if(Md(a,b,h,k,p,c,d)&&Md(a,b,h,k,p,e,f))return Md(a,b,h,k,p,m,n);var q=(a+c)/2,r=(b+d)/2,s=(c+e)/2,t=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(q+s)/2;c=(r+t)/2;var s=(s+e)/2,t=(t+f)/2,u=(d+s)/2,y=(c+t)/2;return Xd(a,b,q,r,d,c,u,y,l,m,n,p)||Xd(u,y,s,t,e,f,h,k,l,m,n,p)} function Yd(a,b,c,d,e,f,h,k,l,m){if(Md(a,b,h,k,l,c,d)&&Md(a,b,h,k,l,e,f))$a(m,a,b,0,0),$a(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,t=(c+r)/2;Yd(a,b,n,p,d,c,s,t,l,m);Yd(s,t,q,r,e,f,h,k,l,m)}} function Zd(a,b,c,d,e,f,h,k,l,m){if(Md(a,b,h,k,l,c,d)&&Md(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,t=(c+r)/2;Zd(a,b,n,p,d,c,s,t,l,m);Zd(s,t,q,r,e,f,h,k,l,m)}} function $d(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 ae(a,b,c,d,e,f,h,k,l,m){if(Md(a,b,e,f,m,c,d))return Md(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 ae(a,b,n,p,q,r,h,k,l,m)||ae(q,r,c,d,e,f,h,k,l,m)} function be(a,b,c,d,e,f,h,k){if(Md(a,b,e,f,h,c,d))$a(k,a,b,0,0),$a(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;be(a,b,l,m,n,p,h,k);be(n,p,c,d,e,f,h,k)}}function ce(a,b,c,d,e,f,h,k){if(Md(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;ce(a,b,l,m,n,p,h,k);ce(n,p,c,d,e,f,h,k)}} function de(a,b,c,d,e,f,h,k,l,m,n,p,q,r){0>=q&&(q=1E-6);if(Md(a,b,h,k,q,c,d)&&Md(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,t=(b+d)/2;c=(c+e)/2;d=(d+f)/2;e=(e+h)/2;f=(f+k)/2;var u=(s+c)/2,y=(t+d)/2;c=(c+e)/2;d=(d+f)/2;var w=(u+c)/2,x=(y+d)/2, A=(n-l)*(n-l)+(p-m)*(p-m),H=!1;de(a,b,s,t,u,y,w,x,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(Md(a,b,h,k,q,c,d)&&Md(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,t=((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,t=(b+d)/2,u=(c+e)/2,y=(d+f)/2;e=(e+h)/2;f=(f+k)/2;d=(s+u)/2;c=(t+y)/2;var u=(u+e)/2,y=(y+f)/2, w=(d+u)/2,x=(c+y)/2,r=r+ee(a,b,s,t,d,c,w,x,l,m,n,p,q),r=r+ee(w,x,u,y,e,f,h,k,l,m,n,p,q)}return r} function Oa(a,b,c,d,e,f,h){if(Hc(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(Hc(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(Hc(k,h))return Oa(a,b,c,d,e,f,l),!1;e=(h*a-k*e+f-b)/(h-k);if(Hc(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 Oa(a,b,c,d,e,f,l)}function ge(a,b,c,d,e,f,h,k,l){var m=1E21,n=a,p=b;if(fe(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 he(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 oe(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.Fa(b)||a.Fa(c)||pe(k,m,l,m,d,e,f,h)||pe(l,m,l,n,d,e,f,h)||pe(l,n,k,n,d,e,f,h)||pe(k,n,k,m,d,e,f,h)?!0:!1}function pe(a,b,c,d,e,f,h,k){return 0>=qe(a,b,c,d,e,f)*qe(a,b,c,d,h,k)&&0>=qe(e,f,h,k,a,b)*qe(e,f,h,k,c,d)} function qe(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 se(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.Aa.toString()+" "+this.ya.toString()+"L"+this.I.toString()+" "+this.J.toString():"M"+this.Aa.toFixed(a)+" "+this.ya.toFixed(a)+"L"+this.I.toFixed(a)+" "+this.J.toFixed(a);case Je:var b=new B(this.Aa,this.ya,0,0);b.rF(this.I,this.J,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 Ke:b=new B(this.Aa,this.ya,0,0);b.rF(this.I,this.J,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 Fe:for(var b="",c=this.Ub.n,d=c.length,e=0;e=t-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&&v.Cd(a,"string",ve,"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),t=l.length,u=v.s(),y=!1,w=!1,x=!0;!(m>=t-1);)if(p=n,n=d(),""!==n)switch(n.toUpperCase()){case "X":x=!0;w=y=!1;break;case "M":var A=f();null===u.Rb||!0===x?(N(u,A.x,A.y,y,!1,!w),x=!1):u.moveTo(A.x,A.y);for(q=s;!c();)A=f(),u.lineTo(A.x,A.y);break;case "L":for(;!c();)A=f(),u.lineTo(A.x,A.y);break;case "H":for(;!c();)s=A=new z((n===n.toLowerCase()?s.x:0)+parseFloat(d()),s.y),u.lineTo(s.x,s.y);break;case "V":for(;!c();)s=A=new z(s.x,(n===n.toLowerCase()?s.y:0)+parseFloat(d())),u.lineTo(s.x,s.y);break; case "C":for(;!c();){var H=e(),C=h(),A=f();O(u,H.x,H.y,C.x,C.y,A.x,A.y)}break;case "S":for(;!c();)H=k(),C=h(),A=f(),O(u,H.x,H.y,C.x,C.y,A.x,A.y);break;case "Q":for(;!c();)C=h(),A=f(),af(u,C.x,C.y,A.x,A.y);break;case "T":for(;!c();)r=C=k(),A=f(),af(u,C.x,C.y,A.x,A.y);break;case "B":for(;!c();){var A=parseFloat(d()),H=parseFloat(d()),C=parseFloat(d()),T=parseFloat(d()),ba=parseFloat(d()),U=ba,M=!1;c()||(U=parseFloat(d()),c()||(M=0!==parseFloat(d())));n===n.toLowerCase()&&(C+=s.x,T+=s.y);u.arcTo(A,H, C,T,ba,U,M)}break;case "A":for(;!c();)H=Math.abs(parseFloat(d())),C=Math.abs(parseFloat(d())),T=parseFloat(d()),ba=!!parseFloat(d()),U=!!parseFloat(d()),A=f(),bf(u,H,C,T,ba,U,A.x,A.y);break;case "Z":A=u.o.Ub.n[u.o.Ub.length-1];P(u);s=q;break;case "F":A="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Uu]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++;else{A=l[m+H];break}A.match(/[Mm]/)?y=!0:cf(u);break;case "U":A="";for(H=1;l[m+H];)if(null!==l[m+H].match(/[Ff]/))H++;else if(null===l[m+H].match(/[A-Za-z]/))H++; else{A=l[m+H];break}A.match(/[Mm]/)?w=!0:u.Za(!1)}q=u.o;v.q(u);if(b)for(u=q.Ub.i;u.next();)A=u.value,A.ut=!0;return q};function df(a,b){for(var c=a.length,d=v.L(),e=0;eh&&(h+=360),s.xe+=h);0>a&&(s.xe=180-s.xe,s.Af=-s.Af);0>d&&(s.xe=-s.xe,s.Af=-s.Af);s.radiusX*=Math.sqrt(a*a+c*c);void 0!==s.radiusY&&(s.radiusY*=Math.sqrt(b*b+d*d));break;case kf:h=s.I;k=s.J;s.I=h* a+k*c+e;s.J=h*b+k*d+f;0!==b&&(h=180*Math.atan2(b,a)/Math.PI,0>h&&(h+=360),s.fj+=h);0>a&&(s.fj=180-s.fj,s.tl=!s.tl);0>d&&(s.fj=-s.fj,s.tl=!s.tl);s.radiusX*=Math.sqrt(a*a+c*c);s.radiusY*=Math.sqrt(b*b+d*d);break;default:v.k("Unknown Segment type: "+s.type)}}}}this.ab=!0;return this}; ve.prototype.Fa=function(a,b,c,d){var e=a.x,f=a.y,h=this.mb.x-20;a=a.y;for(var k=0,l=0,m=0,n=0,p=0,q=0,r=this.Ub.n,s=r.length,t=0;t=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||1a)return n=(a-q)/p,v.sa(c),new z(b+(e-b)*n,d+(f-d)*n);q+=p}b=e;d=f}v.sa(c);return null};v.defineProperty(ve,{type:"type"},function(){return this.ia},function(a){this.ia!==a&&(this.D&&v.ka(this,a),this.ia=a,this.ab=!0)});v.defineProperty(ve,{Aa:"startX"},function(){return this.vc},function(a){this.vc!==a&&(this.D&&v.ka(this,a),this.vc=a,this.ab=!0)}); v.defineProperty(ve,{ya:"startY"},function(){return this.Cc},function(a){this.Cc!==a&&(this.D&&v.ka(this,a),this.Cc=a,this.ab=!0)});v.defineProperty(ve,{I:"endX"},function(){return this.vb},function(a){this.vb!==a&&(this.D&&v.ka(this,a),this.vb=a,this.ab=!0)});v.defineProperty(ve,{J:"endY"},function(){return this.Bb},function(a){this.Bb!==a&&(this.D&&v.ka(this,a),this.Bb=a,this.ab=!0)}); v.defineProperty(ve,{Ub:"figures"},function(){return this.lj},function(a){this.lj!==a&&(this.D&&v.ka(this,a),this.lj=a,this.ab=!0)});ve.prototype.add=ve.prototype.add=function(a){this.lj.add(a);return this};ve.prototype.setSpots=function(a,b,c,d,e,f,h,k){this.D&&v.ka(this);this.Nh=(new L(a,b,e,f)).freeze();this.Oh=(new L(c,d,h,k)).freeze();return this};v.defineProperty(ve,{B:"spot1"},function(){return this.Nh},function(a){this.D&&v.ka(this,a);this.Nh=a.R()}); v.defineProperty(ve,{C:"spot2"},function(){return this.Oh},function(a){this.D&&v.ka(this,a);this.Oh=a.R()});v.defineProperty(ve,{Jd:"defaultStretch"},function(){return this.mi},function(a){this.D&&v.ka(this,a);this.mi=a});v.u(ve,{mb:"bounds"},function(){this.Hz()&&(this.CA(),this.$g());return this.Cu});function Ge(a,b,c,d){v.dc(this);this.D=!1;void 0===c&&(c=!0);this.Tl=c;void 0===d&&(d=!0);this.Un=d;this.vc=void 0!==a?a:0;this.Cc=void 0!==b?b:0;this.qo=new I(vf);this.Rv=this.qo.F;this.ab=!0} v.ea("PathFigure",Ge);v.Uh(Ge);Ge.prototype.copy=function(){var a=new Ge;a.Tl=this.Tl;a.Un=this.Un;a.vc=this.vc;a.Cc=this.Cc;for(var b=this.qo.n,c=b.length,d=a.qo,e=0;ea?"M"+this.Aa.toString()+" "+this.ya.toString():"M"+this.Aa.toFixed(a)+" "+this.ya.toFixed(a),c=this.sb.n,d=c.length,e=0;ea&&(a+=360),this.sd=a,this.Fe=0,this.Xg=Math.max(d,0),this.mg=Math.max(e,0),this.Zn="boolean"===typeof h?!!h:!1,this.qn=!!k):(this.sd=d,this.Fe=e,a===jf&&(f=Math.max(f,0)),this.Xg=f,"number"===typeof h?(a===jf&&(h=Math.max(h,0)),this.mg=h):this.mg=0,this.qn=this.Zn=!1);this.Ch=!1;this.ab= !0;this.bg=null}v.ea("PathSegment",vf);v.Uh(vf);vf.prototype.copy=function(){var a=new vf;a.ia=this.ia;a.vb=this.vb;a.Bb=this.Bb;a.sd=this.sd;a.Fe=this.Fe;a.Xg=this.Xg;a.mg=this.mg;a.Zn=this.Zn;a.qn=this.qn;a.Ch=this.Ch;a.ab=this.ab;return a}; vf.prototype.equalsApprox=vf.prototype.Fc=function(a){if(!(a instanceof vf)||this.type!==a.type||this.Gw!==a.Gw)return!1;switch(this.type){case ff:case Ye:return K(this.I,a.I)&&K(this.J,a.J);case gf:return K(this.I,a.I)&&K(this.J,a.J)&&K(this.rc,a.rc)&&K(this.Kc,a.Kc)&&K(this.kh,a.kh)&&K(this.lh,a.lh);case hf:return K(this.I,a.I)&&K(this.J,a.J)&&K(this.rc,a.rc)&&K(this.Kc,a.Kc);case jf:return K(this.xe,a.xe)&&K(this.Af,a.Af)&&K(this.na,a.na)&&K(this.ua,a.ua)&&K(this.radiusX,a.radiusX)&&K(this.radiusY, a.radiusY);case kf:return this.tl===a.tl&&this.Jw===a.Jw&&K(this.fj,a.fj)&&K(this.I,a.I)&&K(this.J,a.J)&&K(this.radiusX,a.radiusX)&&K(this.radiusY,a.radiusY);default:return!1}}; vf.prototype.toString=function(a){void 0===a&&(a=-1);var b="";switch(this.type){case ff:b=0>a?"M"+this.I.toString()+" "+this.J.toString():"M"+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case Ye:b=0>a?"L"+this.I.toString()+" "+this.J.toString():"L"+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case gf:b=0>a?"C"+this.rc.toString()+" "+this.Kc.toString()+" "+this.kh.toString()+" "+this.lh.toString()+" "+this.I.toString()+" "+this.J.toString():"C"+this.rc.toFixed(a)+" "+this.Kc.toFixed(a)+" "+this.kh.toFixed(a)+ " "+this.lh.toFixed(a)+" "+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case hf:b=0>a?"Q"+this.rc.toString()+" "+this.Kc.toString()+" "+this.I.toString()+" "+this.J.toString():"Q"+this.rc.toFixed(a)+" "+this.Kc.toFixed(a)+" "+this.I.toFixed(a)+" "+this.J.toFixed(a);break;case jf:b=0>a?"B"+this.xe.toString()+" "+this.Af.toString()+" "+this.na.toString()+" "+this.ua.toString()+" "+this.radiusX:"B"+this.xe.toFixed(a)+" "+this.Af.toFixed(a)+" "+this.na.toFixed(a)+" "+this.ua.toFixed(a)+" "+this.radiusX; break;case kf:b=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.fj.toString()+" "+(this.Jw?1:0)+" "+(this.tl?1:0)+" "+this.I.toString()+" "+this.J.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.fj.toFixed(a)+" "+(this.Jw?1:0)+" "+(this.tl?1:0)+" "+this.I.toFixed(a)+" "+this.J.toFixed(a);break;default:b=this.type.toString()}return b+(this.Ch?"z":"")};var ff;vf.Move=ff=v.p(vf,"Move",0);var Ye;vf.Line=Ye=v.p(vf,"Line",1);var gf; vf.Bezier=gf=v.p(vf,"Bezier",2);var hf;vf.QuadraticBezier=hf=v.p(vf,"QuadraticBezier",3);var jf;vf.Arc=jf=v.p(vf,"Arc",4);var kf;vf.SvgArc=kf=v.p(vf,"SvgArc",4);vf.prototype.freeze=function(){this.D=!0;return this};vf.prototype.Oa=function(){this.D=!1;return this};vf.prototype.close=vf.prototype.close=function(){this.Ch=!0;return this}; function lf(a,b){if(null!==a.bg&&!1===b.ab)return a.bg;var c=a.radiusX,d=a.radiusY;void 0===d&&(d=c);if(0===c||0===d)return a.bg=[],a.bg;var e=a.sd,f=a.Fe,h=se(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=se(b>f?b:f,n,n+h,!0);f=v.ph();f.reset();f.translate(c,d);f.rotate(a.sd,0,0);f.scale(l,r);df(b,f);v.$e(f);a.bg=b;return a.bg} v.defineProperty(vf,{Gw:"isClosed"},function(){return this.Ch},function(a){this.Ch!==a&&(this.Ch=a,this.ab=!0)});v.defineProperty(vf,{type:"type"},function(){return this.ia},function(a){this.D&&v.ka(this,a);this.ia=a;this.ab=!0});v.defineProperty(vf,{I:"endX"},function(){return this.vb},function(a){this.D&&v.ka(this,a);this.vb=a;this.ab=!0});v.defineProperty(vf,{J:"endY"},function(){return this.Bb},function(a){this.D&&v.ka(this,a);this.Bb=a;this.ab=!0}); v.defineProperty(vf,{rc:"point1X"},function(){return this.sd},function(a){this.D&&v.ka(this,a);this.sd=a;this.ab=!0});v.defineProperty(vf,{Kc:"point1Y"},function(){return this.Fe},function(a){this.D&&v.ka(this,a);this.Fe=a;this.ab=!0});v.defineProperty(vf,{kh:"point2X"},function(){return this.Xg},function(a){this.D&&v.ka(this,a);this.Xg=a;this.ab=!0});v.defineProperty(vf,{lh:"point2Y"},function(){return this.mg},function(a){this.D&&v.ka(this,a);this.mg=a;this.ab=!0}); v.defineProperty(vf,{na:"centerX"},function(){return this.sd},function(a){this.D&&v.ka(this,a);this.sd=a;this.ab=!0});v.defineProperty(vf,{ua:"centerY"},function(){return this.Fe},function(a){this.D&&v.ka(this,a);this.Fe=a;this.ab=!0});v.defineProperty(vf,{radiusX:"radiusX"},function(){return this.Xg},function(a){0>a&&v.va(a,">= zero",vf,"radiusX");this.D&&v.ka(this,a);this.Xg=a;this.ab=!0}); v.defineProperty(vf,{radiusY:"radiusY"},function(){return this.mg},function(a){0>a&&v.va(a,">= zero",vf,"radiusY");this.D&&v.ka(this,a);this.mg=a;this.ab=!0});v.defineProperty(vf,{xe:"startAngle"},function(){return this.vb},function(a){this.vb!==a&&(this.D&&v.ka(this,a),a%=360,0>a&&(a+=360),this.vb=a,this.ab=!0)});v.defineProperty(vf,{Af:"sweepAngle"},function(){return this.Bb},function(a){this.D&&v.ka(this,a);360a&&(a=-360);this.Bb=a;this.ab=!0}); v.defineProperty(vf,{tl:"isClockwiseArc"},function(){return this.qn},function(a){this.D&&v.ka(this,a);this.qn=a;this.ab=!0});v.defineProperty(vf,{Jw:"isLargeArc"},function(){return this.Zn},function(a){this.D&&v.ka(this,a);this.Zn=a;this.ab=!0});v.defineProperty(vf,{fj:"xAxisRotation"},function(){return this.sd},function(a){a%=360;0>a&&(a+=360);this.D&&v.ka(this,a);this.sd=a;this.ab=!0}); function wf(){this.W=null;this.Sy=(new z(0,0)).freeze();this.Wx=(new z(0,0)).freeze();this.yu=this.uv=0;this.zu=1;this.jv="";this.aw=this.Pu=!1;this.Lu=this.Bu=0;this.hj=this.Xu=this.gv=!1;this.Dq=null;this.Zv=0;this.og=this.Yv=null}v.ea("InputEvent",wf); wf.prototype.copy=function(){var a=new wf;a.W=this.W;a.Sy.assign(this.jf);a.Wx.assign(this.ca);a.uv=this.uv;a.yu=this.yu;a.zu=this.zu;a.jv=this.jv;a.Pu=this.Pu;a.aw=this.aw;a.Bu=this.Bu;a.Lu=this.Lu;a.gv=this.gv;a.Xu=this.Xu;a.hj=this.hj;a.Dq=this.Dq;a.Zv=this.Zv;a.Yv=this.Yv;a.og=this.og;return a}; wf.prototype.toString=function(){var a="^";0!==this.od&&(a+="M:"+this.od);0!==this.button&&(a+="B:"+this.button);""!==this.key&&(a+="K:"+this.key);0!==this.Ge&&(a+="C:"+this.Ge);0!==this.hl&&(a+="D:"+this.hl);this.zc&&(a+="h");this.bubbles&&(a+="b");null!==this.ca&&(a+="@"+this.ca.toString());return a};v.defineProperty(wf,{g:"diagram"},function(){return this.W},function(a){this.W=a});v.defineProperty(wf,{jf:"viewPoint"},function(){return this.Sy},function(a){v.A(a,z,wf,"viewPoint");this.Sy.assign(a)}); v.defineProperty(wf,{ca:"documentPoint"},function(){return this.Wx},function(a){v.A(a,z,wf,"documentPoint");this.Wx.assign(a)});v.defineProperty(wf,{od:"modifiers"},function(){return this.uv},function(a){this.uv=a});v.defineProperty(wf,{button:"button"},function(){return this.yu},function(a){this.yu=a;if(null===this.event)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}); v.defineProperty(wf,{buttons:"buttons"},function(){return this.zu},function(a){this.zu=a});v.defineProperty(wf,{key:"key"},function(){return this.jv},function(a){this.jv=a});v.defineProperty(wf,{jl:"down"},function(){return this.Pu},function(a){this.Pu=a});v.defineProperty(wf,{up:"up"},function(){return this.aw},function(a){this.aw=a});v.defineProperty(wf,{Ge:"clickCount"},function(){return this.Bu},function(a){this.Bu=a}); v.defineProperty(wf,{hl:"delta"},function(){return this.Lu},function(a){this.Lu=a});v.defineProperty(wf,{wt:"isMultiTouch"},function(){return this.gv},function(a){this.gv=a});v.defineProperty(wf,{zc:"handled"},function(){return this.Xu},function(a){this.Xu=a});v.defineProperty(wf,{bubbles:"bubbles"},function(){return this.hj},function(a){this.hj=a});v.defineProperty(wf,{event:"event"},function(){return this.Dq},function(a){this.Dq=a}); v.u(wf,{Wi:"isTouchEvent"},function(){var a=window.TouchEvent;return a&&this.event instanceof a?!0:(a=window.PointerEvent)&&this.event instanceof a&&"touch"===this.event.pointerType});v.u(wf,{ak:"isMac"},function(){return v.ak});v.defineProperty(wf,{timestamp:"timestamp"},function(){return this.Zv},function(a){this.Zv=a});v.defineProperty(wf,{Ig:"targetDiagram"},function(){return this.Yv},function(a){this.Yv=a}); v.defineProperty(wf,{ye:"targetObject"},function(){return this.og},function(a){this.og=a});v.defineProperty(wf,{control:"control"},function(){return 0!==(this.od&1)},function(a){this.od=a?this.od|1:this.od&-2});v.defineProperty(wf,{shift:"shift"},function(){return 0!==(this.od&4)},function(a){this.od=a?this.od|4:this.od&-5});v.defineProperty(wf,{alt:"alt"},function(){return 0!==(this.od&2)},function(a){this.od=a?this.od|2:this.od&-3}); v.defineProperty(wf,{Ft:"meta"},function(){return 0!==(this.od&8)},function(a){this.od=a?this.od|8:this.od&-9});v.defineProperty(wf,{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}); v.defineProperty(wf,{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});v.defineProperty(wf,{iK:"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 xf(){this.W=null;this.Ob="";this.Dv=this.Wv=null;this.Au=!1}v.ea("DiagramEvent",xf);xf.prototype.copy=function(){var a=new xf;a.W=this.W;a.Ob=this.Ob;a.Wv=this.Wv;a.Dv=this.Dv;a.Au=this.Au;return a};xf.prototype.toString=function(){var a="*"+this.name;this.cancel&&(a+="x");null!==this.uA&&(a+=":"+this.uA.toString());null!==this.$z&&(a+="("+this.$z.toString()+")");return a};v.defineProperty(xf,{g:"diagram"},function(){return this.W},function(a){this.W=a}); v.defineProperty(xf,{name:"name"},function(){return this.Ob},function(a){this.Ob=a});v.defineProperty(xf,{uA:"subject"},function(){return this.Wv},function(a){this.Wv=a});v.defineProperty(xf,{$z:"parameter"},function(){return this.Dv},function(a){this.Dv=a});v.defineProperty(xf,{cancel:"cancel"},function(){return this.Au},function(a){this.Au=a});function yf(){this.aq=zf;this.km=this.tv="";this.Br=this.Cr=this.Fr=this.Gr=this.Er=this.W=this.Vd=null}v.ea("ChangedEvent",yf);var Af; yf.Transaction=Af=v.p(yf,"Transaction",-1);var zf;yf.Property=zf=v.p(yf,"Property",0);var Bf;yf.Insert=Bf=v.p(yf,"Insert",1);var Cf;yf.Remove=Cf=v.p(yf,"Remove",2);yf.prototype.clear=yf.prototype.clear=function(){this.Br=this.Cr=this.Fr=this.Gr=this.Er=this.W=this.Vd=null}; yf.prototype.copy=function(){var a=new yf;a.aq=this.aq;a.tv=this.tv;a.km=this.km;a.Vd=this.Vd;a.W=this.W;a.Er=this.Er;var b=this.Gr;a.Gr=v.Ua(b)&&"function"===typeof b.R?b.R():b;b=this.Fr;a.Fr=v.Ua(b)&&"function"===typeof b.R?b.R():b;b=this.Cr;a.Cr=v.Ua(b)&&"function"===typeof b.R?b.R():b;b=this.Br;a.Br=v.Ua(b)&&"function"===typeof b.R?b.R():b;return a}; yf.prototype.toString=function(){var a="",a=this.wc===Af?a+"* ":this.wc===zf?a+(null!==this.ba?"!m":"!d"):a+((null!==this.ba?"!m":"!d")+this.wc);this.propertyName&&"string"===typeof this.propertyName&&(a+=" "+this.propertyName);this.hf&&this.hf!==this.propertyName&&(a+=" "+this.hf);a+=": ";this.wc===Af?null!==this.oldValue&&(a+=" "+this.oldValue):(null!==this.object&&(a+=Df(this.object)),null!==this.oldValue&&(a+=" old: "+Df(this.oldValue)),null!==this.Bg&&(a+=" "+this.Bg),null!==this.newValue&& (a+=" new: "+Df(this.newValue)),null!==this.zg&&(a+=" "+this.zg));return a};yf.prototype.getValue=yf.prototype.ja=function(a){return a?this.oldValue:this.newValue};yf.prototype.getParam=function(a){return a?this.Bg:this.zg};yf.prototype.canUndo=yf.prototype.canUndo=function(){return null!==this.ba||null!==this.g?!0:!1};yf.prototype.undo=yf.prototype.undo=function(){this.canUndo()&&(null!==this.ba?this.ba.Cm(this,!0):null!==this.g&&this.g.Cm(this,!0))}; yf.prototype.canRedo=yf.prototype.canRedo=function(){return null!==this.ba||null!==this.g?!0:!1};yf.prototype.redo=yf.prototype.redo=function(){this.canRedo()&&(null!==this.ba?this.ba.Cm(this,!1):null!==this.g&&this.g.Cm(this,!1))};v.defineProperty(yf,{ba:"model"},function(){return this.Vd},function(a){this.Vd=a});v.defineProperty(yf,{g:"diagram"},function(){return this.W},function(a){this.W=a});v.defineProperty(yf,{wc:"change"},function(){return this.aq},function(a){this.aq=a}); v.defineProperty(yf,{hf:"modelChange"},function(){return this.tv},function(a){this.tv=a});v.defineProperty(yf,{propertyName:"propertyName"},function(){return this.km},function(a){this.km=a});v.u(yf,{mE:"isTransactionFinished"},function(){return this.aq===Af&&("CommittedTransaction"===this.km||"FinishedUndo"===this.km||"FinishedRedo"===this.km)});v.defineProperty(yf,{object:"object"},function(){return this.Er},function(a){this.Er=a}); v.defineProperty(yf,{oldValue:"oldValue"},function(){return this.Gr},function(a){this.Gr=a});v.defineProperty(yf,{Bg:"oldParam"},function(){return this.Fr},function(a){this.Fr=a});v.defineProperty(yf,{newValue:"newValue"},function(){return this.Cr},function(a){this.Cr=a});v.defineProperty(yf,{zg:"newParam"},function(){return this.Br},function(a){this.Br=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.iu=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.iu(a.valueOf()):v.isArray(a)?Lf(this,a):v.Ua(a)?Gf(this,a):"function"===typeof a?"null":a.toString()}; function Lf(a,b,c){void 0===c&&(c=!1);var d=v.Wa(b);if(0>=d)return"[]";var e=new sa;e.add("[ ");c&&1e)return;v.Th(a.If,e)}Zf(a,"nodeDataArray",Cf,"nodeDataArray",a,b,null,e,null);a.gu(b)}} F.prototype.removeNodeDataCollection=function(a){if(v.isArray(a))for(var b=v.Wa(a),c=0;cb&&(b=v.Wa(a));v.Ni(a,b,c);Zf(this,"",Bf,"",a,null,c,null,b)};F.prototype.removeArrayItem=function(a,b){void 0===b&&(b=-1);a===this.If&&v.k("Model.removeArrayItem should not be called on the Model.nodeDataArray");-1===b&&(b=v.Wa(a)-1);var c=v.Qa(a,b);v.Th(a,b);Zf(this,"",Cf,"",a,c,null,b,null)}; v.defineProperty(F,{Wm:"nodeCategoryProperty"},function(){return this.fm},function(a){var b=this.fm;b!==a&&(jg(a,F,"nodeCategoryProperty"),this.fm=a,this.h("nodeCategoryProperty",b,a))});F.prototype.getCategoryForNodeData=F.prototype.xz=function(a){if(null===a)return"";var b=this.fm;if(""===b)return"";b=v.qb(a,b);if(void 0===b)return"";if("string"===typeof b)return b;v.k("getCategoryForNodeData found a non-string category for "+a+": "+b);return""}; F.prototype.setCategoryForNodeData=F.prototype.jx=function(a,b){v.j(b,"string",F,"setCategoryForNodeData:cat");if(null!==a){var c=this.fm;if(""!==c)if(this.Je(a)){var d=v.qb(a,c);void 0===d&&(d="");d!==b&&(v.Ka(a,c,b),Zf(this,"nodeCategory",zf,c,a,d,b))}else v.Ka(a,c,b)}}; function Q(a,b){2e||(v.Th(d,e),this.ah(a)&&(pg(this,b,a),Zf(this,"linkLabelKeys",Cf,c,a,b,null)))}else void 0!==d&&v.k(c+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}}; v.defineProperty(Q,{yg:"linkDataArray"},function(){return this.Gf},function(a){var b=this.Gf;if(b!==a){v.bz(a,Q,"linkDataArray");this.Yc.clear();for(var c=v.Wa(a),d=0;de)return;v.Th(a.Gf,e)}Zf(a,"linkDataArray",Cf,"linkDataArray",a,b,null,e,null);c=a.pl(b);pg(a,c,b);c=a.ql(b);pg(a,c,b);d=a.$j(b);if(v.isArray(d))for(var e=v.Wa(d),f=0;fa.rh&&v.trace("Ending transaction without having started a transaction: "+c);var d=1===a.rh;d&&b&&a.isEnabled&&a.$c("CommittingTransaction",c,a.Pi);var e=0;if(0a.Ui;e--)f=d.da(e),null!== f&&f.clear(),d.Vc(e),a.uy=!0;e=a.tE;0===e&&(e=1);0=e&&(f=d.da(0),null!==f&&f.clear(),d.Vc(0),a.Og--);d.add(b);a.Og++;d.freeze();f=b}a.$c("CommittedTransaction",c,f)}else{a.ti=!0;try{a.isEnabled&&null!==f&&(f.tt=!0,f.undo())}finally{a.$c("RolledBackTransaction",c,f),a.ti=!1}null!==f&&f.clear()}a.Ku=null;return!0}if(a.isEnabled&&!b&&null!==f){a=e;c=f.Nf;for(b=c.count-1;b>=a;b--)d=c.da(b),null!==d&&d.undo(),c.Oa(),c.Vc(b);c.freeze()}return!1} Ef.prototype.canUndo=Ef.prototype.canUndo=function(){if(!this.isEnabled||0=this.rh&&!this.hy&&(a=a.g,null!==a&&!1===a.Rm||v.trace("Change not within a transaction: "+c.toString()))}}; Ef.prototype.skipsEvent=function(a){if(null===a||0>a.wc.value)return!0;a=a.object;if(a instanceof G){if(a=a.layer,null!==a&&a.Gc)return!0}else if(a instanceof Uf&&a.Gc)return!0;return!1};v.u(Ef,{SH:"models"},function(){return this.Ay.i});v.defineProperty(Ef,{isEnabled:"isEnabled"},function(){return this.Se},function(a){this.Se=a});v.u(Ef,{nF:"transactionToUndo"},function(){return 0<=this.Ui&&this.Ui<=this.history.count-1?this.history.da(this.Ui):null}); v.u(Ef,{mF:"transactionToRedo"},function(){return this.Uib.gh||(b.scale=a))};Wf.prototype.canDecreaseZoom=function(a){void 0===a&&(a=1/this.vx);v.We(a,Wf,"canDecreaseZoom:factor");var b=this.g;if(null===b||b.bl!==Xg)return!1;a*=b.scale;return ab.gh?!1:b.mw}; Wf.prototype.increaseZoom=function(a){void 0===a&&(a=this.vx);v.We(a,Wf,"increaseZoom:factor");var b=this.g;null!==b&&b.bl===Xg&&(a*=b.scale,ab.gh||(b.scale=a))};Wf.prototype.canIncreaseZoom=function(a){void 0===a&&(a=this.vx);v.We(a,Wf,"canIncreaseZoom:factor");var b=this.g;if(null===b||b.bl!==Xg)return!1;a*=b.scale;return ab.gh?!1:b.mw};Wf.prototype.resetZoom=function(a){void 0===a&&(a=this.tw);v.We(a,Wf,"resetZoom:newscale");var b=this.g;null===b||ab.gh||(b.scale=a)}; Wf.prototype.canResetZoom=function(a){void 0===a&&(a=this.tw);v.We(a,Wf,"canResetZoom:newscale");var b=this.g;return null===b||ab.gh?!1:b.mw};Wf.prototype.zoomToFit=function(){var a=this.g;if(null!==a){var b=a.scale,c=a.position;b===this.Vy&&!isNaN(this.vy)&&a.Zd.K(this.Uy)?(a.scale=this.vy,a.position=this.ZB,this.Vy=NaN,this.Uy=bd):(this.vy=b,this.ZB=c.copy(),a.zoomToFit(),this.Vy=a.scale,this.Uy=a.Zd.copy())}};Wf.prototype.canZoomToFit=function(){var a=this.g;return null===a?!1:a.mw}; Wf.prototype.scrollToPart=function(a){void 0===a&&(a=null);null!==a&&v.A(a,R,Wf,"part");var b=this.g;if(null!==b){if(null===a){try{null!==this.Gi&&(this.Gi.next()?a=this.Gi.value:this.Gi=null)}catch(c){this.Gi=null}null===a&&(0b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Jf[0])c=a.Jf[0],d=a.Jf[1];else return;this.doCancel();if(a.Zo("hasGestureZoom")){a.iy=!0;a.kC=a.scale;var e=ah(a),f=c,h=f.clientX-e.x,c=f.clientY-e.y,f=d,d=f.clientX-e.x,f=f.clientY-e.y;v.v(e);e=d-h;c=f-c;a.DC=Math.sqrt(e*e+c*c);b.preventDefault();b.cancelBubble=!0}}}; Vf.prototype.standardPinchZoomMove=function(){var a=this.g;if(null!==a){var b=a.N.event;this.doCancel();var c=null,d=null;if(void 0!==b.targetTouches){if(2>b.targetTouches.length)return;c=b.targetTouches[0];d=b.targetTouches[1]}else if(null!==a.Jf[0])c=a.Jf[0],d=a.Jf[1];else return;if(a.Zo("hasGestureZoom")&&a.iy){var e=ah(a),f=c,c=f.clientX-e.x,h=f.clientY-e.y,f=d,d=f.clientX-e.x,f=f.clientY-e.y;v.v(e);var e=d-c,k=f-h,e=Math.sqrt(e*e+k*k)/a.DC,c=new z((Math.min(d,c)+Math.max(d,c))/2,(Math.min(f, h)+Math.max(f,h))/2),h=a.kC*e,d=a.nb;h!==a.scale&&d.canResetZoom(h)&&(e=a.Il,a.Il=c,d.resetZoom(h),a.Il=e);b.preventDefault();b.cancelBubble=!0}}};Vf.prototype.doKeyDown=function(){var a=this.g;null!==a&&"Esc"===a.N.key&&this.doCancel()};Vf.prototype.doKeyUp=function(){};Vf.prototype.startTransaction=Vf.prototype.Qb=function(a){void 0===a&&(a=this.name);this.Bf=null;var b=this.g;return null===b?!1:b.Qb(a)}; Vf.prototype.stopTransaction=Vf.prototype.fk=function(){var a=this.g;return null===a?!1:null===this.Bf?a.zp():a.wd(this.Bf)}; Vf.prototype.standardMouseSelect=function(){var a=this.g;if(null!==a&&a.of){var b=a.N,c=a.gt(b.ca,!1);if(null!==c)if(v.ak?b.Ft:b.control){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ta;null!==b&&(b.hb=!b.hb);a.Ba("ChangedSelection")}else if(b.shift){if(!c.hb){a.Ba("ChangingSelection");for(b=c;null!==b&&!b.canSelect();)b=b.Ta;null!==b&&(b.hb=!0);a.Ba("ChangedSelection")}}else{if(!c.hb){for(b=c;null!==b&&!b.canSelect();)b=b.Ta;null!==b&&a.select(b)}}else!b.left||(v.ak?b.Ft:b.control)|| b.shift||a.ow()}};Vf.prototype.standardMouseClick=function(a,b){void 0===a&&(a=null);void 0===b&&(b=function(a){return!a.layer.Gc});var c=this.g;if(null===c)return!1;var d=c.N,e=c.qe(d.ca,a,b);d.ye=e;bh(e,d,c);return d.zc}; function bh(a,b,c){b.zc=!1;var d=0;b.left?d=1===b.Ge?1:2===b.Ge?2:1:b.right&&1===b.Ge&&(d=3);var e="";if(null!==a){switch(d){case 1:e="ObjectSingleClicked";break;case 2:e="ObjectDoubleClicked";break;case 3:e="ObjectContextClicked"}0!==d&&c.Ba(e,a)}else{switch(d){case 1:e="BackgroundSingleClicked";break;case 2:e="BackgroundDoubleClicked";break;case 3:e="BackgroundContextClicked"}0!==d&&c.Ba(e)}if(null!==a)for(;null!==a;){c=null;switch(d){case 1:c=a.click;break;case 2:c=a.at?a.at:a.click;break;case 3:c= a.ez}if(null!==c&&(c(b,a),b.zc))break;a=a.S}else{a=null;switch(d){case 1:a=c.click;break;case 2:a=c.at?c.at:c.click;break;case 3:a=c.ez}null!==a&&a(b)}} Vf.prototype.standardMouseOver=function(){var a=this.g;if(null!==a){var b=a.N;if(null!==b.g&&!0!==a.Na.pc){var c=a.tb;a.tb=!0;var d=a.qe(b.ca,null,null);b.ye=d;var e=!1;if(d!==a.xn){var f=a.xn,h=f;a.xn=d;this.doCurrentObjectChanged(f,d);for(b.zc=!1;null!==f;){var k=f.Ht;if(null!==k){if(d===f)break;if(null!==d&&d.ul(f))break;k(b,f,d);e=!0;if(b.zc)break}f=f.S}f=h;for(b.zc=!1;null!==d;){k=d.Gt;if(null!==k){if(f===d)break;if(null!==f&&f.ul(d))break;k(b,d,f);e=!0;if(b.zc)break}d=d.S}d=a.xn}if(null!==d){f= d;for(k="";null!==f;){k=f.cursor;if(""!==k)break;f=f.S}a.$b=k;b.zc=!1;for(f=d;null!==f;){k=f.Tz;if(null!==k&&(k(b,f),e=!0,b.zc))break;f=f.S}}else a.$b="",k=a.Tz,null!==k&&(k(b),e=!0);e&&a.ue();a.tb=c}}};Vf.prototype.doCurrentObjectChanged=function(){}; Vf.prototype.standardMouseWheel=function(){var a=this.g;if(null!==a){var b=a.N,c=b.hl;if(0!==c&&a.Zd.G()){var d=a.nb,e=a.$a.It;if((e===ch&&!b.shift||e===dh&&b.control)&&(0e||Math.abs(b.y-a.y)>d};v.u(Vf,{g:"diagram"},function(){return this.W});v.defineProperty(Vf,{name:"name"},function(){return this.Ob},function(a){v.j(a,"string",Vf,"name");this.Ob=a}); v.defineProperty(Vf,{isEnabled:"isEnabled"},function(){return this.Se},function(a){v.j(a,"boolean",Vf,"isEnabled");this.Se=a});v.defineProperty(Vf,{qa:"isActive"},function(){return this.LB},function(a){v.j(a,"boolean",Vf,"isActive");this.LB=a});v.defineProperty(Vf,{Bf:"transactionResult"},function(){return this.VC},function(a){null!==a&&v.j(a,"string",Vf,"transactionResult");this.VC=a}); function Wg(){0e&&(e=k),l>f&&(f=l))}}Infinity===c?b.m(0,0,0,0):b.m(c,d,e-c,f-d)} function Mh(a,b){if(null===a.gc){var c=a.g;if(!(null===c||b&&(c.bb||c.vf))&&null!==a.ac){var d=c.la;d.isEnabled&&d.iE?null!==d.Pi&&0c.oa)){var d=a.g;if(null!==d&&!d.bb&&(d=a.Ei,null!==d)){var e=null,f=null;null===c.T&&(e=Wh(a,c.l(0),!1),null!==e&&(f=e.Y));var h=null,k=null;null===c.Z&&(h=Wh(a,c.l(c.oa-1),!0),null!==h&&(k=h.Y));d.isValidLink(f,e,k,h)?b?(c.An=c.l(0).copy(),c.En=c.l(c.oa-1).copy(),c.Jp=!1,c.T=f,null!==e&&(c.wg=e.Rd),c.Z=k,null!==h&&(c.qh=h.Rd)):Xh(d,f,e,k,h):Xh(d,null,null,null,null)}}}Wg.prototype.doDragOver=function(){}; function Yh(a,b){var c=a.g;if(null!==c){a.Ri&&Sh(a,!0);Ch(a);var d=Th(c,b,null,function(b){return!Qh(a,b)}),e=c.N;e.ye=d;if(null!==d){e.zc=!1;for(var f=d;null!==f;){var h=f.Qz;if(null!==h&&(h(e,f),e.zc))break;f=Vh(f)}}else h=c.Qz,null!==h&&h(e);if(a.qa||null!==gh)if(a.doDropOnto(b,d),a.qa||null!==gh)for(d=c.selection.i;d.next();)e=d.value,e instanceof S&&Zh(c,e.U)}}Wg.prototype.doDropOnto=function(){}; Wg.prototype.doMouseMove=function(){if(this.qa){var a=this.g;if(null!==a&&null!==this.Jm&&null!==this.ac){var b=!1,c=!1;this.mayCopy()?(b=!0,a.$b="copy",Mh(this,!1),fh(this,this.gc),Nh(this,this.gc,!1),Dh(this,this.gc)):this.mayMove()?(c=!0,a.$b="default",Gh(this),Nh(this,this.ac,!0)):this.mayDragOut()?(a.$b="no-drop",Mh(this,!1),Nh(this,this.gc,!1)):Gh(this);Rh(this,a.N.ca,c,b)}}}; Wg.prototype.doMouseUp=function(){if(this.qa){var a=this.g;if(null!==a){var b=!1,c=this.mayCopy();c&&null!==this.gc?(Gh(this),Mh(this,!0),fh(this,this.gc),Nh(this,this.gc,!1),Dh(this,this.gc),null!==this.gc&&a.VE(this.gc.dj())):(b=!0,Gh(this),this.mayMove()&&(Nh(this,this.ac,!0),Rh(this,a.N.ca,!0,!1)));this.zq=!0;Yh(this,a.N.ca);if(this.qa){this.gc=null;if(b&&null!==this.ac)for(b=this.ac.i;b.next();){var d=b.key;d instanceof S&&(d=d.Ta,null===d||null===d.placeholder||this.ac.contains(d)||d.tD&&d.P())}a.qc(); Dh(this,this.ac);this.Bf=c?"Copy":"Move";a.Ba(c?"SelectionCopied":"SelectionMoved",a.selection)}this.stopTool()}}};Wg.prototype.mayCopy=function(){if(!this.dE)return!1;var a=this.g;if(null===a||a.bb||a.vf||!a.Io||!a.Uj||(v.ak?!a.N.alt:!a.N.control))return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Od()&&b.canCopy())return!0}return null!==this.ad&&this.Ri&&this.ad.canCopy()?!0:!1}; Wg.prototype.mayDragOut=function(){if(!this.dE)return!1;var a=this.g;if(null===a||!a.Ss||!a.Uj||a.al)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Od()&&b.canCopy())return!0}return null!==this.ad&&this.Ri&&this.ad.canCopy()?!0:!1};Wg.prototype.mayMove=function(){var a=this.g;if(null===a||a.bb||!a.al)return!1;for(a=a.selection.i;a.next();){var b=a.value;if(b.Od()&&b.canMove())return!0}return null!==this.ad&&this.Ri&&this.ad.canMove()?!0:!1};var Eh=new I(Wg),gh=null,hh=null; Wg.prototype.mayDragIn=function(){var a=this.g;if(null===a||!a.fD||a.bb||a.vf||!a.Io)return!1;var b=gh;return null===b||b.g.ba.fl!==a.ba.fl?!1:!0};Wg.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.g;a.Na.Zh();$h(a);a=gh;null!==a&&(a.g.$b="copy")}};Wg.prototype.doSimulatedDragLeave=function(){var a=gh;null!==a&&a.doSimulatedDragOut();this.doCancel()}; Wg.prototype.doSimulatedDragOver=function(){var a=this.g;if(null!==a){var b=gh;null!==b&&null!==b.ac&&this.mayDragIn()&&(a.$b="copy",ai(this,b.ac.dj(),!1),Nh(this,this.gc,!1),Rh(this,a.N.ca,!1,!0))}}; Wg.prototype.doSimulatedDrop=function(){var a=this.g;if(null!==a){var b=gh;if(null!==b){var c=b.g;b.zq=!0;Gh(this);this.mayDragIn()&&(this.Qb("Drop"),ai(this,b.ac.dj(),!0),Nh(this,this.gc,!1),null!==this.gc&&a.VE(this.gc.dj()),Yh(this,a.N.ca),a.qc(),b=a.selection,null!==this.gc?this.Bf="ExternalCopy":b=new J(R),this.gc=null,a.focus(),a.Ba("ExternalObjectsDropped",b,c),this.fk())}}}; function ai(a,b,c){if(null===a.gc){var d=a.g;if(null!==d&&!d.bb&&!d.vf){d.tb=!c;d.Qp=!c;a.ek=d.N.ca;d=d.Po(b,d,!0);c=v.$f();Lh(b,c);var e=c.x+c.width/2,f=c.y+c.height/2;v.Vb(c);var h=a.Uv;c=new na(R);var k=v.L();for(b=b.i;b.next();){var l=b.value;if(l.Od()&&l.canCopy()){var m=l.location,l=d.ja(l);k.m(h.x-(e-m.x),h.y-(f-m.y));l.location=k;l.sf();c.add(l,zh(k))}}v.v(k);for(d=d.i;d.next();)e=d.value,e instanceof W&&e.canCopy()&&c.add(e,zh());a.gc=c;eh(a,c.dj());null!==a.ad&&(c=a.ad,d=c.$m,c.xl(a.ek.x- (d.x+d.width/2),a.ek.y-(d.y+d.height/2)))}}}Wg.prototype.doSimulatedDragOut=function(){var a=this.g;null!==a&&(this.mayCopy()||this.mayMove()?a.$b="":a.$b="no-drop")};function Ah(a){this.point=a;this.$E=ad}v.ea("DraggingInfo",Ah);function Oh(a,b,c){this.Jc=a;this.info=b;this.cH=c} function bi(){0=d&&(d=.1);for(var e=this,f=b.Lm(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.Y;if(k instanceof S){var l=h.Ya(zb,v.L()),m=c.x-l.x,n=c.y-l.y;v.v(l);l=m*m+n*n;lc){if(null!==this.kc&&a===this.Cg&&b===this.Dg)return!0;var d=b.Rd;null===d&&(d="");if(a.Aw(d).count>=c)return!1}return!0}; bi.prototype.isValidTo=function(a,b){if(null===a||null===b)return this.gp;if(this.g.Xa===this&&(null!==a.layer&&!a.layer.Ts||!0!==b.gF))return!1;var c=b.MI;if(Infinity>c){if(null!==this.kc&&a===this.Eg&&b===this.Fg)return!0;var d=b.Rd;null===d&&(d="");if(a.vg(d).count>=c)return!1}return!0};bi.prototype.isInSameNode=function(a,b){if(null===a||null===b)return!1;if(a===b)return!0;var c=a.Y,d=b.Y;return null!==c&&c===d}; bi.prototype.isLinked=function(a,b){if(null===a||null===b)return!1;var c=a.Y;if(!(c instanceof S))return!1;var d=a.Rd;null===d&&(d="");var e=b.Y;if(!(e instanceof S))return!1;var f=b.Rd;null===f&&(f="");for(e=e.vg(f);e.next();)if(f=e.value,f.T===c&&f.wg===d)return!0;return!1}; bi.prototype.isValidLink=function(a,b,c,d){if(!this.isValidFrom(a,b)||!this.isValidTo(c,d)||!(null===b||null===d||(b.VG&&d.LI||!this.isInSameNode(b,d))&&(b.UG&&d.KI||!this.isLinked(b,d)))||null!==this.kc&&(null!==a&&this.isLabelDependentOnLink(a,this.kc)||null!==c&&this.isLabelDependentOnLink(c,this.kc))||null!==a&&null!==c&&(null===a.data&&null!==c.data||null!==a.data&&null===c.data)||!this.isValidCycle(a,c,this.kc))return!1;if(null!==a){var e=a.Pw;if(null!==e&&!e(a,b,c,d,this.kc))return!1}if(null!== c&&(e=c.Pw,null!==e&&!e(a,b,c,d,this.kc)))return!1;e=this.Pw;return null!==e?e(a,b,c,d,this.kc):!0};bi.prototype.isLabelDependentOnLink=function(a,b){if(null===a)return!1;var c=a.ee;if(null===c)return!1;if(c===b)return!0;var d=new J(S);d.add(a);return ci(this,c,b,d)};function ci(a,b,c,d){if(b===c)return!0;var e=b.T;if(null!==e&&e.uf&&(d.add(e),ci(a,e.ee,c,d)))return!0;b=b.Z;return null!==b&&b.uf&&(d.add(b),ci(a,b.ee,c,d))?!0:!1} bi.prototype.isValidCycle=function(a,b,c){void 0===c&&(c=null);if(null===a||null===b)return this.gp;var d=this.g.TI;if(d!==di){if(d===ei){if(null!==c&&!c.Hc)return!0;for(d=b.te;d.next();){var e=d.value;if(e!==c&&e.Hc&&e.Z===b)return!1}return!fi(this,a,b,c,!0)}if(d===gi){if(null!==c&&!c.Hc)return!0;for(d=a.te;d.next();)if(e=d.value,e!==c&&e.Hc&&e.T===a)return!1;return!fi(this,a,b,c,!0)}if(d===hi)return a===b?a=!0:(d=new J(S),d.add(b),a=ii(this,d,a,b,c)),!a;if(d===ji)return!fi(this,a,b,c,!1);if(d=== ui)return a===b?a=!0:(d=new J(S),d.add(b),a=vi(this,d,a,b,c)),!a}return!0};function fi(a,b,c,d,e){if(b===c)return!0;if(null===b||null===c)return!1;for(var f=b.te;f.next();){var h=f.value;if(h!==d&&(!e||h.Hc)&&h.Z===b&&(h=h.T,h!==b&&fi(a,h,c,d,e)))return!0}return!1}function ii(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.te;f.next();){var h=f.value;if(h!==e&&h.Z===c&&(h=h.T,h!==c&&ii(a,b,h,d,e)))return!0}return!1} function vi(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.te;f.next();){var h=f.value;if(h!==e){var k=h.T,h=h.Z,k=k===c?h:k;if(k!==c&&vi(a,b,k,d,e))return!0}}return!1}v.defineProperty(bi,{Pw:"linkValidation"},function(){return this.Mk},function(a){null!==a&&v.j(a,"function",bi,"linkValidation");this.Mk=a});v.defineProperty(bi,{Yw:"portTargeted"},function(){return this.vC},function(a){null!==a&&v.j(a,"function",bi,"portTargeted");this.vC=a}); function wi(){0b.ht+1&&c=a.x)c=0>=a.y?c+225:1<=a.y?c+135:c+180;else if(1<=a.x)0>=a.y?c+=315:1<=a.y&&(c+=45);else if(0>=a.y)c+=270;else if(1<=a.y)c+=90;else break a;0>c?c+=360:360<=c&&(c-=360);b.cursor=22.5>c?"e-resize":67.5>c?"se-resize":112.5>c?"s-resize":157.5>c?"sw-resize":202.5>c?"w-resize":247.5>c?"nw-resize":292.5>c?"n-resize":337.5>c?"ne-resize":"e-resize"}else if(b instanceof D)for(b=b.elements;b.next();)Ni(a, b.value,c)}v.defineProperty(Mi,{nt:"handleArchetype"},function(){return this.Ak},function(a){null!==a&&v.A(a,G,Mi,"handleArchetype");this.Ak=a});v.u(Mi,{handle:"handle"},function(){return this.Sb});v.defineProperty(Mi,{Zb:"adornedObject"},function(){return this.Db},function(a){null!==a&&v.A(a,G,Mi,"adornedObject");this.Db=a});Mi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.g;return null!==a&&!a.bb&&a.Us&&a.N.left?null!==this.findToolHandleAt(a.yc.ca,this.name)?!0:!1:!1}; Mi.prototype.doActivate=function(){var a=this.g;null!==a&&(this.Sb=this.findToolHandleAt(a.yc.ca,this.name),null!==this.Sb&&(this.Db=this.Sb.Y.Zb,this.Ey.set(this.Db.Y.location),this.zv.set(this.Db.xa),this.by=this.computeCellSize(),this.gy=this.computeMinSize(),this.ey=this.computeMaxSize(),a.Oe=!0,this.iC=a.Na.isEnabled,a.Na.isEnabled=!1,this.Qb(this.name),this.qa=!0))};Mi.prototype.doDeactivate=function(){var a=this.g;null!==a&&(this.fk(),this.Db=this.Sb=null,this.qa=a.Oe=!1,a.Na.isEnabled=this.iC)}; Mi.prototype.doCancel=function(){this.Db.xa=this.zv;this.Db.Y.location=this.Ey;this.stopTool()};Mi.prototype.doMouseMove=function(){var a=this.g;if(this.qa&&null!==a){var b=this.gy,c=this.ey,d=this.by,e=this.Db.RD(a.N.ca,v.L()),f=Qi;this.Db instanceof Y&&(f=Ri(this.Db));b=this.computeResize(e,this.Sb.alignment,b,c,d,!(f===Si||f===Ti||a.N.shift));this.resize(b);a.Tf();v.v(e)}}; Mi.prototype.doMouseUp=function(){var a=this.g;if(this.qa&&null!==a){var b=this.gy,c=this.ey,d=this.by,e=this.Db.RD(a.N.ca,v.L()),f=Qi;this.Db instanceof Y&&(f=Ri(this.Db));b=this.computeResize(e,this.Sb.alignment,b,c,d,!(f===Si||f===Ti||a.N.shift));this.resize(b);v.v(e);a.qc();this.Bf=this.name;a.Ba("PartResized",this.Db,this.zv)}this.stopTool()}; Mi.prototype.resize=function(a){if(null!==this.g){var b=this.Zb,c=b.Y,d=b.ol(),e=b.Si(),f=Math.PI*d/180,h=Math.cos(f),f=Math.sin(f),k=0d?1:0,l=90d?1:0,d=180d?1:0,m=b.Ha.width,n=b.Ha.height;b.xa=a.size;var p=c.position.copy();c.sf();m=b.Ha.width-m;n=b.Ha.height-n;if(0!==m||0!==n)0!==m&&(p.x+=e*((a.x+m*l)*h-(a.y+n*k)*f)),0!==n&&(p.y+=e*((a.x+m*d)*f+(a.y+n*l)*h)),c.move(p),c instanceof S&&c.cf()}}; Mi.prototype.computeResize=function(a,b,c,d,e,f){b.se()&&(b=zb);var h=this.Zb.Ha,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=v.L();Pa(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)));v.v(q);return a};Mi.prototype.computeMinSize=function(){var a=this.Zb.ih.copy(),b=this.ih;!isNaN(b.width)&&b.width>a.width&&(a.width=b.width);!isNaN(b.height)&&b.height>a.height&&(a.height=b.height);return a}; Mi.prototype.computeMaxSize=function(){var a=this.Zb.xf.copy(),b=this.xf;!isNaN(b.width)&&b.widtha&&(a+=360));var b=Math.min(Math.abs(this.CI),180),c=Math.min(Math.abs(this.BI),b/2);!this.g.N.shift&&0b-c&&(a=(Math.floor(a/b)+1)*b));360<=a?a-=360:0>a&&(a+=360);return a};v.defineProperty(Ui,{CI:"snapAngleMultiple"},function(){return this.CC},function(a){v.j(a,"number",Ui,"snapAngleMultiple");this.CC=a}); v.defineProperty(Ui,{BI:"snapAngleEpsilon"},function(){return this.BC},function(a){v.j(a,"number",Ui,"snapAngleEpsilon");this.BC=a});v.u(Ui,{pK:"originalAngle"},function(){return this.yv});function Wi(){0e.right&&(c.x-=d.width+5);c.xe.bottom&&(c.y-=d.height+5);c.ye.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} v.defineProperty(sg,{tA:"starting"},function(){return this.wo},function(a){this.wo!==a&&(null!==a&&v.j(a,"function",sg,"starting"),this.wo=a)});v.u(sg,{sJ:"animationReasons"},function(){return this.uu});sg.prototype.prepareAutomaticAnimation=sg.prototype.Ym=function(a){if(this.Se&&(this.tj||this.W.Rm)){this.uu.add(a);var b=this.tA;if(null===b||b(this,a))this.sj&&this.Zh(),this.pc=!0,this.Ll=!1}}; function Jj(a){if(a.Se&&(a.uu.clear(),a.pc))if(!a.Ll)a.pc=!1;else if(0===a.mn){var b=+new Date;a.mn=b;requestAnimationFrame(function(){if(!1!==a.pc&&!a.sj&&a.mn===b){var c=a.W;c.Ti("temporaryPixelRatio")&&(c.Mj=1);Kj(c);a.pc=!1;c.Ba("AnimationStarting");Lj(a,b)}})}} function Mj(a,b,c,d,e,f){if(!(!a.pc||"position"===c&&d.K(e)||b instanceof R&&!b.aE)){var h=a.gm;if(h.contains(b)){b=h.ja(b);var k=b.start,l=b.end;void 0===k[c]&&(k[c]=Nj(d));b.jz&&void 0!==l[c]?b.rz[c]=Nj(e):(f||(b.rz[c]=Nj(e)),l[c]=Nj(e))}else k=new ta,l=new ta,k[c]=Nj(d),l[c]=Nj(e),c=l,d=k.position,d instanceof z&&!d.G()&&a.uu.contains("Expand SubGraph")&&d.assign(c.position),h.add(b,new Ij(k,l,f));a.Ll=!0}}function Nj(a){return a instanceof z?a.copy():a instanceof ia?a.copy():a} function Lj(a,b){var c;function d(){if(!1!==f.sj&&f.mn===b){var a=+new Date,c=a>s?m:a-r;Oj(f);Pj(f,e,q,h,c,m);f.Hu&&f.Hu();$h(e);Qj(f);a>s?Rj(f):requestAnimationFrame(d)}}void 0===c&&(c=new ta);var e=a.W;if(null!==e){a.sj=!0;var f=a,h=c.NJ||a.oB,k=c.nK||null,l=c.oK||null,m=c.duration||a.Zx,n=a.MF;for(c=a.gm.i;c.next();){var p=c.value.start.position;p instanceof z&&(p.G()||p.assign(n))}a.iB=h;a.Hu=k;a.Iu=l;a.hB=m;a.lB=a.gm;var q=a.lB;for(c=q.i;c.next();)k=c.value.end,k["position:placeholder"]&&(l= k["position:placeholder"],n=l.Ya(sb),n.x+=l.padding.left,n.y+=l.padding.top,k["position:placeholder"]=n);Oj(a);Pj(a,e,q,h,0,m);$h(a.W);Qj(a);var r=+new Date,s=r+m;f.mn===b&&requestAnimationFrame(function(){d()})}} var Sj={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.nx(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.U,k=c.U;c=k.x+k.width/2-h.width/2;h=k.y+k.height/2-h.height/2;e!==f?a.nx(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.nx(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 Oj(a){if(!a.Vn){var b=a.W;a.WC=b.tb;a.VA=b.we;a.WA=b.bu;b.tb=!0;b.we=!0;b.bu=!0;a.Vn=!0}}function Qj(a){var b=a.W;b.tb=a.WC;b.we=a.VA;b.bu=a.WA;a.Vn=!1} function Pj(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!==Sj[m])Sj[m](h,l[m],k[m],d,e,f)}d=b.Ez;b.Ez=!0;m=a.oB;0!==a.xq&&0!==a.wq&&(c=a.xq,b.Tb=m(e,c,a.wq-c,f));null!==a.vq&&null!==a.uq&&(c=a.vq,a=a.uq,b.kb=new z(m(e,c.x,a.x-c.x,f),m(e,c.y,a.y-c.y,f)));b.Ez=d}sg.prototype.stopAnimation=sg.prototype.Zh=function(){!0===this.pc&&(this.pc=!1,this.Ll&&this.W.ue());this.sj&&this.Se&&Rj(this)}; function Rj(a){a.sj=!1;a.mn=0;a.Ll=!1;a.vq=null;a.uq=null;a.xq=0;a.wq=0;Oj(a);for(var b=a.W,c=a.iB,d=a.hB,e=a.lB.i;e.next();){var f=e.key,h=e.value,k=h.start,l=h.end,m=h.rz,n;for(n in l)if(void 0!==Sj[n]){var p=n;!h.jz||"position:node"!==p&&"position:placeholder"!==p||(p="position");Sj[p](f,k[n],void 0!==m[n]?m[n]:h.jz?k[n]:l[n],c,d,d)}h.ax&&f.nd(!1)}for(c=a.W.links;c.next();)d=c.value,null!==d.po&&(d.points=d.po,d.po=null);b.Qw.clear();b.Mj=null;b.qc();b.Tf();Tj(b);Qj(a);a.gm=new na(G,Ij);a.Iu&& a.Iu();a.Iu=null;a.Hu=null;b.Ba("AnimationFinished");b.ue()}function Uj(a,b,c){var d=b.U,e=c.U,f=null;c instanceof V&&(f=c.placeholder);null!==f?(d=f.Ya(sb),d.x+=f.padding.left,d.y+=f.padding.top,Mj(a,b,"position",d,b.position,!1)):Mj(a,b,"position",new z(e.x+e.width/2-d.width/2,e.y+e.height/2-d.height/2),b.position,!1);Mj(a,b,"scale",.01,b.scale,!1);if(b instanceof V)for(b=b.Ic;b.next();)f=b.value,f instanceof S&&Uj(a,f,c)} function Vj(a,b,c){if(b.isVisible()){var d=null;c instanceof V&&(d=c.placeholder);null!==d?Mj(a,b,"position:placeholder",b.position,d,!0):Mj(a,b,"position:node",b.position,c,!0);Mj(a,b,"scale",b.scale,.01,!0);a.pc&&(d=a.gm,d.contains(b)&&(d.ja(b).ax=!0));if(b instanceof V)for(b=b.Ic;b.next();)d=b.value,d instanceof S&&Vj(a,d,c)}}function Wj(a,b,c){a.pc&&(null===a.vq&&b.G()&&null===a.uq&&(a.vq=b.copy()),a.uq=c.copy(),a.Ll=!0)} function Xj(a,b,c){a.pc&&a.W.Rm&&(0===a.xq&&0===a.wq&&(a.xq=b),a.wq=c,a.Ll=!0)}v.defineProperty(sg,{isEnabled:"isEnabled"},function(){return this.Se},function(a){v.j(a,"boolean",sg,"isEnabled");this.Se=a});v.defineProperty(sg,{duration:"duration"},function(){return this.Zx},function(a){v.j(a,"number",sg,"duration");1>a&&v.va(a,">= 1",sg,"duration");this.Zx=a});v.u(sg,{df:"isAnimating"},function(){return this.sj});v.u(sg,{wH:"isTicking"},function(){return this.Vn}); v.defineProperty(sg,{jE:"isInitial"},function(){return this.tj},function(a){v.j(a,"boolean",sg,"isInitial");this.tj=a});function Ij(a,b,c){this.start=a;this.end=b;this.rz=new ta;this.jz=c;this.ax=!1}function Uf(){0=a)return b;for(var c=0,d=0,e=0,f=0,h=0,k=this.wb.i;k.next();){var l=k.value;l instanceof V?e++:l instanceof S?d++:l instanceof W?f++:l instanceof Sg?h++:c++}k="";0=d.count)a=d.count;else if(d.da(a)===b)return-1;d.yd(a,b);b.qt(c);d=this.g;null!==d&&(c?d.pa():d.cp(b));dk(this,a,b);return a}; g.Ne=function(a,b,c){if(!c&&b.layer!==this&&null!==b.layer)return b.layer.Ne(a,b,c);var d=this.wb;if(0>a||a>=d.length){if(a=d.indexOf(b),0>a)return-1}else if(d.da(a)!==b&&(a=d.indexOf(b),0>a))return-1;b.rt(c);d.Vc(a);d=this.g;null!==d&&(c?d.pa():d.Ne(b));b.lv=null;return a}; function dk(a,b,c){b=ek(a,b,c);if(c instanceof V&&null!==c&&isNaN(c.jn)){if(0!==c.Ic.count){for(var d=-1,e=a.wb.n,f=e.length,h=0;hd&&k.Ta===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.da(f).jn;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.Vc(b);a.yd(f,c);return f}for(h=NaN;0<=--f&&(h=a.da(f).jn,isNaN(h)););}else if(!isNaN(l)&&l=d){k--;if(k===b)break;a.Vc(b);a.yd(k,c);return k}for(l=NaN;++ka||1=a)return b;for(var c=this.Yb.i;c.next();)b+="\n "+c.value.toString(a-1);return b};E.fromDiv=function(a){var b=a;"string"===typeof a&&(b=window.document.getElementById(a));return b instanceof HTMLDivElement&&b.W instanceof E?b.W:null}; v.defineProperty(E,{il:"div"},function(){return this.Kb},function(a){null!==a&&v.A(a,HTMLDivElement,E,"div");if(this.Kb!==a){gk=[];var b=this.Kb;null!==b?(b.W=void 0,b.innerHTML="",null!==this.zb&&(this.zb.removeEventListener("touchstart",this.lF,!1),this.zb.removeEventListener("touchmove",this.kF,!1),this.zb.removeEventListener("touchend",this.jF,!1),this.zb.xd.W=null),b=this.$a,null!==b&&(b.Pe.each(function(a){a.cancelWaitAfter()}),b.Uf.each(function(a){a.cancelWaitAfter()}),b.Vf.each(function(a){a.cancelWaitAfter()})), b.cancelWaitAfter(),this.Xa.doCancel(),this.lf=this.zb=null,window.removeEventListener("resize",this.vF,!1),window.removeEventListener("mousemove",this.op,!0),window.removeEventListener("mousedown",this.np,!0),window.removeEventListener("mouseup",this.qp,!0),window.removeEventListener("mousewheel",this.jh,!0),window.removeEventListener("DOMMouseScroll",this.jh,!0),window.removeEventListener("mouseout",this.pp,!0)):this.Qg=!1;this.Kb=null;if(null!==a){if(b=a.W)b.il=null;sk(this,a);this.$w()}}}); function vk(a){var b=a.zb;b.addEventListener("touchstart",a.lF,!1);b.addEventListener("touchmove",a.kF,!1);b.addEventListener("touchend",a.jF,!1);b.addEventListener("mousemove",a.op,!1);b.addEventListener("mousedown",a.np,!1);b.addEventListener("mouseup",a.qp,!1);b.addEventListener("mousewheel",a.jh,!1);b.addEventListener("DOMMouseScroll",a.jh,!1);b.addEventListener("mouseout",a.pp,!1);b.addEventListener("keydown",a.zH,!1);b.addEventListener("keyup",a.AH,!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.$a.Yo===Dj&&b.preventDefault()},!1);b.addEventListener("pointerdown",a.aI,!1);b.addEventListener("pointermove",a.cI,!1);b.addEventListener("pointerleave",a.bI,!1);window.addEventListener("resize",a.vF,!1)}E.prototype.computePixelRatio=function(){return null!==this.Mj?this.Mj:this.JF};E.prototype.doMouseMove=function(){this.Xa.doMouseMove()}; E.prototype.doMouseDown=function(){this.Xa.doMouseDown()};E.prototype.doMouseUp=function(){this.Xa.doMouseUp()};E.prototype.doMouseWheel=function(){this.Xa.doMouseWheel()};E.prototype.doKeyDown=function(){this.Xa.doKeyDown()};E.prototype.doKeyUp=function(){this.Xa.doKeyUp()};E.prototype.doFocus=function(){this.focus()};E.prototype.focus=E.prototype.focus=function(){this.zb&&this.zb.focus()}; function Kj(a){if(null!==a.zb){var b=a.Kb;if(0!==b.clientWidth&&0!==b.clientHeight){var c=a.Bk?a.vd:0,d=a.qj?a.vd:0,e=a.rd;a.rd=a.computePixelRatio();a.rd!==e&&(a.Nq=!0,a.ue());if(b.clientWidth!==a.Eb+c||b.clientHeight!==a.Jb+d)a.Sl=!0,a.je=!0,b=a.Pb,null!==b&&b.Lw&&a.bl===Xg&&b.H(),a.Gd||a.ue()}}} function pk(a){var b=new Uf;b.name="Background";a.Ns(b);b=new Uf;b.name="";a.Ns(b);b=new Uf;b.name="Foreground";a.Ns(b);b=new Uf;b.name="Adornment";b.Gc=!0;a.Ns(b);b=new Uf;b.name="Tool";b.Gc=!0;b.bE=!0;a.Ns(b);b=new Uf;b.name="Grid";b.of=!1;b.Gg=!1;b.Gc=!0;a.cG(b,a.dt("Background"))} function wk(a){a.hd=new D(xk);a.hd.name="GRID";var b=new Y;b.Ab="LineH";b.stroke="lightgray";b.lb=.5;b.interval=1;a.hd.add(b);b=new Y;b.Ab="LineH";b.stroke="gray";b.lb=.5;b.interval=5;a.hd.add(b);b=new Y;b.Ab="LineH";b.stroke="gray";b.lb=1;b.interval=10;a.hd.add(b);b=new Y;b.Ab="LineV";b.stroke="lightgray";b.lb=.5;b.interval=1;a.hd.add(b);b=new Y;b.Ab="LineV";b.stroke="gray";b.lb=.5;b.interval=5;a.hd.add(b);b=new Y;b.Ab="LineV";b.stroke="gray";b.lb=1;b.interval=10;a.hd.add(b);b=new R;b.add(a.hd); b.Sf="Grid";b.jn=0;b.Gz=!1;b.aE=!1;b.Gg=!1;b.Lz="GRID";a.add(b);a.wb.remove(b);a.hd.visible=!1}E.prototype.LF=function(){this.W.isEnabled?this.W.JG(this):yk(this.W)};E.prototype.jC=function(a){this.W.isEnabled?(this.W.Hy=!0,this.W.Jy=a.target.scrollTop,this.W.Iy=a.target.scrollLeft):yk(this.W)}; E.prototype.diagramScroll=E.prototype.JG=function(a){if(this.Hy&&null!==this.zb){this.Lv=!0;var b=this.Zd,c=this.rb,d=b.width,e=c.width,f=b.height,h=c.height,k=b.right,l=c.right,m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,r=this.scale,s;s=a.scrollLeft;if(this.Tq)switch(this.Gy){case "negative":s=s+a.scrollWidth-a.clientWidth;break;case "reverse":s=a.scrollWidth-s-a.clientWidth}var t=s;el&&(this.position=s.m(-(this.Pv.scrollWidth-this.Eb)+t-this.Eb/r+k,this.position.y))),a.QF&&this.oe&&(bn&&(this.position=s.m(this.position.x,-(this.Pv.scrollHeight-this.Jb)+a.scrollTop-this.Jb/r+m))),v.v(s),zk(this),this.Sl=this.Lv=!1,b=this.Zd,c=this.rb,k=b.right,l=c.right, m=b.bottom,n=c.bottom,p=b.x,q=c.x,b=b.y,c=c.y,e>=d&&p>=q&&k<=l&&(this.cs.style.width="1px"),h>=f&&b>=c&&m<=n&&(this.cs.style.height="1px"))}};E.prototype.computeBounds=E.prototype.$g=function(){0c&&(e=c),ea.gh&&(e=a.gh),e):b===Hk?(e=l>k?(h-a.vd)/d:(f-a.vd)/e,e>c&&(e=c),ea.gh&&(e=a.gh),e):a.scale}E.prototype.zoomToFit=E.prototype.zoomToFit=function(){this.scale=Dk(this,Gk)}; E.prototype.zoomToRect=function(a,b){void 0===b&&(b=Gk);var c=a.width,d=a.height;if(!(0===c||0===d||isNaN(c)&&isNaN(d))){var e=1;if(b===Gk||b===Hk)if(isNaN(c))e=this.rb.height*this.scale/d;else if(isNaN(d))e=this.rb.width*this.scale/c;else var e=this.Eb,f=this.Jb,e=b===Hk?f/d>e/c?(f-(this.qj?this.vd:0))/d:(e-(this.Bk?this.vd:0))/c:Math.min(f/d,e/c);this.scale=e;this.position=new z(a.x,a.y)}};v.defineProperty(E,{Ez:null},function(){return this.Pc},function(a){this.Pc=a}); E.prototype.alignDocument=function(a,b){this.rj&&Fk(this,this.$g());var c=this.Zd,d=this.rb;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 Ek(a,b,c,d,e,f,h){var k=b.x,l=b.y;if(h||a.jA===hk)f.bd()&&(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.RE,h=d-c.width,dc.left?k=c.left:kc.top?l=c.top:lb.touches.length)&&b.preventDefault();b.cancelBubble=!0;return!1} E.prototype.zH=function(a){if(!this.W.isEnabled)return!1;var b=this.W.Nb;Ik(this.W,this.W,a,b,!1);b.key=String.fromCharCode(a.which);b.jl=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 48:b.key="0";break;case 187:case 61:case 107:b.key= "Add";break;case 189:case 173:case 109:b.key="Subtract";break;case 27:b.key="Esc"}this.W.doKeyDown();return 187!==a.which&&189!==a.which&&48!==a.which&&107!==a.which&&109!==a.which&&61!==a.which&&173!==a.which||!0!==a.ctrlKey?Mk(b,a):(a.cancelBubble=!0,a.preventDefault(),a.stopPropagation(),!1)}; E.prototype.AH=function(a){if(!this.W.isEnabled)return!1;var b=this.W.Nb;Ik(this.W,this.W,a,b,!1);b.key=String.fromCharCode(a.which);b.up=!0;switch(a.which){case 8:b.key="Backspace";break;case 33:b.key="PageUp";break;case 34:b.key="PageDown";break;case 35:b.key="End";break;case 36:b.key="Home";break;case 37:b.key="Left";break;case 38:b.key="Up";break;case 39:b.key="Right";break;case 40:b.key="Down";break;case 45:b.key="Insert";break;case 46:b.key="Del";break;case 93:a.preventDefault()}this.W.doKeyUp(); return Mk(b,a)};E.prototype.Iq=function(a){var b=this.zb;if(null===b)return new z(0,0);var c=this.Eb,d=this.Jb,b=b.getBoundingClientRect(),c=a.clientX-c/b.width*b.left;a=a.clientY-d/b.height*b.top;return null!==this.me?(a=new z(c,a),Qa(a,this.me),a):new z(c,a)};function Jk(a,b,c){var d=a.zb,e=a.Eb,f=a.Jb,h=0,k=0;null!==d&&(d=d.getBoundingClientRect(),h=b.clientX-e/d.width*d.left,k=b.clientY-f/d.height*d.top);c.jf.m(h,k);null!==a.me?(b=v.Mb(h,k),a.me.Wh(b),c.ca.assign(b),v.v(b)):c.ca.m(h,k)} E.prototype.invalidateDocumentBounds=E.prototype.qc=function(){this.rj||(this.rj=!0,this.ue(!0))};function Tj(a){a.Gd||Ak(a);a.rj&&Fk(a,a.$g())}E.prototype.redraw=E.prototype.$w=function(){this.Pc||this.Gd||(this.pa(),Nk(this),zk(this),this.qc(),this.Tf())};E.prototype.isUpdateRequested=function(){return this.Kf};E.prototype.delayInitialization=function(a){void 0===a&&(a=null);var b=this.Na,c=b.isEnabled;b.Zh();b.isEnabled=!1;$h(this);this.Qg=!1;b.isEnabled=c;null!==a&&v.setTimeout(a,1)}; E.prototype.requestUpdate=E.prototype.ue=function(a){void 0===a&&(a=!1);if(!0!==this.Kf&&!(this.Pc||!1===a&&this.Gd)){this.Kf=!0;var b=this;requestAnimationFrame(function(){b.Kf&&b.Tf()})}};E.prototype.maybeUpdate=E.prototype.Tf=function(){if(!this.Ln||this.Kf)this.Ln&&(this.Ln=!1),$h(this)};function Ok(a,b){a.Na.df||a.Pc||!a.Sl||yk(a)||(b&&Ak(a),Ck(a,!1))} function $h(a){if(!a.Gd&&(a.Kf=!1,null!==a.Kb)){a.Gd=!0;var b=a.Na,c=a.sC;if(!b.Vn&&0!==c.length){for(var d=c.n,e=d.length,f=0;fb;b++){var c=a.eg.i;if(null===c||0===a.eg.count)break;a.eg=new J(G);a.BA(c,a.eg)}} E.prototype.BA=function(a,b){for(a.reset();a.next();){var c=a.value;!c.Od()||c instanceof V||!c.isVisible()||(c.vl()?(ij(c,Infinity,Infinity),c.Ec()):b.add(c))}for(a.reset();a.next();)c=a.value,c instanceof V&&c.isVisible()&&dl(this,c);for(a.reset();a.next();)c=a.value,c instanceof W&&c.isVisible()&&(c.vl()?(ij(c,Infinity,Infinity),c.Ec()):b.add(c));for(a.reset();a.next();)c=a.value,c instanceof Sg&&c.isVisible()&&(c.vl()?(ij(c,Infinity,Infinity),c.Ec()):b.add(c))}; function dl(a,b){for(var c=v.jb(),d=v.jb(),e=b.Ic;e.next();){var f=e.value;f.isVisible()&&(f instanceof V?(el(f)||fl(f)||gl(f))&&dl(a,f):f instanceof W?f.T===b||f.Z===b?d.push(f):c.push(f):(ij(f,Infinity,Infinity),f.Ec()))}for(var e=c.length,h=0;hy+1&& (A=Math.max((u-y)*C+a.Eb,A)),q+k+1n+1&&(H=Math.max((p-n)*C+a.Jb,H)),r+l+1y+1&&(A=Math.max((u-y)*C+a.Eb,A)),q+1n+1&&(H=Math.max((p-n)*C+l,H)),r+1y+1&&(k=a.position.x*C));if(a.Tq)switch(a.Gy){case "negative":k=-(b.scrollWidth-k-b.clientWidth);break;case "reverse":k=b.scrollWidth-k-b.clientWidth}b.scrollLeft=k;a.Bz&&a.oe&&(r+1n+1&&(b.scrollTop=a.position.y*C));h&&(a.Nq=!0);m=a.Eb;c=a.Jb;b.style.width=m+(a.Bk?a.vd:0)+"px";b.style.height=c+(a.qj?a.vd:0)+"px";a.Hy=!1;return d!==m||e!== c||a.Na.pc?(n=a.rb,a.Lt(f,n,h),!1):!0} E.prototype.add=E.prototype.add=function(a){v.A(a,R,E,"add:part");var b=a.g;if(b!==this){null!==b&&v.k("Cannot add part "+a.toString()+" to "+this.toString()+". It is already a part of "+b.toString());this.Qp&&(a.Jk="Tool");var c=a.Sf,b=this.dt(c);null===b&&(b=this.dt(""));null===b&&v.k('Cannot add a Part when unable find a Layer named "'+c+'" and there is no default Layer');a.layer!==b&&(c=b.cp(99999999,a,a.g===this),0<=c&&this.Lc(Bf,"parts",b,null,a,null,c),b.Gc||this.qc(),a.H(nl),c=a.zt,null!== c&&c(a,null,b))}}; E.prototype.cp=function(a){if(a instanceof S){if(this.ko.add(a),a instanceof V){var b=a.Ta;null===b?this.Vk.add(a):b.ho.add(a);b=a.Pb;null!==b&&(b.g=this)}}else a instanceof W?this.bo.add(a):a instanceof Sg||this.wb.add(a);var c=this;ol(a,function(a){pl(c,a)});a.Gb&&a.P();b=a.data;null!==b&&(a instanceof Sg||(a instanceof W?this.wk.add(b,a):this.ki.add(b,a)),ol(a,function(a){ql(c,a)}));!0!==fl(a)&&!0!==gl(a)||this.eg.add(a);rl(a,!0,this);sl(a)?(a.U.G()&&this.pa(ck(a,a.U)),this.qc()):a.isVisible()&& a.U.G()&&this.pa(ck(a,a.U));this.ue()}; E.prototype.Ne=function(a){a.Vs();if(a instanceof S){if(this.ko.remove(a),a instanceof V){var b=a.Ta;null===b?this.Vk.remove(a):b.ho.remove(a);b=a.Pb;null!==b&&(b.g=null)}}else a instanceof W?this.bo.remove(a):a instanceof Sg||this.wb.remove(a);var c=this;ol(a,function(a){tl(c,a)});b=a.data;null!==b&&(a instanceof Sg||(a instanceof W?this.wk.remove(b):this.ki.remove(b)),ol(a,function(a){ul(c,a)}));this.eg.remove(a);sl(a)?(a.U.G()&&this.pa(ck(a,a.U)),this.qc()):a.isVisible()&&a.U.G()&&this.pa(ck(a, a.U));this.ue()};E.prototype.remove=E.prototype.remove=function(a){v.A(a,R,E,"remove:part");a.hb=!1;a.fh=!1;var b=a.layer;if(null!==b&&b.g===this){a.H(vl);a.Km();var c=b.Ne(-1,a,!1);0<=c&&this.Lc(Cf,"parts",b,a,null,c,null);c=a.zt;null!==c&&c(a,b,null)}};E.prototype.removeParts=E.prototype.gA=function(a,b){if(v.isArray(a))for(var c=v.Wa(a),d=0;dd&&this.qc()}; E.prototype.addLayerAfter=function(a,b){wl(this,a,b);a.Mc(this);var c=this.Yb,d=c.indexOf(a);0<=d&&(c.remove(a),null!==this.Vd&&this.Lc(Cf,"layers",this,a,null,d,null));for(var e=c.count,f=0;fd&&this.qc()}; E.prototype.removeLayer=function(a){v.A(a,Uf,E,"removeLayer:layer");a.g!==this&&v.k("Cannot remove a Layer from another Diagram: "+a+" of "+a.g);if(""!==a.name){var b=this.Yb,c=b.indexOf(a);if(b.remove(a)){for(b=a.wb.copy().i;b.next();){var d=b.value,e=d.Sf;d.Sf=e!==a.name?e:""}null!==this.Vd&&this.Lc(Cf,"layers",this,a,null,c,null);this.pa();this.qc()}}};E.prototype.findLayer=E.prototype.dt=function(a){for(var b=this.Ow;b.next();){var c=b.value;if(c.name===a)return c}return null}; E.prototype.addModelChangedListener=E.prototype.eG=function(a){v.j(a,"function",E,"addModelChangedListener:listener");null===this.Rg&&(this.Rg=new I("function"));this.Rg.add(a);this.ba.xm(a)};E.prototype.removeModelChangedListener=function(a){v.j(a,"function",E,"removeModelChangedListener:listener");null!==this.Rg&&(this.Rg.remove(a),0===this.Rg.count&&(this.Rg=null));this.ba.Ot(a)}; E.prototype.addChangedListener=E.prototype.xm=function(a){v.j(a,"function",E,"addChangedListener:listener");null===this.ei&&(this.ei=new I("function"));this.ei.add(a)};E.prototype.removeChangedListener=E.prototype.Ot=function(a){v.j(a,"function",E,"removeChangedListener:listener");null!==this.ei&&(this.ei.remove(a),0===this.ei.count&&(this.ei=null))}; E.prototype.nw=function(a){this.tb||this.la.WD(a);a.wc!==Af&&(this.Yh=!0);if(null!==this.ei){var b=this.ei,c=b.length;if(1===c)b=b.da(0),b(a);else if(0!==c)for(var d=b.cc(),e=0;ea.gh&&(c=a.gh);e=v.Mb(a.kb.x+h/b-h/c,a.kb.y+k/b-k/c);a.position=e;v.v(e);a.Tb=c;a.Lt(d,a.rb);a.Pc=!1;Ck(a,!1);c= a.Na;c.pc&&Xj(c,b,a.Tb);a.pa();Nk(a)}}E.prototype.Lt=function(a,b,c){if(!a.K(b)){void 0===c&&(c=!1);c||Nk(this);zk(this);var d=this.Pb;null===d||!d.Lw||this.bl!==Xg||c||a.width===b.width&&a.height===b.height||d.H();d=this.Xa;!0===this.Ul&&d instanceof Qg&&(this.N.ca=this.qF(this.N.jf),Fj(d,this));this.Pc||this.$D(a,b);$k(this);this.Ba("ViewportBoundsChanged",c?v.gj:null,a)}}; function $k(a,b){void 0===b&&(b=null);var c=a.hd;if(null!==c&&c.visible){for(var d=v.Fl(),e=1,f=1,h=c.za.n,k=h.length,l=0;ln||(yl(m.Ab)?f=f*n/te(f,n):e=e*n/te(e,n))}h=c.Ew;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=v.$f();f=a.rb;e.m(f.x,f.y,f.width,f.height);for(h=a.Cv.i;h.next();)f=h.value.rb,f.G()&&$a(e,f.x,f.y,f.width,f.height);if(!e.G()){v.Vb(e);return}k=e.width;l=e.height;f=e.x;h=e.y;v.Vb(e)}c.width=k+2*d.width;c.height= l+2*d.height;e=v.L();Pa(f,h,0,0,d.width,d.height,e);e.offset(-d.width,-d.height);v.Zj(d);c.Y.location=e;v.v(e)}}E.prototype.clearSelection=E.prototype.ow=function(){var a=0a&&v.va(a,">= 0",E,"scrollHorizontalLineChange"),this.Mv=a,this.h("scrollHorizontalLineChange",b,a))}); v.defineProperty(E,{Ut:"scrollVerticalLineChange"},function(){return this.Qv},function(a){var b=this.Qv;b!==a&&(v.j(a,"number",E,"scrollVerticalLineChange"),0>a&&v.va(a,">= 0",E,"scrollVerticalLineChange"),this.Qv=a,this.h("scrollVerticalLineChange",b,a))});v.defineProperty(E,{N:"lastInput"},function(){return this.Nb},function(a){this.Nb=a});v.defineProperty(E,{yc:"firstInput"},function(){return this.qi},function(a){this.qi=a}); v.defineProperty(E,{$b:"currentCursor"},function(){return this.Gu},function(a){""===a&&(a=this.tq);this.Gu!==a&&(v.j(a,"string",E,"currentCursor"),null!==this.zb&&(this.Gu=a,this.zb.style.cursor=a,this.Kb.style.cursor=a))});v.defineProperty(E,{CJ:"defaultCursor"},function(){return this.tq},function(a){""===a&&(a="auto");var b=this.tq;b!==a&&(v.j(a,"string",E,"defaultCursor"),this.tq=a,this.h("defaultCursor",b,a))}); v.defineProperty(E,{click:"click"},function(){return this.fi},function(a){var b=this.fi;b!==a&&(null!==a&&v.j(a,"function",E,"click"),this.fi=a,this.h("click",b,a))});v.defineProperty(E,{at:"doubleClick"},function(){return this.oi},function(a){var b=this.oi;b!==a&&(null!==a&&v.j(a,"function",E,"doubleClick"),this.oi=a,this.h("doubleClick",b,a))}); v.defineProperty(E,{ez:"contextClick"},function(){return this.ii},function(a){var b=this.ii;b!==a&&(null!==a&&v.j(a,"function",E,"contextClick"),this.ii=a,this.h("contextClick",b,a))});v.defineProperty(E,{Tz:"mouseOver"},function(){return this.Bi},function(a){var b=this.Bi;b!==a&&(null!==a&&v.j(a,"function",E,"mouseOver"),this.Bi=a,this.h("mouseOver",b,a))}); v.defineProperty(E,{Sz:"mouseHover"},function(){return this.Ai},function(a){var b=this.Ai;b!==a&&(null!==a&&v.j(a,"function",E,"mouseHover"),this.Ai=a,this.h("mouseHover",b,a))});v.defineProperty(E,{Rz:"mouseHold"},function(){return this.zi},function(a){var b=this.zi;b!==a&&(null!==a&&v.j(a,"function",E,"mouseHold"),this.zi=a,this.h("mouseHold",b,a))}); v.defineProperty(E,{VH:"mouseDragOver"},function(){return this.vv},function(a){var b=this.vv;b!==a&&(null!==a&&v.j(a,"function",E,"mouseDragOver"),this.vv=a,this.h("mouseDragOver",b,a))});v.defineProperty(E,{Qz:"mouseDrop"},function(){return this.yi},function(a){var b=this.yi;b!==a&&(null!==a&&v.j(a,"function",E,"mouseDrop"),this.yi=a,this.h("mouseDrop",b,a))}); v.defineProperty(E,{yA:"toolTip"},function(){return this.Ii},function(a){var b=this.Ii;b!==a&&(null!==a&&v.A(a,Sg,E,"toolTip"),this.Ii=a,this.h("toolTip",b,a))});v.defineProperty(E,{contextMenu:"contextMenu"},function(){return this.ji},function(a){var b=this.ji;b!==a&&(null!==a&&v.A(a,Sg,E,"contextMenu"),this.ji=a,this.h("contextMenu",b,a))}); v.defineProperty(E,{nb:"commandHandler"},function(){return this.Mx},function(a){var b=this.Mx;b!==a&&(v.A(a,Wf,E,"commandHandler"),null!==a.g&&v.k("Cannot share CommandHandlers between Diagrams: "+a.toString()),null!==b&&b.Mc(null),this.Mx=a,a.Mc(this))});v.defineProperty(E,{$a:"toolManager"},function(){return this.Qy},function(a){var b=this.Qy;b!==a&&(v.A(a,Qg,E,"toolManager"),null!==a.g&&v.k("Cannot share ToolManagers between Diagrams: "+a.toString()),null!==b&&b.Mc(null),this.Qy=a,a.Mc(this))}); v.defineProperty(E,{$s:"defaultTool"},function(){return this.Sx},function(a){var b=this.Sx;b!==a&&(v.A(a,Vf,E,"defaultTool"),this.Sx=a,this.Xa===b&&(this.Xa=a))});v.defineProperty(E,{Xa:"currentTool"},function(){return this.Qx},function(a){var b=this.Qx;null!==b&&(b.qa&&b.doDeactivate(),b.cancelWaitAfter(),b.doStop());null===a&&(a=this.$s);null!==a&&(v.A(a,Vf,E,"currentTool"),this.Qx=a,a.Mc(this),a.doStart())});v.u(E,{selection:"selection"},function(){return this.Sv}); v.defineProperty(E,{NH:"maxSelectionCount"},function(){return this.rv},function(a){var b=this.rv;if(b!==a)if(v.j(a,"number",E,"maxSelectionCount"),0<=a&&!isNaN(a)){if(this.rv=a,this.h("maxSelectionCount",b,a),!this.la.ib&&(a=this.selection.count-a,0= 0",E,"maxSelectionCount")}); v.defineProperty(E,{YH:"nodeSelectionAdornmentTemplate"},function(){return this.wv},function(a){var b=this.wv;b!==a&&(v.A(a,Sg,E,"nodeSelectionAdornmentTemplate"),this.wv=a,this.h("nodeSelectionAdornmentTemplate",b,a))});v.defineProperty(E,{dH:"groupSelectionAdornmentTemplate"},function(){return this.Wu},function(a){var b=this.Wu;b!==a&&(v.A(a,Sg,E,"groupSelectionAdornmentTemplate"),this.Wu=a,this.h("groupSelectionAdornmentTemplate",b,a))}); v.defineProperty(E,{HH:"linkSelectionAdornmentTemplate"},function(){return this.nv},function(a){var b=this.nv;b!==a&&(v.A(a,Sg,E,"linkSelectionAdornmentTemplate"),this.nv=a,this.h("linkSelectionAdornmentTemplate",b,a))});v.u(E,{Pm:"highlighteds"},function(){return this.av}); v.defineProperty(E,{Yh:"isModified"},function(){var a=this.la;return a.isEnabled?null!==a.Pi?!0:this.sy&&this.Og!==a.Ui:this.sy},function(a){if(this.sy!==a){v.j(a,"boolean",E,"isModified");this.sy=a;var b=this.la;!a&&b.isEnabled&&(this.Og=b.Ui);a||zl(this)}});function zl(a){var b=a.Yh;a.YC!==b&&(a.YC=b,a.Ba("Modified"))} v.defineProperty(E,{ba:"model"},function(){return this.Vd},function(a){var b=this.Vd;if(b!==a){v.A(a,F,E,"model");this.Xa.doCancel();null!==b&&b.la!==a.la&&b.la.iE&&v.k("Do not replace a Diagram.model while a transaction is in progress.");this.Na.Zh();this.ow();this.Qg=!1;this.Ln=!0;this.Og=-2;this.Kf=!1;var c=this.Gd;this.Gd=!0;this.Na.Ym("Model");null!==b&&(null!==this.Rg&&this.Rg.each(function(a){b.Ot(a)}),b.Ot(this.fC),b instanceof Q&&Al(this,b.yg),Al(this,b.Xf));this.Vd=a;a.xm(this.eC);Bl(this, a.Xf);a instanceof Q&&Cl(this,a.yg);a.Ot(this.eC);a.xm(this.fC);null!==this.Rg&&this.Rg.each(function(b){a.xm(b)});this.Gd=c;this.Pc||this.pa();null!==b&&(a.la.isEnabled=b.la.isEnabled)}});v.defineProperty(E,{Ra:null},function(){return this.YB},function(a){this.YB=a});v.u(E,{Qw:null},function(){return this.FF}); function lk(a,b){if(b.ba===a.ba){var c=b.wc,d=b.propertyName;if(c===Af&&"S"===d[0])if("StartingFirstTransaction"===d)c=a.$a,c.Pe.each(function(b){b.Mc(a)}),c.Uf.each(function(b){b.Mc(a)}),c.Vf.each(function(b){b.Mc(a)}),a.Gd||a.Qg||(a.Mu=!0,a.Ln&&(a.Kf=!0));else if("StartingUndo"===d||"StartingRedo"===d){var e=a.Na;e.df&&!a.tb&&e.Zh();a.Ba("ChangingSelection")}else"StartedTransaction"===d&&(e=a.Na,e.df&&!a.tb&&e.Zh());else if(a.Ra){a.Ra=!1;try{var f=b.hf;if(""!==f)if(c===zf){if("linkFromKey"===f){var h= b.object,k=a.Of(h);if(null!==k){var l=b.newValue,m=a.Ze(l);k.T=m}}else if("linkToKey"===f)h=b.object,k=a.Of(h),null!==k&&(l=b.newValue,m=a.Ze(l),k.Z=m);else if("linkFromPortId"===f){if(h=b.object,k=a.Of(h),null!==k){var n=b.newValue;"string"===typeof n&&(k.wg=n)}}else if("linkToPortId"===f)h=b.object,k=a.Of(h),null!==k&&(n=b.newValue,"string"===typeof n&&(k.qh=n));else if("nodeGroupKey"===f){var h=b.object,p=a.dh(h);if(null!==p){var q=b.newValue;if(void 0!==q){var r=a.Ze(q);p.Ta=r instanceof V?r: null}else p.Ta=null}}else if("linkLabelKeys"===f){if(h=b.object,k=a.Of(h),null!==k){var s=b.oldValue,t=b.newValue;if(v.isArray(s))for(var u=v.Wa(s),y=0;yl)){var m=l;Jl(k)&&m++;k.Ne(m);Kl(k,m,l)}}}}function ql(a,b){var c=b.uj;if(v.isArray(c)){var d=a.Xl.ja(c);if(null===d)d=[],d.push(b),a.Xl.add(c,d);else{for(c=0;cthis.scale&&(this.scale=a)):v.va(a,"> 0",E,"minScale"))}); v.defineProperty(E,{gh:"maxScale"},function(){return this.qv},function(a){v.We(a,E,"maxScale");var b=this.qv;b!==a&&(0 0",E,"maxScale"))});v.defineProperty(E,{Il:"zoomPoint"},function(){return this.ew},function(a){this.ew.K(a)||(v.A(a,z,E,"zoomPoint"),this.ew=a=a.R())}); v.defineProperty(E,{vD:"contentAlignment"},function(){return this.un},function(a){var b=this.un;b.K(a)||(v.A(a,L,E,"contentAlignment"),this.un=a=a.R(),this.h("contentAlignment",b,a),Ck(this,!1))});v.defineProperty(E,{RJ:"initialContentAlignment"},function(){return this.Pn},function(a){var b=this.Pn;b.K(a)||(v.A(a,L,E,"initialContentAlignment"),this.Pn=a=a.R(),this.h("initialContentAlignment",b,a))}); v.defineProperty(E,{padding:"padding"},function(){return this.Ue},function(a){"number"===typeof a?a=new cb(a):v.A(a,cb,E,"padding");var b=this.Ue;b.K(a)||(this.Ue=a=a.R(),this.qc(),this.h("padding",b,a))});v.u(E,{Ag:"nodes"},function(){return this.ko.i});v.u(E,{links:"links"},function(){return this.bo.i});v.u(E,{dk:"parts"},function(){return this.wb.i}); E.prototype.findTopLevelNodesAndLinks=function(){for(var a=new J(R),b=this.ko.i;b.next();){var c=b.value;c.fp&&a.add(c)}for(b=this.bo.i;b.next();)c=b.value,c.fp&&a.add(c);return a.i};E.prototype.findTopLevelGroups=function(){return this.Vk.i};v.defineProperty(E,{Pb:"layout"},function(){return this.Ud},function(a){var b=this.Ud;b!==a&&(v.A(a,Xf,E,"layout"),null!==b&&(b.g=null,b.group=null),this.Ud=a,a.g=this,a.group=null,this.vu=!0,this.h("layout",b,a),this.ue())}); E.prototype.layoutDiagram=function(a){Ak(this);a&&Pl(this,!0);al(this,!1)};function Pl(a,b){for(var c=a.Vk.i;c.next();)Xl(a,c.value,b);null!==a.Pb&&(b?a.Pb.wf=!1:a.Pb.H())}function Xl(a,b,c){if(null!==b){for(var d=b.ho.i;d.next();)Xl(a,d.value,c);null!==b.Pb&&(c?b.Pb.wf=!1:b.Pb.H())}} function al(a,b){if(!a.Tx){var c=a.Pb,d=a.Ra;a.Ra=!0;try{a.Qb("Layout");var e=a.Na;1!==a.la.rh||e.df||e.pc||e.Ym("Layout");for(var f=a.Vk.i;f.next();)Yl(a,f.value,b);c.wf||b&&!c.lE&&1!==a.la.rh||(c.doLayout(a),Ak(a),c.wf=!0)}finally{a.wd("Layout"),a.vu=!c.wf,a.Ra=d}}}function Yl(a,b,c){if(null!==b){for(var d=b.ho.i;d.next();)Yl(a,d.value,c);d=b.Pb;null===d||d.wf||c&&!d.lE||(b.Cy=!b.location.G(),d.doLayout(b),b.H(Zl),d.wf=!0,dl(a,b))}} v.defineProperty(E,{Pd:"isTreePathToChildren"},function(){return this.iv},function(a){var b=this.iv;if(b!==a&&(v.j(a,"boolean",E,"isTreePathToChildren"),this.iv=a,this.h("isTreePathToChildren",b,a),!this.la.ib))for(a=this.Ag;a.next();)$l(a.value)});E.prototype.findTreeRoots=function(){for(var a=new I(S),b=this.Ag;b.next();){var c=b.value;c.fp&&null===c.Wo()&&a.add(c)}return a.i}; v.defineProperty(E,{zA:"treeCollapsePolicy"},function(){return this.$v},function(a){var b=this.$v;b!==a&&(v.pb(a,E,E,"treeCollapsePolicy"),this.$v=a,this.h("treeCollapsePolicy",b,a))});v.defineProperty(E,{eh:null},function(){return this.MB},function(a){this.MB=a}); function ik(a){function b(a){var b=a.toLowerCase(),h=new I("function");c.add(a,h);c.add(b,h);d.add(a,a);d.add(b,a)}var c=new na("string",I),d=new na("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.Vx=c;a.Ux=d} function qa(a,b){var c=a.Ux.ja(b);return null!==c?c:a.Ux.ja(b.toLowerCase())}function am(a,b){var c=a.Vx.ja(b);if(null!==c)return c;c=a.Vx.ja(b.toLowerCase());if(null!==c)return c;v.k("Unknown DiagramEvent name: "+b);return null}E.prototype.addDiagramListener=E.prototype.Wy=function(a,b){v.j(a,"string",E,"addDiagramListener:name");v.j(b,"function",E,"addDiagramListener:listener");var c=am(this,a);null!==c&&c.add(b)}; E.prototype.removeDiagramListener=E.prototype.FE=function(a,b){v.j(a,"string",E,"removeDiagramListener:name");v.j(b,"function",E,"addDiagramListener:listener");var c=am(this,a);null!==c&&c.remove(b)};E.prototype.raiseDiagramEvent=E.prototype.Ba=function(a,b,c){var d=am(this,a),e=new xf;e.g=this;e.name=qa(this,a);void 0!==b&&(e.uA=b);void 0!==c&&(e.$z=c);a=d.length;if(1===a)d=d.da(0),d(e);else if(0!==a)for(b=d.cc(),c=0;c=d.top&&0>=d.left&&0>=d.right&&0>=d.bottom)return c;var e=a.rb,f=a.scale,e=v.gk(0,0,e.width*f,e.height*f),h=v.Mb(0,0);if(b.x>=e.x&&b.xe.x+e.width-d.right&&(k=Math.max(a.Tt,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.Ut,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.Fc(ad)||(c=new z(c.x+h.x/f,c.y+h.y/f));v.Vb(e);v.v(h);return c}E.prototype.makeSVG=E.prototype.makeSvg=function(a){void 0===a&&(a=new ta);a.context="svg";a=jm(this,a);return null!==a?a.Dl:null}; E.prototype.makeImage=function(a){void 0===a&&(a=new ta);var b=(a.document||document).createElement("img");b.src=this.IH(a);return b};E.prototype.makeImageData=E.prototype.IH=function(a){void 0===a&&(a=new ta);var b=jm(this,a);return null!==b?b.toDataURL(a.type,a.details):""};var km=!1; function jm(a,b){a.Na.Zh();a.Tf();if(null===a.zb)return null;"object"!==typeof b&&v.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 cb(l):l instanceof cb||(l=new cb(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.Hn=!1;Zc(a.lf,!0);var s=new Rc(null,p),t=s.dl,u=s;if(!(d||e||k||h))return s.width=a.Eb+Math.ceil(l.left+l.right),s.height=a.Jb+Math.ceil(l.top+l.bottom),"svg"===b.context&&(t=u=new Cc(s.xd,p,q),t instanceof Cc&& (a.Hn=!0)),kl(a,t,l,new ia(s.width,s.height),a.Tb,a.kb,k,m,r,n),a.Hn=!0,u;var y=a.nb.tw,w=new z(0,0),x=a.Zd.copy();x.GI(a.padding);if(r)for(var A=!0,A=a.Yb.n,H=A.length,C=0;Cy?(e=y,h=x.width,aa=x.height):(h=f.width,aa=f.height)):(h=x.width*e,aa=x.height*e):(e=y,h=x.width,aa=x.height);null!==l?(h+=ba,aa+=A):l=new cb(0);null!==f&&(d=f.width,f=f.height,"svg"!==b.context&&c&&!km&&(h>d||aa>f)&&(v.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. ("+Math.ceil(h)+"x"+Math.ceil(aa)+" vs 2000x2000) Consider increasing the max size."), km=!0),isNaN(d)&&(d=2E3),isNaN(f)&&(f=2E3),isFinite(d)&&(h=Math.min(h,d)),isFinite(f)&&(aa=Math.min(aa,f)));s.width=Math.ceil(h);s.height=Math.ceil(aa);"svg"===b.context&&(t=u=new Cc(s.xd,p,q),t instanceof Cc&&(a.Hn=!0));kl(a,t,l,new ia(Math.ceil(h),Math.ceil(aa)),e,w,k,m,r,n);a.Hn=!0;return u}E.inherit=function(a,b){v.j(a,"function",E,"inherit");v.j(b,"function",E,"inherit");b.RF&&v.k("Cannot inherit from "+v.af(b));v.Ja(a,b)}; function rk(){this.UF="63ad05bbe23a1786468a4c741b6d2";this.cg=this.UF===this._tk?!0:null} rk.prototype.Hl=function(a){a.lf.setTransform(a.rd,0,0,a.rd,0,0);if(null===this.cg)a:{var b="f",c=window[v.tg("76a715b2f73f148a")][v.tg("72ba13b5")];a=v.tg;if(window[a("7da7")]&&window[a("7da7")][a("76a115b6ed251eaf4692")]){this.cg=!0;var d=window[a("7da7")][a("76a115b6ed251eaf4692")],d=a(d).split(a("39e9")),e=a(d[1]).split("."),f=v[a("6cae19")].split(".");if(e[0]>f[0]||e[0]===f[0]&&e[1]>=f[1]){e=c[a("76ad18b4f73e")];for(f=c[a("73a612b6fb191d")](a("35e7"))+2;fc&&a(d[2])!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));0>c&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));this.cg=!(0<=c&&cc&&a(v.adym)!==a("7da71ca0ad381e90")&&(c=b[a("73a612b6fb191d")](a("76a715b2ef3e149757")));if(this.cg=!(0<=c&&cb.timeStamp-a.Zl)b.preventDefault();else if(a.Fk)b.preventDefault();else{a.Sc=a.Nb;a.Nb=c;Ik(a,a,b,c,!0);c.jl=!0;c.Ge=b.detail;if(v.fE||v.gE)b.timeStamp-a.Zlb.timeStamp-a.Zl){b.preventDefault();return}a.Zl=b.timeStamp}if(v.Qm&&null!==a.qs)a.qs=null,b.preventDefault();else{a.Sc=a.Nb;a.Nb=c;Ik(a,a,b,c,!0);c.up=!0; c.Ge=b.detail;if(v.fE||v.gE)c.Ge=a.Ik;c.bubbles=b.bubbles;b.target.W&&(c.Ig=b.target.W);a.aF(b,null,new z,c.Ig)||(a.doMouseUp(),Bh(a),Mk(c,b))}}};a.jh=function(b){if(a.isEnabled){var c=a.Sc;a.Sc=a.Nb;a.Nb=c;Ik(a,a,b,c,!0);c.bubbles=!0;c.hl=void 0!==b.wheelDelta?b.wheelDelta:-40*b.detail;a.doMouseWheel();Mk(c,b)}};a.pp=function(){if(a.isEnabled){a.Ul=!1;var b=a.Xa;b.cancelWaitAfter();b instanceof Qg&&b.hideToolTip()}};a.lF=function(b){if(a.isEnabled){a.ys=!1;a.Fk=!0;var c=a.Sc;a.Sc=a.Nb;a.Nb=c;Kk(a, b,b.targetTouches[0],c,1a.Fv)){var c=a.Jf;c[0].pointerId=== b.pointerId&&(c[0]=b);c[1].pointerId===b.pointerId&&(c[1]=b);a.isEnabled&&(c=a.Sc,a.Sc=a.Nb,a.Nb=c,Lk(a,b,b,c,!0),a.px(b,null,c.Ig)||(a.doMouseMove(),Mk(c,b)))}};a.bI=function(b){if("touch"===b.pointerType){var c=a.tC;void 0!==c[b.pointerId]&&(a.Fv--,delete c[b.pointerId],c=a.Jf,null!==c[0]&&c[0].pointerId===b.pointerId&&(c[0]=null),null!==c[1]&&c[1].pointerId===b.pointerId&&(c[1]=null))}};Zc(d,!0);vk(a)} function lm(a){1a)&&v.va(a,"0 <= loc <= 1",ha,"addColorStop:loc");v.j(b,"string",ha,"addColorStop:color");null===this.Mg&&(this.Mg=new na("number","string"));this.Mg.add(a,b);this.ia===Sf&&(this.type=Tf);this.Ng=null}; v.defineProperty(ha,{type:"type"},function(){return this.ia},function(a){this.D&&v.ka(this,a);v.pb(a,ha,ha,"type");this.ia=a;this.start.se()&&(a===Tf?this.start=tb:a===Yc&&(this.start=zb));this.end.se()&&(a===Tf?this.end=Db:a===Yc&&(this.end=zb));this.Ng=null});v.defineProperty(ha,{color:"color"},function(){return this.rn},function(a){this.D&&v.ka(this,a);this.rn=a;this.Ng=null}); v.defineProperty(ha,{start:"start"},function(){return this.uo},function(a){this.D&&v.ka(this,a);v.A(a,L,ha,"start");this.uo=a.R();this.Ng=null});v.defineProperty(ha,{end:"end"},function(){return this.Jn},function(a){this.D&&v.ka(this,a);v.A(a,L,ha,"end");this.Jn=a.R();this.Ng=null});v.defineProperty(ha,{cu:"startRadius"},function(){return this.Vv},function(a){this.D&&v.ka(this,a);v.We(a,ha,"startRadius");0>a&&v.va(a,">= zero",ha,"startRadius");this.Vv=a;this.Ng=null}); v.defineProperty(ha,{bt:"endRadius"},function(){return this.Ru},function(a){this.D&&v.ka(this,a);v.We(a,ha,"endRadius");0>a&&v.va(a,">= zero",ha,"endRadius");this.Ru=a;this.Ng=null});v.defineProperty(ha,{Ys:"colorStops"},function(){return this.Mg},function(a){this.D&&v.ka(this,a);this.Mg=a;this.Ng=null});v.defineProperty(ha,{pattern:"pattern"},function(){return this.Ev},function(a){this.D&&v.ka(this,a);this.Ev=a;this.Ng=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 sm=(new Rc(null)).dl,ga; ha.isValidColor=ga=function(a){if("black"===a)return!0;if(""===a)return!1;sm.fillStyle="#000000";var b=sm.fillStyle;sm.fillStyle=a;if(sm.fillStyle!==b)return!0;sm.fillStyle="#FFFFFF";b=sm.fillStyle;sm.fillStyle=a;return sm.fillStyle!==b}; function G(){v.dc(this);this.fa=30723;this.Rc=1;this.Wg=null;this.Ob="";this.nc=this.Ib=null;this.kb=(new z(NaN,NaN)).freeze();this.mf=Ed;this.Cj=pd;this.Aj=Cd;this.me=new ja;this.Up=new ja;this.Nk=new ja;this.Tb=this.Ou=1;this.Kl=0;this.Ph=tm;this.kr=cd;this.jd=(new B(NaN,NaN,NaN,NaN)).freeze();this.mc=(new B(NaN,NaN,NaN,NaN)).freeze();this.Qc=(new B(0,0,NaN,NaN)).freeze();this.Bs=this.Eq=this.ga=this.Lr=this.Mr=null;this.Cs=this.Fq=Infinity;this.Tp=this.Ae=fc;this.$r=0;this.Fi=1;this.bq=0;this.hi= 1;this.us=null;this.es=-Infinity;this.ds=0;this.fs=ad;this.gs=Di;this.mq="";this.sc=this.ha=null;this.on=-1;this.jm=this.ps=this.gi=this.vk=this.to=null}v.Uh(G);v.ea("GraphObject",G); G.prototype.cloneProtected=function(a){a.fa=this.fa|6144;a.Rc=this.Rc;a.Ob=this.Ob;a.Ib=this.Ib;a.nc=this.nc;a.kb.assign(this.kb);a.mf=this.mf.R();a.Cj=this.Cj.R();a.Aj=this.Aj.R();a.Nk=this.Nk.copy();a.Tb=this.Tb;a.Kl=this.Kl;a.Ph=this.Ph;a.kr=this.kr.R();a.jd.assign(this.jd);a.mc.assign(this.mc);a.Qc.assign(this.Qc);a.Lr=this.Lr;null!==this.ga&&(a.ga=this.ga.copy());a.Eq=this.Eq;a.Bs=this.Bs;a.Fq=this.Fq;a.Cs=this.Cs;a.Ae=this.Ae.R();a.Tp=this.Tp.R();a.$r=this.$r;a.Fi=this.Fi;a.bq=this.bq;a.hi= this.hi;a.us=this.us;a.es=this.es;a.ds=this.ds;a.fs=this.fs.R();a.gs=this.gs;a.mq=this.mq;null!==this.ha&&(a.ha=this.ha.copy());a.sc=this.sc;a.on=this.on;null!==this.vk&&(a.vk=v.el(this.vk));null!==this.gi&&(a.gi=this.gi.copy());a.ps=this.ps};G.prototype.addCopyProperty=G.prototype.bG=function(a){var b=this.vk;if(v.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.Lc=function(a,b,c,d,e,f,h){var k=this.Y;null!==k&&(k.Zm(a,b,c,d,e,f,h),0!==(this.fa&1024)&&c===this&&a===zf&&Bm(this,k,b))}; function Bm(a,b,c){var d=a.Vo();if(null!==d)for(var e=a.sc.i;e.next();){var f=e.value,h=null;if(null!==f.cn){h=Ag(f,d,a);if(null===h)continue;f.tx(a,h,c,null)}else if(f.yt){var k=b.g;null===k||k.we||f.tx(a,k.ba.bk,c,k)}else{var l=d.data;if(null===l)continue;k=b.g;null===k||k.we||f.tx(a,l,c,k)}null!==h&&(k=d.zw(f.El),null!==k&&f.tF(k,h,c))}}G.prototype.zw=function(a){return this.on===a?this:null};G.prototype.raiseChanged=G.prototype.h=function(a,b,c){this.Lc(zf,a,this,b,c)}; function Cm(a,b,c,d,e){var f=a.jd,h=a.Nk;h.reset();Dm(a,h,b,c,d,e);a.Nk=h;f.x=b;f.y=c;f.width=d;f.height=e;h.vt()||h.pF(f)}function Em(a,b,c,d){if(!1===a.Gg)return!1;d.multiply(a.transform);return c?a.xg(b,d):a.Fm(b,d)} G.prototype.MD=function(a,b,c){if(!1===this.Gg)return!1;var d=this.Ha;b=a.rf(b);var e=!1;c&&(e=Sa(a.x,a.y,0,0,0,d.height)a&&(a+=360));return a}; G.prototype.getDocumentScale=G.prototype.Si=function(){if(0!==(this.fa&4096)===!1)return this.Ou;var a=this.Tb;return null!==this.S?a*this.S.Si():a};G.prototype.getLocalPoint=G.prototype.RD=function(a,b){void 0===b&&(b=new z);b.assign(a);this.Yg.Wh(b);return b};G.prototype.getNearestIntersectionPoint=G.prototype.SD=function(a,b,c){return this.$o(a.x,a.y,b.x,b.y,c)};g=G.prototype; g.$o=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.Am)return f=this.U,ge(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.Ha;c=ge(0,0,d.width,d.height,h,a,b,c,e);e.transform(f);return c}; function ij(a,b,c,d,e){if(!1!==el(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.xa,k=0;a.lb&&(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 D;switch(Fm(a,!0)){case Qi:k=f=0;l&&(c=b=Infinity);break;case He:isFinite(b)&&b>d&&(f=b);isFinite(c)&& c>e&&(k=c);break;case vm:isFinite(b)&&b>d&&(f=b);k=0;l&&(c=Infinity);break;case um:isFinite(c)&&c>e&&(k=c),f=0,l&&(b=Infinity)}var l=a.xf,m=a.ih;f>l.width&&m.widthl.height&&m.heighta.height||this.Kk.Te>a.width))&&(c=!0);this.fa=c?this.fa|256:this.fa&-257;this.mc.G()|| v.k("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.mc.toString());this.Tw(f,this.mc);v.Vb(f)};g.Mi=function(){}; function Gm(a,b,c,d,e){var f=a.U;f.x=b;f.y=c;f.width=d;f.height=e;if(!a.xa.G()){f=a.jd;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=Fm(a,!0);c===d&&f===e&&(b=Qi);switch(b){case Qi:if(c>d||f>e)Qk(a,!0),ij(a,c>d?d:c,f>e?e:f);break;case He:Qk(a,!0);ij(a,d,e,0,0);break;case vm:Qk(a,!0);ij(a,d,f,0,0);break;case um:Qk(a,!0),ij(a,c,e,0,0)}}} g.Tw=function(a,b){Hm(this,!1);var c=this.Y;if(null!==c&&null!==c.g){var d=this.Y;null!==d&&(d.Wt!==this&&d.ME!==this&&d.PE!==this||Im(d,!0));this.pa();a.K(b)||(c.rl(),this.xv(c))}};g.xv=function(a){null!==this.Rd&&Im(a,!0)};v.defineProperty(G,{Gp:"shadowVisible"},function(){return this.ps},function(a){var b=this.ps;b!==a&&(this.ps=a,this.h("shadowVisible",b,a))}); G.prototype.Xe=function(a,b){if(this.visible){var c=this.mc;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 Cc)a:{if(this.visible){var f=null,h=a.Mw;if(this instanceof D&&(this.type===Jm||this.type===Km))Lm(this,a,b);else{var k=this.mc;if(0!==k.width&&0!==k.height&&!isNaN(k.x)&&!isNaN(k.y)){var l=this.transform,m=this.S;0!==(this.fa&4096)===!0&&Mm(this);var c=0!==(this.fa&256),n=!1;this instanceof Zg&&(a.font=this.font);if(c){n=m.Kg()?m.Ha:m.U;if(null!==this.gi)var p=this.gi,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;Ec(a,1,0,0,1,0,0);a.save();a.beginPath();a.rect(q,r,s,p);a.clip()}q=!1;if(this instanceof R){var t=this,q=!0;if(!t.isVisible())break a}a.Qi.ff=[1,0,0,1,0,0];r=!1;q&&this.wl&&b.Ti("drawShadows")&&(s=this.rm, a.rA(s.x*b.scale*b.rd,s.y*b.scale*b.rd,t.ng),a.bn(),a.shadowColor=t.qm);t=!1;this.Y&&b.Ti("drawShadows")&&(t=this.Y.wl);!0===this.Gp?(a.bn(),!1===r&&t&&(Ec(a,1,0,0,1,0,0),a.Za(),r=!0)):!1===this.Gp&&a.an();null!==this.nc&&(Nm(this,a,this.nc,!0,!0),!1===r&&t&&(Ec(a,1,0,0,1,0,0),a.Za(),r=!0),this.nc instanceof ha&&this.nc.type===Yc?(a.beginPath(),a.rect(k.x,k.y,k.width,k.height),a.ug(this.nc)):a.fillRect(k.x,k.y,k.width,k.height));this instanceof D?Ec(a,l.m11,l.m12,l.m21,l.m22,l.dx,l.dy):a.Qi.ff=[l.m11, l.m12,l.m21,l.m22,l.dx,l.dy];if(null!==this.Ib){!1===r&&t&&(Ec(a,1,0,0,1,0,0),a.Za(),r=!0);var p=this.Ha,l=k=0,s=p.width,p=p.height,u=0;this instanceof Y&&(p=this.Sa.mb,k=p.x,l=p.y,s=p.width,p=p.height,u=this.Qh);Nm(this,a,this.Ib,!0,!1);this.Ib instanceof ha&&this.Ib.type===Yc?(a.beginPath(),a.rect(k-u/2,l-u/2,s+u,p+u),a.ug(this.Ib)):a.fillRect(k-u/2,l-u/2,s+u,p+u)}t&&(null!==this.Ib||null!==this.nc||null!==m&&0!==(m.fa&512)||null!==m&&(m.type===uk||m.type===Oi)&&m.Ye()!==this)?(Om(this,!0),null=== this.Gp&&a.an()):Om(this,!1);this.Xj(a,b);t&&0!==(this.fa&512)===!0&&a.bn();q&&t&&a.an();c&&(a.restore(),n&&a.tf.pop());this instanceof D&&(f=a.tf.pop());!0===r&&a.tf.pop();null!==a.GD&&(null===f&&(h===a.Mw?(Ec(a,1,0,0,1,0,0),f=a.tf.pop()):f=a.Mw),a.GD(this,f))}}}}else{if(this instanceof D&&(this.type===Jm||this.type===Km)){Lm(this,a,b);1!==d&&(a.globalAlpha=e);return}this instanceof W&&this.Um(!1);f=this.transform;h=this.S;0!==(this.fa&4096)===!0&&Mm(this);m=0!==(this.fa&256);this instanceof Zg&& (a.font=this.font);if(m){n=h.Kg()?h.Ha:h.U;null!==this.gi?(t=this.gi,k=t.x,l=t.y,q=t.width,t=t.height):(k=Math.max(c.x,n.x),l=Math.max(c.y,n.y),q=Math.min(c.right,n.right)-k,t=Math.min(c.bottom,n.bottom)-l);if(k>c.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,q,t);a.clip()}n=!1;if(this instanceof R){n=!0;if(!this.isVisible()){1!==d&&(a.globalAlpha=e);return}this.wl&&b.Ti("drawShadows")&&(k=this.rm,a.rA(k.x*b.scale*b.rd, k.y*b.scale*b.rd,this.ng),a.bn(),a.shadowColor=this.qm)}k=!1;this.Y&&b.Ti("drawShadows")&&(k=this.Y.wl);!0===this.Gp?a.bn():!1===this.Gp&&a.an();null!==this.nc&&(Nm(this,a,this.nc,!0,!0),this.nc instanceof ha&&this.nc.type===Yc?(a.beginPath(),a.rect(c.x,c.y,c.width,c.height),a.ug(this.nc)):a.fillRect(c.x,c.y,c.width,c.height));f.vt()||a.transform(f.m11,f.m12,f.m21,f.m22,f.dx,f.dy);null!==this.Ib&&(t=this.Ha,l=c=0,q=t.width,t=t.height,r=0,this instanceof Y&&(t=this.Sa.mb,c=t.x,l=t.y,q=t.width,t=t.height, r=this.Qh),Nm(this,a,this.Ib,!0,!1),this.Ib instanceof ha&&this.Ib.type===Yc?(a.beginPath(),a.rect(c-r/2,l-r/2,q+r,t+r),a.ug(this.Ib)):a.fillRect(c-r/2,l-r/2,q+r,t+r));k&&(null!==this.Ib||null!==this.nc||null!==h&&0!==(h.fa&512)||null!==h&&(h.type===uk||h.type===Oi)&&h.Ye()!==this)?(Om(this,!0),null===this.Gp&&a.an()):Om(this,!1);this.Xj(a,b);k&&0!==(this.fa&512)===!0&&a.bn();n&&k&&a.an();m?(a.restore(),this instanceof D?Zc(a,!0):Zc(a,!1)):f.vt()||(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 Lm(a,b,c){var d=a.mc;0===d.width||0===d.height||isNaN(d.x)||isNaN(d.y)||(null!==a.nc&&(Nm(a,b,a.nc,!0,!0),a.nc instanceof ha&&a.nc.type===Yc?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ug(a.nc)):b.fillRect(d.x,d.y,d.width,d.height)),null!==a.Ib&&(Nm(a,b,a.Ib,!0,!1),a.Ib instanceof ha&&a.Ib.type===Yc?(b.beginPath(),b.rect(d.x,d.y,d.width,d.height),b.ug(a.Ib)):b.fillRect(d.x,d.y,d.width,d.height)),a.Xj(b,c))}G.prototype.Xj=function(){}; function Nm(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===Sf)d?b.fillStyle=c.color:b.strokeStyle=c.color;else{var k,h=a.Ha,f=h.width,h=h.height;if(e)var l=a.U,f=l.width,h=l.height;var m=b instanceof Sc;if(m&&c.Ng&&(c.type===rm||c.tn===f&&c.Ox===h))k=c.Ng;else{var n=l=0,p=0,q=0,r=0,s=0,s=r=0;e&&(l=a.U,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===Tf)k=b.createLinearGradient(l,n,p,q);else if(c.type===Yc)s=isNaN(c.bt)?Math.max(f,h)/2:c.bt,isNaN(c.cu)?(r=0,s=Math.max(f,h)/2):r=c.cu,k=b.createRadialGradient(l,n,r,p,q,s);else if(c.type===rm)try{k=b.createPattern(c.pattern,"repeat")}catch(t){k=null}else v.Cd(c.type,"Brush type");if(c.type!==rm&&(e=c.Ys,null!==e))for(e=e.i;e.next();)k.addColorStop(e.key,e.value);if(m&&(c.Ng=k,null!==k&&(c.tn=f,c.Ox=h),null===k&&c.type===rm&&-1!==c.tn)){c.tn=-1;var u=a.g;null!==u&& -1===c.tn&&v.setTimeout(function(){u.$w()},600)}}d?b.fillStyle=k:b.strokeStyle=k}}}G.prototype.isContainedBy=G.prototype.ul=function(a){if(a instanceof D)a:{if(this!==a&&null!==a)for(var b=this.S;null!==b;){if(b===a){a=!0;break a}b=b.S}a=!1}else a=!1;return a};G.prototype.isVisibleObject=G.prototype.Yi=function(){if(!this.visible)return!1;var a=this.S;return null!==a?a.Yi():!0}; function Mm(a){if(0!==(a.fa&2048)===!0){var b=a.me;b.reset();if(!a.mc.G()||!a.jd.G()){Pm(a,!1);return}b.translate(a.mc.x,a.mc.y);b.translate(-a.Ca.x,-a.Ca.y);var c=a.Ha;Dm(a,b,c.x,c.y,c.width,c.height);Pm(a,!1);Qm(a,!0)}0!==(a.fa&4096)===!0&&(b=a.S,null===b?(a.Up.set(a.me),a.Ou=a.scale,Qm(a,!1)):null!==b.Yg&&(c=a.Up,c.reset(),b.Kg()?c.multiply(b.Up):null!==b.S&&c.multiply(b.S.Up),c.multiply(a.me),a.Ou=a.scale*b.Ou,Qm(a,!1)))} function Dm(a,b,c,d,e,f){1!==a.scale&&b.scale(a.scale);if(0!==a.angle){var h=zb;a.ef&&a.ef.bd()&&(h=a.ef);var k=v.L();if(a instanceof R&&a.bc!==a)for(c=a.bc,d=c.Ha,k.$t(d.x,d.y,d.width,d.height,h),c.Nk.ub(k),k.offset(-c.Ca.x,-c.Ca.y),h=c.S;null!==h&&h!==a;)h.Nk.ub(k),k.offset(-h.Ca.x,-h.Ca.y),h=h.S;else k.$t(c,d,e,f,h);b.rotate(a.angle,k.x,k.y);v.v(k)}}g=G.prototype; g.P=function(a){void 0===a&&(a=!1);if(!0!==el(this)){Qk(this,!0);Hm(this,!0);var b=this.S;null!==b?a||b.P():(a=this.g,null!==a&&(a.eg.add(this),this instanceof S&&(a.la.ib||this.cf(),null!==this.ee&&Rm(this.ee)),a.ue(!0)));if(this instanceof D){if(this.ia===uk||this.ia===Ai)a=this.Ye(),null!==a&&a.P(!0);a=this.za.n;for(var b=a.length,c=0;ca?a=0:1a||1=a&&v.k("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Tb=a,this.ri(),this.P(),this.h("scale",b,a))});v.defineProperty(G,{angle:"angle"},function(){return this.Kl},function(a){var b=this.Kl;b!==a&&(a%=360,0>a&&(a+=360),b!==a&&(this.Kl=a,this.P(),this.ri(),this.h("angle",b,a)))}); v.defineProperty(G,{xa:"desiredSize"},function(){return this.mf},function(a){var b=this.mf;b.K(a)||(this.mf=a=a.R(),this.P(),this instanceof Y&&this.re(),this.h("desiredSize",b,a),a=this.Y,null!==a&&0!==(this.fa&1024)&&(Bm(this,a,"width"),Bm(this,a,"height")))}); v.defineProperty(G,{width:"width"},function(){return this.mf.width},function(a){if(this.mf.width!==a){var b=this.mf;this.mf=a=(new ia(a,this.mf.height)).freeze();this.P();this instanceof Y&&this.re();this.h("desiredSize",b,a);b=this.Y;null!==b&&0!==(this.fa&1024)&&Bm(this,b,"width")}}); v.defineProperty(G,{height:"height"},function(){return this.mf.height},function(a){if(this.mf.height!==a){var b=this.mf;this.mf=a=(new ia(this.mf.width,a)).freeze();this.P();this instanceof Y&&this.re();this.h("desiredSize",b,a);b=this.Y;null!==b&&0!==(this.fa&1024)&&Bm(this,b,"height")}}); v.defineProperty(G,{ih:"minSize"},function(){return this.Cj},function(a){var b=this.Cj;b.K(a)||(a=a.copy(),isNaN(a.width)&&(a.width=0),isNaN(a.height)&&(a.height=0),a.freeze(),this.Cj=a,this.P(),this.h("minSize",b,a))});v.defineProperty(G,{xf:"maxSize"},function(){return this.Aj},function(a){var b=this.Aj;b.K(a)||(a=a.copy(),isNaN(a.width)&&(a.width=Infinity),isNaN(a.height)&&(a.height=Infinity),a.freeze(),this.Aj=a,this.P(),this.h("maxSize",b,a))});v.u(G,{Ca:"measuredBounds"},function(){return this.jd}); v.u(G,{Ha:"naturalBounds"},function(){return this.Qc},{configurable:!0});v.defineProperty(G,{margin:"margin"},function(){return this.kr},function(a){"number"===typeof a&&(a=new cb(a));var b=this.kr;b.K(a)||(this.kr=a=a.R(),this.P(),this.h("margin",b,a))});v.u(G,{transform:null},function(){0!==(this.fa&2048)===!0&&Mm(this);return this.me});v.u(G,{Yg:null},function(){0!==(this.fa&4096)===!0&&Mm(this);return this.Up}); v.defineProperty(G,{alignment:"alignment"},function(){return this.Ae},function(a){var b=this.Ae;b.K(a)||(a.se()&&!a.Uc()&&v.k("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Ae=a=a.R(),Rm(this),this.h("alignment",b,a))});v.defineProperty(G,{column:"column"},function(){return this.bq},function(a){a=Math.round(a);var b=this.bq;b!==a&&(0>a&&v.va(a,">= 0",G,"column"),this.bq=a,this.P(),this.h("column",b,a))}); v.defineProperty(G,{tG:"columnSpan"},function(){return this.hi},function(a){a=Math.round(a);var b=this.hi;b!==a&&(1>a&&v.va(a,">= 1",G,"columnSpan"),this.hi=a,this.P(),this.h("columnSpan",b,a))});v.defineProperty(G,{Wb:"row"},function(){return this.$r},function(a){a=Math.round(a);var b=this.$r;b!==a&&(0>a&&v.va(a,">= 0",G,"row"),this.$r=a,this.P(),this.h("row",b,a))}); v.defineProperty(G,{rowSpan:"rowSpan"},function(){return this.Fi},function(a){a=Math.round(a);var b=this.Fi;b!==a&&(1>a&&v.va(a,">= 1",G,"rowSpan"),this.Fi=a,this.P(),this.h("rowSpan",b,a))});v.defineProperty(G,{qx:"spanAllocation"},function(){return this.us},function(a){var b=this.us;b!==a&&(null!==a&&v.j(a,"function",G,"spanAllocation"),this.us=a,this.h("spanAllocation",b,a))}); v.defineProperty(G,{Tj:"alignmentFocus"},function(){return this.Tp},function(a){var b=this.Tp;b.K(a)||(!a.se()||a.Uc()||a.K(rb)&&this instanceof S||v.k("GraphObject.alignmentFocus must be a real Spot or Spot.Default, not: "+a),this.Tp=a=a.R(),this.P(),this.h("alignmentFocus",b,a))}); v.defineProperty(G,{Rd:"portId"},function(){return this.Lr},function(a){var b=this.Lr;if(b!==a){var c=this.Y;null===c||c instanceof S||(v.k("Cannot set portID on a Link: "+a),c=null);null!==b&&null!==c&&Ym(c,this);this.Lr=a;if(null!==a&&c){c.Ah=!0;null===c.Wd&&Zm(c);var d=this.Rd;null!==d&&c.Wd.add(d,this)}this.h("portId",b,a)}});function Vm(a){var b=a.Y;b instanceof S&&(a=a.g,null===a||a.la.ib||b.cf())} v.defineProperty(G,{yb:"toSpot"},function(){return null!==this.ga?this.ga.Qj:rb},function(a){this.Me();var b=this.ga.Qj;b.K(a)||(a=a.R(),this.ga.Qj=a,this.h("toSpot",b,a),Vm(this))});v.defineProperty(G,{Gl:"toEndSegmentLength"},function(){return null!==this.ga?this.ga.Oj:10},function(a){this.Me();var b=this.ga.Oj;b!==a&&(0>a&&v.va(a,">= 0",G,"toEndSegmentLength"),this.ga.Oj=a,this.h("toEndSegmentLength",b,a),Vm(this))}); v.defineProperty(G,{eu:"toEndSegmentDirection"},function(){return null!==this.ga?this.ga.Nj:zm},function(a){this.Me();var b=this.ga.Nj;b!==a&&(this.ga.Nj=a,this.h("toEndSegmentDirection",b,a),Vm(this))});v.defineProperty(G,{fu:"toShortLength"},function(){return null!==this.ga?this.ga.Pj:0},function(a){this.Me();var b=this.ga.Pj;b!==a&&(this.ga.Pj=a,this.h("toShortLength",b,a),Vm(this))}); v.defineProperty(G,{gF:"toLinkable"},function(){return this.Bs},function(a){var b=this.Bs;b!==a&&(this.Bs=a,this.h("toLinkable",b,a))});v.defineProperty(G,{MI:"toMaxLinks"},function(){return this.Cs},function(a){var b=this.Cs;b!==a&&(0>a&&v.va(a,">= 0",G,"toMaxLinks"),this.Cs=a,this.h("toMaxLinks",b,a))});v.defineProperty(G,{xb:"fromSpot"},function(){return null!==this.ga?this.ga.pj:rb},function(a){this.Me();var b=this.ga.pj;b.K(a)||(a=a.R(),this.ga.pj=a,this.h("fromSpot",b,a),Vm(this))}); v.defineProperty(G,{ml:"fromEndSegmentLength"},function(){return null!==this.ga?this.ga.nj:10},function(a){this.Me();var b=this.ga.nj;b!==a&&(0>a&&v.va(a,">= 0",G,"fromEndSegmentLength"),this.ga.nj=a,this.h("fromEndSegmentLength",b,a),Vm(this))});v.defineProperty(G,{kt:"fromEndSegmentDirection"},function(){return null!==this.ga?this.ga.mj:zm},function(a){this.Me();var b=this.ga.mj;b!==a&&(this.ga.mj=a,this.h("fromEndSegmentDirection",b,a),Vm(this))}); v.defineProperty(G,{lt:"fromShortLength"},function(){return null!==this.ga?this.ga.oj:0},function(a){this.Me();var b=this.ga.oj;b!==a&&(this.ga.oj=a,this.h("fromShortLength",b,a),Vm(this))});v.defineProperty(G,{PD:"fromLinkable"},function(){return this.Eq},function(a){var b=this.Eq;b!==a&&(this.Eq=a,this.h("fromLinkable",b,a))}); v.defineProperty(G,{vz:"fromMaxLinks"},function(){return this.Fq},function(a){var b=this.Fq;b!==a&&(0>a&&v.va(a,">= 0",G,"fromMaxLinks"),this.Fq=a,this.h("fromMaxLinks",b,a))});v.defineProperty(G,{cursor:"cursor"},function(){return this.mq},function(a){var b=this.mq;b!==a&&(v.j(a,"string",G,"cursor"),this.mq=a,this.h("cursor",b,a))}); v.defineProperty(G,{click:"click"},function(){return null!==this.ha?this.ha.fi:null},function(a){wm(this);var b=this.ha.fi;b!==a&&(null!==a&&v.j(a,"function",G,"click"),this.ha.fi=a,this.h("click",b,a))});v.defineProperty(G,{at:"doubleClick"},function(){return null!==this.ha?this.ha.oi:null},function(a){wm(this);var b=this.ha.oi;b!==a&&(null!==a&&v.j(a,"function",G,"doubleClick"),this.ha.oi=a,this.h("doubleClick",b,a))}); v.defineProperty(G,{ez:"contextClick"},function(){return null!==this.ha?this.ha.ii:null},function(a){wm(this);var b=this.ha.ii;b!==a&&(null!==a&&v.j(a,"function",G,"contextClick"),this.ha.ii=a,this.h("contextClick",b,a))});v.defineProperty(G,{Gt:"mouseEnter"},function(){return null!==this.ha?this.ha.wr:null},function(a){wm(this);var b=this.ha.wr;b!==a&&(null!==a&&v.j(a,"function",G,"mouseEnter"),this.ha.wr=a,this.h("mouseEnter",b,a))}); v.defineProperty(G,{Ht:"mouseLeave"},function(){return null!==this.ha?this.ha.xr:null},function(a){wm(this);var b=this.ha.xr;b!==a&&(null!==a&&v.j(a,"function",G,"mouseLeave"),this.ha.xr=a,this.h("mouseLeave",b,a))});v.defineProperty(G,{Tz:"mouseOver"},function(){return null!==this.ha?this.ha.Bi:null},function(a){wm(this);var b=this.ha.Bi;b!==a&&(null!==a&&v.j(a,"function",G,"mouseOver"),this.ha.Bi=a,this.h("mouseOver",b,a))}); v.defineProperty(G,{Sz:"mouseHover"},function(){return null!==this.ha?this.ha.Ai:null},function(a){wm(this);var b=this.ha.Ai;b!==a&&(null!==a&&v.j(a,"function",G,"mouseHover"),this.ha.Ai=a,this.h("mouseHover",b,a))});v.defineProperty(G,{Rz:"mouseHold"},function(){return null!==this.ha?this.ha.zi:null},function(a){wm(this);var b=this.ha.zi;b!==a&&(null!==a&&v.j(a,"function",G,"mouseHold"),this.ha.zi=a,this.h("mouseHold",b,a))}); v.defineProperty(G,{TH:"mouseDragEnter"},function(){return null!==this.ha?this.ha.ur:null},function(a){wm(this);var b=this.ha.ur;b!==a&&(null!==a&&v.j(a,"function",G,"mouseDragEnter"),this.ha.ur=a,this.h("mouseDragEnter",b,a))});v.defineProperty(G,{UH:"mouseDragLeave"},function(){return null!==this.ha?this.ha.vr:null},function(a){wm(this);var b=this.ha.vr;b!==a&&(null!==a&&v.j(a,"function",G,"mouseDragLeave"),this.ha.vr=a,this.h("mouseDragLeave",b,a))}); v.defineProperty(G,{Qz:"mouseDrop"},function(){return null!==this.ha?this.ha.yi:null},function(a){wm(this);var b=this.ha.yi;b!==a&&(null!==a&&v.j(a,"function",G,"mouseDrop"),this.ha.yi=a,this.h("mouseDrop",b,a))});v.defineProperty(G,{aD:"actionDown"},function(){return null!==this.ha?this.ha.Np:null},function(a){wm(this);var b=this.ha.Np;b!==a&&(null!==a&&v.j(a,"function",G,"actionDown"),this.ha.Np=a,this.h("actionDown",b,a))}); v.defineProperty(G,{bD:"actionMove"},function(){return null!==this.ha?this.ha.Op:null},function(a){wm(this);var b=this.ha.Op;b!==a&&(null!==a&&v.j(a,"function",G,"actionMove"),this.ha.Op=a,this.h("actionMove",b,a))});v.defineProperty(G,{cD:"actionUp"},function(){return null!==this.ha?this.ha.Pp:null},function(a){wm(this);var b=this.ha.Pp;b!==a&&(null!==a&&v.j(a,"function",G,"actionUp"),this.ha.Pp=a,this.h("actionUp",b,a))}); v.defineProperty(G,{$C:"actionCancel"},function(){return null!==this.ha?this.ha.Mp:null},function(a){wm(this);var b=this.ha.Mp;b!==a&&(null!==a&&v.j(a,"function",G,"actionCancel"),this.ha.Mp=a,this.h("actionCancel",b,a))});v.defineProperty(G,{yA:"toolTip"},function(){return null!==this.ha?this.ha.Ii:null},function(a){wm(this);var b=this.ha.Ii;b!==a&&(null!==a&&v.A(a,Sg,G,"toolTip"),this.ha.Ii=a,this.h("toolTip",b,a))}); v.defineProperty(G,{contextMenu:"contextMenu"},function(){return null!==this.ha?this.ha.ji:null},function(a){wm(this);var b=this.ha.ji;b!==a&&(null!==a&&v.A(a,Sg,G,"contextMenu"),this.ha.ji=a,this.h("contextMenu",b,a))});G.prototype.bind=G.prototype.bind=function(a){a.og=this;var b=this.Vo();null!==b&&$m(b)&&v.k("Cannot add a Binding to a template that has already been copied: "+a);null===this.sc&&(this.sc=new I(xg));this.sc.add(a)}; G.prototype.findTemplateBinder=G.prototype.Vo=function(){for(var a=this instanceof D?this:this.S;null!==a;){if(null!==a.tk)return a;a=a.S}return null};G.prototype.setProperties=function(a){v.Xt(this,a)};var an; G.make=an=function(a,b){var c=arguments,d=null,e=null;if("function"===typeof a)e=a;else if("string"===typeof a){var f=bn.ja(a);"function"===typeof f?(c=v.el(arguments),d=f(c)):e=ea[a]}null===d&&(void 0===e&&(d=window.$,void 0!==d&&void 0!==d.noop&&v.k("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"),v.k("GraphObject.make failed to complete, it may be conflicting with another var.")),null!==e&&e.constructor||v.k("GraphObject.make requires a class function or class name, not: "+ a),d=new e);f=1;if(d instanceof E&&1e)&&v.k("Must specify non-negative integer row for RowColumnDefinition "+b+", not: "+e),a.ce=!0,a.index=e):void 0!==b.column&&(e=b.column,(void 0===e||null===e||Infinity===e||isNaN(e)||0>e)&&v.k("Must specify non-negative integer column for RowColumnDefinition "+b+", not: "+e),a.ce=!1,a.index=e);e=new ta;for(c in b)"row"!==c&&"column"!==c&&(e[c]=b[c]);v.Xt(a,e)}else v.Xt(a,b);else v.k('Unknown initializer "'+b+'" for object being constructed by GraphObject.make: '+a)} var bn=new na("string","function");G.getBuilders=function(){var a=new na("string","function"),b;for(b in bn)if(b!==b.toLowerCase()){var c=bn[b];"function"===typeof c&&a.add(b,c)}a.freeze();return a};var Mn;G.defineBuilder=Mn=function(a,b){v.j(a,"string",G,"defineBuilder:name");v.j(b,"function",G,"defineBuilder:func");var c=a.toLowerCase();""!==a&&"none"!==c&&a!==c||v.k("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: "+a);bn.add(a,b)};var Nn; G.takeBuilderArgument=Nn=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}; Mn("Button",function(){var a=new ha(Tf);a.addColorStop(0,"white");a.addColorStop(1,"lightgray");var b=new ha(Tf);b.addColorStop(0,"white");b.addColorStop(1,"dodgerblue");a=an(D,uk,{Fw:!0},{_buttonFillNormal:a,_buttonStrokeNormal:"gray",_buttonFillOver:b,_buttonStrokeOver:"blue"},an(Y,{name:"ButtonBorder",Ab:"Rectangle",B:new L(0,0,2.761423749153968,2.761423749153968),C:new L(1,1,-2.761423749153968,-2.761423749153968),fill:a,stroke:"gray"}));a.Gt=function(a,b){var e=b.be("ButtonBorder");if(e instanceof Y){var f=b._buttonFillOver;b._buttonFillNormal=e.fill;e.fill=f;f=b._buttonStrokeOver;b._buttonStrokeNormal=e.stroke;e.stroke=f}};a.Ht=function(a,b){var e=b.be("ButtonBorder");e instanceof Y&&(e.fill=b._buttonFillNormal,e.stroke=b._buttonStrokeNormal)};return a}); Mn("TreeExpanderButton",function(){var a=an("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},an(Y,{name:"ButtonIcon",Ab:"MinusLine",xa:rd},(new xg("figure","isTreeExpanded",function(a,c){var d=c.S;return a?d._treeExpandedFigure:d._treeCollapsedFigure})).Sw()),{visible:!1},(new xg("visible","isTreeLeaf",function(a){return!a})).Sw());a.click=function(a,c){var d=c.Y;d instanceof Sg&&(d=d.Lf);if(d instanceof S){var e=d.g;if(null!==e){e=e.nb;if(d.md){if(!e.canCollapseTree(d))return}else if(!e.canExpandTree(d))return; a.zc=!0;d.md?e.collapseTree(d):e.expandTree(d)}}};return a}); Mn("SubGraphExpanderButton",function(){var a=an("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},an(Y,{name:"ButtonIcon",Ab:"MinusLine",xa:rd},(new xg("figure","isSubGraphExpanded",function(a,c){var d=c.S;return a?d._subGraphExpandedFigure:d._subGraphCollapsedFigure})).Sw()));a.click=function(a,c){var d=c.Y;d instanceof Sg&&(d=d.Lf);if(d instanceof V){var e=d.g;if(null!==e){e=e.nb;if(d.de){if(!e.canCollapseSubGraph(d))return}else if(!e.canExpandSubGraph(d))return;a.zc= !0;d.de?e.collapseSubGraph(d):e.expandSubGraph(d)}}};return a});Mn("ContextMenuButton",function(){var a=an("Button");a.stretch=vm;var b=a.be("ButtonBorder");b instanceof Y&&(b.Ab="Rectangle",b.B=new L(0,0,2,3),b.C=new L(1,1,-2,-2));return a}); Mn("PanelExpanderButton",function(a){var b=Nn(a,"COLLAPSIBLE");a=an("Button",an(Y,"TriangleUp",{xa:new ia(6,4)},(new xg("figure","visible",function(a){return a?"TriangleUp":"TriangleDown"})).Sw(b)));var c=a.be("ButtonBorder");c instanceof Y&&(c.stroke=null,c.fill="transparent");a.click=function(a,c){var f=c.g;if(null!==f&&!f.bb){var h=c.Y.be(b);null!==h&&(f.Qb("Collapse/Expand Panel"),h.visible=!h.visible,f.wd("Collapse/Expand Panel"))}};return a}); Mn("CheckBoxButton",function(a){var b=Nn(a);a=an("Button",{"ButtonBorder.fill":"white","ButtonBorder.stroke":"gray",width:14,height:14},an(Y,{name:"ButtonIcon",WG:"M0 4 L3 9 9 0",lb:2,stretch:He,wz:Si,visible:!1},""!==b?(new xg("visible",b)).JH():[]));a.click=function(a,d){if(!(a.g.bb||""!==b&&a.g.ba.bb)){a.zc=!0;var e=d.be("ButtonIcon");e.g.Qb("checkbox");e.visible=!e.visible;"function"===typeof d._doClick&&d._doClick(a,d);e.g.wd("checkbox")}};return a}); Mn("CheckBox",function(a){a=Nn(a);a=an("CheckBoxButton",a,{name:"Button",margin:new cb(0,1,0,0)});var b=an(D,"Horizontal",a,{Fw:!0,margin:1,_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,Gt:a.Gt,Ht:a.Ht,click:a.click,_buttonClick:a.click});a.Gt=null;a.Ht=null;a.click=null;return b}); function xm(){this.ji=this.Ii=this.Mp=this.Pp=this.Op=this.Np=this.yi=this.vr=this.ur=this.zi=this.Ai=this.Bi=this.xr=this.wr=this.ii=this.oi=this.fi=null}xm.prototype.copy=function(){var a=new xm;a.fi=this.fi;a.oi=this.oi;a.ii=this.ii;a.wr=this.wr;a.xr=this.xr;a.Bi=this.Bi;a.Ai=this.Ai;a.zi=this.zi;a.ur=this.ur;a.vr=this.vr;a.yi=this.yi;a.Np=this.Np;a.Op=this.Op;a.Pp=this.Pp;a.Mp=this.Mp;a.Ii=this.Ii;a.ji=this.ji;return a}; function D(a){G.call(this);void 0===a?0===arguments.length?this.ia=Vi:v.k("invalid argument to Panel constructor: undefined"):(v.pb(a,D,D,"type"),this.ia=a);this.za=new I(G);this.Ue=cd;this.Pg=!1;this.ia===xk&&(this.Pg=!0);this.Oq=!1;this.qq=fc;this.mi=tm;this.ia===Sm&&On(this);this.Go=Si;this.Jq=td;this.Kq=ad;this.tk=this.ie=null;this.br=NaN;this.gg=this.uj=null;this.Xn="category";this.fg=null;this.Ki=new B(NaN,NaN,NaN,NaN);this.tm=null;this.Ah=!1;this.as=null}v.Ja(D,G);v.Uh(D);v.ea("Panel",D); function On(a){a.jj=cd;a.xh=1;a.li=null;a.Rl=null;a.wh=1;a.vh=null;a.Ql=null;a.Hd=[];a.Dd=[];a.om=Pn;a.Pl=Pn;a.Ji=0;a.vi=0} D.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.ia=this.ia;a.Ue=this.Ue.R();a.Pg=this.Pg;a.Oq=this.Oq;a.qq=this.qq.R();a.mi=this.mi;if(a.ia===Sm){a.jj=this.jj.R();a.xh=this.xh;a.li=this.li;a.Rl=this.Rl;a.wh=this.wh;a.vh=this.vh;a.Ql=this.Ql;var b=[];if(0a&&v.va(a,">= 0",D,"padding"),a=new cb(a)):(v.A(a,cb,D,"padding"),0>a.left&&v.va(a.left,">= 0",D,"padding:value.left"),0>a.right&&v.va(a.right,">= 0",D,"padding:value.right"),0>a.top&&v.va(a.top,">= 0",D,"padding:value.top"),0>a.bottom&&v.va(a.bottom,">= 0",D,"padding:value.bottom"));var b=this.Ue;b.K(a)||(this.Ue=a=a.R(),this.P(),this.h("padding",b,a))}); v.defineProperty(D,{gl:"defaultAlignment"},function(){return this.qq},function(a){var b=this.qq;b.K(a)||(this.qq=a=a.R(),this.P(),this.h("defaultAlignment",b,a))});v.defineProperty(D,{Jd:"defaultStretch"},function(){return this.mi},function(a){var b=this.mi;b!==a&&(v.pb(a,G,D,"defaultStretch"),this.mi=a,this.P(),this.h("defaultStretch",b,a))}); v.defineProperty(D,{IJ:"defaultSeparatorPadding"},function(){return void 0===this.jj?cd:this.jj},function(a){if(void 0!==this.jj){"number"===typeof a&&(a=new cb(a));var b=this.jj;b.K(a)||(this.jj=a=a.R(),this.h("defaultSeparatorPadding",b,a))}}); v.defineProperty(D,{GJ:"defaultRowSeparatorStroke"},function(){return void 0===this.li?null:this.li},function(a){var b=this.li;b!==a&&(null===a||"string"===typeof a||a instanceof ha)&&(a instanceof ha&&a.freeze(),this.li=a,this.h("defaultRowSeparatorStroke",b,a))});v.defineProperty(D,{HJ:"defaultRowSeparatorStrokeWidth"},function(){return void 0===this.xh?1:this.xh},function(a){if(void 0!==this.xh){var b=this.xh;b!==a&&isFinite(a)&&0<=a&&(this.xh=a,this.h("defaultRowSeparatorStrokeWidth",b,a))}}); v.defineProperty(D,{FJ:"defaultRowSeparatorDashArray"},function(){return void 0===this.Rl?null:this.Rl},function(a){if(void 0!==this.Rl){var b=this.Rl;if(b!==a){null===a||Array.isArray(a)||v.Cd(a,"Array",D,"defaultRowSeparatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;e=c&&(c=1);var d=this.Ew,e=d.width,d=d.height,f=this.Ha,h=f.width,f=f.height,k=Math.ceil(h/e),l=Math.ceil(f/d),m=this.UD;a.save();a.beginPath();a.rect(0,0,h,f);a.clip();for(var n=[],p=this.za.n,q=p.length,r=0;r e*t*c))){var s=n[r],u=!1,x=!0,A=w.eF;null!==A&&(u=!0,x=a.pz(A,w.ke));if("LineV"===w.Ab){a.lineWidth=w.lb;Nm(this,a,w.stroke,!1,!1);a.beginPath();for(var H=y=Math.floor(-m.x/e);H<=y+k;H++){var C=H*e+m.x;0<=C&&Cf.height)continue}else if(l.position>f.width)continue;var m=l.Ep;isNaN(m)&&(m=c?a.xh:a.wh);var n=l.Dp;null===n&&(n=c?a.li:a.vh);if(0!==m&&null!==n){Nm(a,b,n,!1,!1);var n=!1,p=!0,q=l.xI;null!==q&&(n=!0,void 0!==b.setLineDash?(b.setLineDash(q),b.lineDashOffset=a.ke):void 0!==b.webkitLineDash?(b.webkitLineDash=q,b.webkitLineDashOffset=a.ke):void 0!==b.mozDash? (b.mozDash=q,b.mozDashOffset=a.ke):p=!1);b.beginPath();var r=l.position+m;c?r>f.height&&(m-=r-f.height):r>f.width&&(m-=r-f.width);l=l.position+m/2;b.lineWidth=m;r=a.padding;c?(l+=r.top,m=r.left,r=f.width-r.right,n&&!p?Am(b,m,l,r,l,q,0):(b.moveTo(m,l),b.lineTo(r,l))):(l+=r.left,m=r.top,r=f.height-r.bottom,n&&!p?Am(b,l,m,l,r,q,0):(b.moveTo(l,m),b.lineTo(l,r)));b.stroke();n&&(void 0!==b.setLineDash?(b.setLineDash(v.gj),b.lineDashOffset=0):void 0!==b.webkitLineDash?(b.webkitLineDash=v.gj,b.webkitLineDashOffset= 0):void 0!==b.mozDash&&(b.mozDash=null,b.mozDashOffset=0))}}}} function Rn(a,b,c,d,e){for(var f=d.length,h=a.U,k=0;km)){var n=l.Ie(),p=l.Ep;isNaN(p)&&(p=c?a.xh:a.wh);var q=l.Dp;null===q&&(q=c?a.li:a.vh);null===q&&(p=0);n-=p;p=l.position+p;n+=l.Ia;p+n>m&&(n=m-p);0>=n||(m=a.padding,Nm(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 Qn(a,b,c){if(0!==a%b)return!1;b=c.length;for(var d=0;dhd&&(Nc=Math.max(hd-id,0));var nh=0===X.Ia;X.Ia+= Nc;hd=Math.max(hd-(Nc+(nh?id:0)),0)}1!==ca.hi||Wc!==Qi&&Wc!==um||(X=this.Ld(xc),id=X.Ie(),Nc=Math.max(Re-X.Ia,0),Nc+id>yc&&(Nc=Math.max(yc-id,0)),nh=0===X.Ia,X.Ia+=Nc,yc=Math.max(yc-(Nc+(nh?id:0)),0));Mg&&ca.ep()}}}v.sa(mh);for(var Td=0,Ud=0,Fa=this.Oo,da=0;da=this.Cp);fb++)X=this.Md(ca.Wb+fb),Vd.height+=Math.max(X.$i,isNaN(X.Ve)?X.gf:Math.min(X.Ve,X.gf));for(fb=1;fb=this.Oo);fb++)X=this.Ld(ca.column+fb),Vd.width+=Math.max(X.$i,isNaN(X.Ve)?X.gf:Math.min(X.Ve,X.gf));ob.width+=Vd.width;ob.height+=Vd.height;Rb=ca.margin;bg=Rb.right+Rb.left;cg=Rb.top+Rb.bottom;ij(ca,ob.width,ob.height,li,sj);for(var Qe=ca.Ca,Re=Math.max(Qe.width+bg,0),zd=Math.max(Qe.height+cg,0),Og=0,fb=0;fb=this.Cp);fb++)X= this.Md(ca.Wb+fb),Og+=X.total||0;if(Og=oc)&&!(ca.Wb+fb>=this.Cp);fb++){var X=this.Md(ca.Wb+fb),Mb=X.Pa||0,sf=Ad(ca,X,zc);X.Ia=Math.min(X.gf,Mb+sf);X.Pa!==Mb&&(oc-=X.Pa-Mb)}for(;0Mb&&(X.Ia=Math.min(X.gf,Mb+oc),X.Pa!==Mb&&(oc-=X.Pa-Mb));if(0===X.index)break;X=this.Md(X.index-1)}}for(var Ee=0,fb=0;fb=this.Oo);fb++)X=this.Ld(ca.column+fb),Ee+=X.total||0;if(Ee=oc)&&!(ca.column+fb>=this.Oo);fb++)X=this.Ld(ca.column+fb),Mb=X.Pa||0,sf=Ad(ca,X,zc),X.Ia=Math.min(X.gf,Mb+sf),X.Pa!==Mb&&(oc-=X.Pa-Mb);for(;0Mb&&(X.Ia=Math.min(X.gf,Mb+oc),X.Pa!==Mb&&(oc-=X.Pa-Mb));if(0===X.index)break;X=this.Ld(X.index-1)}}}v.sa(fd);v.Zj(Vd);v.Zj(ob);for(var dg=0,eg=0,Wc=Fm(this,!0),tf=this.xa,tj=this.xf,Wd=Ud=Td=0,Xc=0,Fa=this.Oo,da=0;daPg)ij(Sb,Infinity,Infinity),ne=Sb.Ca,Te.ai(ne),this.Lg.add(ne);else{var kd=Sb.ve,br=Sb.kA,rn=Sb.Tj;rn.se()&&(rn=zb);var xj=Sb.Vt,et=Sb.UE,yj=0,zj=0,Xk=0;if(kd<-Pg||kd>=Pg){var cr=fg.vE,si=fg.uE;xj!==Di&&(Xk=fg.computeAngle(Sb,xj,si),Sb.Kl=Xk);yj=cr.x-gg.x;zj=cr.y-gg.y}else{var Bd,Ue;if(0<=kd)Bd=hg.da(kd),Ue=kder+10?0<=kd?wh.xc(Bd):Bd.xc(wh):er>dr+10?0<=kd?Ue.xc(xh):xh.xc(Ue):0<=kd?wh.xc(xh):xh.xc(wh)}else si=0<=kd?Bd.xc(Ue):Ue.xc(Bd);xj!==Di&&(Xk=fg.computeAngle(Sb,xj,si),Sb.Kl=Xk);yj=Bd.x+(Ue.x-Bd.x)*br-gg.x;zj=Bd.y+(Ue.y-Bd.y)*br-gg.y}ij(Sb,Infinity,Infinity);var ne=Sb.Ca,Vk=Sb.Ha,Aj=0;Sb instanceof Y&&(Aj=Sb.lb);var Yk=Vk.width+Aj,sn=Vk.height+Aj;ri.reset(); ri.translate(-ne.x,-ne.y);ri.scale(Sb.scale,Sb.scale);ri.rotate(xj===Di?Sb.angle:si,Yk/2,sn/2);var ti=new B(0,0,Yk,sn);wj.Yt(ti,rn);ri.ub(wj);var ft=-wj.x+Aj/2,gt=-wj.y+Aj/2;ig.assign(et);isNaN(ig.x)&&(ig.x=0<=kd?Yk/2+3:-(Yk/2+3));isNaN(ig.y)&&(ig.y=-(sn/2+3));ig.rotate(si);yj+=ig.x;zj+=ig.y;ti.set(ne);ti.x=yj+ft;ti.y=zj+gt;this.Lg.add(ti);Te.ai(ti)}}if(this.Ce)for(var fr=this.Rf;fr.next();)ij(fr.value,Infinity,Infinity);this.Ki=Te;var tn=this.wi;tn.m(tn.x+Te.x,tn.y+Te.y);Wa(e,Te.width||0,Te.height|| 0);v.$e(ri);v.v(wj);v.v(ig)}break;case "Grid":break;case "TableRow":case "TableColumn":v.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:v.k("Unknown panel type: "+n)}}var Ve=e.width,We=e.height,Zk=this.padding,ht=Zk.top+Zk.bottom,Ve=Ve+(Zk.left+Zk.right),We=We+ht;isFinite(f.width)&&(Ve=f.width);isFinite(f.height)&&(We=f.height);Ve=Math.min(k.width,Ve);We=Math.min(k.height,We);Ve=Math.max(h.width,Ve);We= Math.max(h.height,We);Ve=Math.max(c,Ve);We=Math.max(d,We);e.width=Ve;e.height=We;Wa(this.Qc,Ve,We);Cm(this,0,0,Ve,We)};D.prototype.findMainElement=D.prototype.Ye=function(){if(null===this.tm){var a=this.za.n,b=a.length;if(0===b)return null;for(var c=0;cc||p>d)this.P(),ij(this,n>c?c:n,p>d?d:p);break;case He:this.P(!0);ij(this,c+r,d+s,0,0);break;case vm:this.P(!0);ij(this,c+r,p+s,0,0);break;case um:this.P(!0),ij(this,n+r,d+s,0,0)}}k=this.U;k.x=a;k.y=b; k.width=c;k.height=d;var t=this.ia.Ob;switch(t){case "Position":for(var u=f.length,y=e.x-this.padding.left,w=e.y-this.padding.top,x=0;x=this.Cp);da++){var ca=this.Md(yb+da);ib.height+=ca.total}for(da=1;da=this.Oo);da++){var Kg=this.Ld(Rd+da);ib.width+=Kg.total}var lh=Sd.Pa+ib.width,mi=Lc.Pa+ib.height;h.x=Jc;h.y=ze;h.width=lh;h.height=mi;var xc=Jc,ni=ze,Yb=lh,mh=mi;Jc+lh>e.width&&(Yb=Math.max(e.width-Jc,0));ze+mi>e.height&&(mh=Math.max(e.height-ze,0));var fd=Fa.alignment, Ae=0,Mc=0,gd=0,yc=0;if(fd.Uc()){fd=this.gl;fd.bd()||(fd=zb);var Ae=fd.x,Mc=fd.y,gd=fd.offsetX,yc=fd.offsetY,hd=Sd.alignment,$f=Lc.alignment;hd.bd()&&(Ae=hd.x,gd=hd.offsetX);$f.bd()&&(Mc=$f.y,yc=$f.offsetY)}else Ae=fd.x,Mc=fd.y,gd=fd.offsetX,yc=fd.offsetY;if(isNaN(Ae)||isNaN(Mc))Mc=Ae=.5,yc=gd=0;var X=Oe.width,Be=Oe.height,Pe=Fa.margin,oi=Pe.left+Pe.right,pi=Pe.top+Pe.bottom,Nc=Tm(Fa,Lc,Sd,!1);!isNaN(Fa.xa.width)||Nc!==He&&Nc!==vm||(X=Math.max(lh-oi,0));!isNaN(Fa.xa.height)||Nc!==He&&Nc!==um||(Be= Math.max(mi-pi,0));var mb=Fa.xf,nb=Fa.ih,X=Math.min(mb.width,X),Be=Math.min(mb.height,Be),X=Math.max(nb.width,X),Be=Math.max(nb.height,Be),Pk=Be+pi;h.x+=h.width*Ae-(X+oi)*Ae+gd+Pe.left;h.y+=h.height*Mc-Pk*Mc+yc+Pe.top;Fa.visible&&(bb(xc,ni,Yb,mh,h.x,h.y,Oe.width,Oe.height)?Fa.Ec(h.x,h.y,X,Be):Fa.Ec(h.x,h.y,X,Be,new B(xc,ni,Yb,mh)))}else{Fa.ri();Fa.mc.Oa();var ag=Fa.mc;ag.x=me.type===Jm?jh:Jc;ag.y=me.type===Km?kh:ze;ag.width=Oe.width;ag.height=Oe.height;Fa.mc.freeze();Hm(Fa,!1)}}}}v.Zj(ib);for(yb= 0;yb=Ng){var Og=this.vE,oc=this.uE;De!==Di&&(fb=this.computeAngle(jd,De,oc),jd.angle=fb);rf=Og.x;Vd=Og.y}else{var zc=void 0,Ad=void 0;if(0<=lc)zc=qf.n[lc],Ad=lceg+10?0<= lc?sf.xc(zc):zc.xc(sf):eg>dg+10?0<=lc?Ad.xc(Ee):Ee.xc(Ad):0<=lc?sf.xc(Ee):Ee.xc(sf)}else oc=0<=lc?zc.xc(Ad):Ad.xc(zc);De!==Di&&(fb=this.computeAngle(jd,De,oc),jd.angle=fb);rf=zc.x+(Ad.x-zc.x)*qh;Vd=zc.y+(Ad.y-zc.y)*qh}if(ob.K(rb))jd.location=new z(rf,Vd);else{ob.se()&&(ob=zb);var tf=v.ph();tf.reset();tf.scale(jd.scale,jd.scale);tf.rotate(jd.angle,0,0);var tj=jd.Ha,Wd=v.gk(0,0,tj.width,tj.height),Xc=v.L();Xc.Yt(Wd,ob);tf.ub(Xc);var sh=-Xc.x,th=-Xc.y,mc=Jf.copy();isNaN(mc.x)&&(mc.x=0<=lc?Xc.x+3:-(Xc.x+ 3));isNaN(mc.y)&&(mc.y=-(Xc.y+3));mc.rotate(oc);rf+=mc.x;Vd+=mc.y;tf.pF(Wd);var sh=sh+Wd.x,th=th+Wd.y,uh=v.Mb(rf+sh,Vd+th);jd.move(uh);v.v(uh);v.v(Xc);v.Vb(Wd);v.$e(tf)}}this instanceof Sg?this.Um(!1):qi.Um(!1)}break;case "Grid":break;case "TableRow":case "TableColumn":v.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:v.k("Unknown panel type: "+t)}v.Vb(h)}}; D.prototype.Vj=function(a){var b=this.Ha;if(bb(0,0,b.width,b.height,a.x,a.y)){for(var b=this.za.n,c=b.length,d=v.Mb(0,0);c--;){var e=b[c];if(e.visible||e===this.bc)if(Qa(d.set(a),e.transform),e.Fa(d))return v.v(d),!0}v.v(d);return null===this.Ib&&null===this.nc?!1:!0}return!1};D.prototype.zw=function(a){if(this.on===a)return this;for(var b=this.za.n,c=b.length,d=0;dp.width||n.y>p.height||0>n.x+n.width||0>n.y+n.height)){n=m;m=m instanceof D?m:null;p=v.ph();p.set(h);if(null!==m?m.Yj(a,b,c,d,e,p):Em(n,a,d,p))null!== b&&(n=b(n)),null===n||null!==c&&!c(n)||e.add(n);v.$e(p)}}}void 0===f&&v.$e(h);return d}void 0===f&&v.$e(h);return!1};function co(a,b,c,d){for(var e=a.za.n,f=e.length;f--;){var h=e[f];if(h.visible){var k=h.U,l=a.Ha;k.x>l.width||k.y>l.height||0>k.x+k.width||0>k.y+k.height||(h instanceof D&&co(h,b,c,d),null!==b&&(h=b(h)),null===h||null!==c&&!c(h)||d.add(h))}}} g.Lm=function(a,b,c,d,e,f){if(!1===this.Gg)return!1;void 0===c&&(c=null);void 0===d&&(d=null);var h=this.Ha,k=this.Kg(),l=k?a:Qa(v.Mb(a.x,a.y),this.transform),m=k?b:Qa(v.Mb(b.x,b.y),this.transform),n=l.rf(m),p=0s.width||r.y>s.height||0>r.x+r.width||0>r.y+r.height||(q.Kg()?(r=q.transform,Qa(k.set(a),r),Qa(l.set(b),r)):(k.set(a),l.set(b)),r=q,q=q instanceof D?q:null,null!==q?!q.Lm(k,l,c,d,e,f):!r.MD(k,l,e))||(null!==c&&(r=c(r)),null===r||null!==d&&!d(r)||f.add(r))}}v.v(k);v.v(l)}return e? p:h}return!1};function Tn(a){var b=a.B;if(void 0===b||b===fc)b=null;null===b&&a instanceof Y&&(a=a.Sa,null!==a&&(b=a.B));null===b&&(b=sb);return b}function Un(a){var b=a.C;if(void 0===b||b===fc)b=null;null===b&&a instanceof Y&&(a=a.Sa,null!==a&&(b=a.C));null===b&&(b=Eb);return b}D.prototype.add=D.prototype.add=function(a){v.A(a,G,D,"add:element");this.yd(this.za.count,a)};D.prototype.elt=D.prototype.da=function(a){return this.za.da(a)}; D.prototype.insertAt=D.prototype.yd=function(a,b){b instanceof R&&v.k("Cannot add a Part to a Panel: "+b);if(this===b||this.ul(b))this===b&&v.k("Cannot make a Panel contain itself: "+this.toString()),v.k("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+b.toString());var c=b.S;null!==c&&c!==this&&v.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.ia!==xk||b instanceof Y||v.k("Can only add Shapes to a Grid Panel, not: "+b);b.Bl(this);b.jm=null;if(null!==this.nE){var d=b.data;null!==d&&"object"===typeof d&&(null===this.fg&&(this.fg=new na(Object,D)),this.fg.add(d,b))}var e=this.za,d=-1;if(c===this){for(var f=-1,h=this.za.n,k=h.length,l=0;l=e.count&&a>=e.count)return;e.Vc(f);d=f}else v.k("element "+b.toString()+" has panel "+c.toString()+" but is not contained by it.")}if(0> a||a>e.count)a=e.count;e.yd(a,b);this.P();b.P();null!==b.Rd?this.Ah=!0:b instanceof D&&!0===b.Ah&&(this.Ah=!0);c=this.Y;null!==c&&(c.em=null,c.zj=NaN,this.Ah&&c instanceof S&&(c.Ah=!0),c.Ah&&(c.Wd=null),e=this.g,null!==e&&e.la.ib||(-1!==d&&c.Lc(Cf,"elements",this,b,null,d,null),c.Lc(Bf,"elements",this,null,b,null,a)))};D.prototype.remove=D.prototype.remove=function(a){v.A(a,G,D,"remove:element");for(var b=this.za.n,c=b.length,d=-1,e=0;ea&&v.va(a,">= 0",D,"getRowDefinition:idx");a=Math.round(a);var b=this.Hd;if(void 0===b[a]){var c=new rg;c.Bl(this);c.ce=!0;c.index=a;b[a]=c}return b[a]};D.prototype.removeRowDefinition=D.prototype.IE=function(a){0>a&&v.va(a,">= 0",D,"removeRowDefinition:idx");a=Math.round(a);var b=this.Hd;this.Lc(Cf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.P()};v.u(D,{Oo:"columnCount"},function(){return void 0===this.Dd?0:this.Dd.length}); D.prototype.getColumnDefinition=D.prototype.Ld=function(a){0>a&&v.va(a,">= 0",D,"getColumnDefinition:idx");a=Math.round(a);var b=this.Dd;if(void 0===b[a]){var c=new rg;c.Bl(this);c.ce=!1;c.index=a;b[a]=c}return b[a]};D.prototype.removeColumnDefinition=D.prototype.EE=function(a){0>a&&v.va(a,">= 0",D,"removeColumnDefinition:idx");a=Math.round(a);var b=this.Dd;this.Lc(Cf,"coldefs",this,b[a],null,a,null);b[a]&&delete b[a];this.P()}; v.defineProperty(D,{sI:"rowSizing"},function(){return void 0===this.om?Pn:this.om},function(a){if(void 0!==this.om){var b=this.om;b!==a&&(a!==Pn&&a!==Wn&&v.k("Panel.rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.om=a,this.P(),this.h("rowSizing",b,a))}}); v.defineProperty(D,{sG:"columnSizing"},function(){return void 0===this.Pl?Pn:this.Pl},function(a){if(void 0!==this.Pl){var b=this.Pl;b!==a&&(a!==Pn&&a!==Wn&&v.k("Panel.columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None, not: "+a),this.Pl=a,this.P(),this.h("columnSizing",b,a))}}); v.defineProperty(D,{OK:"topIndex"},function(){return void 0===this.Ji?0:this.Ji},function(a){if(void 0!==this.Ji){var b=this.Ji;b!==a&&((!isFinite(a)||0>a)&&v.k("Panel.topIndex must be greater than zero and a real number, not: "+a),this.Ji=a,this.P(),this.h("topIndex",b,a))}}); v.defineProperty(D,{$J:"leftIndex"},function(){return void 0===this.vi?0:this.vi},function(a){if(void 0!==this.vi){var b=this.vi;b!==a&&((!isFinite(a)||0>a)&&v.k("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.vi=a,this.P(),this.h("leftIndex",b,a))}});D.prototype.findRowForLocalY=function(a){if(0>a)return-1;if(this.type!==Sm)return NaN;for(var b=0,c=this.Hd,d=c.length,e=this.Ji;ea)return-1;if(this.type!==Sm)return NaN;for(var b=0,c=this.Dd,d=c.length,e=this.vi;ea;)this.Ne(this.za.length-1);a=this.nE;if(null!==a)for(var b=v.Wa(a),c=0;cc)){var d;d=eo(a,b);var e=a.yH,f=null;null!==e&&(f=e.ja(d));null===f&&(fo||(fo=!0,v.trace('No item template Panel found for category "'+d+'" on '+a),v.trace(" Using default item template."),d=new D,e=new Zg,e.bind(new xg("text","",Df)),d.add(e),ho=d),f=ho);d=f;null!==d&&(Ug(d),d=d.copy(),"object"===typeof b&&(null===a.fg&&(a.fg=new na(Object,D)),a.fg.add(b,d)),e=c,Jl(a)&&e++,a.yd(e,d),Kl(a,e,c),d.ie=null,d.data=b)}} function Kl(a,b,c){for(a=a.za;ba&&v.va(a,">= 0",rg,"height"),this.Ve=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("height",b,a))});v.defineProperty(rg,{width:"width"},function(){return this.Ve},function(a){var b=this.Ve;b!==a&&(0>a&&v.va(a,">= 0",rg,"width"),this.Ve=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("width",b,a))}); v.defineProperty(rg,{$i:"minimum"},function(){return this.Dj},function(a){var b=this.Dj;b!==a&&((0>a||!isFinite(a))&&v.va(a,">= 0",rg,"minimum"),this.Dj=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("minimum",b,a))});v.defineProperty(rg,{gf:"maximum"},function(){return this.Bj},function(a){var b=this.Bj;b!==a&&(0>a&&v.va(a,">= 0",rg,"maximum"),this.Bj=a,this.Ia=this.Pa,null!==this.S&&this.S.P(),this.$c("maximum",b,a))}); v.defineProperty(rg,{alignment:"alignment"},function(){return this.Ae},function(a){var b=this.Ae;b.K(a)||(this.Ae=a.R(),null!==this.S&&this.S.P(),this.$c("alignment",b,a))});v.defineProperty(rg,{stretch:"stretch"},function(){return this.Ph},function(a){var b=this.Ph;b!==a&&(this.Ph=a,null!==this.S&&this.S.P(),this.$c("stretch",b,a))}); v.defineProperty(rg,{WE:"separatorPadding"},function(){return this.Hj},function(a){"number"===typeof a&&(a=new cb(a));var b=this.Hj;null!==a&&null!==b&&b.K(a)||(null!==a&&(a=a.R()),this.Hj=a,null!==this.S&&this.S.P(),this.$c("separatorPadding",b,a))});v.defineProperty(rg,{Dp:"separatorStroke"},function(){return this.ls},function(a){var b=this.ls;b!==a&&(null===a||"string"===typeof a||a instanceof ha)&&(a instanceof ha&&a.freeze(),this.ls=a,null!==this.S&&this.S.P(),this.$c("separatorStroke",b,a))}); v.defineProperty(rg,{Ep:"separatorStrokeWidth"},function(){return this.ms},function(a){var b=this.ms;b!==a&&(this.ms=a,null!==this.S&&this.S.P(),this.$c("separatorStrokeWidth",b,a))}); v.defineProperty(rg,{xI:"separatorDashArray"},function(){return this.Hh},function(a){var b=this.Hh;if(b!==a){null===a||Array.isArray(a)||v.Cd(a,"Array",rg,"separatorDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;ee)){for(var f=d.Ca,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,t=q=0,u=v.jb(),y=2;yp&&(p=1);c=p;for(var e=0,m=c,n=h/2,y=0===n?!1:!0,w=0,q=u[w],p=q[0],s=q[1],r=q[2],q=q[3],x=0;.1<=t;){0===x&&(y?(m=c,e++,m-=n,t-=n,y=!1):(m=c,e++),0===m&&(m=1));if(m>t){v.sa(u); return}m>q?(x=m-q,m=q):x=0;var A=Math.sqrt(m*m/(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===x&&d.Xj(a,b);a.translate(h/2,f/2);a.rotate(-s);a.translate(-k,-l);t-=m;q-=m;if(0!==x){w++;if(w===u.length){v.sa(u);return}q=u[w];p=q[0];s=q[1];r=q[2];q=q[3];m=x}}v.sa(u)}} Y.prototype.Xj=function(a,b){if(null!==this.Dc||null!==this.pd){null!==this.pd&&Nm(this,a,this.pd,!0,!1);null!==this.Dc&&Nm(this,a,this.Dc,!1,!1);var c=this.Qh;if(0===c){var d=this.Y;d instanceof Sg&&d.type===Ai&&"Selection"===d.fc&&d.Zb instanceof Y&&d.Lf.Ye()===d.Zb&&(c=d.Zb.lb)}a.lineWidth=c;a.lineJoin=this.zo;a.lineCap=this.xo;a.miterLimit=this.sm;var e=!1;this.Y&&b.Ti("drawShadows")&&(e=this.Y.wl);var f=!0;null!==this.Dc&&null===this.pd&&(f=!1);var d=!1,h=!0,k=this.eF;null!==k&&(d=!0,h=a.pz(k, this.ke));var l=this.Sa;if(null!==l){if(l.ia===Ie)a.beginPath(),d&&!h?Am(a,l.vc,l.Cc,l.vb,l.Bb,k,this.ke):(a.moveTo(l.vc,l.Cc),a.lineTo(l.vb,l.Bb)),null!==this.pd&&a.ug(this.pd),0!==c&&null!==this.Dc&&a.cj();else if(l.ia===Je){var m=l.vc,n=l.Cc,p=l.vb,q=l.Bb,l=Math.min(m,p),r=Math.min(n,q),m=Math.abs(p-m),n=Math.abs(q-n);null!==this.pd&&(a.beginPath(),a.rect(l,r,m,n),a.ug(this.pd));if(null!==this.Dc){var s=p=0,t=0;f&&e&&(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0);d&&!h?(h=v.jb(),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(),ko(a,h,k,this.ke),a.cj(),v.sa(h)):0!==c&&(a.beginPath(),a.rect(l,r,m,n),a.cj());f&&e&&(a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t)}}else if(l.ia===Ke)m=l.vc,n=l.Cc,p=l.vb,q=l.Bb,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+$c*l,n-r,m+l,n-$c*r,m+l,n),a.bezierCurveTo(m+ l,n+$c*r,m+$c*l,n+r,m,n+r),a.bezierCurveTo(m-$c*l,n+r,m-l,n+$c*r,m-l,n),a.bezierCurveTo(m-l,n-$c*r,m-$c*l,n-r,m,n-r),a.closePath(),null!==this.pd&&a.ug(this.pd),d&&!h&&(h=v.jb(),Zd(m,n-r,m+$c*l,n-r,m+l,n-$c*r,m+l,n,.5,h),Zd(m+l,n,m+l,n+$c*r,m+$c*l,n+r,m,n+r,.5,h),Zd(m,n+r,m-$c*l,n+r,m-l,n+$c*r,m-l,n,.5,h),Zd(m-l,n,m-l,n-$c*r,m-$c*l,n-r,m,n-r,.5,h),a.beginPath(),ko(a,h,k,this.ke),v.sa(h)),0!==c&&null!==this.Dc&&(f&&e?(p=a.shadowOffsetX,s=a.shadowOffsetY,t=a.shadowBlur,a.shadowOffsetX=0,a.shadowOffsetY= 0,a.shadowBlur=0,a.cj(),a.shadowOffsetX=p,a.shadowOffsetY=s,a.shadowBlur=t):a.cj());else if(l.ia===Fe){r=l.lj;n=r.length;for(q=0;qy.Af);else{var u=lf(y,m),w=u.length;if(0===w){a.lineTo(y.na,y.ua);break}for(var x=0;xe)){var f=.001,h=c.length,k=b[0],l=b[1];if(4===e)Am(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=v.jb(),t=2;tr&&(f=r);f>p?(u=f-p,f=p):u=0;var y=Math.sqrt(f*f/(1+q*q));0>n&&(y=-y);k+=y;l+= q*y;e?a.lineTo(k,l):a.moveTo(k,l);r-=f;p-=f;if(0!==u){t++;if(t===s.length){v.sa(s);return}p=s[t];n=p[0];q=p[1];p=p[2];f=u}else e=!e}v.sa(s)}}}Y.prototype.getDocumentPoint=Y.prototype.Ya=function(a,b){void 0===b&&(b=new z);a.se()&&v.k("getDocumentPoint Spot must be a real, specific Spot, not: "+a.toString());var c=this.Ha,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);this.Yg.ub(b);return b}; Y.prototype.Vj=function(a,b){var c=this.Sa;if(null===c||null===this.fill&&null===this.stroke)return!1;var d=c.mb,e=this.lb/2;c.type!==Ie||b||(e+=2);var f=v.$f();f.assign(d);f.Pf(e+2,e+2);if(!f.Fa(a))return v.Vb(f),!1;d=e+1E-4;if(c.type===Ie){if(null===this.stroke)return!1;d=(c.I-c.Aa)*(a.x-c.Aa)+(c.J-c.ya)*(a.y-c.ya);if(0>(c.Aa-c.I)*(a.x-c.I)+(c.ya-c.J)*(a.y-c.J)||0>d)return!1;v.Vb(f);return Md(c.Aa,c.ya,c.I,c.J,e,a.x,a.y)}if(c.type===Je){var h=c.Aa,k=c.ya,l=c.I,m=c.J;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.Pf(-d,-d);if(f.Fa(a))return v.Vb(f),!1;f.Pf(d,d)}null!==this.stroke&&f.Pf(e,e);e=f.Fa(a);v.Vb(f);return e}if(c.type===Ke){var h=c.Aa,k=c.ya,l=c.I,m=c.J,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 v.Vb(f),!1;h+=d;k+=d}null!==this.stroke&&(h+=e,k+=e);v.Vb(f);return 0>=h||0>=k?!1:1>=c*c/(h*h)+n*n/(k*k)}if(c.type=== Fe)return v.Vb(f),null===this.fill?uf(c,a.x,a.y,e):c.Fa(a,e,1=this.lb)n=fe(p.vc,p.Cc,p.vb,p.Bb,f,h,k,l,e);else{var r=0,s=0;p.vc===p.vb?(r=m,s=0):(b=(p.Bb-p.Cc)/(p.vb-p.vc),s=m/Math.sqrt(1+b*b),r=s*b);d=v.jb();b=new z;fe(p.vc+ r,p.Cc+s,p.vb+r,p.Bb+s,f,h,k,l,b)&&d.push(b);b=new z;fe(p.vc-r,p.Cc-s,p.vb-r,p.Bb-s,f,h,k,l,b)&&d.push(b);b=new z;fe(p.vc+r,p.Cc+s,p.vc-r,p.Cc-s,f,h,k,l,b)&&d.push(b);b=new z;fe(p.vb+r,p.Bb+s,p.vb-r,p.Bb-s,f,h,k,l,b)&&d.push(b);b=d.length;if(0===b)return v.sa(d),!1;n=!0;s=Infinity;for(r=0;rMath.abs(c)){n=h-b-c*(f-d);if(0>a*a*c*c+u*u-n*n){e.x=NaN;e.y=NaN;n=!1;break a}m=Math.sqrt(a*a*c*c+u*u-n*n);k=(-(a*a*c*n)+a*u*m)/(u*u+a*a*c*c)+d;a=(-(a*a*c*n)-a*u*m)/(u*u+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||Hc(l.y,e))&&(l.ye||Hc(l.x,e))&&(l.x=h&&d<=a}a=h&&f<=a} Y.prototype.MD=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.Vj(a,!0))return!0;var e=a.rf(b);b=e;1.5=e||Ta(b,f,0,-p)>=e||Ta(b,f,0,p)>=e||Ta(b,f,n,0)>= e?!1:!0}else if(f.type===Fe){h=f.mb;k=h.x;l=h.y;m=h.x+h.width;h=h.y+h.height;if(a.x>m&&a.xh&&a.ye&&Sa(a.x,a.y,k,l,m,l)>e&&Sa(a.x,a.y,m,h,k,h)>e&&Sa(a.x,a.y,m,h,m,l)>e)return!1;b=Math.sqrt(e);if(c){if(null===this.fill?uf(f,a.x,a.y,b):f.Fa(a,b,!0))return!0}else{c=f.Ub;for(b=0;be)return!1;l=k.sb.n;m=l.length;for(h=0;he)return!1;break;case gf:f=v.jb(); Zd(n,p,q.rc,q.Kc,q.kh,q.lh,q.I,q.J,.8,f);n=d(f,a);v.sa(f);if(n)return!1;n=q.I;p=q.J;if(a.So(n,p)>e)return!1;break;case hf:f=v.jb();ce(n,p,q.rc,q.Kc,q.I,q.J,.8,f);n=d(f,a);v.sa(f);if(n)return!1;n=q.I;p=q.J;if(a.So(n,p)>e)return!1;break;case jf:case kf:var r=q.type===jf?lf(q,k):mf(q,k,n,p),s=r.length;if(0===s){n=q.na;p=q.ua;if(a.So(n,p)>e)return!1;break}q=null;f=v.jb();for(b=0;b= 0",Y,"strokeWidth:value")});v.defineProperty(Y,{HK:"strokeCap"},function(){return this.xo},function(a){var b=this.xo;b!==a&&("string"!==typeof a||"butt"!==a&&"round"!==a&&"square"!==a?v.va(a,'"butt", "round", or "square"',Y,"strokeCap"):(this.xo=a,this.pa(),this.h("strokeCap",b,a)))}); v.defineProperty(Y,{JK:"strokeJoin"},function(){return this.zo},function(a){var b=this.zo;b!==a&&("string"!==typeof a||"miter"!==a&&"bevel"!==a&&"round"!==a?v.va(a,'"miter", "bevel", or "round"',Y,"strokeJoin"):(this.zo=a,this.pa(),this.h("strokeJoin",b,a)))});v.defineProperty(Y,{KK:"strokeMiterLimit"},function(){return this.sm},function(a){var b=this.sm;if(b!==a)if(1<=a){this.sm=a;this.pa();var c=this.Y;null!==c&&(c.zj=NaN);this.h("strokeMiterLimit",b,a)}else v.va(a,"value >= 1",Y,"strokeWidth:value")}); v.defineProperty(Y,{eF:"strokeDashArray"},function(){return this.yo},function(a){var b=this.yo;if(b!==a){null===a||Array.isArray(a)||v.Cd(a,"Array",Y,"strokeDashArray:value");if(null!==a){for(var c=a.length,d=0,e=0;em*k*k&&(h=!0);b.lf!==a&&(h=!1);!1===b.Ti("textGreeking")&&(h=!1);for(var m=b.Tq,k=this.Jj,l=this.Kj,n=this.De,p=0;pc&&(q=c);var f=f+k,s=r,r=a, t=f,u=c,y=d,w=0,x=this.um;"start"===x&&(x=m?"right":"left");"end"===x&&(x=m?"left":"right");h?("left"===x?w=0:"right"===x?w=u-q:"center"===x&&(w=(u-q)/2),r.fillRect(0+w,t+.25*y,q,1)):("left"===x?w=0:"right"===x?w=u:"center"===x&&(w=u/2),r.fillText(s,0+w,t+y-.25*y),s=y/20|0,0===s&&(s=1),"right"===x?w-=q:"center"===x&&(w-=q/2),this.Wl&&(r.beginPath(),r.lineWidth=s,r.moveTo(0+w,t+y-.2*y),r.lineTo(0+w+q,t+y-.2*y),r.stroke()),this.Vl&&(r.beginPath(),r.lineWidth=s,t=t+y-y/2.2|0,0!==s%2&&(t+=.5),r.moveTo(0+ w,t),r.lineTo(0+w+q,t),r.stroke()));f+=d+l}}}; Zg.prototype.mp=function(a,b,c,d){this.kv=a;var e=this.Kk;e.reset();var f=0,h=0;if(isNaN(this.xa.width)){f=this.le.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(0===f.length)f=0;else if(this.Kw){for(var k=h=0,l=!1;!l;){var m=f.indexOf("\n",k);-1===m&&(m=f.length,l=!0);k=Io(f.substr(k,m-k).replace(/^\s+|\s+$/g,""),this.yh);k>h&&(h=k);k=m+1}f=h}else h=f.indexOf("\n",0),0<=h&&(f=f.substr(0,h)),f=k=Io(f,this.yh);f=Math.min(f,a/this.scale);f=Math.max(8,f)}else f=this.xa.width;null!==this.S&&(f=Math.min(f, this.S.xf.width),f=Math.max(f,this.S.ih.width));h=Go(this,f,e);m=h=isNaN(this.xa.height)?Math.min(h,b/this.scale):this.xa.height;if(0!==e.Te&&1!==e.Be.length&&this.Sk===Eo&&(b=this.yh,l=this.Sk===Eo?Jo(b):0,k=this.Jj+this.Kj,k=Math.max(0,Ho(this)+k),m=Math.min(this.LH-1,Math.max(Math.floor(m/k+.01)-1,0)),!(m+1>=e.Be.length))){k=e.Be[m];for(a=Math.max(1,a-l);Io(k,b)>a&&1=a.xi)return new ia(0,l);if(a.wm===Co){c.Li=1;f=Io(b,k);if(0===h||f<=d)return c.Te=f,c.kf.push(c.Te),c.Be.push(b),new ia(f,l);var m=Ko(b);b=b.substr(m.length);for(var n=Ko(b),f=Io(m+n,k);0d&&1d;){n=1;f=Io(m.substr(0,n),k);for(h=0;f<=d;)n++,h=f,f=Io(m.substr(0,n),k);1===n?(c.kf[a.De+p]=f,e=Math.max(e,f)):(c.kf[a.De+p]=h,e=Math.max(e,h));n--;1>n&&(n=1);c.Be[a.De+p]=m.substr(0,n);p++;m=m.substr(n);if(a.De+p>a.xi)break}n=Ko(b);for(f=Io(m+n,k);0a.xi))break}c.Li=Math.min(a.xi,p);c.Te=Math.max(c.Te,e);return new ia(c.Te,l*c.Li)}function Ko(a){for(var b=a.length,c=0;c=b?a:a.substr(0,c)}function Io(a,b){Ao!==b&&(Ao=Bo.font=b);return Bo.measureText(a).width} function Ho(a){if(null!==a.Mn)return a.Mn;var b=a.yh;Ao!==b&&(Ao=Bo.font=b);var c=0;void 0!==vo[b]&&5E3>wo?c=vo[b]:(c=1.3*Bo.measureText("M").width,vo[b]=c,wo++);return a.Mn=c}function Jo(a){Ao!==a&&(Ao=Bo.font=a);var b=0;void 0!==xo[a]&&5E3>yo?b=xo[a]:(b=Bo.measureText(zo).width,xo[a]=b,yo++);return b} function Go(a,b,c){var d=a.le.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e=a.Jj+a.Kj,e=Math.max(0,Ho(a)+e);if(0===d.length)return c.Te=0,a.De=1,e;if(!a.Kw){var f=d.indexOf("\n",0);0<=f&&(d=d.substr(0,f))}for(var f=0,h=a.De=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.wm!==Co?(c.Li=0,h=Fo(a,h,c,b),f+=h.height,a.De+=c.Li):(Fo(a,h,c,b),f+=e,a.De++),a.De===a.xi&&(l=!0)),h=k+1;return a.pv=f} v.defineProperty(Zg,{wA:"textValidation"},function(){return this.Uk},function(a){var b=this.Uk;b!==a&&(null!==a&&v.j(a,"function",Zg,"textValidation"),this.Uk=a,this.h("textValidation",b,a))});v.defineProperty(Zg,{EK:"spacingAbove"},function(){return this.Jj},function(a){var b=this.Jj;b!==a&&(this.Jj=a,this.h("spacingAbove",b,a))});v.defineProperty(Zg,{FK:"spacingBelow"},function(){return this.Kj},function(a){var b=this.Kj;b!==a&&(this.Kj=a,this.h("spacingBelow",b,a))}); v.defineProperty(Zg,{LH:"maxLines"},function(){return this.xi},function(a){var b=this.xi;b!==a&&(a=Math.floor(a),0>=a&&v.va(a,"> 0",Zg,"maxLines"),this.xi=a,this.h("maxLines",b,a),this.P())});v.u(Zg,{hK:"metrics"},function(){return this.Kk});function uo(){this.Te=this.Li=0;this.kf=[];this.Be=[]}uo.prototype.reset=function(){this.Te=this.Li=0;this.kf=[];this.Be=[]};uo.prototype.Zs=function(a){this.Li=a.Li;this.Te=a.Te;this.kf=v.el(a.kf);this.Be=v.el(a.Be)};v.u(uo,{tJ:"arrSize"},function(){return this.kf}); v.u(uo,{uJ:"arrText"},function(){return this.Be});v.u(uo,{gK:"maxLineWidth"},function(){return this.Te});function mk(){G.call(this);this.Re=null;this.ts="";this.Ij=Fd;this.On=He;this.Ao=this.Lj=this.nf=null;this.oy=!1;this.Tu=!0;this.ro=null}v.Ja(mk,G);v.ea("Picture",mk);mk.prototype.cloneProtected=function(a){G.prototype.cloneProtected.call(this,a);a.element=this.Re;a.ts=this.ts;a.Ij=this.Ij.R();a.On=this.On;a.nf=this.nf;a.Lj=this.Lj;a.Tu=this.Tu;a.ro=this.ro};var Lo=new ta,Mo=0,gk=[]; function No(){var a=gk;if(0===a.length)for(var b=window.document.getElementsByTagName("canvas"),c=b.length,d=0;dr.Jo.length&& (So(r,4,l,m),So(r,16,l,m));for(var l=r.Jo,m=l.length,q=l[0],t=0;te;e++)a.lineTo(d[e].x*b,d[e].y*c);v.sa(d);P(a);b=a.o;b.B=new L(.2,.22);b.C=new L(.8, .9);v.q(a);return b},DataTransmission:"Hexagon",Hexagon:function(a,b,c){var d=Wo(6);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.07,.25);b.C=new L(.93,.75);v.q(a);return b},Heptagon:function(a,b,c){var d=Wo(7);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.2,.15);b.C=new L(.8,.85);v.q(a);return b},Octagon:function(a,b,c){var d=Wo(8);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.15,.15);b.C=new L(.85,.85);v.q(a);return b},Nonagon:function(a,b,c){var d=Wo(9);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.17,.13);b.C=new L(.82,.82);v.q(a);return b},Decagon:function(a,b,c){var d=Wo(10);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.16,.16);b.C=new L(.84,.84);v.q(a);return b}, Dodecagon:function(a,b,c){var d=Wo(12);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.16,.16);b.C=new L(.84,.84);v.q(a);return b},FivePointedStar:function(a,b,c){var d=Vo(5);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.312,.383);b.C=new L(.693,.765);v.q(a);return b},SixPointedStar:function(a,b,c){var d=Vo(6);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.17,.251);b.C=new L(.833,.755);v.q(a);return b},SevenPointedStar:function(a,b,c){var d=Vo(7);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.363,.361);b.C=new L(.641,.709);v.q(a);return b},EightPointedStar:function(a,b,c){var d=Vo(8);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.252,.255);b.C=new L(.75,.75);v.q(a);return b},NinePointedStar:function(a, b,c){var d=Vo(9);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.355,.361);b.C=new L(.645,.651);v.q(a);return b},TenPointedStar:function(a,b,c){var d=Vo(10);a=v.s();N(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);v.sa(d);P(a);b=a.o;b.B=new L(.281,.261);b.C=new L(.723,.748);v.q(a);return b},FivePointedBurst:function(a,b,c){var d=Uo(5);a=v.s();N(a,d[0].x*b,d[0].y*c,!0);for(var e=1;ea&&(a=.15);var d=v.s(),e=.2*$c;N(d,0,.2*c,!0);O(d,0,(.2-e)*c,(.2-e)*b,0,.2*b,0);d.lineTo(.8*b,0);O(d,(.8+e)*b,0,1*b,(.2-e)*c,1*b,.2*c);d.lineTo(1*b,.8*c);O(d,1*b,(.8+e)*c,(.8+e)*b,1*c,.8*b,1*c);d.lineTo(.2*b,1*c);O(d,(.2-e)*b,1*c,0,(.8+e)*c,0,.8*c);d.lineTo(0,.2*c); N(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Za(!1);b=d.o;b.B=new L(0,a);b.C=new L(1,1-a);v.q(d);return b},DividedProcess:function(a,b,c){a=a?a.Ac:NaN;if(isNaN(a)||.1>a)a=.1;var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);P(d);N(d,0,a*c,!1);d.lineTo(1*b,a*c);d.Za(!1);b=d.o;b.B=new L(0,a);b.C=Eb;v.q(d);return b},Document:function(a,b,c){c/=.8;a=v.s();N(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);O(a,.5*b,.4*c,.5*b,1*c,0,.7*c);P(a);b=a.o;b.B=sb;b.C=new L(1,.6);v.q(a); return b},ExternalOrganization:function(a,b,c){a=a?a.Ac:NaN;if(isNaN(a)||.2>a)a=.2;var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);P(d);N(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.Za(!1);b=d.o;b.B=new L(a/2,a/2);b.C=new L(1-a/2,1-a/2);v.q(d);return b},ExternalProcess:function(a,b,c){a=v.s();N(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);P(a); N(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.Za(!1);b=a.o;b.B=new L(.25,.25);b.C=new L(.75,.75);v.q(a);return b},File:function(a,b,c){a=v.s();N(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);P(a);N(a,.75*b,0,!1);a.lineTo(.75*b,.25*c);a.lineTo(1*b,.25*c);a.Za(!1);b=a.o;b.B=new L(0,.25);b.C=Eb;v.q(a);return b},Interrupt:function(a,b,c){a=v.s();N(a,1*b, .5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(1*b,.5*c);N(a,1*b,.5*c,!1);a.lineTo(1*b,1*c);N(a,1*b,.5*c,!1);a.lineTo(1*b,0);b=a.o;b.B=new L(0,.25);b.C=new L(.5,.75);v.q(a);return b},InternalStorage:function(a,b,c){var d=a?a.Ac:NaN;a=a?a.Mt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.1);var e=v.s();N(e,0,0,!0);e.lineTo(1*b,0);e.lineTo(1*b,1*c);e.lineTo(0,1*c);P(e);N(e,d*b,0,!1);e.lineTo(d*b,1*c);e.moveTo(0,a*c);e.lineTo(1*b,a*c);e.Za(!1);b=e.o;b.B=new L(d,a);b.C=Eb;v.q(e);return b},Junction:function(a,b, c){a=v.s();var d=1/Math.SQRT2,e=(1-1/Math.SQRT2)/2,f=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+f)*c,(.5+f)*b,1*c,.5*b,1*c);O(a,(.5-f)*b,1*c,0,(.5+f)*c,0,.5*c);O(a,0,(.5-f)*c,(.5-f)*b,0,.5*b,0);O(a,(.5+f)*b,0,1*b,(.5-f)*c,1*b,.5*c);N(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.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b},LinedDocument:function(a,b,c){c/=.8;a=v.s();N(a,0,.7*c,!0);a.lineTo(0,0);a.lineTo(1*b,0);a.lineTo(1*b,.7*c);O(a,.5*b,.4*c,.5*b,1*c,0,.7*c);P(a);N(a,.1* b,0,!1);a.lineTo(.1*b,.75*c);a.Za(!1);b=a.o;b.B=new L(.1,0);b.C=new L(1,.6);v.q(a);return b},LoopLimit:function(a,b,c){a=v.s();N(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);P(a);b=a.o;b.B=new L(0,.25);b.C=Eb;v.q(a);return b},SequentialData:"MagneticTape",MagneticTape:function(a,b,c){a=v.s();var d=.5*$c;N(a,.5*b,1*c,!0);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);O(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.B=new L(.15,.15);b.C=new L(.85,.8);v.q(a);return b},ManualInput:function(a,b,c){a=v.s();N(a,1*b,0,!0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,.25*c);P(a);b=a.o;b.B=new L(0,.25);b.C=Eb;v.q(a);return b},MessageFromUser:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.7);var d=v.s();N(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);P(d);b=d.o;b.B=sb;b.C=new L(a,1);v.q(d);return b}, MicroformProcessing:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.25);var d=v.s();N(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);P(d);b=d.o;b.B=new L(0,a);b.C=new L(1,1-a);v.q(d);return b},MicroformRecording:function(a,b,c){a=v.s();N(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);P(a);b=a.o;b.B=new L(0,.25);b.C=new L(1,.75);v.q(a);return b},MultiDocument:function(a,b,c){c/=.8;a=v.s(); N(a,b,0,!0);a.lineTo(b,.5*c);O(a,.96*b,.47*c,.93*b,.45*c,.9*b,.44*c);a.lineTo(.9*b,.6*c);O(a,.86*b,.57*c,.83*b,.55*c,.8*b,.54*c);a.lineTo(.8*b,.7*c);O(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);P(a);N(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.Za(!1);b=a.o;b.B=new L(0,.25);b.C=new L(.8,.77);v.q(a);return b},MultiProcess:function(a,b,c){a=v.s(); N(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);P(a);N(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.Za(!1);b=a.o;b.B=new L(0,.2);b.C=new L(.8,1);v.q(a);return b},OfflineStorage:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=1-a,e=v.s();N(e,0,0,!0);e.lineTo(1* b,0);e.lineTo(.5*b,1*c);P(e);N(e,.5*a*b,a*c,!1);e.lineTo((1-.5*a)*b,a*c);e.Za(!1);b=e.o;b.B=new L(d/4+.5*a,a);b.C=new L(3*d/4+.5*a,a+.5*d);v.q(e);return b},OffPageConnector:function(a,b,c){a=v.s();N(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);P(a);b=a.o;b.B=sb;b.C=new L(.75,1);v.q(a);return b},Or:function(a,b,c){a=v.s();var d=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a, (.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,.5*c,!1);a.lineTo(0,.5*c);a.moveTo(.5*b,1*c);a.lineTo(.5*b,0);a.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b},PaperTape:function(a,b,c){c/=.8;a=v.s();N(a,0,.7*c,!0);a.lineTo(0,.3*c);O(a,.5*b,.6*c,.5*b,0,1*b,.3*c);a.lineTo(1*b,.7*c);O(a,.5*b,.4*c,.5*b,1*c,0,.7*c);P(a);b=a.o;b.B=new L(0,.49);b.C=new L(1,.75);v.q(a);return b},PrimitiveFromCall:function(a,b,c){var d=a?a.Ac:NaN;a=a?a.Mt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=v.s();N(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);P(e);b=e.o;b.B=new L(d,0);b.C=new L(1-a,1);v.q(e);return b},PrimitiveToCall:function(a,b,c){var d=a?a.Ac:NaN;a=a?a.Mt:NaN;isNaN(d)&&(d=.1);isNaN(a)&&(a=.3);var e=v.s();N(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);P(e);b=e.o;b.B=new L(d,0);b.C=new L(1-a,1);v.q(e);return b},Subroutine:"Procedure",Procedure:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0, 1*c);P(d);N(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.Za(!1);b=d.o;b.B=new L(a,0);b.C=new L(1-a,1);v.q(d);return b},Process:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=v.s();N(d,0,0,!0);d.lineTo(1*b,0);d.lineTo(1*b,1*c);d.lineTo(0,1*c);P(d);N(d,a*b,0,!1);d.lineTo(a*b,1*c);d.Za(!1);b=d.o;b.B=new L(a,0);b.C=Eb;v.q(d);return b},Sort:function(a,b,c){a=v.s();N(a,.5*b,0,!0);a.lineTo(1*b,.5*c);a.lineTo(.5*b,1*c);a.lineTo(0,.5*c);P(a);N(a,0,.5*c,!1);a.lineTo(1*b,.5* c);a.Za(!1);b=a.o;b.B=new L(.25,.25);b.C=new L(.75,.5);v.q(a);return b},Start:function(a,b,c){a=v.s();N(a,.25*b,0,!0);N(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);N(a,.25*b,0,!1);a.lineTo(.25*b,1*c);a.moveTo(.75*b,0);a.lineTo(.75*b,1*c);a.Za(!1);b=a.o;b.B=new L(.25,0);b.C=new L(.75,1);v.q(a);return b},Terminator:function(a,b,c){a=v.s();N(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.B=new L(.23,0); b.C=new L(.77,1);v.q(a);return b},TransmittalTape:function(a,b,c){a=a?a.Ac:NaN;isNaN(a)&&(a=.1);var d=v.s();N(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);P(d);b=d.o;b.B=sb;b.C=new L(1,1-a);v.q(d);return b},AndGate:function(a,b,c){a=v.s();var d=.5*$c;N(a,0,0,!0);a.lineTo(.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);a.lineTo(0,1*c);P(a);b=a.o;b.B=sb;b.C=new L(.55,1);v.q(a);return b},Buffer:function(a,b,c){a=v.s();N(a, 0,0,!0);a.lineTo(1*b,.5*c);a.lineTo(0,1*c);P(a);b=a.o;b.B=new L(0,.25);b.C=new L(.5,.75);v.q(a);return b},Clock:function(a,b,c){a=v.s();var d=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(a,1*b,.5*c,!1);a.lineTo(1*b,.5*c);N(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.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b},Ground:function(a,b,c){a=v.s();N(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;v.q(a);return b},Inverter:function(a,b,c){a=v.s();var d=.1*$c;N(a,.8*b,.5*c,!0);a.lineTo(0,1*c);a.lineTo(0,0);a.lineTo(.8*b,.5*c);N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.9+d)*b,.6*c,.9*b,.6*c);O(a,(.9-d)*b,.6*c,.8*b,(.5+d)*c,.8*b,.5*c);O(a,.8*b,(.5-d)*c,(.9-d)*b,.4* c,.9*b,.4*c);O(a,(.9+d)*b,.4*c,1*b,(.5-d)*c,1*b,.5*c);b=a.o;b.B=new L(0,.25);b.C=new L(.4,.75);v.q(a);return b},NandGate:function(a,b,c){a=v.s();var d=.5*$c,e=.4*$c,f=.1*$c;N(a,.8*b,.5*c,!0);O(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);O(a,(.4+d)*b,0,.8*b,(.5-e)*c,.8*b,.5*c);N(a,1*b,.5*c,!0);O(a,1*b,(.5+f)*c,(.9+f)*b,.6*c,.9*b,.6*c);O(a,(.9-f)*b,.6*c,.8*b,(.5+f)*c,.8*b,.5*c);O(a,.8*b,(.5-f)*c,(.9-f)*b,.4*c,.9*b,.4*c);O(a,(.9+f)*b,.4*c,1*b,(.5-f)*c,1*b,.5* c);b=a.o;b.B=new L(0,.05);b.C=new L(.55,.95);v.q(a);return b},NorGate:function(a,b,c){a=v.s();var d=.5,e=$c*d,f=0,h=.5;N(a,.8*b,.5*c,!0);O(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,0,1*c);O(a,.25*b,.75*c,.25*b,.25*c,0,0);O(a,(f+e)*b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*$c;f=.9;h=.5;N(a,(f-d)*b,h*c,!0);O(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);O(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);O(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);O(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.B= new L(.2,.25);b.C=new L(.6,.75);v.q(a);return b},OrGate:function(a,b,c){a=v.s();var d=.5*$c;N(a,0,0,!0);O(a,(0+d+d)*b,0*c,.8*b,(.5-d)*c,1*b,.5*c);O(a,.8*b,(.5+d)*c,(0+d+d)*b,1*c,0,1*c);O(a,.25*b,.75*c,.25*b,.25*c,0,0);P(a);b=a.o;b.B=new L(.2,.25);b.C=new L(.75,.75);v.q(a);return b},XnorGate:function(a,b,c){a=v.s();var d=.5,e=$c*d,f=.2,h=.5;N(a,.1*b,0,!1);O(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);N(a,.8*b,.5*c,!0);O(a,.7*b,(h+e)*c,(f+e)*b,(h+d)*c,.2*b,1*c);O(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);O(a,(f+e)* b,(h-d)*c,.7*b,(h-e)*c,.8*b,.5*c);d=.1;e=.1*$c;f=.9;h=.5;N(a,(f-d)*b,h*c,!0);O(a,(f-d)*b,(h-e)*c,(f-e)*b,(h-d)*c,f*b,(h-d)*c);O(a,(f+e)*b,(h-d)*c,(f+d)*b,(h-e)*c,(f+d)*b,h*c);O(a,(f+d)*b,(h+e)*c,(f+e)*b,(h+d)*c,f*b,(h+d)*c);O(a,(f-e)*b,(h+d)*c,(f-d)*b,(h+e)*c,(f-d)*b,h*c);b=a.o;b.B=new L(.4,.25);b.C=new L(.65,.75);v.q(a);return b},XorGate:function(a,b,c){a=v.s();var d=.5*$c;N(a,.1*b,0,!1);O(a,.35*b,.25*c,.35*b,.75*c,.1*b,1*c);N(a,.2*b,0,!0);O(a,(.2+d)*b,0*c,.9*b,(.5-d)*c,1*b,.5*c);O(a,.9*b,(.5+d)* c,(.2+d)*b,1*c,.2*b,1*c);O(a,.45*b,.75*c,.45*b,.25*c,.2*b,0);P(a);b=a.o;b.B=new L(.4,.25);b.C=new L(.8,.75);v.q(a);return b},Capacitor:function(a,b,c){a=v.s();N(a,0,0,!1);a.lineTo(0,1*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;v.q(a);return b},Resistor:function(a,b,c){a=v.s();N(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;v.q(a);return b},Inductor:function(a,b,c){a=v.s();var d=.1*$c,e=.1;N(a,(e-.5* d)*b,c,!1);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.3;O(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.5;O(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.7;O(a,(e+.1)*b,0,(e+d)*b,c,e*b,c);O(a,(e-d)*b,c,(e-.1)*b,0,(e+.1)*b,0);e=.9;O(a,(e+.1)*b,0,(e+d)*b,c,(e+.5*d)*b,c);b=a.o;v.q(a);return b},ACvoltageSource:function(a,b,c){a=v.s();var d=.5*$c;N(a,0*b,.5*c,!1);O(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);O(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);O(a,1*b,(.5+d)* c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b,.5*c);a.moveTo(.1*b,.5*c);O(a,.5*b,0*c,.5*b,1*c,.9*b,.5*c);b=a.o;b.Jd=Si;v.q(a);return b},DCvoltageSource:function(a,b,c){a=v.s();N(a,0,.75*c,!1);a.lineTo(0,.25*c);a.moveTo(1*b,0);a.lineTo(1*b,1*c);b=a.o;v.q(a);return b},Diode:function(a,b,c){a=v.s();N(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.B=new L(0,.25);b.C=new L(.5,.75);v.q(a);return b},Wifi:function(a,b,c){var d=b,e=c; b*=.38;c*=.6;a=v.s();var f=.8*$c,h=.8,k=0,l=.5,d=(d-b)/2,e=(e-c)/2;N(a,k*b+d,(l+h)*c+e,!0);O(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);O(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(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);O(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);P(a);f=.4*$c;h=.4;k=.2;l=.5;N(a,k*b+d,(l+h)*c+e,!0);O(a,(k-f)*b+d,(l+h)*c+e,(k-h)*b+d,(l+f)*c+e,(k-h)*b+d,l*c+e);O(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k* b+d,(l-h)*c+e);O(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);O(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);P(a);f=.2*$c;h=.2;l=k=.5;N(a,(k-h)*b+d,l*c+e,!0);O(a,(k-h)*b+d,(l-f)*c+e,(k-f)*b+d,(l-h)*c+e,k*b+d,(l-h)*c+e);O(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);O(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(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*$c;h=.4;k=.8;l=.5;N(a,k*b+d,(l-h)*c+e,!0);O(a,(k+f)*b+d,(l- h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);O(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(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);O(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);P(a);f=.8*$c;h=.8;k=1;l=.5;N(a,k*b+d,(l-h)*c+e,!0);O(a,(k+f)*b+d,(l-h)*c+e,(k+h)*b+d,(l-f)*c+e,(k+h)*b+d,l*c+e);O(a,(k+h)*b+d,(l+f)*c+e,(k+f)*b+d,(l+h)*c+e,k*b+d,(l+h)*c+e);O(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);O(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);P(a);b=a.o;v.q(a);return b},Email:function(a,b,c){a=v.s();N(a,0,0,!0);a.lineTo(1*b,0);a.lineTo(1*b,1*c);a.lineTo(0,1*c);a.lineTo(0,0);P(a);N(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.Za(!1);b=a.o;v.q(a);return b},Ethernet:function(a,b,c){a=v.s();N(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);P(a);N(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);P(a);N(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);P(a);N(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.Za(!1);b=a.o;v.q(a);return b},Power:function(a,b,c){a=v.s();var d=.4*$c,e=.4,f=v.L(),h=v.L(),k=v.L(),l=v.L();$d(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);var m=v.Mb(h.x, h.y);N(a,h.x*b,h.y*c,!0);O(a,k.x*b,k.y*c,l.x*b,l.y*c,(.5+e)*b,.5*c);O(a,(.5+e)*b,(.5+d)*c,(.5+d)*b,(.5+e)*c,.5*b,(.5+e)*c);O(a,(.5-d)*b,(.5+e)*c,(.5-e)*b,(.5+d)*c,(.5-e)*b,.5*c);$d(.5-e,.5,.5-e,.5-d,.5-d,.5-e,.5,.5-e,.5,k,l,h,f,f);O(a,k.x*b,k.y*c,l.x*b,l.y*c,h.x*b,h.y*c);d=.3*$c;e=.3;$d(.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);O(a,l.x*b,l.y*c,k.x*b,k.y*c,(.5-e)*b,.5*c);O(a,(.5-e)*b,(.5+d)*c,(.5-d)*b,(.5+e)*c,.5*b,(.5+e)*c);O(a,(.5+d)*b,(.5+e)*c,(.5+e)*b,(.5+d)*c,(.5+ e)*b,.5*c);$d(.5,.5-e,.5+d,.5-e,.5+e,.5-d,.5+e,.5,.5,f,f,h,k,l);O(a,l.x*b,l.y*c,k.x*b,k.y*c,h.x*b,h.y*c);P(a);N(a,.45*b,0,!0);a.lineTo(.45*b,.5*c);a.lineTo(.55*b,.5*c);a.lineTo(.55*b,0);P(a);v.v(f);v.v(h);v.v(k);v.v(l);v.v(m);b=a.o;b.B=new L(.25,.55);b.C=new L(.75,.8);v.q(a);return b},Fallout:function(a,b,c){a=v.s();var d=.5*$c;N(a,0*b,.5*c,!0);O(a,0*b,(.5-d)*c,(.5-d)*b,0*c,.5*b,0*c);O(a,(.5+d)*b,0*c,1*b,(.5-d)*c,1*b,.5*c);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0*b,(.5+d)*c,0*b, .5*c);var e=d=0;N(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;P(a);N(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;P(a);N(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);P(a);b=a.o;b.Jd=Si;v.q(a);return b},IrritationHazard:function(a,b,c){a=v.s();N(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);P(a);b=a.o;b.B=new L(.3,.3);b.C=new L(.7,.7);v.q(a);return b},ElectricalHazard:function(a,b,c){a=v.s();N(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);P(a);b=a.o;v.q(a);return b},FireHazard:function(a,b,c){a=v.s();N(a,.1*b,1*c,!0);O(a,-.25*b,.63*c,.45*b,.44*c,.29*b,0*c);O(a,.48*b,.17*c,.54*b,.35*c,.51*b,.42*c);O(a,.59*b,.29*c,.58*b,.28*c,.59*b,.18*c);O(a,.8*b,.34*c,.88*b,.43*c,.75*b,.6*c);O(a,.87*b,.48*c,.88*b,.43*c,.88*b,.31*c);O(a,1.17*b,.76*c,.82*b,.8*c,.9*b,1*c);P(a);b=a.o;b.B=new L(.05,.645);b.C=new L(.884,.908);v.q(a);return b},BpmnActivityLoop:function(a,b,c){a=v.s();var d=4*(Math.SQRT2-1)/3*.5;N(a,.65*b,1*c, !1);O(a,(1-d+0)*b,1*c,1*b,(.5+d+0)*c,1*b,.5*c);O(a,1*b,(.5-d+0)*c,(.5+d+0)*b,0*c,.5*b,0*c);O(a,(.5-d+0)*b,0*c,0*b,(.5-d+0)*c,0*b,.5*c);O(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;v.q(a);return b},BpmnActivityParallel:function(a,b,c){a=v.s();N(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;v.q(a);return b},BpmnActivitySequential:function(a,b,c){a=v.s();N(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;v.q(a);return b},BpmnActivityAdHoc:function(a,b,c){a=v.s();N(a,0,0,!1);N(a,1*b,1*c,!1);N(a,0,.5*c,!1);O(a,.2*b,.35*c,.3*b,.35*c,.5*b,.5*c);O(a,.7*b,.65*c,.8*b,.65*c,1*b,.5*c);b=a.o;v.q(a);return b},BpmnActivityCompensation:function(a,b,c){a=v.s();N(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);P(a);b=a.o;v.q(a);return b},BpmnTaskMessage:function(a, b,c){a=v.s();N(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);P(a);N(a,0,.2*c,!1);a.lineTo(.5*b,.5*c);a.lineTo(1*b,.2*c);a.Za(!1);b=a.o;v.q(a);return b},BpmnTaskScript:function(a,b,c){a=v.s();N(a,.7*b,1*c,!0);a.lineTo(.3*b,1*c);O(a,.6*b,.5*c,0,.5*c,.3*b,0);a.lineTo(.7*b,0);O(a,.4*b,.5*c,1*b,.5*c,.7*b,1*c);P(a);N(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.Za(!1);b=a.o;v.q(a);return b}, BpmnTaskUser:function(a,b,c){a=v.s();N(a,0,0,!1);N(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);O(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);O(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;O(a,(.5-(e+d)/2)*b,(d+(d+f)/2)*c,(.5-d)*b,(d+f)*c,(.5-d)*b,d*c);O(a,(.5-d)*b,(d-f)*c,(.5-e)*b,(d-d)*c,.5*b,(d-d)*c); O(a,(.5+e)*b,(d-d)*c,(.5+d)*b,(d-f)*c,(.5+d)*b,d*c);O(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);N(a,.2*b,1*c,!1);a.lineTo(.2*b,.8*c);N(a,.8*b,1*c,!1);a.lineTo(.8*b,.8*c);b=a.o;v.q(a);return b},BpmnEventConditional:function(a,b,c){a=v.s();N(a,.1*b,0,!0);a.lineTo(.9*b,0);a.lineTo(.9*b,1*c);a.lineTo(.1*b,1*c);P(a);N(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.Za(!1);b=a.o;v.q(a);return b},BpmnEventError:function(a,b,c){a=v.s();N(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);P(a);b=a.o;v.q(a);return b},BpmnEventEscalation:function(a,b,c){a=v.s();N(a,0,0,!1);N(a,1*b,1*c,!1);N(a,.1*b,1*c,!0);a.lineTo(.5*b,0);a.lineTo(.9*b,1*c);a.lineTo(.5*b,.5*c);P(a);b=a.o;v.q(a);return b},BpmnEventTimer:function(a,b,c){a= v.s();var d=.5*$c;N(a,1*b,.5*c,!0);O(a,1*b,(.5+d)*c,(.5+d)*b,1*c,.5*b,1*c);O(a,(.5-d)*b,1*c,0,(.5+d)*c,0,.5*c);O(a,0,(.5-d)*c,(.5-d)*b,0,.5*b,0);O(a,(.5+d)*b,0,1*b,(.5-d)*c,1*b,.5*c);N(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.Za(!1);b=a.o;b.Jd=Si;v.q(a);return b}},Xo;for(Xo in lo)lo[Xo.toLowerCase()]=Xo; var Yo={"":"",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 po(a){if(null!==Yo){for(var b in Yo){var c=$e(Yo[b],!1);Jd[b]=c;b.toLowerCase()!==b&&(Jd[b.toLowerCase()]=b)}Yo=null}b=Jd[a];if(void 0===b){b=a.toLowerCase();if("none"===b)return"None";b=Jd[b]}return"string"===typeof b?b:b instanceof ve?a:null} function R(a){0===arguments.length?D.call(this):D.call(this,a);this.Q=311807;this.Jk=this.di="";this.Yr=this.Vr=this.hs=this.dr=null;this.ks="";this.bi=this.js=this.pm=null;this.Xr="";this.no=null;this.Wr=Ed;this.Zr="";this.oo=null;this.le="";this.lv=this.fq=this.uk=null;this.wi=(new z(NaN,NaN)).freeze();this.ir="";this.Ok=null;this.jr=sb;this.sr=nd;this.lr=od;this.yq=null;this.er=Zo;this.rm=md;this.qm="gray";this.ng=4;this.aC=-1;this.Ms=NaN;this.CF=new B;this.em=null;this.zj=NaN}v.Ja(R,D); v.ea("Part",R);R.prototype.cloneProtected=function(a){D.prototype.cloneProtected.call(this,a);a.Q=this.Q&-4097|49152;a.di=this.di;a.Jk=this.Jk;a.dr=this.dr;a.hs=this.hs;a.Vr=this.Vr;a.Yr=this.Yr;a.ks=this.ks;a.js=this.js;a.bi=null;a.Xr=this.Xr;a.Wr=this.Wr.R();a.Zr=this.Zr;a.le=this.le;a.fq=this.fq;a.wi.assign(this.wi);a.ir=this.ir;a.jr=this.jr.R();a.sr=this.sr.R();a.lr=this.lr.R();a.yq=this.yq;a.er=this.er;a.rm=this.rm.R();a.qm=this.qm;a.ng=this.ng;a.Ms=this.Ms}; R.prototype.Vh=function(a){D.prototype.Vh.call(this,a);a.rl();a.pm=null;a.no=null;a.oo=null;a.Ok=null;a.em=null};R.prototype.toString=function(){var a=v.af(Object.getPrototypeOf(this))+"#"+v.ld(this);null!==this.data&&(a+="("+Df(this.data)+")");return a};R.LayoutNone=0;var nl;R.LayoutAdded=nl=1;var vl;R.LayoutRemoved=vl=2;R.LayoutShown=4;R.LayoutHidden=8;R.LayoutNodeSized=16;var Zl;R.LayoutGroupLayout=Zl=32;R.LayoutNodeReplaced=64;var Zo;R.LayoutStandard=Zo=nl|vl|28|Zl|64;R.LayoutAll=16777215; R.prototype.Zm=function(a,b,c,d,e,f,h){var k=this.g;null!==k&&(a===Bf&&"elements"===b?e instanceof D?ol(e,function(a){ql(k,a);pl(k,a)}):e instanceof mk&&Ll(k,e):a===Cf&&"elements"===b&&(e instanceof D?ol(e,function(a){ul(k,a);tl(k,a)}):e instanceof mk&&Ml(k,e)),k.Lc(a,b,c,d,e,f,h))};R.prototype.updateTargetBindings=R.prototype.Hb=function(a){D.prototype.Hb.call(this,a);if(null!==this.data){a=this.za.n;for(var b=a.length,c=0;ch&&a.y>k&&a.righth&&b.y>k&&b.right=c.NH)){this.Q^=4096;var d=!1;if(null!==c){d=c.tb;c.tb=!0;var e=c.selection;e.Oa();a?e.add(this):e.remove(this);e.freeze()}this.h("isSelected",b,a);this.Nd();a=this.wI;null!==a&&a(this);null!==c&&(c.ue(),c.tb=d)}}}); v.defineProperty(R,{fh:"isHighlighted"},function(){return 0!==(this.Q&524288)},function(a){var b=0!==(this.Q&524288);if(b!==a){this.Q^=524288;var c=this.g;null!==c&&(c=c.Pm,c.Oa(),a?c.add(this):c.remove(this),c.freeze());this.h("isHighlighted",b,a);this.pa()}});v.defineProperty(R,{wl:"isShadowed"},function(){return 0!==(this.Q&8192)},function(a){var b=0!==(this.Q&8192);b!==a&&(this.Q^=8192,this.h("isShadowed",b,a),this.pa())});function gl(a){return 0!==(a.Q&32768)} function ap(a,b){a.Q=b?a.Q|32768:a.Q&-32769}function Im(a,b){a.Q=b?a.Q|65536:a.Q&-65537}function Yj(a){return 0!==(a.Q&131072)}R.prototype.yf=function(a){this.Q=a?this.Q|131072:this.Q&-131073};function hp(a,b){a.Q=b?a.Q|1048576:a.Q&-1048577}v.defineProperty(R,{aE:"isAnimated"},function(){return 0!==(this.Q&262144)},function(a){var b=0!==(this.Q&262144);b!==a&&(this.Q^=262144,this.h("isAnimated",b,a))}); v.defineProperty(R,{lA:"selectionObjectName"},function(){return this.ks},function(a){var b=this.ks;b!==a&&(this.ks=a,this.pm=null,this.h("selectionObjectName",b,a))});v.defineProperty(R,{vI:"selectionAdornmentTemplate"},function(){return this.hs},function(a){var b=this.hs;b!==a&&(this instanceof W&&(a.type=Ai),this.hs=a,this.h("selectionAdornmentTemplate",b,a))}); v.u(R,{Wt:"selectionObject"},function(){if(null===this.pm){var a=this.lA;null!==a&&""!==a?(a=this.be(a),this.pm=null!==a?a:this):this instanceof W?(a=this.path,this.pm=null!==a?a:this):this.pm=this}return this.pm});v.defineProperty(R,{wI:"selectionChanged"},function(){return this.js},function(a){var b=this.js;b!==a&&(null!==a&&v.j(a,"function",R,"selectionChanged"),this.js=a,this.h("selectionChanged",b,a))}); v.defineProperty(R,{LE:"resizeAdornmentTemplate"},function(){return this.Vr},function(a){var b=this.Vr;b!==a&&(this.Vr=a,this.h("resizeAdornmentTemplate",b,a))});v.defineProperty(R,{NE:"resizeObjectName"},function(){return this.Xr},function(a){var b=this.Xr;b!==a&&(this.Xr=a,this.no=null,this.h("resizeObjectName",b,a))});v.u(R,{ME:"resizeObject"},function(){if(null===this.no){var a=this.NE;null!==a&&""!==a?(a=this.be(a),this.no=null!==a?a:this):this.no=this}return this.no}); v.defineProperty(R,{lI:"resizeCellSize"},function(){return this.Wr},function(a){var b=this.Wr;b.K(a)||(this.Wr=a=a.R(),this.h("resizeCellSize",b,a))});v.defineProperty(R,{oI:"rotateAdornmentTemplate"},function(){return this.Yr},function(a){var b=this.Yr;b!==a&&(this.Yr=a,this.h("rotateAdornmentTemplate",b,a))});v.defineProperty(R,{pI:"rotateObjectName"},function(){return this.Zr},function(a){var b=this.Zr;b!==a&&(this.Zr=a,this.oo=null,this.h("rotateObjectName",b,a))}); v.u(R,{PE:"rotateObject"},function(){if(null===this.oo){var a=this.pI;null!==a&&""!==a?(a=this.be(a),this.oo=null!==a?a:this):this.oo=this}return this.oo});v.defineProperty(R,{text:"text"},function(){return this.le},function(a){var b=this.le;b!==a&&(this.le=a,this.h("text",b,a))}); v.defineProperty(R,{Ta:"containingGroup"},function(){return this.uk},function(a){if(this.Od()){var b=this.uk;if(b!==a){null===a||this!==a&&!a.Xh(this)||(this===a&&v.k("Cannot make a Group a member of itself: "+this.toString()),v.k("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString()));this.H(vl);var c=this.g;null!==b?ip(b,this):this instanceof V&&null!==c&&c.Vk.remove(this);this.uk=a;null!==a?jp(a,this):this instanceof V&&null!==c&&c.Vk.add(this);this.H(nl); if(null!==c){var d=this.data,e=c.ba;null!==d&&e instanceof Q&&e.lx(d,e.gb(null!==a?a.data:null))}d=this.uD;null!==d&&(e=!0,null!==c&&(e=c.Ra,c.Ra=!0),d(this,b,a),null!==c&&(c.Ra=e));if(this instanceof V)for(c=new J(R),Rg(c,this,!0,0,!0),c=c.i;c.next();)if(d=c.value,d instanceof S)for(d=d.te;d.next();)Ol(d.value);if(this instanceof S)for(d=this.te;d.next();)Ol(d.value);this.h("containingGroup",b,a);null!==a&&(b=a.layer,null!==b&&dk(b,-1,a))}}else v.k("cannot set the Part.containingGroup of a Link or Adornment")}); g=R.prototype;g.rl=function(){var a=this.Ta;null!==a&&(a.P(),null!==a.Gb&&a.Gb.P(),a.cf())};g.pa=function(){var a=this.g;null!==a&&!fl(this)&&!gl(this)&&this.isVisible()&&this.mc.G()&&a.pa(ck(this,this.mc))};g.qt=function(a){a||(a=this.uk,null!==a&&jp(a,this))};g.rt=function(a){a||(a=this.uk,null!==a&&ip(a,this))};g.Km=function(){var a=this.data;if(null!==a){var b=this.g;null!==b&&(b=b.ba,null!==b&&b.ex(a))}}; v.defineProperty(R,{uD:"containingGroupChanged"},function(){return this.fq},function(a){var b=this.fq;b!==a&&(null!==a&&v.j(a,"function",R,"containingGroupChanged"),this.fq=a,this.h("containingGroupChanged",b,a))});R.prototype.findSubGraphLevel=function(){return kp(this,this)};function kp(a,b){var c=b.Ta;return null!==c?1+kp(a,c):b instanceof S&&(c=b.ee,null!==c)?kp(a,c):0}R.prototype.findTopLevelPart=function(){return lp(this,this)}; function lp(a,b){var c=b.Ta;return null!==c?lp(a,c):b instanceof S&&(c=b.ee,null!==c)?lp(a,c):b}v.u(R,{fp:"isTopLevel"},function(){return null!==this.Ta||this instanceof S&&this.uf?!1:!0});R.prototype.isMemberOf=R.prototype.Xh=function(a){return a instanceof V?mp(this,this,a):!1};function mp(a,b,c){if(b===c||null===c)return!1;var d=b.Ta;return null===d||d!==c&&!mp(a,d,c)?b instanceof S&&(b=b.ee,null!==b)?mp(a,b,c):!1:!0} R.prototype.findCommonContainingGroup=R.prototype.OG=function(a){if(null===a)return null;if(this===a)return this.Ta;for(var b=this;null!==b;)b instanceof V&&hp(b,!0),b=b.Ta;for(var c=null,b=a;null!==b;){if(0!==(b.Q&1048576)){c=b;break}b=b.Ta}for(b=this;null!==b;)b instanceof V&&hp(b,!1),b=b.Ta;return c};v.defineProperty(R,{CH:"layoutConditions"},function(){return this.er},function(a){var b=this.er;b!==a&&(this.er=a,this.h("layoutConditions",b,a))}); R.prototype.canLayout=function(){if(!this.kE||!this.isVisible())return!1;var a=this.layer;return null!==a&&a.Gc||this instanceof S&&this.uf?!1:!0};R.prototype.invalidateLayout=R.prototype.H=function(a){void 0===a&&(a=16777215);var b;this.kE&&0!==(a&this.CH)?(b=this.layer,null!==b&&b.Gc||this instanceof S&&this.uf?b=!1:(b=this.g,b=null!==b&&b.la.ib?!1:!0)):b=!1;if(b)if(b=this.uk,null!==b){var c=b.Pb;null!==c?c.H():b.H(a)}else a=this.g,null!==a&&(c=a.Pb,null!==c&&c.H())}; function sl(a){if(!a.isVisible())return!1;a=a.layer;return null!==a&&a.Gc?!1:!0}v.defineProperty(R,{FD:"dragComputation"},function(){return this.yq},function(a){var b=this.yq;b!==a&&(null!==a&&v.j(a,"function",R,"dragComputation"),this.yq=a,this.h("dragComputation",b,a))});v.defineProperty(R,{AI:"shadowOffset"},function(){return this.rm},function(a){var b=this.rm;b.K(a)||(this.rm=a=a.R(),this.pa(),this.h("shadowOffset",b,a))}); v.defineProperty(R,{shadowColor:"shadowColor"},function(){return this.qm},function(a){var b=this.qm;b!==a&&(this.qm=a,this.pa(),this.h("shadowColor",b,a))});v.defineProperty(R,{shadowBlur:"shadowBlur"},function(){return this.ng},function(a){var b=this.ng;b!==a&&(this.ng=a,this.pa(),this.h("shadowBlur",b,a))});function Sg(a){0===arguments.length?R.call(this,Vi):R.call(this,a);this.Q&=-257;this.Jk="Adornment";this.Gb=this.Lg=this.Db=null}v.Ja(Sg,R);v.ea("Adornment",Sg); Sg.prototype.toString=function(){var a=this.Lf;return"Adornment("+this.fc+")"+(null!==a?a.toString():"")};Sg.prototype.updateRelationshipsFromData=function(){};Sg.prototype.Um=function(a){var b=this.Zb.Y,c=this.Zb;if(b instanceof W&&c instanceof Y){var d=b.path,c=d.Sa;b.Um(a);c=d.Sa;a=this.za.n;b=a.length;for(d=0;da&&(a=1);var b=this.g;if(null!==b&&!b.eh){b.eh=!0;var c=new J(S);c.add(this);yp(this,c,b.Pd,a,b.Na,this,b.zA===jk);b.eh=!1}}; function yp(a,b,c,d,e,f,h){if(1a&&(a=2);var b=this.g;if(null!==b&&!b.eh){b.eh=!0;var c=new J(S);c.add(this);Ap(this,c,b.Pd,a,b.Na,this,b.zA===jk);b.eh=!1}};function Ap(a,b,c,d,e,f,h){for(var k=f===a?!1:a.md,l=c?a.Aw():a.vg();l.next();){var m=l.value;m.Hc&&(k||m.qg||m.ic(),m=m.yz(a),null!==m&&m!==a&&!b.contains(m)&&(b.add(m),k||(m.nd(!0),m.rl(),h&&Uj(e,m,f)),2a&&(a-=180);break;case Gp:a=re(c+90);90a&&(a-=180);break;case Hp:a=re(c-90);90a&&(a-=180);break;case Ip:a=re(c);if(45a||225a)return 0;90a&&(a-=180)}return re(a)}; v.defineProperty(W,{T:"fromNode"},function(){return this.dg},function(a){var b=this.dg;if(b!==a){var c=this.kd;null!==b&&(this.pg!==b&&vp(b,this,c),Jp(this),this.H(vl));this.dg=a;null!==a&&this.nd(a.isVisible());this.pi=null;this.ic();var d=this.g;if(null!==d){var e=this.data,f=d.ba;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.kx(e,f.gb(h))}else f instanceof Of&&(h=null!==a?a.data:null,d.Pd?f.oh(e,f.gb(h)):(null!==b&&f.oh(b.data,void 0),f.oh(h,f.gb(null!==this.pg?this.pg.data:null))))}e= this.kd;f=this.QD;null!==f&&(h=!0,null!==d&&(h=d.Ra,d.Ra=!0),f(this,c,e),null!==d&&(d.Ra=h));null!==a&&(this.pg!==a&&up(a,this,e),Kp(this),this.H(nl));this.h("fromNode",b,a);Ol(this)}}); v.defineProperty(W,{wg:"fromPortId"},function(){return this.zh},function(a){var b=this.zh;if(b!==a){var c=this.kd;null!==c&&tp(this.T,c);Jp(this);this.zh=a;var d=this.kd;null!==d&&tp(this.T,d);var e=this.g;if(null!==e){var f=this.data,h=e.ba;null!==f&&h instanceof Q&&h.nA(f,a)}c!==d&&(this.pi=null,this.ic(),f=this.QD,null!==f&&(h=!0,null!==e&&(h=e.Ra,e.Ra=!0),f(this,c,d),null!==e&&(e.Ra=h)));Kp(this);this.h("fromPortId",b,a)}});v.u(W,{kd:"fromPort"},function(){var a=this.dg;return null===a?null:a.kl(this.zh)}); v.defineProperty(W,{QD:"fromPortChanged"},function(){return this.Gq},function(a){var b=this.Gq;b!==a&&(null!==a&&v.j(a,"function",W,"fromPortChanged"),this.Gq=a,this.h("fromPortChanged",b,a))}); v.defineProperty(W,{Z:"toNode"},function(){return this.pg},function(a){var b=this.pg;if(b!==a){var c=this.Sd;null!==b&&(this.dg!==b&&vp(b,this,c),Jp(this),this.H(vl));this.pg=a;null!==a&&this.nd(a.isVisible());this.pi=null;this.ic();var d=this.g;if(null!==d){var e=this.data,f=d.ba;if(null!==e)if(f instanceof Q){var h=null!==a?a.data:null;f.ox(e,f.gb(h))}else f instanceof Of&&(h=null!==a?a.data:null,d.Pd?(null!==b&&f.oh(b.data,void 0),f.oh(h,f.gb(null!==this.dg?this.dg.data:null))):f.oh(e,f.gb(h)))}e= this.Sd;f=this.hF;null!==f&&(h=!0,null!==d&&(h=d.Ra,d.Ra=!0),f(this,c,e),null!==d&&(d.Ra=h));null!==a&&(this.dg!==a&&up(a,this,e),Kp(this),this.H(nl));this.h("toNode",b,a);Ol(this)}}); v.defineProperty(W,{qh:"toPortId"},function(){return this.Rh},function(a){var b=this.Rh;if(b!==a){var c=this.Sd;null!==c&&tp(this.Z,c);Jp(this);this.Rh=a;var d=this.Sd;null!==d&&tp(this.Z,d);var e=this.g;if(null!==e){var f=this.data,h=e.ba;null!==f&&h instanceof Q&&h.qA(f,a)}c!==d&&(this.pi=null,this.ic(),f=this.hF,null!==f&&(h=!0,null!==e&&(h=e.Ra,e.Ra=!0),f(this,c,d),null!==e&&(e.Ra=h)));Kp(this);this.h("toPortId",b,a)}});v.u(W,{Sd:"toPort"},function(){var a=this.pg;return null===a?null:a.kl(this.Rh)}); v.defineProperty(W,{hF:"toPortChanged"},function(){return this.Ds},function(a){var b=this.Ds;b!==a&&(null!==a&&v.j(a,"function",W,"toPortChanged"),this.Ds=a,this.h("toPortChanged",b,a))});v.defineProperty(W,{xb:"fromSpot"},function(){return null!==this.ga?this.ga.pj:fc},function(a){this.Me();var b=this.ga.pj;b.K(a)||(a=a.R(),this.ga.pj=a,this.h("fromSpot",b,a),this.ic())}); v.defineProperty(W,{ml:"fromEndSegmentLength"},function(){return null!==this.ga?this.ga.nj:NaN},function(a){this.Me();var b=this.ga.nj;b!==a&&(0>a&&v.va(a,">= 0",W,"fromEndSegmentLength"),this.ga.nj=a,this.h("fromEndSegmentLength",b,a),this.ic())});v.defineProperty(W,{kt:"fromEndSegmentDirection"},function(){return null!==this.ga?this.ga.mj:op},function(a){this.Me();var b=this.ga.mj;b!==a&&(this.ga.mj=a,this.h("fromEndSegmentDirection",b,a),this.ic())}); v.defineProperty(W,{lt:"fromShortLength"},function(){return null!==this.ga?this.ga.oj:NaN},function(a){this.Me();var b=this.ga.oj;b!==a&&(this.ga.oj=a,this.h("fromShortLength",b,a),this.ic())});v.defineProperty(W,{yb:"toSpot"},function(){return null!==this.ga?this.ga.Qj:fc},function(a){this.Me();var b=this.ga.Qj;b.K(a)||(a=a.R(),this.ga.Qj=a,this.h("toSpot",b,a),this.ic())}); v.defineProperty(W,{Gl:"toEndSegmentLength"},function(){return null!==this.ga?this.ga.Oj:NaN},function(a){this.Me();var b=this.ga.Oj;b!==a&&(0>a&&v.va(a,">= 0",W,"toEndSegmentLength"),this.ga.Oj=a,this.h("toEndSegmentLength",b,a),this.ic())});v.defineProperty(W,{eu:"toEndSegmentDirection"},function(){return null!==this.ga?this.ga.Nj:op},function(a){this.Me();var b=this.ga.Nj;b!==a&&(this.ga.Nj=a,this.h("toEndSegmentDirection",b,a),this.ic())}); v.defineProperty(W,{fu:"toShortLength"},function(){return null!==this.ga?this.ga.Pj:NaN},function(a){this.Me();var b=this.ga.Pj;b!==a&&(this.ga.Pj=a,this.h("toShortLength",b,a),this.ic())});function Ol(a){var b=a.T,c=a.Z;null!==b?null!==c?Lp(a,b.OG(c)):Lp(a,null):Lp(a,null)}function Lp(a,b){var c=a.uk;if(c!==b){null!==c&&ip(c,a);a.uk=b;null!==b&&jp(b,a);var d=a.uD;if(null!==d){var e=!0,f=a.g;null!==f&&(e=f.Ra,f.Ra=!0);d(a,c,b);null!==f&&(f.Ra=e)}!a.qg||a.IC!==c&&a.KC!==c||a.ic()}} W.prototype.rl=function(){var a=this.Ta;null!==a&&this.T!==a&&this.Z!==a&&a.qw&&R.prototype.rl.call(this)};W.prototype.getOtherNode=W.prototype.yz=function(a){var b=this.T;return a===b?this.Z:b};W.prototype.getOtherPort=function(a){var b=this.kd;return a===b?this.Sd:b};v.u(W,{UJ:"isLabeledLink"},function(){return null===this.Ce?!1:0=d&&(h=d-1);var l=this.l(h-1),f=this.l(h);Yd(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.ej(f),h=2;hc&&(c=-c)):Hc(c.y,d.y)?(c=d.x-c.x,0>c&&(c=-c)):c=Math.sqrt(c.rf(d)),f.push(c),e+=c;for(d=h=c=0;ce/2)break;c+=d;h++}v.sa(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};v.u(W,{uE:"midAngle"},function(){this.fn();return this.computeMidAngle()}); W.prototype.computeMidAngle=function(){var a=this.oa;if(2>a)return NaN;if(this.computeCurve()===Ki&&4<=a&&!this.jc){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 Va(((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))?e>c+10?d.xc(a):b.xc(a):b.xc(d);b=this.l(c-1);d=this.l(c);a=this.l(c+1);c=b.rf(d);e=d.rf(a);return c>e+10?b.xc(d):e>c+10?d.xc(a):b.xc(a)}; v.defineProperty(W,{points:"points"},function(){return this.Zc},function(a){var b=this.Zc;if(b!==a){var c=null;if(Array.isArray(a)){var d=0===a.length%2;if(d)for(var e=0;ep&&(t-=180));0>t?t+=360:360<=t&&(t-=360);k&&(u+=Math.abs(p));0===t?r=u:90===t?s=u:180===t?r=-u:270===t?s=-u:(r=u*Math.cos(t*Math.PI/180),s=u*Math.sin(t*Math.PI/180));if(f.se()&&k){var y=c.Ya(zb,v.L()),w=v.Mb(y.x+1E3*r,y.y+1E3*s);this.getLinkPointFromPoint(b,c,y,w,!0,q);v.v(y); v.v(w)}}var u=this.getLinkPoint(d,e,h,!1,l,b,c),x=0,A=0,H=0;if(l||h!==rb||k)y=this.computeEndSegmentLength(d,e,h,!1),H=this.getLinkDirection(d,e,u,h,!1,l,b,c),k&&(H+=l?0:30,0>p&&(H+=180)),0>H?H+=360:360<=H&&(H-=360),k&&(y+=Math.abs(p)),0===H?x=y:90===H?A=y:180===H?x=-y:270===H?A=-y:(x=y*Math.cos(H*Math.PI/180),A=y*Math.sin(H*Math.PI/180)),h.se()&&k&&(y=e.Ya(zb,v.L()),w=v.Mb(y.x+1E3*x,y.y+1E3*A),this.getLinkPointFromPoint(d,e,y,w,!1,u),v.v(y),v.v(w));e=q;if(l||f!==rb||k)e=new z(q.x+r,q.y+s);c=u;if(l|| h!==rb||k)c=new z(u.x+x,u.y+A);!n&&!l&&f===rb&&3k&&(m=-m),r=(0>h?-1:1)*m+q,s=l*(r-q)+t),q=a.x+2*f/3,t=a.y+2*h/3,u=q,x=t,K(h,0)?x=0h?-1:1)*m+q,x=l*(u- q)+t),this.No(),this.Sh(a),this.Zk(r,s),this.Zk(u,x),this.Sh(n),this.zf(0,this.getLinkPoint(b,c,rb,!0,!1,d,e)),this.zf(3,this.getLinkPoint(d,e,rb,!1,!1,b,c))):(a=d,d=this.getLinkPoint(b,c,rb,!0,!1,a,e),e=this.getLinkPoint(a,e,rb,!1,!1,b,c),this.hasCurviness()?(h=e.x-d.x,b=e.y-d.y,c=this.computeCurviness(),a=d.x+h/2,n=d.y+b/2,f=a,k=n,K(b,0)?k=0c&&(f=-f),f=(0>b?-1:1)*f+a,k=h*(f-a)+n),this.Sh(d),this.Zk(f,k)):this.Sh(d),this.Sh(e)));return!0}; function Rp(a,b){Math.abs(b.x-a.x)>Math.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.S;null===e||e.Kg()||(e=e.S);if(null===e)e=d.x,h=d.y,k=c.x,l=c.y;else{a=e.Yg;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.$o(e,h,k,l, f);null!==a&&f.transform(a);return f};function Sp(a,b){var c=b.Mr;null===c&&(c=new Tp,c.port=b,c.Jc=b.Y,b.Mr=c);return Up(c,a)} W.prototype.getLinkPoint=function(a,b,c,d,e,f,h,k){void 0===k&&(k=new z);if(c.bd())return b.Ya(c,k),k;if(c.Vi()&&(c=Sp(this,b),null!==c)){k.assign(c.jp);if(e&&this.hx===Bp){var l=Sp(this,h);if(null!==l&&c.Im=m.x&&a.x<=m.x+m.width?k.x=a.x:a.y>=m.y&&a.y<=m.y+m.height&&(k.y=a.y);v.v(c);v.v(l)}}return k}f=b.Ya(zb,v.L());l=c=null;this.oa>(e?6:2)?(l=d?this.l(1):this.l(this.oa-2),e&& (l=Rp(f,l.copy()))):(c=v.L(),l=h.Ya(zb,c),e&&(l=Rp(f,l)),v.v(c));this.getLinkPointFromPoint(a,b,f,l,d,k);v.v(f);return k}; W.prototype.getLinkDirection=function(a,b,c,d,e,f,h,k){a:if(d.bd())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.oa-2),n=f?Rp(l,n.copy()):c):(m=v.L(),n=k.Ya(zb,m),v.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;v.v(l)}d.se()&&h.Xh(a)&&(c+=180,360<=c&&(c-=360));a=op;a=e?this.kt:this.eu;a===op&&(a=e?b.kt:b.eu);switch(a){case pp:b=b.ol();c+=b;360<=c&&(c-=360);break;case op:case zm:b=b.ol();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.Vi()&&(a=Sp(this,b),null!==a))return a.ww;a=NaN;a=d?this.ml:this.Gl;null!==b&&isNaN(a)&&(a=d?b.ml:b.Gl);isNaN(a)&&(a=10);return a};W.prototype.computeSpot=function(a){return a?Pp(this,this.kd):Qp(this,this.Sd)};function Pp(a,b){if(null===b)return zb;var c=a.xb;c.Uc()&&(void 0===b&&(b=a.kd),null!==b&&(c=b.xb));return c===fc?rb:c} function Qp(a,b){if(null===b)return zb;var c=a.yb;c.Uc()&&(void 0===b&&(b=a.Sd),null!==b&&(c=b.yb));return c===fc?rb:c}W.prototype.computeOtherPoint=function(a,b){var c=b.Ya(zb),d;d=b.Mr;d=null!==d?Up(d,this):null;null!==d&&(c=d.jp);return c};W.prototype.computeShortLength=function(a){return a?Vp(this):Wp(this)};function Vp(a){var b=a.lt;isNaN(b)&&(a=a.kd,null!==a&&(b=a.lt));return isNaN(b)?0:b}function Wp(a){var b=a.fu;isNaN(b)&&(a=a.Sd,null!==a&&(b=a.fu));return isNaN(b)?0:b} W.prototype.Yj=function(a,b,c,d,e,f){if(!1===this.Gg)return!1;void 0===b&&(b=null);void 0===c&&(c=null);var h=f;void 0===f&&(h=v.ph(),h.reset());h.multiply(this.transform);if(this.Fm(a,h))return co(this,b,c,e),void 0===f&&v.$e(h),!0;if(this.xg(a,h)){var k=!1;if(!this.Pg)for(var l=this.za.n,m=l.length;m--;){var n=l[m];if(n.visible||n===this.bc){var p=n.U,q=this.Ha;if(!(p.x>q.width||p.y>q.height||0>p.x+p.width||0>p.y+p.height)){p=v.ph();p.set(h);if(n instanceof D)k=n.Yj(a,b,c,d,e,p);else if(this.path=== n){var k=n,r=a,s=d,q=p;if(!1===k.Gg)k=!1;else if(q.multiply(k.transform),s)b:{var t=r,u=q;if(k.Fm(t,u))k=!0;else{if(void 0===u&&(u=k.transform,t.Wj(k.U))){k=!0;break b}var q=t.left,r=t.right,s=t.top,t=t.bottom,y=v.L(),w=v.L(),x=v.L(),A=v.ph();A.set(u);A.xE(k.transform);A.Dz();w.x=r;w.y=s;w.transform(A);y.x=q;y.y=s;y.transform(A);u=!1;oo(k,y,w,x)?u=!0:(y.x=r,y.y=t,y.transform(A),oo(k,y,w,x)?u=!0:(w.x=q,w.y=t,w.transform(A),oo(k,y,w,x)?u=!0:(y.x=q,y.y=s,y.transform(A),oo(k,y,w,x)&&(u=!0))));v.$e(A); v.v(y);v.v(w);v.v(x);k=u}}else k=k.Fm(r,q)}else k=Em(n,a,d,p);k&&(null!==b&&(n=b(n)),n&&(null===c||c(n))&&e.add(n));v.$e(p)}}}void 0===f&&v.$e(h);return k||null!==this.background||null!==this.Am}void 0===f&&v.$e(h);return!1};v.u(W,{jc:"isOrthogonal"},function(){return 2===(this.lm.value&2)});v.u(W,{sl:"isAvoiding"},function(){return 4===(this.lm.value&4)});W.prototype.computeCurve=function(){if(null===this.pi){var a=this.kd,b=this.jc;this.pi=null!==a&&a===this.Sd&&!b}return this.pi?Ki:this.Ke}; W.prototype.computeCorner=function(){if(this.Ke===Ki)return 0;var a=this.iz;if(isNaN(a)||0>a)a=10;return a};W.prototype.findMidLabel=function(){for(var a=this.path,b=this.za.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;Hc(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.zf(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.V(a,h+b*Math.cos(k),p+b*Math.sin(k)));this.zf(c,d)}}return!0;case fn:f=this.l(a);p=this.l(c);if(!f.Fc(b)||!p.Fc(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.zf(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.U.copy(),k=f.U.copy();if(h.G()&&k.G()){h.Pf(8,8);k.Pf(8,8);h.ej(a);k.ej(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.Fa(a)||h.Fa(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.Fa(a)||h.Fa(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.Fa(a)||h.Fa(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.Fa(a)||h.Fa(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!==Yp(e,c.x,c.y)){Zp(this,e,c.x,c.y,d,!0);d=this.l(2);if(4>this.oa)0===b||180===b?(d.x=a.x,d.y=c.y):(d.x=c.x,d.y=a.y),this.V(2,d.x,d.y),this.w(3,d.x,d.y);else if(c=this.l(3),0===b|| 180===b)K(d.x,c.x)?(b=0===b?Math.max(d.x,a.x):Math.min(d.x,a.x),this.V(2,b,a.y),this.V(3,b,c.y)):K(d.y,c.y)?(Math.abs(a.y-d.y)<=e.Ko/2&&(this.V(2,d.x,a.y),this.V(3,c.x,a.y)),this.w(2,d.x,a.y)):this.V(2,a.x,d.y);else if(90===b||270===b)K(d.y,c.y)?(b=90===b?Math.max(d.y,a.y):Math.min(d.y,a.y),this.V(2,a.x,b),this.V(3,c.x,b)):K(d.x,c.x)?(Math.abs(a.x-d.x)<=e.Mo/2&&(this.V(2,a.x,d.y),this.V(3,a.x,c.y)),this.w(2,a.x,d.y)):this.V(2,d.x,a.y);a=!0}else a=!1}else a=!1;a||(this.Sh(l),this.Sh(m))}}; W.prototype.computeMidOrthoPosition=function(a,b){if(this.hasCurviness()){var c=this.computeCurviness();return(a+b)/2+c}return(a+b)/2};function Kh(a){if(null===a.g||!a.sl)return!1;var b=a.points.n,c=b.length;if(4>c)return!1;a=bm(a.g,!0,a.Ta,null);for(var d=1;da){var b=new ve(Fe),c=new Ge(0,0);b.Ub.add(c);return b}var d=!1,b=this.g;null!==b&&Mp(this)&&b.xk.contains(this)&&null!==this.Hv&&(d=!0);var c=b=0,e=this.l(0).copy(),f=e.copy(),b=this.Zc.n,h=this.computeCurve();if(h===Ki&&3<=a&&!Hc(this.Hp,0))if(3===a)var k=this.l(1),b=Math.min(e.x,k.x),c=Math.min(e.y,k.y),k=this.l(2),b=Math.min(b,k.x),c=Math.min(c,k.y);else{if(this.jc)for(k=0;k=a&&(k=a-1),b=this.l(k),f.x=Math.min(b.x,f.x),f.y=Math.min(b.y,f.y);b=f.x;c=f.y}else{for(k=0;ky?r>q?(t.x=w-A,t.y=q-A,u.x=w+s,u.y=q+ s):(t.x=w-A,t.y=q+A,u.x=w+s,u.y=q-s):r>q?(t.x=w+A,t.y=q-A,u.x=w-s,u.y=q+s):(t.x=w+A,t.y=q+A,u.x=w-s,u.y=q-s));Hc(y,w)&&Hc(q,r)&&(q>p?(x>w?(t.x=w-A,t.y=q-A,u.x=w+s):(t.x=w+A,t.y=q-A,u.x=w-s),u.y=q+s):(x>w?(t.x=w-A,t.y=q+A,u.x=w+s):(t.x=w+A,t.y=q+A,u.x=w-s),u.y=q-s));if(Hc(y,w)&&Hc(w,x)||Hc(p,q)&&Hc(q,r))y=.5*(y+x),p=.5*(p+r),t.x=y,t.y=p,u.x=y,u.y=p;1===k?(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y)):2===k&&Hc(d.x,this.l(0).x)&&Hc(d.y,this.l(0).y)&&(e.x=.5*(d.x+m.x),e.y=.5*(d.y+m.y));O(l,e.x-b,e.y-c,h.x-b,h.y- c,m.x-b,m.y-c);f.set(h);e.set(a);d=m}}k=d.x;d=d.y;f=this.l(this.oa-1);k=.5*(k+f.x);d=.5*(d+f.y);O(l,a.x-b,a.y-c,k-b,d-c,f.x-b,f.y-c)}else for(k=3;k=a&&(k=a-1),f=this.l(k-1),e=this.l(k),k===a-1&&0!==Wp(this)&&(e=e.copy(),$p(this,e,!1,ad)),O(l,d.x-b,d.y-c,f.x-b,f.y-c,e.x-b,e.y-c);else{f=v.L();f.assign(this.l(0));for(k=1;k=a-1){f!==t&&(0!==Wp(this)&&(t=t.copy(),$p(this,t,!1,ad)),cq(this,l,-b,-c,f,t,d));break}k=aq(this,t,k+1,kn.x?t.x-s:t.x+s,A=u.y>t.y?t.y+w:t.y-w,cq(this,e,h,m,n,new z(q,x),p),af(e,t.x+h,t.y+m,r+h,A+m),y.m(r,A))):K(n.x,t.x)&&K(t.y,u.y)?(s=this.computeCorner(),w=Math.min(s,Math.abs(t.y-n.y)/2),w=s=Math.min(w,Math.abs(u.x-t.x)/2),K(s,0)?(cq(this,e,h,m,n,t,p),y.assign(t)):(q=t.x,A=x=t.y, x=t.y>n.y?t.y-w:t.y+w,r=u.x>t.x?t.x+s:t.x-s,cq(this,e,h,m,n,new z(q,x),p),af(e,t.x+h,t.y+m,r+h,A+m),y.m(r,A))):(cq(this,e,h,m,n,t,p),y.assign(t))}v.v(f)}b=l.o;v.q(l)}return b};function bq(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 Hc(a,0)?b:Hc(b,0)?a:Math.sqrt(a*a+b*b)} function $p(a,b,c,d){var e=a.oa;if(!(2>e))if(c){var f=a.l(1);c=f.x-d.x;d=f.y-d.y;f=bq(b.x,b.y,c,d);0!==f&&(e=2===e?.5*f:f,a=Vp(a),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=bq(b.x,b.y,c,d),0!==f&&(e=2===e?.5*f:f,a=Wp(a),a>e&&(a=e),c=a*(b.x-c)/f,a=a*(b.y-d)/f,b.x-=c,b.y-=a)} function aq(a,b,c,d){for(var e=a.oa,f=b;Hc(b.x,f.x)&&Hc(b.y,f.y);){if(c>=e)return e-1;f=a.l(c++)}if(!Hc(b.x,f.x)&&!Hc(b.y,f.y))return c-1;for(var h=f;Hc(b.x,f.x)&&Hc(f.x,h.x)&&(!d||(b.y>=f.y?f.y>=h.y:f.y<=h.y))||Hc(b.y,f.y)&&Hc(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 cq(a,b,c,d,e,f,h){if(!h&&Mp(a)){h=[];var k=0;a.isVisible()&&(k=dq(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.Ke===Ci?N(b,n,p,!1,!1):O(b,l,q,n,q,n,p)}else if(K(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.Ke===Ci?N(b,n,p,!1,!1):O(b,q,l,q,p,n,p)}}b.lineTo(f.x+c,f.y+d)} function dq(a,b,c,d){var e=a.g;if(null===e||b.K(c))return 0;for(e=e.Ow;e.next();){var f=e.value;if(null!==f&&f.visible)for(var f=f.wb.n,h=f.length,k=0;kh.x&&n.x>m.x||m.xh.y&&n.y>m.y||m.yt&&Math.min(h,y)q&&!K(h,y)){n.x=t;n.y=q;n=!0;break a}}else if(!K(q,s)&&K(h,y)&&Math.min(q,s)h&&Math.min(t,u)p&&!K(t,u)){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}v.v(k)}v.u(W,{ht:"firstPickIndex"},function(){return 2>=this.oa?0:this.jc||Pp(this)!==rb?1:0});v.u(W,{Nw:"lastPickIndex"},function(){var a=this.oa;return 0===a?0:2>=a?a-1:this.jc||Qp(this)!==rb?a-2:a-1});function Mp(a){a=a.Ke;return a===Bi||a===Ci}function Op(a,b){if(b||Mp(a)){var c=a.g;null===c||c.xk.contains(a)||null===a.Hv||c.xk.add(a,a.Hv)}} function Ei(a,b){var c=a.layer;if(null!==c&&c.visible&&!c.Gc){var d=c.g;if(null!==d)for(var e=!1,d=d.Ow;d.next();){var f=d.value;if(f.visible)if(f===c)for(var e=!0,h=!1,f=f.wb.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.jg=Math.floor((a.x-this.ge)/this.ge)*this.ge;this.kg=Math.floor((b-this.he)/this.he)*this.he;this.mr=Math.ceil((c+2*this.ge)/this.ge)*this.ge;this.nr=Math.ceil((d+2*this.he)/this.he)*this.he;a=1+(Math.ceil((this.mr-this.jg)/this.ge)|0);b=1+(Math.ceil((this.nr-this.kg)/this.he)|0);if(null===this.oc||this.Eothis.mr||a+cthis.nr||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.Eo)|0;for(c=Math.min(b+e-1,this.Fo)|0;a<=d;a++)for(e=b;e<=c;e++)if(0===this.oc[a][e])return!1;return!0}; function hq(a,b,c,d,e,f,h,k,l){if(!(bh||cl)){var m,n;m=b|0;n=c|0;var p=a.oc[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.oc[m][n]);)a.oc[m][n]=p,p+=1,e?n+=d:m+=d;m=e?n:m;if(e)if(0m;c+=d)hq(a,b,c,1,!e,f,h,k,l),hq(a,b,c,-1,!e,f,h,k,l);else if(0m;b+=d)hq(a,b,c,1,!e,f,h,k,l),hq(a,b,c,-1,!e,f,h, k,l)}}function iq(a,b,c,d,e,f,h,k,l,m,n){for(var p=b|0,q=c|0,r=a.oc[p][q];0===r&&p>k&&pm&&q=Math.abs(p-d)&&1>=Math.abs(q-e))return a.abort=!0,0;p=b|0;q=c|0;r=a.oc[p][q];b=1;for(a.oc[p][q]=b;0===r&&p>k&&pm&&q=Math.abs(h-l)&&1>=Math.abs(k-m))a.abort=!0;else{var n=f.x;b=f.y;d=f.x+f.width;var p=f.y+f.height,n=n-a.jg,n=n/a.ge;b-=a.kg;b/=a.he;d-=a.jg;d/=a.ge;p-=a.kg;p/=a.he;f=Math.max(0,Math.min(a.Eo,n|0));d=Math.min(a.Eo,Math.max(0,d|0));b=Math.max(0,Math.min(a.Fo,b|0));var p=Math.min(a.Fo,Math.max(0,p|0)),h=h|0,k=k|0,l=l|0, m=m|0,n=h,q=k,r=0===c||90===c?1:-1;(c=90===c||270===c)?q=iq(a,h,k,l,m,r,c,f,d,b,p):n=iq(a,h,k,l,m,r,c,f,d,b,p);if(!a.abort){a:{c=0===e||90===e?1:-1;e=90===e||270===e;for(var r=l|0,s=m|0,t=a.oc[r][s];0===t&&r>f&&rb&&s=Math.abs(r-h)&&1>=Math.abs(s-k)){a.abort=!0;break a}r=l|0;s=m|0;t=a.oc[r][s];for(a.oc[r][s]=999999;0===t&&r>f&&rb&&s=c?180:0}a=180*Math.atan2(a.height,a.width)/Math.PI;switch(b){case v.Nc|v.dd:return c>a&&c<=180+a?180:270;case v.dd|v.Xc:return c>180-a&&c<=360-a?270:0;case v.Xc|v.Wc:return c>a&&c<=180+a?90:0;case v.Wc|v.Nc:return c>180-a&&c<=360-a?180:90;case v.Nc|v.dd|v.Xc:return 90180+a&&c<=360- a?270:0;case v.dd|v.Xc|v.Wc:return 180a&&180>=c?90:0;case v.Xc|v.Wc|v.Nc:return c>a&&c<=180-a?90:c>180-a&&270>=c?180:0;case v.Wc|v.Nc|v.dd:return c>180-a&&c<=180+a?180:c>180+a?270:90}d&&b!==(v.Nc|v.dd|v.Xc|v.Wc)&&(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}Tp.prototype.dp=function(){this.Wf.length=0}; function Up(a,b){var c=a.Wf;if(0===c.length){a:if(!a.rp){c=a.rp;a.rp=!0;var d,e=null,f=a.Jc,f=f instanceof V?f:null;if(null===f||f.de)d=a.Jc.KD(a.port.Rd);else{if(!f.U.G()){a.rp=c;break a}e=f;d=e.JD()}var h=a.Wf.length=0,k=a.port.Ya(sb,v.L()),l=a.port.Ya(Eb,v.L()),f=v.gk(k.x,k.y,0,0);f.ej(l);v.v(k);v.v(l);k=v.Mb(f.x+f.width/2,f.y+f.height/2);for(d=d.i;d.next();)if(l=d.value,l.isVisible()){var m=rb,n=l.kd===a.port||l.T.Xh(e),m=n?Pp(l,a.port):Qp(l,a.port);if(m.Vi()&&(n=n?l.Sd:l.kd,null!==n)){var p= n.Y;if(null!==p){var n=l.computeOtherPoint(p,n),p=k.xc(n),m=jq(f,m,p,l.jc),q=0;0===m?(q=v.Xc,180 Math.abs(C)?(x=Math.abs(C)/q,q=Math.abs(C)):x=1;break;case v.Nc:r>Math.abs(H)?(x=Math.abs(H)/r,r=Math.abs(H)):x=1;break;case v.dd:n>Math.abs(C)?(x=Math.abs(C)/n,n=Math.abs(C)):x=1;break;default:case v.Xc:p>Math.abs(H)?(x=Math.abs(H)/p,p=Math.abs(H)):x=1}w=0}var T=t.jp;if(e===qp){u=t.link.computeThickness();u*=x;T.set(A);switch(y){case v.Wc:T.x=A.x+C/2+q/2-w-u/2;break;case v.Nc:T.y=A.y+H/2+r/2-w-u/2;break;case v.dd:T.x=A.x+C/2-n/2+w+u/2;break;default:case v.Xc:T.y=A.y+H/2-p/2+w+u/2}w+=u}else u=.5, e===np&&(u=(t.bp+1)/(t.Im+1)),T.x=A.x+C*u,T.y=A.y+H*u}v.v(k);v.v(d);v.v(l);v.v(m);A=a.Wf;for(C=0;Cb.fe?1:a.angleb.angle?1:0}; Tp.prototype.computeEndSegmentLength=function(a){var b=a.link,c=b.computeEndSegmentLength(this.Jc,this.port,rb,b.kd===this.port),d=a.bp;if(0>d)return c;var e=a.Im;if(1>=e||!b.jc)return c;var b=a.Uw,f=a.jp;if(a.fe===v.Nc||a.fe===v.Wc)d=e-1-d;return((a=a.fe===v.Nc||a.fe===v.Xc)?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}; v.defineProperty(Pi,{padding:"padding"},function(){return this.Ue},function(a){"number"===typeof a?((isNaN(a)||0>a)&&v.va(a,">= 0",Pi,"padding"),a=new cb(a)):(v.A(a,cb,Pi,"padding"),(isNaN(a.left)||0>a.left)&&v.va(a.left,">= 0",Pi,"padding:value.left"),(isNaN(a.right)||0>a.right)&&v.va(a.right,">= 0",Pi,"padding:value.right"),(isNaN(a.top)||0>a.top)&&v.va(a.top,">= 0",Pi,"padding:value.top"),(isNaN(a.bottom)||0>a.bottom)&&v.va(a.bottom,">= 0",Pi,"padding:value.bottom"));var b=this.Ue;b.K(a)||(this.Ue= a=a.R(),this.h("padding",b,a))});function Xf(){0=c-1?(h=0,e=d,f+=k+20,k=0):h++}null!==a&&a.wd("Layout")}this.wf=!0};Xf.prototype.Uz=function(a){return!a.location.G()||a instanceof V&&a.Cy?!0:!1}; function nq(a,b,c,d,e,f,h,k){for(c=c.i;c.next();){var l=c.value;d&&!l.fp||null!==e&&!e(l)||!l.canLayout()||(f&&l instanceof S?l.uf||(l instanceof V?null===l.Pb?nq(a,b,l.Ic,!1,e,f,h,k):b.add(l):b.add(l)):h&&l instanceof W?b.add(l):!k||!l.Od()||l instanceof S||b.add(l))}} Xf.prototype.collectParts=Xf.prototype.pG=function(a){var b=new J(R);a instanceof E?(nq(this,b,a.Ag,!0,null,!0,!0,!0),nq(this,b,a.links,!0,null,!0,!0,!0),nq(this,b,a.dk,!0,null,!0,!0,!0)):a instanceof V?nq(this,b,a.Ic,!1,null,!0,!0,!0):nq(this,b,a.i,!1,null,!0,!0,!0);return b};v.defineProperty(Xf,{Xd:"arrangementOrigin"},function(){return this.Vp},function(a){v.A(a,z,Xf,"arrangementOrigin");this.Vp.K(a)||(this.Vp.assign(a),this.H())}); Xf.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.Ya(sb),(isNaN(c.x)||isNaN(c.y))&&c.set(a),c.x+=b.padding.left,c.y+=b.padding.top);return c}return a};function Yf(){v.dc(this);this.Ud=null;this.clear()}v.ea("LayoutNetwork",Yf); Yf.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 J(oq);this.edges=new J(pq);this.Yz=new na(S,oq);this.Kz=new na(W,pq)}; Yf.prototype.toString=function(a){void 0===a&&(a=0);var b="LayoutNetwork"+(null!==this.Pb?"("+this.Pb.toString()+")":"");if(0>=a)return b;b+=" vertexes: "+this.vertexes.count+" edges: "+this.edges.count;if(1d?1:0):1:null!==d?-1:0}; oq.smartComparer=function(a,b){if(null!==a){if(null!==b){var c=a.qd,d=b.qd;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.Qb("Layout");d=[];switch(this.alignment){case vn:var k=a,l=c,m=Math.max(this.Lo.width,1);if(!isFinite(m))for(var n=m=0;nf-1||0h)d.push(new B(0,y,h+k,x)),w=0,u=t,y+=x,x=0;x=Math.max(x,H);H=0;switch(s){case on:H=-q.width;break;default:H=0}p.moveTo(u+H,y);switch(s){case on:u-=A;break; default:u+=A}w++}d.push(new B(0,y,h+k,x));break;case un:k=f;l=a;m=c;n=Math.max(this.Lo.width,1);p=y=A=0;q=v.L();for(f=0;f=A&&(h-=A);for(var A=H=0,C=Math.max(this.Lo.height,1),ba=p=0,U=!0,M=v.L(),f=0;fk-1||0h){d.push(new B(0,U?w-p:w,h+l,ba+p+m));for(T=0;TA&&(e.width+=e.x-A,e.x=A)}for(k=f=h=e=0;kd?1:0}; mm.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.na=0,a.ua=0);else{var b=new I(yq);b.Tc(a.i);a=new I(yq);var c=new I(yq),d;d=this.sort(b);var e=this.$x,f=this.DB,h=this.Fd,k=this.In,l=this.ay,m=this.Aq,b=this.yk,n=this.TC,p=this.sg,q=this.Du,e=this.Mf,f=this.Rw,h=this.eI;if(!isFinite(h)|| 0>=h)h=NaN;k=this.jG;if(!isFinite(k)||0>=k)k=1;l=this.xe;isFinite(l)||(l=0);m=this.Af;if(!isFinite(m)||360m)m=360;b=this.spacing;isFinite(b)||(b=NaN);e===Jn&&f===Kn?e=In:e===Jn&&f!==Kn&&(f=Kn,e=this.Mf);if((this.direction===Cn||this.direction===Dn)&&this.sorting!==Bn){for(var r=0;!(r>=d.length);r+=2){a.add(d.da(r));if(r+1>=d.length)break;c.add(d.da(r+1))}this.direction===Cn?(this.Mf===Jn&&a.reverse(),d=new I(yq),d.Tc(a),d.Tc(c)):(this.Mf===Jn&&c.reverse(),d=new I(yq),d.Tc(c),d.Tc(a))}for(var s= d.length,t=n=0,r=0;rm&&(0===r||r===d.length-1)&&(u/=2);n+=u;t++}if(isNaN(h)||e===Jn){isNaN(b)&&(b=6);if(e!==In&&e!==Jn){u=-Infinity;for(r=0;rh?(h=r,p=h*k):q=t/(360<=m?s:s-1)}this.$x=e;this.DB=f;this.Fd=h;this.In=k;this.ay=l;this.Aq=m;this.yk=b;this.TC=n;this.sg=p;this.Du=q;b=d;d=this.$x;e=this.Fd;f=this.ay;k=this.Aq;l=this.yk;m=this.sg;n=this.Du;if(this.direction!==Cn&&this.direction!==Dn||d!==Jn)if(this.direction===Cn||this.direction===Dn){h=0;switch(d){case Hn:h=180*Cq(this,e,m,f,n)/Math.PI;break;case In:n=b=0;h=a.first();null!==h&&(b=zq(h,Math.PI/2));h=c.first();null!==h&&(n=zq(h,Math.PI/2));h=180*Cq(this,e,m,f,l+(b+ n)/2)/Math.PI;break;case Gn:h=k/b.length}if(this.direction===Cn){switch(d){case Hn:Dq(this,a,f,Fn);break;case In:Eq(this,a,f,Fn);break;case Gn:Fq(this,a,k/2,f,Fn)}switch(d){case Hn:Dq(this,c,f+h,En);break;case In:Eq(this,c,f+h,En);break;case Gn:Fq(this,c,k/2,f+h,En)}}else{switch(d){case Hn:Dq(this,c,f,Fn);break;case In:Eq(this,c,f,Fn);break;case Gn:Fq(this,c,k/2,f,Fn)}switch(d){case Hn:Dq(this,a,f+h,En);break;case In:Eq(this,a,f+h,En);break;case Gn:Fq(this,a,k/2,f+h,En)}}}else switch(d){case Hn:Dq(this, b,f,this.direction);break;case In:Eq(this,b,f,this.direction);break;case Gn:Fq(this,b,k,f,this.direction);break;case Jn:Gq(this,b,k,f,this.direction)}else Gq(this,b,k,f-k/2,En)}this.updateParts();this.network=null;this.wf=!0}; function Fq(a,b,c,d,e){var f=a.Aq,h=a.Fd;a=a.sg;d=d*Math.PI/180;c=c*Math.PI/180;for(var k=b.length,l=0;lc){for(f=d+(e===En?f:-f);0>f;)f+=360;f%=360;180=n.length-1)break;Jq(a,l,m,n,p,e,f)||Kq(a,l,m,n,p,e,f);l=f.x;m=f.y}v.v(f);a.hm++;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.hm?a.Fd-h/(2*Math.PI):5>n.length&&10=p.length-1)break;Jq(a,l,m,p,q,e,n)||Kq(a,l,m,p,q,e,n);l=n.x;m=n.y}v.v(n);a.hm++;if(!(23a.hm?a.Fd-f/(2*Math.PI):a.Fd-(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 Kq(a,b,c,d,e,f,h){var k=a.Fd,l=a.sg,m=0,n=0;a=(d[e].height+d[e+1].height)/2+a.yk;d=!1;if(0<=b!==(f===En)){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}wn.prototype.commitLayout=function(){this.commitNodes();this.xt&&this.commitLinks()}; wn.prototype.commitNodes=function(){for(var a=this.ZF,b=this.network.vertexes.i;b.next();){var c=b.value;c.x+=a.x;c.y+=a.y;c.commit()}};wn.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()}; function Bq(a,b,c,d,e){var f=a.OF;if(.001>Math.abs(a.In-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 Aq(a,b,c,d,e){var f=0,f=void 0!==d&&void 0!==e?Bq(a,1,c,d,e):Bq(a,1,c);return b/f} function Cq(a,b,c,d,e){if(.001>Math.abs(a.In-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}} wn.prototype.sort=function(a){switch(this.sorting){case zn:break;case An:a.reverse();break;case xn:a.sort(this.comparer);break;case yn:a.sort(this.comparer);a.reverse();break;case Bn:for(var b=[],c=0;ce&&(e=k,f=h)}else for(h=0;he&&(e=k,f=h);d.add(a.da(f));b[f]=-1;f=a.da(f);e=0;for(h=f.lc;h.next();)e=a.indexOf(h.value.fromVertex),0>e||0<=b[e]&& b[e]++;for(f=f.hc;f.next();)e=a.indexOf(f.value.toVertex),0>e||0<=b[e]&&b[e]++}a=[];for(b=0;ba[b].indexOf(l)&&a[b].push(l);for(c=h.lc;c.next();)l=d.indexOf(c.value.fromVertex),l!==b&&0>a[b].indexOf(l)&&a[b].push(l)}h=[];for(b=0;ba[c[p]].indexOf(c[p===c.length-1?0:p+1])&&t.push(p===c.length-1?0:p+1);if(0===t.length)for(p=0;pH.indexOf(U)||MH.indexOf(U)|| M=u?l+1:l)),w+=l=u&&l++,A>=u&&A++,l>A&&(H=A,A=l,l=H),A-l<(c.length+2)/2===(lq||q===l||(s=q>l?q-l:l-q,p+=qm-s?1:-1);c.splice(0>p?l:l+1,0,b);e.splice(h,1);h--}else k=!1;if(k)break;else c.push(e[0]),e.splice(0,1)}for(b=0;b=a?a:360,this.H())}); v.defineProperty(wn,{Mf:"arrangement"},function(){return this.ed},function(a){this.ed!==a&&(v.pb(a,wn,wn,"arrangement"),a===Jn||a===In||a===Hn||a===Gn)&&(this.ed=a,this.H())});v.defineProperty(wn,{direction:"direction"},function(){return this.aa},function(a){this.aa!==a&&(v.pb(a,wn,wn,"direction"),a===En||a===Fn||a===Cn||a===Dn)&&(this.aa=a,this.H())}); v.defineProperty(wn,{sorting:"sorting"},function(){return this.Lh},function(a){this.Lh!==a&&(v.pb(a,wn,wn,"sorting"),a===zn||a===An||a===xn||yn||a===Bn)&&(this.Lh=a,this.H())});v.defineProperty(wn,{comparer:"comparer"},function(){return this.uh},function(a){this.uh!==a&&(v.j(a,"function",wn,"comparer"),this.uh=a,this.H())});v.defineProperty(wn,{spacing:"spacing"},function(){return this.Mh},function(a){this.Mh!==a&&(v.j(a,"number",wn,"spacing"),this.Mh=a,this.H())}); v.defineProperty(wn,{Rw:"nodeDiameterFormula"},function(){return this.Dr},function(a){this.Dr!==a&&(v.pb(a,wn,wn,"nodeDiameterFormula"),a===Ln||a===Kn)&&(this.Dr=a,this.H())});v.u(wn,{$F:"actualXRadius"},function(){return this.Fd});v.u(wn,{aG:"actualYRadius"},function(){return this.sg});v.u(wn,{YI:"actualSpacing"},function(){return this.yk});v.u(wn,{ZF:"actualCenter"},function(){return isNaN(this.Xd.x)||isNaN(this.Xd.y)?new z(0,0):new z(this.Xd.x+this.$F,this.Xd.y+this.aG)});var In; wn.ConstantSpacing=In=v.p(wn,"ConstantSpacing",0);var Hn;wn.ConstantDistance=Hn=v.p(wn,"ConstantDistance",1);var Gn;wn.ConstantAngle=Gn=v.p(wn,"ConstantAngle",2);var Jn;wn.Packed=Jn=v.p(wn,"Packed",3);var En;wn.Clockwise=En=v.p(wn,"Clockwise",4);var Fn;wn.Counterclockwise=Fn=v.p(wn,"Counterclockwise",5);var Cn;wn.BidirectionalLeft=Cn=v.p(wn,"BidirectionalLeft",6);var Dn;wn.BidirectionalRight=Dn=v.p(wn,"BidirectionalRight",7);var zn;wn.Forwards=zn=v.p(wn,"Forwards",8);var An; wn.Reverse=An=v.p(wn,"Reverse",9);var xn;wn.Ascending=xn=v.p(wn,"Ascending",10);var yn;wn.Descending=yn=v.p(wn,"Descending",11);var Bn;wn.Optimized=Bn=v.p(wn,"Optimized",12);var Ln;wn.Pythagorean=Ln=v.p(wn,"Pythagorean",13);var Kn;wn.Circular=Kn=v.p(wn,"Circular",14);function wq(){this.Xo=-Infinity;this.Lp=this.hn=null} wq.prototype.compare=function(a,b){if(0this.Xo||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=Pq(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().mb,d=this.network.vertexes.i;d.next();){if(d.value.mb.xg(c)&&(a++,2a.network.vertexes.count)return!1;null===a.rg?a.rg=new I(hr):a.rg.clear();a.rg.Tc(a.network.vertexes);var c=a.rg;c.sort(function(a,b){return null===a||null===b||a===b?0:b.Yf-a.Yf});for(var d=c.count-1;0<=d&&1>=c.da(d).Yf;)d--;return 1=h))){for(var m=0,n=0,p=l.count-h;ps&&(s=1);m=Ld((m+s+n*n*4/(h*h))/s);h=(m-1)*p/2;m=(m-1)*q/2;f.mb=new B(l-r.x-h,k-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 gr(a,b){for(var c=a.network.vertexes.i;c.next();){var d=c.value;d.network=b;if(null!==d.nh){var e=d.nh.da(d.iA);d.Yf=e.yx;var f=e.HA,h=e.IA;d.mb=new B(d.na-f,d.ua-h,e.zx,e.xx);d.focus=new z(f,h);d.iA--}}for(c=a.network.edges.i;c.next();)c.value.network=b;a.network=b} function ir(a,b){var c=b.Em;if(null!==c&&0!==c.count){var d=b.na,e=b.ua,f=b.width,h=b.height;null!==b.nh&&0=p.Yf?l++:(k=!0,m++,h+=Math.atan2(b.ua-p.ua,b.na-p.na))}if(0!==l)for(0>1)+n)*(0===k%2?1:-1);l.na=d+p*Math.cos(q);l.ua=e+p*Math.sin(q);k++}}}function Pq(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,Ld(d*d+e*e)):e+ck+m?e>l+h?(d=d-k-m,e=e-l-h,Ld(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.na,e=d,f=c.ua,h=f,c=1;ch-f)?b.sort(function(a,b){return null===a||null===b||a===b?0:a.na-b.na}):b.sort(function(a,b){return null===a||null===b||a===b?0:a.ua-b.ua});for(var h=a.Bh,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=kr(k,e);1>s?(n=a.Zw,null===n&&(a.Zw=n=new va(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.Zw,null===n&&(a.Zw=n=new va(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.Bh/20,50);for(e=0;ed&&(f=d),h<-d?h=-d:h>d&&(h=d),k.na+=f,k.ua+=h,c=Math.max(c,f*f+h*h));return c>a.HD*a.HD}Mq.prototype.moveFixedVertex=function(){}; Mq.prototype.commitLayout=function(){this.oA();this.commitNodes();this.xt&&this.commitLinks()};Mq.prototype.oA=function(){if(this.Fp)for(var a=this.network.edges.i;a.next();){var b=a.value.link;null!==b&&(b.xb=fc,b.yb=fc)}};Mq.prototype.commitNodes=function(){var a=0,b=0;if(this.iG){var c=v.$f();this.$g(this.network,c);b=this.Xd;a=b.x-c.x;b=b.y-c.y;v.Vb(c)}for(var c=v.$f(),d=this.network.vertexes.i;d.next();){var e=d.value;if(0!==a||0!==b)c.assign(e.mb),c.x+=a,c.y+=b,e.mb=c;e.commit()}v.Vb(c)}; Mq.prototype.commitLinks=function(){for(var a=this.network.edges.i;a.next();)a.value.commit()};Mq.prototype.springStiffness=function(a){a=a.stiffness;return isNaN(a)?this.Dn:a};Mq.prototype.springLength=function(a){a=a.length;return isNaN(a)?this.Cn:a};Mq.prototype.electricalCharge=function(a){a=a.charge;return isNaN(a)?this.zn:a};Mq.prototype.electricalFieldX=function(){return 0};Mq.prototype.electricalFieldY=function(){return 0}; Mq.prototype.gravitationalMass=function(a){a=a.mass;return isNaN(a)?this.Bn:a};Mq.prototype.gravitationalFieldX=function(){return 0};Mq.prototype.gravitationalFieldY=function(){return 0};Mq.prototype.isFixed=function(a){return a.isFixed};v.u(Mq,{yJ:"currentIteration"},function(){return this.cr});v.defineProperty(Mq,{jD:"arrangementSpacing"},function(){return this.ag},function(a){v.A(a,ia,Mq,"arrangementSpacing");this.ag.K(a)||(this.ag.assign(a),this.H())}); v.defineProperty(Mq,{iG:"arrangesToOrigin"},function(){return this.Wp},function(a){this.Wp!==a&&(v.j(a,"boolean",Mq,"arrangesToOrigin"),this.Wp=a,this.H())});v.defineProperty(Mq,{Fp:"setsPortSpots"},function(){return this.Kh},function(a){this.Kh!==a&&(v.j(a,"boolean",Mq,"setsPortSpots"),this.Kh=a,this.H())});v.defineProperty(Mq,{comments:"comments"},function(){return this.th},function(a){this.th!==a&&(v.j(a,"boolean",Mq,"comments"),this.th=a,this.H())}); v.defineProperty(Mq,{Oz:"maxIterations"},function(){return this.fo},function(a){this.fo!==a&&(v.j(a,"number",Mq,"maxIterations"),0<=a&&(this.fo=a,this.H()))});v.defineProperty(Mq,{HD:"epsilonDistance"},function(){return this.Cq},function(a){this.Cq!==a&&(v.j(a,"number",Mq,"epsilonDistance"),0b.toVertex.index&&(this.network.gx(b),b.rev=!0);break;case nr:for(b=this.network.vertexes.i;b.next();)a=b.value,a.Ro=-1,a.finish=-1;for(a=this.network.edges.i;a.next();)a.value.forest=!1;this.zr=0;for(b.reset();b.next();)c=b.value,0===c.lc.count&&xr(this,c);for(b.reset();b.next();)c=b.value,-1===c.Ro&&xr(this,c);for(a.reset();a.next();)b=a.value,b.forest||(c=b.fromVertex, d=c.finish,e=b.toVertex,f=e.finish,e.Ros&&0s&&0b[this.Hf]&&(this.ov=b[c]-1,this.Hf=c),b[c]h)for(var p=h+1;pn;p--)l=d[p],l.near===m&&l.Bm===m.Bm||k++;var m=0,q,r=q=p=l=0,s,t=0,u=0;s=0;var y;if(0<=c)for(n=d[h].Qe,m=0;mt||l===t&&q>s)&&k++,ul||t===l&&s>q)&&k++);if(0>=c)for(n=d[h].Le,m=0;mt||l===t&&p>u)&&k++,sl||t===l&&u>p)&&k++);f[h*e+h]=k;for(n=h+1;n=c)for(k=d[h].Le,y=d[n].Le,m=0;m=c&&(l=k.Qe);var m=null;0<=c&&(m=k.Le);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.Le);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]=n&1?p[m]:p[m-1]+p[m]>>1)}Br(a,b,d);return f}function Jr(a,b,c,d,e,f){if(b.component===d){b.component=c;var h=0,k=0;if(e)for(var l=b.hc;l.next();){var k=l.value,m=k.toVertex,h=b.layer-m.layer,k=a.linkMinLength(k);h===k&&Jr(a,m,c,d,e,f)}if(f)for(l=b.lc;l.next();)k=l.value,m=k.fromVertex,h=m.layer-b.layer,k=a.linkMinLength(k),h===k&&Jr(a,m,c,d,e,f)}} function Kr(a,b,c,d,e,f){if(b.component===d){b.component=c;if(e)for(var h=b.hc;h.next();)Kr(a,h.value.toVertex,c,d,e,f);if(f)for(b=b.lc;b.next();)Kr(a,b.value.fromVertex,c,d,e,f)}}function ur(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid)return b}return null}function vr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.hc;d.next();)if(d.value.toVertex.valid){c=!1;break}if(c)return b}}return null} function wr(a){for(a=a.vertexes.i;a.next();){var b=a.value;if(b.valid){for(var c=!0,d=b.lc;d.next();)if(d.value.fromVertex.valid){c=!1;break}if(c)return b}}return null}function xr(a,b){b.Ro=a.zr;a.zr++;for(var c=b.hc;c.next();){var d=c.value,e=d.toVertex;-1===e.Ro&&(d.forest=!0,xr(a,e))}b.finish=a.zr;a.zr++} hn.prototype.assignLayers=function(){switch(this.$n){case Lr:Mr(this);break;case Nr:for(var a=0,b=this.network.vertexes.i;b.next();)a=Or(this,b.value),this.ob=Math.max(a,this.ob);for(b.reset();b.next();)a=b.value,a.layer=this.ob-a.layer;break;default:case or:Mr(this);for(b=this.network.vertexes.i;b.next();)b.value.valid=!1;for(b.reset();b.next();)a=b.value,0===a.lc.count&&Pr(this,a);a=Infinity;for(b.reset();b.next();)a=Math.min(a,b.value.layer);this.ob=-1;for(b.reset();b.next();){var c=b.value;c.layer-= a;this.ob=Math.max(this.ob,c.layer)}}};function Mr(a){for(var b=a.network.vertexes.i;b.next();){var c=Qr(a,b.value);a.ob=Math.max(c,a.ob)}}function Qr(a,b){var c=0;if(-1===b.layer){for(var d=b.hc;d.next();)var e=d.value,f=e.toVertex,e=a.linkMinLength(e),c=Math.max(c,Qr(a,f)+e);b.layer=c}else c=b.layer;return c}function Or(a,b){var c=0;if(-1===b.layer){for(var d=b.lc;d.next();)var e=d.value,f=e.fromVertex,e=a.linkMinLength(e),c=Math.max(c,Or(a,f)+e);b.layer=c}else c=b.layer;return c} function Pr(a,b){if(!b.valid){b.valid=!0;for(var c=b.hc;c.next();)Pr(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;fk&&Jr(a,h.fromVertex,0,-1,!0,!1)}for(Jr(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)&&!p&&(k=m,d=n)}if(0>f){for(c.reset();c.next();)f=c.value,1===f.component&&(f.layer-=e);b.component=0}else k.component=0}}} function zr(a,b,c){return 90===a.aa?c&&!b.rev||!c&&b.rev?270:90:180===a.aa?c&&!b.rev||!c&&b.rev?0:180:270===a.aa?c&&!b.rev||!c&&b.rev?90:270:c&&!b.rev||!c&&b.rev?180:0} hn.prototype.initializeIndices=function(){switch(this.Qn){default:case Rr:for(var a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;b.index=this.Td[c];this.Td[c]++}break;case pr:a=this.network.vertexes.i;for(b=this.ob;0<=b;b--)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Sr(this,c);break;case Tr:for(a=this.network.vertexes.i,b=0;b<=this.ob;b++)for(a.reset();a.next();)c=a.value,c.layer===b&&-1===c.index&&Ur(this,c)}}; function Sr(a,b){var c=b.layer;b.index=a.Td[c];a.Td[c]++;for(var c=b.Le.cc(),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=Wr(this,d,-1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1, d=h;d<=c;d++)f=Wr(this,d,-1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this))}break;default:case qr:for(c=this.ob,h=0,k=a+1;(d=this.countCrossings())=h;d--)f=Wr(this,d,-1)||f;e=this.countCrossings();e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,1)||f;e=this.countCrossings(); e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,-1)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=c;d>=h;d--)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this));for(f=!0;f;)for(f=!1,d=h;d<=c;d++)f=Wr(this,d,0)||f;e>=a?Er(this,b):(a=e,b=Dr(this))}}Er(this,b)}; function Vr(a,b,c){var d=0,e=Ar(a,b),f=a.Td[b],h=Ir(a,b,c);c=Hr(a,b,c);for(d=0;df+1&&(q+=4*(w-f),r+=4*(w-(f+1)))}A=d[f].hc.i;for(A.reset();A.next();)if(x=A.value,x.valid&&x.toVertex.layer===b){x=x.toVertex;for(w=0;d[w]!==x;)w++;w===f+1&&(r+=1)}A=d[f+1].lc.i;for(A.reset();A.next();)if(x=A.value,x.valid&&x.fromVertex.layer===b){x=x.fromVertex;for(w=0;d[w]!==x;)w++;wf+1&&(q+=4*(w-(f+1)),r+=4*(w-f))}A=d[f+1].hc.i;for(A.reset();A.next();)if(x=A.value, x.valid&&x.toVertex.layer===b){x=x.toVertex;for(w=0;d[w]!==x;)w++;w===f&&(q+=1)}var w=x=0,A=h[d[f].index],H=k[d[f].index],C=h[d[f+1].index],T=k[d[f+1].index];-1!==A&&(x+=Math.abs(A-s),w+=Math.abs(A-y));-1!==H&&(x+=Math.abs(H-s),w+=Math.abs(H-y));-1!==C&&(x+=Math.abs(C-t),w+=Math.abs(C-u));-1!==T&&(x+=Math.abs(T-t),w+=Math.abs(T-u));if(r>1)+8*d;this.Fb*=8}if(0!==(this.Di&$r))for(b=!0;b;){b=!1;for(a=this.Hf+1;a<=this.ob;a++)b=as(this,a,1)||b; for(a=this.Hf-1;0<=a;a--)b=as(this,a,-1)||b;b=as(this,this.Hf,0)||b}if(0!==(this.Di&bs)){for(a=this.Hf+1;a<=this.ob;a++)cs(this,a,1);for(a=this.Hf-1;0<=a;a--)cs(this,a,-1);cs(this,this.Hf,0)}c&&(ds(this,-1),ds(this,1));if(0!==(this.Di&$r))for(b=!0;b;){b=!1;b=as(this,this.Hf,0)||b;for(a=this.Hf+1;a<=this.ob;a++)b=as(this,a,0)||b;for(a=this.Hf-1;0<=a;a--)b=as(this,a,0)||b}};function as(a,b,c){for(var d=!1;es(a,b,c);)d=!0;return d} function es(a,b,c){var d=0,e=Ar(a,b),f=a.Td[b],h=Hr(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,t=0,u=0,y=0,w=0;if(0>=c)for(var x=e[d].lc.i;x.next();){var A=x.value;A.valid&&A.fromVertex.layer!== b&&(u=Cr(A),y=A.portFromColOffset,w=A.portToColOffset,A=A.fromVertex.column,q+=(Math.abs(n+w-(A+y))+1)*u,s+=(Math.abs(r+w-(A+y))+1)*u,t+=(Math.abs(p+w-(A+y))+1)*u)}if(0<=c)for(x=e[d].hc.i;x.next();)A=x.value,A.valid&&A.toVertex.layer!==b&&(u=Cr(A),y=A.portFromColOffset,w=A.portToColOffset,A=A.toVertex.column,q+=(Math.abs(n+y-(A+w))+1)*u,s+=(Math.abs(r+y-(A+w))+1)*u,t+=(Math.abs(p+y-(A+w))+1)*u);w=y=u=0;x=h[e[d].index];A=k[e[d].index];-1!==x&&(u+=Math.abs(x-n),y+=Math.abs(x-r),w+=Math.abs(x-p));-1!== A&&(u+=Math.abs(A-n),y+=Math.abs(A-r),w+=Math.abs(A-p));if(s=c[d]?n=q:p<=c[d]&&(n=p));n!==k&&(h=!0,e[d].column=n)}Br(a,b,e);a.normalize()} function fs(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 gs(a,b){for(var c=b,c=b+1,d=0,e=[],f=[],d=0;d<=a.ob;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.ob;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 ds(a,b){for(var c=0;c<=a.Fb;c++)for(;fs(a,c););a.normalize();for(c=0;ce?Er(a,d):hb)for(c=a.Fb;0<=c;c--)for(d=Dr(a),e=Gr(a),f=e+1;ee?Er(a,d):hc)for(d.reset();d.next();)e=d.value,e.column+a.nodeMinColumnSpace(e,!1)>=b&&(e.component=a.lg);a.lg++;for(d.reset();d.next();)b=d.value,-1===b.component&&(Kr(a,b,a.lg,-1,!0,!0),a.lg++);var f=0;b=[];for(f=0;fc)for(k=a.Fb;0c)for(d.reset();d.next();)c=d.value,e[c.component]&&(c.column+=1)} hn.prototype.commitLayout=function(){if(this.Fp)for(var a=yr(this,!0),b=yr(this,!1),c=this.network.edges.i;c.next();){var d=c.value.link;null!==d&&(d.xb=a,d.yb=b)}this.commitNodes();this.dz();this.xt&&this.commitLinks()};function yr(a,b){return 270===a.aa?b?sc:vc:90===a.aa?b?vc:sc:180===a.aa?b?tc:uc:b?uc:tc} hn.prototype.commitNodes=function(){this.hg=[];this.Ff=[];this.Ef=[];this.Lb=[];for(var a=0;a<=this.ob;a++)this.hg[a]=0,this.Ff[a]=0,this.Ef[a]=0,this.Lb[a]=0;for(a=this.network.vertexes.i;a.next();){var b=a.value,c=b.layer;this.hg[c]=Math.max(this.hg[c],this.nodeMinLayerSpace(b,!0));this.Ff[c]=Math.max(this.Ff[c],this.nodeMinLayerSpace(b,!1))}for(var b=0,d=this.$l,c=0;c<=this.ob;c++){var e=d;0>=this.hg[c]+this.Ff[c]&&(e=0);0=Ga.M.bottom?(ua=Ga.M.y+Ga.M.height,b.w(M++,ka,ua+Ra),b.w(M++,ka,ua),b.w(M++, ka,ua-Ua)):(b.w(M++,ka,la+Ra),b.w(M++,ka,la),b.w(M++,ka,la-Ua)):270===this.aa?la<=Ga.M.y?(ua=Ga.M.y,b.w(M++,ka,ua-Ua),b.w(M++,ka,ua),b.w(M++,ka,ua+Ra)):(b.w(M++,ka,la-Ua),b.w(M++,ka,la),b.w(M++,ka,la+Ra)):0===this.aa&&(ka>=Ga.M.right?(ua=Ga.M.x+Ga.M.width,b.w(M++,ua+Ra,la),b.w(M++,ua,la),b.w(M++,ua-Ua,la)):(b.w(M++,ka+Ra,la),b.w(M++,ka,la),b.w(M++,ka-Ua,la)));else{b.w(M++,pb,eb);var vd=0;if(180===this.aa||0===this.aa){if(180===this.aa?ka>=Ga.M.right:ka<=Ga.M.x)vd=(0===this.aa?-Ua:Ra)/2;b.w(M++,pb+ vd,la)}else{if(270===this.aa?la>=Ga.M.bottom:la<=Ga.M.y)vd=(90===this.aa?-Ua:Ra)/2;b.w(M++,ka,eb+vd)}b.w(M++,ka,la)}else Ua=Math.max(10,this.hg[pa.layer]),Ra=Math.max(10,this.Ff[pa.layer]),180===this.aa?(T&&b.w(M++,ka-Ua,la),b.w(M++,ka,la),T&&b.w(M++,ka+Ra,la)):90===this.aa?(T&&b.w(M++,ka,la+Ra),b.w(M++,ka,la),T&&b.w(M++,ka,la-Ua)):270===this.aa?(T&&b.w(M++,ka,la-Ua),b.w(M++,ka,la),T&&b.w(M++,ka,la+Ra)):(T&&b.w(M++,ka+Ra,la),b.w(M++,ka,la),T&&b.w(M++,ka-Ua,la));Ga=pa}if(null===k||b.computeSpot(!1)!== rb||ba)if(pb=b.l(M-1).x,eb=b.l(M-1).y,ka=b.l(M).x,la=b.l(M).y,ba){var Le=this.Ff[oa.layer],Wb=0;180===this.aa||0===this.aa?(Wb=eb,Wb>=oa.M.y&&Wb<=oa.M.bottom&&(180===this.aa?ka>=oa.M.x:ka<=oa.M.right)&&(ua=oa.na+(180===this.aa?-Le:Le),Wb=Wb=oa.M.x&&Wb<=oa.M.right&&(270===this.aa?la>=oa.M.y:la<=oa.M.bottom)&&(ua=oa.ua+(270===this.aa?-Le:Le),Wb=Wb=oa.M.x?(ua=oa.M.x+oa.M.width,b.V(M-2,ua,eb),b.V(M-1,ua+Ra,eb)):90===this.aa&&la<=oa.M.bottom?(ua=oa.M.y,b.V(M-2,pb,ua),b.V(M-1,pb,ua-Ua)):270===this.aa&&la>=oa.M.y?(ua=oa.M.y+oa.M.height,b.V(M-2,pb,ua),b.V(M-1,pb,ua+Ra)):0===this.aa&&ka<=oa.M.right&&(ua=oa.M.x,b.V(M-2,ua,eb),b.V(M-1,ua-Ua,eb));else{Ua=Math.max(10,this.hg[oa.layer]); Ra=Math.max(10,this.Ff[oa.layer]);vd=0;if(180===this.aa||0===this.aa){if(180===this.aa?ka<=oa.M.x:ka>=oa.M.right)vd=(0===this.aa?Ra:-Ua)/2;b.w(M++,ka+vd,eb)}else{if(270===this.aa?la<=oa.M.y:la>=oa.M.bottom)vd=(90===this.aa?Ra:-Ua)/2;b.w(M++,pb,la+vd)}b.w(M++,ka,la)}}else{for(;null!==oa&&oa!==Ga;){Ca=pa=null;for(var Eg=oa.hc.i;Eg.next();){var wd=Eg.value;if(wd.link===c.link&&(pa=wd.toVertex,Ca=wd.fromVertex,null!==Ca.qd&&(Ca=null),null===pa.qd))break}var pb=0,eb=0,ka=0,la=0,qb=0,Ua=0,Ra=0;if(pa!== Ga)if(pb=b.l(M-1).x,eb=b.l(M-1).y,ka=pa.na,la=pa.ua,ba)if(180===this.aa||0===this.aa){var we=null!==Ca?Ca.ua:eb;we!==la&&(qb=this.Lb[pa.layer],2===M&&(qb=0===this.aa?Math.max(qb,pb):Math.min(qb,pb)),b.w(M++,qb,eb),b.w(M++,qb,la))}else{var xd=null!==Ca?Ca.na:pb;xd!==ka&&(qb=this.Lb[pa.layer],2===M&&(qb=90===this.aa?Math.max(qb,eb):Math.min(qb,eb)),b.w(M++,pb,qb),b.w(M++,ka,qb))}else Ua=Math.max(10,this.hg[pa.layer]),Ra=Math.max(10,this.Ff[pa.layer]),180===this.aa?(b.w(M++,ka+Ra,la),T&&b.w(M++,ka,la), b.w(M++,ka-Ua,la)):90===this.aa?(b.w(M++,ka,la-Ua),T&&b.w(M++,ka,la),b.w(M++,ka,la+Ra)):270===this.aa?(b.w(M++,ka,la+Ra),T&&b.w(M++,ka,la),b.w(M++,ka,la-Ua)):(b.w(M++,ka-Ua,la),T&&b.w(M++,ka,la),b.w(M++,ka+Ra,la));oa=pa}ba&&(pb=b.l(M-1).x,eb=b.l(M-1).y,ka=b.l(M).x,la=b.l(M).y,180===this.aa||0===this.aa?eb!==la&&(qb=0===this.aa?Math.min(Math.max((ka+pb)/2,this.Lb[Ga.layer]),ka):Math.max(Math.min((ka+pb)/2,this.Lb[Ga.layer]),ka),b.w(M++,qb,eb),b.w(M++,qb,la)):pb!==ka&&(qb=90===this.aa?Math.min(Math.max((la+ eb)/2,this.Lb[Ga.layer]),la):Math.max(Math.min((la+eb)/2,this.Lb[Ga.layer]),la),b.w(M++,pb,qb),b.w(M++,ka,qb)))}if(null!==d&&T){if(null!==h){if(b.computeSpot(!0)===rb){var ie=b.l(0),Nd=b.l(2);ie.K(Nd)||b.V(1,(ie.x+Nd.x)/2,(ie.y+Nd.y)/2)}C=b.getLinkPoint(e,h,rb,!0,!1,f,k);C.G()||C.set(e.U.cl);b.V(0,C.x,C.y)}null!==k&&(b.computeSpot(!1)===rb&&(ie=b.l(b.oa-1),Nd=b.l(b.oa-3),ie.K(Nd)||b.V(b.oa-2,(ie.x+Nd.x)/2,(ie.y+Nd.y)/2)),C=b.getLinkPoint(f,k,rb,!1,!1,e,h),C.G()||C.set(f.U.cl),b.V(b.oa-1,C.x,C.y))}b.Oi(); c.commit()}}}for(var je=new I(W),Fg=this.network.edges.i;Fg.next();){var dd=Fg.value.link;null!==dd&&dd.jc&&!je.contains(dd)&&je.add(dd)}if(0Xb.y&&(hc=Hg.y>Xb.y?0:Od.xjc.x&&(ye=kh.x>jc.x?0:Qb.yb.layer?1:a.Heb.He?1:a.Ydb.Yd?1:0:0};hn.prototype.SE=function(a,b){return a instanceof is&&b instanceof is&&a!==b?a.firstb.first||a.$hb.$h||a.Heb.He?1:a.Ydb.Yd?1:0:0}; hn.prototype.ix=function(a,b){return a instanceof is&&b instanceof is&&a!==b?a.Qdb.Qd||a.$hb.$h||a.Heb.He?1:a.Ydb.Yd?1:0:0};function js(a,b){var c=a-b;return-1c}function Ar(a,b){var c,d=a.Td[b];if(d>=a.Sg.length){c=[];for(var e=0;ea&&(this.Di=a,this.H()))});v.defineProperty(hn,{Fp:"setsPortSpots"},function(){return this.Kh},function(a){this.Kh!==a&&(v.j(a,"boolean",hn,"setsPortSpots"),this.Kh=a,this.H())});v.defineProperty(hn,{rE:"linkSpacing"},function(){return this.hr},function(a){this.hr!==a&&(v.j(a,"number",hn,"linkSpacing"),0<=a&&(this.hr=a,this.H()))});v.u(hn,{KH:"maxLayer"},function(){return this.ob}); v.u(hn,{eK:"maxIndex"},function(){return this.ov});v.u(hn,{dK:"maxColumn"},function(){return this.Fb});v.u(hn,{jK:"minIndexLayer"},function(){return this.rr});v.u(hn,{fK:"maxIndexLayer"},function(){return this.Hf});var nr;hn.CycleDepthFirst=nr=v.p(hn,"CycleDepthFirst",0);var tr;hn.CycleGreedy=tr=v.p(hn,"CycleGreedy",1);var or;hn.LayerOptimalLinkLength=or=v.p(hn,"LayerOptimalLinkLength",0);var Lr;hn.LayerLongestPathSink=Lr=v.p(hn,"LayerLongestPathSink",1);var Nr; hn.LayerLongestPathSource=Nr=v.p(hn,"LayerLongestPathSource",2);var pr;hn.InitDepthFirstOut=pr=v.p(hn,"InitDepthFirstOut",0);var Tr;hn.InitDepthFirstIn=Tr=v.p(hn,"InitDepthFirstIn",1);var Rr;hn.InitNaive=Rr=v.p(hn,"InitNaive",2);var Xr;hn.AggressiveNone=Xr=v.p(hn,"AggressiveNone",0);var qr;hn.AggressiveLess=qr=v.p(hn,"AggressiveLess",1);var Yr;hn.AggressiveMore=Yr=v.p(hn,"AggressiveMore",2);hn.PackNone=0;var Zr;hn.PackExpand=Zr=1;var $r;hn.PackStraighten=$r=2;var bs;hn.PackMedian=bs=4;var rr; hn.PackAll=rr=7;function is(){this.index=this.Yd=this.He=this.Qd=this.first=this.layer=0;this.link=null;this.$h=0}v.Kd(is,{layer:!0,first:!0,Qd:!0,He:!0,Yd:!0,index:!0,link:!0,$h:!0});function sr(){Yf.call(this)}v.Ja(sr,Yf);v.ea("LayeredDigraphNetwork",sr);sr.prototype.createVertex=function(){return new ks};sr.prototype.createEdge=function(){return new ls}; function ks(){oq.call(this);this.index=this.column=this.layer=-1;this.component=NaN;this.near=null;this.valid=!1;this.finish=this.Ro=NaN;this.Bm=0;this.Vz=this.Wz=null}v.Ja(ks,oq);v.ea("LayeredDigraphVertex",ks);function ls(){pq.call(this);this.forest=this.rev=this.valid=!1;this.portToPos=this.portFromPos=NaN;this.portToColOffset=this.portFromColOffset=0}v.Ja(ls,pq);v.ea("LayeredDigraphEdge",ls); 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?$s(a,k,pa,x,A):at(a,k,pa,x,A);pa=U.x;x=U.width;A=U.height;break;case Os:for(m=0;ms&&(Mua&&(kt(a,-ua,0,Ga,m-1),lt(C,-ua,0),lt(T,-ua,0),ua=0)}n.ma.m(ua,aa);x=Math.max(x,ba);A=Math.max(A,H+(0===Ia?0:y)+Ca.height);M=ba}else{0s&&(aaua&&(kt(a,0,-ua,Ga,m-1),lt(C,0,-ua),lt(T,0,-ua),ua=0);n.ma.m(M,ua);A=Math.max(A,U);x=Math.max(x,H+(0===Ia?0:y)+Ca.width);aa=U}oa++}0h&&(h=0),135q&&(q=0),p===Ps&&(l+=t/2+a.O.y),k+=d+c):b?(null===a.comments?d>x&&(p=pt(p,d-x,0),k=p.x,l=p.y,x=d,h=0):x=nt(a,x,h),0>h&&(k-=h,h=0),135A&&(p=pt(p,0,e-A),k=p.x,l=p.y,A=e,q=0):A=ot(a,A,q),0>q&&(l-=q,q=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(h+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,q+e),p[1].m(d,p[0].y),p[2].xc?$s(b,e,oa,H,C):at(b,e,oa,H,C);oa=C.x;H=C.width;C=C.height;break;case Os:for(k=0;kr&&(bar&&(Up&&(p=0),135x&&(x=0));b.Ma.m(p,x);b.fb.m(H,C)}} function $s(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.fb.width;e=h.fb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=90===Vs(a),n=0,p=0,q=0,r=0;rm&&(d-=m),e=Math.max(e,Math.max(w, q)+b+s.height),0>h.ma.x&&(c=tt(a,h.ma.x,!1,c,k))):(h.ma.m(d+b,c+k/2-h.O.y-h.Ma.y),d=Math.max(d,Math.max(y,p)+b+s.width),m=c+k/2-h.O.y-h.Ma.y,e=Math.max(e,m+s.height),0>m&&(e-=m),0>h.ma.y&&(c=tt(a,h.ma.y,!0,c,k))));return new B(c,0,d,e)} function at(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.fb.width;e=h.fb.height;return new B(c,0,d,e)}for(var k=a.nodeSpacing,l=a.rowSpacing,m=270===Vs(a),n=0,p=0,q=0,r=0;rp&&(d-=p),e=Math.max(e,Math.abs(Math.min(w, q))+l+s.height),0>h.ma.x&&(c=tt(a,h.ma.x,!1,c,k))):(h.ma.m(-d-s.width-l,c+k/2-h.O.y-h.Ma.y),d=Math.max(d,Math.abs(Math.min(y,p))+l+s.width),p=c+k/2-h.O.y-h.Ma.y,e=Math.max(e,p+s.height),0>p&&(e-=p),0>h.ma.y&&(c=tt(a,h.ma.y,!0,c,k))));for(r=0;rd&&(d=c+a.width);0>c&&(d-=c);return d;case Ws:return a.width>b?a.width:b;case Xs:return 2*a.O.x>b?a.width:b+a.width-2*a.O.x;case Ns:case Cs:return d=Math.min(0,c),c=Math.max(b,c+a.width),Math.max(a.width,c-d);case Os:return a.width-a.O.x+a.nodeSpacing/2+b;case Ps:return Math.max(a.width,a.O.x+a.nodeSpacing/2+b);default:return b}} function ot(a,b,c){switch(a.alignment){case Ls:case mt:var d=b;c+a.height>d&&(d=c+a.height);0>c&&(d-=c);return d;case Ws:return a.height>b?a.height:b;case Xs:return 2*a.O.y>b?a.height:b+a.height-2*a.O.y;case Ns:case Cs:return d=Math.min(0,c),c=Math.max(b,c+a.height),Math.max(a.height,c-d);case Os:return a.height-a.O.y+a.nodeSpacing/2+b;case Ps:return Math.max(a.height,a.O.y+a.nodeSpacing/2+b);default:return b}} function pt(a,b,c){switch(a){case mt:b/=2;c/=2;break;case Ls:b/=2;c/=2;break;case Ws:c=b=0;break;case Xs:break;default:v.k("Unhandled alignment value "+a.toString())}return new z(b,c)}function ct(a,b,c,d,e,f){b=pt(b,c,d);kt(a,b.x,b.y,e,f)}function kt(a,b,c,d,e){if(0!==b||0!==c)for(a=a.children;d<=e;d++){var f=a[d].ma;f.x+=b;f.y+=c}} function it(a,b,c,d){var e=b.parent;switch(a.Df){case ns:for(a=b.lc;a.next();)b=a.value,b.fromVertex===e&&b.Rr.m(c,d);break;case us:for(a=b.hc;a.next();)b=a.value,b.toVertex===e&&b.Rr.m(c,d);break;default:v.k("Unhandled path value "+a.Df.toString())}}function lt(a,b,c){for(var d=0;dp.length||null===q||2>q.length))for(m=l=0;lu&&e.ye.y&&ub.length||null===l||2>l.length)d=null;else{n=bt(a,b.length+l.length);for(d=f=e=0;fe;)u=l[f++],n[d++].m(u.x+m,u.y);l=bt(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=bt(a,p.length+f.length);for(m=y=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=bt(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=bt(a, b.length+l.length);for(d=f=e=0;fe;)u=l[f++],n[d++].m(u.x,u.y+m);l=bt(a,d);for(e=0;ep.length||null===f||2>f.length)e=null;else{n=bt(a,p.length+f.length);for(m=y=l=0;lf;)e=p[l++],n[m++].m(e.x,e.y);e=bt(a,m);for(l=0;l=a?0:135>=a?90:225>=a?180:315>=a?270:0} function Ys(a){var b=Vs(a),b=90===b||270===b,c=a.layerSpacing;if(0=a&&(this.ra.nodeIndentPastParent=a,this.H()))}); v.defineProperty(Z,{nodeSpacing:"nodeSpacing"},function(){return this.ra.nodeSpacing},function(a){this.ra.nodeSpacing!==a&&(v.j(a,"number",Z,"nodeSpacing"),this.ra.nodeSpacing=a,this.H())});v.defineProperty(Z,{layerSpacing:"layerSpacing"},function(){return this.ra.layerSpacing},function(a){this.ra.layerSpacing!==a&&(v.j(a,"number",Z,"layerSpacing"),this.ra.layerSpacing=a,this.H())}); v.defineProperty(Z,{layerSpacingParentOverlap:"layerSpacingParentOverlap"},function(){return this.ra.layerSpacingParentOverlap},function(a){this.ra.layerSpacingParentOverlap!==a&&(v.j(a,"number",Z,"layerSpacingParentOverlap"),0<=a&&1>=a&&(this.ra.layerSpacingParentOverlap=a,this.H()))});v.defineProperty(Z,{compaction:"compaction"},function(){return this.ra.compaction},function(a){this.ra.compaction!==a&&(v.pb(a,Z,Z,"compaction"),a===Ss||a===Us)&&(this.ra.compaction=a,this.H())}); v.defineProperty(Z,{breadthLimit:"breadthLimit"},function(){return this.ra.breadthLimit},function(a){this.ra.breadthLimit!==a&&(v.j(a,"number",Z,"breadthLimit"),0<=a&&(this.ra.breadthLimit=a,this.H()))});v.defineProperty(Z,{rowSpacing:"rowSpacing"},function(){return this.ra.rowSpacing},function(a){this.ra.rowSpacing!==a&&(v.j(a,"number",Z,"rowSpacing"),this.ra.rowSpacing=a,this.H())}); v.defineProperty(Z,{rowIndent:"rowIndent"},function(){return this.ra.rowIndent},function(a){this.ra.rowIndent!==a&&(v.j(a,"number",Z,"rowIndent"),0<=a&&(this.ra.rowIndent=a,this.H()))});v.defineProperty(Z,{commentSpacing:"commentSpacing"},function(){return this.ra.commentSpacing},function(a){this.ra.commentSpacing!==a&&(v.j(a,"number",Z,"commentSpacing"),this.ra.commentSpacing=a,this.H())}); v.defineProperty(Z,{commentMargin:"commentMargin"},function(){return this.ra.commentMargin},function(a){this.ra.commentMargin!==a&&(v.j(a,"number",Z,"commentMargin"),this.ra.commentMargin=a,this.H())});v.defineProperty(Z,{setsPortSpot:"setsPortSpot"},function(){return this.ra.setsPortSpot},function(a){this.ra.setsPortSpot!==a&&(v.j(a,"boolean",Z,"setsPortSpot"),this.ra.setsPortSpot=a,this.H())}); v.defineProperty(Z,{portSpot:"portSpot"},function(){return this.ra.portSpot},function(a){v.A(a,L,Z,"portSpot");this.ra.portSpot.K(a)||(this.ra.portSpot=a,this.H())});v.defineProperty(Z,{setsChildPortSpot:"setsChildPortSpot"},function(){return this.ra.setsChildPortSpot},function(a){this.ra.setsChildPortSpot!==a&&(v.j(a,"boolean",Z,"setsChildPortSpot"),this.ra.setsChildPortSpot=a,this.H())}); v.defineProperty(Z,{childPortSpot:"childPortSpot"},function(){return this.ra.childPortSpot},function(a){v.A(a,L,Z,"childPortSpot");this.ra.childPortSpot.K(a)||(this.ra.childPortSpot=a,this.H())});v.defineProperty(Z,{rJ:"alternateSorting"},function(){return this.ta.sorting},function(a){this.ta.sorting!==a&&(v.pb(a,Z,Z,"alternateSorting"),a===Hs||a===Is||a===Js||Ks)&&(this.ta.sorting=a,this.H())}); v.defineProperty(Z,{fJ:"alternateComparer"},function(){return this.ta.comparer},function(a){this.ta.comparer!==a&&(v.j(a,"function",Z,"alternateComparer"),this.ta.comparer=a,this.H())});v.defineProperty(Z,{$I:"alternateAngle"},function(){return this.ta.angle},function(a){this.ta.angle!==a&&(v.j(a,"number",Z,"alternateAngle"),0===a||90===a||180===a||270===a)&&(this.ta.angle=a,this.H())}); v.defineProperty(Z,{ZI:"alternateAlignment"},function(){return this.ta.alignment},function(a){this.ta.alignment!==a&&(v.pb(a,Z,Z,"alternateAlignment"),this.ta.alignment=a,this.H())});v.defineProperty(Z,{jJ:"alternateNodeIndent"},function(){return this.ta.nodeIndent},function(a){this.ta.nodeIndent!==a&&(v.j(a,"number",Z,"alternateNodeIndent"),0<=a&&(this.ta.nodeIndent=a,this.H()))}); v.defineProperty(Z,{kJ:"alternateNodeIndentPastParent"},function(){return this.ta.nodeIndentPastParent},function(a){this.ta.nodeIndentPastParent!==a&&(v.j(a,"number",Z,"alternateNodeIndentPastParent"),0<=a&&1>=a&&(this.ta.nodeIndentPastParent=a,this.H()))});v.defineProperty(Z,{lJ:"alternateNodeSpacing"},function(){return this.ta.nodeSpacing},function(a){this.ta.nodeSpacing!==a&&(v.j(a,"number",Z,"alternateNodeSpacing"),this.ta.nodeSpacing=a,this.H())}); v.defineProperty(Z,{hJ:"alternateLayerSpacing"},function(){return this.ta.layerSpacing},function(a){this.ta.layerSpacing!==a&&(v.j(a,"number",Z,"alternateLayerSpacing"),this.ta.layerSpacing=a,this.H())});v.defineProperty(Z,{iJ:"alternateLayerSpacingParentOverlap"},function(){return this.ta.layerSpacingParentOverlap},function(a){this.ta.layerSpacingParentOverlap!==a&&(v.j(a,"number",Z,"alternateLayerSpacingParentOverlap"),0<=a&&1>=a&&(this.ta.layerSpacingParentOverlap=a,this.H()))}); v.defineProperty(Z,{eJ:"alternateCompaction"},function(){return this.ta.compaction},function(a){this.ta.compaction!==a&&(v.pb(a,Z,Z,"alternateCompaction"),a===Ss||a===Us)&&(this.ta.compaction=a,this.H())});v.defineProperty(Z,{aJ:"alternateBreadthLimit"},function(){return this.ta.breadthLimit},function(a){this.ta.breadthLimit!==a&&(v.j(a,"number",Z,"alternateBreadthLimit"),0<=a&&(this.ta.breadthLimit=a,this.H()))}); v.defineProperty(Z,{oJ:"alternateRowSpacing"},function(){return this.ta.rowSpacing},function(a){this.ta.rowSpacing!==a&&(v.j(a,"number",Z,"alternateRowSpacing"),this.ta.rowSpacing=a,this.H())});v.defineProperty(Z,{nJ:"alternateRowIndent"},function(){return this.ta.rowIndent},function(a){this.ta.rowIndent!==a&&(v.j(a,"number",Z,"alternateRowIndent"),0<=a&&(this.ta.rowIndent=a,this.H()))}); v.defineProperty(Z,{dJ:"alternateCommentSpacing"},function(){return this.ta.commentSpacing},function(a){this.ta.commentSpacing!==a&&(v.j(a,"number",Z,"alternateCommentSpacing"),this.ta.commentSpacing=a,this.H())});v.defineProperty(Z,{cJ:"alternateCommentMargin"},function(){return this.ta.commentMargin},function(a){this.ta.commentMargin!==a&&(v.j(a,"number",Z,"alternateCommentMargin"),this.ta.commentMargin=a,this.H())}); v.defineProperty(Z,{qJ:"alternateSetsPortSpot"},function(){return this.ta.setsPortSpot},function(a){this.ta.setsPortSpot!==a&&(v.j(a,"boolean",Z,"alternateSetsPortSpot"),this.ta.setsPortSpot=a,this.H())});v.defineProperty(Z,{mJ:"alternatePortSpot"},function(){return this.ta.portSpot},function(a){v.A(a,L,Z,"alternatePortSpot");this.ta.portSpot.K(a)||(this.ta.portSpot=a,this.H())}); v.defineProperty(Z,{pJ:"alternateSetsChildPortSpot"},function(){return this.ta.setsChildPortSpot},function(a){this.ta.setsChildPortSpot!==a&&(v.j(a,"boolean",Z,"alternateSetsChildPortSpot"),this.ta.setsChildPortSpot=a,this.H())});v.defineProperty(Z,{bJ:"alternateChildPortSpot"},function(){return this.ta.childPortSpot},function(a){v.A(a,L,Z,"alternateChildPortSpot");this.ta.childPortSpot.K(a)||(this.ta.childPortSpot=a,this.H())});var ms;Z.PathDefault=ms=v.p(Z,"PathDefault",-1);var ns; Z.PathDestination=ns=v.p(Z,"PathDestination",0);var us;Z.PathSource=us=v.p(Z,"PathSource",1);var Hs;Z.SortingForwards=Hs=v.p(Z,"SortingForwards",10);var Is;Z.SortingReverse=Is=v.p(Z,"SortingReverse",11);var Js;Z.SortingAscending=Js=v.p(Z,"SortingAscending",12);var Ks;Z.SortingDescending=Ks=v.p(Z,"SortingDescending",13);var mt;Z.AlignmentCenterSubtrees=mt=v.p(Z,"AlignmentCenterSubtrees",20);var Ls;Z.AlignmentCenterChildren=Ls=v.p(Z,"AlignmentCenterChildren",21);var Ws; Z.AlignmentStart=Ws=v.p(Z,"AlignmentStart",22);var Xs;Z.AlignmentEnd=Xs=v.p(Z,"AlignmentEnd",23);var Ns;Z.AlignmentBus=Ns=v.p(Z,"AlignmentBus",24);var Cs;Z.AlignmentBusBranching=Cs=v.p(Z,"AlignmentBusBranching",25);var Os;Z.AlignmentTopLeftBus=Os=v.p(Z,"AlignmentTopLeftBus",26);var Ps;Z.AlignmentBottomRightBus=Ps=v.p(Z,"AlignmentBottomRightBus",27);var Ss;Z.CompactionNone=Ss=v.p(Z,"CompactionNone",30);var Us;Z.CompactionBlock=Us=v.p(Z,"CompactionBlock",31);var os; Z.StyleLayered=os=v.p(Z,"StyleLayered",40);var Gs;Z.StyleLastParents=Gs=v.p(Z,"StyleLastParents",41);var Fs;Z.StyleAlternating=Fs=v.p(Z,"StyleAlternating",42);var Es;Z.StyleRootOnly=Es=v.p(Z,"StyleRootOnly",43);var qs;Z.ArrangementVertical=qs=v.p(Z,"ArrangementVertical",50);var vt;Z.ArrangementHorizontal=vt=v.p(Z,"ArrangementHorizontal",51);var ts;Z.ArrangementFixedRoots=ts=v.p(Z,"ArrangementFixedRoots",52);var ps;Z.LayerIndividual=ps=v.p(Z,"LayerIndividual",60);var As; Z.LayerSiblings=As=v.p(Z,"LayerSiblings",61);var zs;Z.LayerUniform=zs=v.p(Z,"LayerUniform",62);function ss(){Yf.call(this)}v.Ja(ss,Yf);v.ea("TreeNetwork",ss);ss.prototype.createVertex=function(){return new rs};ss.prototype.createEdge=function(){return new xt}; function rs(){oq.call(this);this.initialized=!1;this.parent=null;this.children=[];this.maxGenerationCount=this.maxChildrenCount=this.descendantCount=this.level=0;this.comments=null;this.ma=new z(0,0);this.fb=new ia(0,0);this.Ma=new z(0,0);this.Bp=this.Ap=this.rI=!1;this.St=this.At=null;this.sorting=Hs;this.comparer=uq;this.angle=0;this.alignment=Ls;this.nodeIndentPastParent=this.nodeIndent=0;this.nodeSpacing=20;this.layerSpacing=50;this.layerSpacingParentOverlap=0;this.compaction=Us;this.breadthLimit= 0;this.rowSpacing=25;this.commentSpacing=this.rowIndent=10;this.commentMargin=20;this.setsPortSpot=!0;this.portSpot=fc;this.setsChildPortSpot=!0;this.childPortSpot=fc}v.Ja(rs,oq);v.ea("TreeVertex",rs); rs.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)};v.u(rs,{Dm:"childrenCount"},function(){return this.children.length});v.defineProperty(rs,{AK:"relativePosition"},function(){return this.ma},function(a){this.ma.set(a)});v.defineProperty(rs,{MK:"subtreeSize"},function(){return this.fb},function(a){this.fb.set(a)}); v.defineProperty(rs,{LK:"subtreeOffset"},function(){return this.Ma},function(a){this.Ma.set(a)});function xt(){pq.call(this);this.Rr=new z(0,0)}v.Ja(xt,pq);v.ea("TreeEdge",xt); xt.prototype.commit=function(){var a=this.link;if(null!==a&&!a.sl){var b=this.network.Pb,c=null,d=null;switch(b.Df){case ns:c=this.fromVertex;d=this.toVertex;break;case us:c=this.toVertex;d=this.fromVertex;break;default:v.k("Unhandled path value "+b.Df.toString())}if(null!==c&&null!==d)if(b=this.Rr,0!==b.x||0!==b.y||c.rI){var d=c.mb,e=Vs(c),f=Ys(c),h=c.rowSpacing;a.fn();var k=a.Ke===Ki,l=a.jc,m=0,n,p;a.Cl();if(l||k){for(m=2;4q.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Zs(c))))):c.alignment===Ws?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Zs(c))))):c.alignment===Ws?(r=d.left+b.x,0===b.x&&n.xq.y+c.rowIndent&&(r=Math.min(r,Math.max(n.y,r-Zs(c))))):c.alignment===Ws?(r=d.top+b.y,0===b.y&&n.yq.x+c.rowIndent&&(r=Math.min(r,Math.max(n.x,r-Zs(c))))):c.alignment===Ws?(r=d.left+b.x,0===b.x&&n.x