(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"00ee":function(t,e,i){var n=i("b622"),o=n("toStringTag"),r={};r[o]="z",t.exports="[object z]"===String(r)},"0366":function(t,e,i){var n=i("e330"),o=i("59ed"),r=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:r?r(t,e):function(){return t.apply(e,arguments)}}},"06cf":function(t,e,i){var n=i("83ab"),o=i("c65b"),r=i("d1e7"),s=i("5c6c"),a=i("fc6a"),h=i("a04b"),l=i("1a2d"),u=i("0cfb"),c=Object.getOwnPropertyDescriptor;e.f=n?c:function(t,e){if(t=a(t),e=h(e),u)try{return c(t,e)}catch(i){}if(l(t,e))return s(!o(r.f,t,e),t[e])}},"07fa":function(t,e,i){var n=i("50c4");t.exports=function(t){return n(t.length)}},"0cfb":function(t,e,i){var n=i("83ab"),o=i("d039"),r=i("cc12");t.exports=!n&&!o((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},"0d51":function(t,e,i){var n=i("da84"),o=n.String;t.exports=function(t){try{return o(t)}catch(e){return"Object"}}},"107c":function(t,e,i){var n=i("d039"),o=i("da84"),r=o.RegExp;t.exports=n((function(){var t=r("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}))},1626:function(t,e){t.exports=function(t){return"function"==typeof t}},"19aa":function(t,e,i){var n=i("da84"),o=i("3a9b"),r=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw r("Incorrect invocation")}},"1a2d":function(t,e,i){var n=i("e330"),o=i("7b0b"),r=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(o(t),e)}},"1be4":function(t,e,i){var n=i("d066");t.exports=n("document","documentElement")},"1c7e":function(t,e,i){var n=i("b622"),o=n("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(h){}t.exports=function(t,e){if(!e&&!r)return!1;var i=!1;try{var n={};n[o]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(h){}return i}},"1cdc":function(t,e,i){var n=i("342f");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},"1d80":function(t,e,i){var n=i("da84"),o=n.TypeError;t.exports=function(t){if(void 0==t)throw o("Can't call method on "+t);return t}},2266:function(t,e,i){var n=i("da84"),o=i("0366"),r=i("c65b"),s=i("825a"),a=i("0d51"),h=i("e95a"),l=i("07fa"),u=i("3a9b"),c=i("9a1f"),f=i("35a1"),d=i("2a62"),p=n.TypeError,g=function(t,e){this.stopped=t,this.result=e},y=g.prototype;t.exports=function(t,e,i){var n,m,v,x,b,w,k,M=i&&i.that,S=!(!i||!i.AS_ENTRIES),P=!(!i||!i.IS_ITERATOR),N=!(!i||!i.INTERRUPTED),C=o(e,M),T=function(t){return n&&d(n,"normal",t),new g(!0,t)},A=function(t){return S?(s(t),N?C(t[0],t[1],T):C(t[0],t[1])):N?C(t,T):C(t)};if(P)n=t;else{if(m=f(t),!m)throw p(a(t)+" is not iterable");if(h(m)){for(v=0,x=l(t);x>v;v++)if(b=A(t[v]),b&&u(y,b))return b;return new g(!1)}n=c(t,m)}w=n.next;while(!(k=r(w,n)).done){try{b=A(k.value)}catch(L){d(n,"throw",L)}if("object"==typeof b&&b&&u(y,b))return b}return new g(!1)}},"23cb":function(t,e,i){var n=i("5926"),o=Math.max,r=Math.min;t.exports=function(t,e){var i=n(t);return i<0?o(i+e,0):r(i,e)}},"23e7":function(t,e,i){var n=i("da84"),o=i("06cf").f,r=i("9112"),s=i("6eeb"),a=i("ce4e"),h=i("e893"),l=i("94ca");t.exports=function(t,e){var i,u,c,f,d,p,g=t.target,y=t.global,m=t.stat;if(u=y?n:m?n[g]||a(g,{}):(n[g]||{}).prototype,u)for(c in e){if(d=e[c],t.noTargetGet?(p=o(u,c),f=p&&p.value):f=u[c],i=l(y?c:g+(m?".":"#")+c,t.forced),!i&&void 0!==f){if(typeof d==typeof f)continue;h(d,f)}(t.sham||f&&f.sham)&&r(d,"sham",!0),s(u,c,d,t)}}},"241c":function(t,e,i){var n=i("ca84"),o=i("7839"),r=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},"25f0":function(t,e,i){"use strict";var n=i("e330"),o=i("5e77").PROPER,r=i("6eeb"),s=i("825a"),a=i("3a9b"),h=i("577e"),l=i("d039"),u=i("ad6d"),c="toString",f=RegExp.prototype,d=f[c],p=n(u),g=l((function(){return"/a/b"!=d.call({source:"a",flags:"b"})})),y=o&&d.name!=c;(g||y)&&r(RegExp.prototype,c,(function(){var t=s(this),e=h(t.source),i=t.flags,n=h(void 0===i&&a(f,t)&&!("flags"in f)?p(t):i);return"/"+e+"/"+n}),{unsafe:!0})},2626:function(t,e,i){"use strict";var n=i("d066"),o=i("9bf2"),r=i("b622"),s=i("83ab"),a=r("species");t.exports=function(t){var e=n(t),i=o.f;s&&e&&!e[a]&&i(e,a,{configurable:!0,get:function(){return this}})}},2877:function(t,e,i){"use strict";function n(t,e,i,n,o,r,s,a){var h,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(h=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=h):o&&(h=a?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),h)if(l.functional){l._injectStyles=h;var u=l.render;l.render=function(t,e){return h.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,h):[h]}return{exports:t,options:l}}i.d(e,"a",(function(){return n}))},"2a62":function(t,e,i){var n=i("c65b"),o=i("825a"),r=i("dc4a");t.exports=function(t,e,i){var s,a;o(t);try{if(s=r(t,"return"),!s){if("throw"===e)throw i;return i}s=n(s,t)}catch(h){a=!0,s=h}if("throw"===e)throw i;if(a)throw s;return o(s),i}},"2b0e":function(t,e,i){"use strict";(function(t){ /*! * Vue.js v2.6.14 * (c) 2014-2021 Evan You * Released under the MIT License. */ var i=Object.freeze({});function n(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function r(t){return!0===t}function s(t){return!1===t}function a(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function h(t){return null!==t&&"object"===typeof t}var l=Object.prototype.toString;function u(t){return"[object Object]"===l.call(t)}function c(t){return"[object RegExp]"===l.call(t)}function f(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function p(t){return null==t?"":Array.isArray(t)||u(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function g(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var i=Object.create(null),n=t.split(","),o=0;o-1)return t.splice(i,1)}}var x=Object.prototype.hasOwnProperty;function b(t,e){return x.call(t,e)}function w(t){var e=Object.create(null);return function(i){var n=e[i];return n||(e[i]=t(i))}}var k=/-(\w)/g,M=w((function(t){return t.replace(k,(function(t,e){return e?e.toUpperCase():""}))})),S=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),P=/\B([A-Z])/g,N=w((function(t){return t.replace(P,"-$1").toLowerCase()}));function C(t,e){function i(i){var n=arguments.length;return n?n>1?t.apply(e,arguments):t.call(e,i):t.call(e)}return i._length=t.length,i}function T(t,e){return t.bind(e)}var A=Function.prototype.bind?T:C;function L(t,e){e=e||0;var i=t.length-e,n=new Array(i);while(i--)n[i]=t[i+e];return n}function j(t,e){for(var i in e)t[i]=e[i];return t}function O(t){for(var e={},i=0;i0,it=Q&&Q.indexOf("edge/")>0,nt=(Q&&Q.indexOf("android"),Q&&/iphone|ipad|ipod|ios/.test(Q)||"ios"===Z),ot=(Q&&/chrome\/\d+/.test(Q),Q&&/phantomjs/.test(Q),Q&&Q.match(/firefox\/(\d+)/)),rt={}.watch,st=!1;if($)try{var at={};Object.defineProperty(at,"passive",{get:function(){st=!0}}),window.addEventListener("test-passive",null,at)}catch(Ss){}var ht=function(){return void 0===_&&(_=!$&&!J&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),_},lt=$&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ut(t){return"function"===typeof t&&/native code/.test(t.toString())}var ct,ft="undefined"!==typeof Symbol&&ut(Symbol)&&"undefined"!==typeof Reflect&&ut(Reflect.ownKeys);ct="undefined"!==typeof Set&&ut(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var dt=D,pt=0,gt=function(){this.id=pt++,this.subs=[]};gt.prototype.addSub=function(t){this.subs.push(t)},gt.prototype.removeSub=function(t){v(this.subs,t)},gt.prototype.depend=function(){gt.target&>.target.addDep(this)},gt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,i=t.length;e-1)if(r&&!b(o,"default"))s=!1;else if(""===s||s===N(t)){var h=ee(String,o.type);(h<0||a0&&(s=Te(s,(e||"")+"_"+i),Ce(s[0])&&Ce(l)&&(u[h]=kt(l.text+s[0].text),s.shift()),u.push.apply(u,s)):a(s)?Ce(l)?u[h]=kt(l.text+s):""!==s&&u.push(kt(s)):Ce(s)&&Ce(l)?u[h]=kt(l.text+s.text):(r(t._isVList)&&o(s.tag)&&n(s.key)&&o(e)&&(s.key="__vlist"+e+"_"+i+"__"),u.push(s)));return u}function Ae(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function Le(t){var e=je(t.$options.inject,t);e&&(At(!1),Object.keys(e).forEach((function(i){Ft(t,i,e[i])})),At(!0))}function je(t,e){if(t){for(var i=Object.create(null),n=ft?Reflect.ownKeys(t):Object.keys(t),o=0;o0,s=t?!!t.$stable:!r,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&n&&n!==i&&a===n.$key&&!r&&!n.$hasNormal)return n;for(var h in o={},t)t[h]&&"$"!==h[0]&&(o[h]=Ie(e,h,t[h]))}else o={};for(var l in e)l in o||(o[l]=Ee(e,l));return t&&Object.isExtensible(t)&&(t._normalized=o),U(o,"$stable",s),U(o,"$key",a),U(o,"$hasNormal",r),o}function Ie(t,e,i){var n=function(){var t=arguments.length?i.apply(null,arguments):i({});t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Ne(t);var e=t&&t[0];return t&&(!e||1===t.length&&e.isComment&&!Fe(e))?void 0:t};return i.proxy&&Object.defineProperty(t,e,{get:n,enumerable:!0,configurable:!0}),n}function Ee(t,e){return function(){return t[e]}}function Re(t,e){var i,n,r,s,a;if(Array.isArray(t)||"string"===typeof t)for(i=new Array(t.length),n=0,r=t.length;n1?L(i):i;for(var n=L(arguments,1),o='event handler for "'+t+'"',r=0,s=i.length;rdocument.createEvent("Event").timeStamp&&(_i=function(){return Wi.now()})}function $i(){var t,e;for(Hi=_i(),qi=!0,Vi.sort((function(t,e){return t.id-e.id})),Ui=0;UiUi&&Vi[i].id>t.id)i--;Vi.splice(i+1,0,t)}else Vi.push(t);Xi||(Xi=!0,ge($i))}}var en=0,nn=function(t,e,i,n,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),n?(this.deep=!!n.deep,this.user=!!n.user,this.lazy=!!n.lazy,this.sync=!!n.sync,this.before=n.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=i,this.id=++en,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ct,this.newDepIds=new ct,this.expression="","function"===typeof e?this.getter=e:(this.getter=H(e),this.getter||(this.getter=D)),this.value=this.lazy?void 0:this.get()};nn.prototype.get=function(){var t;mt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Ss){if(!this.user)throw Ss;ie(Ss,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&me(t),vt(),this.cleanupDeps()}return t},nn.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},nn.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var i=this.depIds;this.depIds=this.newDepIds,this.newDepIds=i,this.newDepIds.clear(),i=this.deps,this.deps=this.newDeps,this.newDeps=i,this.newDeps.length=0},nn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():tn(this)},nn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||h(t)||this.deep){var e=this.value;if(this.value=t,this.user){var i='callback for watcher "'+this.expression+'"';ne(this.cb,this.vm,[t,e],this.vm,i)}else this.cb.call(this.vm,t,e)}}},nn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nn.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},nn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var on={enumerable:!0,configurable:!0,get:D,set:D};function rn(t,e,i){on.get=function(){return this[e][i]},on.set=function(t){this[e][i]=t},Object.defineProperty(t,i,on)}function sn(t){t._watchers=[];var e=t.$options;e.props&&an(t,e.props),e.methods&&gn(t,e.methods),e.data?hn(t):Dt(t._data={},!0),e.computed&&cn(t,e.computed),e.watch&&e.watch!==rt&&yn(t,e.watch)}function an(t,e){var i=t.$options.propsData||{},n=t._props={},o=t.$options._propKeys=[],r=!t.$parent;r||At(!1);var s=function(r){o.push(r);var s=$t(r,e,i,t);Ft(n,r,s),r in t||rn(t,"_props",r)};for(var a in e)s(a);At(!0)}function hn(t){var e=t.$options.data;e=t._data="function"===typeof e?ln(e,t):e||{},u(e)||(e={});var i=Object.keys(e),n=t.$options.props,o=(t.$options.methods,i.length);while(o--){var r=i[o];0,n&&b(n,r)||q(r)||rn(t,"_data",r)}Dt(e,!0)}function ln(t,e){mt();try{return t.call(e,e)}catch(Ss){return ie(Ss,e,"data()"),{}}finally{vt()}}var un={lazy:!0};function cn(t,e){var i=t._computedWatchers=Object.create(null),n=ht();for(var o in e){var r=e[o],s="function"===typeof r?r:r.get;0,n||(i[o]=new nn(t,s||D,D,un)),o in t||fn(t,o,r)}}function fn(t,e,i){var n=!ht();"function"===typeof i?(on.get=n?dn(e):pn(i),on.set=D):(on.get=i.get?n&&!1!==i.cache?dn(e):pn(i.get):D,on.set=i.set||D),Object.defineProperty(t,e,on)}function dn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),gt.target&&e.depend(),e.value}}function pn(t){return function(){return t.call(this,this)}}function gn(t,e){t.$options.props;for(var i in e)t[i]="function"!==typeof e[i]?D:A(e[i],t)}function yn(t,e){for(var i in e){var n=e[i];if(Array.isArray(n))for(var o=0;o-1)return this;var i=L(arguments,1);return i.unshift(this),"function"===typeof t.install?t.install.apply(t,i):"function"===typeof t&&t.apply(null,i),e.push(t),this}}function Nn(t){t.mixin=function(t){return this.options=_t(this.options,t),this}}function Cn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var i=this,n=i.cid,o=t._Ctor||(t._Ctor={});if(o[n])return o[n];var r=t.name||i.options.name;var s=function(t){this._init(t)};return s.prototype=Object.create(i.prototype),s.prototype.constructor=s,s.cid=e++,s.options=_t(i.options,t),s["super"]=i,s.options.props&&Tn(s),s.options.computed&&An(s),s.extend=i.extend,s.mixin=i.mixin,s.use=i.use,V.forEach((function(t){s[t]=i[t]})),r&&(s.options.components[r]=s),s.superOptions=i.options,s.extendOptions=t,s.sealedOptions=j({},s.options),o[n]=s,s}}function Tn(t){var e=t.options.props;for(var i in e)rn(t.prototype,"_props",i)}function An(t){var e=t.options.computed;for(var i in e)fn(t.prototype,i,e[i])}function Ln(t){V.forEach((function(e){t[e]=function(t,i){return i?("component"===e&&u(i)&&(i.name=i.name||t,i=this.options._base.extend(i)),"directive"===e&&"function"===typeof i&&(i={bind:i,update:i}),this.options[e+"s"][t]=i,i):this.options[e+"s"][t]}}))}function jn(t){return t&&(t.Ctor.options.name||t.tag)}function On(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!c(t)&&t.test(e)}function Dn(t,e){var i=t.cache,n=t.keys,o=t._vnode;for(var r in i){var s=i[r];if(s){var a=s.name;a&&!e(a)&&Fn(i,r,n,o)}}}function Fn(t,e,i,n){var o=t[e];!o||n&&o.tag===n.tag||o.componentInstance.$destroy(),t[e]=null,v(i,e)}bn(Sn),vn(Sn),Ai(Sn),Di(Sn),xi(Sn);var Bn=[String,RegExp,Array],In={name:"keep-alive",abstract:!0,props:{include:Bn,exclude:Bn,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,i=t.keys,n=t.vnodeToCache,o=t.keyToCache;if(n){var r=n.tag,s=n.componentInstance,a=n.componentOptions;e[o]={name:jn(a),tag:r,componentInstance:s},i.push(o),this.max&&i.length>parseInt(this.max)&&Fn(e,i[0],i,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Fn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Dn(t,(function(t){return On(e,t)}))})),this.$watch("exclude",(function(e){Dn(t,(function(t){return!On(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=Mi(t),i=e&&e.componentOptions;if(i){var n=jn(i),o=this,r=o.include,s=o.exclude;if(r&&(!n||!On(r,n))||s&&n&&On(s,n))return e;var a=this,h=a.cache,l=a.keys,u=null==e.key?i.Ctor.cid+(i.tag?"::"+i.tag:""):e.key;h[u]?(e.componentInstance=h[u].componentInstance,v(l,u),l.push(u)):(this.vnodeToCache=e,this.keyToCache=u),e.data.keepAlive=!0}return e||t&&t[0]}},En={KeepAlive:In};function Rn(t){var e={get:function(){return Y}};Object.defineProperty(t,"config",e),t.util={warn:dt,extend:j,mergeOptions:_t,defineReactive:Ft},t.set=Bt,t.delete=It,t.nextTick=ge,t.observable=function(t){return Dt(t),t},t.options=Object.create(null),V.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,j(t.options.components,En),Pn(t),Nn(t),Cn(t),Ln(t)}Rn(Sn),Object.defineProperty(Sn.prototype,"$isServer",{get:ht}),Object.defineProperty(Sn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Sn,"FunctionalRenderContext",{value:Qe}),Sn.version="2.6.14";var zn=y("style,class"),Vn=y("input,textarea,option,select,progress"),Gn=function(t,e,i){return"value"===i&&Vn(t)&&"button"!==e||"selected"===i&&"option"===t||"checked"===i&&"input"===t||"muted"===i&&"video"===t},Yn=y("contenteditable,draggable,spellcheck"),Xn=y("events,caret,typing,plaintext-only"),qn=function(t,e){return Wn(e)||"false"===e?"false":"contenteditable"===t&&Xn(e)?e:"true"},Un=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),Kn="http://www.w3.org/1999/xlink",Hn=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},_n=function(t){return Hn(t)?t.slice(6,t.length):""},Wn=function(t){return null==t||!1===t};function $n(t){var e=t.data,i=t,n=t;while(o(n.componentInstance))n=n.componentInstance._vnode,n&&n.data&&(e=Jn(n.data,e));while(o(i=i.parent))i&&i.data&&(e=Jn(e,i.data));return Zn(e.staticClass,e.class)}function Jn(t,e){return{staticClass:Qn(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Zn(t,e){return o(t)||o(e)?Qn(t,to(e)):""}function Qn(t,e){return t?e?t+" "+e:t:e||""}function to(t){return Array.isArray(t)?eo(t):h(t)?io(t):"string"===typeof t?t:""}function eo(t){for(var e,i="",n=0,r=t.length;n-1?ho[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:ho[t]=/HTMLUnknownElement/.test(e.toString())}var uo=y("text,number,password,search,email,tel,url");function co(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function fo(t,e){var i=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&i.setAttribute("multiple","multiple"),i}function po(t,e){return document.createElementNS(no[t],e)}function go(t){return document.createTextNode(t)}function yo(t){return document.createComment(t)}function mo(t,e,i){t.insertBefore(e,i)}function vo(t,e){t.removeChild(e)}function xo(t,e){t.appendChild(e)}function bo(t){return t.parentNode}function wo(t){return t.nextSibling}function ko(t){return t.tagName}function Mo(t,e){t.textContent=e}function So(t,e){t.setAttribute(e,"")}var Po=Object.freeze({createElement:fo,createElementNS:po,createTextNode:go,createComment:yo,insertBefore:mo,removeChild:vo,appendChild:xo,parentNode:bo,nextSibling:wo,tagName:ko,setTextContent:Mo,setStyleScope:So}),No={create:function(t,e){Co(e)},update:function(t,e){t.data.ref!==e.data.ref&&(Co(t,!0),Co(e))},destroy:function(t){Co(t,!0)}};function Co(t,e){var i=t.data.ref;if(o(i)){var n=t.context,r=t.componentInstance||t.elm,s=n.$refs;e?Array.isArray(s[i])?v(s[i],r):s[i]===r&&(s[i]=void 0):t.data.refInFor?Array.isArray(s[i])?s[i].indexOf(r)<0&&s[i].push(r):s[i]=[r]:s[i]=r}}var To=new xt("",{},[]),Ao=["create","activate","update","remove","destroy"];function Lo(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&jo(t,e)||r(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function jo(t,e){if("input"!==t.tag)return!0;var i,n=o(i=t.data)&&o(i=i.attrs)&&i.type,r=o(i=e.data)&&o(i=i.attrs)&&i.type;return n===r||uo(n)&&uo(r)}function Oo(t,e,i){var n,r,s={};for(n=e;n<=i;++n)r=t[n].key,o(r)&&(s[r]=n);return s}function Do(t){var e,i,s={},h=t.modules,l=t.nodeOps;for(e=0;eg?(c=n(i[v+1])?null:i[v+1].elm,M(t,c,i,p,v,r)):p>v&&P(e,f,g)}function T(t,e,i,n){for(var r=i;r-1?qo(t,e,i):Un(e)?Wn(i)?t.removeAttribute(e):(i="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,i)):Yn(e)?t.setAttribute(e,qn(e,i)):Hn(e)?Wn(i)?t.removeAttributeNS(Kn,_n(e)):t.setAttributeNS(Kn,e,i):qo(t,e,i)}function qo(t,e,i){if(Wn(i))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==i&&!t.__ieph){var n=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",n)};t.addEventListener("input",n),t.__ieph=!0}t.setAttribute(e,i)}}var Uo={create:Yo,update:Yo};function Ko(t,e){var i=e.elm,r=e.data,s=t.data;if(!(n(r.staticClass)&&n(r.class)&&(n(s)||n(s.staticClass)&&n(s.class)))){var a=$n(e),h=i._transitionClasses;o(h)&&(a=Qn(a,to(h))),a!==i._prevClass&&(i.setAttribute("class",a),i._prevClass=a)}}var Ho,_o={create:Ko,update:Ko},Wo="__r",$o="__c";function Jo(t){if(o(t[Wo])){var e=tt?"change":"input";t[e]=[].concat(t[Wo],t[e]||[]),delete t[Wo]}o(t[$o])&&(t.change=[].concat(t[$o],t.change||[]),delete t[$o])}function Zo(t,e,i){var n=Ho;return function o(){var r=e.apply(null,arguments);null!==r&&er(t,o,i,n)}}var Qo=ae&&!(ot&&Number(ot[1])<=53);function tr(t,e,i,n){if(Qo){var o=Hi,r=e;e=r._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return r.apply(this,arguments)}}Ho.addEventListener(t,e,st?{capture:i,passive:n}:i)}function er(t,e,i,n){(n||Ho).removeEventListener(t,e._wrapper||e,i)}function ir(t,e){if(!n(t.data.on)||!n(e.data.on)){var i=e.data.on||{},o=t.data.on||{};Ho=e.elm,Jo(i),we(i,o,tr,er,Zo,e.context),Ho=void 0}}var nr,or={create:ir,update:ir};function rr(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,r,s=e.elm,a=t.data.domProps||{},h=e.data.domProps||{};for(i in o(h.__ob__)&&(h=e.data.domProps=j({},h)),a)i in h||(s[i]="");for(i in h){if(r=h[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),r===a[i])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===i&&"PROGRESS"!==s.tagName){s._value=r;var l=n(r)?"":String(r);sr(s,l)&&(s.value=l)}else if("innerHTML"===i&&ro(s.tagName)&&n(s.innerHTML)){nr=nr||document.createElement("div"),nr.innerHTML=""+r+"";var u=nr.firstChild;while(s.firstChild)s.removeChild(s.firstChild);while(u.firstChild)s.appendChild(u.firstChild)}else if(r!==a[i])try{s[i]=r}catch(Ss){}}}}function sr(t,e){return!t.composing&&("OPTION"===t.tagName||ar(t,e)||hr(t,e))}function ar(t,e){var i=!0;try{i=document.activeElement!==t}catch(Ss){}return i&&t.value!==e}function hr(t,e){var i=t.value,n=t._vModifiers;if(o(n)){if(n.number)return g(i)!==g(e);if(n.trim)return i.trim()!==e.trim()}return i!==e}var lr={create:rr,update:rr},ur=w((function(t){var e={},i=/;(?![^(]*\))/g,n=/:(.+)/;return t.split(i).forEach((function(t){if(t){var i=t.split(n);i.length>1&&(e[i[0].trim()]=i[1].trim())}})),e}));function cr(t){var e=fr(t.style);return t.staticStyle?j(t.staticStyle,e):e}function fr(t){return Array.isArray(t)?O(t):"string"===typeof t?ur(t):t}function dr(t,e){var i,n={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(i=cr(o.data))&&j(n,i)}(i=cr(t.data))&&j(n,i);var r=t;while(r=r.parent)r.data&&(i=cr(r.data))&&j(n,i);return n}var pr,gr=/^--/,yr=/\s*!important$/,mr=function(t,e,i){if(gr.test(e))t.style.setProperty(e,i);else if(yr.test(i))t.style.setProperty(N(e),i.replace(yr,""),"important");else{var n=xr(e);if(Array.isArray(i))for(var o=0,r=i.length;o-1?e.split(kr).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var i=" "+(t.getAttribute("class")||"")+" ";i.indexOf(" "+e+" ")<0&&t.setAttribute("class",(i+e).trim())}}function Sr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(kr).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var i=" "+(t.getAttribute("class")||"")+" ",n=" "+e+" ";while(i.indexOf(n)>=0)i=i.replace(n," ");i=i.trim(),i?t.setAttribute("class",i):t.removeAttribute("class")}}function Pr(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&j(e,Nr(t.name||"v")),j(e,t),e}return"string"===typeof t?Nr(t):void 0}}var Nr=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),Cr=$&&!et,Tr="transition",Ar="animation",Lr="transition",jr="transitionend",Or="animation",Dr="animationend";Cr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Lr="WebkitTransition",jr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Or="WebkitAnimation",Dr="webkitAnimationEnd"));var Fr=$?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Br(t){Fr((function(){Fr(t)}))}function Ir(t,e){var i=t._transitionClasses||(t._transitionClasses=[]);i.indexOf(e)<0&&(i.push(e),Mr(t,e))}function Er(t,e){t._transitionClasses&&v(t._transitionClasses,e),Sr(t,e)}function Rr(t,e,i){var n=Vr(t,e),o=n.type,r=n.timeout,s=n.propCount;if(!o)return i();var a=o===Tr?jr:Dr,h=0,l=function(){t.removeEventListener(a,u),i()},u=function(e){e.target===t&&++h>=s&&l()};setTimeout((function(){h0&&(i=Tr,u=s,c=r.length):e===Ar?l>0&&(i=Ar,u=l,c=h.length):(u=Math.max(s,l),i=u>0?s>l?Tr:Ar:null,c=i?i===Tr?r.length:h.length:0);var f=i===Tr&&zr.test(n[Lr+"Property"]);return{type:i,timeout:u,propCount:c,hasTransform:f}}function Gr(t,e){while(t.length1}function Hr(t,e){!0!==e.data.show&&Xr(e)}var _r=$?{create:Hr,activate:Hr,remove:function(t,e){!0!==t.data.show?qr(t,e):e()}}:{},Wr=[Uo,_o,or,lr,wr,_r],$r=Wr.concat(Go),Jr=Do({nodeOps:Po,modules:$r});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&rs(t,"input")}));var Zr={inserted:function(t,e,i,n){"select"===i.tag?(n.elm&&!n.elm._vOptions?ke(i,"postpatch",(function(){Zr.componentUpdated(t,e,i)})):Qr(t,e,i.context),t._vOptions=[].map.call(t.options,is)):("textarea"===i.tag||uo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",ns),t.addEventListener("compositionend",os),t.addEventListener("change",os),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,i){if("select"===i.tag){Qr(t,e,i.context);var n=t._vOptions,o=t._vOptions=[].map.call(t.options,is);if(o.some((function(t,e){return!I(t,n[e])}))){var r=t.multiple?e.value.some((function(t){return es(t,o)})):e.value!==e.oldValue&&es(e.value,o);r&&rs(t,"change")}}}};function Qr(t,e,i){ts(t,e,i),(tt||it)&&setTimeout((function(){ts(t,e,i)}),0)}function ts(t,e,i){var n=e.value,o=t.multiple;if(!o||Array.isArray(n)){for(var r,s,a=0,h=t.options.length;a-1,s.selected!==r&&(s.selected=r);else if(I(is(s),n))return void(t.selectedIndex!==a&&(t.selectedIndex=a));o||(t.selectedIndex=-1)}}function es(t,e){return e.every((function(e){return!I(e,t)}))}function is(t){return"_value"in t?t._value:t.value}function ns(t){t.target.composing=!0}function os(t){t.target.composing&&(t.target.composing=!1,rs(t.target,"input"))}function rs(t,e){var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!0),t.dispatchEvent(i)}function ss(t){return!t.componentInstance||t.data&&t.data.transition?t:ss(t.componentInstance._vnode)}var as={bind:function(t,e,i){var n=e.value;i=ss(i);var o=i.data&&i.data.transition,r=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;n&&o?(i.data.show=!0,Xr(i,(function(){t.style.display=r}))):t.style.display=n?r:"none"},update:function(t,e,i){var n=e.value,o=e.oldValue;if(!n!==!o){i=ss(i);var r=i.data&&i.data.transition;r?(i.data.show=!0,n?Xr(i,(function(){t.style.display=t.__vOriginalDisplay})):qr(i,(function(){t.style.display="none"}))):t.style.display=n?t.__vOriginalDisplay:"none"}},unbind:function(t,e,i,n,o){o||(t.style.display=t.__vOriginalDisplay)}},hs={model:Zr,show:as},ls={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function us(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?us(Mi(e.children)):t}function cs(t){var e={},i=t.$options;for(var n in i.propsData)e[n]=t[n];var o=i._parentListeners;for(var r in o)e[M(r)]=o[r];return e}function fs(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function ds(t){while(t=t.parent)if(t.data.transition)return!0}function ps(t,e){return e.key===t.key&&e.tag===t.tag}var gs=function(t){return t.tag||Fe(t)},ys=function(t){return"show"===t.name},ms={name:"transition",props:ls,abstract:!0,render:function(t){var e=this,i=this.$slots.default;if(i&&(i=i.filter(gs),i.length)){0;var n=this.mode;0;var o=i[0];if(ds(this.$vnode))return o;var r=us(o);if(!r)return o;if(this._leaving)return fs(t,o);var s="__transition-"+this._uid+"-";r.key=null==r.key?r.isComment?s+"comment":s+r.tag:a(r.key)?0===String(r.key).indexOf(s)?r.key:s+r.key:r.key;var h=(r.data||(r.data={})).transition=cs(this),l=this._vnode,u=us(l);if(r.data.directives&&r.data.directives.some(ys)&&(r.data.show=!0),u&&u.data&&!ps(r,u)&&!Fe(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var c=u.data.transition=j({},h);if("out-in"===n)return this._leaving=!0,ke(c,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),fs(t,o);if("in-out"===n){if(Fe(r))return l;var f,d=function(){f()};ke(h,"afterEnter",d),ke(h,"enterCancelled",d),ke(c,"delayLeave",(function(t){f=t}))}}return o}}},vs=j({tag:String,moveClass:String},ls);delete vs.mode;var xs={props:vs,beforeMount:function(){var t=this,e=this._update;this._update=function(i,n){var o=ji(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,i,n)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",i=Object.create(null),n=this.prevChildren=this.children,o=this.$slots.default||[],r=this.children=[],s=cs(this),a=0;a0&&n[0]<4?1:+(n[0]+n[1])),!o&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(o=+n[1]))),t.exports=o},"342f":function(t,e,i){var n=i("d066");t.exports=n("navigator","userAgent")||""},"35a1":function(t,e,i){var n=i("f5df"),o=i("dc4a"),r=i("3f8c"),s=i("b622"),a=s("iterator");t.exports=function(t){if(void 0!=t)return o(t,a)||o(t,"@@iterator")||r[n(t)]}},"37e8":function(t,e,i){var n=i("83ab"),o=i("9bf2"),r=i("825a"),s=i("fc6a"),a=i("df75");t.exports=n?Object.defineProperties:function(t,e){r(t);var i,n=s(e),h=a(e),l=h.length,u=0;while(l>u)o.f(t,i=h[u++],n[i]);return t}},"3a9b":function(t,e,i){var n=i("e330");t.exports=n({}.isPrototypeOf)},"3bbe":function(t,e,i){var n=i("da84"),o=i("1626"),r=n.String,s=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw s("Can't set "+r(t)+" as a prototype")}},"3f8c":function(t,e){t.exports={}},"44ad":function(t,e,i){var n=i("da84"),o=i("e330"),r=i("d039"),s=i("c6b6"),a=n.Object,h=o("".split);t.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?h(t,""):a(t)}:a},"44d2":function(t,e,i){var n=i("b622"),o=i("7c73"),r=i("9bf2"),s=n("unscopables"),a=Array.prototype;void 0==a[s]&&r.f(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},"44de":function(t,e,i){var n=i("da84");t.exports=function(t,e){var i=n.console;i&&i.error&&(1==arguments.length?i.error(t):i.error(t,e))}},"44e7":function(t,e,i){var n=i("861d"),o=i("c6b6"),r=i("b622"),s=r("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[s])?!!e:"RegExp"==o(t))}},4840:function(t,e,i){var n=i("825a"),o=i("5087"),r=i("b622"),s=r("species");t.exports=function(t,e){var i,r=n(t).constructor;return void 0===r||void 0==(i=n(r)[s])?e:o(i)}},"485a":function(t,e,i){var n=i("da84"),o=i("c65b"),r=i("1626"),s=i("861d"),a=n.TypeError;t.exports=function(t,e){var i,n;if("string"===e&&r(i=t.toString)&&!s(n=o(i,t)))return n;if(r(i=t.valueOf)&&!s(n=o(i,t)))return n;if("string"!==e&&r(i=t.toString)&&!s(n=o(i,t)))return n;throw a("Can't convert object to primitive value")}},4930:function(t,e,i){var n=i("2d00"),o=i("d039");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"4d63":function(t,e,i){var n=i("83ab"),o=i("da84"),r=i("e330"),s=i("94ca"),a=i("7156"),h=i("9112"),l=i("9bf2").f,u=i("241c").f,c=i("3a9b"),f=i("44e7"),d=i("577e"),p=i("ad6d"),g=i("9f7f"),y=i("6eeb"),m=i("d039"),v=i("1a2d"),x=i("69f3").enforce,b=i("2626"),w=i("b622"),k=i("fce3"),M=i("107c"),S=w("match"),P=o.RegExp,N=P.prototype,C=o.SyntaxError,T=r(p),A=r(N.exec),L=r("".charAt),j=r("".replace),O=r("".indexOf),D=r("".slice),F=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,B=/a/g,I=/a/g,E=new P(B)!==B,R=g.UNSUPPORTED_Y,z=n&&(!E||R||k||M||m((function(){return I[S]=!1,P(B)!=B||P(I)==I||"/a/i"!=P(B,"i")}))),V=function(t){for(var e,i=t.length,n=0,o="",r=!1;n<=i;n++)e=L(t,n),"\\"!==e?r||"."!==e?("["===e?r=!0:"]"===e&&(r=!1),o+=e):o+="[\\s\\S]":o+=e+L(t,++n);return o},G=function(t){for(var e,i=t.length,n=0,o="",r=[],s={},a=!1,h=!1,l=0,u="";n<=i;n++){if(e=L(t,n),"\\"===e)e+=L(t,++n);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:A(F,D(t,n+1))&&(n+=2,h=!0),o+=e,l++;continue;case">"===e&&h:if(""===u||v(s,u))throw new C("Invalid capture group name");s[u]=!0,r[r.length]=[u,l],h=!1,u="";continue}h?u+=e:o+=e}return[o,r]};if(s("RegExp",z)){for(var Y=function(t,e){var i,n,o,r,s,l,u=c(N,this),p=f(t),g=void 0===e,y=[],m=t;if(!u&&p&&g&&t.constructor===Y)return t;if((p||c(N,t))&&(t=t.source,g&&(e="flags"in m?m.flags:T(m))),t=void 0===t?"":d(t),e=void 0===e?"":d(e),m=t,k&&"dotAll"in B&&(n=!!e&&O(e,"s")>-1,n&&(e=j(e,/s/g,""))),i=e,R&&"sticky"in B&&(o=!!e&&O(e,"y")>-1,o&&(e=j(e,/y/g,""))),M&&(r=G(t),t=r[0],y=r[1]),s=a(P(t,e),u?this:N,Y),(n||o||y.length)&&(l=x(s),n&&(l.dotAll=!0,l.raw=Y(V(t),i)),o&&(l.sticky=!0),y.length&&(l.groups=y)),t!==m)try{h(s,"source",""===m?"(?:)":m)}catch(v){}return s},X=function(t){t in Y||l(Y,t,{configurable:!0,get:function(){return P[t]},set:function(e){P[t]=e}})},q=u(P),U=0;q.length>U;)X(q[U++]);N.constructor=Y,Y.prototype=N,y(o,"RegExp",Y)}b("RegExp")},"4d64":function(t,e,i){var n=i("fc6a"),o=i("23cb"),r=i("07fa"),s=function(t){return function(e,i,s){var a,h=n(e),l=r(h),u=o(s,l);if(t&&i!=i){while(l>u)if(a=h[u++],a!=a)return!0}else for(;l>u;u++)if((t||u in h)&&h[u]===i)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},5087:function(t,e,i){var n=i("da84"),o=i("68ee"),r=i("0d51"),s=n.TypeError;t.exports=function(t){if(o(t))return t;throw s(r(t)+" is not a constructor")}},"50c4":function(t,e,i){var n=i("5926"),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},5692:function(t,e,i){var n=i("c430"),o=i("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.1",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,i){var n=i("d066"),o=i("e330"),r=i("241c"),s=i("7418"),a=i("825a"),h=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=r.f(a(t)),i=s.f;return i?h(e,i(t)):e}},"577e":function(t,e,i){var n=i("da84"),o=i("f5df"),r=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},5926:function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){var e=+t;return e!==e||0===e?0:(e>0?n:i)(e)}},"59ed":function(t,e,i){var n=i("da84"),o=i("1626"),r=i("0d51"),s=n.TypeError;t.exports=function(t){if(o(t))return t;throw s(r(t)+" is not a function")}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5e77":function(t,e,i){var n=i("83ab"),o=i("1a2d"),r=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=o(r,"name"),h=a&&"something"===function(){}.name,l=a&&(!n||n&&s(r,"name").configurable);t.exports={EXISTS:a,PROPER:h,CONFIGURABLE:l}},"605d":function(t,e,i){var n=i("c6b6"),o=i("da84");t.exports="process"==n(o.process)},6069:function(t,e){t.exports="object"==typeof window},"60da":function(t,e,i){"use strict";var n=i("83ab"),o=i("e330"),r=i("c65b"),s=i("d039"),a=i("df75"),h=i("7418"),l=i("d1e7"),u=i("7b0b"),c=i("44ad"),f=Object.assign,d=Object.defineProperty,p=o([].concat);t.exports=!f||s((function(){if(n&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol(),o="abcdefghijklmnopqrst";return t[i]=7,o.split("").forEach((function(t){e[t]=t})),7!=f({},t)[i]||a(f({},e)).join("")!=o}))?function(t,e){var i=u(t),o=arguments.length,s=1,f=h.f,d=l.f;while(o>s){var g,y=c(arguments[s++]),m=f?p(a(y),f(y)):a(y),v=m.length,x=0;while(v>x)g=m[x++],n&&!r(d,y,g)||(i[g]=y[g])}return i}:f},"68ee":function(t,e,i){var n=i("e330"),o=i("d039"),r=i("1626"),s=i("f5df"),a=i("d066"),h=i("8925"),l=function(){},u=[],c=a("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=n(f.exec),p=!f.exec(l),g=function(t){if(!r(t))return!1;try{return c(l,u,t),!0}catch(e){return!1}},y=function(t){if(!r(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return p||!!d(f,h(t))};t.exports=!c||o((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?y:g},"69f3":function(t,e,i){var n,o,r,s=i("7f9a"),a=i("da84"),h=i("e330"),l=i("861d"),u=i("9112"),c=i("1a2d"),f=i("c6cd"),d=i("f772"),p=i("d012"),g="Object already initialized",y=a.TypeError,m=a.WeakMap,v=function(t){return r(t)?o(t):n(t,{})},x=function(t){return function(e){var i;if(!l(e)||(i=o(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return i}};if(s||f.state){var b=f.state||(f.state=new m),w=h(b.get),k=h(b.has),M=h(b.set);n=function(t,e){if(k(b,t))throw new y(g);return e.facade=t,M(b,t,e),e},o=function(t){return w(b,t)||{}},r=function(t){return k(b,t)}}else{var S=d("state");p[S]=!0,n=function(t,e){if(c(t,S))throw new y(g);return e.facade=t,u(t,S,e),e},o=function(t){return c(t,S)?t[S]:{}},r=function(t){return c(t,S)}}t.exports={set:n,get:o,has:r,enforce:v,getterFor:x}},"6eeb":function(t,e,i){var n=i("da84"),o=i("1626"),r=i("1a2d"),s=i("9112"),a=i("ce4e"),h=i("8925"),l=i("69f3"),u=i("5e77").CONFIGURABLE,c=l.get,f=l.enforce,d=String(String).split("String");(t.exports=function(t,e,i,h){var l,c=!!h&&!!h.unsafe,p=!!h&&!!h.enumerable,g=!!h&&!!h.noTargetGet,y=h&&void 0!==h.name?h.name:e;o(i)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!r(i,"name")||u&&i.name!==y)&&s(i,"name",y),l=f(i),l.source||(l.source=d.join("string"==typeof y?y:""))),t!==n?(c?!g&&t[e]&&(p=!0):delete t[e],p?t[e]=i:s(t,e,i)):p?t[e]=i:a(e,i)})(Function.prototype,"toString",(function(){return o(this)&&c(this).source||h(this)}))},"6f70":function(t,e,i){(function(e){(function(){var i;function n(t){var e=0;return function(){return ee&&(e=Math.max(0,n+e)),(null==i||i>n)&&(i=n),i=Number(i),0>i&&(i=Math.max(0,n+i)),e=Number(e||0);e=t.length?t.push(i):t.splice(e,0,i):w("Cannot insert an object into an HTMLCollection or NodeList: "+i+" at "+e)}function L(t,e){Array.isArray(t)?e>=t.length?t.pop():t.splice(e,1):w("Cannot remove an object from an HTMLCollection or NodeList at "+e)}function j(){var t=q.pop();return void 0===t?[]:t}function O(t){t.length=0,q.push(t)}function D(t){if("function"===typeof t){if(t.className)return t.className;if(t.name)return t.name;var e=t.toString();if(e=e.substring(9,e.indexOf("(")).trim(),""!==e)return t._className=e}else if(N(t)&&t.constructor)return D(t.constructor);return typeof t}function F(t){var e=t;return N(t)&&(t.text?e=t.text:t.name?e=t.name:void 0!==t.key?e=t.key:void 0!==t.id?e=t.id:t.constructor===Object&&(t.Text?e=t.Text:t.Name?e=t.Name:void 0!==t.Key?e=t.Key:void 0!==t.Id?e=t.Id:void 0!==t.ID&&(e=t.ID))),void 0===e?"undefined":null===e?"null":e.toString()}function B(t,e){if(t.hasOwnProperty(e))return!0;for(t=Object.getPrototypeOf(t);t&&t!==Function;){if(t.hasOwnProperty(e))return!0;var i=t.nB;if(i&&i[e])return!0;t=Object.getPrototypeOf(t)}return!1}function I(t,e,i){Object.defineProperty(Di.prototype,t,{get:e,set:i})}function E(t){for(var e=[],i=0;256>i;i++)e["0123456789abcdef".charAt(i>>4)+"0123456789abcdef".charAt(15&i)]=String.fromCharCode(i);t.length%2&&(t="0"+t),i=[];for(var n=0,o=0;oi;i++)e[i]=i;for(i=n=0;256>i;i++)n=(n+e[i]+119)%256,o=e[i],e[i]=e[n],e[n]=o;n=i=0;for(var r="",s=0;sthis.key)return!1;t=t.j;var e=t.length,i=++this.Ra,n=this.ff;if(null!==n)for(;ithis.key)return!1;var e=--this.Ra;return 0<=e?(this.key=e,this.value=t.j[e],!0):(this.Sd(),!1)},tt.prototype.rd=function(){return this.next()},tt.prototype.first=function(){var t=this.ub;this.ia=t.Ba;var e=t.j;return this.Ra=t=e.length-1,0<=t?(e=e[t],this.key=t,this.value=e):null},tt.prototype.any=function(t){var e=this.ub;e.gh=null,e=e.j;var i=e.length;for(this.Ra=i,--i;0<=i;i--)if(t(e[i]))return!0;return!1},tt.prototype.all=function(t){var e=this.ub;e.gh=null,e=e.j;var i=e.length;for(this.Ra=i,--i;0<=i;i--)if(!t(e[i]))return!1;return!0},tt.prototype.each=function(t){var e=this.ub;e.gh=null,e=e.j;var i=e.length;for(this.Ra=i,--i;0<=i;i--)t(e[i]);return this},tt.prototype.map=function(t){var e=this.ub;e.gh=null;var i=[];e=e.j;var n=e.length;for(this.Ra=n,--n;0<=n;n--)i.push(t(e[n]));return t=new et,t.j=i,t.pb(),t.iterator},tt.prototype.filter=function(t){var e=this.ub;e.gh=null;var i=[];e=e.j;var n=e.length;for(this.Ra=n,--n;0<=n;n--){var o=e[n];t(o)&&i.push(o)}return t=new et,t.j=i,t.pb(),t.iterator},tt.prototype.Sd=function(){this.key=-1,this.value=null,this.ia=-1,this.ub.gh=this},tt.prototype.toString=function(){return"ListIteratorBackwards("+this.Ra+"/"+this.ub.count+")"},d.Object.defineProperties(tt.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ub.j.length}}}),tt.prototype.first=tt.prototype.first,tt.prototype.hasNext=tt.prototype.rd,tt.prototype.next=tt.prototype.next,tt.prototype.reset=tt.prototype.reset,tt.className="ListIteratorBackwards",i=et.prototype,i.pb=function(){var t=this.Ba;t++,999999999t||t>=e.length)&&M(t,"0 <= i < length",et,"elt:i"),e[t]},i.get=function(t){return this.J(t)},i.Pc=function(t,e){var i=this.j;(0>t||t>=i.length)&&M(t,"0 <= i < length",et,"setElt:i"),this.v&&k(this,t),i[t]=e},i.set=function(t,e){this.Pc(t,e)},i.first=function(){var t=this.j;return 0===t.length?null:t[0]},i.Xb=function(){var t=this.j,e=t.length;return 0t&&M(t,">= 0",et,"insertAt:i"),this.v&&k(this,t);var i=this.j;t>=i.length?i.push(e):i.splice(t,0,e),this.pb()},i.remove=function(t){if(null===t)return!1;this.v&&k(this,t);var e=this.j;return t=e.indexOf(t),-1!==t&&(t===e.length-1?e.pop():e.splice(t,1),this.pb(),!0)},i.delete=function(t){return this.remove(t)},i.cb=function(t){var e=this.j;(0>t||t>=e.length)&&M(t,"0 <= i < length",et,"removeAt:i"),this.v&&k(this,t),t===e.length-1?e.pop():e.splice(t,1),this.pb()},i.removeRange=function(t,e){var i=this.j,n=i.length;if(0>t)t=0;else if(t>=n)return this;if(0>e)return this;if(e>=n&&(e=n-1),t>e)return this;this.v&&k(this);for(var o=t,r=e+1;r=r)return this;if((0>e||e>=o-1)&&M(e,"0 <= from < length",et,"sortRange:from"),2===r)return i=n[e],o=n[e+1],0=o)n.sort(t);else for(e=n.slice(0,i),e.sort(t),t=0;t=o)for(i=n.slice(e),i.sort(t),t=e;t=this.j.length)return J;var t=this.Ha;return null!==t?(t.reset(),t):new Q(this)}},iteratorBackwards:{get:function(){if(0>=this.j.length)return J;var t=this.gh;return null!==t?(t.reset(),t):new tt(this)}}}),et.prototype.reverse=et.prototype.reverse,et.prototype.sortRange=et.prototype.uj,et.prototype.sort=et.prototype.sort,et.prototype.toSet=et.prototype.Lw,et.prototype.toArray=et.prototype.ma,et.prototype.removeRange=et.prototype.removeRange,et.prototype.removeAt=et.prototype.cb,et.prototype["delete"]=et.prototype.delete,et.prototype.remove=et.prototype.remove,et.prototype.insertAt=et.prototype.wb,et.prototype.pop=et.prototype.pop,et.prototype.last=et.prototype.Xb,et.prototype.first=et.prototype.first,et.prototype.set=et.prototype.set,et.prototype.setElt=et.prototype.Pc,et.prototype.get=et.prototype.get,et.prototype.elt=et.prototype.J,et.prototype.indexOf=et.prototype.indexOf,et.prototype.has=et.prototype.has,et.prototype.contains=et.prototype.contains,et.prototype.clear=et.prototype.clear,et.prototype.addAll=et.prototype.addAll,et.prototype.push=et.prototype.push,et.prototype.add=et.prototype.add,et.prototype.thaw=et.prototype.ea,et.prototype.freeze=et.prototype.freeze,et.className="List",it.prototype.reset=function(){var t=this.tg;t.Ha=null,this.ia=t.Ba,this.ka=null},it.prototype.next=function(){var t=this.tg;if(t.Ba!==this.ia&&null===this.key)return!1;var e=this.ka;return e=null===e?t.ba:e.pa,null!==e?(this.ka=e,this.value=e.value,this.key=e.key,!0):(this.Sd(),!1)},it.prototype.rd=function(){return this.next()},it.prototype.first=function(){var t=this.tg;if(this.ia=t.Ba,t=t.ba,null!==t){this.ka=t;var e=t.value;return this.key=t.key,this.value=e}return null},it.prototype.any=function(t){var e=this.tg;for(this.ka=e.Ha=null,e=e.ba;null!==e;){if(t(e.value))return!0;e=e.pa}return!1},it.prototype.all=function(t){var e=this.tg;for(this.ka=e.Ha=null,e=e.ba;null!==e;){if(!t(e.value))return!1;e=e.pa}return!0},it.prototype.each=function(t){var e=this.tg;for(this.ka=e.Ha=null,e=e.ba;null!==e;)t(e.value),e=e.pa;return this},it.prototype.map=function(t){var e=this.tg;e.Ha=null;var i=new et;for(e=e.ba;null!==e;)i.add(t(e.value)),e=e.pa;return i.iterator},it.prototype.filter=function(t){var e=this.tg;e.Ha=null;var i=new et;for(e=e.ba;null!==e;){var n=e.value;t(n)&&i.add(n),e=e.pa}return i.iterator},it.prototype.Sd=function(){this.value=this.key=null,this.ia=-1,this.tg.Ha=this},it.prototype.toString=function(){return null!==this.ka?"SetIterator@"+this.ka.value:"SetIterator"},d.Object.defineProperties(it.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.tg.Fb}}}),it.prototype.first=it.prototype.first,it.prototype.hasNext=it.prototype.rd,it.prototype.next=it.prototype.next,it.prototype.reset=it.prototype.reset,it.className="SetIterator",i=nt.prototype,i.pb=function(){var t=this.Ba;t++,999999999=this.Fb)return J;var t=this.Ha;return null!==t?(t.reset(),t):new it(this)}}}),nt.prototype.toList=nt.prototype.Kw,nt.prototype.toArray=nt.prototype.ma,nt.prototype.clear=nt.prototype.clear,nt.prototype.retainAll=nt.prototype.YA,nt.prototype.removeAll=nt.prototype.Zq,nt.prototype["delete"]=nt.prototype.delete,nt.prototype.remove=nt.prototype.remove,nt.prototype.first=nt.prototype.first,nt.prototype.containsAny=nt.prototype.Fz,nt.prototype.containsAll=nt.prototype.Ez,nt.prototype.has=nt.prototype.has,nt.prototype.contains=nt.prototype.contains,nt.prototype.addAll=nt.prototype.addAll,nt.prototype.add=nt.prototype.add,nt.prototype.thaw=nt.prototype.ea,nt.prototype.freeze=nt.prototype.freeze;var at=1;function ht(t){this.ga=t,this.ia=t.Ba,this.ka=null}function lt(t){nt.call(this),ot(this),this.v=!0,this.ga=t}function ut(t){this.ga=t,t.Ze=null,this.ia=t.Ba,this.ka=null}function ct(t,e){this.key=t,this.value=e,this.Xl=this.pa=null}function ft(t){this.ga=t,t.Ha=null,this.ia=t.Ba,this.ka=null}function dt(t){ot(this),this.v=!1,this.Hb={},this.Fb=0,this.Ze=this.Ha=null,this.Ba=0,this.$e=this.ba=null,void 0!==t&&("function"===typeof t||"string"===typeof t?P():this.addAll(t))}function pt(t,e){void 0===t?this.y=this.x=0:"number"===typeof t&&"number"===typeof e?(this.x=t,this.y=e):w("Invalid arguments to Point constructor: "+t+", "+e),this.v=!1}function gt(t){if("string"===typeof t){t=t.split(" ");for(var e=0,i=0;""===t[e];)e++;var n=t[e++];n&&(i=parseFloat(n));for(var o=0;""===t[e];)e++;return(n=t[e++])&&(o=parseFloat(n)),new pt(i,o)}return new pt}function yt(t){return t.x.toString()+" "+t.y.toString()}function mt(t,e){if(0===t)return 0e?270:0;if(0===e)return 0t?i=0>e?i+180:180-i:0>e&&(i=360-i),i}function vt(t,e){return e.Jd(t),t}function xt(t,e,i,n,o,r){var s=o-i,a=r-n,h=s*s+a*a;i-=t,n-=e;var l=-i*s-n*a;return 0>=l||l>=h?(s=o-t,a=r-e,Math.min(i*i+n*n,s*s+a*a)):(t=s*n-a*i,t*t/h)}function bt(t,e,i,n){return t=i-t,e=n-e,t*t+e*e}function wt(t,e,i,n){return t=i-t,e=n-e,0===t?0e?270:0:0===e?0t?n=0>e?n+180:180-n:0>e&&(n=360-n),n)}nt.className="Set",nt.uniqueHash=ot,nt.hashIdUnique=rt,nt.hashId=st,ht.prototype.reset=function(){this.ia=this.ga.Ba,this.ka=null},ht.prototype.next=function(){var t=this.ga;if(t.Ba!==this.ia&&null===this.key)return!1;var e=this.ka;return e=null===e?t.ba:e.pa,null!==e?(this.ka=e,this.value=this.key=t=e.key,!0):(this.Sd(),!1)},ht.prototype.rd=function(){return this.next()},ht.prototype.first=function(){var t=this.ga;return this.ia=t.Ba,t=t.ba,null!==t?(this.ka=t,this.value=this.key=t=t.key):null},ht.prototype.any=function(t){var e=this.ga;for(this.ka=null,e=e.ba;null!==e;){if(t(e.key))return!0;e=e.pa}return!1},ht.prototype.all=function(t){var e=this.ga;for(this.ka=null,e=e.ba;null!==e;){if(!t(e.key))return!1;e=e.pa}return!0},ht.prototype.each=function(t){var e=this.ga;for(this.ka=null,e=e.ba;null!==e;)t(e.key),e=e.pa;return this},ht.prototype.map=function(t){var e=this.ga;this.ka=null;var i=new et;for(e=e.ba;null!==e;)i.add(t(e.key)),e=e.pa;return i.iterator},ht.prototype.filter=function(t){var e=this.ga;this.ka=null;var i=new et;for(e=e.ba;null!==e;){var n=e.key;t(n)&&i.add(n),e=e.pa}return i.iterator},ht.prototype.Sd=function(){this.value=this.key=null,this.ia=-1},ht.prototype.toString=function(){return null!==this.ka?"MapKeySetIterator@"+this.ka.value:"MapKeySetIterator"},d.Object.defineProperties(ht.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ga.Fb}}}),ht.prototype.first=ht.prototype.first,ht.prototype.hasNext=ht.prototype.rd,ht.prototype.next=ht.prototype.next,ht.prototype.reset=ht.prototype.reset,ht.className="MapKeySetIterator",f(lt,nt),i=lt.prototype,i.freeze=function(){return this},i.ea=function(){return this},i.toString=function(){return"MapKeySet("+this.ga.toString()+")"},i.add=function(){return w("This Set is read-only: "+this.toString()),this},i.contains=function(t){return this.ga.contains(t)},i.has=function(t){return this.contains(t)},i.remove=function(){return w("This Set is read-only: "+this.toString()),!1},i.delete=function(t){return this.remove(t)},i.clear=function(){w("This Set is read-only: "+this.toString())},i.first=function(){var t=this.ga.ba;return null!==t?t.key:null},lt.prototype.any=function(t){for(var e=this.ga.ba;null!==e;){if(t(e.key))return!0;e=e.pa}return!1},lt.prototype.all=function(t){for(var e=this.ga.ba;null!==e;){if(!t(e.key))return!1;e=e.pa}return!0},lt.prototype.each=function(t){for(var e=this.ga.ba;null!==e;)t(e.key),e=e.pa;return this},lt.prototype.map=function(t){for(var e=new nt,i=this.ga.ba;null!==i;)e.add(t(i.key)),i=i.pa;return e},lt.prototype.filter=function(t){for(var e=new nt,i=this.ga.ba;null!==i;){var n=i.key;t(n)&&e.add(n),i=i.pa}return e},lt.prototype.copy=function(){return new lt(this.ga)},lt.prototype.Lw=function(){var t,e=new nt,i=this.ga.Hb;for(t in i)e.add(i[t].key);return e},lt.prototype.ma=function(){var t,e=this.ga.Hb,i=Array(this.ga.Fb),n=0;for(t in e)i[n]=e[t].key,n++;return i},lt.prototype.Kw=function(){var t,e=new et,i=this.ga.Hb;for(t in i)e.add(i[t].key);return e},d.Object.defineProperties(lt.prototype,{count:{get:function(){return this.ga.Fb}},size:{get:function(){return this.ga.Fb}},iterator:{get:function(){return 0>=this.ga.Fb?J:new ht(this.ga)}}}),lt.prototype.toList=lt.prototype.Kw,lt.prototype.toArray=lt.prototype.ma,lt.prototype.toSet=lt.prototype.Lw,lt.prototype.first=lt.prototype.first,lt.prototype.clear=lt.prototype.clear,lt.prototype["delete"]=lt.prototype.delete,lt.prototype.remove=lt.prototype.remove,lt.prototype.has=lt.prototype.has,lt.prototype.contains=lt.prototype.contains,lt.prototype.add=lt.prototype.add,lt.prototype.thaw=lt.prototype.ea,lt.prototype.freeze=lt.prototype.freeze,lt.className="MapKeySet",ut.prototype.reset=function(){var t=this.ga;t.Ze=null,this.ia=t.Ba,this.ka=null},ut.prototype.next=function(){var t=this.ga;if(t.Ba!==this.ia&&null===this.key)return!1;var e=this.ka;return e=null===e?t.ba:e.pa,null!==e?(this.ka=e,this.value=e.value,this.key=e.key,!0):(this.Sd(),!1)},ut.prototype.rd=function(){return this.next()},ut.prototype.first=function(){var t=this.ga;if(this.ia=t.Ba,t=t.ba,null!==t){this.ka=t;var e=t.value;return this.key=t.key,this.value=e}return null},ut.prototype.any=function(t){var e=this.ga;for(this.ka=e.Ze=null,e=e.ba;null!==e;){if(t(e.value))return!0;e=e.pa}return!1},ut.prototype.all=function(t){var e=this.ga;for(this.ka=e.Ze=null,e=e.ba;null!==e;){if(!t(e.value))return!1;e=e.pa}return!0},ut.prototype.each=function(t){var e=this.ga;for(this.ka=e.Ze=null,e=e.ba;null!==e;)t(e.value),e=e.pa;return this},ut.prototype.map=function(t){var e=this.ga;this.ka=e.Ze=null;var i=new et;for(e=e.ba;null!==e;)i.add(t(e.value)),e=e.pa;return i.iterator},ut.prototype.filter=function(t){var e=this.ga;this.ka=e.Ze=null;var i=new et;for(e=e.ba;null!==e;){var n=e.value;t(n)&&i.add(n),e=e.pa}return i.iterator},ut.prototype.Sd=function(){this.value=this.key=null,this.ia=-1,this.ga.Ze=this},ut.prototype.toString=function(){return null!==this.ka?"MapValueSetIterator@"+this.ka.value:"MapValueSetIterator"},d.Object.defineProperties(ut.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ga.Fb}}}),ut.prototype.first=ut.prototype.first,ut.prototype.hasNext=ut.prototype.rd,ut.prototype.next=ut.prototype.next,ut.prototype.reset=ut.prototype.reset,ut.className="MapValueSetIterator",ct.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},ct.className="KeyValuePair",ft.prototype.reset=function(){var t=this.ga;t.Ha=null,this.ia=t.Ba,this.ka=null},ft.prototype.next=function(){var t=this.ga;if(t.Ba!==this.ia&&null===this.key)return!1;var e=this.ka;return e=null===e?t.ba:e.pa,null!==e?(this.ka=e,this.key=e.key,this.value=e.value,!0):(this.Sd(),!1)},ft.prototype.rd=function(){return this.next()},ft.prototype.first=function(){var t=this.ga;return this.ia=t.Ba,t=t.ba,null!==t?(this.ka=t,this.key=t.key,this.value=t.value,t):null},ft.prototype.any=function(t){var e=this.ga;for(this.ka=e.Ha=null,e=e.ba;null!==e;){if(t(e))return!0;e=e.pa}return!1},ft.prototype.all=function(t){var e=this.ga;for(this.ka=e.Ha=null,e=e.ba;null!==e;){if(!t(e))return!1;e=e.pa}return!0},ft.prototype.each=function(t){var e=this.ga;for(this.ka=e.Ha=null,e=e.ba;null!==e;)t(e),e=e.pa;return this},ft.prototype.map=function(t){var e=this.ga;this.ka=e.Ha=null;var i=new et;for(e=e.ba;null!==e;)i.add(t(e)),e=e.pa;return i.iterator},ft.prototype.filter=function(t){var e=this.ga;this.ka=e.Ha=null;var i=new et;for(e=e.ba;null!==e;)t(e)&&i.add(e),e=e.pa;return i.iterator},ft.prototype.Sd=function(){this.value=this.key=null,this.ia=-1,this.ga.Ha=this},ft.prototype.toString=function(){return null!==this.ka?"MapIterator@"+this.ka:"MapIterator"},d.Object.defineProperties(ft.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ga.Fb}}}),ft.prototype.first=ft.prototype.first,ft.prototype.hasNext=ft.prototype.rd,ft.prototype.next=ft.prototype.next,ft.prototype.reset=ft.prototype.reset,ft.className="MapIterator",i=dt.prototype,i.pb=function(){var t=this.Ba;t++,999999999=this.count)return J;var t=this.Ha;return null!==t?(t.reset(),t):new ft(this)}},iteratorKeys:{get:function(){return 0>=this.count?J:new ht(this)}},iteratorValues:{get:function(){if(0>=this.count)return J;var t=this.Ze;return null!==t?(t.reset(),t):new ut(this)}}}),dt.prototype.toKeySet=dt.prototype.Kf,dt.prototype.toArray=dt.prototype.ma,dt.prototype.clear=dt.prototype.clear,dt.prototype["delete"]=dt.prototype.delete,dt.prototype.remove=dt.prototype.remove,dt.prototype.get=dt.prototype.get,dt.prototype.getValue=dt.prototype.G,dt.prototype.has=dt.prototype.has,dt.prototype.contains=dt.prototype.contains,dt.prototype.first=dt.prototype.first,dt.prototype.addAll=dt.prototype.addAll,dt.prototype.set=dt.prototype.set,dt.prototype.add=dt.prototype.add,dt.prototype.thaw=dt.prototype.ea,dt.prototype.freeze=dt.prototype.freeze,dt.className="Map",pt.prototype.assign=function(t){return this.x=t.x,this.y=t.y,this},pt.prototype.h=function(t,e){return this.x=t,this.y=e,this},pt.prototype.Ig=function(t,e){return this.x=t,this.y=e,this},pt.prototype.set=function(t){return this.x=t.x,this.y=t.y,this},pt.prototype.copy=function(){var t=new pt;return t.x=this.x,t.y=this.y,t},i=pt.prototype,i.ca=function(){return this.v=!0,Object.freeze(this),this},i.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()},i.freeze=function(){return this.v=!0,this},i.ea=function(){return Object.isFrozen(this)&&w("cannot thaw constant: "+this),this.v=!1,this},i.toString=function(){return"Point("+this.x+","+this.y+")"},i.w=function(t){return t instanceof pt&&(this.x===t.x&&this.y===t.y)},i.fj=function(t,e){return this.x===t&&this.y===e},i.Qa=function(t){return _e.A(this.x,t.x)&&_e.A(this.y,t.y)},i.add=function(t){return this.x+=t.x,this.y+=t.y,this},i.ge=function(t){return this.x-=t.x,this.y-=t.y,this},i.offset=function(t,e){return this.x+=t,this.y+=e,this},pt.prototype.rotate=function(t){if(0===t)return this;var e=this.x,i=this.y;if(0===e&&0===i)return this;if(360<=t?t-=360:0>t&&(t+=360),90===t){t=0;var n=1}else 180===t?(t=-1,n=0):270===t?(t=0,n=-1):(n=t*Math.PI/180,t=Math.cos(n),n=Math.sin(n));return this.x=t*e-n*i,this.y=n*e+t*i,this},i=pt.prototype,i.scale=function(t,e){return this.x*=t,this.y*=e,this},i.Ie=function(t){var e=t.x-this.x;return t=t.y-this.y,e*e+t*t},i.qd=function(t,e){return t-=this.x,e-=this.y,t*t+e*e},i.normalize=function(){var t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);return 0e.width+10+10+o||o>i+n)&&(i=t.height,t=t.y,n=e.y-10,!(t>e.height+10+10+n||n>i+t))}function Ht(t,e,i,n,o){var r=Math.min(t.x,e),s=Math.min(t.y,i);return e=Math.max(t.x+t.width,e+n),i=Math.max(t.y+t.height,i+o),t.x=r,t.y=s,t.width=e-r,t.height=i-s,t}function _t(t,e,i,n,o,r,s,a){return void 0===s&&(s=0),void 0===a&&(a=0),t<=o&&o+s<=t+i&&e<=r&&r+a<=e+n}function Wt(t,e,i,n,o,r,s,a){return!(t>s+o||o>i+t)&&!(e>a+r||r>n+e)}Bt.className="Size",Bt.parse=It,Bt.stringify=Et,Bt.ZeroSize=kt=new Bt(0,0).ca(),Bt.OneSize=Mt=new Bt(1,1).ca(),Bt.SixSize=St=new Bt(6,6).ca(),Bt.EightSize=Pt=new Bt(8,8).ca(),Bt.TenSize=Nt=new Bt(10,10).ca(),Bt.InfiniteSize=Ct=new Bt(1/0,1/0).ca(),Bt.NoSize=Tt=new Bt(NaN,NaN).ca(),Bt.parse=It,Bt.stringify=Et,i=zt.prototype,i.assign=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},i.h=function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},i.Ig=function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},i.set=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},i.Qc=function(t){return this.x=t.x,this.y=t.y,this},i.bB=function(t){return this.width=t.width,this.height=t.height,this},zt.prototype.copy=function(){var t=new zt;return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},i=zt.prototype,i.ca=function(){return this.v=!0,Object.freeze(this),this},i.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()},i.freeze=function(){return this.v=!0,this},i.ea=function(){return Object.isFrozen(this)&&w("cannot thaw constant: "+this),this.v=!1,this},i.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},i.w=function(t){return t instanceof zt&&(this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height)},i.fj=function(t,e,i,n){return this.x===t&&this.y===e&&this.width===i&&this.height===n},i.Qa=function(t){return _e.A(this.x,t.x)&&_e.A(this.y,t.y)&&_e.A(this.width,t.width)&&_e.A(this.height,t.height)},i.$=function(t){return this.x<=t.x&&this.x+this.width>=t.x&&this.y<=t.y&&this.y+this.height>=t.y},i.Ge=function(t){return this.x<=t.x&&t.x+t.width<=this.x+this.width&&this.y<=t.y&&t.y+t.height<=this.y+this.height},i.contains=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),this.x<=t&&t+i<=this.x+this.width&&this.y<=e&&e+n<=this.y+this.height},i.offset=function(t,e){return this.x+=t,this.y+=e,this},i.Jc=function(t,e){return qt(this,e,t,e,t)},i.uq=function(t){return qt(this,t.top,t.right,t.bottom,t.left)},i.Jw=function(t){return qt(this,-t.top,-t.right,-t.bottom,-t.left)},i.sA=function(t,e,i,n){return qt(this,t,e,i,n)},i.Dy=function(t){return Ut(this,t.x,t.y,t.width,t.height)},i.bw=function(t,e,i,n){return Ut(this,t,e,i,n)},i.Mc=function(t){return this.cw(t.x,t.y,t.width,t.height)},i.cw=function(t,e,i,n){var o=this.width,r=this.x;return!(1/0!==o&&1/0!==i&&(o+=r,i+=t,isNaN(i)||isNaN(o)||r>i||t>o))&&(t=this.height,i=this.y,!(1/0!==t&&1/0!==n&&(t+=i,n+=e,isNaN(n)||isNaN(t)||i>n||e>t)))},i.Oe=function(t){return Ht(this,t.x,t.y,0,0)},i.Rc=function(t){return Ht(this,t.x,t.y,t.width,t.height)},i.Rw=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=0),Ht(this,t,e,i,n)},i.Uk=function(t,e,i){return this.x=t-i.offsetX-i.x*this.width,this.y=e-i.offsetY-i.y*this.height,this},i.s=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},i.yA=function(){return 0===this.width&&0===this.height},zt.alloc=function(){var t=Zt.pop();return void 0===t?new zt:t},zt.allocAt=function(t,e,i,n){var o=Zt.pop();return void 0===o?new zt(t,e,i,n):o.h(t,e,i,n)},zt.free=function(t){Zt.push(t)},d.Object.defineProperties(zt.prototype,{left:{get:function(){return this.x},set:function(t){this.x=t}},top:{get:function(){return this.y},set:function(t){this.y=t}},right:{get:function(){return this.x+this.width},set:function(t){this.x+=t-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(t){this.y+=t-(this.y+this.height)}},position:{get:function(){return new pt(this.x,this.y)},set:function(t){this.x=t.x,this.y=t.y}},size:{get:function(){return new Bt(this.width,this.height)},set:function(t){this.width=t.width,this.height=t.height}},center:{get:function(){return new pt(this.x+this.width/2,this.y+this.height/2)},set:function(t){this.x=t.x-this.width/2,this.y=t.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}}),zt.prototype.isEmpty=zt.prototype.yA,zt.prototype.isReal=zt.prototype.s,zt.intersectsLineSegment=function(t,e,i,n,o,r,s,a){return _e.Ey(t,e,i,n,o,r,s,a)},zt.prototype.setSpot=zt.prototype.Uk,zt.prototype.union=zt.prototype.Rw,zt.prototype.unionRect=zt.prototype.Rc,zt.prototype.unionPoint=zt.prototype.Oe,zt.prototype.intersects=zt.prototype.cw,zt.prototype.intersectsRect=zt.prototype.Mc,zt.prototype.intersect=zt.prototype.bw,zt.prototype.intersectRect=zt.prototype.Dy,zt.prototype.grow=zt.prototype.sA,zt.prototype.subtractMargin=zt.prototype.Jw,zt.prototype.addMargin=zt.prototype.uq,zt.prototype.inflate=zt.prototype.Jc,zt.prototype.offset=zt.prototype.offset,zt.prototype.contains=zt.prototype.contains,zt.prototype.containsRect=zt.prototype.Ge,zt.prototype.containsPoint=zt.prototype.$,zt.prototype.equalsApprox=zt.prototype.Qa,zt.prototype.equalTo=zt.prototype.fj,zt.prototype.equals=zt.prototype.w,zt.prototype.setSize=zt.prototype.bB,zt.prototype.setPoint=zt.prototype.Qc,zt.prototype.set=zt.prototype.set,zt.prototype.setTo=zt.prototype.Ig;var $t=null,Jt=null,Zt=[];function Qt(t,e,i,n){void 0===t?this.left=this.bottom=this.right=this.top=0:void 0===e?this.left=this.bottom=this.right=this.top=t:void 0===i?(this.top=t,this.right=e,this.bottom=t,this.left=e):void 0!==n?(this.top=t,this.right=e,this.bottom=i,this.left=n):w("Invalid arguments to Margin constructor: "+t+", "+e+", "+i+", "+n),this.v=!1}function te(t){if("string"===typeof t){t=t.split(" ");for(var e=0,i=NaN;""===t[e];)e++;var n=t[e++];if(n&&(i=parseFloat(n)),isNaN(i))return new Qt;for(var o=NaN;""===t[e];)e++;if((n=t[e++])&&(o=parseFloat(n)),isNaN(o))return new Qt(i);for(var r=NaN;""===t[e];)e++;if((n=t[e++])&&(r=parseFloat(n)),isNaN(r))return new Qt(i,o);for(var s=NaN;""===t[e];)e++;return(n=t[e++])&&(s=parseFloat(n)),isNaN(s)?new Qt(i,o):new Qt(i,o,r,s)}return new Qt}function ee(t){return t.top.toString()+" "+t.right.toString()+" "+t.bottom.toString()+" "+t.left.toString()}zt.className="Rect",zt.parse=Gt,zt.stringify=Yt,zt.contains=_t,zt.intersects=Wt,zt.ZeroRect=$t=new zt(0,0,0,0).ca(),zt.NoRect=Jt=new zt(NaN,NaN,NaN,NaN).ca(),zt.parse=Gt,zt.stringify=Yt,zt.contains=_t,zt.intersects=Wt,Qt.prototype.assign=function(t){return this.top=t.top,this.right=t.right,this.bottom=t.bottom,this.left=t.left,this},Qt.prototype.Ig=function(t,e,i,n){return this.top=t,this.right=e,this.bottom=i,this.left=n,this},Qt.prototype.set=function(t){return this.top=t.top,this.right=t.right,this.bottom=t.bottom,this.left=t.left,this},Qt.prototype.copy=function(){var t=new Qt;return t.top=this.top,t.right=this.right,t.bottom=this.bottom,t.left=this.left,t},i=Qt.prototype,i.ca=function(){return this.v=!0,Object.freeze(this),this},i.H=function(){return this.v||Object.isFrozen(this)?this:this.copy().freeze()},i.freeze=function(){return this.v=!0,this},i.ea=function(){return Object.isFrozen(this)&&w("cannot thaw constant: "+this),this.v=!1,this},i.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},i.w=function(t){return t instanceof Qt&&(this.top===t.top&&this.right===t.right&&this.bottom===t.bottom&&this.left===t.left)},i.fj=function(t,e,i,n){return this.top===t&&this.right===e&&this.bottom===i&&this.left===n},i.Qa=function(t){return _e.A(this.top,t.top)&&_e.A(this.right,t.right)&&_e.A(this.bottom,t.bottom)&&_e.A(this.left,t.left)},i.s=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Qt.alloc=function(){var t=Ve.pop();return void 0===t?new Qt:t},Qt.free=function(t){Ve.push(t)},Qt.prototype.isReal=Qt.prototype.s,Qt.prototype.equalsApprox=Qt.prototype.Qa,Qt.prototype.equalTo=Qt.prototype.fj,Qt.prototype.equals=Qt.prototype.w,Qt.prototype.set=Qt.prototype.set,Qt.prototype.setTo=Qt.prototype.Ig;var ie,ne,oe,re,se,ae,he,le,ue,ce,fe,de,pe,ge,ye,me,ve,xe,be,we,ke,Me,Se,Pe,Ne,Ce,Te,Ae,Le,je,Oe,De,Fe,Be,Ie,Ee,Re=null,ze=null,Ve=[];function Ge(t,e,i,n){void 0===t?this.offsetY=this.offsetX=this.y=this.x=0:(void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.offsetX=i,this.offsetY=n),this.v=!1}function Ye(t,e){return t.x=NaN,t.y=NaN,t.offsetX=e,t}function Xe(t){if("string"===typeof t){if(t=t.trim(),"None"===t)return ie;if("TopLeft"===t)return ne;if("Top"===t||"TopCenter"===t||"MiddleTop"===t)return oe;if("TopRight"===t)return re;if("Left"===t||"LeftCenter"===t||"MiddleLeft"===t)return se;if("Center"===t)return ae;if("Right"===t||"RightCenter"===t||"MiddleRight"===t)return he;if("BottomLeft"===t)return le;if("Bottom"===t||"BottomCenter"===t||"MiddleBottom"===t)return ue;if("BottomRight"===t)return ce;if("TopSide"===t)return fe;if("LeftSide"===t)return de;if("RightSide"===t)return pe;if("BottomSide"===t)return ge;if("TopBottomSides"===t)return ye;if("LeftRightSides"===t)return me;if("TopLeftSides"===t)return ve;if("TopRightSides"===t)return xe;if("BottomLeftSides"===t)return be;if("BottomRightSides"===t)return we;if("NotTopSide"===t)return ke;if("NotLeftSide"===t)return Me;if("NotRightSide"===t)return Se;if("NotBottomSide"===t)return Pe;if("AllSides"===t)return Ne;if("Default"===t)return Ce;t=t.split(" ");for(var e=0,i=0;""===t[e];)e++;var n=t[e++];void 0!==n&&0t&&(t+=360),0===t)return this;if(this.translate(e,i),90===t){t=0;var n=1}else 180===t?(t=-1,n=0):270===t?(t=0,n=-1):(n=t*Math.PI/180,t=Math.cos(n),n=Math.sin(n));var o=this.m12*t+this.m22*n,r=this.m11*-n+this.m21*t,s=this.m12*-n+this.m22*t;return this.m11=this.m11*t+this.m21*n,this.m12=o,this.m21=r,this.m22=s,this.translate(-e,-i),this},i=Ke.prototype,i.translate=function(t,e){return this.dx+=this.m11*t+this.m21*e,this.dy+=this.m12*t+this.m22*e,this},i.scale=function(t,e){return void 0===e&&(e=t),this.m11*=t,this.m12*=t,this.m21*=e,this.m22*=e,this},i.ta=function(t){var e=t.x,i=t.y;return t.h(e*this.m11+i*this.m21+this.dx,e*this.m12+i*this.m22+this.dy)},i.Jd=function(t){var e=1/(this.m11*this.m22-this.m12*this.m21),i=t.x,n=t.y;return t.h(i*this.m22*e+n*-this.m21*e+e*(this.m21*this.dy-this.m22*this.dx),i*-this.m12*e+n*this.m11*e+e*(this.m12*this.dx-this.m11*this.dy))},i.Zx=function(t){var e=1/(this.m11*this.m22-this.m12*this.m21),i=1.25*t.x,n=1.2*t.y;return t.h(i*this.m22*e+n*-this.m21*e+e*(this.m21*this.dy-this.m22*this.dx),i*-this.m12*e+n*this.m11*e+e*(this.m12*this.dx-this.m11*this.dy))},i.Pw=function(t){var e=t.x,i=t.y,n=e+t.width,o=i+t.height,r=this.m11,s=this.m12,a=this.m21,h=this.m22,l=this.dx,u=this.dy,c=e*r+i*a+l,f=e*s+i*h+u,d=n*r+i*a+l,p=n*s+i*h+u;return i=e*r+o*a+l,e=e*s+o*h+u,r=n*r+o*a+l,n=n*s+o*h+u,o=Math.min(c,d),c=Math.max(c,d),d=Math.min(f,p),f=Math.max(f,p),o=Math.min(o,i),c=Math.max(c,i),d=Math.min(d,e),f=Math.max(f,e),o=Math.min(o,r),c=Math.max(c,r),d=Math.min(d,n),f=Math.max(f,n),t.h(o,d,c-o,f-d),t},Ke.alloc=function(){var t=He.pop();return void 0===t?new Ke:t},Ke.free=function(t){He.push(t)},Ke.prototype.transformRect=Ke.prototype.Pw,Ke.prototype.transformPoint=Ke.prototype.ta,Ke.prototype.scale=Ke.prototype.scale,Ke.prototype.translate=Ke.prototype.translate,Ke.prototype.rotate=Ke.prototype.rotate,Ke.prototype.invert=Ke.prototype.St,Ke.prototype.multiplyInverted=Ke.prototype.jw,Ke.prototype.multiply=Ke.prototype.multiply,Ke.prototype.reset=Ke.prototype.reset,Ke.prototype.isIdentity=Ke.prototype.Tt,Ke.prototype.equals=Ke.prototype.w,Ke.prototype.set=Ke.prototype.set;var He=[];Ke.className="Transform",Ke.xF="54a702f3e53909c447824c6706603faf4c";var _e={lB:"7da71ca0ad381e90",Kg:(Math.sqrt(2)-1)/3*4,jx:null,sqrt:function(t){if(0>=t)return 0;var e=_e.jx;if(null===e){e=[];for(var i=0;2e3>=i;i++)e[i]=Math.sqrt(i);_e.jx=e}return 1>t?(i=1/t,2e3>=i?1/e[0|i]:Math.sqrt(t)):2e3>=t?e[0|t]:Math.sqrt(t)},A:function(t,e){return t-=e,.5>t&&-.5t&&-5e-8=o&&(o=1e-6),tu-l){if(!(t-i>o||i-t>o))return!0;if(r=(n-e)/(i-t)*(r-t)+e,r-o<=s&&s<=r+o)return!0}else{if(!(e-n>o||n-e>o))return!0;if(s=(i-t)/(n-e)*(s-e)+t,s-o<=r&&r<=s+o)return!0}return!1},yt:function(t,e,i,n,o,r,s,a,h,l,u,c){if(_e.Nb(t,e,s,a,c,i,n)&&_e.Nb(t,e,s,a,c,o,r))return _e.Nb(t,e,s,a,c,l,u);var f=(t+i)/2,d=(e+n)/2,p=(i+o)/2,g=(n+r)/2;o=(o+s)/2,r=(r+a)/2,n=(f+p)/2,i=(d+g)/2,p=(p+o)/2,g=(g+r)/2;var y=(n+p)/2,m=(i+g)/2;return _e.yt(t,e,f,d,n,i,y,m,h,l,u,c)||_e.yt(y,m,p,g,o,r,s,a,h,l,u,c)},yz:function(t,e,i,n,o,r,s,a,h){var l=(i+o)/2,u=(n+r)/2;return h.h((((t+i)/2+l)/2+(l+(o+s)/2)/2)/2,(((e+n)/2+u)/2+(u+(r+a)/2)/2)/2),h},xz:function(t,e,i,n,o,r,s,a){var h=(i+o)/2,l=(n+r)/2;return wt(((t+i)/2+h)/2,((e+n)/2+l)/2,(h+(o+s)/2)/2,(l+(r+a)/2)/2)},vm:function(t,e,i,n,o,r,s,a,h,l){if(_e.Nb(t,e,s,a,h,i,n)&&_e.Nb(t,e,s,a,h,o,r))Ht(l,t,e,0,0),Ht(l,s,a,0,0);else{var u=(t+i)/2,c=(e+n)/2,f=(i+o)/2,d=(n+r)/2;o=(o+s)/2,r=(r+a)/2,n=(u+f)/2,i=(c+d)/2,f=(f+o)/2,d=(d+r)/2;var p=(n+f)/2,g=(i+d)/2;_e.vm(t,e,u,c,n,i,p,g,h,l),_e.vm(p,g,f,d,o,r,s,a,h,l)}return l},Fe:function(t,e,i,n,o,r,s,a,h,l){if(_e.Nb(t,e,s,a,h,i,n)&&_e.Nb(t,e,s,a,h,o,r))0===l.length&&(l.push(t),l.push(e)),l.push(s),l.push(a);else{var u=(t+i)/2,c=(e+n)/2,f=(i+o)/2,d=(n+r)/2;o=(o+s)/2,r=(r+a)/2,n=(u+f)/2,i=(c+d)/2,f=(f+o)/2,d=(d+r)/2;var p=(n+f)/2,g=(i+d)/2;_e.Fe(t,e,u,c,n,i,p,g,h,l),_e.Fe(p,g,f,d,o,r,s,a,h,l)}return l},qw:function(t,e,i,n,o,r,s,a,h,l){if(_e.Nb(t,e,o,r,l,i,n))return _e.Nb(t,e,o,r,l,a,h);var u=(t+i)/2,c=(e+n)/2;i=(i+o)/2,n=(n+r)/2;var f=(u+i)/2,d=(c+n)/2;return _e.qw(t,e,u,c,f,d,s,a,h,l)||_e.qw(f,d,i,n,o,r,s,a,h,l)},AB:function(t,e,i,n,o,r,s){return s.h(((t+i)/2+(i+o)/2)/2,((e+n)/2+(n+r)/2)/2),s},pw:function(t,e,i,n,o,r,s,a){if(_e.Nb(t,e,o,r,s,i,n))Ht(a,t,e,0,0),Ht(a,o,r,0,0);else{var h=(t+i)/2,l=(e+n)/2;i=(i+o)/2,n=(n+r)/2;var u=(h+i)/2,c=(l+n)/2;_e.pw(t,e,h,l,u,c,s,a),_e.pw(u,c,i,n,o,r,s,a)}return a},Vq:function(t,e,i,n,o,r,s,a){if(_e.Nb(t,e,o,r,s,i,n))0===a.length&&(a.push(t),a.push(e)),a.push(o),a.push(r);else{var h=(t+i)/2,l=(e+n)/2;i=(i+o)/2,n=(n+r)/2;var u=(h+i)/2,c=(l+n)/2;_e.Vq(t,e,h,l,u,c,s,a),_e.Vq(u,c,i,n,o,r,s,a)}return a},wq:function(t,e,i,n,o,r,s,a,h,l,u,c,f,d){if(_e.Nb(t,e,s,a,f,i,n)&&_e.Nb(t,e,s,a,f,o,r))return!!_e.Cm(t,e,s,a,h,l,u,c)&&(f=(t-s)*(l-c)-(e-a)*(h-u),0!==f&&(d.h(((t*a-e*s)*(h-u)-(t-s)*(h*c-l*u))/f,((t*a-e*s)*(l-c)-(e-a)*(h*c-l*u))/f),!0));var p=(t+i)/2,g=(e+n)/2,y=(i+o)/2,m=(n+r)/2;o=(o+s)/2,r=(r+a)/2,n=(p+y)/2,i=(g+m)/2,y=(y+o)/2,m=(m+r)/2;var v=(n+y)/2,x=(i+m)/2,b=1/0,w=!1,k=0,M=0;return _e.wq(t,e,p,g,n,i,v,x,h,l,u,c,f,d)&&(t=(d.x-h)*(d.x-h)+(d.y-l)*(d.y-l),t=u)return d;if((h>u?h-u:u-h)<(l>c?l-c:c-l)){if(ee)return d}else if(tt)return d;0f&&d--}else{p=(t+i)/2,g=(e+n)/2;var y=(i+o)/2,m=(n+r)/2;o=(o+s)/2,r=(r+a)/2,n=(p+y)/2,i=(g+m)/2,y=(y+o)/2,m=(m+r)/2;var v=(n+y)/2,x=(i+m)/2;d+=_e.xq(t,e,p,g,n,i,v,x,h,l,u,c,f),d+=_e.xq(v,x,y,m,o,r,s,a,h,l,u,c,f)}return d},Qh:function(t,e,i,n,o,r,s){return _e.aa(t,i)?(ee?(s.h(t,e),!1):(s.h(t,r),!0)):_e.aa(e,n)?(tt?(s.h(t,e),!1):(s.h(o,e),!0)):(o=((t-o)*(t-i)+(e-r)*(e-n))/((i-t)*(i-t)+(n-e)*(n-e)),-5e-6>o?(s.h(t,e),!1):1.000005e?(h.h(t,e),!1):(h.h(t,i),!0)):(s=(n-e)/(i-t),_e.aa(a,s)?(_e.Qh(t,e,i,n,o,r,h),!1):(o=(s*t-a*o+r-e)/(s-a),_e.aa(s,0)?(tt?(h.h(t,e),!1):(h.h(o,e),!0)):_e.Qh(t,e,i,n,o,s*(o-t)+e,h))))},yB:function(t,e,i,n,o){return _e.Me(i.x,i.y,n.x,n.y,t.x,t.y,e.x,e.y,o)},wB:function(t,e,i,n,o,r,s,a,h,l){function u(i,n){var o=(i-t)*(i-t)+(n-e)*(n-e);o(i>t?i-t:t-i)){if(f=1-(i-o)*(i-o)/(f*f),0>f)return h;f=Math.sqrt(f),n=-l*f+r,u(i,l*f+r),u(i,n)}else{if(i=(n-e)/(i-t),n=1/(f*f)+i*i/(l*l),a=2*i*(e-i*t)/(l*l)-2*i*r/(l*l)-2*o/(f*f),f=a*a-4*n*(2*i*t*r/(l*l)-2*e*r/(l*l)+r*r/(l*l)+o*o/(f*f)-1+(e-i*t)*(e-i*t)/(l*l)),0>f)return h;f=Math.sqrt(f),l=(-a+f)/(2*n),u(l,i*l-i*t+e),f=(-a-f)/(2*n),u(f,i*f-i*t+e)}return h},Cf:function(t,e,i,n,o,r,s,a,h){var l=1e21,u=t,c=e;if(_e.Me(t,e,t,n,o,r,s,a,h)){var f=(h.x-o)*(h.x-o)+(h.y-r)*(h.y-r);fl},vB:function(t,e,i,n,o,r,s,a,h){return i=t-i,s=o-s,0===i||0===s?0===i?(e=(r-a)/s,a=t,o=e*a+(r-e*o)):(r=(e-n)/i,a=o,o=r*a+(e-r*t)):(n=(e-n)/i,a=(r-a)/s,t=e-n*t,a=(r-a*o-t)/(n-a),o=n*a+t),h.h(a,o),h},Qt:function(t,e,i){return _e.Ey(t.x,t.y,t.width,t.height,e.x,e.y,i.x,i.y)},Ey:function(t,e,i,n,o,r,s,a){var h=t+i,l=e+n;return o===s?(r=e):r===a?(o=t):!!(_t(t,e,i,n,o,r)||_t(t,e,i,n,s,a)||_e.Cm(t,e,h,e,o,r,s,a)||_e.Cm(h,e,h,l,o,r,s,a)||_e.Cm(h,l,t,l,o,r,s,a)||_e.Cm(t,l,t,e,o,r,s,a))},Cm:function(t,e,i,n,o,r,s,a){return 0>=_e.Bt(t,e,i,n,o,r)*_e.Bt(t,e,i,n,s,a)&&0>=_e.Bt(o,r,s,a,t,e)*_e.Bt(o,r,s,a,i,n)},Bt:function(t,e,i,n,o,r){return i-=t,n-=e,t=o-t,e=r-e,r=t*n-e*i,0===r&&(r=t*i+e*n,0r&&(r=0))),0>r?-1:0t&&(t+=360),360<=t&&(t-=360),t},hy:function(t,e,i,n,o,r){var s=Math.PI;r||(n*=s/180,o*=s/180);var a=n>o?-1:1;r=[];var h=s/2,l=n;if(n=Math.min(2*s,Math.abs(o-n)),1e-5>n)return h=l+a*Math.min(n,h),a=t+i*Math.cos(l),l=e+i*Math.sin(l),t+=i*Math.cos(h),e+=i*Math.sin(h),i=(a+t)/2,h=(l+e)/2,r.push([a,l,i,h,i,h,t,e]),r;for(;1e-5i,r=0>n;if(tl;++l){if(e=.5*(a+h),e===a||e===h)break;var u=t/(e+o),c=s/(e+r);if(u=u*u+c*c-1,0u))break;h=e}}i=o*i/(e+o)-i,n=r*n/(e+r)-n,i=Math.sqrt(i*i+n*n)}else i=Math.abs(n-e);else n=t*t-e*e,r=t*i,r=b-1||null!==c[g+1].match(w)}function n(){return g++,c[g]}function o(t){var e=parseFloat(n()),i=parseFloat(n());y===y.toLowerCase()&&(e=x.x+e,i=x.y+i),t.h(e,i)}function r(){return o(x),x}function s(){return o(v),v}function a(){var t=m.toLowerCase();return"c"!==t&&"s"!==t&&"q"!==t&&"t"!==t?x:new pt(2*x.x-v.x,2*x.y-v.y)}void 0===e&&(e=!1);var h=new RegExp("(["+ui+"])(["+ui+"])","gm"),l=new RegExp("(["+ui+"])([^s])","gm"),u=new RegExp("([^s])(["+ui+"])","gm");t=t.replace(/,/gm," "),t=t.replace(h,"$1 $2"),t=t.replace(h,"$1 $2"),t=t.replace(l,"$1 $2"),t=t.replace(u,"$1 $2"),t=t.replace(/([0-9])([+\-])/gm,"$1 $2"),t=t.replace(/[\s\r\t\n]+/gm," "),t=t.replace(/^\s+|\s+$/g,"");var c=t.split(" ");for(t=0;t=b-1);)if(m=y,y=n(),""!==y)switch(y.toUpperCase()){case"X":f=!0,u=l=!1;break;case"M":for(d=r(),null===t.ic||!0===f?(ku(t,d.x,d.y,l,!u),f=!1):t.moveTo(d.x,d.y),h.assign(x);!i();)d=r(),t.lineTo(d.x,d.y);break;case"L":for(;!i();)d=r(),t.lineTo(d.x,d.y);break;case"H":for(;!i();)x=new pt((y===y.toLowerCase()?x.x:0)+parseFloat(n()),x.y),t.lineTo(x.x,x.y);break;case"V":for(;!i();)x=new pt(x.x,(y===y.toLowerCase()?x.y:0)+parseFloat(n())),t.lineTo(x.x,x.y);break;case"C":for(;!i();){d=new pt,o(d),p=s();var k=r();Su(t,d.x,d.y,p.x,p.y,k.x,k.y)}break;case"S":for(;!i();)d=a(),p=s(),k=r(),Su(t,d.x,d.y,p.x,p.y,k.x,k.y);break;case"Q":for(;!i();)d=s(),p=r(),Pu(t,d.x,d.y,p.x,p.y);break;case"T":for(;!i();)v=d=a(),p=r(),Pu(t,d.x,d.y,p.x,p.y);break;case"B":for(;!i();){d=parseFloat(n()),p=parseFloat(n()),k=parseFloat(n());var M=parseFloat(n()),S=parseFloat(n()),P=S,N=!1;i()||(P=parseFloat(n()),i()||(N=0!==parseFloat(n()))),y===y.toLowerCase()&&(k+=x.x,M+=x.y),t.arcTo(d,p,k,M,S,P,N)}break;case"A":for(;!i();)d=Math.abs(parseFloat(n())),p=Math.abs(parseFloat(n())),k=parseFloat(n()),S=M=!1,N=P=0,P=n(),1===P.length?(M=!!parseFloat(P),S=!!parseFloat(n()),P=parseFloat(n())):2===P.length?(M=!!parseFloat(P[0]),S=!!parseFloat(P[1]),P=parseFloat(n())):(M=!!parseFloat(P[0]),S=!!parseFloat(P[1]),P=parseFloat(P.slice(2))),N=parseFloat(n()),y===y.toLowerCase()&&(P=x.x+P,N=x.y+N),x.h(P,N),Nu(t,d,p,k,M,S,P,N);break;case"Z":Mu(t),x.assign(h);break;case"F":for(d="",p=1;c[g+p];)if(null!==c[g+p].match(/[Uu]/))p++;else{if(null!==c[g+p].match(w)){d=c[g+p];break}p++}d.match(/[Mm]/)?l=!0:0=t)return 0;if((o>s?o-s:s-o)<(r>a?r-a:a-r)){if(ra)return 0}else if(er)return 0}else if(os)return 0}else if(lo)return 0;return 0t?"M"+this.startX.toString()+" "+this.startY.toString()+"L"+this.endX.toString()+" "+this.endY.toString():"M"+this.startX.toFixed(t)+" "+this.startY.toFixed(t)+"L"+this.endX.toFixed(t)+" "+this.endY.toFixed(t);case ai:var e=new zt(this.startX,this.startY,0,0);return e.Rw(this.endX,this.endY,0,0),0>t?"M"+e.x.toString()+" "+e.y.toString()+"H"+e.right.toString()+"V"+e.bottom.toString()+"H"+e.left.toString()+"z":"M"+e.x.toFixed(t)+" "+e.y.toFixed(t)+"H"+e.right.toFixed(t)+"V"+e.bottom.toFixed(t)+"H"+e.left.toFixed(t)+"z";case hi:if(e=new zt(this.startX,this.startY,0,0),e.Rw(this.endX,this.endY,0,0),0>t)return t=e.left.toString()+" "+(e.y+e.height/2).toString(),"M"+t+"A"+(e.width/2).toString()+" "+(e.height/2).toString()+" 0 0 1 "+e.right.toString()+" "+(e.y+e.height/2).toString()+"A"+(e.width/2).toString()+" "+(e.height/2).toString()+" 0 0 1 "+t;var i=e.left.toFixed(t)+" "+(e.y+e.height/2).toFixed(t);return"M"+i+"A"+(e.width/2).toFixed(t)+" "+(e.height/2).toFixed(t)+" 0 0 1 "+e.right.toFixed(t)+" "+(e.y+e.height/2).toFixed(t)+"A"+(e.width/2).toFixed(t)+" "+(e.height/2).toFixed(t)+" 0 0 1 "+i;case li:e="",i=this.figures.j;for(var n=i.length,o=0;os&&(s+=360),p.startAngle+=s),0>t&&(p.startAngle=180-p.startAngle,p.sweepAngle=-p.sweepAngle),0>n&&(p.startAngle=-p.startAngle,p.sweepAngle=-p.sweepAngle),p.radiusX*=Math.sqrt(t*t+i*i),void 0!==p.radiusY&&(p.radiusY*=Math.sqrt(e*e+n*n));break;case bi:if(s=p.endX,a=p.endY,p.endX=s*t+a*i+o,p.endY=s*e+a*n+r,0===p.radiusX||0===p.radiusY)break;0!==e&&(s=180*Math.atan2(e,t)/Math.PI,0>s&&(s+=360),p.xAxisRotation+=s),0>t&&(p.xAxisRotation=180-p.xAxisRotation,p.isClockwiseArc=!p.isClockwiseArc),0>n&&(p.xAxisRotation=-p.xAxisRotation,p.isClockwiseArc=!p.isClockwiseArc),p.radiusX*=Math.sqrt(t*t+i*i),p.radiusY*=Math.sqrt(e*e+n*n);break;default:w("Unknown Segment type: "+p.type)}}}}return this.ra=!0,this},i.$=function(t,e){void 0===e&&(e=0);var i=this.cd,n=this.dd,o=this.hc,r=this.oc;switch(this.type){case si:return _e.Nb(i,n,o,r,e,t.x,t.y);case ai:var s=zt.allocAt(Math.min(i,o)-e,Math.min(n,r)-e,Math.abs(o-i)+2*e,Math.abs(r-n)+2*e);return t=s.$(t),zt.free(s),t;case hi:s=Math.min(i,o)-e;var a=Math.min(n,r)-e;return i=(Math.abs(o-i)+2*e)/2,e=(Math.abs(r-n)+2*e)/2,0>=i||0>=e?!1:(s=t.x-(s+i),a=t.y-(a+e),1>=s*s/(i*i)+a*a/(e*e));case li:return ei(this,t,e,!0,!1);default:return!1}},i.Xv=function(t,e){if(0>t?t=0:1=r)return n=r-s,n=0===u?0:n/u,i=i[a],a=i[2*t],o=i[2*t+1],e.h(a+(i[2*t+2]-a)*n,o+(i[2*t+3]-o)*n),e;s+=u}}return e},i.vy=function(t){if(0>t?t=0:1=o)return o=e[s],e=o[2*t],i=o[2*t+1],n=o[2*t+2],t=o[2*t+3],1>Math.abs(n-e)&&1>Math.abs(t-i)?0:1>Math.abs(n-e)?0<=t-i?90:270:1>Math.abs(t-i)?0<=n-e?0:180:180*Math.atan2(t-i,n-e)/Math.PI;r+=l}}return NaN},i.Yv=function(t,e){if(0>t?t=0:1=r)return n=r-s,n=0===u?0:n/u,u=i[a],i=u[2*t],a=u[2*t+1],o=u[2*t+2],t=u[2*t+3],e[0]=i+(o-i)*n,e[1]=a+(t-a)*n,e[2]=1>Math.abs(o-i)&&1>Math.abs(t-a)?0:1>Math.abs(o-i)?0<=t-a?90:270:1>Math.abs(t-a)?0<=o-i?0:180:180*Math.atan2(t-a,o-i)/Math.PI,e;s+=u}}return e},i.wy=function(t){if(this.type===si){var e=this.startX,i=this.startY,n=this.endX,o=this.endY;if(e!==n||i!==o){var r=t.x;if(t=t.y,e===n){if(i=n?n===i?0:1:Math.abs(t-i)/(n-s)}if(i===o)return e=n?n===e?0:1:Math.abs(r-e)/(n-s);s=(n-e)*(n-e)+(o-i)*(o-i);var a=pt.alloc();return _e.Qh(e,i,n,o,r,t,a),t=a.x,r=a.y,pt.free(a),Math.sqrt(((t-e)*(t-e)+(r-i)*(r-i))/s)}}else{if(this.type!==ai){e=this.flattenedSegments,i=this.flattenedLengths,r=this.flattenedTotalLength,n=pt.alloc(),o=1/0,a=s=0,m=e.length;for(var h=v=0,l=0;lt?0:1t&&(t+=360),this.Ce=t,this.Qi=0,this.Ri=Math.max(n,0),this.qh=Math.max(o,0),this.Ll="boolean"===typeof s?s:"number"===typeof s&&!!s,this.el=!!a):(this.Ce=n,this.Qi=o,t===xi&&(r=Math.max(r,0)),this.Ri=r,"number"===typeof s?(t===xi&&(s=Math.max(s,0)),this.qh=s):this.qh=0,this.el=this.Ll=!1),this.Oj=!1,this.ra=!0,this.Qd=null}function di(t,e){if(null!==t.Qd&&!1===e.ra)return t.Qd;var i=t.radiusX,n=t.radiusY;if(void 0===n&&(n=i),0===i||0===n)return t.Qd=[],t.Qd;e=t.Ce;var o=t.Qi,r=_e.hy(0,0,i=d?s=Math.PI:1<=d&&(s=0),!h&&0s&&(s+=2*Math.PI),h=e>r?1:e/r,d=e>r?r/e:1,e=_e.hy(0,0,e>r?e:r,u,u+s,!0),r=Ke.alloc(),r.reset(),r.translate(i,n),r.rotate(t.Ce,0,0),r.scale(h,d),Qe(e,r),Ke.free(r),t.Qd=e,t.Qd}We.className="Geometry",We.stringify=Je,We.fillPath=function(t){t=t.split(/[Xx]/);for(var e=t.length,i="",n=0;nt?"M"+this.startX.toString()+" "+this.startY.toString():"M"+this.startX.toFixed(t)+" "+this.startY.toFixed(t),i=this.segments.j,n=i.length,o=0;ot?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(t)+" "+this.endY.toFixed(t);break;case yi:t=0>t?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(t)+" "+this.endY.toFixed(t);break;case mi:t=0>t?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(t)+" "+this.point1Y.toFixed(t)+" "+this.point2X.toFixed(t)+" "+this.point2Y.toFixed(t)+" "+this.endX.toFixed(t)+" "+this.endY.toFixed(t);break;case vi:t=0>t?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(t)+" "+this.point1Y.toFixed(t)+" "+this.endX.toFixed(t)+" "+this.endY.toFixed(t);break;case xi:t=0>t?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(t)+" "+this.sweepAngle.toFixed(t)+" "+this.centerX.toFixed(t)+" "+this.centerY.toFixed(t)+" "+this.radiusX.toFixed(t)+" "+this.radiusY.toFixed(t);break;case bi:t=0>t?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(t)+" "+this.radiusY.toFixed(t)+" "+this.xAxisRotation.toFixed(t)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(t)+" "+this.endY.toFixed(t);break;default:t=this.type.toString()}return t+(this.Oj?"z":"")},i.freeze=function(){return this.v=!0,this},i.ea=function(){return this.v=!1,this},i.close=function(){return this.Oj=!0,this},d.Object.defineProperties(fi.prototype,{isClosed:{get:function(){return this.Oj},set:function(t){this.Oj!==t&&(this.Oj=t,this.ra=!0)}},type:{get:function(){return this.qa},set:function(t){this.v&&k(this,t),this.qa=t,this.ra=!0}},endX:{get:function(){return this.hc},set:function(t){this.v&&k(this,t),this.hc=t,this.ra=!0}},endY:{get:function(){return this.oc},set:function(t){this.v&&k(this,t),this.oc=t,this.ra=!0}},point1X:{get:function(){return this.Ce},set:function(t){this.v&&k(this,t),this.Ce=t,this.ra=!0}},point1Y:{get:function(){return this.Qi},set:function(t){this.v&&k(this,t),this.Qi=t,this.ra=!0}},point2X:{get:function(){return this.Ri},set:function(t){this.v&&k(this,t),this.Ri=t,this.ra=!0}},point2Y:{get:function(){return this.qh},set:function(t){this.v&&k(this,t),this.qh=t,this.ra=!0}},centerX:{get:function(){return this.Ce},set:function(t){this.v&&k(this,t),this.Ce=t,this.ra=!0}},centerY:{get:function(){return this.Qi},set:function(t){this.v&&k(this,t),this.Qi=t,this.ra=!0}},radiusX:{get:function(){return this.Ri},set:function(t){0>t&&M(t,">= zero",fi,"radiusX"),this.v&&k(this,t),this.Ri=t,this.ra=!0}},radiusY:{get:function(){return this.qh},set:function(t){0>t&&M(t,">= zero",fi,"radiusY"),this.v&&k(this,t),this.qh=t,this.ra=!0}},startAngle:{get:function(){return this.hc},set:function(t){this.hc!==t&&(this.v&&k(this,t),t%=360,0>t&&(t+=360),this.hc=t,this.ra=!0)}},sweepAngle:{get:function(){return this.oc},set:function(t){this.v&&k(this,t),360t&&(t=-360),this.oc=t,this.ra=!0}},isClockwiseArc:{get:function(){return this.el},set:function(t){this.v&&k(this,t),this.el=t,this.ra=!0}},isLargeArc:{get:function(){return this.Ll},set:function(t){this.v&&k(this,t),this.Ll=t,this.ra=!0}},xAxisRotation:{get:function(){return this.Ce},set:function(t){t%=360,0>t&&(t+=360),this.v&&k(this,t),this.Ce=t,this.ra=!0}}}),fi.prototype.equalsApprox=fi.prototype.Qa;var gi=new U(fi,"Move",0),yi=new U(fi,"Line",1),mi=new U(fi,"Bezier",2),vi=new U(fi,"QuadraticBezier",3),xi=new U(fi,"Arc",4),bi=new U(fi,"SvgArc",4);function wi(){this.C=null,this.yv=new pt(0,0).freeze(),this.Iu=new pt(0,0).freeze(),this.xr=this.zs=0,this.yr=1,this.Di="",this.st=this.Rr=!1,this.Or=this.Ar=0,this.Pg=this.bs=this.ms=!1,this.Wr=null,this.nt=0,this.pd=this.mt=null}function ki(){this.C=null,this.oa="",this.Js=this.kt=null}function Mi(){this.wn=Pi,this.gf=this.ys="",this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null}fi.className="PathSegment",fi.Move=gi,fi.Line=yi,fi.Bezier=mi,fi.QuadraticBezier=vi,fi.Arc=xi,fi.SvgArc=bi,wi.prototype.copy=function(){var t=new wi;return this.clone(t)},wi.prototype.clone=function(t){return t.C=this.C,t.yv.assign(this.viewPoint),t.Iu.assign(this.documentPoint),t.zs=this.zs,t.xr=this.xr,t.yr=this.yr,t.Di=this.Di,t.Rr=this.Rr,t.st=this.st,t.Ar=this.Ar,t.Or=this.Or,t.ms=this.ms,t.bs=this.bs,t.Pg=this.Pg,t.Wr=this.Wr,t.nt=this.nt,t.mt=this.mt,t.pd=this.pd,t},wi.prototype.toString=function(){var t="^";return 0!==this.modifiers&&(t+="M:"+this.modifiers),0!==this.button&&(t+="B:"+this.button),""!==this.key&&(t+="K:"+this.key),0!==this.clickCount&&(t+="C:"+this.clickCount),0!==this.delta&&(t+="D:"+this.delta),this.handled&&(t+="h"),this.bubbles&&(t+="b"),null!==this.documentPoint&&(t+="@"+this.documentPoint.toString()),t},wi.prototype.Jq=function(t,e){var i=this.diagram;return null===i||xr(i,this.event,t,e),e},wi.prototype.mA=function(t,e){var i=this.diagram;return null===i||(xr(i,this.event,t,e),e.assign(i.ou(e))),e},d.Object.defineProperties(wi.prototype,{diagram:{get:function(){return this.C},set:function(t){this.C=t}},viewPoint:{get:function(){return this.yv},set:function(t){this.yv.assign(t)}},documentPoint:{get:function(){return this.Iu},set:function(t){this.Iu.assign(t)}},modifiers:{get:function(){return this.zs},set:function(t){this.zs=t}},button:{get:function(){return this.xr},set:function(t){if(this.xr=t,null===this.event)switch(t){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.yr},set:function(t){this.yr=t}},key:{get:function(){return this.Di},set:function(t){this.Di=t}},down:{get:function(){return this.Rr},set:function(t){this.Rr=t}},up:{get:function(){return this.st},set:function(t){this.st=t}},clickCount:{get:function(){return this.Ar},set:function(t){this.Ar=t}},delta:{get:function(){return this.Or},set:function(t){this.Or=t}},isMultiTouch:{get:function(){return this.ms},set:function(t){this.ms=t}},handled:{get:function(){return this.bs},set:function(t){this.bs=t}},bubbles:{get:function(){return this.Pg},set:function(t){this.Pg=t}},event:{get:function(){return this.Wr},set:function(t){this.Wr=t}},isTouchEvent:{get:function(){var t=y.TouchEvent,e=this.event;return!!(t&&e instanceof t)||(t=y.PointerEvent)&&e instanceof t&&("touch"===e.pointerType||"pen"===e.pointerType)}},timestamp:{get:function(){return this.nt},set:function(t){this.nt=t}},targetDiagram:{get:function(){return this.mt},set:function(t){this.mt=t}},targetObject:{get:function(){return this.pd},set:function(t){this.pd=t}},control:{get:function(){return 0!==(1&this.modifiers)},set:function(t){this.modifiers=t?1|this.modifiers:-2&this.modifiers}},shift:{get:function(){return 0!==(4&this.modifiers)},set:function(t){this.modifiers=t?4|this.modifiers:-5&this.modifiers}},alt:{get:function(){return 0!==(2&this.modifiers)},set:function(t){this.modifiers=t?2|this.modifiers:-3&this.modifiers}},meta:{get:function(){return 0!==(8&this.modifiers)},set:function(t){this.modifiers=t?8|this.modifiers:-9&this.modifiers}},left:{get:function(){var t=this.event;return null===t||"mousedown"!==t.type&&"mouseup"!==t.type&&"pointerdown"!==t.type&&"pointerup"!==t.type?0!==(1&this.buttons):0===this.button},set:function(t){this.buttons=t?1|this.buttons:-2&this.buttons}},right:{get:function(){var t=this.event;return null===t||"mousedown"!==t.type&&"mouseup"!==t.type&&"pointerdown"!==t.type&&"pointerup"!==t.type?0!==(2&this.buttons):2===this.button},set:function(t){this.buttons=t?2|this.buttons:-3&this.buttons}},middle:{get:function(){var t=this.event;return null===t||"mousedown"!==t.type&&"mouseup"!==t.type&&"pointerdown"!==t.type&&"pointerup"!==t.type?0!==(4&this.buttons):1===this.button},set:function(t){this.buttons=t?4|this.buttons:-5&this.buttons}}}),wi.prototype.getMultiTouchDocumentPoint=wi.prototype.mA,wi.prototype.getMultiTouchViewPoint=wi.prototype.Jq,wi.className="InputEvent",ki.prototype.copy=function(){var t=new ki;return t.C=this.C,t.oa=this.oa,t.kt=this.kt,t.Js=this.Js,t},ki.prototype.toString=function(){var t="*"+this.name;return null!==this.subject&&(t+=":"+this.subject.toString()),null!==this.parameter&&(t+="("+this.parameter.toString()+")"),t},d.Object.defineProperties(ki.prototype,{diagram:{get:function(){return this.C},set:function(t){this.C=t}},name:{get:function(){return this.oa},set:function(t){this.oa=t}},subject:{get:function(){return this.kt},set:function(t){this.kt=t}},parameter:{get:function(){return this.Js},set:function(t){this.Js=t}}}),ki.className="DiagramEvent",Mi.prototype.clear=function(){this.hp=this.ip=this.op=this.pp=this.np=this.C=this.cc=null},Mi.prototype.copy=function(){var t=new Mi;t.wn=this.wn,t.ys=this.ys,t.gf=this.gf,t.cc=this.cc,t.C=this.C,t.np=this.np;var e=this.pp;return t.pp=N(e)&&"function"===typeof e.H?e.H():e,e=this.op,t.op=N(e)&&"function"===typeof e.H?e.H():e,e=this.ip,t.ip=N(e)&&"function"===typeof e.H?e.H():e,e=this.hp,t.hp=N(e)&&"function"===typeof e.H?e.H():e,t},Mi.prototype.jb=function(t){t.classType===Mi&&(this.change=t)},Mi.prototype.toString=function(){var t="";return t=this.change===Si?t+"* ":this.change===Pi?t+(null!==this.model?"!m":"!d"):t+(null!==this.model?"!m":"!d")+this.change,this.propertyName&&"string"===typeof this.propertyName&&(t+=" "+this.propertyName),this.modelChange&&this.modelChange!==this.propertyName&&(t+=" "+this.modelChange),t+=": ",this.change===Si?null!==this.oldValue&&(t+=" "+this.oldValue):(null!==this.object&&(t+=F(this.object)),null!==this.oldValue&&(t+=" old: "+F(this.oldValue)),null!==this.oldParam&&(t+=" "+this.oldParam),null!==this.newValue&&(t+=" new: "+F(this.newValue)),null!==this.newParam&&(t+=" "+this.newParam)),t},Mi.prototype.G=function(t){return t?this.oldValue:this.newValue},Mi.prototype.oA=function(t){return t?this.oldParam:this.newParam},Mi.prototype.canUndo=function(){return null!==this.model||null!==this.diagram},Mi.prototype.undo=function(){this.canUndo()&&(null!==this.model?this.model.changeState(this,!0):null!==this.diagram&&this.diagram.changeState(this,!0))},Mi.prototype.canRedo=function(){return null!==this.model||null!==this.diagram},Mi.prototype.redo=function(){this.canRedo()&&(null!==this.model?this.model.changeState(this,!1):null!==this.diagram&&this.diagram.changeState(this,!1))},d.Object.defineProperties(Mi.prototype,{model:{get:function(){return this.cc},set:function(t){this.cc=t}},diagram:{get:function(){return this.C},set:function(t){this.C=t}},change:{get:function(){return this.wn},set:function(t){this.wn=t}},modelChange:{get:function(){return this.ys},set:function(t){this.ys=t}},propertyName:{get:function(){return this.gf},set:function(t){this.gf=t}},isTransactionFinished:{get:function(){return this.wn===Si&&("CommittedTransaction"===this.gf||"FinishedUndo"===this.gf||"FinishedRedo"===this.gf)}},object:{get:function(){return this.np},set:function(t){this.np=t}},oldValue:{get:function(){return this.pp},set:function(t){this.pp=t}},oldParam:{get:function(){return this.op},set:function(t){this.op=t}},newValue:{get:function(){return this.ip},set:function(t){this.ip=t}},newParam:{get:function(){return this.hp},set:function(t){this.hp=t}}}),Mi.prototype.redo=Mi.prototype.redo,Mi.prototype.canRedo=Mi.prototype.canRedo,Mi.prototype.undo=Mi.prototype.undo,Mi.prototype.canUndo=Mi.prototype.canUndo,Mi.prototype.getParam=Mi.prototype.oA,Mi.prototype.getValue=Mi.prototype.G,Mi.prototype.clear=Mi.prototype.clear;var Si=new U(Mi,"Transaction",-1),Pi=new U(Mi,"Property",0),Ni=new U(Mi,"Insert",1),Ci=new U(Mi,"Remove",2);function Ti(){this.u=(new et).freeze(),this.oa="",this.l=!1}function Ai(){this.gv=new nt,this.md=!1,this.I=(new et).freeze(),this.Xd=-1,this.u=999,this.se=!1,this.Lr=null,this.Yi=0,this.l=!1,this.ye=(new et).freeze(),this.Tl=new et,this.Qu=!0,this.Wu=this.ks=this.$u=this.Zu=!1}function Li(t,e,i){if(t.isUndoingRedoing)return!1;t.checksTransactionLevel&&1>t.transactionLevel&&S("Ending transaction without having started a transaction: "+i);var n=1===t.transactionLevel,o=t.currentTransaction;n&&e&&(t.isInternalTransaction||t.Bb("CommittingTransaction",i,o));var r=0;if(0t.historyIndex;n--)r=e.J(n),null!==r&&r.clear(),e.cb(n),t.ks=!0;n=t.maxHistoryLength,0<=n&&(0===n?e.clear():e.count>=n&&(r=e.J(0),null!==r&&r.clear(),e.cb(0),t.Xd--)),0===n||0!==e.count&&e.get(e.count-1)===o||(e.add(o),t.Xd++),e.freeze()}t.isInternalTransaction||t.Bb("CommittedTransaction",i,o)}else{t.se=!0;try{t.isEnabled&&null!==o&&(o.isComplete=!0,o.undo())}finally{t.isInternalTransaction||t.Bb("RolledBackTransaction",i,o),t.se=!1}null!==o&&o.clear()}return t.Lr=null,t.isPendingClear&&t.clear(),t.isPendingClear=!1,t.isPendingUnmodified=!1,!0}if(t.isEnabled&&!e&&null!==o){for(t=r,i=o.changes,o=i.count-1;o>=t;o--)e=i.J(o),null!==e&&e.undo(),i.ea(),i.cb(o);i.freeze()}return!1}function ji(){ot(this),this.C=fs,this.oa="",this.md=!0,this.Sc=!1,this.ix=null,this.lz=new wi,this.vt=-1}function Oi(t,e,i){if(e.handled=!1,null===t||t.Hg()){var n=0;e.left?n=1===e.clickCount?1:2===e.clickCount?2:1:e.right&&1===e.clickCount&&(n=3);var o="ObjectSingleClicked";if(null!==t){switch(n){case 1:o="ObjectSingleClicked";break;case 2:o="ObjectDoubleClicked";break;case 3:o="ObjectContextClicked"}0!==n&&i.R(o,t)}else{switch(n){case 1:o="BackgroundSingleClicked";break;case 2:o="BackgroundDoubleClicked";break;case 3:o="BackgroundContextClicked"}0!==n&&i.R(o)}if(null!==t)for(;null!==t;){switch(i=null,n){case 1:i=t.click;break;case 2:i=t.doubleClick?t.doubleClick:t.click;break;case 3:i=t.contextClick}if(null!==i&&(i(e,t),e.handled))break;t=t.panel}else{switch(t=null,n){case 1:t=i.click;break;case 2:t=i.doubleClick?i.doubleClick:i.click;break;case 3:t=i.contextClick}null!==t&&t(e)}}}function Di(){ji.call(this),this.name="ToolManager",this.Cc=new et,this.Tc=new et,this.Od=new et,this.T=this.Ka=850,this.u=new Bt(2,2).ca(),this.eb=5e3,this.La=Bi,this.I=Ri,this.Kr=this.l=null,this.ik=-1}function Fi(t,e){t.standardMouseOver(),t.isBeyondDragSize()&&t.standardWaitAfter(t.isActive?t.holdDelay:t.hoverDelay,e.lastInput)}Mi.className="ChangedEvent",Mi.Transaction=Si,Mi.Property=Pi,Mi.Insert=Ni,Mi.Remove=Ci,Ti.prototype.toString=function(t){var e="Transaction: "+this.name+" "+this.changes.count.toString()+(this.isComplete?"":", incomplete");if(void 0!==t&&0e&&t.Pc(e,n),e++);for(;t.length>e;)t.pop();t.freeze()}},d.Object.defineProperties(Ti.prototype,{changes:{get:function(){return this.u}},name:{get:function(){return this.oa},set:function(t){this.oa=t}},isComplete:{get:function(){return this.l},set:function(t){this.l=t}}}),Ti.prototype.optimize=Ti.prototype.nw,Ti.prototype.redo=Ti.prototype.redo,Ti.prototype.canRedo=Ti.prototype.canRedo,Ti.prototype.undo=Ti.prototype.undo,Ti.prototype.canUndo=Ti.prototype.canUndo,Ti.prototype.clear=Ti.prototype.clear,Ti.className="Transaction",Ai.prototype.toString=function(t){var e="UndoManager "+this.historyIndex+"<"+this.history.count+"<="+this.maxHistoryLength;e+="[";for(var i=this.nestedTransactionNames.count,n=0;n=this.transactionLevel&&!this.Qu&&(t=t.diagram,null!==t&&!1===t.pj||S("Change not within a transaction: "+i.toString()))}},Ai.prototype.skipsEvent=function(t){if(null===t||0>t.change.value)return!0;if(t=t.object,null===t)return!1;if(void 0!==t.layer){if(t=t.layer,null!==t&&t.isTemporary)return!0}else if(t.isTemporary)return!0;return!1},d.Object.defineProperties(Ai.prototype,{models:{get:function(){return this.gv.iterator}},isEnabled:{get:function(){return this.md},set:function(t){this.md=t}},transactionToUndo:{get:function(){return 0<=this.historyIndex&&this.historyIndex<=this.history.count-1?this.history.J(this.historyIndex):null}},transactionToRedo:{get:function(){return this.historyIndexo&&(o=-3),0s&&(s=-3)),void 0===a||void 0===o||void 0===s||0===o&&0===s||e.shift)!e.shift&&t.allowVerticalScroll?(r=3*r*t.scrollVerticalLineChange,0o||Math.abs(e.y-t.y)>n},d.Object.defineProperties(ji.prototype,{diagram:{get:function(){return this.C},set:function(t){t instanceof Ko&&(this.C=t)}},name:{get:function(){return this.oa},set:function(t){this.oa=t}},isEnabled:{get:function(){return this.md},set:function(t){this.md=t}},isActive:{get:function(){return this.Sc},set:function(t){this.Sc=t}},transactionResult:{get:function(){return this.ix},set:function(t){this.ix=t}}}),ji.prototype.stopTransaction=ji.prototype.Jg,ji.prototype.startTransaction=ji.prototype.va,ji.className="Tool",f(Di,ji),Di.prototype.initializeStandardTools=function(){},Di.prototype.updateAdornments=function(t){var e=this.currentToolTip;if(e instanceof Qu&&this.Kr===t){var i=e.adornedObject;(null!==t?i.part===t:null===i)?this.showToolTip(e,i):this.hideToolTip()}},Di.prototype.doMouseDown=function(){var t=this.diagram,e=t.lastInput;if(e.isTouchEvent&&this.gestureBehavior===zi&&(e.bubbles=!1),e.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===Vi)return void(e.bubbles=!0);if(this.gestureBehavior===zi)return;if(t.currentTool.canStartMultiTouch())return void t.currentTool.standardPinchZoomStart()}for(var i=this.mouseDownTools.length,n=0;no.right&&(i.x-=n.width+5/e.scale),i.xo.bottom?i.y-(n.height+5/e.scale):i.y+20/e.scale,i.yi.pointsCount)){var n=t.diagram;if(!n.isReadOnly){var o=t.qg;if(null!==o){var r=null,s=null;null===i.fromNode&&(r=Qi(t,i.i(0),!1),null!==r&&(s=r.part));var a=null,h=null;null===i.toNode&&(a=Qi(t,i.i(i.pointsCount-1),!0),null!==a&&(h=a.part)),o.isValidLink(s,r,h,a)?e?(i.defaultFromPoint=i.i(0),i.defaultToPoint=i.i(i.pointsCount-1),i.suspendsRouting=!1,i.fromNode=s,null!==r&&(i.fromPortId=r.portId),i.toNode=h,null!==a&&(i.toPortId=a.portId),i.fromPort!==n.Ky&&n.R("LinkRelinked",i,n.Ky),i.toPort!==n.Ly&&n.R("LinkRelinked",i,n.Ly)):bn(o,s,r,h,a):bn(o,null,null,null,null)}}}}function en(t,e){var i=t.diagram;t.dragsLink&&tn(t,!0),Xi(t);var n=t.findDragOverObject(e),o=i.lastInput;if(o.targetObject=n,null!==n){o.handled=!1;for(var r=n;null!==r;){var s=r.mouseDrop;if(null!==s&&(s(o,r),o.handled))break;nn(t,o,r),r=Zi(r)}}else r=i.mouseDrop,null!==r&&r(o);if(t.isActive||null!==hn){for(o=(t.copiedParts||t.draggedParts).iterator;o.next();)r=o.key,r instanceof ec&&r.linksConnected.each((function(t){t.suspendsRouting=!1}));if(t.doDropOnto(e,n),t.isActive||null!==hn){for(t=zt.alloc(),e=i.selection.iterator;e.next();)n=e.value,n instanceof ec&&on(i,n,t);zt.free(t)}}}function nn(t,e,i){t=t.diagram,i=i.part,!t.handlesDragDropForTopLevelParts||!i.isTopLevel||i instanceof bc||(i=t.mouseDrop,null!==i&&i(e))}function on(t,e,i){var n=!1;if(e.getAvoidableRect(i),t.viewportBounds.Ge(i)&&(n=!0),t=t.Vv(i,(function(t){return t.part}),(function(t){return t instanceof Nc}),!0,(function(t){return t instanceof Nc}),n),0!==t.count)for(t=t.iterator;t.next();)i=t.value,!i.Kd(e)&&i.isAvoiding&&i.Ua()}function rn(t){if(null!==t.draggedParts)for(var e=t.draggedParts.iterator;e.next();){var i=e.key;i instanceof ec&&(i=i.containingGroup,null===i||null===i.placeholder||t.draggedParts.contains(i)||i.placeholder.o())}}function sn(t,e,i,n){if(null===t.copiedParts){var o=t.diagram;if(!o.isReadOnly&&!o.isModelReadOnly){o.skipsUndoManager=!i,o.partManager.addsToTemporaryLayer=!i,t.startPoint=n.documentPoint,i=o.tk(e,o,!0);var r=zt.alloc();o=n=1/0;for(var s=-1/0,a=-1/0,h=e.iterator;h.next();){var l=h.value;if(l.isVisible()){var u=l.location;l=u.x,u=u.y,isNaN(l)||isNaN(u)||(ls&&(s=l),u>a&&(a=u))}}for(1/0===n?r.h(0,0,0,0):r.h(n,o,s-n,a-o),n=r.x+r.width/2,o=r.y+r.height/2,zt.free(r),r=t.it,s=new dt,a=pt.alloc(),h=e.iterator;h.next();)l=h.value,l instanceof Nc&&l.canCopy()&&(u=i.G(l),null!==u&&(u.points=l.points,Ac(u,r.x-n,r.y-o),u.suspendsRouting=!0,s.add(u,t.Cd())));for(e=e.iterator;e.next();)l=e.value,l.Nc()&&l.canCopy()&&(h=i.G(l),null!==h&&(l=l.location,a.h(r.x-(n-l.x),r.y-(o-l.y)),h.location=a,h.Ta(),s.add(h,t.Cd(a))));pt.free(a),t.copiedParts=s,Yi(t,s.Kf()),null!==t.draggedLink&&(i=t.draggedLink,e=i.routeBounds,Ac(i,t.startPoint.x-(e.x+e.width/2),t.startPoint.y-(e.y+e.height/2)))}}}Di.className="ToolManager",Di.WheelScroll=Bi,Di.WheelZoom=Ii,Di.WheelNone=Ei,Di.GestureZoom=Ri,Di.GestureCancel=zi,Di.GestureNone=Vi,f(Gi,ji),Gi.prototype.canStart=function(){if(!this.isEnabled)return!1;var t=this.diagram;if(t.isReadOnly&&!t.allowDragOut||!t.allowMove&&!t.allowCopy&&!t.allowDragOut||!t.allowSelect)return!1;var e=t.lastInput;return!(!e.left||t.currentTool!==this&&(!this.isBeyondDragSize()||e.isTouchEvent&&e.timestamp-t.firstInput.timestamp=n&&(n=.1);var o=this,r=e.Eg(i,n,(function(e){return o.findValidLinkablePort(e,t)}),null,!0);for(n=1/0,e=null,r=r.iterator;r.next();){var s=r.value,a=s.part;if(a instanceof ec){var h=s.da(ae,pt.alloc()),l=i.x-h.x,u=i.y-h.y;pt.free(h),h=l*l+u*u,hi){if(null!==this.originalLink&&t===this.originalFromNode&&e===this.originalFromPort)return!0;if(e=e.portId,null===e&&(e=""),t.Fq(e).count>=i)return!1}return!0},un.prototype.isValidTo=function(t,e){if(null===t||null===e)return this.isUnconnectedLinkValid;if(this.diagram.currentTool===this&&(null!==t.layer&&!t.layer.allowLink||!0!==e.toLinkable))return!1;var i=e.toMaxLinks;if(1/0>i){if(null!==this.originalLink&&t===this.originalToNode&&e===this.originalToPort)return!0;if(e=e.portId,null===e&&(e=""),t.Hd(e).count>=i)return!1}return!0},un.prototype.isInSameNode=function(t,e){return null!==t&&null!==e&&(t===e||(t=t.part,e=e.part,null!==t&&t===e))},un.prototype.isLinked=function(t,e){if(null===t||null===e)return!1;var i=t.part;if(!(i instanceof ec))return!1;t=t.portId,null===t&&(t="");var n=e.part;if(!(n instanceof ec))return!1;for(e=e.portId,null===e&&(e=""),e=n.Hd(e);e.next();)if(n=e.value,n.fromNode===i&&n.fromPortId===t)return!0;return!1},un.prototype.isValidLink=function(t,e,i,n){if(!this.isValidFrom(t,e)||!this.isValidTo(i,n)||!(null===e||null===n||(e.fromLinkableSelfNode&&n.toLinkableSelfNode||!this.isInSameNode(e,n))&&(e.fromLinkableDuplicates&&n.toLinkableDuplicates||!this.isLinked(e,n)))||null!==this.originalLink&&(null!==t&&this.isLabelDependentOnLink(t,this.originalLink)||null!==i&&this.isLabelDependentOnLink(i,this.originalLink))||null!==t&&null!==i&&(null===t.data&&null!==i.data||null!==t.data&&null===i.data)||!this.isValidCycle(t,i,this.originalLink))return!1;if(null!==t){var o=t.linkValidation;if(null!==o&&!o(t,e,i,n,this.originalLink))return!1}return!(null!==i&&(o=i.linkValidation,null!==o&&!o(t,e,i,n,this.originalLink)))&&(o=this.linkValidation,null===o||o(t,e,i,n,this.originalLink))},un.prototype.isLabelDependentOnLink=function(t,e){if(null===t)return!1;var i=t.labeledLink;if(null===i)return!1;if(i===e)return!0;var n=new nt;return n.add(t),cn(this,i,e,n)},un.prototype.isValidCycle=function(t,e,i){if(void 0===i&&(i=null),null===t||null===e)return this.isUnconnectedLinkValid;var n=this.diagram.validCycle;if(n!==ks){if(n===Ns){if(n=i||this.temporaryLink,null!==n&&!n.isTreeLink)return!0;for(n=e.linksConnected;n.next();){var o=n.value;if(o!==i&&o.isTreeLink&&o.toNode===e)return!1}return!fn(this,t,e,i,!0)}if(n===Cs){if(n=i||this.temporaryLink,null!==n&&!n.isTreeLink)return!0;for(n=t.linksConnected;n.next();)if(o=n.value,o!==i&&o.isTreeLink&&o.fromNode===t)return!1;return!fn(this,t,e,i,!0)}if(n===Ms)return t===e?t=!0:(n=new nt,n.add(e),t=dn(this,n,t,e,i)),!t;if(n===Ss)return!fn(this,t,e,i,!1);if(n===Ps)return t===e?t=!0:(n=new nt,n.add(e),t=pn(this,n,t,e,i)),!t}return!0},d.Object.defineProperties(un.prototype,{portGravity:{get:function(){return this.Xh},set:function(t){0<=t&&(this.Xh=t)}},isUnconnectedLinkValid:{get:function(){return this.La},set:function(t){this.La=t}},linkingCursor:{get:function(){return this.oi},set:function(t){this.oi=t}},temporaryLink:{get:function(){return this.gx},set:function(t){this.gx=t}},temporaryFromNode:{get:function(){return this.ex},set:function(t){(this.ex=t)&&(this.l=t.port)}},temporaryFromPort:{get:function(){return this.l},set:function(t){if(null!==this.l){var e=this.l.panel;if(null!==e){var i=e.W.indexOf(this.l);e.cb(i),e.wb(i,t)}}this.l=t}},temporaryToNode:{get:function(){return this.hx},set:function(t){(this.hx=t)&&(this.u=t.port)}},temporaryToPort:{get:function(){return this.u},set:function(t){if(null!==this.u){var e=this.u.panel;if(null!==e){var i=e.W.indexOf(this.u);e.cb(i),e.wb(i,t)}}this.u=t}},originalLink:{get:function(){return this.Tc},set:function(t){this.Tc=t}},originalFromNode:{get:function(){return this.eb},set:function(t){this.eb=t}},originalFromPort:{get:function(){return this.Cc},set:function(t){this.Cc=t}},originalToNode:{get:function(){return this.Od},set:function(t){this.Od=t}},originalToPort:{get:function(){return this.Wh},set:function(t){this.Wh=t}},isForwards:{get:function(){return this.Ka},set:function(t){this.Ka=t}},validPortsCache:{get:function(){return this.cz}},targetPort:{get:function(){return this.bx},set:function(t){this.bx=t}},linkValidation:{get:function(){return this.Ii},set:function(t){this.Ii=t}},portTargeted:{get:function(){return this.lr},set:function(t){this.lr=t}}}),un.className="LinkingBaseTool",f(gn,un),gn.prototype.canStart=function(){if(!this.isEnabled)return!1;var t=this.diagram;return!(t.isReadOnly||t.isModelReadOnly||!t.allowLink||!t.model.Ut()||!t.lastInput.left||t.currentTool!==this&&!this.isBeyondDragSize())&&null!==this.findLinkablePort()},gn.prototype.findLinkablePort=function(){var t=this.diagram,e=this.startObject;if(null===e&&(e=t.Vb(t.firstInput.documentPoint,null,null)),null===e)return null;if(t=e.part,!(t instanceof ec))return null;var i=this.direction;if(i===yn||i===mn){var n=this.findValidLinkablePort(e,!1);if(null!==n||this.startObject===t&&(n=t.port,this.findValidLinkablePort(n,!1)))return this.isForwards=!0,n}return(i===yn||i===vn)&&(e=this.findValidLinkablePort(e,!0),null!==e||this.startObject===t&&(e=t.port,this.findValidLinkablePort(e,!0)))?(this.isForwards=!1,e):null},gn.prototype.doActivate=function(){var t=this.diagram,e=this.findLinkablePort();null===e?this.stopTool():(this.va(this.name),t.isMouseCaptured=!0,t.currentCursor=this.linkingCursor,this.isForwards?(null===this.temporaryToNode||this.temporaryToNode.location.s()||(this.temporaryToNode.location=t.lastInput.documentPoint),this.originalFromPort=e,e=this.originalFromPort.part,e instanceof ec&&(this.originalFromNode=e),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(null===this.temporaryFromNode||this.temporaryFromNode.location.s()||(this.temporaryFromNode.location=t.lastInput.documentPoint),this.originalToPort=e,e=this.originalToPort.part,e instanceof ec&&(this.originalToNode=e),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),t.add(this.temporaryFromNode),t.add(this.temporaryToNode),null!==this.temporaryLink&&(null!==this.temporaryFromNode&&(this.temporaryLink.fromNode=this.temporaryFromNode),null!==this.temporaryToNode&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.Ua(),t.add(this.temporaryLink)),this.isActive=!0)},gn.prototype.doDeactivate=function(){this.isActive=!1;var t=this.diagram;t.remove(this.temporaryLink),t.remove(this.temporaryFromNode),t.remove(this.temporaryToNode),t.isMouseCaptured=!1,t.currentCursor="",this.Jg()},gn.prototype.doStop=function(){un.prototype.doStop.call(this),this.startObject=null},gn.prototype.doMouseUp=function(){var t=this.diagram;if(this.isActive){var e=this.transactionResult=null,i=null,n=null,o=null,r=null;try{var s=this.targetPort=this.findTargetPort(this.isForwards);if(null!==s){var a=s.part;a instanceof ec&&(this.isForwards?(null!==this.originalFromNode&&(e=this.originalFromNode,i=this.originalFromPort),n=a,o=s):(e=a,i=s,null!==this.originalToNode&&(n=this.originalToNode,o=this.originalToPort)))}else this.isForwards?null!==this.originalFromNode&&this.isUnconnectedLinkValid&&(e=this.originalFromNode,i=this.originalFromPort):null!==this.originalToNode&&this.isUnconnectedLinkValid&&(n=this.originalToNode,o=this.originalToPort);null!==e||null!==n?(r=this.insertLink(e,i,n,o),null!==r?(null===s&&(this.isForwards?r.defaultToPoint=t.lastInput.documentPoint.copy():r.defaultFromPoint=t.lastInput.documentPoint.copy()),t.allowSelect&&(t.R("ChangingSelection",t.selection),t.clearSelection(!0),r.isSelected=!0),this.transactionResult=this.name,t.R("LinkDrawn",r)):this.doNoLink(e,i,n,o)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),r&&t.allowSelect&&t.R("ChangedSelection",t.selection)}}},gn.prototype.isNewTreeLink=function(){var t=this.archetypeLinkData;if(null===t)return!0;if(t instanceof Nc)return t.isTreeLink;var e=this.diagram;return null===e||(t=e.partManager.getLinkCategoryForData(t),e=e.partManager.findLinkTemplateForCategory(t),null===e||e.isTreeLink)},gn.prototype.insertLink=function(t,e,i,n){return this.diagram.partManager.insertLink(t,e,i,n)},gn.prototype.doNoLink=function(){},d.Object.defineProperties(gn.prototype,{archetypeLinkData:{get:function(){return this.T},set:function(t){this.T=t}},archetypeLabelNodeData:{get:function(){return this.I},set:function(t){this.I=t}},direction:{get:function(){return this.K},set:function(t){this.K=t}},startObject:{get:function(){return this.en},set:function(t){this.en=t}}});var yn=new U(gn,"Either",0),mn=new U(gn,"ForwardsOnly",0),vn=new U(gn,"BackwardsOnly",0);function xn(){un.call(this),this.name="Relinking";var t=new Nl;t.figure="Diamond",t.desiredSize=Pt,t.fill="lightblue",t.stroke="dodgerblue",t.cursor=this.linkingCursor,t.segmentIndex=0,this.T=t,t=new Nl,t.figure="Diamond",t.desiredSize=Pt,t.fill="lightblue",t.stroke="dodgerblue",t.cursor=this.linkingCursor,t.segmentIndex=-1,this.en=t,this.I=null,this.Hx=new zt}function bn(t,e,i,n,o){null!==e?(t.copyPortProperties(e,i,t.temporaryFromNode,t.temporaryFromPort,!1),t.diagram.add(t.temporaryFromNode)):t.diagram.remove(t.temporaryFromNode),null!==n?(t.copyPortProperties(n,o,t.temporaryToNode,t.temporaryToPort,!0),t.diagram.add(t.temporaryToNode)):t.diagram.remove(t.temporaryToNode)}function wn(){ji.call(this),this.name="LinkReshaping";var t=new Nl;t.figure="Rectangle",t.desiredSize=St,t.fill="lightblue",t.stroke="dodgerblue",this.u=t,t=new Nl,t.figure="Diamond",t.desiredSize=Pt,t.fill="lightblue",t.stroke="dodgerblue",t.cursor="move",this.I=t,this.T=3,this.wu=this.l=null,this.Ix=new pt,this.Is=new et}function kn(t,e,i,n,o,r){return r?Math.abs(e.y-i.y)e.firstPickIndex+1&&i=i.x)e=0>=i.y?e+225:1<=i.y?e+135:e+180;else if(1<=i.x)0>=i.y?e+=315:1<=i.y&&(e+=45);else if(0>=i.y)e+=270;else{if(!(1<=i.y))break t;e+=90}0>e?e+=360:360<=e&&(e-=360),t.cursor=22.5>e?"e-resize":67.5>e?"se-resize":112.5>e?"s-resize":157.5>e?"sw-resize":202.5>e?"w-resize":247.5>e?"nw-resize":292.5>e?"n-resize":337.5>e?"ne-resize":"e-resize"}else if(t instanceof Uh)for(t=t.elements;t.next();)this.updateResizeHandles(t.value,e)},Cn.prototype.canStart=function(){if(!this.isEnabled)return!1;var t=this.diagram;return!(t.isReadOnly||!t.allowResize||!t.lastInput.left)&&null!==this.findToolHandleAt(t.firstInput.documentPoint,this.name)},Cn.prototype.doActivate=function(){var t=this.diagram;null===this.handle&&(this.handle=this.findToolHandleAt(t.firstInput.documentPoint,this.name)),null!==this.handle&&(this.adornedObject=this.handle.part.adornedObject,null!==this.adornedObject&&(t.isMouseCaptured=!0,t.animationManager.Bc(),this.va(this.name),this.Hs.set(this.adornedObject.da(this.handle.alignment.mw())),this.qp.set(this.adornedObject.part.location),this.Gx.set(this.adornedObject.desiredSize),this.Lu=this.computeCellSize(),this.Nu=this.computeMinSize(),this.Mu=this.computeMaxSize(),this.isActive=!0))},Cn.prototype.doDeactivate=function(){var t=this.diagram;this.Jg(),this.ie=this.handle=null,this.isActive=t.isMouseCaptured=!1},Cn.prototype.doCancel=function(){null!==this.adornedObject&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},Cn.prototype.doMouseMove=function(){var t=this.diagram;if(this.isActive){var e=this.Nu,i=this.Mu,n=this.Lu,o=this.adornedObject.Mt(t.lastInput.documentPoint,pt.alloc()),r=this.computeReshape();e=this.computeResize(o,this.handle.alignment,e,i,n,r),this.resize(e),t.hd(),pt.free(o)}},Cn.prototype.doMouseUp=function(){var t=this.diagram;if(this.isActive){var e=this.Nu,i=this.Mu,n=this.Lu,o=this.adornedObject.Mt(t.lastInput.documentPoint,pt.alloc()),r=this.computeReshape();e=this.computeResize(o,this.handle.alignment,e,i,n,r),this.resize(e),pt.free(o),t.Na(),this.transactionResult=this.name,t.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},Cn.prototype.resize=function(t){var e=this.diagram,i=this.adornedObject;if(null!==i){if(i.desiredSize=t.size,t=i.part,t.Ta(),i=i.da(this.handle.alignment.mw()),t instanceof bc){var n=new et;if(n.add(t),!this.dragsMembers&&null===t.placeholder){var o=new ea;o.dragsMembers=!1}e.moveParts(n,this.oppositePoint.copy().ge(i),!0,o)}else t.location=t.location.copy().ge(i).add(this.oppositePoint);e.hd()}},Cn.prototype.computeResize=function(t,e,i,n,o,r){e.nc()&&(e=ae);var s=this.adornedObject.naturalBounds,a=s.x,h=s.y,l=s.x+s.width,u=s.y+s.height,c=1;if(!r){c=s.width;var f=s.height;0>=c&&(c=1),0>=f&&(f=1),c=f/c}return f=pt.alloc(),_e.Gq(t.x,t.y,a,h,o.width,o.height,f),t=s.copy(),0>=e.x?0>=e.y?(t.x=Math.max(f.x,l-n.width),t.x=Math.min(t.x,l-i.width),t.width=Math.max(l-t.x,i.width),t.y=Math.max(f.y,u-n.height),t.y=Math.min(t.y,u-i.height),t.height=Math.max(u-t.y,i.height),r||(1<=t.height/t.width?(t.height=Math.max(Math.min(c*t.width,n.height),i.height),t.width=t.height/c):(t.width=Math.max(Math.min(t.height/c,n.width),i.width),t.height=c*t.width),t.x=l-t.width,t.y=u-t.height)):1<=e.y?(t.x=Math.max(f.x,l-n.width),t.x=Math.min(t.x,l-i.width),t.width=Math.max(l-t.x,i.width),t.height=Math.max(Math.min(f.y-h,n.height),i.height),r||(1<=t.height/t.width?(t.height=Math.max(Math.min(c*t.width,n.height),i.height),t.width=t.height/c):(t.width=Math.max(Math.min(t.height/c,n.width),i.width),t.height=c*t.width),t.x=l-t.width)):(t.x=Math.max(f.x,l-n.width),t.x=Math.min(t.x,l-i.width),t.width=l-t.x,r||(t.height=Math.max(Math.min(c*t.width,n.height),i.height),t.width=t.height/c,t.y=h+.5*(u-h-t.height))):1<=e.x?0>=e.y?(t.width=Math.max(Math.min(f.x-a,n.width),i.width),t.y=Math.max(f.y,u-n.height),t.y=Math.min(t.y,u-i.height),t.height=Math.max(u-t.y,i.height),r||(1<=t.height/t.width?(t.height=Math.max(Math.min(c*t.width,n.height),i.height),t.width=t.height/c):(t.width=Math.max(Math.min(t.height/c,n.width),i.width),t.height=c*t.width),t.y=u-t.height)):1<=e.y?(t.width=Math.max(Math.min(f.x-a,n.width),i.width),t.height=Math.max(Math.min(f.y-h,n.height),i.height),r||(1<=t.height/t.width?(t.height=Math.max(Math.min(c*t.width,n.height),i.height),t.width=t.height/c):(t.width=Math.max(Math.min(t.height/c,n.width),i.width),t.height=c*t.width))):(t.width=Math.max(Math.min(f.x-a,n.width),i.width),r||(t.height=Math.max(Math.min(c*t.width,n.height),i.height),t.width=t.height/c,t.y=h+.5*(u-h-t.height))):0>=e.y?(t.y=Math.max(f.y,u-n.height),t.y=Math.min(t.y,u-i.height),t.height=u-t.y,r||(t.width=Math.max(Math.min(t.height/c,n.width),i.width),t.height=c*t.width,t.x=a+.5*(l-a-t.width))):1<=e.y&&(t.height=Math.max(Math.min(f.y-h,n.height),i.height),r||(t.width=Math.max(Math.min(t.height/c,n.width),i.width),t.height=c*t.width,t.x=a+.5*(l-a-t.width))),pt.free(f),t},Cn.prototype.computeReshape=function(){var t=qs;return this.adornedObject instanceof Nl&&(t=Tl(this.adornedObject)),!(t===Us||this.diagram.lastInput.shift)},Cn.prototype.computeMinSize=function(){var t=this.adornedObject.minSize.copy(),e=this.minSize;return!isNaN(e.width)&&e.width>t.width&&(t.width=e.width),!isNaN(e.height)&&e.height>t.height&&(t.height=e.height),t},Cn.prototype.computeMaxSize=function(){var t=this.adornedObject.maxSize.copy(),e=this.maxSize;return!isNaN(e.width)&&e.widthi?i+=360:360<=i&&(i-=360),i=Math.round(45*Math.round(i/45));var n=this.handleDistance;return 0===i?e.x=t.naturalBounds.width+n:45===i?(e.x=t.naturalBounds.width+n,e.y=t.naturalBounds.height+n):90===i?e.y=t.naturalBounds.height+n:135===i?(e.x=-n,e.y=t.naturalBounds.height+n):180===i?e.x=-n:225===i?(e.x=-n,e.y=-n):270===i?e.y=-n:315===i&&(e.x=t.naturalBounds.width+n,e.y=-n),t.da(e)},Tn.prototype.doDeactivate=function(){var t=this.diagram;this.Jg(),this.ie=this.handle=null,this.Ps=new pt(NaN,NaN),this.isActive=t.isMouseCaptured=!1},Tn.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Tn.prototype.doMouseMove=function(){var t=this.diagram;this.isActive&&(t=this.computeRotate(t.lastInput.documentPoint),this.rotate(t))},Tn.prototype.doMouseUp=function(){var t=this.diagram;if(this.isActive){t.delaysLayout=!1;var e=this.computeRotate(t.lastInput.documentPoint);this.rotate(e),t.Na(),this.transactionResult=this.name,t.R("PartRotated",this.adornedObject,this.originalAngle)}this.stopTool()},Tn.prototype.rotate=function(t){var e=this.adornedObject;if(null!==e){e.angle=t,e=e.part,e.Ta();var i=e.locationObject,n=e.rotateObject;(i===n||i.Gg(n))&&(i=this.qp.copy(),e.location=i.ge(this.rotationPoint).rotate(t-this.originalAngle).add(this.rotationPoint)),this.diagram.hd()}},Tn.prototype.computeRotate=function(t){t=this.rotationPoint.Pa(t)-this.handleAngle;var e=this.adornedObject.panel;null!==e&&(t-=e.lj()),360<=t?t-=360:0>t&&(t+=360),e=Math.min(Math.abs(this.snapAngleMultiple),180);var i=Math.min(Math.abs(this.snapAngleEpsilon),e/2);return!this.diagram.lastInput.shift&&0e-i&&(t=(Math.floor(t/e)+1)*e)),360<=t?t-=360:0>t&&(t+=360),t},d.Object.defineProperties(Tn.prototype,{handleArchetype:{get:function(){return this.u},set:function(t){this.u=t}},handle:{get:function(){return this.l},set:function(t){if(null!==t&&!(t.part instanceof Qu))throw Error("new handle is not in an Adornment: "+t);this.l=t}},adornedObject:{get:function(){return this.ie},set:function(t){if(null!==t&&t.part instanceof Qu)throw Error("new handle must not be in an Adornment: "+t);this.ie=t}},snapAngleMultiple:{get:function(){return this.La},set:function(t){this.La=t}},snapAngleEpsilon:{get:function(){return this.Ka},set:function(t){this.Ka=t}},originalAngle:{get:function(){return this.Fx}},rotationPoint:{get:function(){return this.Ps},set:function(t){this.Ps=t.copy()}},handleAngle:{get:function(){return this.I},set:function(t){this.I=t}},handleDistance:{get:function(){return this.T},set:function(t){this.T=t}}}),Tn.className="RotatingTool",I("rotatingTool",(function(){return this.findTool("Rotating")}),(function(t){this.Ya("Rotating",t,this.mouseDownTools)})),f(An,ji),An.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},An.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},An.className="ClickSelectingTool",f(Ln,ji),Ln.prototype.canStart=function(){if(!this.isEnabled)return!1;var t=this.diagram,e=t.lastInput,i=t.Vb(e.documentPoint,(function(t){for(;null!==t.panel&&!t.isActionable;)t=t.panel;return t}));return null!==i&&(!!i.isActionable&&(this.Xk=i,t.Ej=t.Vb(e.documentPoint,null,null),!0))},Ln.prototype.doMouseDown=function(){if(this.isActive){var t=this.diagram.lastInput,e=this.Xk;null!==e&&(t.targetObject=e,null!==e.actionDown&&e.actionDown(t,e))}else this.canStart()&&this.doActivate()},Ln.prototype.doMouseMove=function(){if(this.isActive){var t=this.diagram.lastInput,e=this.Xk;null!==e&&(t.targetObject=e,null!==e.actionMove&&e.actionMove(t,e))}},Ln.prototype.doMouseUp=function(){if(this.isActive){var t=this.diagram.lastInput,e=this.Xk;if(null===e)return;t.targetObject=e,null!==e.actionUp&&e.actionUp(t,e),this.standardMouseClick((function(t){for(;null!==t.panel&&(!t.isActionable||t!==e);)t=t.panel;return t}),(function(t){return t===e}))}this.stopTool()},Ln.prototype.doCancel=function(){var t=this.diagram.lastInput,e=this.Xk;null!==e&&(t.targetObject=e,null!==e.actionCancel&&e.actionCancel(t,e),this.stopTool())},Ln.prototype.doStop=function(){this.Xk=null},Ln.className="ActionTool",f(jn,ji),jn.prototype.canStart=function(){if(!this.isEnabled||null===this.archetypeNodeData)return!1;var t=this.diagram;if(t.isReadOnly||t.isModelReadOnly||!t.allowInsert||!t.lastInput.left||this.isBeyondDragSize())return!1;if(this.isDoubleClick){if(1===t.lastInput.clickCount&&(this.xx=t.lastInput.viewPoint.copy()),2!==t.lastInput.clickCount||this.isBeyondDragSize(this.xx))return!1}else if(1!==t.lastInput.clickCount)return!1;return t.currentTool===this||null===t.zm(t.lastInput.documentPoint,!0)},jn.prototype.doMouseUp=function(){var t=this.diagram;this.isActive&&this.insertPart(t.lastInput.documentPoint),this.stopTool()},jn.prototype.insertPart=function(t){var e=this.diagram,i=this.archetypeNodeData;if(null===i)return null;var n=null;try{if(e.R("ChangingSelection",e.selection),this.va(this.name),i instanceof Lu)i.Nc()&&(ul(i),n=i.copy(),null!==n&&e.add(n));else if(null!==i){var o=e.model.copyNodeData(i);N(o)&&(e.model.uf(o),n=e.zc(o))}if(null!==n){var r=pt.allocAt(t.x,t.y);this.isGridSnapEnabled&&Rr(this.diagram,n,t,r),n.location=r,e.allowSelect&&(e.clearSelection(!0),n.isSelected=!0),pt.free(r)}e.Na(),this.transactionResult=this.name,e.R("PartCreated",n)}finally{this.Jg(),e.R("ChangedSelection",e.selection)}return n},d.Object.defineProperties(jn.prototype,{archetypeNodeData:{get:function(){return this.Aj},set:function(t){this.Aj=t}},isDoubleClick:{get:function(){return this.u},set:function(t){this.u=t}},isGridSnapEnabled:{get:function(){return this.l},set:function(t){this.l=t}}}),jn.className="ClickCreatingTool",f(On,ji),On.prototype.canStart=function(){if(!this.isEnabled)return!1;var t=this.diagram;if(!t.allowSelect)return!1;var e=t.lastInput;return!(!e.left||t.currentTool!==this&&(!this.isBeyondDragSize()||e.timestamp-t.firstInput.timestampo.right&&(i.x-=n.width+5/e.scale),i.xo.bottom&&(i.y-=n.height+5/e.scale),i.yt.lastInput.clickCount))},Kn.prototype.doStart=function(){ho=this,null!==this.textBlock&&this.doActivate()},Kn.prototype.doActivate=function(){if(!this.isActive){var t=this.diagram;if(null!==t){var e=this.textBlock;if(null===e&&(e=t.Vb(t.lastInput.documentPoint)),null!==e&&e instanceof Il&&(this.textBlock=e,null!==e.part)){this.isActive=!0,this.ia=no;var i=this.defaultTextEditor;null!==e.textEditor&&(i=e.textEditor),this.zh=this.textBlock.copy();var n=new zt(this.textBlock.da(ne),this.textBlock.da(ce));t.Aw(n),i.show(e,t,this),this.currentTextEditor=i}}}},Kn.prototype.doCancel=function(){this.stopTool()},Kn.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},Kn.prototype.doMouseDown=function(){this.isActive&&this.acceptText($n)},Kn.prototype.acceptText=function(t){switch(t){case $n:this.ia===ao?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():this.ia!==no&&this.ia!==so&&this.ia!==oo||(this.ia=ro,_n(this));break;case Wn:case Zn:case Jn:Zn===t&&!0===this.textBlock.isMultiline||this.ia!==no&&this.ia!==so&&this.ia!==oo||(this.ia=ro,_n(this))}},Kn.prototype.doError=function(t,e){var i=this.textBlock;null!==i.errorFunction&&i.errorFunction(this,t,e),(t=this.currentTextEditor)&&t.show(i,this.diagram,this)},Kn.prototype.doSuccess=function(t,e){var i=this.textBlock;null!==i.textEdited&&i.textEdited(i,t,e)},Kn.prototype.doDeactivate=function(){var t=this.diagram;null!==t&&(this.ia=io,this.textBlock=null,null!==this.currentTextEditor&&this.currentTextEditor.hide(t,this),this.isActive=!1)},Kn.prototype.doStop=function(){ho=null},Kn.prototype.isValidText=function(t,e,i){var n=this.textValidation;return!(null!==n&&!n(t,e,i))&&(n=t.textValidation,!(null!==n&&!n(t,e,i)))},Kn.prototype.Jy=function(t){var e=this.zh;return e.text=t,e.measure(this.textBlock.Ei,1/0),e},d.Object.defineProperties(Kn.prototype,{textBlock:{get:function(){return this.La},set:function(t){this.La=t}},currentTextEditor:{get:function(){return this.u},set:function(t){this.u=t}},defaultTextEditor:{get:function(){return this.l},set:function(t){this.l=t}},starting:{get:function(){return this.Ka},set:function(t){this.Ka=t}},textValidation:{get:function(){return this.Wi},set:function(t){this.Wi=t}},minimumEditorScale:{get:function(){return this.I},set:function(t){this.I=t}},selectsTextOnActivate:{get:function(){return this.T},set:function(t){this.T=t}},state:{get:function(){return this.ia},set:function(t){this.ia!==t&&(this.ia=t)}}}),Kn.prototype.measureTemporaryTextBlock=Kn.prototype.Jy;var Wn=new U(Kn,"LostFocus",0),$n=new U(Kn,"MouseDown",1),Jn=new U(Kn,"Tab",2),Zn=new U(Kn,"Enter",3),Qn=new U(Kn,"SingleClick",0),to=new U(Kn,"SingleClickSelected",1),eo=new U(Kn,"DoubleClick",2),io=new U(Kn,"StateNone",0),no=new U(Kn,"StateActive",1),oo=new U(Kn,"StateEditing",2),ro=new U(Kn,"StateValidating",3),so=new U(Kn,"StateInvalid",4),ao=new U(Kn,"StateValidated",5),ho=null;function lo(){So||(ko(),So=!0),this.C=fs,this.zl=this.ef=this.sc=this.ps=this.jc=!1,this.Qx=!0,this.Al=Po,this.tn=!1,this.zi=this.md=!0,this.Yg=600,this.ox=this.Px=!1,this.Re=new nt,this.Rd=new To,this.Rd.Uc=this,this.yj=new nt,this.tv=new nt,this.ot=new nt,this.$l=new nt}function uo(t,e){co(t,e)&&(t.ef=!0)}function co(t,e){return!(!t.md||!t.canStart(e))&&(t.Re.add(e),t.defaultAnimation.isAnimating&&t.Bc(),t.sc=!0)}function fo(t){if(t.md&&t.sc){var e=t.Rd,i=t.C,n=t.Re.contains("Model");n&&(t.zl=!0,t.Al===Po?(e.isViewportUnconstrained=!0,e.lc.clear(),e.add(i,"position",i.position.copy().offset(0,-200),i.position),e.add(i,"opacity",0,1)):t.Al===Co&&e.lc.clear(),t.Qx=!(t.Al!==No||!i.Ts.w(i.la)),i.R("InitialAnimationStarting",t)),n&&!t.zi||0===e.lc.count?(t.Re.clear(),t.sc=!1,t.ef=!1,e.lc.clear(),Ao(e,i),t.zl=!1,i.M()):(t.Re.clear(),i.Ee=!1,n=e.lc.get(i),i.autoScale!==xs&&null!==n&&(delete n.start.scale,delete n.end.scale),y.requestAnimationFrame((function(){!1===t.sc||e.jc||(i.Ke("temporaryPixelRatio")&&Jo(i),Qo(i),t.sc=!1,t.ef=!1,e.start(),mo(t),i.Na(),Do(e,0),kr(i,!0),vo(t),i.R("AnimationStarting",t))})))}}function po(t,e,i,n){t.isTicking||e instanceof Nc&&(null!==e.fromNode||null!==e.toNode)||t.Rd.add(e,"position",i,n,!1)}function go(t,e){function i(){if(0r?r+=360:h+=360),r=o(i,r,h-r,n)%360,s=o(i,s,l-s,n),a=o(i,a,u-a,n),i=o(i,t,e-t,n),"hsla("+r+", "+s+"%, "+a+"%, "+i+")"}function ko(){function t(t,e,i,n,o,r){t.position=new pt(n(o,e.x,i.x-e.x,r),n(o,e.y,i.y-e.y,r))}var e=new dt;e.add("position:diagram",t),e.add("position",t),e.add("position:part",(function(t,e,i,n,o,r){ot&&M(t,">= 1",lo,"duration"),this.Yg=t}},isAnimating:{get:function(){return this.jc}},isTicking:{get:function(){return this.ps}},isInitial:{get:function(){return this.zi},set:function(t){this.zi=t}},defaultAnimation:{get:function(){return this.Rd}},activeAnimations:{get:function(){return this.yj}},initialAnimationStyle:{get:function(){return this.Al},set:function(t){this.Al=t}}}),lo.prototype.stopAnimation=lo.prototype.Bc;var Mo=null,So=!1,Po=new U(lo,"Default",1),No=new U(lo,"AnimateLocations",2),Co=new U(lo,"None",3);function To(){this.xv=this.Ox=this.Uc=this.C=null,this.Il=this.jc=this.l=!1,this.Zn=this.Dd=0,this.Ir=this.Ku=Fo,this.Hl=this.Fp=!1,this.nv=1,this.mv=0,this.vd=this.Yg=NaN,this.tx=0,this.$n=null,this.u=At,this.lc=new dt,this.iv=new dt,this.qm=new nt,this.jv=new nt,this.px=Ts}function Ao(t,e){if(t.iv.clear(),t.Hl=!1,t.mv=0,t.vd=NaN,0t.Zn?t.vd:n-t.Dd;e&&(o=t.tx,ot.Zn&&(t.Fp&&!t.Hl?(t.Dd=+new Date,t.Zn=t.Dd+t.vd,t.Hl=!0):t.xm(!1))}}}function Do(t,e){for(var i=t.vd,n=t.lc.iterator,o=t.Hl;n.next();){var r=n.key;if(!(r instanceof ca&&null===r.diagram)){var s=n.value,a=o?s.end:s.start;s=o?s.start:s.end;var h,l=Mo;for(h in s)"position"===h&&(s["position:placeholder"]||s["position:nodeCollapse"])||null===l.get(h)||l.get(h)(r,a[h],s[h],t.Ir,e,i,t)}}}function Fo(t,e,i,n){return t/=n/2,1>t?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e}function Bo(t,e,i,n){return t===n?e+i:i*(1-Math.pow(2,-10*t/n))+e}function Io(t,e,i){this.start=t,this.end=e,this.Qv={},this.Kv=i,this.sw=!1}function Eo(t,e,i){this.pd=null,this.gf=t,this.cq=i||zo,this.bl=null,void 0!==e&&(this.bl=e,void 0===i&&(this.cq=Vo))}function Ro(t,e){t=t.bl,null!==t&&(t.duration&&(e.duration=t.duration),t.finished&&(e.finished=t.finished),t.easing&&(e.easing=t.easing))}lo.className="AnimationManager",lo.defineAnimationEffect=function(t,e){So||(ko(),So=!0),Mo.add(t,e)},lo.Default=Po,lo.AnimateLocations=No,lo.None=Co,To.prototype.suspend=function(){this.Il=!0},To.prototype.advanceTo=function(t,e){e&&(this.Il=!1),this.Fp&&t>=this.vd&&(this.Hl=!0,t-=this.vd),this.tx=t,Oo(this,!0),mo(this.Uc),kr(this.C),vo(this.Uc),this.C.redraw()},i=To.prototype,i.start=function(){if(0!==this.lc.count&&!this.jc){for(var t=this.C,e=this.lc.iterator;e.next();){var i=e.value.end,n=e.key;if(i["position:placeholder"]){var o=n.findVisibleNode();if(o instanceof bc&&null!==o.placeholder){var r=o.placeholder;o=r.da(ne),r=r.padding,o.x+=r.left,o.y+=r.top,i["position:placeholder"]=o}}null===t&&(n instanceof Ko?t=n:n instanceof ca&&(t=n.diagram))}null!==t&&(this.C=t,e=this.Uc=t.animationManager,!1!==e.isEnabled&&(this.vd=isNaN(this.Yg)?e.duration:this.Yg,this.Ir=this.Ku,e.zl&&e.Al===Po&&this===e.defaultAnimation&&(this.Ir=Bo,this.vd=isNaN(this.Yg)?600===e.duration?900:e.duration:this.Yg),this.px=t.scrollMode,this.isViewportUnconstrained&&(t.Ti=As),mo(e),this.qm.each((function(e){e.data=null,t.add(e)})),vo(e),this.jc=!0,this.Dd=+new Date,this.Zn=this.Dd+this.vd,go(e,this)))}},i.sz=function(t,e){t.Nc()&&(this.qm.add(t),this.C=e)},i.add=function(t,e,i,n,o){if("position"!==e||!i.w(n)){if(null===this.C&&(t instanceof Ko?this.C=t:t instanceof ca&&null!==t.diagram&&(this.C=t.diagram)),t instanceof Lu){if(!t.isAnimated)return;"position"===e&&(e="position:part")}Lo(this,t,e,i,n,o)}},i.cu=function(t){return!!this.jc&&(t=this.lc.G(t),null!==t&&t.sw)},i.ew=function(t){return!!this.jc&&(t=this.lc.G(t),null!==t&&(t.start.position||t.start.location))},i.stop=function(){this.jc&&this.xm(!0)},i.xm=function(t){if(null!==this.xv&&this.xv.Mp.remove(this.Ox),this.jc){var e=this.C,i=this.Uc;this.Il=this.jc=i.zl=!1,mo(i);for(var n=this.lc,o=this.qm.iterator;o.next();)e.remove(o.value);for(o=this.jv.iterator;o.next();)o.value.o();o=this.Fp,n=n.iterator;for(var r=Mo;n.next();){var s,a=n.key,h=n.value,l=o?h.end:h.start,u=o?h.start:h.end,c=h.Qv;for(s in u)if(null!==r.get(s)){var f=s;!h.Kv||"position:nodeCollapse"!==f&&"position:placeholder"!==f||(f="position"),r.get(f)(a,l[s],void 0!==c[s]?c[s]:h.Kv?l[s]:u[s],this.Ir,this.vd,this.vd,this)}h.Kv&&void 0!==c.location&&a instanceof Lu&&(a.location=c.location),h.sw&&a instanceof Lu&&a.Ob(!1)}if(e.Yt.clear(),Zo(e,!1),e.Na(),e.M(),kr(e,!0),i.defaultAnimation===this){for(s=i.$l.iterator;s.next();)o=s.value,null!==o.jf&&(o.points=o.jf,o.jf=null);i.$l.clear()}this.isViewportUnconstrained&&(e.scrollMode=this.px),vo(i),this.mv++,!t&&this.nv>this.mv?(this.Hl=!1,this.start()):(this.$n&&this.$n(this),Ao(this,null),i.xm(this),e.Db())}},i.lk=function(t,e){var i=e.actualBounds,n=null;if(e instanceof bc&&(n=e.placeholder),null!==n?(i=n.da(ne),n=n.padding,i.x+=n.left,i.y+=n.top,this.add(t,"position",i,t.position,!1)):this.add(t,"position",new pt(i.x+i.width/2,i.y+i.height/2),t.position,!1),this.add(t,"scale",.01,t.scale,!1),t instanceof bc)for(t=t.memberParts;t.next();)n=t.value,n instanceof ec&&this.lk(n,e)},i.jk=function(t,e){if(t.isVisible()){var i=null;if(e instanceof bc&&(i=e.placeholder),null!==i?this.add(t,"position:placeholder",t.position,i,!0):this.add(t,"position:nodeCollapse",t.position,e,!0),this.add(t,"scale",t.scale,.01,!0),i=this.lc,i.contains(t)&&(i.G(t).sw=!0),t instanceof bc)for(t=t.memberParts;t.next();)i=t.value,i instanceof ec&&this.jk(i,e)}},i.pA=function(t){var e=this.iv.get(t);return null===e&&(e={},this.iv.add(t,e)),e},d.Object.defineProperties(To.prototype,{duration:{get:function(){return this.Yg},set:function(t){1>t&&M(t,">= 1",To,"duration"),this.Yg=t}},reversible:{get:function(){return this.Fp},set:function(t){this.Fp=t}},runCount:{get:function(){return this.nv},set:function(t){0n&&a.containingGroup===i&&(n=s,0<=e))break}!(0>n)&&n=o)return e;if(0>e&&(e=t.indexOf(i)),0>e)return-1;for(var r=e-1,s=NaN;0<=r;){if(s=t.J(r).zOrder,!isNaN(s))break;r--}for(var a=e+1,h=NaN;an)for(;;){if(-1===r||s<=n){if(r++,r===e)break;return t.cb(e),t.wb(r,i),r}for(s=NaN;0<=--r&&(s=t.J(r).zOrder,isNaN(s)););}else if(!isNaN(h)&&h=n){if(a--,a===e)break;return t.cb(e),t.wb(a,i),a}for(h=NaN;++ai&&(e=i),et.maxScale&&(e=t.maxScale),e):e===ws?(e=h>a?(s-t.rb)/n:(r-t.rb)/o,e>i&&(e=i),et.maxScale&&(e=t.maxScale),e):t.scale}function ar(t,e,i,n,o,r){var s=pt.allocAt(t.la.x,t.la.y),a=s.x,h=s.y;if(null!==t.ao){var l=pt.alloc();l=t.ao.da(ne,l),a=l.x-t.bo.x/t.scale,h=l.y-t.bo.y/t.scale,o=ie,pt.free(l)}(r||t.scrollMode===Ts)&&(o.kb()&&(i>e.width&&(a=e.x+(o.x*e.width+o.offsetX)-(o.x*i-o.offsetX)),n>e.height&&(h=e.y+(o.y*e.height+o.offsetY)-(o.y*n-o.offsetY))),o=t.Si,r=i-e.width,ie.left?a=e.left:ae.top?h=e.top:he.targetTouches.length)return;e=e.targetTouches[i]}else{if(null===t.bk[0])return;e=t.bk[i]}i=t.wa,null!==i&&(i=i.getBoundingClientRect(),n.h(e.clientX-t.ya/i.width*i.left,e.clientY-t.xa/i.height*i.top))}function br(t){t.ac||Sr(t),t.Ta()}function wr(t,e,i){t.animationManager.defaultAnimation.isAnimating||t.Sb||!t.wi||Dr(t)||(e&&Sr(t),i&&rr(t,!1))}function kr(t,e){if(!t.ac&&(t.Ee=!1,null!==t.Fa||t.sm.s())){t.ac=!0;var i=t.animationManager,n=t.Wl;if(!i.isAnimating&&0!==n.length){for(var o=n.j,r=o.length,s=0;se;e++){var i=t.wd.iterator;if(null===i||0===t.wd.count)break;t.wd=new nt,t.Vw(i,t.wd)}t.nodes.each((function(t){t instanceof bc&&0!==(65536&t.P)!==!1&&(t.P=65536^t.P)}))}}function Pr(t,e){for(var i=j(),n=j(),o=e.memberParts;o.next();){var r=o.value;r.isVisible()&&(r instanceof bc?(La(r)||Oa(r)||Yu(r))&&Pr(t,r):r instanceof Nc?r.fromNode===e||r.toNode===e?n.push(r):i.push(r):(r.measure(1/0,1/0),r.arrange()))}for(t=i.length,o=0;oi&&(d=v.left,p=v.right),f.height>m&&(g=v.top,y=v.bottom)):(d=v.left,p=v.right,g=v.top,y=v.bottom),v=f.width+d+p;var x=f.height+g+y;d=f.x-d;var b=c.x;p=f.right+p;var w=c.right+a;g=f.y-g;var k=c.y;f=f.bottom+y,c=c.bottom+h;var M="1px",S="1px";if(y=t.scale,l=v>l/y,u=x>u/y,t.scrollMode===Ts&&(l||u)&&(l&&t.hasHorizontalScrollbar&&t.allowHorizontalScroll&&(l=1,d+1w+1&&(l=Math.max((p-w)*y+t.ya,l)),i+a+1c+1&&(l=Math.max((f-c)*y+t.xa,l)),m+h+1w+1&&(a=Math.max((p-w)*y+t.ya,a)),i+1c+1&&(h=Math.max((f-c)*y+a,h)),m+1w+1&&(h=t.position.x*y)),t.Gl)switch(t.Ss){case"negative":h=-(e.scrollWidth-h-e.clientWidth);break;case"reverse":h=e.scrollWidth-h-e.clientWidth}return e.scrollLeft=h,t.hasVerticalScrollbar&&t.allowVerticalScroll&&(m+1c+1&&(e.scrollTop=t.position.y*y)),l=t.ya,u=t.xa,e.style.width=l+(t.Ye?t.rb:0)+"px",e.style.height=u+(t.pe?t.rb:0)+"px",n===l&&o===u&&!t.animationManager.sc||(t.onViewportBoundsChanged(r,t.viewportBounds,y,s),!1)}function Fr(t,e,i){var n=e.layer;null!==n&&n.diagram===t&&(e.isSelected=!1,e.isHighlighted=!1,e.B(2),i&&e.uk(),i=n.Lc(-1,e,!1),0<=i&&t.Va(Ci,"parts",n,e,null,i,null),t=e.layerChanged,null!==t&&t(e,n,null))}function Br(t,e,i,n,o,r){if(!e.contains(i)&&(void 0===r&&(r=!1),!n||r||i.canMove()||i.canCopy()))if(void 0===o&&(o=Er(t)),i instanceof ec){if(e.add(i,t.Cd(o,i,i.location)),i instanceof bc&&(null!==i.placeholder||o.dragsMembers))for(r=i.memberParts;r.next();)Br(t,e,r.value,n,o,o.groupsAlwaysMove);for(r=i.linksConnected;r.next();){var s=r.value;if(!e.contains(s)){var a=s.fromNode,h=s.toNode;null!==a&&e.contains(a)&&null!==h&&e.contains(h)&&Br(t,e,s,n,o)}}if(o.dragsTree)for(i=i.Wv();i.next();)Br(t,e,i.value,n,o)}else if(i instanceof Nc)for(e.add(i,t.Cd(o,i)),i=i.labelNodes;i.next();)Br(t,e,i.value,n,o);else i instanceof Qu||e.add(i,t.Cd(o,i,i.location))}function Ir(t,e,i,n,o){if(null!==e&&0!==e.count){var r=pt.alloc(),s=pt.alloc();s.assign(i),isNaN(s.x)&&(s.x=0),isNaN(s.y)&&(s.y=0),(i=t.fq)||zr(t,e);for(var a=j(),h=j(),l=e.iterator,u=pt.alloc();l.next();){var c=l.key,f=l.value;if(c.Nc()){var d=Gr(t,c,e);null!==d?a.push(new ta(c,f,d)):o&&!c.canMove()||(d=f.point,r.assign(d),t.computeMove(c,r.add(s),n,u),c.location=u,void 0===f.shifted&&(f.shifted=new pt),f.shifted.assign(u.ge(d)))}else l.key instanceof Nc&&h.push(l.ka)}for(pt.free(u),o=a.length,l=0;lt.maxScale&&(i=t.maxScale),r=pt.allocAt(t.la.x+a/e-a/i,t.la.y+h/e-h/i),t.position=r,pt.free(r),t.Aa=i,t.onViewportBoundsChanged(o,t.viewportBounds,e,!1),t.Sb=!1,rr(t,!1),n.ef&&n.Rd.add(n.C,"scale",e,t.Aa),t.M(),Ar(t)}}function qr(t,e){void 0===e&&(e=null);var i=t.Ib;if(null!==i&&i.visible){for(var n=Bt.alloc(),o=1,r=1,s=i.W.j,a=s.length,h=0;hu||(Wh(l.figure)?r=r*u/_e.uy(r,u):o=o*u/_e.uy(o,u))}if(s=i.gridCellSize,n.h(r*s.width,o*s.height),null!==e)o=e.width,r=e.height,t=e.x,s=e.y;else{if(e=zt.alloc(),t=t.viewportBounds,e.h(t.x,t.y,t.width,t.height),!e.s())return void zt.free(e);o=e.width,r=e.height,t=e.x,s=e.y,zt.free(e)}i.width=o+2*n.width,i.height=r+2*n.height,e=pt.alloc(),_e.Gq(t,s,0,0,n.width,n.height,e),e.offset(-n.width,-n.height),Bt.free(n),i.part.location=e,pt.free(e)}}function Ur(t){var e=t.isModified;t.zv!==e&&(t.zv=e,t.R("Modified"))}function Kr(t){return t=ds.get(t),null!==t?new t:new vd}function Hr(t,e){e=e.W.j;for(var i=e.length,n=0;n=n&&!r.defaultAnimation.isAnimating&&!r.sc&&(e||uo(r,"Layout")),t.Ng=!1;for(var s=t.Dh.iterator;s.next();)ts(t,s.value,e,n);o.isValidLayout||(!e||o.isRealtime||null===o.isRealtime||0===n?(o.doLayout(t),Sr(t),o.isValidLayout=!0):t.Ng=!0)}finally{e=t.undoManager.isInternalTransaction,0===n&&(t.Xa("Layout"),t.undoManager.isInternalTransaction=!1),!e||0!==n&&1!==n||fo(r),t.Z=i}}}function ts(t,e,i,n){if(null!==e){for(var o=e.Sl.iterator;o.next();)ts(t,o.value,i,n);o=e.layout,null===o||o.isValidLayout||(!i||o.isRealtime||0===n?(e.Rh=!e.location.s(),o.doLayout(e),e.B(32),Pr(t,e),o.isValidLayout=!0):t.Ng=!0)}}function es(t){function e(t){var e=t.toLowerCase(),o=new et;i.add(t,o),i.add(e,o),n.add(t,t),n.add(e,t)}var i=new dt,n=new dt;e("InitialAnimationStarting"),e("AnimationStarting"),e("AnimationFinished"),e("BackgroundSingleClicked"),e("BackgroundDoubleClicked"),e("BackgroundContextClicked"),e("ClipboardChanged"),e("ClipboardPasted"),e("DocumentBoundsChanged"),e("ExternalObjectsDropped"),e("GainedFocus"),e("InitialLayoutCompleted"),e("LayoutCompleted"),e("LinkDrawn"),e("LinkRelinked"),e("LinkReshaped"),e("LostFocus"),e("Modified"),e("ObjectSingleClicked"),e("ObjectDoubleClicked"),e("ObjectContextClicked"),e("PartCreated"),e("PartResized"),e("PartRotated"),e("SelectionMoved"),e("SelectionCopied"),e("SelectionDeleting"),e("SelectionDeleted"),e("SelectionGrouped"),e("SelectionUngrouped"),e("ChangingSelection"),e("ChangedSelection"),e("SubGraphCollapsed"),e("SubGraphExpanded"),e("TextEdited"),e("TreeCollapsed"),e("TreeExpanded"),e("ViewportBoundsChanged"),e("InvalidateDraw"),t.Qr=i,t.Pr=n}function is(t,e){var i=t.Pr.G(e);return null!==i?i:t.Pr.G(e.toLowerCase())}function ns(t,e){var i=t.Qr.G(e);return null!==i?i:(i=t.Qr.G(e.toLowerCase()),null!==i?i:void w("Unknown DiagramEvent name: "+e))}function os(t){if(t.animationManager.isTicking)return!1;var e=t.currentTool;return e!==t.toolManager.findTool("Dragging")||(!t.fq||e.isComplexRoutingRealtime)}function rs(t,e,i,n){if(null===t.Gc&&(t.Gc=new bf),t.Gc.Rt||t.Gc.group!==i||t.Gc.Vy!==n){if(null!==i&&(i=ss(t,i)),null===i){e=t.computeOccupiedArea(),e.Jc(100,100),t.Gc.initialize(e),e=zt.alloc();for(var o=t.nodes;o.next();){var r=o.value,s=r.layer;null!==s&&s.visible&&!s.isTemporary&&as(t,r,n,e)}zt.free(e)}else{for(0h?e(i,o,a):y.requestAnimationFrame(n)}for(var o=i.callback,r=!0,s=t.pg.iterator;s.next();)if(!s.value[0].Ol){r=!1;break}if("function"!==typeof o||r)return e(i,o,t);var a=t,h=i.callbackTimeout||300,l=+new Date;return y.requestAnimationFrame((function(){n()})),null}function cs(t,e,i,n){if(t.animationManager.Bc(),t.hd(),null===t.wa)return null;"object"!==typeof e&&w("properties argument must be an Object.");var o=e.size||null,r=e.scale||null;void 0!==e.scale&&isNaN(e.scale)&&(r="NaN");var s=e.maxSize;void 0===e.maxSize&&(s="SVG"===i?new Bt(1/0,1/0):new Bt(2e3,2e3));var a=e.position||null,h=e.parts||null,l=void 0===e.padding?1:e.padding,u=e.background||null,c=e.omitTemporary;void 0===c&&(c=!0);var f=e.document||document,d=e.elementFinished||null,p=e.showTemporary;void 0===p&&(p=!c),e=e.showGrid,void 0===e&&(e=p),null!==o&&isNaN(o.width)&&isNaN(o.height)&&(o=null),"number"===typeof l?l=new Qt(l):l instanceof Qt||w("MakeImage padding must be a Margin or a number."),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),t.Gb.uc(!0),c=new Ja(null,f);var g=c.context;if(!(o||r||h||a))return c.width=t.ya+Math.ceil(l.left+l.right),c.height=t.xa+Math.ceil(l.top+l.bottom),"SVG"===i?null===n?null:(n.resize(c.width,c.height,c.width,c.height),n.ownerDocument=f,n.Dq=d,Nr(t,n.context,l,new Bt(c.width,c.height),t.Aa,t.la,h,u,p,e),n.context):(t.rl=!1,Nr(t,g,l,new Bt(c.width,c.height),t.Aa,t.la,h,u,p,e),t.rl=!0,c.context);var y=t.Qn,m=t.documentBounds.copy();if(m.Jw(t.ib),p)for(var v=t.Ma.j,x=v.length,b=0;by?(r=y,o=m.width,m=m.height):(o=s.width,m=s.height)):(o=m.width*r,m=m.height*r):(r=y,o=m.width,m=m.height),null!==l?(o+=a,m+=N):l=new Qt(0),null!==s&&(y=s.width,s=s.height,isNaN(y)&&(y=2e3),isNaN(s)&&(s=2e3),isFinite(y)&&(o=Math.min(o,y)),isFinite(s)&&(m=Math.min(m,s))),c.width=Math.ceil(o),c.height=Math.ceil(m),"SVG"===i?null===n?null:(n.resize(c.width,c.height,c.width,c.height),n.ownerDocument=f,n.Dq=d,Nr(t,n.context,l,new Bt(Math.ceil(o),Math.ceil(m)),r,v,h,u,p,e),n.context):(t.rl=!1,Nr(t,g,l,new Bt(Math.ceil(o),Math.ceil(m)),r,v,h,u,p,e),t.rl=!0,c.context)}Eo.className="AnimationTrigger",Eo.Default=zo,Eo.Immediate=Vo,Eo.Bundled=Go,i=Yo.prototype,i.clear=function(){this.Ea.clear(),this.rp.length=0},i.ee=function(t){this.C=t},i.toString=function(t){void 0===t&&(t=0);var e='Layer "'+this.name+'"';if(0>=t)return e;for(var i=0,n=0,o=0,r=0,s=0,a=this.Ea.iterator;a.next();){var h=a.value;h instanceof bc?o++:h instanceof ec?n++:h instanceof Nc?r++:h instanceof Qu?s++:i++}if(a="",0i.Xo||a.height*o>i.Xo?e.mc(t,i):(o=e.actualBounds,r=e.naturalBounds,0===o.width||0===o.height||isNaN(o.x)||isNaN(o.y)||!e.isVisible()||(i=e.transform,null!==e.areaBackground&&(va(e,t,e.areaBackground,!0,!0,r,o),t.fillRect(o.x,o.y,o.width,o.height)),null===e.areaBackground&&null===e.background&&(va(e,t,"rgba(0,0,0,0.3)",!0,!1,r,o),t.fillRect(o.x,o.y,o.width,o.height)),null!==e.background&&(t.transform(i.m11,i.m12,i.m21,i.m22,i.dx,i.dy),va(e,t,e.background,!0,!1,r,o),t.fillRect(0,0,r.width/2,r.height/2),i.Tt()||(e=1/(i.m11*i.m22-i.m12*i.m21),t.transform(i.m22*e,-i.m12*e,-i.m21*e,i.m11*e,e*(i.m21*i.dy-i.m22*i.dx),e*(i.m12*i.dx-i.m11*i.dy)))))),n&&(t.restore(),t.uc(!0))}},i.g=function(t,e,i,n,o){var r=this.diagram;null!==r&&r.Va(Pi,t,this,e,i,n,o)},i.oj=function(t,e,i){var n=this.Ea;if(e.Fi=this,t>=n.count)t=n.count;else if(n.J(t)===e)return-1;return n.wb(t,e),e.Mq(i),n=this.diagram,null!==n&&(i?n.M():n.oj(e)),qo(this,t,e),t},i.Lc=function(t,e,i){if(!i&&e.layer!==this&&null!==e.layer)return e.layer.Lc(t,e,i);var n=this.Ea;if(0>t||t>=n.length){if(t=n.indexOf(e),0>t)return-1}else if(n.J(t)!==e&&(t=n.indexOf(e),0>t))return-1;return e.Nq(i),n.cb(t),n=this.diagram,null!==n&&(i?n.M():n.Lc(e)),e.Fi=null,t},d.Object.defineProperties(Yo.prototype,{parts:{get:function(){return this.Ea.iterator}},partsBackwards:{get:function(){return this.Ea.iteratorBackwards}},diagram:{get:function(){return this.C}},name:{get:function(){return this.oa},set:function(t){var e=this.oa;if(e!==t){var i=this.diagram;if(null!==i)for(""===e&&w("Cannot rename default Layer to: "+t),i=i.layers;i.next();)i.value.name===t&&w("Layer.name is already present in this diagram: "+t);for(this.oa=t,this.g("name",e,t),t=this.Ea.iterator;t.next();)t.value.layerName=this.oa}}},opacity:{get:function(){return this.hb},set:function(t){var e=this.hb;e!==t&&((0>t||1=t)return e;for(var i=this.Ma.iterator;i.next();)e+="\n "+i.value.toString(t-1);return e},Ko.prototype.addEventListener=function(t,e,i,n){t.addEventListener(e,i,{capture:n,passive:!1})},Ko.prototype.removeEventListener=function(t,e,i,n){t.removeEventListener(e,i,{capture:n})},Ko.prototype.computePixelRatio=function(){return null!==this.yh?this.yh:y.devicePixelRatio||1},Ko.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Ko.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Ko.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Ko.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Ko.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Ko.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Ko.prototype.doFocus=function(){this.focus()},Ko.prototype.focus=function(){if(this.wa)if(this.scrollsPageOnFocus)this.wa.focus();else{var t=y.scrollX||y.pageXOffset,e=y.scrollY||y.pageYOffset;this.wa.focus(),y.scrollTo(t,e)}},Ko.prototype.Bz=function(){this.C.R("GainedFocus")},Ko.prototype.Az=function(){this.C.R("LostFocus")},Ko.prototype.iy=function(t){if(null!==this.wa){this.Op=!0;var e=this.documentBounds,i=this.viewportBounds,n=this.Si,o=e.x-n.left,r=e.y-n.top,s=e.width+n.left+n.right,a=e.height+n.top+n.bottom,h=e.right+n.right;n=e.bottom+n.bottom;var l=i.x;e=i.y;var u=i.width,c=i.height,f=i.right,d=i.bottom;i=this.scale;var p=t.scrollLeft;if(this.Gl)switch(this.Ss){case"negative":p=p+t.scrollWidth-t.clientWidth;break;case"reverse":p=t.scrollWidth-p-t.clientWidth}var g=p;uf&&(this.position=p.h(-(this.Ys.scrollWidth-this.ya)+g-this.ya/i+h,this.position.y))),t.iz&&this.allowVerticalScroll&&(rd&&(this.position=p.h(this.position.x,-(this.Ys.scrollHeight-this.xa)+t.scrollTop-this.xa/i+n))),pt.free(p),Lr(this),this.wi=this.Op=!1,e=this.documentBounds,i=this.viewportBounds,h=e.right,f=i.right,n=e.bottom,d=i.bottom,o=e.x,l=i.x,r=e.y,e=i.y,u>=s&&o>=l&&h<=f&&(this.Pp.style.width="1px"),c>=a&&r>=e&&n<=d&&(this.Pp.style.height="1px"))}},Ko.prototype.computeBounds=function(){return 0o/i?(r-(this.pe?this.rb:0))/n:(o-(this.Ye?this.rb:0))/i:Math.min(r/n,o/i)}this.scale=o,this.position=new pt(t.x,t.y)}},i.uz=function(t,e){this.Ta();var i=this.documentBounds,n=this.viewportBounds;this.position=new pt(i.x+(t.x*i.width+t.offsetX)-(e.x*n.width-e.offsetX),i.y+(t.y*i.height+t.offsetY)-(e.y*n.height-e.offsetY))},i.kA=function(t){if(t instanceof ca){this.ao=t;var e=pt.alloc();this.bo=this.gr(t.da(ne,e)),pt.free(e)}else this.ao=null,this.bo=Dt},i.zm=function(t,e){if(void 0===e&&(e=!0),e){if(t=hr(this,t,(function(t){return t.part}),(function(t){return t.canSelect()})),t instanceof Lu)return t}else if(t=hr(this,t,(function(t){return t.part})),t instanceof Lu)return t;return null},i.Vb=function(t,e,i){void 0===e&&(e=null),void 0===i&&(i=null),Sr(this);for(var n=this.Ma.iteratorBackwards;n.next();){var o=n.value;if(o.visible&&(o=o.Vb(t,e,i),null!==o))return o}return null},i.Zz=function(t,e,i){return void 0===e&&(e=!0),lr(this,t,(function(t){return t.part}),e?function(t){return t instanceof Lu&&t.canSelect()}:null,i)},i.hj=function(t,e,i,n){void 0===e&&(e=null),void 0===i&&(i=null),n instanceof et||n instanceof nt||(n=new nt),Sr(this);for(var o=this.Ma.iteratorBackwards;o.next();){var r=o.value;r.visible&&r.hj(t,e,i,n)}return n},i.ty=function(t,e,i,n){return void 0===e&&(e=!1),void 0===i&&(i=!0),ur(this,t,(function(t){return t instanceof Lu&&(!i||t.canSelect())}),e,n)},i.zf=function(t,e,i,n,o){void 0===e&&(e=null),void 0===i&&(i=null),void 0===n&&(n=!1),o instanceof et||o instanceof nt||(o=new nt),Sr(this);for(var r=this.Ma.iteratorBackwards;r.next();){var s=r.value;s.visible&&s.zf(t,e,i,n,o)}return o},i.Vv=function(t,e,i,n,o,r){var s=new nt;Sr(this);for(var a=this.Ma.iteratorBackwards;a.next();){var h=a.value;h.visible&&h.Vv(t,e,i,n,s,o,r)}return s},i.$z=function(t,e,i,n,o){return void 0===i&&(i=!0),void 0===n&&(n=!0),cr(this,t,e,(function(t){return t instanceof Lu&&(!n||t.canSelect())}),i,o)},i.Eg=function(t,e,i,n,o,r){void 0===i&&(i=null),void 0===n&&(n=null),void 0===o&&(o=!0),!1!==o&&!0!==o&&((o instanceof et||o instanceof nt)&&(r=o),o=!0),r instanceof et||r instanceof nt||(r=new nt),Sr(this);for(var s=this.Ma.iteratorBackwards;s.next();){var a=s.value;a.visible&&a.Eg(t,e,i,n,o,r)}return r},Ko.prototype.acceptEvent=function(t){return fr(this,t,t instanceof MouseEvent)},Ko.prototype.BA=function(t){var e=this.C;if(!this.C.isEnabled)return!1;var i=fr(e,t,!1);switch(i.key=String.fromCharCode(t.which),i.down=!0,t.which){case 8:i.key="Backspace";break;case 33:i.key="PageUp";break;case 34:i.key="PageDown";break;case 35:i.key="End";break;case 36:i.key="Home";break;case 37:i.key="Left";break;case 38:i.key="Up";break;case 39:i.key="Right";break;case 40:i.key="Down";break;case 45:i.key="Insert";break;case 46:i.key="Del";break;case 48:i.key="0";break;case 187:case 61:case 107:i.key="Add";break;case 189:case 173:case 109:i.key="Subtract";break;case 27:i.key="Esc"}return e.doKeyDown(),mr(i,t)},Ko.prototype.CA=function(t){var e=this.C;if(!e.isEnabled)return!1;var i=fr(e,t,!1);switch(i.key=String.fromCharCode(t.which),i.up=!0,t.which){case 8:i.key="Backspace";break;case 33:i.key="PageUp";break;case 34:i.key="PageDown";break;case 35:i.key="End";break;case 36:i.key="Home";break;case 37:i.key="Left";break;case 38:i.key="Up";break;case 39:i.key="Right";break;case 40:i.key="Down";break;case 45:i.key="Insert";break;case 46:i.key="Del"}return e.doKeyUp(),mr(i,t)},Ko.prototype.Oz=function(t){var e=this.C;if(!e.isEnabled)return!1;var i=fr(e,t,!0);return null!==e.mouseEnter&&e.mouseEnter(i),mr(i,t)},Ko.prototype.Pz=function(t){var e=this.C;if(!e.isEnabled)return!1;var i=fr(e,t,!0);return null!==e.mouseLeave&&e.mouseLeave(i),mr(i,t)},Ko.prototype.getMouse=function(t){var e=this.wa;if(null===e)return new pt(0,0);var i=e.getBoundingClientRect();return e=t.clientX-this.ya/i.width*i.left,t=t.clientY-this.xa/i.height*i.top,null!==this.sb?vt(new pt(e,t),this.sb):new pt(e,t)},Ko.prototype.Na=function(){this.vi||(this.vi=!0,this.Db(!0))},Ko.prototype.redraw=function(){this.Sb||this.ac||(this.M(),Ar(this),Lr(this),this.Na(),this.hd())},i=Ko.prototype,i.AA=function(){return this.Ee},i.Jz=function(t){void 0===t&&(t=null);var e=this.animationManager,i=e.isEnabled;e.Bc(),e.isEnabled=!1,kr(this),this.qe=!1,this.Ts=new pt(NaN,NaN),e.isEnabled=i,this.ac=!0;var n=this;null!==t&&x((function(){n.ac=!1,uo(e,"Model"),t(n)}),1)},i.Db=function(t){if(void 0===t&&(t=!1),!0!==this.Ee&&!(this.Sb||!1===t&&this.ac)){this.Ee=!0;var e=this;y.requestAnimationFrame((function(){e.Ee&&e.hd()}))}},i.hd=function(){this.Kj&&!this.Ee||(this.Kj&&(this.Kj=!1),kr(this))},i.Vw=function(t,e){for(t.reset();t.next();){var i=t.value;!i.Nc()||i instanceof bc||(i.rj()?(i.measure(1/0,1/0),i.arrange()):e.add(i))}for(t.reset();t.next();)i=t.value,i instanceof bc&&i.isVisible()&&Pr(this,i);for(t.reset();t.next();)i=t.value,i instanceof Nc&&i.isVisible()&&(i.rj()?(i.measure(1/0,1/0),i.arrange()):e.add(i));for(t.reset();t.next();)i=t.value,i instanceof Qu&&i.isVisible()&&(i.rj()?(i.measure(1/0,1/0),i.arrange()):e.add(i))},i.Nd=function(t,e,i,n){if(this.xi||this.animationManager.isAnimating){void 0===n&&(n=i.viewportBounds);for(var o=0;on&&this.Na()},i.nz=function(t,e){Yr(this,t,e),t.ee(this);var i=this.Ma,n=i.indexOf(t);0<=n&&(i.remove(t),null!==this.cc&&this.Va(Ci,"layers",this,t,null,n,null));var o,r=i.count;for(o=0;on&&this.Na()},i.TA=function(t){if(t.diagram!==this&&w("Cannot remove a Layer from another Diagram: "+t+" of "+t.diagram),""!==t.name){var e=this.Ma,i=e.indexOf(t);if(e.remove(t)){for(e=t.Ea.copy().iterator;e.next();){var n=e.value,o=n.layerName;o!==t.name?n.layerName=o:n.layerName=""}null!==this.cc&&this.Va(Ci,"layers",this,t,null,i,null),this.M(),this.Na()}}},i.xk=function(t){for(var e=this.layers;e.next();){var i=e.value;if(i.name===t)return i}return null},i.Wx=function(t){null===this.we&&(this.we=new et),this.we.add(t),this.model.Hh(t)},i.VA=function(t){null!==this.we&&(this.we.remove(t),0===this.we.count&&(this.we=null)),this.model.Tk(t)},i.Hh=function(t){null===this.Of&&(this.Of=new et),this.Of.add(t)},i.Tk=function(t){null!==this.Of&&(this.Of.remove(t),0===this.Of.count&&(this.Of=null))},i.zt=function(t){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.aw(t),t.change!==Si&&(this.isModified=!0),null!==this.Of)for(var e=this.Of,i=e.length,n=0;nc.Ea.indexOf(d)&&c.oj(f,d,p):(d.isSelected=!1,d.isHighlighted=!1,d.Lb(),c.Lc(p?f:-1,d,p)))}else c instanceof Ko?"number"===typeof f&&d instanceof Yo&&(e?(d.ee(this),this.Ma.wb(f,d)):this.Ma.cb(f)):w("unknown ChangedEvent.Remove object: "+t.toString());this.isModified=!0}else n!==Si&&w("unknown ChangedEvent: "+t.toString())}finally{this.skipsModelSourceBindings=i}}},Ko.prototype.va=function(t){return this.undoManager.va(t)},Ko.prototype.Xa=function(t){return this.undoManager.Xa(t)},Ko.prototype.If=function(){return this.undoManager.If()},Ko.prototype.commit=function(t,e){void 0===e&&(e="");var i=this.skipsUndoManager;null===e&&(this.skipsUndoManager=!0,e=""),this.undoManager.va(e);var n=!1;try{t(this),n=!0}finally{n?this.undoManager.Xa(e):this.undoManager.If(),this.skipsUndoManager=i}},Ko.prototype.updateAllTargetBindings=function(t){this.partManager.updateAllTargetBindings(t)},Ko.prototype.ir=function(){this.partManager.ir()},Ko.prototype.onViewportBoundsChanged=function(t,e,i,n){if(!t.w(e)){void 0===n&&(n=!1),n||Ar(this),Lr(this);var o=this.layout;null===o||!o.isViewportSized||this.autoScale!==xs||n||t.width===e.width&&t.height===e.height||o.B(),o=this.currentTool,!0===this.Zf&&o instanceof Di&&(this.lastInput.documentPoint=this.ou(this.lastInput.viewPoint),Fi(o,this)),this.Sb||this.invalidateViewport(t,e),qr(this),this.Ic.scale=i,this.Ic.position.x=t.x,this.Ic.position.y=t.y,this.Ic.bounds.assign(t),this.Ic.Gv.width=Math.round(t.width*i),this.Ic.Gv.height=Math.round(t.height*i),this.Ic.kw.width=this.ya,this.Ic.kw.height=this.xa,this.Ic.hw=n,this.R("ViewportBoundsChanged",this.Ic,t),this.isVirtualized&&this.links.each((function(t){t.isAvoiding&&t.actualBounds.Mc(e)&&t.Ua()}))}},Ko.prototype.clearSelection=function(t){void 0===t&&(t=!1);var e=this.selection;if(0!==e.count){t||this.R("ChangingSelection",e);for(var i=e.ma(),n=i.length,o=0;o=i.top&&0>=i.left&&0>=i.right&&0>=i.bottom)return e;var n=this.viewportBounds,o=this.scale;n=zt.allocAt(0,0,n.width*o,n.height*o);var r=pt.allocAt(0,0);if(t.x>=n.x&&t.xn.x+n.width-i.right&&this.allowHorizontalScroll&&(s=Math.max(this.scrollHorizontalLineChange,1),s|=0,r.x+=s,t.x>n.x+n.width-i.right/2&&(r.x+=s),t.x>n.x+n.width-i.right/4&&(r.x+=4*s));return t.y>=n.y&&t.yn.y+n.height-i.bottom&&this.allowVerticalScroll&&(s=Math.max(this.scrollVerticalLineChange,1),s|=0,r.y+=s,t.y>n.y+n.height-i.bottom/2&&(r.y+=s),t.y>n.y+n.height-i.bottom/4&&(r.y+=4*s)),r.Qa(At)||(e=new pt(e.x+r.x/o,e.y+r.y/o)),zt.free(n),pt.free(r),e},i=Ko.prototype,i.$t=function(){return null},i.iw=function(){return null},i.rz=function(t,e){this.Kx.add(t,e)},i.GA=function(t){return ys?(void 0===t&&(t=new _),t.returnType="Image",this.Hy(t)):null},i.Hy=function(t){return void 0===t&&(t=new _),us(this,this.HA,t)},i.HA=function(t,e,i){var n=cs(i,t,"canvas",null);if(null===n)return null;i=n.Y.canvas;var o=null;if(null!==i)switch(o=t.returnType,o=void 0===o?"string":o.toLowerCase(),o){case Bs+"data":o=n.getImageData(0,0,i.width,i.height);break;case Bs:n=(t.document||document).createElement("img"),n.src=i.toDataURL(t.type,t.details),o=n;break;case"blob":return"function"!==typeof e&&w('Error: Diagram.makeImageData called with "returnType: toBlob", but no required "callback" function property defined.'),"function"===typeof i.toBlob?(i.toBlob(e,t.type,t.details),"toBlob"):"function"===typeof i.msToBlob?(e(i.msToBlob()),"msToBlob"):(e(null),null);default:o=i.toDataURL(t.type,t.details)}return"function"===typeof e?(e(o),null):o},d.Object.defineProperties(Ko.prototype,{div:{get:function(){return this.Fa},set:function(t){if(this.Fa!==t){var e=this.Fa;null!==e?(e.C=void 0,e.goDiagram=void 0,e.innerHTML="",null!==this.wa&&(e=this.wa.Ja,this.zj?(this.removeEventListener(e,"pointermove",this.Pk,!1),this.removeEventListener(e,"pointerdown",this.Ok,!1),this.removeEventListener(e,"pointerup",this.Rk,!1),this.removeEventListener(e,"pointerout",this.Qk,!1)):(this.removeEventListener(e,"touchstart",this.Ow,!1),this.removeEventListener(e,"touchmove",this.Nw,!1),this.removeEventListener(e,"touchend",this.Mw,!1)),this.wa.ky()),this.Zl&&(this.Zl.disconnect(),this.Zl=null),e=this.toolManager,null!==e&&(e.mouseDownTools.each((function(t){t.cancelWaitAfter()})),e.mouseMoveTools.each((function(t){t.cancelWaitAfter()})),e.mouseUpTools.each((function(t){t.cancelWaitAfter()}))),e.cancelWaitAfter(),this.currentTool.doCancel(),this.Gb=this.wa=null,this.removeEventListener(y,"resize",this.Ww,!1),this.zj||(this.removeEventListener(y,"mousemove",this.Ik,!0),this.removeEventListener(y,"mousedown",this.Hk,!0),this.removeEventListener(y,"mouseup",this.Kk,!0),this.removeEventListener(y,"mouseout",this.Jk,!0)),this.removeEventListener(y,"wheel",this.Lk,!0),fs===this&&(fs=null)):this.qe=!1,this.Fa=null,null!==t&&((e=t.C)&&(e.div=null),Gs(this,t),this.redraw())}}},Yx:{get:function(){return this.cp}},pj:{get:function(){return this.qe}},draggedLink:{get:function(){return this.Sr},set:function(t){this.Sr!==t&&(this.Sr=t,null!==t&&(this.Fs=t.fromPort,this.Gs=t.toPort))}},Ky:{get:function(){return this.Fs},set:function(t){this.Fs=t}},Ly:{get:function(){return this.Gs},set:function(t){this.Gs=t}},animationManager:{get:function(){return this.Uc}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.vg},set:function(t){this.vg=t,this.cc.skipsUndoManager=t}},delaysLayout:{get:function(){return this.Nr},set:function(t){this.Nr=t}},opacity:{get:function(){return this.hb},set:function(t){var e=this.hb;e!==t&&((0>t||1t&&M(t,">= 0",Ko,"scrollHorizontalLineChange"),this.Ws=t,this.g("scrollHorizontalLineChange",e,t))}},scrollVerticalLineChange:{get:function(){return this.$s},set:function(t){var e=this.$s;e!==t&&(0>t&&M(t,">= 0",Ko,"scrollVerticalLineChange"),this.$s=t,this.g("scrollVerticalLineChange",e,t))}},lastInput:{get:function(){return this.hh},set:function(t){this.hh=t}},previousInput:{get:function(){return this.od},set:function(t){this.od=t}},firstInput:{get:function(){return this.Wf},set:function(t){this.Wf=t}},currentCursor:{get:function(){return this.Hr},set:function(t){if(""===t&&(t=this.Pn),this.Hr!==t){var e=this.wa,i=this.Fa;if(null!==e){this.Hr=t;var n=e.style.cursor;e.style.cursor=t,i.style.cursor=t,e.style.cursor===n&&(e.style.cursor="-webkit-"+t,i.style.cursor="-webkit-"+t,e.style.cursor===n&&(e.style.cursor="-moz-"+t,i.style.cursor="-moz-"+t,e.style.cursor===n&&(e.style.cursor=t,i.style.cursor=t)))}}}},defaultCursor:{get:function(){return this.Pn},set:function(t){""===t&&(t="auto");var e=this.Pn;e!==t&&(this.Pn=t,this.g("defaultCursor",e,t))}},click:{get:function(){return this.Pf},set:function(t){var e=this.Pf;e!==t&&(this.Pf=t,this.g("click",e,t))}},doubleClick:{get:function(){return this.Uf},set:function(t){var e=this.Uf;e!==t&&(this.Uf=t,this.g("doubleClick",e,t))}},contextClick:{get:function(){return this.Qf},set:function(t){var e=this.Qf;e!==t&&(this.Qf=t,this.g("contextClick",e,t))}},mouseOver:{get:function(){return this.lg},set:function(t){var e=this.lg;e!==t&&(this.lg=t,this.g("mouseOver",e,t))}},mouseHover:{get:function(){return this.jg},set:function(t){var e=this.jg;e!==t&&(this.jg=t,this.g("mouseHover",e,t))}},mouseHold:{get:function(){return this.ig},set:function(t){var e=this.ig;e!==t&&(this.ig=t,this.g("mouseHold",e,t))}},mouseDragOver:{get:function(){return this.As},set:function(t){var e=this.As;e!==t&&(this.As=t,this.g("mouseDragOver",e,t))}},mouseDrop:{get:function(){return this.gg},set:function(t){var e=this.gg;e!==t&&(this.gg=t,this.g("mouseDrop",e,t))}},handlesDragDropForTopLevelParts:{get:function(){return this.cs},set:function(t){var e=this.cs;e!==t&&(this.cs=t,this.g("handlesDragDropForTopLevelParts",e,t))}},mouseEnter:{get:function(){return this.hg},set:function(t){var e=this.hg;e!==t&&(this.hg=t,this.g("mouseEnter",e,t))}},mouseLeave:{get:function(){return this.kg},set:function(t){var e=this.kg;e!==t&&(this.kg=t,this.g("mouseLeave",e,t))}},toolTip:{get:function(){return this.wg},set:function(t){var e=this.wg;e!==t&&(this.wg=t,this.g("toolTip",e,t))}},contextMenu:{get:function(){return this.Rf},set:function(t){var e=this.Rf;e!==t&&(this.Rf=t,this.g("contextMenu",e,t))}},commandHandler:{get:function(){return this.Br},set:function(t){this.Br!==t&&(this.Br=t,t.ee(this))}},toolManager:{get:function(){return this.pt},set:function(t){this.pt!==t&&(this.pt=t,t.diagram=this)}},defaultTool:{get:function(){return this.Mr},set:function(t){var e=this.Mr;e!==t&&(this.Mr=t,t.diagram=this,this.currentTool===e&&(this.currentTool=t))}},currentTool:{get:function(){return this.Jr},set:function(t){var e=this.Jr;null!==e&&(e.isActive&&e.doDeactivate(),e.cancelWaitAfter(),e.doStop()),null===t&&(t=this.defaultTool),null!==t&&(this.Jr=t,t.diagram=this,t.doStart())}},selection:{get:function(){return this.qv}},maxSelectionCount:{get:function(){return this.ws},set:function(t){var e=this.ws;if(e!==t)if(0<=t&&!isNaN(t)){if(this.ws=t,this.g("maxSelectionCount",e,t),!this.undoManager.isUndoingRedoing&&(t=this.selection.count-t,0= 0",Ko,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.kp},set:function(t){var e=this.kp;e!==t&&(this.kp=t,this.g("nodeSelectionAdornmentTemplate",e,t))}},groupSelectionAdornmentTemplate:{get:function(){return this.qo},set:function(t){var e=this.qo;e!==t&&(this.qo=t,this.g("groupSelectionAdornmentTemplate",e,t))}},linkSelectionAdornmentTemplate:{get:function(){return this.Lo},set:function(t){var e=this.Lo;e!==t&&(this.Lo=t,this.g("linkSelectionAdornmentTemplate",e,t))}},highlighteds:{get:function(){return this.Su}},isModified:{get:function(){var t=this.undoManager;return t.isEnabled?null!==t.currentTransaction||this.wo&&this.Xd!==t.historyIndex:this.wo},set:function(t){if(this.wo!==t){this.wo=t;var e=this.undoManager;!t&&e.isEnabled&&(this.Xd=e.historyIndex),t||Ur(this)}}},model:{get:function(){return this.cc},set:function(t){var e=this.cc;if(e!==t){this.currentTool.doCancel(),null!==e&&e.undoManager!==t.undoManager&&e.undoManager.isInTransaction&&w("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Bc(!0);var i=Ho(this,!0);this.qe=!1,this.Kj=!0,this.Xd=-2,this.Ee=!1;var n=this.ac;this.ac=!0,uo(this.animationManager,"Model"),null!==e&&(null!==this.we&&this.we.each((function(t){e.Tk(t)})),e.Tk(this.Tc)),this.cc=t,this.partManager=Kr(this.cc.type);for(var o=0;othis.scale&&(this.scale=t)):M(t,"> 0",Ko,"minScale"))}},maxScale:{get:function(){return this.vs},set:function(t){var e=this.vs;e!==t&&(0 0",Ko,"maxScale"))}},zoomPoint:{get:function(){return this.xt},set:function(t){this.xt.w(t)||(this.xt=t=t.H())}},contentAlignment:{get:function(){return this.Dj},set:function(t){var e=this.Dj;e.w(t)||(this.Dj=t=t.H(),this.g("contentAlignment",e,t),rr(this,!1))}},initialContentAlignment:{get:function(){return this.to},set:function(t){var e=this.to;e.w(t)||(this.to=t=t.H(),this.g("initialContentAlignment",e,t))}},padding:{get:function(){return this.ib},set:function(t){"number"===typeof t&&(t=new Qt(t));var e=this.ib;e.w(t)||(this.ib=t=t.H(),this.Na(),this.g("padding",e,t))}},partManager:{get:function(){return this.La},set:function(t){var e=this.La;e!==t&&(null!==t.diagram&&w("Cannot share PartManagers between Diagrams: "+t.toString()),null!==e&&e.ee(null),this.La=t,t.ee(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.kc},set:function(t){var e=this.kc;e!==t&&(this.kc=t,t.diagram=this,t.group=null,this.Ng=!0,this.g("layout",e,t),this.Db())}},isTreePathToChildren:{get:function(){return this.qs},set:function(t){var e=this.qs;if(e!==t&&(this.qs=t,this.g("isTreePathToChildren",e,t),!this.undoManager.isUndoingRedoing))for(t=this.nodes;t.next();)lc(t.value)}},treeCollapsePolicy:{get:function(){return this.rt},set:function(t){var e=this.rt;e!==t&&(t!==Ls&&t!==js&&t!==Os&&w("Unknown Diagram.treeCollapsePolicy: "+t),this.rt=t,this.g("treeCollapsePolicy",e,t))}},Le:{get:function(){return this.Uu},set:function(t){this.Uu=t}},autoScrollInterval:{get:function(){return this.qn},set:function(t){var e=this.qn;e!==t&&(this.qn=t,this.g("autoScrollInterval",e,t))}},autoScrollRegion:{get:function(){return this.sn},set:function(t){"number"===typeof t&&(t=new Qt(t));var e=this.sn;e.w(t)||(this.sn=t=t.H(),this.Na(),this.g("autoScrollRegion",e,t))}}}),d.Object.defineProperties(Ko,{licenseKey:{get:function(){return Ds.Xb()},set:function(t){Ds.add(t)}},version:{get:function(){return Fs}}}),Ko.prototype.makeImageData=Ko.prototype.Hy,Ko.prototype.makeImage=Ko.prototype.GA,Ko.prototype.addRenderer=Ko.prototype.rz,Ko.prototype.makeSVG=Ko.prototype.iw,Ko.prototype.makeSvg=Ko.prototype.$t,Ko.prototype.stopAutoScroll=Ko.prototype.Jf,Ko.prototype.doAutoScroll=Ko.prototype.Et,Ko.prototype.isUnoccupied=Ko.prototype.Ek,Ko.prototype.raiseDiagramEvent=Ko.prototype.R,Ko.prototype.removeDiagramListener=Ko.prototype.Lm,Ko.prototype.addDiagramListener=Ko.prototype.kk,Ko.prototype.findTreeRoots=Ko.prototype.jA,Ko.prototype.layoutDiagram=Ko.prototype.EA,Ko.prototype.findTopLevelGroups=Ko.prototype.cA,Ko.prototype.findTopLevelNodesAndLinks=Ko.prototype.dA,Ko.prototype.ensureBounds=Ko.prototype.Ta,Ko.prototype.findLinksByExample=Ko.prototype.Ht,Ko.prototype.findNodesByExample=Ko.prototype.It,Ko.prototype.findLinkForData=Ko.prototype.yc,Ko.prototype.findNodeForData=Ko.prototype.gj,Ko.prototype.findPartForData=Ko.prototype.zc,Ko.prototype.findLinkForKey=Ko.prototype.findLinkForKey,Ko.prototype.findNodeForKey=Ko.prototype.Cb,Ko.prototype.findPartForKey=Ko.prototype.findPartForKey,Ko.prototype.rebuildParts=Ko.prototype.Md,Ko.prototype.transformViewToDoc=Ko.prototype.ou,Ko.prototype.transformRectDocToView=Ko.prototype.iB,Ko.prototype.transformDocToView=Ko.prototype.gr,Ko.prototype.centerRect=Ko.prototype.At,Ko.prototype.scrollToRect=Ko.prototype.Aw,Ko.prototype.scroll=Ko.prototype.scroll,Ko.prototype.highlightCollection=Ko.prototype.vA,Ko.prototype.highlight=Ko.prototype.uA,Ko.prototype.selectCollection=Ko.prototype.$A,Ko.prototype.select=Ko.prototype.select,Ko.prototype.updateAllRelationshipsFromData=Ko.prototype.ir,Ko.prototype.updateAllTargetBindings=Ko.prototype.updateAllTargetBindings,Ko.prototype.commit=Ko.prototype.commit,Ko.prototype.rollbackTransaction=Ko.prototype.If,Ko.prototype.commitTransaction=Ko.prototype.Xa,Ko.prototype.startTransaction=Ko.prototype.va,Ko.prototype.raiseChanged=Ko.prototype.g,Ko.prototype.raiseChangedEvent=Ko.prototype.Va,Ko.prototype.removeChangedListener=Ko.prototype.Tk,Ko.prototype.addChangedListener=Ko.prototype.Hh,Ko.prototype.removeModelChangedListener=Ko.prototype.VA,Ko.prototype.addModelChangedListener=Ko.prototype.Wx,Ko.prototype.findLayer=Ko.prototype.xk,Ko.prototype.removeLayer=Ko.prototype.TA,Ko.prototype.addLayerAfter=Ko.prototype.nz,Ko.prototype.addLayerBefore=Ko.prototype.Ux,Ko.prototype.addLayer=Ko.prototype.um,Ko.prototype.moveParts=Ko.prototype.moveParts,Ko.prototype.copyParts=Ko.prototype.tk,Ko.prototype.removeParts=Ko.prototype.gu,Ko.prototype.remove=Ko.prototype.remove,Ko.prototype.add=Ko.prototype.add,Ko.prototype.clearDelayedGeometries=Ko.prototype.Hv,Ko.prototype.setProperties=Ko.prototype.Fw,Ko.prototype.resetInputOptions=Ko.prototype.ww,Ko.prototype.setInputOption=Ko.prototype.aB,Ko.prototype.getInputOption=Ko.prototype.Bm,Ko.prototype.resetRenderingHints=Ko.prototype.xw,Ko.prototype.setRenderingHint=Ko.prototype.Ty,Ko.prototype.getRenderingHint=Ko.prototype.Ke,Ko.prototype.maybeUpdate=Ko.prototype.hd,Ko.prototype.requestUpdate=Ko.prototype.Db,Ko.prototype.delayInitialization=Ko.prototype.Jz,Ko.prototype.isUpdateRequested=Ko.prototype.AA,Ko.prototype.invalidateDocumentBounds=Ko.prototype.Na,Ko.prototype.findObjectsNear=Ko.prototype.Eg,Ko.prototype.findPartsNear=Ko.prototype.$z,Ko.prototype.findObjectsIn=Ko.prototype.zf,Ko.prototype.findPartsIn=Ko.prototype.ty,Ko.prototype.findObjectsAt=Ko.prototype.hj,Ko.prototype.findPartsAt=Ko.prototype.Zz,Ko.prototype.findObjectAt=Ko.prototype.Vb,Ko.prototype.findPartAt=Ko.prototype.zm,Ko.prototype.focusObject=Ko.prototype.kA,Ko.prototype.alignDocument=Ko.prototype.uz,Ko.prototype.zoomToRect=Ko.prototype.mB,Ko.prototype.zoomToFit=Ko.prototype.zoomToFit,Ko.prototype.diagramScroll=Ko.prototype.iy,Ko.prototype.focus=Ko.prototype.focus,Ko.useDOM=function(t){ys=!!t&&void 0!==y.document},Ko.isUsingDOM=function(){return ys};var fs=null,ds=new dt,ps=null,gs=null,ys=void 0!==y.document,ms=null,vs="",xs=new U(Ko,"None",0),bs=new U(Ko,"Uniform",1),ws=new U(Ko,"UniformToFill",2),ks=new U(Ko,"CycleAll",10),Ms=new U(Ko,"CycleNotDirected",11),Ss=new U(Ko,"CycleNotDirectedFast",12),Ps=new U(Ko,"CycleNotUndirected",13),Ns=new U(Ko,"CycleDestinationTree",14),Cs=new U(Ko,"CycleSourceTree",15),Ts=new U(Ko,"DocumentScroll",1),As=new U(Ko,"InfiniteScroll",2),Ls=new U(Ko,"TreeParentCollapsed",21),js=new U(Ko,"AllParentsCollapsed",22),Os=new U(Ko,"AnyParentsCollapsed",23),Ds=new et,Fs="2.1.53",Bs="image",Is=null,Es=!1;function Rs(){if(ys){var t=y.document.createElement("canvas"),e=t.getContext("2d"),i=E("7ca11abfd022028846");e[i]=E("398c3597c01238");for(var n=["5da73c80a36455d5038e4972187c3cae51fd22",m.Dx+"4ae6247590da4bb21c324ba3a84e385776",Ke.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",_e.za],o=1;5>o;o++)e[E("7ca11abfd7330390")](E(n[o-1]),10,15*o);for(e[i]=E("39f046ebb36e4b"),i=1;5>i;i++)e[E("7ca11abfd7330390")](E(n[i-1]),10,15*i);4===n.length&&"5"===n[0][0]&&"7"===n[3][0]||(Ke.prototype.Jd=Ke.prototype.Zx),Is=t}}function zs(){this.jz=null,this.l="zz@orderNum","63ad05bbe23a1786468a4c741b6d2"===this._tk?this.Ve=this.l=!0:this.Ve=null}function Vs(t,e){if(e.Gb.setTransform(e.Tb,0,0,e.Tb,0,0),null===t.Ve)t:{e="f";var i=y[E("76a715b2f73f148a")][E("72ba13b5")];if(t.Ve=!0,ys){var n=Ko[E("76a115b6ed251eaf4692")];if(n)for(var o=Ds.iterator;o.next();){if(n=o.value,n=E(n).split(E("39e9")),6>n.length)break;var r=E(n[1]).split(".");if("7da71ca0"!==n[4])break;var s=E(m[E("6cae19")]).split(".");if(r[0]>s[0]||r[0]===s[0]&&r[1]>=s[1]){for(r=i[E("76ad18b4f73e")],s=i[E("73a612b6fb191d")](E("35e7"))+2;sr&&E(n[2])!==E("7da71ca0ad381e90")&&(r=e[E("73a612b6fb191d")](E("76a715b2ef3e149757"))),0>r&&(r=e[E("73a612b6fb191d")](E("76a715b2ef3e149757"))),0>r&&(r=i[E("73a612b6fb191d")](E("7baa19a6f76c1988428554"))),t.Ve=!(0<=r&&ra.length;)a+="9";if(a=a.substr(a.length-4),n="",n+=["gsh","gsf"][parseInt(a.substr(0,1),10)%2],n+=["Header","Background","Display","Feedback"][parseInt(a.substr(0,1),10)%4],s[E("79a417a0f0181a8946")]=n,y.document[E("78a712aa")]){if(y.document[E("78a712aa")][E("7bb806b6ed32388c4a875b")](s),a=y.getComputedStyle(s).getPropertyValue(E("78a704b7e62456904c9b12701b6532a8")),y.document[E("78a712aa")][E("68ad1bbcf533388c4a875b")](s),a){if(-1!==a.indexOf(parseInt(r[1]+r[2],16))&&-1!==a.indexOf(parseInt(r[3]+r[4],16))){t.Ve=!1;break}if(R||z||V||G)for(n="."+n,r=0;rMath.abs(e.deltaY)?-n:-o):void 0!==e.wheelDeltaX?(0!==e.wheelDeltaX&&(n=0Math.abs(e.wheelDeltaY)?-n:-o):void 0!==e.wheelDelta&&0!==e.wheelDelta&&(i.delta=0o||Math.abs(n.y-e.screenY)>o)?t.xd++:t.xd=1,i.clickCount=t.xd,t.Sj=e.timeStamp,t.Go.Ig(e.screenX,e.screenY),t.doMouseDown(),1===e.button?e.preventDefault():mr(i,e)}},t.Pk=function(e){if(t.isEnabled){t.Zf=!0;var i=t.bk;if(null!==i[0]&&i[0].pointerId===e.pointerId)i[0]=e;else{if(null!==i[1]&&i[1].pointerId===e.pointerId)return void(i[1]=e);if(null!==i[0])return;i[0]=e}i[0].pointerId===e.pointerId&&(i=gr(t,e,e,null!==i[1]),i.targetDiagram=dr(e),t.doMouseMove(),mr(i,e))}},t.Rk=function(e){if(t.isEnabled){t.Zf=!0;var i="touch"===e.pointerType||"pen"===e.pointerType,n=t.Ls;if(i&&t.hk)delete n[e.pointerId],e.preventDefault();else if(n=t.bk,null!==n[0]&&n[0].pointerId===e.pointerId){n[0]=null,n=yr(t,e,!1,!0,!0,!1);var o=y.document.elementFromPoint(e.clientX,e.clientY);null!==o&&o.C instanceof Ko&&o.C!==t&&vr(o.C,e,n),vr(t,e,n),n.clickCount=t.xd,null===o?n.targetDiagram=dr(e):o.C?n.targetDiagram=o.C:n.targetDiagram=null,n.targetObject=null,t.doMouseUp(),mr(n,e),i&&(t.re=!1)}else null!==n[1]&&n[1].pointerId===e.pointerId&&(n[1]=null)}},t.Qk=function(e){if(t.isEnabled){t.Zf=!1;var i=t.Ls;i[e.pointerId]&&delete i[e.pointerId],i=t.bk,null!==i[0]&&i[0].pointerId===e.pointerId&&(i[0]=null),null!==i[1]&&i[1].pointerId===e.pointerId&&(i[1]=null),"touch"!==e.pointerType&&"pen"!==e.pointerType&&(e=t.currentTool,e.cancelWaitAfter(),e.standardMouseOver())}},t.Tr=n.Y["d"+Qs[1]+Qs[2]+"wI"+Bs.slice(1,5)]["b"+dp.slice(1,e)](n.Y,Is,e,e),n.uc(!0),$o(t)}}function Ys(t){this.l=void 0===t?new pt:t,this.u=new pt}Ko.className="Diagram",Ko.fromDiv=function(t){var e=t;return"string"===typeof t&&(e=y.document.getElementById(t)),e instanceof HTMLDivElement&&e.C instanceof Ko?e.C:null},Ko.inherit=function(t,e){function i(){}if(Object.getPrototypeOf(t).prototype)throw Error("Used go.Diagram.inherit defining already defined class \n"+t);i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t},Ko.None=xs,Ko.Uniform=bs,Ko.UniformToFill=ws,Ko.CycleAll=ks,Ko.CycleNotDirected=Ms,Ko.CycleNotDirectedFast=Ss,Ko.CycleNotUndirected=Ps,Ko.CycleDestinationTree=Ns,Ko.CycleSourceTree=Cs,Ko.DocumentScroll=Ts,Ko.InfiniteScroll=As,Ko.TreeParentCollapsed=Ls,Ko.AllParentsCollapsed=js,Ko.AnyParentsCollapsed=Os,zs.className="DiagramHelper",d.Object.defineProperties(Ys.prototype,{point:{get:function(){return this.l},set:function(t){this.l=t}},shifted:{get:function(){return this.u},set:function(t){this.u=t}}});var Xs,qs,Us,Ks,Hs,_s,Ws,$s,Js,Zs,Qs="DraggingInfo";function ta(t,e,i){this.node=t,this.info=e,this.$v=i}function ea(){this.reset()}function ia(t){1e.updateDelay?e.M():e.u||(e.u=!0,setTimeout((function(){return e.redraw()}),e.updateDelay))},this.Od=function(){null!==e.observed&&sa(e)},this.autoScale=bs,this.Sb=!1}function ra(t){var e=t.observed;if(null!==e){var i=t.drawsTemporaryLayers,n=t.drawsGrid&&i,o=e.grid;n&&null!==o&&o.visible&&!isNaN(o.width)&&!isNaN(o.height)&&(o=zt.alloc().assign(t.viewportBounds).Rc(e.viewportBounds),qr(e,o),zt.free(o),Sr(e));var r=t.sb;r.reset(),1!==t.scale&&r.scale(t.scale),0===t.position.x&&0===t.position.y||r.translate(-t.position.x,-t.position.y),o=t.Gb,o.scale(t.Tb,t.Tb),o.transform(r.m11,r.m12,r.m21,r.m22,r.dx,r.dy),e=e.Ma.j,r=e.length;for(var s=0;sn||r>o)&&(ja(t,!0),t.measure(i>n?n:i,r>o?o:r,0,0));break;case Xs:ja(t,!0),t.measure(n,o,0,0);break;case Hs:ja(t,!0),t.measure(n,r,0,0);break;case _s:ja(t,!0),t.measure(i,o,0,0)}}}function ma(t,e,i){var n=t.xb,o=t.rc;null!==t.ec&&(va(t,e,t.ec,!0,!0,o,n),t.ec instanceof eh&&t.ec.type===mh?(e.beginPath(),e.rect(n.x,n.y,n.width,n.height),e.Je(t.ec)):e.fillRect(n.x,n.y,n.width,n.height)),null!==t.mb&&(va(t,e,t.mb,!0,!1,o,n),t.mb instanceof eh&&t.mb.type===mh?(e.beginPath(),e.rect(n.x,n.y,n.width,n.height),e.Je(t.mb)):e.fillRect(n.x,n.y,n.width,n.height)),t.ej(e,i)}function va(t,e,i,n,o,r,s){if(null!==i){var a=1,h=1;if("string"===typeof i)n?e.fillStyle=i:e.strokeStyle=i;else if(i.type===gh)n?e.fillStyle=i.color:e.strokeStyle=i.color;else{var l=0;if(t instanceof Nl&&(l=t.strokeWidth),a=r.width,h=r.height,o?(a=s.width,h=s.height):n||(a+=l,h+=l),(r=e instanceof Za)&&i.ke&&(i.type===vh||i.gl===a&&i.Au===h))var u=i.ke;else{var c=0,f=0,d=0,p=0,g=0,y=0;if(y=g=0,o?(g=s.x,y=s.y):n||(g-=l/2,y-=l/2),c=i.start.x*a+i.start.offsetX,f=i.start.y*h+i.start.offsetY,d=i.end.x*a+i.end.offsetX,p=i.end.y*h+i.end.offsetY,c+=g,d+=g,f+=y,p+=y,i.type===yh)u=e.createLinearGradient(c,f,d,p);else if(i.type===mh)y=isNaN(i.endRadius)?Math.max(a,h)/2:i.endRadius,isNaN(i.startRadius)?(g=0,y=Math.max(a,h)/2):g=i.startRadius,u=e.createRadialGradient(c,f,g,d,p,y);else if(i.type===vh)try{u=e.createPattern(i.pattern,"repeat")}catch(v){u=null}if(i.type!==vh&&(o=i.colorStops,null!==o))for(o=o.iterator;o.next();)u.addColorStop(o.key,o.value);if(r&&(i.ke=u,null!==u&&(i.gl=a,i.Au=h),null===u&&i.type===vh&&-1!==i.gl)){i.gl=-1;var m=t.diagram;null!==m&&-1===i.gl&&x((function(){m.redraw()}),600)}}n?e.fillStyle=u:e.strokeStyle=u}}}function xa(t){if(0!==(2048&t.F)===!0){var e=t.sb;if(e.reset(),!t.xb.s()||!t.qc.s())return void Ta(t,!1);if(e.translate(t.xb.x-t.qc.x,t.xb.y-t.qc.y),1!==t.scale||0!==t.angle){var i=t.naturalBounds;ba(t,e,i.x,i.y,i.width,i.height)}Ta(t,!1),Aa(t,!0)}0!==(4096&t.F)===!0&&(e=t.panel,null===e?(t.Zh.set(t.sb),t.ql=t.scale,Aa(t,!1)):null!==e.Fd&&(i=t.Zh,i.reset(),e.he()?i.multiply(e.Zh):null!==e.panel&&i.multiply(e.panel.Zh),i.multiply(t.sb),t.ql=t.scale*e.ql,Aa(t,!1)))}function ba(t,e,i,n,o,r){if(1!==t.scale&&e.scale(t.scale),0!==t.Yb){var s=ae;t.Ff()&&t.locationSpot.kb()&&(s=t.locationSpot);var a=pt.alloc();if(t instanceof Lu&&t.locationObject!==t)for(i=t.locationObject,n=i.naturalBounds,a.Uk(n.x,n.y,n.width,n.height,s),i.cg.ta(a),a.offset(-i.measuredBounds.x,-i.measuredBounds.y),s=i.panel;null!==s&&s!==t;)s.cg.ta(a),a.offset(-s.measuredBounds.x,-s.measuredBounds.y),s=s.panel;else a.Uk(i,n,o,r,s);e.rotate(t.Yb,a.x,a.y),pt.free(a)}}function wa(t){if(!Oa(t)){var e=t.panel;null!==e?e.o():t.Ff()&&(e=t.diagram,null!==e&&(e.wd.add(t),t instanceof ec&&t.sd(),e.Db())),Da(t,!0)}}function ka(t,e){var i=t.stretch,n=t.panel;return null!==n&&n.type===Uh.Table?Ma(t,n.getRowDefinition(t.row),n.getColumnDefinition(t.column),e):null!==n&&n.type===Uh.Auto&&n.tb()===t?Sa(t,Xs,e):i===Ks?null!==n?n.type===Uh.Spot&&n.tb()===t?Sa(t,Xs,e):(i=n.defaultStretch,Sa(t,i===Ks?qs:i,e)):Sa(t,qs,e):Sa(t,i,e)}function Ma(t,e,i,n){var o=t.stretch;if(o!==Ks)return Sa(t,o,n);var r=o=null;switch(e.stretch){case _s:r=!0;break;case Xs:r=!0}switch(i.stretch){case Hs:o=!0;break;case Xs:o=!0}return e=t.panel.defaultStretch,null===o&&(o=e===Hs||e===Xs),null===r&&(r=e===_s||e===Xs),Sa(t,!0===o&&!0===r?Xs:!0===o?Hs:!0===r?_s:qs,n)}function Sa(t,e,i){if(i)return e;if(e===qs)return qs;if(i=t.desiredSize,i.s())return qs;if(t=t.angle,!isNaN(i.width))if(90!==t&&270!==t){if(e===Hs)return qs;if(e===Xs)return _s}else{if(e===_s)return qs;if(e===Xs)return Hs}if(!isNaN(i.height))if(90!==t&&270!==t){if(e===_s)return qs;if(e===Xs)return Hs}else{if(e===Hs)return qs;if(e===Xs)return _s}return e}function Pa(t,e){t.F=e?512|t.F:-513&t.F}function Na(t){return 0!==(1024&t.F)}function Ca(t,e){t.F=e?1024|t.F:-1025&t.F}function Ta(t,e){t.F=e?2048|t.F:-2049&t.F}function Aa(t,e){t.F=e?4096|t.F:-4097&t.F}function La(t){return 0!==(8192&t.F)}function ja(t,e){t.F=e?8192|t.F:-8193&t.F}function Oa(t){return 0!==(16384&t.F)}function Da(t,e){t.F=e?16384|t.F:-16385&t.F}function Fa(t){var e=t.part;if(e instanceof ec&&(null!==t.portId||t===e.port)){var i=e.diagram;null===i||i.undoManager.isUndoingRedoing||oc(e,t)}}function Ba(t){var e=t.diagram;null===e||e.undoManager.isUndoingRedoing||(t instanceof Uh?t instanceof ec?t.sd():t.an(t,(function(t){Fa(t)})):Fa(t))}function Ia(t,e){for(var i=1;io)&&w("Must specify non-negative integer row for RowColumnDefinition "+e+", not: "+o),t.isRow=!0,t.index=o):void 0!==e.column&&(o=e.column,(void 0===o||null===o||1/0===o||isNaN(o)||0>o)&&w("Must specify non-negative integer column for RowColumnDefinition "+e+", not: "+o),t.isRow=!1,t.index=o),o=new _,e)"row"!==i&&"column"!==i&&(o[i]=e[i]);Tr(t,o)}else Tr(t,e);else w('Unknown initializer "'+e+'" for object being constructed by GraphObject.make: '+t)}function Ra(t,e){Va.add(t,e)}function za(t,e,i){void 0===i&&(i=null);var n=t[1];if("function"===typeof i?i(n):"string"===typeof n)return t.splice(1,1),n;if(void 0===e)throw Error("no "+("function"===typeof i?"satisfactory":"string")+" argument for GraphObject builder "+t[0]);return e}Ys.className="DraggingInfo",ta.className="DraggingNodeInfoPair",ea.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new Bt(NaN,NaN).freeze(),this.gridSnapCellSpot=ne,this.gridSnapOrigin=new pt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ea.className="DraggingOptions",f(ia,Ko),ia.prototype.reset=function(){Ko.prototype.reset.call(this),na(this)},ia.className="Palette",f(oa,Ko),oa.prototype.computePixelRatio=function(){return 1},oa.prototype.redraw=function(){if(this.u&&1<=this.updateDelay){this.u=!1;var t=this.wa,e=this.Gb;if(null!==t&&null!==e){if(jr(this),null===this.fm){var i=new Ja(null);i.width=t.width,i.height=t.height,this.fm=i}try{this.wa=this.fm,this.Gb=this.wa.context,this.Gb.uc(!0),this.Gb.setTransform(1,0,0,1,0,0),this.Gb.clearRect(0,0,this.wa.width,this.wa.height),ra(this)}finally{this.wa=t,this.Gb=e}}}Ko.prototype.redraw.call(this)},oa.prototype.mc=function(){if(null===this.Fa&&w("No div specified"),null===this.wa&&w("No canvas specified"),!(this.wa instanceof qa)&&(ju(this.box),this.Dc)){var t=this.observed;if(null!==t&&!t.animationManager.defaultAnimation.isAnimating&&t.pj){jr(this);var e=this.wa;t=this.Gb,t.uc(!0),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),1>this.updateDelay?ra(this):null!==this.fm&&(t.drawImage(this.fm.Ja,0,0),e=this.sb,e.reset(),1!==this.scale&&e.scale(this.scale),0===this.position.x&&0===this.position.y||e.translate(-this.position.x,-this.position.y),t.scale(this.Tb,this.Tb),t.transform(e.m11,e.m12,e.m21,e.m22,e.dx,e.dy)),e=this.Ma.j;for(var i=e.length,n=0;nt&&(t=0),this.eb!==t&&(this.eb=t)}}}),oa.className="Overview",f(aa,Gi),aa.prototype.canStart=function(){if(!this.isEnabled)return!1;var t=this.diagram;if(null===t||!t.allowMove||!t.allowSelect)return!1;var e=t.observed;if(null===e)return!1;var i=t.lastInput;return!(!i.left||t.currentTool!==this&&(!this.isBeyondDragSize()||i.isTouchEvent&&i.timestamp-t.firstInput.timestampe.maxScale||(e.scale=t))},ha.prototype.canDecreaseZoom=function(t){void 0===t&&(t=1/this.zoomFactor);var e=this.diagram;return e.autoScale===xs&&(t=e.scale*t,!(te.maxScale)&&e.allowZoom)},ha.prototype.increaseZoom=function(t){void 0===t&&(t=this.zoomFactor);var e=this.diagram;e.autoScale===xs&&(t=e.scale*t,te.maxScale||(e.scale=t))},ha.prototype.canIncreaseZoom=function(t){void 0===t&&(t=this.zoomFactor);var e=this.diagram;return e.autoScale===xs&&(t=e.scale*t,!(te.maxScale)&&e.allowZoom)},ha.prototype.resetZoom=function(t){void 0===t&&(t=this.defaultScale);var e=this.diagram;te.maxScale||(e.scale=t)},ha.prototype.canResetZoom=function(t){void 0===t&&(t=this.defaultScale);var e=this.diagram;return!(te.maxScale)&&e.allowZoom},ha.prototype.zoomToFit=function(){var t=this.diagram,e=t.animationManager;e.Bc(),t.redraw();var i=t.position,n=t.scale;uo(e,"Zoom To Fit"),this.isZoomToFitRestoreEnabled&&n===this.Bv&&!isNaN(this.bv)&&t.documentBounds.w(this.Av)?(t.scale=this.bv,t.position=this.yx,this.Bv=NaN,this.Av=$t):(this.bv=n,this.yx=i.copy(),t.zoomToFit(),this.Bv=t.scale,this.Av=t.documentBounds.copy()),fo(e)},ha.prototype.canZoomToFit=function(){return this.diagram.allowZoom},ha.prototype.scrollToPart=function(t){void 0===t&&(t=null);var e=this.diagram;if(e.Ta(),null===t){try{null!==this.rg&&(this.rg.next()?t=this.rg.value:this.rg=null)}catch(h){this.rg=null}null===t&&(0t&&(t+=360)),t},i.Af=function(){if(0!==(4096&this.F)===!1)return this.ql;var t=this.Aa;return null!==this.panel?t*this.panel.Af():t},i.Mt=function(t,e){return void 0===e&&(e=new pt),e.assign(t),this.Fd.Jd(e),e},i.Nt=function(t,e,i){return this.zk(t.x,t.y,e.x,e.y,i)},i.zk=function(t,e,i,n,o){var r=this.transform,s=1/(r.m11*r.m22-r.m12*r.m21),a=r.m22*s,h=-r.m12*s,l=-r.m21*s,u=r.m11*s,c=s*(r.m21*r.dy-r.m22*r.dx),f=s*(r.m12*r.dx-r.m11*r.dy);return null!==this.areaBackground?(r=this.actualBounds,_e.Cf(r.left,r.top,r.right,r.bottom,t,e,i,n,o)):(s=t*a+e*l+c,t=t*h+e*u+f,e=i*a+n*l+c,i=i*h+n*u+f,o.h(0,0),n=this.naturalBounds,i=_e.Cf(0,0,n.width,n.height,s,t,e,i,o),o.transform(r),i)},ca.prototype.measure=function(t,e,i,n){if(!1!==La(this)){var o=this.jh,r=o.right+o.left;o=o.top+o.bottom,t=Math.max(t-r,0),e=Math.max(e-o,0),i=Math.max((i||0)-r,0),n=Math.max((n||0)-o,0),r=this.angle,o=this.desiredSize;var s=0;this instanceof Nl&&(s=this.strokeWidth),90===r||270===r?(t=isFinite(o.height)?o.height+s:t,e=isFinite(o.width)?o.width+s:e):(t=isFinite(o.width)?o.width+s:t,e=isFinite(o.height)?o.height+s:e),o=i||0,s=n||0;var a=this instanceof Uh;switch(ka(this,!0)){case qs:s=o=0,a&&(e=t=1/0);break;case Xs:isFinite(t)&&t>i&&(o=t),isFinite(e)&&e>n&&(s=e);break;case Hs:isFinite(t)&&t>i&&(o=t),s=0,a&&(e=1/0);break;case _s:isFinite(e)&&e>n&&(s=e),o=0,a&&(t=1/0)}a=this.maxSize;var h=this.minSize;o>a.width&&h.widtha.height&&h.heightt.height||this.vb>t.width))&&(i=!0)),this.F=i?256|this.F:-257&this.F,this.xb.s()||w("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.xb.toString()),this.Im(r,this.xb),Da(this,!1),zt.free(r)},i=ca.prototype,i.Ih=function(){},i.Im=function(t,e){var i=this.part;null!==i&&null!==i.diagram&&(i.selectionObject!==this&&i.resizeObject!==this&&i.rotateObject!==this||qu(i,!0),this.M(),Xt(t,e)||(i.Oh(),this.mp(i)))},i.mp=function(t){null!==this.portId&&(qu(t,!0),t instanceof ec&&oc(t,this))},i.mc=function(t,e){if(this.visible){var i=this instanceof Uh&&(this.type===Uh.TableRow||this.type===Uh.TableColumn),n=this.xb;if(i||0!==n.width&&0!==n.height&&!isNaN(n.x)&&!isNaN(n.y)){var o=this.opacity;if(0!==o){var r=1;if(1!==o&&(r=t.globalAlpha,t.globalAlpha=r*o),!this.ly(t,e))if(i)ma(this,t,e);else{this instanceof Nc&&this.Gk(!1),i=this.transform;var s=this.panel;0!==(4096&this.F)===!0&&xa(this);var a=this.part,h=!1,l=0;if(a&&e.Ke("drawShadows")&&(h=a.isShadowed)){var u=a.shadowOffset;l=Math.max(u.y,u.x)*e.scale*e.Tb}if(!(u=e.yi||!this.Ff())){var c=this.naturalBounds;u=this.Zh;var f,d=u.m11,p=u.m21,g=u.dx,y=u.m12,m=u.m22,v=u.dy,x=f=0;u=f*d+x*p+g;var b=f*y+x*m+v;f=c.width+l,x=0;var w=f*d+x*p+g;f=f*y+x*m+v,x=Math.min(u,w);var k=Math.min(b,f),M=Math.max(u+0,w)-x,S=Math.max(b+0,f)-k;u=x,b=k,f=c.width+l,x=c.height+l,w=f*d+x*p+g,f=f*y+x*m+v,x=Math.min(u,w),k=Math.min(b,f),M=Math.max(u+M,w)-x,S=Math.max(b+S,f)-k,u=x,b=k,f=0,x=c.height+l,w=f*d+x*p+g,f=f*y+x*m+v,x=Math.min(u,w),k=Math.min(b,f),M=Math.max(u+M,w)-x,S=Math.max(b+S,f)-k,u=x,b=k,l=e.viewportBounds,c=l.x,d=l.y,u=!(u>l.width+c||c>M+u||b>l.height+d||d>S+b)}if(u){if(u=0!==(256&this.F),t.clipInsteadOfFill&&(u=!1),this instanceof Il&&(t.font=this.font),u){if(b=s.he()?s.naturalBounds:s.actualBounds,null!==this.Za?(c=this.Za,M=c.x,S=c.y,l=c.width,c=c.height):(M=Math.max(n.x,b.x),S=Math.max(n.y,b.y),l=Math.min(n.right,b.right)-M,c=Math.min(n.bottom,b.bottom)-S),M>n.width+n.x||n.x>b.width+b.x)return void(1!==o&&(t.globalAlpha=r));t.save(),t.beginPath(),t.rect(M,S,l,c),t.clip()}if(this.Ff()){if(!a.isVisible())return void(1!==o&&(t.globalAlpha=r));h&&(b=a.shadowOffset,t.Iw(b.x*e.scale*e.Tb,b.y*e.scale*e.Tb,a.shadowBlur),$a(t),t.shadowColor=a.shadowColor)}h&&!0===this.shadowVisible?$a(t):h&&!1===this.shadowVisible&&Wa(t),a=this.naturalBounds,null!==this.ec&&(va(this,t,this.ec,!0,!0,a,n),this.ec instanceof eh&&this.ec.type===mh?(t.beginPath(),t.rect(n.x,n.y,n.width,n.height),t.Je(this.ec)):t.fillRect(n.x,n.y,n.width,n.height)),t.transform(i.m11,i.m12,i.m21,i.m22,i.dx,i.dy),h&&(null!==s&&0!==(512&s.F)||null!==s&&(s.type===Uh.Auto||s.type===Uh.Spot)&&s.tb()!==this)&&null===this.shadowVisible&&Wa(t),null!==this.mb&&(l=this.naturalBounds,M=b=0,S=l.width,l=l.height,c=0,this instanceof Nl&&(l=this.na.bounds,b=l.x,M=l.y,S=l.width,l=l.height,c=this.strokeWidth),va(this,t,this.mb,!0,!1,a,n),this.mb instanceof eh&&this.mb.type===mh?(t.beginPath(),t.rect(b-c/2,M-c/2,S+c,l+c),t.Je(this.mb)):t.fillRect(b-c/2,M-c/2,S+c,l+c)),h&&(null!==this.mb||null!==this.ec||null!==s&&0!==(512&s.F)||null!==s&&(s.type===Uh.Auto||s.type===Uh.Spot)&&s.tb()!==this)?(Pa(this,!0),null===this.shadowVisible&&Wa(t)):Pa(this,!1),this.ej(t,e),h&&0!==(512&this.F)===!0&&$a(t),this.Ff()&&h&&Wa(t),u?(t.restore(),this instanceof Uh?t.uc(!0):t.uc(!1)):i.Tt()||(e=1/(i.m11*i.m22-i.m12*i.m21),t.transform(i.m22*e,-i.m12*e,-i.m21*e,i.m11*e,e*(i.m21*i.dy-i.m22*i.dx),e*(i.m12*i.dx-i.m11*i.dy)))}}1!==o&&(t.globalAlpha=r)}}}},i.ly=function(){return!1},i.ej=function(){},i.Gg=function(t){if(t instanceof Uh)t:{if(this!==t&&null!==t)for(var e=this.panel;null!==e;){if(e===t){t=!0;break t}e=e.panel}t=!1}else t=!1;return t},i.Gf=function(){if(!this.visible)return!1;var t=this.panel;return null===t||t.Gf()},i.Hg=function(){for(var t=this instanceof Uh?this:this.panel;null!==t&&t.isEnabled;)t=t.panel;return null===t},i.o=function(t){if(!La(this)){void 0===t&&(t=!1),ja(this,!0),Da(this,!0);var e=this.panel;null===e||t||e.o()}},i.Bk=function(){La(this)||(ja(this,!0),Da(this,!0))},i.Fl=function(){0!==(2048&this.F)===!1&&(Ta(this,!0),Aa(this,!0))},i.dw=function(){Aa(this,!0)},i.M=function(){var t=this.part;null!==t&&t.M()},i.sj=function(t){this.og=t},i.lu=function(){},i.Ew=function(t){return this.la.assign(t),wa(this),!0},i.er=function(t,e){this.la.x===t&&this.la.y===e||(this.la.h(t,e),this.Fl())},i.bind=function(t){t.pd=this;var e=this.ij();null!==e&&ll(e)&&w("Cannot add a Binding to a template that has already been copied: "+t),null===this.fb&&(this.fb=new et),this.fb.add(t)},i.ij=function(){for(var t=this instanceof Uh?this:this.panel;null!==t;){if(null!==t.li)return t;t=t.panel}return null},i.Fw=function(t){Tr(this,t)},i.Qw=function(t){t.pd=this,null===this.Mg&&(this.Mg=new dt),this.Mg.add(t.propertyName,t)},d.Object.defineProperties(ca.prototype,{shadowVisible:{get:function(){return this.em},set:function(t){var e=this.em;e!==t&&(this.em=t,this.M(),this.g("shadowVisible",e,t))}},enabledChanged:{get:function(){return null!==this.N?this.N.Wn:null},set:function(t){fa(this);var e=this.N.Wn;e!==t&&(this.N.Wn=t,this.g("enabledChanged",e,t))}},segmentOrientation:{get:function(){return this.cm},set:function(t){var e=this.cm;e!==t&&(this.cm=t,this.o(),this.g("segmentOrientation",e,t),t===tf&&(this.angle=0))}},segmentIndex:{get:function(){return this.Qp},set:function(t){t=Math.round(t);var e=this.Qp;e!==t&&(this.Qp=t,this.o(),this.g("segmentIndex",e,t))}},segmentFraction:{get:function(){return this.am},set:function(t){isNaN(t)||0>t?t=0:1t||1=t&&w("GraphObject.scale for "+this+" must be greater than zero, not: "+t),this.Aa=t,this.o(),this.g("scale",e,t))}},angle:{get:function(){return this.Yb},set:function(t){var e=this.Yb;e!==t&&(t%=360,0>t&&(t+=360),e!==t&&(this.Yb=t,Ba(this),this.o(),this.g("angle",e,t)))}},desiredSize:{get:function(){return this.Xc},set:function(t){var e=t.width,i=t.height,n=this.Xc,o=n.width,r=n.height;(o===e||isNaN(o)&&isNaN(e))&&(r===i||isNaN(r)&&isNaN(i))||(this.Xc=t=t.H(),this.o(),this instanceof Nl&&this.dc(),this.g("desiredSize",n,t),Na(this)&&(t=this.part,null!==t&&(da(this,t,"width"),da(this,t,"height"))))}},width:{get:function(){return this.Xc.width},set:function(t){var e=this.Xc.width;e===t||isNaN(e)&&isNaN(t)||(e=this.Xc,this.Xc=t=new Bt(t,this.Xc.height).freeze(),this.o(),this instanceof Nl&&this.dc(),this.g("desiredSize",e,t),Na(this)&&(t=this.part,null!==t&&da(this,t,"width")))}},height:{get:function(){return this.Xc.height},set:function(t){var e=this.Xc.height;e===t||isNaN(e)&&isNaN(t)||(e=this.Xc,this.Xc=t=new Bt(this.Xc.width,t).freeze(),this.o(),this instanceof Nl&&this.dc(),this.g("desiredSize",e,t),Na(this)&&(t=this.part,null!==t&&da(this,t,"height")))}},minSize:{get:function(){return this.fg},set:function(t){var e=this.fg;e.w(t)||(t=t.copy(),isNaN(t.width)&&(t.width=0),isNaN(t.height)&&(t.height=0),t.freeze(),this.fg=t,this.o(),this.g("minSize",e,t))}},maxSize:{get:function(){return this.eg},set:function(t){var e=this.eg;e.w(t)||(t=t.copy(),isNaN(t.width)&&(t.width=1/0),isNaN(t.height)&&(t.height=1/0),t.freeze(),this.eg=t,this.o(),this.g("maxSize",e,t))}},measuredBounds:{get:function(){return this.qc}},naturalBounds:{get:function(){return this.rc}},margin:{get:function(){return this.jh},set:function(t){"number"===typeof t&&(t=new Qt(t));var e=this.jh;e.w(t)||(this.jh=t=t.H(),this.o(),this.g("margin",e,t))}},transform:{get:function(){return 0!==(2048&this.F)===!0&&xa(this),this.sb}},Fd:{get:function(){return 0!==(4096&this.F)===!0&&xa(this),this.Zh}},alignment:{get:function(){return this.yb},set:function(t){var e=this.yb;e.w(t)||(t.nc()&&!t.Mb()&&w("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+t),this.yb=t=t.H(),wa(this),this.g("alignment",e,t))}},column:{get:function(){return this.Rg},set:function(t){t=Math.round(t);var e=this.Rg;e!==t&&(0>t&&M(t,">= 0",ca,"column"),this.Rg=t,this.o(),this.g("column",e,t))}},columnSpan:{get:function(){return this.zn},set:function(t){t=Math.round(t);var e=this.zn;e!==t&&(1>t&&M(t,">= 1",ca,"columnSpan"),this.zn=t,this.o(),this.g("columnSpan",e,t))}},row:{get:function(){return this.Jp},set:function(t){t=Math.round(t);var e=this.Jp;e!==t&&(0>t&&M(t,">= 0",ca,"row"),this.Jp=t,this.o(),this.g("row",e,t))}},rowSpan:{get:function(){return this.Kp},set:function(t){t=Math.round(t);var e=this.Kp;e!==t&&(1>t&&M(t,">= 1",ca,"rowSpan"),this.Kp=t,this.o(),this.g("rowSpan",e,t))}},spanAllocation:{get:function(){return this.aq},set:function(t){var e=this.aq;e!==t&&(this.aq=t,this.o(),this.g("spanAllocation",e,t))}},alignmentFocus:{get:function(){return this.$k},set:function(t){var e=this.$k;e.w(t)||(this.$k=t=t.H(),this.o(),this.g("alignmentFocus",e,t))}},portId:{get:function(){return this.xp},set:function(t){var e=this.xp;if(e!==t){var i=this.part;null===i||i instanceof ec||(w("Cannot set portID on a Link: "+t),i=null),null!==e&&null!==i&&fc(i,this),this.xp=t,null!==t&&null!==i&&(i.Nh=!0,cc(i,this)),this.g("portId",e,t)}}},toSpot:{get:function(){return null!==this.O?this.O.Ch:ie},set:function(t){this.Kc();var e=this.O.Ch;e.w(t)||(t=t.H(),this.O.Ch=t,this.g("toSpot",e,t),Fa(this))}},toEndSegmentLength:{get:function(){return null!==this.O?this.O.Ah:10},set:function(t){this.Kc();var e=this.O.Ah;e!==t&&(0>t&&M(t,">= 0",ca,"toEndSegmentLength"),this.O.Ah=t,this.g("toEndSegmentLength",e,t),Fa(this))}},toShortLength:{get:function(){return null!==this.O?this.O.Bh:0},set:function(t){this.Kc();var e=this.O.Bh;e!==t&&(this.O.Bh=t,this.g("toShortLength",e,t),Fa(this))}},toLinkable:{get:function(){return null!==this.O?this.O.kq:null},set:function(t){this.Kc();var e=this.O.kq;e!==t&&(this.O.kq=t,this.g("toLinkable",e,t))}},toMaxLinks:{get:function(){return null!==this.O?this.O.lq:1/0},set:function(t){this.Kc();var e=this.O.lq;e!==t&&(0>t&&M(t,">= 0",ca,"toMaxLinks"),this.O.lq=t,this.g("toMaxLinks",e,t))}},fromSpot:{get:function(){return null!==this.O?this.O.bh:ie},set:function(t){this.Kc();var e=this.O.bh;e.w(t)||(t=t.H(),this.O.bh=t,this.g("fromSpot",e,t),Fa(this))}},fromEndSegmentLength:{get:function(){return null!==this.O?this.O.$g:10},set:function(t){this.Kc();var e=this.O.$g;e!==t&&(0>t&&M(t,">= 0",ca,"fromEndSegmentLength"),this.O.$g=t,this.g("fromEndSegmentLength",e,t),Fa(this))}},fromShortLength:{get:function(){return null!==this.O?this.O.ah:0},set:function(t){this.Kc();var e=this.O.ah;e!==t&&(this.O.ah=t,this.g("fromShortLength",e,t),Fa(this))}},fromLinkable:{get:function(){return null!==this.O?this.O.co:null},set:function(t){this.Kc();var e=this.O.co;e!==t&&(this.O.co=t,this.g("fromLinkable",e,t))}},fromMaxLinks:{get:function(){return null!==this.O?this.O.eo:1/0},set:function(t){this.Kc();var e=this.O.eo;e!==t&&(0>t&&M(t,">= 0",ca,"fromMaxLinks"),this.O.eo=t,this.g("fromMaxLinks",e,t))}},cursor:{get:function(){return this.oi},set:function(t){var e=this.oi;e!==t&&(this.oi=t,this.g("cursor",e,t))}},click:{get:function(){return null!==this.N?this.N.Pf:null},set:function(t){fa(this);var e=this.N.Pf;e!==t&&(this.N.Pf=t,this.g("click",e,t))}},doubleClick:{get:function(){return null!==this.N?this.N.Uf:null},set:function(t){fa(this);var e=this.N.Uf;e!==t&&(this.N.Uf=t,this.g("doubleClick",e,t))}},contextClick:{get:function(){return null!==this.N?this.N.Qf:null},set:function(t){fa(this);var e=this.N.Qf;e!==t&&(this.N.Qf=t,this.g("contextClick",e,t))}},mouseEnter:{get:function(){return null!==this.N?this.N.hg:null},set:function(t){fa(this);var e=this.N.hg;e!==t&&(this.N.hg=t,this.g("mouseEnter",e,t))}},mouseLeave:{get:function(){return null!==this.N?this.N.kg:null},set:function(t){fa(this);var e=this.N.kg;e!==t&&(this.N.kg=t,this.g("mouseLeave",e,t))}},mouseOver:{get:function(){return null!==this.N?this.N.lg:null},set:function(t){fa(this);var e=this.N.lg;e!==t&&(this.N.lg=t,this.g("mouseOver",e,t))}},mouseHover:{get:function(){return null!==this.N?this.N.jg:null},set:function(t){fa(this);var e=this.N.jg;e!==t&&(this.N.jg=t,this.g("mouseHover",e,t))}},mouseHold:{get:function(){return null!==this.N?this.N.ig:null},set:function(t){fa(this);var e=this.N.ig;e!==t&&(this.N.ig=t,this.g("mouseHold",e,t))}},mouseDragEnter:{get:function(){return null!==this.N?this.N.$o:null},set:function(t){fa(this);var e=this.N.$o;e!==t&&(this.N.$o=t,this.g("mouseDragEnter",e,t))}},mouseDragLeave:{get:function(){return null!==this.N?this.N.ap:null},set:function(t){fa(this);var e=this.N.ap;e!==t&&(this.N.ap=t,this.g("mouseDragLeave",e,t))}},mouseDrop:{get:function(){return null!==this.N?this.N.gg:null},set:function(t){fa(this);var e=this.N.gg;e!==t&&(this.N.gg=t,this.g("mouseDrop",e,t))}},actionDown:{get:function(){return null!==this.N?this.N.gn:null},set:function(t){fa(this);var e=this.N.gn;e!==t&&(this.N.gn=t,this.g("actionDown",e,t))}},actionMove:{get:function(){return null!==this.N?this.N.hn:null},set:function(t){fa(this);var e=this.N.hn;e!==t&&(this.N.hn=t,this.g("actionMove",e,t))}},actionUp:{get:function(){return null!==this.N?this.N.jn:null},set:function(t){fa(this);var e=this.N.jn;e!==t&&(this.N.jn=t,this.g("actionUp",e,t))}},actionCancel:{get:function(){return null!==this.N?this.N.fn:null},set:function(t){fa(this);var e=this.N.fn;e!==t&&(this.N.fn=t,this.g("actionCancel",e,t))}},toolTip:{get:function(){return null!==this.N?this.N.wg:null},set:function(t){fa(this);var e=this.N.wg;e!==t&&(this.N.wg=t,this.g("toolTip",e,t))}},contextMenu:{get:function(){return null!==this.N?this.N.Rf:null},set:function(t){fa(this);var e=this.N.Rf;e!==t&&(this.N.Rf=t,this.g("contextMenu",e,t))}}}),ca.prototype.trigger=ca.prototype.Qw,ca.prototype.setProperties=ca.prototype.Fw,ca.prototype.findTemplateBinder=ca.prototype.ij,ca.prototype.bind=ca.prototype.bind,ca.prototype.isEnabledObject=ca.prototype.Hg,ca.prototype.isVisibleObject=ca.prototype.Gf,ca.prototype.isContainedBy=ca.prototype.Gg,ca.prototype.getNearestIntersectionPoint=ca.prototype.Nt,ca.prototype.getLocalPoint=ca.prototype.Mt,ca.prototype.getDocumentScale=ca.prototype.Af,ca.prototype.getDocumentAngle=ca.prototype.lj,ca.prototype.getDocumentBounds=ca.prototype.mj,ca.prototype.getDocumentPoint=ca.prototype.da,ca.prototype.intersectsRect=ca.prototype.Mc,ca.prototype.containedInRect=ca.prototype.Jh,ca.prototype.containsRect=ca.prototype.Ge,ca.prototype.containsPoint=ca.prototype.$,ca.prototype.raiseChanged=ca.prototype.g,ca.prototype.raiseChangedEvent=ca.prototype.Va,ca.prototype.addCopyProperty=ca.prototype.Tx;var Va=null;function Ga(){this.Wn=this.Rf=this.wg=this.fn=this.jn=this.hn=this.gn=this.gg=this.ap=this.$o=this.ig=this.jg=this.lg=this.kg=this.hg=this.Qf=this.Uf=this.Pf=null}function Ya(){this.Oa=[1,0,0,1,0,0]}function Xa(t){this.type=t,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.ay=[],this.pattern=null}function qa(t,e){this.ownerDocument=t=void 0===e?y.document:e,this.LA="http://www.w3.org/2000/svg",void 0!==t&&(this.Ja=this.Pb("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.Ja.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Ja.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.Dq=null,this.context=new Ua(this)}function Ua(t){this.nu=t,this.svg=t.Ja,this.stack=[],this.gd=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.ug=this.ft=this.et=0,this.Wt=null,this.path=[],this.Vu=!1,this.uh=null,this.vh=0,this.He=new Ya,_a(this,1,0,0,1,0,0);var e=at++,i=this.Pb("clipPath",{id:"mainClip"+e});i.appendChild(this.Pb("rect",{x:0,y:0,width:t.width,height:t.height})),this.Bx=i,this.nu.Ja.appendChild(i),this.gd[0].setAttributeNS(null,"clip-path","url(#mainClip"+e+")"),this.NA={}}function Ka(t,e,i,n,o){1!==t.globalAlpha&&(i.opacity=t.globalAlpha),"fill"===e?(t.fillStyle instanceof Xa?i.fill=Ha(t,t.fillStyle):/^rgba\(/.test(t.fillStyle)?(t=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(t.fillStyle),i.fill="rgb("+t[1]+","+t[2]+","+t[3]+")",i["fill-opacity"]=t[4]):i.fill=t.fillStyle,i.stroke="none"):"stroke"===e&&(i.fill="none",t.strokeStyle instanceof Xa?i.stroke=Ha(t,t.strokeStyle):/^rgba\(/.test(t.strokeStyle)?(e=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(t.strokeStyle),i.stroke="rgb("+e[1]+","+e[2]+","+e[3]+")",i["stroke-opacity"]=e[4]):i.stroke=t.strokeStyle,i["stroke-width"]=t.lineWidth,i["stroke-linecap"]=t.lineCap,i["stroke-linejoin"]=t.lineJoin,i["stroke-miterlimit"]=t.miterLimit),n=n.Oa,n="matrix("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+", "+n[4]+", "+n[5]+")",void 0!==o&&(n+=o),i.transform=n}function Ha(t,e){var i="GRAD"+at++;if("linear"===e.type)var n=t.Pb("linearGradient",{x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,id:i,gradientUnits:"userSpaceOnUse"});else{if("radial"!==e.type)throw Error("invalid gradient");n=t.Pb("radialGradient",{x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,r1:e.r1,r2:e.r2,id:i})}var o=e.ay;e=o.length;for(var r=[],s=0;se.offset?1:-1})),o=0;on&&(n=n%h+h),n>l?(this.path.push(["A",i,i,0,1,p,t-u,e-c]),this.path.push(["A",i,i,0,1,p,f,d])):1e-6=Math.PI),p,t+i*Math.cos(o),e+i*Math.sin(o)])},i.beginPath=function(){this.path=[]},i.bezierCurveTo=function(t,e,i,n,o,r){this.path.push(["C",t,e,i,n,o,r])},i.clearRect=function(){},i.clip=function(){this.addPath("clipPath",this.path,this.He)},i.closePath=function(){this.path.push(["z"])},i.createLinearGradient=function(t,e,i,n){var o=new Xa("linear");return o.x1=t,o.y1=e,o.x2=i,o.y2=n,o},i.createPattern=function(t){var e="";t instanceof HTMLCanvasElement&&(e=t.toDataURL()),t instanceof HTMLImageElement&&(e=t.getAttribute("src"));var i=this.NA;if(i[e])return"url(#"+i[e]+")";var n="PATTERN"+at++,o={x:0,y:0,width:t.width,height:t.height,href:e};return t=this.Pb("pattern",{width:t.width,height:t.height,id:n,patternUnits:"userSpaceOnUse"}),t.appendChild(this.Pb(Bs,o)),this.svg.appendChild(t),i[e]=n,"url(#"+n+")"},i.createRadialGradient=function(t,e,i,n,o,r){var s=new Xa("radial");return s.x1=t,s.y1=e,s.r1=i,s.x2=n,s.y2=o,s.r2=r,s},i.drawImage=function(t,e,i,n,o,r,s,a,h){var l="";t instanceof HTMLCanvasElement&&(l=t.toDataURL()),t instanceof HTMLImageElement&&(l=t.getAttribute("src"));var u=t instanceof HTMLImageElement?t.naturalWidth:t.width,c=t instanceof HTMLImageElement?t.naturalHeight:t.height;void 0===n&&(r=e,s=i,a=n=u,h=o=c),n=n||0,o=o||0,r=r||0,s=s||0,a=a||0,h=h||0,t={x:0,y:0,width:u||n,height:c||o,href:l},_e.aa(n,a)&&_e.aa(o,h)?-1===l.toLowerCase().indexOf(".svg")&&-1===l.toLowerCase().indexOf("data:image/svg")&&(t.preserveAspectRatio="xMidYMid slice"):t.preserveAspectRatio="none",l="",a/=n,h/=o,0===r&&0===s||(l+=" translate("+r+", "+s+")"),1===a&&1===h||(l+=" scale("+a+", "+h+")"),0===e&&0===i||(l+=" translate("+-e+", "+-i+")"),0===e&&0===i&&n===u&&o===c||(r="CLIP"+at++,s=this.Pb("clipPath",{id:r}),s.appendChild(this.Pb("rect",{x:e,y:i,width:n,height:o})),this.svg.appendChild(s),t["clip-path"]="url(#"+r+")"),Ka(this,Bs,t,this.He,l),this.addElement(Bs,t)},i.fill=function(){this.addPath("fill",this.path,this.He)},i.Je=function(){this.clipInsteadOfFill?this.clip():this.fill()},i.fillRect=function(t,e,i,n){t=[t,e,i,n],t={x:t[0],y:t[1],width:t[2],height:t[3]},Ka(this,"fill",t,this.He),this.addElement("rect",t)},i.fillText=function(t,e,i){t=[t,e,i],e=this.textAlign,"left"===e?e="start":"right"===e?e="end":"center"===e&&(e="middle"),e={x:t[1],y:t[2],style:"font: "+this.font,"text-anchor":e},Ka(this,"fill",e,this.He),this.addElement("text",e,t[0])},i.lineTo=function(t,e){this.path.push(["L",t,e])},i.moveTo=function(t,e){this.path.push(["M",t,e])},i.quadraticCurveTo=function(t,e,i,n){this.path.push(["Q",t,e,i,n])},i.rect=function(t,e,i,n){this.path.push(["M",t,e],["L",t+i,e],["L",t+i,e+n],["L",t,e+n],["z"])},i.restore=function(){this.He=this.stack.pop(),this.path=this.stack.pop();var t=this.stack.pop();this.fillStyle=t.fillStyle,this.font=t.font,this.globalAlpha=t.globalAlpha,this.lineCap=t.lineCap,this.lineDashOffset=t.lineDashOffset,this.lineJoin=t.lineJoin,this.lineWidth=t.lineWidth,this.miterLimit=t.miterLimit,this.shadowBlur=t.shadowBlur,this.shadowColor=t.shadowColor,this.shadowOffsetX=t.shadowOffsetX,this.shadowOffsetY=t.shadowOffsetY,this.strokeStyle=t.strokeStyle,this.textAlign=t.textAlign},i.save=function(){this.stack.push({fillStyle:this.fillStyle,font:this.font,globalAlpha:this.globalAlpha,lineCap:this.lineCap,lineDashOffset:this.lineDashOffset,lineJoin:this.lineJoin,lineWidth:this.lineWidth,miterLimit:this.miterLimit,shadowBlur:this.shadowBlur,shadowColor:this.shadowColor,shadowOffsetX:this.shadowOffsetX,shadowOffsetY:this.shadowOffsetY,strokeStyle:this.strokeStyle,textAlign:this.textAlign});for(var t=[],e=0;eo.width+o.x||o.x>h.width+h.x||c>o.height+o.y||o.y>h.height+h.y)return!0;h=!0,_a(t,1,0,0,1,0,0),t.save(),t.beginPath(),t.rect(u,c,f,l),t.clip()}if(this.Ff()&&!this.isVisible())return!0;if(t.He.Oa=[1,0,0,1,0,0],(this instanceof Il&&1e?(this.scale(e/t,1),this.translate((t-e)/2,0)):e>t&&(this.scale(1,t/e),this.translate(0,(e-t)/2)),this.yn?this.clip():this.fill(),t>e?(this.translate(-(t-e)/2,0),this.scale(1/(e/t),1)):e>t&&(this.translate(0,-(e-t)/2),this.scale(1,1/(t/e)))}else this.yn?this.clip():this.fill()},i.vj=function(){this.yn||this.stroke()},i.Iw=function(t,e,i){this.et=t,this.ft=e,this.ug=i},i.Ft=function(t,e){var i=this.Y;void 0!==i.setLineDash&&(i.setLineDash(t),i.lineDashOffset=e)},i.Dt=function(){var t=this.Y;void 0!==t.setLineDash&&(t.setLineDash(Qa),t.lineDashOffset=0)},i.uc=function(t){t&&(this.yu=""),this.xu=this.zu=""},d.Object.defineProperties(Za.prototype,{fillStyle:{get:function(){return this.Y.fillStyle},set:function(t){this.xu!==t&&(this.xu=this.Y.fillStyle=t)}},font:{get:function(){return this.Y.font},set:function(t){this.yu!==t&&(this.yu=this.Y.font=t)}},globalAlpha:{get:function(){return this.Y.globalAlpha},set:function(t){this.Y.globalAlpha=t}},lineCap:{get:function(){return this.Y.lineCap},set:function(t){this.Y.lineCap=t}},lineDashOffset:{get:function(){return this.Y.lineDashOffset},set:function(t){this.Y.lineDashOffset=t}},lineJoin:{get:function(){return this.Y.lineJoin},set:function(t){this.Y.lineJoin=t}},lineWidth:{get:function(){return this.Y.lineWidth},set:function(t){this.Y.lineWidth=t}},miterLimit:{get:function(){return this.Y.miterLimit},set:function(t){this.Y.miterLimit=t}},shadowBlur:{get:function(){return this.Y.shadowBlur},set:function(t){this.Y.shadowBlur=t}},shadowColor:{get:function(){return this.Y.shadowColor},set:function(t){this.Y.shadowColor=t}},shadowOffsetX:{get:function(){return this.Y.shadowOffsetX},set:function(t){this.Y.shadowOffsetX=t}},shadowOffsetY:{get:function(){return this.Y.shadowOffsetY},set:function(t){this.Y.shadowOffsetY=t}},strokeStyle:{get:function(){return this.Y.strokeStyle},set:function(t){this.zu!==t&&(this.zu=this.Y.strokeStyle=t)}},textAlign:{get:function(){return this.Y.textAlign},set:function(t){this.Y.textAlign=t}},imageSmoothingEnabled:{get:function(){return this.Y.imageSmoothingEnabled},set:function(t){this.Y.imageSmoothingEnabled=t}},clipInsteadOfFill:{get:function(){return this.yn},set:function(t){this.yn=t}}});var Qa=Object.freeze([]);function th(){this.T=this.u=this.I=this.l=0}function eh(t){Ah||(ph(),Ah=!0),ot(this),this.v=!1,void 0===t?(this.qa=gh,this.fl="black"):"string"===typeof t?(this.qa=gh,this.fl=t):(this.qa=t,this.fl="black"),t=this.qa,t===yh?(this.Dd=oe,this.sl=ue):this.sl=this.Dd=t===mh?ae:ie,this.jt=0,this.Vr=NaN,this.ke=this.Ks=this.je=null,this.Au=this.gl=0}function ih(t,e,i){return e=void 0===e||"number"!==typeof e?.2:e,i=void 0===i?xh:i,ah(t),sh(e,i)}function nh(t,e,i){return e=void 0===e||"number"!==typeof e?.2:e,i=void 0===i?xh:i,ah(t),sh(-e,i)}function oh(t,e,i){ah(t),t=Ph.l;var n=Ph.I,o=Ph.u,r=Ph.T;return ah(e),void 0===i&&(i=.5),"rgba("+Math.round((Ph.l-t)*i+t)+", "+Math.round((Ph.I-n)*i+n)+", "+Math.round((Ph.u-o)*i+o)+", "+Math.round((Ph.T-r)*i+r)+")"}function rh(t){return!!t&&(t instanceof eh?t.Fy():(ah(t),128>(299*Ph.l+587*Ph.I+114*Ph.u)/1e3))}function sh(t,e){switch(e){case xh:e=100*lh(Ph.l);var i=100*lh(Ph.I),n=100*lh(Ph.u);return Ch.l=.4124564*e+.3575761*i+.1804375*n,Ch.I=.2126729*e+.7151522*i+.072175*n,Ch.u=.0193339*e+.119192*i+.9503041*n,Ch.T=Ph.T,e=ch(Ch.l/Mh[0]),i=ch(Ch.I/Mh[1]),n=ch(Ch.u/Mh[2]),Th.l=116*i-16,Th.I=500*(e-i),Th.u=200*(i-n),Th.T=Ch.T,Th.l=Math.min(100,Math.max(0,Th.l+100*t)),t=(Th.l+16)/116,e=t-Th.u/200,Ch.l=Mh[0]*fh(Th.I/500+t),Ch.I=Mh[1]*(Th.l>kh*wh?Math.pow(t,3):Th.l/kh),Ch.u=Mh[2]*fh(e),Ch.T=Th.T,t=-.969266*Ch.l+1.8760108*Ch.I+.041556*Ch.u,e=.0556434*Ch.l+-.2040259*Ch.I+1.0572252*Ch.u,Ph.l=255*uh((3.2404542*Ch.l+-1.5371385*Ch.I+-.4985314*Ch.u)/100),Ph.I=255*uh(t/100),Ph.u=255*uh(e/100),Ph.T=Ch.T,Ph.l=Math.round(Ph.l),255Ph.l&&(Ph.l=0),Ph.I=Math.round(Ph.I),255Ph.I&&(Ph.I=0),Ph.u=Math.round(Ph.u),255Ph.u&&(Ph.u=0),"rgba("+Ph.l+", "+Ph.I+", "+Ph.u+", "+Ph.T+")";case bh:return hh(),Nh.u=Math.min(100,Math.max(0,Nh.u+100*t)),"hsla("+Nh.l+", "+Nh.I+"%, "+Nh.u+"%, "+Nh.T+")";default:return w("Unknown color space: "+e),"rgba(0, 0, 0, 1)"}}function ah(t){Ah||(ph(),Ah=!0);var e=Sh;if(null!==e){e.clearRect(0,0,1,1),e.fillStyle="#000000";var i=e.fillStyle;e.fillStyle=t,e.fillStyle!==i?(e.fillRect(0,0,1,1),t=e.getImageData(0,0,1,1).data,Ph.l=t[0],Ph.I=t[1],Ph.u=t[2],Ph.T=t[3]/255):(e.fillStyle="#FFFFFF",e.fillStyle=t,Ph.l=0,Ph.I=0,Ph.u=0,Ph.T=1)}}function hh(){var t=Ph.l/255,e=Ph.I/255,i=Ph.u/255,n=Math.max(t,e,i),o=Math.min(t,e,i),r=n-o;if(o=(n+o)/2,0===r)var s=t=0;else{switch(n){case t:s=(e-i)/r%6;break;case e:s=(i-t)/r+2;break;case i:s=(t-e)/r+4}s*=60,0>s&&(s+=360),t=r/(1-Math.abs(2*o-1))}Nh.l=Math.round(s),Nh.I=Math.round(100*t),Nh.u=Math.round(100*o),Nh.T=Ph.T}function lh(t){return t/=255,.04045>=t?t/12.92:Math.pow((t+.055)/1.055,2.4)}function uh(t){return.0031308>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function ch(t){return t>wh?Math.pow(t,1/3):(kh*t+16)/116}function fh(t){var e=t*t*t;return e>wh?e:(116*t-16)/kh}function dh(t,e){"string"!==typeof t&&(t instanceof eh||w("Value for "+e+" must be a color string or a Brush, not "+t))}function ph(){Sh=ys?new Ja(null).context:null}Za.className="CanvasSurfaceContext",th.className="ColorNumbers",eh.prototype.copy=function(){var t=new eh;return t.qa=this.qa,t.fl=this.fl,t.Dd=this.Dd.H(),t.sl=this.sl.H(),t.jt=this.jt,t.Vr=this.Vr,null!==this.je&&(t.je=this.je.copy()),t.Ks=this.Ks,t},i=eh.prototype,i.freeze=function(){return this.v=!0,null!==this.je&&this.je.freeze(),this},i.ea=function(){return Object.isFrozen(this)&&w("cannot thaw constant: "+this),this.v=!1,null!==this.je&&this.je.ea(),this},i.jb=function(t){t.classType===eh&&(this.type=t)},i.toString=function(){var t="Brush(";if(this.type===gh)t+=this.color;else if(t=this.type===yh?t+"Linear ":this.type===mh?t+"Radial ":this.type===vh?t+"Pattern ":t+"(unknown) ",t+=this.start+" "+this.end,null!==this.colorStops)for(var e=this.colorStops.iterator;e.next();)t+=" "+e.key+":"+e.value;return t+")"},i.addColorStop=function(t,e){return this.v&&k(this),("number"!==typeof t||!isFinite(t)||1t)&&M(t,"0 <= loc <= 1",eh,"addColorStop:loc"),null===this.je&&(this.je=new dt),this.je.add(t,e),this.qa===gh&&(this.type=yh),this.ke=null,this},i.FA=function(t,e){if(this.v&&k(this),t=void 0===t||"number"!==typeof t?.2:t,e=void 0===e?xh:e,this.type===gh)ah(this.color),this.color=sh(t,e);else if((this.type===yh||this.type===mh)&&null!==this.colorStops)for(var i=this.colorStops.iterator;i.next();)ah(i.value),this.addColorStop(i.key,sh(t,e));return this},i.Iz=function(t,e){if(this.v&&k(this),t=void 0===t||"number"!==typeof t?.2:t,e=void 0===e?xh:e,this.type===gh)ah(this.color),this.color=sh(-t,e);else if((this.type===yh||this.type===mh)&&null!==this.colorStops)for(var i=this.colorStops.iterator;i.next();)ah(i.value),this.addColorStop(i.key,sh(-t,e));return this},i.Fy=function(){if(this.type===gh)return rh(this.color);if((this.type===yh||this.type===mh)&&null!==this.colorStops){var t=this.colorStops;if(this.type===mh)return rh(t.first().value);if(null!==t.get(.5))return rh(t.get(.5));if(2===t.count)return t=t.ma(),rh(oh(t[0].value,t[1].value));for(var e=t.iterator,i=-1,n=-1,o=1,r=1;e.next();){var s=e.key,a=Math.abs(.5-e.key);o>r&&a=o&&an&&(r=i,i=n,n=r,r=o),o=n-i,rh(oh(t.get(i),t.get(n),1-r/o))}return!1},d.Object.defineProperties(eh.prototype,{type:{get:function(){return this.qa},set:function(t){this.v&&k(this,t),this.qa=t,this.start.nc()&&(t===yh?this.start=oe:t===mh&&(this.start=ae)),this.end.nc()&&(t===yh?this.end=ue:t===mh&&(this.end=ae)),this.ke=null}},color:{get:function(){return this.fl},set:function(t){this.v&&k(this,t),this.fl=t,this.ke=null}},start:{get:function(){return this.Dd},set:function(t){this.v&&k(this,t),this.Dd=t.H(),this.ke=null}},end:{get:function(){return this.sl},set:function(t){this.v&&k(this,t),this.sl=t.H(),this.ke=null}},startRadius:{get:function(){return this.jt},set:function(t){this.v&&k(this,t),0>t&&M(t,">= zero",eh,"startRadius"),this.jt=t,this.ke=null}},endRadius:{get:function(){return this.Vr},set:function(t){this.v&&k(this,t),0>t&&M(t,">= zero",eh,"endRadius"),this.Vr=t,this.ke=null}},colorStops:{get:function(){return this.je},set:function(t){this.v&&k(this,t),this.je=t,this.ke=null}},pattern:{get:function(){return this.Ks},set:function(t){this.v&&k(this,t),this.Ks=t,this.ke=null}}}),eh.prototype.isDark=eh.prototype.Fy,eh.prototype.darkenBy=eh.prototype.Iz,eh.prototype.lightenBy=eh.prototype.FA,eh.prototype.addColorStop=eh.prototype.addColorStop;var gh,yh,mh,vh,xh,bh,wh=216/24389,kh=24389/27,Mh=[95.047,100,108.883],Sh=null,Ph=new th,Nh=new th,Ch=new th,Th=new th,Ah=!1;function Lh(){this.oa="Base"}function jh(){this.oa="Base"}function Oh(){this.oa="Base"}function Dh(){this.oa="Base"}function Fh(){this.oa="Base"}function Bh(){this.oa="Base"}function Ih(){this.oa="Base",this.name="Table"}function Eh(){this.oa="Base"}function Rh(){this.oa="Base"}function zh(){this.oa="Base"}function Vh(){this.oa="Base"}function Gh(t,e,i,n){if(0>e)return t%e===i;if(t%e!==i)return!1;e=n.length;for(var o=0;or.height)continue}else if(l.position>r.width)continue;var u=l.separatorStrokeWidth;isNaN(u)&&(u=i?t.Ug:t.Tg);var c=l.separatorStroke;if(null===c&&(c=i?t.si:t.Sg),0!==u&&null!==c){va(t,e,c,!1,!1,s,r),c=!1;var f=l.separatorDashArray;null===f&&(f=i?t.ri:t.pi),null!==f&&(c=!0,e.Ft(f,0)),e.beginPath(),f=l.position+u,i?f>r.height&&(u-=f-r.height):f>r.width&&(u-=f-r.width),l=l.position+u/2,e.lineWidth=u,u=t.ib,i?(l+=u.top,f=r.width-u.right,e.moveTo(u.left,l),e.lineTo(f,l)):(l+=u.left,f=r.height-u.bottom,e.moveTo(l,u.top),e.lineTo(l,f)),e.stroke(),c&&e.Dt()}}}}function _h(t,e,i,n,o){for(var r=n.length,s=t.actualBounds,a=t.naturalBounds,h=0;hu)){var c=l.wc(),f=l.separatorStrokeWidth;isNaN(f)&&(f=i?t.Ug:t.Tg);var d=l.separatorStroke;null===d&&(d=i?t.si:t.Sg),null===d&&(f=0),c-=f,f=l.position+f,c+=l.actual,f+c>u&&(c=u-f),0>=c||(u=t.ib,va(t,e,l.background,!0,!1,a,s),i?e.fillRect(u.left,f+u.top,s.width-(u.left+u.right),c):e.fillRect(f+u.left,u.top,c,s.height-(u.top+u.bottom)))}}}}function Wh(t){return"LineV"===t||"BarV"===t}function $h(t){return null!==t.part?t.part.locationObject:null}function Jh(t,e){Zh(t,t,e)}function Zh(t,e,i){i(e),e=e.W.j;for(var n=e.length,o=0;oh.width||a.y>h.height||0>a.x+a.width||0>a.y+a.height||(s instanceof Uh&&nl(s,e,i,n),null!==e&&(s=e(s)),null===s||null!==i&&!i(s)||n.add(s))}}}function ol(t){var e=null;return t instanceof Nl&&(e=t.spot1,e===Ce&&(e=null),t=t.geometry,null!==t&&null===e&&(e=t.spot1)),null===e&&(e=ne),e}function rl(t){var e=null;return t instanceof Nl&&(e=t.spot2,e===Ce&&(e=null),t=t.geometry,null!==t&&null===e&&(e=t.spot2)),null===e&&(e=ce),e}function sl(t,e){t.F=e?16777216|t.F:-16777217&t.F}function al(t,e,i){var n=t.qb;if(n&&!(0>e)){if(n[e]=i instanceof wl?i:void 0,!i)for(e=n.length-1;0<=e&&void 0===n[e--];)n.length--;t.o()}}function hl(t,e,i){var n=t.nb;if(n&&!(0>e)){if(n[e]=i instanceof wl?i:void 0,!i)for(e=n.length-1;0<=e&&void 0===n[e--];)n.length--;t.o()}}function ll(t){return t=t.li,null!==t&&t.v}function ul(t){var e=t.li;if(null===e)null!==t.data&&w("Template cannot have .data be non-null: "+t),t.li=e=new et;else if(e.v)return;var i=new et;sl(t,!1),t.an(t,(function(t,n){var o=n.fb;if(null!==o)for(Ca(n,!1),o=o.iterator;o.next();){var r=o.value;r.mode===gp&&Ca(n,!0);var s=r.sourceName;null!==s&&("/"===s&&sl(t,!0),s=fp(r,t,n),null!==s&&(i.add(s),null===s.im&&(s.im=new et),s.im.add(r))),e.add(r)}if(n instanceof Uh&&n.type===Uh.Table){if(0i)){var n=gl(t,e),o=t.itemTemplateMap,r=null;null!==o&&(r=o.G(n)),null===r&&(null!==o&&(r=o.G("")),null===r&&(vl||(vl=!0,S('No item template Panel found for category "'+n+'" on '+t),S(" Using default item template."),n=new Uh,o=new Il,o.bind(new cp("text","",F)),n.add(o),xl=n),r=xl)),n=r,null!==n&&(ul(n),n=n.copy(),0!==(16777216&n.F)&&(o=t.ij(),null!==o&&sl(o,!0)),"object"===typeof e&&(null===t.Zd&&(t.Zd=new dt),t.Zd.add(e,n)),o=i+fl(t),t.wb(o,n),n.ob=e,pl(t,o,i),n.ob=null,n.data=e)}}function pl(t,e,i){for(t=t.W;ee.length&&(e="0"+e),2>n.length&&(n="0"+n),2>t.length&&(t="0"+t),"#"+e+n+t},eh.isValidColor=function(t){if("black"===t)return!0;if(""===t)return!1;Ah||(ph(),Ah=!0);var e=Sh;if(null===e)return!0;e.fillStyle="#000000";var i=e.fillStyle;return e.fillStyle=t,e.fillStyle!==i||(e.fillStyle="#FFFFFF",i=e.fillStyle,e.fillStyle=t,e.fillStyle!==i)},eh.lighten=function(t){return ih(t)},eh.lightenBy=ih,eh.darken=function(t){return nh(t)},eh.darkenBy=nh,eh.mix=oh,eh.isDark=rh,Lh.prototype.measure=function(){},Lh.prototype.IA=function(t,e,i,n,o){t.measure(e,i,n,o)},Lh.prototype.arrange=function(){},Lh.prototype.wz=function(t,e,i,n,o,r){t.arrange(e,i,n,o,r)},Lh.prototype.RA=function(t){t.Bk()},Lh.prototype.mc=function(){},d.Object.defineProperties(Lh.prototype,{name:{get:function(){return this.oa},set:function(t){this.oa=t}},classType:{get:function(){return Uh}}}),Lh.prototype.remeasureObject=Lh.prototype.RA,Lh.prototype.arrangeElement=Lh.prototype.wz,Lh.prototype.measureElement=Lh.prototype.IA,Lh.className="PanelLayout",f(jh,Lh),jh.prototype.measure=function(t,e,i,n,o,r,s){var a=n.length;t=$h(t);for(var h=0;hS&&(I=Math.max(S-nt,0));var ot=0===C.ha;C.bc=C.bc+I,C.actual=C.ha+I,S=Math.max(S-(I+(ot?nt:0)),0)}if(1===U.columnSpan&&($===qs||$===_s)){C=t.getColumnDefinition(V);var rt=C.wc();I=Math.max(et-C.actual,0),I+rt>M&&(I=Math.max(M-rt,0));var st=0===C.ha;C.bc=C.bc+I,C.actual=C.ha+I,M=Math.max(M-(I+(st?rt:0)),0)}K&&U.Bk()}}}}}O(v);var at=0,ht=0;r=t.columnCount;for(var lt=0;lt=t.rowCount);te++)C=t.getRowDefinition(Wt.row+te),I=0,I=$===Xs||$===_s?Math.max(C.minimum,0===Yt[Wt.row+te]?C.maximum:Math.min(Yt[Wt.row+te],C.maximum)):Math.max(C.minimum,isNaN(C.ad)?C.maximum:Math.min(C.ad,C.maximum)),Gt.height+=I,Qt+=C.minimum;for(var ee=1;ee=t.columnCount);ee++)C=t.getColumnDefinition(Wt.column+ee),I=0,I=$===Xs||$===Hs?Math.max(C.minimum,0===Xt[Wt.column+ee]?C.maximum:Math.min(Xt[Wt.column+ee],C.maximum)):Math.max(C.minimum,isNaN(C.ad)?C.maximum:Math.min(C.ad,C.maximum)),Gt.width+=I,Zt+=C.minimum;Nt.width+=Gt.width,Nt.height+=Gt.height;var ie=Wt.margin,ne=ie.right+ie.left,oe=ie.top+ie.bottom;Wt.measure(Nt.width,Nt.height,Zt,Qt);for(var re=Wt.measuredBounds,se=Math.max(re.width+ne,0),ae=Math.max(re.height+oe,0),he=0,le=0;le=t.rowCount);le++)C=t.getRowDefinition(Wt.row+le),he+=C.total||0;if(he=ue)&&!(Wt.row+de>=t.rowCount);de++){C=t.getRowDefinition(Wt.row+de);var pe=C.ha||0,ge=fe(Wt,C,ce);C.actual=Math.min(C.maximum,pe+ge),C.ha!==pe&&(ue-=C.ha-pe)}for(;0ye&&(C.actual=Math.min(C.maximum,ye+ue),C.ha!==ye&&(ue-=C.ha-ye)),0===C.index)break;C=t.getRowDefinition(C.index-1)}}for(var me=0,ve=0;ve=t.columnCount);ve++)C=t.getColumnDefinition(Wt.column+ve),me+=C.total||0;if(me=xe)&&!(Wt.column+ke>=t.columnCount);ke++){C=t.getColumnDefinition(Wt.column+ke);var Me=C.ha||0,Se=we(Wt,C,be);C.actual=Math.min(C.maximum,Me+Se),C.ha!==Me&&(xe-=C.ha-Me)}for(;0Pe&&(C.actual=Math.min(C.maximum,Pe+xe),C.ha!==Pe&&(xe-=C.ha-Pe)),0===C.index)break;C=t.getColumnDefinition(C.index-1)}}}}O(x),Bt.free(Gt),Bt.free(Nt),void 0!==Yt&&O(Yt),void 0!==Xt&&O(Xt);var Ne=0,Ce=0,Te=t.desiredSize,Ae=t.maxSize;$=ka(t,!0);var Le=ht=at=0,je=0;r=t.columnCount;for(var Oe=0;Oe=t.rowCount);S++)M=t.getRowDefinition(p+S),d.height+=M.total;for(S=1;S=t.columnCount);S++)M=t.getColumnDefinition(y+S),d.width+=M.total;var P=m.ha+d.width,N=g.ha+d.height;S=s,M=a;var C=P,T=N,A=s,L=a,j=P,O=N;s+P>i.width&&(j=Math.max(i.width-s,0)),a+N>i.height&&(O=Math.max(i.height-a,0));var D=w.alignment;if(D.Mb()){D=t.defaultAlignment,D.kb()||(D=ae);var F=D.x,B=D.y,I=D.offsetX;D=D.offsetY;var E=m.alignment,R=g.alignment;E.kb()&&(F=E.x,I=E.offsetX),R.kb()&&(B=R.y,D=R.offsetY)}else F=D.x,B=D.y,I=D.offsetX,D=D.offsetY;(isNaN(F)||isNaN(B))&&(B=F=.5,D=I=0),E=k.width,R=k.height;var z=w.margin,V=z.left+z.right,G=z.top+z.bottom,Y=Ma(w,g,m,!1);!isNaN(w.desiredSize.width)||Y!==Xs&&Y!==Hs||(E=Math.max(P-V,0)),!isNaN(w.desiredSize.height)||Y!==Xs&&Y!==_s||(R=Math.max(N-G,0)),P=w.maxSize,N=w.minSize,E=Math.min(P.width,E),R=Math.min(P.height,R),E=Math.max(N.width,E),R=Math.max(N.height,R),P=R+G,S+=C*F-(E+V)*F+I+z.left,M+=T*B-P*B+D+z.top,w.visible&&(_t(A,L,j,O,S,M,k.width,k.height)?w.arrange(S,M,E,R):w.arrange(S,M,E,R,new zt(A,L,j,O)))}else w.Fl(),w.actualBounds.ea(),C=w.actualBounds,S=zt.allocAt(C.x,C.y,C.width,C.height),C.x=M.type===Uh.TableRow?r:s,C.y=M.type===Uh.TableColumn?o:a,C.width=k.width,C.height=k.height,w.actualBounds.freeze(),Da(w,!1),Xt(S,C)||(k=w.part,null!==k&&(k.Oh(),w.mp(k))),zt.free(S)}}}for(Bt.free(d),t=0;t=i&&(i=1);var n=t.gridCellSize,o=n.width;n=n.height;var r=t.naturalBounds,s=t.actualBounds,a=r.width,h=r.height,l=Math.ceil(a/o),u=Math.ceil(h/n),c=t.gridOrigin,f=c.x;c=c.y,e.save(),e.beginPath(),e.rect(0,0,a,h),e.clip();for(var d=[],p=t.W.j,g=p.length,y=0;yx)){m=Wh(m.figure);for(var b=0;bx&&v.push(w))}}}}for(p=t.W.j,g=p.length,y=0;yo*m*i))){if(x=k.segmentIndex,isFinite(x)&&!isNaN(x)||(x=0),0>x&&(x=m-Math.min(-x,m)),x=Math.round(x%m),m=k.opacity,b=1,1!==m){if(0===m)continue;b=e.globalAlpha,e.globalAlpha=b*m}w=d[y];var M=!1,S=k.strokeDashArray;if(null!==S&&(M=!0,e.Ft(S,k.strokeDashOffset)),"LineV"===k.figure&&null!==k.stroke&&0r)m.measure(1/0,1/0,0,0),v=m.measuredBounds,e.Rc(v),t.l.push(v);else{var x=m.segmentIndex,b=m.segmentFraction,w=m.alignmentFocus;w.nc()&&(w=ae);var k=m.segmentOrientation,M=m.segmentOffset;if(isNaN(x)){var S=h.na;v=j(),S.Yv(b,v);var P=pt.allocAt(v[0],v[1]);if(P.add(h.i(0)),S.type===si||(S=S.figures.first()),P.offset(-S.startX,-S.startY),S=v[2],k!==tf){var N=h.computeAngle(m,k,S);m.Yb=N}N=P.x-u.x;var C=P.y-u.y;pt.free(P),O(v)}else if(x<-r||x>=r)C=h.midPoint,S=h.midAngle,k!==tf&&(N=h.computeAngle(m,k,S),m.Yb=N),N=C.x-u.x,C=C.y-u.y;else{if(N=0,0<=x?(C=c.J(x),v=xT+10?0<=x?S.Pa(C):C.Pa(S):T>P+10?0<=x?v.Pa(N):N.Pa(v):0<=x?S.Pa(N):N.Pa(S)}else S=0<=x?C.Pa(v):v.Pa(C);k!==tf&&(N=h.computeAngle(m,k,S),m.Yb=N),N=C.x+(v.x-C.x)*b-u.x,C=C.y+(v.y-C.y)*b-u.y}m.measure(1/0,1/0,0,0),v=m.measuredBounds,P=m.naturalBounds;var A=0;m instanceof Nl&&(A=m.strokeWidth),T=P.width+A;var L=P.height+A;a.reset(),a.translate(-v.x,-v.y),a.scale(m.scale,m.scale),a.rotate(k===tf?m.angle:S,T/2,L/2),k!==lf&&k!==df||a.rotate(90,T/2,L/2),k!==uf&&k!==pf||a.rotate(-90,T/2,L/2),k===gf&&(45S||225S)&&a.rotate(-S,T/2,L/2),P=new zt(0,0,T,L),p.tj(P,w),a.ta(p),w=-p.x+A/2*m.scale,m=-p.y+A/2*m.scale,g.assign(M),A=isNaN(M.x);var D=isNaN(M.y);if(A||D){T=T/2+3,L=L/2+3;var F=45<=S&&135>=S,B=225<=S&&315>=S;k===tf&&(F||B)?(g.x=D?T:M.y,g.y=A?L:M.x,F?0<=x||isNaN(x)&&.5>b||!A||(g.y=-L):B&&((0<=x||isNaN(x)&&.5>b)&&A&&(g.y=-L),D&&(g.x=-T))):(A&&(g.x=0<=x||isNaN(x)&&.5>b?T:-T),D&&(g.y=-L),g.rotate(S))}else g.rotate(S);N+=g.x,C+=g.y,P.set(v),P.h(N+w,C+m,v.width,v.height),t.l.push(P),e.Rc(P)}}if(null!==s)for(n=s.labelNodes;n.next();)n.value.measure(1/0,1/0);t.xg=e,t=t.location,t.h(t.x+e.x,t.y+e.y),Vt(o,e.width||0,e.height||0),Ke.free(a),pt.free(p),pt.free(g)}}}},Yh.prototype.arrange=function(t,e){var i=e.length;if(t instanceof Qu||t instanceof Nc){var n=null,o=null,r=null;t instanceof Nc&&(o=n=t),t instanceof Qu&&(r=t,n=r.adornedPart);var s=t instanceof Qu?null:n.path;if(0!==t.l.length){var a=t.l,h=0;if(null!==s&&h=i)y=f.midPoint,c=f.midAngle,l!==tf&&(f=f.computeAngle(s,l,c),s.angle=f),f=y.x,y=y.y;else{if(g=0,0<=a?(p=e.j[a],y=av+10?0<=a?c.Pa(p):p.Pa(c):v>m+10?0<=a?y.Pa(g):g.Pa(y):0<=a?c.Pa(g):g.Pa(c)}else c=0<=a?p.Pa(y):y.Pa(p);l!==tf&&(f=f.computeAngle(s,l,c),s.angle=f),f=p.x+(y.x-p.x)*h,y=p.y+(y.y-p.y)*h}if(d.Vt())s.location=new pt(f,y);else{d.nc()&&(d=ae),p=Ke.alloc(),p.reset(),p.scale(s.scale,s.scale),p.rotate(s.angle,0,0);var x=s.naturalBounds;g=zt.allocAt(0,0,x.width,x.height),m=pt.alloc(),m.tj(g,d),p.ta(m),d=-m.x,v=-m.y;var b=x.width,w=x.height;x=pt.alloc(),x.assign(u);var k=isNaN(u.x),M=isNaN(u.y);if(k||M){b=b/2+3,w=w/2+3;var S=45<=c&&135>=c,P=225<=c&&315>=c;l===tf&&(S||P)?(x.x=M?b:u.y,x.y=k?w:u.x,S?0<=a||isNaN(a)&&.5>h||!k||(x.y=-w):P&&((0<=a||isNaN(a)&&.5>h)&&k&&(x.y=-w),M&&(x.x=-b))):(k&&(x.x=0<=a||isNaN(a)&&.5>h?b:-b),M&&(x.y=-w),x.rotate(c))}else x.rotate(c);f+=x.x,y+=x.y,p.Pw(g),d+=g.x,v+=g.y,a=pt.allocAt(f+d,y+v),s.move(a),pt.free(a),pt.free(x),pt.free(m),zt.free(g),Ke.free(p)}}null!==r?r.Gk(!1):null!==o&&o.Gk(!1)}},f(qh,Lh),qh.prototype.measure=function(t,e,i,n,o,r,s){var a=t.tb();t.dh=[];var h=a.margin,l=h.right+h.left,u=h.top+h.bottom;a.measure(e,i,r,s);var c=a.measuredBounds,f=new zt(-h.left,-h.top,Math.max(c.width+l,0),Math.max(c.height+u,0));t.dh.push(f),o.assign(f);for(var d=a.geometry,p=a.strokeWidth,g=d.flattenedSegments,y=d.flattenedLengths,m=d.flattenedTotalLength,v=g.length,x=0,b=0,w=j(),k=0;kA&&(A+=360),S.push(A)}x=C,b=T}w.push(S)}if(null===t.eh){for(var L=[],D=t.W.j,F=D.length,B=0;BR))for(var z=0;zR&&E.push(G)}}}}t.eh=L}var Y=t.eh,X=t.W.j,q=X.length,U=0,K=0,H=m;t.Mj=[];for(var _,W=0;WZ*J*m/t.graduatedRange)){var Q=y[0][0],tt=0,et=0;K=m*$.graduatedStart-1e-4,H=m*$.graduatedEnd+1e-4;var it=Z*J,nt=t.graduatedTickBase;if(ntt.graduatedMin+it&&(nt-=Math.floor((nt-t.graduatedMin)/it)*it);for(var rt=Y[W],st=nt,at=1;ntm&&(U=m),K<=U&&U<=H)){for(var ct=w[tt][et],ft=y[tt][et];ttQ&&etmt?0Kt;Kt++){switch(Kt){case 0:Bt.h(It,Et);break;case 1:Bt.h(It+Ot,Et);break;case 2:Bt.h(It,Et+Dt);break;case 3:Bt.h(It+Ot,Et+Dt)}Bt.rotate(Ut+Pt.angle),Bt.offset(Xt,qt),0===Gt&&0===Kt?Rt.h(Bt.x,Bt.y,0,0):Rt.Oe(Bt),Bt.offset(-Xt,-qt),Bt.rotate(-Ut-Pt.angle)}pt.free(Bt),null!==Ct.dh&&Ct.dh.push(Rt),Ht(Tt,Rt.x,Rt.y,Rt.width,Rt.height)}else if(Pt instanceof Il){var _t=t,Wt=o;null===_t.zh&&(_t.zh=new Il);var $t=_t.zh;El($t,Pt);var Jt=Pt.alignmentFocus;Jt.nc()&&(Jt=oe);for(var Zt=Pt.segmentOrientation,Qt=Pt.segmentOffset,te=new zt,ee=0,ie=0,ne=0,re=0,se=0,ae=Nt.length,he=0;hene||225ne)&&pe.rotate(-ne,fe/2,de/2);var ge=zt.allocAt(0,0,fe,de),ye=pt.alloc();ye.tj(ge,Jt),pe.ta(ye);var me=-ye.x,ve=-ye.y,xe=pt.alloc();xe.assign(Qt),isNaN(xe.x)&&(xe.x=fe/2+3),isNaN(xe.y)&&(xe.y=-(de/2+3)),xe.rotate(ne),ee+=xe.x+me,ie+=xe.y+ve;var be=new zt(ee,ie,ue.width,ue.height),we=new zt(ue.x,ue.y,ue.width,ue.height),ke=new zt(ce.x,ce.y,ce.width,ce.height);le.DA=re,le.lineCount=$t.lineCount,le.lines=[$t.vb,$t.Ei,$t.oe,$t.Be,$t.Qb,$t.lb,$t.me],le.actualBounds=be,le.measuredBounds=we,le.naturalBounds=ke,0===he?te.assign(be):te.Rc(be),pt.free(xe),pt.free(ye),zt.free(ge),Ke.free(pe)}null!==_t.dh&&_t.dh.push(te),Ht(Wt,te.x,te.y,te.width,te.height)}ja(Pt,!1)}}},qh.prototype.arrange=function(t,e,i){if(null!==t.dh){var n=t.tb(),o=t.Mj;if(null!==o){var r=t.dh,s=0,a=r[s];s++,null!==n&&n.arrange(a.x-i.x,a.y-i.y,a.width,a.height);for(var h=e.length,l=0;l=o&&(o=1);for(var s=r.actualBounds,a=t.W.j,h=t.Mj,l=a.length,u=0;ut.graduatedTickUnit*c.interval*r.geometry.flattenedTotalLength/t.graduatedRange*o)){var p=c.measuredBounds,g=c.strokeWidth*c.scale,y=c.alignmentFocus;y.nc()&&(y=oe);for(var m=0;mn&&o.set(p),pt.free(p)),pt.free(u),r&&o.transform(s),l},i.o=function(t){if(!La(this)){ca.prototype.o.call(this,t),t=null,this.qa!==Uh.Auto&&this.qa!==Uh.Link||(t=this.tb());for(var e=this.W.j,i=e.length,n=0;ni||r>n)&&(this.o(),this.measure(e>i?i:e,r>n?n:r,0,0));break;case Xs:this.o(!0),this.measure(i+a,n+s,0,0);break;case Hs:this.o(!0),this.measure(i+a,r+s,0,0);break;case _s:this.o(!0),this.measure(e+a,n+s,0,0)}}this.qa.arrange(this,o,this.xg)}},i.Kh=function(t){var e=this.naturalBounds,i=$h(this);if(_t(0,0,e.width,e.height,t.x,t.y)){e=this.W.j;for(var n=e.length,o=pt.allocAt(0,0);n--;){var r=e[n];if((r.visible||r===i)&&(vt(o.set(t),r.transform),r.$(o)))return pt.free(o),!0}return pt.free(o),null!==this.mb||null!==this.ec}return!1},i.Gt=function(t){if(this.dl===t)return this;for(var e=this.W.j,i=e.length,n=0;nf.width||c.y>f.height||0>c.x+c.width||0>c.y+c.height||(c=u,u=u instanceof Uh?u:null,f=Ke.alloc(),f.set(s),(null!==u?u.zf(t,e,i,n,o,f):ga(c,t,n,f))&&(null!==e&&(c=e(c)),null===c||null!==i&&!i(c)||o.add(c)),Ke.free(f))}}return void 0===r&&Ke.free(s),n}return void 0===r&&Ke.free(s),!1},i.Eg=function(t,e,i,n,o,r){if(!1===this.pickable)return!1;void 0===i&&(i=null),void 0===n&&(n=null);var s=this.naturalBounds,a=this.he(),h=a?t:vt(pt.allocAt(t.x,t.y),this.transform),l=a?e:vt(pt.allocAt(e.x,e.y),this.transform),u=h.Ie(l),c=0y.width||g.y>y.height||0>g.x+g.width||0>g.y+g.height)||(p.he()?(g=p.transform,vt(h.set(t),g),vt(l.set(e),g)):(h.set(t),l.set(e)),g=p,p=p instanceof Uh?p:null,(null!==p?p.Eg(h,l,i,n,o,r):g.sy(h,l,o))&&(null!==i&&(g=i(g)),null===g||null!==n&&!n(g)||r.add(g)))}}pt.free(h),pt.free(l)}return o?c:s}return!1},i.add=function(t){this.wb(this.W.count,t)},i.J=function(t){return this.W.J(t)},i.wb=function(t,e){e instanceof Lu&&w("Cannot add a Part to a Panel: "+e+"; use a Panel instead"),(this===e||this.Gg(e))&&(this===e&&w("Cannot make a Panel contain itself: "+this.toString()),w("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+e.toString()));var i=e.panel;if(null!==i&&i!==this&&w("Cannot add a GraphObject that already belongs to another Panel to this Panel: "+e.toString()+", already contained by "+i.toString()+", cannot be shared by this Panel: "+this.toString()),this.qa!==Uh.Grid||e instanceof Nl||w("Can only add Shapes to a Grid Panel, not: "+e),this.qa!==Uh.Graduated||e instanceof Nl||e instanceof Il||w("Can only add Shapes or TextBlocks to a Graduated Panel, not: "+e),e.sj(this),e.ak=null,null!==this.itemArray){var n=e.data;null!==n&&"object"===typeof n&&(null===this.Zd&&(this.Zd=new dt),this.Zd.add(n,e))}var o=this.W;if(n=-1,i===this){for(var r=-1,s=this.W.j,a=s.length,h=0;h=o.count&&t>=o.count)return;o.cb(r),n=r}else w("element "+e.toString()+" has panel "+i.toString()+" but is not contained by it.")}(0>t||t>o.count)&&(t=o.count),o.wb(t,e),(0===t||e.isPanelMain)&&(this.Ui=null),La(this)||this.o(),e.o(!1),(null!==e.portId||e instanceof Uh&&!0===e.Nh)&&(this.Nh=!0),this.eh=null,i=this.part,null!==i&&(i.Xj=null,i.kh=NaN,this.Nh&&i instanceof ec&&(i.Nh=!0),i.Nh&&i instanceof ec&&(i.tc=null),o=this.diagram,null!==o&&o.undoManager.isUndoingRedoing||(-1!==n&&i.Va(Ci,"elements",this,e,null,n,null),i.Va(Ni,"elements",this,null,e,null,t),this.Hg()||yl(this,e,!1)))},i.remove=function(t){for(var e=this.W.j,i=e.length,n=-1,o=0;ot&&M(t,">= 0",Uh,"getRowDefinition:idx"),t=Math.round(t);var e=this.qb;if(void 0===e)return null;if(void 0===e[t]){var i=new wl;i.sj(this),i.isRow=!0,i.index=t,e[t]=i,this.Va(Ni,"rowdefs",this,null,i,null,t)}return e[t]},Uh.prototype.XA=function(t){0>t&&M(t,">= 0",Uh,"removeRowDefinition:idx"),t=Math.round(t);var e=this.qb;if(void 0!==e){var i=e[t];if(i){e[t]=void 0;for(var n=e.length-1;0<=n&&void 0===e[n--];)e.length--;this.Va(Ci,"rowdefs",this,i,null,t,null),this.o()}}},Uh.prototype.getColumnDefinition=function(t){0>t&&M(t,">= 0",Uh,"getColumnDefinition:idx"),t=Math.round(t);var e=this.nb;if(void 0===e)return null;if(void 0===e[t]){var i=new wl;i.sj(this),i.isRow=!1,i.index=t,e[t]=i,this.Va(Ni,"coldefs",this,null,i,null,t)}return e[t]},i=Uh.prototype,i.SA=function(t){0>t&&M(t,">= 0",Uh,"removeColumnDefinition:idx"),t=Math.round(t);var e=this.nb;if(void 0!==e){var i=e[t];if(i){e[t]=void 0;for(var n=e.length-1;0<=n&&void 0===e[n--];)e.length--;this.Va(Ci,"coldefs",this,i,null,t,null),this.o()}}},i.aA=function(t){if(0>t||this.type!==Uh.Table)return-1;for(var e=0,i=this.qb,n=i.length,o=this.Xi;ot||this.type!==Uh.Table)return-1;for(var e=0,i=this.nb,n=i.length,o=this.Gi;ot;)this.Lc(this.W.length-1,!1);if(t=this.itemArray,null!==t)for(var e=t.length,i=0;it&&M(t,">= 0",Uh,"padding"),t=new Qt(t)):(0>t.left&&M(t.left,">= 0",Uh,"padding:value.left"),0>t.right&&M(t.right,">= 0",Uh,"padding:value.right"),0>t.top&&M(t.top,">= 0",Uh,"padding:value.top"),0>t.bottom&&M(t.bottom,">= 0",Uh,"padding:value.bottom"));var e=this.ib;e.w(t)||(this.ib=t=t.H(),this.o(),this.g("padding",e,t))}},defaultAlignment:{get:function(){return this.Mn},set:function(t){var e=this.Mn;e.w(t)||(this.Mn=t=t.H(),this.o(),this.g("defaultAlignment",e,t))}},defaultStretch:{get:function(){return this.Sf},set:function(t){var e=this.Sf;e!==t&&(this.Sf=t,this.o(),this.g("defaultStretch",e,t))}},defaultSeparatorPadding:{get:function(){return void 0===this.Fj?Re:this.Fj},set:function(t){if(void 0!==this.Fj){"number"===typeof t&&(t=new Qt(t));var e=this.Fj;e.w(t)||(this.Fj=t=t.H(),this.o(),this.g("defaultSeparatorPadding",e,t))}}},defaultRowSeparatorStroke:{get:function(){return void 0===this.si?null:this.si},set:function(t){var e=this.si;e!==t&&(null===t||"string"===typeof t||t instanceof eh)&&(t instanceof eh&&t.freeze(),this.si=t,this.M(),this.g("defaultRowSeparatorStroke",e,t))}},defaultRowSeparatorStrokeWidth:{get:function(){return void 0===this.Ug?1:this.Ug},set:function(t){if(void 0!==this.Ug){var e=this.Ug;e!==t&&isFinite(t)&&0<=t&&(this.Ug=t,this.o(),this.g("defaultRowSeparatorStrokeWidth",e,t))}}},defaultRowSeparatorDashArray:{get:function(){return void 0===this.ri?null:this.ri},set:function(t){if(void 0!==this.ri){var e=this.ri;if(e!==t){if(null!==t){for(var i=t.length,n=0,o=0;ot)&&w("Panel.topIndex must be greater than zero and a real number, not: "+t),this.Xi=t,this.o(),this.g("topIndex",e,t))}}},leftIndex:{get:function(){return void 0===this.Gi?0:this.Gi},set:function(t){if(void 0!==this.Gi){var e=this.Gi;e!==t&&((!isFinite(t)||0>t)&&w("Panel.leftIndex must be greater than zero and a real number, not: "+t),this.Gi=t,this.o(),this.g("leftIndex",e,t))}}},data:{get:function(){return this.ob},set:function(t){var e=this.ob;if(e!==t){var i=this instanceof Lu&&!(this instanceof Qu);ul(this),this.ob=t;var n=this.diagram;null!==n&&(i?(i=n.partManager,this instanceof Nc?(null!==e&&i.Te.remove(e),null!==t&&i.Te.add(t,this)):this instanceof Lu&&(null!==e&&i.Ue.remove(e),null!==t&&i.Ue.add(t,this))):(i=this.panel,null!==i&&null!==i.Zd&&(null!==e&&i.Zd.remove(e),null!==t&&i.Zd.add(t,this)))),this.g("data",e,t),null!==n&&n.undoManager.isUndoingRedoing||null!==t&&this.Da()}}},itemIndex:{get:function(){return this.Do},set:function(t){var e=this.Do;e!==t&&(this.Do=t,this.g("itemIndex",e,t))}},itemArray:{get:function(){return this.Ci},set:function(t){var e=this.Ci;if(e!==t||null!==t&&cl(this,t)){var i=this.diagram;e!==t&&(null!==i&&null!==e&&Sd(i.partManager,this,i),this.Ci=t,null!==i&&null!==t&&Md(i.partManager,this)),this.g("itemArray",e,t),null!==i&&i.undoManager.isUndoingRedoing||this.eu()}}},itemTemplate:{get:function(){return null===this.te?null:this.te.G("")},set:function(t){if(null===this.te){if(null===t)return;this.te=new dt}var e=this.te.G("");e!==t&&((t instanceof Lu||t.isPanelMain)&&w("Panel.itemTemplate must not be a Part or be Panel.isPanelMain: "+t),this.te.add("",t),this.g("itemTemplate",e,t),t=this.diagram,null!==t&&t.undoManager.isUndoingRedoing||this.eu())}},itemTemplateMap:{get:function(){return this.te},set:function(t){var e=this.te;if(e!==t){for(var i=t.iterator;i.next(););this.te=t,this.g("itemTemplateMap",e,t),t=this.diagram,null!==t&&t.undoManager.isUndoingRedoing||this.eu()}}},itemCategoryProperty:{get:function(){return this.Jl},set:function(t){var e=this.Jl;e!==t&&(this.Jl=t,this.g("itemCategoryProperty",e,t))}},isAtomic:{get:function(){return 0!==(1048576&this.F)},set:function(t){var e=0!==(1048576&this.F);e!==t&&(this.F^=1048576,this.g("isAtomic",e,t))}},isClipping:{get:function(){return 0!==(2097152&this.F)},set:function(t){var e=0!==(2097152&this.F);e!==t&&(!t||this.type===Uh.Spot||this instanceof bc||S("Warning: Panel.isClipping set on non-Spot Panel: "+this.toString()),this.F^=2097152,this instanceof bc&&(this.Za=null),this.o(),this.g("isClipping",e,t))}},isOpposite:{get:function(){return 0!==(33554432&this.F)},set:function(t){var e=0!==(33554432&this.F);e!==t&&(this.F^=33554432,this.o(),this.g("isOpposite",e,t))}},isEnabled:{get:function(){return 0!==(4194304&this.F)},set:function(t){var e=0!==(4194304&this.F);if(e!==t){var i=null===this.panel||this.panel.Hg();this.F^=4194304,this.g("isEnabled",e,t),e=this.diagram,null!==e&&e.undoManager.isUndoingRedoing||i&&yl(this,this,t)}}},alignmentFocusName:{get:function(){return this.Lg},set:function(t){var e=this.Lg;e!==t&&(this.Lg=t,this.o(),this.g("alignmentFocusName",e,t))}}}),d.Object.defineProperties(Uh,{Position:{get:function(){return bl.G("Position")}},Horizontal:{get:function(){return bl.G("Horizontal")}},Vertical:{get:function(){return bl.G("Vertical")}},Spot:{get:function(){return bl.G("Spot")}},Auto:{get:function(){return bl.G("Auto")}},Table:{get:function(){return bl.G("Table")}},Viewbox:{get:function(){return bl.G("Viewbox")}},TableRow:{get:function(){return bl.G("TableRow")}},TableColumn:{get:function(){return bl.G("TableColumn")}},Link:{get:function(){return bl.G("Link")}},Grid:{get:function(){return bl.G("Grid")}},Graduated:{get:function(){return bl.G("Graduated")}}}),Uh.prototype.findItemPanelForData=Uh.prototype.qy,Uh.prototype.rebuildItemElements=Uh.prototype.eu,Uh.prototype.updateTargetBindings=Uh.prototype.Da,Uh.prototype.copyTemplate=Uh.prototype.Gz,Uh.prototype.graduatedValueForPoint=Uh.prototype.rA,Uh.prototype.graduatedPointForValue=Uh.prototype.qA,Uh.prototype.findColumnForLocalX=Uh.prototype.Tz,Uh.prototype.findRowForLocalY=Uh.prototype.aA,Uh.prototype.removeColumnDefinition=Uh.prototype.SA,Uh.prototype.removeRowDefinition=Uh.prototype.XA,Uh.prototype.removeAt=Uh.prototype.cb,Uh.prototype.remove=Uh.prototype.remove,Uh.prototype.insertAt=Uh.prototype.wb,Uh.prototype.elt=Uh.prototype.J,Uh.prototype.add=Uh.prototype.add,Uh.prototype.findObject=Uh.prototype.bb,Uh.prototype.findInVisualTree=Uh.prototype.ym,Uh.prototype.walkVisualTreeFrom=Uh.prototype.an,Uh.prototype.findMainElement=Uh.prototype.tb;var vl=!1,xl=null,bl=new dt;function wl(){ot(this),this.og=null,this.ns=!0,this.Ra=0,this.ad=NaN,this.nh=0,this.lh=1/0,this.yb=Ce,this.la=this.bc=this.ha=0,this.fb=null,this.Yp=Ml,this.De=Ks,this.Up=this.sg=null,this.Vp=NaN,this.mb=this.fk=null,this.In=!1}function kl(t){if(t.sizing===Ml){var e=t.og;return t.isRow?e.rowSizing:e.columnSizing}return t.sizing}Uh.className="Panel",Uh.definePanelLayout=ml,ml("Position",new jh),ml("Vertical",new Dh),ml("Auto",new Bh),ml("Link",new Yh),wl.prototype.copy=function(){var t=new wl;return t.ns=this.ns,t.Ra=this.Ra,t.ad=this.ad,t.nh=this.nh,t.lh=this.lh,t.yb=this.yb,t.ha=this.ha,t.bc=this.bc,t.la=this.la,t.De=this.De,t.Yp=this.Yp,null===this.sg?t.sg=null:t.sg=this.sg.H(),t.Up=this.Up,t.Vp=this.Vp,t.fk=null,null!==this.fk&&(t.separatorDashArray=T(this.separatorDashArray)),t.mb=this.mb,t.In=this.In,t.fb=this.fb,t},i=wl.prototype,i.gy=function(t){t.isRow?this.height=t.height:this.width=t.width,this.minimum=t.minimum,this.maximum=t.maximum,this.alignment=t.alignment,this.stretch=t.stretch,this.sizing=t.sizing,this.sg=null===t.separatorPadding?null:t.separatorPadding.H(),this.separatorStroke=t.separatorStroke,this.separatorStrokeWidth=t.separatorStrokeWidth,this.fk=null,t.separatorDashArray&&(this.fk=T(t.separatorDashArray)),this.background=t.background,this.coversSeparators=t.coversSeparators,this.fb=t.fb},i.jb=function(t){t.classType===wl&&(this.sizing=t)},i.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+st(this)},i.sj=function(t){this.og=t},i.Jv=function(){var t=0,e=0,i=this.og,n=this.isRow;if(null!==i&&i.type===Uh.Table)for(var o=n?i.qb.length:i.nb.length,r=0;rt&&M(t,">= 0",wl,"height"),this.ad=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("height",e,t))}},width:{get:function(){return this.ad},set:function(t){var e=this.ad;e!==t&&(0>t&&M(t,">= 0",wl,"width"),this.ad=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("width",e,t))}},minimum:{get:function(){return this.nh},set:function(t){var e=this.nh;e!==t&&((0>t||!isFinite(t))&&M(t,">= 0",wl,"minimum"),this.nh=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("minimum",e,t))}},maximum:{get:function(){return this.lh},set:function(t){var e=this.lh;e!==t&&(0>t&&M(t,">= 0",wl,"maximum"),this.lh=t,this.actual=this.ha,null!==this.panel&&this.panel.o(),this.Bb("maximum",e,t))}},alignment:{get:function(){return this.yb},set:function(t){var e=this.yb;e.w(t)||(this.yb=t.H(),null!==this.panel&&this.panel.o(),this.Bb("alignment",e,t))}},stretch:{get:function(){return this.De},set:function(t){var e=this.De;e!==t&&(this.De=t,null!==this.panel&&this.panel.o(),this.Bb("stretch",e,t))}},separatorPadding:{get:function(){return this.sg},set:function(t){"number"===typeof t&&(t=new Qt(t));var e=this.sg;null!==t&&null!==e&&e.w(t)||(null!==t&&(t=t.H()),this.sg=t,null!==this.panel&&this.panel.o(),this.Bb("separatorPadding",e,t))}},separatorStroke:{get:function(){return this.Up},set:function(t){var e=this.Up;e!==t&&(null!==t&&dh(t,"RowColumnDefinition.separatorStroke"),t instanceof eh&&t.freeze(),this.Up=t,null!==this.panel&&this.panel.o(),this.Bb("separatorStroke",e,t))}},separatorStrokeWidth:{get:function(){return this.Vp},set:function(t){var e=this.Vp;e!==t&&(this.Vp=t,null!==this.panel&&this.panel.o(),this.Bb("separatorStrokeWidth",e,t))}},separatorDashArray:{get:function(){return this.fk},set:function(t){var e=this.fk;if(e!==t){if(null!==t){for(var i=t.length,n=0,o=0;oo)){var r=n.measuredBounds,s=Math.max(1,r.width);r=r.height;for(var a,h,l,u,c,f,d=i[0],p=i[1],g=0,y=j(),m=2;ml&&(l=1),o=i=l,a=s/2,h=0!==a,m=0,f=y[m],l=f[0],c=f[1],u=f[2],f=f[3];for(var v=0;.1<=g;){if(0===v&&(h?(o=i,o-=a,g-=a,h=!1):o=i,0===o&&(o=1)),o>g)return void O(y);o>f?(v=o-f,o=f):v=0;var x=Math.sqrt(o*o/(1+u*u));if(0>l&&(x=-x),d+=x,p+=u*x,t.translate(d,p),t.rotate(c),t.translate(-s/2,-r/2),0===v&&n.ej(t,e),t.translate(s/2,r/2),t.rotate(-c),t.translate(-d,-p),g-=o,f-=o,0!==v){if(m++,m===y.length)return void O(y);f=y[m],l=f[0],c=f[1],u=f[2],f=f[3],o=v}}O(y)}}function Tl(t){var e=t.geometryStretch;return null!==t.Ed?e===Ks?Xs:e:e===Ks?Bl[t.figure].defaultStretch:e}function Al(t,e,i,n,o){return t=i.x-t,e=i.y-e,e=t*t+e*e,ei?t-i:i-t)<(e>n?e-n:n-e)?(t=et||_e.aa(h.y,t))&&(h.ye||_e.aa(h.x,e))&&(h.x=t&&n<=e):(t=n&&i<=t)}function Ol(t){var e=t.diagram;null!==e&&e.undoManager.isUndoingRedoing||(t.segmentOrientation=hf,"None"!==t.rm?(t.segmentIndex=-1,t.alignmentFocus=Fe):"None"!==t.ul&&(t.segmentIndex=0,t.alignmentFocus=new Ge(1-Fe.x,Fe.y)))}function Dl(t){var e=Fl[t];if(void 0===e){var i=t.toLowerCase();if("none"===i)return"None";if(e=Fl[i],void 0===e){var n,o=null;for(n in _e.dn)if(n.toLowerCase()===i){o=n;break}if(null!==o)return t=Ze(_e.dn[o],!1),Fl[o]=t,i!==o&&(Fl[i]=o),o}}return"string"===typeof e?e:e instanceof We?t:null}wl.className="RowColumnDefinition",wl.Default=Ml,wl.None=Sl,wl.ProportionalExtra=Pl,f(Nl,ca),Nl.prototype.cloneProtected=function(t){ca.prototype.cloneProtected.call(this,t),t.na=this.na,t.Yn=this.Yn,t.ho=this.ho,t.Ed=this.Ed,t.tl=this.tl,t.Hc=this.Hc,t.wh=this.wh,t.km=this.km,t.lm=this.lm,t.gk=this.gk,null!==this.uh&&(t.uh=T(this.uh)),t.vh=this.vh,t.pf=this.pf.H(),t.qf=this.qf.H(),t.sp=this.sp,t.tp=this.tp,t.vo=this.vo,t.wp=this.wp,t.rm=this.rm,t.ul=this.ul,t.Yd=this.Yd,t.Wd=this.Wd,t.Ud=this.Ud,t.Vd=this.Vd},i=Nl.prototype,i.jb=function(t){t===qs||t===Us||t===Ws||t===Ks?this.geometryStretch=t:ca.prototype.jb.call(this,t)},i.toString=function(){return"Shape("+("None"!==this.figure?this.figure:"None"!==this.toArrow?this.toArrow:this.fromArrow)+")#"+st(this)},i.ej=function(t,e){var i=this.Hc,n=this.tl;if(null!==i||null!==n){var o=this.actualBounds,r=this.naturalBounds;null!==n&&va(this,t,n,!0,!1,r,o);var s=this.part,a=this.wh;null===i||0!==a||null===s||!this.isPanelMain&&s.tb()!==this||(a=s.type===Uh.Link&&s instanceof Qu&&"Selection"===s.category&&s.adornedObject instanceof Nl&&s.adornedPart.tb()===s.adornedObject?s.adornedObject.strokeWidth:0),0===a&&(i=null),null!==i&&0!==a&&(va(this,t,i,!1,!1,r,o),t.lineWidth=a,t.lineJoin=this.lm,t.lineCap=this.km,t.miterLimit=this.gk),o=!1,s&&e.Ke("drawShadows")&&(o=s.isShadowed),s=!0,null===i||null!==n&&"transparent"!==n||(s=!1),r=!1,a=this.strokeDashArray,null!==a&&(r=!0,t.Ft(a,this.vh));var h=this.na;if(null!==h){if(h.type===si)t.beginPath(),t.moveTo(h.startX,h.startY),t.lineTo(h.endX,h.endY),null!==i&&t.vj();else if(h.type===ai){var l=h.startX;a=h.startY;var u=h.endX,c=h.endY;h=Math.min(l,u);var f=Math.min(a,c);l=Math.abs(u-l),a=Math.abs(c-a),t.beginPath(),t.rect(h,f,l,a),null!==n&&t.Je(n),null!==i&&(s&&o&&Wa(t),0!==l&&0!==a||(t.beginPath(),t.rect(h,f,Math.max(l,.1),Math.max(a,.1))),t.vj(),s&&o&&$a(t))}else if(h.type===hi)l=h.startX,a=h.startY,u=h.endX,c=h.endY,h=Math.abs(u-l)/2,f=Math.abs(c-a)/2,l=Math.min(l,u)+h,a=Math.min(a,c)+f,t.beginPath(),t.moveTo(l,a-f),t.bezierCurveTo(l+_e.Kg*h,a-f,l+h,a-_e.Kg*f,l+h,a),t.bezierCurveTo(l+h,a+_e.Kg*f,l+_e.Kg*h,a+f,l,a+f),t.bezierCurveTo(l-_e.Kg*h,a+f,l-h,a+_e.Kg*f,l-h,a),t.bezierCurveTo(l-h,a-_e.Kg*f,l-_e.Kg*h,a-f,l,a-f),t.closePath(),null!==n&&t.Je(n),null!==i&&(s&&o?(Wa(t),t.vj(),$a(t)):t.vj());else if(h.type===li)for(a=h.figures,h=a.length,f=0;fg.sweepAngle,null!==d?d.endX:l.startX,null!==d?d.endY:l.startY)}else if(d=di(g,l),y=d.length,0===y)t.lineTo(g.centerX,g.centerY);else for(var m=0;m(i.startX-i.endX)*(t.x-i.endX)+(i.startY-i.endY)*(t.y-i.endY)||0>n)&&(zt.free(r),_e.Nb(i.startX,i.startY,i.endX,i.endY,o,t.x,t.y)));if(i.type===ai){e=i.startX;var s=i.startY,a=i.endX;if(i=i.endY,r.x=Math.min(e,a),r.y=Math.min(s,i),r.width=Math.abs(a-e),r.height=Math.abs(i-s),null===this.fill){if(r.Jc(-n,-n),r.$(t))return zt.free(r),!1;r.Jc(n,n)}return null!==this.stroke&&r.Jc(o,o),t=r.$(t),zt.free(r),t}if(i.type===hi){s=i.startX,o=i.startY,a=i.endX;var h=i.endY;if(i=Math.min(s,a),e=Math.min(o,h),s=Math.abs(a-s)/2,o=Math.abs(h-o)/2,i=t.x-(i+s),e=t.y-(e+o),null===this.fill){if(s-=n,o-=n,0>=s||0>=o||1>=i*i/(s*s)+e*e/(o*o))return zt.free(r),!1;s+=n,o+=n}return null!==this.stroke&&(s+=n,o+=n),zt.free(r),!(0>=s||0>=o)&&1>=i*i/(s*s)+e*e/(o*o)}return i.type===li?(zt.free(r),null===this.fill?ni(i,t.x,t.y,o):ei(i,t,o,1=this.strokeWidth)u=_e.Me(l.startX,l.startY,l.endX,l.endY,r,s,a,h,o);else{if(l.startX===l.endX?(n=c,u=0):(e=(l.endY-l.startY)/(l.endX-l.startX),u=c/Math.sqrt(1+e*e),n=u*e),e=j(),t=new pt,_e.Me(l.startX+n,l.startY+u,l.endX+n,l.endY+u,r,s,a,h,t)&&e.push(t),t=new pt,_e.Me(l.startX-n,l.startY-u,l.endX-n,l.endY-u,r,s,a,h,t)&&e.push(t),t=new pt,_e.Me(l.startX+n,l.startY+u,l.startX-n,l.startY-u,r,s,a,h,t)&&e.push(t),t=new pt,_e.Me(l.endX+n,l.endY+u,l.endX-n,l.endY-u,r,s,a,h,t)&&e.push(t),a=e.length,0===a)return O(e),!1;for(u=!0,h=1/0,n=0;nMath.abs(i)){if(h=s-u-i*(r-n),0>t*t*i*i+l*l-h*h){o.x=NaN,o.y=NaN,u=!1;break t}c=Math.sqrt(t*t*i*i+l*l-h*h),a=(-t*t*i*h+t*l*c)/(l*l+t*t*i*i)+n,t=(-t*t*i*h-t*l*c)/(l*l+t*t*i*i)+n,l=i*(a-n)+h+u,h=i*(t-n)+h+u,Math.abs((r-a)*(r-a))+Math.abs((s-l)*(s-l))a){o.x=NaN,o.y=NaN,u=!1;break t}h=Math.sqrt(a),a=u+h,h=u-h,Math.abs(a-s)Math.abs(p)?(g*=.5/p,p=.5):0!==g&&.5>Math.abs(g)&&(p*=.5/g,g=.5),m-=p,v-=g;d.contains(m,v);)m-=p,v-=g;for(o.x=a,o.y=h,g=0;go)return!0;return!1}if(i&&null!==this.fill&&this.Kh(t,!0))return!0;var o=t.Ie(e),r=o;if(1.5=o||bt(e,r,0,-c)>=o||bt(e,r,0,c)>=o||bt(e,r,u,0)>=o);if(t=_e.Mz(u,c,e,r),t*t<=o)return!0}else if(e.type===li){if(l=e.bounds,r=l.x,a=l.y,h=l.x+l.width,l=l.y+l.height,t.x>h&&t.xl&&t.yo&&xt(t.x,t.y,r,a,h,a)>o&&xt(t.x,t.y,h,l,r,l)>o&&xt(t.x,t.y,h,l,h,a)>o)return!1;if(r=Math.sqrt(o),!i){for(i=e.figures,e=0;eo)return!1;for(a=r.segments.j,h=a.length,l=0;lo)return!1;break;case mi:var f=j();if(_e.Fe(s,u,c.point1X,c.point1Y,c.point2X,c.point2Y,c.endX,c.endY,.8,f),s=n(f,t),O(f),s)return!1;if(s=c.endX,u=c.endY,t.qd(s,u)>o)return!1;break;case vi:if(f=j(),_e.Vq(s,u,c.point1X,c.point1Y,c.endX,c.endY,.8,f),s=n(f,t),O(f),s)return!1;if(s=c.endX,u=c.endY,t.qd(s,u)>o)return!1;break;case xi:case bi:f=c.type===xi?di(c,r):pi(c,r,s,u);var d=f.length;if(0===d){if(s=c.type===xi?c.centerX:c.endX,u=c.type===xi?c.centerY:c.endY,t.qd(s,u)>o)return!1;break}c=null;for(var p=j(),g=0;g= 0",Nl,"strokeWidth:value")}},strokeCap:{get:function(){return this.km},set:function(t){var e=this.km;e!==t&&("string"!==typeof t||"butt"!==t&&"round"!==t&&"square"!==t?M(t,'"butt", "round", or "square"',Nl,"strokeCap"):(this.km=t,this.M(),this.g("strokeCap",e,t)))}},strokeJoin:{get:function(){return this.lm},set:function(t){var e=this.lm;e!==t&&("string"!==typeof t||"miter"!==t&&"bevel"!==t&&"round"!==t?M(t,'"miter", "bevel", or "round"',Nl,"strokeJoin"):(this.lm=t,this.M(),this.g("strokeJoin",e,t)))}},strokeMiterLimit:{get:function(){return this.gk},set:function(t){var e=this.gk;if(e!==t&&1<=t){this.gk=t,this.M();var i=this.part;null!==i&&(i.kh=NaN),this.g("strokeMiterLimit",e,t)}}},strokeDashArray:{get:function(){return this.uh},set:function(t){var e=this.uh;if(e!==t){if(null!==t){for(var i=t.length,n=0,o=0;ot?t=0:1t?t=0:1=t.ve)null!==n&&n.h(0,a);else if(s=e,t.zg===Hl){t.Be=1;var l=Gl(e);if(0===h||l<=i)t.vb=Math.max(t.vb,l),Rl(t,e,t.vb),null!==n&&n.h(l,a);else{for(r=Vl(t,s),s=s.substr(r.length),e=Vl(t,s),l=Gl(r+e);0i&&1i;){var c=1;for(l=Gl(e.substr(0,c)),u=0;l<=i;)c++,u=l,l=Gl(e.substr(0,c));if(1===c){var f=l;r=Math.max(r,l)}else f=u,r=Math.max(r,u);if(c--,1>c&&(c=1),Rl(t,e.substr(0,c),f),h++,e=e.substr(c),t.Zc+h>t.ve)break}for(u=Vl(t,s),l=Gl(e+u);0t.ve))break}t.Be=Math.min(t.ve,h),t.vb=Math.max(t.vb,r),null!==n&&n.h(t.vb,a*t.Be)}}function Vl(t,e){if(t.zg===$l)return e.substr(0,1);for(var i=e.length,n=0,o=eu;n=e.length?e:e.substr(0,n)}function Gl(t){return null===hu?8*t.length:hu.measureText(t).width}function Yl(t){if(null!==t.oe)return t.oe;var e=t.ne;if(null===hu){var i=16;return t.oe=i}return void 0!==iu[e]&&5e3>nu?i=iu[e]:(i=1.3*hu.measureText("M").width,iu[e]=i,nu++),t.oe=i}function Xl(t){if(null===hu)return 6;if(void 0!==ou[t]&&5e3>ru)var e=ou[t];else e=hu.measureText(su).width,ou[t]=e,ru++;return e}function ql(t,e){var i=t.Ub.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),n=t.mf+t.nf;if(n=Math.max(0,Yl(t)+n),0===i.length)return t.vb=0,t.Zc=1,n;if(!t.isMultiline){var o=i.indexOf("\n",0);0<=o&&(i=i.substr(0,o))}o=0;for(var r,s=t.Zc=0,a=!1;!a;){if(r=i.indexOf("\n",s),-1===r&&(r=i.length,a=!0),s<=r){if(s=i.substr(s,r-s),t.zg!==Hl){t.Be=0;var h=Bt.alloc();zl(t,s,e,h),o+=h.height,Bt.free(h),t.Zc+=t.Be}else zl(t,s,e,null),o+=n,t.Zc++;t.Zc===t.ve&&(a=!0)}s=r+1}return t.us=o}Nl.className="Shape",Nl.getFigureGenerators=function(){var t,e=new dt;for(t in _e.Qe)t!==t.toLowerCase()&&e.add(t,_e.Qe[t]);return e.freeze(),e},Nl.defineFigureGenerator=function(t,e){var i=t.toLowerCase(),n=_e.Qe;n[t]=e,n[i]=t},Nl.getArrowheadGeometries=function(){var t=new dt;for(n in _e.dn)if(void 0===Fl[n]){var e=Ze(_e.dn[n],!1);Fl[n]=e,e=n.toLowerCase(),e!==n&&(Fl[e]=n)}for(var i in Fl)if(i!==i.toLowerCase()){var n=Fl[i];n instanceof We&&t.add(i,n)}return t.freeze(),t},Nl.defineArrowheadGeometry=function(t,e){var i=null;i="string"===typeof e?Ze(e,!1):e,e=t.toLowerCase(),"none"!==e&&t!==e||w("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+t);var n=Fl;n[t]=i,n[e]=t},f(Il,ca),Il.prototype.cloneProtected=function(t){ca.prototype.cloneProtected.call(this,t),t.Ub=this.Ub,t.Jx=this.Jx,t.Hc=this.Hc,t.ne=this.ne,t.Vi=this.Vi,t.Td=this.Td,t.aj=this.aj,t.Pj=this.Pj,t.Bi=this.Bi,t.Ai=this.Ai,t.mg=this.mg,t.zg=this.zg,t.Zc=this.Zc,t.us=this.us,t.vb=this.vb,t.fv=this.fv,t.ev=this.ev,t.Vn=this.Vn,t.jq=this.jq,t.Wi=this.Wi,t.iq=this.iq,t.xn=this.xn,t.ld=this.ld,t.mf=this.mf,t.nf=this.nf,t.ti=this.ti,t.ve=this.ve,t.oe=this.oe,t.Be=this.Be,t.Qb=this.Qb,t.lb=this.lb,t.me=this.me,t.Ei=this.Ei,t.Yd=this.Yd,t.Wd=this.Wd,t.Ud=this.Ud,t.Lj=this.Lj,t.Vd=this.Vd},i=Il.prototype,i.jb=function(t){t.classType===Il?this.wrap=t:ca.prototype.jb.call(this,t)},i.toString=function(){return 22f*u*u&&(i=!0),e.Gb!==t&&(i=!1),!1===e.Ke("textGreeking")&&(i=!1),e=this.mf,f=this.nf,this.flip){case Js:t.translate(o,0),t.scale(-1,1);break;case $s:t.translate(0,r),t.scale(1,-1);break;case Zs:t.translate(o,r),t.scale(-1,-1)}if(u=this.Zc,c=(e+s+f)*u,r>c&&(n=this.aj,n=n.y*r-n.y*c+n.offsetY),1===u&&null!==this.me)f=this.vb,f>o&&(f=o),this.dj(this.me,t,0,n+e,o,s,f,i,a,h,l);else if(null!==this.Qb&&null!==this.lb)for(c=0;co&&(d=o),n+=e,this.dj(this.lb[c],t,0,n,o,s,d,i,a,h,l),n+=s+f}switch(this.flip){case Js:t.scale(-1,1),t.translate(-o,0);break;case $s:t.scale(1,-1),t.translate(0,-r);break;case Zs:t.scale(-1,-1),t.translate(-o,-r)}}},i.dj=function(t,e,i,n,o,r,s,a,h,l,u){var c=0;a?("left"===h?c=0:"right"===h?c=o-s:"center"===h&&(c=(o-s)/2),e.fillRect(i+c,n+.25*r,s,1)):("left"===h?c=0:"right"===h?c=o:"center"===h&&(c=o/2),o=null!==Ul?Ul(this,r):.75*r,e.fillText(t,i+c,n+o),t=r/20|0,0===t&&(t=1),"right"===h?c-=s:"center"===h&&(c-=s/2),l&&(h=null!==Kl?Kl(this,r):.8*r,e.beginPath(),e.lineWidth=t,e.moveTo(i+c,n+h),e.lineTo(i+c+s,n+h),e.stroke()),u&&(e.beginPath(),e.lineWidth=t,n=n+r-r/2.2|0,0!==t%2&&(n+=.5),e.moveTo(i+c,n),e.lineTo(i+c+s,n),e.stroke()))},i.Hm=function(t,e,i,n){this.Ei=t;var o,r=this.ne;if(null!==hu&&au!==r&&(au=hu.font=r),this.vb=this.Be=0,this.me=this.lb=this.Qb=this.oe=null,isNaN(this.desiredSize.width)){if(r=this.Ub.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),0===r.length)r=0;else if(this.isMultiline){for(var s=o=0,a=!1;!a;){var h=r.indexOf("\n",s);-1===h&&(h=r.length,a=!0),s=r.substr(s,h-s),this.ti===Ql&&(s=s.trim()),o=Math.max(o,Gl(s)),s=h+1}r=o}else o=r.indexOf("\n",0),0<=o&&(r=r.substr(0,o)),r=Gl(r);r=Math.min(r,t/this.scale),r=Math.max(8,r)}else r=this.desiredSize.width;if(null!==this.panel&&(r=Math.min(r,this.panel.maxSize.width)),o=ql(this,r),o=isNaN(this.desiredSize.height)?Math.min(o,e/this.scale):this.desiredSize.height,a=o,0!==this.vb&&null!==this.Qb&&null!==this.lb&&this.mg===Zl&&(e=this.ne,e=this.mg===Zl?Xl(e):0,h=this.mf+this.nf,h=Math.max(0,Yl(this)+h),a=Math.min(this.maxLines-1,Math.max(Math.floor(a/h+.01)-1,0)),!(a+1>=this.lb.length))){for(h=this.lb[a],e=Math.max(1,t-e);Gl(h)>e&&1t?t=0:1t?t=0:1=t&&M(t,"> 0",Il,"maxLines"),this.ve=t,this.o(),this.g("maxLines",e,t))}},metrics:{get:function(){return{arrSize:null!==this.Qb?this.Qb:[this.vb],arrText:null!==this.lb?this.lb:[this.me],maxLineWidth:this.vb,fontHeight:this.oe}}},choices:{get:function(){return this.xn},set:function(t){var e=this.xn;e!==t&&(this.xn=t,this.g("choices",e,t))}}});var Ul=null,Kl=null,Hl=new U(Il,"None",0),_l=new U(Il,"WrapFit",1),Wl=new U(Il,"WrapDesiredSize",2),$l=new U(Il,"WrapBreakAll",3),Jl=new U(Il,"OverflowClip",0),Zl=new U(Il,"OverflowEllipsis",1),Ql=new U(Il,"FormatTrim",0),tu=new U(Il,"FormatNone",0),eu=/[ \u200b\u00ad]/,iu=new _,nu=0,ou=new _,ru=0,su="...",au="",hu=null,lu=!1;function uu(){this.Qb=[],this.lb=[]}function cu(){ca.call(this),this.Zg=null,this.$p="",this.th=Jt,this.yl=Xs,this.xh=this.ld=null,this.xl=ae,this.Td=qs,this.nm=null,this.uo=!1,this.Yr=!0,this.Ol=!1,this.gm=null}function fu(t){void 0===t&&(t=""),""!==t?gu[t]&&(delete gu[t],yu--):(gu=new _,yu=0)}function du(t,e){e.fz||(e.dv=function(i){e.ls=!0,e.ro=!1;var n=e.Wg.copy();if(null!==n&&void 0!==n){for(n=n.iterator;n.next();){var o=n.value,r=e.getAttribute("src"),s=o.pg.G(r);if(null!==s)for(var a=s.length,h=0;h=n.width&&(o=o+d.offsetX+(u*d.x-n.width*d.x)),c>=n.height&&(r=r+d.offsetY+(c*d.y-n.height*d.y)),a=Math.min(n.width,u),s=Math.min(n.height,c);break;case Xs:u=n.width,c=n.height;break;case Us:case Ws:f===Us?(f=Math.min(n.height/c,n.width/u),u*=f,c*=f):f===Ws&&(f=Math.max(n.height/c,n.width/u),u*=f,c*=f,u>=n.width&&(o=(o+d.offsetX+(u*d.x-n.width*d.x)/u)*a),c>=n.height&&(r=(r+d.offsetY+(c*d.y-n.height*d.y)/c)*s),a*=1/(u/n.width),s*=1/(c/n.height),u=n.width,c=n.height)}f=this.Af()*e.scale;var p=u*f*c*f,g=a*s/p,y=i.__goCache;f=null;var m=mu;if(i.ls&&void 0!==y&&4m*m)for(null===y.cj&&(xu(y,4,h,l,i),xu(y,16,h,l,i)),h=y.cj,l=h.length,p=0;p_e.Vh&&(_e.Uh[t]=n,_e.Vh++)),n})),Au("Square",(function(t,e,i){t="s"+e+","+i;var n=_e.Uh[t];return void 0!==n||(n=new We(ai),n.endX=e,n.endY=i,n.defaultStretch=Us,50>_e.Vh&&(_e.Uh[t]=n,_e.Vh++)),n})),Au("RoundedRectangle",(function(t,e,i){var n=t?t.parameter1:NaN;return(isNaN(n)||0>n)&&(n=5),n=Math.min(n,e/3),n=Math.min(n,i/3),t=n*_e.Kg,e=(new We).add(new ci(n,0,!0).add(new fi(yi,e-n,0)).add(new fi(mi,e,n,e-t,0,e,t)).add(new fi(yi,e,i-n)).add(new fi(mi,e-n,i,e,i-t,e-t,i)).add(new fi(yi,n,i)).add(new fi(mi,0,i-n,t,i,0,i-t)).add(new fi(yi,0,n)).add(new fi(mi,n,0,0,t,t,0).close())),1_e.Vh&&(_e.Uh[t]=n,_e.Vh++)),n})),Au("Circle",(function(t,e,i){t="c"+e+","+i;var n=_e.Uh[t];return void 0!==n||(n=new We(hi),n.endX=e,n.endY=i,n.spot1=Ie,n.spot2=Ee,n.defaultStretch=Us,50>_e.Vh&&(_e.Uh[t]=n,_e.Vh++)),n})),Au("TriangleRight",(function(t,e,i){return(new We).add(new ci(0,0).add(new fi(yi,e,.5*i)).add(new fi(yi,0,i).close())).Zm(0,.25,.5,.75)})),Au("TriangleDown",(function(t,e,i){return(new We).add(new ci(0,0).add(new fi(yi,e,0)).add(new fi(yi,.5*e,i).close())).Zm(.25,0,.75,.5)})),Au("TriangleLeft",(function(t,e,i){return(new We).add(new ci(e,i).add(new fi(yi,0,.5*i)).add(new fi(yi,e,0).close())).Zm(.5,.25,1,.75)})),Au("TriangleUp",(function(t,e,i){return(new We).add(new ci(e,i).add(new fi(yi,0,i)).add(new fi(yi,.5*e,0).close())).Zm(.25,.5,.75,1)})),Au("Triangle","TriangleUp"),Au("Diamond",(function(t,e,i){return(new We).add(new ci(.5*e,0).add(new fi(yi,0,.5*i)).add(new fi(yi,.5*e,i)).add(new fi(yi,e,.5*i).close())).Zm(.25,.25,.75,.75)})),Au("LineH",(function(t,e,i){return t=new We(si),t.startX=0,t.startY=i/2,t.endX=e,t.endY=i/2,t})),Au("LineV",(function(t,e,i){return t=new We(si),t.startX=e/2,t.startY=0,t.endX=e/2,t.endY=i,t})),Au("None","Rectangle"),Au("BarH","Rectangle"),Au("BarV","Rectangle"),Au("MinusLine","LineH"),Au("PlusLine",(function(t,e,i){return(new We).add(new ci(0,i/2,!1).add(new fi(yi,e,i/2)).add(new fi(gi,e/2,0)).add(new fi(yi,e/2,i)))})),Au("XLine",(function(t,e,i){return(new We).add(new ci(0,i,!1).add(new fi(yi,e,0)).add(new fi(gi,0,0)).add(new fi(yi,e,i)))})),_e.dn={"":"",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"},f(Lu,Uh),Lu.prototype.cloneProtected=function(t){Uh.prototype.cloneProtected.call(this,t),t.D=-4097&this.D|49152,t.Nf=this.Nf,t.ih=this.ih,t.Ho=this.Ho,t.Rp=this.Rp,t.Cp=this.Cp,t.Gp=this.Gp,t.Tp=this.Tp,t.Sp=this.Sp,t.so=this.so,t.Lf=null,t.Ep=this.Ep,t.Dp=this.Dp.H(),t.Hp=this.Hp,t.Ip=this.Ip.H(),t.Ub=this.Ub,t.An=this.An,t.dg.assign(this.dg),t.Oo=this.Oo,t.Po=this.Po.H(),t.Yo=this.Yo.H(),t.Qo=this.Qo.H(),t.Sn=this.Sn,t.Io=this.Io,t.Xp=this.Xp.H(),t.Wp=this.Wp,t.ug=this.ug,t.tq=this.tq},Lu.prototype.yf=function(t){Uh.prototype.yf.call(this,t),t.Oh(),t.sh=null,t.cf=null,t.Xj=null},Lu.prototype.toString=function(){var t=D(this.constructor)+"#"+st(this);return null!==this.data&&(t+="("+F(this.data)+")"),t},Lu.prototype.Sk=function(t,e,i,n,o,r,s){var a=this.diagram;null!==a&&(t===Ni&&"elements"===e?o instanceof Uh?Jh(o,(function(t){Md(a.partManager,t),Hr(a,t)})):_r(a,o):t===Ci&&"elements"===e&&(o instanceof Uh?Jh(o,(function(t){Sd(a.partManager,t,a)})):Wr(a,o)),a.Va(t,e,i,n,o,r,s))},Lu.prototype.Da=function(t){if(Uh.prototype.Da.call(this,t),null!==this.data){for(var e=this.W.j,i=e.length,n=0;no.x&&t.y>o.y&&t.righto.x&&e.y>o.y&&e.right=i.maxSelectionCount)){this.D^=4096;var n=!1;if(null!==i){n=i.skipsUndoManager,i.skipsUndoManager=!0;var o=i.selection;o.ea(),t?o.add(this):o.remove(this),o.freeze()}this.g("isSelected",e,t),this.Lb(),t=this.selectionChanged,null!==t&&t(this),null!==i&&(i.Db(),i.skipsUndoManager=n)}}}},isHighlighted:{get:function(){return 0!==(524288&this.D)},set:function(t){var e=0!==(524288&this.D);if(e!==t){this.D^=524288;var i=this.diagram;null!==i&&(i=i.highlighteds,i.ea(),t?i.add(this):i.remove(this),i.freeze()),this.g("isHighlighted",e,t),this.M(),t=this.highlightedChanged,null!==t&&t(this)}}},isShadowed:{get:function(){return 0!==(8192&this.D)},set:function(t){var e=0!==(8192&this.D);e!==t&&(this.D^=8192,this.g("isShadowed",e,t),this.M())}},isAnimated:{get:function(){return 0!==(262144&this.D)},set:function(t){var e=0!==(262144&this.D);e!==t&&(this.D^=262144,this.g("isAnimated",e,t))}},highlightedChanged:{get:function(){return this.so},set:function(t){var e=this.so;e!==t&&(this.so=t,this.g("highlightedChanged",e,t))}},selectionObjectName:{get:function(){return this.Tp},set:function(t){var e=this.Tp;e!==t&&(this.Tp=t,this.sh=null,this.g("selectionObjectName",e,t))}},selectionAdornmentTemplate:{get:function(){return this.Rp},set:function(t){var e=this.Rp;e!==t&&(this.Rp=t,this.g("selectionAdornmentTemplate",e,t))}},selectionObject:{get:function(){if(null===this.sh){var t=this.selectionObjectName;null!==t&&""!==t?(t=this.bb(t),this.sh=null!==t?t:this):this instanceof Nc?(t=this.path,this.sh=null!==t?t:this):this.sh=this}return this.sh}},selectionChanged:{get:function(){return this.Sp},set:function(t){var e=this.Sp;e!==t&&(this.Sp=t,this.g("selectionChanged",e,t))}},resizeAdornmentTemplate:{get:function(){return this.Cp},set:function(t){var e=this.Cp;e!==t&&(this.Cp=t,this.g("resizeAdornmentTemplate",e,t))}},resizeObjectName:{get:function(){return this.Ep},set:function(t){var e=this.Ep;e!==t&&(this.Ep=t,this.g("resizeObjectName",e,t))}},resizeObject:{get:function(){var t=this.resizeObjectName;return""!==t&&(t=this.bb(t),null!==t)?t:this}},resizeCellSize:{get:function(){return this.Dp},set:function(t){var e=this.Dp;e.w(t)||(this.Dp=t=t.H(),this.g("resizeCellSize",e,t))}},rotateAdornmentTemplate:{get:function(){return this.Gp},set:function(t){var e=this.Gp;e!==t&&(this.Gp=t,this.g("rotateAdornmentTemplate",e,t))}},rotateObjectName:{get:function(){return this.Hp},set:function(t){var e=this.Hp;e!==t&&(this.Hp=t,this.g("rotateObjectName",e,t))}},rotateObject:{get:function(){var t=this.rotateObjectName;return""!==t&&(t=this.bb(t),null!==t)?t:this}},rotationSpot:{get:function(){return this.Ip},set:function(t){var e=this.Ip;e.w(t)||(this.Ip=t=t.H(),this.g("rotationSpot",e,t))}},text:{get:function(){return this.Ub},set:function(t){var e=this.Ub;e!==t&&(this.Ub=t,this.g("text",e,t))}},containingGroup:{get:function(){return this.mi},set:function(t){if(this.Nc()){var e=this.mi;if(e!==t){null===t||this!==t&&!t.Kd(this)||(this===t&&w("Cannot make a Group a member of itself: "+this.toString()),w("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+t.toString())),this.B(2);var i=this.diagram;if(null!==e?kc(e,this):this instanceof bc&&null!==i&&i.Dh.remove(this),this.mi=t,null!==t?wc(t,this):this instanceof bc&&null!==i&&i.Dh.add(this),this.B(1),null!==i&&i.Z){var n=this.data,o=i.model;if(null!==n&&o.Dk()){var r=o.ja(null!==t?t.data:null);o.dr(n,r)}}if(n=this.containingGroupChanged,null!==n&&(o=!0,null!==i&&(o=i.Z,i.Z=!0),n(this,e,t),null!==i&&(i.Z=o)),this instanceof bc)for(i=new nt,Ju(i,this,!0,0,!0),i=i.iterator;i.next();)if(n=i.value,n instanceof ec)for(n=n.linksConnected;n.next();)Cc(n.value);if(this instanceof ec){for(i=this.linksConnected;i.next();)Cc(i.value);i=this.labeledLink,null!==i&&Cc(i)}this.g("containingGroup",e,t),null!==t&&(e=t.layer,null!==e&&qo(e,-1,t))}}else w("cannot set the Part.containingGroup of a Link or Adornment")}},containingGroupChanged:{get:function(){return this.An},set:function(t){var e=this.An;e!==t&&(this.An=t,this.g("containingGroupChanged",e,t))}},isTopLevel:{get:function(){return!(null!==this.containingGroup||this instanceof ec&&null!==this.labeledLink)}},layoutConditions:{get:function(){return this.Io},set:function(t){var e=this.Io;e!==t&&(this.Io=t,this.g("layoutConditions",e,t))}},dragComputation:{get:function(){return this.Sn},set:function(t){var e=this.Sn;e!==t&&(this.Sn=t,this.g("dragComputation",e,t))}},shadowOffset:{get:function(){return this.Xp},set:function(t){var e=this.Xp;e.w(t)||(this.Xp=t=t.H(),this.M(),this.g("shadowOffset",e,t))}},shadowColor:{get:function(){return this.Wp},set:function(t){var e=this.Wp;e!==t&&(this.Wp=t,this.M(),this.g("shadowColor",e,t))}},shadowBlur:{get:function(){return this.ug},set:function(t){var e=this.ug;e!==t&&(this.ug=t,this.M(),this.g("shadowBlur",e,t))}}}),Lu.prototype.invalidateLayout=Lu.prototype.B,Lu.prototype.findCommonContainingGroup=Lu.prototype.oy,Lu.prototype.isMemberOf=Lu.prototype.Kd,Lu.prototype.findTopLevelPart=Lu.prototype.eA,Lu.prototype.findSubGraphLevel=Lu.prototype.bA,Lu.prototype.ensureBounds=Lu.prototype.Ta,Lu.prototype.getDocumentBounds=Lu.prototype.mj,Lu.prototype.getRelativePoint=Lu.prototype.Df,Lu.prototype.findObject=Lu.prototype.bb,Lu.prototype.moveTo=Lu.prototype.moveTo,Lu.prototype.invalidateAdornments=Lu.prototype.Lb,Lu.prototype.clearAdornments=Lu.prototype.nk,Lu.prototype.removeAdornment=Lu.prototype.Hf,Lu.prototype.addAdornment=Lu.prototype.Gh,Lu.prototype.findAdornment=Lu.prototype.wk,Lu.prototype.updateTargetBindings=Lu.prototype.Da;var Zu=!1;function Qu(t){Lu.call(this,t),this.D&=-257,this.ih="Adornment",this.ie=null,this.Ex=0,this.Sx=!1,this.l=t instanceof Yh?[]:tc,this.Sa=null}Lu.className="Part",Lu.LayoutNone=0,Lu.LayoutAdded=1,Lu.LayoutRemoved=2,Lu.LayoutShown=4,Lu.LayoutHidden=8,Lu.LayoutNodeSized=16,Lu.LayoutGroupLayout=32,Lu.LayoutNodeReplaced=64,Lu.LayoutStandard=127,Lu.LayoutAll=16777215,f(Qu,Lu),Qu.prototype.toString=function(){var t=this.adornedPart;return"Adornment("+this.category+")"+(null!==t?t.toString():"")},Qu.prototype.updateRelationshipsFromData=function(){},Qu.prototype.Gk=function(t){var e=this.adornedObject.part;if(e instanceof Nc&&this.adornedObject instanceof Nl){var i=e.path;e.Gk(t),t=i.geometry,e=this.W.j,i=e.length;for(var n=0;nt&&(t=1);var e=this.diagram;if(null!==e&&!e.Le){e.Le=!0;var i=new nt;i.add(this),pc(this,i,e.isTreePathToChildren,t,e,this,e.treeCollapsePolicy===Ls),e.Le=!1}},ec.prototype.expandTree=function(t){void 0===t&&(t=2),2>t&&(t=2);var e=this.diagram;if(null!==e&&!e.Le){e.Le=!0;var i=new nt;i.add(this),yc(this,i,e.isTreePathToChildren,t,e,this,e.treeCollapsePolicy===Ls),e.Le=!1}},d.Object.defineProperties(ec.prototype,{portSpreading:{get:function(){return this.zp},set:function(t){var e=this.zp;e!==t&&(this.zp=t,this.g("portSpreading",e,t),t=this.diagram,null!==t&&t.undoManager.isUndoingRedoing||this.sd())}},avoidable:{get:function(){return 0!==(8&this.P)},set:function(t){var e=0!==(8&this.P);if(e!==t){this.P^=8;var i=this.diagram;null!==i&&hs(i,this),this.g("avoidable",e,t)}}},avoidableMargin:{get:function(){return this.cl},set:function(t){"number"===typeof t&&(t=new Qt(t));var e=this.cl;if(!e.w(t)){this.cl=t=t.H();var i=this.diagram;null!==i&&hs(i,this),this.g("avoidableMargin",e,t)}}},linksConnected:{get:function(){return this.$a.iterator}},linkConnected:{get:function(){return this.Jo},set:function(t){var e=this.Jo;e!==t&&(this.Jo=t,this.g("linkConnected",e,t))}},linkDisconnected:{get:function(){return this.Ko},set:function(t){var e=this.Ko;e!==t&&(this.Ko=t,this.g("linkDisconnected",e,t))}},linkValidation:{get:function(){return this.Ii},set:function(t){var e=this.Ii;e!==t&&(this.Ii=t,this.g("linkValidation",e,t))}},isLinkLabel:{get:function(){return null!==this.Kl}},labeledLink:{get:function(){return this.Kl},set:function(t){var e=this.Kl;if(e!==t){var i=this.diagram,n=this.data;if(null!==e){if(null!==e.nd&&(e.nd.remove(this),e.o()),null!==i&&null!==n&&!i.undoManager.isUndoingRedoing){var o=e.data,r=i.model;if(null!==o&&r.qj()){var s=r.ja(n);void 0!==s&&r.Oy(o,s)}}this.containingGroup=null}this.Kl=t,null!==t&&(Tc(t,this),null===i||null===n||i.undoManager.isUndoingRedoing||(o=t.data,i=i.model,null!==o&&i.qj()&&(n=i.ja(n),void 0!==n&&i.Dv(o,n))),this.containingGroup=t.containingGroup),wa(this),this.g("labeledLink",e,t)}}},port:{get:function(){return this.Jt("")}},ports:{get:function(){return null===this.tc&&uc(this),this.tc.iteratorValues}},isTreeExpanded:{get:function(){return 0!==(1&this.P)},set:function(t){var e=0!==(1&this.P);if(e!==t){this.P^=1;var i=this.diagram;if(this.g("isTreeExpanded",e,t),e=this.treeExpandedChanged,null!==e){var n=!0;null!==i&&(n=i.Z,i.Z=!0),e(this),null!==i&&(i.Z=n)}null!==i&&i.undoManager.isUndoingRedoing?this.Ob(t):t?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return 0!==(2&this.P)},set:function(t){var e=0!==(2&this.P);e!==t&&(this.P^=2,this.g("wasTreeExpanded",e,t))}},treeExpandedChanged:{get:function(){return this.nq},set:function(t){var e=this.nq;e!==t&&(this.nq=t,this.g("treeExpandedChanged",e,t))}},isTreeLeaf:{get:function(){return 0!==(4&this.P)},set:function(t){var e=0!==(4&this.P);e!==t&&(this.P^=4,this.g("isTreeLeaf",e,t))}}}),ec.prototype.expandTree=ec.prototype.expandTree,ec.prototype.collapseTree=ec.prototype.collapseTree,ec.prototype.findTreeParts=ec.prototype.hA,ec.prototype.findTreeChildrenNodes=ec.prototype.Wv,ec.prototype.findTreeChildrenLinks=ec.prototype.Hq,ec.prototype.findTreeLevel=ec.prototype.fA,ec.prototype.findTreeParentChain=ec.prototype.gA,ec.prototype.findTreeParentNode=ec.prototype.Fg,ec.prototype.findTreeParentLink=ec.prototype.jj,ec.prototype.findCommonTreeParent=ec.prototype.Uz,ec.prototype.findTreeRoot=ec.prototype.iA,ec.prototype.isInTreeOf=ec.prototype.zA,ec.prototype.findPort=ec.prototype.Jt,ec.prototype.findLinksTo=ec.prototype.Yz,ec.prototype.findLinksBetween=ec.prototype.Xz,ec.prototype.findNodesInto=ec.prototype.Tv,ec.prototype.findNodesOutOf=ec.prototype.Uv,ec.prototype.findNodesConnected=ec.prototype.Sv,ec.prototype.findLinksInto=ec.prototype.Hd,ec.prototype.findLinksOutOf=ec.prototype.Fq,ec.prototype.findExternalTreeLinksConnected=ec.prototype.py,ec.prototype.invalidateConnectedLinks=ec.prototype.sd,ec.prototype.invalidateLinkBundle=ec.prototype.xA;var mc=new U(ec,"SpreadingNone",10),vc=new U(ec,"SpreadingEvenly",11),xc=new U(ec,"SpreadingPacked",12);function bc(t){ec.call(this,t),this.P|=4608,this.Vo=new nt,this.Sl=new nt,this.Sa=this.eq=this.Ki=this.Wo=this.Uo=this.Za=null,this.kc=new zf,this.kc.group=this}function wc(t,e){if(t.Vo.add(e)){e instanceof bc&&t.Sl.add(e);var i=t.memberAdded;if(null!==i){var n=!0,o=t.diagram;null!==o&&(n=o.Z,o.Z=!0),i(t,e),null!==o&&(o.Z=n)}t.isVisible()&&t.isSubGraphExpanded||e.Ob(!1)}e instanceof Nc&&!t.computesBoundsIncludingLinks||(e=t.Sa,null===e&&(e=t),e.o())}function kc(t,e){if(t.Vo.remove(e)){e instanceof bc&&t.Sl.remove(e);var i=t.memberRemoved;if(null!==i){var n=!0,o=t.diagram;null!==o&&(n=o.Z,o.Z=!0),i(t,e),null!==o&&(o.Z=n)}t.isVisible()&&t.isSubGraphExpanded||e.Ob(!0)}e instanceof Nc&&!t.computesBoundsIncludingLinks||(e=t.Sa,null===e&&(e=t),e.o())}function Mc(t,e,i,n){for(var o=t.memberParts;o.next();){var r=o.value;if(r.Ob(!1),r instanceof bc&&r.isSubGraphExpanded&&(r.wasSubGraphExpanded=r.isSubGraphExpanded,Mc(r,e,i,n)),r instanceof ec)r.sd(e),i.jk(r,n);else if(r instanceof Nc)for(r=r.labelNodes;r.next();)r.value.sd(e)}t.isSubGraphExpanded=!1}function Sc(t,e,i,n){for(var o=t.memberParts;o.next();){var r=o.value;if(r.Ob(!0),r instanceof bc&&r.wasSubGraphExpanded&&(r.wasSubGraphExpanded=!1,Sc(r,e,i,n)),r instanceof ec)r.sd(e),i.lk(r,n);else if(r instanceof Nc)for(r=r.labelNodes;r.next();)r.value.sd(e)}t.isSubGraphExpanded=!0}function Pc(){ca.call(this),this.ib=Re,this.Np=new zt(NaN,NaN,NaN,NaN)}function Nc(){Lu.call(this,Uh.Link),this.Ga=8,this.We=null,this.Xe="",this.rf=this.fo=null,this.sf="",this.mq=null,this.Yk=tf,this.Hn=0,this.Jn=tf,this.Kn=NaN,this.ck=$c,this.Zp=.5,this.nd=null,this.Ab=(new et).freeze(),this.jf=this.ph=null,this.Yl=new zt,this.na=new We,this.I=this.u=this.Mf=this.Vf=null,this.l=[],this.vv=new pt,this.$r=this.Nx=this.Mx=null,this.Ru=NaN,this.O=null}function Cc(t){var e=t.fromNode,i=t.toNode,n=null;if(n=null!==e?null!==i?e.oy(i):e.containingGroup:null!==i?i.containingGroup:null,e=n,i=t.mi,i!==e){null!==i&&kc(i,t),t.mi=e,null!==e&&wc(e,t);var o=t.containingGroupChanged;if(null!==o){var r=!0,s=t.diagram;null!==s&&(r=s.Z,s.Z=!0),o(t,i,e),null!==s&&(s.Z=r)}!t.ud||t.Mx!==i&&t.Nx!==i||t.Ua()}if(t.isLabeledLink)for(t=t.labelNodes;t.next();)t.value.containingGroup=n}function Tc(t,e){null===t.nd&&(t.nd=new nt),t.nd.add(e),t.o()}function Ac(t,e,i){if(0!==e||0!==i)if(0===t.pointsCount)t.defaultFromPoint&&t.defaultFromPoint.copy().offset(e,i),t.defaultToPoint&&t.defaultToPoint.copy().offset(e,i);else{for(var n=t.ud,o=new et,r=t.Ab.iterator;r.next();){var s=r.value;o.add(new pt(s.x+e,s.y+i).freeze())}o.freeze(),r=t.Ab,t.Ab=o,s=t.diagram,isNaN(e)||isNaN(i)||null!==s&&s.animationManager.sc?t.o():(t.dg.h(t.dg.x+e,t.dg.y+i),t.la.h(t.la.x+e,t.la.y+i),wa(t)),n?Lc(t):(t.defaultFromPoint&&(t.defaultFromPoint=t.i(0)),t.defaultToPoint&&(t.defaultToPoint=t.i(t.pointsCount-1))),null!==s&&s.animationManager.sc&&(e=s.animationManager,t.jf=o,e.$l.add(t)),t.g("points",r,o)}}function Lc(t){0===t.Ab.count?t.ud=!1:(t.ud=!0,t.$r=null,t.Ru=NaN,t.defaultFromPoint=t.i(0),t.defaultToPoint=t.i(t.pointsCount-1),qc(t,!1))}function jc(t,e){return Math.abs(e.x-t.x)>Math.abs(e.y-t.y)?(e.x>=t.x?e.x=t.x+9e9:e.x=t.x-9e9,e.y=t.y):(e.y>=t.y?e.y=t.y+9e9:e.y=t.y-9e9,e.x=t.x),e}function Oc(t,e){var i=e.yp;return null===i&&(i=new Ff,i.port=e,i.node=e.part,e.yp=i),If(i,t)}function Dc(t){return t===ie||.5===t.x&&.5===t.y}function Fc(t){return.5===t.x&&.5===t.y?t:ae}function Bc(t){if(null===t.diagram||!t.isAvoiding||!os(t.diagram))return!1;var e=t.points.j,i=e.length;if(4>i)return!1;t=rs(t.diagram,!0,t.containingGroup,null);for(var n=1;nLf&&kf(e,u,c)!==l-1&&(kf(e,i-a,n)===l-1?(o=180,u=i-a,c=n):kf(e,i+a,n)===l-1?(o=0,u=i+a,c=n):kf(e,i,n-h)===l-1?(o=270,u=i,c=n-h):kf(e,i,n+h)===l-1&&(o=90,u=i,c=n+h));l>Lf&&kf(e,u,c)===l-1;)i=u,n=c,0===o?u+=a:90===o?c+=h:180===o?u-=a:c-=h,--l;r?l>Lf&&(180===o||0===o?i=Math.floor(i/a)*a+a/2:90!==o&&270!==o||(n=Math.floor(n/h)*h+h/2)):(i=Math.floor(i/a)*a+a/2,n=Math.floor(n/h)*h+h/2),l>Lf&&(r=o,s=i,u=n,0===o?(r=90,u+=h):90===o?(r=180,s-=a):180===o?(r=270,u-=h):270===o&&(r=0,s+=a),kf(e,s,u)===l-1?Ic(t,e,s,u,r,!1,r):(s=i,u=n,0===o?(r=270,u-=h):90===o?(r=0,s+=a):180===o?(r=90,u+=h):270===o&&(r=180,s-=a),kf(e,s,u)===l-1&&Ic(t,e,s,u,r,!1,r))),t.vf(i,n)}function Ec(t,e,i,n){return t=i-t,isNaN(t)||1/0===t||-1/0===t?NaN:(0>t&&(t=-t),e=n-e,isNaN(e)||1/0===e||-1/0===e?NaN:(0>e&&(e=-e),_e.aa(t,0)?e:_e.aa(e,0)?t:Math.sqrt(t*t+e*e)))}function Rc(t,e,i,n){var o=t.pointsCount;if(2>o)return e;if(i){var r=t.i(1);if(i=r.x-n.x,r=r.y-n.y,n=Ec(e.x,e.y,i,r),0===n)return e;o=2===o?.5*n:n,t=t.computeShortLength(!0),t>o&&(t=o),o=t*(r-e.y)/n,e.x+=t*(i-e.x)/n,e.y+=o}else{if(r=t.i(o-2),i=r.x-n.x,r=r.y-n.y,n=Ec(e.x,e.y,i,r),0===n)return e;o=2===o?.5*n:n,t=t.computeShortLength(!1),t>o&&(t=o),o=t*(e.y-r)/n,e.x-=t*(e.x-i)/n,e.y-=o}return e}function zc(t,e,i,n){for(var o=t.pointsCount,r=e;_e.aa(e.x,r.x)&&_e.aa(e.y,r.y);){if(i>=o)return o-1;r=t.i(i++)}if(!_e.aa(e.x,r.x)&&!_e.aa(e.y,r.y))return i-1;for(var s=r;_e.aa(e.x,r.x)&&_e.aa(r.x,s.x)&&(!n||(e.y>=r.y?r.y>=s.y:r.y<=s.y))||_e.aa(e.y,r.y)&&_e.aa(r.y,s.y)&&(!n||(e.x>=r.x?r.x>=s.x:r.x<=s.x));){if(i>=o)return o-1;s=t.i(i++)}return i-2}function Vc(t,e,i,n,o,r,s){if(!s&&Xc(t)){s=t.computeJumpLength();var a=s/2,h=[],l=0;if(t.isVisible()&&(l=Gc(t,o,r,h)),0c-s))break;l--,c=Math.max(u-a,r.x)}u=r.y-s+n,c+=i,d=r.y+n,t.curve===nf?ku(e,c,d,!1):Su(e,f,u,c,u,c,d)}else if(_e.A(o.x,r.x))if(o.yu-s))break;l--,u=Math.max(c-a,r.y)}c=r.x-s+i,d=r.x+i,u+=n,t.curve===nf?ku(e,d,u,!1):Su(e,c,f,c,u,d,u)}}e.lineTo(r.x+i,r.y+n)}function Gc(t,e,i,n){var o=t.diagram;if(null===o||e.w(i))return 0;for(o=o.layers;o.next();){var r=o.value;if(null!==r&&r.visible){r=r.Ea.j;for(var s=r.length,a=0;as.x&&u.x>=l.x||l.xs.y&&u.y>=l.y||l.ys&&Math.min(p,g)u&&!_e.A(p,g)){a.x=u,a.y=s,u=!0;break t}}else if(_e.A(c,d)&&_e.A(p,g)&&Math.min(u,f)p&&Math.min(s,y)c&&!_e.A(s,y)){a.x=p,a.y=c,u=!0;break t}a.x=0,a.y=0,u=!1}u&&(o?i.push(a.x):i.push(a.y)),s=l}pt.free(a)}function Xc(t){return t=t.curve,t===of||t===nf}function qc(t,e){(e||Xc(t))&&(e=t.diagram,null===e||e.animationManager.isTicking||e.Vg.contains(t)||0===t.Yl.width&&0===t.Yl.height||e.Vg.add(t,t.Yl.copy()))}function Uc(t,e,i){if(null!==e&&e.$m&&e.ud&&Xc(e)){var n=e.routeBounds;n.s()&&(t.routeBounds.Mc(n)||i.Mc(n))&&(t.usesSamePort(e)||e.dc())}}function Kc(t){var e=t.We;if(null!==e){var i=t.rf;if(null!==i&&isNaN(t.curviness)){for(var n=t.Xe,o=t.sf,r=t=null,s=e.$a.j,a=s.length,h=0;ho&&(o=a.right),a.bottom>r&&(r=a.bottom)}}return isFinite(i)&&isFinite(n)?t.h(i,n,o-i,r-n):(e=e.location,t.h(e.x,e.y,0,0)),t},d.Object.defineProperties(Pc.prototype,{padding:{get:function(){return this.ib},set:function(t){"number"===typeof t&&(t=new Qt(t));var e=this.ib;e.w(t)||(this.ib=t=t.H(),this.g("padding",e,t),this.o())}}}),Pc.className="Placeholder",f(Nc,Lu),Nc.prototype.cloneProtected=function(t){Lu.prototype.cloneProtected.call(this,t),t.Ga=-113&this.Ga,t.Xe=this.Xe,t.fo=this.fo,t.sf=this.sf,t.mq=this.mq,t.Yk=this.Yk,t.Hn=this.Hn,t.Jn=this.Jn,t.Kn=this.Kn,t.ck=this.ck,t.Zp=this.Zp,null!==this.O&&(t.O=this.O.copy())},i=Nc.prototype,i.yf=function(t){Lu.prototype.yf.call(this,t),this.Xe=t.Xe,this.sf=t.sf,t.ph=null,t.Ua(),t.Mf=this.Mf;var e=t.fromPort;null!==e&&rc(e),t=t.toPort,null!==t&&rc(t)},i.jb=function(t){t.classType===Nc?2===(2&t.value)?this.routing=t:t===ef||t===nf||t===of?this.curve=t:t===rf||t===sf||t===af?this.adjusting=t:t!==$c&&t!==tf&&w("Unknown Link enum value for a Link property: "+t):Lu.prototype.jb.call(this,t)},i.Kc=function(){null===this.O&&(this.O=new Rf)},i.rj=function(){var t=this.fromNode;if(null!==t){var e=t.findVisibleNode();if(null!==e&&(t=e),Oa(t)||Yu(t))return!1}return t=this.toNode,null===t||(e=t.findVisibleNode(),null!==e&&(t=e),!Oa(t)&&!Yu(t))},i.Ew=function(){return!1},i.lu=function(){},i.Nc=function(){return!1},Nc.prototype.computeAngle=function(t,e,i){return Nc.computeAngle(e,i)},Nc.computeAngle=function(t,e){switch(t){default:case tf:t=0;break;case hf:t=e;break;case lf:t=e+90;break;case uf:t=e-90;break;case cf:t=e+180;break;case ff:t=_e.Tq(e),90t&&(t-=180);break;case df:t=_e.Tq(e+90),90t&&(t-=180);break;case pf:t=_e.Tq(e-90),90t&&(t-=180);break;case gf:if(t=_e.Tq(e),45t||225t)return 0;90t&&(t-=180)}return _e.Tq(t)},i=Nc.prototype,i.Oh=function(){var t=this.containingGroup;null!==t&&this.fromNode!==t&&this.toNode!==t&&t.computesBoundsIncludingLinks&&Lu.prototype.Oh.call(this)},i.Kq=function(t){var e=this.fromNode;return t===e?this.toNode:e},i.nA=function(t){var e=this.fromPort;return t===e?this.toPort:e},i.Mq=function(t){if(Lu.prototype.Mq.call(this,t),Xc(this)&&this.Oq(this.actualBounds),!t){t=this.We;var e=null;null!==t&&(e=this.fromPort,ac(t,this,e));var i=this.rf;if(null!==i){var n=this.toPort;i===t&&n===e||ac(i,this,n)}Kc(this)}},i.Nq=function(t){if(Lu.prototype.Nq.call(this,t),Xc(this)&&this.Oq(this.actualBounds),!t){t=this.We;var e=null;null!==t&&(e=this.fromPort,hc(t,this,e));var i=this.rf;if(null!==i){var n=this.toPort;i===t&&n===e||hc(i,this,n)}Hc(this)}},i.uk=function(){if(this.ud=!0,null!==this.nd){var t=this.diagram;if(null!==t)for(var e=this.nd.copy().iterator;e.next();)t.remove(e.value)}null!==this.data&&(t=this.diagram,null!==t&&t.partManager.removeDataForLink(this))},Nc.prototype.updateRelationshipsFromData=function(){if(null!==this.data){var t=this.diagram;null!==t&&t.partManager.updateRelationshipsFromData(this)}},Nc.prototype.move=function(t,e){var i=e?this.location:this.position,n=i.x;isNaN(n)&&(n=0);var o=i.y;for(isNaN(o)&&(o=0),n=t.x-n,o=t.y-o,!0===e?Lu.prototype.move.call(this,t,!1):(t=pt.allocAt(i.x+n,i.y+o),Lu.prototype.move.call(this,t,!1),pt.free(t)),Ac(this,n,o),t=this.labelNodes;t.next();)e=t.value,i=e.position,e.moveTo(i.x+n,i.y+o)},Nc.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var t=this.layer;return null===t||!!t.allowRelink&&(t=t.diagram,!(null!==t&&!t.allowRelink))},Nc.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var t=this.layer;return null===t||!!t.allowRelink&&(t=t.diagram,!(null!==t&&!t.allowRelink))},Nc.prototype.computeMidPoint=function(t){var e=this.pointsCount;if(0===e)return t.assign(Dt),t;if(1===e)return t.assign(this.i(0)),t;if(2===e){var i=this.i(0),n=this.i(1);return t.h((i.x+n.x)/2,(i.y+n.y)/2),t}if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ef))return this.na.Xv(.5,t),t.add(this.i(0)),i=this.na.figures.first(),t.offset(-i.startX,-i.startY),t;if(this.computeCurve()===ef){if(3===e)return this.i(1);if(n=(e-1)/3|0,i=3*(n/2|0),1===n%2){n=this.i(i);var o=this.i(i+1),r=this.i(i+2);i=this.i(i+3),_e.yz(n.x,n.y,o.x,o.y,r.x,r.y,i.x,i.y,t)}else t.assign(this.i(i));return t}var s=this.flattenedLengths;for(i=this.flattenedTotalLength,o=r=n=0;ni/2)break;n+=o,r++}return e=this.i(r),r=this.i(r+1),1>Math.abs(e.x-r.x)?e.y>r.y?t.h(e.x,e.y-(i/2-n)):t.h(e.x,e.y+(i/2-n)):1>Math.abs(e.y-r.y)?e.x>r.x?t.h(e.x-(i/2-n),e.y):t.h(e.x+(i/2-n),e.y):(i=(i/2-n)/o,t.h(e.x+i*(r.x-e.x),e.y+i*(r.y-e.y))),t},Nc.prototype.computeMidAngle=function(){var t=this.pointsCount;if(2>t)return NaN;if(2===t)return this.i(0).Pa(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ef))return this.na.vy(.5);if(this.computeCurve()===ef&&4<=t){var e=(t-1)/3|0,i=3*(e/2|0);if(1===e%2){i=Math.floor(i),t=this.i(i),e=this.i(i+1);var n=this.i(i+2);return i=this.i(i+3),_e.xz(t.x,t.y,e.x,e.y,n.x,n.y,i.x,i.y)}if(0n/2)break;r+=o,i++}if(e=this.i(i),n=this.i(i+1),1>Math.abs(e.x-n.x)&&1>Math.abs(e.y-n.y)){if(0Math.abs(e.x-n.x))return e.y>n.y?270:90;if(1>Math.abs(e.y-n.y))return e.x>n.x?180:0}return e.Pa(n)},i=Nc.prototype,i.i=function(t){return this.Ab.j[t]},i.Qc=function(t,e){this.Ab.Pc(t,e)},i.L=function(t,e,i){this.Ab.Pc(t,new pt(e,i))},i.wA=function(t,e){this.Ab.wb(t,e)},i.m=function(t,e,i){this.Ab.wb(t,new pt(e,i))},i.ce=function(t){this.Ab.add(t)},i.vf=function(t,e){this.Ab.add(new pt(t,e))},i.uw=function(t){this.Ab.cb(t)},i.pk=function(){this.Ab.clear()},i.Th=function(){null===this.ph&&(this.ph=this.Ab,this.Ab=this.Ab.copy())},i.xf=function(){if(null!==this.ph){for(var t=this.ph,e=this.Ab,i=1/0,n=1/0,o=t.j,r=o.length,s=0;sl&&(c=-c),g=(0>h?-1:1)*c+d,y=u*(g-d)+p),d=r.x+2*a/3,p=r.y+2*h/3;var m=d,v=p;_e.A(h,0)?v=0h?-1:1)*c+d,v=u*(m-d)+p),this.pk(),this.ce(r),this.vf(g,y),this.vf(m,v),this.ce(f),this.Qc(0,this.getLinkPoint(t,e,s,!0,!1,n,o)),this.Qc(3,this.getLinkPoint(n,o,i,!1,!1,t,e))}else r=n,f=o,n=this.getLinkPoint(t,e,s,!0,!1,r,f),o=this.getLinkPoint(r,f,i,!1,!1,t,e),this.hasCurviness()?(f=o.x-n.x,i=o.y-n.y,s=this.computeCurviness(),t=n.x+f/2,e=n.y+i/2,r=t,a=e,_e.A(i,0)?a=0s&&(r=-r),r=(0>i?-1:1)*r+t,a=f*(r-t)+e),this.ce(n),this.vf(r,a),this.ce(o)):(this.ce(n),this.ce(o),a=zt.alloc(),e.mj(a),h=a.$(o),f.mj(a),l=a.$(n),(h||l)&&(s=e.da(Fc(s),new pt),this.Qc(0,this.getLinkPointFromPoint(t,e,s,o,!0,s)),i=f.da(Fc(i),new pt),this.Qc(1,this.getLinkPointFromPoint(r,f,i,n,!1,i))),zt.free(a))}else{c=this.isAvoiding,f&&(u&&c||l)&&this.pk();var x=l?this.computeCurviness():0;c=this.getLinkPoint(t,e,s,!0,u,n,o),d=g=p=0,(u||!a||l)&&(y=this.computeEndSegmentLength(t,e,s,!0),d=this.getLinkDirection(t,e,c,s,!0,u,n,o),l&&(a||s.w(i)||!u&&1===s.x+i.x&&1===s.y+i.y)&&(d-=u?90:30,0>x&&(d-=180)),0>d?d+=360:360<=d&&(d-=360),l&&(y+=Math.abs(x)*(u?1:2)),0===d?p=y:90===d?g=y:180===d?p=-y:270===d?g=-y:(p=y*Math.cos(d*Math.PI/180),g=y*Math.sin(d*Math.PI/180)),s.nc()&&l&&(y=e.da(ae,pt.alloc()),m=pt.allocAt(y.x+1e3*p,y.y+1e3*g),this.getLinkPointFromPoint(t,e,y,m,!0,c),pt.free(y),pt.free(m))),y=this.getLinkPoint(n,o,i,!1,u,t,e);var b=v=m=0;if(u||!h||l){var w=this.computeEndSegmentLength(n,o,i,!1);b=this.getLinkDirection(n,o,y,i,!1,u,t,e),l&&(h||s.w(i)||!u&&1===s.x+i.x&&1===s.y+i.y)&&(b+=u?0:30,0>x&&(b+=180)),0>b?b+=360:360<=b&&(b-=360),l&&(w+=Math.abs(x)*(u?1:2)),0===b?m=w:90===b?v=w:180===b?m=-w:270===b?v=-w:(m=w*Math.cos(b*Math.PI/180),v=w*Math.sin(b*Math.PI/180)),i.nc()&&l&&(i=o.da(ae,pt.alloc()),s=pt.allocAt(i.x+1e3*m,i.y+1e3*v),this.getLinkPointFromPoint(n,o,i,s,!1,y),pt.free(i),pt.free(s))}i=c,(u||!a||l)&&(i=new pt(c.x+p,c.y+g)),s=y,(u||!h||l)&&(s=new pt(y.x+m,y.y+v)),!f&&!u&&a&&3=u.y&&t.y<=u.y+u.height?a.y=t.y:(i.Ef(fe)||i.Ef(ge))&&t.x>=u.x&&t.x<=u.x+u.width&&(a.x=t.x),pt.free(h),pt.free(l)}}return a}}return i=e.da(Fc(i),pt.alloc()),this.pointsCount>(o?6:2)?(s=n?this.i(1):this.i(this.pointsCount-2),o&&(s=jc(i,s.copy()))):(h=this.computeSpot(!n,s),r=pt.alloc(),s=s.da(Fc(h),r),o&&(s=jc(i,s)),pt.free(r)),this.getLinkPointFromPoint(t,e,i,s,n,a),pt.free(i),a},Nc.prototype.getLinkDirection=function(t,e,i,n,o,r,s,a){t:if(n.kb())var h=n.x>n.y?n.x>1-n.y?0:n.x<1-n.y?270:315:n.x1-n.y?90:n.x<1-n.y?180:135:.5>n.x?225:.5(r?6:2)?(a=o?this.i(1):this.i(this.pointsCount-2),a=r?jc(h,a.copy()):i):(i=pt.alloc(),a=a.da(ae,i),pt.free(i)),i=Math.abs(a.x-h.x)>Math.abs(a.y-h.y)?a.x>=h.x?0:180:a.y>=h.y?90:270,pt.free(h),h=i}return n.nc()&&s.Kd(t)&&(h+=180,360<=h&&(h-=360)),Dc(n)?h:(t=e.lj(),0===t||(45<=t&&135>t?h+=90:135<=t&&225>t?h+=180:225<=t&&315>t&&(h+=270),360<=h&&(h-=360)),h)},Nc.prototype.computeEndSegmentLength=function(t,e,i,n){return null!==e&&i.Oc()&&(t=Oc(this,e),null!==t)?t.Pv:(t=n?this.fromEndSegmentLength:this.toEndSegmentLength,null!==e&&isNaN(t)&&(t=n?e.fromEndSegmentLength:e.toEndSegmentLength),isNaN(t)&&(t=10),t)},Nc.prototype.computeSpot=function(t,e){return void 0===e&&(e=null),t?(t=e||this.fromPort,null===t?t=ae:(e=this.fromSpot,e.Mb()&&(e=t.fromSpot),t=e===Ce?ie:e)):(t=e||this.toPort,null===t?t=ae:(e=this.toSpot,e.Mb()&&(e=t.toSpot),t=e===Ce?ie:e)),t},Nc.prototype.computeOtherPoint=function(t,e){return this.computeAdjusting()!==tf&&4f.width||c.y>f.height||0>c.x+c.width||0>c.y+c.height)){if(c=Ke.alloc(),c.set(s),u instanceof Uh)a=u.zf(t,e,i,n,o,c);else if(this.path===u){if(u instanceof Nl)if(a=t,f=n,!1===u.pickable)a=!1;else if(c.multiply(u.transform),f)t:{var d=a,p=c;if(u.Jh(d,p))a=!0;else{if(void 0===p&&(p=u.transform,d.Ge(u.actualBounds))){a=!0;break t}a=d.left,f=d.right;var g=d.top;d=d.bottom;var y=pt.alloc(),m=pt.alloc(),v=pt.alloc(),x=Ke.alloc();x.set(p),x.jw(u.transform),x.St(),m.x=f,m.y=g,m.transform(x),y.x=a,y.y=g,y.transform(x),p=!1,jl(u,y,m,v)?p=!0:(y.x=f,y.y=d,y.transform(x),jl(u,y,m,v)?p=!0:(m.x=a,m.y=d,m.transform(x),jl(u,y,m,v)?p=!0:(y.x=a,y.y=g,y.transform(x),jl(u,y,m,v)&&(p=!0)))),Ke.free(x),pt.free(y),pt.free(m),pt.free(v),a=p}}else a=u.Jh(a,c)}else a=ga(u,t,n,c);a&&(f=u,null!==e&&(f=e(u)),f&&(null===i||i(f))&&o.add(f)),Ke.free(c)}}}return void 0===r&&Ke.free(s),a||null!==this.background||null!==this.areaBackground}return void 0===r&&Ke.free(s),!1},Nc.prototype.computeCurve=function(){if(null===this.Vf){var t=this.fromPort,e=this.isOrthogonal;this.Vf=null!==t&&t===this.toPort&&!e}return this.Vf?ef:this.curve},Nc.prototype.computeCorner=function(){if(this.curve===ef)return 0;var t=this.corner;return(isNaN(t)||0>t)&&(t=10),t},Nc.prototype.findMidLabel=function(){for(var t=this.path,e=this.W.j,i=e.length,n=0;nh?-Math.PI/2:Math.PI/2;else u=Math.atan(h/Math.abs(a)),0>a&&(u=Math.PI-u);s=e.x;var c=e.y;a=n.x-s;var f=n.y-c;for(h=Math.sqrt(a*a+f*f),_e.aa(a,0)?f=0>f?-Math.PI/2:Math.PI/2:(f=Math.atan(f/Math.abs(a)),0>a&&(f=Math.PI-f)),l=h/l,u=f-u,this.Qc(t,e),t+=1;th?-Math.PI/2:Math.PI/2:(h=Math.atan(h/Math.abs(a)),0>a&&(h=Math.PI-h)),a=h+u,e*=l,this.L(t,s+e*Math.cos(a),c+e*Math.sin(a)));this.Qc(i,n)}}return!0;case af:if(r=this.i(t),c=this.i(i),!r.Qa(e)||!c.Qa(n)){o=r.x,r=r.y,s=c.x,c=c.y,l=(s-o)*(s-o)+(c-r)*(c-r),a=e.x,u=e.y,h=n.x,f=n.y;var d=1;if(0!==h-a){var p=(f-u)/(h-a);d=Math.sqrt(1+1/(p*p))}else p=9e9;for(this.Qc(t,e),t+=1;te?e+=360:360<=e&&(e-=360),0>n?n+=360:360<=n&&(n-=360);var s=n;e=315<=e||45>e?0:45<=e&&135>e?90:135<=e&&225>e?180:270,n=315<=n||45>n?0:45<=n&&135>n?90:135<=n&&225>n?180:270;var a=o.actualBounds.copy(),h=r.actualBounds.copy();if(a.s()&&h.s()){if(a.Jc(vf,vf),h.Jc(vf,vf),a.Oe(t),h.Oe(i),0===e)if(i.x>t.x||270===n&&i.yt.x||90===n&&i.y>t.y&&h.right>t.x){var l=new pt(i.x,t.y),u=new pt(i.x,(t.y+i.y)/2);180===n?(l.x=this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!1),u.x=l.x,u.y=i.y):270===n&&i.yt.y?(l.x=t.xh.bottom)?this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!1):h.right,u.x=l.x,u.y=i.y):0===n&&t.xh.top&&t.ya.bottom)&&(180===n&&(h.$(t)||a.$(i))?l.y=this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!0):i.yt.y&&(180===n||270===n)&&(l.y=this.computeMidOrthoPosition(t.x,a.bottom,i.x,Math.min(i.y,h.top),!0)),u.x=i.x,u.y=l.y),l.y>a.top&&l.y=a.left&&i.x<=t.x||t.x<=h.right&&t.x>=i.x?90!==n&&270!==n||(l=new pt(Math.max((t.x+i.x)/2,t.x),t.y),u=new pt(l.x,i.y)):(l.y=270===n||(0===n||180===n)&&i.yt.y&&h.leftt.y?(l.x=t.x>h.right?this.computeMidOrthoPosition(t.x,t.y,h.right,i.y,!1):t.x>h.left&&(270===n&&t.yh.bottom)?this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!1):h.left,u.x=l.x,u.y=i.y):180===n&&t.x>h.right&&t.y>h.top&&t.ya.bottom)&&(0===n&&(h.$(t)||a.$(i))?l.y=this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!0):i.yt.y&&(0===n||270===n)&&(l.y=this.computeMidOrthoPosition(t.x,a.bottom,i.x,Math.min(i.y,h.top),!0)),u.x=i.x,u.y=l.y),l.y>a.top&&l.y=t.x||t.x>=h.left&&t.x<=i.x?90!==n&&270!==n||(l=new pt(Math.min((t.x+i.x)/2,t.x),t.y),u=new pt(l.x,i.y)):(l.y=270===n||(0===n||180===n)&&i.yt.y||180===n&&i.xt.y||0===n&&i.x>t.x&&h.bottom>t.y?(l=new pt(t.x,i.y),u=new pt((t.x+i.x)/2,i.y),270===n?(l.y=this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!0),u.x=i.x,u.y=l.y):180===n&&i.xt.x?(l.y=t.yh.right)?this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!0):h.bottom,u.x=i.x,u.y=l.y):90===n&&t.yh.left&&t.xa.right)&&(270===n&&(h.$(t)||a.$(i))?l.x=this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!1):i.xt.x&&(270===n||180===n)&&(l.x=this.computeMidOrthoPosition(a.right,t.y,Math.min(i.x,h.left),i.y,!1)),u.x=l.x,u.y=i.y),l.x>a.left&&l.x=a.top&&i.y<=t.y||t.y<=h.bottom&&t.y>=i.y?0!==n&&180!==n||(l=new pt(t.x,Math.max((t.y+i.y)/2,t.y)),u=new pt(i.x,l.y)):(l.x=180===n||(90===n||270===n)&&i.xt.x&&h.top=t.x?(l.y=t.y>h.bottom?this.computeMidOrthoPosition(t.x,t.y,i.x,h.bottom,!0):t.y>h.top&&(180===n&&t.xh.right)?this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!0):h.top,u.x=i.x,u.y=l.y):270===n&&t.y>h.bottom&&t.x>h.left&&t.xa.right)&&(90===n&&(h.$(t)||a.$(i))?l.x=this.computeMidOrthoPosition(t.x,t.y,i.x,i.y,!1):i.xt.x&&(90===n||180===n)&&(l.x=this.computeMidOrthoPosition(a.right,t.y,Math.min(i.x,h.left),i.y,!1)),u.x=l.x,u.y=i.y),l.x>a.left&&l.x=t.y||t.y>=h.top&&t.y<=i.y?0!==n&&180!==n||(l=new pt(t.x,Math.min((t.y+i.y)/2,t.y)),u=new pt(i.x,l.y)):(l.x=180===n||(90===n||270===n)&&i.x=jf&&(Mf(g),a.Jc(g.zq*g.Gy,g.yq*g.Gy),Cf(g,t,e,d,n,a,!1),h=kf(g,d.x,d.y)),!g.abort&&hthis.pointsCount?(0===e||180===e?(a.x=t.x,a.y=d.y):(a.x=d.x,a.y=t.y),this.L(2,a.x,a.y),this.m(3,a.x,a.y)):(s=this.i(3),0===e||180===e?_e.A(a.x,s.x)?(a=0===e?Math.max(a.x,t.x):Math.min(a.x,t.x),this.L(2,a,t.y),this.L(3,a,s.y)):_e.A(a.y,s.y)?(Math.abs(t.y-a.y)<=g.yq/2&&(this.L(2,a.x,t.y),this.L(3,s.x,t.y)),this.m(2,a.x,t.y)):this.L(2,t.x,a.y):90!==e&&270!==e||(_e.A(a.y,s.y)?(a=90===e?Math.max(a.y,t.y):Math.min(a.y,t.y),this.L(2,t.x,a),this.L(3,s.x,a)):_e.A(a.x,s.x)?(Math.abs(t.x-a.x)<=g.zq/2&&(this.L(2,t.x,a.y),this.L(3,t.x,s.y)),this.m(2,t.x,a.y)):this.L(2,a.x,t.y))),null!==i&&(t=this.i(1),s=this.i(2),t.x!==s.x&&t.y!==s.y?0===e||180===e?this.m(2,t.x,s.y):this.m(2,s.x,t.y):0===e||180===e?this.m(2,o.x,i.y):this.m(2,i.x,o.y)),null!==y&&(0===n||180===n?this.vf(r.x,y.y):this.vf(y.x,r.y)),e=!0):e=!1}}}else e=!1;e||(this.ce(l),this.ce(u))}},Nc.prototype.computeMidOrthoPosition=function(t,e,i,n,o){var r=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).Oc()||this.computeSpot(!1,this.toPort).Oc()||(r=this.computeCurviness()),o?(e+n)/2+r:(t+i)/2+r},Nc.prototype.Sz=function(t){var e=t.x;t=t.y;for(var i=this.i(0),n=this.i(1),o=xt(e,t,i.x,i.y,n.x,n.y),r=0,s=1;se)return t.type=si,this.$m=!0,t;var i=!1,n=this.diagram;null!==n&&Xc(this)&&n.Vg.contains(this)&&(0!==this.Yl.width||0!==this.Yl.height)&&(i=!0);var o=this.i(0).copy(),r=o.copy();n=this.Ab.j;var s=this.computeCurve();if(s===ef&&3<=e&&!_e.aa(this.smoothness,0))if(3===e){var a=this.i(1);n=Math.min(o.x,a.x);var h=Math.min(o.y,a.y);a=this.i(2),n=Math.min(n,a.x),h=Math.min(h,a.y)}else{if(this.isOrthogonal)for(h=0;h=e&&(n=e-1),h=this.i(n),r.x=Math.min(h.x,r.x),r.y=Math.min(h.y,r.y);n=r.x,h=r.y}else{for(h=0;hy?p>d?(s.x=m-x,s.y=d-x,e.x=m+g,e.y=d+g):(s.x=m-x,s.y=d+x,e.x=m+g,e.y=d-g):p>d?(s.x=m+x,s.y=d-x,e.x=m-g,e.y=d+g):(s.x=m+x,s.y=d+x,e.x=m-g,e.y=d-g)),_e.aa(y,m)&&_e.aa(d,p)&&(d>f?(v>m?(s.x=m-x,s.y=d-x,e.x=m+g):(s.x=m+x,s.y=d-x,e.x=m-g),e.y=d+g):(v>m?(s.x=m-x,s.y=d+x,e.x=m+g):(s.x=m+x,s.y=d+x,e.x=m-g),e.y=d-g)),(_e.aa(y,m)&&_e.aa(m,v)||_e.aa(f,d)&&_e.aa(d,p))&&(y=.5*(y+v),f=.5*(f+p),s.x=y,s.y=f,e.x=y,e.y=f),(1===c||2===c&&_e.aa(i.x,this.i(0).x)&&_e.aa(i.y,this.i(0).y))&&(o.x=.5*(i.x+l.x),o.y=.5*(i.y+l.y)),Su(a,o.x-n,o.y-h,s.x-n,s.y-h,l.x-n,l.y-h),r.set(s),o.set(e),i=l}}r=i.x,i=i.y,o=this.i(this.pointsCount-1),0!==this.computeShortLength(!1)&&(o=Rc(this,o.copy(),!1,At)),r=.5*(r+o.x),i=.5*(i+o.y),Su(a,e.x-n,e.y-h,r-n,i-h,o.x-n,o.y-h)}else for(i=3;i=e&&(i=e-1),o=this.i(i-1),s=this.i(i),i===e-1&&0!==this.computeShortLength(!1)&&(s=Rc(this,s.copy(),!1,At)),Su(a,r.x-n,r.y-h,o.x-n,o.y-h,s.x-n,s.y-h);else{for(r=pt.alloc(),r.assign(this.i(0)),o=pt.alloc(),o.assign(r),s=this.computeCorner(),c=1,l=0;c=e-1){if(r.w(u)){if(0===l)for(c=1;cr.x?f.x-d:f.x+d,w=g.y>f.y?f.y+v:f.y-v,Vc(this,a,c,y,r,new pt(p,x),m),Pu(a,f.x+c,f.y+y,b+c,w+y),r.h(b,w)}else _e.A(r.x,f.x)&&_e.A(f.y,g.y)?(d=Math.min(s,Math.abs(f.y-o.y)/2),d=v=Math.min(d,Math.abs(g.x-f.x)/2),_e.A(v,0)?(Vc(this,a,c,y,r,f,m),r.assign(f)):(p=f.x,x=f.y,b=p,w=x,x=f.y>r.y?f.y-d:f.y+d,b=g.x>f.x?f.x+v:f.x-v,Vc(this,a,c,y,r,new pt(p,x),m),Pu(a,f.x+c,f.y+y,b+c,w+y),r.h(b,w))):(Vc(this,a,c,y,r,f,m),r.assign(f));o.assign(u),c=l}pt.free(r)}Tu=a}else a=this.i(1).copy(),a.x-=n,a.y-=h,0!==this.computeShortLength(!0)&&(o=Rc(this,o,!0,r)),0!==this.computeShortLength(!1)&&(a=Rc(this,a,!1,r)),t.type=si,t.startX=o.x,t.startY=o.y,t.endX=a.x,t.endY=a.y;return this.$m=!0,t},Nc.prototype.computeJumpLength=function(){return 10},Nc.prototype.Oq=function(t){var e=this.layer;if(null!==e&&e.visible&&!e.isTemporary){var i=e.diagram;if(null!==i&&!i.animationManager.isTicking){var n=!1;for(i=i.layers;i.next();){var o=i.value;if(o.visible)if(o===e){n=!0;var r=!1;o=o.Ea.j;for(var s=o.length,a=0;at&&M(t,">= 0",Nc,"fromEndSegmentLength"),this.O.$g=t,this.g("fromEndSegmentLength",e,t),this.Ua())}},fromShortLength:{get:function(){return null!==this.O?this.O.ah:NaN},set:function(t){this.Kc();var e=this.O.ah;e!==t&&(this.O.ah=t,this.dc(),this.g("fromShortLength",e,t))}},toSpot:{get:function(){return null!==this.O?this.O.Ch:Ce},set:function(t){this.Kc();var e=this.O.Ch;e.w(t)||(t=t.H(),this.O.Ch=t,this.g("toSpot",e,t),(e.Oc()||t.Oc())&&null!==this.toNode&&rc(this.toPort),this.Ua())}},toEndSegmentLength:{get:function(){return null!==this.O?this.O.Ah:NaN},set:function(t){this.Kc();var e=this.O.Ah;e!==t&&(0>t&&M(t,">= 0",Nc,"toEndSegmentLength"),this.O.Ah=t,this.g("toEndSegmentLength",e,t),this.Ua())}},toShortLength:{get:function(){return null!==this.O?this.O.Bh:NaN},set:function(t){this.Kc();var e=this.O.Bh;e!==t&&(this.O.Bh=t,this.dc(),this.g("toShortLength",e,t))}},isLabeledLink:{get:function(){return null!==this.nd&&0=n&&(r=n-1);var a=this.i(r-1),h=this.i(r);_e.vm(o.x,o.y,s.x,s.y,a.x,a.y,h.x,h.y,.5,t),e=Math.min(h.x,e),i=Math.min(h.y,i),o=h}else for(o=this.i(0),r=this.i(1),e=Math.min(o.x,r.x),i=Math.min(o.y,r.y),t.h(o.x,o.y,0,0),t.Oe(r),o=2;on&&(n=-n)):_e.aa(n.y,o.y)?(n=o.x-n.x,0>n&&(n=-n)):n=Math.sqrt(n.Ie(o)),t.push(n)}}return this.$r}},flattenedTotalLength:{get:function(){var t=this.Ru;if(isNaN(t)){for(var e=this.flattenedLengths,i=e.length,n=t=0;n=this.pointsCount?0:this.isOrthogonal||!Dc(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var t=this.pointsCount;return 0===t?0:2>=t?t-1:this.isOrthogonal||!Dc(this.computeSpot(!1))?t-2:t-1}},adjusting:{get:function(){return this.Yk},set:function(t){var e=this.Yk;e!==t&&(this.Yk=t,this.g("adjusting",e,t))}},corner:{get:function(){return this.Hn},set:function(t){var e=this.Hn;e!==t&&(this.Hn=t,this.dc(),this.g("corner",e,t))}},curve:{get:function(){return this.Jn},set:function(t){var e=this.Jn;e!==t&&(this.Jn=t,this.Ua(),this.dc(),qc(this,e===nf||e===of||t===nf||t===of),this.g("curve",e,t))}},curviness:{get:function(){return this.Kn},set:function(t){var e=this.Kn;e!==t&&(this.Kn=t,this.Ua(),this.dc(),this.g("curviness",e,t))}},routing:{get:function(){return this.ck},set:function(t){var e=this.ck;e!==t&&(this.ck=t,this.Vf=null,this.Ua(),qc(this,2===(2&e.value)||2===(2&t.value)),this.g("routing",e,t))}},smoothness:{get:function(){return this.Zp},set:function(t){var e=this.Zp;e!==t&&(this.Zp=t,this.dc(),this.g("smoothness",e,t))}},key:{get:function(){var t=this.diagram;if(null!==t&&t.model.qj())return t.model.Wb(this.data)}}}),Nc.prototype.invalidateOtherJumpOvers=Nc.prototype.Oq,Nc.prototype.findClosestSegment=Nc.prototype.Sz,Nc.prototype.updateRoute=Nc.prototype.xj,Nc.prototype.invalidateRoute=Nc.prototype.Ua,Nc.prototype.rollbackRoute=Nc.prototype.yw,Nc.prototype.commitRoute=Nc.prototype.xf,Nc.prototype.startRoute=Nc.prototype.Th,Nc.prototype.clearPoints=Nc.prototype.pk,Nc.prototype.removePoint=Nc.prototype.uw,Nc.prototype.addPointAt=Nc.prototype.vf,Nc.prototype.addPoint=Nc.prototype.ce,Nc.prototype.insertPointAt=Nc.prototype.m,Nc.prototype.insertPoint=Nc.prototype.wA,Nc.prototype.setPointAt=Nc.prototype.L,Nc.prototype.setPoint=Nc.prototype.Qc,Nc.prototype.getPoint=Nc.prototype.i,Nc.prototype.getOtherPort=Nc.prototype.nA,Nc.prototype.getOtherNode=Nc.prototype.Kq;var _c=null,Wc=null,$c=new U(Nc,"Normal",1),Jc=new U(Nc,"Orthogonal",2),Zc=new U(Nc,"AvoidsNodes",6),Qc=new U(Nc,"AvoidsNodesStraight",7),tf=new U(Nc,"None",0),ef=new U(Nc,"Bezier",9),nf=new U(Nc,"JumpGap",10),of=new U(Nc,"JumpOver",11),rf=new U(Nc,"End",17),sf=new U(Nc,"Scale",18),af=new U(Nc,"Stretch",19),hf=new U(Nc,"OrientAlong",21),lf=new U(Nc,"OrientPlus90",22),uf=new U(Nc,"OrientMinus90",23),cf=new U(Nc,"OrientOpposite",24),ff=new U(Nc,"OrientUpright",25),df=new U(Nc,"OrientPlus90Upright",26),pf=new U(Nc,"OrientMinus90Upright",27),gf=new U(Nc,"OrientUpright45",28),yf=16,mf=14,vf=8;function xf(t,e,i,n){ot(this),this.se=this.hs=!1,this.au=t,this.My=e,this.lw=i,this.Ny=n,this.links=[]}function bf(){ot(this),this.Vy=this.group=null,this.Rt=!0,this.abort=!1,this.Bd=this.Ad=1,this.So=this.Ro=-1,this.gc=this.fc=8,this.Rb=null,this.$i=this.Zi=0,this.Wy=11,this.Gy=124}function wf(t,e,i){return t.Ad<=e&&e<=t.Ro&&t.Bd<=i&&i<=t.So}function kf(t,e,i){return wf(t,e,i)?(e-=t.Ad,e/=t.fc,i-=t.Bd,i/=t.gc,t.Rb[0|e][0|i]):Of}function Mf(t){if(null!==t.Rb)for(var e=0;e<=t.Zi;e++)for(var i=t.Rb[e],n=0;n<=t.$i;n++)i[n]>=Lf&&(i[n]=Of)}function Sf(t,e,i,n,o,r,s,a,h){if(!(es||ih)){var l=0|e,u=0|i,c=t.Rb[l][u];if(c>=Lf&&c=t.Rb[l][u]);)t.Rb[l][u]=c,c+=1,o?u+=n:l+=n;if(l=o?u:l,o)if(0l;i+=n)Sf(t,e,i,1,!o,r,s,a,h),Sf(t,e,i,-1,!o,r,s,a,h);else if(0l;e+=n)Sf(t,e,i,1,!o,r,s,a,h),Sf(t,e,i,-1,!o,r,s,a,h)}}function Pf(t,e,i,n,o,r,s,a,h){e|=0,i|=0;var l=Af,u=Lf;for(t.Rb[e][i]=u;l===Af&&e>r&&ea&&ir&&ea&&i=Math.abs(a-l)&&1>=Math.abs(h-u))t.abort=!0;else{var c=r.x;n=r.y,e=r.x+r.width;var f=r.y+r.height;c-=t.Ad,c/=t.fc,n-=t.Bd,n/=t.gc,e-=t.Ad,e/=t.fc,f-=t.Bd,f/=t.gc,r=Math.max(0,Math.min(t.Zi,0|c)),e=Math.min(t.Zi,Math.max(0,0|e)),c=Math.max(0,Math.min(t.$i,0|n)),f=Math.min(t.$i,Math.max(0,0|f)),n=t.Rb,a|=0,h|=0,l|=0,u|=0;var d=0===i||90===i?1:-1;if(i=90===i||270===i,n[a][h]===Af?(Pf(t,a,h,d,i,r,e,c,f),Pf(t,a,h,1,!i,r,e,c,f),Pf(t,a,h,-1,!i,r,e,c,f)):Pf(t,a,h,d,i,a,h,a,h),n[l][u]===Af?(Nf(t,l,u,0===o||90===o?1:-1,90===o||270===o,r,e,c,f),Nf(t,l,u,1,!(90===o||270===o),r,e,c,f),Nf(t,l,u,-1,!(90===o||270===o),r,e,c,f)):Nf(t,l,u,d,i,l,u,l,u),i=j(),s&&Tf(t,l,u,o,a,h,i))for(i[0]===l&&i[1]===u||(i.unshift(u),i.unshift(l)),i[i.length-2]===a&&i[i.length-1]===h||(i.push(a),i.push(h)),t=Lf,o=i[i.length-2],s=i[i.length-1],n[o][s]=t++,r=i.length-4;0<=r;r-=2)for(o=i[r+2],s=i[r+3],e=i[r],l=i[r+1];e>o?o++:es?s++:lo))break;u--}else{if(!(c>r))break;c--}var f=a[u][c];if(0===f||f===Df)break;h=u,l=c}for(;;){if(u=n,c=h,f=l,0===n?fr&&(u=270,f--):90===n?co&&(u=180,c--):180===n?fr&&(u=270,f--):co&&(u=180,c--),c=a[c][f],u!==n&&0!==c&&c!==Df){if(s.push(h),s.push(l),Tf(t,h,l,u,o,r,s))return!0;s.pop(),s.pop()}if(a[h][l]=Df,0===n){if(h===e)return!1;h--}else if(90===n){if(l===i)return!1;l--}else if(180===n){if(h===e)return!1;h++}else{if(l===i)return!1;l++}}}Nc.className="Link",Nc.Normal=$c,Nc.Orthogonal=Jc,Nc.AvoidsNodes=Zc,Nc.AvoidsNodesStraight=Qc,Nc.None=tf,Nc.Bezier=ef,Nc.JumpGap=nf,Nc.JumpOver=of,Nc.End=rf,Nc.Scale=sf,Nc.Stretch=af,Nc.OrientAlong=hf,Nc.OrientPlus90=lf,Nc.OrientMinus90=uf,Nc.OrientOpposite=cf,Nc.OrientUpright=ff,Nc.OrientPlus90Upright=df,Nc.OrientMinus90Upright=pf,Nc.OrientUpright45=gf,Nc.EndSegmentStep=8,Nc.CurvinessStart=yf,Nc.SpacingMin=mf,Nc.OrthoShortCut=vf,Nc.AvoidanceCell=8,Nc.AvoidanceLimit=999,xf.prototype.Dm=function(){if(!this.hs){var t=this.links;0=t.width||0>=t.height)){var e=t.y,i=t.x+t.width,n=t.y+t.height;if(this.Ad=Math.floor((t.x-this.fc)/this.fc)*this.fc,this.Bd=Math.floor((e-this.gc)/this.gc)*this.gc,this.Ro=Math.ceil((i+2*this.fc)/this.fc)*this.fc,this.So=Math.ceil((n+2*this.gc)/this.gc)*this.gc,t=1+(0|Math.ceil((this.Ro-this.Ad)/this.fc)),e=1+(0|Math.ceil((this.So-this.Bd)/this.gc)),null===this.Rb||this.Zithis.Ro||t+ithis.So||e+nt&&(i+=t,t=0),0>e&&(o+=e,e=0),0>i||0>o)return!0;for(n=0|Math.min(t+i-1,this.Zi),i=0|Math.min(e+o-1,this.$i);t<=n;t++){o=this.Rb[t];for(var r=e;r<=i;r++)if(o[r]===Af)return!1}return!0},d.Object.defineProperties(bf.prototype,{bounds:{get:function(){return new zt(this.Ad,this.Bd,this.Ro-this.Ad,this.So-this.Bd)}},zq:{get:function(){return this.fc},set:function(t){0=i?180:0}switch(t=180*Math.atan2(t.height,t.width)/Math.PI,e){case 3:return i>t&&i<=180+t?180:270;case 5:return i>180-t&&i<=360-t?270:0;case 12:return i>t&&i<=180+t?90:0;case 10:return i>180-t&&i<=360-t?180:90;case 7:return 90180+t&&i<=360-t?270:0;case 13:return 180t&&180>=i?90:0;case 14:return i>t&&i<=180-t?90:i>180-t&&270>=i?180:0;case 11:return i>180-t&&i<=180+t?180:i>180+t?270:90}return n&&15!==e&&(i-=15,0>i&&(i+=360)),i>t&&i<180-t?90:i>=180-t&&i<=180+t?180:i>180+t&&i<360-t?270:0}function If(t,e){var i=t.de;if(0===i.length){t:if(!t.Sq){i=t.Sq,t.Sq=!0;var n=null,o=t.node,r=o instanceof bc?o:null;if(null===r||r.isSubGraphExpanded)var s=o.isTreeExpanded?o.findLinksConnected(t.port.portId):o.py();else{if(!r.actualBounds.s()){t.Sq=i;break t}n=r,s=n.Rv()}r=t.de.length=0;var a=t.port.da(ne,pt.alloc()),h=t.port.da(ce,pt.alloc());for(o=zt.allocAt(a.x,a.y,0,0),o.Oe(h),pt.free(a),pt.free(h),a=pt.allocAt(o.x+o.width/2,o.y+o.height/2),h=t.port.lj(),s=s.iterator;s.next();){var l=s.value;if(l.isVisible()&&l.fromPort!==l.toPort){var u=l.fromPort===t.port||null!==l.fromNode&&l.fromNode.Kd(n),c=l.computeSpot(u,t.port);if(c.Oc()){var f=u?l.toPort:l.fromPort;if(null!==f&&(u=f.part,null!==u)){var d=u.findVisibleNode();null!==d&&d!==u&&(u=d,f=u.port),u=l.computeOtherPoint(u,f),f=a.Pa(f.da(ae)),f+=(a.Pa(u)-f)/360,f-=h,0>f?f+=360:360<=f&&(f-=360),c=Bf(o,c,f,l.isOrthogonal),0===c?(c=4,180f&&(f+=360)),d=t.de[r],void 0===d?(d=new Ef(l,f,c),t.de[r]=d):(d.link=l,d.angle=f,d.Ac=c),d.ow.set(u),r++}}}}for(pt.free(a),t.de.sort(Ff.prototype.l),h=t.de.length,n=-1,r=a=0;rMath.abs(g)?(v=Math.abs(g)/f,f=Math.abs(g)):v=1;break;case 2:d>Math.abs(x)?(v=Math.abs(x)/d,d=Math.abs(x)):v=1;break;case 1:c>Math.abs(g)?(v=Math.abs(g)/c,c=Math.abs(g)):v=1;break;default:case 4:u>Math.abs(x)?(v=Math.abs(x)/u,u=Math.abs(x)):v=1}m=0}var k=b.Qq;if(n===xc){switch(b=b.link.computeThickness(),b*=v,k.set(w),p){case 8:k.x=w.x+g/2+f/2-m-b/2;break;case 2:k.y=w.y+x/2+d/2-m-b/2;break;case 1:k.x=w.x+g/2-c/2+m+b/2;break;default:case 4:k.y=w.y+x/2-u/2+m+b/2}m+=b}else{var M=.5;n===vc&&(M=(b.Lq+1)/(b.wm+1)),k.x=w.x+g*M,k.y=w.y+x*M}}}for(pt.free(a),pt.free(h),pt.free(s),pt.free(l),w=t.de,r=0;re.Ac?1:t.anglee.angle?1:0},Ff.prototype.computeEndSegmentLength=function(t){var e=t.link,i=e.computeEndSegmentLength(this.node,this.port,ie,e.fromPort===this.port),n=t.Lq;if(0>n)return i;var o=t.wm;if(1>=o||!e.isOrthogonal)return i;e=t.ow;var r=t.Qq;return 2!==t.Ac&&8!==t.Ac||(n=o-1-n),((t=2===t.Ac||4===t.Ac)?e.y=e-1?(r=0,n=i,o+=s+20,s=0):r++}},zf.prototype.doMinimalNetworkLayout=function(){var t=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var e=this.arrangementOrigin.x,i=e,n=this.arrangementOrigin.y,o=0,r=0,s=this.network.vertexes.iterator;s.next();){var a=s.value.node;if(!(null===a||a instanceof Nc)&&(Gf(a),this.Rh(a))){var h=a.measuredBounds,l=h.width;h=h.height,a.moveTo(i,n),a instanceof bc&&(a.Rh=!1),i+=Math.max(l,50)+20,r=Math.max(r,Math.max(h,50)),o>=t-1?(o=0,i=e,n+=r+20,r=0):o++}}},zf.prototype.Rh=function(t){return!(t.location.s()&&!(t instanceof bc&&t.Rh))},zf.prototype.nj=function(t,e){var i=this.boundsComputation;return null!==i?(e||(e=new zt),i(t,this,e)):e?(e.set(t.actualBounds),e):t.actualBounds},zf.prototype.$x=function(t){var e=new nt;return t instanceof Ko?(Vf(this,e,t.nodes,!0,null,!0,!0,!0),Vf(this,e,t.links,!0,null,!0,!0,!0),Vf(this,e,t.parts,!0,null,!0,!0,!0)):Vf(this,e,t instanceof bc?t.memberParts:t.iterator,!1,null,!0,!0,!0),e},zf.prototype.initialOrigin=function(t){var e=this.group;if(null!==e){var i=e.position.copy();return(isNaN(i.x)||isNaN(i.y))&&i.set(t),e=e.placeholder,null!==e&&(i=e.da(ne),(isNaN(i.x)||isNaN(i.y))&&i.set(t),t=e.padding,i.x+=t.left,i.y+=t.top),i}return t},zf.prototype.mayUseWorker=function(){return!!this.mayUseWorkerFunction&&this.mayUseWorkerFunction(this)},zf.prototype.workerLayout=function(){return!1},zf.prototype.zz=function(){var t=Uf(this.constructor);t&&(null!==t.Pe&&t.Pe.terminate(),t.Pe=null,t.Fm.iteratorValues.each((function(t){t.wt=!1,t.ek=null,t.yg=null,t.lt=!1,Yf(t)})),t.Fm.clear())},zf.prototype.Uw=function(){if("undefined"===typeof Worker||!Jf||"undefined"===typeof self||"undefined"!==typeof self.DedicatedWorkerGlobalScope)return!1;if(!this.mayUseWorker())return this.wt&&(this.lt=!0,this.yg=this.ek=null,Yf(this)),!1;var t=Uf(this.constructor);return null!==t&&(null===t.Pe&&(t.Pe=new Worker(Jf),t.Pe.onerror=function(t){t.preventDefault(),S("Worker Error at: "+t.filename+" "+t.lineno+" "+t.colno+"\n "+t.message)},t.Pe.l=function(t){S("Worker serialization error: "+t)},t.Pe.onmessage=function(e){var i=e.data;if("_GoJS"===i._GoJS)if(i.version&&Ko.version&&i.version!==Ko.version)S("Failure: GoJS v"+Ko.version+" Worker v"+i.version);else if(e=t.Fm.get(i.id)){if(t.Fm.remove(i.id),e.wt=!1,e.ek=null,e.lt)e.lt=!1,e.yg=null;else{var n=_f(e,i,!1);e.network=n,e.updateParts(),e.network=null,e.isValidLayout=!0}if(Yf(e,i.time),i=e.yg,null!==i)e.yg=null;else for(n=t.Fm.iteratorValues;n.next();){var o=n.value;if(i=o.yg,null!==i){o.yg=null;break}}null!==i&&Kf(e,i)}},t.Pe.postMessage({_GoJS:"_GoJS",url:t.Cy}),Array.isArray(t.scripts)&&t.scripts.forEach((function(e){t.Pe.postMessage({_GoJS:"_GoJS",url:e})})),t.Pe.postMessage({_GoJS:"_GoJS",version:-1})),null!==this.ek?this.yg=this.network:Kf(this,this.network),Yf(this),this.doMinimalNetworkLayout(),this.network=null,this.isValidLayout=!0)},zf.prototype.onNetworkSerialization=function(){},d.Object.defineProperties(zf.prototype,{diagram:{get:function(){return this.C},set:function(t){this.C=t}},group:{get:function(){return this.u},set:function(t){this.u!==t&&(this.u=t,null!==t&&(this.C=t.diagram))}},isOngoing:{get:function(){return this.xo},set:function(t){this.xo!==t&&(this.xo=t)}},isInitial:{get:function(){return this.zi},set:function(t){this.zi=t,t||(this.Bo=!0)}},isViewportSized:{get:function(){return this.Co},set:function(t){this.Co!==t&&(this.Co=t)&&this.B()}},isRouting:{get:function(){return this.zo},set:function(t){this.zo!==t&&(this.zo=t)}},isRealtime:{get:function(){return this.yo},set:function(t){this.yo!==t&&(this.yo=t)}},isValidLayout:{get:function(){return this.Bo},set:function(t){this.Bo!==t&&(this.Bo=t,t||(t=this.diagram,null!==t&&(t.Ng=!0)))}},network:{get:function(){return this.l},set:function(t){this.l!==t&&(this.l=t,null!==t&&(t.layout=this))}},boundsComputation:{get:function(){return this.vn},set:function(t){this.vn!==t&&(this.vn=t,this.B())}},arrangementOrigin:{get:function(){return this.nn},set:function(t){this.nn.w(t)||(this.nn.assign(t),this.B())}},id:{get:function(){return this.I},set:function(t){this.I=t}},mayUseWorkerFunction:{get:function(){return this.To},set:function(t){this.To!==t&&(this.To=t)}},workerStateChanged:{get:function(){return this.qq},set:function(t){this.qq!==t&&(this.qq=t)}}}),zf.prototype.useWorker=zf.prototype.Uw,zf.declareWorkerLayout=qf,zf.prototype.cancelWorker=zf.prototype.zz,zf.prototype.collectParts=zf.prototype.$x,zf.prototype.getLayoutBounds=zf.prototype.nj,zf.prototype.invalidateLayout=zf.prototype.B;var Wf=new dt,$f="object"===typeof y.document&&y.document.currentScript?y.document.currentScript.src:"",Jf="undefined"!==typeof URL&&"function"===typeof URL.createObjectURL&&"function"===typeof Blob?URL.createObjectURL(new Blob(["self.onmessage=function(e){if(e.data.url){\nimportScripts(e.data.url);}}"],{type:"text/javascript"})):"";function Zf(){this.Lv=null,this.Cy=this.l=this.name="",this.scripts=[],this.Pe=null,this.Fm=new dt}function Qf(t){ot(this),this.kc=t,this.tf=new nt,this.le=new nt,this.bu=new dt,this.Xt=new dt}function td(t,e){if(null===e)return!1;var i=t.tf.remove(e);return i&&(e=e.node,null!==e&&t.bu.remove(e)),i}function ed(t,e){if(null!==e){t.le.add(e);var i=e.link;null!==i&&null===t.Eq(i)&&t.Xt.add(i,e),e.network=t}}function id(t,e){null!==e&&t.le.remove(e)&&(e=e.link,null!==e&&t.Xt.remove(e))}function nd(t){for(var e=j(),i=t.le.iterator;i.next();){var n=i.value;null!==n.fromVertex&&null!==n.toVertex||e.push(n)}for(i=e.length,n=0;ne?1:0):1:null!==e?-1:0}function ad(t){ot(this),this.Sc=t,this.ed=this.Yc=this.Nl=this.ob=null}function hd(){zf.call(this),this.isViewportSized=!0,this.rq=this.sq=NaN,this.Qg=new Bt(NaN,NaN).freeze(),this.lf=new Bt(10,10).freeze(),this.yb=cd,this.Eb=fd,this.bd=yd,this.Wc=ld}function ld(t,e){return t=t.text,e=e.text,te?1:0}zf.className="Layout",zf.GoJSScriptURL=$f,zf.declareWorkerLayout=qf,"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&"undefined"!==typeof self&&"undefined"!==typeof self.DedicatedWorkerGlobalScope&&(self.onmessage=function(t){if(t=t.data,"_GoJS"===t._GoJS)if(t.url)importScripts(t.url);else if(t.version)self.postMessage({_GoJS:"_GoJS",version:Ko.version},void 0);else{var e=performance.now(),i=null;t.layout&&(i=Uf(t.layout));var n=null;if(i&&i.Lv&&(n=new i.Lv),!n)throw Error("no registered Worker Layout: "+t.layout);n.network=_f(n,t,!0),n.workerLayout=function(){var t=Hf(n,n.network,!1);return t._GoJS="_GoJS",t.time=performance.now()-e,self.postMessage(t,void 0),!0},n.doLayout(new et)}}),Qf.prototype.clear=function(){if(this.tf)for(var t=this.tf.iterator;t.next();)t.value.clear();if(this.le)for(t=this.le.iterator;t.next();)t.value.clear();this.tf=new nt,this.le=new nt,this.bu=new dt,this.Xt=new dt},Qf.prototype.toString=function(t){void 0===t&&(t=0);var e="LayoutNetwork"+(null!==this.layout?"("+this.layout.toString()+")":"");if(0>=t)return e;if(e+=" vertexes: "+this.tf.count+" edges: "+this.le.count,1=r&&0>=s&&(r=1),e=this.spacing.width,isFinite(e)||(e=0),i=this.spacing.height,isFinite(i)||(i=0),null!==t&&t.va("Layout"),n=[],this.alignment){case ud:var a=e,h=i,l=zt.alloc(),u=Math.max(this.cellSize.width,1);if(!isFinite(u))for(var c=u=0;cr-1||0s)&&(n.push(new zt(0,g,s+a,m)),y=0,p=d,g+=m,m=0),m=Math.max(m,k),f){case dd:b=-b.width;break;default:b=0}switch(x.moveTo(p+b,g),f){case dd:p-=w;break;default:p+=w}y++}n.push(new zt(0,g,s+a,m)),zt.free(l);break;case cd:for(h=s,u=r,c=e,f=i,s=zt.alloc(),d=Math.max(this.cellSize.width,1),r=g=l=0,a=pt.alloc(),p=0;p=l&&(h-=l),l=x=0,w=Math.max(this.cellSize.height,1),b=r=0,k=!0,y=pt.alloc(),M=0;Mu-1||0h){for(n.push(new zt(0,k?v-r:v,h+c,b+r+f)),S=0;Sl&&(r.width+=r.x-l,r.x=l);zt.free(s)}for(a=r=s=o=0;ac)){var g=c+fl(p);p.Lc(g,!0),pl(p,g,c)}}e.isModified=!0}}finally{e.Z=!0}}}}},vd.prototype.updateAllTargetBindings=function(t){void 0===t&&(t="");for(var e=this.parts.iterator;e.next();)e.value.Da(t);for(e=this.nodes.iterator;e.next();)e.value.Da(t);for(e=this.links.iterator;e.next();)e.value.Da(t)},vd.prototype.ir=function(){for(var t=this.C.model,e=new nt,i=t.nodeDataArray,n=0;n=n)return"[]";var o=new H;o.add("["),i&&1n)return;L(t.Fc,n)}$d(t,"nodeDataArray",Ci,"nodeDataArray",t,e,null,n,null),t.hr(e)}function tp(t,e,i){if(void 0!==e){var n=t.Tf.G(e);null===n&&(n=new nt,t.Tf.add(e,n)),n.add(i)}}function ep(t,e,i){if(void 0!==e){var n=t.Tf.G(e);n instanceof nt&&(void 0===i||null===i?t.Tf.remove(e):(n.remove(i),0===n.count&&t.Tf.remove(e)))}}function ip(t,e){return void 0===e?null:(t=t.Tf.G(e),t instanceof nt?t:null)}function np(t,e,i){if(t.copiesArrays&&Array.isArray(e)){var n=[];for(i=0;ir?e+"\\u000"+t.charCodeAt(n).toString(16):32>r?e+"\\u00"+t.charCodeAt(n).toString(16):8232===r?e+"\\u2028":8233===r?e+"\\u2029":e+o}}return'"'+e+'"'},i.bn=function(t){return void 0===t?"undefined":null===t?"null":!0===t?"true":!1===t?"false":"string"===typeof t?this.quote(t):"number"===typeof t?1/0===t?"9e9999":-1/0===t?"-9e9999":isNaN(t)?'{"class":"NaN"}':t.toString():t instanceof Date?'{"class":"Date", "value":"'+t.toJSON()+'"}':t instanceof Number?this.bn(t.valueOf()):C(t)?qd(this,t):N(t)?Hd(this,t):"function"===typeof t?"null":t.toString()},i.Hh=function(t){this.cv.add(t)},i.Tk=function(t){this.cv.remove(t)},i.zt=function(t){this.skipsUndoManager||this.undoManager.aw(t);for(var e=this.cv,i=e.length,n=0;ne&&(e=t.length),A(t,e,i),$d(this,"",Ni,"",t,null,i,null,e)},i.tw=function(t,e){void 0===e&&(e=-1),t===this.Fc&&w("Model.removeArrayItem should not be called on the Model.nodeDataArray"),-1===e&&(e=t.length-1);var i=t[e];L(t,e),$d(this,"",Ci,"",t,i,null,e,null)},i.Iq=function(t){if(null===t)return"";var e=this.Yj;return""===e?"":(e=ap(t,e),void 0===e?"":"string"===typeof e?e:(w("getCategoryForNodeData found a non-string category for "+t+": "+e),""))},i.Um=function(t,e){if(null!==t){var i=this.Yj;if(""!==i)if(this.ab(t)){var n=ap(t,i);void 0===n&&(n=""),n!==e&&(hp(t,i,e),$d(this,"nodeCategory",Pi,i,t,n,e))}else hp(t,i,e)}},i.Wm=function(t,e){this.Um(e,this.Iq(t))},i.Em=function(){return!1},i.Ck=function(){return!1},i.qj=function(){return!1},i.Ut=function(){return!1},i.Dk=function(){return!1},d.Object.defineProperties(Bd.prototype,{name:{get:function(){return this.oa},set:function(t){var e=this.oa;e!==t&&(this.oa=t,this.g("name",e,t))}},dataFormat:{get:function(){return this.Ln},set:function(t){var e=this.Ln;e!==t&&(this.Ln=t,this.g("dataFormat",e,t))}},isReadOnly:{get:function(){return this.$f},set:function(t){var e=this.$f;e!==t&&(this.$f=t,this.g("isReadOnly",e,t))}},modelData:{get:function(){return this.l},set:function(t){var e=this.l;e!==t&&(this.l=t,this.g("modelData",e,t),this.Da(t))}},undoManager:{get:function(){return this.u},set:function(t){var e=this.u;e!==t&&(null!==e&&e.Py(this),this.u=t,null!==t&&t.Vx(this))}},skipsUndoManager:{get:function(){return this.vg},set:function(t){this.vg=t}},nodeKeyProperty:{get:function(){return this.Ni},set:function(t){var e=this.Ni;e!==t&&(""===t&&w("Model.nodeKeyProperty may not be the empty string"),0n)return;t.$c.splice(n,1)}if($d(t,"linkDataArray",Ci,"linkDataArray",t,e,null,n,null),i=vp(t,e,!0),ep(t,i,e),i=vp(t,e,!1),ep(t,i,e),n=t.Bf(e),Array.isArray(n))for(var o=n.length,r=0;rn.indexOf(t.newValue)&&n.splice(i,0,t.newValue)))}else if(t.change===Ci){if(i=t.oldParam,"linkDataArray"===t.modelChange)return t=t.oldValue,void(N(t)&&"number"===typeof i&&(n=this.Wb(t),e?(this.ag.add(t),this.$c[i]!==t&&this.$c.splice(i,0,t),void 0!==n&&this.gb.add(n,t)):(this.ag.remove(t),this.$c[i]===t&&this.$c.splice(i,1),void 0!==n&&this.gb.remove(n))));if("linkLabelKeys"===t.modelChange)return n=this.Bf(t.object),void(Array.isArray(n)&&"number"===typeof i&&(e?0>n.indexOf(t.newValue)&&n.splice(i,0,t.newValue):(i=n.indexOf(t.newValue),0<=i&&n.splice(i,1))))}Bd.prototype.changeState.call(this,t,e)}},i=yp.prototype,i.Gm=function(t){if(void 0!==t){var e=this.Aj;if(null!==e){var i=this.Kb(t);null===i&&(i=this.copyNodeData(e),hp(i,this.nodeKeyProperty,t),this.uf(i))}return t}},i.xy=function(t){return vp(this,t,!0)},i.Bw=function(t,e){xp(this,t,e,!0)},i.Ay=function(t){return vp(this,t,!1)},i.Gw=function(t,e){xp(this,t,e,!1)},i.yy=function(t){return bp(this,t,!0)},i.Cw=function(t,e){wp(this,t,e,!0)},i.By=function(t){return bp(this,t,!1)},i.Hw=function(t,e){wp(this,t,e,!1)},i.Bf=function(t){if(null===t)return Np;var e=this.ae;return""===e?Np:(t=ap(t,e),void 0===t?Np:t)},i.ju=function(t,e){if(null!==t){var i=this.ae;if(""!==i)if(this.xc(t)){var n=ap(t,i);if(void 0===n&&(n=Np),n!==e){if(Array.isArray(n))for(var o=n.length,r=0;ro||(n.splice(o,1),this.xc(t)&&(ep(this,e,t),$d(this,"linkLabelKeys",Ci,i,t,e,null,o,null)))}else void 0!==n&&w(i+" property is not an Array; cannot removeLabelKeyforLinkData: "+t)}}},i.Wb=function(t){if(null!==t){var e=this.Hi;if(""!==e&&(e=ap(t,e),void 0!==e)){if(Jd(e))return e;w("Key value for link data "+t+" is not a number or a string: "+e)}}},i.iu=function(t,e){if(null!==t){var i=this.Hi;if(""!==i)if(this.xc(t)){var n=ap(t,i);n!==e&&null===this.Dg(e)&&(hp(t,i,e),void 0!==n&&this.gb.remove(n),this.gb.add(e,t),$d(this,"linkKey",Pi,i,t,n,e),"string"===typeof i&&this.Da(t,i))}else hp(t,i,e)}},i.Dg=function(t){return null===t&&w("GraphLinksModel.findLinkDataForKey:key must not be null"),void 0!==t&&Jd(t)?this.gb.G(t):null},i.Rq=function(t){if(null!==t){var e=this.Hi;if(""!==e){var i=this.Wb(t);if(void 0===i||this.gb.contains(i)){var n=this.Ql;if(null!==n&&(i=n(this,t),void 0!==i&&null!==i&&!this.gb.contains(i)))return void hp(t,e,i);if("string"===typeof i){for(n=2;this.gb.contains(i+n);)n++;hp(t,e,i+n)}else if(void 0===i||"number"===typeof i){for(i=-this.gb.count-1;this.gb.contains(i);)i--;hp(t,e,i)}}}}},i.xc=function(t){return null!==t&&this.ag.contains(t)},i.bj=function(t){null!==t&&(rt(t),this.xc(t)||kp(this,t,!0))},i.pz=function(t){if(Array.isArray(t))for(var e=t.length,i=0;ii){for(r=n+(o===Up?r:-r);0>r;)r+=360;r%=360,180=u.length-1)break;Bp(t,h,l,u,c,o,r)||Ip(t,h,l,u,c,o,r),h=r.x,l=r.y}if(pt.free(r),t.Zj++,!(23Math.abs(d)?Math.abs(h-r)<(u[0].width+u[u.length-1].width)/2&&(s=0):s=0Math.abs(f)?0:f,h=Math.abs(r)>Math.abs(c)?0c:0t.Zj?t.$b-s/(2*Math.PI):5>u.length&&10=c.length-1)break;Bp(t,h,l,c,f,o,u)||Ip(t,h,l,c,f,o,u),h=u.x,l=u.y}if(pt.free(u),t.Zj++,!(23t.Zj?t.$b-r/(2*Math.PI):t.$b-(0a){if(r=e-t,r<-a)return s.x=r,s.y=l,!1;u=!0}}else if(r=e-t,r<-a){if(r=e+t,r>a)return s.x=r,s.y=l,!1;u=!0}return l=Math.sqrt(1-Math.min(1,r*r/(a*a)))*h,0>i!==u&&(l=-l),Math.abs(i-l)>(n[o].height+n[o+1].height)/2?(s.x=r,s.y=l,!1):(s.x=r,s.y=l,!0)}function Ip(t,e,i,n,o,r,s){var a=t.$b,h=t.be,l=0;if(t=(n[o].height+n[o+1].height)/2+t.Ij,n=!1,0<=e!==(r===Up)){if(r=i-t,r<-h){if(r=i+t,r>h)return s.x=l,void(s.y=r);n=!0}}else if(r=i+t,r>h){if(r=i-t,r<-h)return s.x=l,void(s.y=r);n=!0}l=Math.sqrt(1-Math.min(1,r*r/(h*h)))*a,0>e!==n&&(l=-l),s.x=l,s.y=r}function Ep(t,e,i,n,o){var r=t.gz;if(.001>Math.abs(t.Un-1))return void 0!==n&&void 0!==o?o*e:2*Math.PI*e;t=e>i?Math.sqrt(e*e-i*i)/e:Math.sqrt(i*i-e*e)/i;for(var s=0,a=void 0!==n&&void 0!==o?o/(r+1):Math.PI/(2*(r+1)),h=0,l=0;l<=r;l++){h=void 0!==n&&void 0!==o?n+l*o/r:l*Math.PI/(2*r);var u=Math.sin(h);s+=Math.sqrt(1-t*t*u*u)*a}return void 0!==n&&void 0!==o?(e>i?e:i)*s:4*(e>i?e:i)*s}function Rp(t,e,i,n,o){return e/(void 0!==n&&void 0!==o?Ep(t,1,i,n,o):Ep(t,1,i))}function zp(t,e,i,n,o){if(.001>Math.abs(t.Un-1))return o/e;var r=e>i?Math.sqrt(e*e-i*i)/e:Math.sqrt(i*i-e*e)/i,s=0;t=2*Math.PI/(700*t.network.vertexes.count),e>i&&(n+=Math.PI/2);for(var a=0;;a++){var h=Math.sin(n+a*t);if(s+=(e>i?e:i)*Math.sqrt(1-r*r*h*h)*t,s>=o)return a*t}}function Vp(t){for(var e=[],i=0;io&&(o=a,r=s)}else for(s=0;so&&(o=a,r=s);for(i.add(t.J(r)),e[r]=-1,r=t.J(r),s=r.sourceEdges;s.next();)o=t.indexOf(s.value.fromVertex),0>o||0<=e[o]&&e[o]++;for(r=r.destinationEdges;r.next();)o=t.indexOf(r.value.toVertex),0>o||0<=e[o]&&e[o]++}return i}yp.className="GraphLinksModel",up.GraphLinksModel=yp,Bd.constructGraphLinksModel=Bd.constructGraphLinksModel=function(){return new yp},Bd.initDiagramModel=op=function(){return new yp},f(Cp,Bd),Cp.constructGraphLinksModel=Bd.constructGraphLinksModel,Cp.prototype.cloneProtected=function(t){Bd.prototype.cloneProtected.call(this,t),t.Ae=this.Ae,t.Gn=this.Gn,t.$j=this.$j},i=Cp.prototype,i.toString=function(t){if(void 0===t&&(t=0),2<=t)return this.fr();var e=(""!==this.name?this.name:"")+" TreeModel";if(0=t.count)1===t.count&&(t=t.first(),t.centerX=0,t.centerY=0);else{var e=new et;e.addAll(t.iterator),t=new et;var i,n,o=new et,r=this.sort(e),s=this.Gr,a=this.arrangement,h=this.nodeDiameterFormula,l=this.radius;(!isFinite(l)||0>=l)&&(l=NaN);var u=this.aspectRatio;(!isFinite(u)||0>=u)&&(u=1);var c=this.startAngle;isFinite(c)||(c=0);var f=this.sweepAngle;if((!isFinite(f)||360f)&&(f=360),e=this.spacing,isFinite(e)||(e=NaN),a===qp&&h===eg?a=Gp:a===qp&&h!==eg&&(a=this.arrangement),(this.direction===Hp||this.direction===_p)&&this.sorting!==Qp){for(h=0;!(h>=r.length);h+=2){if(t.add(r.J(h)),h+1>=r.length)break;o.add(r.J(h+1))}this.direction===Hp?(this.arrangement===qp&&t.reverse(),r=new et,r.addAll(t),r.addAll(o)):(this.arrangement===qp&&o.reverse(),r=new et,r.addAll(o),r.addAll(t))}h=r.length;for(var d=n=i=0;df&&(0===d||d===r.length-1)&&(g/=2),i+=g,n++}if(isNaN(l)||a===qp){if(isNaN(e)&&(e=6),a!==Gp&&a!==qp){for(n=-1/0,s=0;sl?(l=i,n=l*u):s=d/(360<=f?h:h-1)}if(this.vx=a,this.$b=l,this.Un=u,this.wx=c,this.Ur=f,this.Ij=e,this.be=n,this.Gr=s,e=r,r=this.vx,a=this.$b,l=this.wx,u=this.Ur,c=this.Ij,f=this.be,h=this.Gr,this.direction!==Hp&&this.direction!==_p||r!==qp)if(this.direction===Hp||this.direction===_p){switch(s=0,r){case Yp:s=180*zp(this,a,f,l,h)/Math.PI;break;case Gp:h=e=0,s=t.first(),null!==s&&(e=rg(s,Math.PI/2)),s=o.first(),null!==s&&(h=rg(s,Math.PI/2)),s=180*zp(this,a,f,l,c+(e+h)/2)/Math.PI;break;case Xp:s=u/e.length}if(this.direction===Hp){switch(r){case Yp:jp(this,t,l,Kp);break;case Gp:Lp(this,t,l,Kp);break;case Xp:Ap(this,t,u/2,l,Kp)}switch(r){case Yp:jp(this,o,l+s,Up);break;case Gp:Lp(this,o,l+s,Up);break;case Xp:Ap(this,o,u/2,l+s,Up)}}else{switch(r){case Yp:jp(this,o,l,Kp);break;case Gp:Lp(this,o,l,Kp);break;case Xp:Ap(this,o,u/2,l,Kp)}switch(r){case Yp:jp(this,t,l+s,Up);break;case Gp:Lp(this,t,l+s,Up);break;case Xp:Ap(this,t,u/2,l+s,Up)}}}else switch(r){case Yp:jp(this,e,l,this.direction);break;case Gp:Lp(this,e,l,this.direction);break;case Xp:Ap(this,e,u,l,this.direction);break;case qp:Op(this,e,u,l,this.direction)}else Op(this,e,u,l-u/2,Up)}this.updateParts(),this.network=null,this.isValidLayout=!0},Tp.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Tp.prototype.commitNodes=function(){var t=null!==this.group&&null!==this.group.placeholder&&this.group.isSubGraphExpanded,e=t?this.group.location.copy():null,i=this.actualCenter;t?i=new pt(0,0):(i.x=this.arrangementOrigin.x+this.$b,i.y=this.arrangementOrigin.y+this.be);for(var n=this.network.vertexes.iterator;n.next();){var o=n.value;o.x+=i.x,o.y+=i.y,o.commit()}t&&(this.group.Ta(),t=this.group.position.copy(),i=this.group.location.copy(),e=e.ge(i.ge(t)),this.group.move(e),this.mx=e.ge(t))},Tp.prototype.commitLinks=function(){for(var t=this.network.edges.iterator;t.next();)t.value.commit()},Tp.prototype.sort=function(t){switch(this.sorting){case Wp:break;case $p:t.reverse();break;case Jp:t.sort(this.comparer);break;case Zp:t.sort(this.comparer),t.reverse();break;case Qp:return this.nw(Vp(t));default:w("Invalid sorting type.")}return t},Tp.prototype.nw=function(t){for(var e=[],i=0;ie[i].indexOf(o)&&e[i].push(o);for(n=n.sourceEdges;n.next();)o=t.indexOf(n.value.fromVertex),o!==i&&0>e[i].indexOf(o)&&e[i].push(o)}for(r=[],i=0;ie[i[p]].indexOf(i[p===i.length-1?0:p+1])&&d.push(p===i.length-1?0:p+1);if(0===d.length)for(p=0;pi.indexOf(k)||wi.indexOf(k)||w=g?w+1:w)),m+=w=g&&w++,x>=g&&x++,w>x&&(b=x,x=w,w=b),x-w<(i.length+2)/2===(wd||d===u||(p=d>u?d-u:u-d,c+=ds-p?1:-1);i.splice(0>c?u:u+1,0,h),n.splice(a,1),a--}else r=!1;if(r)break;i.push(n[0]),n.splice(0,1)}for(e=0;e=t?t:360,this.B())}},arrangement:{get:function(){return this.Eb},set:function(t){this.Eb===t||t!==qp&&t!==Gp&&t!==Yp&&t!==Xp||(this.Eb=t,this.B())}},direction:{get:function(){return this.K},set:function(t){this.K===t||t!==Up&&t!==Kp&&t!==Hp&&t!==_p||(this.K=t,this.B())}},sorting:{get:function(){return this.bd},set:function(t){this.bd===t||t!==Wp&&t!==$p&&t!==Jp&&!Zp&&t!==Qp||(this.bd=t,this.B())}},comparer:{get:function(){return this.Wc},set:function(t){this.Wc!==t&&(this.Wc=t,this.B())}},spacing:{get:function(){return this.lf},set:function(t){this.lf!==t&&(this.lf=t,this.B())}},nodeDiameterFormula:{get:function(){return this.jp},set:function(t){this.jp===t||t!==tg&&t!==eg||(this.jp=t,this.B())}},actualXRadius:{get:function(){return this.$b}},actualYRadius:{get:function(){return this.be}},actualSpacing:{get:function(){return this.Ij}},actualCenter:{get:function(){return this.mx}}});var Gp=new U(Tp,"ConstantSpacing",0),Yp=new U(Tp,"ConstantDistance",1),Xp=new U(Tp,"ConstantAngle",2),qp=new U(Tp,"Packed",3),Up=new U(Tp,"Clockwise",4),Kp=new U(Tp,"Counterclockwise",5),Hp=new U(Tp,"BidirectionalLeft",6),_p=new U(Tp,"BidirectionalRight",7),Wp=new U(Tp,"Forwards",8),$p=new U(Tp,"Reverse",9),Jp=new U(Tp,"Ascending",10),Zp=new U(Tp,"Descending",11),Qp=new U(Tp,"Optimized",12),tg=new U(Tp,"Pythagorean",13),eg=new U(Tp,"Circular",14);function ig(){this.Am=-1/0,this.cn=this.Wk=null}function ng(t){Qf.call(this,t)}function og(t){rd.call(this,t),this.I=this.Gj=NaN}function rg(t,e){var i=t.network;if(null===i)return NaN;if(i=i.layout,null===i)return NaN;if(i.arrangement===qp)if(i.nodeDiameterFormula===eg)t.Gj=Math.max(t.width,t.height);else{if(i=Math.abs(Math.sin(e)),e=Math.abs(Math.cos(e)),0===i)return t.width;if(0===e)return t.height;t.Gj=Math.min(t.height/i,t.width/e)}else t.Gj=i.nodeDiameterFormula===eg?Math.max(t.width,t.height):Math.sqrt(t.width*t.width+t.height*t.height);return t.Gj}function sg(t){ad.call(this,t)}function ag(){zf.call(this),this.Fh=null,this.Eo=0,this.Pd=new Bt(100,100).freeze(),this.on=!1,this.kf=!0,this.jd=!1,this.Rl=100,this.Xn=1,this.Xf=1e3,this.bp=10,this.Bp=Math,this.ol=.05,this.nl=50,this.ll=150,this.ml=0,this.On=10,this.Nn=5}function hg(t,e,i){if(lg(t,e)){var n=t.Xf;t.Xf*=1+1/(e+1);var o=ug(t,e),r=Math.max(0,Math.max(Math.min(t.network.vertexes.count,i*(e+1)/11),10));for(t.maxIterations+=r,hg(t,e+1,i),gg(t,r),cg(t,o),e=o.vertexes.ma(),e.sort((function(t,e){return null===t||null===e||t===e?0:e.Ld-t.Ld})),i=0;it.network.vertexes.count)return!1;for(t.Fh=t.network.vertexes.ma(),t=t.Fh,t.sort((function(t,e){return null===t||null===e||t===e?0:e.Ld-t.Ld})),e=t.length-1;0<=e&&1>=t[e].Ld;)e--;return 1=s))){for(var l=a=0,u=h.count-s;ud&&(d=1),a=_e.sqrt((a+d+l*l*4/(s*s))/d),s=(a-1)*u/2,a=(a-1)*c/2,o.bounds=new zt(r-f.x-s,h-f.y-a,u+2*s,c+2*a),o.focus=new pt(f.x+s,f.y+a)}}return t.network=n,i}function cg(t,e){for(var i=t.network.vertexes.iterator;i.next();){var n=i.value;if(n.network=e,null!==n.Ne){var o=n.Ne.J(n.zw);n.Ld=o.qu;var r=o.$w,s=o.ax;n.bounds=new zt(n.centerX-r,n.centerY-s,o.ru,o.pu),n.focus=new pt(r,s),n.zw--}}for(i=t.network.edges.iterator;i.next();)i.value.network=e;t.network=e}function fg(t,e){var i=e.qk;if(null!==i&&0!==i.count){var n=e.centerX,o=e.centerY,r=e.width,s=e.height;null!==e.Ne&&0=c.Ld?h++:(a=!0,l++,s+=Math.atan2(e.centerY-c.centerY,e.centerX-c.centerX))}if(0!==h)for(0>1)+l)*(0===a%2?1:-1),h.centerX=n+u*Math.cos(c),h.centerY=o+u*Math.sin(c),a++}}}function dg(t,e,i,n,o,r,s){var a=9e19,h=-1,l=0;t:for(;lu.y&&t[f].x-u.xu.x&&t[f].y-u.ye+r?(i=n+o-s,t=t-e-r,_e.sqrt(i*i+t*t)):t+is+a?t>e+r?(i=n-s-a,t=t-e-r,_e.sqrt(i*i+t*t)):t+ie+r?t-(e+r):t+i=e.length)return!1;var i=e[0];i.forceX=0,i.forceY=0;for(var n=i.centerX,o=n,r=i=i.centerY,s=1;sr-i)?e.sort((function(t,e){return null===t||null===e||t===e?0:t.centerX-e.centerX})):e.sort((function(t,e){return null===t||null===e||t===e?0:t.centerY-e.centerY})),i=t.Xf;var l=n=a=0;for(r=0;ri||l-h>i){if(o)break}else if(u-d>i||d-u>i){if(!o)break}else{var p=pg(s,f);1>p?(n=t.randomNumberGenerator,null===n&&(t.randomNumberGenerator=n=new wg),p=n.random(),a=n.random(),h>l?(n=Math.abs(f.bounds.right-s.bounds.x),n=(1+n)*p):hd?(l=Math.abs(f.bounds.bottom-s.bounds.y),l=(1+l)*a):hc?(c=t.randomNumberGenerator,null===c&&(t.randomNumberGenerator=c=new wg),a=c.random(),c=c.random(),n=(n>h?1:-1)*(1+(r.width>i.width?r.width:i.width))*a,l=(s>u?1:-1)*(1+(r.height>i.height?r.height:i.height))*c):(a=a.stiffness*(c-a.length),n=(h-n)/c*a,l=(u-s)/c*a),i.forceX+=n,i.forceY+=l,r.forceX-=n,r.forceY-=l;for(o=n=0;ot.epsilonDistance*t.epsilonDistance}function mg(){this.ax=this.$w=this.pu=this.ru=this.qu=0}function vg(t){Qf.call(this,t)}function xg(t){rd.call(this,t),this.La=!1,this.eb=this.I=NaN,this.Sh=this.Ld=this.Ka=this.T=0,this.Ne=this.qk=null,this.zw=0}function bg(t){ad.call(this,t),this.l=this.u=NaN}function wg(){var t=0;void 0===t&&(t=42),this.seed=t,this.Zy=48271,this.az=2147483647,this.Q=44488.07041494893,this.bz=3399,this.$y=1/2147483647,this.random()}function kg(){zf.call(this),this.Zb=this.ue=25,this.K=0,this.jl=ey,this.Ml=oy,this.Bl=ay,this.Rj=4,this.Zk=cy,this.ng=15,this.kf=!0,this.Mo=4,this.Ca=this.Ji=this.sa=-1,this.pc=this.mh=0,this.Ia=this.yd=this.zd=this.$d=this.zb=null,this.oh=0,this.fp=this.Wj=null,this.Ec=0,this.gp=null,this.Vc=new pt,this.xe=[],this.xe.length=100}function Mg(t){var e=t.fromVertex.node||t.fromVertex.data;return t=t.toVertex.node||t.toVertex.data,null===e&&null===t?8:null===e||null===t?4:1}function Sg(t){null===t.Wj&&(t.Wj=[]);for(var e=0,i=t.network.vertexes.iterator;i.next();){var n=i.value;t.Wj[e]=n.layer,e++,t.Wj[e]=n.column,e++,t.Wj[e]=n.index,e++}return t.Wj}function Pg(t,e){var i=0;for(t=t.network.vertexes.iterator;t.next();){var n=t.value;n.layer=e[i],i++,n.column=e[i],i++,n.index=e[i],i++}}function Ng(t,e,i){var n=Qg(t,e),o=t.zb[e];(null===t.fp||t.fp.lengths)for(var c=s+1;cl;c--)f=n[c],f.near===u&&f.wf===u.wf||h++;if(0<=i)for(l=n[s].sourceEdgesArrayAccess,u=0;ug||f===g&&d>p)&&h++,yf||g===f&&p>d)&&h++}}}if(0>=i)for(l=n[s].destinationEdgesArrayAccess,u=0;ug||f===g&&c>y)&&h++,pf||g===f&&y>c)&&h++);for(r[s*o+s]=h,l=s+1;l=i)for(h=n[s].destinationEdgesArrayAccess,x=n[l].destinationEdgesArrayAccess,u=0;u=i&&(h=a.sourceEdgesArrayAccess);var l=null;0<=i&&(l=a.destinationEdgesArrayAccess);var u=0,c=0,f=a.near;if(null!==f&&f.layer===a.layer&&(u+=f.column-1,c++),null!==h)for(f=0;f=i&&(h=a.sourceEdgesArrayAccess);var l=null;0<=i&&(l=a.destinationEdgesArrayAccess);var u=0,c=[],f=a.near;if(null!==f&&f.layer===a.layer&&(c[u]=f.column-1,u++),a=void 0,null!==h)for(f=0;f>1,r[s]=0!==(1&u)?c[l]:c[l-1]+c[l]>>1)}return ty(t,e,n),r}function Lg(t,e,i,n,o,r){if(e.component===n){if(e.component=i,o)for(var s=e.destinationEdges;s.next();){var a=s.value,h=a.toVertex,l=e.layer-h.layer;a=t.linkMinLength(a),l===a&&Lg(t,h,i,n,o,r)}if(r)for(s=e.sourceEdges;s.next();)a=s.value,h=a.fromVertex,l=h.layer-e.layer,a=t.linkMinLength(a),l===a&&Lg(t,h,i,n,o,r)}}function jg(t,e,i,n,o,r){if(e.component===n){if(e.component=i,o)for(var s=e.destinationEdges;s.next();)jg(t,s.value.toVertex,i,n,o,r);if(r)for(e=e.sourceEdges;e.next();)jg(t,e.value.fromVertex,i,n,o,r)}}function Og(t){for(t=t.vertexes.iterator;t.next();){var e=t.value;if(e.valid)return e}return null}function Dg(t){for(t=t.vertexes.iterator;t.next();){var e=t.value;if(e.valid){for(var i=!0,n=e.destinationEdges;n.next();)if(n.value.toVertex.valid){i=!1;break}if(i)return e}}return null}function Fg(t){for(t=t.vertexes.iterator;t.next();){var e=t.value;if(e.valid){for(var i=!0,n=e.sourceEdges;n.next();)if(n.value.fromVertex.valid){i=!1;break}if(i)return e}}return null}function Bg(t,e){e.Cg=t.oh,t.oh++;for(var i=e.destinationEdges;i.next();){var n=i.value,o=n.toVertex;-1===o.Cg&&(n.forest=!0,Bg(t,o))}e.finish=t.oh,t.oh++}function Ig(t){for(var e=t.network.vertexes.iterator;e.next();){var i=Eg(t,e.value);t.sa=Math.max(i,t.sa)}}function Eg(t,e){var i=0;if(-1===e.layer){for(var n=e.destinationEdges;n.next();){var o=n.value,r=o.toVertex;o=t.linkMinLength(o),i=Math.max(i,Eg(t,r)+o)}e.layer=i}else i=e.layer;return i}function Rg(t,e){var i=0;if(-1===e.layer){for(var n=e.sourceEdges;n.next();){var o=n.value,r=o.fromVertex;o=t.linkMinLength(o),i=Math.max(i,Rg(t,r)+o)}e.layer=i}else i=e.layer;return i}function zg(t,e){if(!e.valid){e.valid=!0;for(var i=e.destinationEdges;i.next();)zg(t,i.value.toVertex);for(i=t.network.vertexes.iterator;i.next();)i.value.component=-1;for(var n=e.sourceEdgesArrayAccess,o=n.length,r=0;rs&&Lg(t,a,0,-1,!0,!1)}for(Lg(t,e,1,-1,!0,!0);0!==e.component;){for(r=0,n=1/0,a=0,h=null,s=t.network.vertexes.iterator;s.next();){var l=s.value;if(1===l.component){var u=0,c=!1,f=l.sourceEdgesArrayAccess;o=f.length;for(var d=0;dr)&&!u&&(a=s,r=l)}if(0>n){for(i.reset();i.next();)n=i.value,1===n.component&&(n.layer-=o);e.component=0}else a.component=0}}}function Vg(t,e,i){return 90===t.K?i&&!e.rev||!i&&e.rev?270:90:180===t.K?i&&!e.rev||!i&&e.rev?0:180:270===t.K?i&&!e.rev||!i&&e.rev?90:270:i&&!e.rev||!i&&e.rev?180:0}function Gg(t,e){var i=e.layer;for(e.index=t.zb[i],t.zb[i]++,e=e.destinationEdgesArrayAccess,i=!0;i;){i=!1;for(var n=0;nr.portFromColOffset&&(i=!0,e[n]=r,e[n+1]=o)}}for(i=0;ir.portToColOffset&&(n=!0,e[i]=r,e[i+1]=o)}for(i=0;in+1&&(f+=4*(v-n),d+=4*(v-(n+1)))}for(b=o[n].destinationEdges.iterator,b.reset();b.next();)if(v=b.value,x=v.toVertex,v.valid&&x.layer===e){for(v=0;o[v]!==x;)v++;v===n+1&&(d+=1)}for(b=o[n+1].sourceEdges.iterator,b.reset();b.next();)if(v=b.value,x=v.fromVertex,v.valid&&x.layer===e){for(v=0;o[v]!==x;)v++;vn+1&&(f+=4*(v-(n+1)),d+=4*(v-n))}for(b=o[n+1].destinationEdges.iterator,b.reset();b.next();)if(v=b.value,x=v.toVertex,v.valid&&x.layer===e){for(v=0;o[v]!==x;)v++;v===n&&(f+=1)}v=x=0,b=s[o[n].index];var w=a[o[n].index],k=s[o[n+1].index],M=a[o[n+1].index];-1!==b&&(x+=Math.abs(b-p),v+=Math.abs(b-m)),-1!==w&&(x+=Math.abs(w-p),v+=Math.abs(w-m)),-1!==k&&(x+=Math.abs(k-g),v+=Math.abs(k-y)),-1!==M&&(x+=Math.abs(M-g),v+=Math.abs(M-y)),(di)for(n=0;nn-1||u-o[n-1].column-1>c+t.nodeMinColumnSpace(o[n-1],!1)?u-1:u,c=n+1>=r||o[n+1].column-u-1>f+t.nodeMinColumnSpace(o[n+1],!0)?u+1:u;var p=f=0,g=0;if(0>=i)for(var y=o[n].sourceEdges.iterator;y.next();){var m=y.value,v=m.fromVertex;if(m.valid&&v.layer!==e){var x=Mg(m),b=m.portFromColOffset;m=m.portToColOffset,v=v.column,f+=(Math.abs(u+m-(v+b))+1)*x,p+=(Math.abs(d+m-(v+b))+1)*x,g+=(Math.abs(c+m-(v+b))+1)*x}}if(0<=i)for(y=o[n].destinationEdges.iterator;y.next();)m=y.value,v=m.toVertex,m.valid&&v.layer!==e&&(x=Mg(m),b=m.portFromColOffset,m=m.portToColOffset,v=v.column,f+=(Math.abs(u+b-(v+m))+1)*x,p+=(Math.abs(d+b-(v+m))+1)*x,g+=(Math.abs(c+b-(v+m))+1)*x);m=b=x=0,y=s[o[n].index],v=a[o[n].index],-1!==y&&(x+=Math.abs(y-u),b+=Math.abs(y-d),m+=Math.abs(y-c)),-1!==v&&(x+=Math.abs(v-u),b+=Math.abs(v-d),m+=Math.abs(v-c)),p=s[i]?u=h:l<=s[i]&&(u=l));u!==a&&(r=!0,n[i].column=u)}ty(t,e,n),t.normalize()}function _g(t,e){for(var i=!0,n=t.network.vertexes.iterator;n.next();){var o=n.value,r=t.nodeMinColumnSpace(o,!0),s=t.nodeMinColumnSpace(o,!1);if(o.column-r<=e&&o.column+s>=e){i=!1;break}}if(t=!1,i)for(n.reset();n.next();)i=n.value,i.column>e&&(--i.column,t=!0);return t}function Wg(t,e){var i,n=e+1,o=[],r=[];for(i=0;i<=t.sa;i++)o[i]=!1,r[i]=!1;for(var s=t.network.vertexes.iterator;s.next();){i=s.value;var a=i.column-t.nodeMinColumnSpace(i,!0),h=i.column+t.nodeMinColumnSpace(i,!1);a<=e&&h>=e&&(o[i.layer]=!0),a<=n&&h>=n&&(r[i.layer]=!0)}for(a=!0,n=!1,i=0;i<=t.sa;i++)a=a&&!(o[i]&&r[i]);if(a)for(s.reset();s.next();)t=s.value,t.column>e&&(--t.column,n=!0);return n}function $g(t,e){for(var i=0;i<=t.Ca;i++)for(;_g(t,i););for(t.normalize(),i=0;ir?Pg(t,o):se)for(i=t.Ca;0<=i;i--)for(o=Sg(t),r=Cg(t),n=r+1;rr?Pg(t,o):si)for(n.reset();n.next();)o=n.value,o.column+t.nodeMinColumnSpace(o,!1)>=e&&(o.component=t.Ec);for(t.Ec++,n.reset();n.next();)e=n.value,-1===e.component&&(jg(t,e,t.Ec,-1,!0,!0),t.Ec++);var r;for(e=[],r=0;ri)for(s=t.Ca;0i)for(n.reset();n.next();)i=n.value,o[i.component]&&(i.column+=1)}function Zg(t,e){return 270===t.K?e?Oe:Be:90===t.K?e?Be:Oe:180===t.K?e?De:Fe:e?Fe:De}function Qg(t,e){var i=t.zb[e];if(i>=t.xe.length){for(var n=[],o=0;othis.Am||Math.abs(t)t&&0a?(o=f.x+f.width/2,r=f.y+f.height/2,l[0]=new pt(f.x+f.width+n.width,f.y),l[1]=new pt(f.x,f.y+f.height+n.height),a=2):(h=dg(l,a,o,r,f.width,f.height,n),c=l[h],d=new pt(c.x+f.width+n.width,c.y),f=new pt(c.x,c.y+f.height+n.height),h+1this.network.vertexes.count)return!1;for(var t=0,e=0,i=this.network.vertexes.first().bounds,n=this.network.vertexes.iterator;n.next();){if(n.value.bounds.Mc(i)&&(t++,2n&&(e=n),i<-n?i=-n:i>n&&(i=n),t.centerX+=e,t.centerY+=i,e*e+i*i},ag.prototype.moveFixedVertex=function(){},ag.prototype.commitLayout=function(){this.Dw(),this.commitNodes(),this.isRouting&&this.commitLinks()},ag.prototype.Dw=function(){if(this.setsPortSpots)for(var t=this.network.edges.iterator;t.next();){var e=t.value.link;null!==e&&(e.fromSpot=Ce,e.toSpot=Ce)}},ag.prototype.commitNodes=function(){var t=0,e=0;if(this.arrangesToOrigin){var i=zt.alloc();this.computeBounds(this.network,i),e=this.arrangementOrigin,t=e.x-i.x,e=e.y-i.y,zt.free(i)}i=zt.alloc();for(var n=this.network.vertexes.iterator;n.next();){var o=n.value;0===t&&0===e||(i.assign(o.bounds),i.x+=t,i.y+=e,o.bounds=i),o.commit()}zt.free(i)},ag.prototype.commitLinks=function(){for(var t=this.network.edges.iterator;t.next();)t.value.commit()},ag.prototype.springStiffness=function(t){return t=t.stiffness,isNaN(t)?this.ol:t},ag.prototype.springLength=function(t){return t=t.length,isNaN(t)?this.nl:t},ag.prototype.electricalCharge=function(t){return t=t.charge,isNaN(t)?this.ll:t},ag.prototype.electricalFieldX=function(){return 0},ag.prototype.electricalFieldY=function(){return 0},ag.prototype.gravitationalMass=function(t){return t=t.mass,isNaN(t)?this.ml:t},ag.prototype.gravitationalFieldX=function(){return 0},ag.prototype.gravitationalFieldY=function(){return 0},ag.prototype.isFixed=function(t){return t.isFixed},d.Object.defineProperties(ag.prototype,{currentIteration:{get:function(){return this.Eo}},arrangementSpacing:{get:function(){return this.Pd},set:function(t){this.Pd.w(t)||(this.Pd.assign(t),this.B())}},arrangesToOrigin:{get:function(){return this.on},set:function(t){this.on!==t&&(this.on=t,this.B())}},setsPortSpots:{get:function(){return this.kf},set:function(t){this.kf!==t&&(this.kf=t,this.B())}},comments:{get:function(){return this.jd},set:function(t){this.jd!==t&&(this.jd=t,this.B())}},maxIterations:{get:function(){return this.Rl},set:function(t){this.Rl!==t&&0<=t&&(this.Rl=t,this.B())}},epsilonDistance:{get:function(){return this.Xn},set:function(t){this.Xn!==t&&0g&&0g&&0t[this.pc]&&(this.Ji=t[i]-1,this.pc=i),t[i]e.toVertex.index&&(t.Rm(e),e.rev=!0);break;case ey:for(n=this.network.vertexes.iterator;n.next();)t=n.value,t.Cg=-1,t.finish=-1;for(t=this.network.edges.iterator;t.next();)t.value.forest=!1;for(this.oh=0,n.reset();n.next();)e=n.value,0===e.sourceEdges.count&&Bg(this,e);for(n.reset();n.next();)e=n.value,-1===e.Cg&&Bg(this,e);for(t.reset();t.next();)n=t.value,n.forest||(e=n.fromVertex,i=e.finish,o=n.toVertex,r=o.finish,o.Cgn){if(0>n)for(e.reset();e.next();)e.value.layer-=n;for(n=[],e.reset();e.next();)i=e.value,o=n[i.layer],void 0===o?n[i.layer]=[i]:o.push(i);for(i=e=0;i=n;e--)i=qg(this,e,-1)||i;for(a=this.countCrossings(),a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=t;e>=n;e--)i=qg(this,e,1)||i;for(a=this.countCrossings(),a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=n;e<=t;e++)i=qg(this,e,1)||i;for(a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=n;e<=t;e++)i=qg(this,e,-1)||i;for(a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=t;e>=n;e--)i=qg(this,e,0)||i;for(a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=n;e<=t;e++)i=qg(this,e,0)||i;a>=r?Pg(this,s):(r=a,s=Sg(this))}break;default:case cy:for(t=this.sa,n=0,o=r+1;(e=this.countCrossings())=n;e--)i=qg(this,e,-1)||i;for(a=this.countCrossings(),a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=t;e>=n;e--)i=qg(this,e,1)||i;for(a=this.countCrossings(),a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=n;e<=t;e++)i=qg(this,e,1)||i;for(a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=n;e<=t;e++)i=qg(this,e,-1)||i;for(a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=t;e>=n;e--)i=qg(this,e,0)||i;for(a>=r?Pg(this,s):(r=a,s=Sg(this)),i=!0;i;)for(i=!1,e=n;e<=t;e++)i=qg(this,e,0)||i;a>=r?Pg(this,s):(r=a,s=Sg(this))}}Pg(this,s)},kg.prototype.straightenAndPack=function(){var t=0!==(1&this.ng),e=0!==(this.ng&dy);if(1e3>1)+8*n;this.Ca*=8}if(0!==(2&this.ng))for(i=!0;i;){for(i=!1,e=this.pc+1;e<=this.sa;e++)i=Ug(this,e,1)||i;for(e=this.pc-1;0<=e;e--)i=Ug(this,e,-1)||i;i=Ug(this,this.pc,0)||i}if(0!==(4&this.ng)){for(e=this.pc+1;e<=this.sa;e++)Hg(this,e,1);for(e=this.pc-1;0<=e;e--)Hg(this,e,-1);Hg(this,this.pc,0)}if(t&&($g(this,-1),$g(this,1)),0!==(2&this.ng))for(i=!0;i;){for(i=!1,i=Ug(this,this.pc,0)||i,e=this.pc+1;e<=this.sa;e++)i=Ug(this,e,0)||i;for(e=this.pc-1;0<=e;e--)i=Ug(this,e,0)||i}},kg.prototype.commitLayout=function(){if(this.setsPortSpots)for(var t=Zg(this,!0),e=Zg(this,!1),i=this.network.edges.iterator;i.next();){var n=i.value.link;null!==n&&(n.fromSpot=t,n.toSpot=e)}this.commitNodes(),this.Iv(),this.isRouting&&this.commitLinks()},kg.prototype.commitNodes=function(){this.$d=[],this.zd=[],this.yd=[],this.Ia=[];for(var t=0;t<=this.sa;t++)this.$d[t]=0,this.zd[t]=0,this.yd[t]=0,this.Ia[t]=0;for(t=this.network.vertexes.iterator;t.next();){var e=t.value,i=e.layer;this.$d[i]=Math.max(this.$d[i],this.nodeMinLayerSpace(e,!0)),this.zd[i]=Math.max(this.zd[i],this.nodeMinLayerSpace(e,!1))}e=0,i=this.ue;for(var n=0;n<=this.sa;n++){var o=i;0>=this.$d[n]+this.zd[n]&&(o=0),0=c.bounds.bottom?(c=c.bounds.y+c.bounds.height,t.m(p++,x,c+w),t.m(p++,x,c),t.m(p++,x,c-v)):(t.m(p++,x,b+w),t.m(p++,x,b),t.m(p++,x,b-v)):270===this.K?b<=c.bounds.y?(c=c.bounds.y,t.m(p++,x,c-v),t.m(p++,x,c),t.m(p++,x,c+w)):(t.m(p++,x,b-v),t.m(p++,x,b),t.m(p++,x,b+w)):0===this.K&&(x>=c.bounds.right?(c=c.bounds.x+c.bounds.width,t.m(p++,c+w,b),t.m(p++,c,b),t.m(p++,c-v,b)):(t.m(p++,x+w,b),t.m(p++,x,b),t.m(p++,x-v,b)));else{t.m(p++,y,m);var k=0;180===this.K||0===this.K?((180===this.K?x>=c.bounds.right:x<=c.bounds.x)&&(k=(0===this.K?-v:w)/2),t.m(p++,y+k,b)):((270===this.K?b>=c.bounds.bottom:b<=c.bounds.y)&&(k=(90===this.K?-v:w)/2),t.m(p++,x,m+k)),t.m(p++,x,b)}}else v=Math.max(10,this.$d[g.layer]),w=Math.max(10,this.zd[g.layer]),180===this.K?(d&&t.m(p++,x-v,b),t.m(p++,x,b),d&&t.m(p++,x+w,b)):90===this.K?(d&&t.m(p++,x,b+w),t.m(p++,x,b),d&&t.m(p++,x,b-v)):270===this.K?(d&&t.m(p++,x,b-v),t.m(p++,x,b),d&&t.m(p++,x,b+w)):(d&&t.m(p++,x+w,b),t.m(p++,x,b),d&&t.m(p++,x-v,b))}c=g}(null===a||l!==ie||f)&&(y=t.i(p-1).x,m=t.i(p-1).y,x=t.i(p).x,b=t.i(p).y,f?(c=this.zd[u.layer],180===this.K||0===this.K?(f=m,f>=u.bounds.y&&f<=u.bounds.bottom&&(180===this.K?x>=u.bounds.x:x<=u.bounds.right)&&(c=u.centerX+(180===this.K?-c:c),f=f=u.bounds.x&&f<=u.bounds.right&&(270===this.K?b>=u.bounds.y:b<=u.bounds.bottom)&&(c=u.centerY+(270===this.K?-c:c),f=f=u.bounds.x?(c=u.bounds.x+u.bounds.width,t.L(p-2,c,m),t.L(p-1,c+w,m)):90===this.K&&b<=u.bounds.bottom?(c=u.bounds.y,t.L(p-2,y,c),t.L(p-1,y,c-v)):270===this.K&&b>=u.bounds.y?(c=u.bounds.y+u.bounds.height,t.L(p-2,y,c),t.L(p-1,y,c+w)):0===this.K&&x<=u.bounds.right&&(c=u.bounds.x,t.L(p-2,c,m),t.L(p-1,c-v,m))):(v=Math.max(10,this.$d[u.layer]),w=Math.max(10,this.zd[u.layer]),f=0,180===this.K||0===this.K?((180===this.K?x<=u.bounds.x:x>=u.bounds.right)&&(f=(0===this.K?w:-v)/2),t.m(p++,x+f,m)):((270===this.K?b<=u.bounds.y:b>=u.bounds.bottom)&&(f=(90===this.K?w:-v)/2),t.m(p++,y,b+f)),t.m(p++,x,b)))}else{for(;null!==u&&u!==c;){for(v=g=null,u=u.destinationEdges.iterator;u.next()&&(y=u.value,y.link!==i.link||(g=y.toVertex,v=y.fromVertex,null!==v.node&&(v=null),null!==g.node)););g!==c&&(y=t.i(p-1).x,m=t.i(p-1).y,x=g.centerX,b=g.centerY,f?180===this.K||0===this.K?(null!==v?v.centerY:m)!==b&&(v=this.Ia[g.layer]+this.Vc.x,p===t.firstPickIndex+1&&(v=0===this.K?Math.max(v,y):Math.min(v,y)),t.m(p++,v,m),t.m(p++,v,b)):(null!==v?v.centerX:y)!==x&&(v=this.Ia[g.layer]+this.Vc.y,p===t.firstPickIndex+1&&(v=90===this.K?Math.max(v,m):Math.min(v,m)),t.m(p++,y,v),t.m(p++,x,v)):(v=Math.max(10,this.$d[g.layer]),w=Math.max(10,this.zd[g.layer]),180===this.K?(t.m(p++,x+w,b),d&&t.m(p++,x,b),t.m(p++,x-v,b)):90===this.K?(t.m(p++,x,b-v),d&&t.m(p++,x,b),t.m(p++,x,b+w)):270===this.K?(t.m(p++,x,b+w),d&&t.m(p++,x,b),t.m(p++,x,b-v)):(t.m(p++,x-v,b),d&&t.m(p++,x,b),t.m(p++,x+w,b)))),u=g}f&&(y=t.i(p-1).x,m=t.i(p-1).y,x=t.i(p).x,b=t.i(p).y,180===this.K||0===this.K?m!==b&&(v=0===this.K?Math.min(Math.max((x+y)/2,this.Ia[c.layer]+this.Vc.x),x):Math.max(Math.min((x+y)/2,this.Ia[c.layer]+this.Vc.x),x),t.m(p++,v,m),t.m(p++,v,b)):y!==x&&(v=90===this.K?Math.min(Math.max((b+m)/2,this.Ia[c.layer]+this.Vc.y),b):Math.max(Math.min((b+m)/2,this.Ia[c.layer]+this.Vc.y),b),t.m(p++,y,v),t.m(p++,x,v)))}null!==n&&d&&(null!==s&&(l===ie&&(l=t.i(0),n=t.i(2),l.w(n)||t.L(1,(l.x+n.x)/2,(l.y+n.y)/2)),l=t.getLinkPoint(o,s,ie,!0,!1,r,a),l.s()||l.set(o.actualBounds.center),t.L(0,l.x,l.y)),null!==a&&(h===ie&&(h=t.i(t.pointsCount-1),l=t.i(t.pointsCount-3),h.w(l)||t.L(t.pointsCount-2,(h.x+l.x)/2,(h.y+l.y)/2)),o=t.getLinkPoint(r,a,ie,!1,!1,o,s),o.s()||o.set(r.actualBounds.center),t.L(t.pointsCount-1,o.x,o.y))),t.xf(),i.commit()}}}this.avoidOrthogonalOverlaps()},kg.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var t=new et,e=this.network.edges.iterator;e.next();){var i=e.value.link;null!==i&&i.isOrthogonal&&!t.contains(i)&&t.add(i)}if(0r.y&&(u=l.y>r.y?0:s.xr.x&&(u=l.x>r.x?0:s.ye.layer?1:t.fde.fd?1:t.vce.vc?1:0:0},i.Qy=function(t,e){return t instanceof py&&e instanceof py&&t!==e?t.firste.first||t.le.l||t.fde.fd?1:t.vce.vc?1:0:0},i.hu=function(t,e){return t instanceof py&&e instanceof py&&t!==e?t.Xbe.Xb||t.le.l||t.fde.fd?1:t.vce.vc?1:0:0},i.A=function(t,e){return t-=e,-1t},i.uj=function(t,e,i,n){var o=t.length,r=n-i;if(!(1>=r))if((0>i||i>=o-1)&&w("not in range 0 <= from < length: "+i),2===r)n=t[i],o=t[i+1],0=o)t.sort(e);else for(i=t.slice(0,n),i.sort(e),e=0;e=o)for(n=t.slice(i),n.sort(e),e=i;et&&(this.ng=t,this.B())}},setsPortSpots:{get:function(){return this.kf},set:function(t){this.kf!==t&&(this.kf=t,this.B())}},linkSpacing:{get:function(){return this.Mo},set:function(t){this.Mo!==t&&0<=t&&(this.Mo=t,this.B())}},maxLayer:{get:function(){return this.sa}},maxIndex:{get:function(){return this.Ji}},maxColumn:{get:function(){return this.Ca}},minIndexLayer:{get:function(){return this.mh}},maxIndexLayer:{get:function(){return this.pc}}});var ey=new U(kg,"CycleDepthFirst",0),iy=new U(kg,"CycleGreedy",1),ny=new U(kg,"CycleFromLayers",2),oy=new U(kg,"LayerOptimalLinkLength",0),ry=new U(kg,"LayerLongestPathSink",1),sy=new U(kg,"LayerLongestPathSource",2),ay=new U(kg,"InitDepthFirstOut",0),hy=new U(kg,"InitDepthFirstIn",1),ly=new U(kg,"InitNaive",2),uy=new U(kg,"AggressiveNone",0),cy=new U(kg,"AggressiveLess",1),fy=new U(kg,"AggressiveMore",2),dy=8;function py(){this.index=this.vc=this.fd=this.Xb=this.first=this.layer=0,this.link=null,this.l=0}function gy(t){Qf.call(this,t)}function yy(t){rd.call(this,t),this.Ra=this.Rg=this.Fi=-1,this.I=NaN,this.T=null,this.valid=!1,this.finish=this.Cg=NaN,this.wf=0,this.Mk=this.Nk=null}function my(t){ad.call(this,t),this.l=this.La=this.eb=!1,this.Ka=this.I=NaN,this.T=this.u=0}function vy(){zf.call(this),this.Jb=new nt,this.vp=$y,this.kd=Jy,this.oq=dm,this.ts=bm,this.nx=[],this.jd=!0,this.Eb=mm,this.Pd=new Bt(10,10).freeze();var t=new Mm(this);this.U=new Sm(t),this.V=new Sm(t),this.uv=[]}function xy(t){var e=new nt;for(t=t.iterator;t.next();){var i=t.value;i.initialized||e.add(i)}return e}function by(t,e){var i=999999,n=null;for(e=e.iterator;e.next();){var o=e.value;switch(t.kd){case Jy:o.sourceEdges.counte.level)return!1;t.removeChild(i.parent,i)}return!0}function My(t,e){if(null!==e){t.initializeTreeVertexValues(e),e.alignment===hm&&t.sortTreeVertexChildren(e);for(var i=0,n=e.childrenCount,o=0,r=e.children,s=r.length,a=0;an?jy(e,o,T,x,b):Oy(e,o,T,x,b),T=b.x,x=b.width,b=b.height;break;case lm:for(t=0;tf&&(Mf&&(Sc&&(c=0),135m&&(m=0)),e.fa.h(c,m),e.ua.h(x,b)}}function jy(t,e,i,n,o){var r=e.length;if(0===r)return new zt(i,0,n,o);if(1===r)return t=e[0],n=t.ua.width,o=t.ua.height,new zt(i,0,n,o);for(var s=t.nodeSpacing,a=t.rowSpacing,h=90===Hy(t),l=0,u=0,c=0,f=0;fh&&(n-=h),o=Math.max(o,Math.max(f,c)+a+r.height),0>e.S.x&&(i=Fy(t,e.S.x,!1,i,s))):(e.S.h(n+a,i+s/2-e.focus.y-e.fa.y),n=Math.max(n,Math.max(d,u)+a+r.width),c=i+s/2-e.focus.y-e.fa.y,o=Math.max(o,c+r.height),0>c&&(o-=c),0>e.S.y&&(i=Fy(t,e.S.y,!0,i,s)))),new zt(i,0,n,o)}function Oy(t,e,i,n,o){var r=e.length;if(0===r)return new zt(i,0,n,o);if(1===r)return e=e[0],n=e.ua.width,o=e.ua.height,new zt(i,0,n,o);for(var s=t.nodeSpacing,a=t.rowSpacing,h=270===Hy(t),l=0,u=0,c=0,f=0;fu&&(n-=u),o=Math.max(o,Math.abs(Math.min(f,c))+p+l.height),0>a.S.x&&(i=Fy(t,a.S.x,!1,i,s))):(a.S.h(-n-l.width-p,i+s/2-a.focus.y-a.fa.y),n=Math.max(n,Math.abs(Math.min(d,u))+p+l.width),c=i+s/2-a.focus.y-a.fa.y,o=Math.max(o,c+l.height),0>c&&(o-=c),0>a.S.y&&(i=Fy(t,a.S.y,!0,i,s)))),t=0;te&&(e=i+t.width),0>i&&(e-=i),e;case rm:return t.width>e?t.width:e;case sm:return 2*t.focus.x>e?t.width:e+t.width-2*t.focus.x;case am:case hm:return Math.max(t.width,Math.max(e,i+t.width)-Math.min(0,i));case lm:return t.width-t.focus.x+t.nodeSpacing/2+e;case um:return Math.max(t.width,t.focus.x+t.nodeSpacing/2+e);default:return e}}function Iy(t,e,i){switch(t.alignment){case om:case nm:return i+t.height>e&&(e=i+t.height),0>i&&(e-=i),e;case rm:return t.height>e?t.height:e;case sm:return 2*t.focus.y>e?t.height:e+t.height-2*t.focus.y;case am:case hm:return Math.max(t.height,Math.max(e,i+t.height)-Math.min(0,i));case lm:return t.height-t.focus.y+t.nodeSpacing/2+e;case um:return Math.max(t.height,t.focus.y+t.nodeSpacing/2+e);default:return e}}function Ey(t,e,i){switch(t){case nm:e/=2,i/=2;break;case om:e/=2,i/=2;break;case rm:i=e=0;break;case sm:break;default:w("Unhandled alignment value "+t.toString())}return new pt(e,i)}function Ry(t,e,i,n,o,r){e=Ey(e,i,n),zy(t,e.x,e.y,o,r)}function zy(t,e,i,n,o){if(0!==e||0!==i)for(t=t.children;n<=o;n++){var r=t[n].S;r.x+=e,r.y+=i}}function Vy(t,e,i,n){var o=e.parent;switch(t.kd){case Jy:for(t=e.sourceEdges;t.next();)e=t.value,e.fromVertex===o&&e.relativePoint.h(i,n);break;case Zy:for(t=e.destinationEdges;t.next();)e=t.value,e.toVertex===o&&e.relativePoint.h(i,n);break;default:w("Unhandled path value "+t.kd.toString())}}function Gy(t,e,i){for(var n=0;nc.length||null===d||2>d.length))for(o=i=0;il&&r.yr.y&&le.length||null===i||2>i.length)n=null;else{for(u=Xy(t,e.length+i.length),n=r=h=0;rh;)l=i[r++],u[n++].h(l.x+o,l.y);for(i=Xy(t,n),h=0;hc.length||null===r||2>r.length)o=null;else{for(u=Xy(t,c.length+r.length),o=l=i=0;ir;)h=c[i++],u[o++].h(h.x,h.y);for(r=Xy(t,o),i=0;ic.length||null===d||2>d.length))for(o=i=0;ih&&r.xr.x&&he.length||null===i||2>i.length)n=null;else{for(u=Xy(t,e.length+i.length),n=r=h=0;rh;)l=i[r++],u[n++].h(l.x,l.y+o);for(i=Xy(t,n),h=0;hc.length||null===r||2>r.length)o=null;else{for(u=Xy(t,c.length+r.length),o=l=i=0;ir;)h=c[i++],u[o++].h(h.x,h.y);for(r=Xy(t,o),i=0;i=t?0:135>=t?90:225>=t?180:315>=t?270:0}function _y(t){var e=Hy(t);e=90===e||270===e;var i=t.layerSpacing;if(0o?jy(t,s,L,m,v):Oy(t,s,L,m,v),L=v.x,m=v.width,v=v.height;break;case lm:for(b=0;bc&&(PI&&(zy(t,-I,0,A,D-1),Gy(b,-I,0),Gy(k,-I,0),I=0)}F.S.h(I,N),m=Math.max(m,M),v=Math.max(v,x+(0===C?0:p)+B.height),P=M}else 0c&&(NI&&(zy(t,0,-I,A,D-1),Gy(b,0,-I),Gy(k,0,-I),I=0)),F.S.h(P,I),v=Math.max(v,S),m=Math.max(m,x+(0===C?0:p)+B.width),N=S;T++}switch(0l&&(l=0),135g&&(g=0),h===um&&(a+=f/2+t.focus.y),s+=n+i):e?(null===t.comments?n>m&&(m=Ey(h,n-m,0),s=m.x,a=m.y,m=n,l=0):m=By(t,m,l),0>l&&(s-=l,l=0),135v&&(v=Ey(h,0,y-v),s=v.x,a=v.y,v=y,g=0):v=Iy(t,v,g),0>g&&(a-=g,g=0),s+=n+i),0o[0].x?o[2].assign(o[1]):o[1].assign(o[2])),o[3].yo[0].x?o[3].assign(o[2]):o[2].assign(o[3])),C[0].h(l+n,0),C[1].h(C[0].x,y),C[2].yo[0].y?o[2].assign(o[1]):o[1].assign(o[2])),o[3].xo[0].y?o[3].assign(o[2]):o[2].assign(o[3])),C[0].h(0,g+y),C[1].h(n,C[0].y),C[2].x=t&&(this.U.nodeIndentPastParent=t,this.B())}},nodeSpacing:{get:function(){return this.U.nodeSpacing},set:function(t){this.U.nodeSpacing!==t&&(this.U.nodeSpacing=t,this.B())}},layerSpacing:{get:function(){return this.U.layerSpacing},set:function(t){this.U.layerSpacing!==t&&(this.U.layerSpacing=t,this.B())}},layerSpacingParentOverlap:{get:function(){return this.U.layerSpacingParentOverlap},set:function(t){this.U.layerSpacingParentOverlap!==t&&0<=t&&1>=t&&(this.U.layerSpacingParentOverlap=t,this.B())}},compaction:{get:function(){return this.U.compaction},set:function(t){this.U.compaction===t||t!==cm&&t!==fm||(this.U.compaction=t,this.B())}},breadthLimit:{get:function(){return this.U.breadthLimit},set:function(t){this.U.breadthLimit!==t&&0<=t&&(this.U.breadthLimit=t,this.B())}},rowSpacing:{get:function(){return this.U.rowSpacing},set:function(t){this.U.rowSpacing!==t&&(this.U.rowSpacing=t,this.B())}},rowIndent:{get:function(){return this.U.rowIndent},set:function(t){this.U.rowIndent!==t&&0<=t&&(this.U.rowIndent=t,this.B())}},commentSpacing:{get:function(){return this.U.commentSpacing},set:function(t){this.U.commentSpacing!==t&&(this.U.commentSpacing=t,this.B())}},commentMargin:{get:function(){return this.U.commentMargin},set:function(t){this.U.commentMargin!==t&&(this.U.commentMargin=t,this.B())}},setsPortSpot:{get:function(){return this.U.setsPortSpot},set:function(t){this.U.setsPortSpot!==t&&(this.U.setsPortSpot=t,this.B())}},portSpot:{get:function(){return this.U.portSpot},set:function(t){this.U.portSpot.w(t)||(this.U.portSpot=t,this.B())}},setsChildPortSpot:{get:function(){return this.U.setsChildPortSpot},set:function(t){this.U.setsChildPortSpot!==t&&(this.U.setsChildPortSpot=t,this.B())}},childPortSpot:{get:function(){return this.U.childPortSpot},set:function(t){this.U.childPortSpot.w(t)||(this.U.childPortSpot=t,this.B())}},alternateSorting:{get:function(){return this.V.sorting},set:function(t){this.V.sorting===t||t!==Qy&&t!==tm&&t!==em&&!im||(this.V.sorting=t,this.B())}},alternateComparer:{get:function(){return this.V.comparer},set:function(t){this.V.comparer!==t&&(this.V.comparer=t,this.B())}},alternateAngle:{get:function(){return this.V.angle},set:function(t){this.V.angle===t||0!==t&&90!==t&&180!==t&&270!==t||(this.V.angle=t,this.B())}},alternateAlignment:{get:function(){return this.V.alignment},set:function(t){this.V.alignment!==t&&(this.V.alignment=t,this.B())}},alternateNodeIndent:{get:function(){return this.V.nodeIndent},set:function(t){this.V.nodeIndent!==t&&0<=t&&(this.V.nodeIndent=t,this.B())}},alternateNodeIndentPastParent:{get:function(){return this.V.nodeIndentPastParent},set:function(t){this.V.nodeIndentPastParent!==t&&0<=t&&1>=t&&(this.V.nodeIndentPastParent=t,this.B())}},alternateNodeSpacing:{get:function(){return this.V.nodeSpacing},set:function(t){this.V.nodeSpacing!==t&&(this.V.nodeSpacing=t,this.B())}},alternateLayerSpacing:{get:function(){return this.V.layerSpacing},set:function(t){this.V.layerSpacing!==t&&(this.V.layerSpacing=t,this.B())}},alternateLayerSpacingParentOverlap:{get:function(){return this.V.layerSpacingParentOverlap},set:function(t){this.V.layerSpacingParentOverlap!==t&&0<=t&&1>=t&&(this.V.layerSpacingParentOverlap=t,this.B())}},alternateCompaction:{get:function(){return this.V.compaction},set:function(t){this.V.compaction===t||t!==cm&&t!==fm||(this.V.compaction=t,this.B())}},alternateBreadthLimit:{get:function(){return this.V.breadthLimit},set:function(t){this.V.breadthLimit!==t&&0<=t&&(this.V.breadthLimit=t,this.B())}},alternateRowSpacing:{get:function(){return this.V.rowSpacing},set:function(t){this.V.rowSpacing!==t&&(this.V.rowSpacing=t,this.B())}},alternateRowIndent:{get:function(){return this.V.rowIndent},set:function(t){this.V.rowIndent!==t&&0<=t&&(this.V.rowIndent=t,this.B())}},alternateCommentSpacing:{get:function(){return this.V.commentSpacing},set:function(t){this.V.commentSpacing!==t&&(this.V.commentSpacing=t,this.B())}},alternateCommentMargin:{get:function(){return this.V.commentMargin},set:function(t){this.V.commentMargin!==t&&(this.V.commentMargin=t,this.B())}},alternateSetsPortSpot:{get:function(){return this.V.setsPortSpot},set:function(t){this.V.setsPortSpot!==t&&(this.V.setsPortSpot=t,this.B())}},alternatePortSpot:{get:function(){return this.V.portSpot},set:function(t){this.V.portSpot.w(t)||(this.V.portSpot=t,this.B())}},alternateSetsChildPortSpot:{get:function(){return this.V.setsChildPortSpot},set:function(t){this.V.setsChildPortSpot!==t&&(this.V.setsChildPortSpot=t,this.B())}},alternateChildPortSpot:{get:function(){return this.V.childPortSpot},set:function(t){this.V.childPortSpot.w(t)||(this.V.childPortSpot=t,this.B())}}});var $y=new U(vy,"PathDefault",-1),Jy=new U(vy,"PathDestination",0),Zy=new U(vy,"PathSource",1),Qy=new U(vy,"SortingForwards",10),tm=new U(vy,"SortingReverse",11),em=new U(vy,"SortingAscending",12),im=new U(vy,"SortingDescending",13),nm=new U(vy,"AlignmentCenterSubtrees",20),om=new U(vy,"AlignmentCenterChildren",21),rm=new U(vy,"AlignmentStart",22),sm=new U(vy,"AlignmentEnd",23),am=new U(vy,"AlignmentBus",24),hm=new U(vy,"AlignmentBusBranching",25),lm=new U(vy,"AlignmentTopLeftBus",26),um=new U(vy,"AlignmentBottomRightBus",27),cm=new U(vy,"CompactionNone",30),fm=new U(vy,"CompactionBlock",31),dm=new U(vy,"StyleLayered",40),pm=new U(vy,"StyleLastParents",41),gm=new U(vy,"StyleAlternating",42),ym=new U(vy,"StyleRootOnly",43),mm=new U(vy,"ArrangementVertical",50),vm=new U(vy,"ArrangementHorizontal",51),xm=new U(vy,"ArrangementFixedRoots",52),bm=new U(vy,"LayerIndividual",60),wm=new U(vy,"LayerSiblings",61),km=new U(vy,"LayerUniform",62);function Mm(t){Qf.call(this,t)}function Sm(t){rd.call(this,t),this.Ka=!1,this.Cc=null,this.I=[],this.Sc=this.eb=this.T=this.La=0,this.jd=null,this.S=new pt(0,0),this.ua=new Bt(0,0),this.fa=new pt(0,0),this.Tm=this.Sm=this.ZA=!1,this.br=this.Pq=null,this.bd=Qy,this.Wc=sd,this.Yb=0,this.yb=om,this.Ds=this.Cs=0,this.Es=20,this.ue=50,this.ss=0,this.Er=fm,this.wr=0,this.Rs=25,this.Dr=this.Qs=10,this.Cr=20,this.dt=!0,this.Ms=Ce,this.ct=!0,this.zr=Ce}function Pm(t){ad.call(this,t),this.lv=new pt(0,0)}vy.className="TreeLayout",vy.PathDefault=$y,vy.PathDestination=Jy,vy.PathSource=Zy,vy.SortingForwards=Qy,vy.SortingReverse=tm,vy.SortingAscending=em,vy.SortingDescending=im,vy.AlignmentCenterSubtrees=nm,vy.AlignmentCenterChildren=om,vy.AlignmentStart=rm,vy.AlignmentEnd=sm,vy.AlignmentBus=am,vy.AlignmentBusBranching=hm,vy.AlignmentTopLeftBus=lm,vy.AlignmentBottomRightBus=um,vy.CompactionNone=cm,vy.CompactionBlock=fm,vy.StyleLayered=dm,vy.StyleLastParents=pm,vy.StyleAlternating=gm,vy.StyleRootOnly=ym,vy.ArrangementVertical=mm,vy.ArrangementHorizontal=vm,vy.ArrangementFixedRoots=xm,vy.LayerIndividual=bm,vy.LayerSiblings=wm,vy.LayerUniform=km,f(Mm,Qf),Mm.prototype.createVertex=function(){return new Sm(this)},Mm.prototype.createEdge=function(){return new Pm(this)},Mm.className="TreeNetwork",f(Sm,rd),Sm.prototype.copyInheritedPropertiesFrom=function(t){null!==t&&(this.bd=t.sorting,this.Wc=t.comparer,this.Yb=t.angle,this.yb=t.alignment,this.Cs=t.nodeIndent,this.Ds=t.nodeIndentPastParent,this.Es=t.nodeSpacing,this.ue=t.layerSpacing,this.ss=t.layerSpacingParentOverlap,this.Er=t.compaction,this.wr=t.breadthLimit,this.Rs=t.rowSpacing,this.Qs=t.rowIndent,this.Dr=t.commentSpacing,this.Cr=t.commentMargin,this.dt=t.setsPortSpot,this.Ms=t.portSpot,this.ct=t.setsChildPortSpot,this.zr=t.childPortSpot)},d.Object.defineProperties(Sm.prototype,{initialized:{get:function(){return this.Ka},set:function(t){this.Ka!==t&&(this.Ka=t)}},parent:{get:function(){return this.Cc},set:function(t){this.Cc!==t&&(this.Cc=t)}},children:{get:function(){return this.I},set:function(t){if(this.I!==t){if(null!==t)for(var e=t.length,i=0;if.y+i.rowIndent&&(o=Math.min(o,Math.max(u.y,o-Wy(i))))):i.alignment===rm?(o=n.top+e.y,0===e.y&&u.yf.x+i.rowIndent&&(o=Math.min(o,Math.max(u.x,o-Wy(i))))):i.alignment===rm?(o=n.left+e.x,0===e.x&&u.xf.y+i.rowIndent&&(o=Math.min(o,Math.max(u.y,o-Wy(i))))):i.alignment===rm?(o=n.top+e.y,0===e.y&&u.yf.x+i.rowIndent&&(o=Math.min(o,Math.max(u.x,o-Wy(i))))):i.alignment===rm?(o=n.left+e.x,0===e.x&&u.x",f="<",d="prototype",p="script",g=u("IE_PROTO"),y=function(){},m=function(t){return f+p+c+t+f+"/"+p+c},v=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},x=function(){var t,e=l("iframe"),i="java"+p+":";return e.style.display="none",h.appendChild(e),e.src=String(i),t=e.contentWindow.document,t.open(),t.write(m("document.F=Object")),t.close(),t.F},b=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}b="undefined"!=typeof document?document.domain&&n?v(n):x():v(n);var t=s.length;while(t--)delete b[d][s[t]];return b()};a[g]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(y[d]=o(t),i=new y,y[d]=null,i[g]=t):i=b(),void 0===e?i:r(i,e)}},"7dd0":function(t,e,i){"use strict";var n=i("23e7"),o=i("c65b"),r=i("c430"),s=i("5e77"),a=i("1626"),h=i("9ed3"),l=i("e163"),u=i("d2bb"),c=i("d44e"),f=i("9112"),d=i("6eeb"),p=i("b622"),g=i("3f8c"),y=i("ae93"),m=s.PROPER,v=s.CONFIGURABLE,x=y.IteratorPrototype,b=y.BUGGY_SAFARI_ITERATORS,w=p("iterator"),k="keys",M="values",S="entries",P=function(){return this};t.exports=function(t,e,i,s,p,y,N){h(i,e,s);var C,T,A,L=function(t){if(t===p&&B)return B;if(!b&&t in D)return D[t];switch(t){case k:return function(){return new i(this,t)};case M:return function(){return new i(this,t)};case S:return function(){return new i(this,t)}}return function(){return new i(this)}},j=e+" Iterator",O=!1,D=t.prototype,F=D[w]||D["@@iterator"]||p&&D[p],B=!b&&F||L(p),I="Array"==e&&D.entries||F;if(I&&(C=l(I.call(new t)),C!==Object.prototype&&C.next&&(r||l(C)===x||(u?u(C,x):a(C[w])||d(C,w,P)),c(C,j,!0,!0),r&&(g[j]=P))),m&&p==M&&F&&F.name!==M&&(!r&&v?f(D,"name",M):(O=!0,B=function(){return o(F,this)})),p)if(T={values:L(M),keys:y?B:L(k),entries:L(S)},N)for(A in T)(b||O||!(A in D))&&d(D,A,T[A]);else n({target:e,proto:!0,forced:b||O},T);return r&&!N||D[w]===B||d(D,w,B,{name:p}),g[e]=B,T}},"7f9a":function(t,e,i){var n=i("da84"),o=i("1626"),r=i("8925"),s=n.WeakMap;t.exports=o(s)&&/native code/.test(r(s))},"825a":function(t,e,i){var n=i("da84"),o=i("861d"),r=n.String,s=n.TypeError;t.exports=function(t){if(o(t))return t;throw s(r(t)+" is not an object")}},"83ab":function(t,e,i){var n=i("d039");t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,i){var n=i("1626");t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},8925:function(t,e,i){var n=i("e330"),o=i("1626"),r=i("c6cd"),s=n(Function.toString);o(r.inspectSource)||(r.inspectSource=function(t){return s(t)}),t.exports=r.inspectSource},"90e3":function(t,e,i){var n=i("e330"),o=0,r=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+r,36)}},9112:function(t,e,i){var n=i("83ab"),o=i("9bf2"),r=i("5c6c");t.exports=n?function(t,e,i){return o.f(t,e,r(1,i))}:function(t,e,i){return t[e]=i,t}},9263:function(t,e,i){"use strict";var n=i("c65b"),o=i("e330"),r=i("577e"),s=i("ad6d"),a=i("9f7f"),h=i("5692"),l=i("7c73"),u=i("69f3").get,c=i("fce3"),f=i("107c"),d=h("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,g=p,y=o("".charAt),m=o("".indexOf),v=o("".replace),x=o("".slice),b=function(){var t=/a/,e=/b*/g;return n(p,t,"a"),n(p,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),w=a.UNSUPPORTED_Y||a.BROKEN_CARET,k=void 0!==/()??/.exec("")[1],M=b||k||w||c||f;M&&(g=function(t){var e,i,o,a,h,c,f,M=this,S=u(M),P=r(t),N=S.raw;if(N)return N.lastIndex=M.lastIndex,e=n(g,N,P),M.lastIndex=N.lastIndex,e;var C=S.groups,T=w&&M.sticky,A=n(s,M),L=M.source,j=0,O=P;if(T&&(A=v(A,"y",""),-1===m(A,"g")&&(A+="g"),O=x(P,M.lastIndex),M.lastIndex>0&&(!M.multiline||M.multiline&&"\n"!==y(P,M.lastIndex-1))&&(L="(?: "+L+")",O=" "+O,j++),i=new RegExp("^(?:"+L+")",A)),k&&(i=new RegExp("^"+L+"$(?!\\s)",A)),b&&(o=M.lastIndex),a=n(p,T?i:M,O),T?a?(a.input=x(a.input,j),a[0]=x(a[0],j),a.index=M.lastIndex,M.lastIndex+=a[0].length):M.lastIndex=0:b&&a&&(M.lastIndex=M.global?a.index+a[0].length:o),k&&a&&a.length>1&&n(d,a[0],i,(function(){for(h=1;hl)o(n,i=e[l++])&&(~s(u,i)||h(u,i));return u}},cc12:function(t,e,i){var n=i("da84"),o=i("861d"),r=n.document,s=o(r)&&o(r.createElement);t.exports=function(t){return s?r.createElement(t):{}}},cca6:function(t,e,i){var n=i("23e7"),o=i("60da");n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},cdf9:function(t,e,i){var n=i("825a"),o=i("861d"),r=i("f069");t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var i=r.f(t),s=i.resolve;return s(e),i.promise}},ce4e:function(t,e,i){var n=i("da84"),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(i){n[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,i){var n=i("da84"),o=i("1626"),r=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?r(n[t]):n[t]&&n[t][e]}},d1e7:function(t,e,i){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!n.call({1:2},1);e.f=r?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},d2bb:function(t,e,i){var n=i("e330"),o=i("825a"),r=i("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(i,[]),e=i instanceof Array}catch(s){}return function(i,n){return o(i),r(n),e?t(i,n):i.__proto__=n,i}}():void 0)},d44e:function(t,e,i){var n=i("9bf2").f,o=i("1a2d"),r=i("b622"),s=r("toStringTag");t.exports=function(t,e,i){t&&!o(t=i?t:t.prototype,s)&&n(t,s,{configurable:!0,value:e})}},d4c3:function(t,e,i){var n=i("342f"),o=i("da84");t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},d9b5:function(t,e,i){var n=i("da84"),o=i("d066"),r=i("1626"),s=i("3a9b"),a=i("fdbf"),h=n.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return r(e)&&s(e.prototype,h(t))}},da84:function(t,e,i){(function(e){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,i("c8ba"))},dc4a:function(t,e,i){var n=i("59ed");t.exports=function(t,e){var i=t[e];return null==i?void 0:n(i)}},df75:function(t,e,i){var n=i("ca84"),o=i("7839");t.exports=Object.keys||function(t){return n(t,o)}},e163:function(t,e,i){var n=i("da84"),o=i("1a2d"),r=i("1626"),s=i("7b0b"),a=i("f772"),h=i("e177"),l=a("IE_PROTO"),u=n.Object,c=u.prototype;t.exports=h?u.getPrototypeOf:function(t){var e=s(t);if(o(e,l))return e[l];var i=e.constructor;return r(i)&&e instanceof i?i.prototype:e instanceof u?c:null}},e177:function(t,e,i){var n=i("d039");t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,i){"use strict";var n=i("fc6a"),o=i("44d2"),r=i("3f8c"),s=i("69f3"),a=i("7dd0"),h="Array Iterator",l=s.set,u=s.getterFor(h);t.exports=a(Array,"Array",(function(t,e){l(this,{type:h,target:n(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},e2cc:function(t,e,i){var n=i("6eeb");t.exports=function(t,e,i){for(var o in e)n(t,o,e[o],i);return t}},e330:function(t,e){var i=Function.prototype,n=i.bind,o=i.call,r=n&&n.bind(o);t.exports=n?function(t){return t&&r(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,i){"use strict";var n,o,r,s,a=i("23e7"),h=i("c430"),l=i("da84"),u=i("d066"),c=i("c65b"),f=i("fea9"),d=i("6eeb"),p=i("e2cc"),g=i("d2bb"),y=i("d44e"),m=i("2626"),v=i("59ed"),x=i("1626"),b=i("861d"),w=i("19aa"),k=i("8925"),M=i("2266"),S=i("1c7e"),P=i("4840"),N=i("2cf4").set,C=i("b575"),T=i("cdf9"),A=i("44de"),L=i("f069"),j=i("e667"),O=i("69f3"),D=i("94ca"),F=i("b622"),B=i("6069"),I=i("605d"),E=i("2d00"),R=F("species"),z="Promise",V=O.get,G=O.set,Y=O.getterFor(z),X=f&&f.prototype,q=f,U=X,K=l.TypeError,H=l.document,_=l.process,W=L.f,$=W,J=!!(H&&H.createEvent&&l.dispatchEvent),Z=x(l.PromiseRejectionEvent),Q="unhandledrejection",tt="rejectionhandled",et=0,it=1,nt=2,ot=1,rt=2,st=!1,at=D(z,(function(){var t=k(q),e=t!==String(q);if(!e&&66===E)return!0;if(h&&!U["finally"])return!0;if(E>=51&&/native code/.test(t))return!1;var i=new q((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))},o=i.constructor={};return o[R]=n,st=i.then((function(){}))instanceof n,!st||!e&&B&&!Z})),ht=at||!S((function(t){q.all(t)["catch"]((function(){}))})),lt=function(t){var e;return!(!b(t)||!x(e=t.then))&&e},ut=function(t,e){if(!t.notified){t.notified=!0;var i=t.reactions;C((function(){var n=t.value,o=t.state==it,r=0;while(i.length>r){var s,a,h,l=i[r++],u=o?l.ok:l.fail,f=l.resolve,d=l.reject,p=l.domain;try{u?(o||(t.rejection===rt&&pt(t),t.rejection=ot),!0===u?s=n:(p&&p.enter(),s=u(n),p&&(p.exit(),h=!0)),s===l.promise?d(K("Promise-chain cycle")):(a=lt(s))?c(a,s,f,d):f(s)):d(n)}catch(g){p&&!h&&p.exit(),d(g)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ft(t)}))}},ct=function(t,e,i){var n,o;J?(n=H.createEvent("Event"),n.promise=e,n.reason=i,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:i},!Z&&(o=l["on"+t])?o(n):t===Q&&A("Unhandled promise rejection",i)},ft=function(t){c(N,l,(function(){var e,i=t.facade,n=t.value,o=dt(t);if(o&&(e=j((function(){I?_.emit("unhandledRejection",n,i):ct(Q,i,n)})),t.rejection=I||dt(t)?rt:ot,e.error))throw e.value}))},dt=function(t){return t.rejection!==ot&&!t.parent},pt=function(t){c(N,l,(function(){var e=t.facade;I?_.emit("rejectionHandled",e):ct(tt,e,t.value)}))},gt=function(t,e,i){return function(n){t(e,n,i)}},yt=function(t,e,i){t.done||(t.done=!0,i&&(t=i),t.value=e,t.state=nt,ut(t,!0))},mt=function(t,e,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===e)throw K("Promise can't be resolved itself");var n=lt(e);n?C((function(){var i={done:!1};try{c(n,e,gt(mt,i,t),gt(yt,i,t))}catch(o){yt(i,o,t)}})):(t.value=e,t.state=it,ut(t,!1))}catch(o){yt({done:!1},o,t)}}};if(at&&(q=function(t){w(this,U),v(t),c(n,this);var e=V(this);try{t(gt(mt,e),gt(yt,e))}catch(i){yt(e,i)}},U=q.prototype,n=function(t){G(this,{type:z,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:et,value:void 0})},n.prototype=p(U,{then:function(t,e){var i=Y(this),n=i.reactions,o=W(P(this,q));return o.ok=!x(t)||t,o.fail=x(e)&&e,o.domain=I?_.domain:void 0,i.parent=!0,n[n.length]=o,i.state!=et&&ut(i,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=V(t);this.promise=t,this.resolve=gt(mt,e),this.reject=gt(yt,e)},L.f=W=function(t){return t===q||t===r?new o(t):$(t)},!h&&x(f)&&X!==Object.prototype)){s=X.then,st||(d(X,"then",(function(t,e){var i=this;return new q((function(t,e){c(s,i,t,e)})).then(t,e)}),{unsafe:!0}),d(X,"catch",U["catch"],{unsafe:!0}));try{delete X.constructor}catch(vt){}g&&g(X,U)}a({global:!0,wrap:!0,forced:at},{Promise:q}),y(q,z,!1,!0),m(z),r=u(z),a({target:z,stat:!0,forced:at},{reject:function(t){var e=W(this);return c(e.reject,void 0,t),e.promise}}),a({target:z,stat:!0,forced:h||at},{resolve:function(t){return T(h&&this===r?q:this,t)}}),a({target:z,stat:!0,forced:ht},{all:function(t){var e=this,i=W(e),n=i.resolve,o=i.reject,r=j((function(){var i=v(e.resolve),r=[],s=0,a=1;M(t,(function(t){var h=s++,l=!1;a++,c(i,e,t).then((function(t){l||(l=!0,r[h]=t,--a||n(r))}),o)})),--a||n(r)}));return r.error&&o(r.value),i.promise},race:function(t){var e=this,i=W(e),n=i.reject,o=j((function(){var o=v(e.resolve);M(t,(function(t){c(o,e,t).then(i.resolve,n)}))}));return o.error&&n(o.value),i.promise}})},e893:function(t,e,i){var n=i("1a2d"),o=i("56ef"),r=i("06cf"),s=i("9bf2");t.exports=function(t,e){for(var i=o(e),a=s.f,h=r.f,l=0;l