@logicflow/core 1.2.0-alpha.4 → 1.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/logic-flow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=211)}([function(t,e,n){var r=n(113),o=n(41),i=n(173);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){"use strict";var r=n(37),o=n(78),i=n(67),a=n(53),u=n(108),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var r=n(5),o=n(144),i=n(145),a=n(1),u=n(54),c=n(25),s=c("iterator"),l=c("toStringTag"),f=a.values,d=function(t,e){if(t){if(t[s]!==f)try{u(t,s,f)}catch(e){t[s]=f}if(t[l]||u(t,l,e),o[e])for(var n in a)if(t[n]!==a[n])try{u(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var p in o)d(r[p]&&r[p].prototype,p);d(i,"DOMTokenList")},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(43),a=n(73),u=n(33),c=n(13),s=n(61),l=n(34),f=n(106),d=n(15),p=n(32),h=n(94),y=n(26),v=n(31),g=n(55),b=n(83),m=n(30),_=n(36),O=n(37),E=n(82),w=n(38),x=n(68),S=n(51),j=n(63),P=n(69),A=n(136),k=n(109),T=n(48),D=n(35),M=n(88),N=n(96),R=n(41),C=n(79),I=n(86),L=n(66),B=n(80),H=n(25),U=n(146),X=n(147),G=n(70),F=n(53),Y=n(71).forEach,z=I("hidden"),V=H("toPrimitive"),W=F.set,K=F.getterFor("Symbol"),$=Object.prototype,Z=o.Symbol,q=Z&&Z.prototype,J=o.TypeError,Q=o.QObject,tt=i("JSON","stringify"),et=T.f,nt=D.f,rt=A.f,ot=M.f,it=c([].push),at=C("symbols"),ut=C("op-symbols"),ct=C("string-to-symbol-registry"),st=C("symbol-to-string-registry"),lt=C("wks"),ft=!Q||!Q.prototype||!Q.prototype.findChild,dt=l&&d((function(){return 7!=S(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=et($,e);r&&delete $[e],nt(t,e,n),r&&t!==$&&nt($,e,r)}:nt,pt=function(t,e){var n=at[t]=S(q);return W(n,{type:"Symbol",tag:t,description:e}),l||(n.description=e),n},ht=function(t,e,n){t===$&&ht(ut,e,n),m(t);var r=E(e);return m(n),p(at,r)?(n.enumerable?(p(t,z)&&t[z][r]&&(t[z][r]=!1),n=S(n,{enumerable:x(0,!1)})):(p(t,z)||nt(t,z,x(1,{})),t[z][r]=!0),dt(t,r,n)):nt(t,r,n)},yt=function(t,e){m(t);var n=O(e),r=j(n).concat(mt(n));return Y(r,(function(e){l&&!u(vt,n,e)||ht(t,e,n[e])})),t},vt=function(t){var e=E(t),n=u(ot,this,e);return!(this===$&&p(at,e)&&!p(ut,e))&&(!(n||!p(this,e)||!p(at,e)||p(this,z)&&this[z][e])||n)},gt=function(t,e){var n=O(t),r=E(e);if(n!==$||!p(at,r)||p(ut,r)){var o=et(n,r);return!o||!p(at,r)||p(n,z)&&n[z][r]||(o.enumerable=!0),o}},bt=function(t){var e=rt(O(t)),n=[];return Y(e,(function(t){p(at,t)||p(L,t)||it(n,t)})),n},mt=function(t){var e=t===$,n=rt(e?ut:O(t)),r=[];return Y(n,(function(t){!p(at,t)||e&&!p($,t)||it(r,at[t])})),r};(f||(R(q=(Z=function(){if(g(q,this))throw J("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,e=B(t),n=function(t){this===$&&u(n,ut,t),p(this,z)&&p(this[z],e)&&(this[z][e]=!1),dt(this,e,x(1,t))};return l&&ft&&dt($,e,{configurable:!0,set:n}),pt(e,t)}).prototype,"toString",(function(){return K(this).tag})),R(Z,"withoutSetter",(function(t){return pt(B(t),t)})),M.f=vt,D.f=ht,T.f=gt,P.f=A.f=bt,k.f=mt,U.f=function(t){return pt(H(t),t)},l&&(nt(q,"description",{configurable:!0,get:function(){return K(this).description}}),s||R($,"propertyIsEnumerable",vt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:Z}),Y(j(lt),(function(t){X(t)})),r({target:"Symbol",stat:!0,forced:!f},{for:function(t){var e=w(t);if(p(ct,e))return ct[e];var n=Z(e);return ct[e]=n,st[n]=e,n},keyFor:function(t){if(!b(t))throw J(t+" is not a symbol");if(p(st,t))return st[t]},useSetter:function(){ft=!0},useSimple:function(){ft=!1}}),r({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?S(t):yt(S(t),e)},defineProperty:ht,defineProperties:yt,getOwnPropertyDescriptor:gt}),r({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:bt,getOwnPropertySymbols:mt}),r({target:"Object",stat:!0,forced:d((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(_(t))}}),tt)&&r({target:"JSON",stat:!0,forced:!f||d((function(){var t=Z();return"[null]"!=tt([t])||"{}"!=tt({a:t})||"{}"!=tt(Object(t))}))},{stringify:function(t,e,n){var r=N(arguments),o=e;if((v(e)||void 0!==t)&&!b(t))return h(e)||(e=function(t,e){if(y(o)&&(e=u(o,this,t,e)),!b(e))return e}),r[1]=e,a(tt,null,r)}});if(!q[V]){var _t=q.valueOf;R(q,V,(function(t){return u(_t,this)}))}G(Z,"Symbol"),L[z]=!0},function(t,e,n){"use strict";var r=n(143).charAt,o=n(38),i=n(53),a=n(108),u=i.set,c=i.getterFor("String Iterator");a(String,"String",(function(t){u(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(103))},function(t,e,n){"use strict";var r=n(14),o=n(34),i=n(5),a=n(13),u=n(32),c=n(26),s=n(55),l=n(38),f=n(35).f,d=n(131),p=i.Symbol,h=p&&p.prototype;if(o&&c(p)&&(!("description"in h)||void 0!==p().description)){var y={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(h,this)?new p(t):void 0===t?p():p(t);return""===t&&(y[e]=!0),e};d(v,p),v.prototype=h,h.constructor=v;var g="Symbol(test)"==String(p("test")),b=a(h.toString),m=a(h.valueOf),_=/^Symbol\((.*)\)[^)]+$/,O=a("".replace),E=a("".slice);f(h,"description",{configurable:!0,get:function(){var t=m(this),e=b(t);if(u(y,t))return"";var n=g?E(e,7,-1):O(e,_,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:v})}},function(t,e,n){n(147)("iterator")},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"$mobx",(function(){return F})),n.d(e,"FlowCancellationError",(function(){return qe})),n.d(e,"ObservableMap",(function(){return nr})),n.d(e,"ObservableSet",(function(){return ir})),n.d(e,"Reaction",(function(){return Oe})),n.d(e,"_allowStateChanges",(function(){return Ht})),n.d(e,"_allowStateChangesInsideComputed",(function(){return Ce})),n.d(e,"_allowStateReadsEnd",(function(){return ie})),n.d(e,"_allowStateReadsStart",(function(){return oe})),n.d(e,"_autoAction",(function(){return Re})),n.d(e,"_endAction",(function(){return Bt})),n.d(e,"_getAdministration",(function(){return xr})),n.d(e,"_getGlobalState",(function(){return de})),n.d(e,"_interceptReads",(function(){return an})),n.d(e,"_isComputingDerivation",(function(){return qt})),n.d(e,"_resetGlobalState",(function(){return pe})),n.d(e,"_startAction",(function(){return Lt})),n.d(e,"action",(function(){return Ne})),n.d(e,"autorun",(function(){return Le})),n.d(e,"comparer",(function(){return W})),n.d(e,"computed",(function(){return kt})),n.d(e,"configure",(function(){return Ye})),n.d(e,"createAtom",(function(){return V})),n.d(e,"defineProperty",(function(){return On})),n.d(e,"entries",(function(){return vn})),n.d(e,"extendObservable",(function(){return ze})),n.d(e,"flow",(function(){return en})),n.d(e,"flowResult",(function(){return rn})),n.d(e,"get",(function(){return _n})),n.d(e,"getAtom",(function(){return wr})),n.d(e,"getDebugName",(function(){return Sr})),n.d(e,"getDependencyTree",(function(){return Ve})),n.d(e,"getObserverTree",(function(){return Ke})),n.d(e,"has",(function(){return mn})),n.d(e,"intercept",(function(){return un})),n.d(e,"isAction",(function(){return Ie})),n.d(e,"isBoxedObservable",(function(){return zt})),n.d(e,"isComputed",(function(){return sn})),n.d(e,"isComputedProp",(function(){return ln})),n.d(e,"isFlow",(function(){return on})),n.d(e,"isFlowCancellationError",(function(){return Je})),n.d(e,"isObservable",(function(){return dn})),n.d(e,"isObservableArray",(function(){return Qn})),n.d(e,"isObservableMap",(function(){return rr})),n.d(e,"isObservableObject",(function(){return dr})),n.d(e,"isObservableProp",(function(){return pn})),n.d(e,"isObservableSet",(function(){return ar})),n.d(e,"keys",(function(){return hn})),n.d(e,"makeAutoObservable",(function(){return Gn})),n.d(e,"makeObservable",(function(){return Un})),n.d(e,"observable",(function(){return jt})),n.d(e,"observe",(function(){return wn})),n.d(e,"onBecomeObserved",(function(){return Xe})),n.d(e,"onBecomeUnobserved",(function(){return Ge})),n.d(e,"onReactionError",(function(){return Ee})),n.d(e,"override",(function(){return Z})),n.d(e,"ownKeys",(function(){return En})),n.d(e,"reaction",(function(){return Ue})),n.d(e,"remove",(function(){return bn})),n.d(e,"runInAction",(function(){return Ce})),n.d(e,"set",(function(){return gn})),n.d(e,"spy",(function(){return Pe})),n.d(e,"toJS",(function(){return Sn})),n.d(e,"trace",(function(){return jn})),n.d(e,"transaction",(function(){return An})),n.d(e,"untracked",(function(){return ee})),n.d(e,"values",(function(){return yn})),n.d(e,"when",(function(){return kn}));function r(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw new Error("number"==typeof t?"[MobX] minified error nr: "+t+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var o={};function i(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:o}var a=Object.assign,u=Object.getOwnPropertyDescriptor,c=Object.defineProperty,s=Object.prototype,l=[];Object.freeze(l);var f={};Object.freeze(f);var d="undefined"!=typeof Proxy,p=Object.toString();function h(){d||r("Proxy not available")}function y(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var v=function(){};function g(t){return"function"==typeof t}function b(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function m(t){return null!==t&&"object"==typeof t}function _(t){if(!m(t))return!1;var e=Object.getPrototypeOf(t);if(null==e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n.toString()===p}function O(t){var e=null==t?void 0:t.constructor;return!!e&&("GeneratorFunction"===e.name||"GeneratorFunction"===e.displayName)}function E(t,e,n){c(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function w(t,e,n){c(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function x(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(t){return m(t)&&!0===t[n]}}function S(t){return t instanceof Map}function j(t){return t instanceof Set}var P=void 0!==Object.getOwnPropertySymbols;var A="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:P?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function k(t){return null===t?null:"object"==typeof t?""+t:t}function T(t,e){return s.hasOwnProperty.call(t,e)}var D=Object.getOwnPropertyDescriptors||function(t){var e={};return A(t).forEach((function(n){e[n]=u(t,n)})),e};function M(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function N(t,e,n){return e&&M(t.prototype,e),n&&M(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function R(){return(R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function C(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,I(t,e)}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function L(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function H(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return B(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var U=Symbol("mobx-stored-annotations");function X(t){return Object.assign((function(e,n){G(e,n,t)}),t)}function G(t,e,n){T(t,U)||E(t,U,R({},t[U])),function(t){return"override"===t.annotationType_}(n)||(t[U][e]=n)}var F=Symbol("mobx administration"),Y=function(){function t(t){void 0===t&&(t="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Gt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},e.reportObserved=function(){return me(this)},e.reportChanged=function(){ge(),_e(this),be()},e.toString=function(){return this.name_},t}(),z=x("Atom",Y);function V(t,e,n){void 0===e&&(e=v),void 0===n&&(n=v);var r=new Y(t);return e!==v&&Xe(r,e),n!==v&&Ge(r,n),r}var W={identity:function(t,e){return t===e},structural:function(t,e){return Pr(t,e)},default:function(t,e){return Object.is?Object.is(t,e):t===e?0!==t||1/t==1/e:t!=t&&e!=e},shallow:function(t,e){return Pr(t,e,1)}};function K(t,e,n){return dn(t)?t:Array.isArray(t)?jt.array(t,{name:n}):_(t)?jt.object(t,void 0,{name:n}):S(t)?jt.map(t,{name:n}):j(t)?jt.set(t,{name:n}):"function"!=typeof t||Ie(t)||on(t)?t:O(t)?en(t):Re(n,t)}function $(t){return t}var Z=X({annotationType_:"override",make_:function(t,e){0;0;return 0},extend_:function(t,e,n,o){r("'"+this.annotationType_+"' can only be used with 'makeObservable'")}});function q(t,e){return{annotationType_:t,options_:e,make_:J,extend_:Q}}function J(t,e,n,r){var o;if(null!=(o=this.options_)&&o.bound)return null===this.extend_(t,e,n,!1)?0:1;if(r===t.target_)return null===this.extend_(t,e,n,!1)?0:2;if(Ie(n.value))return 1;var i=tt(t,this,e,n,!1);return c(r,e,i),2}function Q(t,e,n,r){var o=tt(t,this,e,n);return t.defineProperty_(e,o,r)}function tt(t,e,n,r,o){var i,a,u,c,s,l,f,d;void 0===o&&(o=fe.safeDescriptors),d=r,e.annotationType_,d.value;var p,h=r.value;null!=(i=e.options_)&&i.bound&&(h=h.bind(null!=(p=t.proxy_)?p:t.target_));return{value:Ct(null!=(a=null==(u=e.options_)?void 0:u.name)?a:n.toString(),h,null!=(c=null==(s=e.options_)?void 0:s.autoAction)&&c,null!=(l=e.options_)&&l.bound?null!=(f=t.proxy_)?f:t.target_:void 0),configurable:!o||t.isPlainObject_,enumerable:!1,writable:!o}}function et(t,e){return{annotationType_:t,options_:e,make_:nt,extend_:rt}}function nt(t,e,n,r){var o;if(r===t.target_)return null===this.extend_(t,e,n,!1)?0:2;if(null!=(o=this.options_)&&o.bound&&(!T(t.target_,e)||!on(t.target_[e]))&&null===this.extend_(t,e,n,!1))return 0;if(on(n.value))return 1;var i=ot(t,this,e,n,!1,!1);return c(r,e,i),2}function rt(t,e,n,r){var o,i=ot(t,this,e,n,null==(o=this.options_)?void 0:o.bound);return t.defineProperty_(e,i,r)}function ot(t,e,n,r,o,i){var a;void 0===i&&(i=fe.safeDescriptors),a=r,e.annotationType_,a.value;var u,c=r.value;(on(c)||(c=en(c)),o)&&((c=c.bind(null!=(u=t.proxy_)?u:t.target_)).isMobXFlow=!0);return{value:c,configurable:!i||t.isPlainObject_,enumerable:!1,writable:!i}}function it(t,e){return{annotationType_:t,options_:e,make_:at,extend_:ut}}function at(t,e,n){return null===this.extend_(t,e,n,!1)?0:1}function ut(t,e,n,r){return function(t,e,n,r){e.annotationType_,r.get;0}(0,this,0,n),t.defineComputedProperty_(e,R({},this.options_,{get:n.get,set:n.set}),r)}function ct(t,e){return{annotationType_:t,options_:e,make_:st,extend_:lt}}function st(t,e,n){return null===this.extend_(t,e,n,!1)?0:1}function lt(t,e,n,r){var o,i;return function(t,e,n,r){e.annotationType_;0}(0,this),t.defineObservableProperty_(e,n.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:K,r)}var ft=dt();function dt(t){return{annotationType_:"true",options_:t,make_:pt,extend_:ht}}function pt(t,e,n,r){var o,i,a,u;if(n.get)return kt.make_(t,e,n,r);if(n.set){var s=Ct(e.toString(),n.set);return r===t.target_?null===t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:s})?0:2:(c(r,e,{configurable:!0,set:s}),2)}if(r!==t.target_&&"function"==typeof n.value)return O(n.value)?(null!=(u=this.options_)&&u.autoBind?en.bound:en).make_(t,e,n,r):(null!=(a=this.options_)&&a.autoBind?Re.bound:Re).make_(t,e,n,r);var l,f=!1===(null==(o=this.options_)?void 0:o.deep)?jt.ref:jt;"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(l=t.proxy_)?l:t.target_));return f.make_(t,e,n,r)}function ht(t,e,n,r){var o,i,a;if(n.get)return kt.extend_(t,e,n,r);if(n.set)return t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:Ct(e.toString(),n.set)},r);"function"==typeof n.value&&null!=(o=this.options_)&&o.autoBind&&(n.value=n.value.bind(null!=(a=t.proxy_)?a:t.target_));return(!1===(null==(i=this.options_)?void 0:i.deep)?jt.ref:jt).extend_(t,e,n,r)}var yt={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function vt(t){return t||yt}Object.freeze(yt);var gt=ct("observable"),bt=ct("observable.ref",{enhancer:$}),mt=ct("observable.shallow",{enhancer:function(t,e,n){return null==t||dr(t)||Qn(t)||rr(t)||ar(t)?t:Array.isArray(t)?jt.array(t,{name:n,deep:!1}):_(t)?jt.object(t,void 0,{name:n,deep:!1}):S(t)?jt.map(t,{name:n,deep:!1}):j(t)?jt.set(t,{name:n,deep:!1}):void 0}}),_t=ct("observable.struct",{enhancer:function(t,e){return Pr(t,e)?e:t}}),Ot=X(gt);function Et(t){return!0===t.deep?K:!1===t.deep?$:(e=t.defaultDecorator)&&null!=(n=null==(r=e.options_)?void 0:r.enhancer)?n:K;var e,n,r}function wt(t,e,n){if(!b(e))return dn(t)?t:_(t)?jt.object(t,e,n):Array.isArray(t)?jt.array(t,e):S(t)?jt.map(t,e):j(t)?jt.set(t,e):"object"==typeof t&&null!==t?t:jt.box(t,e);G(t,e,gt)}Object.assign(wt,Ot);var xt,St,jt=a(wt,{box:function(t,e){var n=vt(e);return new Yt(t,Et(n),n.name,!0,n.equals)},array:function(t,e){var n=vt(e);return(!1===fe.useProxies||!1===n.proxy?Er:Vn)(t,Et(n),n.name)},map:function(t,e){var n=vt(e);return new nr(t,Et(n),n.name)},set:function(t,e){var n=vt(e);return new ir(t,Et(n),n.name)},object:function(t,e,n){return ze(!1===fe.useProxies||!1===(null==n?void 0:n.proxy)?sr({},n):function(t,e){var n,r;return h(),t=sr(t,e),null!=(r=(n=t[F]).proxy_)?r:n.proxy_=new Proxy(t,Nn)}({},n),t,e)},ref:X(bt),shallow:X(mt),deep:Ot,struct:X(_t)}),Pt=it("computed"),At=it("computed.struct",{equals:W.structural}),kt=function(t,e){if(b(e))return G(t,e,Pt);if(_(t))return X(it("computed",t));var n=_(e)?e:{};return n.get=t,n.name||(n.name=t.name||""),new Vt(n)};Object.assign(kt,Pt),kt.struct=X(At);var Tt,Dt=0,Mt=1,Nt=null!=(xt=null==(St=u((function(){}),"name"))?void 0:St.configurable)&&xt,Rt={value:"action",configurable:!0,writable:!1,enumerable:!1};function Ct(t,e,n,r){function o(){return It(t,n,e,r||this,arguments)}return void 0===n&&(n=!1),o.isMobxAction=!0,Nt&&(Rt.value=t,Object.defineProperty(o,"name",Rt)),o}function It(t,e,n,r,o){var i=Lt(t,e,r,o);try{return n.apply(r,o)}catch(t){throw i.error_=t,t}finally{Bt(i)}}function Lt(t,e,n,r){var o=fe.trackingDerivation,i=!e||!o;ge();var a=fe.allowStateChanges;i&&(ne(),a=Ut(!0));var u={runAsAction_:i,prevDerivation_:o,prevAllowStateChanges_:a,prevAllowStateReads_:oe(!0),notifySpy_:!1,startTime_:0,actionId_:Mt++,parentActionId_:Dt};return Dt=u.actionId_,u}function Bt(t){Dt!==t.actionId_&&r(30),Dt=t.parentActionId_,void 0!==t.error_&&(fe.suppressReactionErrors=!0),Xt(t.prevAllowStateChanges_),ie(t.prevAllowStateReads_),be(),t.runAsAction_&&re(t.prevDerivation_),fe.suppressReactionErrors=!1}function Ht(t,e){var n=Ut(t);try{return e()}finally{Xt(n)}}function Ut(t){var e=fe.allowStateChanges;return fe.allowStateChanges=t,e}function Xt(t){fe.allowStateChanges=t}Tt=Symbol.toPrimitive;var Gt,Ft,Yt=function(t,e){function n(e,n,r,o,i){var a;return void 0===r&&(r="ObservableValue"),void 0===o&&(o=!0),void 0===i&&(i=W.default),(a=t.call(this,r)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=r,a.equals=i,a.value_=n(e,void 0,r),a}C(n,t);var r=n.prototype;return r.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},r.set=function(t){this.value_;if((t=this.prepareNewValue_(t))!==fe.UNCHANGED){0,this.setNewValue_(t)}},r.prepareNewValue_=function(t){if(Jt(this),Rn(this)){var e=In(this,{object:this,type:Fn,newValue:t});if(!e)return fe.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value_,this.name_),this.equals(this.value_,t)?fe.UNCHANGED:t},r.setNewValue_=function(t){var e=this.value_;this.value_=t,this.reportChanged(),Ln(this)&&Hn(this,{type:Fn,object:this,newValue:t,oldValue:e})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(t){return Cn(this,t)},r.observe_=function(t,e){return e&&t({observableKind:"value",debugObjectName:this.name_,object:this,type:Fn,newValue:this.value_,oldValue:void 0}),Bn(this,t)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return k(this.get())},r[e]=function(){return this.valueOf()},n}(Y,Tt),zt=x("ObservableValue",Yt),Vt=function(t){function e(t){this.dependenciesState_=Gt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Gt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Kt(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ft.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||r(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=Ct("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?W.structural:W.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var n=e.prototype;return n.onBecomeStale_=function(){!function(t){if(t.lowestObserverState_!==Gt.UP_TO_DATE_)return;t.lowestObserverState_=Gt.POSSIBLY_STALE_,t.observers_.forEach((function(t){t.dependenciesState_===Gt.UP_TO_DATE_&&(t.dependenciesState_=Gt.POSSIBLY_STALE_,t.onBecomeStale_())}))}(this)},n.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},n.get=function(){if(this.isComputing_&&r(32,this.name_,this.derivation),0!==fe.inBatch||0!==this.observers_.size||this.keepAlive_){if(me(this),Zt(this)){var t=fe.trackingContext;this.keepAlive_&&!t&&(fe.trackingContext=this),this.trackAndCompute()&&function(t){if(t.lowestObserverState_===Gt.STALE_)return;t.lowestObserverState_=Gt.STALE_,t.observers_.forEach((function(e){e.dependenciesState_===Gt.POSSIBLY_STALE_?e.dependenciesState_=Gt.STALE_:e.dependenciesState_===Gt.UP_TO_DATE_&&(t.lowestObserverState_=Gt.UP_TO_DATE_)}))}(this),fe.trackingContext=t}}else Zt(this)&&(this.warnAboutUntrackedRead_(),ge(),this.value_=this.computeValue_(!1),be());var e=this.value_;if($t(e))throw e.cause;return e},n.set=function(t){if(this.setter_){this.isRunningSetter_&&r(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,t)}finally{this.isRunningSetter_=!1}}else r(34,this.name_)},n.trackAndCompute=function(){var t=this.value_,e=this.dependenciesState_===Gt.NOT_TRACKING_,n=this.computeValue_(!0),r=e||$t(t)||$t(n)||!this.equals_(t,n);return r&&(this.value_=n),r},n.computeValue_=function(t){this.isComputing_=!0;var e,n=Ut(!1);if(t)e=Qt(this,this.derivation,this.scope_);else if(!0===fe.disableErrorBoundaries)e=this.derivation.call(this.scope_);else try{e=this.derivation.call(this.scope_)}catch(t){e=new Kt(t)}return Xt(n),this.isComputing_=!1,e},n.suspend_=function(){this.keepAlive_||(te(this),this.value_=void 0)},n.observe_=function(t,e){var n=this,r=!0,o=void 0;return Le((function(){var i=n.get();if(!r||e){var a=ne();t({observableKind:"computed",debugObjectName:n.name_,type:Fn,object:n,newValue:i,oldValue:o}),re(a)}r=!1,o=i}))},n.warnAboutUntrackedRead_=function(){},n.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},n.valueOf=function(){return k(this.get())},n[t]=function(){return this.valueOf()},e}(Symbol.toPrimitive),Wt=x("ComputedValue",Vt);!function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"}(Gt||(Gt={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Ft||(Ft={}));var Kt=function(t){this.cause=void 0,this.cause=t};function $t(t){return t instanceof Kt}function Zt(t){switch(t.dependenciesState_){case Gt.UP_TO_DATE_:return!1;case Gt.NOT_TRACKING_:case Gt.STALE_:return!0;case Gt.POSSIBLY_STALE_:for(var e=oe(!0),n=ne(),r=t.observing_,o=r.length,i=0;i<o;i++){var a=r[i];if(Wt(a)){if(fe.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return re(n),ie(e),!0}if(t.dependenciesState_===Gt.STALE_)return re(n),ie(e),!0}}return ae(t),re(n),ie(e),!1}}function qt(){return null!==fe.trackingDerivation}function Jt(t){}function Qt(t,e,n){var r=oe(!0);ae(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++fe.runId;var o,i=fe.trackingDerivation;if(fe.trackingDerivation=t,fe.inBatch++,!0===fe.disableErrorBoundaries)o=e.call(n);else try{o=e.call(n)}catch(t){o=new Kt(t)}return fe.inBatch--,fe.trackingDerivation=i,function(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,r=Gt.UP_TO_DATE_,o=0,i=t.unboundDepsCount_,a=0;a<i;a++){var u=n[a];0===u.diffValue_&&(u.diffValue_=1,o!==a&&(n[o]=u),o++),u.dependenciesState_>r&&(r=u.dependenciesState_)}n.length=o,t.newObserving_=null,i=e.length;for(;i--;){var c=e[i];0===c.diffValue_&&ye(c,t),c.diffValue_=0}for(;o--;){var s=n[o];1===s.diffValue_&&(s.diffValue_=0,he(s,t))}r!==Gt.UP_TO_DATE_&&(t.dependenciesState_=r,t.onBecomeStale_())}(t),ie(r),o}function te(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)ye(e[n],t);t.dependenciesState_=Gt.NOT_TRACKING_}function ee(t){var e=ne();try{return t()}finally{re(e)}}function ne(){var t=fe.trackingDerivation;return fe.trackingDerivation=null,t}function re(t){fe.trackingDerivation=t}function oe(t){var e=fe.allowStateReads;return fe.allowStateReads=t,e}function ie(t){fe.allowStateReads=t}function ae(t){if(t.dependenciesState_!==Gt.UP_TO_DATE_){t.dependenciesState_=Gt.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=Gt.UP_TO_DATE_}}var ue=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],ce=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},se=!0,le=!1,fe=function(){var t=i();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(se=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new ce).version&&(se=!1),se?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ce):(setTimeout((function(){le||r(35)}),1),new ce)}();function de(){return fe}function pe(){var t=new ce;for(var e in t)-1===ue.indexOf(e)&&(fe[e]=t[e]);fe.allowStateChanges=!fe.enforceActions}function he(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function ye(t,e){t.observers_.delete(e),0===t.observers_.size&&ve(t)}function ve(t){!1===t.isPendingUnobservation_&&(t.isPendingUnobservation_=!0,fe.pendingUnobservations.push(t))}function ge(){fe.inBatch++}function be(){if(0==--fe.inBatch){xe();for(var t=fe.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Vt&&n.suspend_())}fe.pendingUnobservations=[]}}function me(t){var e=fe.trackingDerivation;return null!==e?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&fe.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),!0):(0===t.observers_.size&&fe.inBatch>0&&ve(t),!1)}function _e(t){t.lowestObserverState_!==Gt.STALE_&&(t.lowestObserverState_=Gt.STALE_,t.observers_.forEach((function(t){t.dependenciesState_===Gt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=Gt.STALE_})))}var Oe=function(){function t(t,e,n,r){void 0===t&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Gt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Ft.NONE,this.name_=t,this.onInvalidate_=e,this.errorHandler_=n,this.requiresObservable_=r}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,fe.pendingReactions.push(this),xe())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){ge(),this.isScheduled_=!1;var t=fe.trackingContext;if(fe.trackingContext=this,Zt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}fe.trackingContext=t,be()}},e.track=function(t){if(!this.isDisposed_){ge();0,this.isRunning_=!0;var e=fe.trackingContext;fe.trackingContext=this;var n=Qt(this,t,void 0);fe.trackingContext=e,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&te(this),$t(n)&&this.reportExceptionInDerivation_(n.cause),be()}},e.reportExceptionInDerivation_=function(t){var e=this;if(this.errorHandler_)this.errorHandler_(t,this);else{if(fe.disableErrorBoundaries)throw t;var n="[mobx] uncaught error in '"+this+"'";fe.suppressReactionErrors||console.error(n,t),fe.globalReactionErrorHandlers.forEach((function(n){return n(t,e)}))}},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(ge(),te(this),be()))},e.getDisposer_=function(){var t=this.dispose.bind(this);return t[F]=this,t},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(t){void 0===t&&(t=!1),jn(this,t)},t}();function Ee(t){return fe.globalReactionErrorHandlers.push(t),function(){var e=fe.globalReactionErrorHandlers.indexOf(t);e>=0&&fe.globalReactionErrorHandlers.splice(e,1)}}var we=function(t){return t()};function xe(){fe.inBatch>0||fe.isRunningReactions||we(Se)}function Se(){fe.isRunningReactions=!0;for(var t=fe.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction_()}fe.isRunningReactions=!1}var je=x("Reaction",Oe);function Pe(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Ae=q("action"),ke=q("action.bound",{bound:!0}),Te=q("autoAction",{autoAction:!0}),De=q("autoAction.bound",{autoAction:!0,bound:!0});function Me(t){return function(e,n){return g(e)?Ct(e.name||"<unnamed action>",e,t):g(n)?Ct(e,n,t):b(n)?G(e,n,t?Te:Ae):b(e)?X(q(t?"autoAction":"action",{name:e,autoAction:t})):void 0}}var Ne=Me(!1);Object.assign(Ne,Ae);var Re=Me(!0);function Ce(t){return It(t.name||"<unnamed action>",!1,t,this,void 0)}function Ie(t){return g(t)&&!0===t.isMobxAction}function Le(t,e){var n,r;void 0===e&&(e=f);var o,i=null!=(n=null==(r=e)?void 0:r.name)?n:"Autorun";if(!e.scheduler&&!e.delay)o=new Oe(i,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var a=He(e),u=!1;o=new Oe(i,(function(){u||(u=!0,a((function(){u=!1,o.isDisposed_||o.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(o)}return o.schedule_(),o.getDisposer_()}Object.assign(Re,Te),Ne.bound=X(ke),Re.bound=X(De);var Be=function(t){return t()};function He(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Be}function Ue(t,e,n){var r;void 0===n&&(n=f);var o,i,a,u,c=null!=(r=n.name)?r:"Reaction",s=Ne(c,n.onError?(o=n.onError,i=e,function(){try{return i.apply(this,arguments)}catch(t){o.call(this,t)}}):e),l=!n.scheduler&&!n.delay,d=He(n),p=!0,h=!1,y=n.compareStructural?W.structural:n.equals||W.default,v=new Oe(c,(function(){p||l?g():h||(h=!0,d(g))}),n.onError,n.requiresObservable);function g(){if(h=!1,!v.isDisposed_){var e=!1;v.track((function(){var n=Ht(!1,(function(){return t(v)}));e=p||!y(a,n),u=a,a=n})),(p&&n.fireImmediately||!p&&e)&&s(a,u,v),p=!1}}return v.schedule_(),v.getDisposer_()}function Xe(t,e,n){return Fe("onBO",t,e,n)}function Ge(t,e,n){return Fe("onBUO",t,e,n)}function Fe(t,e,n,r){var o="function"==typeof r?wr(e,n):wr(e),i=g(r)?r:n,a=t+"L";return o[a]?o[a].add(i):o[a]=new Set([i]),function(){var t=o[a];t&&(t.delete(i),0===t.size&&delete o[a])}}function Ye(t){!0===t.isolateGlobalState&&function(){if((fe.pendingReactions.length||fe.inBatch||fe.isRunningReactions)&&r(36),le=!0,se){var t=i();0==--t.__mobxInstanceCount&&(t.__mobxGlobals=void 0),fe=new ce}}();var e,n,o=t.useProxies,a=t.enforceActions;if(void 0!==o&&(fe.useProxies="always"===o||"never"!==o&&"undefined"!=typeof Proxy),"ifavailable"===o&&(fe.verifyProxies=!0),void 0!==a){var u="always"===a?"always":"observed"===a;fe.enforceActions=u,fe.allowStateChanges=!0!==u&&"always"!==u}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(e){e in t&&(fe[e]=!!t[e])})),fe.allowStateReads=!fe.observableRequiresReaction,t.reactionScheduler&&(e=t.reactionScheduler,n=we,we=function(t){return e((function(){return n(t)}))})}function ze(t,e,n,r){var o=D(e),i=sr(t,r)[F];ge();try{A(o).forEach((function(t){i.extend_(t,o[t],!n||(!(t in n)||n[t]))}))}finally{be()}return t}function Ve(t,e){return We(wr(t,e))}function We(t){var e,n={name:t.name_};return t.observing_&&t.observing_.length>0&&(n.dependencies=(e=t.observing_,Array.from(new Set(e))).map(We)),n}function Ke(t,e){return $e(wr(t,e))}function $e(t){var e={name:t.name_};return function(t){return t.observers_&&t.observers_.size>0}(t)&&(e.observers=Array.from(function(t){return t.observers_}(t)).map($e)),e}var Ze=0;function qe(){this.message="FLOW_CANCELLED"}function Je(t){return t instanceof qe}qe.prototype=Object.create(Error.prototype);var Qe=et("flow"),tn=et("flow.bound",{bound:!0}),en=Object.assign((function(t,e){if(b(e))return G(t,e,Qe);var n=t,r=n.name||"<unnamed flow>",o=function(){var t,e=this,o=arguments,i=++Ze,a=Ne(r+" - runid: "+i+" - init",n).apply(e,o),u=void 0,c=new Promise((function(e,n){var o=0;function c(t){var e;u=void 0;try{e=Ne(r+" - runid: "+i+" - yield "+o++,a.next).call(a,t)}catch(t){return n(t)}l(e)}function s(t){var e;u=void 0;try{e=Ne(r+" - runid: "+i+" - yield "+o++,a.throw).call(a,t)}catch(t){return n(t)}l(e)}function l(t){if(!g(null==t?void 0:t.then))return t.done?e(t.value):(u=Promise.resolve(t.value)).then(c,s);t.then(l,n)}t=n,c(void 0)}));return c.cancel=Ne(r+" - runid: "+i+" - cancel",(function(){try{u&&nn(u);var e=a.return(void 0),n=Promise.resolve(e.value);n.then(v,v),nn(n),t(new qe)}catch(e){t(e)}})),c};return o.isMobXFlow=!0,o}),Qe);function nn(t){g(t.cancel)&&t.cancel()}function rn(t){return t}function on(t){return!0===(null==t?void 0:t.isMobXFlow)}function an(t,e,n){var r;return rr(t)||Qn(t)||zt(t)?r=xr(t):dr(t)&&(r=xr(t,e)),r.dehancer="function"==typeof e?e:n,function(){r.dehancer=void 0}}function un(t,e,n){return g(n)?function(t,e,n){return xr(t,e).intercept_(n)}(t,e,n):function(t,e){return xr(t).intercept_(e)}(t,e)}function cn(t,e){if(void 0===e)return Wt(t);if(!1===dr(t))return!1;if(!t[F].values_.has(e))return!1;var n=wr(t,e);return Wt(n)}function sn(t){return cn(t)}function ln(t,e){return cn(t,e)}function fn(t,e){return!!t&&(void 0!==e?!!dr(t)&&t[F].values_.has(e):dr(t)||!!t[F]||z(t)||je(t)||Wt(t))}function dn(t){return fn(t)}function pn(t,e){return fn(t,e)}function hn(t){return dr(t)?t[F].keys_():rr(t)||ar(t)?Array.from(t.keys()):Qn(t)?t.map((function(t,e){return e})):void r(5)}function yn(t){return dr(t)?hn(t).map((function(e){return t[e]})):rr(t)?hn(t).map((function(e){return t.get(e)})):ar(t)?Array.from(t.values()):Qn(t)?t.slice():void r(6)}function vn(t){return dr(t)?hn(t).map((function(e){return[e,t[e]]})):rr(t)?hn(t).map((function(e){return[e,t.get(e)]})):ar(t)?Array.from(t.entries()):Qn(t)?t.map((function(t,e){return[e,t]})):void r(7)}function gn(t,e,n){if(2!==arguments.length||ar(t))dr(t)?t[F].set_(e,n):rr(t)?t.set(e,n):ar(t)?t.add(e):Qn(t)?("number"!=typeof e&&(e=parseInt(e,10)),e<0&&r("Invalid index: '"+e+"'"),ge(),e>=t.length&&(t.length=e+1),t[e]=n,be()):r(8);else{ge();var o=e;try{for(var i in o)gn(t,i,o[i])}finally{be()}}}function bn(t,e){dr(t)?t[F].delete_(e):rr(t)||ar(t)?t.delete(e):Qn(t)?("number"!=typeof e&&(e=parseInt(e,10)),t.splice(e,1)):r(9)}function mn(t,e){return dr(t)?t[F].has_(e):rr(t)||ar(t)?t.has(e):Qn(t)?e>=0&&e<t.length:void r(10)}function _n(t,e){if(mn(t,e))return dr(t)?t[F].get_(e):rr(t)?t.get(e):Qn(t)?t[e]:void r(11)}function On(t,e,n){if(dr(t))return t[F].defineProperty_(e,n);r(39)}function En(t){if(dr(t))return t[F].ownKeys_();r(38)}function wn(t,e,n,r){return g(n)?function(t,e,n,r){return xr(t,e).observe_(n,r)}(t,e,n,r):function(t,e,n){return xr(t).observe_(e,n)}(t,e,n)}function xn(t,e,n){return t.set(e,n),n}function Sn(t,e){return function t(e,n){if(null==e||"object"!=typeof e||e instanceof Date||!dn(e))return e;if(zt(e)||Wt(e))return t(e.get(),n);if(n.has(e))return n.get(e);if(Qn(e)){var r=xn(n,e,new Array(e.length));return e.forEach((function(e,o){r[o]=t(e,n)})),r}if(ar(e)){var o=xn(n,e,new Set);return e.forEach((function(e){o.add(t(e,n))})),o}if(rr(e)){var i=xn(n,e,new Map);return e.forEach((function(e,r){i.set(r,t(e,n))})),i}var a=xn(n,e,{});return En(e).forEach((function(r){s.propertyIsEnumerable.call(e,r)&&(a[r]=t(e[r],n))})),a}(t,new Map)}function jn(){r("trace() is not available in production builds");for(var t=!1,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];"boolean"==typeof n[n.length-1]&&(t=n.pop());var i=Pn(n);if(!i)return r("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===Ft.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled"),i.isTracing_=t?Ft.BREAK:Ft.LOG}function Pn(t){switch(t.length){case 0:return fe.trackingDerivation;case 1:return wr(t[0]);case 2:return wr(t[0],t[1])}}function An(t,e){void 0===e&&(e=void 0),ge();try{return t.apply(e)}finally{be()}}function kn(t,e,n){return 1===arguments.length||e&&"object"==typeof e?Dn(t,e):Tn(t,e,n||{})}function Tn(t,e,n){var r;if("number"==typeof n.timeout){var o=new Error("WHEN_TIMEOUT");r=setTimeout((function(){if(!a[F].isDisposed_){if(a(),!n.onError)throw o;n.onError(o)}}),n.timeout)}n.name="When";var i=Ct("When-effect",e),a=Le((function(e){Ht(!1,t)&&(e.dispose(),r&&clearTimeout(r),i())}),n);return a}function Dn(t,e){var n;var r=new Promise((function(r,o){var i=Tn(t,r,R({},e,{onError:o}));n=function(){i(),o(new Error("WHEN_CANCELLED"))}}));return r.cancel=n,r}function Mn(t){return t[F]}en.bound=X(tn);var Nn={has:function(t,e){return Mn(t).has_(e)},get:function(t,e){return Mn(t).get_(e)},set:function(t,e,n){var r;return!!b(e)&&(null==(r=Mn(t).set_(e,n,!0))||r)},deleteProperty:function(t,e){var n;return!!b(e)&&(null==(n=Mn(t).delete_(e,!0))||n)},defineProperty:function(t,e,n){var r;return null==(r=Mn(t).defineProperty_(e,n))||r},ownKeys:function(t){return Mn(t).ownKeys_()},preventExtensions:function(t){r(13)}};function Rn(t){return void 0!==t.interceptors_&&t.interceptors_.length>0}function Cn(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),y((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function In(t,e){var n=ne();try{for(var o=[].concat(t.interceptors_||[]),i=0,a=o.length;i<a&&((e=o[i](e))&&!e.type&&r(14),e);i++);return e}finally{re(n)}}function Ln(t){return void 0!==t.changeListeners_&&t.changeListeners_.length>0}function Bn(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),y((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function Hn(t,e){var n=ne(),r=t.changeListeners_;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](e);re(n)}}function Un(t,e,n){var r=sr(t,n)[F];ge();try{0,null!=e||(e=function(t){return T(t,U)||E(t,U,R({},t[U])),t[U]}(t)),A(e).forEach((function(t){return r.make_(t,e[t])}))}finally{be()}return t}var Xn=Symbol("mobx-keys");function Gn(t,e,n){if(_(t))return ze(t,t,e,n);var r=sr(t,n)[F];if(!t[Xn]){var o=Object.getPrototypeOf(t),i=new Set([].concat(A(t),A(o)));i.delete("constructor"),i.delete(F),E(o,Xn,i)}ge();try{t[Xn].forEach((function(t){return r.make_(t,!e||(!(t in e)||e[t]))}))}finally{be()}return t}var Fn="update",Yn={get:function(t,e){var n=t[F];return e===F?n:"length"===e?n.getArrayLength_():"string"!=typeof e||isNaN(e)?T(Wn,e)?Wn[e]:t[e]:n.get_(parseInt(e))},set:function(t,e,n){var r=t[F];return"length"===e&&r.setArrayLength_(n),"symbol"==typeof e||isNaN(e)?t[e]=n:r.set_(parseInt(e),n),!0},preventExtensions:function(){r(15)}},zn=function(){function t(t,e,n,r){void 0===t&&(t="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Y(t),this.enhancer_=function(t,n){return e(t,n,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.dehanceValues_=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},e.intercept_=function(t){return Cn(this,t)},e.observe_=function(t,e){return void 0===e&&(e=!1),e&&t({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Bn(this,t)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(t){("number"!=typeof t||isNaN(t)||t<0)&&r("Out of range: "+t);var e=this.values_.length;if(t!==e)if(t>e){for(var n=new Array(t-e),o=0;o<t-e;o++)n[o]=void 0;this.spliceWithArray_(e,0,n)}else this.spliceWithArray_(t,e-t)},e.updateArrayLength_=function(t,e){t!==this.lastKnownLength_&&r(16),this.lastKnownLength_+=e,this.legacyMode_&&e>0&&Or(t+e+1)},e.spliceWithArray_=function(t,e,n){var r=this;this.atom_;var o=this.values_.length;if(void 0===t?t=0:t>o?t=o:t<0&&(t=Math.max(0,o+t)),e=1===arguments.length?o-t:null==e?0:Math.max(0,Math.min(e,o-t)),void 0===n&&(n=l),Rn(this)){var i=In(this,{object:this.proxy_,type:"splice",index:t,removedCount:e,added:n});if(!i)return l;e=i.removedCount,n=i.added}if(n=0===n.length?n:n.map((function(t){return r.enhancer_(t,void 0)})),this.legacyMode_){var a=n.length-e;this.updateArrayLength_(o,a)}var u=this.spliceItemsIntoValues_(t,e,n);return 0===e&&0===n.length||this.notifyArraySplice_(t,n,u),this.dehanceValues_(u)},e.spliceItemsIntoValues_=function(t,e,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[t,e].concat(n));var o=this.values_.slice(t,t+e),i=this.values_.slice(t+e);this.values_.length+=n.length-e;for(var a=0;a<n.length;a++)this.values_[t+a]=n[a];for(var u=0;u<i.length;u++)this.values_[t+n.length+u]=i[u];return o},e.notifyArrayChildUpdate_=function(t,e,n){var r=!this.owned_&&!1,o=Ln(this),i=o||r?{observableKind:"array",object:this.proxy_,type:Fn,debugObjectName:this.atom_.name_,index:t,newValue:e,oldValue:n}:null;this.atom_.reportChanged(),o&&Hn(this,i)},e.notifyArraySplice_=function(t,e,n){var r=!this.owned_&&!1,o=Ln(this),i=o||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:t,removed:n,added:e,removedCount:n.length,addedCount:e.length}:null;this.atom_.reportChanged(),o&&Hn(this,i)},e.get_=function(t){if(t<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},e.set_=function(t,e){var n=this.values_;if(t<n.length){this.atom_;var o=n[t];if(Rn(this)){var i=In(this,{type:Fn,object:this.proxy_,index:t,newValue:e});if(!i)return;e=i.newValue}(e=this.enhancer_(e,o))!==o&&(n[t]=e,this.notifyArrayChildUpdate_(t,e,o))}else t===n.length?this.spliceWithArray_(t,0,[e]):r(17,t,n.length)},t}();function Vn(t,e,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),h();var o=new zn(n,e,r,!1);w(o.values_,F,o);var i=new Proxy(o.values_,Yn);if(o.proxy_=i,t&&t.length){var a=Ut(!0);o.spliceWithArray_(0,0,t),Xt(a)}return i}var Wn={clear:function(){return this.splice(0)},replace:function(t){var e=this[F];return e.spliceWithArray_(0,e.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=this[F];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(t);case 2:return i.spliceWithArray_(t,e)}return i.spliceWithArray_(t,e,r)},spliceWithArray:function(t,e,n){return this[F].spliceWithArray_(t,e,n)},push:function(){for(var t=this[F],e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[F].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[F],e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return fe.trackingDerivation&&r(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){fe.trackingDerivation&&r(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var e=this[F],n=e.dehanceValues_(e.values_).indexOf(t);return n>-1&&(this.splice(n,1),!0)}};function Kn(t,e){"function"==typeof Array.prototype[t]&&(Wn[t]=e(t))}function $n(t){return function(){var e=this[F];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function Zn(t){return function(e,n){var r=this,o=this[F];return o.atom_.reportObserved(),o.dehanceValues_(o.values_)[t]((function(t,o){return e.call(n,t,o,r)}))}}function qn(t){return function(){var e=this,n=this[F];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),o=arguments[0];return arguments[0]=function(t,n,r){return o(t,n,r,e)},r[t].apply(r,arguments)}}Kn("concat",$n),Kn("flat",$n),Kn("includes",$n),Kn("indexOf",$n),Kn("join",$n),Kn("lastIndexOf",$n),Kn("slice",$n),Kn("toString",$n),Kn("toLocaleString",$n),Kn("every",Zn),Kn("filter",Zn),Kn("find",Zn),Kn("findIndex",Zn),Kn("flatMap",Zn),Kn("forEach",Zn),Kn("map",Zn),Kn("some",Zn),Kn("reduce",qn),Kn("reduceRight",qn);var Jn=x("ObservableArrayAdministration",zn);function Qn(t){return m(t)&&Jn(t[F])}var tr={},er="add",nr=function(t,e){function n(t,e,n){var o=this;void 0===e&&(e=K),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[F]=tr,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=e,this.name_=n,g(Map)||r(18),this.keysAtom_=V("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,Ht(!0,(function(){o.merge(t)}))}var o=n.prototype;return o.has_=function(t){return this.data_.has(t)},o.has=function(t){var e=this;if(!fe.trackingDerivation)return this.has_(t);var n=this.hasMap_.get(t);if(!n){var r=n=new Yt(this.has_(t),$,"ObservableMap.key?",!1);this.hasMap_.set(t,r),Ge(r,(function(){return e.hasMap_.delete(t)}))}return n.get()},o.set=function(t,e){var n=this.has_(t);if(Rn(this)){var r=In(this,{type:n?Fn:er,object:this,newValue:e,name:t});if(!r)return this;e=r.newValue}return n?this.updateValue_(t,e):this.addValue_(t,e),this},o.delete=function(t){var e=this;if((this.keysAtom_,Rn(this))&&!In(this,{type:"delete",object:this,name:t}))return!1;if(this.has_(t)){var n=Ln(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(t).value_,name:t}:null;return An((function(){var n;e.keysAtom_.reportChanged(),null==(n=e.hasMap_.get(t))||n.setNewValue_(!1),e.data_.get(t).setNewValue_(void 0),e.data_.delete(t)})),n&&Hn(this,r),!0}return!1},o.updateValue_=function(t,e){var n=this.data_.get(t);if((e=n.prepareNewValue_(e))!==fe.UNCHANGED){var r=Ln(this),o=r?{observableKind:"map",debugObjectName:this.name_,type:Fn,object:this,oldValue:n.value_,name:t,newValue:e}:null;0,n.setNewValue_(e),r&&Hn(this,o)}},o.addValue_=function(t,e){var n=this;this.keysAtom_,An((function(){var r,o=new Yt(e,n.enhancer_,"ObservableMap.key",!1);n.data_.set(t,o),e=o.value_,null==(r=n.hasMap_.get(t))||r.setNewValue_(!0),n.keysAtom_.reportChanged()}));var r=Ln(this),o=r?{observableKind:"map",debugObjectName:this.name_,type:er,object:this,name:t,newValue:e}:null;r&&Hn(this,o)},o.get=function(t){return this.has(t)?this.dehanceValue_(this.data_.get(t).get()):this.dehanceValue_(void 0)},o.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},o.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},o.values=function(){var t=this,e=this.keys();return kr({next:function(){var n=e.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:t.get(o)}}})},o.entries=function(){var t=this,e=this.keys();return kr({next:function(){var n=e.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:[o,t.get(o)]}}})},o[t]=function(){return this.entries()},o.forEach=function(t,e){for(var n,r=H(this);!(n=r()).done;){var o=n.value,i=o[0],a=o[1];t.call(e,a,i,this)}},o.merge=function(t){var e=this;return rr(t)&&(t=new Map(t)),An((function(){_(t)?function(t){var e=Object.keys(t);if(!P)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter((function(e){return s.propertyIsEnumerable.call(t,e)}))):e}(t).forEach((function(n){return e.set(n,t[n])})):Array.isArray(t)?t.forEach((function(t){var n=t[0],r=t[1];return e.set(n,r)})):S(t)?(t.constructor!==Map&&r(19,t),t.forEach((function(t,n){return e.set(n,t)}))):null!=t&&r(20,t)})),this},o.clear=function(){var t=this;An((function(){ee((function(){for(var e,n=H(t.keys());!(e=n()).done;){var r=e.value;t.delete(r)}}))}))},o.replace=function(t){var e=this;return An((function(){for(var n,o=function(t){if(S(t)||rr(t))return t;if(Array.isArray(t))return new Map(t);if(_(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}return r(21,t)}(t),i=new Map,a=!1,u=H(e.data_.keys());!(n=u()).done;){var c=n.value;if(!o.has(c))if(e.delete(c))a=!0;else{var s=e.data_.get(c);i.set(c,s)}}for(var l,f=H(o.entries());!(l=f()).done;){var d=l.value,p=d[0],h=d[1],y=e.data_.has(p);if(e.set(p,h),e.data_.has(p)){var v=e.data_.get(p);i.set(p,v),y||(a=!0)}}if(!a)if(e.data_.size!==i.size)e.keysAtom_.reportChanged();else for(var g=e.data_.keys(),b=i.keys(),m=g.next(),O=b.next();!m.done;){if(m.value!==O.value){e.keysAtom_.reportChanged();break}m=g.next(),O=b.next()}e.data_=i})),this},o.toString=function(){return"[object ObservableMap]"},o.toJSON=function(){return Array.from(this)},o.observe_=function(t,e){return Bn(this,t)},o.intercept_=function(t){return Cn(this,t)},N(n,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:e,get:function(){return"Map"}}]),n}(Symbol.iterator,Symbol.toStringTag),rr=x("ObservableMap",nr);var or={},ir=function(t,e){function n(t,e,n){void 0===e&&(e=K),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[F]=or,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,g(Set)||r(22),this.atom_=V(this.name_),this.enhancer_=function(t,r){return e(t,r,n)},t&&this.replace(t)}var o=n.prototype;return o.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},o.clear=function(){var t=this;An((function(){ee((function(){for(var e,n=H(t.data_.values());!(e=n()).done;){var r=e.value;t.delete(r)}}))}))},o.forEach=function(t,e){for(var n,r=H(this);!(n=r()).done;){var o=n.value;t.call(e,o,o,this)}},o.add=function(t){var e=this;if((this.atom_,Rn(this))&&!In(this,{type:er,object:this,newValue:t}))return this;if(!this.has(t)){An((function(){e.data_.add(e.enhancer_(t,void 0)),e.atom_.reportChanged()}));var n=Ln(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:er,object:this,newValue:t}:null;0,n&&Hn(this,r)}return this},o.delete=function(t){var e=this;if(Rn(this)&&!In(this,{type:"delete",object:this,oldValue:t}))return!1;if(this.has(t)){var n=Ln(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:t}:null;return An((function(){e.atom_.reportChanged(),e.data_.delete(t)})),n&&Hn(this,r),!0}return!1},o.has=function(t){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(t))},o.entries=function(){var t=0,e=Array.from(this.keys()),n=Array.from(this.values());return kr({next:function(){var r=t;return t+=1,r<n.length?{value:[e[r],n[r]],done:!1}:{done:!0}}})},o.keys=function(){return this.values()},o.values=function(){this.atom_.reportObserved();var t=this,e=0,n=Array.from(this.data_.values());return kr({next:function(){return e<n.length?{value:t.dehanceValue_(n[e++]),done:!1}:{done:!0}}})},o.replace=function(t){var e=this;return ar(t)&&(t=new Set(t)),An((function(){Array.isArray(t)||j(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&r("Cannot initialize set from "+t)})),this},o.observe_=function(t,e){return Bn(this,t)},o.intercept_=function(t){return Cn(this,t)},o.toJSON=function(){return Array.from(this)},o.toString=function(){return"[object ObservableSet]"},o[t]=function(){return this.values()},N(n,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:e,get:function(){return"Set"}}]),n}(Symbol.iterator,Symbol.toStringTag),ar=x("ObservableSet",ir),ur=Object.create(null),cr=function(){function t(t,e,n,r){void 0===e&&(e=new Map),void 0===r&&(r=ft),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=t,this.values_=e,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new Y("ObservableObject.keys"),this.isPlainObject_=_(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(t){return this.values_.get(t).get()},e.setObservablePropValue_=function(t,e){var n=this.values_.get(t);if(n instanceof Vt)return n.set(e),!0;if(Rn(this)){var r=In(this,{type:Fn,object:this.proxy_||this.target_,name:t,newValue:e});if(!r)return null;e=r.newValue}if((e=n.prepareNewValue_(e))!==fe.UNCHANGED){var o=Ln(this),i=o?{type:Fn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:t,newValue:e}:null;0,n.setNewValue_(e),o&&Hn(this,i)}return!0},e.get_=function(t){return fe.trackingDerivation&&!T(this.target_,t)&&this.has_(t),this.target_[t]},e.set_=function(t,e,n){return void 0===n&&(n=!1),T(this.target_,t)?this.values_.has(t)?this.setObservablePropValue_(t,e):n?Reflect.set(this.target_,t,e):(this.target_[t]=e,!0):this.extend_(t,{value:e,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},e.has_=function(t){if(!fe.trackingDerivation)return t in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var e=this.pendingKeys_.get(t);return e||(e=new Yt(t in this.target_,$,"ObservableObject.key?",!1),this.pendingKeys_.set(t,e)),e.get()},e.make_=function(t,e){if(!0===e&&(e=this.defaultAnnotation_),!1!==e){if(hr(this,e,t),!(t in this.target_)){var n;if(null!=(n=this.target_[U])&&n[t])return;r(1,e.annotationType_,this.name_+"."+t.toString())}for(var o=this.target_;o&&o!==s;){var i=u(o,t);if(i){var a=e.make_(this,t,i,o);if(0===a)return;if(1===a)break}o=Object.getPrototypeOf(o)}pr(this,e,t)}},e.extend_=function(t,e,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(t,e,r);hr(this,n,t);var o=n.extend_(this,t,e,r);return o&&pr(this,n,t),o},e.defineProperty_=function(t,e,n){void 0===n&&(n=!1);try{ge();var r=this.delete_(t);if(!r)return r;if(Rn(this)){var o=In(this,{object:this.proxy_||this.target_,name:t,type:er,newValue:e.value});if(!o)return null;var i=o.newValue;e.value!==i&&(e=R({},e,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,t,e))return!1}else c(this.target_,t,e);this.notifyPropertyAddition_(t,e.value)}finally{be()}return!0},e.defineObservableProperty_=function(t,e,n,r){void 0===r&&(r=!1);try{ge();var o=this.delete_(t);if(!o)return o;if(Rn(this)){var i=In(this,{object:this.proxy_||this.target_,name:t,type:er,newValue:e});if(!i)return null;e=i.newValue}var a=fr(t),u={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,t,u))return!1}else c(this.target_,t,u);var s=new Yt(e,n,"ObservableObject.key",!1);this.values_.set(t,s),this.notifyPropertyAddition_(t,s.value_)}finally{be()}return!0},e.defineComputedProperty_=function(t,e,n){void 0===n&&(n=!1);try{ge();var r=this.delete_(t);if(!r)return r;if(Rn(this))if(!In(this,{object:this.proxy_||this.target_,name:t,type:er,newValue:void 0}))return null;e.name||(e.name="ObservableObject.key"),e.context=this.proxy_||this.target_;var o=fr(t),i={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!1,get:o.get,set:o.set};if(n){if(!Reflect.defineProperty(this.target_,t,i))return!1}else c(this.target_,t,i);this.values_.set(t,new Vt(e)),this.notifyPropertyAddition_(t,void 0)}finally{be()}return!0},e.delete_=function(t,e){if(void 0===e&&(e=!1),!T(this.target_,t))return!0;if(Rn(this)&&!In(this,{object:this.proxy_||this.target_,name:t,type:"remove"}))return null;try{var n,r;ge();var o,i=Ln(this),a=this.values_.get(t),c=void 0;if(!a&&i)c=null==(o=u(this.target_,t))?void 0:o.value;if(e){if(!Reflect.deleteProperty(this.target_,t))return!1}else delete this.target_[t];if(a&&(this.values_.delete(t),a instanceof Yt&&(c=a.value_),_e(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(t))||r.set(t in this.target_),i){var s={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:t};0,i&&Hn(this,s)}}finally{be()}return!0},e.observe_=function(t,e){return Bn(this,t)},e.intercept_=function(t){return Cn(this,t)},e.notifyPropertyAddition_=function(t,e){var n,r,o=Ln(this);if(o){var i=o?{type:er,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:t,newValue:e}:null;0,o&&Hn(this,i)}null==(n=this.pendingKeys_)||null==(r=n.get(t))||r.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),A(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function sr(t,e){var n;if(T(t,F))return t;var r=null!=(n=null==e?void 0:e.name)?n:"ObservableObject",o=new cr(t,new Map,String(r),function(t){var e;return t?null!=(e=t.defaultDecorator)?e:dt(t):void 0}(e));return E(t,F,o),t}var lr=x("ObservableObjectAdministration",cr);function fr(t){return ur[t]||(ur[t]={get:function(){return this[F].getObservablePropValue_(t)},set:function(e){return this[F].setObservablePropValue_(t,e)}})}function dr(t){return!!m(t)&&lr(t[F])}function pr(t,e,n){var r;null==(r=t.target_[U])||delete r[n]}function hr(t,e,n){}var yr,vr,gr=0,br=function(){};yr=br,vr=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(yr.prototype,vr):void 0!==yr.prototype.__proto__?yr.prototype.__proto__=vr:yr.prototype=vr;var mr=function(t,e,n){function r(e,n,r,o){var i;void 0===r&&(r="ObservableArray"),void 0===o&&(o=!1),i=t.call(this)||this;var a=new zn(r,n,o,!0);if(a.proxy_=L(i),w(L(i),F,a),e&&e.length){var u=Ut(!0);i.spliceWithArray(0,0,e),Xt(u)}return i}C(r,t);var o=r.prototype;return o.concat=function(){this[F].atom_.reportObserved();for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),e.map((function(t){return Qn(t)?t.slice():t})))},o[n]=function(){var t=this,e=0;return kr({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})},N(r,[{key:"length",get:function(){return this[F].getArrayLength_()},set:function(t){this[F].setArrayLength_(t)}},{key:e,get:function(){return"Array"}}]),r}(br,Symbol.toStringTag,Symbol.iterator);function _r(t){c(mr.prototype,""+t,function(t){return{enumerable:!1,configurable:!0,get:function(){return this[F].get_(t)},set:function(e){this[F].set_(t,e)}}}(t))}function Or(t){if(t>gr){for(var e=gr;e<t+100;e++)_r(e);gr=t}}function Er(t,e,n){return new mr(t,e,n)}function wr(t,e){if("object"==typeof t&&null!==t){if(Qn(t))return void 0!==e&&r(23),t[F].atom_;if(ar(t))return t[F];if(rr(t)){if(void 0===e)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||r(25,e,Sr(t)),n}if(dr(t)){if(!e)return r(26);var o=t[F].values_.get(e);return o||r(27,e,Sr(t)),o}if(z(t)||Wt(t)||je(t))return t}else if(g(t)&&je(t[F]))return t[F];r(28)}function xr(t,e){return t||r(29),void 0!==e?xr(wr(t,e)):z(t)||Wt(t)||je(t)||rr(t)||ar(t)?t:t[F]?t[F]:void r(24,t)}function Sr(t,e){var n;if(void 0!==e)n=wr(t,e);else{if(Ie(t))return t.name;n=dr(t)||rr(t)||ar(t)?xr(t):wr(t)}return n.name_}Object.entries(Wn).forEach((function(t){var e=t[0],n=t[1];"concat"!==e&&E(mr.prototype,e,n)})),Or(1e3);var jr=s.toString;function Pr(t,e,n){return void 0===n&&(n=-1),function t(e,n,r,o,i){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return!1;if(e!=e)return n!=n;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof n)return!1;var u=jr.call(e);if(u!==jr.call(n))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}e=Ar(e),n=Ar(n);var c="[object Array]"===u;if(!c){if("object"!=typeof e||"object"!=typeof n)return!1;var s=e.constructor,l=n.constructor;if(s!==l&&!(g(s)&&s instanceof s&&g(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);i=i||[];var f=(o=o||[]).length;for(;f--;)if(o[f]===e)return i[f]===n;if(o.push(e),i.push(n),c){if((f=e.length)!==n.length)return!1;for(;f--;)if(!t(e[f],n[f],r-1,o,i))return!1}else{var d,p=Object.keys(e);if(f=p.length,Object.keys(n).length!==f)return!1;for(;f--;)if(d=p[f],!T(n,d)||!t(e[d],n[d],r-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,n)}function Ar(t){return Qn(t)?t.slice():S(t)||rr(t)||j(t)||ar(t)?Array.from(t.entries()):t}function kr(t){return t[Symbol.iterator]=Tr,t}function Tr(){return this}["Symbol","Map","Set"].forEach((function(t){void 0===i()[t]&&r("MobX requires global '"+t+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Pe,extras:{getDebugName:Sr},$mobx:F})}.call(this,n(103))},function(t,e,n){var r=n(5),o=n(144),i=n(145),a=n(174),u=n(54),c=function(t){if(t&&t.forEach!==a)try{u(t,"forEach",a)}catch(e){t.forEach=a}};for(var s in o)o[s]&&c(r[s]&&r[s].prototype);c(i)},function(t,e,n){n(14)({target:"Object",stat:!0},{setPrototypeOf:n(92)})},function(t,e,n){var r=n(14),o=n(15),i=n(36),a=n(91),u=n(134);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,n){var r=n(14),o=n(43),i=n(73),a=n(194),u=n(153),c=n(30),s=n(31),l=n(51),f=n(15),d=o("Reflect","construct"),p=Object.prototype,h=[].push,y=f((function(){function t(){}return!(d((function(){}),[],t)instanceof t)})),v=!f((function(){d((function(){}))})),g=y||v;r({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){u(t),c(e);var n=arguments.length<3?t:u(arguments[2]);if(v&&!y)return d(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return i(h,r,e),new(i(a,t,r))}var o=n.prototype,f=l(s(o)?o:p),g=i(t,f,e);return s(g)?g:f}})},function(t,e){var n=Function.prototype,r=n.bind,o=n.call,i=r&&r.bind(o);t.exports=r?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,n){var r=n(5),o=n(48).f,i=n(54),a=n(41),u=n(105),c=n(131),s=n(90);t.exports=function(t,e){var n,l,f,d,p,h=t.target,y=t.global,v=t.stat;if(n=y?r:v?r[h]||u(h,{}):(r[h]||{}).prototype)for(l in e){if(d=e[l],f=t.noTargetGet?(p=o(n,l))&&p.value:n[l],!s(y?l:h+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;c(d,f)}(t.sham||f&&f.sham)&&i(d,"sham",!0),a(n,l,d,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var r=n(14),o=n(98);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,n){var r=n(14),o=n(36),i=n(63);r({target:"Object",stat:!0,forced:n(15)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,n){"use strict";var r=n(14),o=n(71).filter;r({target:"Array",proto:!0,forced:!n(72)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(14),o=n(15),i=n(37),a=n(48).f,u=n(34),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},function(t,e,n){var r=n(14),o=n(34),i=n(132),a=n(37),u=n(48),c=n(58);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=u.f,s=i(r),l={},f=0;s.length>f;)void 0!==(n=o(r,e=s[f++]))&&c(l,e,n);return l}})},function(t,e,n){var r=n(34),o=n(89).EXISTS,i=n(13),a=n(35).f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);r&&!o&&a(u,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},function(t,e,n){var r=n(14),o=n(185);r({target:"Array",stat:!0,forced:!n(115)((function(t){Array.from(t)}))},{from:o})},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(94),a=n(95),u=n(31),c=n(64),s=n(40),l=n(37),f=n(58),d=n(25),p=n(72),h=n(96),y=p("slice"),v=d("species"),g=o.Array,b=Math.max;r({target:"Array",proto:!0,forced:!y},{slice:function(t,e){var n,r,o,d=l(this),p=s(d),y=c(t,p),m=c(void 0===e?p:e,p);if(i(d)&&(n=d.constructor,(a(n)&&(n===g||i(n.prototype))||u(n)&&null===(n=n[v]))&&(n=void 0),n===g||void 0===n))return h(d,y,m);for(r=new(void 0===n?g:n)(b(m-y,0)),o=0;y<m;y++,o++)y in d&&f(r,o,d[y]);return r.length=o,r}})},,function(t,e,n){var r=n(5),o=n(79),i=n(32),a=n(80),u=n(106),c=n(125),s=o("wks"),l=r.Symbol,f=l&&l.for,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):d(e)}return s[t]}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(15),a=n(94),u=n(31),c=n(36),s=n(40),l=n(58),f=n(116),d=n(72),p=n(25),h=n(62),y=p("isConcatSpreadable"),v=o.TypeError,g=h>=51||!i((function(){var t=[];return t[y]=!1,t.concat()[0]!==t})),b=d("concat"),m=function(t){if(!u(t))return!1;var e=t[y];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,forced:!g||!b},{concat:function(t){var e,n,r,o,i,a=c(this),u=f(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(m(i=-1===e?a:arguments[e])){if(d+(o=s(i))>9007199254740991)throw v("Maximum allowed index exceeded");for(n=0;n<o;n++,d++)n in i&&l(u,d,i[n])}else{if(d>=9007199254740991)throw v("Maximum allowed index exceeded");l(u,d++,i)}return u.length=d,u}})},function(t,e,n){var r=n(14),o=n(196);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,n){"use strict";var r=n(101),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},function(t,e,n){var r=n(5),o=n(31),i=r.String,a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},function(t,e,n){var r=n(26);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},function(t,e,n){var r=n(13),o=n(36),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e){var n=Function.prototype.call;t.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},function(t,e,n){var r=n(15);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(5),o=n(34),i=n(126),a=n(30),u=n(82),c=r.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,n){if(a(t),e=u(e),a(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(5),o=n(42),i=r.Object;t.exports=function(t){return i(o(t))}},function(t,e,n){var r=n(77),o=n(42);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(5),o=n(93),i=r.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){"use strict";var r=n(14),o=n(71).map;r({target:"Array",proto:!0,forced:!n(72)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(85);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(5),o=n(26),i=n(32),a=n(54),u=n(105),c=n(87),s=n(53),l=n(89).CONFIGURABLE,f=s.get,d=s.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var s,f=!!c&&!!c.unsafe,h=!!c&&!!c.enumerable,y=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||l&&n.name!==v)&&a(n,"name",v),(s=d(n)).source||(s.source=p.join("string"==typeof v?v:""))),t!==r?(f?!y&&t[e]&&(h=!0):delete t[e],h?t[e]=n:a(t,e,n)):h?t[e]=n:u(e,n)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||c(this)}))},function(t,e,n){var r=n(5).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},function(t,e,n){var r=n(5),o=n(26),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(14),o=n(33),i=n(31),a=n(30),u=n(195),c=n(48),s=n(91);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,l,f=arguments.length<3?e:arguments[2];return a(e)===f?e[n]:(r=c.f(e,n))?u(r)?r.value:void 0===r.get?void 0:o(r.get,f):i(l=s(e))?t(l,n,f):void 0}})},function(t,e,n){"use strict";(function(t){var r=n(29),o=n(161),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?r.a.Buffer:void 0,c=(u?u.isBuffer:void 0)||o.a;e.a=c}).call(this,n(118)(t))},function(t,e,n){"use strict";(function(t){var r=n(101),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.a.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=u}).call(this,n(118)(t))},function(t,e,n){var r=n(13),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,n){var r=n(34),o=n(33),i=n(88),a=n(68),u=n(37),c=n(82),s=n(32),l=n(126),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=u(t),e=c(e),l)try{return f(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},function(t,e,n){var r=n(14),o=n(209).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,n){var r=n(43);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r,o=n(30),i=n(163),a=n(107),u=n(66),c=n(130),s=n(81),l=n(86),f=l("IE_PROTO"),d=function(){},p=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;y="undefined"!=typeof document?document.domain&&r?h(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):h(r);for(var n=a.length;n--;)delete y.prototype[a[n]];return y()};u[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=o(t),n=new d,d.prototype=null,n[f]=t):n=y(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(5),o=n(26),i=n(84),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},function(t,e,n){var r,o,i,a=n(165),u=n(5),c=n(13),s=n(31),l=n(54),f=n(32),d=n(104),p=n(86),h=n(66),y=u.TypeError,v=u.WeakMap;if(a||d.state){var g=d.state||(d.state=new v),b=c(g.get),m=c(g.has),_=c(g.set);r=function(t,e){if(m(g,t))throw new y("Object already initialized");return e.facade=t,_(g,t,e),e},o=function(t){return b(g,t)||{}},i=function(t){return m(g,t)}}else{var O=p("state");h[O]=!0,r=function(t,e){if(f(t,O))throw new y("Object already initialized");return e.facade=t,l(t,O,e),e},o=function(t){return f(t,O)?t[O]:{}},i=function(t){return f(t,O)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(34),o=n(35),i=n(68);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(13);t.exports=r({}.isPrototypeOf)},function(t,e,n){var r=n(52);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},function(t,e,n){"use strict";n(168)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(172))},function(t,e,n){"use strict";var r=n(82),o=n(35),i=n(68);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},function(t,e,n){var r=n(13),o=n(52),i=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(14),o=n(210),i=n(78);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e){t.exports=!1},function(t,e,n){var r,o,i=n(5),a=n(50),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,l=s&&s.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){var r=n(128),o=n(107);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(65),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?r:n)(e)}},function(t,e){t.exports={}},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(128),o=n(107).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(35).f,o=n(32),i=n(25)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(59),o=n(13),i=n(77),a=n(36),u=n(40),c=n(116),s=o([].push),l=function(t){var e=1==t,n=2==t,o=3==t,l=4==t,f=6==t,d=7==t,p=5==t||f;return function(h,y,v,g){for(var b,m,_=a(h),O=i(_),E=r(y,v),w=u(O),x=0,S=g||c,j=e?S(h,w):n||d?S(h,0):void 0;w>x;x++)if((p||x in O)&&(m=E(b=O[x],x,_),t))if(e)j[x]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return x;case 2:s(j,b)}else switch(t){case 4:return!1;case 7:s(j,b)}return f?-1:o||l?l:j}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,n){var r=n(15),o=n(25),i=n(62),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e){var n=Function.prototype,r=n.apply,o=n.bind,i=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(r):function(){return i.apply(r,arguments)})},function(t,e,n){"use strict";var r=n(73),o=n(33),i=n(13),a=n(119),u=n(150),c=n(30),s=n(42),l=n(152),f=n(120),d=n(85),p=n(38),h=n(56),y=n(110),v=n(121),g=n(98),b=n(151),m=n(15),_=b.UNSUPPORTED_Y,O=Math.min,E=[].push,w=i(/./.exec),x=i(E),S=i("".slice);a("split",(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=p(s(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[i];if(!u(t))return o(e,i,t,a);for(var c,l,f,d=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,b=new RegExp(t.source,h+"g");(c=o(g,b,i))&&!((l=b.lastIndex)>v&&(x(d,S(i,v,c.index)),c.length>1&&c.index<i.length&&r(E,d,y(c,1)),f=c[0].length,v=l,d.length>=a));)b.lastIndex===c.index&&b.lastIndex++;return v===i.length?!f&&w(b,"")||x(d,""):x(d,S(i,v)),d.length>a?y(d,0,a):d}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:o(e,this,t,n)}:e,[function(e,n){var r=s(this),a=null==e?void 0:h(e,t);return a?o(a,e,r,n):o(i,p(r),e,n)},function(t,r){var o=c(this),a=p(t),u=n(i,o,a,r,i!==e);if(u.done)return u.value;var s=l(o,RegExp),h=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(_?"g":"y"),g=new s(_?"^(?:"+o.source+")":o,y),b=void 0===r?4294967295:r>>>0;if(0===b)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var m=0,E=0,w=[];E<a.length;){g.lastIndex=_?0:E;var j,P=v(g,_?S(a,E):a);if(null===P||(j=O(d(g.lastIndex+(_?E:0)),a.length))===m)E=f(a,E,h);else{if(x(w,S(a,m,E)),w.length===b)return w;for(var A=1;A<=P.length-1;A++)if(x(w,P[A]),w.length===b)return w;E=m=j}}return x(w,S(a,m)),w}]}),!!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),_)},function(t,e,n){"use strict";var r=n(34),o=n(5),i=n(13),a=n(90),u=n(41),c=n(32),s=n(140),l=n(55),f=n(83),d=n(127),p=n(15),h=n(69).f,y=n(48).f,v=n(35).f,g=n(192),b=n(154).trim,m=o.Number,_=m.prototype,O=o.TypeError,E=i("".slice),w=i("".charCodeAt),x=function(t){var e=d(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,n,r,o,i,a,u,c,s=d(t,"number");if(f(s))throw O("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=w(s,0))||45===e){if(88===(n=w(s,2))||120===n)return NaN}else if(48===e){switch(w(s,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=E(s,2)).length,u=0;u<a;u++)if((c=w(i,u))<48||c>o)return NaN;return parseInt(i,r)}return+s};if(a("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var j,P=function(t){var e=arguments.length<1?0:m(x(t)),n=this;return l(_,n)&&p((function(){g(n)}))?s(Object(e),n,P):e},A=r?h(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),k=0;A.length>k;k++)c(m,j=A[k])&&!c(P,j)&&v(P,j,y(m,j));P.prototype=_,_.constructor=P,u(o,"Number",P)}},function(t,e,n){n(14)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(5),o=n(13),i=n(15),a=n(47),u=r.Object,c=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):u(t)}:u},function(t,e,n){var r=n(25),o=n(51),i=n(35),a=r("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,e,n){var r=n(61),o=n(104);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(13),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e,n){var r=n(5),o=n(31),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(127),o=n(83);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e,n){var r=n(5),o=n(43),i=n(26),a=n(55),u=n(125),c=r.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},function(t,e,n){var r=n(5).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,e,n){var r=n(65),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(79),o=n(80),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(13),o=n(26),i=n(104),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(34),o=n(32),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},function(t,e,n){var r=n(15),o=n(26),i=/#|\.prototype\./,a=function(t,e){var n=c[u(t)];return n==l||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},function(t,e,n){var r=n(5),o=n(32),i=n(26),a=n(36),u=n(86),c=n(134),s=u("IE_PROTO"),l=r.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof l?f:null}},function(t,e,n){var r=n(13),o=n(30),i=n(167);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},function(t,e,n){var r=n(5),o=n(113),i=n(26),a=n(47),u=n(25)("toStringTag"),c=r.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?n:s?a(e):"Object"==(r=a(e))&&i(e.callee)?"Arguments":r}},function(t,e,n){var r=n(47);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(13),o=n(15),i=n(26),a=n(93),u=n(43),c=n(87),s=function(){},l=[],f=u("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=r(d.exec),h=!d.exec(s),y=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}};t.exports=!f||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!p(d,c(t))}:y},function(t,e,n){var r=n(13);t.exports=r([].slice)},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(64),a=n(65),u=n(40),c=n(36),s=n(116),l=n(58),f=n(72)("splice"),d=o.TypeError,p=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,o,f,y,v,g=c(this),b=u(g),m=i(t,b),_=arguments.length;if(0===_?n=r=0:1===_?(n=0,r=b-m):(n=_-2,r=h(p(a(e),0),b-m)),b+n-r>9007199254740991)throw d("Maximum allowed length exceeded");for(o=s(g,r),f=0;f<r;f++)(y=m+f)in g&&l(o,f,g[y]);if(o.length=r,n<r){for(f=m;f<b-r;f++)v=f+n,(y=f+r)in g?g[v]=g[y]:delete g[v];for(f=b;f>b-r+n;f--)delete g[f-1]}else if(n>r)for(f=b-r;f>m;f--)v=f+n-1,(y=f+r-1)in g?g[v]=g[y]:delete g[v];for(f=0;f<n;f++)g[f+m]=arguments[f+2];return g.length=b-r+n,o}})},function(t,e,n){"use strict";var r,o,i=n(33),a=n(13),u=n(38),c=n(187),s=n(151),l=n(79),f=n(51),d=n(53).get,p=n(188),h=n(189),y=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,b=a("".charAt),m=a("".indexOf),_=a("".replace),O=a("".slice),E=(o=/b*/g,i(v,r=/a/,"a"),i(v,o,"a"),0!==r.lastIndex||0!==o.lastIndex),w=s.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(E||x||w||p||h)&&(g=function(t){var e,n,r,o,a,s,l,p=this,h=d(p),S=u(t),j=h.raw;if(j)return j.lastIndex=p.lastIndex,e=i(g,j,S),p.lastIndex=j.lastIndex,e;var P=h.groups,A=w&&p.sticky,k=i(c,p),T=p.source,D=0,M=S;if(A&&(k=_(k,"y",""),-1===m(k,"g")&&(k+="g"),M=O(S,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(S,p.lastIndex-1))&&(T="(?: "+T+")",M=" "+M,D++),n=new RegExp("^(?:"+T+")",k)),x&&(n=new RegExp("^"+T+"$(?!\\s)",k)),E&&(r=p.lastIndex),o=i(v,A?n:p,M),A?o?(o.input=O(o.input,D),o[0]=O(o[0],D),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:E&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),x&&o&&o.length>1&&i(y,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&P)for(o.groups=s=f(null),a=0;a<P.length;a++)s[(l=P[a])[0]]=o[l[1]];return o}),t.exports=g},function(t,e,n){"use strict";var r=n(14),o=n(13),i=n(77),a=n(37),u=n(117),c=o([].join),s=i!=Object,l=u("join",",");r({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(a(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(14),o=n(197);r({target:"String",proto:!0,forced:n(198)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(103))},function(t,e,n){"use strict";(function(t){var r=n(29),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.a.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(118)(t))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(5),o=n(105),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(5),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(62),o=n(15);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){"use strict";var r=n(14),o=n(33),i=n(61),a=n(89),u=n(26),c=n(166),s=n(91),l=n(92),f=n(70),d=n(54),p=n(41),h=n(25),y=n(67),v=n(133),g=a.PROPER,b=a.CONFIGURABLE,m=v.IteratorPrototype,_=v.BUGGY_SAFARI_ITERATORS,O=h("iterator"),E=function(){return this};t.exports=function(t,e,n,a,h,v,w){c(n,e,a);var x,S,j,P=function(t){if(t===h&&M)return M;if(!_&&t in T)return T[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",k=!1,T=t.prototype,D=T[O]||T["@@iterator"]||h&&T[h],M=!_&&D||P(h),N="Array"==e&&T.entries||D;if(N&&(x=s(N.call(new t)))!==Object.prototype&&x.next&&(i||s(x)===m||(l?l(x,m):u(x[O])||p(x,O,E)),f(x,A,!0,!0),i&&(y[A]=E)),g&&"values"==h&&D&&"values"!==D.name&&(!i&&b?d(T,"name","values"):(k=!0,M=function(){return o(D,this)})),h)if(S={values:P("values"),keys:v?M:P("keys"),entries:P("entries")},w)for(j in S)(_||k||!(j in T))&&p(T,j,S[j]);else r({target:e,proto:!0,forced:_||k},S);return i&&!w||T[O]===M||p(T,O,M,{name:h}),y[e]=M,S}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(5),o=n(64),i=n(40),a=n(58),u=r.Array,c=Math.max;t.exports=function(t,e,n){for(var r=i(t),s=o(e,r),l=o(void 0===n?r:n,r),f=u(c(l-s,0)),d=0;s<l;s++,d++)a(f,d,t[s]);return f.length=d,f}},function(t,e,n){var r=n(5),o=n(59),i=n(33),a=n(30),u=n(84),c=n(137),s=n(40),l=n(55),f=n(138),d=n(112),p=n(139),h=r.TypeError,y=function(t,e){this.stopped=t,this.result=e},v=y.prototype;t.exports=function(t,e,n){var r,g,b,m,_,O,E,w=n&&n.that,x=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_ITERATOR),j=!(!n||!n.INTERRUPTED),P=o(e,w),A=function(t){return r&&p(r,"normal",t),new y(!0,t)},k=function(t){return x?(a(t),j?P(t[0],t[1],A):P(t[0],t[1])):j?P(t,A):P(t)};if(S)r=t;else{if(!(g=d(t)))throw h(u(t)+" is not iterable");if(c(g)){for(b=0,m=s(t);m>b;b++)if((_=k(t[b]))&&l(v,_))return _;return new y(!1)}r=f(t,g)}for(O=r.next;!(E=i(O,r)).done;){try{_=k(E.value)}catch(t){p(r,"throw",t)}if("object"==typeof _&&_&&l(v,_))return _}return new y(!1)}},function(t,e,n){var r=n(93),o=n(56),i=n(67),a=n(25)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[r(t)]}},function(t,e,n){var r={};r[n(25)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(5),o=n(55),i=r.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,n){var r=n(25)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){var r=n(175);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},function(t,e,n){"use strict";var r=n(15);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n(16);var r=n(13),o=n(41),i=n(98),a=n(15),u=n(25),c=n(54),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var d=u(t),p=!a((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),h=p&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return e=!0,null},n[d](""),!e}));if(!p||!h||n){var y=r(/./[d]),v=e(d,""[t],(function(t,e,n,o,a){var u=r(t),c=e.exec;return c===i||c===l.exec?p&&!a?{done:!0,value:y(e,n,o)}:{done:!0,value:u(n,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(l,d,v[1])}f&&c(l[d],"sham",!0)}},function(t,e,n){"use strict";var r=n(143).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(5),o=n(33),i=n(30),a=n(26),u=n(47),c=n(98),s=r.TypeError;t.exports=function(t,e){var n=t.exec;if(a(n)){var r=o(n,t,e);return null!==r&&i(r),r}if("RegExp"===u(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},function(t,e,n){"use strict";var r=n(73),o=n(33),i=n(13),a=n(119),u=n(15),c=n(30),s=n(26),l=n(65),f=n(85),d=n(38),p=n(42),h=n(120),y=n(56),v=n(193),g=n(121),b=n(25)("replace"),m=Math.max,_=Math.min,O=i([].concat),E=i([].push),w=i("".indexOf),x=i("".slice),S="$0"==="a".replace(/./,"$0"),j=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,n){var i=j?"$":"$0";return[function(t,n){var r=p(this),i=null==t?void 0:y(t,b);return i?o(i,t,r,n):o(e,d(r),t,n)},function(t,o){var a=c(this),u=d(t);if("string"==typeof o&&-1===w(o,i)&&-1===w(o,"$<")){var p=n(e,a,u,o);if(p.done)return p.value}var y=s(o);y||(o=d(o));var b=a.global;if(b){var S=a.unicode;a.lastIndex=0}for(var j=[];;){var P=g(a,u);if(null===P)break;if(E(j,P),!b)break;""===d(P[0])&&(a.lastIndex=h(u,f(a.lastIndex),S))}for(var A,k="",T=0,D=0;D<j.length;D++){for(var M=d((P=j[D])[0]),N=m(_(l(P.index),u.length),0),R=[],C=1;C<P.length;C++)E(R,void 0===(A=P[C])?A:String(A));var I=P.groups;if(y){var L=O([M],R,N,u);void 0!==I&&E(L,I);var B=d(r(o,void 0,L))}else B=v(M,u,N,R,I,o);N>=T&&(k+=x(u,T,N)+B,T=N+M.length)}return k+x(u,T)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!S||j)},function(t,e,n){var r=n(47),o=n(5);t.exports="process"==r(o.process)},function(t,e,n){n(14)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(106);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(34),o=n(15),i=n(81);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(5),o=n(33),i=n(31),a=n(83),u=n(56),c=n(164),s=n(25),l=r.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,r=u(t,f);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,n){var r=n(13),o=n(32),i=n(37),a=n(129).indexOf,u=n(66),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,l=[];for(n in r)!o(u,n)&&o(r,n)&&c(l,n);for(;e.length>s;)o(r,n=e[s++])&&(~a(l,n)||c(l,n));return l}},function(t,e,n){var r=n(37),o=n(64),i=n(40),a=function(t){return function(e,n,a){var u,c=r(e),s=i(c),l=o(a,s);if(t&&n!=n){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(43);t.exports=r("document","documentElement")},function(t,e,n){var r=n(32),o=n(132),i=n(48),a=n(35);t.exports=function(t,e){for(var n=o(e),u=a.f,c=i.f,s=0;s<n.length;s++){var l=n[s];r(t,l)||u(t,l,c(e,l))}}},function(t,e,n){var r=n(43),o=n(13),i=n(69),a=n(109),u=n(30),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(u(t)),n=a.f;return n?c(e,n(t)):e}},function(t,e,n){"use strict";var r,o,i,a=n(15),u=n(26),c=n(51),s=n(91),l=n(41),f=n(25),d=n(61),p=f("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):h=!0),null==r||a((function(){var t={};return r[p].call(t)!==t}))?r={}:d&&(r=c(r)),u(r[p])||l(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(t,e,n){var r=n(15);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(14),o=n(13),i=n(66),a=n(31),u=n(32),c=n(35).f,s=n(69),l=n(136),f=n(169),d=n(80),p=n(171),h=!1,y=d("meta"),v=0,g=function(t){c(t,y,{value:{objectID:"O"+v++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},h=!0;var t=s.f,e=o([].splice),n={};n[y]=1,t(n).length&&(s.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===y){e(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,y)){if(!f(t))return"F";if(!e)return"E";g(t)}return t[y].objectID},getWeakData:function(t,e){if(!u(t,y)){if(!f(t))return!0;if(!e)return!1;g(t)}return t[y].weakData},onFreeze:function(t){return p&&h&&f(t)&&!u(t,y)&&g(t),t}};i[y]=!0},function(t,e,n){var r=n(47),o=n(37),i=n(69).f,a=n(110),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"==r(t)?function(t){try{return i(t)}catch(t){return a(u)}}(t):i(o(t))}},function(t,e,n){var r=n(25),o=n(67),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,n){var r=n(5),o=n(33),i=n(52),a=n(30),u=n(84),c=n(112),s=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return a(o(n,t));throw s(u(t)+" is not iterable")}},function(t,e,n){var r=n(33),o=n(30),i=n(56);t.exports=function(t,e,n){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw n;if(u)throw a;return o(a),n}},function(t,e,n){var r=n(26),o=n(31),i=n(92);t.exports=function(t,e,n){var a,u;return i&&r(a=e.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(t,u),t}},function(t,e,n){var r=n(41);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(43),o=n(35),i=n(25),a=n(34),u=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[u]&&n(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(13),o=n(65),i=n(38),a=n(42),u=r("".charAt),c=r("".charCodeAt),s=r("".slice),l=function(t){return function(e,n){var r,l,f=i(a(e)),d=o(n),p=f.length;return d<0||d>=p?t?"":void 0:(r=c(f,d))<55296||r>56319||d+1===p||(l=c(f,d+1))<56320||l>57343?t?u(f,d):r:t?s(f,d,d+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){var r=n(81)("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,n){var r=n(25);e.f=r},function(t,e,n){var r=n(176),o=n(32),i=n(146),a=n(35).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},function(t,e,n){"use strict";var r=n(14),o=n(129).includes,i=n(78);r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,n){"use strict";var r=n(14),o=n(13),i=n(183),a=n(42),u=n(38),c=n(184),s=o("".indexOf);r({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(u(a(this)),u(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(31),o=n(47),i=n(25)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(15),o=n(5).RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),u=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:i}},function(t,e,n){var r=n(30),o=n(153),i=n(25)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(5),o=n(95),i=n(84),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},function(t,e,n){var r=n(13),o=n(42),i=n(38),a=n(155),u=r("".replace),c="["+a+"]",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t){return function(e){var n=i(o(e));return 1&t&&(n=u(n,s,"")),2&t&&(n=u(n,l,"")),n}};t.exports={start:f(1),end:f(2),trim:f(3)}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(33),o=n(119),i=n(30),a=n(85),u=n(38),c=n(42),s=n(56),l=n(120),f=n(121);o("match",(function(t,e,n){return[function(e){var n=c(this),o=null==e?void 0:s(e,t);return o?r(o,e,n):new RegExp(e)[t](u(n))},function(t){var r=i(this),o=u(t),c=n(e,r,o);if(c.done)return c.value;if(!r.global)return f(r,o);var s=r.unicode;r.lastIndex=0;for(var d,p=[],h=0;null!==(d=f(r,o));){var y=u(d[0]);p[h]=y,""===y&&(r.lastIndex=l(o,a(r.lastIndex),s)),h++}return 0===h?null:p}]}))},function(t,e,n){var r,o,i,a,u=n(5),c=n(73),s=n(59),l=n(26),f=n(32),d=n(15),p=n(130),h=n(96),y=n(81),v=n(158),g=n(123),b=u.setImmediate,m=u.clearImmediate,_=u.process,O=u.Dispatch,E=u.Function,w=u.MessageChannel,x=u.String,S=0,j={};try{r=u.location}catch(t){}var P=function(t){if(f(j,t)){var e=j[t];delete j[t],e()}},A=function(t){return function(){P(t)}},k=function(t){P(t.data)},T=function(t){u.postMessage(x(t),r.protocol+"//"+r.host)};b&&m||(b=function(t){var e=h(arguments,1);return j[++S]=function(){c(l(t)?t:E(t),void 0,e)},o(S),S},m=function(t){delete j[t]},g?o=function(t){_.nextTick(A(t))}:O&&O.now?o=function(t){O.now(A(t))}:w&&!v?(a=(i=new w).port2,i.port1.onmessage=k,o=s(a.postMessage,a)):u.addEventListener&&l(u.postMessage)&&!u.importScripts&&r&&"file:"!==r.protocol&&!d(T)?(o=T,u.addEventListener("message",k,!1)):o="onreadystatechange"in y("script")?function(t){p.appendChild(y("script")).onreadystatechange=function(){p.removeChild(this),P(t)}}:function(t){setTimeout(A(t),0)}),t.exports={set:b,clear:m}},function(t,e,n){var r=n(50);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,e,n){"use strict";var r=n(52),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},function(t){t.exports=JSON.parse('{"a":"1.2.0-alpha.4"}')},function(t,e,n){"use strict";e.a=function(){return!1}},function(t,e,n){var r;!function(o,i,a){if(o){for(var u,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},d=1;d<20;++d)c[111+d]="f"+d;for(d=0;d<=9;++d)c[d+96]=d.toString();b.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},b.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},b.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},b.prototype.reset=function(){return this._callbacks={},this._directMap={},this},b.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==i&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},b.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},b.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},b.init=function(){var t=b(i);for(var e in t)"_"!==e.charAt(0)&&(b[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},b.init(),o.Mousetrap=b,t.exports&&(t.exports=b),void 0===(r=function(){return b}.call(e,n,e,t))||(t.exports=r)}function p(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:s[t.which]?s[t.which]:String.fromCharCode(t.which).toLowerCase()}function y(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!u)for(var t in u={},c)t>95&&t<112||c.hasOwnProperty(t)&&(u[c[t]]=t);return u}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,o,i=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<n.length;++o)r=n[o],f[r]&&(r=f[r]),e&&"keypress"!=e&&l[r]&&(r=l[r],i.push("shift")),y(r)&&i.push(r);return{key:r,modifiers:i,action:e=v(r,i,e)}}function b(t){var e=this;if(t=t||i,!(e instanceof b))return new b(t);e.target=t,e._callbacks={},e._directMap={};var n,r={},o=!1,a=!1,u=!1;function c(t){t=t||{};var e,n=!1;for(e in r)t[e]?n=!0:r[e]=0;n||(u=!1)}function s(t,n,o,i,a,u){var c,s,l,f,d=[],p=o.type;if(!e._callbacks[t])return[];for("keyup"==p&&y(t)&&(n=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||r[s.seq]==s.level)&&p==s.action&&("keypress"==p&&!o.metaKey&&!o.ctrlKey||(l=n,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var h=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(h||v)&&e._callbacks[t].splice(c,1),d.push(s)}return d}function l(t,n,r,o){e.stopCallback(n,n.target||n.srcElement,r,o)||!1===t(n,r)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(n),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(n))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var n=h(t);n&&("keyup"!=t.type||o!==n?e.handleKey(n,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function d(t,e,i,a){function s(e){return function(){u=e,++r[t],clearTimeout(n),n=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==a&&(o=h(e)),setTimeout(c,10)}r[t]=0;for(var d=0;d<e.length;++d){var p=d+1===e.length?f:s(a||g(e[d+1]).action);v(e[d],p,a,t,d)}}function v(t,n,r,o,i){e._directMap[t+":"+r]=n;var a,u=(t=t.replace(/\s+/g," ")).split(" ");u.length>1?d(t,u,n,r):(a=g(t,r),e._callbacks[a.key]=e._callbacks[a.key]||[],s(a.key,a.modifiers,{type:a.action},o,t,i),e._callbacks[a.key][o?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,n){var r,o=s(t,e,n),i={},f=0,d=!1;for(r=0;r<o.length;++r)o[r].seq&&(f=Math.max(f,o[r].level));for(r=0;r<o.length;++r)if(o[r].seq){if(o[r].level!=f)continue;d=!0,i[o[r].seq]=1,l(o[r].callback,n,o[r].combo,o[r].seq)}else d||l(o[r].callback,n,o[r].combo);var p="keypress"==n.type&&a;n.type!=u||y(t)||p||c(i),a=d&&"keydown"==n.type},e._bindMultiple=function(t,e,n){for(var r=0;r<t.length;++r)v(t[r],e,n)},p(t,"keypress",f),p(t,"keydown",f),p(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,n){var r=n(34),o=n(35),i=n(30),a=n(37),u=n(63);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=u(e),s=c.length,l=0;s>l;)o.f(t,n=c[l++],r[n]);return t}},function(t,e,n){var r=n(5),o=n(33),i=n(26),a=n(31),u=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!a(r=o(n,t)))return r;if(i(n=t.valueOf)&&!a(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!a(r=o(n,t)))return r;throw u("Can't convert object to primitive value")}},function(t,e,n){var r=n(5),o=n(26),i=n(87),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,n){"use strict";var r=n(133).IteratorPrototype,o=n(51),i=n(68),a=n(70),u=n(67),c=function(){return this};t.exports=function(t,e,n,s){var l=e+" Iterator";return t.prototype=o(r,{next:i(+!s,n)}),a(t,l,!1,!0),u[l]=c,t}},function(t,e,n){var r=n(5),o=n(26),i=r.String,a=r.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(13),a=n(90),u=n(41),c=n(135),s=n(111),l=n(114),f=n(26),d=n(31),p=n(15),h=n(115),y=n(70),v=n(140);t.exports=function(t,e,n){var g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),m=g?"set":"add",_=o[t],O=_&&_.prototype,E=_,w={},x=function(t){var e=i(O[t]);u(O,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(a(t,!f(_)||!(b||O.forEach&&!p((function(){(new _).entries().next()})))))E=n.getConstructor(e,t,g,m),c.enable();else if(a(t,!0)){var S=new E,j=S[m](b?{}:-0,1)!=S,P=p((function(){S.has(1)})),A=h((function(t){new _(t)})),k=!b&&p((function(){for(var t=new _,e=5;e--;)t[m](e,e);return!t.has(-0)}));A||((E=e((function(t,e){l(t,O);var n=v(new _,t,E);return null!=e&&s(e,n[m],{that:n,AS_ENTRIES:g}),n}))).prototype=O,O.constructor=E),(P||k)&&(x("delete"),x("has"),g&&x("get")),(k||j)&&x(m),b&&O.clear&&delete O.clear}return w[t]=E,r({global:!0,forced:E!=_},w),y(E,t),b||n.setStrong(E,t,g),E}},function(t,e,n){var r=n(15),o=n(31),i=n(47),a=n(170),u=Object.isExtensible,c=r((function(){u(1)}));t.exports=c||a?function(t){return!!o(t)&&((!a||"ArrayBuffer"!=i(t))&&(!u||u(t)))}:u},function(t,e,n){var r=n(15);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e,n){var r=n(15);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){"use strict";var r=n(35).f,o=n(51),i=n(141),a=n(59),u=n(114),c=n(111),s=n(108),l=n(142),f=n(34),d=n(135).fastKey,p=n(53),h=p.set,y=p.getterFor;t.exports={getConstructor:function(t,e,n,s){var l=t((function(t,r){u(t,p),h(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=r&&c(r,t[s],{that:t,AS_ENTRIES:n})})),p=l.prototype,v=y(e),g=function(t,e,n){var r,o,i=v(t),a=b(t,e);return a?a.value=n:(i.last=a={index:o=d(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),f?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var n,r=v(t),o=d(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(p,{clear:function(){for(var t=v(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=v(this),n=b(this,t);if(n){var r=n.next,o=n.previous;delete e.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),e.first==n&&(e.first=r),e.last==n&&(e.last=o),f?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=v(this),r=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(p,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),f&&r(p,"size",{get:function(){return v(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",o=y(e),i=y(r);s(t,e,(function(t,e){h(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(113),o=n(93);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,n){"use strict";var r=n(71).forEach,o=n(117)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var r=n(5),o=n(94),i=n(95),a=n(31),u=n(25)("species"),c=r.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||a(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?c:e}},function(t,e,n){var r=n(5);t.exports=r},function(t,e,n){"use strict";var r=n(14),o=n(13),i=n(52),a=n(36),u=n(40),c=n(38),s=n(15),l=n(178),f=n(117),d=n(179),p=n(180),h=n(62),y=n(181),v=[],g=o(v.sort),b=o(v.push),m=s((function(){v.sort(void 0)})),_=s((function(){v.sort(null)})),O=f("sort"),E=!s((function(){if(h)return h<70;if(!(d&&d>3)){if(p)return!0;if(y)return y<603;var t,e,n,r,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)v.push({k:e+r,v:n})}for(v.sort((function(t,e){return e.v-t.v})),r=0;r<v.length;r++)e=v[r].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:m||!_||!O||!E},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(E)return void 0===t?g(e):g(e,t);var n,r,o=[],s=u(e);for(r=0;r<s;r++)r in e&&b(o,e[r]);for(l(o,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=o.length,r=0;r<n;)e[r]=o[r++];for(;r<s;)delete e[r++];return e}})},function(t,e,n){var r=n(110),o=Math.floor,i=function(t,e){var n=t.length,c=o(n/2);return n<8?a(t,e):u(t,i(r(t,0,c),e),i(r(t,c),e),e)},a=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},u=function(t,e,n,r){for(var o=e.length,i=n.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?r(e[a],n[u])<=0?e[a++]:n[u++]:a<o?e[a++]:n[u++];return t};t.exports=i},function(t,e,n){var r=n(50).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},function(t,e,n){var r=n(50);t.exports=/MSIE|Trident/.test(r)},function(t,e,n){var r=n(50).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},function(t,e,n){"use strict";var r=n(14),o=n(71).find,i=n(78),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(t,e,n){var r=n(5),o=n(150),i=r.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(25)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){"use strict";var r=n(5),o=n(59),i=n(33),a=n(36),u=n(186),c=n(137),s=n(95),l=n(40),f=n(58),d=n(138),p=n(112),h=r.Array;t.exports=function(t){var e=a(t),n=s(this),r=arguments.length,y=r>1?arguments[1]:void 0,v=void 0!==y;v&&(y=o(y,r>2?arguments[2]:void 0));var g,b,m,_,O,E,w=p(e),x=0;if(!w||this==h&&c(w))for(g=l(e),b=n?new this(g):h(g);g>x;x++)E=v?y(e[x],x):e[x],f(b,x,E);else for(O=(_=d(e,w)).next,b=n?new this:[];!(m=i(O,_)).done;x++)E=v?u(_,y,[m.value,x],!0):m.value,f(b,x,E);return b.length=x,b}},function(t,e,n){var r=n(30),o=n(139);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},function(t,e,n){"use strict";var r=n(30);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(15),o=n(5).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){var r=n(15),o=n(5).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,n){"use strict";var r=n(14),o=n(154).trim;r({target:"String",proto:!0,forced:n(191)("trim")},{trim:function(){return o(this)}})},function(t,e,n){var r=n(89).PROPER,o=n(15),i=n(155);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||r&&i[t].name!==t}))}},function(t,e,n){var r=n(13);t.exports=r(1..valueOf)},function(t,e,n){var r=n(13),o=n(36),i=Math.floor,a=r("".charAt),u=r("".replace),c=r("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,f,d){var p=n+t.length,h=r.length,y=l;return void 0!==f&&(f=o(f),y=s),u(d,y,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,p);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>h){var d=i(l/10);return 0===d?o:d<=h?void 0===r[d-1]?a(u,1):r[d-1]+a(u,1):o}s=r[l-1]}return void 0===s?"":s}))}},function(t,e,n){"use strict";var r=n(5),o=n(13),i=n(52),a=n(31),u=n(32),c=n(96),s=r.Function,l=o([].concat),f=o([].join),d={},p=function(t,e,n){if(!u(d,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";d[e]=s("C,a","return new C("+f(r,",")+")")}return d[e](t,n)};t.exports=s.bind||function(t){var e=i(this),n=e.prototype,r=c(arguments,1),o=function(){var n=l(r,c(arguments));return this instanceof o?p(e,n.length,n):e.apply(t,n)};return a(n)&&(o.prototype=n),o}},function(t,e,n){var r=n(32);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},function(t,e,n){"use strict";var r=n(34),o=n(13),i=n(33),a=n(15),u=n(63),c=n(109),s=n(88),l=n(36),f=n(77),d=Object.assign,p=Object.defineProperty,h=o([].concat);t.exports=!d||a((function(){if(r&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=d({},t)[n]||"abcdefghijklmnopqrst"!=u(d({},e)).join("")}))?function(t,e){for(var n=l(t),o=arguments.length,a=1,d=c.f,p=s.f;o>a;)for(var y,v=f(arguments[a++]),g=d?h(u(v),d(v)):u(v),b=g.length,m=0;b>m;)y=g[m++],r&&!i(p,v,y)||(n[y]=v[y]);return n}:d},function(t,e,n){var r=n(13),o=n(42),i=n(38),a=/"/g,u=r("".replace);t.exports=function(t,e,n,r){var c=i(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+u(i(r),a,""")+'"'),s+">"+c+"</"+e+">"}},function(t,e,n){var r=n(15);t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){var r=n(14),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,r,o=0,u=0,c=arguments.length,s=0;u<c;)s<(n=i(arguments[u++]))?(o=o*(r=s/n)*r+1,s=n):o+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*a(o)}})},function(t,e,n){"use strict";var r,o,i,a,u=n(14),c=n(61),s=n(5),l=n(43),f=n(33),d=n(201),p=n(41),h=n(141),y=n(92),v=n(70),g=n(142),b=n(52),m=n(26),_=n(31),O=n(114),E=n(87),w=n(111),x=n(115),S=n(152),j=n(157).set,P=n(202),A=n(205),k=n(206),T=n(159),D=n(207),M=n(53),N=n(90),R=n(25),C=n(208),I=n(123),L=n(62),B=R("species"),H="Promise",U=M.getterFor(H),X=M.set,G=M.getterFor(H),F=d&&d.prototype,Y=d,z=F,V=s.TypeError,W=s.document,K=s.process,$=T.f,Z=$,q=!!(W&&W.createEvent&&s.dispatchEvent),J=m(s.PromiseRejectionEvent),Q=!1,tt=N(H,(function(){var t=E(Y),e=t!==String(Y);if(!e&&66===L)return!0;if(c&&!z.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new Y((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[B]=r,!(Q=n.then((function(){}))instanceof r)||!e&&C&&!J})),et=tt||!x((function(t){Y.all(t).catch((function(){}))})),nt=function(t){var e;return!(!_(t)||!m(e=t.then))&&e},rt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;P((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,u,c,s=n[i++],l=o?s.ok:s.fail,d=s.resolve,p=s.reject,h=s.domain;try{l?(o||(2===t.rejection&&ut(t),t.rejection=1),!0===l?a=r:(h&&h.enter(),a=l(r),h&&(h.exit(),c=!0)),a===s.promise?p(V("Promise-chain cycle")):(u=nt(a))?f(u,a,d,p):d(a)):p(r)}catch(t){h&&!c&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&it(t)}))}},ot=function(t,e,n){var r,o;q?((r=W.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!J&&(o=s["on"+t])?o(r):"unhandledrejection"===t&&k("Unhandled promise rejection",n)},it=function(t){f(j,s,(function(){var e,n=t.facade,r=t.value;if(at(t)&&(e=D((function(){I?K.emit("unhandledRejection",r,n):ot("unhandledrejection",n,r)})),t.rejection=I||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},ut=function(t){f(j,s,(function(){var e=t.facade;I?K.emit("rejectionHandled",e):ot("rejectionhandled",e,t.value)}))},ct=function(t,e,n){return function(r){t(e,r,n)}},st=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,rt(t,!0))},lt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw V("Promise can't be resolved itself");var r=nt(e);r?P((function(){var n={done:!1};try{f(r,e,ct(lt,n,t),ct(st,n,t))}catch(e){st(n,e,t)}})):(t.value=e,t.state=1,rt(t,!1))}catch(e){st({done:!1},e,t)}}};if(tt&&(z=(Y=function(t){O(this,z),b(t),f(r,this);var e=U(this);try{t(ct(lt,e),ct(st,e))}catch(t){st(e,t)}}).prototype,(r=function(t){X(this,{type:H,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(z,{then:function(t,e){var n=G(this),r=n.reactions,o=$(S(this,Y));return o.ok=!m(t)||t,o.fail=m(e)&&e,o.domain=I?K.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&rt(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=U(t);this.promise=t,this.resolve=ct(lt,e),this.reject=ct(st,e)},T.f=$=function(t){return t===Y||t===i?new o(t):Z(t)},!c&&m(d)&&F!==Object.prototype)){a=F.then,Q||(p(F,"then",(function(t,e){var n=this;return new Y((function(t,e){f(a,n,t,e)})).then(t,e)}),{unsafe:!0}),p(F,"catch",z.catch,{unsafe:!0}));try{delete F.constructor}catch(t){}y&&y(F,z)}u({global:!0,wrap:!0,forced:tt},{Promise:Y}),v(Y,H,!1,!0),g(H),i=l(H),u({target:H,stat:!0,forced:tt},{reject:function(t){var e=$(this);return f(e.reject,void 0,t),e.promise}}),u({target:H,stat:!0,forced:c||tt},{resolve:function(t){return A(c&&this===i?Y:this,t)}}),u({target:H,stat:!0,forced:et},{all:function(t){var e=this,n=$(e),r=n.resolve,o=n.reject,i=D((function(){var n=b(e.resolve),i=[],a=0,u=1;w(t,(function(t){var c=a++,s=!1;u++,f(n,e,t).then((function(t){s||(s=!0,i[c]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=$(e),r=n.reject,o=D((function(){var o=b(e.resolve);w(t,(function(t){f(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(t,e,n){var r=n(5);t.exports=r.Promise},function(t,e,n){var r,o,i,a,u,c,s,l,f=n(5),d=n(59),p=n(48).f,h=n(157).set,y=n(158),v=n(203),g=n(204),b=n(123),m=f.MutationObserver||f.WebKitMutationObserver,_=f.document,O=f.process,E=f.Promise,w=p(f,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;for(b&&(t=O.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},y||b||g||!m||!_?!v&&E&&E.resolve?((s=E.resolve(void 0)).constructor=E,l=d(s.then,s),a=function(){l(r)}):b?a=function(){O.nextTick(r)}:(h=d(h,f),a=function(){h(r)}):(u=!0,c=_.createTextNode(""),new m(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,n){var r=n(50),o=n(5);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},function(t,e,n){var r=n(50);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(30),o=n(31),i=n(159);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(5);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e){t.exports="object"==typeof window},function(t,e,n){var r=n(34),o=n(13),i=n(63),a=n(37),u=o(n(88).f),c=o([].push),s=function(t){return function(e){for(var n,o=a(e),s=i(o),l=s.length,f=0,d=[];l>f;)n=s[f++],r&&!u(o,n)||c(d,t?[n,o[n]]:o[n]);return d}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,n){"use strict";var r=n(36),o=n(64),i=n(40);t.exports=function(t){for(var e=r(this),n=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},function(t,e,n){"use strict";n.r(e),n.d(e,"h",(function(){return v})),n.d(e,"action",(function(){return z.action})),n.d(e,"observable",(function(){return z.observable})),n.d(e,"computed",(function(){return z.computed})),n.d(e,"makeObservable",(function(){return z.makeObservable})),n.d(e,"configure",(function(){return z.configure})),n.d(e,"toJS",(function(){return z.toJS})),n.d(e,"isObservable",(function(){return z.isObservable})),n.d(e,"observer",(function(){return Ne})),n.d(e,"mobx",(function(){return z})),n.d(e,"LogicFlowUtil",(function(){return r})),n.d(e,"version",(function(){return Ab.a})),n.d(e,"LogicFlow",(function(){return Pb})),n.d(e,"BaseNode",(function(){return Oh})),n.d(e,"RectNode",(function(){return Th})),n.d(e,"CircleNode",(function(){return Hh})),n.d(e,"PolygonNode",(function(){return Jh})),n.d(e,"DiamondNode",(function(){return uy})),n.d(e,"EllipseNode",(function(){return _y})),n.d(e,"TextNode",(function(){return Dy})),n.d(e,"HtmlNode",(function(){return Xy})),n.d(e,"BaseEdge",(function(){return Xv})),n.d(e,"LineEdge",(function(){return Zv})),n.d(e,"PolylineEdge",(function(){return hg})),n.d(e,"BezierEdge",(function(){return Sg})),n.d(e,"Arrow",(function(){return ev})),n.d(e,"BaseEdgeModel",(function(){return xu})),n.d(e,"BezierEdgeModel",(function(){return Df})),n.d(e,"LineEdgeModel",(function(){return Hu})),n.d(e,"PolylineEdgeModel",(function(){return tc})),n.d(e,"BaseNodeModel",(function(){return Uf})),n.d(e,"CircleNodeModel",(function(){return Qf})),n.d(e,"DiamondNodeModel",(function(){return hd})),n.d(e,"EllipseNodeModel",(function(){return Pd})),n.d(e,"PolygonNodeModel",(function(){return Gd})),n.d(e,"RectNodeModel",(function(){return ep})),n.d(e,"TextNodeModel",(function(){return hp})),n.d(e,"HtmlNodeModel",(function(){return xp})),n.d(e,"EditConfigModel",(function(){return Oi})),n.d(e,"GraphModel",(function(){return ns})),n.d(e,"SnaplineModel",(function(){return Ap})),n.d(e,"Keyboard",(function(){return gb})),n.d(e,"get",(function(){return yf})),n.d(e,"defaults",(function(){return vf}));var r={};n.r(r),n.d(r,"createUuid",(function(){return Fa})),n.d(r,"refreshGraphId",(function(){return Ya})),n.d(r,"createDrag",(function(){return Yc})),n.d(r,"StepDrag",(function(){return zc}));n(1),n(57),n(0),n(4),n(2),n(9),n(39),n(21),n(17),n(3),n(18),n(19),n(20),n(6),n(7);var o,i,a,u,c,s,l,f={},d=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var n in e)t[n]=e[n];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,n){var r,i,a,u={};for(a in e)"key"==a?r=e[a]:"ref"==a?i=e[a]:u[a]=e[a];if(arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===u[a]&&(u[a]=t.defaultProps[a]);return g(t,u,r,i,null)}function g(t,e,n,r,o){var u={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++a:o};return null==o&&null!=i.vnode&&i.vnode(u),u}function b(){return{current:null}}function m(t){return t.children}function _(t,e){this.props=t,this.context=e}function O(t,e){if(null==e)return t.__?O(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?O(t):null}function E(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return E(t)}}function w(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!x.__r++||s!==i.debounceRendering)&&((s=i.debounceRendering)||c)(x)}function x(){for(var t;x.__r=u.length;)t=u.sort((function(t,e){return t.__v.__b-e.__v.__b})),u=[],t.some((function(t){var e,n,r,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(n=[],(r=h({},o)).__v=o.__v+1,N(a,o,r,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?O(o):i,o.__h),R(n,o),o.__e!=i&&E(o)))}))}function S(t,e,n,r,o,i,a,u,c,s){var l,p,h,y,v,b,_,E=r&&r.__k||d,w=E.length;for(n.__k=[],l=0;l<e.length;l++)if(null!=(y=n.__k[l]=null==(y=e[l])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?g(null,y,null,null,y):Array.isArray(y)?g(m,{children:y},null,null,null):y.__b>0?g(y.type,y.props,y.key,null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(h=E[l])||h&&y.key==h.key&&y.type===h.type)E[l]=void 0;else for(p=0;p<w;p++){if((h=E[p])&&y.key==h.key&&y.type===h.type){E[p]=void 0;break}h=null}N(t,y,h=h||f,o,i,a,u,c,s),v=y.__e,(p=y.ref)&&h.ref!=p&&(_||(_=[]),h.ref&&_.push(h.ref,null,y),_.push(p,y.__c||v,y)),null!=v?(null==b&&(b=v),"function"==typeof y.type&&y.__k===h.__k?y.__d=c=j(y,c,t):c=A(t,y,h,E,v,c),"function"==typeof n.type&&(n.__d=c)):c&&h.__e==c&&c.parentNode!=t&&(c=O(h))}for(n.__e=b,l=w;l--;)null!=E[l]&&("function"==typeof n.type&&null!=E[l].__e&&E[l].__e==n.__d&&(n.__d=O(r,l+1)),L(E[l],E[l]));if(_)for(l=0;l<_.length;l++)I(_[l],_[++l],_[++l])}function j(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e="function"==typeof r.type?j(r,e,n):A(n,r,r,o,r.__e,e));return e}function P(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){P(t,e)})):e.push(t)),e}function A(t,e,n,r,o,i){var a,u,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==n||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),a=null;else{for(u=i,c=0;(u=u.nextSibling)&&c<r.length;c+=2)if(u==o)break t;t.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function k(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function T(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||k(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||k(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?M:D,i):t.removeEventListener(e,i?M:D,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function D(t){this.l[t.type+!1](i.event?i.event(t):t)}function M(t){this.l[t.type+!0](i.event?i.event(t):t)}function N(t,e,n,r,o,a,u,c,s){var l,f,d,p,y,v,g,b,O,E,w,x=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(s=n.__h,c=e.__e=n.__e,e.__h=null,a=[c]),(l=i.__b)&&l(e);try{t:if("function"==typeof x){if(b=e.props,O=(l=x.contextType)&&r[l.__c],E=l?O?O.props.value:l.__:r,n.__c?g=(f=e.__c=n.__c).__=f.__E:("prototype"in x&&x.prototype.render?e.__c=f=new x(b,E):(e.__c=f=new _(b,E),f.constructor=x,f.render=B),O&&O.sub(f),f.props=b,f.state||(f.state={}),f.context=E,f.__n=r,d=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=h({},f.__s)),h(f.__s,x.getDerivedStateFromProps(b,f.__s))),p=f.props,y=f.state,d)null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==x.getDerivedStateFromProps&&b!==p&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(b,E),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(b,f.__s,E)||e.__v===n.__v){f.props=b,f.state=f.__s,e.__v!==n.__v&&(f.__d=!1),f.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),f.__h.length&&u.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(b,f.__s,E),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(p,y,v)}))}f.context=E,f.props=b,f.state=f.__s,(l=i.__r)&&l(e),f.__d=!1,f.__v=e,f.__P=t,l=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(r=h(h({},r),f.getChildContext())),d||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(p,y)),w=null!=l&&l.type===m&&null==l.key?l.props.children:l,S(t,Array.isArray(w)?w:[w],e,n,r,o,a,u,c,s),f.base=e.__e,e.__h=null,f.__h.length&&u.push(f),g&&(f.__E=f.__=null),f.__e=!1}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=C(n.__e,e,n,r,o,a,u,s);(l=i.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=c,e.__h=!!s,a[a.indexOf(c)]=null),i.__e(t,e,n)}}function R(t,e){i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function C(t,e,n,r,i,a,u,c){var s,l,d,p=n.props,h=e.props,v=e.type,g=0;if("svg"===v&&(i=!0),null!=a)for(;g<a.length;g++)if((s=a[g])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,a[g]=null;break}if(null==t){if(null===v)return document.createTextNode(h);t=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,h.is&&h),a=null,c=!1}if(null===v)p===h||c&&t.data===h||(t.data=h);else{if(a=a&&o.call(t.childNodes),l=(p=n.props||f).dangerouslySetInnerHTML,d=h.dangerouslySetInnerHTML,!c){if(null!=a)for(p={},g=0;g<t.attributes.length;g++)p[t.attributes[g].name]=t.attributes[g].value;(d||l)&&(d&&(l&&d.__html==l.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||T(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||T(t,i,e[i],n[i],r)}(t,h,p,i,c),d)e.__k=[];else if(g=e.props.children,S(t,Array.isArray(g)?g:[g],e,n,r,i&&"foreignObject"!==v,a,u,a?a[0]:n.__k&&O(n,0),c),null!=a)for(g=a.length;g--;)null!=a[g]&&y(a[g]);c||("value"in h&&void 0!==(g=h.value)&&(g!==p.value||g!==t.value||"progress"===v&&!g)&&T(t,"value",g,p.value,!1),"checked"in h&&void 0!==(g=h.checked)&&g!==t.checked&&T(t,"checked",g,p.checked,!1))}return t}function I(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function L(t,e,n){var r,o;if(i.unmount&&i.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||I(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){i.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],e,"function"!=typeof t.type);n||null==t.__e||y(t.__e),t.__e=t.__d=void 0}function B(t,e,n){return this.constructor(t,n)}function H(t,e,n){var r,a,u;i.__&&i.__(t,e),a=(r="function"==typeof n)?null:n&&n.__k||e.__k,u=[],N(e,t=(!r&&n||e).__k=v(m,null,[t]),a||f,f,void 0!==e.ownerSVGElement,!r&&n?[n]:a?null:e.firstChild?o.call(e.childNodes):null,u,!r&&n?n:a?a.__e:e.firstChild,r),R(u,t)}function U(t,e){H(t,e,U)}function X(t,e,n){var r,i,a,u=h({},t.props);for(a in e)"key"==a?r=e[a]:"ref"==a?i=e[a]:u[a]=e[a];return arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),g(t.type,u,r||t.key,i||t.ref,null)}o=d.slice,i={__e:function(t,e){for(var n,r,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),o=n.__d),o)return n.__E=n}catch(e){t=e}throw t}},a=0,_.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof t&&(t=t(h({},n),this.props)),t&&h(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),w(this))},_.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),w(this))},_.prototype.render=m,u=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,x.__r=0,l=0;var G,F,Y,z=n(8),V=0,W=[],K=i.__b,$=i.__r,Z=i.diffed,q=i.__c,J=i.unmount;function Q(t,e){i.__h&&i.__h(F,t,V||e),V=0;var n=F.__H||(F.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function tt(t){return V=1,et(lt,t)}function et(t,e,n){var r=Q(G++,2);return r.t=t,r.__c||(r.__=[n?n(e):lt(void 0,e),function(t){var e=r.t(r.__[0],t);r.__[0]!==e&&(r.__=[e,r.__[1]],r.__c.setState({}))}],r.__c=F),r.__}function nt(t,e){var n=Q(G++,4);!i.__s&&st(n.__H,e)&&(n.__=t,n.__H=e,F.__h.push(n))}function rt(t,e){var n=Q(G++,7);return st(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ot(){var t;for(W.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=W.pop();)if(t.__P)try{t.__H.__h.forEach(ut),t.__H.__h.forEach(ct),t.__H.__h=[]}catch(e){t.__H.__h=[],i.__e(e,t.__v)}}i.__b=function(t){F=null,K&&K(t)},i.__r=function(t){$&&$(t),G=0;var e=(F=t.__c).__H;e&&(e.__h.forEach(ut),e.__h.forEach(ct),e.__h=[])},i.diffed=function(t){Z&&Z(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==W.push(e)&&Y===i.requestAnimationFrame||((Y=i.requestAnimationFrame)||at)(ot)),F=null},i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(ut),t.__h=t.__h.filter((function(t){return!t.__||ct(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],i.__e(n,t.__v)}})),q&&q(t,e)},i.unmount=function(t){J&&J(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{ut(t)}catch(t){e=t}})),e&&i.__e(e,n.__v))};var it="function"==typeof requestAnimationFrame;function at(t){var e,n=function(){clearTimeout(r),it&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);it&&(e=requestAnimationFrame(n))}function ut(t){var e=F,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),F=e}function ct(t){var e=F;t.__c=t.__(),F=e}function st(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function lt(t,e){return"function"==typeof e?e(t):e}function ft(t,e){for(var n in e)t[n]=e[n];return t}function dt(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function pt(t){this.props=t}function ht(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:dt(this.props,t)}function r(e){return this.shouldComponentUpdate=n,v(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(pt.prototype=new _).isPureReactComponent=!0,pt.prototype.shouldComponentUpdate=function(t,e){return dt(this.props,t)||dt(this.state,e)};var yt=i.__b;i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),yt&&yt(t)};var vt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function gt(t){function e(e,n){var r=ft({},e);return delete r.ref,t(r,!(n=e.ref||n)||"object"==typeof n&&!("current"in n)?null:n)}return e.$$typeof=vt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var bt=function(t,e){return null==t?null:P(P(t).map(e))},mt={map:bt,forEach:bt,count:function(t){return t?P(t).length:0},only:function(t){var e=P(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:P},_t=i.__e;i.__e=function(t,e,n){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);_t(t,e,n)};var Ot=i.unmount;function Et(){this.__u=0,this.t=null,this.__b=null}function wt(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function xt(){this.u=null,this.o=null}i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),Ot&&Ot(t)},(Et.prototype=new _).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=wt(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__e){var t=r.state.__e;r.__v.__k[0]=function t(e,n,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)})),e.__c&&e.__c.__P===n&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__e:r.__b=null});e=r.t.pop();)e.forceUpdate()}},c=!0===e.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(a,a)},Et.prototype.componentWillUnmount=function(){this.t=[]},Et.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,n,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),e.__c.__H=null),null!=(e=ft({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=n),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)}))),e}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__e&&v(m,null,t.fallback);return o&&(o.__h=null),[v(m,null,e.__e?null:t.children),o]};var St=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function jt(t){return this.getChildContext=function(){return t.context},t.children}function Pt(t){var e=this,n=t.i;e.componentWillUnmount=function(){H(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),H(v(jt,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(xt.prototype=new _).__e=function(t){var e=this,n=wt(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),St(e,t,r)):o()};n?n(i):i()}},xt.prototype.render=function(t){this.u=null,this.o=new Map;var e=P(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},xt.prototype.componentDidUpdate=xt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){St(t,n,e)}))};var At="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,kt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Tt="undefined"!=typeof document,Dt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};_.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(_.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Mt=i.event;function Nt(){}function Rt(){return this.cancelBubble}function Ct(){return this.defaultPrevented}i.event=function(t){return Mt&&(t=Mt(t)),t.persist=Nt,t.isPropagationStopped=Rt,t.isDefaultPrevented=Ct,t.nativeEvent=t};var It,Lt={configurable:!0,get:function(){return this.class}},Bt=i.vnode;i.vnode=function(t){var e=t.type,n=t.props,r=n;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in r={},n){var a=n[i];Tt&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in n&&null==a||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!Dt(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&kt.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),r[i]=a)}"select"==e&&r.multiple&&Array.isArray(r.value)&&(r.value=P(n.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==e&&null!=r.defaultValue&&(r.value=P(n.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),t.props=r,n.class!=n.className&&(Lt.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Lt))}t.$$typeof=At,Bt&&Bt(t)};var Ht=i.__r;i.__r=function(t){Ht&&Ht(t),It=t.__c};function Ut(t){return!!t&&t.$$typeof===At}var Xt=function(t,e){return t(e)},Gt={useState:tt,useReducer:et,useEffect:function(t,e){var n=Q(G++,3);!i.__s&&st(n.__H,e)&&(n.__=t,n.__H=e,F.__H.__h.push(n))},useLayoutEffect:nt,useRef:function(t){return V=5,rt((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,n){V=6,nt((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))},useMemo:rt,useCallback:function(t,e){return V=8,rt((function(){return t}),e)},useContext:function(t){var e=F.context[t.__c],n=Q(G++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(F)),e.props.value):t.__},useDebugValue:function(t,e){i.useDebugValue&&i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:mt,render:function(t,e,n){return null==e.__k&&(e.textContent=""),H(t,e),"function"==typeof n&&n(),t?t.__c:null},hydrate:function(t,e,n){return U(t,e),"function"==typeof n&&n(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(H(null,t),!0)},createPortal:function(t,e){return v(Pt,{__v:t,i:e})},createElement:v,createContext:function(t,e){var n={__c:e="__cC"+l++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(w)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(t){return v.bind(null,t)},cloneElement:function(t){return Ut(t)?X.apply(null,arguments):t},createRef:b,Fragment:m,isValidElement:Ut,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:_,PureComponent:pt,memo:ht,forwardRef:gt,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:Xt,StrictMode:m,Suspense:Et,SuspenseList:xt,lazy:function(t){var e,n,r;function o(o){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return v(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(t){return It.__n[t.__c].props.value}}}}};if(!tt)throw new Error("mobx-react-lite requires React with Hooks support");if(!z.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function Ft(t){t()}function Yt(t){return Object(z.getDependencyTree)(t)}var zt="undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry;function Vt(t){return{reaction:t,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+Wt}}var Wt=1e4;var Kt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};var $t=zt?function(t){var e=new Map,n=1,r=new t((function(t){var n=e.get(t);n&&(n.reaction.dispose(),e.delete(t))}));return{addReactionToTrack:function(t,o,i){var a=n++;return r.register(i,a,t),t.current=Vt(o),t.current.finalizationRegistryCleanupToken=a,e.set(a,t.current),t.current},recordReactionAsCommitted:function(t){r.unregister(t),t.current&&t.current.finalizationRegistryCleanupToken&&e.delete(t.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(zt):function(){var t,e=new Set;function n(){void 0===t&&(t=setTimeout(r,1e4))}function r(){t=void 0;var r=Date.now();e.forEach((function(t){var n=t.current;n&&r>=n.cleanAt&&(n.reaction.dispose(),t.current=null,e.delete(t))})),e.size>0&&n()}return{addReactionToTrack:function(t,r,o){var i;return t.current=Vt(r),i=t,e.add(i),n(),t.current},recordReactionAsCommitted:function(t){e.delete(t)},forceCleanupTimerToRunNowForTests:function(){t&&(clearTimeout(t),r())},resetCleanupScheduleForTests:function(){var n,r;if(e.size>0){try{for(var o=Kt(e),i=o.next();!i.done;i=o.next()){var a=i.value,u=a.current;u&&(u.reaction.dispose(),a.current=null)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.clear()}t&&(clearTimeout(t),t=void 0)}}}(),Zt=$t.addReactionToTrack,qt=$t.recordReactionAsCommitted,Jt=($t.resetCleanupScheduleForTests,$t.forceCleanupTimerToRunNowForTests,!1);function Qt(){return Jt}var te=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ee(t){return"observer".concat(t)}var ne=function(){};function re(){return new ne}function oe(t,e){if(void 0===e&&(e="observed"),Qt())return t();var n=te(Gt.useState(re),1)[0],r=te(Gt.useState(),2)[1],o=function(){return r([])},i=Gt.useRef(null);if(!i.current)var a=new z.Reaction(ee(e),(function(){u.mounted?o():u.changedBeforeMount=!0})),u=Zt(i,a,n);var c,s,l=i.current.reaction;if(Gt.useDebugValue(l,Yt),Gt.useEffect((function(){return qt(i),i.current?(i.current.mounted=!0,i.current.changedBeforeMount&&(i.current.changedBeforeMount=!1,o())):(i.current={reaction:new z.Reaction(ee(e),(function(){o()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},o()),function(){i.current.reaction.dispose(),i.current=null}}),[]),l.track((function(){try{c=t()}catch(t){s=t}})),s)throw s;return c}var ie="function"==typeof Symbol&&Symbol.for,ae=ie?Symbol.for("react.forward_ref"):gt((function(t){return null})).$$typeof,ue=ie?Symbol.for("react.memo"):ht((function(t){return null})).$$typeof;function ce(t,e){var n;if(ue&&t.$$typeof===ue)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(Qt())return t;var r=null!==(n=null==e?void 0:e.forwardRef)&&void 0!==n&&n,o=t,i=t.displayName||t.name;if(ae&&t.$$typeof===ae&&(r=!0,"function"!=typeof(o=t.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,u,c=function(t,e){return oe((function(){return o(t,e)}),i)};return""!==i&&(c.displayName=i),t.contextTypes&&(c.contextTypes=t.contextTypes),r&&(c=gt(c)),c=ht(c),a=t,u=c,Object.keys(a).forEach((function(t){se[t]||Object.defineProperty(u,t,Object.getOwnPropertyDescriptor(a,t))})),c}var se={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};var le;(le=Xt)||(le=Ft),Object(z.configure)({reactionScheduler:le});var fe=0;var de={};function pe(t){return de[t]||(de[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+fe+")";return fe++,e}(t)),de[t]}function he(t,e){if(ye(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.hasOwnProperty.call(e,n[o])||!ye(t[n[o]],e[n[o]]))return!1;return!0}function ye(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function ve(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var ge=pe("patchMixins"),be=pe("patchedDefinition");function me(t,e){for(var n=this,r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];e.locks++;try{var a;return null!=t&&(a=t.apply(this,o)),a}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(n,o)}))}}function _e(t,e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];me.call.apply(me,[this,t,e].concat(r))}}function Oe(t,e,n){var r=function(t,e){var n=t[ge]=t[ge]||{},r=n[e]=n[e]||{};return r.locks=r.locks||0,r.methods=r.methods||[],r}(t,e);r.methods.indexOf(n)<0&&r.methods.push(n);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[be]){var i=t[e],a=function t(e,n,r,o,i){var a,u=_e(i,o);return(a={})[be]=!0,a.get=function(){return u},a.set=function(i){if(this===e)u=_e(i,o);else{var a=t(this,n,r,o,i);Object.defineProperty(this,n,a)}},a.configurable=!0,a.enumerable=r,a}(t,e,o?o.enumerable:void 0,r,i);Object.defineProperty(t,e,a)}}var Ee=z.$mobx||"$mobx",we=pe("isMobXReactObserver"),xe=pe("isUnmounted"),Se=pe("skipRender"),je=pe("isForcingUpdate");function Pe(t){var e=t.prototype;if(t[we]){var n=Ae(e);console.warn("The provided component class ("+n+") \n has already been declared as an observer component.")}else t[we]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==pt)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==Te)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=Te;De(e,"props"),De(e,"state");var r=e.render;if("function"!=typeof r){var o=Ae(e);throw new Error("[mobx-react] class component ("+o+") is missing `render` method.\n`observer` requires `render` being a function defined on prototype.\n`render = () => {}` or `render = function() {}` is not supported.")}return e.render=function(){return ke.call(this,r)},Oe(e,"componentWillUnmount",(function(){var t;if(!0!==Qt()&&(null==(t=this.render[Ee])||t.dispose(),this[xe]=!0,!this.render[Ee])){var e=Ae(this);console.warn("The reactive render of an observer class component ("+e+") \n was overriden after MobX attached. This may result in a memory leak if the \n overriden reactive render was not properly disposed.")}})),t}function Ae(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function ke(t){var e=this;if(!0===Qt())return t.call(this);ve(this,Se,!1),ve(this,je,!1);var n=Ae(this),r=t.bind(this),o=!1,i=new z.Reaction(n+".render()",(function(){if(!o&&(o=!0,!0!==e[xe])){var t=!0;try{ve(e,je,!0),e[Se]||_.prototype.forceUpdate.call(e),t=!1}finally{ve(e,je,!1),t&&i.dispose()}}}));function a(){o=!1;var t=void 0,e=void 0;if(i.track((function(){try{e=Object(z._allowStateChanges)(!1,r)}catch(e){t=e}})),t)throw t;return e}return i.reactComponent=this,a[Ee]=i,this.render=a,a.call(this)}function Te(t,e){return Qt()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==e||!he(this.props,t)}function De(t,e){var n=pe("reactProp_"+e+"_valueHolder"),r=pe("reactProp_"+e+"_atomHolder");function o(){return this[r]||ve(this,r,Object(z.createAtom)("reactive "+e)),this[r]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return z._allowStateReadsStart&&z._allowStateReadsEnd&&(t=Object(z._allowStateReadsStart)(!0)),o.call(this).reportObserved(),z._allowStateReadsStart&&z._allowStateReadsEnd&&Object(z._allowStateReadsEnd)(t),this[n]},set:function(t){this[je]||he(this[n],t)?ve(this,n,t):(ve(this,n,t),ve(this,Se,!0),o.call(this).reportChanged(),ve(this,Se,!1))}})}function Me(t){return!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use `observer` on a component that already has `inject`. Please apply `observer` before applying `inject`"),Object.prototype.isPrototypeOf.call(_,t)||Object.prototype.isPrototypeOf.call(pt,t)?Pe(t):ce(t)}if(!_)throw new Error("mobx-react requires React to be available");if(!z.observable)throw new Error("mobx-react requires mobx to be available");function Ne(t){return Me(t)}Object(z.configure)({isolateGlobalState:!0});n(27),n(177),n(182),n(97),n(148),n(149),n(22),n(23),n(16);var Re=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o};var Ce=function(){this.__data__=[],this.size=0};var Ie=function(t,e){return t===e||t!=t&&e!=e};var Le=function(t,e){for(var n=t.length;n--;)if(Ie(t[n][0],e))return n;return-1},Be=Array.prototype.splice;var He=function(t){var e=this.__data__,n=Le(e,t);return!(n<0)&&(n==e.length-1?e.pop():Be.call(e,n,1),--this.size,!0)};var Ue=function(t){var e=this.__data__,n=Le(e,t);return n<0?void 0:e[n][1]};var Xe=function(t){return Le(this.__data__,t)>-1};var Ge=function(t,e){var n=this.__data__,r=Le(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Fe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Fe.prototype.clear=Ce,Fe.prototype.delete=He,Fe.prototype.get=Ue,Fe.prototype.has=Xe,Fe.prototype.set=Ge;var Ye=Fe;var ze=function(){this.__data__=new Ye,this.size=0};var Ve=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var We=function(t){return this.__data__.get(t)};var Ke=function(t){return this.__data__.has(t)},$e=n(29),Ze=$e.a.Symbol,qe=Object.prototype,Je=qe.hasOwnProperty,Qe=qe.toString,tn=Ze?Ze.toStringTag:void 0;var en=function(t){var e=Je.call(t,tn),n=t[tn];try{t[tn]=void 0;var r=!0}catch(t){}var o=Qe.call(t);return r&&(e?t[tn]=n:delete t[tn]),o},nn=Object.prototype.toString;var rn=function(t){return nn.call(t)},on=Ze?Ze.toStringTag:void 0;var an=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":on&&on in Object(t)?en(t):rn(t)};var un=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var cn,sn=function(t){if(!un(t))return!1;var e=an(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},ln=$e.a["__core-js_shared__"],fn=(cn=/[^.]+$/.exec(ln&&ln.keys&&ln.keys.IE_PROTO||""))?"Symbol(src)_1."+cn:"";var dn=function(t){return!!fn&&fn in t},pn=Function.prototype.toString;var hn=function(t){if(null!=t){try{return pn.call(t)}catch(t){}try{return t+""}catch(t){}}return""},yn=/^\[object .+?Constructor\]$/,vn=Function.prototype,gn=Object.prototype,bn=vn.toString,mn=gn.hasOwnProperty,_n=RegExp("^"+bn.call(mn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var On=function(t){return!(!un(t)||dn(t))&&(sn(t)?_n:yn).test(hn(t))};var En=function(t,e){return null==t?void 0:t[e]};var wn=function(t,e){var n=En(t,e);return On(n)?n:void 0},xn=wn($e.a,"Map"),Sn=wn(Object,"create");var jn=function(){this.__data__=Sn?Sn(null):{},this.size=0};var Pn=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},An=Object.prototype.hasOwnProperty;var kn=function(t){var e=this.__data__;if(Sn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return An.call(e,t)?e[t]:void 0},Tn=Object.prototype.hasOwnProperty;var Dn=function(t){var e=this.__data__;return Sn?void 0!==e[t]:Tn.call(e,t)};var Mn=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Sn&&void 0===e?"__lodash_hash_undefined__":e,this};function Nn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Nn.prototype.clear=jn,Nn.prototype.delete=Pn,Nn.prototype.get=kn,Nn.prototype.has=Dn,Nn.prototype.set=Mn;var Rn=Nn;var Cn=function(){this.size=0,this.__data__={hash:new Rn,map:new(xn||Ye),string:new Rn}};var In=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Ln=function(t,e){var n=t.__data__;return In(e)?n["string"==typeof e?"string":"hash"]:n.map};var Bn=function(t){var e=Ln(this,t).delete(t);return this.size-=e?1:0,e};var Hn=function(t){return Ln(this,t).get(t)};var Un=function(t){return Ln(this,t).has(t)};var Xn=function(t,e){var n=Ln(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Gn.prototype.clear=Cn,Gn.prototype.delete=Bn,Gn.prototype.get=Hn,Gn.prototype.has=Un,Gn.prototype.set=Xn;var Fn=Gn;var Yn=function(t,e){var n=this.__data__;if(n instanceof Ye){var r=n.__data__;if(!xn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(t,e),this.size=n.size,this};function zn(t){var e=this.__data__=new Ye(t);this.size=e.size}zn.prototype.clear=ze,zn.prototype.delete=Ve,zn.prototype.get=We,zn.prototype.has=Ke,zn.prototype.set=Yn;var Vn=zn;var Wn=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var Kn=function(t){return this.__data__.has(t)};function $n(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}$n.prototype.add=$n.prototype.push=Wn,$n.prototype.has=Kn;var Zn=$n;var qn=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1};var Jn=function(t,e){return t.has(e)};var Qn=function(t,e,n,r,o,i){var a=1&n,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,d=!0,p=2&n?new Zn:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],y=e[f];if(r)var v=a?r(y,h,f,e,t,i):r(h,y,f,t,e,i);if(void 0!==v){if(v)continue;d=!1;break}if(p){if(!qn(e,(function(t,e){if(!Jn(p,e)&&(h===t||o(h,t,n,r,i)))return p.push(e)}))){d=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},tr=$e.a.Uint8Array;var er=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n};var nr=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},rr=Ze?Ze.prototype:void 0,or=rr?rr.valueOf:void 0;var ir=function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new tr(t),new tr(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ie(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=er;case"[object Set]":var c=1&r;if(u||(u=nr),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=2,a.set(t,e);var l=Qn(u(t),u(e),r,o,i,a);return a.delete(t),l;case"[object Symbol]":if(or)return or.call(t)==or.call(e)}return!1};var ar=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},ur=Array.isArray;var cr=function(t,e,n){var r=e(t);return ur(t)?r:ar(r,n(t))};var sr=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i};var lr=function(){return[]},fr=Object.prototype.propertyIsEnumerable,dr=Object.getOwnPropertySymbols,pr=dr?function(t){return null==t?[]:(t=Object(t),sr(dr(t),(function(e){return fr.call(t,e)})))}:lr;var hr=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r};var yr=function(t){return null!=t&&"object"==typeof t};var vr=function(t){return yr(t)&&"[object Arguments]"==an(t)},gr=Object.prototype,br=gr.hasOwnProperty,mr=gr.propertyIsEnumerable,_r=vr(function(){return arguments}())?vr:function(t){return yr(t)&&br.call(t,"callee")&&!mr.call(t,"callee")},Or=n(45),Er=/^(?:0|[1-9]\d*)$/;var wr=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Er.test(t))&&t>-1&&t%1==0&&t<e};var xr=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Sr={};Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Arguments]"]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object Boolean]"]=Sr["[object DataView]"]=Sr["[object Date]"]=Sr["[object Error]"]=Sr["[object Function]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr["[object Object]"]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object WeakMap]"]=!1;var jr=function(t){return yr(t)&&xr(t.length)&&!!Sr[an(t)]};var Pr=function(t){return function(e){return t(e)}},Ar=n(46),kr=Ar.a&&Ar.a.isTypedArray,Tr=kr?Pr(kr):jr,Dr=Object.prototype.hasOwnProperty;var Mr=function(t,e){var n=ur(t),r=!n&&_r(t),o=!n&&!r&&Object(Or.a)(t),i=!n&&!r&&!o&&Tr(t),a=n||r||o||i,u=a?hr(t.length,String):[],c=u.length;for(var s in t)!e&&!Dr.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wr(s,c))||u.push(s);return u},Nr=Object.prototype;var Rr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Nr)};var Cr=function(t,e){return function(n){return t(e(n))}},Ir=Cr(Object.keys,Object),Lr=Object.prototype.hasOwnProperty;var Br=function(t){if(!Rr(t))return Ir(t);var e=[];for(var n in Object(t))Lr.call(t,n)&&"constructor"!=n&&e.push(n);return e};var Hr=function(t){return null!=t&&xr(t.length)&&!sn(t)};var Ur=function(t){return Hr(t)?Mr(t):Br(t)};var Xr=function(t){return cr(t,Ur,pr)},Gr=Object.prototype.hasOwnProperty;var Fr=function(t,e,n,r,o,i){var a=1&n,u=Xr(t),c=u.length;if(c!=Xr(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:Gr.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var y=t[l=u[s]],v=e[l];if(r)var g=a?r(v,y,l,e,t,i):r(y,v,l,t,e,i);if(!(void 0===g?y===v||o(y,v,n,r,i):g)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(p=!1)}return i.delete(t),i.delete(e),p},Yr=wn($e.a,"DataView"),zr=wn($e.a,"Promise"),Vr=wn($e.a,"Set"),Wr=wn($e.a,"WeakMap"),Kr=hn(Yr),$r=hn(xn),Zr=hn(zr),qr=hn(Vr),Jr=hn(Wr),Qr=an;(Yr&&"[object DataView]"!=Qr(new Yr(new ArrayBuffer(1)))||xn&&"[object Map]"!=Qr(new xn)||zr&&"[object Promise]"!=Qr(zr.resolve())||Vr&&"[object Set]"!=Qr(new Vr)||Wr&&"[object WeakMap]"!=Qr(new Wr))&&(Qr=function(t){var e=an(t),n="[object Object]"==e?t.constructor:void 0,r=n?hn(n):"";if(r)switch(r){case Kr:return"[object DataView]";case $r:return"[object Map]";case Zr:return"[object Promise]";case qr:return"[object Set]";case Jr:return"[object WeakMap]"}return e});var to=Qr,eo=Object.prototype.hasOwnProperty;var no=function(t,e,n,r,o,i){var a=ur(t),u=ur(e),c=a?"[object Array]":to(t),s=u?"[object Array]":to(e),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),d=c==s;if(d&&Object(Or.a)(t)){if(!Object(Or.a)(e))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new Vn),a||Tr(t)?Qn(t,e,n,r,o,i):ir(t,e,c,n,r,o,i);if(!(1&n)){var p=l&&eo.call(t,"__wrapped__"),h=f&&eo.call(e,"__wrapped__");if(p||h){var y=p?t.value():t,v=h?e.value():e;return i||(i=new Vn),o(y,v,n,r,i)}}return!!d&&(i||(i=new Vn),Fr(t,e,n,r,o,i))};var ro=function t(e,n,r,o,i){return e===n||(null==e||null==n||!yr(e)&&!yr(n)?e!=e&&n!=n:no(e,n,r,o,t,i))};var oo=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=Object(t);o--;){var u=n[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=n[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new Vn;if(r)var d=r(s,l,c,t,e,f);if(!(void 0===d?ro(l,s,3,r,f):d))return!1}}return!0};var io=function(t){return t==t&&!un(t)};var ao=function(t){for(var e=Ur(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,io(o)]}return e};var uo=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}};var co=function(t){var e=ao(t);return 1==e.length&&e[0][2]?uo(e[0][0],e[0][1]):function(n){return n===t||oo(n,t,e)}};var so=function(t){return"symbol"==typeof t||yr(t)&&"[object Symbol]"==an(t)},lo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fo=/^\w*$/;var po=function(t,e){if(ur(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!so(t))||(fo.test(t)||!lo.test(t)||null!=e&&t in Object(e))};function ho(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ho.Cache||Fn),n}ho.Cache=Fn;var yo=ho;var vo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,go=/\\(\\)?/g,bo=function(t){var e=yo(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(vo,(function(t,n,r,o){e.push(r?o.replace(go,"$1"):n||t)})),e})),mo=Ze?Ze.prototype:void 0,_o=mo?mo.toString:void 0;var Oo=function t(e){if("string"==typeof e)return e;if(ur(e))return Re(e,t)+"";if(so(e))return _o?_o.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};var Eo=function(t){return null==t?"":Oo(t)};var wo=function(t,e){return ur(t)?t:po(t,e)?[t]:bo(Eo(t))};var xo=function(t){if("string"==typeof t||so(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var So=function(t,e){for(var n=0,r=(e=wo(e,t)).length;null!=t&&n<r;)t=t[xo(e[n++])];return n&&n==r?t:void 0};var jo=function(t,e,n){var r=null==t?void 0:So(t,e);return void 0===r?n:r};var Po=function(t,e){return null!=t&&e in Object(t)};var Ao=function(t,e,n){for(var r=-1,o=(e=wo(e,t)).length,i=!1;++r<o;){var a=xo(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&xr(o)&&wr(a,o)&&(ur(t)||_r(t))};var ko=function(t,e){return null!=t&&Ao(t,e,Po)};var To=function(t,e){return po(t)&&io(e)?uo(xo(t),e):function(n){var r=jo(n,t);return void 0===r&&r===e?ko(n,t):ro(e,r,3)}};var Do=function(t){return t};var Mo=function(t){return function(e){return null==e?void 0:e[t]}};var No=function(t){return function(e){return So(e,t)}};var Ro=function(t){return po(t)?Mo(xo(t)):No(t)};var Co=function(t){return"function"==typeof t?t:null==t?Do:"object"==typeof t?ur(t)?To(t[0],t[1]):co(t):Ro(t)};var Io=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===n(i[c],c,i))break}return e}}();var Lo=function(t,e){return function(n,r){if(null==n)return n;if(!Hr(n))return t(n,r);for(var o=n.length,i=e?o:-1,a=Object(n);(e?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(t,e){return t&&Io(t,e,Ur)}));var Bo=function(t,e){var n=-1,r=Hr(t)?Array(t.length):[];return Lo(t,(function(t,o,i){r[++n]=e(t,o,i)})),r};var Ho=function(t,e){return(ur(t)?Re:Bo)(t,Co(e,3))},Uo=function(){try{var t=wn(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Xo=function(t,e,n){"__proto__"==e&&Uo?Uo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Go=Object.prototype.hasOwnProperty;var Fo=function(t,e,n){var r=t[e];Go.call(t,e)&&Ie(r,n)&&(void 0!==n||e in t)||Xo(t,e,n)};var Yo=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var u=e[i],c=r?r(n[u],t[u],u,n,t):void 0;void 0===c&&(c=t[u]),o?Xo(n,u,c):Fo(n,u,c)}return n};var zo=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},Vo=Math.max;var Wo=function(t,e,n){return e=Vo(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Vo(r.length-e,0),a=Array(i);++o<i;)a[o]=r[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=r[o];return u[e]=n(a),zo(t,this,u)}};var Ko=function(t){return function(){return t}},$o=Uo?function(t,e){return Uo(t,"toString",{configurable:!0,enumerable:!1,value:Ko(e),writable:!0})}:Do,Zo=Date.now;var qo=function(t){var e=0,n=0;return function(){var r=Zo(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}($o);var Jo=function(t,e){return qo(Wo(t,e,Do),t+"")};var Qo=function(t,e,n){if(!un(n))return!1;var r=typeof e;return!!("number"==r?Hr(n)&&wr(e,n.length):"string"==r&&e in n)&&Ie(n[e],t)};var ti=function(t){return Jo((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,a&&Qo(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,i)}return e}))},ei=Object.prototype.hasOwnProperty,ni=ti((function(t,e){if(Rr(e)||Hr(e))Yo(e,Ur(e),t);else for(var n in e)ei.call(e,n)&&Fo(t,n,e[n])}));var ri=function(t,e,n,r){if(!un(t))return t;for(var o=-1,i=(e=wo(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=xo(e[o]),s=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var l=u[c];void 0===(s=r?r(l,c,u):void 0)&&(s=un(l)?l:wr(e[o+1])?[]:{})}Fo(u,c,s),u=u[c]}return t};var oi=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var a=e[r],u=So(t,a);n(u,a)&&ri(i,wo(a,t),u)}return i};var ii=function(t,e){return oi(t,e,(function(e,n){return ko(t,n)}))},ai=Ze?Ze.isConcatSpreadable:void 0;var ui=function(t){return ur(t)||_r(t)||!!(ai&&t&&t[ai])};var ci=function t(e,n,r,o,i){var a=-1,u=e.length;for(r||(r=ui),i||(i=[]);++a<u;){var c=e[a];n>0&&r(c)?n>1?t(c,n-1,r,o,i):ar(i,c):o||(i[i.length]=c)}return i};var si=function(t){return(null==t?0:t.length)?ci(t,1):[]};var li=function(t){return qo(Wo(t,void 0,si),t+"")}((function(t,e){return null==t?{}:ii(t,e)}));function fi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function di(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var pi,hi,yi,vi,gi,bi,mi={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},_i=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey"],Oi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),di(this,"isSilentMode",!1),di(this,"stopZoomGraph",!1),di(this,"stopScrollGraph",!1),di(this,"stopMoveGraph",!1),di(this,"adjustEdge",!0),di(this,"adjustEdgeMiddle",!1),di(this,"adjustEdgeStartAndEnd",!1),di(this,"adjustNodePosition",!0),di(this,"hideAnchors",!1),di(this,"hoverOutline",!0),di(this,"nodeSelectedOutline",!0),di(this,"edgeSelectedOutline",!0),di(this,"nodeTextEdit",!0),di(this,"edgeTextEdit",!0),di(this,"nodeTextDraggable",!1),di(this,"edgeTextDraggable",!1),di(this,"multipleSelectKey",""),di(this,"defaultConfig",{}),Object(z.makeObservable)(this,{isSilentMode:z.observable,stopZoomGraph:z.observable,stopScrollGraph:z.observable,stopMoveGraph:z.observable,adjustEdge:z.observable,adjustEdgeMiddle:z.observable,adjustEdgeStartAndEnd:z.observable,adjustNodePosition:z.observable,hideAnchors:z.observable,hoverOutline:z.observable,nodeSelectedOutline:z.observable,edgeSelectedOutline:z.observable,nodeTextEdit:z.observable,edgeTextEdit:z.observable,nodeTextDraggable:z.observable,edgeTextDraggable:z.observable,updateEditConfig:z.action}),ni(this,this.getConfigDetail(e))}var e,n,r;return e=t,(n=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);ni(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,n=t.textEdit,r={};if(!1===e&&ni(r,this.defaultConfig),!0===e){var o=li(mi,_i);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable},ni(r,o)}!1===n&&ni(r,{nodeTextEdit:!1,edgeTextEdit:!1});var i=li(t,_i);return ni(r,i)}},{key:"getConfig",value:function(){return li(this,_i)}}])&&fi(e.prototype,n),r&&fi(e,r),t}();n(99);!function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(pi||(pi={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(hi||(hi={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(yi||(yi={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(vi||(vi={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_TEXT_UPDATE="node:text-update",t.NODE_PROPERTY_UPDATE="node:property-update",t.NODE_CONTEXTMENU="node:contextmenu",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_TEXT_UPDATE="edge:text-update",t.EDGE_PROPERTY_UPDATE="edge:property-update",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.HISTORY_INSERT="history:insert",t.TEXT_UPDATE="text:update",t.TEXT_DROP="text:drop",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(gi||(gi={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(bi||(bi={}));var Ei;function wi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return xi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xi(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Si(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ji(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(Ei||(Ei={}));var Pi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ji(this,"MINI_SCALE_SIZE",.2),ji(this,"MAX_SCALE_SIZE",16),ji(this,"SCALE_X",1),ji(this,"SKEW_Y",0),ji(this,"SKEW_X",0),ji(this,"SCALE_Y",1),ji(this,"TRANSLATE_X",0),ji(this,"TRANSLATE_Y",0),ji(this,"ZOOM_SIZE",.04),ji(this,"eventCenter",void 0),Object(z.makeObservable)(this,{SCALE_X:z.observable,SKEW_Y:z.observable,SKEW_X:z.observable,SCALE_Y:z.observable,TRANSLATE_X:z.observable,TRANSLATE_Y:z.observable,ZOOM_SIZE:z.observable,zoom:z.action,resetZoom:z.action,translate:z.action,focusOn:z.action}),this.eventCenter=e}var e,n,r;return e=t,(n=[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var e=wi(t,2),n=e[0],r=e[1];return[(n-this.TRANSLATE_X)/this.SCALE_X,(r-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=wi(t,2),n=e[0],r=e[1];return[n*this.SCALE_X+this.TRANSLATE_X,r*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,n){var r=wi(t,2),o=r[0],i=r[1];return[o+e/this.SCALE_X,i+n/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var t=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(t,")")}}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,n=this.SCALE_X,r=this.SCALE_Y;return!0===t?(n+=this.ZOOM_SIZE,r+=this.ZOOM_SIZE):!1===t?(n-=this.ZOOM_SIZE,r-=this.ZOOM_SIZE):"number"==typeof t&&(n=t,r=t),n<this.MINI_SCALE_SIZE||n>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(n-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(r-this.SCALE_Y)*e[1]),this.SCALE_X=n,this.SCALE_Y=r,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(gi.GRAPH_TRANSFORM,{type:t,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(t,e){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=e,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,e,n,r){var o=wi(this.CanvasPointToHtmlPoint([t,e]),2),i=n/2-o[0],a=r/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=a,this.emitGraphTransform("focusOn")}}])&&Si(e.prototype,n),r&&Si(e,r),t}();var Ai=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t};var ki=function(t,e){return t&&Yo(e,Ur(e),t)};var Ti=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},Di=Object.prototype.hasOwnProperty;var Mi=function(t){if(!un(t))return Ti(t);var e=Rr(t),n=[];for(var r in t)("constructor"!=r||!e&&Di.call(t,r))&&n.push(r);return n};var Ni=function(t){return Hr(t)?Mr(t,!0):Mi(t)};var Ri=function(t,e){return t&&Yo(e,Ni(e),t)},Ci=n(102);var Ii=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e};var Li=function(t,e){return Yo(t,pr(t),e)},Bi=Cr(Object.getPrototypeOf,Object),Hi=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ar(e,pr(t)),t=Bi(t);return e}:lr;var Ui=function(t,e){return Yo(t,Hi(t),e)};var Xi=function(t){return cr(t,Ni,Hi)},Gi=Object.prototype.hasOwnProperty;var Fi=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Gi.call(t,"index")&&(n.index=t.index,n.input=t.input),n};var Yi=function(t){var e=new t.constructor(t.byteLength);return new tr(e).set(new tr(t)),e};var zi=function(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},Vi=/\w*$/;var Wi=function(t){var e=new t.constructor(t.source,Vi.exec(t));return e.lastIndex=t.lastIndex,e},Ki=Ze?Ze.prototype:void 0,$i=Ki?Ki.valueOf:void 0;var Zi=function(t){return $i?Object($i.call(t)):{}};var qi=function(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var Ji=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Yi(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return zi(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return qi(t,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Wi(t);case"[object Set]":return new r;case"[object Symbol]":return Zi(t)}},Qi=Object.create,ta=function(){function t(){}return function(e){if(!un(e))return{};if(Qi)return Qi(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var ea=function(t){return"function"!=typeof t.constructor||Rr(t)?{}:ta(Bi(t))};var na=function(t){return yr(t)&&"[object Map]"==to(t)},ra=Ar.a&&Ar.a.isMap,oa=ra?Pr(ra):na;var ia=function(t){return yr(t)&&"[object Set]"==to(t)},aa=Ar.a&&Ar.a.isSet,ua=aa?Pr(aa):ia,ca={};ca["[object Arguments]"]=ca["[object Array]"]=ca["[object ArrayBuffer]"]=ca["[object DataView]"]=ca["[object Boolean]"]=ca["[object Date]"]=ca["[object Float32Array]"]=ca["[object Float64Array]"]=ca["[object Int8Array]"]=ca["[object Int16Array]"]=ca["[object Int32Array]"]=ca["[object Map]"]=ca["[object Number]"]=ca["[object Object]"]=ca["[object RegExp]"]=ca["[object Set]"]=ca["[object String]"]=ca["[object Symbol]"]=ca["[object Uint8Array]"]=ca["[object Uint8ClampedArray]"]=ca["[object Uint16Array]"]=ca["[object Uint32Array]"]=!0,ca["[object Error]"]=ca["[object Function]"]=ca["[object WeakMap]"]=!1;var sa=function t(e,n,r,o,i,a){var u,c=1&n,s=2&n,l=4&n;if(r&&(u=i?r(e,o,i,a):r(e)),void 0!==u)return u;if(!un(e))return e;var f=ur(e);if(f){if(u=Fi(e),!c)return Ii(e,u)}else{var d=to(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Object(Or.a)(e))return Object(Ci.a)(e,c);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(u=s||p?{}:ea(e),!c)return s?Ui(e,Ri(u,e)):Li(e,ki(u,e))}else{if(!ca[d])return i?e:{};u=Ji(e,d,c)}}a||(a=new Vn);var h=a.get(e);if(h)return h;a.set(e,u),ua(e)?e.forEach((function(o){u.add(t(o,n,r,o,e,a))})):oa(e)&&e.forEach((function(o,i){u.set(i,t(o,n,r,i,e,a))}));var y=f?void 0:(l?s?Xi:Xr:s?Ni:Ur)(e);return Ai(y||e,(function(o,i){y&&(o=e[i=o]),Fo(u,i,t(o,n,r,i,e,a))})),u};var la=function(t){return sa(t,5)};var fa=function(t,e,n){(void 0!==n&&!Ie(t[e],n)||void 0===n&&!(e in t))&&Xo(t,e,n)};var da=function(t){return yr(t)&&Hr(t)},pa=Function.prototype,ha=Object.prototype,ya=pa.toString,va=ha.hasOwnProperty,ga=ya.call(Object);var ba=function(t){if(!yr(t)||"[object Object]"!=an(t))return!1;var e=Bi(t);if(null===e)return!0;var n=va.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ya.call(n)==ga};var ma=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var _a=function(t){return Yo(t,Ni(t))};var Oa=function(t,e,n,r,o,i,a){var u=ma(t,n),c=ma(e,n),s=a.get(c);if(s)fa(t,n,s);else{var l=i?i(u,c,n+"",t,e,a):void 0,f=void 0===l;if(f){var d=ur(c),p=!d&&Object(Or.a)(c),h=!d&&!p&&Tr(c);l=c,d||p||h?ur(u)?l=u:da(u)?l=Ii(u):p?(f=!1,l=Object(Ci.a)(c,!0)):h?(f=!1,l=qi(c,!0)):l=[]:ba(c)||_r(c)?(l=u,_r(u)?l=_a(u):un(u)&&!sn(u)||(l=ea(c))):f=!1}f&&(a.set(c,l),o(l,c,r,i,a),a.delete(c)),fa(t,n,l)}};var Ea=function t(e,n,r,o,i){e!==n&&Io(n,(function(a,u){if(i||(i=new Vn),un(a))Oa(e,n,u,r,t,o,i);else{var c=o?o(ma(e,u),a,u+"",e,n,i):void 0;void 0===c&&(c=a),fa(e,u,c)}}),Ni)},wa=ti((function(t,e,n){Ea(t,e,n)})),xa={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}}},Sa=function(t){var e=la(xa);return t&&(e=wa(e,t)),e};n(74),n(190);function ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Pa=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r={},(n="_events")in(e=this)?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,r;return e=t,(n=[{key:"on",value:function(t,e,n){var r=this;return null==t||t.split(",").forEach((function(t){t=t.trim(),r._events[t]||(r._events[t]=[]),r._events[t].push({callback:e,once:!!n})})),this}},{key:"once",value:function(t,e){var n=this;null==t||t.split(",").forEach((function(t){return t=t.trim(),n.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var n=this;null==t||t.split(",").forEach((function(t){t=t.trim(),function(r){for(var o=r.length,i=0;i<o;i++)if(r[i]){var a=r[i],u=a.callback;a.once&&(r.splice(i,1),0===r.length&&delete n._events[t],o--,i--),u.apply(n,[e])}}(n._events[t]||[])}))}},{key:"off",value:function(t,e){var n=this;return t||(this._events={}),t.split(",").forEach((function(t){if(t=t.trim(),e){for(var r=n._events[t]||[],o=r.length,i=0;i<o;i++)r[i].callback===e&&(r.splice(i,1),o--,i--);0===r.length&&delete n._events[t]}else delete n._events[t]})),this}},{key:"getEvents",value:function(){return this._events}}])&&ja(e.prototype,n),r&&ja(e,r),t}();function Aa(t,e){return e*Math.round(t/e)||t}function ka(t,e){return t%e}function Ta(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Da(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Da(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Da(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ma,Na=function(t,e,n){var r=Ta(t,2),o=r[0],i=r[1],a=Ta(e,2),u=a[0],c=a[1],s=Ta(n,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},Ra=function(t,e){var n=!1;switch(e.multipleSelectKey){case"meta":n=t.metaKey;break;case"alt":n=t.altKey;break;case"shift":n=t.shiftKey;break;default:n=!1}return n},Ca=(n(75),n(156),n(122),n(76),n(10),n(11),n(12),n(44),n(28),new Uint8Array(16));function Ia(){if(!Ma&&!(Ma="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ma(Ca)}var La=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ba=function(t){return"string"==typeof t&&La.test(t)},Ha=[],Ua=0;Ua<256;++Ua)Ha.push((Ua+256).toString(16).substr(1));var Xa=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ha[t[e+0]]+Ha[t[e+1]]+Ha[t[e+2]]+Ha[t[e+3]]+"-"+Ha[t[e+4]]+Ha[t[e+5]]+"-"+Ha[t[e+6]]+Ha[t[e+7]]+"-"+Ha[t[e+8]]+Ha[t[e+9]]+"-"+Ha[t[e+10]]+Ha[t[e+11]]+Ha[t[e+12]]+Ha[t[e+13]]+Ha[t[e+14]]+Ha[t[e+15]]).toLowerCase();if(!Ba(n))throw TypeError("Stringified UUID is invalid");return n};var Ga=function(t,e,n){var r=(t=t||{}).random||(t.rng||Ia)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return Xa(r)},Fa=function(){return Ga()},Ya=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.nodes.reduce((function(t,n){return t[n.id]=e+Ga(),n.id=t[n.id],t}),{});return t.edges.forEach((function(t){t.id=e+Ga(),t.sourceNodeId=n[t.sourceNodeId],t.targetNodeId=n[t.targetNodeId]})),t},za=(n(100),n(199),function(t,e,n){var r=t.x,o=t.y;return(r-e.x)*(r-n.x)<=0&&(o-e.y)*(o-n.y)<=0});function Va(t){return(Va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ka(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wa(Object(n),!0).forEach((function(e){$a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wa(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function $a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Za=function(t){return t.anchors},qa=function(t,e){for(var n,r=e.nodes,o=r.length-1;o>=0;o--){var i=r[o];if(nu(t,i)){var a=Qa(t,i);if(a){var u={node:i,anchorIndex:a.index,anchor:a.anchor};n&&!Ja(i,n.node,e)||(n=u)}}}return n},Ja=function(t,e,n){return t.zIndex>e.zIndex||n.nodesMap[t.id].index>n.nodesMap[e.id].index},Qa=function(t,e){for(var n,r=Za(e),o=Number.MAX_SAFE_INTEGER,i=0;i<r.length;i++){var a=tu(t.x,t.y,r[i].x,r[i].y);a<o&&(o=a,n={index:i,anchor:Ka(Ka({},r[i]),{},{x:r[i].x,y:r[i].y,id:r[i].id})})}return n},tu=function(t,e,n,r){return Math.hypot(t-n,e-r)},eu=function(t,e){var n=!1,r=ru(e);return t.x>=r.minX-0&&t.x<=r.maxX+0&&t.y>=r.minY-0&&t.y<=r.maxY+0&&(n=!0),n},nu=function(t,e){var n=!1,r=ru(e);return t.x>=r.minX-5&&t.x<=r.maxX+5&&t.y>=r.minY-5&&t.y<=r.maxY+5&&(n=!0),n},ru=function(t){var e=t.x,n=t.y,r=t.width,o=t.height;return{minX:e-r/2,minY:n-o/2,maxX:e+r/2,maxY:n+o/2,x:e,y:n,width:r,height:o,centerX:e,centerY:n}},ou=function(t,e,n){var r,o=function(t){var e=t,n=e.x,r=e.y,o=e.width,i=e.height,a=e.radius;return[{x:n-o/2+a,y:r-i/2+a,r:a},{x:n+o/2-a,y:r-i/2+a,r:a},{x:n-o/2+a,y:r+i/2-a,r:a},{x:n+o/2-a,y:r+i/2-a,r:a}]}(n),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var n=tu(t.x,t.y,e.x,e.y);n<i&&(i=n,r=e)})),iu(t,e,r)},iu=function(t,e,n){var r,o=n,i=o.x,a=o.y,u=o.r;if(e===bi.HORIZONTAL){var c=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)),s=i+Math.sqrt(u*u-(t.y-a)*(t.y-a));r={x:Math.abs(c-t.x)<Math.abs(s-t.x)?c:s,y:t.y}}else if(e===bi.VERTICAL){var l=a-Math.sqrt(u*u-(t.x-i)*(t.x-i)),f=a+Math.sqrt(u*u-(t.x-i)*(t.x-i)),d=Math.abs(l-t.y)<Math.abs(f-t.y)?l:f;r={x:t.x,y:d}}return r},au=function(t,e){var n=e,r=!1,o=n.x-n.width/2+n.radius,i=n.x+n.width/2-n.radius,a=n.y-n.height/2+n.radius,u=n.y+n.height/2-n.radius,c=n.x,s=n.y,l=n.width,f=n.height;return t.y===s+f/2||t.y===s-f/2?r=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(r=t.y>a&&t.y<u),r},uu=function(t,e,n){var r,o=n,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===bi.HORIZONTAL){var s=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c)),l=i+Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c));r={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===bi.VERTICAL){var f=a-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),d=a+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),p=Math.abs(f-t.y)<Math.abs(d-t.y)?f:d;r={x:t.x,y:p}}return r},cu=function(t,e,n){for(var r,o=n.pointsPosition,i=Number.MAX_SAFE_INTEGER,a=[],u=0;u<o.length;u++)a.push({start:o[u],end:o[(u+1)%o.length]});return a.forEach((function(n){var o=n.start,a=n.end,u=o,c=a;o.x>a.x&&(u=a,c=o);var s={x:t.x,y:t.y};if(u.x===c.x&&e===bi.HORIZONTAL&&(s={x:u.x,y:t.y}),u.y===c.y&&e===bi.VERTICAL&&(s={x:t.x,y:u.y}),u.x!==c.x&&u.y!==c.y){var l=(c.y-u.y)/(c.x-u.x),f=(u.x*c.y-c.x*u.y)/(u.x-c.x);e===bi.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===bi.VERTICAL&&(s={x:t.x,y:l*t.x+f})}if(za(s,o,a)){var d=tu(s.x,s.y,t.x,t.y);d<i&&(i=d,r=s)}})),r},su=function(t,e,n,r){var o=t.x,i=t.y;return e.x>t.x?o=t.x+n/2:e.x<t.x&&(o=t.x-n/2),e.y>t.y?i=t.y+r/2:e.y<t.y&&(i=t.y-r/2),{x:o,y:i}},lu=function(t){var e=t.rows,n=t.style,r=t.rowsLength,o=t.className,i=document.createElement("div");i.style.fontSize=n.fontSize,i.style.width=n.width,i.className=o,i.style.lineHeight=n.lineHeight,i.style.padding=n.padding,n.fontFamily&&(i.style.fontFamily=n.fontFamily),r>1?e.forEach((function(t){var e=document.createElement("div");e.textContent=t,i.appendChild(e)})):i.textContent=e,document.body.appendChild(i);var a=i.clientHeight;return document.body.removeChild(i),a},fu=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,o=0;return e&&e.forEach((function(t){var e=Nc(t);o=e>o?e:o})),{width:Math.ceil(o/2)*r+r/4,height:n*(r+2)+r/4}},du=function(t){return"object"!==Va(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},pu={node:!1,edge:!1},hu={node:!0,edge:!0},yu={stroke:"red",strokeDasharray:"10 200",className:"lf-edge-animation"},vu=function(t){try{return la(t)}catch(e){return t}},gu=1e3,bu=999,mu=function(){return++gu};function _u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ou(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_u(Object(n),!0).forEach((function(e){wu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Eu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xu=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),wu(this,"id",Fa()),wu(this,"type",""),wu(this,"sourceNodeId",""),wu(this,"targetNodeId",""),wu(this,"startPoint",null),wu(this,"endPoint",null),wu(this,"text",{value:"",x:0,y:0,draggable:!1,editable:!0}),wu(this,"properties",{}),wu(this,"points",""),wu(this,"pointsList",[]),wu(this,"isSelected",!1),wu(this,"isHovered",!1),wu(this,"isHitable",!0),wu(this,"draggable",!0),wu(this,"visible",!0),wu(this,"graphModel",void 0),wu(this,"zIndex",0),wu(this,"BaseType",vi.EDGE),wu(this,"modelType",yi.EDGE),wu(this,"state",1),wu(this,"additionStateData",void 0),wu(this,"sourceAnchorId",""),wu(this,"targetAnchorId",""),wu(this,"menu",void 0),wu(this,"customTextPosition",!1),wu(this,"animationData",yu),Object(z.makeObservable)(this,{type:z.observable,sourceNodeId:z.observable,targetNodeId:z.observable,startPoint:z.observable,endPoint:z.observable,text:z.observable,properties:z.observable,points:z.observable,pointsList:z.observable,isSelected:z.observable,isHovered:z.observable,isHitable:z.observable,draggable:z.observable,visible:z.observable,zIndex:z.observable,state:z.observable,sourceNode:z.computed,targetNode:z.computed,textPosition:z.computed,setProperty:z.action,setProperties:z.action,formatText:z.action,resetTextPosition:z.action,moveText:z.action,setText:z.action,updateText:z.action,setAnchors:z.action,setSelected:z.action,setHovered:z.action,setHitable:z.action,setElementState:z.action,updateStartPoint:z.action,moveStartPoint:z.action,updateEndPoint:z.action,moveEndPoint:z.action,setZIndex:z.action,initPoints:z.action,updateAttributes:z.action,getAdjustStart:z.action,getAdjustEnd:z.action,updateAfterAdjustStartAndEnd:z.action}),this.graphModel=n,this.data=e}var e,n,r;return e=t,(n=[{key:"init",value:function(){this.initEdgeData(this.data),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(this.data)}},{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,n=e&&e(t.type);n&&(t.id=n);var r=this.createId();r&&(t.id=r)}ni(this,Bc(t)),this.graphModel.overlapMode===Ei.INCREASE&&(this.zIndex=t.zIndex||mu())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.baseEdge;return la(t)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return la(t)}},{key:"getAnimation",value:function(){var t=this.animationData;return la(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return la(t)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}},{key:"targetNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(t,e){var n,r;return Za(t).forEach((function(t){var o=Hc(t,e);r?o<r&&(r=o,n=t):(r=o,n=t)})),n}},{key:"getEndAnchor",value:function(t){var e,n,r=this;return Za(t).forEach((function(t){var o=Hc(t,r.startPoint);n?o<n&&(n=o,e=t):(n=o,e=t)})),e}},{key:"getProperties",value:function(){return Object(z.toJS)(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,n=t.y,r=t.value,o={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(z.toJS)(this.properties)};return r&&(o.text={x:e,y:n,value:r}),this.graphModel.overlapMode===Ei.INCREASE&&(o.zIndex=this.zIndex),o}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,e){this.properties[t]=vu(e),this.graphModel.eventCenter.emit(gi.EDGE_PROPERTY_UPDATE,{id:this.id,data:wu({},t,e)}),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Ou(Ou({},this.properties),vu(t)),this.graphModel.eventCenter.emit(gi.EDGE_PROPERTY_UPDATE,{id:this.id,data:t}),this.setAttributes()}},{key:"formatText",value:function(t){var e=this.textPosition,n=e.x,r=e.y;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||n,y:t.text.y||r,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:n,y:r,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var t=this.textPosition,e=t.x,n=t.y;this.text.x=e,this.text.y=n}},{key:"moveText",value:function(t,e){if(this.text){var n=this.text,r=n.x,o=n.y,i=n.value,a=n.draggable,u=n.editable;this.text={value:i,draggable:a,x:r+t,y:o+e,editable:u}}}},{key:"setText",value:function(t){t&&ni(this.text,t)}},{key:"updateText",value:function(t){var e={id:this.id,type:this.type,oldValue:this.text.value,newValue:t};this.text=Ou(Ou({},this.text),{},{value:t}),this.graphModel.eventCenter.emit(gi.EDGE_TEXT_UPDATE,e)}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){ni(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,n=t.endPoint;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:n.x,y:n.y})}}])&&Eu(e.prototype,n),r&&Eu(e,r),t}(),Su=xu;function ju(t){return(ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Au(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pu(Object(n),!0).forEach((function(e){Bu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pu(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ku(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Du(){return(Du="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Mu(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Mu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lu(t)););return t}function Nu(t,e){return(Nu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ru(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Lu(t);if(e){var o=Lu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cu(this,n)}}function Cu(t,e){if(e&&("object"===ju(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Iu(t)}function Iu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lu(t){return(Lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nu(t,e)}(i,t);var e,n,r,o=Ru(i);function i(){var t;ku(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Bu(Iu(t=o.call.apply(o,[this].concat(n))),"modelType",yi.LINE_EDGE),t}return e=i,(n=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return Au(Au({},Du(Lu(i.prototype),"getEdgeStyle",this).call(this)),la(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Tu(e.prototype,n),r&&Tu(e,r),i}(Su);function Uu(t){return(Uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Gu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gu(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Fu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Yu(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fu(Object(n),!0).forEach((function(e){Qu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fu(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function zu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vu(){return(Vu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Wu(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Wu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ju(t)););return t}function Ku(t,e){return(Ku=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ju(t);if(e){var o=Ju(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zu(this,n)}}function Zu(t,e){if(e&&("object"===Uu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qu(t)}function qu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ju(t){return(Ju=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Qu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var tc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ku(t,e)}(i,t);var e,n,r,o=$u(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Qu(qu(n=o.call(this,t,e)),"modelType",yi.POLYLINE_EDGE),Qu(qu(n),"draggingPointList",void 0),Qu(qu(n),"dbClickPosition",void 0),Object(z.makeObservable)(qu(n),{dbClickPosition:z.observable,dragAppend:z.action,dragAppendEnd:z.action}),n}return e=i,(n=[{key:"initEdgeData",value:function(t){this.offset=30,Vu(Ju(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return Yu(Yu({},Vu(Ju(i.prototype),"getEdgeStyle",this).call(this)),la(t))}},{key:"getTextPosition",value:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var n=this.dbClickPosition;return{x:n.x,y:n.y}}var r=Tc(this.points),o=Xu(Sc(r),2),i=o[0],a=o[1];return{x:(i.x+a.x)/2,y:(i.y+a.y)/2}}},{key:"getAfterAnchor",value:function(t,e,n){var r,o;return n.forEach((function(n){var i;t===bi.HORIZONTAL?i=Math.abs(e.y-n.y):t===bi.VERTICAL&&(i=Math.abs(e.x-n.x)),(!o||o>i)&&(o=i,r=n)})),r}},{key:"getCrossPoint",value:function(t,e,n){var r;return t===bi.HORIZONTAL?r={x:n.x,y:e.y}:t===bi.VERTICAL&&(r={x:e.x,y:n.y}),r}},{key:"removeCrossPoints",value:function(t,e,n){var r=n.map((function(t){return t}));if(1===t){var o=r[t],i=r[e],a=r[t-1];if(jc(a,o,this.sourceNode)){if(Pc(o,i,this.sourceNode)){var u=Ac(o,i,this.sourceNode);u&&(r[t]=u,r.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===a.x&&e.x===o.x||e.y===a.y&&e.y===o.y)&&tu(e.x,e.y,o.x,o.y)<tu(a.x,a.y,o.x,o.y)&&(r[t-1]=e)}))}if(e===n.length-2){var c=r[t],s=r[e],l=r[e+1];if(jc(s,l,this.targetNode)){if(Pc(c,s,this.targetNode)){var f=Ac(c,s,this.targetNode);f&&(r[e]=f,r.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===l.x&&t.x===s.x||t.y===l.y&&t.y===s.y)&&tu(t.x,t.y,s.x,s.y)<tu(l.x,l.y,s.x,s.y)&&(r[e+1]=t)}))}return r}},{key:"getDraggingPoints",value:function(t,e,n,r,o){var i=o.map((function(t){return t})),a=this.getAfterAnchor(t,n,r),u=this.getCrossPoint(t,n,a);return"start"===e?(i.unshift(u),i.unshift(a)):(i.push(u),i.push(a)),i}},{key:"updateCrossPoints",value:function(t){var e=t.map((function(t){return t})),n=t[0],r=t[1],o=t[e.length-2],i=t[e.length-1],a=this.sourceNode,u=this.targetNode,c=a.modelType,s=u.modelType,l=kc(n,r),f=e[0];switch(c){case yi.RECT_NODE:0!==a.radius&&(au(n,a)||(f=ou(n,l,a)));break;case yi.CIRCLE_NODE:f=iu(n,l,a);break;case yi.ELLIPSE_NODE:f=uu(n,l,a);break;case yi.DIAMOND_NODE:case yi.POLYGON_NODE:f=cu(n,l,a)}e[0]=f;var d=kc(o,i),p=e[e.length-1];switch(s){case yi.RECT_NODE:0!==u.radius&&(au(i,u)||(p=ou(i,d,u)));break;case yi.CIRCLE_NODE:p=iu(i,d,u);break;case yi.ELLIPSE_NODE:p=uu(i,d,u);break;case yi.DIAMOND_NODE:case yi.POLYGON_NODE:p=cu(i,d,u)}return e[e.length-1]=p,e}},{key:"getData",value:function(){var t=Vu(Ju(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Object.assign({},t,{pointsList:e})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var t=xc({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var n=t.start,r=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList,c=u;return a===bi.HORIZONTAL?(u[o]={x:n.x,y:n.y+e.y},u[i]={x:r.x,y:r.y+e.y},c=this.pointsList.map((function(t){return t}))):a===bi.VERTICAL&&(u[o]={x:n.x+e.x,y:n.y},u[i]={x:r.x+e.x,y:r.y},c=this.pointsList.map((function(t){return t}))),this.updatePointsAfterDrag(c),this.draggingPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppend",value:function(t,e){this.isDragging=!0;var n=t.start,r=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList;if(a===bi.HORIZONTAL){u[o]={x:n.x,y:n.y+e.y},u[i]={x:r.x,y:r.y+e.y};var c=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(c=this.removeCrossPoints(o,i,c)),0===o){var s={x:n.x,y:n.y+e.y};if(!eu(s,this.sourceNode)){var l=this.sourceNode.anchors;c=this.getDraggingPoints(a,"start",s,l,c)}}if(i===this.pointsList.length-1){var f={x:r.x,y:r.y+e.y};if(!eu(f,this.targetNode)){var d=this.targetNode.anchors;c=this.getDraggingPoints(a,"end",f,d,c)}}c=wc(c),this.updatePointsAfterDrag(c),this.draggingPointList=c}else if(a===bi.VERTICAL){u[o]={x:n.x+e.x,y:n.y},u[i]={x:r.x+e.x,y:r.y};var p=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(p=this.removeCrossPoints(o,i,p)),0===o){var h={x:n.x+e.x,y:n.y};if(!eu(h,this.sourceNode)){var y=this.sourceNode.anchors;p=this.getDraggingPoints(a,"start",h,y,p)}}if(i===this.pointsList.length-1){var v={x:r.x+e.x,y:r.y};if(!eu(v,this.targetNode)){var g=this.targetNode.anchors;p=this.getDraggingPoints(a,"end",v,g,p)}}p=wc(p),this.updatePointsAfterDrag(p),this.draggingPointList=p}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var t=Tc(this.points);this.pointsList=t.map((function(t){return t})),this.draggingPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var n=t[t.length-1];this.endPoint=Object.assign({},n)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,n=t.endPoint,r=t.sourceNode,o=t.targetNode,i=xc({x:e.x,y:e.y},{x:n.x,y:n.y},r,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&zu(e.prototype,n),r&&zu(e,r),i}(Su),ec=function(t){var e=t.start,n=t.end,r=t.offset,o=t.verticalLength,i=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},u=Math.atan((n.y-e.y)/(n.x-e.x)),c=Math.atan(r/o),s=Math.sqrt(o*o+r*r);return"start"===i?n.x>=e.x?(a.leftX=e.x+s*Math.sin(u+c),a.leftY=e.y-s*Math.cos(u+c),a.rightX=e.x-s*Math.sin(u-c),a.rightY=e.y+s*Math.cos(u-c)):(a.leftX=e.x-s*Math.sin(u+c),a.leftY=e.y+s*Math.cos(u+c),a.rightX=e.x+s*Math.sin(u-c),a.rightY=e.y-s*Math.cos(u-c)):"end"===i&&(n.x>=e.x?(a.leftX=n.x+s*Math.sin(u-c),a.leftY=n.y-s*Math.cos(u-c),a.rightX=n.x-s*Math.sin(u+c),a.rightY=n.y+s*Math.cos(u+c)):(a.leftX=n.x-s*Math.sin(u-c),a.leftY=n.y+s*Math.cos(u-c),a.rightX=n.x+s*Math.sin(u+c),a.rightY=n.y-s*Math.cos(u+c))),a};function nc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function rc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nc(Object(n),!0).forEach((function(e){oc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function oc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ic(t){return function(t){if(Array.isArray(t))return sc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||cc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ac(t){return(ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||cc(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cc(t,e){if(t){if("string"==typeof t)return sc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sc(t,e):void 0}}function sc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var lc=function(t){var e=[],n={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,n[e]=t})),Object.keys(n).forEach((function(t){e.push(n[t])})),e},fc=function(t,e){return 0===t.width&&0===t.height?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},dc=function(t,e){return function(t,e){var n=Math.abs(t.x-e.centerX),r=Math.abs(t.y-e.centerY);return n/e.width>r/e.height?bi.HORIZONTAL:bi.VERTICAL}(e,t)===bi.HORIZONTAL?{x:e.x>t.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},pc=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(n+o)/2,centerY:(r+i)/2,minX:n,minY:r,maxX:o,maxY:i,height:i-r,width:o-n}},hc=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=[],r=[];t.forEach((function(t){n.push(t.x),r.push(t.y)}));var o=Math.min.apply(Math,n),i=Math.max.apply(Math,n),a=Math.min.apply(Math,r),u=Math.max.apply(Math,r),c=i-o,s=u-a;return e&&(c+=e,s+=e),{centerX:(o+i)/2,centerY:(a+u)/2,maxX:i,maxY:u,minX:o,minY:a,x:(o+i)/2,y:(a+u)/2,height:s,width:c}},yc=function(t){var e=t.minX,n=t.minY,r=t.maxX,o=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:o},{x:e,y:o}]},vc=function(t,e){var n=t.x,r=t.y;return n<e.minX||n>e.maxX||r<e.minY||r>e.maxY},gc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},bc=function(t,e,n,r,o){return gc(t,e)+gc(t,n)+function(t,e){var n=0;return e.forEach((function(e){e&&(t.x===e.x&&(n+=-2),t.y===e.y&&(n+=-2))})),n}(t,[e,n,r,o])},mc=function(t,e,n,r){var o=e.x-t.x,i=e.y-t.y,a=r.x-n.x,u=r.y-n.y,c=(-i*(t.x-n.x)+o*(t.y-n.y))/(-a*i+o*u),s=(a*(t.y-n.y)-u*(t.x-n.x))/(-a*i+o*u);return c>=0&&c<=1&&s>=0&&s<=1},_c=function(t,e,n){if(0===n.width&&0===n.height)return!1;var r=uc(yc(n),4),o=r[0],i=r[1],a=r[2],u=r[3];return mc(t,e,o,i)||mc(t,e,o,u)||mc(t,e,i,a)||mc(t,e,a,u)},Oc=function(t,e,n,r,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=bc(e,n,e);var d={};t.forEach((function(t){d[t.id]=t}));for(var p=function(){var p,h,y,v=void 0,g=1/0;if(c.forEach((function(t){f[t.id]<g&&(g=f[t.id],v=t)})),v===n){var b=[];return function t(e,n,r,o,i){i||(i=0),e.unshift(n[o]),r[o]&&r[o]!==o&&i<=100&&t(e,n,r,r[o],i+1)}(b,d,s,n.id),{v:b}}h=v,(y=(p=c).indexOf(h))>-1&&p.splice(y,1),u.push(v),function(t,e,n,r){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||_c(t,e,n)||_c(t,e,r)||o.push(t))})),lc(o)}(t,v,r,o).forEach((function(t){if(-1===u.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var r=f[v.id]+gc(v,t);l[t.id]&&r>=l[t.id]||(s[t.id]=v.id,l[t.id]=r,f[t.id]=l[t.id]+bc(t,n,e,i,a))}}))};c.length;){var h=p();if("object"===ac(h))return h.v}return[e,n]},Ec=function(t){return ru(t)},wc=function(t){for(var e=t,n=1;n<e.length-1;){var r=e[n-1],o=e[n],i=e[n+1];r.x===o.x&&o.x===i.x||r.y===o.y&&o.y===i.y?e.splice(n,1):n++}return e},xc=function(t,e,n,r,o){var i,a,u=Ec(n),c=Ec(r),s=fc(u,o),l=fc(c,o),f=dc(s,t),d=dc(l,e);if(i=s,a=l,2*Math.abs(i.centerX-a.centerX)<i.width+a.width&&2*Math.abs(i.centerY-a.centerY)<i.height+a.height){var p=Dc(t,e,f,d);return[t,f].concat(ic(p),[d,e])}var h=hc([f,d]),y=pc(s,h),v=pc(l,h),g=[];g=(g=g.concat(yc(y))).concat(yc(v));var b={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[h,y,v].forEach((function(t){g=g.concat(function(t,e){return function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]}(t,e.x).concat(function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]}(t,e.y))}(t,b).filter((function(t){return vc(t,s)&&vc(t,l)})))})),[{x:f.x,y:d.y},{x:d.x,y:f.y}].forEach((function(t){vc(t,s)&&vc(t,l)&&g.push(t)})),g.unshift(f),g.push(d),g=lc(g);var m=Oc(g,f,d,u,c,t,e);return m.unshift(t),m.push(e),m.length>2&&(m=wc(m)),lc(m)},Sc=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var n=t[0],r=t[1],o=tu(n.x,n.y,r.x,r.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=tu(a.x,a.y,u.x,u.y);c>o&&(o=c,n=a,r=u)}e=[n,r]}return e},jc=function(t,e,n){var r=eu(t,n),o=eu(e,n);return r&&o},Pc=function(t,e,n){var r=eu(t,n),o=eu(e,n);return!(r&&o)&&(r||o)},Ac=function(t,e,n){for(var r,o,i=ru(n),a=yc(i),u=0;u<a.length;u++){mc(t,e,a[u],a[(u+1)%a.length])&&(o=[a[u],a[(u+1)%a.length]])}return o&&(r=function(t,e,n,r){var o=(e.y-t.y)*(r.x-n.x)-(t.x-e.x)*(n.y-r.y);if(0===o)return!1;var i=((e.x-t.x)*(r.x-n.x)*(n.y-t.y)+(e.y-t.y)*(r.x-n.x)*t.x-(r.y-n.y)*(e.x-t.x)*n.x)/o,a=-((e.y-t.y)*(r.y-n.y)*(n.x-t.x)+(e.x-t.x)*(r.y-n.y)*t.y-(r.x-n.x)*(e.y-t.y)*n.y)/o;return(i-t.x)*(i-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(i-n.x)*(i-r.x)<=0&&(a-n.y)*(a-r.y)<=0&&{x:i,y:a}}(t,e,o[0],o[1])),r},kc=function(t,e){var n;return t.x===e.x?n=bi.VERTICAL:t.y===e.y&&(n=bi.HORIZONTAL),n},Tc=function(t){var e=t.split(" "),n=[];return e&&e.forEach((function(t){var e=uc(t.split(","),2),r=e[0],o=e[1];n.push({x:Number(r),y:Number(o)})})),n},Dc=function(t,e,n,r){var o=[];if(kc(t,n)===kc(e,r))t.y===n.y?(o.push({x:n.x,y:(n.y+r.y)/2}),o.push({x:r.x,y:(n.y+r.y)/2})):(o.push({x:(n.x+r.x)/2,y:n.y}),o.push({x:(n.x+r.x)/2,y:r.y}));else{var i={x:n.x,y:r.y},a=za(i,t,n),u=za(i,e,r);if(a||u)i={x:r.x,y:n.y};else{var c=Mc(i,t,n),s=Mc(i,e,r);c&&s&&(i={x:r.x,y:n.y})}o.push(i)}return o},Mc=function(t,e,n){return t.x===e.x&&t.x===n.x||t.y===e.y&&t.y===n.y},Nc=function(t){if(!t)return 0;for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:e+=r>=1&&r<=126||r>=65376&&r<=65439?1:2}return e},Rc=function(t){var e=t.start,n=t.end,r=t.sourceNode,o=t.targetNode,i=t.offset,a=ru(r),u=ru(o),c=fc(a,i),s=fc(u,i);return{sNext:dc(c,e),ePre:dc(s,n)}},Cc=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Ic(e[0]),Ic(e[1]),Ic(e[2]),Ic(e[3])]},Ic=function(t){var e=uc(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Lc=function(t,e){for(var n,r=t.x,o=t.y,i=Tc(e),a=Number.MAX_SAFE_INTEGER,u=[],c=0;c<i.length;c++)u.push({start:i[c],end:i[(c+1)%i.length]});if(u.forEach((function(t){var e=t.start,i=t.end;if(e.x===i.x){var u={x:e.x,y:o};if(za(u,e,i)){var c=Math.abs(e.x-r);c<a&&(a=c,n=u)}}else if(e.y===i.y){var s={x:r,y:e.y};if(za(s,e,i)){var l=Math.abs(e.y-o);l<a&&(a=l,n=s)}}})),!n){var s=u[0],l=s.start,f=s.end;n={x:l.x+(f.x-l.x)/2,y:l.y+(f.y-l.y)/2}}return n},Bc=function(t){return li(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Hc=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};n(200);var Uc=function(){};function Xc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fc=window.document;function Yc(t){var e=t.onDragStart,n=void 0===e?Uc:e,r=t.onDragging,o=void 0===r?Uc:r,i=t.onDragEnd,a=void 0===i?Uc:i,u=t.step,c=void 0===u?1:u,s=t.isStopPropagation,l=void 0===s||s,f=!1,d=!1,p=0,h=0,y=0,v=0;function g(t){if(l&&t.stopPropagation(),d&&(f=!0,y+=t.clientX-p,v+=t.clientY-h,p=t.clientX,h=t.clientY,Math.abs(y)>c||Math.abs(v)>c)){var e=y%c,n=v%c,r=y-e,i=v-n;y=e,v=n,o({deltaX:r,deltaY:i,event:t})}}function b(t){if(l&&t.stopPropagation(),d=!1,Fc.removeEventListener("mousemove",g,!1),Fc.removeEventListener("mouseup",b,!1),f)return f=!1,a({event:t})}return function(t){if(0===t.button)return l&&t.stopPropagation(),d=!0,p=t.clientX,h=t.clientY,Fc.addEventListener("mousemove",g,!1),Fc.addEventListener("mouseup",b,!1),n({event:t})}}var zc=function(){function t(e){var n=this,r=e.onDragStart,o=void 0===r?Uc:r,i=e.onDragging,a=void 0===i?Uc:i,u=e.onDragEnd,c=void 0===u?Uc:u,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,d=void 0===f?null:f,p=e.step,h=void 0===p?1:p,y=e.isStopPropagation,v=void 0===y||y,g=e.model,b=void 0===g?null:g;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Gc(this,"onDragStart",void 0),Gc(this,"onDragging",void 0),Gc(this,"onDragEnd",void 0),Gc(this,"step",void 0),Gc(this,"isStopPropagation",void 0),Gc(this,"isDragging",!1),Gc(this,"isStartDragging",!1),Gc(this,"startX",0),Gc(this,"startY",0),Gc(this,"sumDeltaX",0),Gc(this,"sumDeltaY",0),Gc(this,"eventType",void 0),Gc(this,"eventCenter",void 0),Gc(this,"model",void 0),Gc(this,"startTime",void 0),Gc(this,"handleMouseDown",(function(t){var e,r;if(0===t.button){n.isStopPropagation&&t.stopPropagation(),n.isStartDragging=!0,n.startX=t.clientX,n.startY=t.clientY,Fc.addEventListener("mousemove",n.handleMouseMove,!1),Fc.addEventListener("mouseup",n.handleMouseUp,!1);var o=null===(e=n.model)||void 0===e?void 0:e.getData();null===(r=n.eventCenter)||void 0===r||r.emit(gi["".concat(n.eventType,"_MOUSEDOWN")],{e:t,data:o}),n.startTime=(new Date).getTime()}})),Gc(this,"handleMouseMove",(function(t){if(n.isStopPropagation&&t.stopPropagation(),n.isStartDragging&&(n.sumDeltaX+=t.clientX-n.startX,n.sumDeltaY+=t.clientY-n.startY,n.startX=t.clientX,n.startY=t.clientY,n.step<=1||Math.abs(n.sumDeltaX)>n.step||Math.abs(n.sumDeltaY)>n.step)){var e,r=n.sumDeltaX%n.step,o=n.sumDeltaY%n.step,i=n.sumDeltaX-r,a=n.sumDeltaY-o;n.sumDeltaX=r,n.sumDeltaY=o;var u,c=null===(e=n.model)||void 0===e?void 0:e.getData();if(!n.isDragging)null===(u=n.eventCenter)||void 0===u||u.emit(gi["".concat(n.eventType,"_DRAGSTART")],{e:t,data:c}),n.onDragStart({event:t});n.isDragging=!0,setTimeout((function(){var e,r;n.onDragging({deltaX:i,deltaY:a,event:t}),null===(e=n.eventCenter)||void 0===e||e.emit(gi["".concat(n.eventType,"_MOUSEMOVE")],{e:t,data:c}),null===(r=n.eventCenter)||void 0===r||r.emit(gi["".concat(n.eventType,"_DRAG")],{e:t,data:c})}))}})),Gc(this,"handleMouseUp",(function(t){n.isStartDragging=!1,n.isStopPropagation&&t.stopPropagation(),Promise.resolve().then((function(){var e,r,o;Fc.removeEventListener("mousemove",n.handleMouseMove,!1),Fc.removeEventListener("mouseup",n.handleMouseUp,!1);var i=null===(e=n.model)||void 0===e?void 0:e.getData();null===(r=n.eventCenter)||void 0===r||r.emit(gi["".concat(n.eventType,"_MOUSEUP")],{e:t,data:i}),n.isDragging&&(n.isDragging=!1,n.onDragEnd({event:t}),null===(o=n.eventCenter)||void 0===o||o.emit(gi["".concat(n.eventType,"_DROP")],{e:t,data:i}))}))})),Gc(this,"cancelDrag",(function(){Fc.removeEventListener("mousemove",n.handleMouseMove,!1),Fc.removeEventListener("mouseup",n.handleMouseUp,!1),n.isDragging=!1})),this.onDragStart=o,this.onDragging=a,this.onDragEnd=c,this.step=h,this.isStopPropagation=v,this.eventType=l,this.eventCenter=d,this.model=b}var e,n,r;return e=t,(n=[{key:"setStep",value:function(t){this.step=t}}])&&Xc(e.prototype,n),r&&Xc(e,r),t}();function Vc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vc(Object(n),!0).forEach((function(e){ts(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Kc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||Zc(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $c(t){return function(t){if(Array.isArray(t))return qc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Zc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zc(t,e){if(t){if("string"==typeof t)return qc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qc(t,e):void 0}}function qc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Jc(t){return(Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ts(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object(z.configure)({isolateGlobalState:!0});var es,ns=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ts(this,"rootEl",void 0),ts(this,"width",void 0),ts(this,"height",void 0),ts(this,"theme",void 0),ts(this,"eventCenter",void 0),ts(this,"modelMap",new Map),ts(this,"topElement",void 0),ts(this,"animation",void 0),ts(this,"idGenerator",void 0),ts(this,"nodeMoveRules",[]),ts(this,"edgeType",void 0),ts(this,"nodes",[]),ts(this,"edges",[]),ts(this,"overlapMode",Ei.DEFAULT),ts(this,"background",void 0),ts(this,"transformModel",void 0),ts(this,"editConfigModel",void 0),ts(this,"gridSize",1),ts(this,"partial",!1),ts(this,"fakerNode",void 0),Object(z.makeObservable)(this,{width:z.observable,height:z.observable,edgeType:z.observable,nodes:z.observable,edges:z.observable,overlapMode:z.observable,background:z.observable,transformModel:z.observable,editConfigModel:z.observable,gridSize:z.observable,partial:z.observable,fakerNode:z.observable,nodesMap:z.computed,edgesMap:z.computed,modelsMap:z.computed,sortElements:z.computed,textEditElement:z.computed,selectElements:z.computed,setFakerNode:z.action,removeFakerNode:z.action,setModel:z.action,toFront:z.action,setElementZIndex:z.action,deleteNode:z.action,addNode:z.action,cloneNode:z.action,moveNode:z.action,moveNode2Coordinate:z.action,editText:z.action,addEdge:z.action,moveEdge:z.action,deleteEdgeBySourceAndTarget:z.action,deleteEdgeById:z.action,deleteEdgeBySource:z.action,deleteEdgeByTarget:z.action,graphDataToModel:z.action,setElementStateById:z.action,updateText:z.action,selectNodeById:z.action,selectEdgeById:z.action,selectElementById:z.action,clearSelectElements:z.action,moveNodes:z.action,setDefaultEdgeType:z.action,changeNodeType:z.action,changeEdgeType:z.action,getNodeIncomingEdge:z.action,getNodeOutgoingEdge:z.action,getNodeIncomingNode:z.action,getNodeOutgoingNode:z.action,setTheme:z.action,resize:z.action,clearData:z.action,translateCenter:z.action,fitView:z.action});var n,r=e.container,o=e.background,i=void 0===o?{}:o,a=e.grid,u=e.idGenerator,c=e.animation;this.background=i,"object"===Jc(a)&&(this.gridSize=a.size),this.rootEl=r,this.editConfigModel=new Oi(e),this.eventCenter=new Pa,this.transformModel=new Pi(this.eventCenter),this.theme=Sa(e.style),this.edgeType=e.edgeType||"polyline",e.width||(e.width=r.getBoundingClientRect().width),e.height||(e.height=r.getBoundingClientRect().height),this.width=e.width,this.height=e.height,this.animation=(n=c)&&"boolean"!=typeof n?wa(la(pu),n):la(!0===n?hu:pu),this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=u}var e,n,r;return e=t,(n=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,n){return t[e.id]={index:n,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,n){return t[e.id]={index:n,model:e},t}),{})}},{key:"modelsMap",get:function(){return[].concat($c(this.nodes),$c(this.edges)).reduce((function(t,e){return t[e.id]=e,t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)})),t=t.sort((function(t,e){return t.zIndex-e.zIndex}));for(var e=[],n=-1,r=[-200,-200],o=[this.width+200,this.height+200],i=0;i<t.length;i++){var a=t[i];a.visible&&(!this.partial||a.isSelected||this.isElementInArea(a,r,o,!1,!1))&&(9999===a.zIndex&&(n=e.length),e.push(a))}if(-1!==n){var u=e[e.length-1];e[e.length-1]=e[n],e[n]=u}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===pi.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===pi.TEXT_EDIT}));return t||e}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach((function(e){e.isSelected&&t.set(e.id,e)})),this.edges.forEach((function(e){e.isSelected&&t.set(e.id,e)})),t}},{key:"getAreaElement",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=[],i=[];this.nodes.forEach((function(t){return i.push(t)})),this.edges.forEach((function(t){return i.push(t)}));for(var a=0;a<i.length;a++){var u=i[a];this.isElementInArea(u,t,e,n,r)&&o.push(u)}return o}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",value:function(t){var e;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}},{key:"getPointByClient",value:function(t){var e=t.x,n=t.y,r=this.rootEl.getBoundingClientRect(),o={x:e-r.left,y:n-r.top},i=Kc(this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(t.BaseType===vi.NODE){for(var i=ru(t=t),a=i.minX,u=i.minY,c=i.maxX,s=i.maxY,l=[{x:a,y:u},{x:c,y:u},{x:c,y:s},{x:a,y:s}],f=o,d=0;d<l.length;d++){var p=l[d],h=p.x,y=p.y,v=this.transformModel.CanvasPointToHtmlPoint([h,y]),g=Kc(v,2);if(h=g[0],y=g[1],Na([h,y],e,n)!==o){f=!o;break}}return f}if(t.BaseType===vi.EDGE){var b=t=t,m=b.startPoint,_=b.endPoint,O=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),E=this.transformModel.CanvasPointToHtmlPoint([_.x,_.y]),w=Na(O,e,n),x=Na(E,e,n);return r?w&&x:w||x}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=Ho(t.nodes,(function(t){var n=e.getModel(t.type);if(!n)throw new Error("找不到".concat(t.type,"对应的节点。"));var r=t.x,o=t.y;r&&o&&(t.x=Aa(r,e.gridSize),t.y=Aa(o,e.gridSize),"object"===Jc(t.text)&&(t.text.x-=ka(r,e.gridSize),t.text.y-=ka(o,e.gridSize)));var i=new n(t,e);return i.init(),i})),this.edges=Ho(t.edges,(function(t){var n=e.getModel(t.type);if(!n)throw new Error("找不到".concat(t.type,"对应的边。"));var r=new n(t,e);return r.init(),r}))}},{key:"modelToGraphData",value:function(){var t=[];this.edges.forEach((function(e){var n=e.getData();n&&t.push(n)}));var e=[];return this.nodes.forEach((function(t){var n=t.getData();n&&e.push(n)})),{nodes:e,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,e=[],n=0;n<this.nodes.length;n++){var r=this.nodes[n];if(r.isDragging){t=!0;break}e.push(r.getHistoryData())}if(t)return!1;for(var o=!1,i=[],a=0;a<this.edges.length;a++){var u=this.edges[a];if(u.isDragging){o=!0;break}i.push(u.getHistoryData())}return!o&&{nodes:e,edges:i}}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.modelsMap[t]}},{key:"getNodeEdges",value:function(t){for(var e=[],n=0;n<this.edges.length;n++){var r=this.edges[n],o=this.edges[n].sourceNodeId===t,i=this.edges[n].targetNodeId===t;(o||i)&&e.push(r)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,n={nodes:[],edges:[]};return e.forEach((function(r){if(r.BaseType===vi.NODE&&n.nodes.push(r.getData()),r.BaseType===vi.EDGE){var o=r.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&n.edges.push(o)}})),n}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"changeNodeId",value:function(t,e){return e||(e=Fa()),this.nodesMap[e]?(console.warn("当前流程图已存在节点".concat(e,", 修改失败")),""):this.nodesMap[t]?(this.edges.forEach((function(n){n.sourceNodeId===t&&(n.sourceNodeId=e),n.targetNodeId===t&&(n.targetNodeId=e)})),this.nodesMap[t].model.id=e,e):(console.warn("当前流程图找不到节点".concat(e,", 修改失败")),"")}},{key:"changeEdgeId",value:function(t,e){return e||(e=Fa()),this.edgesMap[e]?(console.warn("当前流程图已存在边: ".concat(e,", 修改失败")),""):this.edgesMap[t]?(this.edges.forEach((function(n){n.id===t&&(n.id=e)})),e):(console.warn("当前流程图找不到边: ".concat(e,", 修改失败")),"")}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"toFront",value:function(t){var e,n,r,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);o&&(this.overlapMode===Ei.DEFAULT&&(null===(r=this.topElement)||void 0===r||r.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===Ei.INCREASE&&this.setElementZIndex(t,"top"))}},{key:"setElementZIndex",value:function(t,e){var n,r,o,i=(null===(n=this.nodesMap[t])||void 0===n?void 0:n.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);i&&("number"==typeof e&&(o=e),"top"===e&&(o=mu()),"bottom"===e&&(o=--bu),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(gi.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=vu(t);e.id&&this.nodesMap[t.id]&&delete e.id;var n=this.getModel(e.type);if(!n)throw new Error("找不到".concat(e.type,"对应的节点,请确认是否已注册此类型节点。"));var r=new n(e,this);r.init(),this.nodes.push(r);var o=r.getData();return this.eventCenter.emit(gi.NODE_ADD,{data:o}),r}},{key:"cloneNode",value:function(t){var e=this.getNodeModelById(t),n=e.getData();n.x+=30,n.y+=30,delete n.id,n.text&&(n.text.x+=30,n.text.y+=30);var r=this.addNode(n);return r.setSelected(!0),e.setSelected(!1),r.getData()}},{key:"moveNode",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,a=i.move(e,n,r);a&&this.moveEdge(t,e,n)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"moveNode2Coordinate",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,a=i.x,u=i.y,c=e-a,s=n-u;this.moveNode(t,c,s,r)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"editText",value:function(t){this.setElementStateById(t,pi.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=vu(t),n=e.type;n||(n=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var r=this.getModel(n);if(!r)throw new Error("找不到".concat(n,"对应的边,请确认是否已注册此类型边。"));var o=new r(Wc(Wc({},e),{},{type:n}),this);o.init();var i=o.getData();return this.edges.push(o),this.eventCenter.emit(gi.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,n){for(var r=0;r<this.edges.length;r++){var o,i=this.edges[r],a=i.textPosition,u=a.x,c=a.y,s=this.edges[r].sourceNodeId===t,l=this.edges[r].targetNodeId===t;if(s&&i.moveStartPoint(e,n),l&&i.moveEndPoint(e,n),s||l)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===yi.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,d=Lc(f,i.points);i.moveText(d.x-f.x,d.y-f.y)}else{var p=i.textPosition,h=p.x,y=p.y;i.moveText(h-u,y-c)}}}},{key:"deleteEdgeBySourceAndTarget",value:function(t,e){for(var n=0;n<this.edges.length;n++)if(this.edges[n].sourceNodeId===t&&this.edges[n].targetNodeId===e){var r=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(gi.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeById",value:function(t){if(this.edgesMap[t]){var e=this.edgesMap[t].index,n=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(gi.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var n=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(gi.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var n=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(gi.EDGE_DELETE,{data:n})}}},{key:"setElementStateById",value:function(t,e,n){this.nodes.forEach((function(r){r.id===t?r.setElementState(e,n):r.setElementState(pi.DEFAULT)})),this.edges.forEach((function(r){r.id===t?r.setElementState(e,n):r.setElementState(pi.DEFAULT)}))}},{key:"updateText",value:function(t,e){this.nodes.forEach((function(n){n.id===t&&n.updateText(e)})),this.edges.forEach((function(n){n.id===t&&n.updateText(e)}))}},{key:"selectNodeById",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||this.clearSelectElements();var r=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||this.clearSelectElements();var r=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||this.clearSelectElements();var n=this.getElement(t);null==n||n.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===Ei.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveNodes",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.forEach((function(t){return r.moveNode(t,e,n,o)}))}},{key:"addNodeMoveRules",value:function(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}},{key:"setDefaultEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,e){var n=this.getNodeModelById(t);if(n){var r=n.getData();r.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(r,this);i.init(),this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var n=su(i,e.startPoint,i.width,i.height);e.updateStartPoint(n)}if(e.targetNodeId===t){var r=su(i,e.endPoint,i.width,i.height);e.updateEndPoint(r)}}))}else console.warn("找不到id为".concat(t,"的节点"))}},{key:"changeEdgeType",value:function(t,e){var n=this.getEdgeModelById(t);if(n){if(n.type!==e){var r=n.getData();r.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete r.pointsList;var i=new o(r,this);i.init(),this.edges.splice(this.edgesMap[t].index,1,i)}}else console.warn("找不到id为".concat(t,"的边"))}},{key:"getNodeIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(n){n.targetNodeId===t&&e.push(n)})),e}},{key:"getNodeOutgoingEdge",value:function(t){var e=[];return this.edges.forEach((function(n){n.sourceNodeId===t&&e.push(n)})),e}},{key:"getNodeIncomingNode",value:function(t){var e=this,n=[];return this.edges.forEach((function(r){r.targetNodeId===t&&n.push(e.nodesMap[r.sourceNodeId].model)})),n}},{key:"getNodeOutgoingNode",value:function(t){var e=this,n=[];return this.edges.forEach((function(r){r.sourceNodeId===t&&n.push(e.nodesMap[r.targetNodeId].model)})),n}},{key:"setTheme",value:function(t){this.theme=Sa(Wc(Wc({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=null!=t?t:this.width,this.height=null!=e?e:this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,e=[],n=[];t.forEach((function(t){var r=t.x,o=t.y,i=t.width,a=t.height,u=t.getNodeStyle().strokeWidth,c=void 0===u?0:u;e=e.concat([r+i/2+c,r-i/2-c]),n=n.concat([o+a/2+c,o-a/2-c])}));var r=Math.min.apply(Math,$c(e)),o=Math.max.apply(Math,$c(e)),i=Math.min.apply(Math,$c(n)),a=o-r||0,u=Math.max.apply(Math,$c(n))-i||0;return{virtualRectWidth:a,virtualRectHeight:u,virtualRectCenterPositionX:r+a/2,virtualRectCenterPositionY:i+u/2}}},{key:"translateCenter",value:function(){var t=this.nodes,e=this.width,n=this.height,r=this.rootEl,o=this.transformModel;if(t.length){var i=e||r.clientWidth,a=n||r.clientHeight,u=this.getVirtualRectSize(),c=u.virtualRectCenterPositionX,s=u.virtualRectCenterPositionY;o.focusOn(c,s,i,a)}}},{key:"fitView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.nodes,n=this.width,r=this.height,o=this.rootEl,i=this.transformModel;if(e.length){var a=n||o.clientWidth,u=r||o.clientHeight,c=this.getVirtualRectSize(),s=c.virtualRectWidth,l=c.virtualRectHeight,f=c.virtualRectCenterPositionX,d=c.virtualRectCenterPositionY,p=(s+t)/a,h=(l+t)/u,y=0;y=1/Math.max(p,h);var v=[a/2,u/2];i.zoom(y,v),i.focusOn(f,d,a,u)}}}])&&Qc(e.prototype,n),r&&Qc(e,r),t}(),rs=ns;function os(t){return(os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function is(){return(is=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function as(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function us(t,e){return(us=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fs(t);if(e){var o=fs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ss(this,n)}}function ss(t,e){if(e&&("object"===os(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ls(t)}function ls(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fs(t){return(fs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ds(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ps,hs=Ne(es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&us(t,e)}(i,t);var e,n,r,o=cs(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),ds(ls(e=o.call(this)),"stepDrag",void 0),ds(ls(e),"stepScrollX",0),ds(ls(e),"stepScrollY",0),ds(ls(e),"ref",void 0),ds(ls(e),"setRef",(function(t){e.ref=t})),ds(ls(e),"onDragging",(function(t){var n=t.deltaX,r=t.deltaY;e.setState({isDragging:!0});var o=e.props.graphModel,i=o.transformModel;o.editConfigModel.stopMoveGraph||i.translate(n,r)})),ds(ls(e),"onDragEnd",(function(){e.setState({isDragging:!1})})),ds(ls(e),"zoomHandler",(function(t){var n=e.props,r=n.graphModel,o=r.editConfigModel,i=r.transformModel,a=r.gridSize,u=n.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){var l=u.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,d=l.y;i.zoom(t.deltaY<0,[f,d])}}else{if(e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=a){var p=e.stepScrollX%a,h=e.stepScrollX-p;i.translate(-h*i.SCALE_X,0),e.stepScrollX=p}if(Math.abs(e.stepScrollY)>=a){var y=e.stepScrollY%a,v=e.stepScrollY-y;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=y}}})),ds(ls(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var n=e.props.graphModel;n.selectElements.size>0&&n.clearSelectElements(),n.eventCenter.emit(gi.BLANK_CLICK,{e:t})}})),ds(ls(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var n=e.props.graphModel,r=n.getPointByClient({x:t.clientX,y:t.clientY});n.eventCenter.emit(gi.BLANK_CONTEXTMENU,{e:t,position:r})}})),ds(ls(e),"mouseDownHandler",(function(t){var n=e.props.graphModel,r=n.eventCenter,o=n.editConfigModel,i=n.transformModel.SCALE_X,a=n.gridSize,u=t.target,c=!o.adjustEdge&&!o.adjustNodePosition;("canvas-overlay"===u.getAttribute("name")||c)&&(o.stopMoveGraph?r.emit(gi.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(a*i),e.stepDrag.handleMouseDown(t)),e.clickHandler(t))}));var n=t.graphModel,r=n.gridSize,a=n.eventCenter;return e.stepDrag=new zc({onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:r,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:null}),e.state={isDragging:!1},e}return e=i,(n=[{key:"componentDidMount",value:function(){var t=this.props.graphModel.editConfigModel,e=t.stopScrollGraph,n=t.stopZoomGraph;e&&n||this.rootEl.addEventListener("mousewheel",this.zoomHandler,{passive:!0}),this.rootEl.addEventListener("mousedown",this.mouseDownHandler),this.rootEl.addEventListener("contextmenu",this.handleContextMenu)}},{key:"componentWillUnmount",value:function(){var t=this.props.graphModel.editConfigModel,e=t.stopScrollGraph,n=t.stopZoomGraph;e&&n||this.rootEl.removeEventListener("mousewheel",this.zoomHandler),this.rootEl.removeEventListener("mousedown",this.mouseDownHandler),this.rootEl.removeEventListener("contextmenu",this.handleContextMenu)}},{key:"rootEl",get:function(){return this.ref}},{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props,n=e.children,r=e.dnd,o=this.state.isDragging;return v("svg",is({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",ref:this.setRef,className:o?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},r.eventMap()),v("g",{transform:t},n))}}])&&as(e.prototype,n),r&&as(e,r),i}(_))||es;function ys(t){return(ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bs(t,e){return(bs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ms(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Es(t);if(e){var o=Es(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _s(this,n)}}function _s(t,e){if(e&&("object"===ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Os(t)}function Os(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Es(t){return(Es=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ws(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xs=Ne(ps=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&bs(t,e)}(i,t);var e,n,r,o=ms(i);function i(){var t;vs(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ws(Os(t=o.call.apply(o,[this].concat(n))),"setToolOverlayRef",(function(e){var n=t.props.tool.getInstance();n.components.forEach((function(t){return t(n,e)})),n.components=[]})),t}return e=i,(n=[{key:"getTools",value:function(){var t=this.props,e=t.tool,n=t.graphModel,r=e.getTools().map((function(t){return v(t,{graphModel:n,logicFlow:e.instance})}));return e.components=r,r}},{key:"render",value:function(){return v("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&gs(e.prototype,n),r&&gs(e,r),i}(_))||ps;function Ss(t){return(Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function js(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ps(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function As(t,e){return(As=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ks(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ds(t);if(e){var o=Ds(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ts(this,n)}}function Ts(t,e){if(e&&("object"===Ss(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ds(t){return(Ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ms,Ns=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&As(t,e)}(i,t);var e,n,r,o=ks(i);function i(){return js(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(){return v("div",{className:"lf-background"},v("div",{style:this.props.background,className:"lf-background-area"}))}}])&&Ps(e.prototype,n),r&&Ps(e,r),i}(_);function Rs(t){return(Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Is(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ls(t,e){return(Ls=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Bs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xs(t);if(e){var o=Xs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Hs(this,n)}}function Hs(t,e){if(e&&("object"===Rs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Us(t)}function Us(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xs(t){return(Xs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fs=Ne(Ms=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ls(t,e)}(i,t);var e,n,r,o=Bs(i);function i(){var t;Cs(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Gs(Us(t=o.call.apply(o,[this].concat(n))),"id",Fa()),t}return e=i,(n=[{key:"renderDot",value:function(){var t=this.props,e=t.config,n=e.color,r=e.thickness,o=void 0===r?2:r,i=t.size,a=t.visible,u=Math.min(Math.max(2,o),i/2),c=1;return a||(c=0),v("rect",{width:u,height:u,rx:u/2,ry:u/2,fill:n,opacity:c})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,n=e.color,r=e.thickness,o=void 0===r?1:r,i=t.size,a=t.visible,u=Math.min(Math.max(1,o),i/2),c=1;return a||(c=0),v("path",{d:"M ".concat(i," 0 H0 M0 0 V0 ").concat(i),stroke:n,strokeWidth:u,opacity:c})}},{key:"render",value:function(){var t=this.props,e=t.type,n=t.size,r=t.graphModel.transformModel,o=[r.SCALE_X,r.SKEW_Y,r.SKEW_X,r.SCALE_Y,r.TRANSLATE_X,r.TRANSLATE_Y].join(","),i="matrix(".concat(o,")");return v("div",{className:"lf-grid"},v("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},v("defs",null,v("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:n,height:n},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),v("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Is(e.prototype,n),r&&Is(e,r),i}(_))||Ms;Fs.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};n(49);function Ys(t){return(Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vs(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vs(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ws,Ks=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var n=zs(t,2),r=n[0],o=n[1];"object"!==Ys(o)&&(e[r]=o)})),v("line",e)};function $s(t){return($s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function qs(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zs(Object(n),!0).forEach((function(e){Js(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Js(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function el(t,e){return(el=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ol(t);if(e){var o=ol(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return rl(this,n)}}function rl(t,e){if(e&&("object"===$s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ol(t){return(ol=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var il,al=Ne(Ws=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&el(t,e)}(i,t);var e,n,r,o=nl(i);function i(){return Qs(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,n=t.isShowHorizontal,r=t.isShowVertical,o=t.getStyle(),i=e.x,a=void 0===i?0:i,u=e.y,c=void 0===u?0:u,s=qs(qs({x1:-1e5,y1:c,x2:1e5,y2:c},o),{},{stroke:n?o.stroke:"none"}),l=qs(qs({x1:a,y1:-1e5,x2:a,y2:1e5},o),{},{stroke:r?o.stroke:"none"});return v("g",{className:"lf-snapline"},v(Ks,s),v(Ks,l))}}])&&tl(e.prototype,n),r&&tl(e,r),i}(_))||Ws;function ul(t){return(ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return sl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sl(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ll(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=t.className,a=t.radius,u=e-r/2,c=n-o/2,s={};return Object.entries(t).forEach((function(t){var e=cl(t,2),n=e[0],r=e[1];"object"!==ul(r)&&(s[n]=r)})),s.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",a&&(s.rx=a,s.ry=a),s.x=u,s.y=c,v("rect",s)}function fl(t){return(fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dl(){return(dl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function pl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function hl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?pl(Object(n),!0).forEach((function(e){yl(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function yl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bl(t,e){return(bl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ml(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ol(t);if(e){var o=Ol(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _l(this,n)}}function _l(t,e){if(e&&("object"===fl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ol(t){return(Ol=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}ll.defaultProps={className:"",radius:""};var El,wl=Ne(il=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&bl(t,e)}(i,t);var e,n,r,o=ml(i);function i(){return vl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getNodesOutline",value:function(){var t=this.props.graphModel,e=t.nodes,n=t.editConfigModel,r=n.hoverOutline,o=n.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.isHovered||t.isSelected){var e=t.isHovered,n=t.isSelected,a=t.x,u=t.y,c=t.width,s=t.height;if(o&&n||r&&e){var l=t.getOutlineStyle(),f={};if(Object.keys(l).forEach((function(t){"hover"!==t&&(f[t]=l[t])})),e){var d=l.hover;f=hl(hl({},f),d)}i.push(v(ll,dl({className:"lf-outline-node",x:a,y:u,width:c+10,height:s+10},f)))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,n=t.editConfigModel,r=n.edgeSelectedOutline,o=n.hoverOutline,i=[],a=0;a<e.length;a++){var u=e[a];(r&&u.isSelected||o&&u.isHovered)&&(u.modelType===yi.LINE_EDGE?i.push(this.getLineOutline(u)):u.modelType===yi.POLYLINE_EDGE?i.push(this.getPolylineOutline(u)):u.modelType===yi.BEZIER_EDGE&&i.push(this.getBezierOutline(u)))}return i}},{key:"getLineOutline",value:function(t){var e=t.startPoint,n=t.endPoint;return v(ll,dl({className:"lf-outline-edge",x:(e.x+n.x)/2,y:(e.y+n.y)/2,width:Math.abs(e.x-n.x)+10,height:Math.abs(e.y-n.y)+10},t.getOutlineStyle()))}},{key:"getPolylineOutline",value:function(t){var e=t.points,n=Tc(e),r=hc(n,8);return v(ll,dl({className:"lf-outline",x:r.x,y:r.y,width:r.width,height:r.height},t.getOutlineStyle()))}},{key:"getBezierOutline",value:function(t){var e=t.path,n=Cc(e),r=hc(n,8);return v(ll,dl({className:"lf-outline",x:r.x,y:r.y,width:r.width,height:r.height},t.getOutlineStyle()))}},{key:"render",value:function(){return v("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&gl(e.prototype,n),r&&gl(e,r),i}(_))||il;function xl(t){return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Sl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return jl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jl(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Pl(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.r,a=void 0===i?4:i,u=t.className,c={cx:n,cy:o,r:a,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=Sl(t,2),n=e[0],r=e[1];"object"!==xl(r)&&(c[n]=r)})),c.className=u?"lf-basic-shape ".concat(u):"lf-basic-shape",v("circle",c)}function Al(t){return(Al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Tl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tl(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Dl(){return(Dl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Ml(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rl(t,e,n){return e&&Nl(t.prototype,e),n&&Nl(t,n),t}function Cl(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Il(t,e)}function Il(t,e){return(Il=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ll(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ul(t);if(e){var o=Ul(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bl(this,n)}}function Bl(t,e){if(e&&("object"===Al(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hl(t)}function Hl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ul(t){return(Ul=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gl,Fl=function(t){Cl(n,t);var e=Ll(n);function n(){var t;return Ml(this,n),Xl(Hl(t=e.call(this)),"dragHandler",void 0),Xl(Hl(t),"onDragging",(function(e){var n=e.event,r=t.props,o=r.graphModel,i=r.bezierModel,a=r.type,u=o.getPointByClient({x:n.clientX,y:n.clientY}).canvasOverlayPosition,c=u.x,s=u.y;i.updateAdjustAnchor({x:c,y:s},a)})),Xl(Hl(t),"onDragEnd",(function(){var e=t.props,n=e.bezierModel,r=e.graphModel.eventCenter;n.isDragging=!1,r.emit(gi.EDGE_ADJUST,{data:n.getData()})})),t.dragHandler=new zc({onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return Rl(n,[{key:"render",value:function(){var t=this,e=this.props.position;return v(Pl,Dl({className:"lf-bezier-adjust-anchor",x:e.x,y:e.y},this.props.bezierModel.getEdgeStyle().adjustAnchor,{onMouseDown:function(e){t.dragHandler.handleMouseDown(e)}}))}}]),n}(_),Yl=Ne(El=function(t){Cl(n,t);var e=Ll(n);function n(){return Ml(this,n),e.apply(this,arguments)}return Rl(n,[{key:"getBezierAdjust",value:function(t,e){var n=t.path,r=t.id,o=kl(Cc(n),4),i=o[0],a=o[1],u=o[2],c=o[3],s=t.getEdgeStyle().adjustLine,l=[];return l.push(v(Ks,Dl({x1:i.x,y1:i.y,x2:a.x,y2:a.y},s))),l.push(v(Fl,{position:a,bezierModel:t,graphModel:e,key:"".concat(r,"_ePre"),type:"sNext"})),l.push(v(Ks,Dl({x1:c.x,y1:c.y,x2:u.x,y2:u.y},s))),l.push(v(Fl,{position:u,bezierModel:t,graphModel:e,key:"".concat(r,"_sNext"),type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,n=[],r=0;r<e.length;r++){var o=e[r];o.isSelected&&o.modelType===yi.BEZIER_EDGE&&o.draggable&&n.push(this.getBezierAdjust(o,t))}return n}},{key:"render",value:function(){return v("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(_))||El;function zl(t){return(zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kl(t,e){return(Kl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ql(t);if(e){var o=ql(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zl(this,n)}}function Zl(t,e){if(e&&("object"===zl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ql(t){return(ql=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jl,Ql=Ne(Gl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kl(t,e)}(i,t);var e,n,r,o=$l(i);function i(){return Vl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},v("g",{transform:this.props.graphModel.transformModel.getTransformStyle().transform},this.props.children))}}])&&Wl(e.prototype,n),r&&Wl(e,r),i}(_))||Gl;function tf(t){return(tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ef(){return(ef=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function nf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function of(t,e){return(of=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function af(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=cf(t);if(e){var o=cf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return uf(this,n)}}function uf(t,e){if(e&&("object"===tf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function cf(t){return(cf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var sf=Ne(Jl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&of(t,e)}(i,t);var e,n,r,o=af(i);function i(){return nf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getComponent",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay",r=this.props.getView,o=r(t.type);return v(o,{key:t.id,model:t,graphModel:e,overlay:n})}},{key:"render",value:function(){var t=this,e=this.props,n=e.graphModel,r=e.tool,o=e.options,i=e.dnd,a=e.snaplineModel,u={};o.width&&(u.width="".concat(n.width,"px")),o.height&&(u.height="".concat(n.height,"px"));var c=n.fakerNode,s=n.editConfigModel.adjustEdge;return v("div",{className:"lf-graph",style:u},v(hs,{graphModel:n,dnd:i},v("g",{className:"lf-base"},Ho(n.sortElements,(function(e){return t.getComponent(e,n)}))),c?this.getComponent(c,n):""),v(Ql,{graphModel:n},v(wl,{graphModel:n}),s?v(Yl,{graphModel:n}):"",o.isSilentMode||!1===o.snapline?"":v(al,{snaplineModel:a})),v(xs,{graphModel:n,tool:r}),o.background&&v(Ns,{background:o.background}),o.grid&&v(Fs,ef({},o.grid,{graphModel:n})))}}])&&rf(e.prototype,n),r&&rf(e,r),i}(_))||Jl;function lf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ff(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lf(Object(n),!0).forEach((function(e){pf(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function df(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hf=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),pf(this,"nodeConfig",void 0),pf(this,"lf",void 0),pf(this,"fakerNode",void 0),pf(this,"stopDrag",(function(){n.nodeConfig=null,window.document.removeEventListener("mouseup",n.stopDrag)})),pf(this,"dragEnter",(function(t){n.nodeConfig&&!n.fakerNode&&(n.fakerNode=n.lf.createFakerNode(ff(ff({},n.nodeConfig),n.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),pf(this,"onDragOver",(function(t){if(t.preventDefault(),n.fakerNode){var e=n.clientToLocalPoint({x:t.clientX,y:t.clientY}),r=e.x,o=e.y;n.fakerNode.moveTo(r,o);var i=n.fakerNode.getData();n.lf.setNodeSnapLine(i),n.lf.graphModel.eventCenter.emit(gi.NODE_DND_DRAG,{data:i})}return!1})),pf(this,"onDragLeave",(function(){n.fakerNode&&(n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakerNode(),n.fakerNode=null)})),pf(this,"onDrop",(function(t){if(n.lf.graphModel&&t&&n.nodeConfig){var e=n.lf.addNode(ff(ff({},n.nodeConfig),n.clientToLocalPoint({x:t.clientX,y:t.clientY})));t.preventDefault(),t.stopPropagation(),n.nodeConfig=null,n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakerNode(),n.fakerNode=null;var r=e.getData();n.lf.graphModel.eventCenter.emit(gi.NODE_DND_ADD,{data:r})}}));var r=e.lf;this.lf=r}var e,n,r;return e=t,(n=[{key:"clientToLocalPoint",value:function(t){var e=t.x,n=t.y,r=jo(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:n}).canvasOverlayPosition,i=o.x,a=o.y;return{x:Aa(i,r),y:Aa(a,r)}}},{key:"startDrag",value:function(t){this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&df(e.prototype,n),r&&df(e,r),t}();function yf(t){var e=t.container,n=t.grid,r=t.width,o=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if("string"==typeof r||"string"==typeof o)throw new Error("width或height不支持传入字符串,请传数字");return n&&(t.grid=ni({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),ni({},vf,t)}var vf={background:!1,grid:!1,textEdit:!0,isPropertiesChangeHistory:!0,disabledTools:[]};function gf(t){return(gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return mf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mf(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Of(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_f(Object(n),!0).forEach((function(e){Tf(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ef(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wf(){return(wf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=xf(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function xf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kf(t)););return t}function Sf(t,e){return(Sf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function jf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=kf(t);if(e){var o=kf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pf(this,n)}}function Pf(t,e){if(e&&("object"===gf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Af(t)}function Af(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kf(t){return(kf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Tf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Df=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sf(t,e)}(i,t);var e,n,r,o=jf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Tf(Af(n=o.call(this,t,e)),"modelType",yi.BEZIER_EDGE),Tf(Af(n),"path",""),Object(z.makeObservable)(Af(n),{path:z.observable,updateAdjustAnchor:z.action}),n}return e=i,(n=[{key:"initEdgeData",value:function(t){this.offset=100,wf(kf(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return Of(Of({},wf(kf(i.prototype),"getEdgeStyle",this).call(this)),la(t))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(n){var r=n.x,o=n.y;t+=r,e+=o})),{x:t/this.pointsList.length,y:e/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},{key:"getData",value:function(){var t=wf(kf(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Of(Of({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Rc({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=bf(t,4),n=e[0],r=e[1],o=e[2],i=e[3];return"M ".concat(n.x," ").concat(n.y,"\n C ").concat(r.x," ").concat(r.y,",\n ").concat(o.x," ").concat(o.y,",\n ").concat(i.x," ").concat(i.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var t=this.getControls(),e=t.sNext,n=t.ePre;this.updatePath(e,n)}},{key:"updatePath",value:function(t,e){var n={x:this.startPoint.x,y:this.startPoint.y},r={x:this.endPoint.x,y:this.endPoint.y};if(!t||!e){var o=this.getControls();t=o.sNext,e=o.ePre}this.pointsList=[n,t,e,r],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e;var n=bf(this.pointsList,3),r=n[1],o=n[2];r.x+=t,r.y+=e,this.updatePath(r,o)}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e;var n=bf(this.pointsList,3),r=n[1],o=n[2];o.x+=t,o.y+=e,this.updatePath(r,o)}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,n=t.endPoint,r=t.sourceNode,o=t.targetNode,i=Rc({start:e,end:n,sourceNode:r,targetNode:o,offset:this.offset}),a=i.sNext,u=i.ePre;this.pointsList=[e,a,u,n],this.initPoints()}}])&&Ef(e.prototype,n),r&&Ef(e,r),i}(Su);var Mf=function(t){return null==t};function Nf(t){return(Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Cf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cf(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Cf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function If(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Lf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?If(Object(n),!0).forEach((function(e){Hf(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):If(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Bf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Uf=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Hf(this,"id",Fa()),Hf(this,"type",""),Hf(this,"x",0),Hf(this,"y",0),Hf(this,"text",{value:"",x:0,y:0,draggable:!1,editable:!0}),Hf(this,"properties",{}),Hf(this,"_width",100),Hf(this,"_height",80),Hf(this,"anchorsOffset",[]),Hf(this,"isSelected",!1),Hf(this,"isHovered",!1),Hf(this,"isDragging",!1),Hf(this,"isHitable",!0),Hf(this,"draggable",!0),Hf(this,"visible",!0),Hf(this,"graphModel",void 0),Hf(this,"zIndex",1),Hf(this,"state",1),Hf(this,"autoToFront",!0),Hf(this,"BaseType",vi.NODE),Hf(this,"modelType",yi.NODE),Hf(this,"additionStateData",void 0),Hf(this,"targetRules",[]),Hf(this,"sourceRules",[]),Hf(this,"moveRules",[]),Hf(this,"hasSetTargetRules",!1),Hf(this,"hasSetSourceRules",!1),Object(z.makeObservable)(this,{type:z.observable,x:z.observable,y:z.observable,text:z.observable,properties:z.observable,_width:z.observable,_height:z.observable,anchorsOffset:z.observable,isSelected:z.observable,isHovered:z.observable,isDragging:z.observable,isHitable:z.observable,draggable:z.observable,visible:z.observable,zIndex:z.observable,state:z.observable,autoToFront:z.observable,incoming:z.computed,outgoing:z.computed,addNodeMoveRules:z.action,move:z.action,moveTo:z.action,setIsDragging:z.action,moveText:z.action,updateText:z.action,setSelected:z.action,setHovered:z.action,setHitable:z.action,setElementState:z.action,setProperty:z.action,setProperties:z.action,setZIndex:z.action,updateAttributes:z.action}),this.graphModel=n,this.data=e}var e,n,r;return e=t,(n=[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}},{key:"init",value:function(){this.initNodeData(this.data),this.setAttributes()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,n=e&&e(t.type);n&&(t.id=n);var r=this.createId();r&&(t.id=r)}this.formatText(t),ni(this,function(t){return li(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===Ei.INCREASE&&(this.zIndex=t.zIndex||mu())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&"string"==typeof t.text?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&void 0===t.text.editable&&(t.text.editable=!0)}},{key:"getData",value:function(){var t=this.text,e=t.x,n=t.y,r=t.value,o=this.properties;Object(z.isObservable)(o)&&(o=Object(z.toJS)(o));var i={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return this.graphModel.overlapMode===Ei.INCREASE&&(i.zIndex=this.zIndex),r&&(i.text={x:e,y:n,value:r}),i}},{key:"setIsDragging",value:function(t){this.isDragging=t}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(z.toJS)(this.properties)}},{key:"getNodeStyle",value:function(){return Lf({},this.graphModel.theme.baseNode)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return la(t)}},{key:"getAnchorStyle",value:function(t){var e=this.graphModel.theme.anchor;return la(e)}},{key:"getAnchorLineStyle",value:function(){var t=this.graphModel.theme.anchorLine;return la(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return la(t)}},{key:"isAllowConnectedAsSource",value:function(t,e,n){var r=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var o,i=!0,a=0;a<r.length;a++){var u=r[a];if(!u.validate.call(this,this,t,e,n)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,n){var r=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var o,i=!0,a=0;a<r.length;a++){var u=r[a];if(!u.validate.call(this,t,this,e,n)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"isAllowMoveNode",value:function(t,e){var n,r=!0,o=!0,i=Rf(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(i.s();!(n=i.n()).done;){var a=(0,n.value)(this,t,e);if(!a)return!1;if("object"===Nf(a)){var u=a;if(!1===u.x&&!1===u.y)return!1;r=r&&u.x,o=o&&u.y}}}catch(t){i.e(t)}finally{i.f()}return{x:r,y:o}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.id,n=this.x,r=this.y;return t&&t.length>0?t.map((function(t,o){return t.length?(t=t,{id:"".concat(e,"_").concat(o),x:n+t[0],y:r+t[1]}):Lf(Lf({},t=t),{},{x:n+t.x,y:r+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){return this.getAnchorsByOffset()}},{key:"getAnchorInfo",value:function(t){if(!Mf(t))for(var e=0;e<this.anchors.length;e++){var n=this.anchors[e];if(n.id===t)return n}}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,o=!1;if(n)r=!0,o=!0;else{var i=this.isAllowMoveNode(t,e);"boolean"==typeof i?(r=i,o=i):(r=i.x,o=i.y)}if(r){var a=this.x+t;this.x=a,this.text&&this.moveText(t,0)}if(o){var u=this.y+e;this.y=u,this.text&&this.moveText(0,e)}return r||o}},{key:"moveTo",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t-this.x,o=e-this.y;return this.move(r,o,n)}},{key:"moveText",value:function(t,e){var n=this.text,r=n.x,o=n.y,i=n.value,a=n.draggable,u=n.editable;this.text={value:i,editable:u,draggable:a,x:r+t,y:o+e}}},{key:"updateText",value:function(t){var e=this.id;this.text=Lf(Lf({},this.text),{},{value:t}),this.graphModel.eventCenter.emit(gi.NODE_TEXT_UPDATE,{id:e,text:this.text})}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"setProperty",value:function(t,e){this.properties=Lf(Lf({},this.properties),{},Hf({},t,vu(e))),this.setAttributes(),this.graphModel.eventCenter.emit(gi.NODE_PROPERTY_UPDATE,{id:this.id,data:Hf({},t,e)})}},{key:"setProperties",value:function(t){this.properties=Lf(Lf({},this.properties),vu(t)),this.setAttributes(),this.graphModel.eventCenter.emit(gi.NODE_PROPERTY_UPDATE,{id:this.id,data:t})}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){ni(this,t)}}])&&Bf(e.prototype,n),r&&Bf(e,r),t}();function Xf(t){return(Xf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ff(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Gf(Object(n),!0).forEach((function(e){Jf(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Yf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zf(){return(zf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Vf(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Vf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qf(t)););return t}function Wf(t,e){return(Wf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=qf(t);if(e){var o=qf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $f(this,n)}}function $f(t,e){if(e&&("object"===Xf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zf(t)}function Zf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qf(t){return(qf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Jf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wf(t,e)}(i,t);var e,n,r,o=Kf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Jf(Zf(n=o.call(this,t,e)),"modelType",yi.CIRCLE_NODE),Jf(Zf(n),"r",50),Object(z.makeObservable)(Zf(n),{r:z.observable,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var t=zf(qf(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return Ff(Ff({},t),la(e))}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.r;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+n,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-n,y:e,id:"".concat(this.id,"_3")}]}}])&&Yf(e.prototype,n),r&&Yf(e,r),i}(Uf);n(124);function td(t){return(td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ed(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return nd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nd(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function rd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function od(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rd(Object(n),!0).forEach((function(e){pd(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function id(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ad(){return(ad="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=ud(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function ud(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dd(t)););return t}function cd(t,e){return(cd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dd(t);if(e){var o=dd(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ld(this,n)}}function ld(t,e){if(e&&("object"===td(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fd(t)}function fd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dd(t){return(dd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cd(t,e)}(i,t);var e,n,r,o=sd(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),pd(fd(n=o.call(this,t,e)),"modelType",yi.DIAMOND_NODE),pd(fd(n),"rx",30),pd(fd(n),"ry",50),Object(z.makeObservable)(fd(n),{rx:z.observable,ry:z.observable,points:z.computed,pointsPosition:z.computed,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getNodeStyle",value:function(){var t=ad(dd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return od(od({},t),la(e))}},{key:"points",get:function(){var t=this.x,e=this.y,n=this.rx,r=this.ry;return[[t,e-r],[t+n,e],[t,e+r],[t-n,e]]}},{key:"pointsPosition",get:function(){return this.points.map((function(t){return{x:t[0],y:t[1]}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=ed(n,1)[0];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=ed(n,2)[1];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this;return this.points.map((function(e,n){var r=ed(e,2);return{x:r[0],y:r[1],id:"".concat(t.id,"_").concat(n)}}))}}])&&id(e.prototype,n),r&&id(e,r),i}(Uf);function yd(t){return(yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function gd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vd(Object(n),!0).forEach((function(e){jd(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function md(){return(md="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=_d(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function _d(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Sd(t)););return t}function Od(t,e){return(Od=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ed(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Sd(t);if(e){var o=Sd(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wd(this,n)}}function wd(t,e){if(e&&("object"===yd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return xd(t)}function xd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sd(t){return(Sd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function jd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Od(t,e)}(i,t);var e,n,r,o=Ed(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),jd(xd(n=o.call(this,t,e)),"modelType",yi.ELLIPSE_NODE),jd(xd(n),"rx",30),jd(xd(n),"ry",45),Object(z.makeObservable)(xd(n),{rx:z.observable,ry:z.observable,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getNodeStyle",value:function(){var t=md(Sd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return gd(gd({},t),la(e))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.rx,r=this.ry;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+n,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-n,y:e,id:"".concat(this.id,"_3")}]}}])&&bd(e.prototype,n),r&&bd(e,r),i}(Uf);function Ad(t){return(Ad="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function kd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Td(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Td(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Td(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Dd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Md(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dd(Object(n),!0).forEach((function(e){Xd(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Nd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rd(){return(Rd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Cd(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Cd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ud(t)););return t}function Id(t,e){return(Id=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ld(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ud(t);if(e){var o=Ud(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bd(this,n)}}function Bd(t,e){if(e&&("object"===Ad(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hd(t)}function Hd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ud(t){return(Ud=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Id(t,e)}(i,t);var e,n,r,o=Ld(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Xd(Hd(n=o.call(this,t,e)),"modelType",yi.POLYGON_NODE),Xd(Hd(n),"points",[[50,0],[100,50],[50,100],[0,50]]),Object(z.makeObservable)(Hd(n),{points:z.observable,pointsPosition:z.computed,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getNodeStyle",value:function(){var t=Rd(Ud(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return Md(Md({},t),la(e))}},{key:"pointsPosition",get:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return this.points.map((function(o){return{x:o[0]+t-n/2,y:o[1]+e-r/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=kd(n,1)[0];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=kd(n,2)[1];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this,e=this.x,n=this.y,r=this.width,o=this.height;return this.points.map((function(i,a){var u=kd(i,2),c=u[0],s=u[1];return{x:e+c-r/2,y:n+s-o/2,id:"".concat(t.id,"_").concat(a)}}))}}])&&Nd(e.prototype,n),r&&Nd(e,r),i}(Uf);function Fd(t){return(Fd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function zd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yd(Object(n),!0).forEach((function(e){tp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Vd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wd(){return(Wd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Kd(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Kd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qd(t)););return t}function $d(t,e){return($d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Qd(t);if(e){var o=Qd(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qd(this,n)}}function qd(t,e){if(e&&("object"===Fd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Jd(t)}function Jd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qd(t){return(Qd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ep=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$d(t,e)}(i,t);var e,n,r,o=Zd(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),tp(Jd(n=o.call(this,t,e)),"modelType",yi.RECT_NODE),tp(Jd(n),"radius",0),Object(z.makeObservable)(Jd(n),{radius:z.observable}),n}return e=i,(n=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return[{x:t,y:e-r/2,id:"".concat(this.id,"_0")},{x:t+n/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r/2,id:"".concat(this.id,"_2")},{x:t-n/2,y:e,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var t=Wd(Qd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return zd(zd({},t),la(e))}}])&&Vd(e.prototype,n),r&&Vd(e,r),i}(Uf);function np(t){return(np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function op(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rp(Object(n),!0).forEach((function(e){pp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ip(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ap(){return(ap="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=up(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function up(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=dp(t)););return t}function cp(t,e){return(cp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dp(t);if(e){var o=dp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lp(this,n)}}function lp(t,e){if(e&&("object"===np(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fp(t)}function fp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dp(t){return(dp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cp(t,e)}(i,t);var e,n,r,o=sp(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),pp(fp(n=o.call(this,t,e)),"modelType",yi.TEXT_NODE),Object(z.makeObservable)(fp(n),{width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getTextStyle",value:function(){var t=ap(dp(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return op(op({},t),la(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return fu({rows:t,fontSize:e,rowsLength:t.length}).width}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return fu({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&ip(e.prototype,n),r&&ip(e,r),i}(Uf);function yp(t){return(yp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bp(t,e){return(bp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ep(t);if(e){var o=Ep(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _p(this,n)}}function _p(t,e){if(e&&("object"===yp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Op(t)}function Op(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ep(t){return(Ep=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function wp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&bp(t,e)}(i,t);var e,n,r,o=mp(i);function i(){var t;vp(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return wp(Op(t=o.call.apply(o,[this].concat(n))),"modelType",yi.HTML_NODE),t}return e=i,(n=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return[{x:t,y:e-r/2,id:"".concat(this.id,"_0")},{x:t+n/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r/2,id:"".concat(this.id,"_2")},{x:t-n/2,y:e,id:"".concat(this.id,"_3")}]}}])&&gp(e.prototype,n),r&&gp(e,r),i}(Uf);function Sp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function jp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ap=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Pp(this,"graphModel",void 0),Pp(this,"isShowHorizontal",void 0),Pp(this,"isShowVertical",void 0),Pp(this,"position",void 0),Object(z.makeObservable)(this,{isShowHorizontal:z.observable,isShowVertical:z.observable,position:z.observable,clearSnapline:z.action,setNodeSnapLine:z.action}),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}var e,n,r;return e=t,(n=[{key:"getStyle",value:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Sp(Object(n),!0).forEach((function(e){Pp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,e){for(var n=t.x,r=t.y,o=!1,i=!1,a=0;a<e.length;a++){var u=e[a];if(u.id!==t.id&&(n===u.x&&(o=!0),r===u.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:n,y:r}}}},{key:"getHorizontalSnapline",value:function(t,e){var n,r,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)r=ru(a);else{var u=this.graphModel.getNodeModelById(i);r=ru(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=ru(s);if(l.minY===r.minY||l.maxY===r.minY){o=!0,n=r.minY;break}if(l.minY===r.maxY||l.maxY===r.maxY){o=!0,n=r.maxY;break}}}return ni({isShowHorizontal:o,position:{y:n}})}},{key:"getVerticalSnapline",value:function(t,e){var n,r,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)r=ru(a);else{var u=this.graphModel.getNodeModelById(i);r=ru(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=ru(s);if(l.minX===r.minX||l.maxX===r.minX){o=!0,n=r.minX;break}if(l.minX===r.maxX||l.maxX===r.maxX){o=!0,n=r.maxX;break}}}return ni({isShowVertical:o,position:{x:n}})}},{key:"getSnapLinePosition",value:function(t,e){var n=this.getCenterSnapLine(t,e),r=n.isShowHorizontal,o=n.isShowVertical;if(!r){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(n.isShowHorizontal=i.isShowHorizontal,n.position.y=i.position.y)}if(!o){var a=this.getVerticalSnapline(t,e);a.isShowVertical&&(n.isShowVertical=a.isShowVertical,n.position.x=a.position.x)}return n}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,n=t.isShowVertical,r=t.position;this.position=r,this.isShowHorizontal=e,this.isShowVertical=n}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var e=this.graphModel.nodes,n=this.getSnapLinePosition(t,e);this.setSnaplineInfo(n)}}])&&jp(e.prototype,n),r&&jp(e,r),t}();function kp(t){return(kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tp(){return(Tp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Dp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dp(Object(n),!0).forEach((function(e){Xp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Np(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Rp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rp(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Cp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ip(t,e){return(Ip=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Up(t);if(e){var o=Up(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bp(this,n)}}function Bp(t,e){if(e&&("object"===kp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hp(t)}function Hp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Up(t){return(Up=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ip(t,e)}(i,t);var e,n,r,o=Lp(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Xp(Hp(t=o.call(this)),"preTargetNode",void 0),Xp(Hp(t),"sourceRuleResults",void 0),Xp(Hp(t),"targetRuleResults",void 0),Xp(Hp(t),"dragHandler",void 0),Xp(Hp(t),"t",void 0),Xp(Hp(t),"onDragStart",(function(e){var n=e.event,r=t.props,o=r.anchorData,i=r.nodeModel,a=r.graphModel,u=a.overlapMode;a.selectNodeById(i.id),u!==Ei.INCREASE&&i.autoToFront&&a.toFront(i.id),a.eventCenter.emit(gi.ANCHOR_DRAGSTART,{data:o,e:n,nodeModel:i}),t.setState({startX:o.x,startY:o.y,endX:o.x,endY:o.y})})),Xp(Hp(t),"onDragging",(function(e){var n=e.event,r=t.props,o=r.graphModel,i=r.nodeModel,a=r.anchorData,u=o.transformModel,c=o.eventCenter,s=o.width,l=o.height,f=o.editConfigModel,d=n.clientX,p=n.clientY,h=o.getPointByClient({x:d,y:p}),y=h.domOverlayPosition,v=y.x,g=y.y,b=h.canvasOverlayPosition,m=b.x,_=b.y;t.t&&clearInterval(t.t);var O=[];v<10?O=[10,0]:v+10>s?O=[-10,0]:g<10?O=[0,10]:g+10>l&&(O=[0,-10]),t.setState({endX:m,endY:_,dragging:!0}),t.moveAnchorEnd(m,_),O.length>0&&!f.stopMoveGraph&&(t.t=setInterval((function(){var e=Np(O,2),n=e[0],r=e[1];u.translate(n,r);var o=t.state,i=o.endX,a=o.endY;t.setState({endX:i-n,endY:a-r}),t.moveAnchorEnd(i-n,a-r)}),50)),c.emit(gi.ANCHOR_DRAG,{data:a,e:n,nodeModel:i})})),Xp(Hp(t),"onDragEnd",(function(e){t.t&&clearInterval(t.t),t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear();var n=t.props,r=n.graphModel,o=n.nodeModel,i=n.anchorData;r.eventCenter.emit(gi.ANCHOR_DROP,{data:i,e:e,nodeModel:o})})),Xp(Hp(t),"checkEnd",(function(){var e=t.props,n=e.graphModel,r=e.nodeModel,o=e.anchorData,i=o.x,a=o.y,u=o.id,c=n.edgeType,s=t.state,l=s.endX,f=s.endY,d=s.dragging,p=qa({x:l,y:f},n);if(t.preTargetNode&&t.preTargetNode.state!==pi.DEFAULT&&t.preTargetNode.setElementState(pi.DEFAULT),d&&p&&p.node){var h=p.node,y=p.anchor.id,v="".concat(r.id,"_").concat(h.id,"_").concat(y,"_").concat(u),g=t.sourceRuleResults.get(v)||{},b=g.isAllPass,m=g.msg,_=t.targetRuleResults.get(v)||{},O=_.isAllPass,E=_.msg;if(b&&O)h.setElementState(pi.DEFAULT),n.addEdge({type:c,sourceNodeId:r.id,sourceAnchorId:u,startPoint:{x:i,y:a},targetNodeId:p.node.id,targetAnchorId:p.anchor.id,endPoint:{x:p.anchor.x,y:p.anchor.y}});else{var w=h.getData();n.eventCenter.emit(gi.CONNECTION_NOT_ALLOWED,{data:w,msg:E||m})}}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},t.dragHandler=new zc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return e=i,(n=[{key:"getAnchorShape",value:function(){var t=this.props,e=t.anchorData,n=t.style,r=t.node.getAnchorShape(e);if(r)return r;var o=e.x,i=e.y;return v("g",null,v(Pl,Tp({className:"lf-node-anchor-hover"},Mp(Mp({},n),n.hover),{x:o,y:i})),v(Pl,Tp({className:"lf-node-anchor"},n,{x:o,y:i})))}},{key:"moveAnchorEnd",value:function(t,e){var n=this.props,r=n.graphModel,o=n.nodeModel,i=n.anchorData,a=qa({x:t,y:e},r);if(a){var u=a.node,c=a.anchor.id;if(this.preTargetNode&&this.preTargetNode!==a.node&&this.preTargetNode.setElementState(pi.DEFAULT),i.id===c)return;this.preTargetNode=u;var s="".concat(o.id,"_").concat(u.id,"_").concat(c,"_").concat(i.id);if(!this.targetRuleResults.has(s)){var l=a.anchor,f=o.isAllowConnectedAsSource(u,i,l),d=u.isAllowConnectedAsTarget(o,i,l);this.sourceRuleResults.set(s,du(f)),this.targetRuleResults.set(s,du(d))}var p=this.sourceRuleResults.get(s).isAllPass,h=this.targetRuleResults.get(s).isAllPass;p&&h?u.setElementState(pi.ALLOW_CONNECT):u.setElementState(pi.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==pi.DEFAULT&&this.preTargetNode.setElementState(pi.DEFAULT)}},{key:"isShowLine",value:function(){var t=this.state,e=t.startX,n=t.startY,r=t.endX,o=t.endY;return tu(e,n,r,o)>10}},{key:"render",value:function(){var t=this,e=this.state,n=e.startX,r=e.startY,o=e.endX,i=e.endY,a=this.props,u=a.anchorData.edgeAddable,c=a.edgeStyle;return v("g",{className:"lf-anchor"},v("g",{onMouseDown:function(e){!1!==u&&t.dragHandler.handleMouseDown(e)}},this.getAnchorShape()),this.isShowLine()&&v(Ks,Tp({x1:n,y1:r,x2:o,y2:i},c,{"pointer-events":"none"})))}}])&&Cp(e.prototype,n),r&&Cp(e,r),i}(_);n(60);function Fp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Yp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fp(Object(n),!0).forEach((function(e){zp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function zp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vp(t){return(Vp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Kp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kp(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $p(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.value,a=t.fontSize,u=t.fill,c=void 0===u?"currentColor":u,s=t.overflowMode,l=void 0===s?"default":s,f=t.textWidth,d=void 0===f?"":f,p=t.model,h={textAnchor:"middle","dominant-baseline":"middle",x:n,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=Wp(t,2),n=e[0],r=e[1];"object"!==Vp(r)&&(h[n]=r)})),i){var y=String(i).split(/[\r\n]/g),g=y.length;if("default"!==l){var b=p.BaseType,m=p.modelType;if(b===vi.NODE&&m!==yi.TEXT_NODE||b===vi.EDGE&&d)return function(t){var e=t.value,n=t.fontSize,r=t.model,o=t.fontFamily,i=void 0===o?"":o,a=t.lineHeight,u=t.wrapPadding,c=void 0===u?"0, 0":u,s=t.overflowMode,l=t.x,f=t.y,d=t.className,p=r.width,h=r.textHeight,y=t.textWidth||p,g=String(e).split(/[\r\n]/g),b=g.length,m=lu({rows:g,style:{fontSize:"".concat(n,"px"),width:"".concat(y,"px"),fontFamily:i,lineHeight:a,padding:c},rowsLength:b,className:"lf-get-text-height"}),_=r.height>m?r.height:m;h&&(_=h);return v("g",null,v("foreignObject",{width:y,height:_,x:l-y/2,y:f-_/2,className:d},v("div",{className:"lf-node-text-auto-wrap",style:{minHeight:_,width:y,padding:c}},v("div",{className:"ellipsis"===s?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:Yp({},t)},g.map((function(t){return v("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t)}if(g>1){var _=y.map((function(t,e){return v("tspan",{className:"lf-text-tspan",x:n,y:o+(e-(g-1)/2)*(a+2)},t)}));return v("text",h,_)}return v("text",h,i)}}function Zp(t){return(Zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qp(){return(qp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Jp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Qp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qp(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function th(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function eh(t,e){return(eh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ih(t);if(e){var o=ih(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return rh(this,n)}}function rh(t,e){if(e&&("object"===Zp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return oh(t)}function oh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ih(t){return(ih=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ah(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var uh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&eh(t,e)}(i,t);var e,n,r,o=nh(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),ah(oh(e=o.call(this)),"dragHandler",void 0),ah(oh(e),"sumDeltaX",0),ah(oh(e),"sumDeltaY",0),ah(oh(e),"stepDrag",void 0),ah(oh(e),"onDragging",(function(t){var n=t.deltaX,r=t.deltaY,o=e.props,i=o.model,a=Jp(o.graphModel.transformModel.fixDeltaXY(n,r),2),u=a[0],c=a[1];i.moveText(u,c)})),ah(oh(e),"onDragEnd",(function(t){var n=e.props,r=n.model,o=n.graphModel.eventCenter;null==o||o.emit(gi.TEXT_DROP,{e:t,data:r})})),ah(oh(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(pi.TEXT_EDIT)})),ah(oh(e),"mouseDownHandle",(function(t){var n=e.props,r=n.draggable,o=n.graphModel.editConfigModel.nodeTextDraggable;(r||o)&&e.stepDrag.handleMouseDown(t)}));var n=t.model,r=t.draggable;return e.stepDrag=new zc({onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:1,model:n,isStopPropagation:r}),e}return e=i,(n=[{key:"getShape",value:function(){var t=this.props,e=t.model,n=t.graphModel,r=e.text,o=n.editConfigModel,i=r.value,a=r.x,u=r.y,c=r.editable,s=r.draggable,l={x:a,y:u,className:"",value:i};return c?l.className="lf-element-text":s||o.nodeTextDraggable?l.className="lf-text-draggable":l.className="lf-text-disabled",v($p,qp({},l,e.getTextStyle(),{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return v("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&th(e.prototype,n),r&&th(e,r),i}(_),ch=null!==window.navigator.userAgent.match(/MSIE|Trident/),sh=new Map,lh=function(t){var e=sh.get(t);e&&(window.cancelAnimationFrame(e),sh.delete(t))};function fh(t){return(fh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ph(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ph(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ph(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function hh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yh(t,e){return(yh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function vh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=mh(t);if(e){var o=mh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gh(this,n)}}function gh(t,e){if(e&&("object"===fh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return bh(t)}function bh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mh(t){return(mh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Oh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yh(t,e)}(i,t);var e,n,r,o=vh(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),_h(bh(e=o.call(this)),"t",void 0),_h(bh(e),"moveOffset",void 0),_h(bh(e),"stepDrag",void 0),_h(bh(e),"contextMenuTime",void 0),_h(bh(e),"startTime",void 0),_h(bh(e),"clickTimer",void 0),_h(bh(e),"onDragStart",(function(t){var n=t.event,r=n.clientX,o=n.clientY,i=e.props,a=i.model,u=i.graphModel.getPointByClient({x:r,y:o}).canvasOverlayPosition,c=u.x,s=u.y;e.moveOffset={x:a.x-c,y:a.y-s}})),_h(bh(e),"onDragging",(function(t){var n=t.event,r=e.props,o=r.model,i=r.graphModel,a=i.editConfigModel,u=i.transformModel,c=i.width,s=i.height,l=i.gridSize;o.setIsDragging(!0);var f=n.clientX,d=n.clientY,p=i.getPointByClient({x:f,y:d}).canvasOverlayPosition,h=p.x,y=p.y,v=dh(u.CanvasPointToHtmlPoint([h,y]),2),g=v[0],b=v[1];if(!(g<0||b<0||g>c||b>s)){h+=e.moveOffset.x,y+=e.moveOffset.y,h=Aa(h,l),y=Aa(y,l);var m,_,O,E=dh(u.CanvasPointToHtmlPoint([h-o.width/2,y-o.height/2]),2),w=E[0],x=E[1],S=dh(u.CanvasPointToHtmlPoint([h+o.width/2,y+o.height/2]),2),j=S[0],P=S[1],A=Math.max(l,20),k=[];w<0?k=[A,0]:j>i.width?k=[-A,0]:x<0?k=[0,A]:P>i.height&&(k=[0,-A]),e.t&&lh(e.t),k.length>0&&!a.stopMoveGraph?e.t=(m=function(){var t=dh(k,2),e=t[0],n=t[1];u.translate(e,n),i.moveNode(o.id,-e/u.SCALE_X,-n/u.SCALE_X)},_=Fa(),O=window.requestAnimationFrame((function t(){if(m(),sh.get(_)){var e=window.requestAnimationFrame(t);sh.set(_,e)}})),sh.set(_,O),_):i.moveNode2Coordinate(o.id,h,y)}})),_h(bh(e),"onDragEnd",(function(){e.t&&lh(e.t),e.props.model.setIsDragging(!1)})),_h(bh(e),"handleClick",(function(t){if(e.startTime&&!((new Date).getTime()-e.startTime>200)){var n=e.props,r=n.model,o=n.graphModel,i={data:r.getData(),e:t,position:o.getPointByClient({x:t.clientX,y:t.clientY})},a=2===t.button,u=2===t.detail;if(!a){var c=o.editConfigModel;o.selectNodeById(r.id,Ra(t,c)),e.toFront(),u?(c.nodeTextEdit&&r.text.editable&&(r.setSelected(!1),o.setElementStateById(r.id,pi.TEXT_EDIT)),o.eventCenter.emit(gi.NODE_DBCLICK,i)):(o.eventCenter.emit(gi.ELEMENT_CLICK,i),o.eventCenter.emit(gi.NODE_CLICK,i))}}})),_h(bh(e),"handleContextMenu",(function(t){t.preventDefault();var n=e.props,r=n.model,o=n.graphModel,i=r.getData(),a=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(r.id,pi.SHOW_MENU,a.domOverlayPosition),o.selectNodeById(r.id),o.eventCenter.emit(gi.NODE_CONTEXTMENU,{data:i,e:t,position:a}),e.toFront()})),_h(bh(e),"handleMouseDown",(function(t){var n=e.props,r=n.model,o=n.graphModel;e.toFront(),e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&r.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),_h(bh(e),"setHoverON",(function(t){if(!e.state.isHovered){e.setState({isHovered:!0});var n=e.props,r=n.model,o=n.graphModel,i=r.getData();r.setHovered(!0),o.eventCenter.emit(gi.NODE_MOUSEENTER,{data:i,e:t})}})),_h(bh(e),"setHoverOFF",(function(t){e.setState({isHovered:!1});var n=e.props,r=n.model,o=n.graphModel,i=r.getData();r.setHovered(!1),o.eventCenter.emit(gi.NODE_MOUSELEAVE,{data:i,e:t})})),_h(bh(e),"onMouseOut",(function(t){ch&&e.setHoverOFF(t)}));var n=t.graphModel,r=n.gridSize,a=n.eventCenter,u=t.model;return e.stepDrag=new zc({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:r,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:u}),e.state={isHovered:!1},e}return e=i,r=[{key:"getModel",value:function(t){return t}}],(n=[{key:"getAnchorShape",value:function(t){return null}},{key:"getAnchors",value:function(){var t=this,e=this.props,n=e.model,r=e.graphModel,o=n.isSelected,i=n.isHitable,a=n.isDragging,u=this.state.isHovered;if(i&&(o||u)&&!a){var c=n.getAnchorLineStyle();return Ho(n.anchors,(function(e,o){var i=n.getAnchorStyle(e);return v(Gp,{anchorData:e,node:t,style:i,edgeStyle:c,anchorIndex:o,nodeModel:n,graphModel:r,setHoverOFF:t.setHoverOFF})}))}return[]}},{key:"getText",value:function(){var t=this.props,e=t.model,n=t.graphModel;if(e.state===pi.TEXT_EDIT)return"";if(e.text){var r=n.editConfigModel,o=!1;return(e.text.draggable||r.nodeTextDraggable)&&(o=!0),v(uh,{editable:r.nodeTextEdit&&e.text.editable,model:e,graphModel:n,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,n=t.isDragging,r="lf-node";switch(e){case pi.ALLOW_CONNECT:r+=" lf-node-allow";break;case pi.NOT_ALLOW_CONNECT:r+=" lf-node-not-allow";break;default:r+=" lf-node-default"}return n&&(r+=" lf-isDragging"),r}},{key:"toFront",value:function(){var t=this.props,e=t.model,n=t.graphModel;n.overlapMode!==Ei.INCREASE&&e.autoToFront&&n.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,n=e.model,r=e.graphModel,o=r.editConfigModel,i=o.hideAnchors,a=o.adjustNodePosition,u=r.gridSize,c=r.transformModel.SCALE_X,s=n.isHitable,l=n.draggable,f=v("g",{className:"lf-node-content"},this.getShape(),this.getText(),i?null:this.getAnchors());return s?(a&&l&&this.stepDrag.setStep(u*c),t=v("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onMouseUp:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},f)):t=v("g",{className:this.getStateClassName()},f),t}}])&&hh(e.prototype,n),r&&hh(e,r),i}(_);function Eh(t){return(Eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wh(){return(wh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function xh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function jh(t,e){return(jh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ph(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=kh(t);if(e){var o=kh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ah(this,n)}}function Ah(t,e){if(e&&("object"===Eh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function kh(t){return(kh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Th=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jh(t,e)}(i,t);var e,n,r,o=Ph(i);function i(){return xh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model;return v(ll,wh({},t.getNodeStyle(),{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&Sh(e.prototype,n),r&&Sh(e,r),i}(Oh);function Dh(t){return(Dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mh(){return(Mh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Nh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ch(t,e){return(Ch=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ih(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Bh(t);if(e){var o=Bh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Lh(this,n)}}function Lh(t,e){if(e&&("object"===Dh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Bh(t){return(Bh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Hh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ch(t,e)}(i,t);var e,n,r,o=Ih(i);function i(){return Nh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,n=t.y,r=t.r;return v(Pl,Mh({},t.getNodeStyle(),{x:e,y:n,r:r}))}}])&&Rh(e.prototype,n),r&&Rh(e,r),i}(Oh);function Uh(t){return(Uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Gh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gh(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Fh(t){var e=t.points,n=t.className,r={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach((function(t){var e=Xh(t,2),n=e[0],o=e[1];"object"!==Uh(o)&&(r[n]=o)})),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=e.map((function(t){return t.join(",")})).join(" "),v("polygon",r)}function Yh(t){return(Yh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zh(){return(zh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Vh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kh(t,e){return(Kh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=qh(t);if(e){var o=qh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zh(this,n)}}function Zh(t,e){if(e&&("object"===Yh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function qh(t){return(qh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kh(t,e)}(i,t);var e,n,r,o=$h(i);function i(){return Vh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,n=t.y,r=t.width,o=t.height,i=t.points,a=t.getNodeStyle();return v("g",{transform:"matrix(1 0 0 1 ".concat(e-r/2," ").concat(n-o/2,")")},v(Fh,zh({},a,{points:i,x:e,y:n})))}}])&&Wh(e.prototype,n),r&&Wh(e,r),i}(Oh);function Qh(t){return(Qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ty(){return(ty=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function ey(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ny(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ry(t,e){return(ry=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function oy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ay(t);if(e){var o=ay(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return iy(this,n)}}function iy(t,e){if(e&&("object"===Qh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ay(t){return(ay=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ry(t,e)}(i,t);var e,n,r,o=oy(i);function i(){return ey(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model;return v("g",null,v(Fh,ty({},t.getNodeStyle(),{points:t.points,x:t.x,y:t.y})))}}])&&ny(e.prototype,n),r&&ny(e,r),i}(Oh);function cy(t){return(cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ly(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ly(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ly(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function fy(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.rx,a=void 0===i?4:i,u=t.ry,c=void 0===u?4:u,s=t.className,l={cx:n,cy:o,rx:a,ry:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=sy(t,2),n=e[0],r=e[1];"object"!==cy(r)&&(l[n]=r)})),l.className=s?"lf-basic-shape ".concat(s):"lf-basic-shape",v("ellipse",l)}function dy(t){return(dy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function py(){return(py=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vy(t,e){return(vy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function gy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=my(t);if(e){var o=my(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return by(this,n)}}function by(t,e){if(e&&("object"===dy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function my(t){return(my=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vy(t,e)}(i,t);var e,n,r,o=gy(i);function i(){return hy(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model;return v(fy,py({},t.getNodeStyle(),{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&yy(e.prototype,n),r&&yy(e,r),i}(Oh);function Oy(t){return(Oy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ey(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wy(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ey(Object(n),!0).forEach((function(e){xy(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ey(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Py(t,e){return(Py=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ay(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ty(t);if(e){var o=Ty(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ky(this,n)}}function ky(t,e){if(e&&("object"===Oy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ty(t){return(Ty=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Dy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Py(t,e)}(i,t);var e,n,r,o=Ay(i);function i(){return Sy(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),n=t.text;if(n&&n.value&&e.background&&"transparent"!==e.background.fill){var r=n.x,o=n.y,i=t.width,a=t.height;return v(ll,wy(wy({},e.background),{},{x:r,y:o-1,width:i,height:a}))}}},{key:"getShape",value:function(){return v("g",null,this.getBackground())}}])&&jy(e.prototype,n),r&&jy(e,r),i}(Oh);function My(t){return(My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ny(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ry(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cy(t,e){return(Cy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Iy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hy(t);if(e){var o=Hy(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ly(this,n)}}function Ly(t,e){if(e&&("object"===My(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return By(t)}function By(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hy(t){return(Hy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Cy(t,e)}(i,t);var e,n,r,o=Iy(i);function i(){var t;Ny(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Uy(By(t=o.call.apply(o,[this].concat(n))),"ref",void 0),Uy(By(t),"currentProperties",void 0),Uy(By(t),"preProperties",void 0),Uy(By(t),"setRef",(function(e){t.ref=e})),t}return e=i,(n=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(t){t.appendChild(document.createElement("div"))}},{key:"shouldUpdate",value:function(){if(!this.preProperties||this.preProperties!==this.currentProperties)return this.preProperties=this.currentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.props.model,e=t.x,n=t.y,r=t.height,o=t.width;return this.currentProperties=JSON.stringify(t.properties),v("foreignObject",{x:e-o/2,y:n-r/2,width:o,height:r,ref:this.setRef})}}])&&Ry(e.prototype,n),r&&Ry(e,r),i}(Oh);function Gy(t){return(Gy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Fy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Yy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yy(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yy(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var zy=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var n=Fy(t,2),r=n[0],o=n[1];"object"!==Gy(o)&&(e[r]=o)})),v("path",e)};function Vy(t){return(Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ky(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function qy(t,e){return(qy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Jy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=tv(t);if(e){var o=tv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qy(this,n)}}function Qy(t,e){if(e&&("object"===Vy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tv(t){return(tv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ev=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qy(t,e)}(i,t);var e,n,r,o=Jy(i);function i(){return $y(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getArrowAttributes",value:function(){var t=this.props,e=t.arrowInfo,n=t.style,r=e.start,o=e.end,i={start:r,end:o,offset:n.offset,verticalLength:n.verticalLength,type:"end"},a=ec(i),u=a.leftX,c=a.leftY,s=a.rightX,l=a.rightY;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wy(Object(n),!0).forEach((function(e){Ky(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wy(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({d:"M".concat(u," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},n)}},{key:"getShape",value:function(){var t=this.getArrowAttributes(),e=t.d,n=t.strokeWidth,r=t.stroke,o=t.fill;return v(zy,{d:e,fill:o,strokeWidth:n,stroke:r})}},{key:"render",value:function(){return v("g",{className:"lf-arrow"},this.getShape())}}])&&Zy(e.prototype,n),r&&Zy(e,r),i}(_);function nv(t){return(nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rv(){return(rv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function ov(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function iv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ov(Object(n),!0).forEach((function(e){dv(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ov(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function av(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uv(t,e){return(uv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function cv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fv(t);if(e){var o=fv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sv(this,n)}}function sv(t,e){if(e&&("object"===nv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return lv(t)}function lv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fv(t){return(fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var pv,hv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&uv(t,e)}(i,t);var e,n,r,o=cv(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),dv(lv(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHovered:!0})})),dv(lv(e),"setHoverOFF",(function(){e.setState({isHovered:!1})})),e.state={isHovered:!1},e}return e=i,(n=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),n=t.text,r=e.background||{};if(this.state.isHovered&&e.hover&&e.hover.background&&(r=iv(iv({},r),e.hover.background)),n&&n.value&&"transparent"!==r.fill){var o,i=e.fontSize,a=e.overflowMode,u=e.lineHeight,c=e.wrapPadding,s=e.textWidth,l=n.value,f=n.x,d=n.y,p=String(l).split(/[\r\n]/g),h=p.length;if("autoWrap"===a&&s){var y=lu({rows:p,style:{fontSize:"".concat(i,"px"),width:"".concat(s,"px"),lineHeight:u,padding:c},rowsLength:h,className:"lf-get-text-height"});o=iv(iv({},r),{},{x:f-1,y:d-1,width:s,height:y})}else{var g=0;p&&p.forEach((function(t){var e=Nc(t);g=e>g?e:g}));var b=fu({rows:p,fontSize:i,rowsLength:h}),m=b.width,_=b.height;o=iv(iv({},r),{},{x:f-1,y:d-1,width:m,height:_})}return v(ll,o)}}},{key:"getShape",value:function(){var t=this.props.model,e=t.text,n=e.value,r=e.x,o=e.y;if(n){var i=iv({x:r,y:o,className:"lf-element-text",value:n},t.getTextStyle());return v("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),v($p,rv({},i,{model:t})))}}}])&&av(e.prototype,n),r&&av(e,r),i}(uh);function yv(t){return(yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vv(){return(vv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function gv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gv(Object(n),!0).forEach((function(e){Pv(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function mv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ov(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ev(t,e){return(Ev=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jv(t);if(e){var o=jv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xv(this,n)}}function xv(t,e){if(e&&("object"===yv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Sv(t)}function Sv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jv(t){return(jv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Pv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(pv||(pv={}));var Av=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ev(t,e)}(i,t);var e,n,r,o=wv(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Pv(Sv(t=o.call(this)),"dragHandler",void 0),Pv(Sv(t),"oldEdge",void 0),Pv(Sv(t),"preTargetNode",void 0),Pv(Sv(t),"targetRuleResults",void 0),Pv(Sv(t),"sourceRuleResults",void 0),Pv(Sv(t),"onDragStart",(function(){var e=t.props,n=e.x,r=e.y,o=e.edgeModel,i=o.startPoint,a=o.endPoint,u=o.pointsList;t.oldEdge={startPoint:i,endPoint:a,pointsList:u},t.setState({endX:n,endY:r,draging:!0}),o.isHitable=!1})),Pv(Sv(t),"onDragging",(function(e){var n=e.deltaX,r=e.deltaY,o=t.state,i=o.endX,a=o.endY,u=t.props,c=u.graphModel,s=u.type,l=mv(c.transformModel.moveCanvasPointByHtml([i,a],n,r),2),f=l[0],d=l[1];t.setState({endX:f,endY:d,draging:!0});var p=t.props.edgeModel,h=qa({x:i,y:a},c);if(h&&h.node&&t.isAllowAdjust(h)){var y,v=p.startPoint,g=p.endPoint,b=p.sourceNode,m=p.targetNode;s===pv.SOURCE?y={startPoint:{x:h.anchor.x,y:h.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:h.node,targetNode:m}:s===pv.TARGET&&(y={startPoint:{x:v.x,y:v.y},endPoint:{x:h.anchor.x,y:h.anchor.y},sourceNode:b,targetNode:h.node}),p.updateAfterAdjustStartAndEnd(y)}else s===pv.SOURCE?p.updateStartPoint({x:f,y:d}):s===pv.TARGET&&p.updateEndPoint({x:f,y:d})})),Pv(Sv(t),"onDragEnd",(function(){var e;t.setState({draging:!1});var n=t.props,r=n.graphModel,o=n.edgeModel,i=n.type;o.isHitable=!0;var a=t.state,u=a.endX,c=a.endY,s=a.draging,l=qa({x:u,y:c},r);if(s){if(l&&l.node&&t.isAllowAdjust(l)){var f,d=o.getData(),p=bv(bv({},d),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==d||null===(f=d.text)||void 0===f?void 0:f.value)||""});i===pv.SOURCE?p=bv(bv({},p),{},{sourceNodeId:l.node.id,sourceAnchorId:l.anchor.id,startPoint:{x:l.anchor.x,y:l.anchor.y},targetNodeId:o.targetNodeId,endPoint:bv({},o.endPoint)}):i===pv.TARGET&&(p=bv(bv({},p),{},{sourceNodeId:o.sourceNodeId,startPoint:bv({},o.startPoint),targetNodeId:l.node.id,targetAnchorId:l.anchor.id,endPoint:{x:l.anchor.x,y:l.anchor.y}})),r.deleteEdgeById(o.id);var h=r.addEdge(bv({},p));r.eventCenter.emit(gi.EDGE_EXCHANGE_NODE,{data:{newEdge:h.getData(),oldEdge:o.getData()}})}else t.recoveryEdge();null===(e=t.preTargetNode)||void 0===e||e.setElementState(pi.DEFAULT)}})),Pv(Sv(t),"recoveryEdge",(function(){var e=t.props.edgeModel,n=t.oldEdge,r=n.startPoint,o=n.endPoint,i=n.pointsList;e.updateStartPoint(r),e.updateEndPoint(o),e.modelType!==yi.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),Pv(Sv(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.targetRuleResults=new Map,t.sourceRuleResults=new Map,t.dragHandler=Yc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return e=i,(n=[{key:"isAllowAdjust",value:function(t){var e=this.props,n=e.edgeModel,r=(n.id,n.sourceNode),o=n.targetNode,i=n.sourceAnchorId,a=n.targetAnchorId,u=e.type,c=null,s=null,l=null,f=null;if(u===pv.SOURCE?(c=t.node,s=o,l=t.anchor,f=o.getAnchorInfo(a)):(c=r,s=t.node,f=t.anchor,l=r.getAnchorInfo(i)),this.preTargetNode&&this.preTargetNode!==t.node&&this.preTargetNode.setElementState(pi.DEFAULT),this.preTargetNode=t.node,f.id===l.id)return!1;var d="".concat(c.id,"_").concat(s.id,"_").concat(l.id,"_").concat(f.id);if(!this.targetRuleResults.has(d)){var p=c.isAllowConnectedAsSource(s,l,f),h=s.isAllowConnectedAsTarget(c,l,f);this.sourceRuleResults.set(d,du(p)),this.targetRuleResults.set(d,du(h))}var y=this.sourceRuleResults.get(d).isAllPass,v=this.targetRuleResults.get(d).isAllPass,g=y&&v?pi.ALLOW_CONNECT:pi.NOT_ALLOW_CONNECT;return u===pv.SOURCE?c.setElementState(g):s.setElementState(g),y&&v}},{key:"render",value:function(){var t=this.props,e=t.x,n=t.y,r=this.state.draging;return v("g",null,v(Pl,vv({className:"lf-edge-adjust-point"},this.getAdjustPointStyle(),{x:e,y:n,onMouseDown:this.dragHandler,"pointer-events":r?"none":""})))}}])&&Ov(e.prototype,n),r&&Ov(e,r),i}(_);function kv(t){return(kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tv(){return(Tv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Dv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dv(Object(n),!0).forEach((function(e){Uv(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Nv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cv(t,e){return(Cv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Iv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hv(t);if(e){var o=Hv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Lv(this,n)}}function Lv(t,e){if(e&&("object"===kv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Bv(t)}function Bv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hv(t){return(Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Uv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Cv(t,e)}(i,t);var e,n,r,o=Iv(i);function i(){var t;Nv(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Uv(Bv(t=o.call.apply(o,[this].concat(n))),"startTime",void 0),Uv(Bv(t),"contextMenuTime",void 0),Uv(Bv(t),"clickTimer",void 0),Uv(Bv(t),"handleHover",(function(e,n){var r=t.props,o=r.model,i=r.graphModel.eventCenter;o.setHovered(e);var a=e?gi.EDGE_MOUSEENTER:gi.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:n})})),Uv(Bv(t),"setHoverON",(function(e){t.handleHover(!0,e)})),Uv(Bv(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),Uv(Bv(t),"handleContextMenu",(function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var n=t.props,r=n.model,o=n.graphModel,i=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(r.id,pi.SHOW_MENU,i.domOverlayPosition),t.toFront(),o.selectEdgeById(r.id);var a=null==r?void 0:r.getData();o.eventCenter.emit(gi.EDGE_CONTEXTMENU,{data:a,e:e,position:i})})),Uv(Bv(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),Uv(Bv(t),"handleMouseUp",(function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200||2===e.button)){var n=2===e.detail,r=t.props,o=r.model,i=r.graphModel,a=null==o?void 0:o.getData(),u=i.getPointByClient({x:e.clientX,y:e.clientY});if(n){var c=i.editConfigModel,s=i.textEditElement;if(s&&s.id===o.id&&i.setElementStateById(o.id,pi.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,pi.TEXT_EDIT),o.modelType===yi.POLYLINE_EDGE){var l=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,d=f.x,p=f.y,h=Lc({x:d,y:p},l.points);l.dbClickPosition=h}i.eventCenter.emit(gi.EDGE_DBCLICK,{data:a,e:e,position:u})}else i.eventCenter.emit(gi.ELEMENT_CLICK,{data:a,e:e,position:u}),i.eventCenter.emit(gi.EDGE_CLICK,{data:a,e:e,position:u});var y=i.editConfigModel;i.selectEdgeById(o.id,Ra(e,y)),t.toFront()}})),Uv(Bv(t),"getIsDraging",(function(){return!1})),t}return e=i,(n=[{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,n=t.graphModel;if(e.state===pi.TEXT_EDIT)return"";var r=!1,o=n.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(r=!0),v(hv,{editable:o.edgeTextEdit&&e.text.editable,model:e,graphModel:n,draggable:r})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,n=t.endPoint,r=t.isSelected;return{start:e,end:n,hover:this.state.hover,isSelected:r}}},{key:"getArrowStyle",value:function(){var t=this.props,e=t.model,n=t.graphModel,r=e.getEdgeStyle(),o=n.theme.arrow;return Mv(Mv({},r),{},{fill:r.stroke},o)}},{key:"getArrow",value:function(){var t=this.getArrowInfo(),e=t.start,n=t.end;if(e&&n&&(e.x!==n.x||e.y!==n.y)){var r=this.getArrowStyle();return v(ev,{arrowInfo:t,style:r})}}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,n=t.graphModel,r=e.getAdjustStart(),o=e.getAdjustEnd();return v("g",null,v(Av,Tv({type:"SOURCE"},r,{edgeModel:e,graphModel:n})),v(Av,Tv({type:"TARGET"},o,{edgeModel:e,graphModel:n})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return v("g",null)}},{key:"getAppend",value:function(){return v("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,n=t.model;e.overlapMode!==Ei.INCREASE&&e.toFront(n.id)}},{key:"render",value:function(){var t=this.props,e=t.model,n=e.isSelected,r=e.isHitable,o=t.graphModel,i=this.getIsDraging(),a=o.editConfigModel.adjustEdgeStartAndEnd,u=o.animation,c=n&&u.edge&&1===o.getSelectElements().edges.length;return v("g",null,v("g",{className:r?"lf-edge":"lf-edge pointer-none",onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),c&&this.getAnimation(),this.getText(),this.getArrow()),a&&n&&!i?this.getAdjustPoints():"")}}])&&Rv(e.prototype,n),r&&Rv(e,r),i}(_);function Gv(t){return(Gv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Fv(){return(Fv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Yv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vv(t,e){return(Vv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Wv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=$v(t);if(e){var o=$v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Kv(this,n)}}function Kv(t,e){if(e&&("object"===Gv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function $v(t){return($v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Zv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vv(t,e)}(i,t);var e,n,r,o=Wv(i);function i(){return Yv(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getEdge",value:function(){var t=this.props.model,e=t.startPoint,n=t.endPoint,r=t.getEdgeStyle();return v(Ks,Fv({},r,{x1:e.x,y1:e.y,x2:n.x,y2:n.y}))}},{key:"getShape",value:function(){return v("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),n=e.stroke,r=e.className,o=e.strokeDasharray,i=t.startPoint,a=t.endPoint,u=t.getEdgeStyle();return v("g",null,v(Ks,Fv({},u,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,className:r,strokeDasharray:o,stroke:n})))}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=function(t){var e,n=t.start,r=t.end;if(n.x===r.x&&n.y===r.y)e="";else{var o={start:n,end:r,offset:10,verticalLength:5},i=ec(rc(rc({},o),{},{type:"start"})),a=ec(rc(rc({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:t.startPoint,end:t.endPoint}),n=e.d,r=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return v(zy,{d:n,fill:o,strokeWidth:r,stroke:a,strokeDasharray:i})}}])&&zv(e.prototype,n),r&&zv(e,r),i}(Xv);function qv(t){return(qv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Qv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qv(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var tg=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var n=Jv(t,2),r=n[0],o=n[1];"object"!==qv(o)&&(e[r]=o)})),v("polyline",e)};function eg(t){return(eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ng(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function rg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ng(Object(n),!0).forEach((function(e){pg(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ng(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function og(){return(og=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function ig(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ag(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ag(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ag(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ug(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cg(t,e){return(cg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dg(t);if(e){var o=dg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lg(this,n)}}function lg(t,e){if(e&&("object"===eg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fg(t)}function fg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dg(t){return(dg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cg(t,e)}(i,t);var e,n,r,o=sg(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),pg(fg(t=o.call(this)),"drag",void 0),pg(fg(t),"isDragging",void 0),pg(fg(t),"appendInfo",void 0),pg(fg(t),"dragHandler",void 0),pg(fg(t),"onDragStart",(function(){t.props.model.dragAppendStart()})),pg(fg(t),"onDragging",(function(e){var n=e.deltaX,r=e.deltaY,o=t.props,i=o.model,a=o.graphModel;t.isDragging=!0;var u=a.transformModel,c=a.editConfigModel,s=ig(u.fixDeltaXY(n,r),2),l=s[0],f=s[1],d=i,p=c.adjustEdgeMiddle;t.appendInfo=p?d.dragAppendSimple(t.appendInfo,{x:l,y:f}):d.dragAppend(t.appendInfo,{x:l,y:f})})),pg(fg(t),"onDragEnd",(function(){var e=t.props,n=e.model,r=e.graphModel.eventCenter,o=n;o.dragAppendEnd(),t.isDragging=!1,t.appendInfo=void 0,r.emit(gi.EDGE_ADJUST,{data:o.getData()})})),pg(fg(t),"beforeDragStart",(function(e,n){n.dragAble&&t.dragHandler(e),t.appendInfo=n})),pg(fg(t),"getIsDraging",(function(){return t.isDragging})),t.drag=Yc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(n=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle();return v(tg,og({points:t.points},e))}},{key:"getShape",value:function(){return v("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),n=e.stroke,r=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return v("g",null,v(tg,og({points:t.points},i,{className:r,strokeDasharray:o,stroke:n})))}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,n=t.isSelected,r={start:null,end:null,hover:this.state.hover,isSelected:n},o=Tc(e);return o.length>=2&&(r.start=o[o.length-2],r.end=o[o.length-1]),r}},{key:"getAppendAttributes",value:function(t){var e,n=t.start,r=t.end;if(n.x===r.x&&n.y===r.y)e="";else{var o={start:n,end:r,offset:10,verticalLength:5},i=ec(rg(rg({},o),{},{type:"start"})),a=ec(rg(rg({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(t){var e=this.getAppendAttributes(t),n=e.d,r=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return v(zy,{d:n,fill:o,strokeWidth:r,stroke:a,strokeDasharray:i})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,n=e.model,r=e.graphModel,o=n.pointsList,i=n.draggable,a=[],u=o.length,c=function(e){var n="lf-polyline-append",c={start:{x:o[e].x,y:o[e].y},end:{x:o[e+1].x,y:o[e+1].y},startIndex:e,endIndex:e+1,direction:"",dragAble:!0},s=v("g",{className:n},t.getAppendShape(c)),l=r.editConfigModel,f=l.adjustEdge,d=l.adjustEdgeMiddle;if(f&&i){t.dragHandler=t.drag;var p=c.startIndex,h=c.endIndex,y=d&&(0===p||h===u-1);c.dragAble=!y,c.start.x===c.end.x?(c.dragAble&&(n+="-ew-resize"),c.direction=bi.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(n+="-ns-resize"),c.direction=bi.HORIZONTAL),s=v("g",{className:t.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},v("g",{className:n},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return v("g",null,a)}}])&&ug(e.prototype,n),r&&ug(e,r),i}(Xv);function yg(t){return(yg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gg(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function bg(){return(bg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function mg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Og(t,e){return(Og=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Eg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xg(t);if(e){var o=xg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wg(this,n)}}function wg(t,e){if(e&&("object"===yg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xg(t){return(xg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Sg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Og(t,e)}(i,t);var e,n,r,o=Eg(i);function i(){return mg(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle();return v(zy,bg({d:t.path},e))}},{key:"getShape",value:function(){return v("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),n=e.stroke,r=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return v("g",null,v(zy,bg({d:t.path},i,{className:r,strokeDasharray:o,stroke:n})))}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return v(zy,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,n=t,r=n.path,o=n.isSelected,i=vg(function(t){var e=Cc(t);return[e[2],e[3]]}(r),2);return{start:i[0],end:i[1],hover:e,isSelected:o}}}])&&_g(e.prototype,n),r&&_g(e,r),i}(Xv);var jg=function(t,e){return ro(t,e)};var Pg=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};function Ag(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tg,Dg,Mg,Ng=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),kg(this,"undos",[]),kg(this,"redos",[]),kg(this,"callbacks",[]),kg(this,"stopWatch",null),kg(this,"curData",null),kg(this,"maxSize",50),kg(this,"waitTime",100),kg(this,"eventCenter",void 0),kg(this,"model",void 0),kg(this,"listenHistoryChange",(function(){var t=r.model.modelToHistoryData();t&&(r.add(t),r.emitHistoryChange())})),this.eventCenter=e.eventCenter;var o=gi.NODE_ADD,i=gi.EDGE_ADD,a=gi.NODE_DROP,u=gi.EDGE_ADJUST,c=gi.SELECTION_DROP,s=gi.TEXT_DROP,l=gi.NODE_TEXT_UPDATE,f=gi.EDGE_TEXT_UPDATE,d=gi.GRAPH_RENDERED,p=gi.NODE_PROPERTY_UPDATE,h=gi.EDGE_PROPERTY_UPDATE,y=gi.HISTORY_INSERT,v="\n ".concat(o,",\n ").concat(i,",\n ").concat(a,",\n ").concat(u,",\n ").concat(c,",\n ").concat(s,",\n ").concat(l,",\n ").concat(f,",\n ").concat(d,"\n ");n&&(v+=",".concat(p,",").concat(h)),this.model=e,e.eventCenter.on(v,this.listenHistoryChange),e.eventCenter.on(y,(function(t){t||(t=r.model.modelToHistoryData()),r.add(t)}))}var e,n,r;return e=t,(n=[{key:"add",value:function(t){jg(Pg(this.undos),t)||(this.undos.push(t),this.redos=[],this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var t=this.undos.pop();return this.redos.push(t),this.curData=this.undos[this.undos.length-1],this.emitHistoryChange(),la(this.curData)}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=t,this.undos.push(this.curData),this.emitHistoryChange(),t}}},{key:"emitHistoryChange",value:function(){this.eventCenter.emit(gi.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}})}}])&&Ag(e.prototype,n),r&&Ag(e,r),t}();function Rg(t){return(Rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ig(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ig(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ig(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Bg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lg(Object(n),!0).forEach((function(e){zg(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lg(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Hg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ug(t,e){return(Ug=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Yg(t);if(e){var o=Yg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gg(this,n)}}function Gg(t,e){if(e&&("object"===Rg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fg(t)}function Fg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yg(t){return(Yg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function zg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vg,Wg,Kg,$g=Ne((Mg=Dg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ug(t,e)}(i,t);var e,n,r,o=Xg(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),zg(Fg(t=o.call(this)),"ref",{current:null}),zg(Fg(t),"__prevText",{type:"",text:"",id:""}),zg(Fg(t),"keyupHandler",(function(e){var n=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&n.setElementState(0)})),zg(Fg(t),"inputHandler",(function(e){var n=e.target.innerText,r=t.props.graphModel.textEditElement;t.__prevText={type:r.type,text:n.replace(/(\r\n)+$|(\n)+$/,""),id:r.id}})),zg(Fg(t),"keydownHandler",(function(t){t.stopPropagation()})),t.state={style:{left:0,top:0}},t}return e=i,r=[{key:"getDerivedStateFromProps",value:function(t){var e,n=t.graphModel,r=n.transformModel,o=n.theme,i=n.textEditElement;if(i){var a;if(null===(a=i.text)||void 0===a||!a.value)if(i.BaseType===vi.EDGE){var u=(i=i).text,c=i.textPosition,s=c.x,l=c.y;u.x=s,u.y=l,i.setText(u)}else i=i;var f={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(i.BaseType===vi.EDGE){var d=o.edgeText,p=d.overflowMode,h=d.lineHeight,y=d.wrapPadding,v=d.textWidth;v&&"autoWrap"===p&&(e=Bg(Bg({},f),{},{width:v,minWidth:v,lineHeight:h,padding:y}))}else if(i.BaseType===vi.NODE){var g=o.nodeText,b=g.overflowMode,m=g.lineHeight,_=g.wrapPadding,O=g.textWidth,E=i,w=E.width,x=E.modelType;(x!==yi.TEXT_NODE&&"autoWrap"===b||x===yi.TEXT_NODE&&O)&&(e=Bg(Bg({},f),{},{width:O||w,minWidth:O||w,lineHeight:m,padding:_}))}var S=i.text,j=S.x,P=S.y,A=Cg(r.CanvasPointToHtmlPoint([j,P]),2);return{style:Bg({left:A[0],top:A[1]},e)}}}}],(n=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var t=this.props.graphModel,e=t.eventCenter,n=t.editConfigModel,r=n.edgeTextEdit,o=n.nodeTextEdit;(r||o)&&e.on("".concat(gi.GRAPH_TRANSFORM,",").concat(gi.NODE_CLICK,",").concat(gi.BLANK_CLICK," "),(function(){t.textEditElement&&t.textEditElement.setElementState(pi.DEFAULT)}))}},{key:"componentDidUpdate",value:function(){var t=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){var e=this.__prevText,n=e.text,r=e.id;t.updateText(r,n),t.eventCenter.emit(gi.TEXT_UPDATE,Bg({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var n=window.getSelection();n.removeAllRanges(),n.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,n=this.state.style;return e?v("div",{contentEditable:!0,className:"lf-text-input",style:n,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onInput:this.inputHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&Hg(e.prototype,n),r&&Hg(e,r),i}(_),zg(Dg,"toolName","textEdit"),Tg=Mg))||Tg,Zg=function(t){return t.modelType===yi.LINE_EDGE?function(t){var e=t.startPoint,n=t.endPoint,r=(e.x+n.x)/2,o=(e.y+n.y)/2,i=Math.abs(e.x-n.x)+10,a=Math.abs(e.y-n.y)+10;return{x:r-i/2,y:o-a/2,x1:r+i/2,y1:o+a/2}}(t):t.modelType===yi.POLYLINE_EDGE?function(t){var e=t.points,n=Tc(e),r=hc(n,8),o=r.x,i=r.y,a=r.width,u=r.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):t.modelType===yi.BEZIER_EDGE?function(t){var e=t.path,n=Cc(e),r=hc(n,8),o=r.x,i=r.y,a=r.width,u=r.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):void 0};function qg(t){return(qg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||tb(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qg(t){return function(t){if(Array.isArray(t))return eb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||tb(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tb(t,e){if(t){if("string"==typeof t)return eb(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eb(t,e):void 0}}function eb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function nb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rb(t,e){return(rb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ob(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ub(t);if(e){var o=ub(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ib(this,n)}}function ib(t,e){if(e&&("object"===qg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ab(t)}function ab(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ub(t){return(ub=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function cb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var sb=Ne((Kg=Wg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rb(t,e)}(i,t);var e,n,r,o=ob(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),cb(ab(e=o.call(this)),"stepDrag",void 0),cb(ab(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),cb(ab(e),"onDragging",(function(t){var n=t.deltaX,r=t.deltaY,o=e.props.graphModel,i=o.getSelectElements(!0);o.moveNodes(i.nodes.map((function(t){return t.id})),n,r)})),cb(ab(e),"handleContextMenu",(function(t){t.preventDefault();var n=e.props,r=n.graphModel,o=n.graphModel,i=o.eventCenter,a=o.selectElements,u=r.getPointByClient({x:t.clientX,y:t.clientY}),c={nodes:[],edges:[]};Qg(a.values()).forEach((function(t){t.BaseType===vi.NODE&&c.nodes.push(t.getData()),t.BaseType===vi.EDGE&&c.edges.push(t.getData())})),i.emit(gi.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})}));var n=t.graphModel,r=n.gridSize,a=n.eventCenter;return e.stepDrag=new zc({onDragging:e.onDragging,step:r,eventType:"SELECTION",eventCenter:a}),e}return e=i,(n=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,n=t.transformModel;if(!(e.size<=1)){var r=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===vi.NODE&&(e=function(t){var e=t.x,n=t.y,r=t.width,o=t.height;return{x:e-r/2,y:n-o/2,x1:e+r/2,y1:n+o/2}}(t)),t.BaseType===vi.EDGE&&(e=Zg(t)),r=Math.min(r,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),a=Math.max(a,e.y1)}));var u=Jg(n.CanvasPointToHtmlPoint([r,o]),2);r=u[0],o=u[1];var c=Jg(n.CanvasPointToHtmlPoint([i,a]),2);return i=c[0],a=c[1],v("div",{className:"lf-multiple-select",style:{left:"".concat(r-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-r+20,"px"),height:"".concat(a-o+20,"px")},onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&nb(e.prototype,n),r&&nb(e,r),i}(_),cb(Wg,"toolName","multipleSelect"),Vg=Kg))||Vg;function lb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function fb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var db=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),fb(this,"tools",void 0),fb(this,"components",void 0),fb(this,"toolMap",new Map),fb(this,"instance",void 0),this.instance=e,this.isDisabledTool($g.toolName)||this.registerTool($g.toolName,$g),this.isDisabledTool(sb.toolName)||this.registerTool(sb.toolName,sb)}var e,n,r;return e=t,(n=[{key:"isDisabledTool",value:function(t){return-1!==this.instance.options.disabledTools.indexOf(t)}},{key:"registerTool",value:function(t,e){this.toolMap.set(t,e)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&lb(e.prototype,n),r&&lb(e,r),t}(),pb=n(162),hb=n.n(pb);function yb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),vb(this,"mousetrap",void 0),vb(this,"options",void 0),vb(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var n=e.lf;this.target=n.container,this.mousetrap=new hb.a(this.target),e.keyboard.enabled&&this.enable(!0)}var e,n,r;return e=t,(n=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(ur(e))e.forEach((function(e){var n=e.keys,r=e.callback,o=e.action;return t.on(n,r,o)}));else{var n=e.keys,r=e.callback,o=e.action;this.on(n,r,o)}}},{key:"on",value:function(t,e,n){this.mousetrap.bind(this.getKeys(t),e,n)}},{key:"disabled",get:function(){return!0!==this.options.keyboard.enabled}},{key:"off",value:function(t,e){this.mousetrap.unbind(this.getKeys(t),e)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var e=this;return(Array.isArray(t)?t:[t]).map((function(t){return e.formatKey(t)}))}},{key:"formatKey",value:function(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&yb(e.prototype,n),r&&yb(e,r),t}(),bb=gb,mb=null;function _b(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Ob(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach((function(t){t.x+=e,t.y+=e})),t.text&&(t.text.x+=e,t.text.y+=e),t}function Eb(t){return(Eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function xb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wb(Object(n),!0).forEach((function(e){jb(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wb(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Sb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function jb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pb=function(){function t(e){var n,r,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),jb(this,"container",void 0),jb(this,"width",void 0),jb(this,"height",void 0),jb(this,"graphModel",void 0),jb(this,"history",void 0),jb(this,"viewMap",new Map),jb(this,"tool",void 0),jb(this,"keyboard",void 0),jb(this,"dnd",void 0),jb(this,"options",void 0),jb(this,"snaplineModel",void 0),jb(this,"components",[]),jb(this,"plugins",void 0),jb(this,"extension",{}),jb(this,"adapterIn",void 0),jb(this,"adapterOut",void 0),jb(this,"getView",(function(t){return o.viewMap.get(t)})),e=yf(e),this.options=e,this.container=e.container,this.plugins=e.plugins,this.graphModel=new rs(xb({},e)),this.tool=new db(this),this.options.isSilentMode||!1===this.options.history||(this.history=new Ng(this.graphModel,e.isPropertiesChangeHistory)),this.dnd=new hf({lf:this}),this.keyboard=new bb({lf:this,keyboard:e.keyboard}),e.isSilentMode||!1===e.snapline||(this.snaplineModel=new Ap(this.graphModel),n=this.graphModel.eventCenter,r=this.snaplineModel,n.on("node:mousemove",(function(t){var e=t.data;r.setNodeSnapLine(e)})),n.on("node:mouseup",(function(){r.clearSnapline()}))),function(t,e){var n=t.keyboard,r=n.options.keyboard;n.on(["cmd + c","ctrl + c"],(function(){if(r.enabled&&!e.textEditElement){var n=t.options.guards,o=e.getSelectElements(!1);return n&&n.beforeClone&&!n.beforeClone(o)?(mb=null,!1):((mb=o).nodes.forEach((function(t){return _b(t,40)})),mb.edges.forEach((function(t){return Ob(t,40)})),!1)}})),n.on(["cmd + v","ctrl + v"],(function(){if(r.enabled&&!e.textEditElement){if(mb&&(mb.nodes||mb.edges)){t.clearSelectElements();var n=t.addElements(mb);if(!n)return;n.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),n.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),mb.nodes.forEach((function(t){return _b(t,40)})),mb.edges.forEach((function(t){return Ob(t,40)}))}return!1}})),n.on(["cmd + z","ctrl + z"],(function(){if(r.enabled&&!e.textEditElement)return t.undo(),!1})),n.on(["cmd + y","ctrl + y"],(function(){if(r.enabled&&!e.textEditElement)return t.redo(),!1})),n.on(["backspace"],(function(){if(r.enabled&&!e.textEditElement){var n=e.getSelectElements(!0);return t.clearSelectElements(),n.edges.forEach((function(e){return t.deleteEdge(e.id)})),n.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}}))}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(e.disabledPlugins)}var e,n,r;return e=t,r=[{key:"use",value:function(t){var e=t.pluginName;e||(console.warn("请给插件".concat(t.name||t.constructor.name,"指定pluginName!")),e=t.name);var n=this.extensions.get(e);n&&n.destroy&&n.destroy(),this.extensions.set(e,t)}},{key:"t",value:function(t){return t}}],(n=[{key:"register",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var r={BaseEdge:Xv,BaseEdgeModel:xu,BaseNode:Oh,BaseNodeModel:Uf,RectNode:Th,RectNodeModel:ep,CircleNode:Hh,CircleNodeModel:Qf,PolygonNode:Jh,PolygonNodeModel:Gd,TextNode:Dy,TextNodeModel:hp,LineEdge:Zv,LineEdgeModel:Hu,DiamondNode:uy,DiamondNodeModel:hd,PolylineEdge:hg,PolylineEdgeModel:tc,BezierEdge:Sg,BezierEdgeModel:Df,EllipseNode:_y,EllipseNodeModel:Pd,HtmlNode:Xy,HtmlNodeModel:xp,h:v,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(r[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(r[e]=t)}));var o=e(r),i=o.view,a=o.model,u=i;n&&!u.isObervered&&(u.isObervered=!0,u=Ne(u)),this.setView(t,u),this.graphModel.setModel(t,a)}else this.registerElement(t)}},{key:"registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=Ne(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"defaultRegister",value:function(){this.registerElement({view:Th,model:ep,type:"rect"}),this.registerElement({type:"circle",view:Hh,model:Qf}),this.registerElement({type:"polygon",view:Jh,model:Gd}),this.registerElement({type:"line",view:Zv,model:Hu}),this.registerElement({type:"polyline",view:hg,model:tc}),this.registerElement({type:"bezier",view:Sg,model:Df}),this.registerElement({type:"text",view:Dy,model:hp}),this.registerElement({type:"ellipse",view:_y,model:Pd}),this.registerElement({type:"diamond",view:uy,model:hd}),this.registerElement({type:"html",view:Xy,model:xp})}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e),e||this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformModel,n=t.coordinate,r=t.id;if(!n){var o=this.getNodeModelById(r);o&&(n=o.getData());var i=this.getEdgeModelById(r);i&&(n=i.textPosition)}var a=n,u=a.x,c=a.y;e.focusOn(u,c,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,e){this.options.width=null!=t?t:this.options.width,this.options.height=null!=e?e:this.options.height,this.graphModel.resize(t,e)}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.updateText(t,e)}},{key:"deleteElement",value:function(t){var e,n,r,o=this.getModelById(t);return!!o&&null!==(n=null===(r=(jb(e={},vi.NODE,this.deleteNode),jb(e,vi.EDGE,this.deleteEdge),e)[o.BaseType])||void 0===r?void 0:r.call(this,t))&&void 0!==n&&n}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){return this.graphModel.getElement(t).getData()}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"changeEdgeType",value:function(t,e){this.graphModel.changeEdgeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){return this.graphModel.addNode(t)}},{key:"deleteNode",value:function(t){var e=this.graphModel.getNodeModelById(t);if(!e)return!1;var n=e.getData(),r=this.options.guards,o=!r||!r.beforeDelete||r.beforeDelete(n);return o&&this.graphModel.deleteNode(t),o}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModelById(t).getData(),n=this.options.guards;if(!n||!n.beforeClone||n.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"getNodeModelById",value:function(t){return this.graphModel.getNodeModelById(t)}},{key:"getNodeDataById",value:function(t){return this.graphModel.getNodeModelById(t).getData()}},{key:"addEdge",value:function(t){return this.graphModel.addEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,n=this.graphModel.edgesMap[t];if(!n)return!1;var r=n.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(r);return o&&this.graphModel.deleteEdgeById(t),o}},{key:"deleteEdgeByNodeId",value:function(t){var e=t.sourceNodeId,n=t.targetNodeId;e&&n?this.graphModel.deleteEdgeBySourceAndTarget(e,n):e?this.graphModel.deleteEdgeBySource(e):n&&this.graphModel.deleteEdgeByTarget(n)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdgeModels",value:function(t){var e=this.graphModel.edges,n=t.sourceNodeId,r=t.targetNodeId;if(n&&r){var o=[];return e.forEach((function(t){t.sourceNodeId===n&&t.targetNodeId===r&&o.push(t)})),o}if(n){var i=[];return e.forEach((function(t){t.sourceNodeId===n&&i.push(t)})),i}if(r){var a=[];return e.forEach((function(t){t.targetNodeId===r&&a.push(t)})),a}return[]}},{key:"getEdgeDataById",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var n;null===(n=this.graphModel.getElement(t))||void 0===n||n.setProperties(vu(e))}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{key:"setElementZIndex",value:function(t,e){return this.graphModel.setElementZIndex(t,e)}},{key:"addElements",value:function(t){for(var e=this,n=t.nodes,r=t.edges,o={},i={nodes:[],edges:[]},a=0;a<n.length;a++){var u=n[a],c=u.id,s=this.addNode(u);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return r.forEach((function(t){var n=t.sourceNodeId,r=t.targetNodeId;o[n]&&(t.sourceNodeId=o[n]),o[r]&&(t.targetNodeId=o[r]);var a=e.graphModel.addEdge(t);i.edges.push(a)})),i}},{key:"getAreaElement",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.graphModel.getAreaElement(t,e,n,r).map((function(t){return t.getData()}))}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(t):t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfigModel.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=vu(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=vu(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){return this.graphModel.transformModel.zoom(t,e)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformModel.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformModel.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel;return{SCALE_X:t.SCALE_X,SCALE_Y:t.SCALE_Y,TRANSLATE_X:t.TRANSLATE_X,TRANSLATE_Y:t.TRANSLATE_Y}}},{key:"translate",value:function(t,e){this.graphModel.transformModel.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,e=t.TRANSLATE_X,n=t.TRANSLATE_Y;this.translate(-e,-n)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t){this.graphModel.fitView(t)}},{key:"on",value:function(t,e){this.graphModel.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.graphModel.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.graphModel.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.graphModel.eventCenter.emit(t,e)}},{key:"installPlugins",value:function(){var e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=null!==(e=this.plugins)&&void 0!==e?e:t.extensions;o.forEach((function(t){var e=t.pluginName||t.name;-1===r.indexOf(e)&&n.installPlugin(t)}))}},{key:"installPlugin",value:function(e){if("object"===Eb(e)){var n=e.install,r=e.render;return n&&n.call(e,this,t),r&&this.components.push(r.bind(e)),void(this.extension[e.pluginName]=e)}var o=e,i=new o({lf:this,LogicFlow:t});i.render&&this.components.push(i.render.bind(i)),this.extension[o.pluginName]=i}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var n=new e(xb(xb({},t),{},{virtual:!0}),this.graphModel);return n.init(),n.virtual=!0,this.graphModel.setFakerNode(n),n}console.warn("不存在为".concat(t.type,"类型的节点"))}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"renderRawData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.graphDataToModel(vu(t)),this.emit(gi.GRAPH_RENDERED,t),this.isRendered&&!e||(H(v(sf,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.isRendered=!0)}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t,e)}}])&&Sb(e.prototype,n),r&&Sb(e,r),t}();jb(Pb,"extensions",new Map);var Ab=n(160);e.default=Pb}])}));
|
|
1
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=211)}([function(t,e,n){var r=n(113),o=n(41),i=n(173);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,n){"use strict";var r=n(37),o=n(78),i=n(67),a=n(53),u=n(108),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,n){var r=n(5),o=n(144),i=n(145),a=n(1),u=n(54),c=n(25),s=c("iterator"),l=c("toStringTag"),f=a.values,d=function(t,e){if(t){if(t[s]!==f)try{u(t,s,f)}catch(e){t[s]=f}if(t[l]||u(t,l,e),o[e])for(var n in a)if(t[n]!==a[n])try{u(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var p in o)d(r[p]&&r[p].prototype,p);d(i,"DOMTokenList")},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(43),a=n(73),u=n(33),c=n(13),s=n(61),l=n(34),f=n(106),d=n(15),p=n(32),h=n(94),y=n(26),v=n(31),g=n(55),b=n(83),m=n(30),_=n(36),O=n(37),E=n(82),w=n(38),x=n(68),S=n(51),j=n(63),P=n(69),A=n(136),k=n(109),T=n(48),D=n(35),M=n(88),N=n(96),R=n(41),C=n(79),I=n(86),L=n(66),B=n(80),H=n(25),U=n(146),X=n(147),G=n(70),F=n(53),Y=n(71).forEach,z=I("hidden"),V=H("toPrimitive"),W=F.set,K=F.getterFor("Symbol"),$=Object.prototype,Z=o.Symbol,q=Z&&Z.prototype,J=o.TypeError,Q=o.QObject,tt=i("JSON","stringify"),et=T.f,nt=D.f,rt=A.f,ot=M.f,it=c([].push),at=C("symbols"),ut=C("op-symbols"),ct=C("string-to-symbol-registry"),st=C("symbol-to-string-registry"),lt=C("wks"),ft=!Q||!Q.prototype||!Q.prototype.findChild,dt=l&&d((function(){return 7!=S(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=et($,e);r&&delete $[e],nt(t,e,n),r&&t!==$&&nt($,e,r)}:nt,pt=function(t,e){var n=at[t]=S(q);return W(n,{type:"Symbol",tag:t,description:e}),l||(n.description=e),n},ht=function(t,e,n){t===$&&ht(ut,e,n),m(t);var r=E(e);return m(n),p(at,r)?(n.enumerable?(p(t,z)&&t[z][r]&&(t[z][r]=!1),n=S(n,{enumerable:x(0,!1)})):(p(t,z)||nt(t,z,x(1,{})),t[z][r]=!0),dt(t,r,n)):nt(t,r,n)},yt=function(t,e){m(t);var n=O(e),r=j(n).concat(mt(n));return Y(r,(function(e){l&&!u(vt,n,e)||ht(t,e,n[e])})),t},vt=function(t){var e=E(t),n=u(ot,this,e);return!(this===$&&p(at,e)&&!p(ut,e))&&(!(n||!p(this,e)||!p(at,e)||p(this,z)&&this[z][e])||n)},gt=function(t,e){var n=O(t),r=E(e);if(n!==$||!p(at,r)||p(ut,r)){var o=et(n,r);return!o||!p(at,r)||p(n,z)&&n[z][r]||(o.enumerable=!0),o}},bt=function(t){var e=rt(O(t)),n=[];return Y(e,(function(t){p(at,t)||p(L,t)||it(n,t)})),n},mt=function(t){var e=t===$,n=rt(e?ut:O(t)),r=[];return Y(n,(function(t){!p(at,t)||e&&!p($,t)||it(r,at[t])})),r};(f||(R(q=(Z=function(){if(g(q,this))throw J("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?w(arguments[0]):void 0,e=B(t),n=function(t){this===$&&u(n,ut,t),p(this,z)&&p(this[z],e)&&(this[z][e]=!1),dt(this,e,x(1,t))};return l&&ft&&dt($,e,{configurable:!0,set:n}),pt(e,t)}).prototype,"toString",(function(){return K(this).tag})),R(Z,"withoutSetter",(function(t){return pt(B(t),t)})),M.f=vt,D.f=ht,T.f=gt,P.f=A.f=bt,k.f=mt,U.f=function(t){return pt(H(t),t)},l&&(nt(q,"description",{configurable:!0,get:function(){return K(this).description}}),s||R($,"propertyIsEnumerable",vt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:Z}),Y(j(lt),(function(t){X(t)})),r({target:"Symbol",stat:!0,forced:!f},{for:function(t){var e=w(t);if(p(ct,e))return ct[e];var n=Z(e);return ct[e]=n,st[n]=e,n},keyFor:function(t){if(!b(t))throw J(t+" is not a symbol");if(p(st,t))return st[t]},useSetter:function(){ft=!0},useSimple:function(){ft=!1}}),r({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?S(t):yt(S(t),e)},defineProperty:ht,defineProperties:yt,getOwnPropertyDescriptor:gt}),r({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:bt,getOwnPropertySymbols:mt}),r({target:"Object",stat:!0,forced:d((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(_(t))}}),tt)&&r({target:"JSON",stat:!0,forced:!f||d((function(){var t=Z();return"[null]"!=tt([t])||"{}"!=tt({a:t})||"{}"!=tt(Object(t))}))},{stringify:function(t,e,n){var r=N(arguments),o=e;if((v(e)||void 0!==t)&&!b(t))return h(e)||(e=function(t,e){if(y(o)&&(e=u(o,this,t,e)),!b(e))return e}),r[1]=e,a(tt,null,r)}});if(!q[V]){var _t=q.valueOf;R(q,V,(function(t){return u(_t,this)}))}G(Z,"Symbol"),L[z]=!0},function(t,e,n){"use strict";var r=n(143).charAt,o=n(38),i=n(53),a=n(108),u=i.set,c=i.getterFor("String Iterator");a(String,"String",(function(t){u(this,{type:"String Iterator",string:o(t),index:0})}),(function(){var t,e=c(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(103))},function(t,e,n){"use strict";var r=n(14),o=n(34),i=n(5),a=n(13),u=n(32),c=n(26),s=n(55),l=n(38),f=n(35).f,d=n(131),p=i.Symbol,h=p&&p.prototype;if(o&&c(p)&&(!("description"in h)||void 0!==p().description)){var y={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(h,this)?new p(t):void 0===t?p():p(t);return""===t&&(y[e]=!0),e};d(v,p),v.prototype=h,h.constructor=v;var g="Symbol(test)"==String(p("test")),b=a(h.toString),m=a(h.valueOf),_=/^Symbol\((.*)\)[^)]+$/,O=a("".replace),E=a("".slice);f(h,"description",{configurable:!0,get:function(){var t=m(this),e=b(t);if(u(y,t))return"";var n=g?E(e,7,-1):O(e,_,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:v})}},function(t,e,n){n(147)("iterator")},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"$mobx",(function(){return F})),n.d(e,"FlowCancellationError",(function(){return qe})),n.d(e,"ObservableMap",(function(){return nr})),n.d(e,"ObservableSet",(function(){return ir})),n.d(e,"Reaction",(function(){return Oe})),n.d(e,"_allowStateChanges",(function(){return Ht})),n.d(e,"_allowStateChangesInsideComputed",(function(){return Ce})),n.d(e,"_allowStateReadsEnd",(function(){return ie})),n.d(e,"_allowStateReadsStart",(function(){return oe})),n.d(e,"_autoAction",(function(){return Re})),n.d(e,"_endAction",(function(){return Bt})),n.d(e,"_getAdministration",(function(){return xr})),n.d(e,"_getGlobalState",(function(){return de})),n.d(e,"_interceptReads",(function(){return an})),n.d(e,"_isComputingDerivation",(function(){return qt})),n.d(e,"_resetGlobalState",(function(){return pe})),n.d(e,"_startAction",(function(){return Lt})),n.d(e,"action",(function(){return Ne})),n.d(e,"autorun",(function(){return Le})),n.d(e,"comparer",(function(){return W})),n.d(e,"computed",(function(){return kt})),n.d(e,"configure",(function(){return Ye})),n.d(e,"createAtom",(function(){return V})),n.d(e,"defineProperty",(function(){return On})),n.d(e,"entries",(function(){return vn})),n.d(e,"extendObservable",(function(){return ze})),n.d(e,"flow",(function(){return en})),n.d(e,"flowResult",(function(){return rn})),n.d(e,"get",(function(){return _n})),n.d(e,"getAtom",(function(){return wr})),n.d(e,"getDebugName",(function(){return Sr})),n.d(e,"getDependencyTree",(function(){return Ve})),n.d(e,"getObserverTree",(function(){return Ke})),n.d(e,"has",(function(){return mn})),n.d(e,"intercept",(function(){return un})),n.d(e,"isAction",(function(){return Ie})),n.d(e,"isBoxedObservable",(function(){return zt})),n.d(e,"isComputed",(function(){return sn})),n.d(e,"isComputedProp",(function(){return ln})),n.d(e,"isFlow",(function(){return on})),n.d(e,"isFlowCancellationError",(function(){return Je})),n.d(e,"isObservable",(function(){return dn})),n.d(e,"isObservableArray",(function(){return Qn})),n.d(e,"isObservableMap",(function(){return rr})),n.d(e,"isObservableObject",(function(){return dr})),n.d(e,"isObservableProp",(function(){return pn})),n.d(e,"isObservableSet",(function(){return ar})),n.d(e,"keys",(function(){return hn})),n.d(e,"makeAutoObservable",(function(){return Gn})),n.d(e,"makeObservable",(function(){return Un})),n.d(e,"observable",(function(){return jt})),n.d(e,"observe",(function(){return wn})),n.d(e,"onBecomeObserved",(function(){return Xe})),n.d(e,"onBecomeUnobserved",(function(){return Ge})),n.d(e,"onReactionError",(function(){return Ee})),n.d(e,"override",(function(){return Z})),n.d(e,"ownKeys",(function(){return En})),n.d(e,"reaction",(function(){return Ue})),n.d(e,"remove",(function(){return bn})),n.d(e,"runInAction",(function(){return Ce})),n.d(e,"set",(function(){return gn})),n.d(e,"spy",(function(){return Pe})),n.d(e,"toJS",(function(){return Sn})),n.d(e,"trace",(function(){return jn})),n.d(e,"transaction",(function(){return An})),n.d(e,"untracked",(function(){return ee})),n.d(e,"values",(function(){return yn})),n.d(e,"when",(function(){return kn}));function r(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw new Error("number"==typeof t?"[MobX] minified error nr: "+t+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var o={};function i(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:o}var a=Object.assign,u=Object.getOwnPropertyDescriptor,c=Object.defineProperty,s=Object.prototype,l=[];Object.freeze(l);var f={};Object.freeze(f);var d="undefined"!=typeof Proxy,p=Object.toString();function h(){d||r("Proxy not available")}function y(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var v=function(){};function g(t){return"function"==typeof t}function b(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function m(t){return null!==t&&"object"==typeof t}function _(t){if(!m(t))return!1;var e=Object.getPrototypeOf(t);if(null==e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n.toString()===p}function O(t){var e=null==t?void 0:t.constructor;return!!e&&("GeneratorFunction"===e.name||"GeneratorFunction"===e.displayName)}function E(t,e,n){c(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function w(t,e,n){c(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function x(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(t){return m(t)&&!0===t[n]}}function S(t){return t instanceof Map}function j(t){return t instanceof Set}var P=void 0!==Object.getOwnPropertySymbols;var A="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:P?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function k(t){return null===t?null:"object"==typeof t?""+t:t}function T(t,e){return s.hasOwnProperty.call(t,e)}var D=Object.getOwnPropertyDescriptors||function(t){var e={};return A(t).forEach((function(n){e[n]=u(t,n)})),e};function M(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function N(t,e,n){return e&&M(t.prototype,e),n&&M(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function R(){return(R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function C(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,I(t,e)}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function L(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function H(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return B(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var U=Symbol("mobx-stored-annotations");function X(t){return Object.assign((function(e,n){G(e,n,t)}),t)}function G(t,e,n){T(t,U)||E(t,U,R({},t[U])),function(t){return"override"===t.annotationType_}(n)||(t[U][e]=n)}var F=Symbol("mobx administration"),Y=function(){function t(t){void 0===t&&(t="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Gt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},e.reportObserved=function(){return me(this)},e.reportChanged=function(){ge(),_e(this),be()},e.toString=function(){return this.name_},t}(),z=x("Atom",Y);function V(t,e,n){void 0===e&&(e=v),void 0===n&&(n=v);var r=new Y(t);return e!==v&&Xe(r,e),n!==v&&Ge(r,n),r}var W={identity:function(t,e){return t===e},structural:function(t,e){return Pr(t,e)},default:function(t,e){return Object.is?Object.is(t,e):t===e?0!==t||1/t==1/e:t!=t&&e!=e},shallow:function(t,e){return Pr(t,e,1)}};function K(t,e,n){return dn(t)?t:Array.isArray(t)?jt.array(t,{name:n}):_(t)?jt.object(t,void 0,{name:n}):S(t)?jt.map(t,{name:n}):j(t)?jt.set(t,{name:n}):"function"!=typeof t||Ie(t)||on(t)?t:O(t)?en(t):Re(n,t)}function $(t){return t}var Z=X({annotationType_:"override",make_:function(t,e){0;0;return 0},extend_:function(t,e,n,o){r("'"+this.annotationType_+"' can only be used with 'makeObservable'")}});function q(t,e){return{annotationType_:t,options_:e,make_:J,extend_:Q}}function J(t,e,n,r){var o;if(null!=(o=this.options_)&&o.bound)return null===this.extend_(t,e,n,!1)?0:1;if(r===t.target_)return null===this.extend_(t,e,n,!1)?0:2;if(Ie(n.value))return 1;var i=tt(t,this,e,n,!1);return c(r,e,i),2}function Q(t,e,n,r){var o=tt(t,this,e,n);return t.defineProperty_(e,o,r)}function tt(t,e,n,r,o){var i,a,u,c,s,l,f,d;void 0===o&&(o=fe.safeDescriptors),d=r,e.annotationType_,d.value;var p,h=r.value;null!=(i=e.options_)&&i.bound&&(h=h.bind(null!=(p=t.proxy_)?p:t.target_));return{value:Ct(null!=(a=null==(u=e.options_)?void 0:u.name)?a:n.toString(),h,null!=(c=null==(s=e.options_)?void 0:s.autoAction)&&c,null!=(l=e.options_)&&l.bound?null!=(f=t.proxy_)?f:t.target_:void 0),configurable:!o||t.isPlainObject_,enumerable:!1,writable:!o}}function et(t,e){return{annotationType_:t,options_:e,make_:nt,extend_:rt}}function nt(t,e,n,r){var o;if(r===t.target_)return null===this.extend_(t,e,n,!1)?0:2;if(null!=(o=this.options_)&&o.bound&&(!T(t.target_,e)||!on(t.target_[e]))&&null===this.extend_(t,e,n,!1))return 0;if(on(n.value))return 1;var i=ot(t,this,e,n,!1,!1);return c(r,e,i),2}function rt(t,e,n,r){var o,i=ot(t,this,e,n,null==(o=this.options_)?void 0:o.bound);return t.defineProperty_(e,i,r)}function ot(t,e,n,r,o,i){var a;void 0===i&&(i=fe.safeDescriptors),a=r,e.annotationType_,a.value;var u,c=r.value;(on(c)||(c=en(c)),o)&&((c=c.bind(null!=(u=t.proxy_)?u:t.target_)).isMobXFlow=!0);return{value:c,configurable:!i||t.isPlainObject_,enumerable:!1,writable:!i}}function it(t,e){return{annotationType_:t,options_:e,make_:at,extend_:ut}}function at(t,e,n){return null===this.extend_(t,e,n,!1)?0:1}function ut(t,e,n,r){return function(t,e,n,r){e.annotationType_,r.get;0}(0,this,0,n),t.defineComputedProperty_(e,R({},this.options_,{get:n.get,set:n.set}),r)}function ct(t,e){return{annotationType_:t,options_:e,make_:st,extend_:lt}}function st(t,e,n){return null===this.extend_(t,e,n,!1)?0:1}function lt(t,e,n,r){var o,i;return function(t,e,n,r){e.annotationType_;0}(0,this),t.defineObservableProperty_(e,n.value,null!=(o=null==(i=this.options_)?void 0:i.enhancer)?o:K,r)}var ft=dt();function dt(t){return{annotationType_:"true",options_:t,make_:pt,extend_:ht}}function pt(t,e,n,r){var o,i,a,u;if(n.get)return kt.make_(t,e,n,r);if(n.set){var s=Ct(e.toString(),n.set);return r===t.target_?null===t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:s})?0:2:(c(r,e,{configurable:!0,set:s}),2)}if(r!==t.target_&&"function"==typeof n.value)return O(n.value)?(null!=(u=this.options_)&&u.autoBind?en.bound:en).make_(t,e,n,r):(null!=(a=this.options_)&&a.autoBind?Re.bound:Re).make_(t,e,n,r);var l,f=!1===(null==(o=this.options_)?void 0:o.deep)?jt.ref:jt;"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(l=t.proxy_)?l:t.target_));return f.make_(t,e,n,r)}function ht(t,e,n,r){var o,i,a;if(n.get)return kt.extend_(t,e,n,r);if(n.set)return t.defineProperty_(e,{configurable:!fe.safeDescriptors||t.isPlainObject_,set:Ct(e.toString(),n.set)},r);"function"==typeof n.value&&null!=(o=this.options_)&&o.autoBind&&(n.value=n.value.bind(null!=(a=t.proxy_)?a:t.target_));return(!1===(null==(i=this.options_)?void 0:i.deep)?jt.ref:jt).extend_(t,e,n,r)}var yt={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function vt(t){return t||yt}Object.freeze(yt);var gt=ct("observable"),bt=ct("observable.ref",{enhancer:$}),mt=ct("observable.shallow",{enhancer:function(t,e,n){return null==t||dr(t)||Qn(t)||rr(t)||ar(t)?t:Array.isArray(t)?jt.array(t,{name:n,deep:!1}):_(t)?jt.object(t,void 0,{name:n,deep:!1}):S(t)?jt.map(t,{name:n,deep:!1}):j(t)?jt.set(t,{name:n,deep:!1}):void 0}}),_t=ct("observable.struct",{enhancer:function(t,e){return Pr(t,e)?e:t}}),Ot=X(gt);function Et(t){return!0===t.deep?K:!1===t.deep?$:(e=t.defaultDecorator)&&null!=(n=null==(r=e.options_)?void 0:r.enhancer)?n:K;var e,n,r}function wt(t,e,n){if(!b(e))return dn(t)?t:_(t)?jt.object(t,e,n):Array.isArray(t)?jt.array(t,e):S(t)?jt.map(t,e):j(t)?jt.set(t,e):"object"==typeof t&&null!==t?t:jt.box(t,e);G(t,e,gt)}Object.assign(wt,Ot);var xt,St,jt=a(wt,{box:function(t,e){var n=vt(e);return new Yt(t,Et(n),n.name,!0,n.equals)},array:function(t,e){var n=vt(e);return(!1===fe.useProxies||!1===n.proxy?Er:Vn)(t,Et(n),n.name)},map:function(t,e){var n=vt(e);return new nr(t,Et(n),n.name)},set:function(t,e){var n=vt(e);return new ir(t,Et(n),n.name)},object:function(t,e,n){return ze(!1===fe.useProxies||!1===(null==n?void 0:n.proxy)?sr({},n):function(t,e){var n,r;return h(),t=sr(t,e),null!=(r=(n=t[F]).proxy_)?r:n.proxy_=new Proxy(t,Nn)}({},n),t,e)},ref:X(bt),shallow:X(mt),deep:Ot,struct:X(_t)}),Pt=it("computed"),At=it("computed.struct",{equals:W.structural}),kt=function(t,e){if(b(e))return G(t,e,Pt);if(_(t))return X(it("computed",t));var n=_(e)?e:{};return n.get=t,n.name||(n.name=t.name||""),new Vt(n)};Object.assign(kt,Pt),kt.struct=X(At);var Tt,Dt=0,Mt=1,Nt=null!=(xt=null==(St=u((function(){}),"name"))?void 0:St.configurable)&&xt,Rt={value:"action",configurable:!0,writable:!1,enumerable:!1};function Ct(t,e,n,r){function o(){return It(t,n,e,r||this,arguments)}return void 0===n&&(n=!1),o.isMobxAction=!0,Nt&&(Rt.value=t,Object.defineProperty(o,"name",Rt)),o}function It(t,e,n,r,o){var i=Lt(t,e,r,o);try{return n.apply(r,o)}catch(t){throw i.error_=t,t}finally{Bt(i)}}function Lt(t,e,n,r){var o=fe.trackingDerivation,i=!e||!o;ge();var a=fe.allowStateChanges;i&&(ne(),a=Ut(!0));var u={runAsAction_:i,prevDerivation_:o,prevAllowStateChanges_:a,prevAllowStateReads_:oe(!0),notifySpy_:!1,startTime_:0,actionId_:Mt++,parentActionId_:Dt};return Dt=u.actionId_,u}function Bt(t){Dt!==t.actionId_&&r(30),Dt=t.parentActionId_,void 0!==t.error_&&(fe.suppressReactionErrors=!0),Xt(t.prevAllowStateChanges_),ie(t.prevAllowStateReads_),be(),t.runAsAction_&&re(t.prevDerivation_),fe.suppressReactionErrors=!1}function Ht(t,e){var n=Ut(t);try{return e()}finally{Xt(n)}}function Ut(t){var e=fe.allowStateChanges;return fe.allowStateChanges=t,e}function Xt(t){fe.allowStateChanges=t}Tt=Symbol.toPrimitive;var Gt,Ft,Yt=function(t,e){function n(e,n,r,o,i){var a;return void 0===r&&(r="ObservableValue"),void 0===o&&(o=!0),void 0===i&&(i=W.default),(a=t.call(this,r)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=r,a.equals=i,a.value_=n(e,void 0,r),a}C(n,t);var r=n.prototype;return r.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},r.set=function(t){this.value_;if((t=this.prepareNewValue_(t))!==fe.UNCHANGED){0,this.setNewValue_(t)}},r.prepareNewValue_=function(t){if(Jt(this),Rn(this)){var e=In(this,{object:this,type:Fn,newValue:t});if(!e)return fe.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value_,this.name_),this.equals(this.value_,t)?fe.UNCHANGED:t},r.setNewValue_=function(t){var e=this.value_;this.value_=t,this.reportChanged(),Ln(this)&&Hn(this,{type:Fn,object:this,newValue:t,oldValue:e})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(t){return Cn(this,t)},r.observe_=function(t,e){return e&&t({observableKind:"value",debugObjectName:this.name_,object:this,type:Fn,newValue:this.value_,oldValue:void 0}),Bn(this,t)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return k(this.get())},r[e]=function(){return this.valueOf()},n}(Y,Tt),zt=x("ObservableValue",Yt),Vt=function(t){function e(t){this.dependenciesState_=Gt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Gt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Kt(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ft.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||r(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=Ct("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?W.structural:W.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var n=e.prototype;return n.onBecomeStale_=function(){!function(t){if(t.lowestObserverState_!==Gt.UP_TO_DATE_)return;t.lowestObserverState_=Gt.POSSIBLY_STALE_,t.observers_.forEach((function(t){t.dependenciesState_===Gt.UP_TO_DATE_&&(t.dependenciesState_=Gt.POSSIBLY_STALE_,t.onBecomeStale_())}))}(this)},n.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},n.get=function(){if(this.isComputing_&&r(32,this.name_,this.derivation),0!==fe.inBatch||0!==this.observers_.size||this.keepAlive_){if(me(this),Zt(this)){var t=fe.trackingContext;this.keepAlive_&&!t&&(fe.trackingContext=this),this.trackAndCompute()&&function(t){if(t.lowestObserverState_===Gt.STALE_)return;t.lowestObserverState_=Gt.STALE_,t.observers_.forEach((function(e){e.dependenciesState_===Gt.POSSIBLY_STALE_?e.dependenciesState_=Gt.STALE_:e.dependenciesState_===Gt.UP_TO_DATE_&&(t.lowestObserverState_=Gt.UP_TO_DATE_)}))}(this),fe.trackingContext=t}}else Zt(this)&&(this.warnAboutUntrackedRead_(),ge(),this.value_=this.computeValue_(!1),be());var e=this.value_;if($t(e))throw e.cause;return e},n.set=function(t){if(this.setter_){this.isRunningSetter_&&r(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,t)}finally{this.isRunningSetter_=!1}}else r(34,this.name_)},n.trackAndCompute=function(){var t=this.value_,e=this.dependenciesState_===Gt.NOT_TRACKING_,n=this.computeValue_(!0),r=e||$t(t)||$t(n)||!this.equals_(t,n);return r&&(this.value_=n),r},n.computeValue_=function(t){this.isComputing_=!0;var e,n=Ut(!1);if(t)e=Qt(this,this.derivation,this.scope_);else if(!0===fe.disableErrorBoundaries)e=this.derivation.call(this.scope_);else try{e=this.derivation.call(this.scope_)}catch(t){e=new Kt(t)}return Xt(n),this.isComputing_=!1,e},n.suspend_=function(){this.keepAlive_||(te(this),this.value_=void 0)},n.observe_=function(t,e){var n=this,r=!0,o=void 0;return Le((function(){var i=n.get();if(!r||e){var a=ne();t({observableKind:"computed",debugObjectName:n.name_,type:Fn,object:n,newValue:i,oldValue:o}),re(a)}r=!1,o=i}))},n.warnAboutUntrackedRead_=function(){},n.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},n.valueOf=function(){return k(this.get())},n[t]=function(){return this.valueOf()},e}(Symbol.toPrimitive),Wt=x("ComputedValue",Vt);!function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"}(Gt||(Gt={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Ft||(Ft={}));var Kt=function(t){this.cause=void 0,this.cause=t};function $t(t){return t instanceof Kt}function Zt(t){switch(t.dependenciesState_){case Gt.UP_TO_DATE_:return!1;case Gt.NOT_TRACKING_:case Gt.STALE_:return!0;case Gt.POSSIBLY_STALE_:for(var e=oe(!0),n=ne(),r=t.observing_,o=r.length,i=0;i<o;i++){var a=r[i];if(Wt(a)){if(fe.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return re(n),ie(e),!0}if(t.dependenciesState_===Gt.STALE_)return re(n),ie(e),!0}}return ae(t),re(n),ie(e),!1}}function qt(){return null!==fe.trackingDerivation}function Jt(t){}function Qt(t,e,n){var r=oe(!0);ae(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++fe.runId;var o,i=fe.trackingDerivation;if(fe.trackingDerivation=t,fe.inBatch++,!0===fe.disableErrorBoundaries)o=e.call(n);else try{o=e.call(n)}catch(t){o=new Kt(t)}return fe.inBatch--,fe.trackingDerivation=i,function(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,r=Gt.UP_TO_DATE_,o=0,i=t.unboundDepsCount_,a=0;a<i;a++){var u=n[a];0===u.diffValue_&&(u.diffValue_=1,o!==a&&(n[o]=u),o++),u.dependenciesState_>r&&(r=u.dependenciesState_)}n.length=o,t.newObserving_=null,i=e.length;for(;i--;){var c=e[i];0===c.diffValue_&&ye(c,t),c.diffValue_=0}for(;o--;){var s=n[o];1===s.diffValue_&&(s.diffValue_=0,he(s,t))}r!==Gt.UP_TO_DATE_&&(t.dependenciesState_=r,t.onBecomeStale_())}(t),ie(r),o}function te(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)ye(e[n],t);t.dependenciesState_=Gt.NOT_TRACKING_}function ee(t){var e=ne();try{return t()}finally{re(e)}}function ne(){var t=fe.trackingDerivation;return fe.trackingDerivation=null,t}function re(t){fe.trackingDerivation=t}function oe(t){var e=fe.allowStateReads;return fe.allowStateReads=t,e}function ie(t){fe.allowStateReads=t}function ae(t){if(t.dependenciesState_!==Gt.UP_TO_DATE_){t.dependenciesState_=Gt.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=Gt.UP_TO_DATE_}}var ue=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],ce=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},se=!0,le=!1,fe=function(){var t=i();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(se=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new ce).version&&(se=!1),se?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ce):(setTimeout((function(){le||r(35)}),1),new ce)}();function de(){return fe}function pe(){var t=new ce;for(var e in t)-1===ue.indexOf(e)&&(fe[e]=t[e]);fe.allowStateChanges=!fe.enforceActions}function he(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function ye(t,e){t.observers_.delete(e),0===t.observers_.size&&ve(t)}function ve(t){!1===t.isPendingUnobservation_&&(t.isPendingUnobservation_=!0,fe.pendingUnobservations.push(t))}function ge(){fe.inBatch++}function be(){if(0==--fe.inBatch){xe();for(var t=fe.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Vt&&n.suspend_())}fe.pendingUnobservations=[]}}function me(t){var e=fe.trackingDerivation;return null!==e?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&fe.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),!0):(0===t.observers_.size&&fe.inBatch>0&&ve(t),!1)}function _e(t){t.lowestObserverState_!==Gt.STALE_&&(t.lowestObserverState_=Gt.STALE_,t.observers_.forEach((function(t){t.dependenciesState_===Gt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=Gt.STALE_})))}var Oe=function(){function t(t,e,n,r){void 0===t&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Gt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Ft.NONE,this.name_=t,this.onInvalidate_=e,this.errorHandler_=n,this.requiresObservable_=r}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,fe.pendingReactions.push(this),xe())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){ge(),this.isScheduled_=!1;var t=fe.trackingContext;if(fe.trackingContext=this,Zt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}fe.trackingContext=t,be()}},e.track=function(t){if(!this.isDisposed_){ge();0,this.isRunning_=!0;var e=fe.trackingContext;fe.trackingContext=this;var n=Qt(this,t,void 0);fe.trackingContext=e,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&te(this),$t(n)&&this.reportExceptionInDerivation_(n.cause),be()}},e.reportExceptionInDerivation_=function(t){var e=this;if(this.errorHandler_)this.errorHandler_(t,this);else{if(fe.disableErrorBoundaries)throw t;var n="[mobx] uncaught error in '"+this+"'";fe.suppressReactionErrors||console.error(n,t),fe.globalReactionErrorHandlers.forEach((function(n){return n(t,e)}))}},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(ge(),te(this),be()))},e.getDisposer_=function(){var t=this.dispose.bind(this);return t[F]=this,t},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(t){void 0===t&&(t=!1),jn(this,t)},t}();function Ee(t){return fe.globalReactionErrorHandlers.push(t),function(){var e=fe.globalReactionErrorHandlers.indexOf(t);e>=0&&fe.globalReactionErrorHandlers.splice(e,1)}}var we=function(t){return t()};function xe(){fe.inBatch>0||fe.isRunningReactions||we(Se)}function Se(){fe.isRunningReactions=!0;for(var t=fe.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction_()}fe.isRunningReactions=!1}var je=x("Reaction",Oe);function Pe(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Ae=q("action"),ke=q("action.bound",{bound:!0}),Te=q("autoAction",{autoAction:!0}),De=q("autoAction.bound",{autoAction:!0,bound:!0});function Me(t){return function(e,n){return g(e)?Ct(e.name||"<unnamed action>",e,t):g(n)?Ct(e,n,t):b(n)?G(e,n,t?Te:Ae):b(e)?X(q(t?"autoAction":"action",{name:e,autoAction:t})):void 0}}var Ne=Me(!1);Object.assign(Ne,Ae);var Re=Me(!0);function Ce(t){return It(t.name||"<unnamed action>",!1,t,this,void 0)}function Ie(t){return g(t)&&!0===t.isMobxAction}function Le(t,e){var n,r;void 0===e&&(e=f);var o,i=null!=(n=null==(r=e)?void 0:r.name)?n:"Autorun";if(!e.scheduler&&!e.delay)o=new Oe(i,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var a=He(e),u=!1;o=new Oe(i,(function(){u||(u=!0,a((function(){u=!1,o.isDisposed_||o.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(o)}return o.schedule_(),o.getDisposer_()}Object.assign(Re,Te),Ne.bound=X(ke),Re.bound=X(De);var Be=function(t){return t()};function He(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Be}function Ue(t,e,n){var r;void 0===n&&(n=f);var o,i,a,u,c=null!=(r=n.name)?r:"Reaction",s=Ne(c,n.onError?(o=n.onError,i=e,function(){try{return i.apply(this,arguments)}catch(t){o.call(this,t)}}):e),l=!n.scheduler&&!n.delay,d=He(n),p=!0,h=!1,y=n.compareStructural?W.structural:n.equals||W.default,v=new Oe(c,(function(){p||l?g():h||(h=!0,d(g))}),n.onError,n.requiresObservable);function g(){if(h=!1,!v.isDisposed_){var e=!1;v.track((function(){var n=Ht(!1,(function(){return t(v)}));e=p||!y(a,n),u=a,a=n})),(p&&n.fireImmediately||!p&&e)&&s(a,u,v),p=!1}}return v.schedule_(),v.getDisposer_()}function Xe(t,e,n){return Fe("onBO",t,e,n)}function Ge(t,e,n){return Fe("onBUO",t,e,n)}function Fe(t,e,n,r){var o="function"==typeof r?wr(e,n):wr(e),i=g(r)?r:n,a=t+"L";return o[a]?o[a].add(i):o[a]=new Set([i]),function(){var t=o[a];t&&(t.delete(i),0===t.size&&delete o[a])}}function Ye(t){!0===t.isolateGlobalState&&function(){if((fe.pendingReactions.length||fe.inBatch||fe.isRunningReactions)&&r(36),le=!0,se){var t=i();0==--t.__mobxInstanceCount&&(t.__mobxGlobals=void 0),fe=new ce}}();var e,n,o=t.useProxies,a=t.enforceActions;if(void 0!==o&&(fe.useProxies="always"===o||"never"!==o&&"undefined"!=typeof Proxy),"ifavailable"===o&&(fe.verifyProxies=!0),void 0!==a){var u="always"===a?"always":"observed"===a;fe.enforceActions=u,fe.allowStateChanges=!0!==u&&"always"!==u}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(e){e in t&&(fe[e]=!!t[e])})),fe.allowStateReads=!fe.observableRequiresReaction,t.reactionScheduler&&(e=t.reactionScheduler,n=we,we=function(t){return e((function(){return n(t)}))})}function ze(t,e,n,r){var o=D(e),i=sr(t,r)[F];ge();try{A(o).forEach((function(t){i.extend_(t,o[t],!n||(!(t in n)||n[t]))}))}finally{be()}return t}function Ve(t,e){return We(wr(t,e))}function We(t){var e,n={name:t.name_};return t.observing_&&t.observing_.length>0&&(n.dependencies=(e=t.observing_,Array.from(new Set(e))).map(We)),n}function Ke(t,e){return $e(wr(t,e))}function $e(t){var e={name:t.name_};return function(t){return t.observers_&&t.observers_.size>0}(t)&&(e.observers=Array.from(function(t){return t.observers_}(t)).map($e)),e}var Ze=0;function qe(){this.message="FLOW_CANCELLED"}function Je(t){return t instanceof qe}qe.prototype=Object.create(Error.prototype);var Qe=et("flow"),tn=et("flow.bound",{bound:!0}),en=Object.assign((function(t,e){if(b(e))return G(t,e,Qe);var n=t,r=n.name||"<unnamed flow>",o=function(){var t,e=this,o=arguments,i=++Ze,a=Ne(r+" - runid: "+i+" - init",n).apply(e,o),u=void 0,c=new Promise((function(e,n){var o=0;function c(t){var e;u=void 0;try{e=Ne(r+" - runid: "+i+" - yield "+o++,a.next).call(a,t)}catch(t){return n(t)}l(e)}function s(t){var e;u=void 0;try{e=Ne(r+" - runid: "+i+" - yield "+o++,a.throw).call(a,t)}catch(t){return n(t)}l(e)}function l(t){if(!g(null==t?void 0:t.then))return t.done?e(t.value):(u=Promise.resolve(t.value)).then(c,s);t.then(l,n)}t=n,c(void 0)}));return c.cancel=Ne(r+" - runid: "+i+" - cancel",(function(){try{u&&nn(u);var e=a.return(void 0),n=Promise.resolve(e.value);n.then(v,v),nn(n),t(new qe)}catch(e){t(e)}})),c};return o.isMobXFlow=!0,o}),Qe);function nn(t){g(t.cancel)&&t.cancel()}function rn(t){return t}function on(t){return!0===(null==t?void 0:t.isMobXFlow)}function an(t,e,n){var r;return rr(t)||Qn(t)||zt(t)?r=xr(t):dr(t)&&(r=xr(t,e)),r.dehancer="function"==typeof e?e:n,function(){r.dehancer=void 0}}function un(t,e,n){return g(n)?function(t,e,n){return xr(t,e).intercept_(n)}(t,e,n):function(t,e){return xr(t).intercept_(e)}(t,e)}function cn(t,e){if(void 0===e)return Wt(t);if(!1===dr(t))return!1;if(!t[F].values_.has(e))return!1;var n=wr(t,e);return Wt(n)}function sn(t){return cn(t)}function ln(t,e){return cn(t,e)}function fn(t,e){return!!t&&(void 0!==e?!!dr(t)&&t[F].values_.has(e):dr(t)||!!t[F]||z(t)||je(t)||Wt(t))}function dn(t){return fn(t)}function pn(t,e){return fn(t,e)}function hn(t){return dr(t)?t[F].keys_():rr(t)||ar(t)?Array.from(t.keys()):Qn(t)?t.map((function(t,e){return e})):void r(5)}function yn(t){return dr(t)?hn(t).map((function(e){return t[e]})):rr(t)?hn(t).map((function(e){return t.get(e)})):ar(t)?Array.from(t.values()):Qn(t)?t.slice():void r(6)}function vn(t){return dr(t)?hn(t).map((function(e){return[e,t[e]]})):rr(t)?hn(t).map((function(e){return[e,t.get(e)]})):ar(t)?Array.from(t.entries()):Qn(t)?t.map((function(t,e){return[e,t]})):void r(7)}function gn(t,e,n){if(2!==arguments.length||ar(t))dr(t)?t[F].set_(e,n):rr(t)?t.set(e,n):ar(t)?t.add(e):Qn(t)?("number"!=typeof e&&(e=parseInt(e,10)),e<0&&r("Invalid index: '"+e+"'"),ge(),e>=t.length&&(t.length=e+1),t[e]=n,be()):r(8);else{ge();var o=e;try{for(var i in o)gn(t,i,o[i])}finally{be()}}}function bn(t,e){dr(t)?t[F].delete_(e):rr(t)||ar(t)?t.delete(e):Qn(t)?("number"!=typeof e&&(e=parseInt(e,10)),t.splice(e,1)):r(9)}function mn(t,e){return dr(t)?t[F].has_(e):rr(t)||ar(t)?t.has(e):Qn(t)?e>=0&&e<t.length:void r(10)}function _n(t,e){if(mn(t,e))return dr(t)?t[F].get_(e):rr(t)?t.get(e):Qn(t)?t[e]:void r(11)}function On(t,e,n){if(dr(t))return t[F].defineProperty_(e,n);r(39)}function En(t){if(dr(t))return t[F].ownKeys_();r(38)}function wn(t,e,n,r){return g(n)?function(t,e,n,r){return xr(t,e).observe_(n,r)}(t,e,n,r):function(t,e,n){return xr(t).observe_(e,n)}(t,e,n)}function xn(t,e,n){return t.set(e,n),n}function Sn(t,e){return function t(e,n){if(null==e||"object"!=typeof e||e instanceof Date||!dn(e))return e;if(zt(e)||Wt(e))return t(e.get(),n);if(n.has(e))return n.get(e);if(Qn(e)){var r=xn(n,e,new Array(e.length));return e.forEach((function(e,o){r[o]=t(e,n)})),r}if(ar(e)){var o=xn(n,e,new Set);return e.forEach((function(e){o.add(t(e,n))})),o}if(rr(e)){var i=xn(n,e,new Map);return e.forEach((function(e,r){i.set(r,t(e,n))})),i}var a=xn(n,e,{});return En(e).forEach((function(r){s.propertyIsEnumerable.call(e,r)&&(a[r]=t(e[r],n))})),a}(t,new Map)}function jn(){r("trace() is not available in production builds");for(var t=!1,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];"boolean"==typeof n[n.length-1]&&(t=n.pop());var i=Pn(n);if(!i)return r("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");i.isTracing_===Ft.NONE&&console.log("[mobx.trace] '"+i.name_+"' tracing enabled"),i.isTracing_=t?Ft.BREAK:Ft.LOG}function Pn(t){switch(t.length){case 0:return fe.trackingDerivation;case 1:return wr(t[0]);case 2:return wr(t[0],t[1])}}function An(t,e){void 0===e&&(e=void 0),ge();try{return t.apply(e)}finally{be()}}function kn(t,e,n){return 1===arguments.length||e&&"object"==typeof e?Dn(t,e):Tn(t,e,n||{})}function Tn(t,e,n){var r;if("number"==typeof n.timeout){var o=new Error("WHEN_TIMEOUT");r=setTimeout((function(){if(!a[F].isDisposed_){if(a(),!n.onError)throw o;n.onError(o)}}),n.timeout)}n.name="When";var i=Ct("When-effect",e),a=Le((function(e){Ht(!1,t)&&(e.dispose(),r&&clearTimeout(r),i())}),n);return a}function Dn(t,e){var n;var r=new Promise((function(r,o){var i=Tn(t,r,R({},e,{onError:o}));n=function(){i(),o(new Error("WHEN_CANCELLED"))}}));return r.cancel=n,r}function Mn(t){return t[F]}en.bound=X(tn);var Nn={has:function(t,e){return Mn(t).has_(e)},get:function(t,e){return Mn(t).get_(e)},set:function(t,e,n){var r;return!!b(e)&&(null==(r=Mn(t).set_(e,n,!0))||r)},deleteProperty:function(t,e){var n;return!!b(e)&&(null==(n=Mn(t).delete_(e,!0))||n)},defineProperty:function(t,e,n){var r;return null==(r=Mn(t).defineProperty_(e,n))||r},ownKeys:function(t){return Mn(t).ownKeys_()},preventExtensions:function(t){r(13)}};function Rn(t){return void 0!==t.interceptors_&&t.interceptors_.length>0}function Cn(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),y((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function In(t,e){var n=ne();try{for(var o=[].concat(t.interceptors_||[]),i=0,a=o.length;i<a&&((e=o[i](e))&&!e.type&&r(14),e);i++);return e}finally{re(n)}}function Ln(t){return void 0!==t.changeListeners_&&t.changeListeners_.length>0}function Bn(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),y((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function Hn(t,e){var n=ne(),r=t.changeListeners_;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](e);re(n)}}function Un(t,e,n){var r=sr(t,n)[F];ge();try{0,null!=e||(e=function(t){return T(t,U)||E(t,U,R({},t[U])),t[U]}(t)),A(e).forEach((function(t){return r.make_(t,e[t])}))}finally{be()}return t}var Xn=Symbol("mobx-keys");function Gn(t,e,n){if(_(t))return ze(t,t,e,n);var r=sr(t,n)[F];if(!t[Xn]){var o=Object.getPrototypeOf(t),i=new Set([].concat(A(t),A(o)));i.delete("constructor"),i.delete(F),E(o,Xn,i)}ge();try{t[Xn].forEach((function(t){return r.make_(t,!e||(!(t in e)||e[t]))}))}finally{be()}return t}var Fn="update",Yn={get:function(t,e){var n=t[F];return e===F?n:"length"===e?n.getArrayLength_():"string"!=typeof e||isNaN(e)?T(Wn,e)?Wn[e]:t[e]:n.get_(parseInt(e))},set:function(t,e,n){var r=t[F];return"length"===e&&r.setArrayLength_(n),"symbol"==typeof e||isNaN(e)?t[e]=n:r.set_(parseInt(e),n),!0},preventExtensions:function(){r(15)}},zn=function(){function t(t,e,n,r){void 0===t&&(t="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new Y(t),this.enhancer_=function(t,n){return e(t,n,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.dehanceValues_=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},e.intercept_=function(t){return Cn(this,t)},e.observe_=function(t,e){return void 0===e&&(e=!1),e&&t({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Bn(this,t)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(t){("number"!=typeof t||isNaN(t)||t<0)&&r("Out of range: "+t);var e=this.values_.length;if(t!==e)if(t>e){for(var n=new Array(t-e),o=0;o<t-e;o++)n[o]=void 0;this.spliceWithArray_(e,0,n)}else this.spliceWithArray_(t,e-t)},e.updateArrayLength_=function(t,e){t!==this.lastKnownLength_&&r(16),this.lastKnownLength_+=e,this.legacyMode_&&e>0&&Or(t+e+1)},e.spliceWithArray_=function(t,e,n){var r=this;this.atom_;var o=this.values_.length;if(void 0===t?t=0:t>o?t=o:t<0&&(t=Math.max(0,o+t)),e=1===arguments.length?o-t:null==e?0:Math.max(0,Math.min(e,o-t)),void 0===n&&(n=l),Rn(this)){var i=In(this,{object:this.proxy_,type:"splice",index:t,removedCount:e,added:n});if(!i)return l;e=i.removedCount,n=i.added}if(n=0===n.length?n:n.map((function(t){return r.enhancer_(t,void 0)})),this.legacyMode_){var a=n.length-e;this.updateArrayLength_(o,a)}var u=this.spliceItemsIntoValues_(t,e,n);return 0===e&&0===n.length||this.notifyArraySplice_(t,n,u),this.dehanceValues_(u)},e.spliceItemsIntoValues_=function(t,e,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[t,e].concat(n));var o=this.values_.slice(t,t+e),i=this.values_.slice(t+e);this.values_.length+=n.length-e;for(var a=0;a<n.length;a++)this.values_[t+a]=n[a];for(var u=0;u<i.length;u++)this.values_[t+n.length+u]=i[u];return o},e.notifyArrayChildUpdate_=function(t,e,n){var r=!this.owned_&&!1,o=Ln(this),i=o||r?{observableKind:"array",object:this.proxy_,type:Fn,debugObjectName:this.atom_.name_,index:t,newValue:e,oldValue:n}:null;this.atom_.reportChanged(),o&&Hn(this,i)},e.notifyArraySplice_=function(t,e,n){var r=!this.owned_&&!1,o=Ln(this),i=o||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:t,removed:n,added:e,removedCount:n.length,addedCount:e.length}:null;this.atom_.reportChanged(),o&&Hn(this,i)},e.get_=function(t){if(t<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},e.set_=function(t,e){var n=this.values_;if(t<n.length){this.atom_;var o=n[t];if(Rn(this)){var i=In(this,{type:Fn,object:this.proxy_,index:t,newValue:e});if(!i)return;e=i.newValue}(e=this.enhancer_(e,o))!==o&&(n[t]=e,this.notifyArrayChildUpdate_(t,e,o))}else t===n.length?this.spliceWithArray_(t,0,[e]):r(17,t,n.length)},t}();function Vn(t,e,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),h();var o=new zn(n,e,r,!1);w(o.values_,F,o);var i=new Proxy(o.values_,Yn);if(o.proxy_=i,t&&t.length){var a=Ut(!0);o.spliceWithArray_(0,0,t),Xt(a)}return i}var Wn={clear:function(){return this.splice(0)},replace:function(t){var e=this[F];return e.spliceWithArray_(0,e.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=this[F];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray_(t);case 2:return i.spliceWithArray_(t,e)}return i.spliceWithArray_(t,e,r)},spliceWithArray:function(t,e,n){return this[F].spliceWithArray_(t,e,n)},push:function(){for(var t=this[F],e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[F].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[F],e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return fe.trackingDerivation&&r(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){fe.trackingDerivation&&r(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var e=this[F],n=e.dehanceValues_(e.values_).indexOf(t);return n>-1&&(this.splice(n,1),!0)}};function Kn(t,e){"function"==typeof Array.prototype[t]&&(Wn[t]=e(t))}function $n(t){return function(){var e=this[F];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function Zn(t){return function(e,n){var r=this,o=this[F];return o.atom_.reportObserved(),o.dehanceValues_(o.values_)[t]((function(t,o){return e.call(n,t,o,r)}))}}function qn(t){return function(){var e=this,n=this[F];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),o=arguments[0];return arguments[0]=function(t,n,r){return o(t,n,r,e)},r[t].apply(r,arguments)}}Kn("concat",$n),Kn("flat",$n),Kn("includes",$n),Kn("indexOf",$n),Kn("join",$n),Kn("lastIndexOf",$n),Kn("slice",$n),Kn("toString",$n),Kn("toLocaleString",$n),Kn("every",Zn),Kn("filter",Zn),Kn("find",Zn),Kn("findIndex",Zn),Kn("flatMap",Zn),Kn("forEach",Zn),Kn("map",Zn),Kn("some",Zn),Kn("reduce",qn),Kn("reduceRight",qn);var Jn=x("ObservableArrayAdministration",zn);function Qn(t){return m(t)&&Jn(t[F])}var tr={},er="add",nr=function(t,e){function n(t,e,n){var o=this;void 0===e&&(e=K),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[F]=tr,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=e,this.name_=n,g(Map)||r(18),this.keysAtom_=V("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,Ht(!0,(function(){o.merge(t)}))}var o=n.prototype;return o.has_=function(t){return this.data_.has(t)},o.has=function(t){var e=this;if(!fe.trackingDerivation)return this.has_(t);var n=this.hasMap_.get(t);if(!n){var r=n=new Yt(this.has_(t),$,"ObservableMap.key?",!1);this.hasMap_.set(t,r),Ge(r,(function(){return e.hasMap_.delete(t)}))}return n.get()},o.set=function(t,e){var n=this.has_(t);if(Rn(this)){var r=In(this,{type:n?Fn:er,object:this,newValue:e,name:t});if(!r)return this;e=r.newValue}return n?this.updateValue_(t,e):this.addValue_(t,e),this},o.delete=function(t){var e=this;if((this.keysAtom_,Rn(this))&&!In(this,{type:"delete",object:this,name:t}))return!1;if(this.has_(t)){var n=Ln(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(t).value_,name:t}:null;return An((function(){var n;e.keysAtom_.reportChanged(),null==(n=e.hasMap_.get(t))||n.setNewValue_(!1),e.data_.get(t).setNewValue_(void 0),e.data_.delete(t)})),n&&Hn(this,r),!0}return!1},o.updateValue_=function(t,e){var n=this.data_.get(t);if((e=n.prepareNewValue_(e))!==fe.UNCHANGED){var r=Ln(this),o=r?{observableKind:"map",debugObjectName:this.name_,type:Fn,object:this,oldValue:n.value_,name:t,newValue:e}:null;0,n.setNewValue_(e),r&&Hn(this,o)}},o.addValue_=function(t,e){var n=this;this.keysAtom_,An((function(){var r,o=new Yt(e,n.enhancer_,"ObservableMap.key",!1);n.data_.set(t,o),e=o.value_,null==(r=n.hasMap_.get(t))||r.setNewValue_(!0),n.keysAtom_.reportChanged()}));var r=Ln(this),o=r?{observableKind:"map",debugObjectName:this.name_,type:er,object:this,name:t,newValue:e}:null;r&&Hn(this,o)},o.get=function(t){return this.has(t)?this.dehanceValue_(this.data_.get(t).get()):this.dehanceValue_(void 0)},o.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},o.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},o.values=function(){var t=this,e=this.keys();return kr({next:function(){var n=e.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:t.get(o)}}})},o.entries=function(){var t=this,e=this.keys();return kr({next:function(){var n=e.next(),r=n.done,o=n.value;return{done:r,value:r?void 0:[o,t.get(o)]}}})},o[t]=function(){return this.entries()},o.forEach=function(t,e){for(var n,r=H(this);!(n=r()).done;){var o=n.value,i=o[0],a=o[1];t.call(e,a,i,this)}},o.merge=function(t){var e=this;return rr(t)&&(t=new Map(t)),An((function(){_(t)?function(t){var e=Object.keys(t);if(!P)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter((function(e){return s.propertyIsEnumerable.call(t,e)}))):e}(t).forEach((function(n){return e.set(n,t[n])})):Array.isArray(t)?t.forEach((function(t){var n=t[0],r=t[1];return e.set(n,r)})):S(t)?(t.constructor!==Map&&r(19,t),t.forEach((function(t,n){return e.set(n,t)}))):null!=t&&r(20,t)})),this},o.clear=function(){var t=this;An((function(){ee((function(){for(var e,n=H(t.keys());!(e=n()).done;){var r=e.value;t.delete(r)}}))}))},o.replace=function(t){var e=this;return An((function(){for(var n,o=function(t){if(S(t)||rr(t))return t;if(Array.isArray(t))return new Map(t);if(_(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}return r(21,t)}(t),i=new Map,a=!1,u=H(e.data_.keys());!(n=u()).done;){var c=n.value;if(!o.has(c))if(e.delete(c))a=!0;else{var s=e.data_.get(c);i.set(c,s)}}for(var l,f=H(o.entries());!(l=f()).done;){var d=l.value,p=d[0],h=d[1],y=e.data_.has(p);if(e.set(p,h),e.data_.has(p)){var v=e.data_.get(p);i.set(p,v),y||(a=!0)}}if(!a)if(e.data_.size!==i.size)e.keysAtom_.reportChanged();else for(var g=e.data_.keys(),b=i.keys(),m=g.next(),O=b.next();!m.done;){if(m.value!==O.value){e.keysAtom_.reportChanged();break}m=g.next(),O=b.next()}e.data_=i})),this},o.toString=function(){return"[object ObservableMap]"},o.toJSON=function(){return Array.from(this)},o.observe_=function(t,e){return Bn(this,t)},o.intercept_=function(t){return Cn(this,t)},N(n,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:e,get:function(){return"Map"}}]),n}(Symbol.iterator,Symbol.toStringTag),rr=x("ObservableMap",nr);var or={},ir=function(t,e){function n(t,e,n){void 0===e&&(e=K),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[F]=or,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,g(Set)||r(22),this.atom_=V(this.name_),this.enhancer_=function(t,r){return e(t,r,n)},t&&this.replace(t)}var o=n.prototype;return o.dehanceValue_=function(t){return void 0!==this.dehancer?this.dehancer(t):t},o.clear=function(){var t=this;An((function(){ee((function(){for(var e,n=H(t.data_.values());!(e=n()).done;){var r=e.value;t.delete(r)}}))}))},o.forEach=function(t,e){for(var n,r=H(this);!(n=r()).done;){var o=n.value;t.call(e,o,o,this)}},o.add=function(t){var e=this;if((this.atom_,Rn(this))&&!In(this,{type:er,object:this,newValue:t}))return this;if(!this.has(t)){An((function(){e.data_.add(e.enhancer_(t,void 0)),e.atom_.reportChanged()}));var n=Ln(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:er,object:this,newValue:t}:null;0,n&&Hn(this,r)}return this},o.delete=function(t){var e=this;if(Rn(this)&&!In(this,{type:"delete",object:this,oldValue:t}))return!1;if(this.has(t)){var n=Ln(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:t}:null;return An((function(){e.atom_.reportChanged(),e.data_.delete(t)})),n&&Hn(this,r),!0}return!1},o.has=function(t){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(t))},o.entries=function(){var t=0,e=Array.from(this.keys()),n=Array.from(this.values());return kr({next:function(){var r=t;return t+=1,r<n.length?{value:[e[r],n[r]],done:!1}:{done:!0}}})},o.keys=function(){return this.values()},o.values=function(){this.atom_.reportObserved();var t=this,e=0,n=Array.from(this.data_.values());return kr({next:function(){return e<n.length?{value:t.dehanceValue_(n[e++]),done:!1}:{done:!0}}})},o.replace=function(t){var e=this;return ar(t)&&(t=new Set(t)),An((function(){Array.isArray(t)||j(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&r("Cannot initialize set from "+t)})),this},o.observe_=function(t,e){return Bn(this,t)},o.intercept_=function(t){return Cn(this,t)},o.toJSON=function(){return Array.from(this)},o.toString=function(){return"[object ObservableSet]"},o[t]=function(){return this.values()},N(n,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:e,get:function(){return"Set"}}]),n}(Symbol.iterator,Symbol.toStringTag),ar=x("ObservableSet",ir),ur=Object.create(null),cr=function(){function t(t,e,n,r){void 0===e&&(e=new Map),void 0===r&&(r=ft),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=t,this.values_=e,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new Y("ObservableObject.keys"),this.isPlainObject_=_(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(t){return this.values_.get(t).get()},e.setObservablePropValue_=function(t,e){var n=this.values_.get(t);if(n instanceof Vt)return n.set(e),!0;if(Rn(this)){var r=In(this,{type:Fn,object:this.proxy_||this.target_,name:t,newValue:e});if(!r)return null;e=r.newValue}if((e=n.prepareNewValue_(e))!==fe.UNCHANGED){var o=Ln(this),i=o?{type:Fn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:t,newValue:e}:null;0,n.setNewValue_(e),o&&Hn(this,i)}return!0},e.get_=function(t){return fe.trackingDerivation&&!T(this.target_,t)&&this.has_(t),this.target_[t]},e.set_=function(t,e,n){return void 0===n&&(n=!1),T(this.target_,t)?this.values_.has(t)?this.setObservablePropValue_(t,e):n?Reflect.set(this.target_,t,e):(this.target_[t]=e,!0):this.extend_(t,{value:e,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},e.has_=function(t){if(!fe.trackingDerivation)return t in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var e=this.pendingKeys_.get(t);return e||(e=new Yt(t in this.target_,$,"ObservableObject.key?",!1),this.pendingKeys_.set(t,e)),e.get()},e.make_=function(t,e){if(!0===e&&(e=this.defaultAnnotation_),!1!==e){if(hr(this,e,t),!(t in this.target_)){var n;if(null!=(n=this.target_[U])&&n[t])return;r(1,e.annotationType_,this.name_+"."+t.toString())}for(var o=this.target_;o&&o!==s;){var i=u(o,t);if(i){var a=e.make_(this,t,i,o);if(0===a)return;if(1===a)break}o=Object.getPrototypeOf(o)}pr(this,e,t)}},e.extend_=function(t,e,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(t,e,r);hr(this,n,t);var o=n.extend_(this,t,e,r);return o&&pr(this,n,t),o},e.defineProperty_=function(t,e,n){void 0===n&&(n=!1);try{ge();var r=this.delete_(t);if(!r)return r;if(Rn(this)){var o=In(this,{object:this.proxy_||this.target_,name:t,type:er,newValue:e.value});if(!o)return null;var i=o.newValue;e.value!==i&&(e=R({},e,{value:i}))}if(n){if(!Reflect.defineProperty(this.target_,t,e))return!1}else c(this.target_,t,e);this.notifyPropertyAddition_(t,e.value)}finally{be()}return!0},e.defineObservableProperty_=function(t,e,n,r){void 0===r&&(r=!1);try{ge();var o=this.delete_(t);if(!o)return o;if(Rn(this)){var i=In(this,{object:this.proxy_||this.target_,name:t,type:er,newValue:e});if(!i)return null;e=i.newValue}var a=fr(t),u={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,t,u))return!1}else c(this.target_,t,u);var s=new Yt(e,n,"ObservableObject.key",!1);this.values_.set(t,s),this.notifyPropertyAddition_(t,s.value_)}finally{be()}return!0},e.defineComputedProperty_=function(t,e,n){void 0===n&&(n=!1);try{ge();var r=this.delete_(t);if(!r)return r;if(Rn(this))if(!In(this,{object:this.proxy_||this.target_,name:t,type:er,newValue:void 0}))return null;e.name||(e.name="ObservableObject.key"),e.context=this.proxy_||this.target_;var o=fr(t),i={configurable:!fe.safeDescriptors||this.isPlainObject_,enumerable:!1,get:o.get,set:o.set};if(n){if(!Reflect.defineProperty(this.target_,t,i))return!1}else c(this.target_,t,i);this.values_.set(t,new Vt(e)),this.notifyPropertyAddition_(t,void 0)}finally{be()}return!0},e.delete_=function(t,e){if(void 0===e&&(e=!1),!T(this.target_,t))return!0;if(Rn(this)&&!In(this,{object:this.proxy_||this.target_,name:t,type:"remove"}))return null;try{var n,r;ge();var o,i=Ln(this),a=this.values_.get(t),c=void 0;if(!a&&i)c=null==(o=u(this.target_,t))?void 0:o.value;if(e){if(!Reflect.deleteProperty(this.target_,t))return!1}else delete this.target_[t];if(a&&(this.values_.delete(t),a instanceof Yt&&(c=a.value_),_e(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(t))||r.set(t in this.target_),i){var s={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:t};0,i&&Hn(this,s)}}finally{be()}return!0},e.observe_=function(t,e){return Bn(this,t)},e.intercept_=function(t){return Cn(this,t)},e.notifyPropertyAddition_=function(t,e){var n,r,o=Ln(this);if(o){var i=o?{type:er,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:t,newValue:e}:null;0,o&&Hn(this,i)}null==(n=this.pendingKeys_)||null==(r=n.get(t))||r.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),A(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function sr(t,e){var n;if(T(t,F))return t;var r=null!=(n=null==e?void 0:e.name)?n:"ObservableObject",o=new cr(t,new Map,String(r),function(t){var e;return t?null!=(e=t.defaultDecorator)?e:dt(t):void 0}(e));return E(t,F,o),t}var lr=x("ObservableObjectAdministration",cr);function fr(t){return ur[t]||(ur[t]={get:function(){return this[F].getObservablePropValue_(t)},set:function(e){return this[F].setObservablePropValue_(t,e)}})}function dr(t){return!!m(t)&&lr(t[F])}function pr(t,e,n){var r;null==(r=t.target_[U])||delete r[n]}function hr(t,e,n){}var yr,vr,gr=0,br=function(){};yr=br,vr=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(yr.prototype,vr):void 0!==yr.prototype.__proto__?yr.prototype.__proto__=vr:yr.prototype=vr;var mr=function(t,e,n){function r(e,n,r,o){var i;void 0===r&&(r="ObservableArray"),void 0===o&&(o=!1),i=t.call(this)||this;var a=new zn(r,n,o,!0);if(a.proxy_=L(i),w(L(i),F,a),e&&e.length){var u=Ut(!0);i.spliceWithArray(0,0,e),Xt(u)}return i}C(r,t);var o=r.prototype;return o.concat=function(){this[F].atom_.reportObserved();for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),e.map((function(t){return Qn(t)?t.slice():t})))},o[n]=function(){var t=this,e=0;return kr({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})},N(r,[{key:"length",get:function(){return this[F].getArrayLength_()},set:function(t){this[F].setArrayLength_(t)}},{key:e,get:function(){return"Array"}}]),r}(br,Symbol.toStringTag,Symbol.iterator);function _r(t){c(mr.prototype,""+t,function(t){return{enumerable:!1,configurable:!0,get:function(){return this[F].get_(t)},set:function(e){this[F].set_(t,e)}}}(t))}function Or(t){if(t>gr){for(var e=gr;e<t+100;e++)_r(e);gr=t}}function Er(t,e,n){return new mr(t,e,n)}function wr(t,e){if("object"==typeof t&&null!==t){if(Qn(t))return void 0!==e&&r(23),t[F].atom_;if(ar(t))return t[F];if(rr(t)){if(void 0===e)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||r(25,e,Sr(t)),n}if(dr(t)){if(!e)return r(26);var o=t[F].values_.get(e);return o||r(27,e,Sr(t)),o}if(z(t)||Wt(t)||je(t))return t}else if(g(t)&&je(t[F]))return t[F];r(28)}function xr(t,e){return t||r(29),void 0!==e?xr(wr(t,e)):z(t)||Wt(t)||je(t)||rr(t)||ar(t)?t:t[F]?t[F]:void r(24,t)}function Sr(t,e){var n;if(void 0!==e)n=wr(t,e);else{if(Ie(t))return t.name;n=dr(t)||rr(t)||ar(t)?xr(t):wr(t)}return n.name_}Object.entries(Wn).forEach((function(t){var e=t[0],n=t[1];"concat"!==e&&E(mr.prototype,e,n)})),Or(1e3);var jr=s.toString;function Pr(t,e,n){return void 0===n&&(n=-1),function t(e,n,r,o,i){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return!1;if(e!=e)return n!=n;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof n)return!1;var u=jr.call(e);if(u!==jr.call(n))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}e=Ar(e),n=Ar(n);var c="[object Array]"===u;if(!c){if("object"!=typeof e||"object"!=typeof n)return!1;var s=e.constructor,l=n.constructor;if(s!==l&&!(g(s)&&s instanceof s&&g(l)&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);i=i||[];var f=(o=o||[]).length;for(;f--;)if(o[f]===e)return i[f]===n;if(o.push(e),i.push(n),c){if((f=e.length)!==n.length)return!1;for(;f--;)if(!t(e[f],n[f],r-1,o,i))return!1}else{var d,p=Object.keys(e);if(f=p.length,Object.keys(n).length!==f)return!1;for(;f--;)if(d=p[f],!T(n,d)||!t(e[d],n[d],r-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,n)}function Ar(t){return Qn(t)?t.slice():S(t)||rr(t)||j(t)||ar(t)?Array.from(t.entries()):t}function kr(t){return t[Symbol.iterator]=Tr,t}function Tr(){return this}["Symbol","Map","Set"].forEach((function(t){void 0===i()[t]&&r("MobX requires global '"+t+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Pe,extras:{getDebugName:Sr},$mobx:F})}.call(this,n(103))},function(t,e,n){var r=n(5),o=n(144),i=n(145),a=n(174),u=n(54),c=function(t){if(t&&t.forEach!==a)try{u(t,"forEach",a)}catch(e){t.forEach=a}};for(var s in o)o[s]&&c(r[s]&&r[s].prototype);c(i)},function(t,e,n){n(14)({target:"Object",stat:!0},{setPrototypeOf:n(92)})},function(t,e,n){var r=n(14),o=n(15),i=n(36),a=n(91),u=n(134);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,n){var r=n(14),o=n(43),i=n(73),a=n(194),u=n(153),c=n(30),s=n(31),l=n(51),f=n(15),d=o("Reflect","construct"),p=Object.prototype,h=[].push,y=f((function(){function t(){}return!(d((function(){}),[],t)instanceof t)})),v=!f((function(){d((function(){}))})),g=y||v;r({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){u(t),c(e);var n=arguments.length<3?t:u(arguments[2]);if(v&&!y)return d(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return i(h,r,e),new(i(a,t,r))}var o=n.prototype,f=l(s(o)?o:p),g=i(t,f,e);return s(g)?g:f}})},function(t,e){var n=Function.prototype,r=n.bind,o=n.call,i=r&&r.bind(o);t.exports=r?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,n){var r=n(5),o=n(48).f,i=n(54),a=n(41),u=n(105),c=n(131),s=n(90);t.exports=function(t,e){var n,l,f,d,p,h=t.target,y=t.global,v=t.stat;if(n=y?r:v?r[h]||u(h,{}):(r[h]||{}).prototype)for(l in e){if(d=e[l],f=t.noTargetGet?(p=o(n,l))&&p.value:n[l],!s(y?l:h+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;c(d,f)}(t.sham||f&&f.sham)&&i(d,"sham",!0),a(n,l,d,t)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var r=n(14),o=n(98);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,n){var r=n(14),o=n(36),i=n(63);r({target:"Object",stat:!0,forced:n(15)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,n){"use strict";var r=n(14),o=n(71).filter;r({target:"Array",proto:!0,forced:!n(72)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(14),o=n(15),i=n(37),a=n(48).f,u=n(34),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},function(t,e,n){var r=n(14),o=n(34),i=n(132),a=n(37),u=n(48),c=n(58);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=u.f,s=i(r),l={},f=0;s.length>f;)void 0!==(n=o(r,e=s[f++]))&&c(l,e,n);return l}})},function(t,e,n){var r=n(34),o=n(89).EXISTS,i=n(13),a=n(35).f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);r&&!o&&a(u,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},function(t,e,n){var r=n(14),o=n(185);r({target:"Array",stat:!0,forced:!n(115)((function(t){Array.from(t)}))},{from:o})},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(94),a=n(95),u=n(31),c=n(64),s=n(40),l=n(37),f=n(58),d=n(25),p=n(72),h=n(96),y=p("slice"),v=d("species"),g=o.Array,b=Math.max;r({target:"Array",proto:!0,forced:!y},{slice:function(t,e){var n,r,o,d=l(this),p=s(d),y=c(t,p),m=c(void 0===e?p:e,p);if(i(d)&&(n=d.constructor,(a(n)&&(n===g||i(n.prototype))||u(n)&&null===(n=n[v]))&&(n=void 0),n===g||void 0===n))return h(d,y,m);for(r=new(void 0===n?g:n)(b(m-y,0)),o=0;y<m;y++,o++)y in d&&f(r,o,d[y]);return r.length=o,r}})},,function(t,e,n){var r=n(5),o=n(79),i=n(32),a=n(80),u=n(106),c=n(125),s=o("wks"),l=r.Symbol,f=l&&l.for,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!i(s,t)||!u&&"string"!=typeof s[t]){var e="Symbol."+t;u&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):d(e)}return s[t]}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(15),a=n(94),u=n(31),c=n(36),s=n(40),l=n(58),f=n(116),d=n(72),p=n(25),h=n(62),y=p("isConcatSpreadable"),v=o.TypeError,g=h>=51||!i((function(){var t=[];return t[y]=!1,t.concat()[0]!==t})),b=d("concat"),m=function(t){if(!u(t))return!1;var e=t[y];return void 0!==e?!!e:a(t)};r({target:"Array",proto:!0,forced:!g||!b},{concat:function(t){var e,n,r,o,i,a=c(this),u=f(a,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(m(i=-1===e?a:arguments[e])){if(d+(o=s(i))>9007199254740991)throw v("Maximum allowed index exceeded");for(n=0;n<o;n++,d++)n in i&&l(u,d,i[n])}else{if(d>=9007199254740991)throw v("Maximum allowed index exceeded");l(u,d++,i)}return u.length=d,u}})},function(t,e,n){var r=n(14),o=n(196);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,n){"use strict";var r=n(101),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},function(t,e,n){var r=n(5),o=n(31),i=r.String,a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},function(t,e,n){var r=n(26);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},function(t,e,n){var r=n(13),o=n(36),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e){var n=Function.prototype.call;t.exports=n.bind?n.bind(n):function(){return n.apply(n,arguments)}},function(t,e,n){var r=n(15);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(5),o=n(34),i=n(126),a=n(30),u=n(82),c=r.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,n){if(a(t),e=u(e),a(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(5),o=n(42),i=r.Object;t.exports=function(t){return i(o(t))}},function(t,e,n){var r=n(77),o=n(42);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(5),o=n(93),i=r.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){"use strict";var r=n(14),o=n(71).map;r({target:"Array",proto:!0,forced:!n(72)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(85);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(5),o=n(26),i=n(32),a=n(54),u=n(105),c=n(87),s=n(53),l=n(89).CONFIGURABLE,f=s.get,d=s.enforce,p=String(String).split("String");(t.exports=function(t,e,n,c){var s,f=!!c&&!!c.unsafe,h=!!c&&!!c.enumerable,y=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(n)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(n,"name")||l&&n.name!==v)&&a(n,"name",v),(s=d(n)).source||(s.source=p.join("string"==typeof v?v:""))),t!==r?(f?!y&&t[e]&&(h=!0):delete t[e],h?t[e]=n:a(t,e,n)):h?t[e]=n:u(e,n)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||c(this)}))},function(t,e,n){var r=n(5).TypeError;t.exports=function(t){if(null==t)throw r("Can't call method on "+t);return t}},function(t,e,n){var r=n(5),o=n(26),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(14),o=n(33),i=n(31),a=n(30),u=n(195),c=n(48),s=n(91);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,l,f=arguments.length<3?e:arguments[2];return a(e)===f?e[n]:(r=c.f(e,n))?u(r)?r.value:void 0===r.get?void 0:o(r.get,f):i(l=s(e))?t(l,n,f):void 0}})},function(t,e,n){"use strict";(function(t){var r=n(29),o=n(161),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?r.a.Buffer:void 0,c=(u?u.isBuffer:void 0)||o.a;e.a=c}).call(this,n(118)(t))},function(t,e,n){"use strict";(function(t){var r=n(101),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.a.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.a=u}).call(this,n(118)(t))},function(t,e,n){var r=n(13),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,n){var r=n(34),o=n(33),i=n(88),a=n(68),u=n(37),c=n(82),s=n(32),l=n(126),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=u(t),e=c(e),l)try{return f(t,e)}catch(t){}if(s(t,e))return a(!o(i.f,t,e),t[e])}},function(t,e,n){var r=n(14),o=n(209).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,n){var r=n(43);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r,o=n(30),i=n(163),a=n(107),u=n(66),c=n(130),s=n(81),l=n(86),f=l("IE_PROTO"),d=function(){},p=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;y="undefined"!=typeof document?document.domain&&r?h(r):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):h(r);for(var n=a.length;n--;)delete y.prototype[a[n]];return y()};u[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=o(t),n=new d,d.prototype=null,n[f]=t):n=y(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(5),o=n(26),i=n(84),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},function(t,e,n){var r,o,i,a=n(165),u=n(5),c=n(13),s=n(31),l=n(54),f=n(32),d=n(104),p=n(86),h=n(66),y=u.TypeError,v=u.WeakMap;if(a||d.state){var g=d.state||(d.state=new v),b=c(g.get),m=c(g.has),_=c(g.set);r=function(t,e){if(m(g,t))throw new y("Object already initialized");return e.facade=t,_(g,t,e),e},o=function(t){return b(g,t)||{}},i=function(t){return m(g,t)}}else{var O=p("state");h[O]=!0,r=function(t,e){if(f(t,O))throw new y("Object already initialized");return e.facade=t,l(t,O,e),e},o=function(t){return f(t,O)?t[O]:{}},i=function(t){return f(t,O)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!s(e)||(n=o(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(34),o=n(35),i=n(68);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(13);t.exports=r({}.isPrototypeOf)},function(t,e,n){var r=n(52);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},function(t,e,n){"use strict";n(168)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),n(172))},function(t,e,n){"use strict";var r=n(82),o=n(35),i=n(68);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},function(t,e,n){var r=n(13),o=n(52),i=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(14),o=n(210),i=n(78);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e){t.exports=!1},function(t,e,n){var r,o,i=n(5),a=n(50),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,l=s&&s.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},function(t,e,n){var r=n(128),o=n(107);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(65),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?r:n)(e)}},function(t,e){t.exports={}},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(128),o=n(107).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(35).f,o=n(32),i=n(25)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(59),o=n(13),i=n(77),a=n(36),u=n(40),c=n(116),s=o([].push),l=function(t){var e=1==t,n=2==t,o=3==t,l=4==t,f=6==t,d=7==t,p=5==t||f;return function(h,y,v,g){for(var b,m,_=a(h),O=i(_),E=r(y,v),w=u(O),x=0,S=g||c,j=e?S(h,w):n||d?S(h,0):void 0;w>x;x++)if((p||x in O)&&(m=E(b=O[x],x,_),t))if(e)j[x]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return x;case 2:s(j,b)}else switch(t){case 4:return!1;case 7:s(j,b)}return f?-1:o||l?l:j}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,n){var r=n(15),o=n(25),i=n(62),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e){var n=Function.prototype,r=n.apply,o=n.bind,i=n.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(r):function(){return i.apply(r,arguments)})},function(t,e,n){"use strict";var r=n(73),o=n(33),i=n(13),a=n(119),u=n(150),c=n(30),s=n(42),l=n(152),f=n(120),d=n(85),p=n(38),h=n(56),y=n(110),v=n(121),g=n(98),b=n(151),m=n(15),_=b.UNSUPPORTED_Y,O=Math.min,E=[].push,w=i(/./.exec),x=i(E),S=i("".slice);a("split",(function(t,e,n){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var i=p(s(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===t)return[i];if(!u(t))return o(e,i,t,a);for(var c,l,f,d=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,b=new RegExp(t.source,h+"g");(c=o(g,b,i))&&!((l=b.lastIndex)>v&&(x(d,S(i,v,c.index)),c.length>1&&c.index<i.length&&r(E,d,y(c,1)),f=c[0].length,v=l,d.length>=a));)b.lastIndex===c.index&&b.lastIndex++;return v===i.length?!f&&w(b,"")||x(d,""):x(d,S(i,v)),d.length>a?y(d,0,a):d}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:o(e,this,t,n)}:e,[function(e,n){var r=s(this),a=null==e?void 0:h(e,t);return a?o(a,e,r,n):o(i,p(r),e,n)},function(t,r){var o=c(this),a=p(t),u=n(i,o,a,r,i!==e);if(u.done)return u.value;var s=l(o,RegExp),h=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(_?"g":"y"),g=new s(_?"^(?:"+o.source+")":o,y),b=void 0===r?4294967295:r>>>0;if(0===b)return[];if(0===a.length)return null===v(g,a)?[a]:[];for(var m=0,E=0,w=[];E<a.length;){g.lastIndex=_?0:E;var j,P=v(g,_?S(a,E):a);if(null===P||(j=O(d(g.lastIndex+(_?E:0)),a.length))===m)E=f(a,E,h);else{if(x(w,S(a,m,E)),w.length===b)return w;for(var A=1;A<=P.length-1;A++)if(x(w,P[A]),w.length===b)return w;E=m=j}}return x(w,S(a,m)),w}]}),!!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),_)},function(t,e,n){"use strict";var r=n(34),o=n(5),i=n(13),a=n(90),u=n(41),c=n(32),s=n(140),l=n(55),f=n(83),d=n(127),p=n(15),h=n(69).f,y=n(48).f,v=n(35).f,g=n(192),b=n(154).trim,m=o.Number,_=m.prototype,O=o.TypeError,E=i("".slice),w=i("".charCodeAt),x=function(t){var e=d(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,n,r,o,i,a,u,c,s=d(t,"number");if(f(s))throw O("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=w(s,0))||45===e){if(88===(n=w(s,2))||120===n)return NaN}else if(48===e){switch(w(s,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+s}for(a=(i=E(s,2)).length,u=0;u<a;u++)if((c=w(i,u))<48||c>o)return NaN;return parseInt(i,r)}return+s};if(a("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var j,P=function(t){var e=arguments.length<1?0:m(x(t)),n=this;return l(_,n)&&p((function(){g(n)}))?s(Object(e),n,P):e},A=r?h(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),k=0;A.length>k;k++)c(m,j=A[k])&&!c(P,j)&&v(P,j,y(m,j));P.prototype=_,_.constructor=P,u(o,"Number",P)}},function(t,e,n){n(14)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(5),o=n(13),i=n(15),a=n(47),u=r.Object,c=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):u(t)}:u},function(t,e,n){var r=n(25),o=n(51),i=n(35),a=r("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},function(t,e,n){var r=n(61),o=n(104);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(13),o=0,i=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e,n){var r=n(5),o=n(31),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e,n){var r=n(127),o=n(83);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},function(t,e,n){var r=n(5),o=n(43),i=n(26),a=n(55),u=n(125),c=r.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,c(t))}},function(t,e,n){var r=n(5).String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,e,n){var r=n(65),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(79),o=n(80),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var r=n(13),o=n(26),i=n(104),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(34),o=n(32),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},function(t,e,n){var r=n(15),o=n(26),i=/#|\.prototype\./,a=function(t,e){var n=c[u(t)];return n==l||n!=s&&(o(e)?r(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},function(t,e,n){var r=n(5),o=n(32),i=n(26),a=n(36),u=n(86),c=n(134),s=u("IE_PROTO"),l=r.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof l?f:null}},function(t,e,n){var r=n(13),o=n(30),i=n(167);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return o(n),i(r),e?t(n,r):n.__proto__=r,n}}():void 0)},function(t,e,n){var r=n(5),o=n(113),i=n(26),a=n(47),u=n(25)("toStringTag"),c=r.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?n:s?a(e):"Object"==(r=a(e))&&i(e.callee)?"Arguments":r}},function(t,e,n){var r=n(47);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(13),o=n(15),i=n(26),a=n(93),u=n(43),c=n(87),s=function(){},l=[],f=u("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=r(d.exec),h=!d.exec(s),y=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}};t.exports=!f||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!p(d,c(t))}:y},function(t,e,n){var r=n(13);t.exports=r([].slice)},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(64),a=n(65),u=n(40),c=n(36),s=n(116),l=n(58),f=n(72)("splice"),d=o.TypeError,p=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var n,r,o,f,y,v,g=c(this),b=u(g),m=i(t,b),_=arguments.length;if(0===_?n=r=0:1===_?(n=0,r=b-m):(n=_-2,r=h(p(a(e),0),b-m)),b+n-r>9007199254740991)throw d("Maximum allowed length exceeded");for(o=s(g,r),f=0;f<r;f++)(y=m+f)in g&&l(o,f,g[y]);if(o.length=r,n<r){for(f=m;f<b-r;f++)v=f+n,(y=f+r)in g?g[v]=g[y]:delete g[v];for(f=b;f>b-r+n;f--)delete g[f-1]}else if(n>r)for(f=b-r;f>m;f--)v=f+n-1,(y=f+r-1)in g?g[v]=g[y]:delete g[v];for(f=0;f<n;f++)g[f+m]=arguments[f+2];return g.length=b-r+n,o}})},function(t,e,n){"use strict";var r,o,i=n(33),a=n(13),u=n(38),c=n(187),s=n(151),l=n(79),f=n(51),d=n(53).get,p=n(188),h=n(189),y=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,b=a("".charAt),m=a("".indexOf),_=a("".replace),O=a("".slice),E=(o=/b*/g,i(v,r=/a/,"a"),i(v,o,"a"),0!==r.lastIndex||0!==o.lastIndex),w=s.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(E||x||w||p||h)&&(g=function(t){var e,n,r,o,a,s,l,p=this,h=d(p),S=u(t),j=h.raw;if(j)return j.lastIndex=p.lastIndex,e=i(g,j,S),p.lastIndex=j.lastIndex,e;var P=h.groups,A=w&&p.sticky,k=i(c,p),T=p.source,D=0,M=S;if(A&&(k=_(k,"y",""),-1===m(k,"g")&&(k+="g"),M=O(S,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(S,p.lastIndex-1))&&(T="(?: "+T+")",M=" "+M,D++),n=new RegExp("^(?:"+T+")",k)),x&&(n=new RegExp("^"+T+"$(?!\\s)",k)),E&&(r=p.lastIndex),o=i(v,A?n:p,M),A?o?(o.input=O(o.input,D),o[0]=O(o[0],D),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:E&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),x&&o&&o.length>1&&i(y,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&P)for(o.groups=s=f(null),a=0;a<P.length;a++)s[(l=P[a])[0]]=o[l[1]];return o}),t.exports=g},function(t,e,n){"use strict";var r=n(14),o=n(13),i=n(77),a=n(37),u=n(117),c=o([].join),s=i!=Object,l=u("join",",");r({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(a(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(14),o=n(197);r({target:"String",proto:!0,forced:n(198)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(this,n(103))},function(t,e,n){"use strict";(function(t){var r=n(29),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.a.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(118)(t))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(5),o=n(105),i=r["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,n){var r=n(5),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(62),o=n(15);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){"use strict";var r=n(14),o=n(33),i=n(61),a=n(89),u=n(26),c=n(166),s=n(91),l=n(92),f=n(70),d=n(54),p=n(41),h=n(25),y=n(67),v=n(133),g=a.PROPER,b=a.CONFIGURABLE,m=v.IteratorPrototype,_=v.BUGGY_SAFARI_ITERATORS,O=h("iterator"),E=function(){return this};t.exports=function(t,e,n,a,h,v,w){c(n,e,a);var x,S,j,P=function(t){if(t===h&&M)return M;if(!_&&t in T)return T[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",k=!1,T=t.prototype,D=T[O]||T["@@iterator"]||h&&T[h],M=!_&&D||P(h),N="Array"==e&&T.entries||D;if(N&&(x=s(N.call(new t)))!==Object.prototype&&x.next&&(i||s(x)===m||(l?l(x,m):u(x[O])||p(x,O,E)),f(x,A,!0,!0),i&&(y[A]=E)),g&&"values"==h&&D&&"values"!==D.name&&(!i&&b?d(T,"name","values"):(k=!0,M=function(){return o(D,this)})),h)if(S={values:P("values"),keys:v?M:P("keys"),entries:P("entries")},w)for(j in S)(_||k||!(j in T))&&p(T,j,S[j]);else r({target:e,proto:!0,forced:_||k},S);return i&&!w||T[O]===M||p(T,O,M,{name:h}),y[e]=M,S}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(5),o=n(64),i=n(40),a=n(58),u=r.Array,c=Math.max;t.exports=function(t,e,n){for(var r=i(t),s=o(e,r),l=o(void 0===n?r:n,r),f=u(c(l-s,0)),d=0;s<l;s++,d++)a(f,d,t[s]);return f.length=d,f}},function(t,e,n){var r=n(5),o=n(59),i=n(33),a=n(30),u=n(84),c=n(137),s=n(40),l=n(55),f=n(138),d=n(112),p=n(139),h=r.TypeError,y=function(t,e){this.stopped=t,this.result=e},v=y.prototype;t.exports=function(t,e,n){var r,g,b,m,_,O,E,w=n&&n.that,x=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_ITERATOR),j=!(!n||!n.INTERRUPTED),P=o(e,w),A=function(t){return r&&p(r,"normal",t),new y(!0,t)},k=function(t){return x?(a(t),j?P(t[0],t[1],A):P(t[0],t[1])):j?P(t,A):P(t)};if(S)r=t;else{if(!(g=d(t)))throw h(u(t)+" is not iterable");if(c(g)){for(b=0,m=s(t);m>b;b++)if((_=k(t[b]))&&l(v,_))return _;return new y(!1)}r=f(t,g)}for(O=r.next;!(E=i(O,r)).done;){try{_=k(E.value)}catch(t){p(r,"throw",t)}if("object"==typeof _&&_&&l(v,_))return _}return new y(!1)}},function(t,e,n){var r=n(93),o=n(56),i=n(67),a=n(25)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[r(t)]}},function(t,e,n){var r={};r[n(25)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(5),o=n(55),i=r.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,n){var r=n(25)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},function(t,e,n){var r=n(175);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},function(t,e,n){"use strict";var r=n(15);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){"use strict";n(16);var r=n(13),o=n(41),i=n(98),a=n(15),u=n(25),c=n(54),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,n,f){var d=u(t),p=!a((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),h=p&&!a((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return e=!0,null},n[d](""),!e}));if(!p||!h||n){var y=r(/./[d]),v=e(d,""[t],(function(t,e,n,o,a){var u=r(t),c=e.exec;return c===i||c===l.exec?p&&!a?{done:!0,value:y(e,n,o)}:{done:!0,value:u(n,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(l,d,v[1])}f&&c(l[d],"sham",!0)}},function(t,e,n){"use strict";var r=n(143).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(5),o=n(33),i=n(30),a=n(26),u=n(47),c=n(98),s=r.TypeError;t.exports=function(t,e){var n=t.exec;if(a(n)){var r=o(n,t,e);return null!==r&&i(r),r}if("RegExp"===u(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},function(t,e,n){"use strict";var r=n(73),o=n(33),i=n(13),a=n(119),u=n(15),c=n(30),s=n(26),l=n(65),f=n(85),d=n(38),p=n(42),h=n(120),y=n(56),v=n(193),g=n(121),b=n(25)("replace"),m=Math.max,_=Math.min,O=i([].concat),E=i([].push),w=i("".indexOf),x=i("".slice),S="$0"==="a".replace(/./,"$0"),j=!!/./[b]&&""===/./[b]("a","$0");a("replace",(function(t,e,n){var i=j?"$":"$0";return[function(t,n){var r=p(this),i=null==t?void 0:y(t,b);return i?o(i,t,r,n):o(e,d(r),t,n)},function(t,o){var a=c(this),u=d(t);if("string"==typeof o&&-1===w(o,i)&&-1===w(o,"$<")){var p=n(e,a,u,o);if(p.done)return p.value}var y=s(o);y||(o=d(o));var b=a.global;if(b){var S=a.unicode;a.lastIndex=0}for(var j=[];;){var P=g(a,u);if(null===P)break;if(E(j,P),!b)break;""===d(P[0])&&(a.lastIndex=h(u,f(a.lastIndex),S))}for(var A,k="",T=0,D=0;D<j.length;D++){for(var M=d((P=j[D])[0]),N=m(_(l(P.index),u.length),0),R=[],C=1;C<P.length;C++)E(R,void 0===(A=P[C])?A:String(A));var I=P.groups;if(y){var L=O([M],R,N,u);void 0!==I&&E(L,I);var B=d(r(o,void 0,L))}else B=v(M,u,N,R,I,o);N>=T&&(k+=x(u,T,N)+B,T=N+M.length)}return k+x(u,T)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!S||j)},function(t,e,n){var r=n(47),o=n(5);t.exports="process"==r(o.process)},function(t,e,n){n(14)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(106);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(34),o=n(15),i=n(81);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(5),o=n(33),i=n(31),a=n(83),u=n(56),c=n(164),s=n(25),l=r.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var n,r=u(t,f);if(r){if(void 0===e&&(e="default"),n=o(r,t,e),!i(n)||a(n))return n;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,n){var r=n(13),o=n(32),i=n(37),a=n(129).indexOf,u=n(66),c=r([].push);t.exports=function(t,e){var n,r=i(t),s=0,l=[];for(n in r)!o(u,n)&&o(r,n)&&c(l,n);for(;e.length>s;)o(r,n=e[s++])&&(~a(l,n)||c(l,n));return l}},function(t,e,n){var r=n(37),o=n(64),i=n(40),a=function(t){return function(e,n,a){var u,c=r(e),s=i(c),l=o(a,s);if(t&&n!=n){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(43);t.exports=r("document","documentElement")},function(t,e,n){var r=n(32),o=n(132),i=n(48),a=n(35);t.exports=function(t,e){for(var n=o(e),u=a.f,c=i.f,s=0;s<n.length;s++){var l=n[s];r(t,l)||u(t,l,c(e,l))}}},function(t,e,n){var r=n(43),o=n(13),i=n(69),a=n(109),u=n(30),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(u(t)),n=a.f;return n?c(e,n(t)):e}},function(t,e,n){"use strict";var r,o,i,a=n(15),u=n(26),c=n(51),s=n(91),l=n(41),f=n(25),d=n(61),p=f("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):h=!0),null==r||a((function(){var t={};return r[p].call(t)!==t}))?r={}:d&&(r=c(r)),u(r[p])||l(r,p,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(t,e,n){var r=n(15);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(14),o=n(13),i=n(66),a=n(31),u=n(32),c=n(35).f,s=n(69),l=n(136),f=n(169),d=n(80),p=n(171),h=!1,y=d("meta"),v=0,g=function(t){c(t,y,{value:{objectID:"O"+v++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},h=!0;var t=s.f,e=o([].splice),n={};n[y]=1,t(n).length&&(s.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===y){e(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!a(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!u(t,y)){if(!f(t))return"F";if(!e)return"E";g(t)}return t[y].objectID},getWeakData:function(t,e){if(!u(t,y)){if(!f(t))return!0;if(!e)return!1;g(t)}return t[y].weakData},onFreeze:function(t){return p&&h&&f(t)&&!u(t,y)&&g(t),t}};i[y]=!0},function(t,e,n){var r=n(47),o=n(37),i=n(69).f,a=n(110),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"==r(t)?function(t){try{return i(t)}catch(t){return a(u)}}(t):i(o(t))}},function(t,e,n){var r=n(25),o=n(67),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,n){var r=n(5),o=n(33),i=n(52),a=n(30),u=n(84),c=n(112),s=r.TypeError;t.exports=function(t,e){var n=arguments.length<2?c(t):e;if(i(n))return a(o(n,t));throw s(u(t)+" is not iterable")}},function(t,e,n){var r=n(33),o=n(30),i=n(56);t.exports=function(t,e,n){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw n;if(u)throw a;return o(a),n}},function(t,e,n){var r=n(26),o=n(31),i=n(92);t.exports=function(t,e,n){var a,u;return i&&r(a=e.constructor)&&a!==n&&o(u=a.prototype)&&u!==n.prototype&&i(t,u),t}},function(t,e,n){var r=n(41);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(43),o=n(35),i=n(25),a=n(34),u=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[u]&&n(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(13),o=n(65),i=n(38),a=n(42),u=r("".charAt),c=r("".charCodeAt),s=r("".slice),l=function(t){return function(e,n){var r,l,f=i(a(e)),d=o(n),p=f.length;return d<0||d>=p?t?"":void 0:(r=c(f,d))<55296||r>56319||d+1===p||(l=c(f,d+1))<56320||l>57343?t?u(f,d):r:t?s(f,d,d+2):l-56320+(r-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,e,n){var r=n(81)("span").classList,o=r&&r.constructor&&r.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,n){var r=n(25);e.f=r},function(t,e,n){var r=n(176),o=n(32),i=n(146),a=n(35).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},function(t,e,n){"use strict";var r=n(14),o=n(129).includes,i=n(78);r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,n){"use strict";var r=n(14),o=n(13),i=n(183),a=n(42),u=n(38),c=n(184),s=o("".indexOf);r({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(u(a(this)),u(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(31),o=n(47),i=n(25)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(15),o=n(5).RegExp,i=r((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),u=i||r((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:u,MISSED_STICKY:a,UNSUPPORTED_Y:i}},function(t,e,n){var r=n(30),o=n(153),i=n(25)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(5),o=n(95),i=n(84),a=r.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},function(t,e,n){var r=n(13),o=n(42),i=n(38),a=n(155),u=r("".replace),c="["+a+"]",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t){return function(e){var n=i(o(e));return 1&t&&(n=u(n,s,"")),2&t&&(n=u(n,l,"")),n}};t.exports={start:f(1),end:f(2),trim:f(3)}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(33),o=n(119),i=n(30),a=n(85),u=n(38),c=n(42),s=n(56),l=n(120),f=n(121);o("match",(function(t,e,n){return[function(e){var n=c(this),o=null==e?void 0:s(e,t);return o?r(o,e,n):new RegExp(e)[t](u(n))},function(t){var r=i(this),o=u(t),c=n(e,r,o);if(c.done)return c.value;if(!r.global)return f(r,o);var s=r.unicode;r.lastIndex=0;for(var d,p=[],h=0;null!==(d=f(r,o));){var y=u(d[0]);p[h]=y,""===y&&(r.lastIndex=l(o,a(r.lastIndex),s)),h++}return 0===h?null:p}]}))},function(t,e,n){var r,o,i,a,u=n(5),c=n(73),s=n(59),l=n(26),f=n(32),d=n(15),p=n(130),h=n(96),y=n(81),v=n(158),g=n(123),b=u.setImmediate,m=u.clearImmediate,_=u.process,O=u.Dispatch,E=u.Function,w=u.MessageChannel,x=u.String,S=0,j={};try{r=u.location}catch(t){}var P=function(t){if(f(j,t)){var e=j[t];delete j[t],e()}},A=function(t){return function(){P(t)}},k=function(t){P(t.data)},T=function(t){u.postMessage(x(t),r.protocol+"//"+r.host)};b&&m||(b=function(t){var e=h(arguments,1);return j[++S]=function(){c(l(t)?t:E(t),void 0,e)},o(S),S},m=function(t){delete j[t]},g?o=function(t){_.nextTick(A(t))}:O&&O.now?o=function(t){O.now(A(t))}:w&&!v?(a=(i=new w).port2,i.port1.onmessage=k,o=s(a.postMessage,a)):u.addEventListener&&l(u.postMessage)&&!u.importScripts&&r&&"file:"!==r.protocol&&!d(T)?(o=T,u.addEventListener("message",k,!1)):o="onreadystatechange"in y("script")?function(t){p.appendChild(y("script")).onreadystatechange=function(){p.removeChild(this),P(t)}}:function(t){setTimeout(A(t),0)}),t.exports={set:b,clear:m}},function(t,e,n){var r=n(50);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(t,e,n){"use strict";var r=n(52),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},function(t){t.exports=JSON.parse('{"a":"1.2.0-alpha.5"}')},function(t,e,n){"use strict";e.a=function(){return!1}},function(t,e,n){var r;!function(o,i,a){if(o){for(var u,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},d=1;d<20;++d)c[111+d]="f"+d;for(d=0;d<=9;++d)c[d+96]=d.toString();b.prototype.bind=function(t,e,n){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,n),this},b.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},b.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},b.prototype.reset=function(){return this._callbacks={},this._directMap={},this},b.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,n){return null!==e&&e!==i&&(e===n||t(e.parentNode,n))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},b.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},b.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},b.init=function(){var t=b(i);for(var e in t)"_"!==e.charAt(0)&&(b[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},b.init(),o.Mousetrap=b,t.exports&&(t.exports=b),void 0===(r=function(){return b}.call(e,n,e,t))||(t.exports=r)}function p(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:s[t.which]?s[t.which]:String.fromCharCode(t.which).toLowerCase()}function y(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,n){return n||(n=function(){if(!u)for(var t in u={},c)t>95&&t<112||c.hasOwnProperty(t)&&(u[c[t]]=t);return u}()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function g(t,e){var n,r,o,i=[];for(n=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<n.length;++o)r=n[o],f[r]&&(r=f[r]),e&&"keypress"!=e&&l[r]&&(r=l[r],i.push("shift")),y(r)&&i.push(r);return{key:r,modifiers:i,action:e=v(r,i,e)}}function b(t){var e=this;if(t=t||i,!(e instanceof b))return new b(t);e.target=t,e._callbacks={},e._directMap={};var n,r={},o=!1,a=!1,u=!1;function c(t){t=t||{};var e,n=!1;for(e in r)t[e]?n=!0:r[e]=0;n||(u=!1)}function s(t,n,o,i,a,u){var c,s,l,f,d=[],p=o.type;if(!e._callbacks[t])return[];for("keyup"==p&&y(t)&&(n=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||r[s.seq]==s.level)&&p==s.action&&("keypress"==p&&!o.metaKey&&!o.ctrlKey||(l=n,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var h=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(h||v)&&e._callbacks[t].splice(c,1),d.push(s)}return d}function l(t,n,r,o){e.stopCallback(n,n.target||n.srcElement,r,o)||!1===t(n,r)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(n),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(n))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var n=h(t);n&&("keyup"!=t.type||o!==n?e.handleKey(n,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function d(t,e,i,a){function s(e){return function(){u=e,++r[t],clearTimeout(n),n=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==a&&(o=h(e)),setTimeout(c,10)}r[t]=0;for(var d=0;d<e.length;++d){var p=d+1===e.length?f:s(a||g(e[d+1]).action);v(e[d],p,a,t,d)}}function v(t,n,r,o,i){e._directMap[t+":"+r]=n;var a,u=(t=t.replace(/\s+/g," ")).split(" ");u.length>1?d(t,u,n,r):(a=g(t,r),e._callbacks[a.key]=e._callbacks[a.key]||[],s(a.key,a.modifiers,{type:a.action},o,t,i),e._callbacks[a.key][o?"unshift":"push"]({callback:n,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,n){var r,o=s(t,e,n),i={},f=0,d=!1;for(r=0;r<o.length;++r)o[r].seq&&(f=Math.max(f,o[r].level));for(r=0;r<o.length;++r)if(o[r].seq){if(o[r].level!=f)continue;d=!0,i[o[r].seq]=1,l(o[r].callback,n,o[r].combo,o[r].seq)}else d||l(o[r].callback,n,o[r].combo);var p="keypress"==n.type&&a;n.type!=u||y(t)||p||c(i),a=d&&"keydown"==n.type},e._bindMultiple=function(t,e,n){for(var r=0;r<t.length;++r)v(t[r],e,n)},p(t,"keypress",f),p(t,"keydown",f),p(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,n){var r=n(34),o=n(35),i=n(30),a=n(37),u=n(63);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),c=u(e),s=c.length,l=0;s>l;)o.f(t,n=c[l++],r[n]);return t}},function(t,e,n){var r=n(5),o=n(33),i=n(26),a=n(31),u=r.TypeError;t.exports=function(t,e){var n,r;if("string"===e&&i(n=t.toString)&&!a(r=o(n,t)))return r;if(i(n=t.valueOf)&&!a(r=o(n,t)))return r;if("string"!==e&&i(n=t.toString)&&!a(r=o(n,t)))return r;throw u("Can't convert object to primitive value")}},function(t,e,n){var r=n(5),o=n(26),i=n(87),a=r.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,n){"use strict";var r=n(133).IteratorPrototype,o=n(51),i=n(68),a=n(70),u=n(67),c=function(){return this};t.exports=function(t,e,n,s){var l=e+" Iterator";return t.prototype=o(r,{next:i(+!s,n)}),a(t,l,!1,!0),u[l]=c,t}},function(t,e,n){var r=n(5),o=n(26),i=r.String,a=r.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},function(t,e,n){"use strict";var r=n(14),o=n(5),i=n(13),a=n(90),u=n(41),c=n(135),s=n(111),l=n(114),f=n(26),d=n(31),p=n(15),h=n(115),y=n(70),v=n(140);t.exports=function(t,e,n){var g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),m=g?"set":"add",_=o[t],O=_&&_.prototype,E=_,w={},x=function(t){var e=i(O[t]);u(O,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!d(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!d(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(a(t,!f(_)||!(b||O.forEach&&!p((function(){(new _).entries().next()})))))E=n.getConstructor(e,t,g,m),c.enable();else if(a(t,!0)){var S=new E,j=S[m](b?{}:-0,1)!=S,P=p((function(){S.has(1)})),A=h((function(t){new _(t)})),k=!b&&p((function(){for(var t=new _,e=5;e--;)t[m](e,e);return!t.has(-0)}));A||((E=e((function(t,e){l(t,O);var n=v(new _,t,E);return null!=e&&s(e,n[m],{that:n,AS_ENTRIES:g}),n}))).prototype=O,O.constructor=E),(P||k)&&(x("delete"),x("has"),g&&x("get")),(k||j)&&x(m),b&&O.clear&&delete O.clear}return w[t]=E,r({global:!0,forced:E!=_},w),y(E,t),b||n.setStrong(E,t,g),E}},function(t,e,n){var r=n(15),o=n(31),i=n(47),a=n(170),u=Object.isExtensible,c=r((function(){u(1)}));t.exports=c||a?function(t){return!!o(t)&&((!a||"ArrayBuffer"!=i(t))&&(!u||u(t)))}:u},function(t,e,n){var r=n(15);t.exports=r((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e,n){var r=n(15);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,n){"use strict";var r=n(35).f,o=n(51),i=n(141),a=n(59),u=n(114),c=n(111),s=n(108),l=n(142),f=n(34),d=n(135).fastKey,p=n(53),h=p.set,y=p.getterFor;t.exports={getConstructor:function(t,e,n,s){var l=t((function(t,r){u(t,p),h(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=r&&c(r,t[s],{that:t,AS_ENTRIES:n})})),p=l.prototype,v=y(e),g=function(t,e,n){var r,o,i=v(t),a=b(t,e);return a?a.value=n:(i.last=a={index:o=d(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),f?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var n,r=v(t),o=d(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(p,{clear:function(){for(var t=v(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=v(this),n=b(this,t);if(n){var r=n.next,o=n.previous;delete e.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),e.first==n&&(e.first=r),e.last==n&&(e.last=o),f?e.size--:this.size--}return!!n},forEach:function(t){for(var e,n=v(this),r=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(p,n?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),f&&r(p,"size",{get:function(){return v(this).size}}),l},setStrong:function(t,e,n){var r=e+" Iterator",o=y(e),i=y(r);s(t,e,(function(t,e){h(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(113),o=n(93);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,n){"use strict";var r=n(71).forEach,o=n(117)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var r=n(5),o=n(94),i=n(95),a=n(31),u=n(25)("species"),c=r.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||a(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?c:e}},function(t,e,n){var r=n(5);t.exports=r},function(t,e,n){"use strict";var r=n(14),o=n(13),i=n(52),a=n(36),u=n(40),c=n(38),s=n(15),l=n(178),f=n(117),d=n(179),p=n(180),h=n(62),y=n(181),v=[],g=o(v.sort),b=o(v.push),m=s((function(){v.sort(void 0)})),_=s((function(){v.sort(null)})),O=f("sort"),E=!s((function(){if(h)return h<70;if(!(d&&d>3)){if(p)return!0;if(y)return y<603;var t,e,n,r,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)v.push({k:e+r,v:n})}for(v.sort((function(t,e){return e.v-t.v})),r=0;r<v.length;r++)e=v[r].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:m||!_||!O||!E},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(E)return void 0===t?g(e):g(e,t);var n,r,o=[],s=u(e);for(r=0;r<s;r++)r in e&&b(o,e[r]);for(l(o,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=o.length,r=0;r<n;)e[r]=o[r++];for(;r<s;)delete e[r++];return e}})},function(t,e,n){var r=n(110),o=Math.floor,i=function(t,e){var n=t.length,c=o(n/2);return n<8?a(t,e):u(t,i(r(t,0,c),e),i(r(t,c),e),e)},a=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},u=function(t,e,n,r){for(var o=e.length,i=n.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?r(e[a],n[u])<=0?e[a++]:n[u++]:a<o?e[a++]:n[u++];return t};t.exports=i},function(t,e,n){var r=n(50).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},function(t,e,n){var r=n(50);t.exports=/MSIE|Trident/.test(r)},function(t,e,n){var r=n(50).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},function(t,e,n){"use strict";var r=n(14),o=n(71).find,i=n(78),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(t,e,n){var r=n(5),o=n(150),i=r.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(25)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){"use strict";var r=n(5),o=n(59),i=n(33),a=n(36),u=n(186),c=n(137),s=n(95),l=n(40),f=n(58),d=n(138),p=n(112),h=r.Array;t.exports=function(t){var e=a(t),n=s(this),r=arguments.length,y=r>1?arguments[1]:void 0,v=void 0!==y;v&&(y=o(y,r>2?arguments[2]:void 0));var g,b,m,_,O,E,w=p(e),x=0;if(!w||this==h&&c(w))for(g=l(e),b=n?new this(g):h(g);g>x;x++)E=v?y(e[x],x):e[x],f(b,x,E);else for(O=(_=d(e,w)).next,b=n?new this:[];!(m=i(O,_)).done;x++)E=v?u(_,y,[m.value,x],!0):m.value,f(b,x,E);return b.length=x,b}},function(t,e,n){var r=n(30),o=n(139);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},function(t,e,n){"use strict";var r=n(30);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(15),o=n(5).RegExp;t.exports=r((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,n){var r=n(15),o=n(5).RegExp;t.exports=r((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,n){"use strict";var r=n(14),o=n(154).trim;r({target:"String",proto:!0,forced:n(191)("trim")},{trim:function(){return o(this)}})},function(t,e,n){var r=n(89).PROPER,o=n(15),i=n(155);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||r&&i[t].name!==t}))}},function(t,e,n){var r=n(13);t.exports=r(1..valueOf)},function(t,e,n){var r=n(13),o=n(36),i=Math.floor,a=r("".charAt),u=r("".replace),c=r("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,f,d){var p=n+t.length,h=r.length,y=l;return void 0!==f&&(f=o(f),y=s),u(d,y,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,p);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>h){var d=i(l/10);return 0===d?o:d<=h?void 0===r[d-1]?a(u,1):r[d-1]+a(u,1):o}s=r[l-1]}return void 0===s?"":s}))}},function(t,e,n){"use strict";var r=n(5),o=n(13),i=n(52),a=n(31),u=n(32),c=n(96),s=r.Function,l=o([].concat),f=o([].join),d={},p=function(t,e,n){if(!u(d,e)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";d[e]=s("C,a","return new C("+f(r,",")+")")}return d[e](t,n)};t.exports=s.bind||function(t){var e=i(this),n=e.prototype,r=c(arguments,1),o=function(){var n=l(r,c(arguments));return this instanceof o?p(e,n.length,n):e.apply(t,n)};return a(n)&&(o.prototype=n),o}},function(t,e,n){var r=n(32);t.exports=function(t){return void 0!==t&&(r(t,"value")||r(t,"writable"))}},function(t,e,n){"use strict";var r=n(34),o=n(13),i=n(33),a=n(15),u=n(63),c=n(109),s=n(88),l=n(36),f=n(77),d=Object.assign,p=Object.defineProperty,h=o([].concat);t.exports=!d||a((function(){if(r&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=d({},t)[n]||"abcdefghijklmnopqrst"!=u(d({},e)).join("")}))?function(t,e){for(var n=l(t),o=arguments.length,a=1,d=c.f,p=s.f;o>a;)for(var y,v=f(arguments[a++]),g=d?h(u(v),d(v)):u(v),b=g.length,m=0;b>m;)y=g[m++],r&&!i(p,v,y)||(n[y]=v[y]);return n}:d},function(t,e,n){var r=n(13),o=n(42),i=n(38),a=/"/g,u=r("".replace);t.exports=function(t,e,n,r){var c=i(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+u(i(r),a,""")+'"'),s+">"+c+"</"+e+">"}},function(t,e,n){var r=n(15);t.exports=function(t){return r((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,n){var r=n(14),o=Math.hypot,i=Math.abs,a=Math.sqrt;r({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var n,r,o=0,u=0,c=arguments.length,s=0;u<c;)s<(n=i(arguments[u++]))?(o=o*(r=s/n)*r+1,s=n):o+=n>0?(r=n/s)*r:n;return s===1/0?1/0:s*a(o)}})},function(t,e,n){"use strict";var r,o,i,a,u=n(14),c=n(61),s=n(5),l=n(43),f=n(33),d=n(201),p=n(41),h=n(141),y=n(92),v=n(70),g=n(142),b=n(52),m=n(26),_=n(31),O=n(114),E=n(87),w=n(111),x=n(115),S=n(152),j=n(157).set,P=n(202),A=n(205),k=n(206),T=n(159),D=n(207),M=n(53),N=n(90),R=n(25),C=n(208),I=n(123),L=n(62),B=R("species"),H="Promise",U=M.getterFor(H),X=M.set,G=M.getterFor(H),F=d&&d.prototype,Y=d,z=F,V=s.TypeError,W=s.document,K=s.process,$=T.f,Z=$,q=!!(W&&W.createEvent&&s.dispatchEvent),J=m(s.PromiseRejectionEvent),Q=!1,tt=N(H,(function(){var t=E(Y),e=t!==String(Y);if(!e&&66===L)return!0;if(c&&!z.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new Y((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[B]=r,!(Q=n.then((function(){}))instanceof r)||!e&&C&&!J})),et=tt||!x((function(t){Y.all(t).catch((function(){}))})),nt=function(t){var e;return!(!_(t)||!m(e=t.then))&&e},rt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;P((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,u,c,s=n[i++],l=o?s.ok:s.fail,d=s.resolve,p=s.reject,h=s.domain;try{l?(o||(2===t.rejection&&ut(t),t.rejection=1),!0===l?a=r:(h&&h.enter(),a=l(r),h&&(h.exit(),c=!0)),a===s.promise?p(V("Promise-chain cycle")):(u=nt(a))?f(u,a,d,p):d(a)):p(r)}catch(t){h&&!c&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&it(t)}))}},ot=function(t,e,n){var r,o;q?((r=W.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!J&&(o=s["on"+t])?o(r):"unhandledrejection"===t&&k("Unhandled promise rejection",n)},it=function(t){f(j,s,(function(){var e,n=t.facade,r=t.value;if(at(t)&&(e=D((function(){I?K.emit("unhandledRejection",r,n):ot("unhandledrejection",n,r)})),t.rejection=I||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},ut=function(t){f(j,s,(function(){var e=t.facade;I?K.emit("rejectionHandled",e):ot("rejectionhandled",e,t.value)}))},ct=function(t,e,n){return function(r){t(e,r,n)}},st=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,rt(t,!0))},lt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw V("Promise can't be resolved itself");var r=nt(e);r?P((function(){var n={done:!1};try{f(r,e,ct(lt,n,t),ct(st,n,t))}catch(e){st(n,e,t)}})):(t.value=e,t.state=1,rt(t,!1))}catch(e){st({done:!1},e,t)}}};if(tt&&(z=(Y=function(t){O(this,z),b(t),f(r,this);var e=U(this);try{t(ct(lt,e),ct(st,e))}catch(t){st(e,t)}}).prototype,(r=function(t){X(this,{type:H,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(z,{then:function(t,e){var n=G(this),r=n.reactions,o=$(S(this,Y));return o.ok=!m(t)||t,o.fail=m(e)&&e,o.domain=I?K.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&rt(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=U(t);this.promise=t,this.resolve=ct(lt,e),this.reject=ct(st,e)},T.f=$=function(t){return t===Y||t===i?new o(t):Z(t)},!c&&m(d)&&F!==Object.prototype)){a=F.then,Q||(p(F,"then",(function(t,e){var n=this;return new Y((function(t,e){f(a,n,t,e)})).then(t,e)}),{unsafe:!0}),p(F,"catch",z.catch,{unsafe:!0}));try{delete F.constructor}catch(t){}y&&y(F,z)}u({global:!0,wrap:!0,forced:tt},{Promise:Y}),v(Y,H,!1,!0),g(H),i=l(H),u({target:H,stat:!0,forced:tt},{reject:function(t){var e=$(this);return f(e.reject,void 0,t),e.promise}}),u({target:H,stat:!0,forced:c||tt},{resolve:function(t){return A(c&&this===i?Y:this,t)}}),u({target:H,stat:!0,forced:et},{all:function(t){var e=this,n=$(e),r=n.resolve,o=n.reject,i=D((function(){var n=b(e.resolve),i=[],a=0,u=1;w(t,(function(t){var c=a++,s=!1;u++,f(n,e,t).then((function(t){s||(s=!0,i[c]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=$(e),r=n.reject,o=D((function(){var o=b(e.resolve);w(t,(function(t){f(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(t,e,n){var r=n(5);t.exports=r.Promise},function(t,e,n){var r,o,i,a,u,c,s,l,f=n(5),d=n(59),p=n(48).f,h=n(157).set,y=n(158),v=n(203),g=n(204),b=n(123),m=f.MutationObserver||f.WebKitMutationObserver,_=f.document,O=f.process,E=f.Promise,w=p(f,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;for(b&&(t=O.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},y||b||g||!m||!_?!v&&E&&E.resolve?((s=E.resolve(void 0)).constructor=E,l=d(s.then,s),a=function(){l(r)}):b?a=function(){O.nextTick(r)}:(h=d(h,f),a=function(){h(r)}):(u=!0,c=_.createTextNode(""),new m(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u})),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},function(t,e,n){var r=n(50),o=n(5);t.exports=/ipad|iphone|ipod/i.test(r)&&void 0!==o.Pebble},function(t,e,n){var r=n(50);t.exports=/web0s(?!.*chrome)/i.test(r)},function(t,e,n){var r=n(30),o=n(31),i=n(159);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){var r=n(5);t.exports=function(t,e){var n=r.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e){t.exports="object"==typeof window},function(t,e,n){var r=n(34),o=n(13),i=n(63),a=n(37),u=o(n(88).f),c=o([].push),s=function(t){return function(e){for(var n,o=a(e),s=i(o),l=s.length,f=0,d=[];l>f;)n=s[f++],r&&!u(o,n)||c(d,t?[n,o[n]]:o[n]);return d}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,n){"use strict";var r=n(36),o=n(64),i=n(40);t.exports=function(t){for(var e=r(this),n=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},function(t,e,n){"use strict";n.r(e),n.d(e,"h",(function(){return v})),n.d(e,"action",(function(){return z.action})),n.d(e,"observable",(function(){return z.observable})),n.d(e,"computed",(function(){return z.computed})),n.d(e,"makeObservable",(function(){return z.makeObservable})),n.d(e,"configure",(function(){return z.configure})),n.d(e,"toJS",(function(){return z.toJS})),n.d(e,"isObservable",(function(){return z.isObservable})),n.d(e,"observer",(function(){return Ne})),n.d(e,"mobx",(function(){return z})),n.d(e,"LogicFlowUtil",(function(){return r})),n.d(e,"version",(function(){return kb.a})),n.d(e,"LogicFlow",(function(){return Ab})),n.d(e,"BaseNode",(function(){return Eh})),n.d(e,"RectNode",(function(){return Dh})),n.d(e,"CircleNode",(function(){return Uh})),n.d(e,"PolygonNode",(function(){return Qh})),n.d(e,"DiamondNode",(function(){return cy})),n.d(e,"EllipseNode",(function(){return Oy})),n.d(e,"TextNode",(function(){return My})),n.d(e,"HtmlNode",(function(){return Gy})),n.d(e,"BaseEdge",(function(){return Gv})),n.d(e,"LineEdge",(function(){return qv})),n.d(e,"PolylineEdge",(function(){return yg})),n.d(e,"BezierEdge",(function(){return jg})),n.d(e,"Arrow",(function(){return nv})),n.d(e,"BaseEdgeModel",(function(){return xu})),n.d(e,"BezierEdgeModel",(function(){return Mf})),n.d(e,"LineEdgeModel",(function(){return Hu})),n.d(e,"PolylineEdgeModel",(function(){return tc})),n.d(e,"BaseNodeModel",(function(){return Xf})),n.d(e,"CircleNodeModel",(function(){return td})),n.d(e,"DiamondNodeModel",(function(){return yd})),n.d(e,"EllipseNodeModel",(function(){return Ad})),n.d(e,"PolygonNodeModel",(function(){return Fd})),n.d(e,"RectNodeModel",(function(){return np})),n.d(e,"TextNodeModel",(function(){return yp})),n.d(e,"HtmlNodeModel",(function(){return Sp})),n.d(e,"EditConfigModel",(function(){return Oi})),n.d(e,"GraphModel",(function(){return rs})),n.d(e,"SnaplineModel",(function(){return kp})),n.d(e,"Keyboard",(function(){return bb})),n.d(e,"get",(function(){return vf})),n.d(e,"defaults",(function(){return gf}));var r={};n.r(r),n.d(r,"createUuid",(function(){return Fa})),n.d(r,"refreshGraphId",(function(){return Ya})),n.d(r,"createDrag",(function(){return zc})),n.d(r,"StepDrag",(function(){return Vc}));n(1),n(57),n(0),n(4),n(2),n(9),n(39),n(21),n(17),n(3),n(18),n(19),n(20),n(6),n(7);var o,i,a,u,c,s,l,f={},d=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var n in e)t[n]=e[n];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function v(t,e,n){var r,i,a,u={};for(a in e)"key"==a?r=e[a]:"ref"==a?i=e[a]:u[a]=e[a];if(arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===u[a]&&(u[a]=t.defaultProps[a]);return g(t,u,r,i,null)}function g(t,e,n,r,o){var u={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++a:o};return null==o&&null!=i.vnode&&i.vnode(u),u}function b(){return{current:null}}function m(t){return t.children}function _(t,e){this.props=t,this.context=e}function O(t,e){if(null==e)return t.__?O(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?O(t):null}function E(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return E(t)}}function w(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!x.__r++||s!==i.debounceRendering)&&((s=i.debounceRendering)||c)(x)}function x(){for(var t;x.__r=u.length;)t=u.sort((function(t,e){return t.__v.__b-e.__v.__b})),u=[],t.some((function(t){var e,n,r,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(n=[],(r=h({},o)).__v=o.__v+1,N(a,o,r,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?O(o):i,o.__h),R(n,o),o.__e!=i&&E(o)))}))}function S(t,e,n,r,o,i,a,u,c,s){var l,p,h,y,v,b,_,E=r&&r.__k||d,w=E.length;for(n.__k=[],l=0;l<e.length;l++)if(null!=(y=n.__k[l]=null==(y=e[l])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?g(null,y,null,null,y):Array.isArray(y)?g(m,{children:y},null,null,null):y.__b>0?g(y.type,y.props,y.key,null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(h=E[l])||h&&y.key==h.key&&y.type===h.type)E[l]=void 0;else for(p=0;p<w;p++){if((h=E[p])&&y.key==h.key&&y.type===h.type){E[p]=void 0;break}h=null}N(t,y,h=h||f,o,i,a,u,c,s),v=y.__e,(p=y.ref)&&h.ref!=p&&(_||(_=[]),h.ref&&_.push(h.ref,null,y),_.push(p,y.__c||v,y)),null!=v?(null==b&&(b=v),"function"==typeof y.type&&y.__k===h.__k?y.__d=c=j(y,c,t):c=A(t,y,h,E,v,c),"function"==typeof n.type&&(n.__d=c)):c&&h.__e==c&&c.parentNode!=t&&(c=O(h))}for(n.__e=b,l=w;l--;)null!=E[l]&&("function"==typeof n.type&&null!=E[l].__e&&E[l].__e==n.__d&&(n.__d=O(r,l+1)),L(E[l],E[l]));if(_)for(l=0;l<_.length;l++)I(_[l],_[++l],_[++l])}function j(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e="function"==typeof r.type?j(r,e,n):A(n,r,r,o,r.__e,e));return e}function P(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){P(t,e)})):e.push(t)),e}function A(t,e,n,r,o,i){var a,u,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==n||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),a=null;else{for(u=i,c=0;(u=u.nextSibling)&&c<r.length;c+=2)if(u==o)break t;t.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function k(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function T(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||k(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||k(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?M:D,i):t.removeEventListener(e,i?M:D,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function D(t){this.l[t.type+!1](i.event?i.event(t):t)}function M(t){this.l[t.type+!0](i.event?i.event(t):t)}function N(t,e,n,r,o,a,u,c,s){var l,f,d,p,y,v,g,b,O,E,w,x=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(s=n.__h,c=e.__e=n.__e,e.__h=null,a=[c]),(l=i.__b)&&l(e);try{t:if("function"==typeof x){if(b=e.props,O=(l=x.contextType)&&r[l.__c],E=l?O?O.props.value:l.__:r,n.__c?g=(f=e.__c=n.__c).__=f.__E:("prototype"in x&&x.prototype.render?e.__c=f=new x(b,E):(e.__c=f=new _(b,E),f.constructor=x,f.render=B),O&&O.sub(f),f.props=b,f.state||(f.state={}),f.context=E,f.__n=r,d=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=h({},f.__s)),h(f.__s,x.getDerivedStateFromProps(b,f.__s))),p=f.props,y=f.state,d)null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==x.getDerivedStateFromProps&&b!==p&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(b,E),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(b,f.__s,E)||e.__v===n.__v){f.props=b,f.state=f.__s,e.__v!==n.__v&&(f.__d=!1),f.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),f.__h.length&&u.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(b,f.__s,E),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(p,y,v)}))}f.context=E,f.props=b,f.state=f.__s,(l=i.__r)&&l(e),f.__d=!1,f.__v=e,f.__P=t,l=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(r=h(h({},r),f.getChildContext())),d||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(p,y)),w=null!=l&&l.type===m&&null==l.key?l.props.children:l,S(t,Array.isArray(w)?w:[w],e,n,r,o,a,u,c,s),f.base=e.__e,e.__h=null,f.__h.length&&u.push(f),g&&(f.__E=f.__=null),f.__e=!1}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=C(n.__e,e,n,r,o,a,u,s);(l=i.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=c,e.__h=!!s,a[a.indexOf(c)]=null),i.__e(t,e,n)}}function R(t,e){i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function C(t,e,n,r,i,a,u,c){var s,l,d,p=n.props,h=e.props,v=e.type,g=0;if("svg"===v&&(i=!0),null!=a)for(;g<a.length;g++)if((s=a[g])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,a[g]=null;break}if(null==t){if(null===v)return document.createTextNode(h);t=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,h.is&&h),a=null,c=!1}if(null===v)p===h||c&&t.data===h||(t.data=h);else{if(a=a&&o.call(t.childNodes),l=(p=n.props||f).dangerouslySetInnerHTML,d=h.dangerouslySetInnerHTML,!c){if(null!=a)for(p={},g=0;g<t.attributes.length;g++)p[t.attributes[g].name]=t.attributes[g].value;(d||l)&&(d&&(l&&d.__html==l.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||T(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||T(t,i,e[i],n[i],r)}(t,h,p,i,c),d)e.__k=[];else if(g=e.props.children,S(t,Array.isArray(g)?g:[g],e,n,r,i&&"foreignObject"!==v,a,u,a?a[0]:n.__k&&O(n,0),c),null!=a)for(g=a.length;g--;)null!=a[g]&&y(a[g]);c||("value"in h&&void 0!==(g=h.value)&&(g!==p.value||g!==t.value||"progress"===v&&!g)&&T(t,"value",g,p.value,!1),"checked"in h&&void 0!==(g=h.checked)&&g!==t.checked&&T(t,"checked",g,p.checked,!1))}return t}function I(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function L(t,e,n){var r,o;if(i.unmount&&i.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||I(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){i.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],e,"function"!=typeof t.type);n||null==t.__e||y(t.__e),t.__e=t.__d=void 0}function B(t,e,n){return this.constructor(t,n)}function H(t,e,n){var r,a,u;i.__&&i.__(t,e),a=(r="function"==typeof n)?null:n&&n.__k||e.__k,u=[],N(e,t=(!r&&n||e).__k=v(m,null,[t]),a||f,f,void 0!==e.ownerSVGElement,!r&&n?[n]:a?null:e.firstChild?o.call(e.childNodes):null,u,!r&&n?n:a?a.__e:e.firstChild,r),R(u,t)}function U(t,e){H(t,e,U)}function X(t,e,n){var r,i,a,u=h({},t.props);for(a in e)"key"==a?r=e[a]:"ref"==a?i=e[a]:u[a]=e[a];return arguments.length>2&&(u.children=arguments.length>3?o.call(arguments,2):n),g(t.type,u,r||t.key,i||t.ref,null)}o=d.slice,i={__e:function(t,e){for(var n,r,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),o=n.__d),o)return n.__E=n}catch(e){t=e}throw t}},a=0,_.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof t&&(t=t(h({},n),this.props)),t&&h(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),w(this))},_.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),w(this))},_.prototype.render=m,u=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,x.__r=0,l=0;var G,F,Y,z=n(8),V=0,W=[],K=i.__b,$=i.__r,Z=i.diffed,q=i.__c,J=i.unmount;function Q(t,e){i.__h&&i.__h(F,t,V||e),V=0;var n=F.__H||(F.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function tt(t){return V=1,et(lt,t)}function et(t,e,n){var r=Q(G++,2);return r.t=t,r.__c||(r.__=[n?n(e):lt(void 0,e),function(t){var e=r.t(r.__[0],t);r.__[0]!==e&&(r.__=[e,r.__[1]],r.__c.setState({}))}],r.__c=F),r.__}function nt(t,e){var n=Q(G++,4);!i.__s&&st(n.__H,e)&&(n.__=t,n.__H=e,F.__h.push(n))}function rt(t,e){var n=Q(G++,7);return st(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ot(){var t;for(W.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=W.pop();)if(t.__P)try{t.__H.__h.forEach(ut),t.__H.__h.forEach(ct),t.__H.__h=[]}catch(e){t.__H.__h=[],i.__e(e,t.__v)}}i.__b=function(t){F=null,K&&K(t)},i.__r=function(t){$&&$(t),G=0;var e=(F=t.__c).__H;e&&(e.__h.forEach(ut),e.__h.forEach(ct),e.__h=[])},i.diffed=function(t){Z&&Z(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==W.push(e)&&Y===i.requestAnimationFrame||((Y=i.requestAnimationFrame)||at)(ot)),F=null},i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(ut),t.__h=t.__h.filter((function(t){return!t.__||ct(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],i.__e(n,t.__v)}})),q&&q(t,e)},i.unmount=function(t){J&&J(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{ut(t)}catch(t){e=t}})),e&&i.__e(e,n.__v))};var it="function"==typeof requestAnimationFrame;function at(t){var e,n=function(){clearTimeout(r),it&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);it&&(e=requestAnimationFrame(n))}function ut(t){var e=F,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),F=e}function ct(t){var e=F;t.__c=t.__(),F=e}function st(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function lt(t,e){return"function"==typeof e?e(t):e}function ft(t,e){for(var n in e)t[n]=e[n];return t}function dt(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function pt(t){this.props=t}function ht(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:dt(this.props,t)}function r(e){return this.shouldComponentUpdate=n,v(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(pt.prototype=new _).isPureReactComponent=!0,pt.prototype.shouldComponentUpdate=function(t,e){return dt(this.props,t)||dt(this.state,e)};var yt=i.__b;i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),yt&&yt(t)};var vt="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function gt(t){function e(e,n){var r=ft({},e);return delete r.ref,t(r,!(n=e.ref||n)||"object"==typeof n&&!("current"in n)?null:n)}return e.$$typeof=vt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var bt=function(t,e){return null==t?null:P(P(t).map(e))},mt={map:bt,forEach:bt,count:function(t){return t?P(t).length:0},only:function(t){var e=P(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:P},_t=i.__e;i.__e=function(t,e,n){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);_t(t,e,n)};var Ot=i.unmount;function Et(){this.__u=0,this.t=null,this.__b=null}function wt(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function xt(){this.u=null,this.o=null}i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),Ot&&Ot(t)},(Et.prototype=new _).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=wt(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(u):u())};n.__R=a;var u=function(){if(!--r.__u){if(r.state.__e){var t=r.state.__e;r.__v.__k[0]=function t(e,n,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)})),e.__c&&e.__c.__P===n&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__e:r.__b=null});e=r.t.pop();)e.forceUpdate()}},c=!0===e.__h;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(a,a)},Et.prototype.componentWillUnmount=function(){this.t=[]},Et.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,n,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),e.__c.__H=null),null!=(e=ft({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=n),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,n,r)}))),e}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__e&&v(m,null,t.fallback);return o&&(o.__h=null),[v(m,null,e.__e?null:t.children),o]};var St=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function jt(t){return this.getChildContext=function(){return t.context},t.children}function Pt(t){var e=this,n=t.i;e.componentWillUnmount=function(){H(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),H(v(jt,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(xt.prototype=new _).__e=function(t){var e=this,n=wt(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),St(e,t,r)):o()};n?n(i):i()}},xt.prototype.render=function(t){this.u=null,this.o=new Map;var e=P(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},xt.prototype.componentDidUpdate=xt.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){St(t,n,e)}))};var At="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,kt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Tt="undefined"!=typeof document,Dt=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};_.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(_.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Mt=i.event;function Nt(){}function Rt(){return this.cancelBubble}function Ct(){return this.defaultPrevented}i.event=function(t){return Mt&&(t=Mt(t)),t.persist=Nt,t.isPropagationStopped=Rt,t.isDefaultPrevented=Ct,t.nativeEvent=t};var It,Lt={configurable:!0,get:function(){return this.class}},Bt=i.vnode;i.vnode=function(t){var e=t.type,n=t.props,r=n;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in r={},n){var a=n[i];Tt&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in n&&null==a||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!Dt(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&kt.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),r[i]=a)}"select"==e&&r.multiple&&Array.isArray(r.value)&&(r.value=P(n.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==e&&null!=r.defaultValue&&(r.value=P(n.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),t.props=r,n.class!=n.className&&(Lt.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Lt))}t.$$typeof=At,Bt&&Bt(t)};var Ht=i.__r;i.__r=function(t){Ht&&Ht(t),It=t.__c};function Ut(t){return!!t&&t.$$typeof===At}var Xt=function(t,e){return t(e)},Gt={useState:tt,useReducer:et,useEffect:function(t,e){var n=Q(G++,3);!i.__s&&st(n.__H,e)&&(n.__=t,n.__H=e,F.__H.__h.push(n))},useLayoutEffect:nt,useRef:function(t){return V=5,rt((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,n){V=6,nt((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))},useMemo:rt,useCallback:function(t,e){return V=8,rt((function(){return t}),e)},useContext:function(t){var e=F.context[t.__c],n=Q(G++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(F)),e.props.value):t.__},useDebugValue:function(t,e){i.useDebugValue&&i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:mt,render:function(t,e,n){return null==e.__k&&(e.textContent=""),H(t,e),"function"==typeof n&&n(),t?t.__c:null},hydrate:function(t,e,n){return U(t,e),"function"==typeof n&&n(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(H(null,t),!0)},createPortal:function(t,e){return v(Pt,{__v:t,i:e})},createElement:v,createContext:function(t,e){var n={__c:e="__cC"+l++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(w)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(t){return v.bind(null,t)},cloneElement:function(t){return Ut(t)?X.apply(null,arguments):t},createRef:b,Fragment:m,isValidElement:Ut,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:_,PureComponent:pt,memo:ht,forwardRef:gt,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:Xt,StrictMode:m,Suspense:Et,SuspenseList:xt,lazy:function(t){var e,n,r;function o(o){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return v(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(t){return It.__n[t.__c].props.value}}}}};if(!tt)throw new Error("mobx-react-lite requires React with Hooks support");if(!z.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function Ft(t){t()}function Yt(t){return Object(z.getDependencyTree)(t)}var zt="undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry;function Vt(t){return{reaction:t,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+Wt}}var Wt=1e4;var Kt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};var $t=zt?function(t){var e=new Map,n=1,r=new t((function(t){var n=e.get(t);n&&(n.reaction.dispose(),e.delete(t))}));return{addReactionToTrack:function(t,o,i){var a=n++;return r.register(i,a,t),t.current=Vt(o),t.current.finalizationRegistryCleanupToken=a,e.set(a,t.current),t.current},recordReactionAsCommitted:function(t){r.unregister(t),t.current&&t.current.finalizationRegistryCleanupToken&&e.delete(t.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(zt):function(){var t,e=new Set;function n(){void 0===t&&(t=setTimeout(r,1e4))}function r(){t=void 0;var r=Date.now();e.forEach((function(t){var n=t.current;n&&r>=n.cleanAt&&(n.reaction.dispose(),t.current=null,e.delete(t))})),e.size>0&&n()}return{addReactionToTrack:function(t,r,o){var i;return t.current=Vt(r),i=t,e.add(i),n(),t.current},recordReactionAsCommitted:function(t){e.delete(t)},forceCleanupTimerToRunNowForTests:function(){t&&(clearTimeout(t),r())},resetCleanupScheduleForTests:function(){var n,r;if(e.size>0){try{for(var o=Kt(e),i=o.next();!i.done;i=o.next()){var a=i.value,u=a.current;u&&(u.reaction.dispose(),a.current=null)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.clear()}t&&(clearTimeout(t),t=void 0)}}}(),Zt=$t.addReactionToTrack,qt=$t.recordReactionAsCommitted,Jt=($t.resetCleanupScheduleForTests,$t.forceCleanupTimerToRunNowForTests,!1);function Qt(){return Jt}var te=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function ee(t){return"observer".concat(t)}var ne=function(){};function re(){return new ne}function oe(t,e){if(void 0===e&&(e="observed"),Qt())return t();var n=te(Gt.useState(re),1)[0],r=te(Gt.useState(),2)[1],o=function(){return r([])},i=Gt.useRef(null);if(!i.current)var a=new z.Reaction(ee(e),(function(){u.mounted?o():u.changedBeforeMount=!0})),u=Zt(i,a,n);var c,s,l=i.current.reaction;if(Gt.useDebugValue(l,Yt),Gt.useEffect((function(){return qt(i),i.current?(i.current.mounted=!0,i.current.changedBeforeMount&&(i.current.changedBeforeMount=!1,o())):(i.current={reaction:new z.Reaction(ee(e),(function(){o()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},o()),function(){i.current.reaction.dispose(),i.current=null}}),[]),l.track((function(){try{c=t()}catch(t){s=t}})),s)throw s;return c}var ie="function"==typeof Symbol&&Symbol.for,ae=ie?Symbol.for("react.forward_ref"):gt((function(t){return null})).$$typeof,ue=ie?Symbol.for("react.memo"):ht((function(t){return null})).$$typeof;function ce(t,e){var n;if(ue&&t.$$typeof===ue)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(Qt())return t;var r=null!==(n=null==e?void 0:e.forwardRef)&&void 0!==n&&n,o=t,i=t.displayName||t.name;if(ae&&t.$$typeof===ae&&(r=!0,"function"!=typeof(o=t.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a,u,c=function(t,e){return oe((function(){return o(t,e)}),i)};return""!==i&&(c.displayName=i),t.contextTypes&&(c.contextTypes=t.contextTypes),r&&(c=gt(c)),c=ht(c),a=t,u=c,Object.keys(a).forEach((function(t){se[t]||Object.defineProperty(u,t,Object.getOwnPropertyDescriptor(a,t))})),c}var se={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};var le;(le=Xt)||(le=Ft),Object(z.configure)({reactionScheduler:le});var fe=0;var de={};function pe(t){return de[t]||(de[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+fe+")";return fe++,e}(t)),de[t]}function he(t,e){if(ye(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.hasOwnProperty.call(e,n[o])||!ye(t[n[o]],e[n[o]]))return!1;return!0}function ye(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function ve(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var ge=pe("patchMixins"),be=pe("patchedDefinition");function me(t,e){for(var n=this,r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];e.locks++;try{var a;return null!=t&&(a=t.apply(this,o)),a}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(n,o)}))}}function _e(t,e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];me.call.apply(me,[this,t,e].concat(r))}}function Oe(t,e,n){var r=function(t,e){var n=t[ge]=t[ge]||{},r=n[e]=n[e]||{};return r.locks=r.locks||0,r.methods=r.methods||[],r}(t,e);r.methods.indexOf(n)<0&&r.methods.push(n);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[be]){var i=t[e],a=function t(e,n,r,o,i){var a,u=_e(i,o);return(a={})[be]=!0,a.get=function(){return u},a.set=function(i){if(this===e)u=_e(i,o);else{var a=t(this,n,r,o,i);Object.defineProperty(this,n,a)}},a.configurable=!0,a.enumerable=r,a}(t,e,o?o.enumerable:void 0,r,i);Object.defineProperty(t,e,a)}}var Ee=z.$mobx||"$mobx",we=pe("isMobXReactObserver"),xe=pe("isUnmounted"),Se=pe("skipRender"),je=pe("isForcingUpdate");function Pe(t){var e=t.prototype;if(t[we]){var n=Ae(e);console.warn("The provided component class ("+n+") \n has already been declared as an observer component.")}else t[we]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==pt)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==Te)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=Te;De(e,"props"),De(e,"state");var r=e.render;if("function"!=typeof r){var o=Ae(e);throw new Error("[mobx-react] class component ("+o+") is missing `render` method.\n`observer` requires `render` being a function defined on prototype.\n`render = () => {}` or `render = function() {}` is not supported.")}return e.render=function(){return ke.call(this,r)},Oe(e,"componentWillUnmount",(function(){var t;if(!0!==Qt()&&(null==(t=this.render[Ee])||t.dispose(),this[xe]=!0,!this.render[Ee])){var e=Ae(this);console.warn("The reactive render of an observer class component ("+e+") \n was overriden after MobX attached. This may result in a memory leak if the \n overriden reactive render was not properly disposed.")}})),t}function Ae(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function ke(t){var e=this;if(!0===Qt())return t.call(this);ve(this,Se,!1),ve(this,je,!1);var n=Ae(this),r=t.bind(this),o=!1,i=new z.Reaction(n+".render()",(function(){if(!o&&(o=!0,!0!==e[xe])){var t=!0;try{ve(e,je,!0),e[Se]||_.prototype.forceUpdate.call(e),t=!1}finally{ve(e,je,!1),t&&i.dispose()}}}));function a(){o=!1;var t=void 0,e=void 0;if(i.track((function(){try{e=Object(z._allowStateChanges)(!1,r)}catch(e){t=e}})),t)throw t;return e}return i.reactComponent=this,a[Ee]=i,this.render=a,a.call(this)}function Te(t,e){return Qt()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==e||!he(this.props,t)}function De(t,e){var n=pe("reactProp_"+e+"_valueHolder"),r=pe("reactProp_"+e+"_atomHolder");function o(){return this[r]||ve(this,r,Object(z.createAtom)("reactive "+e)),this[r]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return z._allowStateReadsStart&&z._allowStateReadsEnd&&(t=Object(z._allowStateReadsStart)(!0)),o.call(this).reportObserved(),z._allowStateReadsStart&&z._allowStateReadsEnd&&Object(z._allowStateReadsEnd)(t),this[n]},set:function(t){this[je]||he(this[n],t)?ve(this,n,t):(ve(this,n,t),ve(this,Se,!0),o.call(this).reportChanged(),ve(this,Se,!1))}})}function Me(t){return!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use `observer` on a component that already has `inject`. Please apply `observer` before applying `inject`"),Object.prototype.isPrototypeOf.call(_,t)||Object.prototype.isPrototypeOf.call(pt,t)?Pe(t):ce(t)}if(!_)throw new Error("mobx-react requires React to be available");if(!z.observable)throw new Error("mobx-react requires mobx to be available");function Ne(t){return Me(t)}Object(z.configure)({isolateGlobalState:!0});n(27),n(177),n(182),n(97),n(148),n(149),n(22),n(23),n(16);var Re=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o};var Ce=function(){this.__data__=[],this.size=0};var Ie=function(t,e){return t===e||t!=t&&e!=e};var Le=function(t,e){for(var n=t.length;n--;)if(Ie(t[n][0],e))return n;return-1},Be=Array.prototype.splice;var He=function(t){var e=this.__data__,n=Le(e,t);return!(n<0)&&(n==e.length-1?e.pop():Be.call(e,n,1),--this.size,!0)};var Ue=function(t){var e=this.__data__,n=Le(e,t);return n<0?void 0:e[n][1]};var Xe=function(t){return Le(this.__data__,t)>-1};var Ge=function(t,e){var n=this.__data__,r=Le(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Fe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Fe.prototype.clear=Ce,Fe.prototype.delete=He,Fe.prototype.get=Ue,Fe.prototype.has=Xe,Fe.prototype.set=Ge;var Ye=Fe;var ze=function(){this.__data__=new Ye,this.size=0};var Ve=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var We=function(t){return this.__data__.get(t)};var Ke=function(t){return this.__data__.has(t)},$e=n(29),Ze=$e.a.Symbol,qe=Object.prototype,Je=qe.hasOwnProperty,Qe=qe.toString,tn=Ze?Ze.toStringTag:void 0;var en=function(t){var e=Je.call(t,tn),n=t[tn];try{t[tn]=void 0;var r=!0}catch(t){}var o=Qe.call(t);return r&&(e?t[tn]=n:delete t[tn]),o},nn=Object.prototype.toString;var rn=function(t){return nn.call(t)},on=Ze?Ze.toStringTag:void 0;var an=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":on&&on in Object(t)?en(t):rn(t)};var un=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var cn,sn=function(t){if(!un(t))return!1;var e=an(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},ln=$e.a["__core-js_shared__"],fn=(cn=/[^.]+$/.exec(ln&&ln.keys&&ln.keys.IE_PROTO||""))?"Symbol(src)_1."+cn:"";var dn=function(t){return!!fn&&fn in t},pn=Function.prototype.toString;var hn=function(t){if(null!=t){try{return pn.call(t)}catch(t){}try{return t+""}catch(t){}}return""},yn=/^\[object .+?Constructor\]$/,vn=Function.prototype,gn=Object.prototype,bn=vn.toString,mn=gn.hasOwnProperty,_n=RegExp("^"+bn.call(mn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var On=function(t){return!(!un(t)||dn(t))&&(sn(t)?_n:yn).test(hn(t))};var En=function(t,e){return null==t?void 0:t[e]};var wn=function(t,e){var n=En(t,e);return On(n)?n:void 0},xn=wn($e.a,"Map"),Sn=wn(Object,"create");var jn=function(){this.__data__=Sn?Sn(null):{},this.size=0};var Pn=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},An=Object.prototype.hasOwnProperty;var kn=function(t){var e=this.__data__;if(Sn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return An.call(e,t)?e[t]:void 0},Tn=Object.prototype.hasOwnProperty;var Dn=function(t){var e=this.__data__;return Sn?void 0!==e[t]:Tn.call(e,t)};var Mn=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Sn&&void 0===e?"__lodash_hash_undefined__":e,this};function Nn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Nn.prototype.clear=jn,Nn.prototype.delete=Pn,Nn.prototype.get=kn,Nn.prototype.has=Dn,Nn.prototype.set=Mn;var Rn=Nn;var Cn=function(){this.size=0,this.__data__={hash:new Rn,map:new(xn||Ye),string:new Rn}};var In=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Ln=function(t,e){var n=t.__data__;return In(e)?n["string"==typeof e?"string":"hash"]:n.map};var Bn=function(t){var e=Ln(this,t).delete(t);return this.size-=e?1:0,e};var Hn=function(t){return Ln(this,t).get(t)};var Un=function(t){return Ln(this,t).has(t)};var Xn=function(t,e){var n=Ln(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Gn.prototype.clear=Cn,Gn.prototype.delete=Bn,Gn.prototype.get=Hn,Gn.prototype.has=Un,Gn.prototype.set=Xn;var Fn=Gn;var Yn=function(t,e){var n=this.__data__;if(n instanceof Ye){var r=n.__data__;if(!xn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(t,e),this.size=n.size,this};function zn(t){var e=this.__data__=new Ye(t);this.size=e.size}zn.prototype.clear=ze,zn.prototype.delete=Ve,zn.prototype.get=We,zn.prototype.has=Ke,zn.prototype.set=Yn;var Vn=zn;var Wn=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var Kn=function(t){return this.__data__.has(t)};function $n(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}$n.prototype.add=$n.prototype.push=Wn,$n.prototype.has=Kn;var Zn=$n;var qn=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1};var Jn=function(t,e){return t.has(e)};var Qn=function(t,e,n,r,o,i){var a=1&n,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,d=!0,p=2&n?new Zn:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],y=e[f];if(r)var v=a?r(y,h,f,e,t,i):r(h,y,f,t,e,i);if(void 0!==v){if(v)continue;d=!1;break}if(p){if(!qn(e,(function(t,e){if(!Jn(p,e)&&(h===t||o(h,t,n,r,i)))return p.push(e)}))){d=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){d=!1;break}}return i.delete(t),i.delete(e),d},tr=$e.a.Uint8Array;var er=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n};var nr=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},rr=Ze?Ze.prototype:void 0,or=rr?rr.valueOf:void 0;var ir=function(t,e,n,r,o,i,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new tr(t),new tr(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ie(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=er;case"[object Set]":var c=1&r;if(u||(u=nr),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=2,a.set(t,e);var l=Qn(u(t),u(e),r,o,i,a);return a.delete(t),l;case"[object Symbol]":if(or)return or.call(t)==or.call(e)}return!1};var ar=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},ur=Array.isArray;var cr=function(t,e,n){var r=e(t);return ur(t)?r:ar(r,n(t))};var sr=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i};var lr=function(){return[]},fr=Object.prototype.propertyIsEnumerable,dr=Object.getOwnPropertySymbols,pr=dr?function(t){return null==t?[]:(t=Object(t),sr(dr(t),(function(e){return fr.call(t,e)})))}:lr;var hr=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r};var yr=function(t){return null!=t&&"object"==typeof t};var vr=function(t){return yr(t)&&"[object Arguments]"==an(t)},gr=Object.prototype,br=gr.hasOwnProperty,mr=gr.propertyIsEnumerable,_r=vr(function(){return arguments}())?vr:function(t){return yr(t)&&br.call(t,"callee")&&!mr.call(t,"callee")},Or=n(45),Er=/^(?:0|[1-9]\d*)$/;var wr=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Er.test(t))&&t>-1&&t%1==0&&t<e};var xr=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Sr={};Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Arguments]"]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object Boolean]"]=Sr["[object DataView]"]=Sr["[object Date]"]=Sr["[object Error]"]=Sr["[object Function]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr["[object Object]"]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object WeakMap]"]=!1;var jr=function(t){return yr(t)&&xr(t.length)&&!!Sr[an(t)]};var Pr=function(t){return function(e){return t(e)}},Ar=n(46),kr=Ar.a&&Ar.a.isTypedArray,Tr=kr?Pr(kr):jr,Dr=Object.prototype.hasOwnProperty;var Mr=function(t,e){var n=ur(t),r=!n&&_r(t),o=!n&&!r&&Object(Or.a)(t),i=!n&&!r&&!o&&Tr(t),a=n||r||o||i,u=a?hr(t.length,String):[],c=u.length;for(var s in t)!e&&!Dr.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wr(s,c))||u.push(s);return u},Nr=Object.prototype;var Rr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Nr)};var Cr=function(t,e){return function(n){return t(e(n))}},Ir=Cr(Object.keys,Object),Lr=Object.prototype.hasOwnProperty;var Br=function(t){if(!Rr(t))return Ir(t);var e=[];for(var n in Object(t))Lr.call(t,n)&&"constructor"!=n&&e.push(n);return e};var Hr=function(t){return null!=t&&xr(t.length)&&!sn(t)};var Ur=function(t){return Hr(t)?Mr(t):Br(t)};var Xr=function(t){return cr(t,Ur,pr)},Gr=Object.prototype.hasOwnProperty;var Fr=function(t,e,n,r,o,i){var a=1&n,u=Xr(t),c=u.length;if(c!=Xr(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:Gr.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var y=t[l=u[s]],v=e[l];if(r)var g=a?r(v,y,l,e,t,i):r(y,v,l,t,e,i);if(!(void 0===g?y===v||o(y,v,n,r,i):g)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(p=!1)}return i.delete(t),i.delete(e),p},Yr=wn($e.a,"DataView"),zr=wn($e.a,"Promise"),Vr=wn($e.a,"Set"),Wr=wn($e.a,"WeakMap"),Kr=hn(Yr),$r=hn(xn),Zr=hn(zr),qr=hn(Vr),Jr=hn(Wr),Qr=an;(Yr&&"[object DataView]"!=Qr(new Yr(new ArrayBuffer(1)))||xn&&"[object Map]"!=Qr(new xn)||zr&&"[object Promise]"!=Qr(zr.resolve())||Vr&&"[object Set]"!=Qr(new Vr)||Wr&&"[object WeakMap]"!=Qr(new Wr))&&(Qr=function(t){var e=an(t),n="[object Object]"==e?t.constructor:void 0,r=n?hn(n):"";if(r)switch(r){case Kr:return"[object DataView]";case $r:return"[object Map]";case Zr:return"[object Promise]";case qr:return"[object Set]";case Jr:return"[object WeakMap]"}return e});var to=Qr,eo=Object.prototype.hasOwnProperty;var no=function(t,e,n,r,o,i){var a=ur(t),u=ur(e),c=a?"[object Array]":to(t),s=u?"[object Array]":to(e),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),d=c==s;if(d&&Object(Or.a)(t)){if(!Object(Or.a)(e))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new Vn),a||Tr(t)?Qn(t,e,n,r,o,i):ir(t,e,c,n,r,o,i);if(!(1&n)){var p=l&&eo.call(t,"__wrapped__"),h=f&&eo.call(e,"__wrapped__");if(p||h){var y=p?t.value():t,v=h?e.value():e;return i||(i=new Vn),o(y,v,n,r,i)}}return!!d&&(i||(i=new Vn),Fr(t,e,n,r,o,i))};var ro=function t(e,n,r,o,i){return e===n||(null==e||null==n||!yr(e)&&!yr(n)?e!=e&&n!=n:no(e,n,r,o,t,i))};var oo=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=Object(t);o--;){var u=n[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=n[o])[0],s=t[c],l=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var f=new Vn;if(r)var d=r(s,l,c,t,e,f);if(!(void 0===d?ro(l,s,3,r,f):d))return!1}}return!0};var io=function(t){return t==t&&!un(t)};var ao=function(t){for(var e=Ur(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,io(o)]}return e};var uo=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}};var co=function(t){var e=ao(t);return 1==e.length&&e[0][2]?uo(e[0][0],e[0][1]):function(n){return n===t||oo(n,t,e)}};var so=function(t){return"symbol"==typeof t||yr(t)&&"[object Symbol]"==an(t)},lo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fo=/^\w*$/;var po=function(t,e){if(ur(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!so(t))||(fo.test(t)||!lo.test(t)||null!=e&&t in Object(e))};function ho(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ho.Cache||Fn),n}ho.Cache=Fn;var yo=ho;var vo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,go=/\\(\\)?/g,bo=function(t){var e=yo(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(vo,(function(t,n,r,o){e.push(r?o.replace(go,"$1"):n||t)})),e})),mo=Ze?Ze.prototype:void 0,_o=mo?mo.toString:void 0;var Oo=function t(e){if("string"==typeof e)return e;if(ur(e))return Re(e,t)+"";if(so(e))return _o?_o.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n};var Eo=function(t){return null==t?"":Oo(t)};var wo=function(t,e){return ur(t)?t:po(t,e)?[t]:bo(Eo(t))};var xo=function(t){if("string"==typeof t||so(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var So=function(t,e){for(var n=0,r=(e=wo(e,t)).length;null!=t&&n<r;)t=t[xo(e[n++])];return n&&n==r?t:void 0};var jo=function(t,e,n){var r=null==t?void 0:So(t,e);return void 0===r?n:r};var Po=function(t,e){return null!=t&&e in Object(t)};var Ao=function(t,e,n){for(var r=-1,o=(e=wo(e,t)).length,i=!1;++r<o;){var a=xo(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&xr(o)&&wr(a,o)&&(ur(t)||_r(t))};var ko=function(t,e){return null!=t&&Ao(t,e,Po)};var To=function(t,e){return po(t)&&io(e)?uo(xo(t),e):function(n){var r=jo(n,t);return void 0===r&&r===e?ko(n,t):ro(e,r,3)}};var Do=function(t){return t};var Mo=function(t){return function(e){return null==e?void 0:e[t]}};var No=function(t){return function(e){return So(e,t)}};var Ro=function(t){return po(t)?Mo(xo(t)):No(t)};var Co=function(t){return"function"==typeof t?t:null==t?Do:"object"==typeof t?ur(t)?To(t[0],t[1]):co(t):Ro(t)};var Io=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===n(i[c],c,i))break}return e}}();var Lo=function(t,e){return function(n,r){if(null==n)return n;if(!Hr(n))return t(n,r);for(var o=n.length,i=e?o:-1,a=Object(n);(e?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(t,e){return t&&Io(t,e,Ur)}));var Bo=function(t,e){var n=-1,r=Hr(t)?Array(t.length):[];return Lo(t,(function(t,o,i){r[++n]=e(t,o,i)})),r};var Ho=function(t,e){return(ur(t)?Re:Bo)(t,Co(e,3))},Uo=function(){try{var t=wn(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Xo=function(t,e,n){"__proto__"==e&&Uo?Uo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Go=Object.prototype.hasOwnProperty;var Fo=function(t,e,n){var r=t[e];Go.call(t,e)&&Ie(r,n)&&(void 0!==n||e in t)||Xo(t,e,n)};var Yo=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var u=e[i],c=r?r(n[u],t[u],u,n,t):void 0;void 0===c&&(c=t[u]),o?Xo(n,u,c):Fo(n,u,c)}return n};var zo=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},Vo=Math.max;var Wo=function(t,e,n){return e=Vo(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Vo(r.length-e,0),a=Array(i);++o<i;)a[o]=r[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=r[o];return u[e]=n(a),zo(t,this,u)}};var Ko=function(t){return function(){return t}},$o=Uo?function(t,e){return Uo(t,"toString",{configurable:!0,enumerable:!1,value:Ko(e),writable:!0})}:Do,Zo=Date.now;var qo=function(t){var e=0,n=0;return function(){var r=Zo(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}($o);var Jo=function(t,e){return qo(Wo(t,e,Do),t+"")};var Qo=function(t,e,n){if(!un(n))return!1;var r=typeof e;return!!("number"==r?Hr(n)&&wr(e,n.length):"string"==r&&e in n)&&Ie(n[e],t)};var ti=function(t){return Jo((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,a&&Qo(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,i)}return e}))},ei=Object.prototype.hasOwnProperty,ni=ti((function(t,e){if(Rr(e)||Hr(e))Yo(e,Ur(e),t);else for(var n in e)ei.call(e,n)&&Fo(t,n,e[n])}));var ri=function(t,e,n,r){if(!un(t))return t;for(var o=-1,i=(e=wo(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=xo(e[o]),s=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var l=u[c];void 0===(s=r?r(l,c,u):void 0)&&(s=un(l)?l:wr(e[o+1])?[]:{})}Fo(u,c,s),u=u[c]}return t};var oi=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var a=e[r],u=So(t,a);n(u,a)&&ri(i,wo(a,t),u)}return i};var ii=function(t,e){return oi(t,e,(function(e,n){return ko(t,n)}))},ai=Ze?Ze.isConcatSpreadable:void 0;var ui=function(t){return ur(t)||_r(t)||!!(ai&&t&&t[ai])};var ci=function t(e,n,r,o,i){var a=-1,u=e.length;for(r||(r=ui),i||(i=[]);++a<u;){var c=e[a];n>0&&r(c)?n>1?t(c,n-1,r,o,i):ar(i,c):o||(i[i.length]=c)}return i};var si=function(t){return(null==t?0:t.length)?ci(t,1):[]};var li=function(t){return qo(Wo(t,void 0,si),t+"")}((function(t,e){return null==t?{}:ii(t,e)}));function fi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function di(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var pi,hi,yi,vi,gi,bi,mi={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},_i=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey"],Oi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),di(this,"isSilentMode",!1),di(this,"stopZoomGraph",!1),di(this,"stopScrollGraph",!1),di(this,"stopMoveGraph",!1),di(this,"adjustEdge",!0),di(this,"adjustEdgeMiddle",!1),di(this,"adjustEdgeStartAndEnd",!1),di(this,"adjustNodePosition",!0),di(this,"hideAnchors",!1),di(this,"hoverOutline",!0),di(this,"nodeSelectedOutline",!0),di(this,"edgeSelectedOutline",!0),di(this,"nodeTextEdit",!0),di(this,"edgeTextEdit",!0),di(this,"nodeTextDraggable",!1),di(this,"edgeTextDraggable",!1),di(this,"multipleSelectKey",""),di(this,"defaultConfig",{}),Object(z.makeObservable)(this,{isSilentMode:z.observable,stopZoomGraph:z.observable,stopScrollGraph:z.observable,stopMoveGraph:z.observable,adjustEdge:z.observable,adjustEdgeMiddle:z.observable,adjustEdgeStartAndEnd:z.observable,adjustNodePosition:z.observable,hideAnchors:z.observable,hoverOutline:z.observable,nodeSelectedOutline:z.observable,edgeSelectedOutline:z.observable,nodeTextEdit:z.observable,edgeTextEdit:z.observable,nodeTextDraggable:z.observable,edgeTextDraggable:z.observable,updateEditConfig:z.action}),ni(this,this.getConfigDetail(e))}var e,n,r;return e=t,(n=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);ni(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,n=t.textEdit,r={};if(!1===e&&ni(r,this.defaultConfig),!0===e){var o=li(mi,_i);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable},ni(r,o)}!1===n&&ni(r,{nodeTextEdit:!1,edgeTextEdit:!1});var i=li(t,_i);return ni(r,i)}},{key:"getConfig",value:function(){return li(this,_i)}}])&&fi(e.prototype,n),r&&fi(e,r),t}();n(99);!function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(pi||(pi={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(hi||(hi={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(yi||(yi={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(vi||(vi={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_TEXT_UPDATE="node:text-update",t.NODE_PROPERTY_UPDATE="node:property-update",t.NODE_CONTEXTMENU="node:contextmenu",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_TEXT_UPDATE="edge:text-update",t.EDGE_PROPERTY_UPDATE="edge:property-update",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.HISTORY_INSERT="history:insert",t.TEXT_UPDATE="text:update",t.TEXT_DROP="text:drop",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(gi||(gi={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(bi||(bi={}));var Ei;function wi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return xi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xi(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Si(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ji(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(Ei||(Ei={}));var Pi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ji(this,"MINI_SCALE_SIZE",.2),ji(this,"MAX_SCALE_SIZE",16),ji(this,"SCALE_X",1),ji(this,"SKEW_Y",0),ji(this,"SKEW_X",0),ji(this,"SCALE_Y",1),ji(this,"TRANSLATE_X",0),ji(this,"TRANSLATE_Y",0),ji(this,"ZOOM_SIZE",.04),ji(this,"eventCenter",void 0),Object(z.makeObservable)(this,{SCALE_X:z.observable,SKEW_Y:z.observable,SKEW_X:z.observable,SCALE_Y:z.observable,TRANSLATE_X:z.observable,TRANSLATE_Y:z.observable,ZOOM_SIZE:z.observable,zoom:z.action,resetZoom:z.action,translate:z.action,focusOn:z.action}),this.eventCenter=e}var e,n,r;return e=t,(n=[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var e=wi(t,2),n=e[0],r=e[1];return[(n-this.TRANSLATE_X)/this.SCALE_X,(r-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=wi(t,2),n=e[0],r=e[1];return[n*this.SCALE_X+this.TRANSLATE_X,r*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,n){var r=wi(t,2),o=r[0],i=r[1];return[o+e/this.SCALE_X,i+n/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var t=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(t,")")}}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,n=this.SCALE_X,r=this.SCALE_Y;return!0===t?(n+=this.ZOOM_SIZE,r+=this.ZOOM_SIZE):!1===t?(n-=this.ZOOM_SIZE,r-=this.ZOOM_SIZE):"number"==typeof t&&(n=t,r=t),n<this.MINI_SCALE_SIZE||n>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(n-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(r-this.SCALE_Y)*e[1]),this.SCALE_X=n,this.SCALE_Y=r,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(gi.GRAPH_TRANSFORM,{type:t,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(t,e){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=e,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,e,n,r){var o=wi(this.CanvasPointToHtmlPoint([t,e]),2),i=n/2-o[0],a=r/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=a,this.emitGraphTransform("focusOn")}}])&&Si(e.prototype,n),r&&Si(e,r),t}();var Ai=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t};var ki=function(t,e){return t&&Yo(e,Ur(e),t)};var Ti=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},Di=Object.prototype.hasOwnProperty;var Mi=function(t){if(!un(t))return Ti(t);var e=Rr(t),n=[];for(var r in t)("constructor"!=r||!e&&Di.call(t,r))&&n.push(r);return n};var Ni=function(t){return Hr(t)?Mr(t,!0):Mi(t)};var Ri=function(t,e){return t&&Yo(e,Ni(e),t)},Ci=n(102);var Ii=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e};var Li=function(t,e){return Yo(t,pr(t),e)},Bi=Cr(Object.getPrototypeOf,Object),Hi=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ar(e,pr(t)),t=Bi(t);return e}:lr;var Ui=function(t,e){return Yo(t,Hi(t),e)};var Xi=function(t){return cr(t,Ni,Hi)},Gi=Object.prototype.hasOwnProperty;var Fi=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Gi.call(t,"index")&&(n.index=t.index,n.input=t.input),n};var Yi=function(t){var e=new t.constructor(t.byteLength);return new tr(e).set(new tr(t)),e};var zi=function(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},Vi=/\w*$/;var Wi=function(t){var e=new t.constructor(t.source,Vi.exec(t));return e.lastIndex=t.lastIndex,e},Ki=Ze?Ze.prototype:void 0,$i=Ki?Ki.valueOf:void 0;var Zi=function(t){return $i?Object($i.call(t)):{}};var qi=function(t,e){var n=e?Yi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var Ji=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Yi(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return zi(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return qi(t,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Wi(t);case"[object Set]":return new r;case"[object Symbol]":return Zi(t)}},Qi=Object.create,ta=function(){function t(){}return function(e){if(!un(e))return{};if(Qi)return Qi(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var ea=function(t){return"function"!=typeof t.constructor||Rr(t)?{}:ta(Bi(t))};var na=function(t){return yr(t)&&"[object Map]"==to(t)},ra=Ar.a&&Ar.a.isMap,oa=ra?Pr(ra):na;var ia=function(t){return yr(t)&&"[object Set]"==to(t)},aa=Ar.a&&Ar.a.isSet,ua=aa?Pr(aa):ia,ca={};ca["[object Arguments]"]=ca["[object Array]"]=ca["[object ArrayBuffer]"]=ca["[object DataView]"]=ca["[object Boolean]"]=ca["[object Date]"]=ca["[object Float32Array]"]=ca["[object Float64Array]"]=ca["[object Int8Array]"]=ca["[object Int16Array]"]=ca["[object Int32Array]"]=ca["[object Map]"]=ca["[object Number]"]=ca["[object Object]"]=ca["[object RegExp]"]=ca["[object Set]"]=ca["[object String]"]=ca["[object Symbol]"]=ca["[object Uint8Array]"]=ca["[object Uint8ClampedArray]"]=ca["[object Uint16Array]"]=ca["[object Uint32Array]"]=!0,ca["[object Error]"]=ca["[object Function]"]=ca["[object WeakMap]"]=!1;var sa=function t(e,n,r,o,i,a){var u,c=1&n,s=2&n,l=4&n;if(r&&(u=i?r(e,o,i,a):r(e)),void 0!==u)return u;if(!un(e))return e;var f=ur(e);if(f){if(u=Fi(e),!c)return Ii(e,u)}else{var d=to(e),p="[object Function]"==d||"[object GeneratorFunction]"==d;if(Object(Or.a)(e))return Object(Ci.a)(e,c);if("[object Object]"==d||"[object Arguments]"==d||p&&!i){if(u=s||p?{}:ea(e),!c)return s?Ui(e,Ri(u,e)):Li(e,ki(u,e))}else{if(!ca[d])return i?e:{};u=Ji(e,d,c)}}a||(a=new Vn);var h=a.get(e);if(h)return h;a.set(e,u),ua(e)?e.forEach((function(o){u.add(t(o,n,r,o,e,a))})):oa(e)&&e.forEach((function(o,i){u.set(i,t(o,n,r,i,e,a))}));var y=f?void 0:(l?s?Xi:Xr:s?Ni:Ur)(e);return Ai(y||e,(function(o,i){y&&(o=e[i=o]),Fo(u,i,t(o,n,r,i,e,a))})),u};var la=function(t){return sa(t,5)};var fa=function(t,e,n){(void 0!==n&&!Ie(t[e],n)||void 0===n&&!(e in t))&&Xo(t,e,n)};var da=function(t){return yr(t)&&Hr(t)},pa=Function.prototype,ha=Object.prototype,ya=pa.toString,va=ha.hasOwnProperty,ga=ya.call(Object);var ba=function(t){if(!yr(t)||"[object Object]"!=an(t))return!1;var e=Bi(t);if(null===e)return!0;var n=va.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ya.call(n)==ga};var ma=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var _a=function(t){return Yo(t,Ni(t))};var Oa=function(t,e,n,r,o,i,a){var u=ma(t,n),c=ma(e,n),s=a.get(c);if(s)fa(t,n,s);else{var l=i?i(u,c,n+"",t,e,a):void 0,f=void 0===l;if(f){var d=ur(c),p=!d&&Object(Or.a)(c),h=!d&&!p&&Tr(c);l=c,d||p||h?ur(u)?l=u:da(u)?l=Ii(u):p?(f=!1,l=Object(Ci.a)(c,!0)):h?(f=!1,l=qi(c,!0)):l=[]:ba(c)||_r(c)?(l=u,_r(u)?l=_a(u):un(u)&&!sn(u)||(l=ea(c))):f=!1}f&&(a.set(c,l),o(l,c,r,i,a),a.delete(c)),fa(t,n,l)}};var Ea=function t(e,n,r,o,i){e!==n&&Io(n,(function(a,u){if(i||(i=new Vn),un(a))Oa(e,n,u,r,t,o,i);else{var c=o?o(ma(e,u),a,u+"",e,n,i):void 0;void 0===c&&(c=a),fa(e,u,c)}}),Ni)},wa=ti((function(t,e,n){Ea(t,e,n)})),xa={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}}},Sa=function(t){var e=la(xa);return t&&(e=wa(e,t)),e};n(74),n(190);function ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Pa=function(){function t(){var e,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r={},(n="_events")in(e=this)?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}var e,n,r;return e=t,(n=[{key:"on",value:function(t,e,n){var r=this;return null==t||t.split(",").forEach((function(t){t=t.trim(),r._events[t]||(r._events[t]=[]),r._events[t].push({callback:e,once:!!n})})),this}},{key:"once",value:function(t,e){var n=this;null==t||t.split(",").forEach((function(t){return t=t.trim(),n.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var n=this;null==t||t.split(",").forEach((function(t){t=t.trim(),function(r){for(var o=r.length,i=0;i<o;i++)if(r[i]){var a=r[i],u=a.callback;a.once&&(r.splice(i,1),0===r.length&&delete n._events[t],o--,i--),u.apply(n,[e])}}(n._events[t]||[])}))}},{key:"off",value:function(t,e){var n=this;return t||(this._events={}),t.split(",").forEach((function(t){if(t=t.trim(),e){for(var r=n._events[t]||[],o=r.length,i=0;i<o;i++)r[i].callback===e&&(r.splice(i,1),o--,i--);0===r.length&&delete n._events[t]}else delete n._events[t]})),this}},{key:"getEvents",value:function(){return this._events}}])&&ja(e.prototype,n),r&&ja(e,r),t}();function Aa(t,e){return e*Math.round(t/e)||t}function ka(t,e){return t%e}function Ta(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Da(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Da(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Da(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ma,Na=function(t,e,n){var r=Ta(t,2),o=r[0],i=r[1],a=Ta(e,2),u=a[0],c=a[1],s=Ta(n,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},Ra=function(t,e){var n=!1;switch(e.multipleSelectKey){case"meta":n=t.metaKey;break;case"alt":n=t.altKey;break;case"shift":n=t.shiftKey;break;default:n=!1}return n},Ca=(n(75),n(156),n(122),n(76),n(10),n(11),n(12),n(44),n(28),new Uint8Array(16));function Ia(){if(!Ma&&!(Ma="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ma(Ca)}var La=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Ba=function(t){return"string"==typeof t&&La.test(t)},Ha=[],Ua=0;Ua<256;++Ua)Ha.push((Ua+256).toString(16).substr(1));var Xa=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ha[t[e+0]]+Ha[t[e+1]]+Ha[t[e+2]]+Ha[t[e+3]]+"-"+Ha[t[e+4]]+Ha[t[e+5]]+"-"+Ha[t[e+6]]+Ha[t[e+7]]+"-"+Ha[t[e+8]]+Ha[t[e+9]]+"-"+Ha[t[e+10]]+Ha[t[e+11]]+Ha[t[e+12]]+Ha[t[e+13]]+Ha[t[e+14]]+Ha[t[e+15]]).toLowerCase();if(!Ba(n))throw TypeError("Stringified UUID is invalid");return n};var Ga=function(t,e,n){var r=(t=t||{}).random||(t.rng||Ia)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return Xa(r)},Fa=function(){return Ga()},Ya=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t.nodes.reduce((function(t,n){return t[n.id]=e+Ga(),n.id=t[n.id],t}),{});return t.edges.forEach((function(t){t.id=e+Ga(),t.sourceNodeId=n[t.sourceNodeId],t.targetNodeId=n[t.targetNodeId]})),t},za=(n(100),n(199),function(t,e,n){var r=t.x,o=t.y;return(r-e.x)*(r-n.x)<=0&&(o-e.y)*(o-n.y)<=0});function Va(t){return(Va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ka(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wa(Object(n),!0).forEach((function(e){$a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wa(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function $a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Za=function(t){return t.anchors},qa=function(t,e){for(var n,r=e.nodes,o=r.length-1;o>=0;o--){var i=r[o];if(nu(t,i)){var a=Qa(t,i);if(a){var u={node:i,anchorIndex:a.index,anchor:a.anchor};n&&!Ja(i,n.node,e)||(n=u)}}}return n},Ja=function(t,e,n){return t.zIndex>e.zIndex||n.nodesMap[t.id].index>n.nodesMap[e.id].index},Qa=function(t,e){for(var n,r=Za(e),o=Number.MAX_SAFE_INTEGER,i=0;i<r.length;i++){var a=tu(t.x,t.y,r[i].x,r[i].y);a<o&&(o=a,n={index:i,anchor:Ka(Ka({},r[i]),{},{x:r[i].x,y:r[i].y,id:r[i].id})})}return n},tu=function(t,e,n,r){return Math.hypot(t-n,e-r)},eu=function(t,e){var n=!1,r=ru(e);return t.x>=r.minX-0&&t.x<=r.maxX+0&&t.y>=r.minY-0&&t.y<=r.maxY+0&&(n=!0),n},nu=function(t,e){var n=!1,r=ru(e);return t.x>=r.minX-5&&t.x<=r.maxX+5&&t.y>=r.minY-5&&t.y<=r.maxY+5&&(n=!0),n},ru=function(t){var e=t.x,n=t.y,r=t.width,o=t.height;return{minX:e-r/2,minY:n-o/2,maxX:e+r/2,maxY:n+o/2,x:e,y:n,width:r,height:o,centerX:e,centerY:n}},ou=function(t,e,n){var r,o=function(t){var e=t,n=e.x,r=e.y,o=e.width,i=e.height,a=e.radius;return[{x:n-o/2+a,y:r-i/2+a,r:a},{x:n+o/2-a,y:r-i/2+a,r:a},{x:n-o/2+a,y:r+i/2-a,r:a},{x:n+o/2-a,y:r+i/2-a,r:a}]}(n),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var n=tu(t.x,t.y,e.x,e.y);n<i&&(i=n,r=e)})),iu(t,e,r)},iu=function(t,e,n){var r,o=n,i=o.x,a=o.y,u=o.r;if(e===bi.HORIZONTAL){var c=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)),s=i+Math.sqrt(u*u-(t.y-a)*(t.y-a));r={x:Math.abs(c-t.x)<Math.abs(s-t.x)?c:s,y:t.y}}else if(e===bi.VERTICAL){var l=a-Math.sqrt(u*u-(t.x-i)*(t.x-i)),f=a+Math.sqrt(u*u-(t.x-i)*(t.x-i)),d=Math.abs(l-t.y)<Math.abs(f-t.y)?l:f;r={x:t.x,y:d}}return r},au=function(t,e){var n=e,r=!1,o=n.x-n.width/2+n.radius,i=n.x+n.width/2-n.radius,a=n.y-n.height/2+n.radius,u=n.y+n.height/2-n.radius,c=n.x,s=n.y,l=n.width,f=n.height;return t.y===s+f/2||t.y===s-f/2?r=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(r=t.y>a&&t.y<u),r},uu=function(t,e,n){var r,o=n,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===bi.HORIZONTAL){var s=i-Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c)),l=i+Math.sqrt(u*u-(t.y-a)*(t.y-a)*u*u/(c*c));r={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===bi.VERTICAL){var f=a-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),d=a+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),p=Math.abs(f-t.y)<Math.abs(d-t.y)?f:d;r={x:t.x,y:p}}return r},cu=function(t,e,n){for(var r,o=n.pointsPosition,i=Number.MAX_SAFE_INTEGER,a=[],u=0;u<o.length;u++)a.push({start:o[u],end:o[(u+1)%o.length]});return a.forEach((function(n){var o=n.start,a=n.end,u=o,c=a;o.x>a.x&&(u=a,c=o);var s={x:t.x,y:t.y};if(u.x===c.x&&e===bi.HORIZONTAL&&(s={x:u.x,y:t.y}),u.y===c.y&&e===bi.VERTICAL&&(s={x:t.x,y:u.y}),u.x!==c.x&&u.y!==c.y){var l=(c.y-u.y)/(c.x-u.x),f=(u.x*c.y-c.x*u.y)/(u.x-c.x);e===bi.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===bi.VERTICAL&&(s={x:t.x,y:l*t.x+f})}if(za(s,o,a)){var d=tu(s.x,s.y,t.x,t.y);d<i&&(i=d,r=s)}})),r},su=function(t,e,n,r){var o=t.x,i=t.y;return e.x>t.x?o=t.x+n/2:e.x<t.x&&(o=t.x-n/2),e.y>t.y?i=t.y+r/2:e.y<t.y&&(i=t.y-r/2),{x:o,y:i}},lu=function(t){var e=t.rows,n=t.style,r=t.rowsLength,o=t.className,i=document.createElement("div");i.style.fontSize=n.fontSize,i.style.width=n.width,i.className=o,i.style.lineHeight=n.lineHeight,i.style.padding=n.padding,n.fontFamily&&(i.style.fontFamily=n.fontFamily),r>1?e.forEach((function(t){var e=document.createElement("div");e.textContent=t,i.appendChild(e)})):i.textContent=e,document.body.appendChild(i);var a=i.clientHeight;return document.body.removeChild(i),a},fu=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,o=0;return e&&e.forEach((function(t){var e=Rc(t);o=e>o?e:o})),{width:Math.ceil(o/2)*r+r/4,height:n*(r+2)+r/4}},du=function(t){return"object"!==Va(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},pu={node:!1,edge:!1},hu={node:!0,edge:!0},yu={stroke:"red",strokeDasharray:"10 200",className:"lf-edge-animation"},vu=function(t){try{return la(t)}catch(e){return t}},gu=1e3,bu=999,mu=function(){return++gu};function _u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ou(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_u(Object(n),!0).forEach((function(e){wu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Eu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var xu=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),wu(this,"id",Fa()),wu(this,"type",""),wu(this,"sourceNodeId",""),wu(this,"targetNodeId",""),wu(this,"startPoint",null),wu(this,"endPoint",null),wu(this,"text",{value:"",x:0,y:0,draggable:!1,editable:!0}),wu(this,"properties",{}),wu(this,"points",""),wu(this,"pointsList",[]),wu(this,"isSelected",!1),wu(this,"isHovered",!1),wu(this,"isHitable",!0),wu(this,"draggable",!0),wu(this,"visible",!0),wu(this,"graphModel",void 0),wu(this,"zIndex",0),wu(this,"BaseType",vi.EDGE),wu(this,"modelType",yi.EDGE),wu(this,"state",1),wu(this,"additionStateData",void 0),wu(this,"sourceAnchorId",""),wu(this,"targetAnchorId",""),wu(this,"menu",void 0),wu(this,"customTextPosition",!1),wu(this,"animationData",yu),Object(z.makeObservable)(this,{type:z.observable,sourceNodeId:z.observable,targetNodeId:z.observable,startPoint:z.observable,endPoint:z.observable,text:z.observable,properties:z.observable,points:z.observable,pointsList:z.observable,isSelected:z.observable,isHovered:z.observable,isHitable:z.observable,draggable:z.observable,visible:z.observable,zIndex:z.observable,state:z.observable,sourceNode:z.computed,targetNode:z.computed,textPosition:z.computed,setProperty:z.action,setProperties:z.action,formatText:z.action,resetTextPosition:z.action,moveText:z.action,setText:z.action,updateText:z.action,setAnchors:z.action,setSelected:z.action,setHovered:z.action,setHitable:z.action,setElementState:z.action,updateStartPoint:z.action,moveStartPoint:z.action,updateEndPoint:z.action,moveEndPoint:z.action,setZIndex:z.action,initPoints:z.action,updateAttributes:z.action,getAdjustStart:z.action,getAdjustEnd:z.action,updateAfterAdjustStartAndEnd:z.action}),this.graphModel=n,this.data=e}var e,n,r;return e=t,(n=[{key:"init",value:function(){this.initEdgeData(this.data),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(this.data)}},{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,n=e&&e(t.type);n&&(t.id=n);var r=this.createId();r&&(t.id=r)}ni(this,Hc(t)),this.graphModel.overlapMode===Ei.INCREASE&&(this.zIndex=t.zIndex||mu())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.baseEdge;return la(t)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return la(t)}},{key:"getAnimation",value:function(){var t=this.animationData;return la(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return la(t)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}},{key:"targetNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(t,e){var n,r;return Za(t).forEach((function(t){var o=Uc(t,e);r?o<r&&(r=o,n=t):(r=o,n=t)})),n}},{key:"getEndAnchor",value:function(t){var e,n,r=this;return Za(t).forEach((function(t){var o=Uc(t,r.startPoint);n?o<n&&(n=o,e=t):(n=o,e=t)})),e}},{key:"getProperties",value:function(){return Object(z.toJS)(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,n=t.y,r=t.value,o={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(z.toJS)(this.properties)};return r&&(o.text={x:e,y:n,value:r}),this.graphModel.overlapMode===Ei.INCREASE&&(o.zIndex=this.zIndex),o}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,e){this.properties[t]=vu(e),this.graphModel.eventCenter.emit(gi.EDGE_PROPERTY_UPDATE,{id:this.id,data:wu({},t,e)}),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Ou(Ou({},this.properties),vu(t)),this.graphModel.eventCenter.emit(gi.EDGE_PROPERTY_UPDATE,{id:this.id,data:t}),this.setAttributes()}},{key:"formatText",value:function(t){var e=this.textPosition,n=e.x,r=e.y;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||n,y:t.text.y||r,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:n,y:r,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var t=this.textPosition,e=t.x,n=t.y;this.text.x=e,this.text.y=n}},{key:"moveText",value:function(t,e){if(this.text){var n=this.text,r=n.x,o=n.y,i=n.value,a=n.draggable,u=n.editable;this.text={value:i,draggable:a,x:r+t,y:o+e,editable:u}}}},{key:"setText",value:function(t){t&&ni(this.text,t)}},{key:"updateText",value:function(t){var e={id:this.id,type:this.type,oldValue:this.text.value,newValue:t};this.text=Ou(Ou({},this.text),{},{value:t}),this.graphModel.eventCenter.emit(gi.EDGE_TEXT_UPDATE,e)}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){ni(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,n=t.endPoint;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:n.x,y:n.y})}}])&&Eu(e.prototype,n),r&&Eu(e,r),t}(),Su=xu;function ju(t){return(ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Au(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pu(Object(n),!0).forEach((function(e){Bu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pu(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ku(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Du(){return(Du="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Mu(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Mu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lu(t)););return t}function Nu(t,e){return(Nu=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ru(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Lu(t);if(e){var o=Lu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cu(this,n)}}function Cu(t,e){if(e&&("object"===ju(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Iu(t)}function Iu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lu(t){return(Lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nu(t,e)}(i,t);var e,n,r,o=Ru(i);function i(){var t;ku(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Bu(Iu(t=o.call.apply(o,[this].concat(n))),"modelType",yi.LINE_EDGE),t}return e=i,(n=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return Au(Au({},Du(Lu(i.prototype),"getEdgeStyle",this).call(this)),la(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Tu(e.prototype,n),r&&Tu(e,r),i}(Su);function Uu(t){return(Uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Gu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gu(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Fu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Yu(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fu(Object(n),!0).forEach((function(e){Qu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fu(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function zu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vu(){return(Vu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Wu(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Wu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ju(t)););return t}function Ku(t,e){return(Ku=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ju(t);if(e){var o=Ju(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zu(this,n)}}function Zu(t,e){if(e&&("object"===Uu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qu(t)}function qu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ju(t){return(Ju=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Qu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var tc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ku(t,e)}(i,t);var e,n,r,o=$u(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Qu(qu(n=o.call(this,t,e)),"modelType",yi.POLYLINE_EDGE),Qu(qu(n),"draggingPointList",void 0),Qu(qu(n),"dbClickPosition",void 0),Object(z.makeObservable)(qu(n),{dbClickPosition:z.observable,dragAppend:z.action,dragAppendEnd:z.action}),n}return e=i,(n=[{key:"initEdgeData",value:function(t){this.offset=30,Vu(Ju(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return Yu(Yu({},Vu(Ju(i.prototype),"getEdgeStyle",this).call(this)),la(t))}},{key:"getTextPosition",value:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var n=this.dbClickPosition;return{x:n.x,y:n.y}}var r=Dc(this.points),o=Xu(jc(r),2),i=o[0],a=o[1];return{x:(i.x+a.x)/2,y:(i.y+a.y)/2}}},{key:"getAfterAnchor",value:function(t,e,n){var r,o;return n.forEach((function(n){var i;t===bi.HORIZONTAL?i=Math.abs(e.y-n.y):t===bi.VERTICAL&&(i=Math.abs(e.x-n.x)),(!o||o>i)&&(o=i,r=n)})),console.log(444,JSON.stringify(r)),r}},{key:"getCrossPoint",value:function(t,e,n){var r;return t===bi.HORIZONTAL?r={x:n.x,y:e.y}:t===bi.VERTICAL&&(r={x:e.x,y:n.y}),r}},{key:"removeCrossPoints",value:function(t,e,n){var r=n.map((function(t){return t}));if(1===t){var o=r[t],i=r[e],a=r[t-1];if(Pc(a,o,this.sourceNode)){if(Ac(o,i,this.sourceNode)){var u=kc(o,i,this.sourceNode);u&&(r[t]=u,r.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===a.x&&e.x===o.x||e.y===a.y&&e.y===o.y)&&tu(e.x,e.y,o.x,o.y)<tu(a.x,a.y,o.x,o.y)&&(r[t-1]=e)}))}if(e===n.length-2){var c=r[t],s=r[e],l=r[e+1];if(Pc(s,l,this.targetNode)){if(Ac(c,s,this.targetNode)){var f=kc(c,s,this.targetNode);f&&(r[e]=f,r.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===l.x&&t.x===s.x||t.y===l.y&&t.y===s.y)&&tu(t.x,t.y,s.x,s.y)<tu(l.x,l.y,s.x,s.y)&&(r[e+1]=t)}))}return r}},{key:"getDraggingPoints",value:function(t,e,n,r,o){var i=o.map((function(t){return t})),a=this.getAfterAnchor(t,n,r),u=this.getCrossPoint(t,n,a);return"start"===e?(i.unshift(u),i.unshift(a)):(i.push(u),i.push(a)),i}},{key:"updateCrossPoints",value:function(t){var e=t.map((function(t){return t})),n=t[0],r=t[1],o=t[e.length-2],i=t[e.length-1],a=this.sourceNode,u=this.targetNode,c=a.modelType,s=u.modelType,l=Tc(n,r),f=e[0];switch(c){case yi.RECT_NODE:0!==a.radius&&(au(n,a)||(f=ou(n,l,a)));break;case yi.CIRCLE_NODE:f=iu(n,l,a);break;case yi.ELLIPSE_NODE:f=uu(n,l,a);break;case yi.DIAMOND_NODE:case yi.POLYGON_NODE:f=cu(n,l,a)}e[0]=f;var d=Tc(o,i),p=e[e.length-1];switch(s){case yi.RECT_NODE:0!==u.radius&&(au(i,u)||(p=ou(i,d,u)));break;case yi.CIRCLE_NODE:p=iu(i,d,u);break;case yi.ELLIPSE_NODE:p=uu(i,d,u);break;case yi.DIAMOND_NODE:case yi.POLYGON_NODE:p=cu(i,d,u)}return e[e.length-1]=p,e}},{key:"getData",value:function(){var t=Vu(Ju(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Object.assign({},t,{pointsList:e})}},{key:"initPoints",value:function(){this.pointsList&&this.pointsList.length>0?this.points=this.pointsList.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var t=Sc({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var n=t.start,r=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList,c=u;return a===bi.HORIZONTAL?(u[o]={x:n.x,y:n.y+e.y},u[i]={x:r.x,y:r.y+e.y},c=this.pointsList.map((function(t){return t}))):a===bi.VERTICAL&&(u[o]={x:n.x+e.x,y:n.y},u[i]={x:r.x+e.x,y:r.y},c=this.pointsList.map((function(t){return t}))),this.updatePointsAfterDrag(c),this.draggingPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppend",value:function(t,e){this.isDragging=!0;var n=t.start,r=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList;if(a===bi.HORIZONTAL){u[o]={x:n.x,y:n.y+e.y},u[i]={x:r.x,y:r.y+e.y};var c=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(c=this.removeCrossPoints(o,i,c)),0===o){var s={x:n.x,y:n.y+e.y};if(!eu(s,this.sourceNode)){var l=this.sourceNode.anchors;c=this.getDraggingPoints(a,"start",s,l,c)}}if(i===this.pointsList.length-1){var f={x:r.x,y:r.y+e.y};if(!eu(f,this.targetNode)){var d=this.targetNode.anchors;c=this.getDraggingPoints(a,"end",f,d,c)}}c=xc(c),this.updatePointsAfterDrag(c),this.draggingPointList=c}else if(a===bi.VERTICAL){u[o]={x:n.x+e.x,y:n.y},u[i]={x:r.x+e.x,y:r.y};var p=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(p=this.removeCrossPoints(o,i,p)),0===o){var h={x:n.x+e.x,y:n.y};if(!eu(h,this.sourceNode)){var y=this.sourceNode.anchors;p=this.getDraggingPoints(a,"start",h,y,p)}}if(i===this.pointsList.length-1){var v={x:r.x+e.x,y:r.y};if(!eu(v,this.targetNode)){var g=this.targetNode.anchors;p=this.getDraggingPoints(a,"end",v,g,p)}}p=xc(p),this.updatePointsAfterDrag(p),this.draggingPointList=p}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},u[o]),end:Object.assign({},u[i]),startIndex:o,endIndex:i,direction:a}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var t=Dc(this.points);this.pointsList=t.map((function(t){return t})),this.draggingPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var n=t[t.length-1];this.endPoint=Object.assign({},n)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,n=t.endPoint,r=t.sourceNode,o=t.targetNode,i=Sc({x:e.x,y:e.y},{x:n.x,y:n.y},r,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&zu(e.prototype,n),r&&zu(e,r),i}(Su),ec=function(t){var e=t.start,n=t.end,r=t.offset,o=t.verticalLength,i=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},u=Math.atan((n.y-e.y)/(n.x-e.x)),c=Math.atan(r/o),s=Math.sqrt(o*o+r*r);return"start"===i?n.x>=e.x?(a.leftX=e.x+s*Math.sin(u+c),a.leftY=e.y-s*Math.cos(u+c),a.rightX=e.x-s*Math.sin(u-c),a.rightY=e.y+s*Math.cos(u-c)):(a.leftX=e.x-s*Math.sin(u+c),a.leftY=e.y+s*Math.cos(u+c),a.rightX=e.x+s*Math.sin(u-c),a.rightY=e.y-s*Math.cos(u-c)):"end"===i&&(n.x>=e.x?(a.leftX=n.x+s*Math.sin(u-c),a.leftY=n.y-s*Math.cos(u-c),a.rightX=n.x-s*Math.sin(u+c),a.rightY=n.y+s*Math.cos(u+c)):(a.leftX=n.x-s*Math.sin(u-c),a.leftY=n.y+s*Math.cos(u-c),a.rightX=n.x+s*Math.sin(u+c),a.rightY=n.y-s*Math.cos(u+c))),a};function nc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function rc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nc(Object(n),!0).forEach((function(e){oc(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function oc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ic(t){return function(t){if(Array.isArray(t))return sc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||cc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ac(t){return(ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function uc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||cc(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cc(t,e){if(t){if("string"==typeof t)return sc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sc(t,e):void 0}}function sc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var lc=function(t){var e=[],n={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,n[e]=t})),Object.keys(n).forEach((function(t){e.push(n[t])})),e},fc=function(t,e){return 0===t.width&&0===t.height?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},dc=function(t,e){var n=t.y-e.y,r=t.x-e.x;return 0===n?bi.HORIZONTAL:0===r||t.x>e.x-e.width/2&&t.x<e.x+e.width/2?bi.VERTICAL:bi.HORIZONTAL},pc=function(t,e,n){return n===bi.HORIZONTAL?{x:e.x>t.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},hc=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(n+o)/2,centerY:(r+i)/2,minX:n,minY:r,maxX:o,maxY:i,height:i-r,width:o-n}},yc=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=[],r=[];t.forEach((function(t){n.push(t.x),r.push(t.y)}));var o=Math.min.apply(Math,n),i=Math.max.apply(Math,n),a=Math.min.apply(Math,r),u=Math.max.apply(Math,r),c=i-o,s=u-a;return e&&(c+=e,s+=e),{centerX:(o+i)/2,centerY:(a+u)/2,maxX:i,maxY:u,minX:o,minY:a,x:(o+i)/2,y:(a+u)/2,height:s,width:c}},vc=function(t){var e=t.minX,n=t.minY,r=t.maxX,o=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:o},{x:e,y:o}]},gc=function(t,e){var n=t.x,r=t.y;return n<e.minX||n>e.maxX||r<e.minY||r>e.maxY},bc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},mc=function(t,e,n,r,o){return bc(t,e)+bc(t,n)+function(t,e){var n=0;return e.forEach((function(e){e&&(t.x===e.x&&(n+=-2),t.y===e.y&&(n+=-2))})),n}(t,[e,n,r,o])},_c=function(t,e,n,r){var o=e.x-t.x,i=e.y-t.y,a=r.x-n.x,u=r.y-n.y,c=(-i*(t.x-n.x)+o*(t.y-n.y))/(-a*i+o*u),s=(a*(t.y-n.y)-u*(t.x-n.x))/(-a*i+o*u);return c>=0&&c<=1&&s>=0&&s<=1},Oc=function(t,e,n){if(0===n.width&&0===n.height)return!1;var r=uc(vc(n),4),o=r[0],i=r[1],a=r[2],u=r[3];return _c(t,e,o,i)||_c(t,e,o,u)||_c(t,e,i,a)||_c(t,e,a,u)},Ec=function(t,e,n,r,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=mc(e,n,e);var d={};t.forEach((function(t){d[t.id]=t}));for(var p=function(){var p,h,y,v=void 0,g=1/0;if(c.forEach((function(t){f[t.id]<g&&(g=f[t.id],v=t)})),v===n){var b=[];return function t(e,n,r,o,i){i||(i=0),e.unshift(n[o]),r[o]&&r[o]!==o&&i<=100&&t(e,n,r,r[o],i+1)}(b,d,s,n.id),{v:b}}h=v,(y=(p=c).indexOf(h))>-1&&p.splice(y,1),u.push(v),function(t,e,n,r){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||Oc(t,e,n)||Oc(t,e,r)||o.push(t))})),lc(o)}(t,v,r,o).forEach((function(t){if(-1===u.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var r=f[v.id]+bc(v,t);l[t.id]&&r>=l[t.id]||(s[t.id]=v.id,l[t.id]=r,f[t.id]=l[t.id]+mc(t,n,e,i,a))}}))};c.length;){var h=p();if("object"===ac(h))return h.v}return[e,n]},wc=function(t){return ru(t)},xc=function(t){for(var e=t,n=1;n<e.length-1;){var r=e[n-1],o=e[n],i=e[n+1];r.x===o.x&&o.x===i.x||r.y===o.y&&o.y===i.y?e.splice(n,1):n++}return e},Sc=function(t,e,n,r,o){var i,a,u=wc(n),c=wc(r),s=fc(u,o),l=fc(c,o),f=dc(t,n),d=pc(s,t,f),p=dc(e,r),h=pc(l,e,p);if(i=s,a=l,2*Math.abs(i.centerX-a.centerX)<i.width+a.width&&2*Math.abs(i.centerY-a.centerY)<i.height+a.height){var y=Mc(t,e,d,h);return[t,d].concat(ic(y),[h,e])}var v=yc([d,h]),g=hc(s,v),b=hc(l,v),m=[];m=(m=m.concat(vc(g))).concat(vc(b));var _={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[v,g,b].forEach((function(t){m=m.concat(function(t,e){return function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]}(t,e.x).concat(function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]}(t,e.y))}(t,_).filter((function(t){return gc(t,s)&&gc(t,l)})))})),[{x:d.x,y:h.y},{x:h.x,y:d.y}].forEach((function(t){gc(t,s)&&gc(t,l)&&m.push(t)})),m.unshift(d),m.push(h),m=lc(m);var O=Ec(m,d,h,u,c,t,e);return O.unshift(t),O.push(e),O.length>2&&(O=xc(O)),lc(O)},jc=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var n=t[0],r=t[1],o=tu(n.x,n.y,r.x,r.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=tu(a.x,a.y,u.x,u.y);c>o&&(o=c,n=a,r=u)}e=[n,r]}return e},Pc=function(t,e,n){var r=eu(t,n),o=eu(e,n);return r&&o},Ac=function(t,e,n){var r=eu(t,n),o=eu(e,n);return!(r&&o)&&(r||o)},kc=function(t,e,n){for(var r,o,i=ru(n),a=vc(i),u=0;u<a.length;u++){_c(t,e,a[u],a[(u+1)%a.length])&&(o=[a[u],a[(u+1)%a.length]])}return o&&(r=function(t,e,n,r){var o=(e.y-t.y)*(r.x-n.x)-(t.x-e.x)*(n.y-r.y);if(0===o)return!1;var i=((e.x-t.x)*(r.x-n.x)*(n.y-t.y)+(e.y-t.y)*(r.x-n.x)*t.x-(r.y-n.y)*(e.x-t.x)*n.x)/o,a=-((e.y-t.y)*(r.y-n.y)*(n.x-t.x)+(e.x-t.x)*(r.y-n.y)*t.y-(r.x-n.x)*(e.y-t.y)*n.y)/o;return(i-t.x)*(i-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(i-n.x)*(i-r.x)<=0&&(a-n.y)*(a-r.y)<=0&&{x:i,y:a}}(t,e,o[0],o[1])),r},Tc=function(t,e){var n;return t.x===e.x?n=bi.VERTICAL:t.y===e.y&&(n=bi.HORIZONTAL),n},Dc=function(t){var e=t.split(" "),n=[];return e&&e.forEach((function(t){var e=uc(t.split(","),2),r=e[0],o=e[1];n.push({x:Number(r),y:Number(o)})})),n},Mc=function(t,e,n,r){var o=[];if(Tc(t,n)===Tc(e,r))t.y===n.y?(o.push({x:n.x,y:(n.y+r.y)/2}),o.push({x:r.x,y:(n.y+r.y)/2})):(o.push({x:(n.x+r.x)/2,y:n.y}),o.push({x:(n.x+r.x)/2,y:r.y}));else{var i={x:n.x,y:r.y},a=za(i,t,n),u=za(i,e,r);if(a||u)i={x:r.x,y:n.y};else{var c=Nc(i,t,n),s=Nc(i,e,r);c&&s&&(i={x:r.x,y:n.y})}o.push(i)}return o},Nc=function(t,e,n){return t.x===e.x&&t.x===n.x||t.y===e.y&&t.y===n.y},Rc=function(t){if(!t)return 0;for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:e+=r>=1&&r<=126||r>=65376&&r<=65439?1:2}return e},Cc=function(t){var e=t.start,n=t.end,r=t.sourceNode,o=t.targetNode,i=t.offset,a=ru(r),u=ru(o),c=fc(a,i),s=fc(u,i),l=dc(e,r),f=pc(c,e,l),d=dc(n,o);return{sNext:f,ePre:pc(s,n,d)}},Ic=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Lc(e[0]),Lc(e[1]),Lc(e[2]),Lc(e[3])]},Lc=function(t){var e=uc(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Bc=function(t,e){for(var n,r=t.x,o=t.y,i=Dc(e),a=Number.MAX_SAFE_INTEGER,u=[],c=0;c<i.length;c++)u.push({start:i[c],end:i[(c+1)%i.length]});if(u.forEach((function(t){var e=t.start,i=t.end;if(e.x===i.x){var u={x:e.x,y:o};if(za(u,e,i)){var c=Math.abs(e.x-r);c<a&&(a=c,n=u)}}else if(e.y===i.y){var s={x:r,y:e.y};if(za(s,e,i)){var l=Math.abs(e.y-o);l<a&&(a=l,n=s)}}})),!n){var s=u[0],l=s.start,f=s.end;n={x:l.x+(f.x-l.x)/2,y:l.y+(f.y-l.y)/2}}return n},Hc=function(t){return li(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Uc=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};n(200);var Xc=function(){};function Gc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yc=window.document;function zc(t){var e=t.onDragStart,n=void 0===e?Xc:e,r=t.onDragging,o=void 0===r?Xc:r,i=t.onDragEnd,a=void 0===i?Xc:i,u=t.step,c=void 0===u?1:u,s=t.isStopPropagation,l=void 0===s||s,f=!1,d=!1,p=0,h=0,y=0,v=0;function g(t){if(l&&t.stopPropagation(),d&&(f=!0,y+=t.clientX-p,v+=t.clientY-h,p=t.clientX,h=t.clientY,Math.abs(y)>c||Math.abs(v)>c)){var e=y%c,n=v%c,r=y-e,i=v-n;y=e,v=n,o({deltaX:r,deltaY:i,event:t})}}function b(t){if(l&&t.stopPropagation(),d=!1,Yc.removeEventListener("mousemove",g,!1),Yc.removeEventListener("mouseup",b,!1),f)return f=!1,a({event:t})}return function(t){if(0===t.button)return l&&t.stopPropagation(),d=!0,p=t.clientX,h=t.clientY,Yc.addEventListener("mousemove",g,!1),Yc.addEventListener("mouseup",b,!1),n({event:t})}}var Vc=function(){function t(e){var n=this,r=e.onDragStart,o=void 0===r?Xc:r,i=e.onDragging,a=void 0===i?Xc:i,u=e.onDragEnd,c=void 0===u?Xc:u,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,d=void 0===f?null:f,p=e.step,h=void 0===p?1:p,y=e.isStopPropagation,v=void 0===y||y,g=e.model,b=void 0===g?null:g;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Fc(this,"onDragStart",void 0),Fc(this,"onDragging",void 0),Fc(this,"onDragEnd",void 0),Fc(this,"step",void 0),Fc(this,"isStopPropagation",void 0),Fc(this,"isDragging",!1),Fc(this,"isStartDragging",!1),Fc(this,"startX",0),Fc(this,"startY",0),Fc(this,"sumDeltaX",0),Fc(this,"sumDeltaY",0),Fc(this,"eventType",void 0),Fc(this,"eventCenter",void 0),Fc(this,"model",void 0),Fc(this,"startTime",void 0),Fc(this,"handleMouseDown",(function(t){var e,r;if(0===t.button){n.isStopPropagation&&t.stopPropagation(),n.isStartDragging=!0,n.startX=t.clientX,n.startY=t.clientY,Yc.addEventListener("mousemove",n.handleMouseMove,!1),Yc.addEventListener("mouseup",n.handleMouseUp,!1);var o=null===(e=n.model)||void 0===e?void 0:e.getData();null===(r=n.eventCenter)||void 0===r||r.emit(gi["".concat(n.eventType,"_MOUSEDOWN")],{e:t,data:o}),n.startTime=(new Date).getTime()}})),Fc(this,"handleMouseMove",(function(t){if(n.isStopPropagation&&t.stopPropagation(),n.isStartDragging&&(n.sumDeltaX+=t.clientX-n.startX,n.sumDeltaY+=t.clientY-n.startY,n.startX=t.clientX,n.startY=t.clientY,n.step<=1||Math.abs(n.sumDeltaX)>n.step||Math.abs(n.sumDeltaY)>n.step)){var e,r=n.sumDeltaX%n.step,o=n.sumDeltaY%n.step,i=n.sumDeltaX-r,a=n.sumDeltaY-o;n.sumDeltaX=r,n.sumDeltaY=o;var u,c=null===(e=n.model)||void 0===e?void 0:e.getData();if(!n.isDragging)null===(u=n.eventCenter)||void 0===u||u.emit(gi["".concat(n.eventType,"_DRAGSTART")],{e:t,data:c}),n.onDragStart({event:t});n.isDragging=!0,setTimeout((function(){var e,r;n.onDragging({deltaX:i,deltaY:a,event:t}),null===(e=n.eventCenter)||void 0===e||e.emit(gi["".concat(n.eventType,"_MOUSEMOVE")],{e:t,data:c}),null===(r=n.eventCenter)||void 0===r||r.emit(gi["".concat(n.eventType,"_DRAG")],{e:t,data:c})}))}})),Fc(this,"handleMouseUp",(function(t){n.isStartDragging=!1,n.isStopPropagation&&t.stopPropagation(),Promise.resolve().then((function(){var e,r,o;Yc.removeEventListener("mousemove",n.handleMouseMove,!1),Yc.removeEventListener("mouseup",n.handleMouseUp,!1);var i=null===(e=n.model)||void 0===e?void 0:e.getData();null===(r=n.eventCenter)||void 0===r||r.emit(gi["".concat(n.eventType,"_MOUSEUP")],{e:t,data:i}),n.isDragging&&(n.isDragging=!1,n.onDragEnd({event:t}),null===(o=n.eventCenter)||void 0===o||o.emit(gi["".concat(n.eventType,"_DROP")],{e:t,data:i}))}))})),Fc(this,"cancelDrag",(function(){Yc.removeEventListener("mousemove",n.handleMouseMove,!1),Yc.removeEventListener("mouseup",n.handleMouseUp,!1),n.isDragging=!1})),this.onDragStart=o,this.onDragging=a,this.onDragEnd=c,this.step=h,this.isStopPropagation=v,this.eventType=l,this.eventCenter=d,this.model=b}var e,n,r;return e=t,(n=[{key:"setStep",value:function(t){this.step=t}}])&&Gc(e.prototype,n),r&&Gc(e,r),t}();function Wc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Kc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wc(Object(n),!0).forEach((function(e){es(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wc(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function $c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||qc(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zc(t){return function(t){if(Array.isArray(t))return Jc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||qc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qc(t,e){if(t){if("string"==typeof t)return Jc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jc(t,e):void 0}}function Jc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Qc(t){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ts(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function es(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object(z.configure)({isolateGlobalState:!0});var ns,rs=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),es(this,"rootEl",void 0),es(this,"width",void 0),es(this,"height",void 0),es(this,"theme",void 0),es(this,"eventCenter",void 0),es(this,"modelMap",new Map),es(this,"topElement",void 0),es(this,"animation",void 0),es(this,"idGenerator",void 0),es(this,"nodeMoveRules",[]),es(this,"edgeType",void 0),es(this,"nodes",[]),es(this,"edges",[]),es(this,"overlapMode",Ei.DEFAULT),es(this,"background",void 0),es(this,"transformModel",void 0),es(this,"editConfigModel",void 0),es(this,"gridSize",1),es(this,"partial",!1),es(this,"fakerNode",void 0),Object(z.makeObservable)(this,{width:z.observable,height:z.observable,edgeType:z.observable,nodes:z.observable,edges:z.observable,overlapMode:z.observable,background:z.observable,transformModel:z.observable,editConfigModel:z.observable,gridSize:z.observable,partial:z.observable,fakerNode:z.observable,nodesMap:z.computed,edgesMap:z.computed,modelsMap:z.computed,sortElements:z.computed,textEditElement:z.computed,selectElements:z.computed,setFakerNode:z.action,removeFakerNode:z.action,setModel:z.action,toFront:z.action,setElementZIndex:z.action,deleteNode:z.action,addNode:z.action,cloneNode:z.action,moveNode:z.action,moveNode2Coordinate:z.action,editText:z.action,addEdge:z.action,moveEdge:z.action,deleteEdgeBySourceAndTarget:z.action,deleteEdgeById:z.action,deleteEdgeBySource:z.action,deleteEdgeByTarget:z.action,graphDataToModel:z.action,setElementStateById:z.action,updateText:z.action,selectNodeById:z.action,selectEdgeById:z.action,selectElementById:z.action,clearSelectElements:z.action,moveNodes:z.action,setDefaultEdgeType:z.action,changeNodeType:z.action,changeEdgeType:z.action,getNodeIncomingEdge:z.action,getNodeOutgoingEdge:z.action,getNodeIncomingNode:z.action,getNodeOutgoingNode:z.action,setTheme:z.action,resize:z.action,clearData:z.action,translateCenter:z.action,fitView:z.action});var n,r=e.container,o=e.background,i=void 0===o?{}:o,a=e.grid,u=e.idGenerator,c=e.animation;this.background=i,"object"===Qc(a)&&(this.gridSize=a.size),this.rootEl=r,this.editConfigModel=new Oi(e),this.eventCenter=new Pa,this.transformModel=new Pi(this.eventCenter),this.theme=Sa(e.style),this.edgeType=e.edgeType||"polyline",e.width||(e.width=r.getBoundingClientRect().width),e.height||(e.height=r.getBoundingClientRect().height),this.width=e.width,this.height=e.height,this.animation=(n=c)&&"boolean"!=typeof n?wa(la(pu),n):la(!0===n?hu:pu),this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=u}var e,n,r;return e=t,(n=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,n){return t[e.id]={index:n,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,n){return t[e.id]={index:n,model:e},t}),{})}},{key:"modelsMap",get:function(){return[].concat(Zc(this.nodes),Zc(this.edges)).reduce((function(t,e){return t[e.id]=e,t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)})),t=t.sort((function(t,e){return t.zIndex-e.zIndex}));for(var e=[],n=-1,r=[-200,-200],o=[this.width+200,this.height+200],i=0;i<t.length;i++){var a=t[i];a.visible&&(!this.partial||a.isSelected||this.isElementInArea(a,r,o,!1,!1))&&(9999===a.zIndex&&(n=e.length),e.push(a))}if(-1!==n){var u=e[e.length-1];e[e.length-1]=e[n],e[n]=u}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===pi.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===pi.TEXT_EDIT}));return t||e}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach((function(e){e.isSelected&&t.set(e.id,e)})),this.edges.forEach((function(e){e.isSelected&&t.set(e.id,e)})),t}},{key:"getAreaElement",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=[],i=[];this.nodes.forEach((function(t){return i.push(t)})),this.edges.forEach((function(t){return i.push(t)}));for(var a=0;a<i.length;a++){var u=i[a];this.isElementInArea(u,t,e,n,r)&&o.push(u)}return o}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",value:function(t){var e;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}},{key:"getPointByClient",value:function(t){var e=t.x,n=t.y,r=this.rootEl.getBoundingClientRect(),o={x:e-r.left,y:n-r.top},i=$c(this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(t.BaseType===vi.NODE){for(var i=ru(t=t),a=i.minX,u=i.minY,c=i.maxX,s=i.maxY,l=[{x:a,y:u},{x:c,y:u},{x:c,y:s},{x:a,y:s}],f=o,d=0;d<l.length;d++){var p=l[d],h=p.x,y=p.y,v=this.transformModel.CanvasPointToHtmlPoint([h,y]),g=$c(v,2);if(h=g[0],y=g[1],Na([h,y],e,n)!==o){f=!o;break}}return f}if(t.BaseType===vi.EDGE){var b=t=t,m=b.startPoint,_=b.endPoint,O=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),E=this.transformModel.CanvasPointToHtmlPoint([_.x,_.y]),w=Na(O,e,n),x=Na(E,e,n);return r?w&&x:w||x}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=Ho(t.nodes,(function(t){var n=e.getModel(t.type);if(!n)throw new Error("找不到".concat(t.type,"对应的节点。"));var r=t.x,o=t.y;r&&o&&(t.x=Aa(r,e.gridSize),t.y=Aa(o,e.gridSize),"object"===Qc(t.text)&&(t.text.x-=ka(r,e.gridSize),t.text.y-=ka(o,e.gridSize)));var i=new n(t,e);return i.init(),i})),this.edges=Ho(t.edges,(function(t){var n=e.getModel(t.type);if(!n)throw new Error("找不到".concat(t.type,"对应的边。"));var r=new n(t,e);return r.init(),r}))}},{key:"modelToGraphData",value:function(){var t=[];this.edges.forEach((function(e){var n=e.getData();n&&t.push(n)}));var e=[];return this.nodes.forEach((function(t){var n=t.getData();n&&e.push(n)})),{nodes:e,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,e=[],n=0;n<this.nodes.length;n++){var r=this.nodes[n];if(r.isDragging){t=!0;break}e.push(r.getHistoryData())}if(t)return!1;for(var o=!1,i=[],a=0;a<this.edges.length;a++){var u=this.edges[a];if(u.isDragging){o=!0;break}i.push(u.getHistoryData())}return!o&&{nodes:e,edges:i}}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.modelsMap[t]}},{key:"getNodeEdges",value:function(t){for(var e=[],n=0;n<this.edges.length;n++){var r=this.edges[n],o=this.edges[n].sourceNodeId===t,i=this.edges[n].targetNodeId===t;(o||i)&&e.push(r)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,n={nodes:[],edges:[]};return e.forEach((function(r){if(r.BaseType===vi.NODE&&n.nodes.push(r.getData()),r.BaseType===vi.EDGE){var o=r.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&n.edges.push(o)}})),n}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"changeNodeId",value:function(t,e){return e||(e=Fa()),this.nodesMap[e]?(console.warn("当前流程图已存在节点".concat(e,", 修改失败")),""):this.nodesMap[t]?(this.edges.forEach((function(n){n.sourceNodeId===t&&(n.sourceNodeId=e),n.targetNodeId===t&&(n.targetNodeId=e)})),this.nodesMap[t].model.id=e,e):(console.warn("当前流程图找不到节点".concat(e,", 修改失败")),"")}},{key:"changeEdgeId",value:function(t,e){return e||(e=Fa()),this.edgesMap[e]?(console.warn("当前流程图已存在边: ".concat(e,", 修改失败")),""):this.edgesMap[t]?(this.edges.forEach((function(n){n.id===t&&(n.id=e)})),e):(console.warn("当前流程图找不到边: ".concat(e,", 修改失败")),"")}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"toFront",value:function(t){var e,n,r,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);o&&(this.overlapMode===Ei.DEFAULT&&(null===(r=this.topElement)||void 0===r||r.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===Ei.INCREASE&&this.setElementZIndex(t,"top"))}},{key:"setElementZIndex",value:function(t,e){var n,r,o,i=(null===(n=this.nodesMap[t])||void 0===n?void 0:n.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);i&&("number"==typeof e&&(o=e),"top"===e&&(o=mu()),"bottom"===e&&(o=--bu),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(gi.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=vu(t);e.id&&this.nodesMap[t.id]&&delete e.id;var n=this.getModel(e.type);if(!n)throw new Error("找不到".concat(e.type,"对应的节点,请确认是否已注册此类型节点。"));var r=new n(e,this);r.init(),this.nodes.push(r);var o=r.getData();return this.eventCenter.emit(gi.NODE_ADD,{data:o}),r}},{key:"cloneNode",value:function(t){var e=this.getNodeModelById(t),n=e.getData();n.x+=30,n.y+=30,delete n.id,n.text&&(n.text.x+=30,n.text.y+=30);var r=this.addNode(n);return r.setSelected(!0),e.setSelected(!1),r.getData()}},{key:"moveNode",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,a=i.move(e,n,r);a&&this.moveEdge(t,e,n)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"moveNode2Coordinate",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,a=i.x,u=i.y,c=e-a,s=n-u;this.moveNode(t,c,s,r)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"editText",value:function(t){this.setElementStateById(t,pi.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=vu(t),n=e.type;n||(n=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var r=this.getModel(n);if(!r)throw new Error("找不到".concat(n,"对应的边,请确认是否已注册此类型边。"));var o=new r(Kc(Kc({},e),{},{type:n}),this);o.init();var i=o.getData();return this.edges.push(o),this.eventCenter.emit(gi.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,n){for(var r=0;r<this.edges.length;r++){var o,i=this.edges[r],a=i.textPosition,u=a.x,c=a.y,s=this.edges[r].sourceNodeId===t,l=this.edges[r].targetNodeId===t;if(s&&i.moveStartPoint(e,n),l&&i.moveEndPoint(e,n),s||l)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===yi.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,d=Bc(f,i.points);i.moveText(d.x-f.x,d.y-f.y)}else{var p=i.textPosition,h=p.x,y=p.y;i.moveText(h-u,y-c)}}}},{key:"deleteEdgeBySourceAndTarget",value:function(t,e){for(var n=0;n<this.edges.length;n++)if(this.edges[n].sourceNodeId===t&&this.edges[n].targetNodeId===e){var r=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(gi.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeById",value:function(t){if(this.edgesMap[t]){var e=this.edgesMap[t].index,n=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(gi.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var n=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(gi.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var n=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(gi.EDGE_DELETE,{data:n})}}},{key:"setElementStateById",value:function(t,e,n){this.nodes.forEach((function(r){r.id===t?r.setElementState(e,n):r.setElementState(pi.DEFAULT)})),this.edges.forEach((function(r){r.id===t?r.setElementState(e,n):r.setElementState(pi.DEFAULT)}))}},{key:"updateText",value:function(t,e){this.nodes.forEach((function(n){n.id===t&&n.updateText(e)})),this.edges.forEach((function(n){n.id===t&&n.updateText(e)}))}},{key:"selectNodeById",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||this.clearSelectElements();var r=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n||this.clearSelectElements();var r=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||this.clearSelectElements();var n=this.getElement(t);null==n||n.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===Ei.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveNodes",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.forEach((function(t){return r.moveNode(t,e,n,o)}))}},{key:"addNodeMoveRules",value:function(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}},{key:"setDefaultEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,e){var n=this.getNodeModelById(t);if(n){var r=n.getData();r.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(r,this);i.init(),this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var n=su(i,e.startPoint,i.width,i.height);e.updateStartPoint(n)}if(e.targetNodeId===t){var r=su(i,e.endPoint,i.width,i.height);e.updateEndPoint(r)}}))}else console.warn("找不到id为".concat(t,"的节点"))}},{key:"changeEdgeType",value:function(t,e){var n=this.getEdgeModelById(t);if(n){if(n.type!==e){var r=n.getData();r.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete r.pointsList;var i=new o(r,this);i.init(),this.edges.splice(this.edgesMap[t].index,1,i)}}else console.warn("找不到id为".concat(t,"的边"))}},{key:"getNodeIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(n){n.targetNodeId===t&&e.push(n)})),e}},{key:"getNodeOutgoingEdge",value:function(t){var e=[];return this.edges.forEach((function(n){n.sourceNodeId===t&&e.push(n)})),e}},{key:"getNodeIncomingNode",value:function(t){var e=this,n=[];return this.edges.forEach((function(r){r.targetNodeId===t&&n.push(e.nodesMap[r.sourceNodeId].model)})),n}},{key:"getNodeOutgoingNode",value:function(t){var e=this,n=[];return this.edges.forEach((function(r){r.sourceNodeId===t&&n.push(e.nodesMap[r.targetNodeId].model)})),n}},{key:"setTheme",value:function(t){this.theme=Sa(Kc(Kc({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=null!=t?t:this.width,this.height=null!=e?e:this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,e=[],n=[];t.forEach((function(t){var r=t.x,o=t.y,i=t.width,a=t.height,u=t.getNodeStyle().strokeWidth,c=void 0===u?0:u;e=e.concat([r+i/2+c,r-i/2-c]),n=n.concat([o+a/2+c,o-a/2-c])}));var r=Math.min.apply(Math,Zc(e)),o=Math.max.apply(Math,Zc(e)),i=Math.min.apply(Math,Zc(n)),a=o-r||0,u=Math.max.apply(Math,Zc(n))-i||0;return{virtualRectWidth:a,virtualRectHeight:u,virtualRectCenterPositionX:r+a/2,virtualRectCenterPositionY:i+u/2}}},{key:"translateCenter",value:function(){var t=this.nodes,e=this.width,n=this.height,r=this.rootEl,o=this.transformModel;if(t.length){var i=e||r.clientWidth,a=n||r.clientHeight,u=this.getVirtualRectSize(),c=u.virtualRectCenterPositionX,s=u.virtualRectCenterPositionY;o.focusOn(c,s,i,a)}}},{key:"fitView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.nodes,n=this.width,r=this.height,o=this.rootEl,i=this.transformModel;if(e.length){var a=n||o.clientWidth,u=r||o.clientHeight,c=this.getVirtualRectSize(),s=c.virtualRectWidth,l=c.virtualRectHeight,f=c.virtualRectCenterPositionX,d=c.virtualRectCenterPositionY,p=(s+t)/a,h=(l+t)/u,y=0;y=1/Math.max(p,h);var v=[a/2,u/2];i.zoom(y,v),i.focusOn(f,d,a,u)}}}])&&ts(e.prototype,n),r&&ts(e,r),t}(),os=rs;function is(t){return(is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function as(){return(as=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function us(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cs(t,e){return(cs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ss(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ds(t);if(e){var o=ds(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ls(this,n)}}function ls(t,e){if(e&&("object"===is(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fs(t)}function fs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ds(t){return(ds=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ps(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hs,ys=Ne(ns=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cs(t,e)}(i,t);var e,n,r,o=ss(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),ps(fs(e=o.call(this)),"stepDrag",void 0),ps(fs(e),"stepScrollX",0),ps(fs(e),"stepScrollY",0),ps(fs(e),"ref",void 0),ps(fs(e),"setRef",(function(t){e.ref=t})),ps(fs(e),"onDragging",(function(t){var n=t.deltaX,r=t.deltaY;e.setState({isDragging:!0});var o=e.props.graphModel,i=o.transformModel;o.editConfigModel.stopMoveGraph||i.translate(n,r)})),ps(fs(e),"onDragEnd",(function(){e.setState({isDragging:!1})})),ps(fs(e),"zoomHandler",(function(t){var n=e.props,r=n.graphModel,o=r.editConfigModel,i=r.transformModel,a=r.gridSize,u=n.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){var l=u.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,d=l.y;i.zoom(t.deltaY<0,[f,d])}}else{if(e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=a){var p=e.stepScrollX%a,h=e.stepScrollX-p;i.translate(-h*i.SCALE_X,0),e.stepScrollX=p}if(Math.abs(e.stepScrollY)>=a){var y=e.stepScrollY%a,v=e.stepScrollY-y;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=y}}})),ps(fs(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var n=e.props.graphModel;n.selectElements.size>0&&n.clearSelectElements(),n.eventCenter.emit(gi.BLANK_CLICK,{e:t})}})),ps(fs(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var n=e.props.graphModel,r=n.getPointByClient({x:t.clientX,y:t.clientY});n.eventCenter.emit(gi.BLANK_CONTEXTMENU,{e:t,position:r})}})),ps(fs(e),"mouseDownHandler",(function(t){var n=e.props.graphModel,r=n.eventCenter,o=n.editConfigModel,i=n.transformModel.SCALE_X,a=n.gridSize,u=t.target,c=!o.adjustEdge&&!o.adjustNodePosition;("canvas-overlay"===u.getAttribute("name")||c)&&(o.stopMoveGraph?r.emit(gi.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(a*i),e.stepDrag.handleMouseDown(t)),e.clickHandler(t))}));var n=t.graphModel,r=n.gridSize,a=n.eventCenter;return e.stepDrag=new Vc({onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:r,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:null}),e.state={isDragging:!1},e}return e=i,(n=[{key:"componentDidMount",value:function(){var t=this.props.graphModel.editConfigModel,e=t.stopScrollGraph,n=t.stopZoomGraph;e&&n||this.rootEl.addEventListener("mousewheel",this.zoomHandler,{passive:!0}),this.rootEl.addEventListener("mousedown",this.mouseDownHandler),this.rootEl.addEventListener("contextmenu",this.handleContextMenu)}},{key:"componentWillUnmount",value:function(){var t=this.props.graphModel.editConfigModel,e=t.stopScrollGraph,n=t.stopZoomGraph;e&&n||this.rootEl.removeEventListener("mousewheel",this.zoomHandler),this.rootEl.removeEventListener("mousedown",this.mouseDownHandler),this.rootEl.removeEventListener("contextmenu",this.handleContextMenu)}},{key:"rootEl",get:function(){return this.ref}},{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props,n=e.children,r=e.dnd,o=this.state.isDragging;return v("svg",as({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",ref:this.setRef,className:o?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},r.eventMap()),v("g",{transform:t},n))}}])&&us(e.prototype,n),r&&us(e,r),i}(_))||ns;function vs(t){return(vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bs(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ms(t,e){return(ms=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ws(t);if(e){var o=ws(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Os(this,n)}}function Os(t,e){if(e&&("object"===vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Es(t)}function Es(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ws(t){return(ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function xs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ss=Ne(hs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ms(t,e)}(i,t);var e,n,r,o=_s(i);function i(){var t;gs(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return xs(Es(t=o.call.apply(o,[this].concat(n))),"setToolOverlayRef",(function(e){var n=t.props.tool.getInstance();n.components.forEach((function(t){return t(n,e)})),n.components=[]})),t}return e=i,(n=[{key:"getTools",value:function(){var t=this.props,e=t.tool,n=t.graphModel,r=e.getTools().map((function(t){return v(t,{graphModel:n,logicFlow:e.instance})}));return e.components=r,r}},{key:"render",value:function(){return v("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&bs(e.prototype,n),r&&bs(e,r),i}(_))||hs;function js(t){return(js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ps(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function As(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ks(t,e){return(ks=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ts(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ms(t);if(e){var o=Ms(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ds(this,n)}}function Ds(t,e){if(e&&("object"===js(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ms(t){return(Ms=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ns,Rs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ks(t,e)}(i,t);var e,n,r,o=Ts(i);function i(){return Ps(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(){return v("div",{className:"lf-background"},v("div",{style:this.props.background,className:"lf-background-area"}))}}])&&As(e.prototype,n),r&&As(e,r),i}(_);function Cs(t){return(Cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Is(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ls(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bs(t,e){return(Bs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Gs(t);if(e){var o=Gs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Us(this,n)}}function Us(t,e){if(e&&("object"===Cs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Xs(t)}function Xs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gs(t){return(Gs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ys=Ne(Ns=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bs(t,e)}(i,t);var e,n,r,o=Hs(i);function i(){var t;Is(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Fs(Xs(t=o.call.apply(o,[this].concat(n))),"id",Fa()),t}return e=i,(n=[{key:"renderDot",value:function(){var t=this.props,e=t.config,n=e.color,r=e.thickness,o=void 0===r?2:r,i=t.size,a=t.visible,u=Math.min(Math.max(2,o),i/2),c=1;return a||(c=0),v("rect",{width:u,height:u,rx:u/2,ry:u/2,fill:n,opacity:c})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,n=e.color,r=e.thickness,o=void 0===r?1:r,i=t.size,a=t.visible,u=Math.min(Math.max(1,o),i/2),c=1;return a||(c=0),v("path",{d:"M ".concat(i," 0 H0 M0 0 V0 ").concat(i),stroke:n,strokeWidth:u,opacity:c})}},{key:"render",value:function(){var t=this.props,e=t.type,n=t.size,r=t.graphModel.transformModel,o=[r.SCALE_X,r.SKEW_Y,r.SKEW_X,r.SCALE_Y,r.TRANSLATE_X,r.TRANSLATE_Y].join(","),i="matrix(".concat(o,")");return v("div",{className:"lf-grid"},v("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},v("defs",null,v("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:n,height:n},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),v("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Ls(e.prototype,n),r&&Ls(e,r),i}(_))||Ns;Ys.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};n(49);function zs(t){return(zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ws(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ws(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ws(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ks,$s=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var n=Vs(t,2),r=n[0],o=n[1];"object"!==zs(o)&&(e[r]=o)})),v("line",e)};function Zs(t){return(Zs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Js(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qs(Object(n),!0).forEach((function(e){Qs(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qs(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Qs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function el(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function nl(t,e){return(nl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function rl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=il(t);if(e){var o=il(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ol(this,n)}}function ol(t,e){if(e&&("object"===Zs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function il(t){return(il=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var al,ul=Ne(Ks=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&nl(t,e)}(i,t);var e,n,r,o=rl(i);function i(){return tl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,n=t.isShowHorizontal,r=t.isShowVertical,o=t.getStyle(),i=e.x,a=void 0===i?0:i,u=e.y,c=void 0===u?0:u,s=Js(Js({x1:-1e5,y1:c,x2:1e5,y2:c},o),{},{stroke:n?o.stroke:"none"}),l=Js(Js({x1:a,y1:-1e5,x2:a,y2:1e5},o),{},{stroke:r?o.stroke:"none"});return v("g",{className:"lf-snapline"},v($s,s),v($s,l))}}])&&el(e.prototype,n),r&&el(e,r),i}(_))||Ks;function cl(t){return(cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function sl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ll(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ll(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ll(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function fl(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=t.className,a=t.radius,u=e-r/2,c=n-o/2,s={};return Object.entries(t).forEach((function(t){var e=sl(t,2),n=e[0],r=e[1];"object"!==cl(r)&&(s[n]=r)})),s.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",a&&(s.rx=a,s.ry=a),s.x=u,s.y=c,v("rect",s)}function dl(t){return(dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function pl(){return(pl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function yl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hl(Object(n),!0).forEach((function(e){vl(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ml(t,e){return(ml=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=El(t);if(e){var o=El(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ol(this,n)}}function Ol(t,e){if(e&&("object"===dl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function El(t){return(El=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}fl.defaultProps={className:"",radius:""};var wl,xl=Ne(al=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ml(t,e)}(i,t);var e,n,r,o=_l(i);function i(){return gl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getNodesOutline",value:function(){var t=this.props.graphModel,e=t.nodes,n=t.editConfigModel,r=n.hoverOutline,o=n.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.isHovered||t.isSelected){var e=t.isHovered,n=t.isSelected,a=t.x,u=t.y,c=t.width,s=t.height;if(o&&n||r&&e){var l=t.getOutlineStyle(),f={};if(Object.keys(l).forEach((function(t){"hover"!==t&&(f[t]=l[t])})),e){var d=l.hover;f=yl(yl({},f),d)}i.push(v(fl,pl({className:"lf-outline-node",x:a,y:u,width:c+10,height:s+10},f)))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,n=t.editConfigModel,r=n.edgeSelectedOutline,o=n.hoverOutline,i=[],a=0;a<e.length;a++){var u=e[a];(r&&u.isSelected||o&&u.isHovered)&&(u.modelType===yi.LINE_EDGE?i.push(this.getLineOutline(u)):u.modelType===yi.POLYLINE_EDGE?i.push(this.getPolylineOutline(u)):u.modelType===yi.BEZIER_EDGE&&i.push(this.getBezierOutline(u)))}return i}},{key:"getLineOutline",value:function(t){var e=t.startPoint,n=t.endPoint;return v(fl,pl({className:"lf-outline-edge",x:(e.x+n.x)/2,y:(e.y+n.y)/2,width:Math.abs(e.x-n.x)+10,height:Math.abs(e.y-n.y)+10},t.getOutlineStyle()))}},{key:"getPolylineOutline",value:function(t){var e=t.points,n=Dc(e),r=yc(n,8);return v(fl,pl({className:"lf-outline",x:r.x,y:r.y,width:r.width,height:r.height},t.getOutlineStyle()))}},{key:"getBezierOutline",value:function(t){var e=t.path,n=Ic(e),r=yc(n,8);return v(fl,pl({className:"lf-outline",x:r.x,y:r.y,width:r.width,height:r.height},t.getOutlineStyle()))}},{key:"render",value:function(){return v("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&bl(e.prototype,n),r&&bl(e,r),i}(_))||al;function Sl(t){return(Sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pl(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Al(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.r,a=void 0===i?4:i,u=t.className,c={cx:n,cy:o,r:a,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=jl(t,2),n=e[0],r=e[1];"object"!==Sl(r)&&(c[n]=r)})),c.className=u?"lf-basic-shape ".concat(u):"lf-basic-shape",v("circle",c)}function kl(t){return(kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Dl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dl(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ml(){return(Ml=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Nl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cl(t,e,n){return e&&Rl(t.prototype,e),n&&Rl(t,n),t}function Il(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ll(t,e)}function Ll(t,e){return(Ll=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Bl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xl(t);if(e){var o=Xl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Hl(this,n)}}function Hl(t,e){if(e&&("object"===kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ul(t)}function Ul(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xl(t){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fl,Yl=function(t){Il(n,t);var e=Bl(n);function n(){var t;return Nl(this,n),Gl(Ul(t=e.call(this)),"dragHandler",void 0),Gl(Ul(t),"onDragging",(function(e){var n=e.event,r=t.props,o=r.graphModel,i=r.bezierModel,a=r.type,u=o.getPointByClient({x:n.clientX,y:n.clientY}).canvasOverlayPosition,c=u.x,s=u.y;i.updateAdjustAnchor({x:c,y:s},a)})),Gl(Ul(t),"onDragEnd",(function(){var e=t.props,n=e.bezierModel,r=e.graphModel.eventCenter;n.isDragging=!1,r.emit(gi.EDGE_ADJUST,{data:n.getData()})})),t.dragHandler=new Vc({onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return Cl(n,[{key:"render",value:function(){var t=this,e=this.props.position;return v(Al,Ml({className:"lf-bezier-adjust-anchor",x:e.x,y:e.y},this.props.bezierModel.getEdgeStyle().adjustAnchor,{onMouseDown:function(e){t.dragHandler.handleMouseDown(e)}}))}}]),n}(_),zl=Ne(wl=function(t){Il(n,t);var e=Bl(n);function n(){return Nl(this,n),e.apply(this,arguments)}return Cl(n,[{key:"getBezierAdjust",value:function(t,e){var n=t.path,r=t.id,o=Tl(Ic(n),4),i=o[0],a=o[1],u=o[2],c=o[3],s=t.getEdgeStyle().adjustLine,l=[];return l.push(v($s,Ml({x1:i.x,y1:i.y,x2:a.x,y2:a.y},s))),l.push(v(Yl,{position:a,bezierModel:t,graphModel:e,key:"".concat(r,"_ePre"),type:"sNext"})),l.push(v($s,Ml({x1:c.x,y1:c.y,x2:u.x,y2:u.y},s))),l.push(v(Yl,{position:u,bezierModel:t,graphModel:e,key:"".concat(r,"_sNext"),type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,n=[],r=0;r<e.length;r++){var o=e[r];o.isSelected&&o.modelType===yi.BEZIER_EDGE&&o.draggable&&n.push(this.getBezierAdjust(o,t))}return n}},{key:"render",value:function(){return v("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(_))||wl;function Vl(t){return(Vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $l(t,e){return($l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Jl(t);if(e){var o=Jl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ql(this,n)}}function ql(t,e){if(e&&("object"===Vl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Jl(t){return(Jl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ql,tf=Ne(Fl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$l(t,e)}(i,t);var e,n,r,o=Zl(i);function i(){return Wl(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"render",value:function(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},v("g",{transform:this.props.graphModel.transformModel.getTransformStyle().transform},this.props.children))}}])&&Kl(e.prototype,n),r&&Kl(e,r),i}(_))||Fl;function ef(t){return(ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nf(){return(nf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function rf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function of(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function af(t,e){return(af=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function uf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=sf(t);if(e){var o=sf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return cf(this,n)}}function cf(t,e){if(e&&("object"===ef(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sf(t){return(sf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var lf=Ne(Ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&af(t,e)}(i,t);var e,n,r,o=uf(i);function i(){return rf(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getComponent",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay",r=this.props.getView,o=r(t.type);return v(o,{key:t.id,model:t,graphModel:e,overlay:n})}},{key:"render",value:function(){var t=this,e=this.props,n=e.graphModel,r=e.tool,o=e.options,i=e.dnd,a=e.snaplineModel,u={};o.width&&(u.width="".concat(n.width,"px")),o.height&&(u.height="".concat(n.height,"px"));var c=n.fakerNode,s=n.editConfigModel.adjustEdge;return v("div",{className:"lf-graph",style:u},v(ys,{graphModel:n,dnd:i},v("g",{className:"lf-base"},Ho(n.sortElements,(function(e){return t.getComponent(e,n)}))),c?this.getComponent(c,n):""),v(tf,{graphModel:n},v(xl,{graphModel:n}),s?v(zl,{graphModel:n}):"",o.isSilentMode||!1===o.snapline?"":v(ul,{snaplineModel:a})),v(Ss,{graphModel:n,tool:r}),o.background&&v(Rs,{background:o.background}),o.grid&&v(Ys,nf({},o.grid,{graphModel:n})))}}])&&of(e.prototype,n),r&&of(e,r),i}(_))||Ql;function ff(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function df(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ff(Object(n),!0).forEach((function(e){hf(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ff(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function pf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yf=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),hf(this,"nodeConfig",void 0),hf(this,"lf",void 0),hf(this,"fakerNode",void 0),hf(this,"stopDrag",(function(){n.nodeConfig=null,window.document.removeEventListener("mouseup",n.stopDrag)})),hf(this,"dragEnter",(function(t){n.nodeConfig&&!n.fakerNode&&(n.fakerNode=n.lf.createFakerNode(df(df({},n.nodeConfig),n.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),hf(this,"onDragOver",(function(t){if(t.preventDefault(),n.fakerNode){var e=n.clientToLocalPoint({x:t.clientX,y:t.clientY}),r=e.x,o=e.y;n.fakerNode.moveTo(r,o);var i=n.fakerNode.getData();n.lf.setNodeSnapLine(i),n.lf.graphModel.eventCenter.emit(gi.NODE_DND_DRAG,{data:i})}return!1})),hf(this,"onDragLeave",(function(){n.fakerNode&&(n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakerNode(),n.fakerNode=null)})),hf(this,"onDrop",(function(t){if(n.lf.graphModel&&t&&n.nodeConfig){var e=n.lf.addNode(df(df({},n.nodeConfig),n.clientToLocalPoint({x:t.clientX,y:t.clientY})));t.preventDefault(),t.stopPropagation(),n.nodeConfig=null,n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakerNode(),n.fakerNode=null;var r=e.getData();n.lf.graphModel.eventCenter.emit(gi.NODE_DND_ADD,{data:r})}}));var r=e.lf;this.lf=r}var e,n,r;return e=t,(n=[{key:"clientToLocalPoint",value:function(t){var e=t.x,n=t.y,r=jo(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:n}).canvasOverlayPosition,i=o.x,a=o.y;return{x:Aa(i,r),y:Aa(a,r)}}},{key:"startDrag",value:function(t){this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&pf(e.prototype,n),r&&pf(e,r),t}();function vf(t){var e=t.container,n=t.grid,r=t.width,o=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if("string"==typeof r||"string"==typeof o)throw new Error("width或height不支持传入字符串,请传数字");return n&&(t.grid=ni({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),ni({},gf,t)}var gf={background:!1,grid:!1,textEdit:!0,isPropertiesChangeHistory:!0,disabledTools:[]};function bf(t){return(bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Of(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ef(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Of(Object(n),!0).forEach((function(e){Df(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Of(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function wf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xf(){return(xf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Sf(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Sf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Tf(t)););return t}function jf(t,e){return(jf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Tf(t);if(e){var o=Tf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Af(this,n)}}function Af(t,e){if(e&&("object"===bf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return kf(t)}function kf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tf(t){return(Tf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Df(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Mf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jf(t,e)}(i,t);var e,n,r,o=Pf(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Df(kf(n=o.call(this,t,e)),"modelType",yi.BEZIER_EDGE),Df(kf(n),"path",""),Object(z.makeObservable)(kf(n),{path:z.observable,updateAdjustAnchor:z.action}),n}return e=i,(n=[{key:"initEdgeData",value:function(t){this.offset=100,xf(Tf(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return Ef(Ef({},xf(Tf(i.prototype),"getEdgeStyle",this).call(this)),la(t))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(n){var r=n.x,o=n.y;t+=r,e+=o})),{x:t/this.pointsList.length,y:e/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},{key:"getData",value:function(){var t=xf(Tf(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Ef(Ef({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Cc({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=mf(t,4),n=e[0],r=e[1],o=e[2],i=e[3];return"M ".concat(n.x," ").concat(n.y,"\n C ").concat(r.x," ").concat(r.y,",\n ").concat(o.x," ").concat(o.y,",\n ").concat(i.x," ").concat(i.y)}},{key:"initPoints",value:function(){this.pointsList&&this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var t=this.getControls(),e=t.sNext,n=t.ePre;this.updatePath(e,n)}},{key:"updatePath",value:function(t,e){var n={x:this.startPoint.x,y:this.startPoint.y},r={x:this.endPoint.x,y:this.endPoint.y};if(!t||!e){var o=this.getControls();t=o.sNext,e=o.ePre}this.pointsList=[n,t,e,r],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e;var n=mf(this.pointsList,3),r=n[1],o=n[2];r.x+=t,r.y+=e,this.updatePath(r,o)}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e;var n=mf(this.pointsList,3),r=n[1],o=n[2];o.x+=t,o.y+=e,this.updatePath(r,o)}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,n=t.endPoint,r=t.sourceNode,o=t.targetNode,i=Cc({start:e,end:n,sourceNode:r,targetNode:o,offset:this.offset}),a=i.sNext,u=i.ePre;this.pointsList=[e,a,u,n],this.initPoints()}}])&&wf(e.prototype,n),r&&wf(e,r),i}(Su);var Nf=function(t){return null==t};function Rf(t){return(Rf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return If(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return If(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function If(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Lf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Bf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lf(Object(n),!0).forEach((function(e){Uf(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Hf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Uf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xf=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Uf(this,"id",Fa()),Uf(this,"type",""),Uf(this,"x",0),Uf(this,"y",0),Uf(this,"text",{value:"",x:0,y:0,draggable:!1,editable:!0}),Uf(this,"properties",{}),Uf(this,"_width",100),Uf(this,"_height",80),Uf(this,"anchorsOffset",[]),Uf(this,"isSelected",!1),Uf(this,"isHovered",!1),Uf(this,"isDragging",!1),Uf(this,"isHitable",!0),Uf(this,"draggable",!0),Uf(this,"visible",!0),Uf(this,"graphModel",void 0),Uf(this,"zIndex",1),Uf(this,"state",1),Uf(this,"autoToFront",!0),Uf(this,"BaseType",vi.NODE),Uf(this,"modelType",yi.NODE),Uf(this,"additionStateData",void 0),Uf(this,"targetRules",[]),Uf(this,"sourceRules",[]),Uf(this,"moveRules",[]),Uf(this,"hasSetTargetRules",!1),Uf(this,"hasSetSourceRules",!1),Object(z.makeObservable)(this,{type:z.observable,x:z.observable,y:z.observable,text:z.observable,properties:z.observable,_width:z.observable,_height:z.observable,anchorsOffset:z.observable,isSelected:z.observable,isHovered:z.observable,isDragging:z.observable,isHitable:z.observable,draggable:z.observable,visible:z.observable,zIndex:z.observable,state:z.observable,autoToFront:z.observable,incoming:z.computed,outgoing:z.computed,addNodeMoveRules:z.action,move:z.action,moveTo:z.action,setIsDragging:z.action,moveText:z.action,updateText:z.action,setSelected:z.action,setHovered:z.action,setHitable:z.action,setElementState:z.action,setProperty:z.action,setProperties:z.action,setZIndex:z.action,updateAttributes:z.action}),this.graphModel=n,this.data=e}var e,n,r;return e=t,(n=[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}},{key:"init",value:function(){this.initNodeData(this.data),this.setAttributes()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,n=e&&e(t.type);n&&(t.id=n);var r=this.createId();r&&(t.id=r)}this.formatText(t),ni(this,function(t){return li(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===Ei.INCREASE&&(this.zIndex=t.zIndex||mu())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&"string"==typeof t.text?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&void 0===t.text.editable&&(t.text.editable=!0)}},{key:"getData",value:function(){var t=this.text,e=t.x,n=t.y,r=t.value,o=this.properties;Object(z.isObservable)(o)&&(o=Object(z.toJS)(o));var i={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return this.graphModel.overlapMode===Ei.INCREASE&&(i.zIndex=this.zIndex),r&&(i.text={x:e,y:n,value:r}),i}},{key:"setIsDragging",value:function(t){this.isDragging=t}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(z.toJS)(this.properties)}},{key:"getNodeStyle",value:function(){return Bf({},this.graphModel.theme.baseNode)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return la(t)}},{key:"getAnchorStyle",value:function(t){var e=this.graphModel.theme.anchor;return la(e)}},{key:"getAnchorLineStyle",value:function(){var t=this.graphModel.theme.anchorLine;return la(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return la(t)}},{key:"isAllowConnectedAsSource",value:function(t,e,n){var r=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var o,i=!0,a=0;a<r.length;a++){var u=r[a];if(!u.validate.call(this,this,t,e,n)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,n){var r=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var o,i=!0,a=0;a<r.length;a++){var u=r[a];if(!u.validate.call(this,t,this,e,n)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"isAllowMoveNode",value:function(t,e){var n,r=!0,o=!0,i=Cf(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(i.s();!(n=i.n()).done;){var a=(0,n.value)(this,t,e);if(!a)return!1;if("object"===Rf(a)){var u=a;if(!1===u.x&&!1===u.y)return!1;r=r&&u.x,o=o&&u.y}}}catch(t){i.e(t)}finally{i.f()}return{x:r,y:o}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.id,n=this.x,r=this.y;return t&&t.length>0?t.map((function(t,o){return t.length?(t=t,{id:"".concat(e,"_").concat(o),x:n+t[0],y:r+t[1]}):Bf(Bf({},t=t),{},{x:n+t.x,y:r+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){return this.getAnchorsByOffset()}},{key:"getAnchorInfo",value:function(t){if(!Nf(t))for(var e=0;e<this.anchors.length;e++){var n=this.anchors[e];if(n.id===t)return n}}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,o=!1;if(n)r=!0,o=!0;else{var i=this.isAllowMoveNode(t,e);"boolean"==typeof i?(r=i,o=i):(r=i.x,o=i.y)}if(r){var a=this.x+t;this.x=a,this.text&&this.moveText(t,0)}if(o){var u=this.y+e;this.y=u,this.text&&this.moveText(0,e)}return r||o}},{key:"moveTo",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t-this.x,o=e-this.y;return this.move(r,o,n)}},{key:"moveText",value:function(t,e){var n=this.text,r=n.x,o=n.y,i=n.value,a=n.draggable,u=n.editable;this.text={value:i,editable:u,draggable:a,x:r+t,y:o+e}}},{key:"updateText",value:function(t){var e=this.id;this.text=Bf(Bf({},this.text),{},{value:t}),this.graphModel.eventCenter.emit(gi.NODE_TEXT_UPDATE,{id:e,text:this.text})}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"setProperty",value:function(t,e){this.properties=Bf(Bf({},this.properties),{},Uf({},t,vu(e))),this.setAttributes(),this.graphModel.eventCenter.emit(gi.NODE_PROPERTY_UPDATE,{id:this.id,data:Uf({},t,e)})}},{key:"setProperties",value:function(t){this.properties=Bf(Bf({},this.properties),vu(t)),this.setAttributes(),this.graphModel.eventCenter.emit(gi.NODE_PROPERTY_UPDATE,{id:this.id,data:t})}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){ni(this,la(t))}}])&&Hf(e.prototype,n),r&&Hf(e,r),t}();function Gf(t){return(Gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ff(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Yf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ff(Object(n),!0).forEach((function(e){Qf(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ff(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function zf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vf(){return(Vf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Wf(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Wf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jf(t)););return t}function Kf(t,e){return(Kf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Jf(t);if(e){var o=Jf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Zf(this,n)}}function Zf(t,e){if(e&&("object"===Gf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qf(t)}function qf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jf(t){return(Jf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Qf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var td=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kf(t,e)}(i,t);var e,n,r,o=$f(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Qf(qf(n=o.call(this,t,e)),"modelType",yi.CIRCLE_NODE),Qf(qf(n),"r",50),Object(z.makeObservable)(qf(n),{r:z.observable,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var t=Vf(Jf(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return Yf(Yf({},t),la(e))}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.r;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+n,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-n,y:e,id:"".concat(this.id,"_3")}]}}])&&zf(e.prototype,n),r&&zf(e,r),i}(Xf);n(124);function ed(t){return(ed="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return rd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rd(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function od(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function id(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?od(Object(n),!0).forEach((function(e){hd(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):od(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ad(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ud(){return(ud="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=cd(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function cd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pd(t)););return t}function sd(t,e){return(sd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ld(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pd(t);if(e){var o=pd(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fd(this,n)}}function fd(t,e){if(e&&("object"===ed(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dd(t)}function dd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pd(t){return(pd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&sd(t,e)}(i,t);var e,n,r,o=ld(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),hd(dd(n=o.call(this,t,e)),"modelType",yi.DIAMOND_NODE),hd(dd(n),"rx",30),hd(dd(n),"ry",50),Object(z.makeObservable)(dd(n),{rx:z.observable,ry:z.observable,points:z.computed,pointsPosition:z.computed,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getNodeStyle",value:function(){var t=ud(pd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return id(id({},t),la(e))}},{key:"points",get:function(){var t=this.x,e=this.y,n=this.rx,r=this.ry;return[[t,e-r],[t+n,e],[t,e+r],[t-n,e]]}},{key:"pointsPosition",get:function(){return this.points.map((function(t){return{x:t[0],y:t[1]}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=nd(n,1)[0];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=nd(n,2)[1];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this;return this.points.map((function(e,n){var r=nd(e,2);return{x:r[0],y:r[1],id:"".concat(t.id,"_").concat(n)}}))}}])&&ad(e.prototype,n),r&&ad(e,r),i}(Xf);function vd(t){return(vd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gd(Object(n),!0).forEach((function(e){Pd(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function md(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _d(){return(_d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Od(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Od(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jd(t)););return t}function Ed(t,e){return(Ed=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jd(t);if(e){var o=jd(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xd(this,n)}}function xd(t,e){if(e&&("object"===vd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Sd(t)}function Sd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jd(t){return(jd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Pd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ad=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ed(t,e)}(i,t);var e,n,r,o=wd(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Pd(Sd(n=o.call(this,t,e)),"modelType",yi.ELLIPSE_NODE),Pd(Sd(n),"rx",30),Pd(Sd(n),"ry",45),Object(z.makeObservable)(Sd(n),{rx:z.observable,ry:z.observable,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getNodeStyle",value:function(){var t=_d(jd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return bd(bd({},t),la(e))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.rx,r=this.ry;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+n,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-n,y:e,id:"".concat(this.id,"_3")}]}}])&&md(e.prototype,n),r&&md(e,r),i}(Xf);function kd(t){return(kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Td(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Dd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dd(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Md(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Md(Object(n),!0).forEach((function(e){Gd(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Cd(){return(Cd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=Id(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function Id(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xd(t)););return t}function Ld(t,e){return(Ld=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Bd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xd(t);if(e){var o=Xd(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Hd(this,n)}}function Hd(t,e){if(e&&("object"===kd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ud(t)}function Ud(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xd(t){return(Xd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ld(t,e)}(i,t);var e,n,r,o=Bd(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Gd(Ud(n=o.call(this,t,e)),"modelType",yi.POLYGON_NODE),Gd(Ud(n),"points",[[50,0],[100,50],[50,100],[0,50]]),Object(z.makeObservable)(Ud(n),{points:z.observable,pointsPosition:z.computed,width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getNodeStyle",value:function(){var t=Cd(Xd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return Nd(Nd({},t),la(e))}},{key:"pointsPosition",get:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return this.points.map((function(o){return{x:o[0]+t-n/2,y:o[1]+e-r/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=Td(n,1)[0];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(n){var r=Td(n,2)[1];r<t&&(t=r),r>e&&(e=r)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this,e=this.x,n=this.y,r=this.width,o=this.height;return this.points.map((function(i,a){var u=Td(i,2),c=u[0],s=u[1];return{x:e+c-r/2,y:n+s-o/2,id:"".concat(t.id,"_").concat(a)}}))}}])&&Rd(e.prototype,n),r&&Rd(e,r),i}(Xf);function Yd(t){return(Yd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function zd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Vd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zd(Object(n),!0).forEach((function(e){ep(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Wd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kd(){return(Kd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=$d(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function $d(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=tp(t)););return t}function Zd(t,e){return(Zd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qd(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=tp(t);if(e){var o=tp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jd(this,n)}}function Jd(t,e){if(e&&("object"===Yd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Qd(t)}function Qd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tp(t){return(tp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ep(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var np=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Zd(t,e)}(i,t);var e,n,r,o=qd(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),ep(Qd(n=o.call(this,t,e)),"modelType",yi.RECT_NODE),ep(Qd(n),"radius",0),Object(z.makeObservable)(Qd(n),{radius:z.observable}),n}return e=i,(n=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return[{x:t,y:e-r/2,id:"".concat(this.id,"_0")},{x:t+n/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r/2,id:"".concat(this.id,"_2")},{x:t-n/2,y:e,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var t=Kd(tp(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return Vd(Vd({},t),la(e))}}])&&Wd(e.prototype,n),r&&Wd(e,r),i}(Xf);function rp(t){return(rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function op(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ip(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?op(Object(n),!0).forEach((function(e){hp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):op(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ap(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function up(){return(up="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=cp(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}}).apply(this,arguments)}function cp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pp(t)););return t}function sp(t,e){return(sp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function lp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pp(t);if(e){var o=pp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fp(this,n)}}function fp(t,e){if(e&&("object"===rp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dp(t)}function dp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pp(t){return(pp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&sp(t,e)}(i,t);var e,n,r,o=lp(i);function i(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),hp(dp(n=o.call(this,t,e)),"modelType",yi.TEXT_NODE),Object(z.makeObservable)(dp(n),{width:z.computed,height:z.computed}),n}return e=i,(n=[{key:"getTextStyle",value:function(){var t=up(pp(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return ip(ip({},t),la(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return fu({rows:t,fontSize:e,rowsLength:t.length}).width}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return fu({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&ap(e.prototype,n),r&&ap(e,r),i}(Xf);function vp(t){return(vp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mp(t,e){return(mp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wp(t);if(e){var o=wp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Op(this,n)}}function Op(t,e){if(e&&("object"===vp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ep(t)}function Ep(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wp(t){return(wp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function xp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Sp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&mp(t,e)}(i,t);var e,n,r,o=_p(i);function i(){var t;gp(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return xp(Ep(t=o.call.apply(o,[this].concat(n))),"modelType",yi.HTML_NODE),t}return e=i,(n=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return[{x:t,y:e-r/2,id:"".concat(this.id,"_0")},{x:t+n/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r/2,id:"".concat(this.id,"_2")},{x:t-n/2,y:e,id:"".concat(this.id,"_3")}]}}])&&bp(e.prototype,n),r&&bp(e,r),i}(Xf);function jp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Pp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ap(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kp=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Ap(this,"graphModel",void 0),Ap(this,"isShowHorizontal",void 0),Ap(this,"isShowVertical",void 0),Ap(this,"position",void 0),Object(z.makeObservable)(this,{isShowHorizontal:z.observable,isShowVertical:z.observable,position:z.observable,clearSnapline:z.action,setNodeSnapLine:z.action}),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}var e,n,r;return e=t,(n=[{key:"getStyle",value:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jp(Object(n),!0).forEach((function(e){Ap(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,e){for(var n=t.x,r=t.y,o=!1,i=!1,a=0;a<e.length;a++){var u=e[a];if(u.id!==t.id&&(n===u.x&&(o=!0),r===u.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:n,y:r}}}},{key:"getHorizontalSnapline",value:function(t,e){var n,r,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)r=ru(a);else{var u=this.graphModel.getNodeModelById(i);r=ru(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=ru(s);if(l.minY===r.minY||l.maxY===r.minY){o=!0,n=r.minY;break}if(l.minY===r.maxY||l.maxY===r.maxY){o=!0,n=r.maxY;break}}}return ni({isShowHorizontal:o,position:{y:n}})}},{key:"getVerticalSnapline",value:function(t,e){var n,r,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)r=ru(a);else{var u=this.graphModel.getNodeModelById(i);r=ru(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=ru(s);if(l.minX===r.minX||l.maxX===r.minX){o=!0,n=r.minX;break}if(l.minX===r.maxX||l.maxX===r.maxX){o=!0,n=r.maxX;break}}}return ni({isShowVertical:o,position:{x:n}})}},{key:"getSnapLinePosition",value:function(t,e){var n=this.getCenterSnapLine(t,e),r=n.isShowHorizontal,o=n.isShowVertical;if(!r){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(n.isShowHorizontal=i.isShowHorizontal,n.position.y=i.position.y)}if(!o){var a=this.getVerticalSnapline(t,e);a.isShowVertical&&(n.isShowVertical=a.isShowVertical,n.position.x=a.position.x)}return n}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,n=t.isShowVertical,r=t.position;this.position=r,this.isShowHorizontal=e,this.isShowVertical=n}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var e=this.graphModel.nodes,n=this.getSnapLinePosition(t,e);this.setSnaplineInfo(n)}}])&&Pp(e.prototype,n),r&&Pp(e,r),t}();function Tp(t){return(Tp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dp(){return(Dp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Mp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Np(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mp(Object(n),!0).forEach((function(e){Gp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Cp(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cp(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cp(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ip(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Lp(t,e){return(Lp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Bp(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Xp(t);if(e){var o=Xp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Hp(this,n)}}function Hp(t,e){if(e&&("object"===Tp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Up(t)}function Up(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xp(t){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lp(t,e)}(i,t);var e,n,r,o=Bp(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Gp(Up(t=o.call(this)),"preTargetNode",void 0),Gp(Up(t),"sourceRuleResults",void 0),Gp(Up(t),"targetRuleResults",void 0),Gp(Up(t),"dragHandler",void 0),Gp(Up(t),"t",void 0),Gp(Up(t),"onDragStart",(function(e){var n=e.event,r=t.props,o=r.anchorData,i=r.nodeModel,a=r.graphModel,u=a.overlapMode;a.selectNodeById(i.id),u!==Ei.INCREASE&&i.autoToFront&&a.toFront(i.id),a.eventCenter.emit(gi.ANCHOR_DRAGSTART,{data:o,e:n,nodeModel:i}),t.setState({startX:o.x,startY:o.y,endX:o.x,endY:o.y})})),Gp(Up(t),"onDragging",(function(e){var n=e.event,r=t.props,o=r.graphModel,i=r.nodeModel,a=r.anchorData,u=o.transformModel,c=o.eventCenter,s=o.width,l=o.height,f=o.editConfigModel,d=n.clientX,p=n.clientY,h=o.getPointByClient({x:d,y:p}),y=h.domOverlayPosition,v=y.x,g=y.y,b=h.canvasOverlayPosition,m=b.x,_=b.y;t.t&&clearInterval(t.t);var O=[];v<10?O=[10,0]:v+10>s?O=[-10,0]:g<10?O=[0,10]:g+10>l&&(O=[0,-10]),t.setState({endX:m,endY:_,dragging:!0}),t.moveAnchorEnd(m,_),O.length>0&&!f.stopMoveGraph&&(t.t=setInterval((function(){var e=Rp(O,2),n=e[0],r=e[1];u.translate(n,r);var o=t.state,i=o.endX,a=o.endY;t.setState({endX:i-n,endY:a-r}),t.moveAnchorEnd(i-n,a-r)}),50)),c.emit(gi.ANCHOR_DRAG,{data:a,e:n,nodeModel:i})})),Gp(Up(t),"onDragEnd",(function(e){t.t&&clearInterval(t.t),t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear();var n=t.props,r=n.graphModel,o=n.nodeModel,i=n.anchorData;r.eventCenter.emit(gi.ANCHOR_DROP,{data:i,e:e,nodeModel:o})})),Gp(Up(t),"checkEnd",(function(){var e=t.props,n=e.graphModel,r=e.nodeModel,o=e.anchorData,i=o.x,a=o.y,u=o.id,c=n.edgeType,s=t.state,l=s.endX,f=s.endY,d=s.dragging,p=qa({x:l,y:f},n);if(t.preTargetNode&&t.preTargetNode.state!==pi.DEFAULT&&t.preTargetNode.setElementState(pi.DEFAULT),d&&p&&p.node){var h=p.node,y=p.anchor.id,v="".concat(r.id,"_").concat(h.id,"_").concat(y,"_").concat(u),g=t.sourceRuleResults.get(v)||{},b=g.isAllPass,m=g.msg,_=t.targetRuleResults.get(v)||{},O=_.isAllPass,E=_.msg;if(b&&O)h.setElementState(pi.DEFAULT),n.addEdge({type:c,sourceNodeId:r.id,sourceAnchorId:u,startPoint:{x:i,y:a},targetNodeId:p.node.id,targetAnchorId:p.anchor.id,endPoint:{x:p.anchor.x,y:p.anchor.y}});else{var w=h.getData();n.eventCenter.emit(gi.CONNECTION_NOT_ALLOWED,{data:w,msg:E||m})}}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},t.dragHandler=new Vc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return e=i,(n=[{key:"getAnchorShape",value:function(){var t=this.props,e=t.anchorData,n=t.style,r=t.node.getAnchorShape(e);if(r)return r;var o=e.x,i=e.y;return v("g",null,v(Al,Dp({className:"lf-node-anchor-hover"},Np(Np({},n),n.hover),{x:o,y:i})),v(Al,Dp({className:"lf-node-anchor"},n,{x:o,y:i})))}},{key:"moveAnchorEnd",value:function(t,e){var n=this.props,r=n.graphModel,o=n.nodeModel,i=n.anchorData,a=qa({x:t,y:e},r);if(a){var u=a.node,c=a.anchor.id;if(this.preTargetNode&&this.preTargetNode!==a.node&&this.preTargetNode.setElementState(pi.DEFAULT),i.id===c)return;this.preTargetNode=u;var s="".concat(o.id,"_").concat(u.id,"_").concat(c,"_").concat(i.id);if(!this.targetRuleResults.has(s)){var l=a.anchor,f=o.isAllowConnectedAsSource(u,i,l),d=u.isAllowConnectedAsTarget(o,i,l);this.sourceRuleResults.set(s,du(f)),this.targetRuleResults.set(s,du(d))}var p=this.sourceRuleResults.get(s).isAllPass,h=this.targetRuleResults.get(s).isAllPass;p&&h?u.setElementState(pi.ALLOW_CONNECT):u.setElementState(pi.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==pi.DEFAULT&&this.preTargetNode.setElementState(pi.DEFAULT)}},{key:"isShowLine",value:function(){var t=this.state,e=t.startX,n=t.startY,r=t.endX,o=t.endY;return tu(e,n,r,o)>10}},{key:"render",value:function(){var t=this,e=this.state,n=e.startX,r=e.startY,o=e.endX,i=e.endY,a=this.props,u=a.anchorData.edgeAddable,c=a.edgeStyle;return v("g",{className:"lf-anchor"},v("g",{onMouseDown:function(e){!1!==u&&t.dragHandler.handleMouseDown(e)}},this.getAnchorShape()),this.isShowLine()&&v($s,Dp({x1:n,y1:r,x2:o,y2:i},c,{"pointer-events":"none"})))}}])&&Ip(e.prototype,n),r&&Ip(e,r),i}(_);n(60);function Yp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function zp(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yp(Object(n),!0).forEach((function(e){Vp(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Vp(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wp(t){return(Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Kp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return $p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zp(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.value,a=t.fontSize,u=t.fill,c=void 0===u?"currentColor":u,s=t.overflowMode,l=void 0===s?"default":s,f=t.textWidth,d=void 0===f?"":f,p=t.model,h={textAnchor:"middle","dominant-baseline":"middle",x:n,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=Kp(t,2),n=e[0],r=e[1];"object"!==Wp(r)&&(h[n]=r)})),i){var y=String(i).split(/[\r\n]/g),g=y.length;if("default"!==l){var b=p.BaseType,m=p.modelType;if(b===vi.NODE&&m!==yi.TEXT_NODE||b===vi.EDGE&&d)return function(t){var e=t.value,n=t.fontSize,r=t.model,o=t.fontFamily,i=void 0===o?"":o,a=t.lineHeight,u=t.wrapPadding,c=void 0===u?"0, 0":u,s=t.overflowMode,l=t.x,f=t.y,d=t.className,p=r.width,h=r.textHeight,y=t.textWidth||p,g=String(e).split(/[\r\n]/g),b=g.length,m=lu({rows:g,style:{fontSize:"".concat(n,"px"),width:"".concat(y,"px"),fontFamily:i,lineHeight:a,padding:c},rowsLength:b,className:"lf-get-text-height"}),_=r.height>m?r.height:m;h&&(_=h);return v("g",null,v("foreignObject",{width:y,height:_,x:l-y/2,y:f-_/2,className:d},v("div",{className:"lf-node-text-auto-wrap",style:{minHeight:_,width:y,padding:c}},v("div",{className:"ellipsis"===s?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:zp({},t)},g.map((function(t){return v("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t)}if(g>1){var _=y.map((function(t,e){return v("tspan",{className:"lf-text-tspan",x:n,y:o+(e-(g-1)/2)*(a+2)},t)}));return v("text",h,_)}return v("text",h,i)}}function qp(t){return(qp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jp(){return(Jp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Qp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return th(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return th(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function th(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function eh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function nh(t,e){return(nh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function rh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ah(t);if(e){var o=ah(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return oh(this,n)}}function oh(t,e){if(e&&("object"===qp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ih(t)}function ih(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ah(t){return(ah=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function uh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ch=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&nh(t,e)}(i,t);var e,n,r,o=rh(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),uh(ih(e=o.call(this)),"dragHandler",void 0),uh(ih(e),"sumDeltaX",0),uh(ih(e),"sumDeltaY",0),uh(ih(e),"stepDrag",void 0),uh(ih(e),"onDragging",(function(t){var n=t.deltaX,r=t.deltaY,o=e.props,i=o.model,a=Qp(o.graphModel.transformModel.fixDeltaXY(n,r),2),u=a[0],c=a[1];i.moveText(u,c)})),uh(ih(e),"onDragEnd",(function(t){var n=e.props,r=n.model,o=n.graphModel.eventCenter;null==o||o.emit(gi.TEXT_DROP,{e:t,data:r})})),uh(ih(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(pi.TEXT_EDIT)})),uh(ih(e),"mouseDownHandle",(function(t){var n=e.props,r=n.draggable,o=n.graphModel.editConfigModel.nodeTextDraggable;(r||o)&&e.stepDrag.handleMouseDown(t)}));var n=t.model,r=t.draggable;return e.stepDrag=new Vc({onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:1,model:n,isStopPropagation:r}),e}return e=i,(n=[{key:"getShape",value:function(){var t=this.props,e=t.model,n=t.graphModel,r=e.text,o=n.editConfigModel,i=r.value,a=r.x,u=r.y,c=r.editable,s=r.draggable,l={x:a,y:u,className:"",value:i};return c?l.className="lf-element-text":s||o.nodeTextDraggable?l.className="lf-text-draggable":l.className="lf-text-disabled",v(Zp,Jp({},l,e.getTextStyle(),{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return v("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&eh(e.prototype,n),r&&eh(e,r),i}(_),sh=null!==window.navigator.userAgent.match(/MSIE|Trident/),lh=new Map,fh=function(t){var e=lh.get(t);e&&(window.cancelAnimationFrame(e),lh.delete(t))};function dh(t){return(dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ph(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return hh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hh(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function yh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vh(t,e){return(vh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function gh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=_h(t);if(e){var o=_h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bh(this,n)}}function bh(t,e){if(e&&("object"===dh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return mh(t)}function mh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _h(t){return(_h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Oh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Eh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vh(t,e)}(i,t);var e,n,r,o=gh(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Oh(mh(e=o.call(this)),"t",void 0),Oh(mh(e),"moveOffset",void 0),Oh(mh(e),"stepDrag",void 0),Oh(mh(e),"contextMenuTime",void 0),Oh(mh(e),"startTime",void 0),Oh(mh(e),"clickTimer",void 0),Oh(mh(e),"onDragStart",(function(t){var n=t.event,r=n.clientX,o=n.clientY,i=e.props,a=i.model,u=i.graphModel.getPointByClient({x:r,y:o}).canvasOverlayPosition,c=u.x,s=u.y;e.moveOffset={x:a.x-c,y:a.y-s}})),Oh(mh(e),"onDragging",(function(t){var n=t.event,r=e.props,o=r.model,i=r.graphModel,a=i.editConfigModel,u=i.transformModel,c=i.width,s=i.height,l=i.gridSize;o.setIsDragging(!0);var f=n.clientX,d=n.clientY,p=i.getPointByClient({x:f,y:d}).canvasOverlayPosition,h=p.x,y=p.y,v=ph(u.CanvasPointToHtmlPoint([h,y]),2),g=v[0],b=v[1];if(!(g<0||b<0||g>c||b>s)){h+=e.moveOffset.x,y+=e.moveOffset.y,h=Aa(h,l),y=Aa(y,l);var m,_,O,E=ph(u.CanvasPointToHtmlPoint([h-o.width/2,y-o.height/2]),2),w=E[0],x=E[1],S=ph(u.CanvasPointToHtmlPoint([h+o.width/2,y+o.height/2]),2),j=S[0],P=S[1],A=Math.max(l,20),k=[];w<0?k=[A,0]:j>i.width?k=[-A,0]:x<0?k=[0,A]:P>i.height&&(k=[0,-A]),e.t&&fh(e.t),k.length>0&&!a.stopMoveGraph?e.t=(m=function(){var t=ph(k,2),e=t[0],n=t[1];u.translate(e,n),i.moveNode(o.id,-e/u.SCALE_X,-n/u.SCALE_X)},_=Fa(),O=window.requestAnimationFrame((function t(){if(m(),lh.get(_)){var e=window.requestAnimationFrame(t);lh.set(_,e)}})),lh.set(_,O),_):i.moveNode2Coordinate(o.id,h,y)}})),Oh(mh(e),"onDragEnd",(function(){e.t&&fh(e.t),e.props.model.setIsDragging(!1)})),Oh(mh(e),"handleClick",(function(t){if(e.startTime&&!((new Date).getTime()-e.startTime>200)){var n=e.props,r=n.model,o=n.graphModel,i={data:r.getData(),e:t,position:o.getPointByClient({x:t.clientX,y:t.clientY})},a=2===t.button,u=2===t.detail;if(!a){var c=o.editConfigModel;o.selectNodeById(r.id,Ra(t,c)),e.toFront(),u?(c.nodeTextEdit&&r.text.editable&&(r.setSelected(!1),o.setElementStateById(r.id,pi.TEXT_EDIT)),o.eventCenter.emit(gi.NODE_DBCLICK,i)):(o.eventCenter.emit(gi.ELEMENT_CLICK,i),o.eventCenter.emit(gi.NODE_CLICK,i))}}})),Oh(mh(e),"handleContextMenu",(function(t){t.preventDefault();var n=e.props,r=n.model,o=n.graphModel,i=r.getData(),a=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(r.id,pi.SHOW_MENU,a.domOverlayPosition),o.selectNodeById(r.id),o.eventCenter.emit(gi.NODE_CONTEXTMENU,{data:i,e:t,position:a}),e.toFront()})),Oh(mh(e),"handleMouseDown",(function(t){var n=e.props,r=n.model,o=n.graphModel;e.toFront(),e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&r.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),Oh(mh(e),"setHoverON",(function(t){if(!e.state.isHovered){e.setState({isHovered:!0});var n=e.props,r=n.model,o=n.graphModel,i=r.getData();r.setHovered(!0),o.eventCenter.emit(gi.NODE_MOUSEENTER,{data:i,e:t})}})),Oh(mh(e),"setHoverOFF",(function(t){e.setState({isHovered:!1});var n=e.props,r=n.model,o=n.graphModel,i=r.getData();r.setHovered(!1),o.eventCenter.emit(gi.NODE_MOUSELEAVE,{data:i,e:t})})),Oh(mh(e),"onMouseOut",(function(t){sh&&e.setHoverOFF(t)}));var n=t.graphModel,r=n.gridSize,a=n.eventCenter,u=t.model;return e.stepDrag=new Vc({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:r,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:u}),e.state={isHovered:!1},e}return e=i,r=[{key:"getModel",value:function(t){return t}}],(n=[{key:"getAnchorShape",value:function(t){return null}},{key:"getAnchors",value:function(){var t=this,e=this.props,n=e.model,r=e.graphModel,o=n.isSelected,i=n.isHitable,a=n.isDragging,u=this.state.isHovered;if(i&&(o||u)&&!a){var c=n.getAnchorLineStyle();return Ho(n.anchors,(function(e,o){var i=n.getAnchorStyle(e);return v(Fp,{anchorData:e,node:t,style:i,edgeStyle:c,anchorIndex:o,nodeModel:n,graphModel:r,setHoverOFF:t.setHoverOFF})}))}return[]}},{key:"getText",value:function(){var t=this.props,e=t.model,n=t.graphModel;if(e.state===pi.TEXT_EDIT)return"";if(e.text){var r=n.editConfigModel,o=!1;return(e.text.draggable||r.nodeTextDraggable)&&(o=!0),v(ch,{editable:r.nodeTextEdit&&e.text.editable,model:e,graphModel:n,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,n=t.isDragging,r="lf-node";switch(e){case pi.ALLOW_CONNECT:r+=" lf-node-allow";break;case pi.NOT_ALLOW_CONNECT:r+=" lf-node-not-allow";break;default:r+=" lf-node-default"}return n&&(r+=" lf-isDragging"),r}},{key:"toFront",value:function(){var t=this.props,e=t.model,n=t.graphModel;n.overlapMode!==Ei.INCREASE&&e.autoToFront&&n.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,n=e.model,r=e.graphModel,o=r.editConfigModel,i=o.hideAnchors,a=o.adjustNodePosition,u=r.gridSize,c=r.transformModel.SCALE_X,s=n.isHitable,l=n.draggable,f=v("g",{className:"lf-node-content"},this.getShape(),this.getText(),i?null:this.getAnchors());return s?(a&&l&&this.stepDrag.setStep(u*c),t=v("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onMouseUp:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},f)):t=v("g",{className:this.getStateClassName()},f),t}}])&&yh(e.prototype,n),r&&yh(e,r),i}(_);function wh(t){return(wh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xh(){return(xh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Sh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ph(t,e){return(Ph=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ah(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Th(t);if(e){var o=Th(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return kh(this,n)}}function kh(t,e){if(e&&("object"===wh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Th(t){return(Th=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Dh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ph(t,e)}(i,t);var e,n,r,o=Ah(i);function i(){return Sh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model;return v(fl,xh({},t.getNodeStyle(),{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&jh(e.prototype,n),r&&jh(e,r),i}(Eh);function Mh(t){return(Mh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Nh(){return(Nh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Rh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ch(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ih(t,e){return(Ih=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hh(t);if(e){var o=Hh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bh(this,n)}}function Bh(t,e){if(e&&("object"===Mh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Hh(t){return(Hh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Uh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ih(t,e)}(i,t);var e,n,r,o=Lh(i);function i(){return Rh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,n=t.y,r=t.r;return v(Al,Nh({},t.getNodeStyle(),{x:e,y:n,r:r}))}}])&&Ch(e.prototype,n),r&&Ch(e,r),i}(Eh);function Xh(t){return(Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Gh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Fh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fh(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Yh(t){var e=t.points,n=t.className,r={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach((function(t){var e=Gh(t,2),n=e[0],o=e[1];"object"!==Xh(o)&&(r[n]=o)})),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=e.map((function(t){return t.join(",")})).join(" "),v("polygon",r)}function zh(t){return(zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vh(){return(Vh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Wh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $h(t,e){return($h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Jh(t);if(e){var o=Jh(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qh(this,n)}}function qh(t,e){if(e&&("object"===zh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Jh(t){return(Jh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$h(t,e)}(i,t);var e,n,r,o=Zh(i);function i(){return Wh(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,n=t.y,r=t.width,o=t.height,i=t.points,a=t.getNodeStyle();return v("g",{transform:"matrix(1 0 0 1 ".concat(e-r/2," ").concat(n-o/2,")")},v(Yh,Vh({},a,{points:i,x:e,y:n})))}}])&&Kh(e.prototype,n),r&&Kh(e,r),i}(Eh);function ty(t){return(ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ey(){return(ey=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function ny(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ry(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oy(t,e){return(oy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function iy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=uy(t);if(e){var o=uy(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ay(this,n)}}function ay(t,e){if(e&&("object"===ty(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function uy(t){return(uy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&oy(t,e)}(i,t);var e,n,r,o=iy(i);function i(){return ny(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model;return v("g",null,v(Yh,ey({},t.getNodeStyle(),{points:t.points,x:t.x,y:t.y})))}}])&&ry(e.prototype,n),r&&ry(e,r),i}(Eh);function sy(t){return(sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ly(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return fy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fy(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fy(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function dy(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.rx,a=void 0===i?4:i,u=t.ry,c=void 0===u?4:u,s=t.className,l={cx:n,cy:o,rx:a,ry:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=ly(t,2),n=e[0],r=e[1];"object"!==sy(r)&&(l[n]=r)})),l.className=s?"lf-basic-shape ".concat(s):"lf-basic-shape",v("ellipse",l)}function py(t){return(py="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hy(){return(hy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function yy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gy(t,e){return(gy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function by(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=_y(t);if(e){var o=_y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return my(this,n)}}function my(t,e){if(e&&("object"===py(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _y(t){return(_y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Oy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gy(t,e)}(i,t);var e,n,r,o=by(i);function i(){return yy(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getShape",value:function(){var t=this.props.model;return v(dy,hy({},t.getNodeStyle(),{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&vy(e.prototype,n),r&&vy(e,r),i}(Eh);function Ey(t){return(Ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function xy(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wy(Object(n),!0).forEach((function(e){Sy(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wy(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Sy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Py(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ay(t,e){return(Ay=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ky(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Dy(t);if(e){var o=Dy(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ty(this,n)}}function Ty(t,e){if(e&&("object"===Ey(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Dy(t){return(Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var My=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ay(t,e)}(i,t);var e,n,r,o=ky(i);function i(){return jy(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),n=t.text;if(n&&n.value&&e.background&&"transparent"!==e.background.fill){var r=n.x,o=n.y,i=t.width,a=t.height;return v(fl,xy(xy({},e.background),{},{x:r,y:o-1,width:i,height:a}))}}},{key:"getShape",value:function(){return v("g",null,this.getBackground())}}])&&Py(e.prototype,n),r&&Py(e,r),i}(Eh);function Ny(t){return(Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ry(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Iy(t,e){return(Iy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ly(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Uy(t);if(e){var o=Uy(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return By(this,n)}}function By(t,e){if(e&&("object"===Ny(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hy(t)}function Hy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uy(t){return(Uy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Iy(t,e)}(i,t);var e,n,r,o=Ly(i);function i(){var t;Ry(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Xy(Hy(t=o.call.apply(o,[this].concat(n))),"ref",void 0),Xy(Hy(t),"currentProperties",void 0),Xy(Hy(t),"preProperties",void 0),Xy(Hy(t),"setRef",(function(e){t.ref=e})),t}return e=i,(n=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(t){t.appendChild(document.createElement("div"))}},{key:"shouldUpdate",value:function(){if(!this.preProperties||this.preProperties!==this.currentProperties)return this.preProperties=this.currentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.props.model,e=t.x,n=t.y,r=t.height,o=t.width;return this.currentProperties=JSON.stringify(t.properties),v("foreignObject",{x:e-o/2,y:n-r/2,width:o,height:r,ref:this.setRef})}}])&&Cy(e.prototype,n),r&&Cy(e,r),i}(Eh);function Fy(t){return(Fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return zy(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zy(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zy(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Vy=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var n=Yy(t,2),r=n[0],o=n[1];"object"!==Fy(o)&&(e[r]=o)})),v("path",e)};function Wy(t){return(Wy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ky(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qy(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jy(t,e){return(Jy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Qy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ev(t);if(e){var o=ev(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tv(this,n)}}function tv(t,e){if(e&&("object"===Wy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ev(t){return(ev=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Jy(t,e)}(i,t);var e,n,r,o=Qy(i);function i(){return Zy(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getArrowAttributes",value:function(){var t=this.props,e=t.arrowInfo,n=t.style,r=e.start,o=e.end,i={start:r,end:o,offset:n.offset,verticalLength:n.verticalLength,type:"end"},a=ec(i),u=a.leftX,c=a.leftY,s=a.rightX,l=a.rightY;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ky(Object(n),!0).forEach((function(e){$y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ky(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({d:"M".concat(u," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},n)}},{key:"getShape",value:function(){var t=this.getArrowAttributes(),e=t.d,n=t.strokeWidth,r=t.stroke,o=t.fill;return v(Vy,{d:e,fill:o,strokeWidth:n,stroke:r})}},{key:"render",value:function(){return v("g",{className:"lf-arrow"},this.getShape())}}])&&qy(e.prototype,n),r&&qy(e,r),i}(_);function rv(t){return(rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ov(){return(ov=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function iv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function av(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?iv(Object(n),!0).forEach((function(e){pv(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function uv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cv(t,e){return(cv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dv(t);if(e){var o=dv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return lv(this,n)}}function lv(t,e){if(e&&("object"===rv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fv(t)}function fv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dv(t){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var hv,yv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cv(t,e)}(i,t);var e,n,r,o=sv(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),pv(fv(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHovered:!0})})),pv(fv(e),"setHoverOFF",(function(){e.setState({isHovered:!1})})),e.state={isHovered:!1},e}return e=i,(n=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),n=t.text,r=e.background||{};if(this.state.isHovered&&e.hover&&e.hover.background&&(r=av(av({},r),e.hover.background)),n&&n.value&&"transparent"!==r.fill){var o,i=e.fontSize,a=e.overflowMode,u=e.lineHeight,c=e.wrapPadding,s=e.textWidth,l=n.value,f=n.x,d=n.y,p=String(l).split(/[\r\n]/g),h=p.length;if("autoWrap"===a&&s){var y=lu({rows:p,style:{fontSize:"".concat(i,"px"),width:"".concat(s,"px"),lineHeight:u,padding:c},rowsLength:h,className:"lf-get-text-height"});o=av(av({},r),{},{x:f-1,y:d-1,width:s,height:y})}else{var g=0;p&&p.forEach((function(t){var e=Rc(t);g=e>g?e:g}));var b=fu({rows:p,fontSize:i,rowsLength:h}),m=b.width,_=b.height;o=av(av({},r),{},{x:f-1,y:d-1,width:m,height:_})}return v(fl,o)}}},{key:"getShape",value:function(){var t=this.props.model,e=t.text,n=e.value,r=e.x,o=e.y;if(n){var i=av({x:r,y:o,className:"lf-element-text",value:n},t.getTextStyle());return v("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),v(Zp,ov({},i,{model:t})))}}}])&&uv(e.prototype,n),r&&uv(e,r),i}(ch);function vv(t){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gv(){return(gv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function bv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?bv(Object(n),!0).forEach((function(e){Av(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ov(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ov(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ov(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ev(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wv(t,e){return(wv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Pv(t);if(e){var o=Pv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sv(this,n)}}function Sv(t,e){if(e&&("object"===vv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return jv(t)}function jv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pv(t){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Av(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(hv||(hv={}));var kv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&wv(t,e)}(i,t);var e,n,r,o=xv(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Av(jv(t=o.call(this)),"dragHandler",void 0),Av(jv(t),"oldEdge",void 0),Av(jv(t),"preTargetNode",void 0),Av(jv(t),"targetRuleResults",void 0),Av(jv(t),"sourceRuleResults",void 0),Av(jv(t),"onDragStart",(function(){var e=t.props,n=e.x,r=e.y,o=e.edgeModel,i=o.startPoint,a=o.endPoint,u=o.pointsList;t.oldEdge={startPoint:i,endPoint:a,pointsList:u},t.setState({endX:n,endY:r,draging:!0}),o.isHitable=!1})),Av(jv(t),"onDragging",(function(e){var n=e.deltaX,r=e.deltaY,o=t.state,i=o.endX,a=o.endY,u=t.props,c=u.graphModel,s=u.type,l=_v(c.transformModel.moveCanvasPointByHtml([i,a],n,r),2),f=l[0],d=l[1];t.setState({endX:f,endY:d,draging:!0});var p=t.props.edgeModel,h=qa({x:i,y:a},c);if(h&&h.node&&t.isAllowAdjust(h)){var y,v=p.startPoint,g=p.endPoint,b=p.sourceNode,m=p.targetNode;s===hv.SOURCE?y={startPoint:{x:h.anchor.x,y:h.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:h.node,targetNode:m}:s===hv.TARGET&&(y={startPoint:{x:v.x,y:v.y},endPoint:{x:h.anchor.x,y:h.anchor.y},sourceNode:b,targetNode:h.node}),p.updateAfterAdjustStartAndEnd(y)}else s===hv.SOURCE?p.updateStartPoint({x:f,y:d}):s===hv.TARGET&&p.updateEndPoint({x:f,y:d})})),Av(jv(t),"onDragEnd",(function(){var e;t.setState({draging:!1});var n=t.props,r=n.graphModel,o=n.edgeModel,i=n.type;o.isHitable=!0;var a=t.state,u=a.endX,c=a.endY,s=a.draging,l=qa({x:u,y:c},r);if(s){if(l&&l.node&&t.isAllowAdjust(l)){var f,d=o.getData(),p=mv(mv({},d),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==d||null===(f=d.text)||void 0===f?void 0:f.value)||""});i===hv.SOURCE?p=mv(mv({},p),{},{sourceNodeId:l.node.id,sourceAnchorId:l.anchor.id,startPoint:{x:l.anchor.x,y:l.anchor.y},targetNodeId:o.targetNodeId,endPoint:mv({},o.endPoint)}):i===hv.TARGET&&(p=mv(mv({},p),{},{sourceNodeId:o.sourceNodeId,startPoint:mv({},o.startPoint),targetNodeId:l.node.id,targetAnchorId:l.anchor.id,endPoint:{x:l.anchor.x,y:l.anchor.y}})),r.deleteEdgeById(o.id);var h=r.addEdge(mv({},p));r.eventCenter.emit(gi.EDGE_EXCHANGE_NODE,{data:{newEdge:h.getData(),oldEdge:o.getData()}})}else t.recoveryEdge();null===(e=t.preTargetNode)||void 0===e||e.setElementState(pi.DEFAULT)}})),Av(jv(t),"recoveryEdge",(function(){var e=t.props.edgeModel,n=t.oldEdge,r=n.startPoint,o=n.endPoint,i=n.pointsList;e.updateStartPoint(r),e.updateEndPoint(o),e.modelType!==yi.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),Av(jv(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.targetRuleResults=new Map,t.sourceRuleResults=new Map,t.dragHandler=zc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return e=i,(n=[{key:"isAllowAdjust",value:function(t){var e=this.props,n=e.edgeModel,r=(n.id,n.sourceNode),o=n.targetNode,i=n.sourceAnchorId,a=n.targetAnchorId,u=e.type,c=null,s=null,l=null,f=null;if(u===hv.SOURCE?(c=t.node,s=o,l=t.anchor,f=o.getAnchorInfo(a)):(c=r,s=t.node,f=t.anchor,l=r.getAnchorInfo(i)),this.preTargetNode&&this.preTargetNode!==t.node&&this.preTargetNode.setElementState(pi.DEFAULT),this.preTargetNode=t.node,f.id===l.id)return!1;var d="".concat(c.id,"_").concat(s.id,"_").concat(l.id,"_").concat(f.id);if(!this.targetRuleResults.has(d)){var p=c.isAllowConnectedAsSource(s,l,f),h=s.isAllowConnectedAsTarget(c,l,f);this.sourceRuleResults.set(d,du(p)),this.targetRuleResults.set(d,du(h))}var y=this.sourceRuleResults.get(d).isAllPass,v=this.targetRuleResults.get(d).isAllPass,g=y&&v?pi.ALLOW_CONNECT:pi.NOT_ALLOW_CONNECT;return u===hv.SOURCE?c.setElementState(g):s.setElementState(g),y&&v}},{key:"render",value:function(){var t=this.props,e=t.x,n=t.y,r=this.state.draging;return v("g",null,v(Al,gv({className:"lf-edge-adjust-point"},this.getAdjustPointStyle(),{x:e,y:n,onMouseDown:this.dragHandler,"pointer-events":r?"none":""})))}}])&&Ev(e.prototype,n),r&&Ev(e,r),i}(_);function Tv(t){return(Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dv(){return(Dv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Mv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nv(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mv(Object(n),!0).forEach((function(e){Xv(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mv(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Rv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Iv(t,e){return(Iv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Uv(t);if(e){var o=Uv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bv(this,n)}}function Bv(t,e){if(e&&("object"===Tv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hv(t)}function Hv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uv(t){return(Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Iv(t,e)}(i,t);var e,n,r,o=Lv(i);function i(){var t;Rv(this,i);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Xv(Hv(t=o.call.apply(o,[this].concat(n))),"startTime",void 0),Xv(Hv(t),"contextMenuTime",void 0),Xv(Hv(t),"clickTimer",void 0),Xv(Hv(t),"handleHover",(function(e,n){var r=t.props,o=r.model,i=r.graphModel.eventCenter;o.setHovered(e);var a=e?gi.EDGE_MOUSEENTER:gi.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:n})})),Xv(Hv(t),"setHoverON",(function(e){t.handleHover(!0,e)})),Xv(Hv(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),Xv(Hv(t),"handleContextMenu",(function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var n=t.props,r=n.model,o=n.graphModel,i=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(r.id,pi.SHOW_MENU,i.domOverlayPosition),t.toFront(),o.selectEdgeById(r.id);var a=null==r?void 0:r.getData();o.eventCenter.emit(gi.EDGE_CONTEXTMENU,{data:a,e:e,position:i})})),Xv(Hv(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),Xv(Hv(t),"handleMouseUp",(function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200||2===e.button)){var n=2===e.detail,r=t.props,o=r.model,i=r.graphModel,a=null==o?void 0:o.getData(),u=i.getPointByClient({x:e.clientX,y:e.clientY});if(n){var c=i.editConfigModel,s=i.textEditElement;if(s&&s.id===o.id&&i.setElementStateById(o.id,pi.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,pi.TEXT_EDIT),o.modelType===yi.POLYLINE_EDGE){var l=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,d=f.x,p=f.y,h=Bc({x:d,y:p},l.points);l.dbClickPosition=h}i.eventCenter.emit(gi.EDGE_DBCLICK,{data:a,e:e,position:u})}else i.eventCenter.emit(gi.ELEMENT_CLICK,{data:a,e:e,position:u}),i.eventCenter.emit(gi.EDGE_CLICK,{data:a,e:e,position:u});var y=i.editConfigModel;i.selectEdgeById(o.id,Ra(e,y)),t.toFront()}})),Xv(Hv(t),"getIsDraging",(function(){return!1})),t}return e=i,(n=[{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,n=t.graphModel;if(e.state===pi.TEXT_EDIT)return"";var r=!1,o=n.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(r=!0),v(yv,{editable:o.edgeTextEdit&&e.text.editable,model:e,graphModel:n,draggable:r})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,n=t.endPoint,r=t.isSelected;return{start:e,end:n,hover:this.state.hover,isSelected:r}}},{key:"getArrowStyle",value:function(){var t=this.props,e=t.model,n=t.graphModel,r=e.getEdgeStyle(),o=n.theme.arrow;return Nv(Nv({},r),{},{fill:r.stroke},o)}},{key:"getArrow",value:function(){var t=this.getArrowInfo(),e=t.start,n=t.end;if(e&&n&&(e.x!==n.x||e.y!==n.y)){var r=this.getArrowStyle();return v(nv,{arrowInfo:t,style:r})}}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,n=t.graphModel,r=e.getAdjustStart(),o=e.getAdjustEnd();return v("g",null,v(kv,Dv({type:"SOURCE"},r,{edgeModel:e,graphModel:n})),v(kv,Dv({type:"TARGET"},o,{edgeModel:e,graphModel:n})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return v("g",null)}},{key:"getAppend",value:function(){return v("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,n=t.model;e.overlapMode!==Ei.INCREASE&&e.toFront(n.id)}},{key:"render",value:function(){var t=this.props,e=t.model,n=e.isSelected,r=e.isHitable,o=t.graphModel,i=this.getIsDraging(),a=o.editConfigModel.adjustEdgeStartAndEnd,u=o.animation,c=n&&u.edge&&1===o.getSelectElements().edges.length;return v("g",null,v("g",{className:r?"lf-edge":"lf-edge pointer-none",onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),c&&this.getAnimation(),this.getText(),this.getArrow()),a&&n&&!i?this.getAdjustPoints():"")}}])&&Cv(e.prototype,n),r&&Cv(e,r),i}(_);function Fv(t){return(Fv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yv(){return(Yv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function zv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wv(t,e){return(Wv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Kv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Zv(t);if(e){var o=Zv(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $v(this,n)}}function $v(t,e){if(e&&("object"===Fv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zv(t){return(Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var qv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wv(t,e)}(i,t);var e,n,r,o=Kv(i);function i(){return zv(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getEdge",value:function(){var t=this.props.model,e=t.startPoint,n=t.endPoint,r=t.getEdgeStyle();return v($s,Yv({},r,{x1:e.x,y1:e.y,x2:n.x,y2:n.y}))}},{key:"getShape",value:function(){return v("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),n=e.stroke,r=e.className,o=e.strokeDasharray,i=t.startPoint,a=t.endPoint,u=t.getEdgeStyle();return v("g",null,v($s,Yv({},u,{x1:i.x,y1:i.y,x2:a.x,y2:a.y,className:r,strokeDasharray:o,stroke:n})))}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=function(t){var e,n=t.start,r=t.end;if(n.x===r.x&&n.y===r.y)e="";else{var o={start:n,end:r,offset:10,verticalLength:5},i=ec(rc(rc({},o),{},{type:"start"})),a=ec(rc(rc({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:t.startPoint,end:t.endPoint}),n=e.d,r=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return v(Vy,{d:n,fill:o,strokeWidth:r,stroke:a,strokeDasharray:i})}}])&&Vv(e.prototype,n),r&&Vv(e,r),i}(Gv);function Jv(t){return(Jv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return tg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tg(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var eg=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var n=Qv(t,2),r=n[0],o=n[1];"object"!==Jv(o)&&(e[r]=o)})),v("polyline",e)};function ng(t){return(ng="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function og(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rg(Object(n),!0).forEach((function(e){hg(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ig(){return(ig=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function ag(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ug(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ug(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ug(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function sg(t,e){return(sg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function lg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pg(t);if(e){var o=pg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fg(this,n)}}function fg(t,e){if(e&&("object"===ng(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return dg(t)}function dg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pg(t){return(pg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&sg(t,e)}(i,t);var e,n,r,o=lg(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),hg(dg(t=o.call(this)),"drag",void 0),hg(dg(t),"isDragging",void 0),hg(dg(t),"appendInfo",void 0),hg(dg(t),"dragHandler",void 0),hg(dg(t),"onDragStart",(function(){t.props.model.dragAppendStart()})),hg(dg(t),"onDragging",(function(e){var n=e.deltaX,r=e.deltaY,o=t.props,i=o.model,a=o.graphModel;t.isDragging=!0;var u=a.transformModel,c=a.editConfigModel,s=ag(u.fixDeltaXY(n,r),2),l=s[0],f=s[1],d=i,p=c.adjustEdgeMiddle;t.appendInfo=p?d.dragAppendSimple(t.appendInfo,{x:l,y:f}):d.dragAppend(t.appendInfo,{x:l,y:f})})),hg(dg(t),"onDragEnd",(function(){var e=t.props,n=e.model,r=e.graphModel.eventCenter,o=n;o.dragAppendEnd(),t.isDragging=!1,t.appendInfo=void 0,r.emit(gi.EDGE_ADJUST,{data:o.getData()})})),hg(dg(t),"beforeDragStart",(function(e,n){n.dragAble&&t.dragHandler(e),t.appendInfo=n})),hg(dg(t),"getIsDraging",(function(){return t.isDragging})),t.drag=zc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(n=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle();return v(eg,ig({points:t.points},e))}},{key:"getShape",value:function(){return v("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),n=e.stroke,r=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return v("g",null,v(eg,ig({points:t.points},i,{className:r,strokeDasharray:o,stroke:n})))}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,n=t.isSelected,r={start:null,end:null,hover:this.state.hover,isSelected:n},o=Dc(e);return o.length>=2&&(r.start=o[o.length-2],r.end=o[o.length-1]),r}},{key:"getAppendAttributes",value:function(t){var e,n=t.start,r=t.end;if(n.x===r.x&&n.y===r.y)e="";else{var o={start:n,end:r,offset:10,verticalLength:5},i=ec(og(og({},o),{},{type:"start"})),a=ec(og(og({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(a.rightX," ").concat(a.rightY,"\n L").concat(a.leftX," ").concat(a.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(t){var e=this.getAppendAttributes(t),n=e.d,r=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return v(Vy,{d:n,fill:o,strokeWidth:r,stroke:a,strokeDasharray:i})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,n=e.model,r=e.graphModel,o=n.pointsList,i=n.draggable,a=[],u=o.length,c=function(e){var n="lf-polyline-append",c={start:{x:o[e].x,y:o[e].y},end:{x:o[e+1].x,y:o[e+1].y},startIndex:e,endIndex:e+1,direction:"",dragAble:!0},s=v("g",{className:n},t.getAppendShape(c)),l=r.editConfigModel,f=l.adjustEdge,d=l.adjustEdgeMiddle;if(f&&i){t.dragHandler=t.drag;var p=c.startIndex,h=c.endIndex,y=d&&(0===p||h===u-1);c.dragAble=!y,c.start.x===c.end.x?(c.dragAble&&(n+="-ew-resize"),c.direction=bi.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(n+="-ns-resize"),c.direction=bi.HORIZONTAL),s=v("g",{className:t.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},v("g",{className:n},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return v("g",null,a)}}])&&cg(e.prototype,n),r&&cg(e,r),i}(Gv);function vg(t){return(vg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return bg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bg(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function mg(){return(mg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function _g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Og(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Eg(t,e){return(Eg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Sg(t);if(e){var o=Sg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return xg(this,n)}}function xg(t,e){if(e&&("object"===vg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Sg(t){return(Sg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Eg(t,e)}(i,t);var e,n,r,o=wg(i);function i(){return _g(this,i),o.apply(this,arguments)}return e=i,(n=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle();return v(Vy,mg({d:t.path},e))}},{key:"getShape",value:function(){return v("g",null,this.getEdge())}},{key:"getAnimation",value:function(){var t=this.props.model,e=t.getAnimation(),n=e.stroke,r=e.className,o=e.strokeDasharray,i=t.getEdgeStyle();return v("g",null,v(Vy,mg({d:t.path},i,{className:r,strokeDasharray:o,stroke:n})))}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return v(Vy,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,n=t,r=n.path,o=n.isSelected,i=gg(function(t){var e=Ic(t);return[e[2],e[3]]}(r),2);return{start:i[0],end:i[1],hover:e,isSelected:o}}}])&&Og(e.prototype,n),r&&Og(e,r),i}(Gv);var Pg=function(t,e){return ro(t,e)};var Ag=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0};function kg(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Tg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dg,Mg,Ng,Rg=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Tg(this,"undos",[]),Tg(this,"redos",[]),Tg(this,"callbacks",[]),Tg(this,"stopWatch",null),Tg(this,"curData",null),Tg(this,"maxSize",50),Tg(this,"waitTime",100),Tg(this,"eventCenter",void 0),Tg(this,"model",void 0),Tg(this,"listenHistoryChange",(function(){var t=r.model.modelToHistoryData();t&&(r.add(t),r.emitHistoryChange())})),this.eventCenter=e.eventCenter;var o=gi.NODE_ADD,i=gi.EDGE_ADD,a=gi.NODE_DROP,u=gi.EDGE_ADJUST,c=gi.SELECTION_DROP,s=gi.TEXT_DROP,l=gi.NODE_TEXT_UPDATE,f=gi.EDGE_TEXT_UPDATE,d=gi.GRAPH_RENDERED,p=gi.NODE_PROPERTY_UPDATE,h=gi.EDGE_PROPERTY_UPDATE,y=gi.HISTORY_INSERT,v="\n ".concat(o,",\n ").concat(i,",\n ").concat(a,",\n ").concat(u,",\n ").concat(c,",\n ").concat(s,",\n ").concat(l,",\n ").concat(f,",\n ").concat(d,"\n ");n&&(v+=",".concat(p,",").concat(h)),this.model=e,e.eventCenter.on(v,this.listenHistoryChange),e.eventCenter.on(y,(function(t){t||(t=r.model.modelToHistoryData()),r.add(t)}))}var e,n,r;return e=t,(n=[{key:"add",value:function(t){Pg(Ag(this.undos),t)||(this.undos.push(t),this.redos=[],this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var t=this.undos.pop();return this.redos.push(t),this.curData=this.undos[this.undos.length-1],this.emitHistoryChange(),la(this.curData)}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=t,this.undos.push(this.curData),this.emitHistoryChange(),t}}},{key:"emitHistoryChange",value:function(){this.eventCenter.emit(gi.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}})}}])&&kg(e.prototype,n),r&&kg(e,r),t}();function Cg(t){return(Cg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ig(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Lg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lg(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Hg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bg(Object(n),!0).forEach((function(e){Vg(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bg(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ug(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xg(t,e){return(Xg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Gg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=zg(t);if(e){var o=zg(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fg(this,n)}}function Fg(t,e){if(e&&("object"===Cg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Yg(t)}function Yg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zg(t){return(zg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Vg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wg,Kg,$g,Zg=Ne((Ng=Mg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xg(t,e)}(i,t);var e,n,r,o=Gg(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Vg(Yg(t=o.call(this)),"ref",{current:null}),Vg(Yg(t),"__prevText",{type:"",text:"",id:""}),Vg(Yg(t),"keyupHandler",(function(e){var n=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&n.setElementState(0)})),Vg(Yg(t),"inputHandler",(function(e){var n=e.target.innerText,r=t.props.graphModel.textEditElement;t.__prevText={type:r.type,text:n.replace(/(\r\n)+$|(\n)+$/,""),id:r.id}})),Vg(Yg(t),"keydownHandler",(function(t){t.stopPropagation()})),t.state={style:{left:0,top:0}},t}return e=i,r=[{key:"getDerivedStateFromProps",value:function(t){var e,n=t.graphModel,r=n.transformModel,o=n.theme,i=n.textEditElement;if(i){var a;if(null===(a=i.text)||void 0===a||!a.value)if(i.BaseType===vi.EDGE){var u=(i=i).text,c=i.textPosition,s=c.x,l=c.y;u.x=s,u.y=l,i.setText(u)}else i=i;var f={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(i.BaseType===vi.EDGE){var d=o.edgeText,p=d.overflowMode,h=d.lineHeight,y=d.wrapPadding,v=d.textWidth;v&&"autoWrap"===p&&(e=Hg(Hg({},f),{},{width:v,minWidth:v,lineHeight:h,padding:y}))}else if(i.BaseType===vi.NODE){var g=o.nodeText,b=g.overflowMode,m=g.lineHeight,_=g.wrapPadding,O=g.textWidth,E=i,w=E.width,x=E.modelType;(x!==yi.TEXT_NODE&&"autoWrap"===b||x===yi.TEXT_NODE&&O)&&(e=Hg(Hg({},f),{},{width:O||w,minWidth:O||w,lineHeight:m,padding:_}))}var S=i.text,j=S.x,P=S.y,A=Ig(r.CanvasPointToHtmlPoint([j,P]),2);return{style:Hg({left:A[0],top:A[1]},e)}}}}],(n=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var t=this.props.graphModel,e=t.eventCenter,n=t.editConfigModel,r=n.edgeTextEdit,o=n.nodeTextEdit;(r||o)&&e.on("".concat(gi.GRAPH_TRANSFORM,",").concat(gi.NODE_CLICK,",").concat(gi.BLANK_CLICK," "),(function(){t.textEditElement&&t.textEditElement.setElementState(pi.DEFAULT)}))}},{key:"componentDidUpdate",value:function(){var t=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){var e=this.__prevText,n=e.text,r=e.id;t.updateText(r,n),t.eventCenter.emit(gi.TEXT_UPDATE,Hg({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var n=window.getSelection();n.removeAllRanges(),n.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,n=this.state.style;return e?v("div",{contentEditable:!0,className:"lf-text-input",style:n,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onInput:this.inputHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&Ug(e.prototype,n),r&&Ug(e,r),i}(_),Vg(Mg,"toolName","textEdit"),Dg=Ng))||Dg,qg=function(t){return t.modelType===yi.LINE_EDGE?function(t){var e=t.startPoint,n=t.endPoint,r=(e.x+n.x)/2,o=(e.y+n.y)/2,i=Math.abs(e.x-n.x)+10,a=Math.abs(e.y-n.y)+10;return{x:r-i/2,y:o-a/2,x1:r+i/2,y1:o+a/2}}(t):t.modelType===yi.POLYLINE_EDGE?function(t){var e=t.points,n=Dc(e),r=yc(n,8),o=r.x,i=r.y,a=r.width,u=r.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):t.modelType===yi.BEZIER_EDGE?function(t){var e=t.path,n=Ic(e),r=yc(n,8),o=r.x,i=r.y,a=r.width,u=r.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):void 0};function Jg(t){return(Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(t,e)||eb(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tb(t){return function(t){if(Array.isArray(t))return nb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||eb(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eb(t,e){if(t){if("string"==typeof t)return nb(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nb(t,e):void 0}}function nb(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function rb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ob(t,e){return(ob=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ib(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=cb(t);if(e){var o=cb(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ab(this,n)}}function ab(t,e){if(e&&("object"===Jg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ub(t)}function ub(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cb(t){return(cb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lb=Ne(($g=Kg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ob(t,e)}(i,t);var e,n,r,o=ib(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),sb(ub(e=o.call(this)),"stepDrag",void 0),sb(ub(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),sb(ub(e),"onDragging",(function(t){var n=t.deltaX,r=t.deltaY,o=e.props.graphModel,i=o.getSelectElements(!0);o.moveNodes(i.nodes.map((function(t){return t.id})),n,r)})),sb(ub(e),"handleContextMenu",(function(t){t.preventDefault();var n=e.props,r=n.graphModel,o=n.graphModel,i=o.eventCenter,a=o.selectElements,u=r.getPointByClient({x:t.clientX,y:t.clientY}),c={nodes:[],edges:[]};tb(a.values()).forEach((function(t){t.BaseType===vi.NODE&&c.nodes.push(t.getData()),t.BaseType===vi.EDGE&&c.edges.push(t.getData())})),i.emit(gi.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})}));var n=t.graphModel,r=n.gridSize,a=n.eventCenter;return e.stepDrag=new Vc({onDragging:e.onDragging,step:r,eventType:"SELECTION",eventCenter:a}),e}return e=i,(n=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,n=t.transformModel;if(!(e.size<=1)){var r=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===vi.NODE&&(e=function(t){var e=t.x,n=t.y,r=t.width,o=t.height;return{x:e-r/2,y:n-o/2,x1:e+r/2,y1:n+o/2}}(t)),t.BaseType===vi.EDGE&&(e=qg(t)),r=Math.min(r,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),a=Math.max(a,e.y1)}));var u=Qg(n.CanvasPointToHtmlPoint([r,o]),2);r=u[0],o=u[1];var c=Qg(n.CanvasPointToHtmlPoint([i,a]),2);return i=c[0],a=c[1],v("div",{className:"lf-multiple-select",style:{left:"".concat(r-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-r+20,"px"),height:"".concat(a-o+20,"px")},onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&rb(e.prototype,n),r&&rb(e,r),i}(_),sb(Kg,"toolName","multipleSelect"),Wg=$g))||Wg;function fb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function db(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var pb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),db(this,"tools",void 0),db(this,"components",void 0),db(this,"toolMap",new Map),db(this,"instance",void 0),this.instance=e,this.isDisabledTool(Zg.toolName)||this.registerTool(Zg.toolName,Zg),this.isDisabledTool(lb.toolName)||this.registerTool(lb.toolName,lb)}var e,n,r;return e=t,(n=[{key:"isDisabledTool",value:function(t){return-1!==this.instance.options.disabledTools.indexOf(t)}},{key:"registerTool",value:function(t,e){this.toolMap.set(t,e)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&fb(e.prototype,n),r&&fb(e,r),t}(),hb=n(162),yb=n.n(hb);function vb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var bb=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),gb(this,"mousetrap",void 0),gb(this,"options",void 0),gb(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var n=e.lf;this.target=n.container,this.mousetrap=new yb.a(this.target),e.keyboard.enabled&&this.enable(!0)}var e,n,r;return e=t,(n=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(ur(e))e.forEach((function(e){var n=e.keys,r=e.callback,o=e.action;return t.on(n,r,o)}));else{var n=e.keys,r=e.callback,o=e.action;this.on(n,r,o)}}},{key:"on",value:function(t,e,n){this.mousetrap.bind(this.getKeys(t),e,n)}},{key:"disabled",get:function(){return!0!==this.options.keyboard.enabled}},{key:"off",value:function(t,e){this.mousetrap.unbind(this.getKeys(t),e)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var e=this;return(Array.isArray(t)?t:[t]).map((function(t){return e.formatKey(t)}))}},{key:"formatKey",value:function(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&vb(e.prototype,n),r&&vb(e,r),t}(),mb=bb,_b=null;function Ob(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Eb(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach((function(t){t.x+=e,t.y+=e})),t.text&&(t.text.x+=e,t.text.y+=e),t}function wb(t){return(wb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Sb(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xb(Object(n),!0).forEach((function(e){Pb(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xb(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function jb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ab=function(){function t(e){var n,r,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Pb(this,"container",void 0),Pb(this,"width",void 0),Pb(this,"height",void 0),Pb(this,"graphModel",void 0),Pb(this,"history",void 0),Pb(this,"viewMap",new Map),Pb(this,"tool",void 0),Pb(this,"keyboard",void 0),Pb(this,"dnd",void 0),Pb(this,"options",void 0),Pb(this,"snaplineModel",void 0),Pb(this,"components",[]),Pb(this,"plugins",void 0),Pb(this,"extension",{}),Pb(this,"adapterIn",void 0),Pb(this,"adapterOut",void 0),Pb(this,"getView",(function(t){return o.viewMap.get(t)})),e=vf(e),this.options=e,this.container=e.container,this.plugins=e.plugins,this.graphModel=new os(Sb({},e)),this.tool=new pb(this),this.options.isSilentMode||!1===this.options.history||(this.history=new Rg(this.graphModel,e.isPropertiesChangeHistory)),this.dnd=new yf({lf:this}),this.keyboard=new mb({lf:this,keyboard:e.keyboard}),e.isSilentMode||!1===e.snapline||(this.snaplineModel=new kp(this.graphModel),n=this.graphModel.eventCenter,r=this.snaplineModel,n.on("node:mousemove",(function(t){var e=t.data;r.setNodeSnapLine(e)})),n.on("node:mouseup",(function(){r.clearSnapline()}))),function(t,e){var n=t.keyboard,r=n.options.keyboard;n.on(["cmd + c","ctrl + c"],(function(){if(r.enabled&&!e.textEditElement){var n=t.options.guards,o=e.getSelectElements(!1);return n&&n.beforeClone&&!n.beforeClone(o)?(_b=null,!1):((_b=o).nodes.forEach((function(t){return Ob(t,40)})),_b.edges.forEach((function(t){return Eb(t,40)})),!1)}})),n.on(["cmd + v","ctrl + v"],(function(){if(r.enabled&&!e.textEditElement){if(_b&&(_b.nodes||_b.edges)){t.clearSelectElements();var n=t.addElements(_b);if(!n)return;n.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),n.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),_b.nodes.forEach((function(t){return Ob(t,40)})),_b.edges.forEach((function(t){return Eb(t,40)}))}return!1}})),n.on(["cmd + z","ctrl + z"],(function(){if(r.enabled&&!e.textEditElement)return t.undo(),!1})),n.on(["cmd + y","ctrl + y"],(function(){if(r.enabled&&!e.textEditElement)return t.redo(),!1})),n.on(["backspace"],(function(){if(r.enabled&&!e.textEditElement){var n=e.getSelectElements(!0);return t.clearSelectElements(),n.edges.forEach((function(e){return t.deleteEdge(e.id)})),n.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}}))}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(e.disabledPlugins)}var e,n,r;return e=t,r=[{key:"use",value:function(t){var e=t.pluginName;e||(console.warn("请给插件".concat(t.name||t.constructor.name,"指定pluginName!")),e=t.name);var n=this.extensions.get(e);n&&n.destroy&&n.destroy(),this.extensions.set(e,t)}},{key:"t",value:function(t){return t}}],(n=[{key:"register",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var r={BaseEdge:Gv,BaseEdgeModel:xu,BaseNode:Eh,BaseNodeModel:Xf,RectNode:Dh,RectNodeModel:np,CircleNode:Uh,CircleNodeModel:td,PolygonNode:Qh,PolygonNodeModel:Fd,TextNode:My,TextNodeModel:yp,LineEdge:qv,LineEdgeModel:Hu,DiamondNode:cy,DiamondNodeModel:yd,PolylineEdge:yg,PolylineEdgeModel:tc,BezierEdge:jg,BezierEdgeModel:Mf,EllipseNode:Oy,EllipseNodeModel:Ad,HtmlNode:Gy,HtmlNodeModel:Sp,h:v,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(r[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(r[e]=t)}));var o=e(r),i=o.view,a=o.model,u=i;n&&!u.isObervered&&(u.isObervered=!0,u=Ne(u)),this.setView(t,u),this.graphModel.setModel(t,a)}else this.registerElement(t)}},{key:"registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=Ne(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"defaultRegister",value:function(){this.registerElement({view:Dh,model:np,type:"rect"}),this.registerElement({type:"circle",view:Uh,model:td}),this.registerElement({type:"polygon",view:Qh,model:Fd}),this.registerElement({type:"line",view:qv,model:Hu}),this.registerElement({type:"polyline",view:yg,model:tc}),this.registerElement({type:"bezier",view:jg,model:Mf}),this.registerElement({type:"text",view:My,model:yp}),this.registerElement({type:"ellipse",view:Oy,model:Ad}),this.registerElement({type:"diamond",view:cy,model:yd}),this.registerElement({type:"html",view:Gy,model:Sp})}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e),e||this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformModel,n=t.coordinate,r=t.id;if(!n){var o=this.getNodeModelById(r);o&&(n=o.getData());var i=this.getEdgeModelById(r);i&&(n=i.textPosition)}var a=n,u=a.x,c=a.y;e.focusOn(u,c,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,e){this.options.width=null!=t?t:this.options.width,this.options.height=null!=e?e:this.options.height,this.graphModel.resize(t,e)}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.updateText(t,e)}},{key:"deleteElement",value:function(t){var e,n,r,o=this.getModelById(t);return!!o&&null!==(n=null===(r=(Pb(e={},vi.NODE,this.deleteNode),Pb(e,vi.EDGE,this.deleteEdge),e)[o.BaseType])||void 0===r?void 0:r.call(this,t))&&void 0!==n&&n}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){return this.graphModel.getElement(t).getData()}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"changeEdgeType",value:function(t,e){this.graphModel.changeEdgeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){return this.graphModel.addNode(t)}},{key:"deleteNode",value:function(t){var e=this.graphModel.getNodeModelById(t);if(!e)return!1;var n=e.getData(),r=this.options.guards,o=!r||!r.beforeDelete||r.beforeDelete(n);return o&&this.graphModel.deleteNode(t),o}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModelById(t).getData(),n=this.options.guards;if(!n||!n.beforeClone||n.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"getNodeModelById",value:function(t){return this.graphModel.getNodeModelById(t)}},{key:"getNodeDataById",value:function(t){return this.graphModel.getNodeModelById(t).getData()}},{key:"addEdge",value:function(t){return this.graphModel.addEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,n=this.graphModel.edgesMap[t];if(!n)return!1;var r=n.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(r);return o&&this.graphModel.deleteEdgeById(t),o}},{key:"deleteEdgeByNodeId",value:function(t){var e=t.sourceNodeId,n=t.targetNodeId;e&&n?this.graphModel.deleteEdgeBySourceAndTarget(e,n):e?this.graphModel.deleteEdgeBySource(e):n&&this.graphModel.deleteEdgeByTarget(n)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdgeModels",value:function(t){var e=this.graphModel.edges,n=t.sourceNodeId,r=t.targetNodeId;if(n&&r){var o=[];return e.forEach((function(t){t.sourceNodeId===n&&t.targetNodeId===r&&o.push(t)})),o}if(n){var i=[];return e.forEach((function(t){t.sourceNodeId===n&&i.push(t)})),i}if(r){var a=[];return e.forEach((function(t){t.targetNodeId===r&&a.push(t)})),a}return[]}},{key:"getEdgeDataById",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var n;null===(n=this.graphModel.getElement(t))||void 0===n||n.setProperties(vu(e))}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{key:"setElementZIndex",value:function(t,e){return this.graphModel.setElementZIndex(t,e)}},{key:"addElements",value:function(t){for(var e=this,n=t.nodes,r=t.edges,o={},i={nodes:[],edges:[]},a=0;a<n.length;a++){var u=n[a],c=u.id,s=this.addNode(u);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return r.forEach((function(t){var n=t.sourceNodeId,r=t.targetNodeId;o[n]&&(t.sourceNodeId=o[n]),o[r]&&(t.targetNodeId=o[r]);var a=e.graphModel.addEdge(t);i.edges.push(a)})),i}},{key:"getAreaElement",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.graphModel.getAreaElement(t,e,n,r).map((function(t){return t.getData()}))}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(t):t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfigModel.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=vu(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=vu(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){return this.graphModel.transformModel.zoom(t,e)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformModel.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformModel.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel;return{SCALE_X:t.SCALE_X,SCALE_Y:t.SCALE_Y,TRANSLATE_X:t.TRANSLATE_X,TRANSLATE_Y:t.TRANSLATE_Y}}},{key:"translate",value:function(t,e){this.graphModel.transformModel.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,e=t.TRANSLATE_X,n=t.TRANSLATE_Y;this.translate(-e,-n)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t){this.graphModel.fitView(t)}},{key:"on",value:function(t,e){this.graphModel.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.graphModel.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.graphModel.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.graphModel.eventCenter.emit(t,e)}},{key:"installPlugins",value:function(){var e,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=null!==(e=this.plugins)&&void 0!==e?e:t.extensions;o.forEach((function(t){var e=t.pluginName||t.name;-1===r.indexOf(e)&&n.installPlugin(t)}))}},{key:"installPlugin",value:function(e){if("object"===wb(e)){var n=e.install,r=e.render;return n&&n.call(e,this,t),r&&this.components.push(r.bind(e)),void(this.extension[e.pluginName]=e)}var o=e,i=new o({lf:this,LogicFlow:t});i.render&&this.components.push(i.render.bind(i)),this.extension[o.pluginName]=i}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var n=new e(Sb(Sb({},t),{},{virtual:!0}),this.graphModel);return n.init(),n.virtual=!0,this.graphModel.setFakerNode(n),n}console.warn("不存在为".concat(t.type,"类型的节点"))}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"renderRawData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.graphDataToModel(vu(t)),this.emit(gi.GRAPH_RENDERED,t),this.isRendered&&!e||(H(v(lf,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.isRendered=!0)}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t,e)}}])&&jb(e.prototype,n),r&&jb(e,r),t}();Pb(Ab,"extensions",new Map);var kb=n(160);e.default=Ab}])}));
|