@logicflow/core 1.0.7-alpha.0 → 1.1.0-alpha.1

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.
@@ -1,4 +1,4 @@
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 r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=202)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return er})),r.d(e,"c",(function(){return Yt})),r.d(e,"d",(function(){return jt})),r.d(e,"e",(function(){return yt})),r.d(e,"f",(function(){return dt})),r.d(e,"g",(function(){return _t})),r.d(e,"h",(function(){return yr})),r.d(e,"i",(function(){return at})),r.d(e,"j",(function(){return wt})),r.d(e,"k",(function(){return Qt})),r.d(e,"l",(function(){return ne})),r.d(e,"m",(function(){return rt})),r.d(e,"n",(function(){return se})),r.d(e,"o",(function(){return E})),r.d(e,"p",(function(){return Se})),r.d(e,"q",(function(){return le})),r.d(e,"r",(function(){return be})),r.d(e,"s",(function(){return dr})),r.d(e,"t",(function(){return de})),r.d(e,"u",(function(){return ee})),r.d(e,"v",(function(){return Oe})),r.d(e,"w",(function(){return we})),r.d(e,"x",(function(){return je})),r.d(e,"y",(function(){return Je})),r.d(e,"z",(function(){return rr})),r.d(e,"A",(function(){return pr})),r.d(e,"B",(function(){return Ee})),r.d(e,"C",(function(){return Z})),r.d(e,"D",(function(){return Pe})),r.d(e,"E",(function(){return ue})),r.d(e,"F",(function(){return ae})),r.d(e,"G",(function(){return te})),r.d(e,"H",(function(){return $t})),r.d(e,"I",(function(){return De})),r.d(e,"J",(function(){return Me})),r.d(e,"K",(function(){return lt})),r.d(e,"L",(function(){return xe})),r.d(e,"M",(function(){return Ne}));var o=[];Object.freeze(o);var i={};function a(){return++Rt.mobxGuid}function u(t){throw c(!1,t),"X"}function c(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(i);function s(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var l=function(){};function f(t){return null!==t&&"object"==typeof t}function p(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function d(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function y(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return f(t)&&!0===t[r]}}function h(t){return t instanceof Map}function v(t){return t instanceof Set}function b(t){var e=new Set;for(var r in t)e.add(r);return Object.getOwnPropertySymbols(t).forEach((function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)})),Array.from(e)}function g(t){return t&&t.toString?t.toString():new String(t).toString()}function m(t){return null===t?null:"object"==typeof t?""+t:t}var O="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,w=Symbol("mobx administration"),_=function(){function t(t){void 0===t&&(t="Atom@"+a()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=J.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.reportObserved=function(){return Ht(this)},t.prototype.reportChanged=function(){Bt(),function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.isTracing!==Q.NONE&&Ut(e,t),e.onBecomeStale()),e.dependenciesState=J.STALE}))}(this),Xt()},t.prototype.toString=function(){return this.name},t}(),j=y("Atom",_);function E(t,e,r){void 0===e&&(e=l),void 0===r&&(r=l);var n,o=new _(t);return e!==l&&ce("onBecomeObserved",o,e,n),r!==l&&ue(o,r),o}var x={identity:function(t,e){return t===e},structural:function(t,e){return vr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return vr(t,e,1)}},S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};
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 r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=139)}([function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return er})),r.d(e,"c",(function(){return Gt})),r.d(e,"d",(function(){return Et})),r.d(e,"e",(function(){return ft})),r.d(e,"f",(function(){return ht})),r.d(e,"g",(function(){return xt})),r.d(e,"h",(function(){return fr})),r.d(e,"i",(function(){return st})),r.d(e,"j",(function(){return _t})),r.d(e,"k",(function(){return Qt})),r.d(e,"l",(function(){return ne})),r.d(e,"m",(function(){return rt})),r.d(e,"n",(function(){return ue})),r.d(e,"o",(function(){return w})),r.d(e,"p",(function(){return Pe})),r.d(e,"q",(function(){return le})),r.d(e,"r",(function(){return ve})),r.d(e,"s",(function(){return hr})),r.d(e,"t",(function(){return he})),r.d(e,"u",(function(){return ee})),r.d(e,"v",(function(){return Oe})),r.d(e,"w",(function(){return _e})),r.d(e,"x",(function(){return Ee})),r.d(e,"y",(function(){return Je})),r.d(e,"z",(function(){return rr})),r.d(e,"A",(function(){return dr})),r.d(e,"B",(function(){return we})),r.d(e,"C",(function(){return q})),r.d(e,"D",(function(){return Se})),r.d(e,"E",(function(){return ae})),r.d(e,"F",(function(){return se})),r.d(e,"G",(function(){return te})),r.d(e,"H",(function(){return Zt})),r.d(e,"I",(function(){return Ae})),r.d(e,"J",(function(){return Te})),r.d(e,"K",(function(){return lt})),r.d(e,"L",(function(){return je})),r.d(e,"M",(function(){return Ce}));var o=[];Object.freeze(o);var i={};function s(){return++It.mobxGuid}function a(t){throw c(!1,t),"X"}function c(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(i);function u(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var l=function(){};function p(t){return null!==t&&"object"==typeof t}function d(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function h(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function f(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return p(t)&&!0===t[r]}}function g(t){return t instanceof Map}function y(t){return t instanceof Set}function v(t){var e=new Set;for(var r in t)e.add(r);return Object.getOwnPropertySymbols(t).forEach((function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)})),Array.from(e)}function b(t){return t&&t.toString?t.toString():new String(t).toString()}function m(t){return null===t?null:"object"==typeof t?""+t:t}var O="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_=Symbol("mobx administration"),x=function(){function t(t){void 0===t&&(t="Atom@"+s()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=J.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.reportObserved=function(){return Ht(this)},t.prototype.reportChanged=function(){Bt(),function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.isTracing!==Q.NONE&&Yt(e,t),e.onBecomeStale()),e.dependenciesState=J.STALE}))}(this),Xt()},t.prototype.toString=function(){return this.name},t}(),E=f("Atom",x);function w(t,e,r){void 0===e&&(e=l),void 0===r&&(r=l);var n,o=new x(t);return e!==l&&ce("onBecomeObserved",o,e,n),r!==l&&ae(o,r),o}var j={identity:function(t,e){return t===e},structural:function(t,e){return yr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return yr(t,e,1)}},P=function(t,e){return(P=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -12,4 +12,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var P=function(){return(P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function k(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function A(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(A(arguments[e]));return t}var T=Symbol("mobx did run lazy initializers"),M=Symbol("mobx pending decorators"),N={},C={};function R(t,e){var r=e?N:C;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return I(this),this[t]},set:function(e){I(this),this[t]=e}})}function I(t){var e,r;if(!0!==t[T]){var n=t[M];if(n){d(t,T,!0);var o=D(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var i=k(o),a=i.next();!a.done;a=i.next()){var u=n[a.value];u.propertyCreator(t,u.prop,u.descriptor,u.decoratorTarget,u.decoratorArguments)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}function L(t,e){return function(){var r,n=function(n,o,i,a){if(!0===a)return e(n,o,i,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,M)){var u=n[M];d(n,M,P({},u))}return n[M][o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},R(o,t)};return z(arguments)?(r=o,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function z(t){return(2===t.length||3===t.length)&&("string"==typeof t[1]||"symbol"==typeof t[1])||4===t.length&&!0===t[3]}function B(t,e,r){return je(t)?t:Array.isArray(t)?Z.array(t,{name:r}):p(t)?Z.object(t,void 0,{name:r}):h(t)?Z.map(t,{name:r}):v(t)?Z.set(t,{name:r}):t}function X(t){return t}function H(e){c(e);var r=L(!0,(function(t,r,n,o,i){var a=n?n.initializer?n.initializer.call(t):n.value:void 0;ur(t).addObservableProp(r,a,e)})),n=(void 0!==t&&t.env,r);return n.enhancer=e,n}var U={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Y(t){return null==t?U:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(U);var G=H(B),F=H((function(t,e,r){return null==t||pr(t)||Je(t)||rr(t)||ir(t)?t:Array.isArray(t)?Z.array(t,{name:r,deep:!1}):p(t)?Z.object(t,void 0,{name:r,deep:!1}):h(t)?Z.map(t,{name:r,deep:!1}):v(t)?Z.set(t,{name:r,deep:!1}):u(!1)})),V=H(X),W=H((function(t,e,r){return vr(t,e)?e:t}));function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?X:B}var $={box:function(t,e){arguments.length>2&&q("box");var r=Y(e);return new St(t,K(r),r.name,!0,r.equals)},array:function(t,e){arguments.length>2&&q("array");var r=Y(e);return We(t,K(r),r.name)},map:function(t,e){arguments.length>2&&q("map");var r=Y(e);return new er(t,K(r),r.name)},set:function(t,e){arguments.length>2&&q("set");var r=Y(e);return new or(t,K(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&q("object");var n=Y(r);if(!1===n.proxy)return le({},t,e,n);var o=fe(n),i=le({},void 0,void 0,n),a=Be(i);return pe(a,t,e,o),a},ref:V,shallow:F,deep:G,struct:W},Z=function(t,e,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return G.apply(null,arguments);if(je(t))return t;var n=p(t)?Z.object(t,e,r):Array.isArray(t)?Z.array(t,e):h(t)?Z.map(t,e):v(t)?Z.set(t,e):t;if(n!==t)return n;u(!1)};function q(t){u("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys($).forEach((function(t){return Z[t]=$[t]}));var J,Q,tt=L(!1,(function(t,e,r,n,o){var i=r.get,a=r.set,u=o[0]||{};ur(t).addComputedProp(t,e,P({get:i,set:a,context:t},u))})),et=tt({equals:x.structural}),rt=function(t,e,r){if("string"==typeof e)return tt.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return tt.apply(null,arguments);var n="object"==typeof e?e:{};return n.get=t,n.set="function"==typeof e?e:n.set,n.name=n.name||t.name||"",new kt(n)};rt.struct=et,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"}(J||(J={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Q||(Q={}));var nt=function(t){this.cause=t};function ot(t){return t instanceof nt}function it(t){switch(t.dependenciesState){case J.UP_TO_DATE:return!1;case J.NOT_TRACKING:case J.STALE:return!0;case J.POSSIBLY_STALE:for(var e=dt(!0),r=ft(),n=t.observing,o=n.length,i=0;i<o;i++){var a=n[i];if(At(a)){if(Rt.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return pt(r),yt(e),!0}if(t.dependenciesState===J.STALE)return pt(r),yt(e),!0}}return ht(t),pt(r),yt(e),!1}}function at(){return null!==Rt.trackingDerivation}function ut(t){var e=t.observers.size>0;Rt.computationDepth>0&&e&&u(!1),Rt.allowStateChanges||!e&&"strict"!==Rt.enforceActions||u(!1)}function ct(t,e,r){var n=dt(!0);ht(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Rt.runId;var o,i=Rt.trackingDerivation;if(Rt.trackingDerivation=t,!0===Rt.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new nt(t)}return Rt.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=J.UP_TO_DATE,o=0,i=t.unboundDepsCount,a=0;a<i;a++){0===(u=r[a]).diffValue&&(u.diffValue=1,o!==a&&(r[o]=u),o++),u.dependenciesState>n&&(n=u.dependenciesState)}r.length=o,t.newObserving=null,i=e.length;for(;i--;){0===(u=e[i]).diffValue&&Lt(u,t),u.diffValue=0}for(;o--;){var u;1===(u=r[o]).diffValue&&(u.diffValue=0,It(u,t))}n!==J.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),yt(n),o}function st(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)Lt(e[r],t);t.dependenciesState=J.NOT_TRACKING}function lt(t){var e=ft();try{return t()}finally{pt(e)}}function ft(){var t=Rt.trackingDerivation;return Rt.trackingDerivation=null,t}function pt(t){Rt.trackingDerivation=t}function dt(t){var e=Rt.allowStateReads;return Rt.allowStateReads=t,e}function yt(t){Rt.allowStateReads=t}function ht(t){if(t.dependenciesState!==J.UP_TO_DATE){t.dependenciesState=J.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=J.UP_TO_DATE}}var vt=0,bt=1,gt=Object.getOwnPropertyDescriptor((function(){}),"name");gt&&gt.configurable;function mt(t,e,r){var n=function(){return Ot(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,r,n){var o=wt(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{_t(o)}}function wt(t,e,r){var n=0,o=ft();Bt();var i={prevDerivation:o,prevAllowStateChanges:Et(!0),prevAllowStateReads:dt(!0),notifySpy:!1,startTime:n,actionId:bt++,parentActionId:vt};return vt=i.actionId,i}function _t(t){vt!==t.actionId&&u("invalid action stack. did you forget to finish an action?"),vt=t.parentActionId,void 0!==t.error&&(Rt.suppressReactionErrors=!0),xt(t.prevAllowStateChanges),yt(t.prevAllowStateReads),Xt(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function jt(t,e){var r,n=Et(t);try{r=e()}finally{xt(n)}return r}function Et(t){var e=Rt.allowStateChanges;return Rt.allowStateChanges=t,e}function xt(t){Rt.allowStateChanges=t}var St=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+a()),void 0===o&&(o=!0),void 0===i&&(i=x.default);var u=t.call(this,n)||this;return u.enhancer=r,u.name=n,u.equals=i,u.hasUnreportedChange=!1,u.value=r(e,void 0,n),u}return function(t,e){function r(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){this.value;if((t=this.prepareNewValue(t))!==Rt.UNCHANGED){0,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(ut(this),Xe(this)){var e=Ue(this,{object:this,type:"update",newValue:t});if(!e)return Rt.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Rt.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),Ye(this)&&Fe(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return He(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ge(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(_),Pt=y("ObservableValue",St),kt=function(){function t(t){this.dependenciesState=J.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=J.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+a(),this.value=new nt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Q.NONE,c(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+a(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?x.structural:x.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==J.UP_TO_DATE)return;t.lowestObserverState=J.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.dependenciesState=J.POSSIBLY_STALE,e.isTracing!==Q.NONE&&Ut(e,t),e.onBecomeStale())}))}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.get=function(){this.isComputing&&u("Cycle detected in computation "+this.name+": "+this.derivation),0!==Rt.inBatch||0!==this.observers.size||this.keepAlive?(Ht(this),it(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.POSSIBLY_STALE?e.dependenciesState=J.STALE:e.dependenciesState===J.UP_TO_DATE&&(t.lowestObserverState=J.UP_TO_DATE)}))}(this)):it(this)&&(this.warnAboutUntrackedRead(),Bt(),this.value=this.computeValue(!1),Xt());var t=this.value;if(ot(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ot(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else c(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===J.NOT_TRACKING,r=this.computeValue(!0),n=e||ot(t)||ot(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Rt.computationDepth++,t)e=ct(this,this.derivation,this.scope);else if(!0===Rt.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new nt(t)}return Rt.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(st(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,o=void 0;return ne((function(){var i=r.get();if(!n||e){var a=ft();t({type:"update",object:r,newValue:i,oldValue:o}),pt(a)}n=!1,o=i}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return m(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),At=y("ComputedValue",kt),Dt=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Tt={};function Mt(){return"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:Tt}var Nt=!0,Ct=!1,Rt=function(){var t=Mt();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Nt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new Dt).version&&(Nt=!1),Nt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Dt):(setTimeout((function(){Ct||u("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Dt)}();function It(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Lt(t,e){t.observers.delete(e),0===t.observers.size&&zt(t)}function zt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Rt.pendingUnobservations.push(t))}function Bt(){Rt.inBatch++}function Xt(){if(0==--Rt.inBatch){Ft();for(var t=Rt.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof kt&&r.suspend())}Rt.pendingUnobservations=[]}}function Ht(t){var e=Rt.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.size&&Rt.inBatch>0&&zt(t),!1)}function Ut(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Q.BREAK){var r=[];!function t(e,r,n){if(r.length>=1e3)return void r.push("(and many more)");r.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return t(e,r,n+1)}))}(de(t),r,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof kt?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}var Yt=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+a()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=J.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+a(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Q.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Rt.pendingReactions.push(this),Ft())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Bt(),this._isScheduled=!1,it(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Xt()}},t.prototype.track=function(t){if(!this.isDisposed){Bt();0,this._isRunning=!0;var e=ct(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&st(this),ot(e)&&this.reportExceptionInDerivation(e.cause),Xt()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Rt.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Rt.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,t),Rt.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),st(this),Xt()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[w]=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=!1;"boolean"==typeof t[t.length-1]&&(r=t.pop());var n=Te(t);if(!n)return u(!1);n.isTracing===Q.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled");n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Gt=function(t){return t()};function Ft(){Rt.inBatch>0||Rt.isRunningReactions||Gt(Vt)}function Vt(){Rt.isRunningReactions=!0;for(var t=Rt.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Rt.isRunningReactions=!1}var Wt=y("Reaction",Yt);function Kt(t){var e=Gt;Gt=function(r){return t((function(){return e(r)}))}}function $t(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Zt(){u(!1)}function qt(t){return function(e,r,n){if(n){if(n.value)return{value:mt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,o.call(this))}}}return Jt(t).apply(this,arguments)}}function Jt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){d(this,r,Qt(t,e))}})}}var Qt=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?mt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?mt(t,e):1===arguments.length&&"string"==typeof t?qt(t):!0!==n?qt(e).apply(null,arguments):void d(t,e,mt(t.name||e,r.value,this))};function te(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function ee(t){return"function"==typeof t&&!0===t.isMobxAction}function re(t,e,r){d(t,e,mt(e,r.bind(t)))}function ne(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+a();if(!e.scheduler&&!e.delay)r=new Yt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ie(e),u=!1;r=new Yt(n,(function(){u||(u=!0,o((function(){u=!1,r.isDisposed||r.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(r)}return r.schedule(),r.getDisposer()}Qt.bound=function(t,e,r,n){return!0===n?(re(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return re(this,e,r.value||r.initializer.call(this)),this[e]},set:Zt}:{enumerable:!1,configurable:!0,set:function(t){re(this,e,t)},get:function(){}}};var oe=function(t){return t()};function ie(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:oe}function ae(t,e,r){void 0===r&&(r=i);var n,o,u,c=r.name||"Reaction@"+a(),s=Qt(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),l=!r.scheduler&&!r.delay,f=ie(r),p=!0,d=!1,y=r.compareStructural?x.structural:r.equals||x.default,h=new Yt(c,(function(){p||l?v():d||(d=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(d=!1,!h.isDisposed){var e=!1;h.track((function(){var r=t(h);e=p||!y(u,r),u=r})),p&&r.fireImmediately&&s(u,h),p||!0!==e||s(u,h),p&&(p=!1)}}return h.schedule(),h.getDisposer()}function ue(t,e,r){return ce("onBecomeUnobserved",t,e,r)}function ce(t,e,r,n){var o="function"==typeof n?dr(e,r):dr(e),i="function"==typeof n?n:r,a=t+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[t]?u(!1):function(){var t=o[a];t&&(t.delete(i),0===t.size&&delete o[a])}}function se(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,a=t.reactionRequiresObservable,c=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Rt.pendingReactions.length||Rt.inBatch||Rt.isRunningReactions)&&u("isolateGlobalState should be called before MobX is running any reactions"),Ct=!0,Nt&&(0==--Mt().__mobxInstanceCount&&(Mt().__mobxGlobals=void 0),Rt=new Dt)),void 0!==e){var s=void 0;switch(e){case!0:case"observed":s=!0;break;case!1:case"never":s=!1;break;case"strict":case"always":s="strict";break;default:u("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Rt.enforceActions=s,Rt.allowStateChanges=!0!==s&&"strict"!==s}void 0!==r&&(Rt.computedRequiresReaction=!!r),void 0!==a&&(Rt.reactionRequiresObservable=!!a),void 0!==c&&(Rt.observableRequiresReaction=!!c,Rt.allowStateReads=!Rt.observableRequiresReaction),void 0!==n&&(Rt.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Rt.disableErrorBoundaries=!!o),i&&Kt(i)}function le(t,e,r,n){var o=fe(n=Y(n));return I(t),ur(t,n.name,o.enhancer),e&&pe(t,e,r,o),t}function fe(t){return t.defaultDecorator||(!1===t.deep?V:G)}function pe(t,e,r,n){var o,i;Bt();try{var a=O(e);try{for(var u=k(a),c=u.next();!c.done;c=u.next()){var s=c.value,l=Object.getOwnPropertyDescriptor(e,s);0;var f=(r&&s in r?r[s]:l.get?tt:n)(t,s,l,!0);f&&Object.defineProperty(t,s,f)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}finally{Xt()}}function de(t,e){return ye(dr(t,e))}function ye(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(ye)),n}var he=0;function ve(){this.message="FLOW_CANCELLED"}function be(t){1!==arguments.length&&u("Flow expects 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=this,o=arguments,i=++he,a=Qt(e+" - runid: "+i+" - init",t).apply(n,o),u=void 0,c=new Promise((function(t,n){var o=0;function c(t){var r;u=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,a.next).call(a,t)}catch(t){return n(t)}l(r)}function s(t){var r;u=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,a.throw).call(a,t)}catch(t){return n(t)}l(r)}function l(e){if(!e||"function"!=typeof e.then)return e.done?t(e.value):(u=Promise.resolve(e.value)).then(c,s);e.then(l,n)}r=n,c(void 0)}));return c.cancel=Qt(e+" - runid: "+i+" - cancel",(function(){try{u&&ge(u);var t=a.return(void 0),e=Promise.resolve(t.value);e.then(l,l),ge(e),r(new ve)}catch(t){r(t)}})),c}}function ge(t){"function"==typeof t.cancel&&t.cancel()}function me(t,e){if(null==t)return!1;if(void 0!==e){if(!1===pr(t))return!1;if(!t[w].values.has(e))return!1;var r=dr(t,e);return At(r)}return At(t)}function Oe(t){return arguments.length>1?u(!1):me(t)}function we(t,e){return"string"!=typeof e?u(!1):me(t,e)}function _e(t,e){return null!=t&&(void 0!==e?!!pr(t)&&t[w].values.has(e):pr(t)||!!t[w]||j(t)||Wt(t)||At(t))}function je(t){return 1!==arguments.length&&u(!1),_e(t)}function Ee(t){return pr(t)?t[w].getKeys():rr(t)||ir(t)?Array.from(t.keys()):Je(t)?t.map((function(t,e){return e})):u(!1)}function xe(t){return pr(t)?Ee(t).map((function(e){return t[e]})):rr(t)?Ee(t).map((function(e){return t.get(e)})):ir(t)?Array.from(t.values()):Je(t)?t.slice():u(!1)}function Se(t){return pr(t)?Ee(t).map((function(e){return[e,t[e]]})):rr(t)?Ee(t).map((function(e){return[e,t.get(e)]})):ir(t)?Array.from(t.entries()):Je(t)?t.map((function(t,e){return[e,t]})):u(!1)}function Pe(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return yr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return yr(t).observe(e,r)}(t,e,r)}ve.prototype=Object.create(Error.prototype);var ke={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Ae(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function De(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=ke),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),function t(e,r,n){if(!r.recurseEverything&&!je(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(Pt(e))return t(e.get(),r,n);if(je(e)&&Ee(e),!0===r.detectCycles&&null!==e&&n.has(e))return n.get(e);if(Je(e)||Array.isArray(e)){var o=Ae(n,e,[],r),i=e.map((function(e){return t(e,r,n)}));o.length=i.length;for(var a=0,u=i.length;a<u;a++)o[a]=i[a];return o}if(ir(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===r.exportMapsAsObjects){var c=Ae(n,e,new Set,r);return e.forEach((function(e){c.add(t(e,r,n))})),c}var s=Ae(n,e,[],r);return e.forEach((function(e){s.push(t(e,r,n))})),s}if(rr(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===r.exportMapsAsObjects){var l=Ae(n,e,new Map,r);return e.forEach((function(e,o){l.set(o,t(e,r,n))})),l}var f=Ae(n,e,{},r);return e.forEach((function(e,o){f[o]=t(e,r,n)})),f}var p=Ae(n,e,{},r);return b(e).forEach((function(o){p[o]=t(e[o],r,n)})),p}(t,e,r)}function Te(t){switch(t.length){case 0:return Rt.trackingDerivation;case 1:return dr(t[0]);case 2:return dr(t[0],t[1])}}function Me(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Xt()}}function Ne(t,e,r){return 1===arguments.length||e&&"object"==typeof e?Re(t,e):Ce(t,e,r||{})}function Ce(t,e,r){var n;"number"==typeof r.timeout&&(n=setTimeout((function(){if(!i[w].isDisposed){i();var t=new Error("WHEN_TIMEOUT");if(!r.onError)throw t;r.onError(t)}}),r.timeout)),r.name=r.name||"When@"+a();var o=mt(r.name+"-effect",e),i=ne((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function Re(t,e){var r;var n=new Promise((function(n,o){var i=Ce(t,n,P(P({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Ie(t){return t[w]}function Le(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var ze={has:function(t,e){if(e===w||"constructor"===e||e===T)return!0;var r=Ie(t);return Le(e)?r.has(e):e in t},get:function(t,e){if(e===w||"constructor"===e||e===T)return t[e];var r=Ie(t),n=r.values.get(e);if(n instanceof _){var o=n.get();return void 0===o&&r.has(e),o}return Le(e)&&r.has(e),t[e]},set:function(t,e,r){return!!Le(e)&&(function t(e,r,n){if(2!==arguments.length||ir(e))if(pr(e)){var o=e[w],i=o.values.get(r);i?o.write(r,n):o.addObservableProp(r,n,o.defaultEnhancer)}else if(rr(e))e.set(r,n);else if(ir(e))e.add(r);else{if(!Je(e))return u(!1);"number"!=typeof r&&(r=parseInt(r,10)),c(r>=0,"Not a valid index: '"+r+"'"),Bt(),r>=e.length&&(e.length=r+1),e[r]=n,Xt()}else{Bt();var a=r;try{for(var s in a)t(e,s,a[s])}finally{Xt()}}}(t,e,r),!0)},deleteProperty:function(t,e){return!!Le(e)&&(Ie(t).remove(e),!0)},ownKeys:function(t){return Ie(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return u("Dynamic observable objects cannot be frozen"),!1}};function Be(t){var e=new Proxy(t,ze);return t[w].proxy=e,e}function Xe(t){return void 0!==t.interceptors&&t.interceptors.length>0}function He(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ue(t,e){var r=ft();try{for(var n=D(t.interceptors||[]),o=0,i=n.length;o<i&&(c(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{pt(r)}}function Ye(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function Ge(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Fe(t,e){var r=ft(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);pt(r)}}var Ve={get:function(t,e){return e===w?t[w]:"length"===e?t[w].getArrayLength():"number"==typeof e?$e.get.call(t,e):"string"!=typeof e||isNaN(e)?$e.hasOwnProperty(e)?$e[e]:t[e]:$e.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[w].setArrayLength(r),"number"==typeof e&&$e.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:$e.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return u("Observable arrays cannot be frozen"),!1}};function We(t,e,r,n){void 0===r&&(r="ObservableArray@"+a()),void 0===n&&(n=!1);var o,i,u,c=new Ke(r,e,n);o=c.values,i=w,u=c,Object.defineProperty(o,i,{enumerable:!1,writable:!1,configurable:!0,value:u});var s=new Proxy(c.values,Ve);if(c.proxy=s,t&&t.length){var l=Et(!0);c.spliceWithArray(0,0,t),xt(l)}return s}var Ke=function(){function t(t,e,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(t||"ObservableArray@"+a()),this.enhancer=function(r,n){return e(r,n,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return He(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ge(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var r=new Array(t-e),n=0;n<t-e;n++)r[n]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=e},t.prototype.spliceWithArray=function(t,e,r){var n=this;ut(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:null==e?0:Math.max(0,Math.min(e,i-t)),void 0===r&&(r=o),Xe(this)){var a=Ue(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:r});if(!a)return o;e=a.removedCount,r=a.added}r=0===r.length?r:r.map((function(t){return n.enhancer(t,void 0)}));var u=this.spliceItemsIntoValues(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice(t,r,u),this.dehanceValues(u)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,D([t,e],r));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,r){var n=!this.owned&&!1,o=Ye(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Fe(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Ye(this),i=o||n?{object:this.proxy,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom.reportChanged(),o&&Fe(this,i)},t}(),$e={intercept:function(t){return this[w].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[w].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[w];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[w];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(t);case 2:return o.spliceWithArray(t,e)}return o.spliceWithArray(t,e,r)},spliceWithArray:function(t,e,r){return this[w].spliceWithArray(t,e,r)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[w];return r.spliceWithArray(r.values.length,0,t),r.values.length},pop:function(){return this.splice(Math.max(this[w].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[w];return r.spliceWithArray(0,0,t),r.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[w],r=e.dehanceValues(e.values).indexOf(t);return r>-1&&(this.splice(r,1),!0)},get:function(t){var e=this[w];if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(t,e){var r=this[w],n=r.values;if(t<n.length){ut(r.atom);var o=n[t];if(Xe(r)){var i=Ue(r,{type:"update",object:r.proxy,index:t,newValue:e});if(!i)return;e=i.newValue}(e=r.enhancer(e,o))!==o&&(n[t]=e,r.notifyArrayChildUpdate(t,e,o))}else{if(t!==n.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+n.length);r.spliceWithArray(t,0,[e])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){"function"==typeof Array.prototype[t]&&($e[t]=function(){var e=this[w];e.atom.reportObserved();var r=e.dehanceValues(e.values);return r[t].apply(r,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(t){"function"==typeof Array.prototype[t]&&($e[t]=function(e,r){var n=this,o=this[w];return o.atom.reportObserved(),o.dehanceValues(o.values)[t]((function(t,o){return e.call(r,t,o,n)}),r)})})),["reduce","reduceRight"].forEach((function(t){$e[t]=function(){var e=this,r=this[w];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(t,o,i){return o=r.dehanceValue(o),n(t,o,i,e)},r.values[t].apply(r.values,arguments)}}));var Ze,qe=y("ObservableArrayAdministration",Ke);function Je(t){return f(t)&&qe(t[w])}var Qe,tr={},er=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+a()),this.enhancer=e,this.name=r,this[Ze]=tr,this._keysAtom=E(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Rt.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new St(this._has(t),X,this.name+"."+g(t)+"?",!1);this._hasMap.set(t,n),ue(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(Xe(this)){var n=Ue(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!n)return this;e=n.newValue}return r?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if((ut(this._keysAtom),Xe(this))&&!(n=Ue(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Ye(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Me((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Fe(this,n),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);r&&r.setNewValue(e)},t.prototype._updateValue=function(t,e){var r=this._data.get(t);if((e=r.prepareNewValue(e))!==Rt.UNCHANGED){var n=Ye(this),o=n?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;0,r.setNewValue(e),n&&Fe(this,o)}},t.prototype._addValue=function(t,e){var r=this;ut(this._keysAtom),Me((function(){var n=new St(e,r.enhancer,r.name+"."+g(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=Ye(this),o=n?{type:"add",object:this,name:t,newValue:e}:null;n&&Fe(this,o)},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:t.get(o)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(Ze=w,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var r,n;try{for(var o=k(this),i=o.next();!i.done;i=o.next()){var a=A(i.value,2),u=a[0],c=a[1];t.call(e,c,u,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(t){var e=this;return rr(t)&&(t=t.toJS()),Me((function(){var r=Et(!0);try{p(t)?b(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=A(t,2),n=r[0],o=r[1];return e.set(n,o)})):h(t)?(t.constructor!==Map&&u("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,r){return e.set(r,t)}))):null!=t&&u("Cannot initialize map from "+t)}finally{xt(r)}})),this},t.prototype.clear=function(){var t=this;Me((function(){lt((function(){var e,r;try{for(var n=k(t.keys()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return Me((function(){var r,n,o,i,a=function(t){if(h(t)||rr(t))return t;if(Array.isArray(t))return new Map(t);if(p(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return u("Cannot convert to map from '"+t+"'")}(t),c=new Map,s=!1;try{for(var l=k(e._data.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;if(!a.has(d))if(e.delete(d))s=!0;else{var y=e._data.get(d);c.set(d,y)}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}try{for(var v=k(a.entries()),b=v.next();!b.done;b=v.next()){var g=A(b.value,2),m=(d=g[0],y=g[1],e._data.has(d));if(e.set(d,y),e._data.has(d)){var O=e._data.get(d);c.set(d,O),m||(s=!0)}}}catch(t){o={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}if(!s)if(e._data.size!==c.size)e._keysAtom.reportChanged();else for(var w=e._data.keys(),_=c.keys(),j=w.next(),E=_.next();!j.done;){if(j.value!==E.value){e._keysAtom.reportChanged();break}j=w.next(),E=_.next()}e._data=c})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,r={};try{for(var n=k(this),o=n.next();!o.done;o=n.next()){var i=A(o.value,2),a=i[0],u=i[1];r["symbol"==typeof a?a:g(a)]=u}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map((function(e){return g(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return Ge(this,t)},t.prototype.intercept=function(t){return He(this,t)},t}(),rr=y("ObservableMap",er),nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+a()),this.name=r,this[Qe]=nr,this._data=new Set,this._atom=E(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Me((function(){lt((function(){var e,r;try{for(var n=k(t._data.values()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.forEach=function(t,e){var r,n;try{for(var o=k(this),i=o.next();!i.done;i=o.next()){var a=i.value;t.call(e,a,a,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((ut(this._atom),Xe(this))&&!(n=Ue(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Me((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=Ye(this),n=r?{type:"add",object:this,newValue:t}:null;0,r&&Fe(this,n)}return this},t.prototype.delete=function(t){var e=this;if(Xe(this)&&!(n=Ue(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Ye(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Me((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Fe(this,n),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=Array.from(this.keys()),r=Array.from(this.values());return mr({next:function(){var n=t;return t+=1,n<r.length?{value:[e[n],r[n]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t=this,e=0,r=Array.from(this._data.values());return mr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return ir(t)&&(t=t.toJS()),Me((function(){var r=Et(!0);try{Array.isArray(t)||v(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&u("Cannot initialize set from "+t)}finally{xt(r)}})),this},t.prototype.observe=function(t,e){return Ge(this,t)},t.prototype.intercept=function(t){return He(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(Qe=w,Symbol.iterator)]=function(){return this.values()},t}(),ir=y("ObservableSet",or),ar=function(){function t(t,e,r,n){void 0===e&&(e=new Map),this.target=t,this.values=e,this.name=r,this.defaultEnhancer=n,this.keysAtom=new _(r+".keys")}return t.prototype.read=function(t){return this.values.get(t).get()},t.prototype.write=function(t,e){var r=this.target,n=this.values.get(t);if(n instanceof kt)n.set(e);else{if(Xe(this)){if(!(i=Ue(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=i.newValue}if((e=n.prepareNewValue(e))!==Rt.UNCHANGED){var o=Ye(this),i=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;0,n.setNewValue(e),o&&Fe(this,i)}}},t.prototype.has=function(t){var e=this.pendingKeys||(this.pendingKeys=new Map),r=e.get(t);if(r)return r.get();var n=!!this.values.get(t);return r=new St(n,X,this.name+"."+g(t)+"?",!1),e.set(t,r),r.get()},t.prototype.addObservableProp=function(t,e,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(Xe(this)){var o=Ue(this,{object:this.proxy||n,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new St(e,r,this.name+"."+g(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return cr[t]||(cr[t]={configurable:!0,enumerable:!0,get:function(){return this[w].read(t)},set:function(e){this[w].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,r){var n,o,i,a=this.target;r.name=r.name||this.name+"."+g(e),this.values.set(e,new kt(r)),(t===a||(n=t,o=e,!(i=Object.getOwnPropertyDescriptor(n,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return sr[t]||(sr[t]={configurable:Rt.computedConfigurable,enumerable:!1,get:function(){return lr(this).read(t)},set:function(e){lr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Xe(this))if(!(a=Ue(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Ye(this),n=this.values.get(t),o=n&&n.get();if(n&&n.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var i=this.pendingKeys.get(t);i&&i.set(!1)}delete this.target[t];var a=r?{type:"remove",object:this.proxy||e,oldValue:o,name:t}:null;0,r&&Fe(this,a)}finally{Xt()}}},t.prototype.illegalAccess=function(t,e){console.warn("Property '"+e+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(t,e){return Ge(this,t)},t.prototype.intercept=function(t){return He(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Ye(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Fe(this,n),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var r=[];try{for(var n=k(this.values),o=n.next();!o.done;o=n.next()){var i=A(o.value,2),a=i[0];i[1]instanceof St&&r.push(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t}();function ur(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=B),Object.prototype.hasOwnProperty.call(t,w))return t[w];p(t)||(e=(t.constructor.name||"ObservableObject")+"@"+a()),e||(e="ObservableObject@"+a());var n=new ar(t,new Map,g(e),r);return d(t,w,n),n}var cr=Object.create(null),sr=Object.create(null);function lr(t){var e=t[w];return e||(I(t),t[w])}var fr=y("ObservableObjectAdministration",ar);function pr(t){return!!f(t)&&(I(t),fr(t[w]))}function dr(t,e){if("object"==typeof t&&null!==t){if(Je(t))return void 0!==e&&u(!1),t[w].atom;if(ir(t))return t[w];if(rr(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||u(!1),n)}var n;if(I(t),e&&!t[w]&&t[e],pr(t))return e?((n=t[w].values.get(e))||u(!1),n):u(!1);if(j(t)||At(t)||Wt(t))return t}else if("function"==typeof t&&Wt(t[w]))return t[w];return u(!1)}function yr(t,e){return t||u("Expecting some object"),void 0!==e?yr(dr(t,e)):j(t)||At(t)||Wt(t)||rr(t)||ir(t)?t:(I(t),t[w]?t[w]:void u(!1))}var hr=Object.prototype.toString;function vr(t,e,r){return void 0===r&&(r=-1),function t(e,r,n,o,i){if(e===r)return 0!==e||1/e==1/r;if(null==e||null==r)return!1;if(e!=e)return r!=r;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof r)return!1;var u=hr.call(e);if(u!==hr.call(r))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:0==+e?1/+e==1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(r);case"[object Map]":case"[object Set]":n>=0&&n++}e=br(e),r=br(r);var c="[object Array]"===u;if(!c){if("object"!=typeof e||"object"!=typeof r)return!1;var s=e.constructor,l=r.constructor;if(s!==l&&!("function"==typeof s&&s instanceof s&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in r)return!1}if(0===n)return!1;n<0&&(n=-1);i=i||[];var f=(o=o||[]).length;for(;f--;)if(o[f]===e)return i[f]===r;if(o.push(e),i.push(r),c){if((f=e.length)!==r.length)return!1;for(;f--;)if(!t(e[f],r[f],n-1,o,i))return!1}else{var p=Object.keys(e),d=void 0;if(f=p.length,Object.keys(r).length!==f)return!1;for(;f--;)if(d=p[f],!gr(r,d)||!t(e[d],r[d],n-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,r)}function br(t){return Je(t)?t.slice():h(t)||rr(t)||v(t)||ir(t)?Array.from(t.entries()):t}function gr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function mr(t){return t[Symbol.iterator]=Or,t}function Or(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:$t,extras:{getDebugName:function(t,e){return(void 0!==e?dr(t,e):pr(t)||rr(t)||ir(t)?yr(t):dr(t)).name}},$mobx:w})}).call(this,r(150),r(74))},function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return g})),r.d(e,"c",(function(){return X})),r.d(e,"d",(function(){return H})),r.d(e,"e",(function(){return h})),r.d(e,"f",(function(){return b})),r.d(e,"g",(function(){return h})),r.d(e,"h",(function(){return B})),r.d(e,"i",(function(){return o})),r.d(e,"j",(function(){return z})),r.d(e,"k",(function(){return S}));var n,o,i,a,u,c,s,l={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(t,e){for(var r in e)t[r]=e[r];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,r){var o,i,a,u={};for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:u[a]=e[a];if(arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===u[a]&&(u[a]=t.defaultProps[a]);return v(t,u,o,i,null)}function v(t,e,r,n,a){var u={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=o.vnode&&o.vnode(u),u}function b(){return{current:null}}function g(t){return t.children}function m(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 r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?O(t):null}function w(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return w(t)}}function _(t){(!t.__d&&(t.__d=!0)&&a.push(t)&&!j.__r++||c!==o.debounceRendering)&&((c=o.debounceRendering)||u)(j)}function j(){for(var t;j.__r=a.length;)t=a.sort((function(t,e){return t.__v.__b-e.__v.__b})),a=[],t.some((function(t){var e,r,n,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(r=[],(n=d({},o)).__v=o.__v+1,M(a,o,n,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?O(o):i,o.__h),N(r,o),o.__e!=i&&w(o)))}))}function E(t,e,r,n,o,i,a,u,c,s){var p,d,y,h,b,m,w,_=n&&n.__k||f,j=_.length;for(r.__k=[],p=0;p<e.length;p++)if(null!=(h=r.__k[p]=null==(h=e[p])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?v(null,h,null,null,h):Array.isArray(h)?v(g,{children:h},null,null,null):h.__b>0?v(h.type,h.props,h.key,null,h.__v):h)){if(h.__=r,h.__b=r.__b+1,null===(y=_[p])||y&&h.key==y.key&&h.type===y.type)_[p]=void 0;else for(d=0;d<j;d++){if((y=_[d])&&h.key==y.key&&h.type===y.type){_[d]=void 0;break}y=null}M(t,h,y=y||l,o,i,a,u,c,s),b=h.__e,(d=h.ref)&&y.ref!=d&&(w||(w=[]),y.ref&&w.push(y.ref,null,h),w.push(d,h.__c||b,h)),null!=b?(null==m&&(m=b),"function"==typeof h.type&&h.__k===y.__k?h.__d=c=x(h,c,t):c=P(t,h,y,_,b,c),"function"==typeof r.type&&(r.__d=c)):c&&y.__e==c&&c.parentNode!=t&&(c=O(y))}for(r.__e=m,p=j;p--;)null!=_[p]&&("function"==typeof r.type&&null!=_[p].__e&&_[p].__e==r.__d&&(r.__d=O(n,p+1)),I(_[p],_[p]));if(w)for(p=0;p<w.length;p++)R(w[p],w[++p],w[++p])}function x(t,e,r){for(var n,o=t.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=t,e="function"==typeof n.type?x(n,e,r):P(r,n,n,o,n.__e,e));return e}function S(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){S(t,e)})):e.push(t)),e}function P(t,e,r,n,o,i){var a,u,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==r||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<n.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,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||p.test(e)?r:r+"px"}function A(t,e,r,n,o){var i;t:if("style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||k(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||k(t.style,e,r[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]=r,r?n||t.addEventListener(e,i?T:D,i):t.removeEventListener(e,i?T: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==r?"":r;break t}catch(t){}"function"==typeof r||(null!=r&&(!1!==r||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,r):t.removeAttribute(e))}}function D(t){this.l[t.type+!1](o.event?o.event(t):t)}function T(t){this.l[t.type+!0](o.event?o.event(t):t)}function M(t,e,r,n,i,a,u,c,s){var l,f,p,y,h,v,b,O,w,_,j,x=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(s=r.__h,c=e.__e=r.__e,e.__h=null,a=[c]),(l=o.__b)&&l(e);try{t:if("function"==typeof x){if(O=e.props,w=(l=x.contextType)&&n[l.__c],_=l?w?w.props.value:l.__:n,r.__c?b=(f=e.__c=r.__c).__=f.__E:("prototype"in x&&x.prototype.render?e.__c=f=new x(O,_):(e.__c=f=new m(O,_),f.constructor=x,f.render=L),w&&w.sub(f),f.props=O,f.state||(f.state={}),f.context=_,f.__n=n,p=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=x.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=d({},f.__s)),d(f.__s,x.getDerivedStateFromProps(O,f.__s))),y=f.props,h=f.state,p)null==x.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==x.getDerivedStateFromProps&&O!==y&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(O,_),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(O,f.__s,_)||e.__v===r.__v){f.props=O,f.state=f.__s,e.__v!==r.__v&&(f.__d=!1),f.__v=e,e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),f.__h.length&&u.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(O,f.__s,_),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(y,h,v)}))}f.context=_,f.props=O,f.state=f.__s,(l=o.__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&&(n=d(d({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(y,h)),j=null!=l&&l.type===g&&null==l.key?l.props.children:l,E(t,Array.isArray(j)?j:[j],e,r,n,i,a,u,c,s),f.base=e.__e,e.__h=null,f.__h.length&&u.push(f),b&&(f.__E=f.__=null),f.__e=!1}else null==a&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=C(r.__e,e,r,n,i,a,u,s);(l=o.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=c,e.__h=!!s,a[a.indexOf(c)]=null),o.__e(t,e,r)}}function N(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function C(t,e,r,o,i,a,u,c){var s,f,p,d=r.props,h=e.props,v=e.type,b=0;if("svg"===v&&(i=!0),null!=a)for(;b<a.length;b++)if((s=a[b])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,a[b]=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)d===h||c&&t.data===h||(t.data=h);else{if(a=a&&n.call(t.childNodes),f=(d=r.props||l).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!c){if(null!=a)for(d={},b=0;b<t.attributes.length;b++)d[t.attributes[b].name]=t.attributes[b].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||A(t,i,null,r[i],n);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===e[i]||A(t,i,e[i],r[i],n)}(t,h,d,i,c),p)e.__k=[];else if(b=e.props.children,E(t,Array.isArray(b)?b:[b],e,r,o,i&&"foreignObject"!==v,a,u,a?a[0]:r.__k&&O(r,0),c),null!=a)for(b=a.length;b--;)null!=a[b]&&y(a[b]);c||("value"in h&&void 0!==(b=h.value)&&(b!==d.value||b!==t.value||"progress"===v&&!b)&&A(t,"value",b,d.value,!1),"checked"in h&&void 0!==(b=h.checked)&&b!==t.checked&&A(t,"checked",b,d.checked,!1))}return t}function R(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,r)}}function I(t,e,r){var n,i;if(o.unmount&&o.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||R(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){o.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&I(n[i],e,"function"!=typeof t.type);r||null==t.__e||y(t.__e),t.__e=t.__d=void 0}function L(t,e,r){return this.constructor(t,r)}function z(t,e,r){var i,a,u;o.__&&o.__(t,e),a=(i="function"==typeof r)?null:r&&r.__k||e.__k,u=[],M(e,t=(!i&&r||e).__k=h(g,null,[t]),a||l,l,void 0!==e.ownerSVGElement,!i&&r?[r]:a?null:e.firstChild?n.call(e.childNodes):null,u,!i&&r?r:a?a.__e:e.firstChild,i),N(u,t)}function B(t,e){z(t,e,B)}function X(t,e,r){var o,i,a,u=d({},t.props);for(a in e)"key"==a?o=e[a]:"ref"==a?i=e[a]:u[a]=e[a];return arguments.length>2&&(u.children=arguments.length>3?n.call(arguments,2):r),v(t.type,u,o||t.key,i||t.ref,null)}function H(t,e){var r={__c:e="__cC"+s++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(_)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n=f.slice,o={__e:function(t,e){for(var r,n,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t),o=r.__d),o)return r.__E=r}catch(e){t=e}throw t}},i=0,m.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(d({},r),this.props)),t&&d(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),_(this))},m.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),_(this))},m.prototype.render=g,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j.__r=0,s=0},function(t,e,r){var n=r(114),o=r(45),i=r(172);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";var n=r(39),o=r(75),i=r(65),a=r(57),u=r(108),c=a.set,s=a.getterFor("Array Iterator");t.exports=u(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=s(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){"use strict";var n=r(17),o=r(9),i=r(49),a=r(95),u=r(36),c=r(15),s=r(77),l=r(35),f=r(104),p=r(19),d=r(34),y=r(93),h=r(29),v=r(33),b=r(55),g=r(82),m=r(32),O=r(38),w=r(39),_=r(81),j=r(40),E=r(66),x=r(52),S=r(61),P=r(67),k=r(133),A=r(109),D=r(54),T=r(37),M=r(86),N=r(117),C=r(45),R=r(76),I=r(85),L=r(64),z=r(78),B=r(27),X=r(144),H=r(145),U=r(89),Y=r(57),G=r(68).forEach,F=I("hidden"),V=B("toPrimitive"),W=Y.set,K=Y.getterFor("Symbol"),$=Object.prototype,Z=o.Symbol,q=Z&&Z.prototype,J=o.TypeError,Q=o.QObject,tt=i("JSON","stringify"),et=D.f,rt=T.f,nt=k.f,ot=M.f,it=c([].push),at=R("symbols"),ut=R("op-symbols"),ct=R("string-to-symbol-registry"),st=R("symbol-to-string-registry"),lt=R("wks"),ft=!Q||!Q.prototype||!Q.prototype.findChild,pt=l&&p((function(){return 7!=x(rt({},"a",{get:function(){return rt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=et($,e);n&&delete $[e],rt(t,e,r),n&&t!==$&&rt($,e,n)}:rt,dt=function(t,e){var r=at[t]=x(q);return W(r,{type:"Symbol",tag:t,description:e}),l||(r.description=e),r},yt=function(t,e,r){t===$&&yt(ut,e,r),m(t);var n=_(e);return m(r),d(at,n)?(r.enumerable?(d(t,F)&&t[F][n]&&(t[F][n]=!1),r=x(r,{enumerable:E(0,!1)})):(d(t,F)||rt(t,F,E(1,{})),t[F][n]=!0),pt(t,n,r)):rt(t,n,r)},ht=function(t,e){m(t);var r=w(e),n=S(r).concat(mt(r));return G(n,(function(e){l&&!u(vt,r,e)||yt(t,e,r[e])})),t},vt=function(t){var e=_(t),r=u(ot,this,e);return!(this===$&&d(at,e)&&!d(ut,e))&&(!(r||!d(this,e)||!d(at,e)||d(this,F)&&this[F][e])||r)},bt=function(t,e){var r=w(t),n=_(e);if(r!==$||!d(at,n)||d(ut,n)){var o=et(r,n);return!o||!d(at,n)||d(r,F)&&r[F][n]||(o.enumerable=!0),o}},gt=function(t){var e=nt(w(t)),r=[];return G(e,(function(t){d(at,t)||d(L,t)||it(r,t)})),r},mt=function(t){var e=t===$,r=nt(e?ut:w(t)),n=[];return G(r,(function(t){!d(at,t)||e&&!d($,t)||it(n,at[t])})),n};(f||(C(q=(Z=function(){if(b(q,this))throw J("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?j(arguments[0]):void 0,e=z(t),r=function(t){this===$&&u(r,ut,t),d(this,F)&&d(this[F],e)&&(this[F][e]=!1),pt(this,e,E(1,t))};return l&&ft&&pt($,e,{configurable:!0,set:r}),dt(e,t)}).prototype,"toString",(function(){return K(this).tag})),C(Z,"withoutSetter",(function(t){return dt(z(t),t)})),M.f=vt,T.f=yt,D.f=bt,P.f=k.f=gt,A.f=mt,X.f=function(t){return dt(B(t),t)},l&&(rt(q,"description",{configurable:!0,get:function(){return K(this).description}}),s||C($,"propertyIsEnumerable",vt,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:Z}),G(S(lt),(function(t){H(t)})),n({target:"Symbol",stat:!0,forced:!f},{for:function(t){var e=j(t);if(d(ct,e))return ct[e];var r=Z(e);return ct[e]=r,st[r]=e,r},keyFor:function(t){if(!g(t))throw J(t+" is not a symbol");if(d(st,t))return st[t]},useSetter:function(){ft=!0},useSimple:function(){ft=!1}}),n({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?x(t):ht(x(t),e)},defineProperty:yt,defineProperties:ht,getOwnPropertyDescriptor:bt}),n({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:gt,getOwnPropertySymbols:mt}),n({target:"Object",stat:!0,forced:p((function(){A.f(1)}))},{getOwnPropertySymbols:function(t){return A.f(O(t))}}),tt)&&n({target:"JSON",stat:!0,forced:!f||p((function(){var t=Z();return"[null]"!=tt([t])||"{}"!=tt({a:t})||"{}"!=tt(Object(t))}))},{stringify:function(t,e,r){var n=N(arguments),o=e;if((v(e)||void 0!==t)&&!g(t))return y(e)||(e=function(t,e){if(h(o)&&(e=u(o,this,t,e)),!g(e))return e}),n[1]=e,a(tt,null,n)}});if(!q[V]){var Ot=q.valueOf;C(q,V,(function(t){return u(Ot,this)}))}U(Z,"Symbol"),L[F]=!0},function(t,e,r){var n=r(9),o=r(142),i=r(143),a=r(3),u=r(53),c=r(27),s=c("iterator"),l=c("toStringTag"),f=a.values,p=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 r in a)if(t[r]!==a[r])try{u(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var d in o)p(n[d]&&n[d].prototype,d);p(i,"DOMTokenList")},function(t,e,r){"use strict";var n=r(141).charAt,o=r(40),i=r(57),a=r(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),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){"use strict";var n=r(17),o=r(35),i=r(9),a=r(15),u=r(34),c=r(29),s=r(55),l=r(40),f=r(37).f,p=r(128),d=i.Symbol,y=d&&d.prototype;if(o&&c(d)&&(!("description"in y)||void 0!==d().description)){var h={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(y,this)?new d(t):void 0===t?d():d(t);return""===t&&(h[e]=!0),e};p(v,d),v.prototype=y,y.constructor=v;var b="Symbol(test)"==String(d("test")),g=a(y.toString),m=a(y.valueOf),O=/^Symbol\((.*)\)[^)]+$/,w=a("".replace),_=a("".slice);f(y,"description",{configurable:!0,get:function(){var t=m(this),e=g(t);if(u(h,t))return"";var r=b?_(e,7,-1):w(e,O,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},function(t,e,r){r(145)("iterator")},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(74))},function(t,e,r){"use strict";r.d(e,"a",(function(){return a.a})),r.d(e,"c",(function(){return a.e})),r.d(e,"h",(function(){return O})),r.d(e,"i",(function(){return b})),r.d(e,"j",(function(){return h})),r.d(e,"b",(function(){return D})),r.d(e,"e",(function(){return C})),r.d(e,"f",(function(){return T})),r.d(e,"g",(function(){return it}));var n,o,i,a=r(1),u=0,c=[],s=a.i.__b,l=a.i.__r,f=a.i.diffed,p=a.i.__c,d=a.i.unmount;function y(t,e){a.i.__h&&a.i.__h(o,t,u||e),u=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function h(t){return u=1,v(P,t)}function v(t,e,r){var i=y(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):P(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function b(t,e){var r=y(n++,3);!a.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function g(t,e){var r=y(n++,4);!a.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=y(n++,7);return S(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function O(t,e){return u=8,m((function(){return t}),e)}function w(){var t;for(c.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=c.pop();)if(t.__P)try{t.__H.__h.forEach(E),t.__H.__h.forEach(x),t.__H.__h=[]}catch(e){t.__H.__h=[],a.i.__e(e,t.__v)}}a.i.__b=function(t){o=null,s&&s(t)},a.i.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(E),e.__h.forEach(x),e.__h=[])},a.i.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===a.i.requestAnimationFrame||((i=a.i.requestAnimationFrame)||j)(w)),o=null},a.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(E),t.__h=t.__h.filter((function(t){return!t.__||x(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.i.__e(r,t.__v)}})),p&&p(t,e)},a.i.unmount=function(t){d&&d(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{E(t)}catch(t){e=t}})),e&&a.i.__e(e,r.__v))};var _="function"==typeof requestAnimationFrame;function j(t){var e,r=function(){clearTimeout(n),_&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);_&&(e=requestAnimationFrame(r))}function E(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function x(t){var e=o;t.__c=t.__(),o=e}function S(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function P(t,e){return"function"==typeof e?e(t):e}function k(t,e){for(var r in e)t[r]=e[r];return t}function A(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function D(t){this.props=t}function T(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:A(this.props,t)}function n(e){return this.shouldComponentUpdate=r,Object(a.e)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(D.prototype=new a.a).isPureReactComponent=!0,D.prototype.shouldComponentUpdate=function(t,e){return A(this.props,t)||A(this.state,e)};var M=a.i.__b;a.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),M&&M(t)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function C(t){function e(e,r){var n=k({},e);return delete n.ref,t(n,!(r=e.ref||r)||"object"==typeof r&&!("current"in r)?null:r)}return e.$$typeof=N,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var R=function(t,e){return null==t?null:Object(a.k)(Object(a.k)(t).map(e))},I={map:R,forEach:R,count:function(t){return t?Object(a.k)(t).length:0},only:function(t){var e=Object(a.k)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:a.k},L=a.i.__e;a.i.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e);L(t,e,r)};var z=a.i.unmount;function B(){this.__u=0,this.t=null,this.__b=null}function X(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function H(){this.u=null,this.o=null}a.i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),z&&z(t)},(B.prototype=new a.a).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=X(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(u):u())};r.__R=a;var u=function(){if(!--n.__u){if(n.state.__e){var t=n.state.__e;n.__v.__k[0]=function t(e,r,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)})),e.__c&&e.__c.__P===r&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__e:n.__b=null});e=n.t.pop();)e.forceUpdate()}},c=!0===e.__h;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(a,a)},B.prototype.componentWillUnmount=function(){this.t=[]},B.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,r,n){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=k({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=r),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)}))),e}(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&Object(a.e)(a.b,null,t.fallback);return o&&(o.__h=null),[Object(a.e)(a.b,null,e.__e?null:t.children),o]};var U=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Y(t){return this.getChildContext=function(){return t.context},t.children}function G(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(a.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,r){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),Object(a.j)(Object(a.e)(Y,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(H.prototype=new a.a).__e=function(t){var e=this,r=X(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),U(e,t,n)):o()};r?r(i):i()}},H.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(a.k)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},H.prototype.componentDidUpdate=H.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){U(t,r,e)}))};var F="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,V=/^(?: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]/,W="undefined"!=typeof document,K=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};a.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(a.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var $=a.i.event;function Z(){}function q(){return this.cancelBubble}function J(){return this.defaultPrevented}a.i.event=function(t){return $&&(t=$(t)),t.persist=Z,t.isPropagationStopped=q,t.isDefaultPrevented=J,t.nativeEvent=t};var Q,tt={configurable:!0,get:function(){return this.class}},et=a.i.vnode;a.i.vnode=function(t){var e=t.type,r=t.props,n=r;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in n={},r){var u=r[i];W&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==u||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===u?u="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!K(r.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&&V.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===u&&(u=void 0),n[i]=u)}"select"==e&&n.multiple&&Array.isArray(n.value)&&(n.value=Object(a.k)(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=Object(a.k)(r.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),t.props=n,r.class!=r.className&&(tt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",tt))}t.$$typeof=F,et&&et(t)};var rt=a.i.__r;a.i.__r=function(t){rt&&rt(t),Q=t.__c};var nt={ReactCurrentDispatcher:{current:{readContext:function(t){return Q.__n[t.__c].props.value}}}};function ot(t){return!!t&&t.$$typeof===F}var it=function(t,e){return t(e)},at=a.b,ut={useState:h,useReducer:v,useEffect:b,useLayoutEffect:g,useRef:function(t){return u=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){u=6,g((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:m,useCallback:O,useContext:function(t){var e=o.context[t.__c],r=y(n++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__},useDebugValue:function(t,e){a.i.useDebugValue&&a.i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:I,render:function(t,e,r){return null==e.__k&&(e.textContent=""),Object(a.j)(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return Object(a.h)(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(Object(a.j)(null,t),!0)},createPortal:function(t,e){return Object(a.e)(G,{__v:t,i:e})},createElement:a.e,createContext:a.d,createFactory:function(t){return a.e.bind(null,t)},cloneElement:function(t){return ot(t)?a.c.apply(null,arguments):t},createRef:a.f,Fragment:a.b,isValidElement:ot,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:a.a,PureComponent:D,memo:T,forwardRef:C,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:it,StrictMode:at,Suspense:B,SuspenseList:H,lazy:function(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return Object(a.e)(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:nt};e.d=ut},function(t,e,r){var n=r(9),o=r(142),i=r(143),a=r(173),u=r(53),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(n[s]&&n[s].prototype);c(i)},function(t,e,r){r(17)({target:"Object",stat:!0},{setPrototypeOf:r(111)})},function(t,e,r){var n=r(17),o=r(19),i=r(38),a=r(88),u=r(131);n({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!u},{getPrototypeOf:function(t){return a(i(t))}})},function(t,e,r){var n=r(17),o=r(49),i=r(95),a=r(194),u=r(151),c=r(32),s=r(33),l=r(52),f=r(19),p=o("Reflect","construct"),d=Object.prototype,y=[].push,h=f((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!f((function(){p((function(){}))})),b=h||v;n({target:"Reflect",stat:!0,forced:b,sham:b},{construct:function(t,e){u(t),c(e);var r=arguments.length<3?t:u(arguments[2]);if(v&&!h)return p(t,e,r);if(t==r){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 n=[null];return i(y,n,e),new(i(a,t,n))}var o=r.prototype,f=l(s(o)?o:d),b=i(t,f,e);return s(b)?b:f}})},function(t,e){var r=Function.prototype,n=r.bind,o=r.call,i=n&&n.bind(o);t.exports=n?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,r){"use strict";var n=r(17),o=r(9),i=r(93),a=r(94),u=r(33),c=r(62),s=r(43),l=r(39),f=r(58),p=r(27),d=r(69),y=r(117),h=d("slice"),v=p("species"),b=o.Array,g=Math.max;n({target:"Array",proto:!0,forced:!h},{slice:function(t,e){var r,n,o,p=l(this),d=s(p),h=c(t,d),m=c(void 0===e?d:e,d);if(i(p)&&(r=p.constructor,(a(r)&&(r===b||i(r.prototype))||u(r)&&null===(r=r[v]))&&(r=void 0),r===b||void 0===r))return y(p,h,m);for(n=new(void 0===r?b:r)(g(m-h,0)),o=0;h<m;h++,o++)h in p&&f(n,o,p[h]);return n.length=o,n}})},function(t,e,r){var n=r(9),o=r(54).f,i=r(53),a=r(45),u=r(103),c=r(128),s=r(110);t.exports=function(t,e){var r,l,f,p,d,y=t.target,h=t.global,v=t.stat;if(r=h?n:v?n[y]||u(y,{}):(n[y]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(d=o(r,l))&&d.value:r[l],!s(h?l:y+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(r,l,p,t)}}},function(t,e,r){"use strict";var n=r(17),o=r(96);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){var n=r(17),o=r(38),i=r(61);n({target:"Object",stat:!0,forced:r(19)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){var n=r(17),o=r(19),i=r(39),a=r(54).f,u=r(35),c=o((function(){a(1)}));n({target:"Object",stat:!0,forced:!u||c,sham:!u},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},function(t,e,r){"use strict";var n=r(17),o=r(68).filter;n({target:"Array",proto:!0,forced:!r(69)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(17),o=r(35),i=r(129),a=r(39),u=r(54),c=r(58);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=a(t),o=u.f,s=i(n),l={},f=0;s.length>f;)void 0!==(r=o(n,e=s[f++]))&&c(l,e,r);return l}})},function(t,e,r){var n=r(35),o=r(87).EXISTS,i=r(15),a=r(37).f,u=Function.prototype,c=i(u.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);n&&!o&&a(u,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},function(t,e,r){var n=r(17),o=r(176);n({target:"Array",stat:!0,forced:!r(139)((function(t){Array.from(t)}))},{from:o})},,function(t,e,r){var n=r(9),o=r(76),i=r(34),a=r(78),u=r(104),c=r(123),s=o("wks"),l=n.Symbol,f=l&&l.for,p=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):p(e)}return s[t]}},function(t,e,r){"use strict";var n=r(100),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,r){var n=r(17),o=r(196);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e,r){"use strict";var n=r(17),o=r(9),i=r(19),a=r(93),u=r(33),c=r(38),s=r(43),l=r(58),f=r(115),p=r(69),d=r(27),y=r(79),h=d("isConcatSpreadable"),v=o.TypeError,b=y>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),g=p("concat"),m=function(t){if(!u(t))return!1;var e=t[h];return void 0!==e?!!e:a(t)};n({target:"Array",proto:!0,forced:!b||!g},{concat:function(t){var e,r,n,o,i,a=c(this),u=f(a,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(m(i=-1===e?a:arguments[e])){if(p+(o=s(i))>9007199254740991)throw v("Maximum allowed index exceeded");for(r=0;r<o;r++,p++)r in i&&l(u,p,i[r])}else{if(p>=9007199254740991)throw v("Maximum allowed index exceeded");l(u,p++,i)}return u.length=p,u}})},function(t,e,r){var n=r(9),o=r(33),i=n.String,a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not an object")}},function(t,e,r){var n=r(29);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},function(t,e,r){var n=r(15),o=r(38),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,r){var n=r(19);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e){var r=Function.prototype.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,r){var n=r(9),o=r(35),i=r(124),a=r(32),u=r(81),c=n.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,r){if(a(t),e=u(e),a(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(9),o=r(44),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(73),o=r(44);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(9),o=r(92),i=n.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,r){"use strict";var n=r(17),o=r(68).map;n({target:"Array",proto:!0,forced:!r(69)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return s}));var n=r(10),o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function i(){var t=o(Object(n.j)(0),2)[1];return Object(n.h)((function(){t((function(t){return t+1}))}),[])}function a(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}function u(t){return"function"==typeof Symbol?Symbol.for(t):"__$mobx-react "+t+"__"}var c={};function s(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:c}}).call(this,r(74))},function(t,e,r){var n=r(84);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(9).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},function(t,e,r){var n=r(9),o=r(29),i=r(34),a=r(53),u=r(103),c=r(107),s=r(57),l=r(87).CONFIGURABLE,f=s.get,p=s.enforce,d=String(String).split("String");(t.exports=function(t,e,r,c){var s,f=!!c&&!!c.unsafe,y=!!c&&!!c.enumerable,h=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||l&&r.name!==v)&&a(r,"name",v),(s=p(r)).source||(s.source=d.join("string"==typeof v?v:""))),t!==n?(f?!h&&t[e]&&(y=!0):delete t[e],y?t[e]=r:a(t,e,r)):y?t[e]=r:u(e,r)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||c(this)}))},function(t,e,r){var n=r(17),o=r(36),i=r(33),a=r(32),u=r(195),c=r(54),s=r(88);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,l,f=arguments.length<3?e:arguments[2];return a(e)===f?e[r]:(n=c.f(e,r))?u(n)?n.value:void 0===n.get?void 0:o(n.get,f):i(l=s(e))?t(l,r,f):void 0}})},function(t,e,r){"use strict";(function(t){var n=r(28),o=r(156),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===i?n.a.Buffer:void 0,c=(u?u.isBuffer:void 0)||o.a;e.a=c}).call(this,r(118)(t))},function(t,e,r){"use strict";(function(t){var n=r(100),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.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,r(118)(t))},function(t,e,r){var n=r(9),o=r(29),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},function(t,e,r){var n=r(17),o=r(200).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(15),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){var n,o=r(32),i=r(159),a=r(106),u=r(64),c=r(161),s=r(105),l=r(85),f=l("IE_PROTO"),p=function(){},d=function(t){return"<script>"+t+"<\/script>"},y=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},h=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;h="undefined"!=typeof document?document.domain&&n?y(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):y(n);for(var r=a.length;r--;)delete h.prototype[a[r]];return h()};u[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[f]=t):r=h(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(35),o=r(37),i=r(66);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(35),o=r(36),i=r(86),a=r(66),u=r(39),c=r(81),s=r(34),l=r(124),f=Object.getOwnPropertyDescriptor;e.f=n?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,r){var n=r(15);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(60);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e,r){var n,o,i,a=r(162),u=r(9),c=r(15),s=r(33),l=r(53),f=r(34),p=r(102),d=r(85),y=r(64),h=u.TypeError,v=u.WeakMap;if(a||p.state){var b=p.state||(p.state=new v),g=c(b.get),m=c(b.has),O=c(b.set);n=function(t,e){if(m(b,t))throw new h("Object already initialized");return e.facade=t,O(b,t,e),e},o=function(t){return g(b,t)||{}},i=function(t){return m(b,t)}}else{var w=d("state");y[w]=!0,n=function(t,e){if(f(t,w))throw new h("Object already initialized");return e.facade=t,l(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){"use strict";var n=r(81),o=r(37),i=r(66);t.exports=function(t,e,r){var a=n(e);a in t?o.f(t,a,i(0,r)):t[a]=r}},function(t,e,r){var n=r(17),o=r(201),i=r(75);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e,r){var n=r(9),o=r(29),i=r(83),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},function(t,e,r){var n=r(126),o=r(106);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(63),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?n:r)(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,r){var n=r(126),o=r(106).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(91),o=r(15),i=r(73),a=r(38),u=r(43),c=r(115),s=o([].push),l=function(t){var e=1==t,r=2==t,o=3==t,l=4==t,f=6==t,p=7==t,d=5==t||f;return function(y,h,v,b){for(var g,m,O=a(y),w=i(O),_=n(h,v),j=u(w),E=0,x=b||c,S=e?x(y,j):r||p?x(y,0):void 0;j>E;E++)if((d||E in w)&&(m=_(g=w[E],E,O),t))if(e)S[E]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:s(S,g)}else switch(t){case 4:return!1;case 7:s(S,g)}return f?-1:o||l?l:S}};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,r){var n=r(19),o=r(27),i=r(79),a=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){"use strict";var n=r(95),o=r(36),i=r(15),a=r(119),u=r(149),c=r(32),s=r(44),l=r(189),f=r(120),p=r(84),d=r(40),y=r(56),h=r(112),v=r(121),b=r(96),g=r(146),m=r(19),O=g.UNSUPPORTED_Y,w=Math.min,_=[].push,j=i(/./.exec),E=i(_),x=i("".slice);a("split",(function(t,e,r){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,r){var i=d(s(this)),a=void 0===r?4294967295:r>>>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,p=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=new RegExp(t.source,y+"g");(c=o(b,g,i))&&!((l=g.lastIndex)>v&&(E(p,x(i,v,c.index)),c.length>1&&c.index<i.length&&n(_,p,h(c,1)),f=c[0].length,v=l,p.length>=a));)g.lastIndex===c.index&&g.lastIndex++;return v===i.length?!f&&j(g,"")||E(p,""):E(p,x(i,v)),p.length>a?h(p,0,a):p}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=s(this),a=null==e?void 0:y(e,t);return a?o(a,e,n,r):o(i,d(n),e,r)},function(t,n){var o=c(this),a=d(t),u=r(i,o,a,n,i!==e);if(u.done)return u.value;var s=l(o,RegExp),y=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),b=new s(O?"^(?:"+o.source+")":o,h),g=void 0===n?4294967295:n>>>0;if(0===g)return[];if(0===a.length)return null===v(b,a)?[a]:[];for(var m=0,_=0,j=[];_<a.length;){b.lastIndex=O?0:_;var S,P=v(b,O?x(a,_):a);if(null===P||(S=w(p(b.lastIndex+(O?_:0)),a.length))===m)_=f(a,_,y);else{if(E(j,x(a,m,_)),j.length===g)return j;for(var k=1;k<=P.length-1;k++)if(E(j,P[k]),j.length===g)return j;_=m=S}}return E(j,x(a,m)),j}]}),!!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),O)},function(t,e,r){"use strict";var n=r(35),o=r(9),i=r(15),a=r(110),u=r(45),c=r(34),s=r(140),l=r(55),f=r(82),p=r(125),d=r(19),y=r(67).f,h=r(54).f,v=r(37).f,b=r(192),g=r(152).trim,m=o.Number,O=m.prototype,w=o.TypeError,_=i("".slice),j=i("".charCodeAt),E=function(t){var e=p(t,"number");return"bigint"==typeof e?e:x(e)},x=function(t){var e,r,n,o,i,a,u,c,s=p(t,"number");if(f(s))throw w("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=g(s),43===(e=j(s,0))||45===e){if(88===(r=j(s,2))||120===r)return NaN}else if(48===e){switch(j(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=_(s,2)).length,u=0;u<a;u++)if((c=j(i,u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(a("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var S,P=function(t){var e=arguments.length<1?0:m(E(t)),r=this;return l(O,r)&&d((function(){b(r)}))?s(Object(e),r,P):e},k=n?y(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(","),A=0;k.length>A;A++)c(m,S=k[A])&&!c(P,S)&&v(P,S,h(m,S));P.prototype=O,O.constructor=P,u(o,"Number",P)}},function(t,e,r){r(17)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(9),o=r(15),i=r(19),a=r(51),u=n.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){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(27),o=r(52),i=r(37),a=n("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,r){var n=r(77),o=r(102);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,r){var n=r(15),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},function(t,e,r){var n,o,i=r(9),a=r(80),u=i.process,c=i.Deno,s=u&&u.versions||c&&c.version,l=s&&s.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},function(t,e,r){var n=r(49);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(125),o=r(82);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(9),o=r(49),i=r(29),a=r(55),u=r(123),c=n.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,r){var n=r(9).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(63),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(76),o=r(78),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e,r){var n=r(35),o=r(34),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,u=o(i,"name"),c=u&&"something"===function(){}.name,s=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:c,CONFIGURABLE:s}},function(t,e,r){var n=r(9),o=r(34),i=r(29),a=r(38),u=r(85),c=r(131),s=u("IE_PROTO"),l=n.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=a(t);if(o(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?f:null}},function(t,e,r){var n=r(37).f,o=r(34),i=r(27)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){"use strict";r(165)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(169))},function(t,e,r){var n=r(15),o=r(60),i=n(n.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,r){var n=r(9),o=r(114),i=r(29),a=r(51),u=r(27)("toStringTag"),c=n.Object,s="Arguments"==a(function(){return arguments}());t.exports=o?a:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=c(t),u))?r:s?a(e):"Object"==(n=a(e))&&i(e.callee)?"Arguments":n}},function(t,e,r){var n=r(51);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(15),o=r(19),i=r(29),a=r(92),u=r(49),c=r(107),s=function(){},l=[],f=u("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=n(p.exec),y=!p.exec(s),h=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 h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return y||!!d(p,c(t))}:h},function(t,e){var r=Function.prototype,n=r.apply,o=r.bind,i=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(n):function(){return i.apply(n,arguments)})},function(t,e,r){"use strict";var n,o,i=r(36),a=r(15),u=r(40),c=r(178),s=r(146),l=r(76),f=r(52),p=r(57).get,d=r(179),y=r(180),h=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,b=v,g=a("".charAt),m=a("".indexOf),O=a("".replace),w=a("".slice),_=(o=/b*/g,i(v,n=/a/,"a"),i(v,o,"a"),0!==n.lastIndex||0!==o.lastIndex),j=s.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];(_||E||j||d||y)&&(b=function(t){var e,r,n,o,a,s,l,d=this,y=p(d),x=u(t),S=y.raw;if(S)return S.lastIndex=d.lastIndex,e=i(b,S,x),d.lastIndex=S.lastIndex,e;var P=y.groups,k=j&&d.sticky,A=i(c,d),D=d.source,T=0,M=x;if(k&&(A=O(A,"y",""),-1===m(A,"g")&&(A+="g"),M=w(x,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==g(x,d.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,T++),r=new RegExp("^(?:"+D+")",A)),E&&(r=new RegExp("^"+D+"$(?!\\s)",A)),_&&(n=d.lastIndex),o=i(v,k?r:d,M),k?o?(o.input=w(o.input,T),o[0]=w(o[0],T),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:_&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),E&&o&&o.length>1&&i(h,o[0],r,(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=b},function(t,e,r){"use strict";var n=r(17),o=r(9),i=r(62),a=r(63),u=r(43),c=r(38),s=r(115),l=r(58),f=r(69)("splice"),p=o.TypeError,d=Math.max,y=Math.min;n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,o,f,h,v,b=c(this),g=u(b),m=i(t,g),O=arguments.length;if(0===O?r=n=0:1===O?(r=0,n=g-m):(r=O-2,n=y(d(a(e),0),g-m)),g+r-n>9007199254740991)throw p("Maximum allowed length exceeded");for(o=s(b,n),f=0;f<n;f++)(h=m+f)in b&&l(o,f,b[h]);if(o.length=n,r<n){for(f=m;f<g-n;f++)v=f+r,(h=f+n)in b?b[v]=b[h]:delete b[v];for(f=g;f>g-n+r;f--)delete b[f-1]}else if(r>n)for(f=g-n;f>m;f--)v=f+r-1,(h=f+n-1)in b?b[v]=b[h]:delete b[v];for(f=0;f<r;f++)b[f+m]=arguments[f+2];return b.length=g-n+r,o}})},function(t,e,r){"use strict";var n=r(17),o=r(15),i=r(73),a=r(39),u=r(116),c=o([].join),s=i!=Object,l=u("join",",");n({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(a(this),void 0===t?",":t)}})},function(t,e,r){"use strict";var n=r(17),o=r(197);n({target:"String",proto:!0,forced:r(198)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(74))},function(t,e,r){"use strict";(function(t){var n=r(28),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.a.Buffer:void 0,u=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,n=u?u(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(118)(t))},function(t,e,r){var n=r(9),o=r(103),i=n["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,r){var n=r(9),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},function(t,e,r){var n=r(79),o=r(19);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e,r){var n=r(9),o=r(33),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var n=r(15),o=r(29),i=r(102),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},function(t,e,r){"use strict";var n=r(17),o=r(36),i=r(77),a=r(87),u=r(29),c=r(163),s=r(88),l=r(111),f=r(89),p=r(53),d=r(45),y=r(27),h=r(65),v=r(130),b=a.PROPER,g=a.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,w=y("iterator"),_=function(){return this};t.exports=function(t,e,r,a,y,v,j){c(r,e,a);var E,x,S,P=function(t){if(t===y&&M)return M;if(!O&&t in D)return D[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},k=e+" Iterator",A=!1,D=t.prototype,T=D[w]||D["@@iterator"]||y&&D[y],M=!O&&T||P(y),N="Array"==e&&D.entries||T;if(N&&(E=s(N.call(new t)))!==Object.prototype&&E.next&&(i||s(E)===m||(l?l(E,m):u(E[w])||d(E,w,_)),f(E,k,!0,!0),i&&(h[k]=_)),b&&"values"==y&&T&&"values"!==T.name&&(!i&&g?p(D,"name","values"):(A=!0,M=function(){return o(T,this)})),y)if(x={values:P("values"),keys:v?M:P("keys"),entries:P("entries")},j)for(S in x)(O||A||!(S in D))&&d(D,S,x[S]);else n({target:e,proto:!0,forced:O||A},x);return i&&!j||D[w]===M||d(D,w,M,{name:y}),h[e]=M,x}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(19),o=r(29),i=/#|\.prototype\./,a=function(t,e){var r=c[u(t)];return r==l||r!=s&&(o(e)?n(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,r){var n=r(15),o=r(32),i=r(164);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},function(t,e,r){var n=r(9),o=r(62),i=r(43),a=r(58),u=n.Array,c=Math.max;t.exports=function(t,e,r){for(var n=i(t),s=o(e,n),l=o(void 0===r?n:r,n),f=u(c(l-s,0)),p=0;s<l;s++,p++)a(f,p,t[s]);return f.length=p,f}},function(t,e,r){var n=r(92),o=r(56),i=r(65),a=r(27)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},function(t,e,r){var n={};n[r(27)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(174);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(19);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e,r){var n=r(15);t.exports=n([].slice)},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,r){"use strict";r(18);var n=r(15),o=r(45),i=r(96),a=r(19),u=r(27),c=r(53),s=u("species"),l=RegExp.prototype;t.exports=function(t,e,r,f){var p=u(t),d=!a((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),y=d&&!a((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!d||!y||r){var h=n(/./[p]),v=e(p,""[t],(function(t,e,r,o,a){var u=n(t),c=e.exec;return c===i||c===l.exec?d&&!a?{done:!0,value:h(e,r,o)}:{done:!0,value:u(r,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(l,p,v[1])}f&&c(l[p],"sham",!0)}},function(t,e,r){"use strict";var n=r(141).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(9),o=r(36),i=r(32),a=r(29),u=r(51),c=r(96),s=n.TypeError;t.exports=function(t,e){var r=t.exec;if(a(r)){var n=o(r,t,e);return null!==n&&i(n),n}if("RegExp"===u(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},function(t,e,r){r(17)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){var n=r(104);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(35),o=r(19),i=r(105);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(9),o=r(36),i=r(33),a=r(82),u=r(56),c=r(160),s=r(27),l=n.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,n=u(t,f);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||a(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,r){var n=r(15),o=r(34),i=r(39),a=r(127).indexOf,u=r(64),c=n([].push);t.exports=function(t,e){var r,n=i(t),s=0,l=[];for(r in n)!o(u,r)&&o(n,r)&&c(l,r);for(;e.length>s;)o(n,r=e[s++])&&(~a(l,r)||c(l,r));return l}},function(t,e,r){var n=r(39),o=r(62),i=r(43),a=function(t){return function(e,r,a){var u,c=n(e),s=i(c),l=o(a,s);if(t&&r!=r){for(;s>l;)if((u=c[l++])!=u)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,r){var n=r(34),o=r(129),i=r(54),a=r(37);t.exports=function(t,e){for(var r=o(e),u=a.f,c=i.f,s=0;s<r.length;s++){var l=r[s];n(t,l)||u(t,l,c(e,l))}}},function(t,e,r){var n=r(49),o=r(15),i=r(67),a=r(109),u=r(32),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(u(t)),r=a.f;return r?c(e,r(t)):e}},function(t,e,r){"use strict";var n,o,i,a=r(19),u=r(29),c=r(52),s=r(88),l=r(45),f=r(27),p=r(77),d=f("iterator"),y=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):y=!0),null==n||a((function(){var t={};return n[d].call(t)!==t}))?n={}:p&&(n=c(n)),u(n[d])||l(n,d,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:y}},function(t,e,r){var n=r(19);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(17),o=r(15),i=r(64),a=r(33),u=r(34),c=r(37).f,s=r(67),l=r(133),f=r(166),p=r(78),d=r(168),y=!1,h=p("meta"),v=0,b=function(t){c(t,h,{value:{objectID:"O"+v++,weakData:{}}})},g=t.exports={enable:function(){g.enable=function(){},y=!0;var t=s.f,e=o([].splice),r={};r[h]=1,t(r).length&&(s.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===h){e(n,o,1);break}return n},n({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,h)){if(!f(t))return"F";if(!e)return"E";b(t)}return t[h].objectID},getWeakData:function(t,e){if(!u(t,h)){if(!f(t))return!0;if(!e)return!1;b(t)}return t[h].weakData},onFreeze:function(t){return d&&y&&f(t)&&!u(t,h)&&b(t),t}};i[h]=!0},function(t,e,r){var n=r(51),o=r(39),i=r(67).f,a=r(112),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return a(u)}}(t):i(o(t))}},function(t,e,r){var n=r(9),o=r(91),i=r(36),a=r(32),u=r(83),c=r(135),s=r(43),l=r(55),f=r(136),p=r(113),d=r(137),y=n.TypeError,h=function(t,e){this.stopped=t,this.result=e},v=h.prototype;t.exports=function(t,e,r){var n,b,g,m,O,w,_,j=r&&r.that,E=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),P=o(e,j),k=function(t){return n&&d(n,"normal",t),new h(!0,t)},A=function(t){return E?(a(t),S?P(t[0],t[1],k):P(t[0],t[1])):S?P(t,k):P(t)};if(x)n=t;else{if(!(b=p(t)))throw y(u(t)+" is not iterable");if(c(b)){for(g=0,m=s(t);m>g;g++)if((O=A(t[g]))&&l(v,O))return O;return new h(!1)}n=f(t,b)}for(w=n.next;!(_=i(w,n)).done;){try{O=A(_.value)}catch(t){d(n,"throw",t)}if("object"==typeof O&&O&&l(v,O))return O}return new h(!1)}},function(t,e,r){var n=r(27),o=r(65),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},function(t,e,r){var n=r(9),o=r(36),i=r(60),a=r(32),u=r(83),c=r(113),s=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?c(t):e;if(i(r))return a(o(r,t));throw s(u(t)+" is not iterable")}},function(t,e,r){var n=r(36),o=r(32),i=r(56);t.exports=function(t,e,r){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw r;if(u)throw a;return o(a),r}},function(t,e,r){var n=r(9),o=r(55),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,r){var n=r(27)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},function(t,e,r){var n=r(29),o=r(33),i=r(111);t.exports=function(t,e,r){var a,u;return i&&n(a=e.constructor)&&a!==r&&o(u=a.prototype)&&u!==r.prototype&&i(t,u),t}},function(t,e,r){var n=r(15),o=r(63),i=r(40),a=r(44),u=n("".charAt),c=n("".charCodeAt),s=n("".slice),l=function(t){return function(e,r){var n,l,f=i(a(e)),p=o(r),d=f.length;return p<0||p>=d?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===d||(l=c(f,p+1))<56320||l>57343?t?u(f,p):n:t?s(f,p,p+2):l-56320+(n-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,r){var n=r(105)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,r){var n=r(27);e.f=n},function(t,e,r){var n=r(175),o=r(34),i=r(144),a=r(37).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},function(t,e,r){var n=r(19),o=r(9).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),a=i||n((function(){return!o("a","y").sticky})),u=i||n((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,r){"use strict";var n=r(17),o=r(127).includes,i=r(75);n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,r){"use strict";var n=r(17),o=r(15),i=r(187),a=r(44),u=r(40),c=r(188),s=o("".indexOf);n({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,r){var n=r(33),o=r(51),i=r(27)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var c,s=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&d())}function d(){if(!l){var t=u(p);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new y(t,e)),1!==s.length||l||u(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(9),o=r(94),i=r(83),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},function(t,e,r){var n=r(15),o=r(44),i=r(40),a=r(153),u=n("".replace),c="["+a+"]",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=u(r,s,"")),2&t&&(r=u(r,l,"")),r}};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,r){"use strict";var n=r(36),o=r(119),i=r(32),a=r(84),u=r(40),c=r(44),s=r(56),l=r(120),f=r(121);o("match",(function(t,e,r){return[function(e){var r=c(this),o=null==e?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](u(r))},function(t){var n=i(this),o=u(t),c=r(e,n,o);if(c.done)return c.value;if(!n.global)return f(n,o);var s=n.unicode;n.lastIndex=0;for(var p,d=[],y=0;null!==(p=f(n,o));){var h=u(p[0]);d[y]=h,""===h&&(n.lastIndex=l(o,a(n.lastIndex),s)),y++}return 0===y?null:d}]}))},function(t,e,r){"use strict";var n=r(95),o=r(36),i=r(15),a=r(119),u=r(19),c=r(32),s=r(29),l=r(63),f=r(84),p=r(40),d=r(44),y=r(120),h=r(56),v=r(193),b=r(121),g=r(27)("replace"),m=Math.max,O=Math.min,w=i([].concat),_=i([].push),j=i("".indexOf),E=i("".slice),x="$0"==="a".replace(/./,"$0"),S=!!/./[g]&&""===/./[g]("a","$0");a("replace",(function(t,e,r){var i=S?"$":"$0";return[function(t,r){var n=d(this),i=null==t?void 0:h(t,g);return i?o(i,t,n,r):o(e,p(n),t,r)},function(t,o){var a=c(this),u=p(t);if("string"==typeof o&&-1===j(o,i)&&-1===j(o,"$<")){var d=r(e,a,u,o);if(d.done)return d.value}var h=s(o);h||(o=p(o));var g=a.global;if(g){var x=a.unicode;a.lastIndex=0}for(var S=[];;){var P=b(a,u);if(null===P)break;if(_(S,P),!g)break;""===p(P[0])&&(a.lastIndex=y(u,f(a.lastIndex),x))}for(var k,A="",D=0,T=0;T<S.length;T++){for(var M=p((P=S[T])[0]),N=m(O(l(P.index),u.length),0),C=[],R=1;R<P.length;R++)_(C,void 0===(k=P[R])?k:String(k));var I=P.groups;if(h){var L=w([M],C,N,u);void 0!==I&&_(L,I);var z=p(n(o,void 0,L))}else z=v(M,u,N,C,I,o);N>=D&&(A+=E(u,D,N)+z,D=N+M.length)}return A+E(u,D)}]}),!!u((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!x||S)},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return v}));var n=r(0);function o(t){throw new Error("[mobx-utils] "+t)}function i(t,e){void 0===e&&(e="Illegal state"),t||o(e)}var a=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(a(Object.getPrototypeOf(t))||[])},u=function(t){return function(t){var e=a(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))};function c(t){switch(this.state){case"pending":return t.pending&&t.pending(this.value);case"rejected":return t.rejected&&t.rejected(this.value);case"fulfilled":return t.fulfilled?t.fulfilled(this.value):this.value}}function s(t,e){if(i(arguments.length<=2,"fromPromise expects up to two arguments"),i("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var r=t;t.then(Object(n.k)("observableFromPromise-resolve",(function(t){r.value=t,r.state="fulfilled"})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state="rejected"}))),r.isPromiseBasedObservable=!0,r.case=c;var o=e&&"fulfilled"===e.state?e.value:void 0;return Object(n.q)(r,{value:o,state:"pending"},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state="rejected",r.value=e,r})),t.resolve=Object(n.k)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var r=t(Promise.resolve(e));return r.state="fulfilled",r.value=e,r}))}(s||(s={}));var l=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a};!function(){function t(t,e){var r=this;Object(n.G)((function(){r.current=e,r.subscription=t.subscribe(r)}))}t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(t){this.current=t},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(t){this.current=t,this.dispose()},l([n.C.ref],t.prototype,"current",void 0),l([n.k.bound],t.prototype,"next",null),l([n.k.bound],t.prototype,"complete",null),l([n.k.bound],t.prototype,"error",null)}();var f=function(){return(f=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},p=function(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a},d=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;this.model=t,this.localValues=n.C.map({}),this.localComputedValues=n.C.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},i(Object(n.A)(t),"createViewModel expects an observable object"),u(t).forEach((function(r){if(r!==n.a&&"__mobxDidRunLazyInitializers"!==r){if(i(-1===d.indexOf(r),"The propertyname "+r+" is reserved and cannot be used with viewModels"),Object(n.w)(t,r)){var o=Object(n.h)(t,r).derivation;e.localComputedValues.set(r,Object(n.m)(o.bind(e)))}var a=Object.getOwnPropertyDescriptor(t,r),u=a?{enumerable:a.enumerable}:{};Object.defineProperty(e,r,f(f({},u),{configurable:!0,get:function(){return Object(n.w)(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:Object(n.k)((function(t){t!==e.model[r]?e.localValues.set(r,t):e.localValues.delete(r)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var t=this;Object(n.B)(this.localValues).forEach((function(e){var r=t.localValues.get(e),o=t.model[e];Object(n.y)(o)?o.replace(r):Object(n.z)(o)?(o.clear(),o.merge(r)):Object(n.v)(r)||(t.model[e]=r)})),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(t){this.localValues.delete(t)},p([n.m],t.prototype,"isDirty",null),p([n.m],t.prototype,"changedValues",null),p([n.k.bound],t.prototype,"submit",null),p([n.k.bound],t.prototype,"reset",null),p([n.k.bound],t.prototype,"resetProperty",null)}();function y(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function h(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function v(t,e){var r=new WeakMap;function o(n){var o=r.get(n.object);!function(t,e){switch(t.type){case"add":i(t.newValue,e,t.name);break;case"update":a(t.oldValue),i(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":a(t.oldValue);break;case"splice":t.removed.map(a),t.added.forEach((function(r,n){return i(r,e,""+(t.index+n))}));for(var n=t.index+t.addedCount;n<t.object.length;n++)if(h(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,y(o),t)}function i(t,e,a){if(h(t)){var u=r.get(t);if(u){if(u.parent!==e||u.path!==a)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+y(e)+"/"+a+"', but it already exists at '"+y(u.parent)+"/"+u.path+"'")}else{var c={parent:e,path:a,dispose:Object(n.D)(t,o)};r.set(t,c),Object(n.p)(t).forEach((function(t){var e=t[0];return i(t[1],c,e)}))}}}function a(t){if(h(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),Object(n.L)(t).forEach(a)}}return i(t,void 0,""),function(){a(t)}}var b,g=(b=function(t,e){return(b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),m=(function(t){function e(e,r,o){var i=void 0===o?{}:o,a=i.name,u=void 0===a?"ogm"+(1e3*Math.random()|0):a,c=i.keyToName,s=void 0===c?function(t){return""+t}:c,l=t.call(this)||this;l._keyToName=s,l._groupBy=r,l._ogmInfoKey=Symbol("ogmInfo"+u),l._base=e;for(var f=0;f<e.length;f++)l._addItem(e[f]);return l._disposeBaseObserver=Object(n.D)(l._base,(function(t){if("splice"===t.type)Object(n.J)((function(){for(var e=0,r=t.removed;e<r.length;e++){var n=r[e];l._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var a=i[o];l._addItem(a)}}));else{if("update"!==t.type)throw new Error("illegal state");Object(n.J)((function(){l._removeItem(t.oldValue),l._addItem(t.newValue)}))}})),l}g(e,t),e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(t){throw new Error("not supported")},e.prototype.set=function(t,e){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var t=0;t<this._base.length;t++){var e=this._base[t];e[this._ogmInfoKey].reaction(),delete e[this._ogmInfoKey]}},e.prototype._getGroupArr=function(e){var r=t.prototype.get.call(this,e);return void 0===r&&(r=Object(n.C)([],{name:"GroupArray["+this._keyToName(e)+"]",deep:!1}),t.prototype.set.call(this,e,r)),r},e.prototype._removeFromGroupArr=function(e,r){var n=t.prototype.get.call(this,e);1===n.length?t.prototype.delete.call(this,e):(r===n.length-1||(n[r]=n[n.length-1],n[r][this._ogmInfoKey].groupArrIndex=r),n.length--)},e.prototype._addItem=function(t){var e=this,r=this._groupBy(t),o=this._getGroupArr(r),i={groupByValue:r,groupArrIndex:o.length,reaction:Object(n.F)((function(){return e._groupBy(t)}),(function(r,n){var o=t[e._ogmInfoKey];e._removeFromGroupArr(o.groupByValue,o.groupArrIndex);var i=e._getGroupArr(r),a=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=a}))};Object.defineProperty(t,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:i}),o.push(t)},e.prototype._removeItem=function(t){var e=t[this._ogmInfoKey];this._removeFromGroupArr(e.groupByValue,e.groupArrIndex),e.reaction(),delete t[this._ogmInfoKey]}}(n.b),function(){function t(t,e){this.base=t,this.args=e,this.closestIdx=0,this.isDisposed=!1;for(var r=this.closest=this.root=t,n=0;n<this.args.length-1&&(r=r.get(e[n]));n++)this.closest=r;this.closestIdx=n}return t.prototype.exists=function(){this.assertNotDisposed();var t=this.args.length;return this.closestIdx>=t-1&&this.closest.has(this.args[t-1])},t.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},t.prototype.set=function(t){this.assertNotDisposed();for(var e=this.args.length,r=this.closest,n=this.closestIdx;n<e-1;n++){var o=new Map;r.set(this.args[n],o),r=o}this.closestIdx=e-1,this.closest=r,r.set(this.args[e-1],t)},t.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var t=this.args.length;this.closest.delete(this.args[t-1]);for(var e=this.root,r=[e],n=0;n<t-1;n++)e=e.get(this.args[n]),r.push(e);for(n=r.length-1;n>0;n--)0===r[n].size&&r[n-1].delete(this.args[n-1]);this.isDisposed=!0},t.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},t}());!function(){function t(){this.store=new Map,this.argsLength=-1}t.prototype.entry=function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new m(this.store,t)}}();new Set,new Set;var O,w=Promise.resolve();O="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var _=function(){return new Promise((function(t){O(t)}))}}).call(this,r(150))},function(t,e,r){var n;!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"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();g.prototype.bind=function(t,e,r){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,r),this},g.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},g.prototype.trigger=function(t,e){return this._directMap[t+":"+e]&&this._directMap[t+":"+e]({},t),this},g.prototype.reset=function(){return this._callbacks={},this._directMap={},this},g.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function t(e,r){return null!==e&&e!==i&&(e===r||t(e.parentNode,r))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var r=t.composedPath()[0];r!==t.target&&(e=r)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},g.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},g.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);u=null},g.init=function(){var t=g(i);for(var e in t)"_"!==e.charAt(0)&&(g[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},g.init(),o.Mousetrap=g,t.exports&&(t.exports=g),void 0===(n=function(){return g}.call(e,r,e,t))||(t.exports=n)}function d(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function y(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 h(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,r){return r||(r=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"==r&&e.length&&(r="keydown"),r}function b(t,e){var r,n,o,i=[];for(r=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<r.length;++o)n=r[o],f[n]&&(n=f[n]),e&&"keypress"!=e&&l[n]&&(n=l[n],i.push("shift")),h(n)&&i.push(n);return{key:n,modifiers:i,action:e=v(n,i,e)}}function g(t){var e=this;if(t=t||i,!(e instanceof g))return new g(t);e.target=t,e._callbacks={},e._directMap={};var r,n={},o=!1,a=!1,u=!1;function c(t){t=t||{};var e,r=!1;for(e in n)t[e]?r=!0:n[e]=0;r||(u=!1)}function s(t,r,o,i,a,u){var c,s,l,f,p=[],d=o.type;if(!e._callbacks[t])return[];for("keyup"==d&&h(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||n[s.seq]==s.level)&&d==s.action&&("keypress"==d&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var y=!i&&s.combo==a,v=i&&s.seq==i&&s.level==u;(y||v)&&e._callbacks[t].splice(c,1),p.push(s)}return p}function l(t,r,n,o){e.stopCallback(r,r.target||r.srcElement,n,o)||!1===t(r,n)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(r),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(r))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var r=y(t);r&&("keyup"!=t.type||o!==r?e.handleKey(r,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 p(t,e,i,a){function s(e){return function(){u=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==a&&(o=y(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var d=p+1===e.length?f:s(a||b(e[p+1]).action);v(e[p],d,a,t,p)}}function v(t,r,n,o,i){e._directMap[t+":"+n]=r;var a,u=(t=t.replace(/\s+/g," ")).split(" ");u.length>1?p(t,u,r,n):(a=b(t,n),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:r,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,r){var n,o=s(t,e,r),i={},f=0,p=!1;for(n=0;n<o.length;++n)o[n].seq&&(f=Math.max(f,o[n].level));for(n=0;n<o.length;++n)if(o[n].seq){if(o[n].level!=f)continue;p=!0,i[o[n].seq]=1,l(o[n].callback,r,o[n].combo,o[n].seq)}else p||l(o[n].callback,r,o[n].combo);var d="keypress"==r.type&&a;r.type!=u||h(t)||d||c(i),a=p&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)v(t[n],e,r)},d(t,"keypress",f),d(t,"keydown",f),d(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){var n=r(35),o=r(37),i=r(32),a=r(39),u=r(61);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=a(e),c=u(e),s=c.length,l=0;s>l;)o.f(t,r=c[l++],n[r]);return t}},function(t,e,r){var n=r(9),o=r(36),i=r(29),a=r(33),u=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!a(n=o(r,t)))return n;if(i(r=t.valueOf)&&!a(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!a(n=o(r,t)))return n;throw u("Can't convert object to primitive value")}},function(t,e,r){var n=r(49);t.exports=n("document","documentElement")},function(t,e,r){var n=r(9),o=r(29),i=r(107),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},function(t,e,r){"use strict";var n=r(130).IteratorPrototype,o=r(52),i=r(66),a=r(89),u=r(65),c=function(){return this};t.exports=function(t,e,r,s){var l=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),a(t,l,!1,!0),u[l]=c,t}},function(t,e,r){var n=r(9),o=r(29),i=n.String,a=n.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,r){"use strict";var n=r(17),o=r(9),i=r(15),a=r(110),u=r(45),c=r(132),s=r(134),l=r(138),f=r(29),p=r(33),d=r(19),y=r(139),h=r(89),v=r(140);t.exports=function(t,e,r){var b=-1!==t.indexOf("Map"),g=-1!==t.indexOf("Weak"),m=b?"set":"add",O=o[t],w=O&&O.prototype,_=O,j={},E=function(t){var e=i(w[t]);u(w,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(g&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return g&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!p(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(a(t,!f(O)||!(g||w.forEach&&!d((function(){(new O).entries().next()})))))_=r.getConstructor(e,t,b,m),c.enable();else if(a(t,!0)){var x=new _,S=x[m](g?{}:-0,1)!=x,P=d((function(){x.has(1)})),k=y((function(t){new O(t)})),A=!g&&d((function(){for(var t=new O,e=5;e--;)t[m](e,e);return!t.has(-0)}));k||((_=e((function(t,e){l(t,w);var r=v(new O,t,_);return null!=e&&s(e,r[m],{that:r,AS_ENTRIES:b}),r}))).prototype=w,w.constructor=_),(P||A)&&(E("delete"),E("has"),b&&E("get")),(A||S)&&E(m),g&&w.clear&&delete w.clear}return j[t]=_,n({global:!0,forced:_!=O},j),h(_,t),g||r.setStrong(_,t,b),_}},function(t,e,r){var n=r(19),o=r(33),i=r(51),a=r(167),u=Object.isExtensible,c=n((function(){u(1)}));t.exports=c||a?function(t){return!!o(t)&&((!a||"ArrayBuffer"!=i(t))&&(!u||u(t)))}:u},function(t,e,r){var n=r(19);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e,r){var n=r(19);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(37).f,o=r(52),i=r(170),a=r(91),u=r(138),c=r(134),s=r(108),l=r(171),f=r(35),p=r(132).fastKey,d=r(57),y=d.set,h=d.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){u(t,d),y(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&c(n,t[s],{that:t,AS_ENTRIES:r})})),d=l.prototype,v=h(e),b=function(t,e,r){var n,o,i=v(t),a=g(t,e);return a?a.value=r:(i.last=a={index:o=p(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),f?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},g=function(t,e){var r,n=v(t),o=p(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(d,{clear:function(){for(var t=v(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=v(this),r=g(this,t);if(r){var n=r.next,o=r.previous;delete e.index[r.index],r.removed=!0,o&&(o.next=n),n&&(n.previous=o),e.first==r&&(e.first=n),e.last==r&&(e.last=o),f?e.size--:this.size--}return!!r},forEach:function(t){for(var e,r=v(this),n=a(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!g(this,t)}}),i(d,r?{get:function(t){var e=g(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(this,t=0===t?0:t,t)}}),f&&n(d,"size",{get:function(){return v(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",o=h(e),i=h(n);s(t,e,(function(t,e){y(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},function(t,e,r){var n=r(45);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(49),o=r(37),i=r(27),a=r(35),u=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[u]&&r(e,u,{configurable:!0,get:function(){return this}})}},function(t,e,r){"use strict";var n=r(114),o=r(92);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(68).forEach,o=r(116)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,r){var n=r(9),o=r(93),i=r(94),a=r(33),u=r(27)("species"),c=n.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,r){var n=r(9);t.exports=n},function(t,e,r){"use strict";var n=r(9),o=r(91),i=r(36),a=r(38),u=r(177),c=r(135),s=r(94),l=r(43),f=r(58),p=r(136),d=r(113),y=n.Array;t.exports=function(t){var e=a(t),r=s(this),n=arguments.length,h=n>1?arguments[1]:void 0,v=void 0!==h;v&&(h=o(h,n>2?arguments[2]:void 0));var b,g,m,O,w,_,j=d(e),E=0;if(!j||this==y&&c(j))for(b=l(e),g=r?new this(b):y(b);b>E;E++)_=v?h(e[E],E):e[E],f(g,E,_);else for(w=(O=p(e,j)).next,g=r?new this:[];!(m=i(w,O)).done;E++)_=v?u(O,h,[m.value,E],!0):m.value,f(g,E,_);return g.length=E,g}},function(t,e,r){var n=r(32),o=r(137);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},function(t,e,r){"use strict";var n=r(32);t.exports=function(){var t=n(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,r){var n=r(19),o=r(9).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,r){var n=r(19),o=r(9).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,r){"use strict";var n=r(17),o=r(15),i=r(60),a=r(38),u=r(43),c=r(40),s=r(19),l=r(182),f=r(116),p=r(183),d=r(184),y=r(79),h=r(185),v=[],b=o(v.sort),g=o(v.push),m=s((function(){v.sort(void 0)})),O=s((function(){v.sort(null)})),w=f("sort"),_=!s((function(){if(y)return y<70;if(!(p&&p>3)){if(d)return!0;if(h)return h<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:e+n,v:r})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:m||!O||!w||!_},{sort:function(t){void 0!==t&&i(t);var e=a(this);if(_)return void 0===t?b(e):b(e,t);var r,n,o=[],s=u(e);for(n=0;n<s;n++)n in e&&g(o,e[n]);for(l(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=o.length,n=0;n<r;)e[n]=o[n++];for(;n<s;)delete e[n++];return e}})},function(t,e,r){var n=r(112),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?a(t,e):u(t,i(n(t,0,c),e),i(n(t,c),e),e)},a=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},u=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?n(e[a],r[u])<=0?e[a++]:r[u++]:a<o?e[a++]:r[u++];return t};t.exports=i},function(t,e,r){var n=r(80).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(80);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(80).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){"use strict";var n=r(17),o=r(68).find,i=r(75),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),n({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,r){var n=r(9),o=r(149),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(27)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,r){var n=r(32),o=r(151),i=r(27)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?e:o(r)}},function(t,e,r){"use strict";var n=r(17),o=r(152).trim;n({target:"String",proto:!0,forced:r(191)("trim")},{trim:function(){return o(this)}})},function(t,e,r){var n=r(87).PROPER,o=r(19),i=r(153);t.exports=function(t){return o((function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||n&&i[t].name!==t}))}},function(t,e,r){var n=r(15);t.exports=n(1..valueOf)},function(t,e,r){var n=r(15),o=r(38),i=Math.floor,a=n("".charAt),u=n("".replace),c=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,f,p){var d=r+t.length,y=n.length,h=l;return void 0!==f&&(f=o(f),h=s),u(p,h,(function(o,u){var s;switch(a(u,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,d);case"<":s=f[c(u,1,-1)];break;default:var l=+u;if(0===l)return o;if(l>y){var p=i(l/10);return 0===p?o:p<=y?void 0===n[p-1]?a(u,1):n[p-1]+a(u,1):o}s=n[l-1]}return void 0===s?"":s}))}},function(t,e,r){"use strict";var n=r(9),o=r(15),i=r(60),a=r(33),u=r(34),c=r(117),s=n.Function,l=o([].concat),f=o([].join),p={},d=function(t,e,r){if(!u(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=s("C,a","return new C("+f(n,",")+")")}return p[e](t,r)};t.exports=s.bind||function(t){var e=i(this),r=e.prototype,n=c(arguments,1),o=function(){var r=l(n,c(arguments));return this instanceof o?d(e,r.length,r):e.apply(t,r)};return a(r)&&(o.prototype=r),o}},function(t,e,r){var n=r(34);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){"use strict";var n=r(35),o=r(15),i=r(36),a=r(19),u=r(61),c=r(109),s=r(86),l=r(38),f=r(73),p=Object.assign,d=Object.defineProperty,y=o([].concat);t.exports=!p||a((function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||"abcdefghijklmnopqrst"!=u(p({},e)).join("")}))?function(t,e){for(var r=l(t),o=arguments.length,a=1,p=c.f,d=s.f;o>a;)for(var h,v=f(arguments[a++]),b=p?y(u(v),p(v)):u(v),g=b.length,m=0;g>m;)h=b[m++],n&&!i(d,v,h)||(r[h]=v[h]);return r}:p},function(t,e,r){var n=r(15),o=r(44),i=r(40),a=/"/g,u=n("".replace);t.exports=function(t,e,r,n){var c=i(o(t)),s="<"+e;return""!==r&&(s+=" "+r+'="'+u(i(n),a,"&quot;")+'"'),s+">"+c+"</"+e+">"}},function(t,e,r){var n=r(19);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,r){var n=r(17),o=Math.hypot,i=Math.abs,a=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,u=0,c=arguments.length,s=0;u<c;)s<(r=i(arguments[u++]))?(o=o*(n=s/r)*n+1,s=r):o+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*a(o)}})},function(t,e,r){var n=r(35),o=r(15),i=r(61),a=r(39),u=o(r(86).f),c=o([].push),s=function(t){return function(e){for(var r,o=a(e),s=i(o),l=s.length,f=0,p=[];l>f;)r=s[f++],n&&!u(o,r)||c(p,t?[r,o[r]]:o[r]);return p}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,r){"use strict";var n=r(38),o=r(62),i=r(43);t.exports=function(t){for(var e=n(this),r=i(e),a=arguments.length,u=o(a>1?arguments[1]:void 0,r),c=a>2?arguments[2]:void 0,s=void 0===c?r:o(c,r);s>u;)e[u++]=t;return e}},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return hm})),r.d(e,"LogicFlow",(function(){return ym})),r.d(e,"h",(function(){return Q.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return Ky})),r.d(e,"RectNode",(function(){return nh})),r.d(e,"CircleNode",(function(){return ph})),r.d(e,"PolygonNode",(function(){return xh})),r.d(e,"DiamondNode",(function(){return Ch})),r.d(e,"EllipseNode",(function(){return Wh})),r.d(e,"TextNode",(function(){return ov})),r.d(e,"HtmlNode",(function(){return yv})),r.d(e,"BaseEdge",(function(){return yb})),r.d(e,"LineEdge",(function(){return jb})),r.d(e,"PolylineEdge",(function(){return Hb})),r.d(e,"BezierEdge",(function(){return Jb})),r.d(e,"Arrow",(function(){return kv})),r.d(e,"BaseEdgeModel",(function(){return Ma})),r.d(e,"BezierEdgeModel",(function(){return Ef})),r.d(e,"LineEdgeModel",(function(){return $a})),r.d(e,"PolylineEdgeModel",(function(){return du})),r.d(e,"BaseNodeModel",(function(){return Rf})),r.d(e,"CircleNodeModel",(function(){return tp})),r.d(e,"DiamondNodeModel",(function(){return wp})),r.d(e,"EllipseNodeModel",(function(){return Bp})),r.d(e,"PolygonNodeModel",(function(){return id})),r.d(e,"RectNodeModel",(function(){return wd})),r.d(e,"TextNodeModel",(function(){return Id})),r.d(e,"HtmlNodeModel",(function(){return Zd})),r.d(e,"EditConfigModel",(function(){return oo})),r.d(e,"GraphModel",(function(){return kc})),r.d(e,"SnaplineModel",(function(){return ry})),r.d(e,"Keyboard",(function(){return om})),r.d(e,"get",(function(){return Xl})),r.d(e,"defaults",(function(){return Yl}));var n={};r.r(n),r.d(n,"createUuid",(function(){return Li})),r.d(n,"refreshGraphId",(function(){return zi})),r.d(n,"createDrag",(function(){return nc})),r.d(n,"StepDrag",(function(){return bc}));var o=r(0),i=r(10);if(!i.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!o.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var a=r(42),u=Object(a.b)("observerBatching");function c(t){t()}var s=!1;function l(){return s}function f(t){return Object(o.t)(t)}var p,d=1e4,y=new Set;function h(){void 0===p&&(p=setTimeout(v,1e4))}function v(){p=void 0;var t=Date.now();y.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,y.delete(e))})),y.size>0&&h()}var b=!1,g=[];var m={};function O(t){return"observer"+t}function w(t,e,r){if(void 0===e&&(e="observed"),void 0===r&&(r=m),l())return t();var n,u=function(t){return function(){b?g.push(t):t()}}((r.useForceUpdate||a.d)()),c=i.d.useRef(null);if(!c.current){var s=new o.c(O(e),(function(){p.mounted?u():(s.dispose(),c.current=null)})),p=function(t){return{cleanAt:Date.now()+d,reaction:t}}(s);c.current=p,n=c,y.add(n),h()}var v=c.current.reaction;return i.d.useDebugValue(v,f),i.d.useEffect((function(){var t;return t=c,y.delete(t),c.current?c.current.mounted=!0:(c.current={reaction:new o.c(O(e),(function(){u()})),cleanAt:1/0},u()),function(){c.current.reaction.dispose(),c.current=null}}),[]),function(t){b=!0,g=[];try{var e=t();b=!1;var r=g.length>0?g:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{b=!1}}((function(){var e,r;if(v.track((function(){try{e=t()}catch(t){r=t}})),r)throw r;return e}))}var _=function(){return(_=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function j(t,e){if(l())return t;var r,n,o,a=_({forwardRef:!1},e),u=t.displayName||t.name,c=function(e,r){return w((function(){return t(e,r)}),u)};return c.displayName=u,r=a.forwardRef?Object(i.f)(Object(i.e)(c)):Object(i.f)(c),n=t,o=r,Object.keys(n).forEach((function(t){E[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=u,r}var E={$$typeof:!0,render:!0,compare:!0,type:!0};function x(t){var e=t.children,r=t.render,n=e||r;return"function"!=typeof n?null:w(n)}function S(t,e,r,n,o){var i="children"===e?"render":"children",a="function"==typeof t[e],u="function"==typeof t[i];return a&&u?new Error("MobX Observer: Do not use children and render in the same time in`"+r):a||u?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}x.propTypes={children:S,render:S},x.displayName="Observer";var P;(P=i.g)||(P=c),Object(o.n)({reactionScheduler:P}),Object(a.a)()[u]=!0;var k=0;var A={};function D(t){return A[t]||(A[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+k+")";return k++,e}(t)),A[t]}function T(t,e){if(M(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(e,r[o])||!M(t[r[o]],e[r[o]]))return!1;return!0}function M(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function N(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}var C=D("patchMixins"),R=D("patchedDefinition");function I(t,e){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;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(r,o)}))}}function L(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];I.call.apply(I,[this,t,e].concat(n))}}function z(t,e,r){var n=function(t,e){var r=t[C]=t[C]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[R]){var i=t[e],a=function t(e,r,n,o,i){var a,u=L(i,o);return(a={})[R]=!0,a.get=function(){return u},a.set=function(i){if(this===e)u=L(i,o);else{var a=t(this,r,n,o,i);Object.defineProperty(this,r,a)}},a.configurable=!0,a.enumerable=n,a}(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,a)}}var B=o.a||"$mobx",X=D("isMobXReactObserver"),H=D("isUnmounted"),U=D("skipRender"),Y=D("isForcingUpdate");function G(t){var e=t.prototype;if(t[X]){var r=F(e);console.warn("The provided component class ("+r+") \n has already been declared as an observer component.")}else t[X]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==i.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==W)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=W;K(e,"props"),K(e,"state");var n=e.render;return e.render=function(){return V.call(this,n)},z(e,"componentWillUnmount",(function(){var t;if(!0!==l()&&(null===(t=this.render[B])||void 0===t||t.dispose(),this[H]=!0,!this.render[B])){var e=F(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 F(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function V(t){var e=this;if(!0===l())return t.call(this);N(this,U,!1),N(this,Y,!1);var r=F(this),n=t.bind(this),a=!1,u=new o.c(r+".render()",(function(){if(!a&&(a=!0,!0!==e[H])){var t=!0;try{N(e,Y,!0),e[U]||i.a.prototype.forceUpdate.call(e),t=!1}finally{N(e,Y,!1),t&&u.dispose()}}}));function c(){a=!1;var t=void 0,e=void 0;if(u.track((function(){try{e=Object(o.d)(!1,n)}catch(e){t=e}})),t)throw t;return e}return u.reactComponent=this,c[B]=u,this.render=c,c.call(this)}function W(t,e){return l()&&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||!T(this.props,t)}function K(t,e){var r=D("reactProp_"+e+"_valueHolder"),n=D("reactProp_"+e+"_atomHolder");function i(){return this[n]||N(this,n,Object(o.o)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return o.f&&o.e&&(t=Object(o.f)(!0)),i.call(this).reportObserved(),o.f&&o.e&&Object(o.e)(t),this[r]},set:function(t){this[Y]||T(this[r],t)?N(this,r,t):(N(this,r,t),N(this,U,!0),i.call(this).reportChanged(),N(this,U,!1))}})}var $="function"==typeof Symbol&&Symbol.for,Z=$?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,q=$?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function J(t){if(!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'"),q&&t.$$typeof===q)throw new Error("Mobx observer: 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(Z&&t.$$typeof===Z){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(i.e)((function(){var t=arguments;return Object(i.c)(x,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.a,t)?G(t):j(t)}if(!i.a)throw new Error("mobx-react requires React to be available");if(!o.C)throw new Error("mobx-react requires mobx to be available");var Q=r(1);r(3),r(90),r(2),r(6),r(5),r(11),r(41),r(24),r(20),r(4),r(22),r(21),r(23),r(7),r(8),r(16),r(25),r(18),r(181),r(186),r(97),r(147),r(148);var tt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o};var et=function(){this.__data__=[],this.size=0};var rt=function(t,e){return t===e||t!=t&&e!=e};var nt=function(t,e){for(var r=t.length;r--;)if(rt(t[r][0],e))return r;return-1},ot=Array.prototype.splice;var it=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ot.call(e,r,1),--this.size,!0)};var at=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]};var ut=function(t){return nt(this.__data__,t)>-1};var ct=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function st(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}st.prototype.clear=et,st.prototype.delete=it,st.prototype.get=at,st.prototype.has=ut,st.prototype.set=ct;var lt=st;var ft=function(){this.__data__=new lt,this.size=0};var pt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var dt=function(t){return this.__data__.get(t)};var yt=function(t){return this.__data__.has(t)},ht=r(28),vt=ht.a.Symbol,bt=Object.prototype,gt=bt.hasOwnProperty,mt=bt.toString,Ot=vt?vt.toStringTag:void 0;var wt=function(t){var e=gt.call(t,Ot),r=t[Ot];try{t[Ot]=void 0;var n=!0}catch(t){}var o=mt.call(t);return n&&(e?t[Ot]=r:delete t[Ot]),o},_t=Object.prototype.toString;var jt=function(t){return _t.call(t)},Et=vt?vt.toStringTag:void 0;var xt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Et&&Et in Object(t)?wt(t):jt(t)};var St=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Pt,kt=function(t){if(!St(t))return!1;var e=xt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},At=ht.a["__core-js_shared__"],Dt=(Pt=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||""))?"Symbol(src)_1."+Pt:"";var Tt=function(t){return!!Dt&&Dt in t},Mt=Function.prototype.toString;var Nt=function(t){if(null!=t){try{return Mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Ct=/^\[object .+?Constructor\]$/,Rt=Function.prototype,It=Object.prototype,Lt=Rt.toString,zt=It.hasOwnProperty,Bt=RegExp("^"+Lt.call(zt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xt=function(t){return!(!St(t)||Tt(t))&&(kt(t)?Bt:Ct).test(Nt(t))};var Ht=function(t,e){return null==t?void 0:t[e]};var Ut=function(t,e){var r=Ht(t,e);return Xt(r)?r:void 0},Yt=Ut(ht.a,"Map"),Gt=Ut(Object,"create");var Ft=function(){this.__data__=Gt?Gt(null):{},this.size=0};var Vt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wt=Object.prototype.hasOwnProperty;var Kt=function(t){var e=this.__data__;if(Gt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Wt.call(e,t)?e[t]:void 0},$t=Object.prototype.hasOwnProperty;var Zt=function(t){var e=this.__data__;return Gt?void 0!==e[t]:$t.call(e,t)};var qt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Gt&&void 0===e?"__lodash_hash_undefined__":e,this};function Jt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jt.prototype.clear=Ft,Jt.prototype.delete=Vt,Jt.prototype.get=Kt,Jt.prototype.has=Zt,Jt.prototype.set=qt;var Qt=Jt;var te=function(){this.size=0,this.__data__={hash:new Qt,map:new(Yt||lt),string:new Qt}};var ee=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var re=function(t,e){var r=t.__data__;return ee(e)?r["string"==typeof e?"string":"hash"]:r.map};var ne=function(t){var e=re(this,t).delete(t);return this.size-=e?1:0,e};var oe=function(t){return re(this,t).get(t)};var ie=function(t){return re(this,t).has(t)};var ae=function(t,e){var r=re(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ue(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ue.prototype.clear=te,ue.prototype.delete=ne,ue.prototype.get=oe,ue.prototype.has=ie,ue.prototype.set=ae;var ce=ue;var se=function(t,e){var r=this.__data__;if(r instanceof lt){var n=r.__data__;if(!Yt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ce(n)}return r.set(t,e),this.size=r.size,this};function le(t){var e=this.__data__=new lt(t);this.size=e.size}le.prototype.clear=ft,le.prototype.delete=pt,le.prototype.get=dt,le.prototype.has=yt,le.prototype.set=se;var fe=le;var pe=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var de=function(t){return this.__data__.has(t)};function ye(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ce;++e<r;)this.add(t[e])}ye.prototype.add=ye.prototype.push=pe,ye.prototype.has=de;var he=ye;var ve=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var be=function(t,e){return t.has(e)};var ge=function(t,e,r,n,o,i){var a=1&r,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,p=!0,d=2&r?new he:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var y=t[f],h=e[f];if(n)var v=a?n(h,y,f,e,t,i):n(y,h,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!ve(e,(function(t,e){if(!be(d,e)&&(y===t||o(y,t,r,n,i)))return d.push(e)}))){p=!1;break}}else if(y!==h&&!o(y,h,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},me=ht.a.Uint8Array;var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var we=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},_e=vt?vt.prototype:void 0,je=_e?_e.valueOf:void 0;var Ee=function(t,e,r,n,o,i,a){switch(r){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 me(t),new me(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return rt(+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=Oe;case"[object Set]":var c=1&n;if(u||(u=we),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;n|=2,a.set(t,e);var l=ge(u(t),u(e),n,o,i,a);return a.delete(t),l;case"[object Symbol]":if(je)return je.call(t)==je.call(e)}return!1};var xe=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Se=Array.isArray;var Pe=function(t,e,r){var n=e(t);return Se(t)?n:xe(n,r(t))};var ke=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i};var Ae=function(){return[]},De=Object.prototype.propertyIsEnumerable,Te=Object.getOwnPropertySymbols,Me=Te?function(t){return null==t?[]:(t=Object(t),ke(Te(t),(function(e){return De.call(t,e)})))}:Ae;var Ne=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Ce=function(t){return null!=t&&"object"==typeof t};var Re=function(t){return Ce(t)&&"[object Arguments]"==xt(t)},Ie=Object.prototype,Le=Ie.hasOwnProperty,ze=Ie.propertyIsEnumerable,Be=Re(function(){return arguments}())?Re:function(t){return Ce(t)&&Le.call(t,"callee")&&!ze.call(t,"callee")},Xe=r(47),He=/^(?:0|[1-9]\d*)$/;var Ue=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&He.test(t))&&t>-1&&t%1==0&&t<e};var Ye=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge["[object Arguments]"]=Ge["[object Array]"]=Ge["[object ArrayBuffer]"]=Ge["[object Boolean]"]=Ge["[object DataView]"]=Ge["[object Date]"]=Ge["[object Error]"]=Ge["[object Function]"]=Ge["[object Map]"]=Ge["[object Number]"]=Ge["[object Object]"]=Ge["[object RegExp]"]=Ge["[object Set]"]=Ge["[object String]"]=Ge["[object WeakMap]"]=!1;var Fe=function(t){return Ce(t)&&Ye(t.length)&&!!Ge[xt(t)]};var Ve=function(t){return function(e){return t(e)}},We=r(48),Ke=We.a&&We.a.isTypedArray,$e=Ke?Ve(Ke):Fe,Ze=Object.prototype.hasOwnProperty;var qe=function(t,e){var r=Se(t),n=!r&&Be(t),o=!r&&!n&&Object(Xe.a)(t),i=!r&&!n&&!o&&$e(t),a=r||n||o||i,u=a?Ne(t.length,String):[],c=u.length;for(var s in t)!e&&!Ze.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ue(s,c))||u.push(s);return u},Je=Object.prototype;var Qe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Je)};var tr=function(t,e){return function(r){return t(e(r))}},er=tr(Object.keys,Object),rr=Object.prototype.hasOwnProperty;var nr=function(t){if(!Qe(t))return er(t);var e=[];for(var r in Object(t))rr.call(t,r)&&"constructor"!=r&&e.push(r);return e};var or=function(t){return null!=t&&Ye(t.length)&&!kt(t)};var ir=function(t){return or(t)?qe(t):nr(t)};var ar=function(t){return Pe(t,ir,Me)},ur=Object.prototype.hasOwnProperty;var cr=function(t,e,r,n,o,i){var a=1&r,u=ar(t),c=u.length;if(c!=ar(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:ur.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var d=!0;i.set(t,e),i.set(e,t);for(var y=a;++s<c;){var h=t[l=u[s]],v=e[l];if(n)var b=a?n(v,h,l,e,t,i):n(h,v,l,t,e,i);if(!(void 0===b?h===v||o(h,v,r,n,i):b)){d=!1;break}y||(y="constructor"==l)}if(d&&!y){var g=t.constructor,m=e.constructor;g==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(t),i.delete(e),d},sr=Ut(ht.a,"DataView"),lr=Ut(ht.a,"Promise"),fr=Ut(ht.a,"Set"),pr=Ut(ht.a,"WeakMap"),dr=Nt(sr),yr=Nt(Yt),hr=Nt(lr),vr=Nt(fr),br=Nt(pr),gr=xt;(sr&&"[object DataView]"!=gr(new sr(new ArrayBuffer(1)))||Yt&&"[object Map]"!=gr(new Yt)||lr&&"[object Promise]"!=gr(lr.resolve())||fr&&"[object Set]"!=gr(new fr)||pr&&"[object WeakMap]"!=gr(new pr))&&(gr=function(t){var e=xt(t),r="[object Object]"==e?t.constructor:void 0,n=r?Nt(r):"";if(n)switch(n){case dr:return"[object DataView]";case yr:return"[object Map]";case hr:return"[object Promise]";case vr:return"[object Set]";case br:return"[object WeakMap]"}return e});var mr=gr,Or=Object.prototype.hasOwnProperty;var wr=function(t,e,r,n,o,i){var a=Se(t),u=Se(e),c=a?"[object Array]":mr(t),s=u?"[object Array]":mr(e),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),p=c==s;if(p&&Object(Xe.a)(t)){if(!Object(Xe.a)(e))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new fe),a||$e(t)?ge(t,e,r,n,o,i):Ee(t,e,c,r,n,o,i);if(!(1&r)){var d=l&&Or.call(t,"__wrapped__"),y=f&&Or.call(e,"__wrapped__");if(d||y){var h=d?t.value():t,v=y?e.value():e;return i||(i=new fe),o(h,v,r,n,i)}}return!!p&&(i||(i=new fe),cr(t,e,r,n,o,i))};var _r=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Ce(e)&&!Ce(r)?e!=e&&r!=r:wr(e,r,n,o,t,i))};var jr=function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[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 fe;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?_r(l,s,3,n,f):p))return!1}}return!0};var Er=function(t){return t==t&&!St(t)};var xr=function(t){for(var e=ir(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Er(o)]}return e};var Sr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Pr=function(t){var e=xr(t);return 1==e.length&&e[0][2]?Sr(e[0][0],e[0][1]):function(r){return r===t||jr(r,t,e)}};var kr=function(t){return"symbol"==typeof t||Ce(t)&&"[object Symbol]"==xt(t)},Ar=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dr=/^\w*$/;var Tr=function(t,e){if(Se(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!kr(t))||(Dr.test(t)||!Ar.test(t)||null!=e&&t in Object(e))};function Mr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Mr.Cache||ce),r}Mr.Cache=ce;var Nr=Mr;var Cr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rr=/\\(\\)?/g,Ir=function(t){var e=Nr(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Cr,(function(t,r,n,o){e.push(n?o.replace(Rr,"$1"):r||t)})),e})),Lr=vt?vt.prototype:void 0,zr=Lr?Lr.toString:void 0;var Br=function t(e){if("string"==typeof e)return e;if(Se(e))return tt(e,t)+"";if(kr(e))return zr?zr.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};var Xr=function(t){return null==t?"":Br(t)};var Hr=function(t,e){return Se(t)?t:Tr(t,e)?[t]:Ir(Xr(t))};var Ur=function(t){if("string"==typeof t||kr(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var Yr=function(t,e){for(var r=0,n=(e=Hr(e,t)).length;null!=t&&r<n;)t=t[Ur(e[r++])];return r&&r==n?t:void 0};var Gr=function(t,e,r){var n=null==t?void 0:Yr(t,e);return void 0===n?r:n};var Fr=function(t,e){return null!=t&&e in Object(t)};var Vr=function(t,e,r){for(var n=-1,o=(e=Hr(e,t)).length,i=!1;++n<o;){var a=Ur(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ye(o)&&Ue(a,o)&&(Se(t)||Be(t))};var Wr=function(t,e){return null!=t&&Vr(t,e,Fr)};var Kr=function(t,e){return Tr(t)&&Er(e)?Sr(Ur(t),e):function(r){var n=Gr(r,t);return void 0===n&&n===e?Wr(r,t):_r(e,n,3)}};var $r=function(t){return t};var Zr=function(t){return function(e){return null==e?void 0:e[t]}};var qr=function(t){return function(e){return Yr(e,t)}};var Jr=function(t){return Tr(t)?Zr(Ur(t)):qr(t)};var Qr=function(t){return"function"==typeof t?t:null==t?$r:"object"==typeof t?Se(t)?Kr(t[0],t[1]):Pr(t):Jr(t)};var tn=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),u=a.length;u--;){var c=a[t?u:++o];if(!1===r(i[c],c,i))break}return e}}();var en=function(t,e){return function(r,n){if(null==r)return r;if(!or(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}((function(t,e){return t&&tn(t,e,ir)}));var rn=function(t,e){var r=-1,n=or(t)?Array(t.length):[];return en(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var nn=function(t,e){return(Se(t)?tt:rn)(t,Qr(e,3))},on=function(){try{var t=Ut(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var an=function(t,e,r){"__proto__"==e&&on?on(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},un=Object.prototype.hasOwnProperty;var cn=function(t,e,r){var n=t[e];un.call(t,e)&&rt(n,r)&&(void 0!==r||e in t)||an(t,e,r)};var sn=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var u=e[i],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),o?an(r,u,c):cn(r,u,c)}return r};var ln=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},fn=Math.max;var pn=function(t,e,r){return e=fn(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=fn(n.length-e,0),a=Array(i);++o<i;)a[o]=n[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=n[o];return u[e]=r(a),ln(t,this,u)}};var dn=function(t){return function(){return t}},yn=on?function(t,e){return on(t,"toString",{configurable:!0,enumerable:!1,value:dn(e),writable:!0})}:$r,hn=Date.now;var vn=function(t){var e=0,r=0;return function(){var n=hn(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(yn);var bn=function(t,e){return vn(pn(t,e,$r),t+"")};var gn=function(t,e,r){if(!St(r))return!1;var n=typeof e;return!!("number"==n?or(r)&&Ue(e,r.length):"string"==n&&e in r)&&rt(r[e],t)};var mn=function(t){return bn((function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,a&&gn(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,i)}return e}))},On=Object.prototype.hasOwnProperty,wn=mn((function(t,e){if(Qe(e)||or(e))sn(e,ir(e),t);else for(var r in e)On.call(e,r)&&cn(t,r,e[r])}));var _n=function(t,e,r,n){if(!St(t))return t;for(var o=-1,i=(e=Hr(e,t)).length,a=i-1,u=t;null!=u&&++o<i;){var c=Ur(e[o]),s=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var l=u[c];void 0===(s=n?n(l,c,u):void 0)&&(s=St(l)?l:Ue(e[o+1])?[]:{})}cn(u,c,s),u=u[c]}return t};var jn=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],u=Yr(t,a);r(u,a)&&_n(i,Hr(a,t),u)}return i};var En=function(t,e){return jn(t,e,(function(e,r){return Wr(t,r)}))},xn=vt?vt.isConcatSpreadable:void 0;var Sn=function(t){return Se(t)||Be(t)||!!(xn&&t&&t[xn])};var Pn=function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=Sn),i||(i=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,o,i):xe(i,c):o||(i[i.length]=c)}return i};var kn=function(t){return(null==t?0:t.length)?Pn(t,1):[]};var An,Dn,Tn,Mn,Nn,Cn,Rn,In,Ln,zn,Bn,Xn,Hn,Un,Yn,Gn,Fn=function(t){return vn(pn(t,void 0,kn),t+"")}((function(t,e){return null==t?{}:En(t,e)}));function Vn(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Wn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $n(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Zn,qn,Jn,Qn,to,eo,ro={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},no=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey"],oo=(Dn=$n((An=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Vn(this,"stopZoomGraph",Dn,this),Vn(this,"stopScrollGraph",Tn,this),Vn(this,"stopMoveGraph",Mn,this),Vn(this,"adjustEdge",Nn,this),Vn(this,"adjustEdgeMiddle",Cn,this),Vn(this,"adjustEdgeStartAndEnd",Rn,this),Vn(this,"adjustNodePosition",In,this),Vn(this,"hideAnchors",Ln,this),Vn(this,"hoverOutline",zn,this),Vn(this,"nodeSelectedOutline",Bn,this),Vn(this,"edgeSelectedOutline",Xn,this),Vn(this,"nodeTextEdit",Hn,this),Vn(this,"edgeTextEdit",Un,this),Vn(this,"nodeTextDraggable",Yn,this),Vn(this,"edgeTextDraggable",Gn,this),Kn(this,"multipleSelectKey",""),Kn(this,"defaultConfig",{}),wn(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);wn(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&wn(n,this.defaultConfig),!0===e){var o=Fn(ro,no);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},wn(n,o)}!1===r&&wn(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=Fn(t,no);return wn(n,i)}},{key:"getConfig",value:function(){return Fn(this,no)}}])&&Wn(e.prototype,r),n&&Wn(e,n),t}()).prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tn=$n(An.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mn=$n(An.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nn=$n(An.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Cn=$n(An.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rn=$n(An.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),In=$n(An.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ln=$n(An.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zn=$n(An.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bn=$n(An.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xn=$n(An.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hn=$n(An.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Un=$n(An.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Yn=$n(An.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=$n(An.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$n(An.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(An.prototype,"updateEditConfig"),An.prototype),An);r(98);!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"}(Zn||(Zn={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(qn||(qn={})),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"}(Jn||(Jn={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(Qn||(Qn={})),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_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_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",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.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform"}(to||(to={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(eo||(eo={}));var io,ao,uo,co,so,lo,fo,po,yo;function ho(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return vo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vo(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 vo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bo(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function go(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function mo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Oo(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(io||(io={}));var wo=(uo=Oo((ao=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mo(this,"MINI_SCALE_SIZE",.2),mo(this,"MAX_SCALE_SIZE",16),bo(this,"SCALE_X",uo,this),bo(this,"SKEW_Y",co,this),bo(this,"SKEW_X",so,this),bo(this,"SCALE_Y",lo,this),bo(this,"TRANSLATE_X",fo,this),bo(this,"TRANSLATE_Y",po,this),bo(this,"ZOOM_SIZE",yo,this),mo(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{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=ho(t,2),r=e[0],n=e[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(n-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=ho(t,2),r=e[0],n=e[1];return[r*this.SCALE_X+this.TRANSLATE_X,n*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,r){var n=ho(t,2),o=n[0],i=n[1];return[o+e/this.SCALE_X,i+r/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,r=this.SCALE_X,n=this.SCALE_Y;return!0===t?(r+=this.ZOOM_SIZE,n+=this.ZOOM_SIZE):!1===t?(r-=this.ZOOM_SIZE,n-=this.ZOOM_SIZE):"number"==typeof t&&(r=t,n=t),r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(r-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(n-this.SCALE_Y)*e[1]),this.SCALE_X=r,this.SCALE_Y=n,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(to.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,r,n){var o=ho(this.CanvasPointToHtmlPoint([t,e]),2),i=r/2-o[0],a=n/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=a,this.emitGraphTransform("focusOn")}}])&&go(e.prototype,r),n&&go(e,n),t}()).prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),co=Oo(ao.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),so=Oo(ao.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),lo=Oo(ao.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),fo=Oo(ao.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),po=Oo(ao.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),yo=Oo(ao.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),Oo(ao.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"zoom"),ao.prototype),Oo(ao.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"resetZoom"),ao.prototype),Oo(ao.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"translate"),ao.prototype),Oo(ao.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(ao.prototype,"focusOn"),ao.prototype),ao);var _o=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var jo=function(t,e){return t&&sn(e,ir(e),t)};var Eo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},xo=Object.prototype.hasOwnProperty;var So=function(t){if(!St(t))return Eo(t);var e=Qe(t),r=[];for(var n in t)("constructor"!=n||!e&&xo.call(t,n))&&r.push(n);return r};var Po=function(t){return or(t)?qe(t,!0):So(t)};var ko=function(t,e){return t&&sn(e,Po(e),t)},Ao=r(101);var Do=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var To=function(t,e){return sn(t,Me(t),e)},Mo=tr(Object.getPrototypeOf,Object),No=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)xe(e,Me(t)),t=Mo(t);return e}:Ae;var Co=function(t,e){return sn(t,No(t),e)};var Ro=function(t){return Pe(t,Po,No)},Io=Object.prototype.hasOwnProperty;var Lo=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Io.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var zo=function(t){var e=new t.constructor(t.byteLength);return new me(e).set(new me(t)),e};var Bo=function(t,e){var r=e?zo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Xo=/\w*$/;var Ho=function(t){var e=new t.constructor(t.source,Xo.exec(t));return e.lastIndex=t.lastIndex,e},Uo=vt?vt.prototype:void 0,Yo=Uo?Uo.valueOf:void 0;var Go=function(t){return Yo?Object(Yo.call(t)):{}};var Fo=function(t,e){var r=e?zo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var Vo=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return zo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Bo(t,r);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 Fo(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Ho(t);case"[object Set]":return new n;case"[object Symbol]":return Go(t)}},Wo=Object.create,Ko=function(){function t(){}return function(e){if(!St(e))return{};if(Wo)return Wo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var $o=function(t){return"function"!=typeof t.constructor||Qe(t)?{}:Ko(Mo(t))};var Zo=function(t){return Ce(t)&&"[object Map]"==mr(t)},qo=We.a&&We.a.isMap,Jo=qo?Ve(qo):Zo;var Qo=function(t){return Ce(t)&&"[object Set]"==mr(t)},ti=We.a&&We.a.isSet,ei=ti?Ve(ti):Qo,ri={};ri["[object Arguments]"]=ri["[object Array]"]=ri["[object ArrayBuffer]"]=ri["[object DataView]"]=ri["[object Boolean]"]=ri["[object Date]"]=ri["[object Float32Array]"]=ri["[object Float64Array]"]=ri["[object Int8Array]"]=ri["[object Int16Array]"]=ri["[object Int32Array]"]=ri["[object Map]"]=ri["[object Number]"]=ri["[object Object]"]=ri["[object RegExp]"]=ri["[object Set]"]=ri["[object String]"]=ri["[object Symbol]"]=ri["[object Uint8Array]"]=ri["[object Uint8ClampedArray]"]=ri["[object Uint16Array]"]=ri["[object Uint32Array]"]=!0,ri["[object Error]"]=ri["[object Function]"]=ri["[object WeakMap]"]=!1;var ni=function t(e,r,n,o,i,a){var u,c=1&r,s=2&r,l=4&r;if(n&&(u=i?n(e,o,i,a):n(e)),void 0!==u)return u;if(!St(e))return e;var f=Se(e);if(f){if(u=Lo(e),!c)return Do(e,u)}else{var p=mr(e),d="[object Function]"==p||"[object GeneratorFunction]"==p;if(Object(Xe.a)(e))return Object(Ao.a)(e,c);if("[object Object]"==p||"[object Arguments]"==p||d&&!i){if(u=s||d?{}:$o(e),!c)return s?Co(e,ko(u,e)):To(e,jo(u,e))}else{if(!ri[p])return i?e:{};u=Vo(e,p,c)}}a||(a=new fe);var y=a.get(e);if(y)return y;a.set(e,u),ei(e)?e.forEach((function(o){u.add(t(o,r,n,o,e,a))})):Jo(e)&&e.forEach((function(o,i){u.set(i,t(o,r,n,i,e,a))}));var h=f?void 0:(l?s?Ro:ar:s?Po:ir)(e);return _o(h||e,(function(o,i){h&&(o=e[i=o]),cn(u,i,t(o,r,n,i,e,a))})),u};var oi=function(t){return ni(t,5)};var ii=function(t,e,r){(void 0!==r&&!rt(t[e],r)||void 0===r&&!(e in t))&&an(t,e,r)};var ai=function(t){return Ce(t)&&or(t)},ui=Function.prototype,ci=Object.prototype,si=ui.toString,li=ci.hasOwnProperty,fi=si.call(Object);var pi=function(t){if(!Ce(t)||"[object Object]"!=xt(t))return!1;var e=Mo(t);if(null===e)return!0;var r=li.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&si.call(r)==fi};var di=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var yi=function(t){return sn(t,Po(t))};var hi=function(t,e,r,n,o,i,a){var u=di(t,r),c=di(e,r),s=a.get(c);if(s)ii(t,r,s);else{var l=i?i(u,c,r+"",t,e,a):void 0,f=void 0===l;if(f){var p=Se(c),d=!p&&Object(Xe.a)(c),y=!p&&!d&&$e(c);l=c,p||d||y?Se(u)?l=u:ai(u)?l=Do(u):d?(f=!1,l=Object(Ao.a)(c,!0)):y?(f=!1,l=Fo(c,!0)):l=[]:pi(c)||Be(c)?(l=u,Be(u)?l=yi(u):St(u)&&!kt(u)||(l=$o(c))):f=!1}f&&(a.set(c,l),o(l,c,n,i,a),a.delete(c)),ii(t,r,l)}};var vi=function t(e,r,n,o,i){e!==r&&tn(r,(function(a,u){if(i||(i=new fe),St(a))hi(e,r,u,n,t,o,i);else{var c=o?o(di(e,u),a,u+"",e,r,i):void 0;void 0===c&&(c=a),ii(e,u,c)}}),Po)},bi=mn((function(t,e,r){vi(t,e,r)})),gi={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"}}},mi=function(t){var e=oi(gi);return t&&(e=bi(e,t)),e};r(70),r(190);function Oi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var wi=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n={},(r="_events")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,n;return e=t,(r=[{key:"on",value:function(t,e,r){var n=this;return null==t||t.split(",").forEach((function(t){t=t.trim(),n._events[t]||(n._events[t]=[]),n._events[t].push({callback:e,once:!!r})})),this}},{key:"once",value:function(t,e){var r=this;null==t||t.split(",").forEach((function(t){return t=t.trim(),r.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var r=this;null==t||t.split(",").forEach((function(t){var n=r._events[t]||[],o=r._events["*"]||[],i=function(n){for(var o=n.length,i=0;i<o;i++)if(n[i]){var a=n[i],u=a.callback;a.once&&(n.splice(i,1),0===n.length&&delete r._events[t],o--,i--),u.apply(r,[e])}};i(n),i(o)}))}},{key:"off",value:function(t,e){var r=this;return t||(this._events={}),t.split(",").forEach((function(t){if(e){for(var n=r._events[t]||[],o=n.length,i=0;i<o;i++)n[i].callback===e&&(n.splice(i,1),o--,i--);0===n.length&&delete r._events[t]}else delete r._events[t]})),this}},{key:"getEvents",value:function(){return this._events}}])&&Oi(e.prototype,r),n&&Oi(e,n),t}();function _i(t,e){return e*Math.round(t/e)||t}function ji(t,e){return t%e}function Ei(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.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 r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))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 r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Si,Pi=function(t,e,r){var n=Ei(t,2),o=n[0],i=n[1],a=Ei(e,2),u=a[0],c=a[1],s=Ei(r,2),l=s[0],f=s[1];return o>u&&o<l&&i>c&&i<f},ki=function(t,e){var r=!1;switch(e.multipleSelectKey){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;default:r=!1}return r},Ai=(r(31),r(71),r(154),r(155),r(72),r(12),r(13),r(14),r(46),r(30),new Uint8Array(16));function Di(){if(!Si&&!(Si="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 Si(Ai)}var Ti=/^(?:[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 Mi=function(t){return"string"==typeof t&&Ti.test(t)},Ni=[],Ci=0;Ci<256;++Ci)Ni.push((Ci+256).toString(16).substr(1));var Ri=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Ni[t[e+0]]+Ni[t[e+1]]+Ni[t[e+2]]+Ni[t[e+3]]+"-"+Ni[t[e+4]]+Ni[t[e+5]]+"-"+Ni[t[e+6]]+Ni[t[e+7]]+"-"+Ni[t[e+8]]+Ni[t[e+9]]+"-"+Ni[t[e+10]]+Ni[t[e+11]]+Ni[t[e+12]]+Ni[t[e+13]]+Ni[t[e+14]]+Ni[t[e+15]]).toLowerCase();if(!Mi(r))throw TypeError("Stringified UUID is invalid");return r};var Ii=function(t,e,r){var n=(t=t||{}).random||(t.rng||Di)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return Ri(n)},Li=function(){return Ii()},zi=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.nodes.reduce((function(t,r){return t[r.id]=e+Ii(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+Ii(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},Bi=(r(99),r(199),function(t,e,r){var n=t.x,o=t.y;return(n-e.x)*(n-r.x)<=0&&(o-e.y)*(o-r.y)<=0});function Xi(t){return(Xi="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 Hi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ui(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hi(Object(r),!0).forEach((function(e){Yi(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Yi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Gi,Fi,Vi,Wi,Ki,$i,Zi,qi,Ji,Qi,ta,ea,ra,na,oa,ia,aa=function(t){return t.anchors},ua=function(t,e){for(var r,n=e.length-1;n>=0;n--){if(fa(t,e[n])){var o=ca(t,e[n]);if(o){r={node:e[n],anchorIndex:o.index,anchor:o.anchor};break}}}return r},ca=function(t,e){for(var r,n=aa(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var a=sa(t.x,t.y,n[i].x,n[i].y);a<o&&(o=a,r={index:i,anchor:Ui(Ui({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r},sa=function(t,e,r,n){return Math.hypot(t-r,e-n)},la=function(t,e){var r=!1,n=pa(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},fa=function(t,e){var r=!1,n=pa(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},pa=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{minX:e-n/2,minY:r-o/2,maxX:e+n/2,maxY:r+o/2,x:e,y:r,width:n,height:o,centerX:e,centerY:r}},da=function(t,e,r){var n,o=function(t){var e=t,r=e.x,n=e.y,o=e.width,i=e.height,a=e.radius;return[{x:r-o/2+a,y:n-i/2+a,r:a},{x:r+o/2-a,y:n-i/2+a,r:a},{x:r-o/2+a,y:n+i/2-a,r:a},{x:r+o/2-a,y:n+i/2-a,r:a}]}(r),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var r=sa(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),ya(t,e,n)},ya=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.r;if(e===eo.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));n={x:Math.abs(c-t.x)<Math.abs(s-t.x)?c:s,y:t.y}}else if(e===eo.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)),p=Math.abs(l-t.y)<Math.abs(f-t.y)?l:f;n={x:t.x,y:p}}return n},ha=function(t,e){var r=e,n=!1,o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,a=r.y-r.height/2+r.radius,u=r.y+r.height/2-r.radius,c=r.x,s=r.y,l=r.width,f=r.height;return t.y===s+f/2||t.y===s-f/2?n=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(n=t.y>a&&t.y<u),n},va=function(t,e,r){var n,o=r,i=o.x,a=o.y,u=o.rx,c=o.ry;if(e===eo.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));n={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===eo.VERTICAL){var f=a-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),p=a+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(u*u)),d=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:d}}return n},ba=function(t,e,r){for(var n,o=r.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(r){var o=r.start,a=r.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===eo.HORIZONTAL&&(s={x:u.x,y:t.y}),u.y===c.y&&e===eo.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===eo.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===eo.VERTICAL&&(s={x:t.x,y:l*t.x+f})}if(Bi(s,o,a)){var p=sa(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},ga=function(t,e,r,n){var o=t.x,i=t.y;return e.x>t.x?o=t.x+r/2:e.x<t.x&&(o=t.x-r/2),e.y>t.y?i=t.y+n/2:e.y<t.y&&(i=t.y-n/2),{x:o,y:i}},ma=function(t){var e=t.rows,r=t.style,n=t.rowsLength,o=t.className,i=document.createElement("div");i.style.fontSize=r.fontSize,i.style.width=r.width,i.className=o,i.style.lineHeight=r.lineHeight,i.style.padding=r.padding,r.fontFamily&&(i.style.fontFamily=r.fontFamily),n>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},Oa=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=Vu(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},wa=function(t){return"object"!==Xi(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},_a=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},ja=1e3,Ea=999,xa=function(){return++ja};function Sa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Sa(Object(r),!0).forEach((function(e){Da(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ka(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Aa(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Da(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ta(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Ma=(Fi=Ta((Gi=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Da(this,"id",Li()),ka(this,"type",Fi,this),ka(this,"sourceNodeId",Vi,this),ka(this,"targetNodeId",Wi,this),ka(this,"startPoint",Ki,this),ka(this,"endPoint",$i,this),ka(this,"text",Zi,this),ka(this,"properties",qi,this),ka(this,"points",Ji,this),ka(this,"pointsList",Qi,this),ka(this,"isSelected",ta,this),ka(this,"isHovered",ea,this),ka(this,"isHitable",ra,this),ka(this,"draggable",na,this),Da(this,"graphModel",void 0),ka(this,"zIndex",oa,this),Da(this,"BaseType",Qn.EDGE),Da(this,"modelType",Jn.EDGE),ka(this,"state",ia,this),Da(this,"additionStateData",void 0),Da(this,"sourceAnchorId",""),Da(this,"targetAnchorId",""),Da(this,"menu",void 0),Da(this,"customTextPosition",!1),this.graphModel=r,this.initEdgeData(e),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(e)}var e,r,n;return e=t,(r=[{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type);r&&(t.id=r);var n=this.createId();n&&(t.id=n)}wn(this,qu(t)),this.graphModel.overlapMode===io.INCREASE&&(this.zIndex=t.zIndex||xa())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.baseEdge;return oi(t)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return oi(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return oi(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 r,n;return aa(t).forEach((function(t){var o=Ju(t,e);n?o<n&&(n=o,r=t):(n=o,r=t)})),r}},{key:"getEndAnchor",value:function(t){var e,r,n=this;return aa(t).forEach((function(t){var o=Ju(t,n.startPoint);r?o<r&&(r=o,e=t):(r=o,e=t)})),e}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,i={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(o.I)(this.properties)};return n&&(i.text={x:e,y:r,value:n}),this.graphModel.overlapMode===io.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"setProperty",value:function(t,e){this.properties[t]=_a(e),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Pa(Pa({},this.properties),_a(t)),this.setAttributes()}},{key:"formatText",value:function(t){var e=this.textPosition,r=e.x,n=e.y;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||r,y:t.text.y||n,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:r,y:n,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var t=this.textPosition,e=t.x,r=t.y;this.text.x=e,this.text.y=r}},{key:"moveText",value:function(t,e){if(this.text){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,draggable:a,x:n+t,y:o+e,editable:u}}}},{key:"setText",value:function(t){t&&wn(this.text,t)}},{key:"updateText",value:function(t){this.text=Pa(Pa({},this.text),{},{value:t})}},{key:"setAnchors",value:function(){if(!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint=t}if(!this.endPoint){var e=this.getEndAnchor(this.targetNode);this.endPoint=e}}},{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:"updateEndPoint",value:function(t){this.endPoint=t}},{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){wn(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,r=t.endPoint;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:r.x,y:r.y})}}])&&Aa(e.prototype,r),n&&Aa(e,n),t}()).prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Vi=Ta(Gi.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Wi=Ta(Gi.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ki=Ta(Gi.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),$i=Ta(Gi.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Zi=Ta(Gi.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),qi=Ta(Gi.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Ji=Ta(Gi.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Qi=Ta(Gi.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ta=Ta(Gi.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ea=Ta(Gi.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ra=Ta(Gi.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),na=Ta(Gi.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),oa=Ta(Gi.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ia=Ta(Gi.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ta(Gi.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(Gi.prototype,"sourceNode"),Gi.prototype),Ta(Gi.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(Gi.prototype,"targetNode"),Gi.prototype),Ta(Gi.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(Gi.prototype,"textPosition"),Gi.prototype),Ta(Gi.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setProperty"),Gi.prototype),Ta(Gi.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setProperties"),Gi.prototype),Ta(Gi.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"formatText"),Gi.prototype),Ta(Gi.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"resetTextPosition"),Gi.prototype),Ta(Gi.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"moveText"),Gi.prototype),Ta(Gi.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setText"),Gi.prototype),Ta(Gi.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"updateText"),Gi.prototype),Ta(Gi.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setAnchors"),Gi.prototype),Ta(Gi.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setSelected"),Gi.prototype),Ta(Gi.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setHovered"),Gi.prototype),Ta(Gi.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setHitable"),Gi.prototype),Ta(Gi.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setElementState"),Gi.prototype),Ta(Gi.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"updateStartPoint"),Gi.prototype),Ta(Gi.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"updateEndPoint"),Gi.prototype),Ta(Gi.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"setZIndex"),Gi.prototype),Ta(Gi.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"initPoints"),Gi.prototype),Ta(Gi.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"updateAttributes"),Gi.prototype),Ta(Gi.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"getAdjustStart"),Gi.prototype),Ta(Gi.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"getAdjustEnd"),Gi.prototype),Ta(Gi.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Gi.prototype,"updateAfterAdjustStartAndEnd"),Gi.prototype),Gi),Na=Ma;function Ca(t){return(Ca="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 Ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ia(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ra(Object(r),!0).forEach((function(e){Va(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ra(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function La(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function za(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ba(){return(Ba="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Xa(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Xa(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fa(t)););return t}function Ha(t,e){return(Ha=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ua(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 r,n=Fa(t);if(e){var o=Fa(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ya(this,r)}}function Ya(t,e){if(e&&("object"===Ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ga(t)}function Ga(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fa(t){return(Fa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Va(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Wa,Ka,$a=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&&Ha(t,e)}(i,t);var e,r,n,o=Ua(i);function i(){var t;La(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Va(Ga(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.LINE_EDGE),t}return e=i,(r=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return Ia(Ia({},Ba(Fa(i.prototype),"getEdgeStyle",this).call(this)),oi(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&za(e.prototype,r),n&&za(e,n),i}(Na);function Za(t){return(Za="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 qa(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ja(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ja(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 Ja(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qa(Object(r),!0).forEach((function(e){fu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function eu(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ru(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ou(){return(ou="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=iu(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function iu(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lu(t)););return t}function au(t,e){return(au=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function uu(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 r,n=lu(t);if(e){var o=lu(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cu(this,r)}}function cu(t,e){if(e&&("object"===Za(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return su(t)}function su(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 fu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var du=(Ka=pu((Wa=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&&au(t,e)}(i,t);var e,r,n,o=uu(i);function i(){var t;ru(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return fu(su(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.POLYLINE_EDGE),fu(su(t),"draginngPointList",void 0),eu(su(t),"dbClickPosition",Ka,su(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,ou(lu(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return tu(tu({},ou(lu(i.prototype),"getEdgeStyle",this).call(this)),oi(t))}},{key:"getTextPosition",value:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var r=this.dbClickPosition;return{x:r.x,y:r.y}}var n=Yu(this.points),o=qa(zu(n),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,r){var n,o;return r.forEach((function(r){var i;t===eo.HORIZONTAL?i=Math.abs(e.y-r.y):t===eo.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)})),n}},{key:"getCorssPoint",value:function(t,e,r){var n;return t===eo.HORIZONTAL?n={x:r.x,y:e.y}:t===eo.VERTICAL&&(n={x:e.x,y:r.y}),n}},{key:"removeCrossPoints",value:function(t,e,r){var n=r.map((function(t){return t}));if(1===t){var o=n[t],i=n[e],a=n[t-1];if(Bu(a,o,this.sourceNode)){if(Xu(o,i,this.sourceNode)){var u=Hu(o,i,this.sourceNode);u&&(n[t]=u,n.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)&&sa(e.x,e.y,o.x,o.y)<sa(a.x,a.y,o.x,o.y)&&(n[t-1]=e)}))}if(e===r.length-2){var c=n[t],s=n[e],l=n[e+1];if(Bu(s,l,this.targetNode)){if(Xu(c,s,this.targetNode)){var f=Hu(c,s,this.targetNode);f&&(n[e]=f,n.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)&&sa(t.x,t.y,s.x,s.y)<sa(l.x,l.y,s.x,s.y)&&(n[e+1]=t)}))}return n}},{key:"getDragingPoints",value:function(t,e,r,n,o){var i=o.map((function(t){return t})),a=this.getAfterAnchor(t,r,n),u=this.getCorssPoint(t,r,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})),r=t[0],n=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=Uu(r,n),f=e[0];switch(c){case Jn.RECT_NODE:0!==a.radius&&(ha(r,a)||(f=da(r,l,a)));break;case Jn.CIRCLE_NODE:f=ya(r,l,a);break;case Jn.ELLIPSE_NODE:f=va(r,l,a);break;case Jn.DIAMOND_NODE:case Jn.POLYGON_NODE:f=ba(r,l,a)}e[0]=f;var p=Uu(o,i),d=e[e.length-1];switch(s){case Jn.RECT_NODE:0!==u.radius&&(ha(i,u)||(d=da(i,p,u)));break;case Jn.CIRCLE_NODE:d=ya(i,p,u);break;case Jn.ELLIPSE_NODE:d=va(i,p,u);break;case Jn.DIAMOND_NODE:case Jn.POLYGON_NODE:d=ba(i,p,u)}return e[e.length-1]=d,e}},{key:"getData",value:function(){var t=ou(lu(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=Lu({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:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList,c=u;return a===eo.HORIZONTAL?(u[o]={x:r.x,y:r.y+e.y},u[i]={x:n.x,y:n.y+e.y},c=this.pointsList.map((function(t){return t}))):a===eo.VERTICAL&&(u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y},c=this.pointsList.map((function(t){return t}))),this.updatePointsAfterDrage(c),this.draginngPointList=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 r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,a=t.direction,u=this.pointsList;if(a===eo.HORIZONTAL){u[o]={x:r.x,y:r.y+e.y},u[i]={x:n.x,y:n.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:r.x,y:r.y+e.y};if(!la(s,this.sourceNode)){var l=this.sourceNode.anchors;c=this.getDragingPoints(a,"start",s,l,c)}}if(i===this.pointsList.length-1){var f={x:n.x,y:n.y+e.y};if(!la(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDragingPoints(a,"end",f,p,c)}}c=Iu(c),this.updatePointsAfterDrage(c),this.draginngPointList=c}else if(a===eo.VERTICAL){u[o]={x:r.x+e.x,y:r.y},u[i]={x:n.x+e.x,y:n.y};var d=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(d=this.removeCrossPoints(o,i,d)),0===o){var y={x:r.x+e.x,y:r.y};if(!la(y,this.sourceNode)){var h=this.sourceNode.anchors;d=this.getDragingPoints(a,"start",y,h,d)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!la(v,this.targetNode)){var b=this.targetNode.anchors;d=this.getDragingPoints(a,"end",v,b,d)}}d=Iu(d),this.updatePointsAfterDrage(d),this.draginngPointList=d}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.draginngPointList){var t=Yu(this.points);this.pointsList=t.map((function(t){return t})),this.draginngPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var r=t[t.length-1];this.endPoint=Object.assign({},r)}this.isDragging=!1}},{key:"updatePointsAfterDrage",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,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=Lu({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&nu(e.prototype,r),n&&nu(e,n),i}(Na)).prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pu(Wa.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"initPoints"),Wa.prototype),pu(Wa.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"updatePoints"),Wa.prototype),pu(Wa.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"updateStartPoint"),Wa.prototype),pu(Wa.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"updateEndPoint"),Wa.prototype),pu(Wa.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"dragAppendStart"),Wa.prototype),pu(Wa.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"dragAppendSimple"),Wa.prototype),pu(Wa.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"dragAppend"),Wa.prototype),pu(Wa.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"dragAppendEnd"),Wa.prototype),pu(Wa.prototype,"updatePointsAfterDrage",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"updatePointsAfterDrage"),Wa.prototype),pu(Wa.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"getAdjustStart"),Wa.prototype),pu(Wa.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"getAdjustEnd"),Wa.prototype),pu(Wa.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Wa.prototype,"updateAfterAdjustStartAndEnd"),Wa.prototype),Wa),yu=function(t){var e=t.start,r=t.end,n=t.offset,o=t.verticalLength,i=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},u=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),s=Math.sqrt(o*o+n*n);return"start"===i?r.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&&(r.x>=e.x?(a.leftX=r.x+s*Math.sin(u-c),a.leftY=r.y-s*Math.cos(u-c),a.rightX=r.x-s*Math.sin(u+c),a.rightY=r.y+s*Math.cos(u+c)):(a.leftX=r.x-s*Math.sin(u-c),a.leftY=r.y+s*Math.cos(u-c),a.rightX=r.x+s*Math.sin(u+c),a.rightY=r.y-s*Math.cos(u+c))),a};function hu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?hu(Object(r),!0).forEach((function(e){bu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gu(t){return function(t){if(Array.isArray(t))return _u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wu(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 mu(t){return(mu="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 Ou(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||wu(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 wu(t,e){if(t){if("string"==typeof t)return _u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_u(t,e):void 0}}function _u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ju=function(t){var e=[],r={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,r[e]=t})),Object.keys(r).forEach((function(t){e.push(r[t])})),e},Eu=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}},xu=function(t,e){return function(t,e){var r=Math.abs(t.x-e.centerX),n=Math.abs(t.y-e.centerY);return r/e.width>n/e.height?eo.HORIZONTAL:eo.VERTICAL}(e,t)===eo.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}},Su=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(r+o)/2,centerY:(n+i)/2,minX:r,minY:n,maxX:o,maxY:i,height:i-n,width:o-r}},Pu=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach((function(t){r.push(t.x),n.push(t.y)}));var o=Math.min.apply(Math,r),i=Math.max.apply(Math,r),a=Math.min.apply(Math,n),u=Math.max.apply(Math,n),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}},ku=function(t){var e=t.minX,r=t.minY,n=t.maxX,o=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:o},{x:e,y:o}]},Au=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Du=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Tu=function(t,e,r,n,o){return Du(t,e)+Du(t,r)+function(t,e){var r=0;return e.forEach((function(e){e&&(t.x===e.x&&(r+=-2),t.y===e.y&&(r+=-2))})),r}(t,[e,r,n,o])},Mu=function(t,e,r,n){var o=e.x-t.x,i=e.y-t.y,a=n.x-r.x,u=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-a*i+o*u),s=(a*(t.y-r.y)-u*(t.x-r.x))/(-a*i+o*u);return c>=0&&c<=1&&s>=0&&s<=1},Nu=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=Ou(ku(r),4),o=n[0],i=n[1],a=n[2],u=n[3];return Mu(t,e,o,i)||Mu(t,e,o,u)||Mu(t,e,i,a)||Mu(t,e,a,u)},Cu=function(t,e,r,n,o,i,a){var u=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=Tu(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var d=function(){var d,y,h,v=void 0,b=1/0;if(c.forEach((function(t){f[t.id]<b&&(b=f[t.id],v=t)})),v===r){var g=[];return function t(e,r,n,o,i){i||(i=0),e.unshift(r[o]),n[o]&&n[o]!==o&&i<=100&&t(e,r,n,n[o],i+1)}(g,p,s,r.id),{v:g}}y=v,(h=(d=c).indexOf(y))>-1&&d.splice(h,1),u.push(v),function(t,e,r,n){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||Nu(t,e,r)||Nu(t,e,n)||o.push(t))})),ju(o)}(t,v,n,o).forEach((function(t){if(-1===u.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var n=f[v.id]+Du(v,t);l[t.id]&&n>=l[t.id]||(s[t.id]=v.id,l[t.id]=n,f[t.id]=l[t.id]+Tu(t,r,e,i,a))}}))};c.length;){var y=d();if("object"===mu(y))return y.v}return[e,r]},Ru=function(t){return pa(t)},Iu=function(t){for(var e=t,r=1;r<e.length-1;){var n=e[r-1],o=e[r],i=e[r+1];n.x===o.x&&o.x===i.x||n.y===o.y&&o.y===i.y?e.splice(r,1):r++}return e},Lu=function(t,e,r,n,o){var i,a,u=Ru(r),c=Ru(n),s=Eu(u,o),l=Eu(c,o),f=xu(s,t),p=xu(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 d=Gu(t,e,f,p);return[t,f].concat(gu(d),[p,e])}var y=Pu([f,p]),h=Su(s,y),v=Su(l,y),b=[];b=(b=b.concat(ku(h))).concat(ku(v));var g={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[y,h,v].forEach((function(t){b=b.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,g).filter((function(t){return Au(t,s)&&Au(t,l)})))})),[{x:f.x,y:p.y},{x:p.x,y:f.y}].forEach((function(t){Au(t,s)&&Au(t,l)&&b.push(t)})),b.unshift(f),b.push(p),b=ju(b);var m=Cu(b,f,p,u,c,t,e);return m.unshift(t),m.push(e),m.length>2&&(m=Iu(m)),ju(m)},zu=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],o=sa(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var a=t[i],u=t[i+1],c=sa(a.x,a.y,u.x,u.y);c>o&&(o=c,r=a,n=u)}e=[r,n]}return e},Bu=function(t,e,r){var n=la(t,r),o=la(e,r);return n&&o},Xu=function(t,e,r){var n=la(t,r),o=la(e,r);return!(n&&o)&&(n||o)},Hu=function(t,e,r){for(var n,o,i=pa(r),a=ku(i),u=0;u<a.length;u++){Mu(t,e,a[u],a[(u+1)%a.length])&&(o=[a[u],a[(u+1)%a.length]])}return o&&(n=function(t,e,r,n){var o=(e.y-t.y)*(n.x-r.x)-(t.x-e.x)*(r.y-n.y);if(0===o)return!1;var i=((e.x-t.x)*(n.x-r.x)*(r.y-t.y)+(e.y-t.y)*(n.x-r.x)*t.x-(n.y-r.y)*(e.x-t.x)*r.x)/o,a=-((e.y-t.y)*(n.y-r.y)*(r.x-t.x)+(e.x-t.x)*(n.y-r.y)*t.y-(n.x-r.x)*(e.y-t.y)*r.y)/o;return(i-t.x)*(i-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(a-r.y)*(a-n.y)<=0&&{x:i,y:a}}(t,e,o[0],o[1])),n},Uu=function(t,e){var r;return t.x===e.x?r=eo.VERTICAL:t.y===e.y&&(r=eo.HORIZONTAL),r},Yu=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=Ou(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},Gu=function(t,e,r,n){var o=[];if(Uu(t,r)===Uu(e,n))t.y===r.y?(o.push({x:r.x,y:(r.y+n.y)/2}),o.push({x:n.x,y:(r.y+n.y)/2})):(o.push({x:(r.x+n.x)/2,y:r.y}),o.push({x:(r.x+n.x)/2,y:n.y}));else{var i={x:r.x,y:n.y},a=Bi(i,t,r),u=Bi(i,e,n);if(a||u)i={x:n.x,y:r.y};else{var c=Fu(i,t,r),s=Fu(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},Fu=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},Vu=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},Wu=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,a=pa(n),u=pa(o),c=Eu(a,i),s=Eu(u,i);return{sNext:xu(c,e),ePre:xu(s,r)}},Ku=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[$u(e[0]),$u(e[1]),$u(e[2]),$u(e[3])]},$u=function(t){var e=Ou(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Zu=function(t,e){for(var r,n=t.x,o=t.y,i=Yu(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(Bi(u,e,i)){var c=Math.abs(e.x-n);c<a&&(a=c,r=u)}}else if(e.y===i.y){var s={x:n,y:e.y};if(Bi(s,e,i)){var l=Math.abs(e.y-o);l<a&&(a=l,r=s)}}})),!r){var s=u[0],l=s.start,f=s.end;r={x:l.x+(f.x-l.x)/2,y:l.y+(f.y-l.y)/2}}return r},qu=function(t){return Fn(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Ju=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};var Qu=function(){};function tc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ec(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var rc=window.document;function nc(t){var e=t.onDragStart,r=void 0===e?Qu:e,n=t.onDraging,o=void 0===n?Qu:n,i=t.onDragEnd,a=void 0===i?Qu:i,u=t.step,c=void 0===u?1:u,s=t.isStopPropagation,l=void 0===s||s,f=!1,p=!1,d=0,y=0,h=0,v=0;function b(t){if(l&&t.stopPropagation(),p&&(f=!0,h+=t.clientX-d,v+=t.clientY-y,d=t.clientX,y=t.clientY,Math.abs(h)>c||Math.abs(v)>c)){var e=h%c,r=v%c,n=h-e,i=v-r;h=e,v=r,o({deltaX:n,deltaY:i,event:t})}}function g(t){if(l&&t.stopPropagation(),p=!1,rc.removeEventListener("mousemove",b,!1),rc.removeEventListener("mouseup",g,!1),f)return f=!1,a({event:t})}return function(t){if(0===t.button)return l&&t.stopPropagation(),p=!0,d=t.clientX,y=t.clientY,rc.addEventListener("mousemove",b,!1),rc.addEventListener("mouseup",g,!1),r({event:t})}}var oc,ic,ac,uc,cc,sc,lc,fc,pc,dc,yc,hc,vc,bc=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?Qu:n,i=e.onDraging,a=void 0===i?Qu:i,u=e.onDragEnd,c=void 0===u?Qu:u,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,p=void 0===f?null:f,d=e.step,y=void 0===d?1:d,h=e.isStopPropagation,v=void 0===h||h,b=e.model,g=void 0===b?null:b;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ec(this,"onDragStart",void 0),ec(this,"onDraging",void 0),ec(this,"onDragEnd",void 0),ec(this,"step",void 0),ec(this,"isStopPropagation",void 0),ec(this,"isDraging",!1),ec(this,"isStartDraging",!1),ec(this,"startX",0),ec(this,"startY",0),ec(this,"sumDeltaX",0),ec(this,"sumDeltaY",0),ec(this,"eventType",void 0),ec(this,"eventCenter",void 0),ec(this,"model",void 0),ec(this,"startTime",void 0),ec(this,"isGrag",void 0),ec(this,"handleMouseDown",(function(t){var e,n,o;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isStartDraging=!0,r.startX=t.clientX,r.startY=t.clientY,rc.addEventListener("mousemove",r.handleMouseMove,!1),rc.addEventListener("mouseup",r.handleMouseUp,!1),r.onDragStart({event:t});var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(to["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(to["".concat(r.eventType,"_DRAGSTART")],{e:t,data:i}),r.startTime=(new Date).getTime()}})),ec(this,"handleMouseMove",(function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDraging&&(r.isDraging=!0,r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n,o,i=r.sumDeltaX%r.step,a=r.sumDeltaY%r.step,u=r.sumDeltaX-i,c=r.sumDeltaY-a;r.sumDeltaX=i,r.sumDeltaY=a,r.onDraging({deltaX:u,deltaY:c,event:t});var s=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(to["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:s}),null===(o=r.eventCenter)||void 0===o||o.emit(to["".concat(r.eventType,"_DRAG")],{e:t,data:s})}})),ec(this,"handleMouseUp",(function(t){var e,n,o;if(r.isStartDraging=!1,r.isStopPropagation&&t.stopPropagation(),rc.removeEventListener("mousemove",r.handleMouseMove,!1),rc.removeEventListener("mouseup",r.handleMouseUp,!1),r.isDraging){r.isDraging=!1,r.onDragEnd({event:t});var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(to["".concat(r.eventType,"_MOUSEUP")],{e:t,data:i}),null===(o=r.eventCenter)||void 0===o||o.emit(to["".concat(r.eventType,"_DROP")],{e:t,data:i})}})),this.onDragStart=o,this.onDraging=a,this.onDragEnd=c,this.step=y,this.isStopPropagation=v,this.eventType=l,this.eventCenter=p,this.model=g}var e,r,n;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}}])&&tc(e.prototype,r),n&&tc(e,n),t}();function gc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gc(Object(r),!0).forEach((function(e){xc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Oc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return wc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wc(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 wc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function _c(t){return(_c="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 jc(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Ec(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Sc(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Pc,kc=(ic=Sc((oc=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),xc(this,"rootEl",void 0),jc(this,"width",ic,this),jc(this,"height",ac,this),xc(this,"theme",void 0),xc(this,"eventCenter",void 0),xc(this,"modelMap",new Map),xc(this,"topElement",void 0),xc(this,"idGenerator",void 0),xc(this,"nodeMoveRules",[]),jc(this,"edgeType",uc,this),jc(this,"nodes",cc,this),jc(this,"edges",sc,this),jc(this,"overlapMode",lc,this),jc(this,"background",fc,this),jc(this,"transformModel",pc,this),jc(this,"editConfigModel",dc,this),jc(this,"gridSize",yc,this),jc(this,"partial",hc,this),jc(this,"fakerNode",vc,this);var r=e.container,n=e.background,o=void 0===n?{}:n,i=e.grid,a=e.width,u=e.height,c=e.idGenerator;this.background=o,"object"===_c(i)&&(this.gridSize=i.size),this.rootEl=r,this.editConfigModel=new oo(e),this.eventCenter=new wi,this.transformModel=new wo(this.eventCenter),this.theme=mi(e.style),this.edgeType=e.edgeType||"polyline",this.width=a,this.height=u,this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=c}var e,r,n;return e=t,(r=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,r){return t[e.id]={index:r,model: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=[],r=-1,n=[-200,-200],o=[this.width+200,this.height+200],i=0;i<t.length;i++){var a=t[i];this.partial&&!this.isElementInArea(a,n,o,!1)||(9999===a.zIndex&&(r=e.length),e.push(a))}if(-1!==r){var u=e[e.length-1];e[e.length-1]=e[r],e[r]=u}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===Zn.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===Zn.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 r=[],n=[];this.nodes.forEach((function(t){return n.push(t)})),this.edges.forEach((function(t){return n.push(t)}));for(var o=0;o<n.length;o++){var i=n[o];this.isElementInArea(i,t,e)&&r.push(i)}return r}},{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,r=t.y,n=this.rootEl.getBoundingClientRect(),o={x:e-n.left,y:r-n.top},i=Oc(this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.BaseType===Qn.NODE){for(var o=pa(t=t),i=o.minX,a=o.minY,u=o.maxX,c=o.maxY,s=[{x:i,y:a},{x:u,y:a},{x:u,y:c},{x:i,y:c}],l=!0,f=0;f<s.length;f++){var p=s[f],d=p.x,y=p.y,h=this.transformModel.CanvasPointToHtmlPoint([d,y]),v=Oc(h,2);if(d=v[0],y=v[1],!Pi([d,y],e,r)){l=!1;break}}return l}if(t.BaseType===Qn.EDGE){var b=t=t,g=b.startPoint,m=b.endPoint,O=this.transformModel.CanvasPointToHtmlPoint([g.x,g.y]),w=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),_=Pi(O,e,r),j=Pi(w,e,r);return n?_&&j:_||j}return!1}},{key:"graphDataToModel",value:function(t){var e=this;this.nodes=nn(t.nodes,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的节点。"));var n=t.x,o=t.y;return n&&o&&(t.x=_i(n,e.gridSize),t.y=_i(o,e.gridSize),"object"===_c(t.text)&&(t.text.x-=ji(n,e.gridSize),t.text.y-=ji(o,e.gridSize))),new r(t,e)})),this.edges=nn(t.edges,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的边。"));return new r(t,e)}))}},{key:"modelToGraphData",value:function(){var t=this.edges.map((function(t){return t.getData()}));return{nodes:this.nodes.map((function(t){return t.getData()})),edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,e=[],r=0;r<this.nodes.length;r++){var n=this.nodes[r];if(n.isDragging){t=!0;break}e.push(n.getData())}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.getData())}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){var e=this.getNodeModelById(t);return e||this.getEdgeModelById(t)}},{key:"getNodeEdges",value:function(t){for(var e=[],r=0;r<this.edges.length;r++){var n=this.edges[r],o=this.edges[r].sourceNodeId===t,i=this.edges[r].targetNodeId===t;(o||i)&&e.push(n)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,r={nodes:[],edges:[]};return e.forEach((function(n){if(n.BaseType===Qn.NODE&&r.nodes.push(n.getData()),n.BaseType===Qn.EDGE){var o=n.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&r.edges.push(o)}})),r}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"changeNodeId",value:function(t,e){return e||(e=Li()),this.nodesMap[e]?(console.warn("当前流程图已存在节点".concat(e,", 修改失败")),""):this.nodesMap[t]?(this.edges.forEach((function(r){r.sourceNodeId===t&&(r.sourceNodeId=e),r.targetNodeId===t&&(r.targetNodeId=e)})),this.nodesMap[t].model.id=e,e):(console.warn("当前流程图找不到节点".concat(e,", 修改失败")),"")}},{key:"changeEdgeId",value:function(t,e){return e||(e=Li()),this.edgesMap[e]?(console.warn("当前流程图已存在边: ".concat(e,", 修改失败")),""):this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&(r.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,r,n,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);o&&(this.overlapMode===io.DEFAULT&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===io.INCREASE&&this.setElementZIndex(t,"top"))}},{key:"setElementZIndex",value:function(t,e){var r,n,o,i=(null===(r=this.nodesMap[t])||void 0===r?void 0:r.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);i&&("number"==typeof e&&(o=e),"top"===e&&(o=xa()),"bottom"===e&&(o=--Ea),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(to.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=_a(t);e.id&&this.nodesMap[t.id]&&delete e.id;var r=this.getModel(e.type);if(!r)throw new Error("找不到".concat(e.type,"对应的节点,请确认是否已注册此类型节点。"));var n=new r(e,this);this.nodes.push(n);var o=n.getData();return this.eventCenter.emit(to.NODE_ADD,{data:o}),n}},{key:"cloneNode",value:function(t){var e=this.getNodeModelById(t),r=e.getData();r.x+=30,r.y+=30,delete r.id,r.text&&(r.text.x+=30,r.text.y+=30);var n=this.addNode(r);return n.setSelected(!0),e.setSelected(!1),n.getData()}},{key:"moveNode",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model;i.move(e,r,n),this.moveEdge(t,e,r)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"moveNode2Coordinate",value:function(t,e,r){var n=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=r-u;this.moveNode(t,c,s,n)}else console.warn("不存在id为".concat(t,"的节点"))}},{key:"editText",value:function(t){this.setElementStateById(t,Zn.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=_a(t),r=e.type;r||(r=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var n=this.getModel(r);if(!n)throw new Error("找不到".concat(r,"对应的边,请确认是否已注册此类型边。"));var o=new n(mc(mc({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(to.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,r){for(var n=0;n<this.edges.length;n++){var o,i=this.edges[n],a=i.textPosition,u=a.x,c=a.y,s=this.edges[n].sourceNodeId===t,l=this.edges[n].targetNodeId===t;if(s&&i.updateStartPoint({x:i.startPoint.x+e,y:i.startPoint.y+r}),l&&i.updateEndPoint({x:i.endPoint.x+e,y:i.endPoint.y+r}),s||l)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===Jn.POLYLINE_EDGE&&null!==(o=i.text)&&void 0!==o&&o.value){var f=i.text,p=Zu(f,i.points);i.moveText(p.x-f.x,p.y-f.y)}else{var d=i.textPosition,y=d.x,h=d.y;i.moveText(y-u,h-c)}}}},{key:"deleteEdgeBySourceAndTarget",value:function(t,e){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===t&&this.edges[r].targetNodeId===e){var n=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(to.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeById",value:function(t){var e=this.edgesMap[t].index;if(this.edgesMap[t]){var r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(to.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(to.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(to.EDGE_DELETE,{data:r})}}},{key:"setElementStateById",value:function(t,e,r){this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(Zn.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(Zn.DEFAULT)}))}},{key:"updateText",value:function(t,e){this.nodes.forEach((function(r){r.id===t&&r.updateText(e)})),this.edges.forEach((function(r){r.id===t&&r.updateText(e)}))}},{key:"selectNodeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||this.clearSelectElements();var r=this.getElement(t);null==r||r.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===io.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveNodes",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.forEach((function(t){return n.moveNode(t,e,r,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 r=this.getNodeModelById(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var r=ga(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=ga(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}else console.warn("找不到id为".concat(t,"的节点"))}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModelById(t);if(r){if(r.type!==e){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete n.pointsList;var i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}}else console.warn("找不到id为".concat(t,"的边"))}},{key:"setTheme",value:function(t){this.theme=mi(mc(mc({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=t,this.height=e}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}}])&&Ec(e.prototype,r),n&&Ec(e,n),t}()).prototype,"width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ac=Sc(oc.prototype,"height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),uc=Sc(oc.prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),cc=Sc(oc.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),sc=Sc(oc.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),lc=Sc(oc.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return io.DEFAULT}}),fc=Sc(oc.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pc=Sc(oc.prototype,"transformModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dc=Sc(oc.prototype,"editConfigModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yc=Sc(oc.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),hc=Sc(oc.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),vc=Sc(oc.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Sc(oc.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(oc.prototype,"nodesMap"),oc.prototype),Sc(oc.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(oc.prototype,"edgesMap"),oc.prototype),Sc(oc.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(oc.prototype,"sortElements"),oc.prototype),Sc(oc.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(oc.prototype,"textEditElement"),oc.prototype),Sc(oc.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(oc.prototype,"selectElements"),oc.prototype),Sc(oc.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"setFakerNode"),oc.prototype),Sc(oc.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"removeFakerNode"),oc.prototype),Sc(oc.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"setModel"),oc.prototype),Sc(oc.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"toFront"),oc.prototype),Sc(oc.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"setElementZIndex"),oc.prototype),Sc(oc.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"deleteNode"),oc.prototype),Sc(oc.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"addNode"),oc.prototype),Sc(oc.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"cloneNode"),oc.prototype),Sc(oc.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"moveNode"),oc.prototype),Sc(oc.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"moveNode2Coordinate"),oc.prototype),Sc(oc.prototype,"editText",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"editText"),oc.prototype),Sc(oc.prototype,"addEdge",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"addEdge"),oc.prototype),Sc(oc.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"moveEdge"),oc.prototype),Sc(oc.prototype,"deleteEdgeBySourceAndTarget",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"deleteEdgeBySourceAndTarget"),oc.prototype),Sc(oc.prototype,"deleteEdgeById",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"deleteEdgeById"),oc.prototype),Sc(oc.prototype,"deleteEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"deleteEdgeBySource"),oc.prototype),Sc(oc.prototype,"deleteEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"deleteEdgeByTarget"),oc.prototype),Sc(oc.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"setElementStateById"),oc.prototype),Sc(oc.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"updateText"),oc.prototype),Sc(oc.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"selectNodeById"),oc.prototype),Sc(oc.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"selectEdgeById"),oc.prototype),Sc(oc.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"selectElementById"),oc.prototype),Sc(oc.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"clearSelectElements"),oc.prototype),Sc(oc.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"moveNodes"),oc.prototype),Sc(oc.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"setDefaultEdgeType"),oc.prototype),Sc(oc.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"changeNodeType"),oc.prototype),Sc(oc.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"changeEdgeType"),oc.prototype),Sc(oc.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"setTheme"),oc.prototype),Sc(oc.prototype,"resize",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"resize"),oc.prototype),Sc(oc.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(oc.prototype,"clearData"),oc.prototype),oc),Ac=kc;function Dc(t){return(Dc="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 Tc(){return(Tc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Mc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Nc(t,e){return(Nc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Cc(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 r,n=Lc(t);if(e){var o=Lc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Rc(this,r)}}function Rc(t,e){if(e&&("object"===Dc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ic(t)}function Ic(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lc(t){return(Lc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function zc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Bc,Xc=hm(Pc=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&&Nc(t,e)}(i,t);var e,r,n,o=Cc(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),zc(Ic(e=o.call(this)),"stepDrag",void 0),zc(Ic(e),"stepScrollX",0),zc(Ic(e),"stepScrollY",0),zc(Ic(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDraging:!0});var o=e.props.graphModel,i=o.transformModel;o.editConfigModel.stopMoveGraph||i.translate(r,n)})),zc(Ic(e),"onDragEnd",(function(){e.setState({isDraging:!1})})),zc(Ic(e),"zoomHandler",(function(t){var r=e.props,n=r.graphModel,o=n.editConfigModel,i=n.transformModel,a=n.gridSize,u=r.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){t.preventDefault();var l=u.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,p=l.y;i.zoom(t.deltaY<0,[f,p])}}else{if(t.preventDefault(),e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=a){var d=e.stepScrollX%a,y=e.stepScrollX-d;i.translate(-y*i.SCALE_X,0),e.stepScrollX=d}if(Math.abs(e.stepScrollY)>=a){var h=e.stepScrollY%a,v=e.stepScrollY-h;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=h}}})),zc(Ic(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props.graphModel,n=r.textEditElement;r.selectElements.size>0&&r.clearSelectElements(),n&&n.setElementState(Zn.DEFAULT),r.eventCenter.emit(to.BLANK_CLICK,{e:t})}})),zc(Ic(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props.graphModel,n=r.getPointByClient({x:t.clientX,y:t.clientY});r.eventCenter.emit(to.BLANK_CONTEXTMENU,{e:t,position:n})}})),zc(Ic(e),"mouseDownHandler",(function(t){var r=e.props.graphModel,n=r.eventCenter,o=r.editConfigModel,i=r.transformModel.SCALE_X,a=r.gridSize;o.stopMoveGraph?n.emit(to.BLANK_MOUSEDOWN,{e:t}):(e.stepDrag.setStep(a*i),e.stepDrag.handleMouseDown(t)),e.clickHandler(t)}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter;return e.stepDrag=new bc({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:n,eventType:"BLANK",eventCenter:a,model:null}),e.state={isDraging:!1},e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props,r=e.children,n=e.dnd,o=this.state.isDraging;return Object(Q.g)("svg",Tc({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:o?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},n.eventMap()),Object(Q.g)("g",{transform:t},r))}}])&&Mc(e.prototype,r),n&&Mc(e,n),i}(Q.a))||Pc;function Hc(t){return(Hc="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gc(t,e){return(Gc=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fc(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 r,n=Kc(t);if(e){var o=Kc(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vc(this,r)}}function Vc(t,e){if(e&&("object"===Hc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wc(t)}function Wc(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kc(t){return(Kc=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zc=hm(Bc=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&&Gc(t,e)}(i,t);var e,r,n,o=Fc(i);function i(){var t;Uc(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $c(Wc(t=o.call.apply(o,[this].concat(r))),"setToolOverlayRef",(function(e){var r=t.props.tool.getInstance();r.components.forEach((function(t){return t(r,e)})),r.components=[]})),t}return e=i,(r=[{key:"getTools",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=e.getTools().map((function(t){return Object(Q.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"render",value:function(){return Object(Q.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&Yc(e.prototype,r),n&&Yc(e,n),i}(Q.a))||Bc;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 Jc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ts(t,e){return(ts=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function es(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 r,n=ns(t);if(e){var o=ns(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rs(this,r)}}function rs(t,e){if(e&&("object"===qc(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 ns(t){return(ns=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var os,is=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&&ts(t,e)}(i,t);var e,r,n,o=es(i);function i(){return Jc(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.background;return Object(Q.g)("div",{className:"lf-background"},Object(Q.g)("div",{style:t,className:"lf-background-area"}))}}])&&Qc(e.prototype,r),n&&Qc(e,n),i}(Q.a);function as(t){return(as="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 us(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ss(t,e){return(ss=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ls(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 r,n=ds(t);if(e){var o=ds(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fs(this,r)}}function fs(t,e){if(e&&("object"===as(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ps(t)}function ps(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 ys(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hs=hm(os=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&&ss(t,e)}(i,t);var e,r,n,o=ls(i);function i(){var t;us(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return ys(ps(t=o.call.apply(o,[this].concat(r))),"id",Li()),t}return e=i,(r=[{key:"renderDot",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?2:n,i=t.size,a=t.visible,u=Math.min(Math.max(2,o),i/2),c=1;return a||(c=0),Object(Q.g)("rect",{width:u,height:u,rx:u/2,ry:u/2,fill:r,opacity:c})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?1:n,i=t.size,a=t.visible,u=Math.min(Math.max(1,o),i/2),c="M ".concat(i," 0 H0 M0 0 V0 ").concat(i),s=1;return a||(s=0),Object(Q.g)("path",{d:c,stroke:r,strokeWidth:u,opacity:s})}},{key:"render",value:function(){var t=this.props,e=t.type,r=t.size,n=t.graphModel.transformModel,o=[n.SCALE_X,n.SKEW_Y,n.SKEW_X,n.SCALE_Y,n.TRANSLATE_X,n.TRANSLATE_Y].join(","),i="matrix(".concat(o,")");return Object(Q.g)("div",{className:"lf-grid"},Object(Q.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(Q.g)("defs",null,Object(Q.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:r,height:r},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Object(Q.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&cs(e.prototype,r),n&&cs(e,n),i}(Q.a))||os;hs.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(50);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 bs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gs(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 gs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ms,Os=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=bs(t,2),n=r[0],o=r[1];"object"!==vs(o)&&(e[n]=o)})),Object(Q.g)("line",e)};function ws(t){return(ws="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 _s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function js(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_s(Object(r),!0).forEach((function(e){Es(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Es(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ss(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ps(t,e){return(Ps=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 r,n=Ds(t);if(e){var o=Ds(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return As(this,r)}}function As(t,e){if(e&&("object"===ws(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 Ts,Ms=hm(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&&Ps(t,e)}(i,t);var e,r,n,o=ks(i);function i(){return xs(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,r=t.isShowHorizontal,n=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:r?o.stroke:"none"}),l=js(js({x1:a,y1:-1e5,x2:a,y2:1e5},o),{},{stroke:n?o.stroke:"none"});return Object(Q.g)("g",{className:"lf-snapline"},Object(Q.g)(Os,s),Object(Q.g)(Os,l))}}])&&Ss(e.prototype,r),n&&Ss(e,n),i}(Q.a))||ms;function Ns(t){return(Ns="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){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Rs(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rs(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 Rs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Is(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.className,a=t.radius,u=e-n/2,c=r-o/2,s={};return Object.entries(t).forEach((function(t){var e=Cs(t,2),r=e[0],n=e[1];"object"!==Ns(n)&&(s[r]=n)})),i&&(s.className="lf-basic-shape ".concat(i)),a&&(s.rx=a,s.ry=a),s.x=u,s.y=c,Object(Q.g)("rect",s)}function Ls(t){return(Ls="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(){return(zs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Bs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bs(Object(r),!0).forEach((function(e){Hs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bs(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Hs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Us(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ys(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gs(t,e){return(Gs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fs(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 r,n=Ws(t);if(e){var o=Ws(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vs(this,r)}}function Vs(t,e){if(e&&("object"===Ls(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 Ws(t){return(Ws=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Is.defaultProps={className:"",radius:""};var Ks,$s=hm(Ts=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&&Gs(t,e)}(i,t);var e,r,n,o=Fs(i);function i(){return Us(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getNodesOutline",value:function(){var t=this.props.graphModel,e=t.nodes,r=t.editConfigModel,n=r.hoverOutline,o=r.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.isHovered||t.isSelected){var e=t.isHovered,r=t.isSelected,a=t.x,u=t.y,c=t.width,s=t.height;if(o&&r||n&&e){var l=t.getOutlineStyle(),f={};if(Object.keys(l).forEach((function(t){"hover"!==t&&(f[t]=l[t])})),e){var p=l.hover;f=Xs(Xs({},f),p)}i.push(Object(Q.g)(Is,zs({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,r=t.editConfigModel,n=r.edgeSelectedOutline,o=r.hoverOutline,i=[],a=0;a<e.length;a++){var u=e[a];(n&&u.isSelected||o&&u.isHovered)&&(u.modelType===Jn.LINE_EDGE?i.push(this.getLineOutline(u)):u.modelType===Jn.POLYLINE_EDGE?i.push(this.getPolylineOutline(u)):u.modelType===Jn.BEZIER_EDGE&&i.push(this.getBezierOutline(u)))}return i}},{key:"getLineOutline",value:function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,a=Math.abs(e.y-r.y)+10,u=t.getOutlineStyle();return Object(Q.g)(Is,zs({className:"lf-outline-edge",x:n,y:o,width:i,height:a},u))}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=Yu(e),n=Pu(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=t.getOutlineStyle();return Object(Q.g)(Is,zs({className:"lf-outline",x:o,y:i,width:a,height:u},c))}},{key:"getBezierOutline",value:function(t){var e=t.path,r=Ku(e),n=Pu(r,8),o=n.x,i=n.y,a=n.width,u=n.height,c=t.getOutlineStyle();return Object(Q.g)(Is,zs({className:"lf-outline",x:o,y:i,width:a,height:u},c))}},{key:"render",value:function(){return Object(Q.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&Ys(e.prototype,r),n&&Ys(e,n),i}(Q.a))||Ts;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){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Js(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Js(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 Js(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qs(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,a={cx:r,cy:o,r:void 0===i?4:i,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape"};return Object.entries(t).forEach((function(t){var e=qs(t,2),r=e[0],n=e[1];"object"!==Zs(n)&&(a[r]=n)})),Object(Q.g)("circle",a)}function tl(t){return(tl="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 el(){return(el=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function rl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return nl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nl(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 nl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ol(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function il(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function al(t,e,r){return e&&il(t.prototype,e),r&&il(t,r),t}function ul(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&&cl(t,e)}function cl(t,e){return(cl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sl(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 r,n=pl(t);if(e){var o=pl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ll(this,r)}}function ll(t,e){if(e&&("object"===tl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fl(t)}function fl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pl(t){return(pl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yl,hl=function(t){ul(r,t);var e=sl(r);function r(t){var n;ol(this,r),dl(fl(n=e.call(this)),"dragHandler",void 0),dl(fl(n),"onDraging",(function(t){var e=t.deltaX,r=t.deltaY,o=n.props,i=o.graphModel,a=o.bezierModel,u=o.type,c=i.transformModel,s=n.state,l=s.endX,f=s.endY,p=rl(c.moveCanvasPointByHtml([l,f],e,r),2),d=p[0],y=p[1];n.setState({endX:d,endY:y}),a.updateAdjustAnchor({x:d,y:y},u)})),dl(fl(n),"onDragEnd",(function(){var t=n.state,e=t.endX,r=t.endY,o=n.props,i=o.bezierModel,a=o.type;i.updateAdjustAnchor({x:e,y:r},a),i.isDragging=!1})),n.dragHandler=nc({onDraging:n.onDraging,onDragEnd:n.onDragEnd});var o=t.position;return n.state={endX:o.x,endY:o.y},n}return al(r,[{key:"render",value:function(){var t=this.props.position,e=t.x,r=t.y,n=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(Q.g)(Qs,el({className:"lf-bezier-adjust-anchor",x:e,y:r},n,{onMouseDown:this.dragHandler}))}}]),r}(Q.a),vl=hm(Ks=function(t){ul(r,t);var e=sl(r);function r(){return ol(this,r),e.apply(this,arguments)}return al(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=rl(Ku(r),4),i=o[0],a=o[1],u=o[2],c=o[3],s=t.getEdgeStyle().adjustLine,l=[];return l.push(Object(Q.g)(Os,el({x1:i.x,y1:i.y,x2:a.x,y2:a.y},s))),l.push(Object(Q.g)(hl,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(Q.g)(Os,el({x1:c.x,y1:c.y,x2:u.x,y2:u.y},s))),l.push(Object(Q.g)(hl,{position:u,bezierModel:t,graphModel:e,key:"".concat(n,"_sNext"),type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,r=[],n=0;n<e.length;n++){var o=e[n];o.isSelected&&o.modelType===Jn.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(Q.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(Q.a))||Ks;function bl(t){return(bl="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 gl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ml(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ol(t,e){return(Ol=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function wl(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 r,n=jl(t);if(e){var o=jl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _l(this,r)}}function _l(t,e){if(e&&("object"===bl(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 El,xl=hm(yl=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&&Ol(t,e)}(i,t);var e,r,n,o=wl(i);function i(){return gl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props.children;return Object(Q.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(Q.g)("g",{transform:t},e))}}])&&ml(e.prototype,r),n&&ml(e,n),i}(Q.a))||yl;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 Pl(){return(Pl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function kl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Al(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Dl(t,e){return(Dl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tl(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 r,n=Nl(t);if(e){var o=Nl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ml(this,r)}}function Ml(t,e){if(e&&("object"===Sl(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 Nl(t){return(Nl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Cl=hm(El=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&&Dl(t,e)}(i,t);var e,r,n,o=Tl(i);function i(){return kl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getComponent",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay",n=this.props.getView,o=n(t.type);return Object(Q.g)(o,{key:t.id,model:t,graphModel:e,overlay:r})}},{key:"render",value:function(){var t=this,e=this.props,r=e.graphModel,n=e.tool,o=e.options,i=e.dnd,a=e.snaplineModel,u={};r.width&&(u.width="".concat(r.width,"px")),r.height&&(u.height="".concat(r.height,"px"));var c=r.fakerNode,s=r.editConfigModel.adjustEdge;return Object(Q.g)("div",{className:"lf-graph",style:u},Object(Q.g)(Xc,{graphModel:r,dnd:i},Object(Q.g)("g",{className:"lf-base"},nn(r.sortElements,(function(e){return t.getComponent(e,r)}))),c?this.getComponent(c,r):""),Object(Q.g)(xl,{graphModel:r},Object(Q.g)($s,{graphModel:r}),s?Object(Q.g)(vl,{graphModel:r}):"",o.isSilentMode||!1===o.snapline?"":Object(Q.g)(Ms,{snaplineModel:a})),Object(Q.g)(Zc,{graphModel:r,tool:n}),o.background&&Object(Q.g)(is,{background:o.background}),o.grid&&Object(Q.g)(hs,Pl({},o.grid,{graphModel:r})))}}])&&Al(e.prototype,r),n&&Al(e,n),i}(Q.a))||El;function Rl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Il(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rl(Object(r),!0).forEach((function(e){zl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ll(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function zl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Bl=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),zl(this,"nodeConfig",void 0),zl(this,"lf",void 0),zl(this,"fakerNode",void 0),zl(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),zl(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(Il(Il({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),zl(this,"onDragOver",(function(t){if(t.preventDefault(),r.fakerNode){var e=r.clientToLocalPoint({x:t.clientX,y:t.clientY}),n=e.x,o=e.y;r.fakerNode.moveTo(n,o);var i=r.fakerNode.getData();r.lf.setNodeSnapLine(i),r.lf.graphModel.eventCenter.emit(to.NODE_DND_DRAG,{data:i})}return!1})),zl(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),zl(this,"onDrop",(function(t){if(r.lf.graphModel&&t&&r.nodeConfig){var e=r.lf.addNode(Il(Il({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY})));t.preventDefault(),t.stopPropagation(),r.nodeConfig=null,r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null;var n=e.getData();r.lf.graphModel.eventCenter.emit(to.NODE_DND_ADD,{data:n})}}));var n=e.lf;this.lf=n}var e,r,n;return e=t,(r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=Gr(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,a=o.y;return{x:_i(i,n),y:_i(a,n)}}},{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}}}])&&Ll(e.prototype,r),n&&Ll(e,n),t}();function Xl(t){var e=t.container,r=t.grid;if(!e)throw new Error("请检查 container 参数是否有效");return r&&(t.grid=wn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),t.width||(t.width=e.getBoundingClientRect().width),t.height||(t.height=e.getBoundingClientRect().height),wn({},Yl,t)}var Hl,Ul,Yl={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Gl(t){return(Gl="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 Fl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vl(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 Vl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Kl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Wl(Object(r),!0).forEach((function(e){af(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $l(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Zl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ql(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jl(){return(Jl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ql(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Ql(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=of(t)););return t}function tf(t,e){return(tf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ef(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 r,n=of(t);if(e){var o=of(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rf(this,r)}}function rf(t,e){if(e&&("object"===Gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return nf(t)}function nf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function of(t){return(of=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function af(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uf(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var cf,sf,lf,ff,pf,df,yf,hf,vf,bf,gf,mf,Of,wf,_f,jf,Ef=(Ul=uf((Hl=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&&tf(t,e)}(i,t);var e,r,n,o=ef(i);function i(){var t;Zl(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return af(nf(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.BEZIER_EDGE),$l(nf(t),"path",Ul,nf(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=100,Jl(of(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return Kl(Kl({},Jl(of(i.prototype),"getEdgeStyle",this).call(this)),oi(t))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(r){var n=r.x,o=r.y;t+=n,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=Jl(of(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Kl(Kl({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Wu({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=Fl(t,4),r=e[0],n=e[1],o=e[2],i=e[3];return"M ".concat(r.x," ").concat(r.y,"\n C ").concat(n.x," ").concat(n.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={x:this.startPoint.x,y:this.startPoint.y},e={x:this.endPoint.x,y:this.endPoint.y},r=this.getControls(),n=r.sNext,o=r.ePre;this.pointsList=[t,n,o,e],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:"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,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=Wu({start:e,end:r,sourceNode:n,targetNode:o,offset:this.offset}),a=i.sNext,u=i.ePre;this.pointsList=[e,a,u,r],this.initPoints()}}])&&ql(e.prototype,r),n&&ql(e,n),i}(Na)).prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),uf(Hl.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"initPoints"),Hl.prototype),uf(Hl.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updatePoints"),Hl.prototype),uf(Hl.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateStartPoint"),Hl.prototype),uf(Hl.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateEndPoint"),Hl.prototype),uf(Hl.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateAdjustAnchor"),Hl.prototype),uf(Hl.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"getAdjustStart"),Hl.prototype),uf(Hl.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"getAdjustEnd"),Hl.prototype),uf(Hl.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Hl.prototype,"updateAfterAdjustStartAndEnd"),Hl.prototype),Hl);function xf(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Sf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sf(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},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(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Sf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Pf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pf(Object(r),!0).forEach((function(e){Tf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Af(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Df(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Tf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mf(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Nf,Cf,Rf=(sf=Mf((cf=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Tf(this,"id",Li()),Af(this,"type",sf,this),Af(this,"x",lf,this),Af(this,"y",ff,this),Af(this,"text",pf,this),Af(this,"properties",df,this),Af(this,"_width",yf,this),Af(this,"_height",hf,this),Af(this,"anchorsOffset",vf,this),Af(this,"isSelected",bf,this),Af(this,"isHovered",gf,this),Af(this,"isDragging",mf,this),Af(this,"isHitable",Of,this),Af(this,"draggable",wf,this),Tf(this,"graphModel",void 0),Af(this,"zIndex",_f,this),Af(this,"state",jf,this),Tf(this,"BaseType",Qn.NODE),Tf(this,"modelType",Jn.NODE),Tf(this,"additionStateData",void 0),Tf(this,"targetRules",[]),Tf(this,"sourceRules",[]),Tf(this,"moveRules",[]),Tf(this,"hasSetTargetRules",!1),Tf(this,"hasSetSourceRules",!1),this.graphModel=r,this.initNodeData(e),this.setAttributes()}var e,r,n;return e=t,(r=[{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:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type);r&&(t.id=r);var n=this.createId();n&&(t.id=n)}this.formatText(t),wn(this,function(t){return Fn(t,["id","type","x","y","text","properties"])}(t)),this.graphModel.overlapMode===io.INCREASE&&(this.zIndex=t.zIndex||xa())}},{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,r=t.y,n=t.value,i=this.properties;Object(o.x)(i)&&(i=Object(o.I)(i));var a={id:this.id,type:this.type,x:this.x,y:this.y,properties:i};return this.graphModel.overlapMode===io.INCREASE&&(a.zIndex=this.zIndex),n&&(a.text={x:e,y:r,value:n}),a}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getNodeStyle",value:function(){return kf({},this.graphModel.theme.baseNode)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return oi(t)}},{key:"getAnchorStyle",value:function(){var t=this.graphModel.theme.anchor;return oi(t)}},{key:"getAnchorLineStyle",value:function(){var t=this.graphModel.theme.anchorLine;return oi(t)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return oi(t)}},{key:"isAllowConnectedAsSource",value:function(t,e,r){var n=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var o,i=!0,a=0;a<n.length;a++){var u=n[a];if(!u.validate.call(this,this,t,e,r)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,r){var n=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var o,i=!0,a=0;a<n.length;a++){var u=n[a];if(!u.validate.call(this,t,this,e,r)){i=!1,o=u.message;break}}return{isAllPass:i,msg:o}}},{key:"isAllowMoveNode",value:function(t,e){var r,n=xf(this.moveRules);try{for(n.s();!(r=n.n()).done;)if(!(0,r.value)(this,t,e))return!1}catch(t){n.e(t)}finally{n.f()}var o,i=xf(this.graphModel.nodeMoveRules);try{for(i.s();!(o=i.n()).done;)if(!(0,o.value)(this,t,e))return!1}catch(t){i.e(t)}finally{i.f()}return!0}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.id,r=this.x,n=this.y;return t&&t.length>0?t.map((function(t,o){return t.length?(t=t,{id:"".concat(e,"_").concat(o),x:r+t[0],y:n+t[1]}):kf(kf({},t=t),{},{x:r+t.x,y:n+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:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(r||this.isAllowMoveNode(t,e)){var n=this.x+t,o=this.y+e;this.x=n,this.y=o,this.text&&this.moveText(t,e)}}},{key:"moveTo",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t-this.x,o=e-this.y;(r||this.isAllowMoveNode(n,o))&&(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e)}},{key:"moveText",value:function(t,e){var r=this.text,n=r.x,o=r.y,i=r.value,a=r.draggable,u=r.editable;this.text={value:i,editable:u,draggable:a,x:n+t,y:o+e}}},{key:"updateText",value:function(t){this.text=kf(kf({},this.text),{},{value:t})}},{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=kf(kf({},this.properties),{},Tf({},t,_a(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=kf(kf({},this.properties),_a(t)),this.setAttributes()}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){wn(this,t)}}])&&Df(e.prototype,r),n&&Df(e,n),t}()).prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),lf=Mf(cf.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ff=Mf(cf.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),pf=Mf(cf.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),df=Mf(cf.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),yf=Mf(cf.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),hf=Mf(cf.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),vf=Mf(cf.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),bf=Mf(cf.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),gf=Mf(cf.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),mf=Mf(cf.prototype,"isDragging",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Of=Mf(cf.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),wf=Mf(cf.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),_f=Mf(cf.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),jf=Mf(cf.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Mf(cf.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"addNodeMoveRules"),cf.prototype),Mf(cf.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"move"),cf.prototype),Mf(cf.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"moveTo"),cf.prototype),Mf(cf.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"moveText"),cf.prototype),Mf(cf.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"updateText"),cf.prototype),Mf(cf.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"setSelected"),cf.prototype),Mf(cf.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"setHovered"),cf.prototype),Mf(cf.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"setHitable"),cf.prototype),Mf(cf.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"setElementState"),cf.prototype),Mf(cf.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"setProperty"),cf.prototype),Mf(cf.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"setProperties"),cf.prototype),Mf(cf.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"setZIndex"),cf.prototype),Mf(cf.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(cf.prototype,"updateAttributes"),cf.prototype),cf);function If(t){return(If="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 Lf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lf(Object(r),!0).forEach((function(e){$f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bf(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Xf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Uf(){return(Uf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Yf(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Yf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kf(t)););return t}function Gf(t,e){return(Gf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ff(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 r,n=Kf(t);if(e){var o=Kf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vf(this,r)}}function Vf(t,e){if(e&&("object"===If(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wf(t)}function Wf(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 $f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zf(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var qf,Jf,Qf,tp=(Cf=Zf((Nf=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&&Gf(t,e)}(i,t);var e,r,n,o=Ff(i);function i(){var t;Xf(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $f(Wf(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.CIRCLE_NODE),Bf(Wf(t),"r",Cf,Wf(t)),t}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var t=Uf(Kf(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return zf(zf({},t),oi(e))}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.r;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&Hf(e.prototype,r),n&&Hf(e,n),i}(Rf)).prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Zf(Nf.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Nf.prototype,"width"),Nf.prototype),Zf(Nf.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Nf.prototype,"height"),Nf.prototype),Nf);r(122);function ep(t){return(ep="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){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return np(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return np(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 np(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function op(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ip(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?op(Object(r),!0).forEach((function(e){vp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):op(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ap(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function up(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sp(){return(sp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=lp(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function lp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=hp(t)););return t}function fp(t,e){return(fp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pp(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 r,n=hp(t);if(e){var o=hp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return dp(this,r)}}function dp(t,e){if(e&&("object"===ep(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yp(t)}function yp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hp(t){return(hp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function vp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bp(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var gp,mp,Op,wp=(Jf=bp((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&&fp(t,e)}(i,t);var e,r,n,o=pp(i);function i(){var t;up(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return vp(yp(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.DIAMOND_NODE),ap(yp(t),"rx",Jf,yp(t)),ap(yp(t),"ry",Qf,yp(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=sp(hp(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return ip(ip({},t),oi(e))}},{key:"points",get:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[[t,e-n],[t+r,e],[t,e+n],[t-r,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(r){var n=rp(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=rp(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this;return this.points.map((function(e,r){var n=rp(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&cp(e.prototype,r),n&&cp(e,n),i}(Rf)).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Qf=bp(qf.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),bp(qf.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(qf.prototype,"points"),qf.prototype),bp(qf.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(qf.prototype,"pointsPosition"),qf.prototype),bp(qf.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(qf.prototype,"width"),qf.prototype),bp(qf.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(qf.prototype,"height"),qf.prototype),qf);function _p(t){return(_p="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(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ep(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jp(Object(r),!0).forEach((function(e){Rp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xp(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Sp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kp(){return(kp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ap(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function Ap(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Cp(t)););return t}function Dp(t,e){return(Dp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Tp(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 r,n=Cp(t);if(e){var o=Cp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mp(this,r)}}function Mp(t,e){if(e&&("object"===_p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Np(t)}function Np(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Cp(t){return(Cp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Rp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ip(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Lp,zp,Bp=(mp=Ip((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&&Dp(t,e)}(i,t);var e,r,n,o=Tp(i);function i(){var t;Sp(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Rp(Np(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.ELLIPSE_NODE),xp(Np(t),"rx",mp,Np(t)),xp(Np(t),"ry",Op,Np(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=kp(Cp(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return Ep(Ep({},t),oi(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,r=this.rx,n=this.ry;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&Pp(e.prototype,r),n&&Pp(e,n),i}(Rf)).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Op=Ip(gp.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Ip(gp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(gp.prototype,"width"),gp.prototype),Ip(gp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(gp.prototype,"height"),gp.prototype),gp);function Xp(t){return(Xp="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 Hp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Up(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Up(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 Up(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Yp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yp(Object(r),!0).forEach((function(e){ed(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Fp(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Vp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kp(){return(Kp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=$p(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function $p(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=td(t)););return t}function Zp(t,e){return(Zp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function qp(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 r,n=td(t);if(e){var o=td(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jp(this,r)}}function Jp(t,e){if(e&&("object"===Xp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Qp(t)}function Qp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function td(t){return(td=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ed(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rd(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var nd,od,id=(zp=rd((Lp=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&&Zp(t,e)}(i,t);var e,r,n,o=qp(i);function i(){var t;Vp(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return ed(Qp(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.POLYGON_NODE),Fp(Qp(t),"points",zp,Qp(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Kp(td(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return Gp(Gp({},t),oi(e))}},{key:"pointsPosition",get:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return this.points.map((function(o){return{x:o[0]+t-r/2,y:o[1]+e-n/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Hp(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Hp(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this,e=this.x,r=this.y,n=this.width,o=this.height;return this.points.map((function(i,a){var u=Hp(i,2),c=u[0],s=u[1];return{x:e+c-n/2,y:r+s-o/2,id:"".concat(t.id,"_").concat(a)}}))}}])&&Wp(e.prototype,r),n&&Wp(e,n),i}(Rf)).prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),rd(Lp.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Lp.prototype,"pointsPosition"),Lp.prototype),rd(Lp.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Lp.prototype,"width"),Lp.prototype),rd(Lp.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Lp.prototype,"height"),Lp.prototype),Lp);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 ud(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function cd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ud(Object(r),!0).forEach((function(e){md(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ud(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function sd(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ld(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function pd(){return(pd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=dd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function dd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=gd(t)););return t}function yd(t,e){return(yd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hd(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 r,n=gd(t);if(e){var o=gd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vd(this,r)}}function vd(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 bd(t)}function bd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gd(t){return(gd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function md(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Od,wd=(od=function(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}((nd=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&&yd(t,e)}(i,t);var e,r,n,o=hd(i);function i(){var t;ld(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return md(bd(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.RECT_NODE),sd(bd(t),"radius",od,bd(t)),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var t=pd(gd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return cd(cd({},t),oi(e))}}])&&fd(e.prototype,r),n&&fd(e,n),i}(Rf)).prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),nd);function _d(t){return(_d="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 jd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ed(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jd(Object(r),!0).forEach((function(e){Cd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function xd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pd(){return(Pd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=kd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}}).apply(this,arguments)}function kd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nd(t)););return t}function Ad(t,e){return(Ad=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Dd(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 r,n=Nd(t);if(e){var o=Nd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Td(this,r)}}function Td(t,e){if(e&&("object"===_d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Md(t)}function Md(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nd(t){return(Nd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Cd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rd(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Id=(Rd((Od=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&&Ad(t,e)}(i,t);var e,r,n,o=Dd(i);function i(){var t;xd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cd(Md(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.TEXT_NODE),t}return e=i,(r=[{key:"getTextStyle",value:function(){var t=Pd(Nd(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return Ed(Ed({},t),oi(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return Oa({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 Oa({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&Sd(e.prototype,r),n&&Sd(e,n),i}(Rf)).prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Od.prototype,"width"),Od.prototype),Rd(Od.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Od.prototype,"height"),Od.prototype),Od);function Ld(t){return(Ld="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xd(t,e){return(Xd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Hd(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 r,n=Gd(t);if(e){var o=Gd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ud(this,r)}}function Ud(t,e){if(e&&("object"===Ld(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Yd(t)}function Yd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gd(t){return(Gd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Fd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Vd,Wd,Kd,$d,Zd=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&&Xd(t,e)}(i,t);var e,r,n,o=Hd(i);function i(){var t;zd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Fd(Yd(t=o.call.apply(o,[this].concat(r))),"modelType",Jn.HTML_NODE),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}}])&&Bd(e.prototype,r),n&&Bd(e,n),i}(Rf);function qd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jd(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Qd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ty(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ey(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ry=(Wd=ey((Vd=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ty(this,"graphModel",void 0),Jd(this,"isShowHorizontal",Wd,this),Jd(this,"isShowVertical",Kd,this),Jd(this,"position",$d,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}var e,r,n;return e=t,(r=[{key:"getStyle",value:function(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qd(Object(r),!0).forEach((function(e){ty(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,e){for(var r=t.x,n=t.y,o=!1,i=!1,a=0;a<e.length;a++){var u=e[a];if(u.id!==t.id&&(r===u.x&&(o=!0),n===u.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:r,y:n}}}},{key:"getHorizontalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=pa(a);else{var u=this.graphModel.getNodeModelById(i);n=pa(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=pa(s);if(l.minY===n.minY||l.maxY===n.minY){o=!0,r=n.minY;break}if(l.minY===n.maxY||l.maxY===n.maxY){o=!0,r=n.maxY;break}}}return wn({isShowHorizontal:o,position:{y:r}})}},{key:"getVerticalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var a=this.graphModel.fakerNode;if(a&&a.id===i)n=pa(a);else{var u=this.graphModel.getNodeModelById(i);n=pa(u)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=pa(s);if(l.minX===n.minX||l.maxX===n.minX){o=!0,r=n.minX;break}if(l.minX===n.maxX||l.maxX===n.maxX){o=!0,r=n.maxX;break}}}return wn({isShowVertical:o,position:{x:r}})}},{key:"getSnapLinePosition",value:function(t,e){var r=this.getCenterSnapLine(t,e),n=r.isShowHorizontal,o=r.isShowVertical;if(!n){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(r.isShowHorizontal=i.isShowHorizontal,r.position.y=i.position.y)}if(!o){var a=this.getVerticalSnapline(t,e);a.isShowVertical&&(r.isShowVertical=a.isShowVertical,r.position.x=a.position.x)}return r}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,r=t.isShowVertical,n=t.position;this.position=n,this.isShowHorizontal=e,this.isShowVertical=r}},{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,r=this.getSnapLinePosition(t,e);this.setSnaplineInfo(r)}}])&&Qd(e.prototype,r),n&&Qd(e,n),t}()).prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Kd=ey(Vd.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$d=ey(Vd.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ey(Vd.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(Vd.prototype,"clearSnapline"),Vd.prototype),ey(Vd.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(Vd.prototype,"setNodeSnapLine"),Vd.prototype),Vd);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 oy(){return(oy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function iy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ay(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?iy(Object(r),!0).forEach((function(e){hy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function uy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return cy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cy(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 cy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function sy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ly(t,e){return(ly=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fy(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 r,n=yy(t);if(e){var o=yy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return py(this,r)}}function py(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 dy(t)}function dy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yy(t){return(yy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function hy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vy=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&&ly(t,e)}(i,t);var e,r,n,o=fy(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),hy(dy(t=o.call(this)),"preTargetNode",void 0),hy(dy(t),"dragHandler",void 0),hy(dy(t),"sourceRuleResults",void 0),hy(dy(t),"targetRuleResults",void 0),hy(dy(t),"onDragStart",(function(){var e=t.props,r=e.x,n=e.y,o=e.nodeModel,i=e.graphModel,a=i.overlapMode;i.selectNodeById(o.id),a!==io.INCREASE&&i.toFront(o.id),t.setState({startX:r,startY:n,endX:r,endY:n})})),hy(dy(t),"onDraging",(function(e){var r=e.deltaX,n=e.deltaY,o=t.state,i=o.endX,a=o.endY,u=t.props,c=u.graphModel,s=u.nodeModel,l=c.transformModel,f=c.nodes,p=uy(l.moveCanvasPointByHtml([i,a],r,n),2),d=p[0],y=p[1];t.setState({endX:d,endY:y,draging:!0});var h=ua({x:i,y:a},f);if(h){var v=h.node;t.preTargetNode=v;var b=h.anchor.id,g="".concat(v.id,"_").concat(b);if(!t.targetRuleResults.has(g)){var m=t.props.anchorData,O=h.anchor,w=s.isAllowConnectedAsSource(v,m,O),_=v.isAllowConnectedAsTarget(s,m,O);t.sourceRuleResults.set(v.id,wa(w)),t.targetRuleResults.set(g,wa(_))}var j=t.sourceRuleResults.get(v.id).isAllPass,E=t.targetRuleResults.get(g).isAllPass;j&&E?v.setElementState(Zn.ALLOW_CONNECT):v.setElementState(Zn.NOT_ALLOW_CONNECT)}else t.preTargetNode&&t.preTargetNode.state!==Zn.DEFAULT&&t.preTargetNode.setElementState(Zn.DEFAULT)})),hy(dy(t),"onDragEnd",(function(){t.checkEnd(),t.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear()})),hy(dy(t),"checkEnd",(function(){var e=t.props,r=e.graphModel,n=e.nodeModel,o=e.x,i=e.y,a=e.id,u=r.nodes,c=r.edgeType,s=t.state,l=s.endX,f=s.endY,p=s.draging,d=ua({x:l,y:f},u);if(t.preTargetNode&&t.preTargetNode.state!==Zn.DEFAULT&&t.preTargetNode.setElementState(Zn.DEFAULT),p&&d&&d.node){var y=d.node,h=t.sourceRuleResults.get(y.id)||{},v=h.isAllPass,b=h.msg,g=d.anchor.id,m="".concat(y.id,"_").concat(g),O=t.targetRuleResults.get(m)||{},w=O.isAllPass,_=O.msg;if(v&&w)y.setElementState(Zn.ALLOW_CONNECT),o===d.anchor.x&&i===d.anchor.y||r.addEdge({type:c,sourceNodeId:n.id,sourceAnchorId:a,startPoint:{x:o,y:i},targetNodeId:d.node.id,targetAnchorId:d.anchor.id,endPoint:{x:d.anchor.x,y:d.anchor.y}});else{var j=y.getData();r.eventCenter.emit(to.CONNECTION_NOT_ALLOWED,{data:j,msg:_||b})}}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,draging:!1},t.dragHandler=nc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return sa(e,r,n,o)>10}},{key:"render",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY,i=this.props,a=i.x,u=i.y,c=i.style,s=i.edgeStyle,l=ay(ay({},c),c.hover);return Object(Q.g)("g",{className:"lf-anchor"},Object(Q.g)(Qs,oy({className:"lf-node-anchor-hover"},l,{x:a,y:u,onMouseDown:this.dragHandler})),Object(Q.g)(Qs,oy({className:"lf-node-anchor"},c,{x:a,y:u,onMouseDown:this.dragHandler})),this.isShowLine()&&Object(Q.g)(Os,oy({x1:e,y1:r,x2:n,y2:o},s,{"pointer-events":"none"})))}}])&&sy(e.prototype,r),n&&sy(e,n),i}(Q.a);r(59);function by(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?by(Object(r),!0).forEach((function(e){my(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):by(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function my(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}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 wy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _y(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _y(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 _y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jy(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,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,p=void 0===f?"":f,d=t.model,y={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=wy(t,2),r=e[0],n=e[1];"object"!==Oy(n)&&(y[r]=n)})),i){var h=String(i).split(/[\r\n]/g),v=h.length;if("default"!==l){var b=d.BaseType,g=d.modelType;if(b===Qn.NODE&&g!==Jn.TEXT_NODE||b===Qn.EDGE&&p)return function(t){var e=t.value,r=t.fontSize,n=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,p=n.width,d=n.textHeight,y=t.textWidth||p,h=String(e).split(/[\r\n]/g),v=h.length,b=ma({rows:h,style:{fontSize:"".concat(r,"px"),width:"".concat(y,"px"),fontFamily:i,lineHeight:a,padding:c},rowsLength:v,className:"lf-get-text-height"}),g=n.height>b?n.height:b;d&&(g=d);var m="ellipsis"===s;return Object(Q.g)("g",null,Object(Q.g)("foreignObject",{width:y,height:g,x:l-y/2,y:f-g/2},Object(Q.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:g,width:y,padding:c}},Object(Q.g)("div",{className:m?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:gy({},t)},h.map((function(t){return Object(Q.g)("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t)}if(v>1){var m=h.map((function(t,e){var n=(e-(v-1)/2)*(a+2);return Object(Q.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(Q.g)("text",y,m)}return Object(Q.g)("text",y,i)}}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 xy(){return(xy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Sy(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Py(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Py(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 Py(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ky(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ay(t,e){return(Ay=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Dy(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 r,n=Ny(t);if(e){var o=Ny(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ty(this,r)}}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 My(t)}function My(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ny(t){return(Ny=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Cy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ry=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,r,n,o=Dy(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),Cy(My(e=o.call(this)),"dragHandler",void 0),Cy(My(e),"sumDeltaX",0),Cy(My(e),"sumDeltaY",0),Cy(My(e),"stepDrag",void 0),Cy(My(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=Sy(o.graphModel.transformModel.fixDeltaXY(r,n),2),u=a[0],c=a[1];i.moveText(u,c)})),Cy(My(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(Zn.TEXT_EDIT)})),Cy(My(e),"mouseDownHandle",(function(t){var r=e.props,n=r.draggable,o=r.graphModel.editConfigModel.nodeTextDraggable;(n||o)&&e.stepDrag.handleMouseDown(t)}));var r=t.model,n=t.draggable;return e.stepDrag=new bc({onDraging:e.onDraging,step:1,model:r,isStopPropagation:n}),e}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.text,r=e.value,n={x:e.x,y:e.y,className:"lf-element-text",value:r},o=t.getTextStyle();return Object(Q.g)(jy,xy({},n,o,{model:t}))}},{key:"render",value:function(){if(this.props.model.text)return Object(Q.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&ky(e.prototype,r),n&&ky(e,n),i}(Q.a),Iy=null!==window.navigator.userAgent.match(/MSIE|Trident/);function Ly(t){return(Ly="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 zy(){return(zy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function By(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Xy(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xy(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 Xy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Hy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Uy(t,e){return(Uy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Yy(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 r,n=Vy(t);if(e){var o=Vy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Gy(this,r)}}function Gy(t,e){if(e&&("object"===Ly(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Fy(t)}function Fy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vy(t){return(Vy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Wy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ky=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&&Uy(t,e)}(i,t);var e,r,n,o=Yy(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),Wy(Fy(e=o.call(this)),"stepDrag",void 0),Wy(Fy(e),"contextMenuTime",void 0),Wy(Fy(e),"startTime",void 0),Wy(Fy(e),"clickTimer",void 0),Wy(Fy(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,a=o.graphModel;e.state.isDraging||e.setState({isDraging:!0});var u=By(a.transformModel.fixDeltaXY(r,n),2),c=u[0],s=u[1];a.moveNode(i.id,c,s)})),Wy(Fy(e),"onDragEnd",(function(){e.props.model.isDragging=!1})),Wy(Fy(e),"handleClick",(function(t){if(e.startTime&&!((new Date).getTime()-e.startTime>200)){var r=e.props,n=r.model,o=r.graphModel,i={data:n.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(n.id,ki(t,c)),e.toFront(),u?(c.nodeTextEdit&&n.text.editable&&(n.setSelected(!1),o.setElementStateById(n.id,Zn.TEXT_EDIT)),o.eventCenter.emit(to.NODE_DBCLICK,i)):(o.eventCenter.emit(to.ELEMENT_CLICK,i),o.eventCenter.emit(to.NODE_CLICK,i))}}})),Wy(Fy(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.model,o=r.graphModel,i=n.getData(),a=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(n.id,Zn.SHOW_MENU,a.domOverlayPosition),o.selectNodeById(n.id),o.eventCenter.emit(to.NODE_CONTEXTMENU,{data:i,e:t,position:a}),e.toFront()})),Wy(Fy(e),"handleMouseDown",(function(t){var r=e.props,n=r.model,o=r.graphModel;e.toFront(),e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),Wy(Fy(e),"setHoverON",(function(t){if(!e.state.isHovered){e.setState({isHovered:!0});var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.setHovered(!0),o.eventCenter.emit(to.NODE_MOUSEENTER,{data:i,e:t})}})),Wy(Fy(e),"setHoverOFF",(function(t){e.setState({isHovered:!1});var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.setHovered(!1),o.eventCenter.emit(to.NODE_MOUSELEAVE,{data:i,e:t})})),Wy(Fy(e),"onMouseOut",(function(t){Iy&&e.setHoverOFF(t)}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter,u=t.model;return e.stepDrag=new bc({onDraging:e.onDraging,onDragEnd:e.onDragEnd,step:n,eventType:"NODE",eventCenter:a,model:u}),e.state={isHovered:!1},e}return e=i,n=[{key:"getModel",value:function(t){return t}}],(r=[{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.isSelected,i=r.isHitable,a=r.isDragging,u=this.state.isHovered;if(i&&(o||u)){var c=r.getAnchorStyle(),s=r.getAnchorLineStyle();return nn(r.anchors,(function(e,o){return Object(Q.g)(vy,zy({},e,{anchorData:e,nodeDraging:a,style:c,edgeStyle:s,anchorIndex:o,nodeModel:r,graphModel:n,setHoverOFF:t.setHoverOFF}))}))}return[]}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===Zn.TEXT_EDIT)return"";if(e.text){var n=r.editConfigModel,o=!1;return(e.text.draggable||n.nodeTextDraggable)&&(o=!0),Object(Q.g)(Ry,{editable:n.nodeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,r=t.isDraging,n="lf-node";switch(e){case Zn.ALLOW_CONNECT:n+=" lf-node-allow";break;case Zn.NOT_ALLOW_CONNECT:n+=" lf-node-not-allow";break;default:n+=" lf-node-default"}return r&&(n+=" lf-isDragging"),n}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;r.overlapMode!==io.INCREASE&&r.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,r=e.model,n=e.graphModel,o=n.editConfigModel,i=o.hideAnchors,a=o.adjustNodePosition,u=n.gridSize,c=n.transformModel.SCALE_X,s=r.isHitable,l=r.draggable,f=Object(Q.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),i?null:this.getAnchors());return s?(a&&l&&this.stepDrag.setStep(u*c),t=Object(Q.g)("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=Object(Q.g)("g",{className:this.getStateClassName()},f),t}}])&&Hy(e.prototype,r),n&&Hy(e,n),i}(Q.a);function $y(t){return($y="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 Zy(){return(Zy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function qy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Qy(t,e){return(Qy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function th(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 r,n=rh(t);if(e){var o=rh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return eh(this,r)}}function eh(t,e){if(e&&("object"===$y(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 rh(t){return(rh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var nh=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,r,n,o=th(i);function i(){return qy(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(Q.g)(Is,Zy({},e,{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&Jy(e.prototype,r),n&&Jy(e,n),i}(Ky);function oh(t){return(oh="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 ih(){return(ih=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function ah(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ch(t,e){return(ch=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sh(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 r,n=fh(t);if(e){var o=fh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lh(this,r)}}function lh(t,e){if(e&&("object"===oh(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 fh(t){return(fh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ph=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,r,n,o=sh(i);function i(){return ah(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.r,o=t.getNodeStyle();return Object(Q.g)(Qs,ih({},o,{x:e,y:r,r:n}))}}])&&uh(e.prototype,r),n&&uh(e,n),i}(Ky);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 yh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.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 r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))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 r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vh(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:"",className:"lf-basic-shape ".concat(r)};return Object.entries(t).forEach((function(t){var e=yh(t,2),r=e[0],o=e[1];"object"!==dh(o)&&(n[r]=o)})),n.points=e.map((function(t){return t.join(",")})).join(" "),Object(Q.g)("polygon",n)}function bh(t){return(bh="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(){return(gh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function mh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Oh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function wh(t,e){return(wh=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 r,n=Eh(t);if(e){var o=Eh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jh(this,r)}}function jh(t,e){if(e&&("object"===bh(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 Eh(t){return(Eh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xh=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&&wh(t,e)}(i,t);var e,r,n,o=_h(i);function i(){return mh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.width,o=t.height,i=t.points,a=t.getNodeStyle(),u={transform:"matrix(1 0 0 1 ".concat(e-n/2," ").concat(r-o/2,")")};return Object(Q.g)("g",u,Object(Q.g)(vh,gh({},a,{points:i,x:e,y:r})))}}])&&Oh(e.prototype,r),n&&Oh(e,n),i}(Ky);function Sh(t){return(Sh="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(){return(Ph=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function kh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ah(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Dh(t,e){return(Dh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Th(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 r,n=Nh(t);if(e){var o=Nh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Mh(this,r)}}function Mh(t,e){if(e&&("object"===Sh(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 Nh(t){return(Nh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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&&Dh(t,e)}(i,t);var e,r,n,o=Th(i);function i(){return kh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(Q.g)("g",null,Object(Q.g)(vh,Ph({},e,{points:t.points,x:t.x,y:t.y})))}}])&&Ah(e.prototype,r),n&&Ah(e,n),i}(Ky);function Rh(t){return(Rh="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 Ih(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Lh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lh(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 Lh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function zh(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.rx,a=void 0===i?4:i,u=t.ry,c={cx:r,cy:o,rx:a,ry:void 0===u?4:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=Ih(t,2),r=e[0],n=e[1];"object"!==Rh(n)&&(c[r]=n)})),Object(Q.g)("ellipse",c)}function Bh(t){return(Bh="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 r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Hh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Yh(t,e){return(Yh=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 r,n=Vh(t);if(e){var o=Vh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fh(this,r)}}function Fh(t,e){if(e&&("object"===Bh(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 Vh(t){return(Vh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Wh=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,r,n,o=Gh(i);function i(){return Hh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(Q.g)(zh,Xh({},e,{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&Uh(e.prototype,r),n&&Uh(e,n),i}(Ky);function Kh(t){return(Kh="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 $h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Zh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$h(Object(r),!0).forEach((function(e){qh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function qh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function tv(t,e){return(tv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ev(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 r,n=nv(t);if(e){var o=nv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rv(this,r)}}function rv(t,e){if(e&&("object"===Kh(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 nv(t){return(nv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ov=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&&tv(t,e)}(i,t);var e,r,n,o=ev(i);function i(){return Jh(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getBackgroud",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.text;if(r&&r.value&&e.background&&"transparnet"!==e.background.fill){var n=r.x,o=r.y,i=t.width,a=t.height,u=Zh(Zh({},e.background),{},{x:n,y:o-1,width:i,height:a});return Object(Q.g)(Is,u)}}},{key:"getShape",value:function(){return Object(Q.g)("g",null,this.getBackgroud())}}])&&Qh(e.prototype,r),n&&Qh(e,n),i}(Ky);function iv(t){return(iv="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 av(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}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 r,n=pv(t);if(e){var o=pv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lv(this,r)}}function lv(t,e){if(e&&("object"===iv(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 pv(t){return(pv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function dv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var 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,r,n,o=sv(i);function i(){var t;av(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return dv(fv(t=o.call.apply(o,[this].concat(r))),"ref",void 0),dv(fv(t),"currrentProperties",void 0),dv(fv(t),"preProperties",void 0),dv(fv(t),"setRef",(function(e){t.ref=e})),t}return e=i,(r=[{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.currrentProperties)return this.preProperties=this.currrentProperties,!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,r=t.y,n=t.height,o=t.width;return this.currrentProperties=JSON.stringify(t.properties),Object(Q.g)("foreignObject",{x:e-o/2,y:r-n/2,width:o,height:n,ref:this.setRef})}}])&&uv(e.prototype,r),n&&uv(e,n),i}(Ky);function hv(t){return(hv="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(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return bv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bv(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 bv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var gv=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=vv(t,2),n=r[0],o=r[1];"object"!==hv(o)&&(e[n]=o)})),Object(Q.g)("path",e)};function mv(t){return(mv="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(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ev(t,e){return(Ev=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 r,n=Pv(t);if(e){var o=Pv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sv(this,r)}}function Sv(t,e){if(e&&("object"===mv(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 Pv(t){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}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&&Ev(t,e)}(i,t);var e,r,n,o=xv(i);function i(){return _v(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getArrowAttributes",value:function(){var t=this.props,e=t.arrowInfo,r=t.style,n=e.start,o=e.end,i={start:n,end:o,offset:r.offset,verticalLength:r.verticalLength,type:"end"},a=yu(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 r=null!=arguments[e]?arguments[e]:{};e%2?Ov(Object(r),!0).forEach((function(e){wv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ov(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(u," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},r)}},{key:"getShape",value:function(){var t=this.getArrowAttributes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Object(Q.g)(gv,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(Q.g)("g",{className:"lf-arrow"},this.getShape())}}])&&jv(e.prototype,r),n&&jv(e,n),i}(Q.a);function Av(t){return(Av="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 r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Tv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tv(Object(r),!0).forEach((function(e){Bv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Cv(t,e){return(Cv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Rv(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 r,n=zv(t);if(e){var o=zv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Iv(this,r)}}function Iv(t,e){if(e&&("object"===Av(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 zv(t){return(zv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Xv,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&&Cv(t,e)}(i,t);var e,r,n,o=Rv(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),Bv(Lv(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHoverd:!0})})),Bv(Lv(e),"setHoverOFF",(function(){e.setState({isHoverd:!1})})),e.state={isHoverd:!1},e}return e=i,(r=[{key:"getBackgroud",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.text,n=e.background||{};if(this.state.isHoverd&&e.hover&&e.hover.background&&(n=Mv(Mv({},n),e.hover.background)),r&&r.value&&"transparnet"!==n.fill){var o,i=e.fontSize,a=e.overflowMode,u=e.lineHeight,c=e.wrapPadding,s=e.textWidth,l=r.value,f=r.x,p=r.y,d=String(l).split(/[\r\n]/g),y=d.length;if("autoWrap"===a&&s){var h=ma({rows:d,style:{fontSize:"".concat(i,"px"),width:"".concat(s,"px"),lineHeight:u,padding:c},rowsLength:y,className:"lf-get-text-height"});o=Mv(Mv({},n),{},{x:f-1,y:p-1,width:s,height:h})}else{var v=0;d&&d.forEach((function(t){var e=Vu(t);v=e>v?e:v}));var b=Oa({rows:d,fontSize:i,rowsLength:y}),g=b.width,m=b.height;o=Mv(Mv({},n),{},{x:f-1,y:p-1,width:g,height:m})}return Object(Q.g)(Is,o)}}},{key:"getShape",value:function(){var t=this.props.model,e=t.text,r=e.value,n=e.x,o=e.y;if(r){var i=Mv({x:n,y:o,className:"lf-element-text",value:r},t.getTextStyle());return Object(Q.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(Q.g)(jy,Dv({},i,{model:t})))}}}])&&Nv(e.prototype,r),n&&Nv(e,n),i}(Ry);function Uv(t){return(Uv="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 r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Gv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Gv(Object(r),!0).forEach((function(e){tb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Wv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wv(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 Wv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Kv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $v(t,e){return($v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zv(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 r,n=Qv(t);if(e){var o=Qv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qv(this,r)}}function qv(t,e){if(e&&("object"===Uv(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 Qv(t){return(Qv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function tb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(Xv||(Xv={}));var eb=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&&$v(t,e)}(i,t);var e,r,n,o=Zv(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),tb(Jv(t=o.call(this)),"dragHandler",void 0),tb(Jv(t),"oldEdge",void 0),tb(Jv(t),"onDragStart",(function(){var e=t.props,r=e.x,n=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:r,endY:n,draging:!0})})),tb(Jv(t),"onDraging",(function(e){var r=e.deltaX,n=e.deltaY,o=t.state,i=o.endX,a=o.endY,u=t.props,c=u.graphModel,s=u.type,l=Vv(c.transformModel.moveCanvasPointByHtml([i,a],r,n),2),f=l[0],p=l[1];t.setState({endX:f,endY:p,draging:!0});var d=t.props.edgeModel,y=c.nodes,h=ua({x:i,y:a},y);if(h&&h.node){var v,b=d.startPoint,g=d.endPoint,m=d.sourceNode,O=d.targetNode;s===Xv.SOURCE?v={startPoint:{x:h.anchor.x,y:h.anchor.y},endPoint:{x:g.x,y:g.y},sourceNode:h.node,targetNode:O}:s===Xv.TARGET&&(v={startPoint:{x:b.x,y:b.y},endPoint:{x:h.anchor.x,y:h.anchor.y},sourceNode:m,targetNode:h.node}),d.updateAfterAdjustStartAndEnd(v)}else s===Xv.SOURCE?d.updateStartPoint({x:f,y:p}):s===Xv.TARGET&&d.updateEndPoint({x:f,y:p})})),tb(Jv(t),"onDragEnd",(function(){t.setState({draging:!1});var e=t.props,r=e.graphModel,n=e.edgeModel,o=e.type,i=r.nodes,a=t.state,u=a.endX,c=a.endY,s=a.draging,l=ua({x:u,y:c},i);if(s)if(l&&l.node){var f,p=n.getData(),d=Fv(Fv({},p),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==p||null===(f=p.text)||void 0===f?void 0:f.value)||""});o===Xv.SOURCE?d=Fv(Fv({},d),{},{sourceNodeId:l.node.id,sourceAnchorId:l.anchor.id,startPoint:{x:l.anchor.x,y:l.anchor.y},targetNodeId:n.targetNodeId,endPoint:Fv({},n.endPoint)}):o===Xv.TARGET&&(d=Fv(Fv({},d),{},{sourceNodeId:n.sourceNodeId,startPoint:Fv({},n.startPoint),targetNodeId:l.node.id,targetAnchorId:l.anchor.id,endPoint:{x:l.anchor.x,y:l.anchor.y}})),r.deleteEdgeById(n.id);var y=r.addEdge(Fv({},d));r.eventCenter.emit(to.EDGE_EXCHANGE_NODE,{data:{newEdge:y.getData(),oldEdge:n.getData()}})}else t.recoveryEdge()})),tb(Jv(t),"recoveryEdge",(function(){var e=t.props.edgeModel,r=t.oldEdge,n=r.startPoint,o=r.endPoint,i=r.pointsList;e.updateStartPoint(n),e.updateEndPoint(o),e.modelType!==Jn.LINE_EDGE&&(e.pointsList=i,e.initPoints())})),tb(Jv(t),"getAdjustPointStyle",(function(){return t.props.graphModel.theme.edgeAdjust})),t.state={draging:!1,endX:0,endY:0},t.dragHandler=nc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=this.state.draging,o=this.getAdjustPointStyle();return Object(Q.g)("g",null,Object(Q.g)(Qs,Yv({className:"lf-edge-adjust-point"},o,{x:e,y:r,onMouseDown:this.dragHandler,"pointer-events":n?"none":""})))}}])&&Kv(e.prototype,r),n&&Kv(e,n),i}(Q.a);function rb(t){return(rb="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 nb(){return(nb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function ob(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ib(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ob(Object(r),!0).forEach((function(e){db(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ob(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ab(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ub(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function cb(t,e){return(cb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sb(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 r,n=pb(t);if(e){var o=pb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lb(this,r)}}function lb(t,e){if(e&&("object"===rb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fb(t)}function fb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pb(t){return(pb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function db(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yb=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&&cb(t,e)}(i,t);var e,r,n,o=sb(i);function i(){var t;ab(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return db(fb(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),db(fb(t),"contextMenuTime",void 0),db(fb(t),"clickTimer",void 0),db(fb(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.graphModel.eventCenter;o.setHovered(e);var a=e?to.EDGE_MOUSEENTER:to.EDGE_MOUSELEAVE,u=o.getData();i.emit(a,{data:u,e:r})})),db(fb(t),"setHoverON",(function(e){t.handleHover(!0,e)})),db(fb(t),"setHoverOFF",(function(e){t.handleHover(!1,e)})),db(fb(t),"handleContextMenu",(function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var r=t.props,n=r.model,o=r.graphModel,i=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,Zn.SHOW_MENU,i.domOverlayPosition),t.toFront(),o.selectEdgeById(n.id);var a=null==n?void 0:n.getData();o.eventCenter.emit(to.EDGE_CONTEXTMENU,{data:a,e:e,position:i})})),db(fb(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),db(fb(t),"handleMouseUp",(function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200||2===e.button)){var r=2===e.detail,n=t.props,o=n.model,i=n.graphModel,a=null==o?void 0:o.getData(),u=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var c=i.editConfigModel,s=i.textEditElement;if(s&&s.id===o.id&&i.setElementStateById(o.id,Zn.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,Zn.TEXT_EDIT),o.modelType===Jn.POLYLINE_EDGE){var l=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,p=f.x,d=f.y,y=Zu({x:p,y:d},l.points);l.dbClickPosition=y}i.eventCenter.emit(to.EDGE_DBCLICK,{data:a,e:e,position:u})}else i.eventCenter.emit(to.ELEMENT_CLICK,{data:a,e:e,position:u}),i.eventCenter.emit(to.EDGE_CLICK,{data:a,e:e,position:u});var h=i.editConfigModel;i.selectEdgeById(o.id,ki(e,h)),t.toFront()}})),db(fb(t),"getIsDraging",(function(){return!1})),t}return e=i,(r=[{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===Zn.TEXT_EDIT)return"";var n=!1,o=r.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(n=!0),Object(Q.g)(Hv,{editable:o.edgeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:n})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isSelected;return{start:e,end:r,hover:this.state.hover,isSelected:n}}},{key:"getArrowStyle",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.getEdgeStyle(),o=r.theme.arrow;return ib(ib({},n),{},{fill:n.stroke},o)}},{key:"getArrow",value:function(){var t=this.getArrowInfo(),e=t.start,r=t.end;if(e&&r&&(e.x!==r.x||e.y!==r.y)){var n=this.getArrowStyle();return Object(Q.g)(kv,{arrowInfo:t,style:n})}}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.getAdjustStart(),o=e.getAdjustEnd();return Object(Q.g)("g",null,Object(Q.g)(eb,nb({type:"SOURCE"},n,{edgeModel:e,graphModel:r})),Object(Q.g)(eb,nb({type:"TARGET"},o,{edgeModel:e,graphModel:r})))}},{key:"getAppendWidth",value:function(){return Object(Q.g)("g",null)}},{key:"getAppend",value:function(){return Object(Q.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.overlapMode!==io.INCREASE&&e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model.isSelected,r=t.graphModel.editConfigModel,n=this.getIsDraging(),o=r.adjustEdgeStartAndEnd;return Object(Q.g)("g",{className:"lf-edge",onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow(),o&&e&&!n?this.getAdjustPoints():"")}}])&&ub(e.prototype,r),n&&ub(e,n),i}(Q.a);function hb(t){return(hb="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 vb(){return(vb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function bb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function mb(t,e){return(mb=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 r,n=_b(t);if(e){var o=_b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wb(this,r)}}function wb(t,e){if(e&&("object"===hb(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 _b(t){return(_b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jb=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&&mb(t,e)}(i,t);var e,r,n,o=Ob(i);function i(){return bb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.getEdgeStyle();return Object(Q.g)(Os,vb({},n,{x1:e.x,y1:e.y,x2:r.x,y2:r.y}))}},{key:"getShape",value:function(){return Object(Q.g)("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=yu(vu(vu({},o),{},{type:"start"})),a=yu(vu(vu({},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}),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Object(Q.g)(gv,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}}])&&gb(e.prototype,r),n&&gb(e,n),i}(yb);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 xb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Sb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sb(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 Sb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Pb=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=xb(t,2),n=r[0],o=r[1];"object"!==Eb(o)&&(e[n]=o)})),Object(Q.g)("polyline",e)};function kb(t){return(kb="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 Ab(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Db(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ab(Object(r),!0).forEach((function(e){Xb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ab(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tb(){return(Tb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Mb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Nb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nb(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 Nb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Cb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Rb(t,e){return(Rb=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 r,n=Bb(t);if(e){var o=Bb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Lb(this,r)}}function Lb(t,e){if(e&&("object"===kb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zb(t)}function zb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bb(t){return(Bb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Hb=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,r,n,o=Ib(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),Xb(zb(t=o.call(this)),"drag",void 0),Xb(zb(t),"isDraging",void 0),Xb(zb(t),"appendInfo",void 0),Xb(zb(t),"dragHandler",void 0),Xb(zb(t),"onDragStart",(function(){t.props.model.dragAppendStart()})),Xb(zb(t),"onDraging",(function(e){var r=e.deltaX,n=e.deltaY,o=t.props,i=o.model,a=o.graphModel;t.isDraging=!0;var u=a.transformModel,c=a.editConfigModel,s=Mb(u.fixDeltaXY(r,n),2),l=s[0],f=s[1],p=i,d=c.adjustEdgeMiddle;t.appendInfo=d?p.dragAppendSimple(t.appendInfo,{x:l,y:f}):p.dragAppend(t.appendInfo,{x:l,y:f})})),Xb(zb(t),"onDragEnd",(function(){var e=t.props,r=e.model,n=e.graphModel.eventCenter,o=r;o.dragAppendEnd(),t.isDraging=!1,t.appendInfo=void 0,n.emit(to.EDGE_ADJUST,{data:o.getData()})})),Xb(zb(t),"beforeDragStart",(function(e,r){r.dragAble&&t.dragHandler(e),t.appendInfo=r})),Xb(zb(t),"getIsDraging",(function(){return t.isDraging})),t.drag=nc({onDragStart:t.onDragStart,onDraging:t.onDraging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle();return Object(Q.g)(Pb,Tb({points:t.points},e))}},{key:"getShape",value:function(){return Object(Q.g)("g",null,this.getEdge())}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,r=t.isSelected,n={start:null,end:null,hover:this.state.hover,isSelected:r},o=Yu(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getAppendAttributes",value:function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=yu(Db(Db({},o),{},{type:"start"})),a=yu(Db(Db({},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),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,a=e.stroke;return Object(Q.g)(gv,{d:r,fill:o,strokeWidth:n,stroke:a,strokeDasharray:i})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.pointsList,i=r.draggable,a=[],u=o.length,c=function(e){var r="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=Object(Q.g)("g",{className:r},t.getAppendShape(c)),l=n.editConfigModel,f=l.adjustEdge,p=l.adjustEdgeMiddle;if(f&&i){t.dragHandler=t.drag;var d=c.startIndex,y=c.endIndex,h=p&&(0===d||y===u-1);c.dragAble=!h,c.start.x===c.end.x?(c.dragAble&&(r+="-ew-resize"),c.direction=eo.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=eo.HORIZONTAL),s=Object(Q.g)("g",{className:t.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Object(Q.g)("g",{className:r},t.getAppendShape(c)))}else t.dragHandler=function(){};a.push(s)},s=0;s<u-1;s++)c(s);return Object(Q.g)("g",null,a)}}])&&Cb(e.prototype,r),n&&Cb(e,n),i}(yb);function Ub(t){return(Ub="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 Yb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Gb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gb(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 Gb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fb(){return(Fb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Vb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kb(t,e){return(Kb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $b(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 r,n=qb(t);if(e){var o=qb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zb(this,r)}}function Zb(t,e){if(e&&("object"===Ub(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 qb(t){return(qb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Jb=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&&Kb(t,e)}(i,t);var e,r,n,o=$b(i);function i(){return Vb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle();return Object(Q.g)(gv,Fb({d:t.path},e))}},{key:"getShape",value:function(){return Object(Q.g)("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return Object(Q.g)(gv,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,r=t,n=r.path,o=r.isSelected,i=Yb(function(t){var e=Ku(t);return[e[2],e[3]]}(n),2);return{start:i[0],end:i[1],hover:e,isSelected:o}}}])&&Wb(e.prototype,r),n&&Wb(e,n),i}(yb);var Qb=function(t,e){return _r(t,e)};var tg=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},eg=function(){return ht.a.Date.now()},rg=/\s/;var ng=function(t){for(var e=t.length;e--&&rg.test(t.charAt(e)););return e},og=/^\s+/;var ig=function(t){return t?t.slice(0,ng(t)+1).replace(og,""):t},ag=/^[-+]0x[0-9a-f]+$/i,ug=/^0b[01]+$/i,cg=/^0o[0-7]+$/i,sg=parseInt;var lg=function(t){if("number"==typeof t)return t;if(kr(t))return NaN;if(St(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=St(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ig(t);var r=ug.test(t);return r||cg.test(t)?sg(t.slice(2),r?2:8):ag.test(t)?NaN:+t},fg=Math.max,pg=Math.min;var dg=function(t,e,r){var n,o,i,a,u,c,s=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var r=n,i=o;return n=o=void 0,s=e,a=t.apply(i,r)}function y(t){return s=t,u=setTimeout(v,e),l?d(t):a}function h(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=eg();if(h(t))return b(t);u=setTimeout(v,function(t){var r=e-(t-c);return f?pg(r,i-(t-s)):r}(t))}function b(t){return u=void 0,p&&n?d(t):(n=o=void 0,a)}function g(){var t=eg(),r=h(t);if(n=arguments,o=this,c=t,r){if(void 0===u)return y(c);if(f)return clearTimeout(u),u=setTimeout(v,e),d(c)}return void 0===u&&(u=setTimeout(v,e)),a}return e=lg(e)||0,St(r)&&(l=!!r.leading,i=(f="maxWait"in r)?fg(lg(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=c=o=u=void 0},g.flush=function(){return void 0===u?a:b(eg())},g},yg=r(157);function hg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var bg,gg,mg,Og=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),vg(this,"undos",[]),vg(this,"redos",[]),vg(this,"callbacks",[]),vg(this,"stopWatch",null),vg(this,"curData",null),vg(this,"maxSize",50),vg(this,"waitTime",100),vg(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){Qb(tg(this.undos),t)||(this.undos.push(t),Qb(this.curData,t)||(this.redos=[]),this.eventCenter.emit(to.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),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();this.redos.push(t);var e=this.undos.pop();return this.curData=oi(e),e}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=oi(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(yg.a)(t,dg((function(){var r=t.modelToHistoryData();r&&e.add(r)}),this.waitTime))}}])&&hg(e.prototype,r),n&&hg(e,n),t}();function wg(t){return(wg="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 _g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return jg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jg(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 jg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Eg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function xg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Eg(Object(r),!0).forEach((function(e){Mg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Eg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pg(t,e){return(Pg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kg(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 r,n=Tg(t);if(e){var o=Tg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ag(this,r)}}function Ag(t,e){if(e&&("object"===wg(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 Tg(t){return(Tg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Mg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ng,Cg,Rg,Ig=hm((mg=gg=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&&Pg(t,e)}(i,t);var e,r,n,o=kg(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),Mg(Dg(t=o.call(this)),"ref",Object(Q.f)()),Mg(Dg(t),"__prevText",{type:"",text:"",id:""}),Mg(Dg(t),"keyupHandler",(function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&n.setElementState(0),t.__prevText={type:n.type,text:r,id:n.id}})),t.state={style:{left:0,top:0}},t}return e=i,n=[{key:"getDerivedStateFromProps",value:function(t){var e,r=t.graphModel,n=r.transformModel,o=r.theme,i=r.textEditElement;if(i){var a;if(null===(a=i.text)||void 0===a||!a.value)if(i.BaseType===Qn.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===Qn.EDGE){var p=o.edgeText,d=p.overflowMode,y=p.lineHeight,h=p.wrapPadding,v=p.textWidth;v&&"autoWrap"===d&&(e=xg(xg({},f),{},{width:v,minWidth:v,lineHeight:y,padding:h}))}else if(i.BaseType===Qn.NODE){var b=o.nodeText,g=b.overflowMode,m=b.lineHeight,O=b.wrapPadding,w=b.textWidth,_=i,j=_.width,E=_.modelType;(E!==Jn.TEXT_NODE&&"autoWrap"===g||E===Jn.TEXT_NODE&&w)&&(e=xg(xg({},f),{},{width:w||j,minWidth:w||j,lineHeight:m,padding:O}))}var x=i.text,S=x.x,P=x.y,k=_g(n.CanvasPointToHtmlPoint([S,P]),2);return{style:xg({left:k[0],top:k[1]},e)}}}}],(r=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var t=this.props.graphModel,e=t.eventCenter,r=t.editConfigModel,n=r.edgeTextEdit,o=r.nodeTextEdit;(n||o)&&e.on(to.GRAPH_TRANSFORM,(function(){t.textEditElement&&t.textEditElement.setElementState(Zn.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,r=e.text,n=e.id;t.updateText(n,r),t.eventCenter.emit(to.TEXT_UPDATE,xg({},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 r=window.getSelection();r.removeAllRanges(),r.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,r=this.state.style;return e?Object(Q.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&Sg(e.prototype,r),n&&Sg(e,n),i}(Q.a),Mg(gg,"toolName","textEdit"),bg=mg))||bg,Lg=function(t){return t.modelType===Jn.LINE_EDGE?function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,a=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-a/2,x1:n+i/2,y1:o+a/2}}(t):t.modelType===Jn.POLYLINE_EDGE?function(t){var e=t.points,r=Yu(e),n=Pu(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):t.modelType===Jn.BEZIER_EDGE?function(t){var e=t.path,r=Ku(e),n=Pu(r,8),o=n.x,i=n.y,a=n.width,u=n.height;return{x:o-a/2,y:i-u/2,x1:o+a/2,y1:i+u/2}}(t):void 0};function zg(t){return(zg="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 Bg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||Hg(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 Xg(t){return function(t){if(Array.isArray(t))return Ug(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Hg(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 Hg(t,e){if(t){if("string"==typeof t)return Ug(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ug(t,e):void 0}}function Ug(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Yg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gg(t,e){return(Gg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fg(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 r,n=Kg(t);if(e){var o=Kg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vg(this,r)}}function Vg(t,e){if(e&&("object"===zg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wg(t)}function Wg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kg(t){return(Kg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $g(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zg=hm((Rg=Cg=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&&Gg(t,e)}(i,t);var e,r,n,o=Fg(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),$g(Wg(e=o.call(this)),"stepDrag",void 0),$g(Wg(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),$g(Wg(e),"onDraging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel,i=o.getSelectElements(!0);o.moveNodes(i.nodes.map((function(t){return t.id})),r,n)})),$g(Wg(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.graphModel,o=r.graphModel,i=o.eventCenter,a=o.selectElements,u=n.getPointByClient({x:t.clientX,y:t.clientY}),c={nodes:[],edges:[]};Xg(a.values()).forEach((function(t){t.BaseType===Qn.NODE&&c.nodes.push(t.getData()),t.BaseType===Qn.EDGE&&c.edges.push(t.getData())})),i.emit(to.SELECTION_CONTEXTMENU,{data:c,e:t,position:u})}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter;return e.stepDrag=new bc({onDraging:e.onDraging,step:n,eventType:"SELECTION",eventCenter:a}),e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.transformModel;if(!(e.size<=1)){var n=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===Qn.NODE&&(e=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{x:e-n/2,y:r-o/2,x1:e+n/2,y1:r+o/2}}(t)),t.BaseType===Qn.EDGE&&(e=Lg(t)),n=Math.min(n,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),a=Math.max(a,e.y1)}));var u=Bg(r.CanvasPointToHtmlPoint([n,o]),2);n=u[0],o=u[1];var c=Bg(r.CanvasPointToHtmlPoint([i,a]),2);i=c[0],a=c[1];var s={left:"".concat(n-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-n+20,"px"),height:"".concat(a-o+20,"px")};return Object(Q.g)("div",{className:"lf-multiple-select",style:s,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&Yg(e.prototype,r),n&&Yg(e,n),i}(Q.a),$g(Cg,"toolName","multipleSelect"),Ng=Rg))||Ng;function qg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Jg(this,"tools",void 0),Jg(this,"components",void 0),Jg(this,"toolMap",new Map),Jg(this,"instance",void 0),this.instance=e,this.isDisabledTool(Ig.toolName)||this.registerTool(Ig.toolName,Ig),this.isDisabledTool(Zg.toolName)||this.registerTool(Zg.toolName,Zg)}var e,r,n;return e=t,(r=[{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}}])&&qg(e.prototype,r),n&&qg(e,n),t}(),tm=r(158),em=r.n(tm);function rm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function nm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var om=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),nm(this,"mousetrap",void 0),nm(this,"options",void 0),nm(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new em.a(this.target),e.keyboard.enabled&&this.enable(!0)}var e,r,n;return e=t,(r=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(Se(e))e.forEach((function(e){var r=e.keys,n=e.callback,o=e.action;return t.on(r,n,o)}));else{var r=e.keys,n=e.callback,o=e.action;this.on(r,n,o)}}},{key:"on",value:function(t,e,r){this.mousetrap.bind(this.getKeys(t),e,r)}},{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")}}])&&rm(e.prototype,r),n&&rm(e,n),t}(),im=om,am=null;function um(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function cm(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 sm(t){return(sm="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 lm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?lm(Object(r),!0).forEach((function(e){dm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function dm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ym=function(){function t(e){var r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),dm(this,"container",void 0),dm(this,"width",void 0),dm(this,"height",void 0),dm(this,"graphModel",void 0),dm(this,"history",void 0),dm(this,"viewMap",new Map),dm(this,"tool",void 0),dm(this,"keyboard",void 0),dm(this,"dnd",void 0),dm(this,"options",void 0),dm(this,"snaplineModel",void 0),dm(this,"components",[]),dm(this,"plugins",void 0),dm(this,"adapterIn",void 0),dm(this,"adapterOut",void 0),dm(this,"getView",(function(t){return o.viewMap.get(t)})),e=Xl(e),this.options=e,this.container=e.container,this.plugins=e.plugins,this.graphModel=new Ac(fm({},e)),this.tool=new Qg(this),this.history=new Og(this.graphModel.eventCenter),this.dnd=new Bl({lf:this}),this.keyboard=new im({lf:this,keyboard:e.keyboard}),e.isSilentMode||!1===e.snapline||(this.snaplineModel=new ry(this.graphModel),r=this.graphModel.eventCenter,n=this.snaplineModel,r.on("node:mousemove",(function(t){var e=t.data;n.setNodeSnapLine(e)})),r.on("node:mouseup",(function(){n.clearSnapline()}))),function(t,e){var r=t.keyboard,n=r.options.keyboard;r.on(["cmd + c","ctrl + c"],(function(){if(n.enabled&&!e.textEditElement){var r=t.options.guards,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)?(am=null,!1):((am=o).nodes.forEach((function(t){return um(t,40)})),am.edges.forEach((function(t){return cm(t,40)})),!1)}})),r.on(["cmd + v","ctrl + v"],(function(){if(n.enabled&&!e.textEditElement){if(am&&(am.nodes||am.edges)){t.clearSelectElements();var r=t.addElements(am);if(!r)return;r.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),r.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),am.nodes.forEach((function(t){return um(t,40)})),am.edges.forEach((function(t){return cm(t,40)}))}return!1}})),r.on(["cmd + z","ctrl + z"],(function(){if(n.enabled&&!e.textEditElement)return t.undo(),!1})),r.on(["cmd + y","ctrl + y"],(function(){if(n.enabled&&!e.textEditElement)return t.redo(),!1})),r.on(["backspace"],(function(){if(n.enabled&&!e.textEditElement){var r=e.getSelectElements(!0);return t.clearSelectElements(),r.edges.forEach((function(e){return t.deleteEdge(e.id)})),r.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}}))}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(e.disabledPlugins)}var e,r,n;return e=t,n=[{key:"use",value:function(t){var e=t.pluginName;e||(console.warn("请给插件".concat(t.name||t.constructor.name,"指定pluginName!")),e=t.name);var r=this.extensions.get(e);r&&r.destroy&&r.destroy(),this.extensions.set(e,t)}}],(r=[{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var n={BaseEdge:yb,BaseEdgeModel:Ma,BaseNode:Ky,BaseNodeModel:Rf,RectNode:nh,RectNodeModel:wd,CircleNode:ph,CircleNodeModel:tp,PolygonNode:xh,PolygonNodeModel:id,TextNode:ov,TextNodeModel:Id,LineEdge:jb,LineEdgeModel:$a,DiamondNode:Ch,DiamondNodeModel:wp,PolylineEdge:Hb,PolylineEdgeModel:du,BezierEdge:Jb,BezierEdgeModel:Ef,EllipseNode:Wh,EllipseNodeModel:Bp,HtmlNode:yv,HtmlNodeModel:Zd,h:Q.g,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)}));var o=e(n),i=o.view,a=o.model,u=i;r&&!u.isObervered&&(u.isObervered=!0,u=J(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=J(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"defaultRegister",value:function(){this.registerElement({view:nh,model:wd,type:"rect"}),this.registerElement({type:"circle",view:ph,model:tp}),this.registerElement({type:"polygon",view:xh,model:id}),this.registerElement({type:"line",view:jb,model:$a}),this.registerElement({type:"polyline",view:Hb,model:du}),this.registerElement({type:"bezier",view:Jb,model:Ef}),this.registerElement({type:"text",view:ov,model:Id}),this.registerElement({type:"ellipse",view:Wh,model:Bp}),this.registerElement({type:"diamond",view:Ch,model:wp}),this.registerElement({type:"html",view:yv,model:Zd})}},{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,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModelById(n);o&&(r=o.getData());var i=this.getEdgeModelById(n);i&&(r=i.textPosition)}var a=r,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.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){return this.graphModel.getNodeModelById(t)?this.deleteNode(t):!!this.graphModel.getEdgeModelById(t)&&this.deleteEdge(t)}},{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 r=e.getData(),n=this.options.guards,o=!n||!n.beforeDelete||n.beforeDelete(r);return o&&this.graphModel.deleteNode(t),o}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModelById(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.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){this.graphModel.addEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,r=this.graphModel.edgesMap[t];if(!r)return!1;var n=r.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(n);return o&&this.graphModel.deleteEdgeById(t),o}},{key:"deleteEdgeByNodeId",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.deleteEdgeBySourceAndTarget(e,r):e?this.graphModel.deleteEdgeBySource(e):r&&this.graphModel.deleteEdgeByTarget(r)}},{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,r=t.sourceNodeId,n=t.targetNodeId;if(r&&n){var o=[];return e.forEach((function(t){t.sourceNodeId===r&&t.targetNodeId===n&&o.push(t)})),o}if(r){var i=[];return e.forEach((function(t){t.sourceNodeId===r&&i.push(t)})),i}if(n){var a=[];return e.forEach((function(t){t.targetNodeId===n&&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:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(_a(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,r=t.nodes,n=t.edges,o={},i={nodes:[],edges:[]},a=0;a<r.length;a++){var u=r[a],c=u.id,s=this.addNode(u);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return n.forEach((function(t){var r=t.sourceNodeId,n=t.targetNodeId;o[r]&&(t.sourceNodeId=o[r]),o[n]&&(t.targetNodeId=o[n]);var a=e.graphModel.addEdge(t);i.edges.push(a)})),i}},{key:"getAreaElement",value:function(t,e){return this.graphModel.getAreaElement(t,e).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=_a(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=_a(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,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{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,r=this,n=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===n.indexOf(e)&&r.installPlugin(t)}))}},{key:"installPlugin",value:function(e){if("object"===sm(e)){var r=e.install,n=e.render;return r&&r.call(e,this,t),void(n&&this.components.push(n.bind(e)))}var o=new e({lf:this,LogicFlow:t});o.render&&this.components.push(o.render.bind(o))}},{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 r=new e(fm(fm({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(r),r}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:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.graphModel.graphDataToModel(_a(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Object(Q.j)(Object(Q.g)(Cl,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container)}}])&&pm(e.prototype,r),n&&pm(e,n),t}();function hm(t){return J(t)}dm(ym,"extensions",new Map);e.default=ym}])}));
15
+ ***************************************************************************** */var S=function(){return(S=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function D(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function M(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function A(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(M(arguments[e]));return t}var N=Symbol("mobx did run lazy initializers"),T=Symbol("mobx pending decorators"),C={},k={};function I(t,e){var r=e?C:k;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return L(this),this[t]},set:function(e){L(this),this[t]=e}})}function L(t){var e,r;if(!0!==t[N]){var n=t[T];if(n){h(t,N,!0);var o=A(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var i=D(o),s=i.next();!s.done;s=i.next()){var a=n[s.value];a.propertyCreator(t,a.prop,a.descriptor,a.decoratorTarget,a.decoratorArguments)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}function R(t,e){return function(){var r,n=function(n,o,i,s){if(!0===s)return e(n,o,i,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,T)){var a=n[T];h(n,T,S({},a))}return n[T][o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},I(o,t)};return z(arguments)?(r=o,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function z(t){return(2===t.length||3===t.length)&&("string"==typeof t[1]||"symbol"==typeof t[1])||4===t.length&&!0===t[3]}function B(t,e,r){return Ee(t)?t:Array.isArray(t)?q.array(t,{name:r}):d(t)?q.object(t,void 0,{name:r}):g(t)?q.map(t,{name:r}):y(t)?q.set(t,{name:r}):t}function X(t){return t}function H(e){c(e);var r=R(!0,(function(t,r,n,o,i){var s=n?n.initializer?n.initializer.call(t):n.value:void 0;ar(t).addObservableProp(r,s,e)})),n=(void 0!==t&&t.env,r);return n.enhancer=e,n}var Y={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function G(t){return null==t?Y:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(Y);var U=H(B),F=H((function(t,e,r){return null==t||dr(t)||Je(t)||rr(t)||ir(t)?t:Array.isArray(t)?q.array(t,{name:r,deep:!1}):d(t)?q.object(t,void 0,{name:r,deep:!1}):g(t)?q.map(t,{name:r,deep:!1}):y(t)?q.set(t,{name:r,deep:!1}):a(!1)})),V=H(X),W=H((function(t,e,r){return yr(t,e)?e:t}));function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?X:B}var Z={box:function(t,e){arguments.length>2&&$("box");var r=G(e);return new Pt(t,K(r),r.name,!0,r.equals)},array:function(t,e){arguments.length>2&&$("array");var r=G(e);return We(t,K(r),r.name)},map:function(t,e){arguments.length>2&&$("map");var r=G(e);return new er(t,K(r),r.name)},set:function(t,e){arguments.length>2&&$("set");var r=G(e);return new or(t,K(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&$("object");var n=G(r);if(!1===n.proxy)return le({},t,e,n);var o=pe(n),i=le({},void 0,void 0,n),s=Be(i);return de(s,t,e,o),s},ref:V,shallow:F,deep:U,struct:W},q=function(t,e,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return U.apply(null,arguments);if(Ee(t))return t;var n=d(t)?q.object(t,e,r):Array.isArray(t)?q.array(t,e):g(t)?q.map(t,e):y(t)?q.set(t,e):t;if(n!==t)return n;a(!1)};function $(t){a("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys(Z).forEach((function(t){return q[t]=Z[t]}));var J,Q,tt=R(!1,(function(t,e,r,n,o){var i=r.get,s=r.set,a=o[0]||{};ar(t).addComputedProp(t,e,S({get:i,set:s,context:t},a))})),et=tt({equals:j.structural}),rt=function(t,e,r){if("string"==typeof e)return tt.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return tt.apply(null,arguments);var n="object"==typeof e?e:{};return n.get=t,n.set="function"==typeof e?e:n.set,n.name=n.name||t.name||"",new Dt(n)};rt.struct=et,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"}(J||(J={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Q||(Q={}));var nt=function(t){this.cause=t};function ot(t){return t instanceof nt}function it(t){switch(t.dependenciesState){case J.UP_TO_DATE:return!1;case J.NOT_TRACKING:case J.STALE:return!0;case J.POSSIBLY_STALE:for(var e=ht(!0),r=pt(),n=t.observing,o=n.length,i=0;i<o;i++){var s=n[i];if(Mt(s)){if(It.disableErrorBoundaries)s.get();else try{s.get()}catch(t){return dt(r),ft(e),!0}if(t.dependenciesState===J.STALE)return dt(r),ft(e),!0}}return gt(t),dt(r),ft(e),!1}}function st(){return null!==It.trackingDerivation}function at(t){var e=t.observers.size>0;It.computationDepth>0&&e&&a(!1),It.allowStateChanges||!e&&"strict"!==It.enforceActions||a(!1)}function ct(t,e,r){var n=ht(!0);gt(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++It.runId;var o,i=It.trackingDerivation;if(It.trackingDerivation=t,!0===It.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new nt(t)}return It.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=J.UP_TO_DATE,o=0,i=t.unboundDepsCount,s=0;s<i;s++){0===(a=r[s]).diffValue&&(a.diffValue=1,o!==s&&(r[o]=a),o++),a.dependenciesState>n&&(n=a.dependenciesState)}r.length=o,t.newObserving=null,i=e.length;for(;i--;){0===(a=e[i]).diffValue&&Rt(a,t),a.diffValue=0}for(;o--;){var a;1===(a=r[o]).diffValue&&(a.diffValue=0,Lt(a,t))}n!==J.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),ft(n),o}function ut(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)Rt(e[r],t);t.dependenciesState=J.NOT_TRACKING}function lt(t){var e=pt();try{return t()}finally{dt(e)}}function pt(){var t=It.trackingDerivation;return It.trackingDerivation=null,t}function dt(t){It.trackingDerivation=t}function ht(t){var e=It.allowStateReads;return It.allowStateReads=t,e}function ft(t){It.allowStateReads=t}function gt(t){if(t.dependenciesState!==J.UP_TO_DATE){t.dependenciesState=J.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=J.UP_TO_DATE}}var yt=0,vt=1,bt=Object.getOwnPropertyDescriptor((function(){}),"name");bt&&bt.configurable;function mt(t,e,r){var n=function(){return Ot(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,r,n){var o=_t(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{xt(o)}}function _t(t,e,r){var n=0,o=pt();Bt();var i={prevDerivation:o,prevAllowStateChanges:wt(!0),prevAllowStateReads:ht(!0),notifySpy:!1,startTime:n,actionId:vt++,parentActionId:yt};return yt=i.actionId,i}function xt(t){yt!==t.actionId&&a("invalid action stack. did you forget to finish an action?"),yt=t.parentActionId,void 0!==t.error&&(It.suppressReactionErrors=!0),jt(t.prevAllowStateChanges),ft(t.prevAllowStateReads),Xt(),dt(t.prevDerivation),t.notifySpy,It.suppressReactionErrors=!1}function Et(t,e){var r,n=wt(t);try{r=e()}finally{jt(n)}return r}function wt(t){var e=It.allowStateChanges;return It.allowStateChanges=t,e}function jt(t){It.allowStateChanges=t}var Pt=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+s()),void 0===o&&(o=!0),void 0===i&&(i=j.default);var a=t.call(this,n)||this;return a.enhancer=r,a.name=n,a.equals=i,a.hasUnreportedChange=!1,a.value=r(e,void 0,n),a}return function(t,e){function r(){this.constructor=t}P(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){this.value;if((t=this.prepareNewValue(t))!==It.UNCHANGED){0,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(at(this),Xe(this)){var e=Ye(this,{object:this,type:"update",newValue:t});if(!e)return It.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?It.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),Ge(this)&&Fe(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return He(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ue(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(x),St=f("ObservableValue",Pt),Dt=function(){function t(t){this.dependenciesState=J.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=J.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+s(),this.value=new nt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Q.NONE,c(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+s(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?j.structural:j.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==J.UP_TO_DATE)return;t.lowestObserverState=J.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.dependenciesState=J.POSSIBLY_STALE,e.isTracing!==Q.NONE&&Yt(e,t),e.onBecomeStale())}))}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.get=function(){this.isComputing&&a("Cycle detected in computation "+this.name+": "+this.derivation),0!==It.inBatch||0!==this.observers.size||this.keepAlive?(Ht(this),it(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.POSSIBLY_STALE?e.dependenciesState=J.STALE:e.dependenciesState===J.UP_TO_DATE&&(t.lowestObserverState=J.UP_TO_DATE)}))}(this)):it(this)&&(this.warnAboutUntrackedRead(),Bt(),this.value=this.computeValue(!1),Xt());var t=this.value;if(ot(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ot(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else c(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===J.NOT_TRACKING,r=this.computeValue(!0),n=e||ot(t)||ot(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,It.computationDepth++,t)e=ct(this,this.derivation,this.scope);else if(!0===It.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new nt(t)}return It.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(ut(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,o=void 0;return ne((function(){var i=r.get();if(!n||e){var s=pt();t({type:"update",object:r,newValue:i,oldValue:o}),dt(s)}n=!1,o=i}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return m(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),Mt=f("ComputedValue",Dt),At=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Nt={};function Tt(){return"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:Nt}var Ct=!0,kt=!1,It=function(){var t=Tt();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Ct=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new At).version&&(Ct=!1),Ct?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new At):(setTimeout((function(){kt||a("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new At)}();function Lt(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Rt(t,e){t.observers.delete(e),0===t.observers.size&&zt(t)}function zt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,It.pendingUnobservations.push(t))}function Bt(){It.inBatch++}function Xt(){if(0==--It.inBatch){Ft();for(var t=It.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof Dt&&r.suspend())}It.pendingUnobservations=[]}}function Ht(t){var e=It.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.size&&It.inBatch>0&&zt(t),!1)}function Yt(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Q.BREAK){var r=[];!function t(e,r,n){if(r.length>=1e3)return void r.push("(and many more)");r.push(""+new Array(n).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return t(e,r,n+1)}))}(he(t),r,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof Dt?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}var Gt=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+s()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=J.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+s(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Q.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,It.pendingReactions.push(this),Ft())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Bt(),this._isScheduled=!1,it(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Xt()}},t.prototype.track=function(t){if(!this.isDisposed){Bt();0,this._isRunning=!0;var e=ct(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ut(this),ot(e)&&this.reportExceptionInDerivation(e.cause),Xt()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(It.disableErrorBoundaries)throw t;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";It.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,t),It.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),ut(this),Xt()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[_]=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=!1;"boolean"==typeof t[t.length-1]&&(r=t.pop());var n=Ne(t);if(!n)return a(!1);n.isTracing===Q.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled");n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Ut=function(t){return t()};function Ft(){It.inBatch>0||It.isRunningReactions||Ut(Vt)}function Vt(){It.isRunningReactions=!0;for(var t=It.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}It.isRunningReactions=!1}var Wt=f("Reaction",Gt);function Kt(t){var e=Ut;Ut=function(r){return t((function(){return e(r)}))}}function Zt(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function qt(){a(!1)}function $t(t){return function(e,r,n){if(n){if(n.value)return{value:mt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,o.call(this))}}}return Jt(t).apply(this,arguments)}}function Jt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){h(this,r,Qt(t,e))}})}}var Qt=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?mt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?mt(t,e):1===arguments.length&&"string"==typeof t?$t(t):!0!==n?$t(e).apply(null,arguments):void h(t,e,mt(t.name||e,r.value,this))};function te(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function ee(t){return"function"==typeof t&&!0===t.isMobxAction}function re(t,e,r){h(t,e,mt(e,r.bind(t)))}function ne(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+s();if(!e.scheduler&&!e.delay)r=new Gt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ie(e),a=!1;r=new Gt(n,(function(){a||(a=!0,o((function(){a=!1,r.isDisposed||r.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(r)}return r.schedule(),r.getDisposer()}Qt.bound=function(t,e,r,n){return!0===n?(re(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return re(this,e,r.value||r.initializer.call(this)),this[e]},set:qt}:{enumerable:!1,configurable:!0,set:function(t){re(this,e,t)},get:function(){}}};var oe=function(t){return t()};function ie(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:oe}function se(t,e,r){void 0===r&&(r=i);var n,o,a,c=r.name||"Reaction@"+s(),u=Qt(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),l=!r.scheduler&&!r.delay,p=ie(r),d=!0,h=!1,f=r.compareStructural?j.structural:r.equals||j.default,g=new Gt(c,(function(){d||l?y():h||(h=!0,p(y))}),r.onError,r.requiresObservable);function y(){if(h=!1,!g.isDisposed){var e=!1;g.track((function(){var r=t(g);e=d||!f(a,r),a=r})),d&&r.fireImmediately&&u(a,g),d||!0!==e||u(a,g),d&&(d=!1)}}return g.schedule(),g.getDisposer()}function ae(t,e,r){return ce("onBecomeUnobserved",t,e,r)}function ce(t,e,r,n){var o="function"==typeof n?hr(e,r):hr(e),i="function"==typeof n?n:r,s=t+"Listeners";return o[s]?o[s].add(i):o[s]=new Set([i]),"function"!=typeof o[t]?a(!1):function(){var t=o[s];t&&(t.delete(i),0===t.size&&delete o[s])}}function ue(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,s=t.reactionRequiresObservable,c=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((It.pendingReactions.length||It.inBatch||It.isRunningReactions)&&a("isolateGlobalState should be called before MobX is running any reactions"),kt=!0,Ct&&(0==--Tt().__mobxInstanceCount&&(Tt().__mobxGlobals=void 0),It=new At)),void 0!==e){var u=void 0;switch(e){case!0:case"observed":u=!0;break;case!1:case"never":u=!1;break;case"strict":case"always":u="strict";break;default:a("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}It.enforceActions=u,It.allowStateChanges=!0!==u&&"strict"!==u}void 0!==r&&(It.computedRequiresReaction=!!r),void 0!==s&&(It.reactionRequiresObservable=!!s),void 0!==c&&(It.observableRequiresReaction=!!c,It.allowStateReads=!It.observableRequiresReaction),void 0!==n&&(It.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),It.disableErrorBoundaries=!!o),i&&Kt(i)}function le(t,e,r,n){var o=pe(n=G(n));return L(t),ar(t,n.name,o.enhancer),e&&de(t,e,r,o),t}function pe(t){return t.defaultDecorator||(!1===t.deep?V:U)}function de(t,e,r,n){var o,i;Bt();try{var s=O(e);try{for(var a=D(s),c=a.next();!c.done;c=a.next()){var u=c.value,l=Object.getOwnPropertyDescriptor(e,u);0;var p=(r&&u in r?r[u]:l.get?tt:n)(t,u,l,!0);p&&Object.defineProperty(t,u,p)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}}finally{Xt()}}function he(t,e){return fe(hr(t,e))}function fe(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(fe)),n}var ge=0;function ye(){this.message="FLOW_CANCELLED"}function ve(t){1!==arguments.length&&a("Flow expects 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=this,o=arguments,i=++ge,s=Qt(e+" - runid: "+i+" - init",t).apply(n,o),a=void 0,c=new Promise((function(t,n){var o=0;function c(t){var r;a=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,s.next).call(s,t)}catch(t){return n(t)}l(r)}function u(t){var r;a=void 0;try{r=Qt(e+" - runid: "+i+" - yield "+o++,s.throw).call(s,t)}catch(t){return n(t)}l(r)}function l(e){if(!e||"function"!=typeof e.then)return e.done?t(e.value):(a=Promise.resolve(e.value)).then(c,u);e.then(l,n)}r=n,c(void 0)}));return c.cancel=Qt(e+" - runid: "+i+" - cancel",(function(){try{a&&be(a);var t=s.return(void 0),e=Promise.resolve(t.value);e.then(l,l),be(e),r(new ye)}catch(t){r(t)}})),c}}function be(t){"function"==typeof t.cancel&&t.cancel()}function me(t,e){if(null==t)return!1;if(void 0!==e){if(!1===dr(t))return!1;if(!t[_].values.has(e))return!1;var r=hr(t,e);return Mt(r)}return Mt(t)}function Oe(t){return arguments.length>1?a(!1):me(t)}function _e(t,e){return"string"!=typeof e?a(!1):me(t,e)}function xe(t,e){return null!=t&&(void 0!==e?!!dr(t)&&t[_].values.has(e):dr(t)||!!t[_]||E(t)||Wt(t)||Mt(t))}function Ee(t){return 1!==arguments.length&&a(!1),xe(t)}function we(t){return dr(t)?t[_].getKeys():rr(t)||ir(t)?Array.from(t.keys()):Je(t)?t.map((function(t,e){return e})):a(!1)}function je(t){return dr(t)?we(t).map((function(e){return t[e]})):rr(t)?we(t).map((function(e){return t.get(e)})):ir(t)?Array.from(t.values()):Je(t)?t.slice():a(!1)}function Pe(t){return dr(t)?we(t).map((function(e){return[e,t[e]]})):rr(t)?we(t).map((function(e){return[e,t.get(e)]})):ir(t)?Array.from(t.entries()):Je(t)?t.map((function(t,e){return[e,t]})):a(!1)}function Se(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return fr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return fr(t).observe(e,r)}(t,e,r)}ye.prototype=Object.create(Error.prototype);var De={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Me(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Ae(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=De),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),function t(e,r,n){if(!r.recurseEverything&&!Ee(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(St(e))return t(e.get(),r,n);if(Ee(e)&&we(e),!0===r.detectCycles&&null!==e&&n.has(e))return n.get(e);if(Je(e)||Array.isArray(e)){var o=Me(n,e,[],r),i=e.map((function(e){return t(e,r,n)}));o.length=i.length;for(var s=0,a=i.length;s<a;s++)o[s]=i[s];return o}if(ir(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===r.exportMapsAsObjects){var c=Me(n,e,new Set,r);return e.forEach((function(e){c.add(t(e,r,n))})),c}var u=Me(n,e,[],r);return e.forEach((function(e){u.push(t(e,r,n))})),u}if(rr(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===r.exportMapsAsObjects){var l=Me(n,e,new Map,r);return e.forEach((function(e,o){l.set(o,t(e,r,n))})),l}var p=Me(n,e,{},r);return e.forEach((function(e,o){p[o]=t(e,r,n)})),p}var d=Me(n,e,{},r);return v(e).forEach((function(o){d[o]=t(e[o],r,n)})),d}(t,e,r)}function Ne(t){switch(t.length){case 0:return It.trackingDerivation;case 1:return hr(t[0]);case 2:return hr(t[0],t[1])}}function Te(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Xt()}}function Ce(t,e,r){return 1===arguments.length||e&&"object"==typeof e?Ie(t,e):ke(t,e,r||{})}function ke(t,e,r){var n;"number"==typeof r.timeout&&(n=setTimeout((function(){if(!i[_].isDisposed){i();var t=new Error("WHEN_TIMEOUT");if(!r.onError)throw t;r.onError(t)}}),r.timeout)),r.name=r.name||"When@"+s();var o=mt(r.name+"-effect",e),i=ne((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function Ie(t,e){var r;var n=new Promise((function(n,o){var i=ke(t,n,S(S({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Le(t){return t[_]}function Re(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var ze={has:function(t,e){if(e===_||"constructor"===e||e===N)return!0;var r=Le(t);return Re(e)?r.has(e):e in t},get:function(t,e){if(e===_||"constructor"===e||e===N)return t[e];var r=Le(t),n=r.values.get(e);if(n instanceof x){var o=n.get();return void 0===o&&r.has(e),o}return Re(e)&&r.has(e),t[e]},set:function(t,e,r){return!!Re(e)&&(function t(e,r,n){if(2!==arguments.length||ir(e))if(dr(e)){var o=e[_],i=o.values.get(r);i?o.write(r,n):o.addObservableProp(r,n,o.defaultEnhancer)}else if(rr(e))e.set(r,n);else if(ir(e))e.add(r);else{if(!Je(e))return a(!1);"number"!=typeof r&&(r=parseInt(r,10)),c(r>=0,"Not a valid index: '"+r+"'"),Bt(),r>=e.length&&(e.length=r+1),e[r]=n,Xt()}else{Bt();var s=r;try{for(var u in s)t(e,u,s[u])}finally{Xt()}}}(t,e,r),!0)},deleteProperty:function(t,e){return!!Re(e)&&(Le(t).remove(e),!0)},ownKeys:function(t){return Le(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return a("Dynamic observable objects cannot be frozen"),!1}};function Be(t){var e=new Proxy(t,ze);return t[_].proxy=e,e}function Xe(t){return void 0!==t.interceptors&&t.interceptors.length>0}function He(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),u((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ye(t,e){var r=pt();try{for(var n=A(t.interceptors||[]),o=0,i=n.length;o<i&&(c(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{dt(r)}}function Ge(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function Ue(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),u((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Fe(t,e){var r=pt(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);dt(r)}}var Ve={get:function(t,e){return e===_?t[_]:"length"===e?t[_].getArrayLength():"number"==typeof e?Ze.get.call(t,e):"string"!=typeof e||isNaN(e)?Ze.hasOwnProperty(e)?Ze[e]:t[e]:Ze.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[_].setArrayLength(r),"number"==typeof e&&Ze.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:Ze.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return a("Observable arrays cannot be frozen"),!1}};function We(t,e,r,n){void 0===r&&(r="ObservableArray@"+s()),void 0===n&&(n=!1);var o,i,a,c=new Ke(r,e,n);o=c.values,i=_,a=c,Object.defineProperty(o,i,{enumerable:!1,writable:!1,configurable:!0,value:a});var u=new Proxy(c.values,Ve);if(c.proxy=u,t&&t.length){var l=wt(!0);c.spliceWithArray(0,0,t),jt(l)}return u}var Ke=function(){function t(t,e,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new x(t||"ObservableArray@"+s()),this.enhancer=function(r,n){return e(r,n,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return He(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ue(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var r=new Array(t-e),n=0;n<t-e;n++)r[n]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=e},t.prototype.spliceWithArray=function(t,e,r){var n=this;at(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:null==e?0:Math.max(0,Math.min(e,i-t)),void 0===r&&(r=o),Xe(this)){var s=Ye(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:r});if(!s)return o;e=s.removedCount,r=s.added}r=0===r.length?r:r.map((function(t){return n.enhancer(t,void 0)}));var a=this.spliceItemsIntoValues(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice(t,r,a),this.dehanceValues(a)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,A([t,e],r));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,r){var n=!this.owned&&!1,o=Ge(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Fe(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Ge(this),i=o||n?{object:this.proxy,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom.reportChanged(),o&&Fe(this,i)},t}(),Ze={intercept:function(t){return this[_].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[_].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[_];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[_];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(t);case 2:return o.spliceWithArray(t,e)}return o.spliceWithArray(t,e,r)},spliceWithArray:function(t,e,r){return this[_].spliceWithArray(t,e,r)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[_];return r.spliceWithArray(r.values.length,0,t),r.values.length},pop:function(){return this.splice(Math.max(this[_].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[_];return r.spliceWithArray(0,0,t),r.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[_],r=e.dehanceValues(e.values).indexOf(t);return r>-1&&(this.splice(r,1),!0)},get:function(t){var e=this[_];if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(t,e){var r=this[_],n=r.values;if(t<n.length){at(r.atom);var o=n[t];if(Xe(r)){var i=Ye(r,{type:"update",object:r.proxy,index:t,newValue:e});if(!i)return;e=i.newValue}(e=r.enhancer(e,o))!==o&&(n[t]=e,r.notifyArrayChildUpdate(t,e,o))}else{if(t!==n.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+n.length);r.spliceWithArray(t,0,[e])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Ze[t]=function(){var e=this[_];e.atom.reportObserved();var r=e.dehanceValues(e.values);return r[t].apply(r,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Ze[t]=function(e,r){var n=this,o=this[_];return o.atom.reportObserved(),o.dehanceValues(o.values)[t]((function(t,o){return e.call(r,t,o,n)}),r)})})),["reduce","reduceRight"].forEach((function(t){Ze[t]=function(){var e=this,r=this[_];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(t,o,i){return o=r.dehanceValue(o),n(t,o,i,e)},r.values[t].apply(r.values,arguments)}}));var qe,$e=f("ObservableArrayAdministration",Ke);function Je(t){return p(t)&&$e(t[_])}var Qe,tr={},er=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+s()),this.enhancer=e,this.name=r,this[qe]=tr,this._keysAtom=w(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!It.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new Pt(this._has(t),X,this.name+"."+b(t)+"?",!1);this._hasMap.set(t,n),ae(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(Xe(this)){var n=Ye(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!n)return this;e=n.newValue}return r?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if((at(this._keysAtom),Xe(this))&&!(n=Ye(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Ge(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Te((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Fe(this,n),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);r&&r.setNewValue(e)},t.prototype._updateValue=function(t,e){var r=this._data.get(t);if((e=r.prepareNewValue(e))!==It.UNCHANGED){var n=Ge(this),o=n?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;0,r.setNewValue(e),n&&Fe(this,o)}},t.prototype._addValue=function(t,e){var r=this;at(this._keysAtom),Te((function(){var n=new Pt(e,r.enhancer,r.name+"."+b(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=Ge(this),o=n?{type:"add",object:this,name:t,newValue:e}:null;n&&Fe(this,o)},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:t.get(o)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return mr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(qe=_,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var r,n;try{for(var o=D(this),i=o.next();!i.done;i=o.next()){var s=M(i.value,2),a=s[0],c=s[1];t.call(e,c,a,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(t){var e=this;return rr(t)&&(t=t.toJS()),Te((function(){var r=wt(!0);try{d(t)?v(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=M(t,2),n=r[0],o=r[1];return e.set(n,o)})):g(t)?(t.constructor!==Map&&a("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,r){return e.set(r,t)}))):null!=t&&a("Cannot initialize map from "+t)}finally{jt(r)}})),this},t.prototype.clear=function(){var t=this;Te((function(){lt((function(){var e,r;try{for(var n=D(t.keys()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return Te((function(){var r,n,o,i,s=function(t){if(g(t)||rr(t))return t;if(Array.isArray(t))return new Map(t);if(d(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return a("Cannot convert to map from '"+t+"'")}(t),c=new Map,u=!1;try{for(var l=D(e._data.keys()),p=l.next();!p.done;p=l.next()){var h=p.value;if(!s.has(h))if(e.delete(h))u=!0;else{var f=e._data.get(h);c.set(h,f)}}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}try{for(var y=D(s.entries()),v=y.next();!v.done;v=y.next()){var b=M(v.value,2),m=(h=b[0],f=b[1],e._data.has(h));if(e.set(h,f),e._data.has(h)){var O=e._data.get(h);c.set(h,O),m||(u=!0)}}}catch(t){o={error:t}}finally{try{v&&!v.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}if(!u)if(e._data.size!==c.size)e._keysAtom.reportChanged();else for(var _=e._data.keys(),x=c.keys(),E=_.next(),w=x.next();!E.done;){if(E.value!==w.value){e._keysAtom.reportChanged();break}E=_.next(),w=x.next()}e._data=c})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,r={};try{for(var n=D(this),o=n.next();!o.done;o=n.next()){var i=M(o.value,2),s=i[0],a=i[1];r["symbol"==typeof s?s:b(s)]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map((function(e){return b(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return Ue(this,t)},t.prototype.intercept=function(t){return He(this,t)},t}(),rr=f("ObservableMap",er),nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+s()),this.name=r,this[Qe]=nr,this._data=new Set,this._atom=w(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Te((function(){lt((function(){var e,r;try{for(var n=D(t._data.values()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.forEach=function(t,e){var r,n;try{for(var o=D(this),i=o.next();!i.done;i=o.next()){var s=i.value;t.call(e,s,s,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((at(this._atom),Xe(this))&&!(n=Ye(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Te((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=Ge(this),n=r?{type:"add",object:this,newValue:t}:null;0,r&&Fe(this,n)}return this},t.prototype.delete=function(t){var e=this;if(Xe(this)&&!(n=Ye(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Ge(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Te((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Fe(this,n),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=Array.from(this.keys()),r=Array.from(this.values());return mr({next:function(){var n=t;return t+=1,n<r.length?{value:[e[n],r[n]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t=this,e=0,r=Array.from(this._data.values());return mr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return ir(t)&&(t=t.toJS()),Te((function(){var r=wt(!0);try{Array.isArray(t)||y(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&a("Cannot initialize set from "+t)}finally{jt(r)}})),this},t.prototype.observe=function(t,e){return Ue(this,t)},t.prototype.intercept=function(t){return He(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(Qe=_,Symbol.iterator)]=function(){return this.values()},t}(),ir=f("ObservableSet",or),sr=function(){function t(t,e,r,n){void 0===e&&(e=new Map),this.target=t,this.values=e,this.name=r,this.defaultEnhancer=n,this.keysAtom=new x(r+".keys")}return t.prototype.read=function(t){return this.values.get(t).get()},t.prototype.write=function(t,e){var r=this.target,n=this.values.get(t);if(n instanceof Dt)n.set(e);else{if(Xe(this)){if(!(i=Ye(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=i.newValue}if((e=n.prepareNewValue(e))!==It.UNCHANGED){var o=Ge(this),i=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;0,n.setNewValue(e),o&&Fe(this,i)}}},t.prototype.has=function(t){var e=this.pendingKeys||(this.pendingKeys=new Map),r=e.get(t);if(r)return r.get();var n=!!this.values.get(t);return r=new Pt(n,X,this.name+"."+b(t)+"?",!1),e.set(t,r),r.get()},t.prototype.addObservableProp=function(t,e,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(Xe(this)){var o=Ye(this,{object:this.proxy||n,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new Pt(e,r,this.name+"."+b(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return cr[t]||(cr[t]={configurable:!0,enumerable:!0,get:function(){return this[_].read(t)},set:function(e){this[_].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,r){var n,o,i,s=this.target;r.name=r.name||this.name+"."+b(e),this.values.set(e,new Dt(r)),(t===s||(n=t,o=e,!(i=Object.getOwnPropertyDescriptor(n,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return ur[t]||(ur[t]={configurable:It.computedConfigurable,enumerable:!1,get:function(){return lr(this).read(t)},set:function(e){lr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Xe(this))if(!(s=Ye(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Ge(this),n=this.values.get(t),o=n&&n.get();if(n&&n.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var i=this.pendingKeys.get(t);i&&i.set(!1)}delete this.target[t];var s=r?{type:"remove",object:this.proxy||e,oldValue:o,name:t}:null;0,r&&Fe(this,s)}finally{Xt()}}},t.prototype.illegalAccess=function(t,e){console.warn("Property '"+e+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(t,e){return Ue(this,t)},t.prototype.intercept=function(t){return He(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Ge(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Fe(this,n),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var r=[];try{for(var n=D(this.values),o=n.next();!o.done;o=n.next()){var i=M(o.value,2),s=i[0];i[1]instanceof Pt&&r.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t}();function ar(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=B),Object.prototype.hasOwnProperty.call(t,_))return t[_];d(t)||(e=(t.constructor.name||"ObservableObject")+"@"+s()),e||(e="ObservableObject@"+s());var n=new sr(t,new Map,b(e),r);return h(t,_,n),n}var cr=Object.create(null),ur=Object.create(null);function lr(t){var e=t[_];return e||(L(t),t[_])}var pr=f("ObservableObjectAdministration",sr);function dr(t){return!!p(t)&&(L(t),pr(t[_]))}function hr(t,e){if("object"==typeof t&&null!==t){if(Je(t))return void 0!==e&&a(!1),t[_].atom;if(ir(t))return t[_];if(rr(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||a(!1),n)}var n;if(L(t),e&&!t[_]&&t[e],dr(t))return e?((n=t[_].values.get(e))||a(!1),n):a(!1);if(E(t)||Mt(t)||Wt(t))return t}else if("function"==typeof t&&Wt(t[_]))return t[_];return a(!1)}function fr(t,e){return t||a("Expecting some object"),void 0!==e?fr(hr(t,e)):E(t)||Mt(t)||Wt(t)||rr(t)||ir(t)?t:(L(t),t[_]?t[_]:void a(!1))}var gr=Object.prototype.toString;function yr(t,e,r){return void 0===r&&(r=-1),function t(e,r,n,o,i){if(e===r)return 0!==e||1/e==1/r;if(null==e||null==r)return!1;if(e!=e)return r!=r;var s=typeof e;if("function"!==s&&"object"!==s&&"object"!=typeof r)return!1;var a=gr.call(e);if(a!==gr.call(r))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:0==+e?1/+e==1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(r);case"[object Map]":case"[object Set]":n>=0&&n++}e=vr(e),r=vr(r);var c="[object Array]"===a;if(!c){if("object"!=typeof e||"object"!=typeof r)return!1;var u=e.constructor,l=r.constructor;if(u!==l&&!("function"==typeof u&&u instanceof u&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in r)return!1}if(0===n)return!1;n<0&&(n=-1);i=i||[];var p=(o=o||[]).length;for(;p--;)if(o[p]===e)return i[p]===r;if(o.push(e),i.push(r),c){if((p=e.length)!==r.length)return!1;for(;p--;)if(!t(e[p],r[p],n-1,o,i))return!1}else{var d=Object.keys(e),h=void 0;if(p=d.length,Object.keys(r).length!==p)return!1;for(;p--;)if(h=d[p],!br(r,h)||!t(e[h],r[h],n-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,r)}function vr(t){return Je(t)?t.slice():g(t)||rr(t)||y(t)||ir(t)?Array.from(t.entries()):t}function br(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function mr(t){return t[Symbol.iterator]=Or,t}function Or(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Zt,extras:{getDebugName:function(t,e){return(void 0!==e?hr(t,e):dr(t)||rr(t)||ir(t)?fr(t):hr(t)).name}},$mobx:_})}).call(this,r(85),r(33))},function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return b})),r.d(e,"c",(function(){return X})),r.d(e,"d",(function(){return H})),r.d(e,"e",(function(){return g})),r.d(e,"f",(function(){return v})),r.d(e,"g",(function(){return g})),r.d(e,"h",(function(){return B})),r.d(e,"i",(function(){return o})),r.d(e,"j",(function(){return z})),r.d(e,"k",(function(){return P}));var n,o,i,s,a,c,u,l={},p=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var r in e)t[r]=e[r];return t}function f(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,r){var o,i,s,a={};for(s in e)"key"==s?o=e[s]:"ref"==s?i=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return y(t,a,o,i,null)}function y(t,e,r,n,s){var a={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++i:s};return null==s&&null!=o.vnode&&o.vnode(a),a}function v(){return{current:null}}function b(t){return t.children}function m(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 r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?O(t):null}function _(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return _(t)}}function x(t){(!t.__d&&(t.__d=!0)&&s.push(t)&&!E.__r++||c!==o.debounceRendering)&&((c=o.debounceRendering)||a)(E)}function E(){for(var t;E.__r=s.length;)t=s.sort((function(t,e){return t.__v.__b-e.__v.__b})),s=[],t.some((function(t){var e,r,n,o,i,s;t.__d&&(i=(o=(e=t).__v).__e,(s=e.__P)&&(r=[],(n=h({},o)).__v=o.__v+1,T(s,o,n,e.__n,void 0!==s.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?O(o):i,o.__h),C(r,o),o.__e!=i&&_(o)))}))}function w(t,e,r,n,o,i,s,a,c,u){var d,h,f,g,v,m,_,x=n&&n.__k||p,E=x.length;for(r.__k=[],d=0;d<e.length;d++)if(null!=(g=r.__k[d]=null==(g=e[d])||"boolean"==typeof g?null:"string"==typeof g||"number"==typeof g||"bigint"==typeof g?y(null,g,null,null,g):Array.isArray(g)?y(b,{children:g},null,null,null):g.__b>0?y(g.type,g.props,g.key,null,g.__v):g)){if(g.__=r,g.__b=r.__b+1,null===(f=x[d])||f&&g.key==f.key&&g.type===f.type)x[d]=void 0;else for(h=0;h<E;h++){if((f=x[h])&&g.key==f.key&&g.type===f.type){x[h]=void 0;break}f=null}T(t,g,f=f||l,o,i,s,a,c,u),v=g.__e,(h=g.ref)&&f.ref!=h&&(_||(_=[]),f.ref&&_.push(f.ref,null,g),_.push(h,g.__c||v,g)),null!=v?(null==m&&(m=v),"function"==typeof g.type&&g.__k===f.__k?g.__d=c=j(g,c,t):c=S(t,g,f,x,v,c),"function"==typeof r.type&&(r.__d=c)):c&&f.__e==c&&c.parentNode!=t&&(c=O(f))}for(r.__e=m,d=E;d--;)null!=x[d]&&("function"==typeof r.type&&null!=x[d].__e&&x[d].__e==r.__d&&(r.__d=O(n,d+1)),L(x[d],x[d]));if(_)for(d=0;d<_.length;d++)I(_[d],_[++d],_[++d])}function j(t,e,r){for(var n,o=t.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=t,e="function"==typeof n.type?j(n,e,r):S(r,n,n,o,n.__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 S(t,e,r,n,o,i){var s,a,c;if(void 0!==e.__d)s=e.__d,e.__d=void 0;else if(null==r||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),s=null;else{for(a=i,c=0;(a=a.nextSibling)&&c<n.length;c+=2)if(a==o)break t;t.insertBefore(o,i),s=i}return void 0!==s?s:o.nextSibling}function D(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||d.test(e)?r:r+"px"}function M(t,e,r,n,o){var i;t:if("style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||D(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||D(t.style,e,r[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]=r,r?n||t.addEventListener(e,i?N:A,i):t.removeEventListener(e,i?N:A,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==r?"":r;break t}catch(t){}"function"==typeof r||(null!=r&&(!1!==r||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,r):t.removeAttribute(e))}}function A(t){this.l[t.type+!1](o.event?o.event(t):t)}function N(t){this.l[t.type+!0](o.event?o.event(t):t)}function T(t,e,r,n,i,s,a,c,u){var l,p,d,f,g,y,v,O,_,x,E,j=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(u=r.__h,c=e.__e=r.__e,e.__h=null,s=[c]),(l=o.__b)&&l(e);try{t:if("function"==typeof j){if(O=e.props,_=(l=j.contextType)&&n[l.__c],x=l?_?_.props.value:l.__:n,r.__c?v=(p=e.__c=r.__c).__=p.__E:("prototype"in j&&j.prototype.render?e.__c=p=new j(O,x):(e.__c=p=new m(O,x),p.constructor=j,p.render=R),_&&_.sub(p),p.props=O,p.state||(p.state={}),p.context=x,p.__n=n,d=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=j.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=h({},p.__s)),h(p.__s,j.getDerivedStateFromProps(O,p.__s))),f=p.props,g=p.state,d)null==j.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==j.getDerivedStateFromProps&&O!==f&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(O,x),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(O,p.__s,x)||e.__v===r.__v){p.props=O,p.state=p.__s,e.__v!==r.__v&&(p.__d=!1),p.__v=e,e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),p.__h.length&&a.push(p);break t}null!=p.componentWillUpdate&&p.componentWillUpdate(O,p.__s,x),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(f,g,y)}))}p.context=x,p.props=O,p.state=p.__s,(l=o.__r)&&l(e),p.__d=!1,p.__v=e,p.__P=t,l=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(n=h(h({},n),p.getChildContext())),d||null==p.getSnapshotBeforeUpdate||(y=p.getSnapshotBeforeUpdate(f,g)),E=null!=l&&l.type===b&&null==l.key?l.props.children:l,w(t,Array.isArray(E)?E:[E],e,r,n,i,s,a,c,u),p.base=e.__e,e.__h=null,p.__h.length&&a.push(p),v&&(p.__E=p.__=null),p.__e=!1}else null==s&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=k(r.__e,e,r,n,i,s,a,u);(l=o.diffed)&&l(e)}catch(t){e.__v=null,(u||null!=s)&&(e.__e=c,e.__h=!!u,s[s.indexOf(c)]=null),o.__e(t,e,r)}}function C(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function k(t,e,r,o,i,s,a,c){var u,p,d,h=r.props,g=e.props,y=e.type,v=0;if("svg"===y&&(i=!0),null!=s)for(;v<s.length;v++)if((u=s[v])&&"setAttribute"in u==!!y&&(y?u.localName===y:3===u.nodeType)){t=u,s[v]=null;break}if(null==t){if(null===y)return document.createTextNode(g);t=i?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,g.is&&g),s=null,c=!1}if(null===y)h===g||c&&t.data===g||(t.data=g);else{if(s=s&&n.call(t.childNodes),p=(h=r.props||l).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!c){if(null!=s)for(h={},v=0;v<t.attributes.length;v++)h[t.attributes[v].name]=t.attributes[v].value;(d||p)&&(d&&(p&&d.__html==p.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||M(t,i,null,r[i],n);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===e[i]||M(t,i,e[i],r[i],n)}(t,g,h,i,c),d)e.__k=[];else if(v=e.props.children,w(t,Array.isArray(v)?v:[v],e,r,o,i&&"foreignObject"!==y,s,a,s?s[0]:r.__k&&O(r,0),c),null!=s)for(v=s.length;v--;)null!=s[v]&&f(s[v]);c||("value"in g&&void 0!==(v=g.value)&&(v!==h.value||v!==t.value||"progress"===y&&!v)&&M(t,"value",v,h.value,!1),"checked"in g&&void 0!==(v=g.checked)&&v!==t.checked&&M(t,"checked",v,h.checked,!1))}return t}function I(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,r)}}function L(t,e,r){var n,i;if(o.unmount&&o.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||I(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){o.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&L(n[i],e,"function"!=typeof t.type);r||null==t.__e||f(t.__e),t.__e=t.__d=void 0}function R(t,e,r){return this.constructor(t,r)}function z(t,e,r){var i,s,a;o.__&&o.__(t,e),s=(i="function"==typeof r)?null:r&&r.__k||e.__k,a=[],T(e,t=(!i&&r||e).__k=g(b,null,[t]),s||l,l,void 0!==e.ownerSVGElement,!i&&r?[r]:s?null:e.firstChild?n.call(e.childNodes):null,a,!i&&r?r:s?s.__e:e.firstChild,i),C(a,t)}function B(t,e){z(t,e,B)}function X(t,e,r){var o,i,s,a=h({},t.props);for(s in e)"key"==s?o=e[s]:"ref"==s?i=e[s]:a[s]=e[s];return arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),y(t.type,a,o||t.key,i||t.ref,null)}function H(t,e){var r={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(x)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n=p.slice,o={__e:function(t,e){for(var r,n,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t),o=r.__d),o)return r.__E=r}catch(e){t=e}throw t}},i=0,m.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof t&&(t=t(h({},r),this.props)),t&&h(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),x(this))},m.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),x(this))},m.prototype.render=b,s=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,E.__r=0,u=0},function(t,e,r){"use strict";r.d(e,"a",(function(){return s.a})),r.d(e,"c",(function(){return s.e})),r.d(e,"h",(function(){return O})),r.d(e,"i",(function(){return v})),r.d(e,"j",(function(){return g})),r.d(e,"b",(function(){return A})),r.d(e,"e",(function(){return k})),r.d(e,"f",(function(){return N})),r.d(e,"g",(function(){return it}));var n,o,i,s=r(1),a=0,c=[],u=s.i.__b,l=s.i.__r,p=s.i.diffed,d=s.i.__c,h=s.i.unmount;function f(t,e){s.i.__h&&s.i.__h(o,t,a||e),a=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function g(t){return a=1,y(S,t)}function y(t,e,r){var i=f(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):S(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function v(t,e){var r=f(n++,3);!s.i.__s&&P(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function b(t,e){var r=f(n++,4);!s.i.__s&&P(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=f(n++,7);return P(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function O(t,e){return a=8,m((function(){return t}),e)}function _(){var t;for(c.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=c.pop();)if(t.__P)try{t.__H.__h.forEach(w),t.__H.__h.forEach(j),t.__H.__h=[]}catch(e){t.__H.__h=[],s.i.__e(e,t.__v)}}s.i.__b=function(t){o=null,u&&u(t)},s.i.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(w),e.__h.forEach(j),e.__h=[])},s.i.diffed=function(t){p&&p(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===s.i.requestAnimationFrame||((i=s.i.requestAnimationFrame)||E)(_)),o=null},s.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(w),t.__h=t.__h.filter((function(t){return!t.__||j(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],s.i.__e(r,t.__v)}})),d&&d(t,e)},s.i.unmount=function(t){h&&h(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{w(t)}catch(t){e=t}})),e&&s.i.__e(e,r.__v))};var x="function"==typeof requestAnimationFrame;function E(t){var e,r=function(){clearTimeout(n),x&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);x&&(e=requestAnimationFrame(r))}function w(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function j(t){var e=o;t.__c=t.__(),o=e}function P(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function S(t,e){return"function"==typeof e?e(t):e}function D(t,e){for(var r in e)t[r]=e[r];return t}function M(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function A(t){this.props=t}function N(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:M(this.props,t)}function n(e){return this.shouldComponentUpdate=r,Object(s.e)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(A.prototype=new s.a).isPureReactComponent=!0,A.prototype.shouldComponentUpdate=function(t,e){return M(this.props,t)||M(this.state,e)};var T=s.i.__b;s.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),T&&T(t)};var C="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function k(t){function e(e,r){var n=D({},e);return delete n.ref,t(n,!(r=e.ref||r)||"object"==typeof r&&!("current"in r)?null:r)}return e.$$typeof=C,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var I=function(t,e){return null==t?null:Object(s.k)(Object(s.k)(t).map(e))},L={map:I,forEach:I,count:function(t){return t?Object(s.k)(t).length:0},only:function(t){var e=Object(s.k)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:s.k},R=s.i.__e;s.i.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e);R(t,e,r)};var z=s.i.unmount;function B(){this.__u=0,this.t=null,this.__b=null}function X(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function H(){this.u=null,this.o=null}s.i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),z&&z(t)},(B.prototype=new s.a).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=X(n.__v),i=!1,s=function(){i||(i=!0,r.__R=null,o?o(a):a())};r.__R=s;var a=function(){if(!--n.__u){if(n.state.__e){var t=n.state.__e;n.__v.__k[0]=function t(e,r,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)})),e.__c&&e.__c.__P===r&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__e:n.__b=null});e=n.t.pop();)e.forceUpdate()}},c=!0===e.__h;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(s,s)},B.prototype.componentWillUnmount=function(){this.t=[]},B.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function t(e,r,n){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=D({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=r),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return t(e,r,n)}))),e}(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&Object(s.e)(s.b,null,t.fallback);return o&&(o.__h=null),[Object(s.e)(s.b,null,e.__e?null:t.children),o]};var Y=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function G(t){return this.getChildContext=function(){return t.context},t.children}function U(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(s.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,r){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),Object(s.j)(Object(s.e)(G,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(H.prototype=new s.a).__e=function(t){var e=this,r=X(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),Y(e,t,n)):o()};r?r(i):i()}},H.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(s.k)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},H.prototype.componentDidUpdate=H.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){Y(t,r,e)}))};var F="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,V=/^(?: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]/,W="undefined"!=typeof document,K=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};s.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(s.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Z=s.i.event;function q(){}function $(){return this.cancelBubble}function J(){return this.defaultPrevented}s.i.event=function(t){return Z&&(t=Z(t)),t.persist=q,t.isPropagationStopped=$,t.isDefaultPrevented=J,t.nativeEvent=t};var Q,tt={configurable:!0,get:function(){return this.class}},et=s.i.vnode;s.i.vnode=function(t){var e=t.type,r=t.props,n=r;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in n={},r){var a=r[i];W&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==a||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!K(r.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&&V.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),n[i]=a)}"select"==e&&n.multiple&&Array.isArray(n.value)&&(n.value=Object(s.k)(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=Object(s.k)(r.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),t.props=n,r.class!=r.className&&(tt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",tt))}t.$$typeof=F,et&&et(t)};var rt=s.i.__r;s.i.__r=function(t){rt&&rt(t),Q=t.__c};var nt={ReactCurrentDispatcher:{current:{readContext:function(t){return Q.__n[t.__c].props.value}}}};function ot(t){return!!t&&t.$$typeof===F}var it=function(t,e){return t(e)},st=s.b,at={useState:g,useReducer:y,useEffect:v,useLayoutEffect:b,useRef:function(t){return a=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){a=6,b((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:m,useCallback:O,useContext:function(t){var e=o.context[t.__c],r=f(n++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__},useDebugValue:function(t,e){s.i.useDebugValue&&s.i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:L,render:function(t,e,r){return null==e.__k&&(e.textContent=""),Object(s.j)(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return Object(s.h)(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(Object(s.j)(null,t),!0)},createPortal:function(t,e){return Object(s.e)(U,{__v:t,i:e})},createElement:s.e,createContext:s.d,createFactory:function(t){return s.e.bind(null,t)},cloneElement:function(t){return ot(t)?s.c.apply(null,arguments):t},createRef:s.f,Fragment:s.b,isValidElement:ot,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:s.a,PureComponent:A,memo:N,forwardRef:k,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:it,StrictMode:st,Suspense:B,SuspenseList:H,lazy:function(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return Object(s.e)(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:nt};e.d=at},function(t,e,r){var n=r(4),o=r(94),i=r(95),s=r(96),a=r(29),c=r(13),u=c("iterator"),l=c("toStringTag"),p=s.values,d=function(t,e){if(t){if(t[u]!==p)try{a(t,u,p)}catch(e){t[u]=p}if(t[l]||a(t,l,e),o[e])for(var r in s)if(t[r]!==s[r])try{a(t,r,s[r])}catch(e){t[r]=s[r]}}};for(var h in o)d(n[h]&&n[h].prototype,h);d(i,"DOMTokenList")},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(33))},,function(t,e){var r=Function.prototype,n=r.bind,o=r.call,i=n&&n.bind(o);t.exports=n?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,r){"use strict";var n=r(43),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e,r){var n=r(18),o=r(137);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";var n=r(18),o=r(115).left,i=r(80),s=r(51),a=r(116);n({target:"Array",proto:!0,forced:!i("reduce")||!a&&s>79&&s<83},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";var n=r(18),o=r(6),i=r(114),s=o([].reverse),a=[1,2];n({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),s(this)}})},function(t,e,r){var n=r(4),o=r(47),i=r(17),s=r(65),a=r(66),c=r(67),u=o("wks"),l=n.Symbol,p=l&&l.for,d=c?l:l&&l.withoutSetter||s;t.exports=function(t){if(!i(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&i(l,t)?u[t]=l[t]:u[t]=c&&p?p(e):d(e)}return u[t]}},function(t,e,r){var n=r(4),o=r(25),i=n.String,s=n.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not an object")}},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return s})),r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return u}));var n=r(2),o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};function i(){var t=o(Object(n.j)(0),2)[1];return Object(n.h)((function(){t((function(t){return t+1}))}),[])}function s(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}function a(t){return"function"==typeof Symbol?Symbol.for(t):"__$mobx-react "+t+"__"}var c={};function u(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:c}}).call(this,r(33))},function(t,e){var r=Function.prototype.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,r){var n=r(6),o=r(27),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,r){var n=r(4),o=r(74).f,i=r(29),s=r(41),a=r(50),c=r(106),u=r(109);t.exports=function(t,e){var r,l,p,d,h,f=t.target,g=t.global,y=t.stat;if(r=g?n:y?n[f]||a(f,{}):(n[f]||{}).prototype)for(l in e){if(d=e[l],p=t.noTargetGet?(h=o(r,l))&&h.value:r[l],!u(g?l:f+(y?".":"#")+l,t.forced)&&void 0!==p){if(typeof d==typeof p)continue;c(d,p)}(t.sham||p&&p.sham)&&i(d,"sham",!0),s(r,l,d,t)}}},function(t,e,r){"use strict";(function(t){var n=r(7),o=r(91),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?n.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||o.a;e.a=c}).call(this,r(61)(t))},function(t,e,r){"use strict";(function(t){var n=r(43),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===o&&n.a.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();e.a=a}).call(this,r(61)(t))},function(t,e,r){var n=r(4).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},function(t,e,r){var n=r(4),o=r(81),i=n.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,r){"use strict";var n=r(18),o=r(42);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){var n=r(9);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var n=r(10);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},function(t,e,r){var n=r(6),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){var n=r(4),o=r(21),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(4),o=r(24),i=r(68),s=r(14),a=r(52),c=n.TypeError,u=Object.defineProperty;e.f=o?u:function(t,e,r){if(s(t),e=a(e),s(r),i)try{return u(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(24),o=r(28),i=r(40);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(46),o=r(21);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(4),o=r(10),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},function(t,e,r){"use strict";var n=r(87),o=r(16),i=r(6),s=r(62),a=r(84),c=r(14),u=r(21),l=r(129),p=r(63),d=r(39),h=r(22),f=r(36),g=r(82),y=r(64),v=r(42),b=r(86),m=r(9),O=b.UNSUPPORTED_Y,_=Math.min,x=[].push,E=i(/./.exec),w=i(x),j=i("".slice);s("split",(function(t,e,r){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,r){var i=h(u(this)),s=void 0===r?4294967295:r>>>0;if(0===s)return[];if(void 0===t)return[i];if(!a(t))return o(e,i,t,s);for(var c,l,p,d=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),y=0,b=new RegExp(t.source,f+"g");(c=o(v,b,i))&&!((l=b.lastIndex)>y&&(w(d,j(i,y,c.index)),c.length>1&&c.index<i.length&&n(x,d,g(c,1)),p=c[0].length,y=l,d.length>=s));)b.lastIndex===c.index&&b.lastIndex++;return y===i.length?!p&&E(b,"")||w(d,""):w(d,j(i,y)),d.length>s?g(d,0,s):d}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=u(this),s=null==e?void 0:f(e,t);return s?o(s,e,n,r):o(i,h(n),e,r)},function(t,n){var o=c(this),s=h(t),a=r(i,o,s,n,i!==e);if(a.done)return a.value;var u=l(o,RegExp),f=o.unicode,g=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),v=new u(O?"^(?:"+o.source+")":o,g),b=void 0===n?4294967295:n>>>0;if(0===b)return[];if(0===s.length)return null===y(v,s)?[s]:[];for(var m=0,x=0,E=[];x<s.length;){v.lastIndex=O?0:x;var P,S=y(v,O?j(s,x):s);if(null===S||(P=_(d(v.lastIndex+(O?x:0)),s.length))===m)x=p(s,x,f);else{if(w(E,j(s,m,x)),E.length===b)return E;for(var D=1;D<=S.length-1;D++)if(w(E,S[D]),E.length===b)return E;x=m=P}}return w(E,j(s,m)),E}]}),!!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),O)},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){var n=r(31);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n,o=r(14),i=r(98),s=r(55),a=r(54),c=r(103),u=r(45),l=r(56),p=l("IE_PROTO"),d=function(){},h=function(t){return"<script>"+t+"<\/script>"},f=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&n?f(n):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):f(n);for(var r=s.length;r--;)delete g.prototype[s[r]];return g()};a[p]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(d.prototype=o(t),r=new d,d.prototype=null,r[p]=t):r=g(),void 0===e?r:i(r,e)}},function(t,e,r){var n=r(53);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?n:r)(e)}},function(t,e,r){var n=r(39);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(37),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n=r(4),o=r(10),i=r(17),s=r(29),a=r(50),c=r(59),u=r(58),l=r(60).CONFIGURABLE,p=u.get,d=u.enforce,h=String(String).split("String");(t.exports=function(t,e,r,c){var u,p=!!c&&!!c.unsafe,f=!!c&&!!c.enumerable,g=!!c&&!!c.noTargetGet,y=c&&void 0!==c.name?c.name:e;o(r)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||l&&r.name!==y)&&s(r,"name",y),(u=d(r)).source||(u.source=h.join("string"==typeof y?y:""))),t!==n?(p?!g&&t[e]&&(f=!0):delete t[e],f?t[e]=r:s(t,e,r)):f?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return o(this)&&p(this).source||c(this)}))},function(t,e,r){"use strict";var n,o,i=r(16),s=r(6),a=r(22),c=r(126),u=r(86),l=r(47),p=r(35),d=r(58).get,h=r(127),f=r(128),g=l("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,v=y,b=s("".charAt),m=s("".indexOf),O=s("".replace),_=s("".slice),x=(o=/b*/g,i(y,n=/a/,"a"),i(y,o,"a"),0!==n.lastIndex||0!==o.lastIndex),E=u.BROKEN_CARET,w=void 0!==/()??/.exec("")[1];(x||w||E||h||f)&&(v=function(t){var e,r,n,o,s,u,l,h=this,f=d(h),j=a(t),P=f.raw;if(P)return P.lastIndex=h.lastIndex,e=i(v,P,j),h.lastIndex=P.lastIndex,e;var S=f.groups,D=E&&h.sticky,M=i(c,h),A=h.source,N=0,T=j;if(D&&(M=O(M,"y",""),-1===m(M,"g")&&(M+="g"),T=_(j,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==b(j,h.lastIndex-1))&&(A="(?: "+A+")",T=" "+T,N++),r=new RegExp("^(?:"+A+")",M)),w&&(r=new RegExp("^"+A+"$(?!\\s)",M)),x&&(n=h.lastIndex),o=i(y,D?r:h,T),D?o?(o.input=_(o.input,N),o[0]=_(o[0],N),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:x&&o&&(h.lastIndex=h.global?o.index+o[0].length:n),w&&o&&o.length>1&&i(g,o[0],r,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&S)for(o.groups=u=p(null),s=0;s<S.length;s++)u[(l=S[s])[0]]=o[l[1]];return o}),t.exports=v},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(33))},function(t,e,r){"use strict";(function(t){var n=r(7),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===o?n.a.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(61)(t))},function(t,e,r){var n=r(4),o=r(25),i=n.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},function(t,e,r){var n=r(4),o=r(6),i=r(9),s=r(26),a=n.Object,c=o("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?c(t,""):a(t)}:a},function(t,e,r){var n=r(48),o=r(49);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,r){var n=r(4),o=r(50),i=n["__core-js_shared__"]||o("__core-js_shared__",{});t.exports=i},function(t,e,r){var n=r(4),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},function(t,e,r){var n,o,i=r(4),s=r(34),a=i.process,c=i.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},function(t,e,r){var n=r(99),o=r(69);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(4),o=r(10),i=r(70),s=n.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not a function")}},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var n=r(47),o=r(65),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports={}},function(t,e,r){var n,o,i,s=r(104),a=r(4),c=r(6),u=r(25),l=r(29),p=r(17),d=r(49),h=r(56),f=r(54),g=a.TypeError,y=a.WeakMap;if(s||d.state){var v=d.state||(d.state=new y),b=c(v.get),m=c(v.has),O=c(v.set);n=function(t,e){if(m(v,t))throw new g("Object already initialized");return e.facade=t,O(v,t,e),e},o=function(t){return b(v,t)||{}},i=function(t){return m(v,t)}}else{var _=h("state");f[_]=!0,n=function(t,e){if(p(t,_))throw new g("Object already initialized");return e.facade=t,l(t,_,e),e},o=function(t){return p(t,_)?t[_]:{}},i=function(t){return p(t,_)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=o(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var n=r(6),o=r(10),i=r(49),s=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},function(t,e,r){var n=r(24),o=r(17),i=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!n||n&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},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,r){"use strict";r(23);var n=r(6),o=r(41),i=r(42),s=r(9),a=r(13),c=r(29),u=a("species"),l=RegExp.prototype;t.exports=function(t,e,r,p){var d=a(t),h=!s((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),f=h&&!s((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[u]=function(){return r},r.flags="",r[d]=/./[d]),r.exec=function(){return e=!0,null},r[d](""),!e}));if(!h||!f||r){var g=n(/./[d]),y=e(d,""[t],(function(t,e,r,o,s){var a=n(t),c=e.exec;return c===i||c===l.exec?h&&!s?{done:!0,value:g(e,r,o)}:{done:!0,value:a(r,e,o)}:{done:!1}}));o(String.prototype,t,y[0]),o(l,d,y[1])}p&&c(l[d],"sham",!0)}},function(t,e,r){"use strict";var n=r(132).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(4),o=r(16),i=r(14),s=r(10),a=r(26),c=r(42),u=n.TypeError;t.exports=function(t,e){var r=t.exec;if(s(r)){var n=o(r,t,e);return null!==n&&i(n),n}if("RegExp"===a(t))return o(c,t,e);throw u("RegExp#exec called on incompatible receiver")}},function(t,e,r){var n=r(6),o=0,i=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},function(t,e,r){var n=r(51),o=r(9);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e,r){var n=r(66);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(24),o=r(9),i=r(45);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(4),o=r(31),i=r(10),s=r(100),a=r(67),c=n.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&s(e.prototype,c(t))}},function(t,e,r){var n=r(4).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(72),o=r(55);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(6),o=r(17),i=r(30),s=r(102).indexOf,a=r(54),c=n([].push);t.exports=function(t,e){var r,n=i(t),u=0,l=[];for(r in n)!o(a,r)&&o(n,r)&&c(l,r);for(;e.length>u;)o(n,r=e[u++])&&(~s(l,r)||c(l,r));return l}},function(t,e,r){var n=r(37),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e,r){var n=r(24),o=r(16),i=r(75),s=r(40),a=r(30),c=r(52),u=r(17),l=r(68),p=Object.getOwnPropertyDescriptor;e.f=n?p:function(t,e){if(t=a(t),e=c(e),l)try{return p(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){"use strict";var n,o,i,s=r(9),a=r(10),c=r(35),u=r(78),l=r(41),p=r(13),d=r(48),h=p("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(n=o):f=!0),null==n||s((function(){var t={};return n[h].call(t)!==t}))?n={}:d&&(n=c(n)),a(n[h])||l(n,h,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},function(t,e,r){var n=r(4),o=r(17),i=r(10),s=r(27),a=r(56),c=r(111),u=a("IE_PROTO"),l=n.Object,p=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=s(t);if(o(e,u))return e[u];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?p:null}},function(t,e,r){var n=r(28).f,o=r(17),i=r(13)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){"use strict";var n=r(9);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e,r){var n=r(4),o=r(118),i=r(10),s=r(26),a=r(13)("toStringTag"),c=n.Object,u="Arguments"==s(function(){return arguments}());t.exports=o?s:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=c(t),a))?r:u?s(e):"Object"==(n=s(e))&&i(e.callee)?"Arguments":n}},function(t,e,r){var n=r(4),o=r(73),i=r(38),s=r(120),a=n.Array,c=Math.max;t.exports=function(t,e,r){for(var n=i(t),u=o(e,n),l=o(void 0===r?n:r,n),p=a(c(l-u,0)),d=0;u<l;u++,d++)s(p,d,t[u]);return p.length=d,p}},function(t,e,r){"use strict";var n=r(18),o=r(6),i=r(124),s=r(21),a=r(22),c=r(125),u=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~u(a(s(this)),a(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(25),o=r(26),i=r(13)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var c,u=[],l=!1,p=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):p=-1,u.length&&h())}function h(){if(!l){var t=a(d);l=!0;for(var e=u.length;e;){for(c=u,u=[];++p<e;)c&&c[p].run();p=-1,e=u.length}c=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new f(t,e)),1!==u.length||l||a(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(9),o=r(4).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),s=i||n((function(){return!o("a","y").sticky})),a=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:i}},function(t,e){var r=Function.prototype,n=r.apply,o=r.bind,i=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(n):function(){return i.apply(n,arguments)})},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,r){"use strict";var n=r(16),o=r(62),i=r(14),s=r(39),a=r(22),c=r(21),u=r(36),l=r(63),p=r(64);o("match",(function(t,e,r){return[function(e){var r=c(this),o=null==e?void 0:u(e,t);return o?n(o,e,r):new RegExp(e)[t](a(r))},function(t){var n=i(this),o=a(t),c=r(e,n,o);if(c.done)return c.value;if(!n.global)return p(n,o);var u=n.unicode;n.lastIndex=0;for(var d,h=[],f=0;null!==(d=p(n,o));){var g=a(d[0]);h[f]=g,""===g&&(n.lastIndex=l(o,s(n.lastIndex),u)),f++}return 0===f?null:h}]}))},function(t,e,r){"use strict";var n=r(87),o=r(16),i=r(6),s=r(62),a=r(9),c=r(14),u=r(10),l=r(37),p=r(39),d=r(22),h=r(21),f=r(63),g=r(36),y=r(136),v=r(64),b=r(13)("replace"),m=Math.max,O=Math.min,_=i([].concat),x=i([].push),E=i("".indexOf),w=i("".slice),j="$0"==="a".replace(/./,"$0"),P=!!/./[b]&&""===/./[b]("a","$0");s("replace",(function(t,e,r){var i=P?"$":"$0";return[function(t,r){var n=h(this),i=null==t?void 0:g(t,b);return i?o(i,t,n,r):o(e,d(n),t,r)},function(t,o){var s=c(this),a=d(t);if("string"==typeof o&&-1===E(o,i)&&-1===E(o,"$<")){var h=r(e,s,a,o);if(h.done)return h.value}var g=u(o);g||(o=d(o));var b=s.global;if(b){var j=s.unicode;s.lastIndex=0}for(var P=[];;){var S=v(s,a);if(null===S)break;if(x(P,S),!b)break;""===d(S[0])&&(s.lastIndex=f(a,p(s.lastIndex),j))}for(var D,M="",A=0,N=0;N<P.length;N++){for(var T=d((S=P[N])[0]),C=m(O(l(S.index),a.length),0),k=[],I=1;I<S.length;I++)x(k,void 0===(D=S[I])?D:String(D));var L=S.groups;if(g){var R=_([T],k,C,a);void 0!==L&&x(R,L);var z=d(n(o,void 0,R))}else z=y(T,a,C,k,L,o);C>=A&&(M+=w(a,A,C)+z,A=C+T.length)}return M+w(a,A)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!j||P)},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return y}));var n=r(0);function o(t){throw new Error("[mobx-utils] "+t)}function i(t,e){void 0===e&&(e="Illegal state"),t||o(e)}var s=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(s(Object.getPrototypeOf(t))||[])},a=function(t){return function(t){var e=s(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))};function c(t){switch(this.state){case"pending":return t.pending&&t.pending(this.value);case"rejected":return t.rejected&&t.rejected(this.value);case"fulfilled":return t.fulfilled?t.fulfilled(this.value):this.value}}function u(t,e){if(i(arguments.length<=2,"fromPromise expects up to two arguments"),i("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var r=t;t.then(Object(n.k)("observableFromPromise-resolve",(function(t){r.value=t,r.state="fulfilled"})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state="rejected"}))),r.isPromiseBasedObservable=!0,r.case=c;var o=e&&"fulfilled"===e.state?e.value:void 0;return Object(n.q)(r,{value:o,state:"pending"},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state="rejected",r.value=e,r})),t.resolve=Object(n.k)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var r=t(Promise.resolve(e));return r.state="fulfilled",r.value=e,r}))}(u||(u={}));var l=function(t,e,r,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s};!function(){function t(t,e){var r=this;Object(n.G)((function(){r.current=e,r.subscription=t.subscribe(r)}))}t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(t){this.current=t},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(t){this.current=t,this.dispose()},l([n.C.ref],t.prototype,"current",void 0),l([n.k.bound],t.prototype,"next",null),l([n.k.bound],t.prototype,"complete",null),l([n.k.bound],t.prototype,"error",null)}();var p=function(){return(p=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},d=function(t,e,r,n){var o,i=arguments.length,s=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s},h=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;this.model=t,this.localValues=n.C.map({}),this.localComputedValues=n.C.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},i(Object(n.A)(t),"createViewModel expects an observable object"),a(t).forEach((function(r){if(r!==n.a&&"__mobxDidRunLazyInitializers"!==r){if(i(-1===h.indexOf(r),"The propertyname "+r+" is reserved and cannot be used with viewModels"),Object(n.w)(t,r)){var o=Object(n.h)(t,r).derivation;e.localComputedValues.set(r,Object(n.m)(o.bind(e)))}var s=Object.getOwnPropertyDescriptor(t,r),a=s?{enumerable:s.enumerable}:{};Object.defineProperty(e,r,p(p({},a),{configurable:!0,get:function(){return Object(n.w)(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:Object(n.k)((function(t){t!==e.model[r]?e.localValues.set(r,t):e.localValues.delete(r)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var t=this;Object(n.B)(this.localValues).forEach((function(e){var r=t.localValues.get(e),o=t.model[e];Object(n.y)(o)?o.replace(r):Object(n.z)(o)?(o.clear(),o.merge(r)):Object(n.v)(r)||(t.model[e]=r)})),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(t){this.localValues.delete(t)},d([n.m],t.prototype,"isDirty",null),d([n.m],t.prototype,"changedValues",null),d([n.k.bound],t.prototype,"submit",null),d([n.k.bound],t.prototype,"reset",null),d([n.k.bound],t.prototype,"resetProperty",null)}();function f(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function g(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function y(t,e){var r=new WeakMap;function o(n){var o=r.get(n.object);!function(t,e){switch(t.type){case"add":i(t.newValue,e,t.name);break;case"update":s(t.oldValue),i(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":s(t.oldValue);break;case"splice":t.removed.map(s),t.added.forEach((function(r,n){return i(r,e,""+(t.index+n))}));for(var n=t.index+t.addedCount;n<t.object.length;n++)if(g(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,f(o),t)}function i(t,e,s){if(g(t)){var a=r.get(t);if(a){if(a.parent!==e||a.path!==s)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+f(e)+"/"+s+"', but it already exists at '"+f(a.parent)+"/"+a.path+"'")}else{var c={parent:e,path:s,dispose:Object(n.D)(t,o)};r.set(t,c),Object(n.p)(t).forEach((function(t){var e=t[0];return i(t[1],c,e)}))}}}function s(t){if(g(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),Object(n.L)(t).forEach(s)}}return i(t,void 0,""),function(){s(t)}}var v,b=(v=function(t,e){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),m=(function(t){function e(e,r,o){var i=void 0===o?{}:o,s=i.name,a=void 0===s?"ogm"+(1e3*Math.random()|0):s,c=i.keyToName,u=void 0===c?function(t){return""+t}:c,l=t.call(this)||this;l._keyToName=u,l._groupBy=r,l._ogmInfoKey=Symbol("ogmInfo"+a),l._base=e;for(var p=0;p<e.length;p++)l._addItem(e[p]);return l._disposeBaseObserver=Object(n.D)(l._base,(function(t){if("splice"===t.type)Object(n.J)((function(){for(var e=0,r=t.removed;e<r.length;e++){var n=r[e];l._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var s=i[o];l._addItem(s)}}));else{if("update"!==t.type)throw new Error("illegal state");Object(n.J)((function(){l._removeItem(t.oldValue),l._addItem(t.newValue)}))}})),l}b(e,t),e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(t){throw new Error("not supported")},e.prototype.set=function(t,e){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var t=0;t<this._base.length;t++){var e=this._base[t];e[this._ogmInfoKey].reaction(),delete e[this._ogmInfoKey]}},e.prototype._getGroupArr=function(e){var r=t.prototype.get.call(this,e);return void 0===r&&(r=Object(n.C)([],{name:"GroupArray["+this._keyToName(e)+"]",deep:!1}),t.prototype.set.call(this,e,r)),r},e.prototype._removeFromGroupArr=function(e,r){var n=t.prototype.get.call(this,e);1===n.length?t.prototype.delete.call(this,e):(r===n.length-1||(n[r]=n[n.length-1],n[r][this._ogmInfoKey].groupArrIndex=r),n.length--)},e.prototype._addItem=function(t){var e=this,r=this._groupBy(t),o=this._getGroupArr(r),i={groupByValue:r,groupArrIndex:o.length,reaction:Object(n.F)((function(){return e._groupBy(t)}),(function(r,n){var o=t[e._ogmInfoKey];e._removeFromGroupArr(o.groupByValue,o.groupArrIndex);var i=e._getGroupArr(r),s=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=s}))};Object.defineProperty(t,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:i}),o.push(t)},e.prototype._removeItem=function(t){var e=t[this._ogmInfoKey];this._removeFromGroupArr(e.groupByValue,e.groupArrIndex),e.reaction(),delete t[this._ogmInfoKey]}}(n.b),function(){function t(t,e){this.base=t,this.args=e,this.closestIdx=0,this.isDisposed=!1;for(var r=this.closest=this.root=t,n=0;n<this.args.length-1&&(r=r.get(e[n]));n++)this.closest=r;this.closestIdx=n}return t.prototype.exists=function(){this.assertNotDisposed();var t=this.args.length;return this.closestIdx>=t-1&&this.closest.has(this.args[t-1])},t.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},t.prototype.set=function(t){this.assertNotDisposed();for(var e=this.args.length,r=this.closest,n=this.closestIdx;n<e-1;n++){var o=new Map;r.set(this.args[n],o),r=o}this.closestIdx=e-1,this.closest=r,r.set(this.args[e-1],t)},t.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var t=this.args.length;this.closest.delete(this.args[t-1]);for(var e=this.root,r=[e],n=0;n<t-1;n++)e=e.get(this.args[n]),r.push(e);for(n=r.length-1;n>0;n--)0===r[n].size&&r[n-1].delete(this.args[n-1]);this.isDisposed=!0},t.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},t}());!function(){function t(){this.store=new Map,this.argsLength=-1}t.prototype.entry=function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new m(this.store,t)}}();new Set,new Set;var O,_=Promise.resolve();O="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var x=function(){return new Promise((function(t){O(t)}))}}).call(this,r(85))},function(t,e,r){var n;!function(o,i,s){if(o){for(var a,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"},u={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",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},p={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,r){return t=t instanceof Array?t:[t],this._bindMultiple.call(this,t,e,r),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,r){return null!==e&&e!==i&&(e===r||t(e.parentNode,r))}(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var r=t.composedPath()[0];r!==t.target&&(e=r)}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]);a=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===(n=function(){return b}.call(e,r,e,t))||(t.exports=n)}function h(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function f(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]:u[t.which]?u[t.which]:String.fromCharCode(t.which).toLowerCase()}function g(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function y(t,e,r){return r||(r=function(){if(!a)for(var t in a={},c)t>95&&t<112||c.hasOwnProperty(t)&&(a[c[t]]=t);return a}()[t]?"keydown":"keypress"),"keypress"==r&&e.length&&(r="keydown"),r}function v(t,e){var r,n,o,i=[];for(r=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<r.length;++o)n=r[o],p[n]&&(n=p[n]),e&&"keypress"!=e&&l[n]&&(n=l[n],i.push("shift")),g(n)&&i.push(n);return{key:n,modifiers:i,action:e=y(n,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 r,n={},o=!1,s=!1,a=!1;function c(t){t=t||{};var e,r=!1;for(e in n)t[e]?r=!0:n[e]=0;r||(a=!1)}function u(t,r,o,i,s,a){var c,u,l,p,d=[],h=o.type;if(!e._callbacks[t])return[];for("keyup"==h&&g(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(u=e._callbacks[t][c],(i||!u.seq||n[u.seq]==u.level)&&h==u.action&&("keypress"==h&&!o.metaKey&&!o.ctrlKey||(l=r,p=u.modifiers,l.sort().join(",")===p.sort().join(",")))){var f=!i&&u.combo==s,y=i&&u.seq==i&&u.level==a;(f||y)&&e._callbacks[t].splice(c,1),d.push(u)}return d}function l(t,r,n,o){e.stopCallback(r,r.target||r.srcElement,n,o)||!1===t(r,n)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(r),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(r))}function p(t){"number"!=typeof t.which&&(t.which=t.keyCode);var r=f(t);r&&("keyup"!=t.type||o!==r?e.handleKey(r,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,s){function u(e){return function(){a=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function p(e){l(i,e,t),"keyup"!==s&&(o=f(e)),setTimeout(c,10)}n[t]=0;for(var d=0;d<e.length;++d){var h=d+1===e.length?p:u(s||v(e[d+1]).action);y(e[d],h,s,t,d)}}function y(t,r,n,o,i){e._directMap[t+":"+n]=r;var s,a=(t=t.replace(/\s+/g," ")).split(" ");a.length>1?d(t,a,r,n):(s=v(t,n),e._callbacks[s.key]=e._callbacks[s.key]||[],u(s.key,s.modifiers,{type:s.action},o,t,i),e._callbacks[s.key][o?"unshift":"push"]({callback:r,modifiers:s.modifiers,action:s.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,r){var n,o=u(t,e,r),i={},p=0,d=!1;for(n=0;n<o.length;++n)o[n].seq&&(p=Math.max(p,o[n].level));for(n=0;n<o.length;++n)if(o[n].seq){if(o[n].level!=p)continue;d=!0,i[o[n].seq]=1,l(o[n].callback,r,o[n].combo,o[n].seq)}else d||l(o[n].callback,r,o[n].combo);var h="keypress"==r.type&&s;r.type!=a||g(t)||h||c(i),s=d&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)y(t[n],e,r)},h(t,"keypress",p),h(t,"keydown",p),h(t,"keyup",p)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},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,r){var n=r(45)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,r){"use strict";var n=r(30),o=r(97),i=r(57),s=r(58),a=r(105),c=s.set,u=s.getterFor("Array Iterator");t.exports=a(Array,"Array",(function(t,e){c(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){var n=r(13),o=r(35),i=r(28),s=n("unscopables"),a=Array.prototype;null==a[s]&&i.f(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},function(t,e,r){var n=r(24),o=r(28),i=r(14),s=r(30),a=r(71);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=s(e),c=a(e),u=c.length,l=0;u>l;)o.f(t,r=c[l++],n[r]);return t}},function(t,e,r){var n=r(4),o=r(16),i=r(25),s=r(69),a=r(36),c=r(101),u=r(13),l=n.TypeError,p=u("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var r,n=a(t,p);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||s(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,r){var n=r(6);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(4),o=r(16),i=r(10),s=r(25),a=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!s(n=o(r,t)))return n;if(i(r=t.valueOf)&&!s(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!s(n=o(r,t)))return n;throw a("Can't convert object to primitive value")}},function(t,e,r){var n=r(30),o=r(73),i=r(38),s=function(t){return function(e,r,s){var a,c=n(e),u=i(c),l=o(s,u);if(t&&r!=r){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},function(t,e,r){var n=r(31);t.exports=n("document","documentElement")},function(t,e,r){var n=r(4),o=r(10),i=r(59),s=n.WeakMap;t.exports=o(s)&&/native code/.test(i(s))},function(t,e,r){"use strict";var n=r(18),o=r(16),i=r(48),s=r(60),a=r(10),c=r(110),u=r(78),l=r(112),p=r(79),d=r(29),h=r(41),f=r(13),g=r(57),y=r(77),v=s.PROPER,b=s.CONFIGURABLE,m=y.IteratorPrototype,O=y.BUGGY_SAFARI_ITERATORS,_=f("iterator"),x=function(){return this};t.exports=function(t,e,r,s,f,y,E){c(r,e,s);var w,j,P,S=function(t){if(t===f&&T)return T;if(!O&&t in A)return A[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},D=e+" Iterator",M=!1,A=t.prototype,N=A[_]||A["@@iterator"]||f&&A[f],T=!O&&N||S(f),C="Array"==e&&A.entries||N;if(C&&(w=u(C.call(new t)))!==Object.prototype&&w.next&&(i||u(w)===m||(l?l(w,m):a(w[_])||h(w,_,x)),p(w,D,!0,!0),i&&(g[D]=x)),v&&"values"==f&&N&&"values"!==N.name&&(!i&&b?d(A,"name","values"):(M=!0,T=function(){return o(N,this)})),f)if(j={values:S("values"),keys:y?T:S("keys"),entries:S("entries")},E)for(P in j)(O||M||!(P in A))&&h(A,P,j[P]);else n({target:e,proto:!0,forced:O||M},j);return i&&!E||A[_]===T||h(A,_,T,{name:f}),g[e]=T,j}},function(t,e,r){var n=r(17),o=r(107),i=r(74),s=r(28);t.exports=function(t,e){for(var r=o(e),a=s.f,c=i.f,u=0;u<r.length;u++){var l=r[u];n(t,l)||a(t,l,c(e,l))}}},function(t,e,r){var n=r(31),o=r(6),i=r(108),s=r(76),a=r(14),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(a(t)),r=s.f;return r?c(e,r(t)):e}},function(t,e,r){var n=r(72),o=r(55).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(9),o=r(10),i=/#|\.prototype\./,s=function(t,e){var r=c[a(t)];return r==l||r!=u&&(o(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},function(t,e,r){"use strict";var n=r(77).IteratorPrototype,o=r(35),i=r(40),s=r(79),a=r(57),c=function(){return this};t.exports=function(t,e,r,u){var l=e+" Iterator";return t.prototype=o(n,{next:i(+!u,r)}),s(t,l,!1,!0),a[l]=c,t}},function(t,e,r){var n=r(9);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(6),o=r(14),i=r(113);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},function(t,e,r){var n=r(4),o=r(10),i=n.String,s=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw s("Can't set "+i(t)+" as a prototype")}},function(t,e,r){var n=r(26);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(4),o=r(53),i=r(27),s=r(46),a=r(38),c=n.TypeError,u=function(t){return function(e,r,n,u){o(r);var l=i(e),p=s(l),d=a(l),h=t?d-1:0,f=t?-1:1;if(n<2)for(;;){if(h in p){u=p[h],h+=f;break}if(h+=f,t?h<0:d<=h)throw c("Reduce of empty array with no initial value")}for(;t?h>=0:d>h;h+=f)h in p&&(u=r(u,p[h],h,l));return u}};t.exports={left:u(!1),right:u(!0)}},function(t,e,r){var n=r(26),o=r(4);t.exports="process"==n(o.process)},function(t,e,r){"use strict";var n=r(18),o=r(6),i=r(53),s=r(27),a=r(38),c=r(22),u=r(9),l=r(119),p=r(80),d=r(121),h=r(122),f=r(51),g=r(123),y=[],v=o(y.sort),b=o(y.push),m=u((function(){y.sort(void 0)})),O=u((function(){y.sort(null)})),_=p("sort"),x=!u((function(){if(f)return f<70;if(!(d&&d>3)){if(h)return!0;if(g)return g<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)y.push({k:e+n,v:r})}for(y.sort((function(t,e){return e.v-t.v})),n=0;n<y.length;n++)e=y[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:m||!O||!_||!x},{sort:function(t){void 0!==t&&i(t);var e=s(this);if(x)return void 0===t?v(e):v(e,t);var r,n,o=[],u=a(e);for(n=0;n<u;n++)n in e&&b(o,e[n]);for(l(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=o.length,n=0;n<r;)e[n]=o[n++];for(;n<u;)delete e[n++];return e}})},function(t,e,r){var n={};n[r(13)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(82),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?s(t,e):a(t,i(n(t,0,c),e),i(n(t,c),e),e)},s=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},a=function(t,e,r,n){for(var o=e.length,i=r.length,s=0,a=0;s<o||a<i;)t[s+a]=s<o&&a<i?n(e[s],r[a])<=0?e[s++]:r[a++]:s<o?e[s++]:r[a++];return t};t.exports=i},function(t,e,r){"use strict";var n=r(52),o=r(28),i=r(40);t.exports=function(t,e,r){var s=n(e);s in t?o.f(t,s,i(0,r)):t[s]=r}},function(t,e,r){var n=r(34).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(34);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(34).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(4),o=r(84),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(13)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,r){"use strict";var n=r(14);t.exports=function(){var t=n(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,r){var n=r(9),o=r(4).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,r){var n=r(9),o=r(4).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,r){var n=r(14),o=r(130),i=r(13)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||null==(r=n(s)[i])?e:o(r)}},function(t,e,r){var n=r(4),o=r(131),i=r(70),s=n.TypeError;t.exports=function(t){if(o(t))return t;throw s(i(t)+" is not a constructor")}},function(t,e,r){var n=r(6),o=r(9),i=r(10),s=r(81),a=r(31),c=r(59),u=function(){},l=[],p=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,h=n(d.exec),f=!d.exec(u),g=function(t){if(!i(t))return!1;try{return p(u,l,t),!0}catch(t){return!1}};t.exports=!p||o((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return f||!!h(d,c(t))}:g},function(t,e,r){var n=r(6),o=r(37),i=r(22),s=r(21),a=n("".charAt),c=n("".charCodeAt),u=n("".slice),l=function(t){return function(e,r){var n,l,p=i(s(e)),d=o(r),h=p.length;return d<0||d>=h?t?"":void 0:(n=c(p,d))<55296||n>56319||d+1===h||(l=c(p,d+1))<56320||l>57343?t?a(p,d):n:t?u(p,d,d+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e,r){"use strict";var n=r(18),o=r(134).trim;n({target:"String",proto:!0,forced:r(135)("trim")},{trim:function(){return o(this)}})},function(t,e,r){var n=r(6),o=r(21),i=r(22),s=r(88),a=n("".replace),c="["+s+"]",u=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),p=function(t){return function(e){var r=i(o(e));return 1&t&&(r=a(r,u,"")),2&t&&(r=a(r,l,"")),r}};t.exports={start:p(1),end:p(2),trim:p(3)}},function(t,e,r){var n=r(60).PROPER,o=r(9),i=r(88);t.exports=function(t){return o((function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||n&&i[t].name!==t}))}},function(t,e,r){var n=r(6),o=r(27),i=Math.floor,s=n("".charAt),a=n("".replace),c=n("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,p,d){var h=r+t.length,f=n.length,g=l;return void 0!==p&&(p=o(p),g=u),a(d,g,(function(o,a){var u;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,h);case"<":u=p[c(a,1,-1)];break;default:var l=+a;if(0===l)return o;if(l>f){var d=i(l/10);return 0===d?o:d<=f?void 0===n[d-1]?s(a,1):n[d-1]+s(a,1):o}u=n[l-1]}return void 0===u?"":u}))}},function(t,e,r){"use strict";var n=r(24),o=r(6),i=r(16),s=r(9),a=r(71),c=r(76),u=r(75),l=r(27),p=r(46),d=Object.assign,h=Object.defineProperty,f=o([].concat);t.exports=!d||s((function(){if(n&&1!==d({b:1},d(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=d({},t)[r]||"abcdefghijklmnopqrst"!=a(d({},e)).join("")}))?function(t,e){for(var r=l(t),o=arguments.length,s=1,d=c.f,h=u.f;o>s;)for(var g,y=p(arguments[s++]),v=d?f(a(y),d(y)):a(y),b=v.length,m=0;b>m;)g=v[m++],n&&!i(h,y,g)||(r[g]=y[g]);return r}:d},function(t,e,r){var n=r(18),o=Math.hypot,i=Math.abs,s=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,a=0,c=arguments.length,u=0;a<c;)u<(r=i(arguments[a++]))?(o=o*(n=u/r)*n+1,u=r):o+=r>0?(n=r/u)*n:r;return u===1/0?1/0:u*s(o)}})},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return id})),r.d(e,"LogicFlow",(function(){return od})),r.d(e,"h",(function(){return Q.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return ml})),r.d(e,"RectNode",(function(){return _l})),r.d(e,"CircleNode",(function(){return El})),r.d(e,"PolygonNode",(function(){return Pl})),r.d(e,"DiamondNode",(function(){return Dl})),r.d(e,"EllipseNode",(function(){return Nl})),r.d(e,"TextNode",(function(){return Il})),r.d(e,"HtmlNode",(function(){return Rl})),r.d(e,"BaseEdge",(function(){return np})),r.d(e,"LineEdge",(function(){return ip})),r.d(e,"PolylineEdge",(function(){return pp})),r.d(e,"BezierEdge",(function(){return hp})),r.d(e,"Arrow",(function(){return Yl})),r.d(e,"BaseEdgeModel",(function(){return Es})),r.d(e,"BezierEdgeModel",(function(){return kc})),r.d(e,"LineEdgeModel",(function(){return As})),r.d(e,"PolylineEdgeModel",(function(){return Is})),r.d(e,"BaseNodeModel",(function(){return ru})),r.d(e,"CircleNodeModel",(function(){return uu})),r.d(e,"DiamondNodeModel",(function(){return bu})),r.d(e,"EllipseNodeModel",(function(){return Su})),r.d(e,"PolygonNodeModel",(function(){return ku})),r.d(e,"RectNodeModel",(function(){return Xu})),r.d(e,"TextNodeModel",(function(){return Vu})),r.d(e,"HtmlNodeModel",(function(){return Wu})),r.d(e,"EditConfigModel",(function(){return no})),r.d(e,"GraphModel",(function(){return Ha})),r.d(e,"SnaplineModel",(function(){return rl})),r.d(e,"Keyboard",(function(){return qp})),r.d(e,"get",(function(){return Pc})),r.d(e,"defaults",(function(){return Sc}));var n={};r.r(n),r.d(n,"createUuid",(function(){return Ai})),r.d(n,"refreshGraphId",(function(){return Ni})),r.d(n,"createDrag",(function(){return _a})),r.d(n,"StepDrag",(function(){return xa}));var o=r(0),i=r(2);if(!i.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!o.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var s=r(15),a=Object(s.b)("observerBatching");function c(t){t()}var u=!1;function l(){return u}function p(t){return Object(o.t)(t)}var d,h=1e4,f=new Set;function g(){void 0===d&&(d=setTimeout(y,1e4))}function y(){d=void 0;var t=Date.now();f.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,f.delete(e))})),f.size>0&&g()}var v=!1,b=[];var m={};function O(t){return"observer"+t}function _(t,e,r){if(void 0===e&&(e="observed"),void 0===r&&(r=m),l())return t();var n,a=function(t){return function(){v?b.push(t):t()}}((r.useForceUpdate||s.d)()),c=i.d.useRef(null);if(!c.current){var u=new o.c(O(e),(function(){d.mounted?a():(u.dispose(),c.current=null)})),d=function(t){return{cleanAt:Date.now()+h,reaction:t}}(u);c.current=d,n=c,f.add(n),g()}var y=c.current.reaction;return i.d.useDebugValue(y,p),i.d.useEffect((function(){var t;return t=c,f.delete(t),c.current?c.current.mounted=!0:(c.current={reaction:new o.c(O(e),(function(){a()})),cleanAt:1/0},a()),function(){c.current.reaction.dispose(),c.current=null}}),[]),function(t){v=!0,b=[];try{var e=t();v=!1;var r=b.length>0?b:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{v=!1}}((function(){var e,r;if(y.track((function(){try{e=t()}catch(t){r=t}})),r)throw r;return e}))}var x=function(){return(x=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function E(t,e){if(l())return t;var r,n,o,s=x({forwardRef:!1},e),a=t.displayName||t.name,c=function(e,r){return _((function(){return t(e,r)}),a)};return c.displayName=a,r=s.forwardRef?Object(i.f)(Object(i.e)(c)):Object(i.f)(c),n=t,o=r,Object.keys(n).forEach((function(t){w[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=a,r}var w={$$typeof:!0,render:!0,compare:!0,type:!0};function j(t){var e=t.children,r=t.render,n=e||r;return"function"!=typeof n?null:_(n)}function P(t,e,r,n,o){var i="children"===e?"render":"children",s="function"==typeof t[e],a="function"==typeof t[i];return s&&a?new Error("MobX Observer: Do not use children and render in the same time in`"+r):s||a?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}j.propTypes={children:P,render:P},j.displayName="Observer";var S;(S=i.g)||(S=c),Object(o.n)({reactionScheduler:S}),Object(s.a)()[a]=!0;var D=0;var M={};function A(t){return M[t]||(M[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+D+")";return D++,e}(t)),M[t]}function N(t,e){if(T(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(e,r[o])||!T(t[r[o]],e[r[o]]))return!1;return!0}function T(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function C(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}var k=A("patchMixins"),I=A("patchedDefinition");function L(t,e){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];e.locks++;try{var s;return null!=t&&(s=t.apply(this,o)),s}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(r,o)}))}}function R(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];L.call.apply(L,[this,t,e].concat(n))}}function z(t,e,r){var n=function(t,e){var r=t[k]=t[k]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[I]){var i=t[e],s=function t(e,r,n,o,i){var s,a=R(i,o);return(s={})[I]=!0,s.get=function(){return a},s.set=function(i){if(this===e)a=R(i,o);else{var s=t(this,r,n,o,i);Object.defineProperty(this,r,s)}},s.configurable=!0,s.enumerable=n,s}(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,s)}}var B=o.a||"$mobx",X=A("isMobXReactObserver"),H=A("isUnmounted"),Y=A("skipRender"),G=A("isForcingUpdate");function U(t){var e=t.prototype;if(t[X]){var r=F(e);console.warn("The provided component class ("+r+") \n has already been declared as an observer component.")}else t[X]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==i.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==W)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=W;K(e,"props"),K(e,"state");var n=e.render;return e.render=function(){return V.call(this,n)},z(e,"componentWillUnmount",(function(){var t;if(!0!==l()&&(null===(t=this.render[B])||void 0===t||t.dispose(),this[H]=!0,!this.render[B])){var e=F(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 F(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function V(t){var e=this;if(!0===l())return t.call(this);C(this,Y,!1),C(this,G,!1);var r=F(this),n=t.bind(this),s=!1,a=new o.c(r+".render()",(function(){if(!s&&(s=!0,!0!==e[H])){var t=!0;try{C(e,G,!0),e[Y]||i.a.prototype.forceUpdate.call(e),t=!1}finally{C(e,G,!1),t&&a.dispose()}}}));function c(){s=!1;var t=void 0,e=void 0;if(a.track((function(){try{e=Object(o.d)(!1,n)}catch(e){t=e}})),t)throw t;return e}return a.reactComponent=this,c[B]=a,this.render=c,c.call(this)}function W(t,e){return l()&&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||!N(this.props,t)}function K(t,e){var r=A("reactProp_"+e+"_valueHolder"),n=A("reactProp_"+e+"_atomHolder");function i(){return this[n]||C(this,n,Object(o.o)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return o.f&&o.e&&(t=Object(o.f)(!0)),i.call(this).reportObserved(),o.f&&o.e&&Object(o.e)(t),this[r]},set:function(t){this[G]||N(this[r],t)?C(this,r,t):(C(this,r,t),C(this,Y,!0),i.call(this).reportChanged(),C(this,Y,!1))}})}var Z="function"==typeof Symbol&&Symbol.for,q=Z?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,$=Z?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function J(t){if(!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'"),$&&t.$$typeof===$)throw new Error("Mobx observer: 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(q&&t.$$typeof===q){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(i.e)((function(){var t=arguments;return Object(i.c)(j,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.a,t)?U(t):E(t)}if(!i.a)throw new Error("mobx-react requires React to be available");if(!o.C)throw new Error("mobx-react requires mobx to be available");var Q=r(1);r(3),r(12),r(11),r(117),r(83);var tt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o};var et=function(){this.__data__=[],this.size=0};var rt=function(t,e){return t===e||t!=t&&e!=e};var nt=function(t,e){for(var r=t.length;r--;)if(rt(t[r][0],e))return r;return-1},ot=Array.prototype.splice;var it=function(t){var e=this.__data__,r=nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ot.call(e,r,1),--this.size,!0)};var st=function(t){var e=this.__data__,r=nt(e,t);return r<0?void 0:e[r][1]};var at=function(t){return nt(this.__data__,t)>-1};var ct=function(t,e){var r=this.__data__,n=nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ut(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ut.prototype.clear=et,ut.prototype.delete=it,ut.prototype.get=st,ut.prototype.has=at,ut.prototype.set=ct;var lt=ut;var pt=function(){this.__data__=new lt,this.size=0};var dt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var ht=function(t){return this.__data__.get(t)};var ft=function(t){return this.__data__.has(t)},gt=r(7),yt=gt.a.Symbol,vt=Object.prototype,bt=vt.hasOwnProperty,mt=vt.toString,Ot=yt?yt.toStringTag:void 0;var _t=function(t){var e=bt.call(t,Ot),r=t[Ot];try{t[Ot]=void 0;var n=!0}catch(t){}var o=mt.call(t);return n&&(e?t[Ot]=r:delete t[Ot]),o},xt=Object.prototype.toString;var Et=function(t){return xt.call(t)},wt=yt?yt.toStringTag:void 0;var jt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":wt&&wt in Object(t)?_t(t):Et(t)};var Pt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var St,Dt=function(t){if(!Pt(t))return!1;var e=jt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Mt=gt.a["__core-js_shared__"],At=(St=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+St:"";var Nt=function(t){return!!At&&At in t},Tt=Function.prototype.toString;var Ct=function(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},kt=/^\[object .+?Constructor\]$/,It=Function.prototype,Lt=Object.prototype,Rt=It.toString,zt=Lt.hasOwnProperty,Bt=RegExp("^"+Rt.call(zt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Xt=function(t){return!(!Pt(t)||Nt(t))&&(Dt(t)?Bt:kt).test(Ct(t))};var Ht=function(t,e){return null==t?void 0:t[e]};var Yt=function(t,e){var r=Ht(t,e);return Xt(r)?r:void 0},Gt=Yt(gt.a,"Map"),Ut=Yt(Object,"create");var Ft=function(){this.__data__=Ut?Ut(null):{},this.size=0};var Vt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wt=Object.prototype.hasOwnProperty;var Kt=function(t){var e=this.__data__;if(Ut){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Wt.call(e,t)?e[t]:void 0},Zt=Object.prototype.hasOwnProperty;var qt=function(t){var e=this.__data__;return Ut?void 0!==e[t]:Zt.call(e,t)};var $t=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ut&&void 0===e?"__lodash_hash_undefined__":e,this};function Jt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jt.prototype.clear=Ft,Jt.prototype.delete=Vt,Jt.prototype.get=Kt,Jt.prototype.has=qt,Jt.prototype.set=$t;var Qt=Jt;var te=function(){this.size=0,this.__data__={hash:new Qt,map:new(Gt||lt),string:new Qt}};var ee=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var re=function(t,e){var r=t.__data__;return ee(e)?r["string"==typeof e?"string":"hash"]:r.map};var ne=function(t){var e=re(this,t).delete(t);return this.size-=e?1:0,e};var oe=function(t){return re(this,t).get(t)};var ie=function(t){return re(this,t).has(t)};var se=function(t,e){var r=re(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ae(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ae.prototype.clear=te,ae.prototype.delete=ne,ae.prototype.get=oe,ae.prototype.has=ie,ae.prototype.set=se;var ce=ae;var ue=function(t,e){var r=this.__data__;if(r instanceof lt){var n=r.__data__;if(!Gt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ce(n)}return r.set(t,e),this.size=r.size,this};function le(t){var e=this.__data__=new lt(t);this.size=e.size}le.prototype.clear=pt,le.prototype.delete=dt,le.prototype.get=ht,le.prototype.has=ft,le.prototype.set=ue;var pe=le;var de=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var he=function(t){return this.__data__.has(t)};function fe(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new ce;++e<r;)this.add(t[e])}fe.prototype.add=fe.prototype.push=de,fe.prototype.has=he;var ge=fe;var ye=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var ve=function(t,e){return t.has(e)};var be=function(t,e,r,n,o,i){var s=1&r,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(t),l=i.get(e);if(u&&l)return u==e&&l==t;var p=-1,d=!0,h=2&r?new ge:void 0;for(i.set(t,e),i.set(e,t);++p<a;){var f=t[p],g=e[p];if(n)var y=s?n(g,f,p,e,t,i):n(f,g,p,t,e,i);if(void 0!==y){if(y)continue;d=!1;break}if(h){if(!ye(e,(function(t,e){if(!ve(h,e)&&(f===t||o(f,t,r,n,i)))return h.push(e)}))){d=!1;break}}else if(f!==g&&!o(f,g,r,n,i)){d=!1;break}}return i.delete(t),i.delete(e),d},me=gt.a.Uint8Array;var Oe=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var _e=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},xe=yt?yt.prototype:void 0,Ee=xe?xe.valueOf:void 0;var we=function(t,e,r,n,o,i,s){switch(r){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 me(t),new me(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return rt(+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 a=Oe;case"[object Set]":var c=1&n;if(a||(a=_e),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=2,s.set(t,e);var l=be(a(t),a(e),n,o,i,s);return s.delete(t),l;case"[object Symbol]":if(Ee)return Ee.call(t)==Ee.call(e)}return!1};var je=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Pe=Array.isArray;var Se=function(t,e,r){var n=e(t);return Pe(t)?n:je(n,r(t))};var De=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var s=t[r];e(s,r,t)&&(i[o++]=s)}return i};var Me=function(){return[]},Ae=Object.prototype.propertyIsEnumerable,Ne=Object.getOwnPropertySymbols,Te=Ne?function(t){return null==t?[]:(t=Object(t),De(Ne(t),(function(e){return Ae.call(t,e)})))}:Me;var Ce=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var ke=function(t){return null!=t&&"object"==typeof t};var Ie=function(t){return ke(t)&&"[object Arguments]"==jt(t)},Le=Object.prototype,Re=Le.hasOwnProperty,ze=Le.propertyIsEnumerable,Be=Ie(function(){return arguments}())?Ie:function(t){return ke(t)&&Re.call(t,"callee")&&!ze.call(t,"callee")},Xe=r(19),He=/^(?:0|[1-9]\d*)$/;var Ye=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&He.test(t))&&t>-1&&t%1==0&&t<e};var Ge=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ue={};Ue["[object Float32Array]"]=Ue["[object Float64Array]"]=Ue["[object Int8Array]"]=Ue["[object Int16Array]"]=Ue["[object Int32Array]"]=Ue["[object Uint8Array]"]=Ue["[object Uint8ClampedArray]"]=Ue["[object Uint16Array]"]=Ue["[object Uint32Array]"]=!0,Ue["[object Arguments]"]=Ue["[object Array]"]=Ue["[object ArrayBuffer]"]=Ue["[object Boolean]"]=Ue["[object DataView]"]=Ue["[object Date]"]=Ue["[object Error]"]=Ue["[object Function]"]=Ue["[object Map]"]=Ue["[object Number]"]=Ue["[object Object]"]=Ue["[object RegExp]"]=Ue["[object Set]"]=Ue["[object String]"]=Ue["[object WeakMap]"]=!1;var Fe=function(t){return ke(t)&&Ge(t.length)&&!!Ue[jt(t)]};var Ve=function(t){return function(e){return t(e)}},We=r(20),Ke=We.a&&We.a.isTypedArray,Ze=Ke?Ve(Ke):Fe,qe=Object.prototype.hasOwnProperty;var $e=function(t,e){var r=Pe(t),n=!r&&Be(t),o=!r&&!n&&Object(Xe.a)(t),i=!r&&!n&&!o&&Ze(t),s=r||n||o||i,a=s?Ce(t.length,String):[],c=a.length;for(var u in t)!e&&!qe.call(t,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ye(u,c))||a.push(u);return a},Je=Object.prototype;var Qe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Je)};var tr=function(t,e){return function(r){return t(e(r))}},er=tr(Object.keys,Object),rr=Object.prototype.hasOwnProperty;var nr=function(t){if(!Qe(t))return er(t);var e=[];for(var r in Object(t))rr.call(t,r)&&"constructor"!=r&&e.push(r);return e};var or=function(t){return null!=t&&Ge(t.length)&&!Dt(t)};var ir=function(t){return or(t)?$e(t):nr(t)};var sr=function(t){return Se(t,ir,Te)},ar=Object.prototype.hasOwnProperty;var cr=function(t,e,r,n,o,i){var s=1&r,a=sr(t),c=a.length;if(c!=sr(e).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in e:ar.call(e,l)))return!1}var p=i.get(t),d=i.get(e);if(p&&d)return p==e&&d==t;var h=!0;i.set(t,e),i.set(e,t);for(var f=s;++u<c;){var g=t[l=a[u]],y=e[l];if(n)var v=s?n(y,g,l,e,t,i):n(g,y,l,t,e,i);if(!(void 0===v?g===y||o(g,y,r,n,i):v)){h=!1;break}f||(f="constructor"==l)}if(h&&!f){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||(h=!1)}return i.delete(t),i.delete(e),h},ur=Yt(gt.a,"DataView"),lr=Yt(gt.a,"Promise"),pr=Yt(gt.a,"Set"),dr=Yt(gt.a,"WeakMap"),hr=Ct(ur),fr=Ct(Gt),gr=Ct(lr),yr=Ct(pr),vr=Ct(dr),br=jt;(ur&&"[object DataView]"!=br(new ur(new ArrayBuffer(1)))||Gt&&"[object Map]"!=br(new Gt)||lr&&"[object Promise]"!=br(lr.resolve())||pr&&"[object Set]"!=br(new pr)||dr&&"[object WeakMap]"!=br(new dr))&&(br=function(t){var e=jt(t),r="[object Object]"==e?t.constructor:void 0,n=r?Ct(r):"";if(n)switch(n){case hr:return"[object DataView]";case fr:return"[object Map]";case gr:return"[object Promise]";case yr:return"[object Set]";case vr:return"[object WeakMap]"}return e});var mr=br,Or=Object.prototype.hasOwnProperty;var _r=function(t,e,r,n,o,i){var s=Pe(t),a=Pe(e),c=s?"[object Array]":mr(t),u=a?"[object Array]":mr(e),l="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),p="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),d=c==u;if(d&&Object(Xe.a)(t)){if(!Object(Xe.a)(e))return!1;s=!0,l=!1}if(d&&!l)return i||(i=new pe),s||Ze(t)?be(t,e,r,n,o,i):we(t,e,c,r,n,o,i);if(!(1&r)){var h=l&&Or.call(t,"__wrapped__"),f=p&&Or.call(e,"__wrapped__");if(h||f){var g=h?t.value():t,y=f?e.value():e;return i||(i=new pe),o(g,y,r,n,i)}}return!!d&&(i||(i=new pe),cr(t,e,r,n,o,i))};var xr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!ke(e)&&!ke(r)?e!=e&&r!=r:_r(e,r,n,o,t,i))};var Er=function(t,e,r,n){var o=r.length,i=o,s=!n;if(null==t)return!i;for(t=Object(t);o--;){var a=r[o];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var c=(a=r[o])[0],u=t[c],l=a[1];if(s&&a[2]){if(void 0===u&&!(c in t))return!1}else{var p=new pe;if(n)var d=n(u,l,c,t,e,p);if(!(void 0===d?xr(l,u,3,n,p):d))return!1}}return!0};var wr=function(t){return t==t&&!Pt(t)};var jr=function(t){for(var e=ir(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,wr(o)]}return e};var Pr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Sr=function(t){var e=jr(t);return 1==e.length&&e[0][2]?Pr(e[0][0],e[0][1]):function(r){return r===t||Er(r,t,e)}};var Dr=function(t){return"symbol"==typeof t||ke(t)&&"[object Symbol]"==jt(t)},Mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ar=/^\w*$/;var Nr=function(t,e){if(Pe(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Dr(t))||(Ar.test(t)||!Mr.test(t)||null!=e&&t in Object(e))};function Tr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Tr.Cache||ce),r}Tr.Cache=ce;var Cr=Tr;var kr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ir=/\\(\\)?/g,Lr=function(t){var e=Cr(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(kr,(function(t,r,n,o){e.push(n?o.replace(Ir,"$1"):r||t)})),e})),Rr=yt?yt.prototype:void 0,zr=Rr?Rr.toString:void 0;var Br=function t(e){if("string"==typeof e)return e;if(Pe(e))return tt(e,t)+"";if(Dr(e))return zr?zr.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};var Xr=function(t){return null==t?"":Br(t)};var Hr=function(t,e){return Pe(t)?t:Nr(t,e)?[t]:Lr(Xr(t))};var Yr=function(t){if("string"==typeof t||Dr(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var Gr=function(t,e){for(var r=0,n=(e=Hr(e,t)).length;null!=t&&r<n;)t=t[Yr(e[r++])];return r&&r==n?t:void 0};var Ur=function(t,e,r){var n=null==t?void 0:Gr(t,e);return void 0===n?r:n};var Fr=function(t,e){return null!=t&&e in Object(t)};var Vr=function(t,e,r){for(var n=-1,o=(e=Hr(e,t)).length,i=!1;++n<o;){var s=Yr(e[n]);if(!(i=null!=t&&r(t,s)))break;t=t[s]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ge(o)&&Ye(s,o)&&(Pe(t)||Be(t))};var Wr=function(t,e){return null!=t&&Vr(t,e,Fr)};var Kr=function(t,e){return Nr(t)&&wr(e)?Pr(Yr(t),e):function(r){var n=Ur(r,t);return void 0===n&&n===e?Wr(r,t):xr(e,n,3)}};var Zr=function(t){return t};var qr=function(t){return function(e){return null==e?void 0:e[t]}};var $r=function(t){return function(e){return Gr(e,t)}};var Jr=function(t){return Nr(t)?qr(Yr(t)):$r(t)};var Qr=function(t){return"function"==typeof t?t:null==t?Zr:"object"==typeof t?Pe(t)?Kr(t[0],t[1]):Sr(t):Jr(t)};var tn=function(t){return function(e,r,n){for(var o=-1,i=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++o];if(!1===r(i[c],c,i))break}return e}}();var en=function(t,e){return function(r,n){if(null==r)return r;if(!or(r))return t(r,n);for(var o=r.length,i=e?o:-1,s=Object(r);(e?i--:++i<o)&&!1!==n(s[i],i,s););return r}}((function(t,e){return t&&tn(t,e,ir)}));var rn=function(t,e){var r=-1,n=or(t)?Array(t.length):[];return en(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var nn=function(t,e){return(Pe(t)?tt:rn)(t,Qr(e,3))},on=function(){try{var t=Yt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var sn=function(t,e,r){"__proto__"==e&&on?on(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},an=Object.prototype.hasOwnProperty;var cn=function(t,e,r){var n=t[e];an.call(t,e)&&rt(n,r)&&(void 0!==r||e in t)||sn(t,e,r)};var un=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=n?n(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),o?sn(r,a,c):cn(r,a,c)}return r};var ln=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},pn=Math.max;var dn=function(t,e,r){return e=pn(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=pn(n.length-e,0),s=Array(i);++o<i;)s[o]=n[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=n[o];return a[e]=r(s),ln(t,this,a)}};var hn=function(t){return function(){return t}},fn=on?function(t,e){return on(t,"toString",{configurable:!0,enumerable:!1,value:hn(e),writable:!0})}:Zr,gn=Date.now;var yn=function(t){var e=0,r=0;return function(){var n=gn(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(fn);var vn=function(t,e){return yn(dn(t,e,Zr),t+"")};var bn=function(t,e,r){if(!Pt(r))return!1;var n=typeof e;return!!("number"==n?or(r)&&Ye(e,r.length):"string"==n&&e in r)&&rt(r[e],t)};var mn=function(t){return vn((function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,s&&bn(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var a=r[n];a&&t(e,a,n,i)}return e}))},On=Object.prototype.hasOwnProperty,_n=mn((function(t,e){if(Qe(e)||or(e))un(e,ir(e),t);else for(var r in e)On.call(e,r)&&cn(t,r,e[r])}));var xn=function(t,e,r,n){if(!Pt(t))return t;for(var o=-1,i=(e=Hr(e,t)).length,s=i-1,a=t;null!=a&&++o<i;){var c=Yr(e[o]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var l=a[c];void 0===(u=n?n(l,c,a):void 0)&&(u=Pt(l)?l:Ye(e[o+1])?[]:{})}cn(a,c,u),a=a[c]}return t};var En=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var s=e[n],a=Gr(t,s);r(a,s)&&xn(i,Hr(s,t),a)}return i};var wn=function(t,e){return En(t,e,(function(e,r){return Wr(t,r)}))},jn=yt?yt.isConcatSpreadable:void 0;var Pn=function(t){return Pe(t)||Be(t)||!!(jn&&t&&t[jn])};var Sn=function t(e,r,n,o,i){var s=-1,a=e.length;for(n||(n=Pn),i||(i=[]);++s<a;){var c=e[s];r>0&&n(c)?r>1?t(c,r-1,n,o,i):je(i,c):o||(i[i.length]=c)}return i};var Dn=function(t){return(null==t?0:t.length)?Sn(t,1):[]};var Mn,An,Nn,Tn,Cn,kn,In,Ln,Rn,zn,Bn,Xn,Hn,Yn,Gn,Un,Fn=function(t){return yn(dn(t,void 0,Dn),t+"")}((function(t,e){return null==t?{}:wn(t,e)}));function Vn(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Wn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Kn(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}const Zn={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},qn=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey"];let $n,Jn,Qn,to,eo,ro,no=(An=Kn((Mn=class{constructor(t){Vn(this,"stopZoomGraph",An,this),Vn(this,"stopScrollGraph",Nn,this),Vn(this,"stopMoveGraph",Tn,this),Vn(this,"adjustEdge",Cn,this),Vn(this,"adjustEdgeMiddle",kn,this),Vn(this,"adjustEdgeStartAndEnd",In,this),Vn(this,"adjustNodePosition",Ln,this),Vn(this,"hideAnchors",Rn,this),Vn(this,"hoverOutline",zn,this),Vn(this,"nodeSelectedOutline",Bn,this),Vn(this,"edgeSelectedOutline",Xn,this),Vn(this,"nodeTextEdit",Hn,this),Vn(this,"edgeTextEdit",Yn,this),Vn(this,"nodeTextDraggable",Gn,this),Vn(this,"edgeTextDraggable",Un,this),Wn(this,"multipleSelectKey",""),Wn(this,"defaultConfig",{}),_n(this,this.getConfigDetail(t))}updateEditConfig(t){const e=this.getConfigDetail(t);_n(this,e)}getConfigDetail(t){const{isSilentMode:e,textEdit:r}=t,n={};if(!1===e&&_n(n,this.defaultConfig),!0===e){const t=Fn(Zn,qn);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},_n(n,t)}!1===r&&_n(n,{nodeTextEdit:!1,edgeTextEdit:!1});const o=Fn(t,qn);return _n(n,o)}getConfig(){return Fn(this,qn)}}).prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nn=Kn(Mn.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tn=Kn(Mn.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cn=Kn(Mn.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),kn=Kn(Mn.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),In=Kn(Mn.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ln=Kn(Mn.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Rn=Kn(Mn.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zn=Kn(Mn.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bn=Kn(Mn.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xn=Kn(Mn.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hn=Kn(Mn.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Yn=Kn(Mn.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Gn=Kn(Mn.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Un=Kn(Mn.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kn(Mn.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(Mn.prototype,"updateEditConfig"),Mn.prototype),Mn);!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"}($n||($n={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(Jn||(Jn={})),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"}(Qn||(Qn={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(to||(to={})),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_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_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",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.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform"}(eo||(eo={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ro||(ro={}));let oo;var io,so,ao,co,uo,lo,po,ho;function fo(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function go(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yo(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(oo||(oo={}));let vo=(so=yo((io=class{constructor(t){go(this,"MINI_SCALE_SIZE",.2),go(this,"MAX_SCALE_SIZE",16),fo(this,"SCALE_X",so,this),fo(this,"SKEW_Y",ao,this),fo(this,"SKEW_X",co,this),fo(this,"SCALE_Y",uo,this),fo(this,"TRANSLATE_X",lo,this),fo(this,"TRANSLATE_Y",po,this),fo(this,"ZOOM_SIZE",ho,this),go(this,"eventCenter",void 0),this.eventCenter=t}setZoomMiniSize(t){this.MINI_SCALE_SIZE=t}setZoomMaxSize(t){this.MAX_SCALE_SIZE=t}HtmlPointToCanvasPoint(t){let[e,r]=t;return[(e-this.TRANSLATE_X)/this.SCALE_X,(r-this.TRANSLATE_Y)/this.SCALE_Y]}CanvasPointToHtmlPoint(t){let[e,r]=t;return[e*this.SCALE_X+this.TRANSLATE_X,r*this.SCALE_Y+this.TRANSLATE_Y]}moveCanvasPointByHtml(t,e,r){let[n,o]=t;return[n+e/this.SCALE_X,o+r/this.SCALE_Y]}fixDeltaXY(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}getTransformStyle(){const 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,")")}}zoom(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,r=this.SCALE_X,n=this.SCALE_Y;return!0===t?(r+=this.ZOOM_SIZE,n+=this.ZOOM_SIZE):!1===t?(r-=this.ZOOM_SIZE,n-=this.ZOOM_SIZE):"number"==typeof t&&(r=t,n=t),r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(r-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(n-this.SCALE_Y)*e[1]),this.SCALE_X=r,this.SCALE_Y=n,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}emitGraphTransform(t){this.eventCenter.emit(eo.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}})}resetZoom(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}translate(t,e){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=e,this.emitGraphTransform("translate")}focusOn(t,e,r,n){const[o,i]=this.CanvasPointToHtmlPoint([t,e]),[s,a]=[r/2-o,n/2-i];this.TRANSLATE_X+=s,this.TRANSLATE_Y+=a,this.emitGraphTransform("focusOn")}}).prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ao=yo(io.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),co=yo(io.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),uo=yo(io.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),lo=yo(io.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),po=yo(io.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ho=yo(io.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),yo(io.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(io.prototype,"zoom"),io.prototype),yo(io.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(io.prototype,"resetZoom"),io.prototype),yo(io.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(io.prototype,"translate"),io.prototype),yo(io.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(io.prototype,"focusOn"),io.prototype),io);var bo=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var mo=function(t,e){return t&&un(e,ir(e),t)};var Oo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},_o=Object.prototype.hasOwnProperty;var xo=function(t){if(!Pt(t))return Oo(t);var e=Qe(t),r=[];for(var n in t)("constructor"!=n||!e&&_o.call(t,n))&&r.push(n);return r};var Eo=function(t){return or(t)?$e(t,!0):xo(t)};var wo=function(t,e){return t&&un(e,Eo(e),t)},jo=r(44);var Po=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var So=function(t,e){return un(t,Te(t),e)},Do=tr(Object.getPrototypeOf,Object),Mo=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)je(e,Te(t)),t=Do(t);return e}:Me;var Ao=function(t,e){return un(t,Mo(t),e)};var No=function(t){return Se(t,Eo,Mo)},To=Object.prototype.hasOwnProperty;var Co=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&To.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var ko=function(t){var e=new t.constructor(t.byteLength);return new me(e).set(new me(t)),e};var Io=function(t,e){var r=e?ko(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Lo=/\w*$/;var Ro=function(t){var e=new t.constructor(t.source,Lo.exec(t));return e.lastIndex=t.lastIndex,e},zo=yt?yt.prototype:void 0,Bo=zo?zo.valueOf:void 0;var Xo=function(t){return Bo?Object(Bo.call(t)):{}};var Ho=function(t,e){var r=e?ko(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var Yo=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return ko(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Io(t,r);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 Ho(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Ro(t);case"[object Set]":return new n;case"[object Symbol]":return Xo(t)}},Go=Object.create,Uo=function(){function t(){}return function(e){if(!Pt(e))return{};if(Go)return Go(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Fo=function(t){return"function"!=typeof t.constructor||Qe(t)?{}:Uo(Do(t))};var Vo=function(t){return ke(t)&&"[object Map]"==mr(t)},Wo=We.a&&We.a.isMap,Ko=Wo?Ve(Wo):Vo;var Zo=function(t){return ke(t)&&"[object Set]"==mr(t)},qo=We.a&&We.a.isSet,$o=qo?Ve(qo):Zo,Jo={};Jo["[object Arguments]"]=Jo["[object Array]"]=Jo["[object ArrayBuffer]"]=Jo["[object DataView]"]=Jo["[object Boolean]"]=Jo["[object Date]"]=Jo["[object Float32Array]"]=Jo["[object Float64Array]"]=Jo["[object Int8Array]"]=Jo["[object Int16Array]"]=Jo["[object Int32Array]"]=Jo["[object Map]"]=Jo["[object Number]"]=Jo["[object Object]"]=Jo["[object RegExp]"]=Jo["[object Set]"]=Jo["[object String]"]=Jo["[object Symbol]"]=Jo["[object Uint8Array]"]=Jo["[object Uint8ClampedArray]"]=Jo["[object Uint16Array]"]=Jo["[object Uint32Array]"]=!0,Jo["[object Error]"]=Jo["[object Function]"]=Jo["[object WeakMap]"]=!1;var Qo=function t(e,r,n,o,i,s){var a,c=1&r,u=2&r,l=4&r;if(n&&(a=i?n(e,o,i,s):n(e)),void 0!==a)return a;if(!Pt(e))return e;var p=Pe(e);if(p){if(a=Co(e),!c)return Po(e,a)}else{var d=mr(e),h="[object Function]"==d||"[object GeneratorFunction]"==d;if(Object(Xe.a)(e))return Object(jo.a)(e,c);if("[object Object]"==d||"[object Arguments]"==d||h&&!i){if(a=u||h?{}:Fo(e),!c)return u?Ao(e,wo(a,e)):So(e,mo(a,e))}else{if(!Jo[d])return i?e:{};a=Yo(e,d,c)}}s||(s=new pe);var f=s.get(e);if(f)return f;s.set(e,a),$o(e)?e.forEach((function(o){a.add(t(o,r,n,o,e,s))})):Ko(e)&&e.forEach((function(o,i){a.set(i,t(o,r,n,i,e,s))}));var g=p?void 0:(l?u?No:sr:u?Eo:ir)(e);return bo(g||e,(function(o,i){g&&(o=e[i=o]),cn(a,i,t(o,r,n,i,e,s))})),a};var ti=function(t){return Qo(t,5)};var ei=function(t,e,r){(void 0!==r&&!rt(t[e],r)||void 0===r&&!(e in t))&&sn(t,e,r)};var ri=function(t){return ke(t)&&or(t)},ni=Function.prototype,oi=Object.prototype,ii=ni.toString,si=oi.hasOwnProperty,ai=ii.call(Object);var ci=function(t){if(!ke(t)||"[object Object]"!=jt(t))return!1;var e=Do(t);if(null===e)return!0;var r=si.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&ii.call(r)==ai};var ui=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var li=function(t){return un(t,Eo(t))};var pi=function(t,e,r,n,o,i,s){var a=ui(t,r),c=ui(e,r),u=s.get(c);if(u)ei(t,r,u);else{var l=i?i(a,c,r+"",t,e,s):void 0,p=void 0===l;if(p){var d=Pe(c),h=!d&&Object(Xe.a)(c),f=!d&&!h&&Ze(c);l=c,d||h||f?Pe(a)?l=a:ri(a)?l=Po(a):h?(p=!1,l=Object(jo.a)(c,!0)):f?(p=!1,l=Ho(c,!0)):l=[]:ci(c)||Be(c)?(l=a,Be(a)?l=li(a):Pt(a)&&!Dt(a)||(l=Fo(c))):p=!1}p&&(s.set(c,l),o(l,c,n,i,s),s.delete(c)),ei(t,r,l)}};var di=function t(e,r,n,o,i){e!==r&&tn(r,(function(s,a){if(i||(i=new pe),Pt(s))pi(e,r,a,n,t,o,i);else{var c=o?o(ui(e,a),s,a+"",e,r,i):void 0;void 0===c&&(c=s),ei(e,a,c)}}),Eo)},hi=mn((function(t,e,r){di(t,e,r)}));const fi={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"}}},gi=t=>{let e=ti(fi);return t&&(e=hi(e,t)),e};r(23),r(32),r(133);class yi{constructor(){var t,e,r;r={},(e="_events")in(t=this)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}on(t,e,r){return null==t||t.split(",").forEach(t=>{t=t.trim(),this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!r})}),this}once(t,e){null==t||t.split(",").forEach(t=>(t=t.trim(),this.on(t,e,!0)))}emit(t,e){null==t||t.split(",").forEach(t=>{const r=this._events[t]||[],n=this._events["*"]||[],o=r=>{let{length:n}=r;for(let o=0;o<n;o++){if(!r[o])continue;const{callback:i,once:s}=r[o];s&&(r.splice(o,1),0===r.length&&delete this._events[t],n--,o--),i.apply(this,[e])}};o(r),o(n)})}off(t,e){return t||(this._events={}),t.split(",").forEach(t=>{if(e){const r=this._events[t]||[];let{length:n}=r;for(let t=0;t<n;t++)r[t].callback===e&&(r.splice(t,1),n--,t--);0===r.length&&delete this._events[t]}else delete this._events[t]}),this}getEvents(){return this._events}}function vi(t,e){return e*Math.round(t/e)||t}function bi(t,e){return t%e}const mi=(t,e,r)=>{let[n,o]=t,[i,s]=e,[a,c]=r;return n>i&&n<a&&o>s&&o<c},Oi=(t,e)=>{const{multipleSelectKey:r}=e;let n=!1;switch(r){case"meta":n=t.metaKey;break;case"alt":n=t.altKey;break;case"shift":n=t.shiftKey;break;default:n=!1}return n};r(89),r(90),r(8);var _i,xi=new Uint8Array(16);function Ei(){if(!_i&&!(_i="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 _i(xi)}var wi=/^(?:[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 ji=function(t){return"string"==typeof t&&wi.test(t)},Pi=[],Si=0;Si<256;++Si)Pi.push((Si+256).toString(16).substr(1));var Di=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Pi[t[e+0]]+Pi[t[e+1]]+Pi[t[e+2]]+Pi[t[e+3]]+"-"+Pi[t[e+4]]+Pi[t[e+5]]+"-"+Pi[t[e+6]]+Pi[t[e+7]]+"-"+Pi[t[e+8]]+Pi[t[e+9]]+"-"+Pi[t[e+10]]+Pi[t[e+11]]+Pi[t[e+12]]+Pi[t[e+13]]+Pi[t[e+14]]+Pi[t[e+15]]).toLowerCase();if(!ji(r))throw TypeError("Stringified UUID is invalid");return r};var Mi=function(t,e,r){var n=(t=t||{}).random||(t.rng||Ei)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return Di(n)};const Ai=()=>Mi(),Ni=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=t.nodes.reduce((t,r)=>(t[r.id]=e+Mi(),r.id=t[r.id],t),{});return t.edges.forEach(t=>{t.id=e+Mi(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]}),t};r(138);const Ti=(t,e,r)=>{const{x:n,y:o}=t;return(n-e.x)*(n-r.x)<=0&&(o-e.y)*(o-r.y)<=0};function Ci(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ki(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ci(Object(r),!0).forEach((function(e){Ii(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ci(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ii(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Li=t=>{const{anchors:e}=t;return e},Ri=(t,e)=>{let r;for(let n=e.length-1;n>=0;n--){if(Hi(t,e[n])){const o=zi(t,e[n]);if(o){r={node:e[n],anchorIndex:o.index,anchor:o.anchor};break}}}return r},zi=(t,e)=>{const r=Li(e);let n,o=Number.MAX_SAFE_INTEGER;for(let e=0;e<r.length;e++){const i=Bi(t.x,t.y,r[e].x,r[e].y);i<o&&(o=i,n={index:e,anchor:ki(ki({},r[e]),{},{x:r[e].x,y:r[e].y,id:r[e].id})})}return n},Bi=(t,e,r,n)=>Math.hypot(t-r,e-n),Xi=(t,e)=>{let r=!1;const n=Yi(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},Hi=(t,e)=>{let r=!1;const n=Yi(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},Yi=t=>{const{x:e,y:r,width:n,height:o}=t;return{minX:e-n/2,minY:r-o/2,maxX:e+n/2,maxY:r+o/2,x:e,y:r,width:n,height:o,centerX:e,centerY:r}},Gi=(t,e,r)=>{const n=(t=>{const{x:e,y:r,width:n,height:o,radius:i}=t;return[{x:e-n/2+i,y:r-o/2+i,r:i},{x:e+n/2-i,y:r-o/2+i,r:i},{x:e-n/2+i,y:r+o/2-i,r:i},{x:e+n/2-i,y:r+o/2-i,r:i}]})(r);let o,i=Number.MAX_SAFE_INTEGER;n.forEach(e=>{const r=Bi(t.x,t.y,e.x,e.y);r<i&&(i=r,o=e)});return Ui(t,e,o)},Ui=(t,e,r)=>{let n;const{x:o,y:i,r:s}=r;if(e===ro.HORIZONTAL){const e=o-Math.sqrt(s*s-(t.y-i)*(t.y-i)),r=o+Math.sqrt(s*s-(t.y-i)*(t.y-i));n={x:Math.abs(e-t.x)<Math.abs(r-t.x)?e:r,y:t.y}}else if(e===ro.VERTICAL){const e=i-Math.sqrt(s*s-(t.x-o)*(t.x-o)),r=i+Math.sqrt(s*s-(t.x-o)*(t.x-o)),a=Math.abs(e-t.y)<Math.abs(r-t.y)?e:r;n={x:t.x,y:a}}return n},Fi=(t,e)=>{const r=e;let n=!1;const o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,s=r.y-r.height/2+r.radius,a=r.y+r.height/2-r.radius,{x:c,y:u,width:l,height:p}=r;return t.y===u+p/2||t.y===u-p/2?n=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(n=t.y>s&&t.y<a),n},Vi=(t,e,r)=>{let n;const{x:o,y:i,rx:s,ry:a}=r;if(e===ro.HORIZONTAL){const e=o-Math.sqrt(s*s-(t.y-i)*(t.y-i)*s*s/(a*a)),r=o+Math.sqrt(s*s-(t.y-i)*(t.y-i)*s*s/(a*a));n={x:Math.abs(e-t.x)<Math.abs(r-t.x)?e:r,y:t.y}}else if(e===ro.VERTICAL){const e=i-Math.sqrt(a*a-(t.x-o)*(t.x-o)*a*a/(s*s)),r=i+Math.sqrt(a*a-(t.x-o)*(t.x-o)*a*a/(s*s)),c=Math.abs(e-t.y)<Math.abs(r-t.y)?e:r;n={x:t.x,y:c}}return n},Wi=(t,e,r)=>{const{pointsPosition:n}=r;let o,i=Number.MAX_SAFE_INTEGER;const s=[];for(let t=0;t<n.length;t++)s.push({start:n[t],end:n[(t+1)%n.length]});return s.forEach(r=>{const{start:n,end:s}=r;let a=n,c=s;n.x>s.x&&(a=s,c=n);let u={x:t.x,y:t.y};if(a.x===c.x&&e===ro.HORIZONTAL&&(u={x:a.x,y:t.y}),a.y===c.y&&e===ro.VERTICAL&&(u={x:t.x,y:a.y}),a.x!==c.x&&a.y!==c.y){const r=(c.y-a.y)/(c.x-a.x),n=(a.x*c.y-c.x*a.y)/(a.x-c.x);e===ro.HORIZONTAL?u={x:(t.y-n)/r,y:t.y}:e===ro.VERTICAL&&(u={x:t.x,y:r*t.x+n})}if(Ti(u,n,s)){const e=Bi(u.x,u.y,t.x,t.y);e<i&&(i=e,o=u)}}),o},Ki=(t,e,r,n)=>{let{x:o,y:i}=t;return e.x>t.x?o=t.x+r/2:e.x<t.x&&(o=t.x-r/2),e.y>t.y?i=t.y+n/2:e.y<t.y&&(i=t.y-n/2),{x:o,y:i}},Zi=t=>{let{rows:e,style:r,rowsLength:n,className:o}=t;const i=document.createElement("div");i.style.fontSize=r.fontSize,i.style.width=r.width,i.className=o,i.style.lineHeight=r.lineHeight,i.style.padding=r.padding,r.fontFamily&&(i.style.fontFamily=r.fontFamily),n>1?e.forEach(t=>{const e=document.createElement("div");e.textContent=t,i.appendChild(e)}):i.textContent=e,document.body.appendChild(i);const s=i.clientHeight;return document.body.removeChild(i),s},qi=t=>{let{rows:e,rowsLength:r,fontSize:n}=t,o=0;return e&&e.forEach(t=>{const e=pa(t);o=e>o?e:o}),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},$i=t=>"object"!=typeof t?{isAllPass:!!t,msg:t?"":"不允许连接"}:t,Ji=t=>{try{return JSON.parse(JSON.stringify(t))}catch(e){return t}};let Qi=1e3,ts=999;const es=()=>++Qi;var rs,ns,os,is,ss,as,cs,us,ls,ps,ds,hs,fs,gs,ys,vs;function bs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ms(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?bs(Object(r),!0).forEach((function(e){_s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bs(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Os(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function _s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xs(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let Es=(ns=xs((rs=class{constructor(t,e){_s(this,"id",Ai()),Os(this,"type",ns,this),Os(this,"sourceNodeId",os,this),Os(this,"targetNodeId",is,this),Os(this,"startPoint",ss,this),Os(this,"endPoint",as,this),Os(this,"text",cs,this),Os(this,"properties",us,this),Os(this,"points",ls,this),Os(this,"pointsList",ps,this),Os(this,"isSelected",ds,this),Os(this,"isHovered",hs,this),Os(this,"isHitable",fs,this),Os(this,"draggable",gs,this),_s(this,"graphModel",void 0),Os(this,"zIndex",ys,this),_s(this,"BaseType",to.EDGE),_s(this,"modelType",Qn.EDGE),Os(this,"state",vs,this),_s(this,"additionStateData",void 0),_s(this,"sourceAnchorId",""),_s(this,"targetAnchorId",""),_s(this,"menu",void 0),_s(this,"customTextPosition",!1),this.graphModel=e,this.initEdgeData(t),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(t)}initEdgeData(t){if(t.properties||(t.properties={}),!t.id){const{idGenerator:e}=this.graphModel,r=e&&e(t.type);r&&(t.id=r);const n=this.createId();n&&(t.id=n)}_n(this,ya(t));const{overlapMode:e}=this.graphModel;e===oo.INCREASE&&(this.zIndex=t.zIndex||es())}setAttributes(){}createId(){return null}getEdgeStyle(){const{baseEdge:t}=this.graphModel.theme;return ti(t)}getTextStyle(){const{edgeText:t}=this.graphModel.theme;return ti(t)}getOutlineStyle(){const{graphModel:t}=this,{outline:e}=t.theme;return ti(e)}getTextPosition(){return{x:0,y:0}}get sourceNode(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}get targetNode(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}get textPosition(){return this.getTextPosition()}getBeginAnchor(t,e){let r,n;return Li(t).forEach(t=>{const o=va(t,e);n?o<n&&(n=o,r=t):(n=o,r=t)}),r}getEndAnchor(t){let e,r;return Li(t).forEach(t=>{const n=va(t,this.startPoint);r?n<r&&(r=n,e=t):(r=n,e=t)}),e}getProperties(){return Object(o.I)(this.properties)}getData(){const{x:t,y:e,value:r}=this.text,n={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(o.I)(this.properties)};return r&&(n.text={x:t,y:e,value:r}),this.graphModel.overlapMode===oo.INCREASE&&(n.zIndex=this.zIndex),n}setProperty(t,e){this.properties[t]=Ji(e),this.setAttributes()}setProperties(t){this.properties=ms(ms({},this.properties),Ji(t)),this.setAttributes()}formatText(t){const{x:e,y:r}=this.textPosition;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||e,y:t.text.y||r,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:e,y:r,draggable:this.text.draggable,editable:this.text.editable}}resetTextPosition(){const{x:t,y:e}=this.textPosition;this.text.x=t,this.text.y=e}moveText(t,e){if(this.text){const{x:r,y:n,value:o,draggable:i,editable:s}=this.text;this.text={value:o,draggable:i,x:r+t,y:n+e,editable:s}}}setText(t){t&&_n(this.text,t)}updateText(t){this.text=ms(ms({},this.text),{},{value:t})}setAnchors(){if(!this.startPoint){const t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint=t}if(!this.endPoint){const t=this.getEndAnchor(this.targetNode);this.endPoint=t}}setSelected(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}setHovered(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}setHitable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}setElementState(t,e){this.state=t,this.additionStateData=e}updateStartPoint(t){this.startPoint=t}updateEndPoint(t){this.endPoint=t}setZIndex(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}initPoints(){}updateAttributes(t){_n(this,t)}getAdjustStart(){return this.startPoint}getAdjustEnd(){return this.endPoint}updateAfterAdjustStartAndEnd(t){let{startPoint:e,endPoint:r}=t;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:r.x,y:r.y})}}).prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),os=xs(rs.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),is=xs(rs.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ss=xs(rs.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),as=xs(rs.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),cs=xs(rs.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),us=xs(rs.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ls=xs(rs.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ps=xs(rs.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ds=xs(rs.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),hs=xs(rs.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),fs=xs(rs.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),gs=xs(rs.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ys=xs(rs.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),vs=xs(rs.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),xs(rs.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(rs.prototype,"sourceNode"),rs.prototype),xs(rs.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(rs.prototype,"targetNode"),rs.prototype),xs(rs.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(rs.prototype,"textPosition"),rs.prototype),xs(rs.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setProperty"),rs.prototype),xs(rs.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setProperties"),rs.prototype),xs(rs.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"formatText"),rs.prototype),xs(rs.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"resetTextPosition"),rs.prototype),xs(rs.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"moveText"),rs.prototype),xs(rs.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setText"),rs.prototype),xs(rs.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"updateText"),rs.prototype),xs(rs.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setAnchors"),rs.prototype),xs(rs.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setSelected"),rs.prototype),xs(rs.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setHovered"),rs.prototype),xs(rs.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setHitable"),rs.prototype),xs(rs.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setElementState"),rs.prototype),xs(rs.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"updateStartPoint"),rs.prototype),xs(rs.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"updateEndPoint"),rs.prototype),xs(rs.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"setZIndex"),rs.prototype),xs(rs.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"initPoints"),rs.prototype),xs(rs.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"updateAttributes"),rs.prototype),xs(rs.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"getAdjustStart"),rs.prototype),xs(rs.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"getAdjustEnd"),rs.prototype),xs(rs.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(rs.prototype,"updateAfterAdjustStartAndEnd"),rs.prototype),rs);var ws,js,Ps=Es;function Ss(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ds(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ss(Object(r),!0).forEach((function(e){Ms(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ss(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ms(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class As extends Ps{constructor(){super(...arguments),Ms(this,"modelType",Qn.LINE_EDGE)}getEdgeStyle(){const{line:t}=this.graphModel.theme;return Ds(Ds({},super.getEdgeStyle()),ti(t))}getTextPosition(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}function Ns(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ts(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ns(Object(r),!0).forEach((function(e){Cs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ns(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Cs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ks(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let Is=(js=ks((ws=class extends Ps{constructor(){super(...arguments),Cs(this,"modelType",Qn.POLYLINE_EDGE),Cs(this,"draginngPointList",void 0),function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(this,"dbClickPosition",js,this)}initEdgeData(t){this.offset=30,super.initEdgeData(t)}getEdgeStyle(){const{polyline:t}=this.graphModel.theme;return Ts(Ts({},super.getEdgeStyle()),ti(t))}getTextPosition(){var t;const e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){const{x:t,y:e}=this.dbClickPosition;return{x:t,y:e}}const r=ca(this.points),[n,o]=na(r);return{x:(n.x+o.x)/2,y:(n.y+o.y)/2}}getAfterAnchor(t,e,r){let n,o;return r.forEach(r=>{let i;t===ro.HORIZONTAL?i=Math.abs(e.y-r.y):t===ro.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)}),n}getCorssPoint(t,e,r){let n;return t===ro.HORIZONTAL?n={x:r.x,y:e.y}:t===ro.VERTICAL&&(n={x:e.x,y:r.y}),n}removeCrossPoints(t,e,r){const n=r.map(t=>t);if(1===t){const r=n[t],o=n[e],i=n[t-1];if(oa(i,r,this.sourceNode)){if(ia(r,o,this.sourceNode)){const i=sa(r,o,this.sourceNode);i&&(n[t]=i,n.splice(t-1,1),t--,e--)}}else{this.sourceNode.anchors.forEach(e=>{if(e.x===i.x&&e.x===r.x||e.y===i.y&&e.y===r.y){Bi(e.x,e.y,r.x,r.y)<Bi(i.x,i.y,r.x,r.y)&&(n[t-1]=e)}})}}if(e===r.length-2){const r=n[t],o=n[e],i=n[e+1];if(oa(o,i,this.targetNode)){if(ia(r,o,this.targetNode)){const t=sa(r,o,this.targetNode);t&&(n[e]=t,n.splice(e+1,1))}}else{this.targetNode.anchors.forEach(t=>{if(t.x===i.x&&t.x===o.x||t.y===i.y&&t.y===o.y){Bi(t.x,t.y,o.x,o.y)<Bi(i.x,i.y,o.x,o.y)&&(n[e+1]=t)}})}}return n}getDragingPoints(t,e,r,n,o){const i=o.map(t=>t),s=this.getAfterAnchor(t,r,n),a=this.getCorssPoint(t,r,s);return"start"===e?(i.unshift(a),i.unshift(s)):(i.push(a),i.push(s)),i}updateCrossPoints(t){const e=t.map(t=>t),r=t[0],n=t[1],o=t[e.length-2],i=t[e.length-1],{sourceNode:s,targetNode:a}=this,c=s.modelType,u=a.modelType,l=aa(r,n);let p=e[0];switch(c){case Qn.RECT_NODE:if(0!==s.radius){Fi(r,s)||(p=Gi(r,l,s))}break;case Qn.CIRCLE_NODE:p=Ui(r,l,s);break;case Qn.ELLIPSE_NODE:p=Vi(r,l,s);break;case Qn.DIAMOND_NODE:case Qn.POLYGON_NODE:p=Wi(r,l,s)}e[0]=p;const d=aa(o,i);let h=e[e.length-1];switch(u){case Qn.RECT_NODE:if(0!==a.radius){Fi(i,a)||(h=Gi(i,d,a))}break;case Qn.CIRCLE_NODE:h=Ui(i,d,a);break;case Qn.ELLIPSE_NODE:h=Vi(i,d,a);break;case Qn.DIAMOND_NODE:case Qn.POLYGON_NODE:h=Wi(i,d,a)}return e[e.length-1]=h,e}getData(){const t=super.getData(),e=this.pointsList.map(t=>{let{x:e,y:r}=t;return{x:e,y:r}});return Object.assign({},t,{pointsList:e})}initPoints(){this.pointsList.length>0?this.points=this.pointsList.map(t=>"".concat(t.x,",").concat(t.y)).join(" "):this.updatePoints()}updatePoints(){const t=ra({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(t=>"".concat(t.x,",").concat(t.y)).join(" ")}updateStartPoint(t){this.startPoint=t,this.updatePoints()}updateEndPoint(t){this.endPoint=t,this.updatePoints()}dragAppendStart(){this.draginngPointList=this.pointsList.map(t=>t)}dragAppendSimple(t,e){this.isDragging=!0;const{start:r,end:n,startIndex:o,endIndex:i,direction:s}=t,{pointsList:a}=this;let c=a;return s===ro.HORIZONTAL?(a[o]={x:r.x,y:r.y+e.y},a[i]={x:n.x,y:n.y+e.y},c=this.pointsList.map(t=>t)):s===ro.VERTICAL&&(a[o]={x:r.x+e.x,y:r.y},a[i]={x:n.x+e.x,y:n.y},c=this.pointsList.map(t=>t)),this.updatePointsAfterDrage(c),this.draginngPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:s}}dragAppend(t,e){this.isDragging=!0;const{start:r,end:n,startIndex:o,endIndex:i,direction:s}=t,{pointsList:a}=this;if(s===ro.HORIZONTAL){a[o]={x:r.x,y:r.y+e.y},a[i]={x:n.x,y:n.y+e.y};let t=this.pointsList.map(t=>t);if(0!==o&&i!==this.pointsList.length-1&&(t=this.removeCrossPoints(o,i,t)),0===o){const n={x:r.x,y:r.y+e.y};if(!Xi(n,this.sourceNode)){const e=this.sourceNode.anchors;t=this.getDragingPoints(s,"start",n,e,t)}}if(i===this.pointsList.length-1){const r={x:n.x,y:n.y+e.y};if(!Xi(r,this.targetNode)){const e=this.targetNode.anchors;t=this.getDragingPoints(s,"end",r,e,t)}}t=ea(t),this.updatePointsAfterDrage(t),this.draginngPointList=t}else if(s===ro.VERTICAL){a[o]={x:r.x+e.x,y:r.y},a[i]={x:n.x+e.x,y:n.y};let t=this.pointsList.map(t=>t);if(0!==o&&i!==this.pointsList.length-1&&(t=this.removeCrossPoints(o,i,t)),0===o){const n={x:r.x+e.x,y:r.y};if(!Xi(n,this.sourceNode)){const e=this.sourceNode.anchors;t=this.getDragingPoints(s,"start",n,e,t)}}if(i===this.pointsList.length-1){const r={x:n.x+e.x,y:n.y};if(!Xi(r,this.targetNode)){const e=this.targetNode.anchors;t=this.getDragingPoints(s,"end",r,e,t)}}t=ea(t),this.updatePointsAfterDrage(t),this.draginngPointList=t}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:s}}dragAppendEnd(){if(this.draginngPointList){const t=ca(this.points);this.pointsList=t.map(t=>t),this.draginngPointList=[];const e=t[0];this.startPoint=Object.assign({},e);const r=t[t.length-1];this.endPoint=Object.assign({},r)}this.isDragging=!1}updatePointsAfterDrage(t){const e=this.updateCrossPoints(t);this.points=e.map(t=>"".concat(t.x,",").concat(t.y)).join(" ")}getAdjustStart(){return this.pointsList[0]||this.startPoint}getAdjustEnd(){const{pointsList:t}=this;return t[t.length-1]||this.endPoint}updateAfterAdjustStartAndEnd(t){let{startPoint:e,endPoint:r,sourceNode:n,targetNode:o}=t;const i=ra({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}).prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ks(ws.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"initPoints"),ws.prototype),ks(ws.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"updatePoints"),ws.prototype),ks(ws.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"updateStartPoint"),ws.prototype),ks(ws.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"updateEndPoint"),ws.prototype),ks(ws.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"dragAppendStart"),ws.prototype),ks(ws.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"dragAppendSimple"),ws.prototype),ks(ws.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"dragAppend"),ws.prototype),ks(ws.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"dragAppendEnd"),ws.prototype),ks(ws.prototype,"updatePointsAfterDrage",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"updatePointsAfterDrage"),ws.prototype),ks(ws.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"getAdjustStart"),ws.prototype),ks(ws.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"getAdjustEnd"),ws.prototype),ks(ws.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(ws.prototype,"updateAfterAdjustStartAndEnd"),ws.prototype),ws);const Ls=t=>{const{start:e,end:r,offset:n,verticalLength:o,type:i}=t,s={leftX:0,leftY:0,rightX:0,rightY:0},a=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),u=Math.sqrt(o*o+n*n);return"start"===i?r.x>=e.x?(s.leftX=e.x+u*Math.sin(a+c),s.leftY=e.y-u*Math.cos(a+c),s.rightX=e.x-u*Math.sin(a-c),s.rightY=e.y+u*Math.cos(a-c)):(s.leftX=e.x-u*Math.sin(a+c),s.leftY=e.y+u*Math.cos(a+c),s.rightX=e.x+u*Math.sin(a-c),s.rightY=e.y-u*Math.cos(a-c)):"end"===i&&(r.x>=e.x?(s.leftX=r.x+u*Math.sin(a-c),s.leftY=r.y-u*Math.cos(a-c),s.rightX=r.x-u*Math.sin(a+c),s.rightY=r.y+u*Math.cos(a+c)):(s.leftX=r.x-u*Math.sin(a-c),s.leftY=r.y+u*Math.cos(a-c),s.rightX=r.x+u*Math.sin(a+c),s.rightY=r.y-u*Math.cos(a+c))),s};function Rs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Rs(Object(r),!0).forEach((function(e){Bs(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rs(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Xs=t=>{const e=[],r={};return t.forEach(t=>{const e="".concat(t.x,"-").concat(t.y);t.id=e,r[e]=t}),Object.keys(r).forEach(t=>{e.push(r[t])}),e},Hs=(t,e)=>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},Ys=(t,e)=>((t,e)=>{const r=Math.abs(t.x-e.centerX),n=Math.abs(t.y-e.centerY);return r/e.width>n/e.height?ro.HORIZONTAL:ro.VERTICAL})(e,t)===ro.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},Gs=(t,e)=>{const r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(r+o)/2,centerY:(n+i)/2,minX:r,minY:n,maxX:o,maxY:i,height:i-n,width:o-r}},Us=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;const r=[],n=[];t.forEach(t=>{r.push(t.x),n.push(t.y)});const o=Math.min(...r),i=Math.max(...r),s=Math.min(...n),a=Math.max(...n);let c=i-o,u=a-s;return e&&(c+=e,u+=e),{centerX:(o+i)/2,centerY:(s+a)/2,maxX:i,maxY:a,minX:o,minY:s,x:(o+i)/2,y:(s+a)/2,height:u,width:c}},Fs=t=>{const{minX:e,minY:r,maxX:n,maxY:o}=t;return[{x:e,y:r},{x:n,y:r},{x:n,y:o},{x:e,y:o}]},Vs=(t,e)=>{const{x:r,y:n}=t;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Ws=(t,e)=>Math.abs(t.x-e.x)+Math.abs(t.y-e.y),Ks=(t,e,r,n,o)=>Ws(t,e)+Ws(t,r)+((t,e)=>{let r=0;return e.forEach(e=>{e&&(t.x===e.x&&(r+=-2),t.y===e.y&&(r+=-2))}),r})(t,[e,r,n,o]),Zs=(t,e,r,n,o)=>{o||(o=0),t.unshift(e[n]),r[n]&&r[n]!==n&&o<=100&&Zs(t,e,r,r[n],o+1)},qs=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},$s=(t,e,r,n)=>{const o=e.x-t.x,i=e.y-t.y,s=n.x-r.x,a=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-s*i+o*a),u=(s*(t.y-r.y)-a*(t.x-r.x))/(-s*i+o*a);return c>=0&&c<=1&&u>=0&&u<=1},Js=(t,e,r)=>{if(0===r.width&&0===r.height)return!1;const[n,o,i,s]=Fs(r);return $s(t,e,n,o)||$s(t,e,n,s)||$s(t,e,o,i)||$s(t,e,i,s)},Qs=(t,e,r,n)=>{const o=[];return t.forEach(t=>{t!==e&&(t.x!==e.x&&t.y!==e.y||Js(t,e,r)||Js(t,e,n)||o.push(t))}),Xs(o)},ta=t=>Yi(t),ea=t=>{const e=t;let r=1;for(;r<e.length-1;){const t=e[r-1],n=e[r],o=e[r+1];t.x===n.x&&n.x===o.x||t.y===n.y&&n.y===o.y?e.splice(r,1):r++}return e},ra=(t,e,r,n,o)=>{const i=ta(r),s=ta(n),a=Hs(i,o),c=Hs(s,o),u=Ys(a,t),l=Ys(c,e);if(p=a,d=c,2*Math.abs(p.centerX-d.centerX)<p.width+d.width&&2*Math.abs(p.centerY-d.centerY)<p.height+d.height){return[t,u,...ua(t,e,u,l),l,e]}var p,d;const h=Us([u,l]),f=Gs(a,h),g=Gs(c,h);let y=[];y=y.concat(Fs(f)),y=y.concat(Fs(g));const v={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[h,f,g].forEach(t=>{y=y.concat(((t,e)=>((t,e)=>e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}])(t,e.x).concat(((t,e)=>e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}])(t,e.y)))(t,v).filter(t=>Vs(t,a)&&Vs(t,c)))}),[{x:u.x,y:l.y},{x:l.x,y:u.y}].forEach(t=>{Vs(t,a)&&Vs(t,c)&&y.push(t)}),y.unshift(u),y.push(l),y=Xs(y);let b=((t,e,r,n,o,i,s)=>{const a=[],c=[e],u={},l={},p={};l[e.id]=0,p[e.id]=Ks(e,r,e);const d={};for(t.forEach(t=>{d[t.id]=t});c.length;){let h,f=1/0;if(c.forEach(t=>{p[t.id]<f&&(f=p[t.id],h=t)}),h===r){const t=[];return Zs(t,d,u,r.id),t}qs(c,h),a.push(h),Qs(t,h,n,o).forEach(t=>{if(-1!==a.indexOf(t))return;-1===c.indexOf(t)&&c.push(t);const n=p[h.id]+Ws(h,t);l[t.id]&&n>=l[t.id]||(u[t.id]=h.id,l[t.id]=n,p[t.id]=l[t.id]+Ks(t,r,e,i,s))})}return[e,r]})(y,u,l,i,s,t,e);return b.unshift(t),b.push(e),b.length>2&&(b=ea(b)),Xs(b)},na=t=>{let e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){let r=t[0],n=t[1],o=Bi(r.x,r.y,n.x,n.y);for(let e=1;e<t.length-1;e++){const i=t[e],s=t[e+1],a=Bi(i.x,i.y,s.x,s.y);a>o&&(o=a,r=i,n=s)}e=[r,n]}return e},oa=(t,e,r)=>{const n=Xi(t,r),o=Xi(e,r);return n&&o},ia=(t,e,r)=>{const n=Xi(t,r),o=Xi(e,r);return!(n&&o)&&(n||o)},sa=(t,e,r)=>{let n,o;const i=Yi(r),s=Fs(i);for(let r=0;r<s.length;r++){$s(t,e,s[r],s[(r+1)%s.length])&&(o=[s[r],s[(r+1)%s.length]])}return o&&(n=((t,e,r,n)=>{const o=(e.y-t.y)*(n.x-r.x)-(t.x-e.x)*(r.y-n.y);if(0===o)return!1;const i=((e.x-t.x)*(n.x-r.x)*(r.y-t.y)+(e.y-t.y)*(n.x-r.x)*t.x-(n.y-r.y)*(e.x-t.x)*r.x)/o,s=-((e.y-t.y)*(n.y-r.y)*(r.x-t.x)+(e.x-t.x)*(n.y-r.y)*t.y-(n.x-r.x)*(e.y-t.y)*r.y)/o;return(i-t.x)*(i-e.x)<=0&&(s-t.y)*(s-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(s-r.y)*(s-n.y)<=0&&{x:i,y:s}})(t,e,o[0],o[1])),n},aa=(t,e)=>{let r;return t.x===e.x?r=ro.VERTICAL:t.y===e.y&&(r=ro.HORIZONTAL),r},ca=t=>{const e=t.split(" "),r=[];return e&&e.forEach(t=>{const[e,n]=t.split(",");r.push({x:Number(e),y:Number(n)})}),r},ua=(t,e,r,n)=>{const o=[];if(aa(t,r)===aa(e,n))t.y===r.y?(o.push({x:r.x,y:(r.y+n.y)/2}),o.push({x:n.x,y:(r.y+n.y)/2})):(o.push({x:(r.x+n.x)/2,y:r.y}),o.push({x:(r.x+n.x)/2,y:n.y}));else{let i={x:r.x,y:n.y};const s=Ti(i,t,r),a=Ti(i,e,n);if(s||a)i={x:n.x,y:r.y};else{const o=la(i,t,r),s=la(i,e,n);o&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},la=(t,e,r)=>t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y,pa=t=>{if(!t)return 0;let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e};const da=t=>{let{start:e,end:r,sourceNode:n,targetNode:o,offset:i}=t;const s=Yi(n),a=Yi(o),c=Hs(s,i),u=Hs(a,i);return{sNext:Ys(c,e),ePre:Ys(u,r)}},ha=t=>{const e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[fa(e[0]),fa(e[1]),fa(e[2]),fa(e[3])]},fa=t=>{const[e,r]=t.replace(/(^\s*)/g,"").split(" ");return{x:+e,y:+r}},ga=(t,e)=>{const{x:r,y:n}=t,o=ca(e);let i,s=Number.MAX_SAFE_INTEGER;const a=[];for(let t=0;t<o.length;t++)a.push({start:o[t],end:o[(t+1)%o.length]});if(a.forEach(t=>{const{start:e,end:o}=t;if(e.x===o.x){const t={x:e.x,y:n};if(Ti(t,e,o)){const n=Math.abs(e.x-r);n<s&&(s=n,i=t)}}else if(e.y===o.y){const t={x:r,y:e.y};if(Ti(t,e,o)){const r=Math.abs(e.y-n);r<s&&(s=r,i=t)}}}),!i){const{start:t,end:e}=a[0];i={x:t.x+(e.x-t.x)/2,y:t.y+(e.y-t.y)/2}}return i},ya=t=>Fn(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"]),va=(t,e)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);var ba=function(){};function ma(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Oa=window.document;function _a(t){let{onDragStart:e=ba,onDraging:r=ba,onDragEnd:n=ba,step:o=1,isStopPropagation:i=!0}=t,s=!1,a=!1,c=0,u=0,l=0,p=0;function d(t){if(i&&t.stopPropagation(),a&&(s=!0,l+=t.clientX-c,p+=t.clientY-u,c=t.clientX,u=t.clientY,Math.abs(l)>o||Math.abs(p)>o)){const e=l%o,n=p%o,i=l-e,s=p-n;l=e,p=n,r({deltaX:i,deltaY:s,event:t})}}function h(t){if(i&&t.stopPropagation(),a=!1,Oa.removeEventListener("mousemove",d,!1),Oa.removeEventListener("mouseup",h,!1),s)return s=!1,n({event:t})}return function(t){if(0===t.button)return i&&t.stopPropagation(),a=!0,c=t.clientX,u=t.clientY,Oa.addEventListener("mousemove",d,!1),Oa.addEventListener("mouseup",h,!1),e({event:t})}}class xa{constructor(t){let{onDragStart:e=ba,onDraging:r=ba,onDragEnd:n=ba,eventType:o="",eventCenter:i=null,step:s=1,isStopPropagation:a=!0,model:c=null}=t;ma(this,"onDragStart",void 0),ma(this,"onDraging",void 0),ma(this,"onDragEnd",void 0),ma(this,"step",void 0),ma(this,"isStopPropagation",void 0),ma(this,"isDraging",!1),ma(this,"isStartDraging",!1),ma(this,"startX",0),ma(this,"startY",0),ma(this,"sumDeltaX",0),ma(this,"sumDeltaY",0),ma(this,"eventType",void 0),ma(this,"eventCenter",void 0),ma(this,"model",void 0),ma(this,"startTime",void 0),ma(this,"isGrag",void 0),ma(this,"handleMouseDown",t=>{var e,r,n;if(0!==t.button)return;this.isStopPropagation&&t.stopPropagation(),this.isStartDraging=!0,this.startX=t.clientX,this.startY=t.clientY,Oa.addEventListener("mousemove",this.handleMouseMove,!1),Oa.addEventListener("mouseup",this.handleMouseUp,!1),this.onDragStart({event:t});const o=null===(e=this.model)||void 0===e?void 0:e.getData();null===(r=this.eventCenter)||void 0===r||r.emit(eo["".concat(this.eventType,"_MOUSEDOWN")],{e:t,data:o}),null===(n=this.eventCenter)||void 0===n||n.emit(eo["".concat(this.eventType,"_DRAGSTART")],{e:t,data:o}),this.startTime=(new Date).getTime()}),ma(this,"handleMouseMove",t=>{if(this.isStopPropagation&&t.stopPropagation(),this.isStartDraging&&(this.isDraging=!0,this.sumDeltaX+=t.clientX-this.startX,this.sumDeltaY+=t.clientY-this.startY,this.startX=t.clientX,this.startY=t.clientY,Math.abs(this.sumDeltaX)>this.step||Math.abs(this.sumDeltaY)>this.step)){var e,r,n;const o=this.sumDeltaX%this.step,i=this.sumDeltaY%this.step,s=this.sumDeltaX-o,a=this.sumDeltaY-i;this.sumDeltaX=o,this.sumDeltaY=i,this.onDraging({deltaX:s,deltaY:a,event:t});const c=null===(e=this.model)||void 0===e?void 0:e.getData();null===(r=this.eventCenter)||void 0===r||r.emit(eo["".concat(this.eventType,"_MOUSEMOVE")],{e:t,data:c}),null===(n=this.eventCenter)||void 0===n||n.emit(eo["".concat(this.eventType,"_DRAG")],{e:t,data:c})}}),ma(this,"handleMouseUp",t=>{var e,r,n;if(this.isStartDraging=!1,this.isStopPropagation&&t.stopPropagation(),Oa.removeEventListener("mousemove",this.handleMouseMove,!1),Oa.removeEventListener("mouseup",this.handleMouseUp,!1),!this.isDraging)return;this.isDraging=!1,this.onDragEnd({event:t});const o=null===(e=this.model)||void 0===e?void 0:e.getData();null===(r=this.eventCenter)||void 0===r||r.emit(eo["".concat(this.eventType,"_MOUSEUP")],{e:t,data:o}),null===(n=this.eventCenter)||void 0===n||n.emit(eo["".concat(this.eventType,"_DROP")],{e:t,data:o})}),this.onDragStart=e,this.onDraging=r,this.onDragEnd=n,this.step=s,this.isStopPropagation=a,this.eventType=o,this.eventCenter=i,this.model=c}setStep(t){this.step=t}}var Ea,wa,ja,Pa,Sa,Da,Ma,Aa,Na,Ta,Ca,ka,Ia;function La(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ra(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?La(Object(r),!0).forEach((function(e){Ba(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):La(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function za(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Ba(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xa(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let Ha=(wa=Xa((Ea=class{constructor(t){Ba(this,"rootEl",void 0),za(this,"width",wa,this),za(this,"height",ja,this),Ba(this,"theme",void 0),Ba(this,"eventCenter",void 0),Ba(this,"modelMap",new Map),Ba(this,"topElement",void 0),Ba(this,"idGenerator",void 0),Ba(this,"nodeMoveRules",[]),za(this,"edgeType",Pa,this),za(this,"nodes",Sa,this),za(this,"edges",Da,this),za(this,"overlapMode",Ma,this),za(this,"background",Aa,this),za(this,"transformModel",Na,this),za(this,"editConfigModel",Ta,this),za(this,"gridSize",Ca,this),za(this,"partial",ka,this),za(this,"fakerNode",Ia,this);const{container:e,background:r={},grid:n,width:o,height:i,idGenerator:s}=t;this.background=r,"object"==typeof n&&(this.gridSize=n.size),this.rootEl=e,this.editConfigModel=new no(t),this.eventCenter=new yi,this.transformModel=new vo(this.eventCenter),this.theme=gi(t.style),this.edgeType=t.edgeType||"polyline",this.width=o,this.height=i,this.partial=t.partial,this.overlapMode=t.overlapMode||0,this.idGenerator=s}get nodesMap(){return this.nodes.reduce((t,e,r)=>(t[e.id]={index:r,model:e},t),{})}get edgesMap(){return this.edges.reduce((t,e,r)=>(t[e.id]={index:r,model:e},t),{})}get sortElements(){let t=[];this.nodes.forEach(e=>t.push(e)),this.edges.forEach(e=>t.push(e)),t=t.sort((t,e)=>t.zIndex-e.zIndex);const e=[];let r=-1;const n=[-200,-200],o=[this.width+200,this.height+200];for(let i=0;i<t.length;i++){const s=t[i];this.partial&&!this.isElementInArea(s,n,o,!1)||(9999===s.zIndex&&(r=e.length),e.push(s))}if(-1!==r){const t=e[e.length-1];e[e.length-1]=e[r],e[r]=t}return e}get textEditElement(){const t=this.nodes.find(t=>t.state===$n.TEXT_EDIT),e=this.edges.find(t=>t.state===$n.TEXT_EDIT);return t||e}get selectElements(){const t=new Map;return this.nodes.forEach(e=>{e.isSelected&&t.set(e.id,e)}),this.edges.forEach(e=>{e.isSelected&&t.set(e.id,e)}),t}getAreaElement(t,e){const r=[],n=[];this.nodes.forEach(t=>n.push(t)),this.edges.forEach(t=>n.push(t));for(let o=0;o<n.length;o++){const i=n[o];this.isElementInArea(i,t,e)&&r.push(i)}return r}getModel(t){return this.modelMap.get(t)}getNodeModelById(t){var e;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}getPointByClient(t){let{x:e,y:r}=t;const n=this.rootEl.getBoundingClientRect(),o={x:e-n.left,y:r-n.top},[i,s]=this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]);return{domOverlayPosition:o,canvasOverlayPosition:{x:i,y:s}}}isElementInArea(t,e,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.BaseType===to.NODE){t=t;const{minX:n,minY:o,maxX:i,maxY:s}=Yi(t),a=[{x:n,y:o},{x:i,y:o},{x:i,y:s},{x:n,y:s}];let c=!0;for(let t=0;t<a.length;t++){let{x:n,y:o}=a[t];if([n,o]=this.transformModel.CanvasPointToHtmlPoint([n,o]),!mi([n,o],e,r)){c=!1;break}}return c}if(t.BaseType===to.EDGE){t=t;const{startPoint:o,endPoint:i}=t,s=this.transformModel.CanvasPointToHtmlPoint([o.x,o.y]),a=this.transformModel.CanvasPointToHtmlPoint([i.x,i.y]),c=mi(s,e,r),u=mi(a,e,r);return n?c&&u:c||u}return!1}graphDataToModel(t){this.nodes=nn(t.nodes,t=>{const e=this.getModel(t.type);if(!e)throw new Error("找不到".concat(t.type,"对应的节点。"));const{x:r,y:n}=t;return r&&n&&(t.x=vi(r,this.gridSize),t.y=vi(n,this.gridSize),"object"==typeof t.text&&(t.text.x-=bi(r,this.gridSize),t.text.y-=bi(n,this.gridSize))),new e(t,this)}),this.edges=nn(t.edges,t=>{const e=this.getModel(t.type);if(!e)throw new Error("找不到".concat(t.type,"对应的边。"));return new e(t,this)})}modelToGraphData(){const t=this.edges.map(t=>t.getData());return{nodes:this.nodes.map(t=>t.getData()),edges:t}}modelToHistoryData(){let t=!1;const e=[];for(let r=0;r<this.nodes.length;r++){const n=this.nodes[r];if(n.isDragging){t=!0;break}e.push(n.getData())}if(t)return!1;let r=!1;const n=[];for(let t=0;t<this.edges.length;t++){const e=this.edges[t];if(e.isDragging){r=!0;break}n.push(e.getData())}return!r&&{nodes:e,edges:n}}getEdgeModelById(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}getElement(t){const e=this.getNodeModelById(t);if(e)return e;return this.getEdgeModelById(t)}getNodeEdges(t){const e=[];for(let r=0;r<this.edges.length;r++){const n=this.edges[r],o=this.edges[r].sourceNodeId===t,i=this.edges[r].targetNodeId===t;(o||i)&&e.push(n)}return e}getSelectElements(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const e=this.selectElements,r={nodes:[],edges:[]};return e.forEach(n=>{if(n.BaseType===to.NODE&&r.nodes.push(n.getData()),n.BaseType===to.EDGE){const o=n.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&r.edges.push(o)}}),r}updateAttributes(t,e){this.getElement(t).updateAttributes(e)}changeNodeId(t,e){return e||(e=Ai()),this.nodesMap[e]?(console.warn("当前流程图已存在节点".concat(e,", 修改失败")),""):this.nodesMap[t]?(this.edges.forEach(r=>{r.sourceNodeId===t&&(r.sourceNodeId=e),r.targetNodeId===t&&(r.targetNodeId=e)}),this.nodesMap[t].model.id=e,e):(console.warn("当前流程图找不到节点".concat(e,", 修改失败")),"")}changeEdgeId(t,e){return e||(e=Ai()),this.edgesMap[e]?(console.warn("当前流程图已存在边: ".concat(e,", 修改失败")),""):this.edgesMap[t]?(this.edges.forEach(r=>{r.id===t&&(r.id=e)}),e):(console.warn("当前流程图找不到边: ".concat(e,", 修改失败")),"")}setFakerNode(t){this.fakerNode=t}removeFakerNode(){this.fakerNode=null}setModel(t,e){return this.modelMap.set(t,e)}toFront(t){var e,r;const n=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);if(n){var o;if(this.overlapMode===oo.DEFAULT)null===(o=this.topElement)||void 0===o||o.setZIndex(),n.setZIndex(9999),this.topElement=n;this.overlapMode===oo.INCREASE&&this.setElementZIndex(t,"top")}}setElementZIndex(t,e){var r,n;const o=(null===(r=this.nodesMap[t])||void 0===r?void 0:r.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);if(o){let t;"number"==typeof e&&(t=e),"top"===e&&(t=es()),"bottom"===e&&(t=--ts),o.setZIndex(t)}}deleteNode(t){const e=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(eo.NODE_DELETE,{data:e})}addNode(t){const e=Ji(t);e.id&&this.nodesMap[t.id]&&delete e.id;const r=this.getModel(e.type);if(!r)throw new Error("找不到".concat(e.type,"对应的节点,请确认是否已注册此类型节点。"));const n=new r(e,this);this.nodes.push(n);const o=n.getData();return this.eventCenter.emit(eo.NODE_ADD,{data:o}),n}cloneNode(t){const e=this.getNodeModelById(t),r=e.getData();r.x+=30,r.y+=30,delete r.id,r.text&&(r.text.x+=30,r.text.y+=30);const n=this.addNode(r);return n.setSelected(!0),e.setSelected(!1),n.getData()}moveNode(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this.nodesMap[t];if(!o)return void console.warn("不存在id为".concat(t,"的节点"));o.model.move(e,r,n),this.moveEdge(t,e,r)}moveNode2Coordinate(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=this.nodesMap[t];if(!o)return void console.warn("不存在id为".concat(t,"的节点"));const i=o.model,{x:s,y:a}=i,c=e-s,u=r-a;this.moveNode(t,c,u,n)}editText(t){this.setElementStateById(t,$n.TEXT_EDIT)}addEdge(t){const e=Ji(t);let{type:r}=e;r||(r=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;const n=this.getModel(r);if(!n)throw new Error("找不到".concat(r,"对应的边,请确认是否已注册此类型边。"));const o=new n(Ra(Ra({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(eo.EDGE_ADD,{data:i}),o}moveEdge(t,e,r){for(let o=0;o<this.edges.length;o++){const i=this.edges[o],{x:s,y:a}=i.textPosition,c=this.edges[o].sourceNodeId===t,u=this.edges[o].targetNodeId===t;var n;if(c&&i.updateStartPoint({x:i.startPoint.x+e,y:i.startPoint.y+r}),u&&i.updateEndPoint({x:i.endPoint.x+e,y:i.endPoint.y+r}),c||u)if(!0===i.customTextPosition)i.resetTextPosition();else if(i.modelType===Qn.POLYLINE_EDGE&&null!==(n=i.text)&&void 0!==n&&n.value){const t=i.text,e=ga(t,i.points);i.moveText(e.x-t.x,e.y-t.y)}else{const{x:t,y:e}=i.textPosition;i.moveText(t-s,e-a)}}}deleteEdgeBySourceAndTarget(t,e){for(let r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===t&&this.edges[r].targetNodeId===e){const t=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(eo.EDGE_DELETE,{data:t})}}deleteEdgeById(t){const e=this.edgesMap[t].index;if(!this.edgesMap[t])return;const r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(eo.EDGE_DELETE,{data:r})}deleteEdgeBySource(t){for(let e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){const t=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(eo.EDGE_DELETE,{data:t})}}deleteEdgeByTarget(t){for(let e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){const t=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(eo.EDGE_DELETE,{data:t})}}setElementStateById(t,e,r){this.nodes.forEach(n=>{n.id===t?n.setElementState(e,r):n.setElementState($n.DEFAULT)}),this.edges.forEach(n=>{n.id===t?n.setElementState(e,r):n.setElementState($n.DEFAULT)})}updateText(t,e){this.nodes.forEach(r=>{r.id===t&&r.updateText(e)}),this.edges.forEach(r=>{r.id===t&&r.updateText(e)})}selectNodeById(t){var e;arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.clearSelectElements();const r=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}selectEdgeById(t){var e;arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.clearSelectElements();const r=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}selectElementById(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.clearSelectElements();const e=this.getElement(t);null==e||e.setSelected(!0)}clearSelectElements(){var t;(this.selectElements.forEach(t=>{null==t||t.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===oo.DEFAULT)&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}moveNodes(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.forEach(t=>this.moveNode(t,e,r,n))}addNodeMoveRules(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}setDefaultEdgeType(t){this.edgeType=t}changeNodeType(t,e){const r=this.getNodeModelById(t);if(!r)return void console.warn("找不到id为".concat(t,"的节点"));const n=r.getData();n.type=e;const o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));const i=new o(n,this);this.nodes.splice(this.nodesMap[t].index,1,i);this.getNodeEdges(t).forEach(e=>{if(e.sourceNodeId===t){const t=Ki(i,e.startPoint,i.width,i.height);e.updateStartPoint(t)}if(e.targetNodeId===t){const t=Ki(i,e.endPoint,i.width,i.height);e.updateEndPoint(t)}})}changeEdgeType(t,e){const r=this.getEdgeModelById(t);if(!r)return void console.warn("找不到id为".concat(t,"的边"));if(r.type===e)return;const n=r.getData();n.type=e;const o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete n.pointsList;const i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}setTheme(t){this.theme=gi(Ra(Ra({},this.theme),t))}resize(t,e){this.width=t,this.height=e}clearData(){this.nodes=[],this.edges=[]}}).prototype,"width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ja=Xa(Ea.prototype,"height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Pa=Xa(Ea.prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Sa=Xa(Ea.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Da=Xa(Ea.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ma=Xa(Ea.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return oo.DEFAULT}}),Aa=Xa(Ea.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Na=Xa(Ea.prototype,"transformModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ta=Xa(Ea.prototype,"editConfigModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ca=Xa(Ea.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ka=Xa(Ea.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ia=Xa(Ea.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xa(Ea.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(Ea.prototype,"nodesMap"),Ea.prototype),Xa(Ea.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(Ea.prototype,"edgesMap"),Ea.prototype),Xa(Ea.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(Ea.prototype,"sortElements"),Ea.prototype),Xa(Ea.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(Ea.prototype,"textEditElement"),Ea.prototype),Xa(Ea.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(Ea.prototype,"selectElements"),Ea.prototype),Xa(Ea.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"setFakerNode"),Ea.prototype),Xa(Ea.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"removeFakerNode"),Ea.prototype),Xa(Ea.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"setModel"),Ea.prototype),Xa(Ea.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"toFront"),Ea.prototype),Xa(Ea.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"setElementZIndex"),Ea.prototype),Xa(Ea.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"deleteNode"),Ea.prototype),Xa(Ea.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"addNode"),Ea.prototype),Xa(Ea.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"cloneNode"),Ea.prototype),Xa(Ea.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"moveNode"),Ea.prototype),Xa(Ea.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"moveNode2Coordinate"),Ea.prototype),Xa(Ea.prototype,"editText",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"editText"),Ea.prototype),Xa(Ea.prototype,"addEdge",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"addEdge"),Ea.prototype),Xa(Ea.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"moveEdge"),Ea.prototype),Xa(Ea.prototype,"deleteEdgeBySourceAndTarget",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"deleteEdgeBySourceAndTarget"),Ea.prototype),Xa(Ea.prototype,"deleteEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"deleteEdgeById"),Ea.prototype),Xa(Ea.prototype,"deleteEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"deleteEdgeBySource"),Ea.prototype),Xa(Ea.prototype,"deleteEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"deleteEdgeByTarget"),Ea.prototype),Xa(Ea.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"setElementStateById"),Ea.prototype),Xa(Ea.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"updateText"),Ea.prototype),Xa(Ea.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"selectNodeById"),Ea.prototype),Xa(Ea.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"selectEdgeById"),Ea.prototype),Xa(Ea.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"selectElementById"),Ea.prototype),Xa(Ea.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"clearSelectElements"),Ea.prototype),Xa(Ea.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"moveNodes"),Ea.prototype),Xa(Ea.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"setDefaultEdgeType"),Ea.prototype),Xa(Ea.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"changeNodeType"),Ea.prototype),Xa(Ea.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"changeEdgeType"),Ea.prototype),Xa(Ea.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"setTheme"),Ea.prototype),Xa(Ea.prototype,"resize",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"resize"),Ea.prototype),Xa(Ea.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(Ea.prototype,"clearData"),Ea.prototype),Ea);var Ya,Ga=Ha;function Ua(){return(Ua=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Fa(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Va,Wa=id(Ya=class extends Q.a{constructor(t){super(),Fa(this,"stepDrag",void 0),Fa(this,"stepScrollX",0),Fa(this,"stepScrollY",0),Fa(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;this.setState({isDraging:!0});const{graphModel:{transformModel:n,editConfigModel:o}}=this.props;o.stopMoveGraph||n.translate(e,r)}),Fa(this,"onDragEnd",()=>{this.setState({isDraging:!1})}),Fa(this,"zoomHandler",t=>{const{graphModel:{editConfigModel:e,transformModel:r,gridSize:n},graphModel:o}=this.props,{deltaX:i,deltaY:s}=t;if(e.stopScrollGraph||!0===t.ctrlKey){if(!e.stopZoomGraph){t.preventDefault();const e=o.getPointByClient({x:t.clientX,y:t.clientY}),{x:n,y:i}=e.canvasOverlayPosition;r.zoom(t.deltaY<0,[n,i])}}else{if(t.preventDefault(),this.stepScrollX+=i,this.stepScrollY+=s,Math.abs(this.stepScrollX)>=n){const t=this.stepScrollX%n,e=this.stepScrollX-t;r.translate(-e*r.SCALE_X,0),this.stepScrollX=t}if(Math.abs(this.stepScrollY)>=n){const t=this.stepScrollY%n,e=this.stepScrollY-t;r.translate(0,-e*r.SCALE_Y),this.stepScrollY=t}}}),Fa(this,"clickHandler",t=>{if("canvas-overlay"===t.target.getAttribute("name")){const{graphModel:e}=this.props,{textEditElement:r,selectElements:n}=e;n.size>0&&e.clearSelectElements(),r&&r.setElementState($n.DEFAULT),e.eventCenter.emit(eo.BLANK_CLICK,{e:t})}}),Fa(this,"handleContextMenu",t=>{if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();const{graphModel:e}=this.props,r=e.getPointByClient({x:t.clientX,y:t.clientY});e.eventCenter.emit(eo.BLANK_CONTEXTMENU,{e:t,position:r})}}),Fa(this,"mouseDownHandler",t=>{const{graphModel:{eventCenter:e,editConfigModel:r,transformModel:{SCALE_X:n},gridSize:o}}=this.props;r.stopMoveGraph?e.emit(eo.BLANK_MOUSEDOWN,{e:t}):(this.stepDrag.setStep(o*n),this.stepDrag.handleMouseDown(t)),this.clickHandler(t)});const{graphModel:{gridSize:e,eventCenter:r}}=t;this.stepDrag=new xa({onDraging:this.onDraging,onDragEnd:this.onDragEnd,step:e,eventType:"BLANK",eventCenter:r,model:null}),this.state={isDraging:!1}}render(){const{graphModel:{transformModel:t}}=this.props,{transform:e}=t.getTransformStyle(),{children:r,dnd:n}=this.props,{isDraging:o}=this.state;return Object(Q.g)("svg",Ua({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:o?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},n.eventMap()),Object(Q.g)("g",{transform:e},r))}})||Ya;let Ka=id(Va=class extends Q.a{constructor(){var t,e,r;super(...arguments),r=t=>{const{tool:e}=this.props,r=e.getInstance();r.components.forEach(e=>e(r,t)),r.components=[]},(e="setToolOverlayRef")in(t=this)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}getTools(){const{tool:t,graphModel:e}=this.props,r=t.getTools().map(r=>Object(Q.g)(r,{graphModel:e,logicFlow:t.instance}));return t.components=r,r}render(){return Object(Q.g)("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}})||Va;class Za extends Q.a{render(){const{background:t}=this.props;return Object(Q.g)("div",{className:"lf-background"},Object(Q.g)("div",{style:t,className:"lf-background-area"}))}}var qa;let $a=id(qa=class extends Q.a{constructor(){var t,e,r;super(...arguments),t=this,e="id",r=Ai(),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}renderDot(){const{config:{color:t,thickness:e=2},size:r,visible:n}=this.props,o=Math.min(Math.max(2,e),r/2);let i=1;return n||(i=0),Object(Q.g)("rect",{width:o,height:o,rx:o/2,ry:o/2,fill:t,opacity:i})}renderMesh(){const{config:{color:t,thickness:e=1},size:r,visible:n}=this.props,o=Math.min(Math.max(1,e),r/2),i="M ".concat(r," 0 H0 M0 0 V0 ").concat(r);let s=1;return n||(s=0),Object(Q.g)("path",{d:i,stroke:t,strokeWidth:o,opacity:s})}render(){const{type:t,size:e,graphModel:{transformModel:r}}=this.props,{SCALE_X:n,SKEW_Y:o,SKEW_X:i,SCALE_Y:s,TRANSLATE_X:a,TRANSLATE_Y:c}=r,u=[n,o,i,s,a,c].join(","),l="matrix(".concat(u,")");return Object(Q.g)("div",{className:"lf-grid"},Object(Q.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(Q.g)("defs",null,Object(Q.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:l,x:"0",y:"0",width:e,height:e},"dot"===t&&this.renderDot(),"mesh"===t&&this.renderMesh())),Object(Q.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}})||qa;$a.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};var Ja,Qa=function(t){const e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach(t=>{let[r,n]=t;"object"!==typeof n&&(e[r]=n)}),Object(Q.g)("line",e)};function tc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ec(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tc(Object(r),!0).forEach((function(e){rc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function rc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let nc=id(Ja=class extends Q.a{render(){const{snaplineModel:t}=this.props,{position:e,isShowHorizontal:r,isShowVertical:n}=t,o=t.getStyle(),{x:i=0,y:s=0}=e,a=ec(ec({x1:-1e5,y1:s,x2:1e5,y2:s},o),{},{stroke:r?o.stroke:"none"}),c=ec(ec({x1:i,y1:-1e5,x2:i,y2:1e5},o),{},{stroke:n?o.stroke:"none"});return Object(Q.g)("g",{className:"lf-snapline"},Object(Q.g)(Qa,a),Object(Q.g)(Qa,c))}})||Ja;function oc(t){const{x:e,y:r,width:n,height:o,className:i,radius:s}=t,a=e-n/2,c=r-o/2,u={};return Object.entries(t).forEach(t=>{let[e,r]=t;"object"!==typeof r&&(u[e]=r)}),i&&(u.className="lf-basic-shape ".concat(i)),s&&(u.rx=s,u.ry=s),u.x=a,u.y=c,Object(Q.g)("rect",u)}var ic;function sc(){return(sc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function ac(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function cc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ac(Object(r),!0).forEach((function(e){uc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ac(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function uc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}oc.defaultProps={className:"",radius:""};let lc=id(ic=class extends Q.a{getNodesOutline(){const{graphModel:t}=this.props,{nodes:e,editConfigModel:{hoverOutline:r,nodeSelectedOutline:n}}=t,o=[];return e.forEach(t=>{if(t.isHovered||t.isSelected){const{isHovered:e,isSelected:i,x:s,y:a,width:c,height:u}=t;if(n&&i||r&&e){const r=t.getOutlineStyle();let n={};if(Object.keys(r).forEach(t=>{"hover"!==t&&(n[t]=r[t])}),e){const t=r.hover;n=cc(cc({},n),t)}o.push(Object(Q.g)(oc,sc({className:"lf-outline-node",x:s,y:a,width:c+10,height:u+10},n)))}}}),o}getEdgeOutline(){const{graphModel:{edges:t,editConfigModel:{edgeSelectedOutline:e,hoverOutline:r}}}=this.props,n=[];for(let o=0;o<t.length;o++){const i=t[o];(e&&i.isSelected||r&&i.isHovered)&&(i.modelType===Qn.LINE_EDGE?n.push(this.getLineOutline(i)):i.modelType===Qn.POLYLINE_EDGE?n.push(this.getPolylineOutline(i)):i.modelType===Qn.BEZIER_EDGE&&n.push(this.getBezierOutline(i)))}return n}getLineOutline(t){const{startPoint:e,endPoint:r}=t,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,s=Math.abs(e.y-r.y)+10,a=t.getOutlineStyle();return Object(Q.g)(oc,sc({className:"lf-outline-edge",x:n,y:o,width:i,height:s},a))}getPolylineOutline(t){const{points:e}=t,r=ca(e),n=Us(r,8),{x:o,y:i,width:s,height:a}=n,c=t.getOutlineStyle();return Object(Q.g)(oc,sc({className:"lf-outline",x:o,y:i,width:s,height:a},c))}getBezierOutline(t){const{path:e}=t,r=ha(e),n=Us(r,8),{x:o,y:i,width:s,height:a}=n,c=t.getOutlineStyle();return Object(Q.g)(oc,sc({className:"lf-outline",x:o,y:i,width:s,height:a},c))}render(){return Object(Q.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}})||ic;function pc(t){const{x:e=0,y:r=0,r:n=4}=t,o={cx:e,cy:r,r:n,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape"};return Object.entries(t).forEach(t=>{let[e,r]=t;"object"!==typeof r&&(o[e]=r)}),Object(Q.g)("circle",o)}var dc;function hc(){return(hc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function fc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class gc extends Q.a{constructor(t){super(),fc(this,"dragHandler",void 0),fc(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;const{graphModel:n,bezierModel:o,type:i}=this.props,{transformModel:s}=n,{endX:a,endY:c}=this.state,[u,l]=s.moveCanvasPointByHtml([a,c],e,r);this.setState({endX:u,endY:l}),o.updateAdjustAnchor({x:u,y:l},i)}),fc(this,"onDragEnd",()=>{const{endX:t,endY:e}=this.state,{bezierModel:r,type:n}=this.props;r.updateAdjustAnchor({x:t,y:e},n),r.isDragging=!1}),this.dragHandler=_a({onDraging:this.onDraging,onDragEnd:this.onDragEnd});const{position:e}=t;this.state={endX:e.x,endY:e.y}}render(){const{position:t}=this.props,{x:e,y:r}=t,{bezierModel:n}=this.props,{adjustAnchor:o}=n.getEdgeStyle();return Object(Q.g)(pc,hc({className:"lf-bezier-adjust-anchor",x:e,y:r},o,{onMouseDown:this.dragHandler}))}}let yc=id(dc=class extends Q.a{getBezierAdjust(t,e){const{path:r,id:n}=t,o=ha(r),[i,s,a,c]=o,{adjustLine:u}=t.getEdgeStyle(),l=[];return l.push(Object(Q.g)(Qa,hc({x1:i.x,y1:i.y,x2:s.x,y2:s.y},u))),l.push(Object(Q.g)(gc,{position:s,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(Q.g)(Qa,hc({x1:c.x,y1:c.y,x2:a.x,y2:a.y},u))),l.push(Object(Q.g)(gc,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_sNext"),type:"ePre"})),l}selectedBezierEdge(){const{graphModel:t}=this.props,e=t.edges,r=[];for(let n=0;n<e.length;n++){const o=e[n];o.isSelected&&o.modelType===Qn.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}render(){return Object(Q.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}})||dc;var vc;let bc=id(vc=class extends Q.a{render(){const{graphModel:{transformModel:t}}=this.props,{transform:e}=t.getTransformStyle(),{children:r}=this.props;return Object(Q.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(Q.g)("g",{transform:e},r))}})||vc;var mc;function Oc(){return(Oc=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var _c=id(mc=class extends Q.a{getComponent(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay";const{getView:n}=this.props,o=n(t.type);return Object(Q.g)(o,{key:t.id,model:t,graphModel:e,overlay:r})}render(){const{graphModel:t,tool:e,options:r,dnd:n,snaplineModel:o}=this.props,i={};t.width&&(i.width="".concat(t.width,"px")),t.height&&(i.height="".concat(t.height,"px"));const{fakerNode:s,editConfigModel:a}=t,{adjustEdge:c}=a;return Object(Q.g)("div",{className:"lf-graph",style:i},Object(Q.g)(Wa,{graphModel:t,dnd:n},Object(Q.g)("g",{className:"lf-base"},nn(t.sortElements,e=>this.getComponent(e,t))),s?this.getComponent(s,t):""),Object(Q.g)(bc,{graphModel:t},Object(Q.g)(lc,{graphModel:t}),c?Object(Q.g)(yc,{graphModel:t}):"",r.isSilentMode||!1===r.snapline?"":Object(Q.g)(nc,{snaplineModel:o})),Object(Q.g)(Ka,{graphModel:t,tool:e}),r.background&&Object(Q.g)(Za,{background:r.background}),r.grid&&Object(Q.g)($a,Oc({},r.grid,{graphModel:t})))}})||mc;function xc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ec(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xc(Object(r),!0).forEach((function(e){wc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class jc{constructor(t){wc(this,"nodeConfig",void 0),wc(this,"lf",void 0),wc(this,"fakerNode",void 0),wc(this,"stopDrag",()=>{this.nodeConfig=null,window.document.removeEventListener("mouseup",this.stopDrag)}),wc(this,"dragEnter",t=>{this.nodeConfig&&!this.fakerNode&&(this.fakerNode=this.lf.createFakerNode(Ec(Ec({},this.nodeConfig),this.clientToLocalPoint({x:t.clientX,y:t.clientY}))))}),wc(this,"onDragOver",t=>{if(t.preventDefault(),this.fakerNode){const{x:e,y:r}=this.clientToLocalPoint({x:t.clientX,y:t.clientY});this.fakerNode.moveTo(e,r);const n=this.fakerNode.getData();this.lf.setNodeSnapLine(n),this.lf.graphModel.eventCenter.emit(eo.NODE_DND_DRAG,{data:n})}return!1}),wc(this,"onDragLeave",()=>{this.fakerNode&&(this.lf.removeNodeSnapLine(),this.lf.graphModel.removeFakerNode(),this.fakerNode=null)}),wc(this,"onDrop",t=>{if(!this.lf.graphModel||!t||!this.nodeConfig)return;const e=this.lf.addNode(Ec(Ec({},this.nodeConfig),this.clientToLocalPoint({x:t.clientX,y:t.clientY})));t.preventDefault(),t.stopPropagation(),this.nodeConfig=null,this.lf.removeNodeSnapLine(),this.lf.graphModel.removeFakerNode(),this.fakerNode=null;const r=e.getData();this.lf.graphModel.eventCenter.emit(eo.NODE_DND_ADD,{data:r})});const{lf:e}=t;this.lf=e}clientToLocalPoint(t){let{x:e,y:r}=t;const n=Ur(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}),{x:i,y:s}=o.canvasOverlayPosition;return{x:vi(i,n),y:vi(s,n)}}startDrag(t){this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag)}eventMap(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}function Pc(t){const{container:e,grid:r}=t;if(!e)throw new Error("请检查 container 参数是否有效");return r&&(t.grid=_n({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),t.width||(t.width=e.getBoundingClientRect().width),t.height||(t.height=e.getBoundingClientRect().height),_n({},Sc,t)}const Sc={background:!1,grid:!1,textEdit:!0,disabledTools:[]};var Dc,Mc;function Ac(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ac(Object(r),!0).forEach((function(e){Tc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ac(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cc(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let kc=(Mc=Cc((Dc=class extends Ps{constructor(){super(...arguments),Tc(this,"modelType",Qn.BEZIER_EDGE),function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(this,"path",Mc,this)}initEdgeData(t){this.offset=100,super.initEdgeData(t)}getEdgeStyle(){const{bezier:t}=this.graphModel.theme;return Nc(Nc({},super.getEdgeStyle()),ti(t))}getTextPosition(){if(this.pointsList&&this.pointsList.length>0){let t=0,e=0;return this.pointsList.forEach(r=>{let{x:n,y:o}=r;t+=n,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}}getData(){const t=super.getData(),e=this.pointsList.map(t=>{let{x:e,y:r}=t;return{x:e,y:r}});return Nc(Nc({},t),{},{pointsList:e})}getControls(){const t=this.startPoint,e=this.endPoint;return da({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}getPath(t){const[e,r,n,o]=t;return"M ".concat(e.x," ").concat(e.y,"\n C ").concat(r.x," ").concat(r.y,",\n ").concat(n.x," ").concat(n.y,",\n ").concat(o.x," ").concat(o.y)}initPoints(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}updatePoints(){const t={x:this.startPoint.x,y:this.startPoint.y},e={x:this.endPoint.x,y:this.endPoint.y},{sNext:r,ePre:n}=this.getControls();this.pointsList=[t,r,n,e],this.path=this.getPath(this.pointsList)}updateStartPoint(t){this.startPoint=t,this.updatePoints()}updateEndPoint(t){this.endPoint=t,this.updatePoints()}updateAdjustAnchor(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))}getAdjustStart(){return this.pointsList[0]||this.startPoint}getAdjustEnd(){const{pointsList:t}=this;return t[t.length-1]||this.endPoint}updateAfterAdjustStartAndEnd(t){let{startPoint:e,endPoint:r,sourceNode:n,targetNode:o}=t;const{sNext:i,ePre:s}=da({start:e,end:r,sourceNode:n,targetNode:o,offset:this.offset});this.pointsList=[e,i,s,r],this.initPoints()}}).prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Cc(Dc.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"initPoints"),Dc.prototype),Cc(Dc.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"updatePoints"),Dc.prototype),Cc(Dc.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"updateStartPoint"),Dc.prototype),Cc(Dc.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"updateEndPoint"),Dc.prototype),Cc(Dc.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"updateAdjustAnchor"),Dc.prototype),Cc(Dc.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"getAdjustStart"),Dc.prototype),Cc(Dc.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"getAdjustEnd"),Dc.prototype),Cc(Dc.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Dc.prototype,"updateAfterAdjustStartAndEnd"),Dc.prototype),Dc);var Ic,Lc,Rc,zc,Bc,Xc,Hc,Yc,Gc,Uc,Fc,Vc,Wc,Kc,Zc,qc;function $c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$c(Object(r),!0).forEach((function(e){tu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qc(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function tu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let ru=(Lc=eu((Ic=class{get width(){return this._width}set width(t){this._width=t}get height(){return this._height}set height(t){this._height=t}constructor(t,e){tu(this,"id",Ai()),Qc(this,"type",Lc,this),Qc(this,"x",Rc,this),Qc(this,"y",zc,this),Qc(this,"text",Bc,this),Qc(this,"properties",Xc,this),Qc(this,"_width",Hc,this),Qc(this,"_height",Yc,this),Qc(this,"anchorsOffset",Gc,this),Qc(this,"isSelected",Uc,this),Qc(this,"isHovered",Fc,this),Qc(this,"isDragging",Vc,this),Qc(this,"isHitable",Wc,this),Qc(this,"draggable",Kc,this),tu(this,"graphModel",void 0),Qc(this,"zIndex",Zc,this),Qc(this,"state",qc,this),tu(this,"BaseType",to.NODE),tu(this,"modelType",Qn.NODE),tu(this,"additionStateData",void 0),tu(this,"targetRules",[]),tu(this,"sourceRules",[]),tu(this,"moveRules",[]),tu(this,"hasSetTargetRules",!1),tu(this,"hasSetSourceRules",!1),this.graphModel=e,this.initNodeData(t),this.setAttributes()}initNodeData(t){if(t.properties||(t.properties={}),!t.id){const{idGenerator:e}=this.graphModel,r=e&&e(t.type);r&&(t.id=r);const n=this.createId();n&&(t.id=n)}this.formatText(t),_n(this,(t=>Fn(t,["id","type","x","y","text","properties"]))(t));const{overlapMode:e}=this.graphModel;e===oo.INCREASE&&(this.zIndex=t.zIndex||es())}setAttributes(){}createId(){return null}formatText(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)}getData(){const{x:t,y:e,value:r}=this.text;let{properties:n}=this;Object(o.x)(n)&&(n=Object(o.I)(n));const i={id:this.id,type:this.type,x:this.x,y:this.y,properties:n};return this.graphModel.overlapMode===oo.INCREASE&&(i.zIndex=this.zIndex),r&&(i.text={x:t,y:e,value:r}),i}getProperties(){return Object(o.I)(this.properties)}getNodeStyle(){return Jc({},this.graphModel.theme.baseNode)}getTextStyle(){const{nodeText:t}=this.graphModel.theme;return ti(t)}getAnchorStyle(){const{anchor:t}=this.graphModel.theme;return ti(t)}getAnchorLineStyle(){const{anchorLine:t}=this.graphModel.theme;return ti(t)}getOutlineStyle(){const{outline:t}=this.graphModel.theme;return ti(t)}isAllowConnectedAsSource(t,e,r){const n=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;let o,i=!0;for(let s=0;s<n.length;s++){const a=n[s];if(!a.validate.call(this,this,t,e,r)){i=!1,o=a.message;break}}return{isAllPass:i,msg:o}}getConnectedSourceRules(){return this.sourceRules}isAllowConnectedAsTarget(t,e,r){const n=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;let o,i=!0;for(let s=0;s<n.length;s++){const a=n[s];if(!a.validate.call(this,t,this,e,r)){i=!1,o=a.message;break}}return{isAllPass:i,msg:o}}isAllowMoveNode(t,e){for(const r of this.moveRules)if(!r(this,t,e))return!1;for(const r of this.graphModel.nodeMoveRules)if(!r(this,t,e))return!1;return!0}getConnectedTargetRules(){return this.targetRules}getAnchorsByOffset(){const{anchorsOffset:t,id:e,x:r,y:n}=this;return t&&t.length>0?t.map((t,o)=>t.length?(t=t,{id:"".concat(e,"_").concat(o),x:r+t[0],y:n+t[1]}):Jc(Jc({},t=t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})):this.getDefaultAnchor()}getDefaultAnchor(){return[]}getBounds(){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}}get anchors(){return this.getAnchorsByOffset()}addNodeMoveRules(t){this.moveRules.includes(t)||this.moveRules.push(t)}move(t,e){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&!this.isAllowMoveNode(t,e))return;const r=this.x+t,n=this.y+e;this.x=r,this.y=n,this.text&&this.moveText(t,e)}moveTo(t,e){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=t-this.x,o=e-this.y;(r||this.isAllowMoveNode(n,o))&&(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e)}moveText(t,e){const{x:r,y:n,value:o,draggable:i,editable:s}=this.text;this.text={value:o,editable:s,draggable:i,x:r+t,y:n+e}}updateText(t){this.text=Jc(Jc({},this.text),{},{value:t})}setSelected(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}setHovered(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}setHitable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}setElementState(t,e){this.state=t,this.additionStateData=e}setProperty(t,e){this.properties=Jc(Jc({},this.properties),{},{[t]:Ji(e)}),this.setAttributes()}setProperties(t){this.properties=Jc(Jc({},this.properties),Ji(t)),this.setAttributes()}setZIndex(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}updateAttributes(t){_n(this,t)}}).prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Rc=eu(Ic.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),zc=eu(Ic.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Bc=eu(Ic.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Xc=eu(Ic.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Hc=eu(Ic.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Yc=eu(Ic.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Gc=eu(Ic.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Uc=eu(Ic.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fc=eu(Ic.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Vc=eu(Ic.prototype,"isDragging",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wc=eu(Ic.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Kc=eu(Ic.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Zc=eu(Ic.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),qc=eu(Ic.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),eu(Ic.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"addNodeMoveRules"),Ic.prototype),eu(Ic.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"move"),Ic.prototype),eu(Ic.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"moveTo"),Ic.prototype),eu(Ic.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"moveText"),Ic.prototype),eu(Ic.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"updateText"),Ic.prototype),eu(Ic.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"setSelected"),Ic.prototype),eu(Ic.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"setHovered"),Ic.prototype),eu(Ic.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"setHitable"),Ic.prototype),eu(Ic.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"setElementState"),Ic.prototype),eu(Ic.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"setProperty"),Ic.prototype),eu(Ic.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"setProperties"),Ic.prototype),eu(Ic.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"setZIndex"),Ic.prototype),eu(Ic.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(Ic.prototype,"updateAttributes"),Ic.prototype),Ic);var nu,ou;function iu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function su(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?iu(Object(r),!0).forEach((function(e){au(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function au(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let uu=(ou=cu((nu=class extends ru{constructor(){super(...arguments),au(this,"modelType",Qn.CIRCLE_NODE),function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(this,"r",ou,this)}get width(){return 2*this.r}get height(){return 2*this.r}getNodeStyle(){const t=super.getNodeStyle(),{graphModel:{theme:{circle:e}}}=this;return su(su({},t),ti(e))}getDefaultAnchor(){const{x:t,y:e,r:r}=this;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}).prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),cu(nu.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(nu.prototype,"width"),nu.prototype),cu(nu.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(nu.prototype,"height"),nu.prototype),nu);var lu,pu,du;function hu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?hu(Object(r),!0).forEach((function(e){yu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gu(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function yu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let bu=(pu=vu((lu=class extends ru{constructor(){super(...arguments),yu(this,"modelType",Qn.DIAMOND_NODE),gu(this,"rx",pu,this),gu(this,"ry",du,this)}getNodeStyle(){const t=super.getNodeStyle(),{graphModel:{theme:{diamond:e}}}=this;return fu(fu({},t),ti(e))}get points(){const{x:t,y:e,rx:r,ry:n}=this;return[[t,e-n],[t+r,e],[t,e+n],[t-r,e]]}get pointsPosition(){return this.points.map(t=>({x:t[0],y:t[1]}))}get width(){let t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach(r=>{let[n]=r;n<t&&(t=n),n>e&&(e=n)}),e-t}get height(){let t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach(r=>{let[,n]=r;n<t&&(t=n),n>e&&(e=n)}),e-t}getDefaultAnchor(){return this.points.map((t,e)=>{let[r,n]=t;return{x:r,y:n,id:"".concat(this.id,"_").concat(e)}})}}).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),du=vu(lu.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),vu(lu.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(lu.prototype,"points"),lu.prototype),vu(lu.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(lu.prototype,"pointsPosition"),lu.prototype),vu(lu.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(lu.prototype,"width"),lu.prototype),vu(lu.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(lu.prototype,"height"),lu.prototype),lu);var mu,Ou,_u;function xu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Eu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xu(Object(r),!0).forEach((function(e){ju(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wu(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ju(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let Su=(Ou=Pu((mu=class extends ru{constructor(){super(...arguments),ju(this,"modelType",Qn.ELLIPSE_NODE),wu(this,"rx",Ou,this),wu(this,"ry",_u,this)}getNodeStyle(){const t=super.getNodeStyle(),{graphModel:{theme:{ellipse:e}}}=this;return Eu(Eu({},t),ti(e))}get width(){return 2*this.rx}get height(){return 2*this.ry}getDefaultAnchor(){const{x:t,y:e,rx:r,ry:n}=this;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}).prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),_u=Pu(mu.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Pu(mu.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(mu.prototype,"width"),mu.prototype),Pu(mu.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(mu.prototype,"height"),mu.prototype),mu);var Du,Mu;function Au(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Au(Object(r),!0).forEach((function(e){Tu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let ku=(Mu=Cu((Du=class extends ru{constructor(){super(...arguments),Tu(this,"modelType",Qn.POLYGON_NODE),function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(this,"points",Mu,this)}getNodeStyle(){const t=super.getNodeStyle(),{graphModel:{theme:{polygon:e}}}=this;return Nu(Nu({},t),ti(e))}get pointsPosition(){const{x:t,y:e,width:r,height:n}=this;return this.points.map(o=>({x:o[0]+t-r/2,y:o[1]+e-n/2}))}get width(){let t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach(r=>{let[n]=r;n<t&&(t=n),n>e&&(e=n)}),e-t}get height(){let t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach(r=>{let[,n]=r;n<t&&(t=n),n>e&&(e=n)}),e-t}getDefaultAnchor(){const{x:t,y:e,width:r,height:n,points:o}=this;return o.map((o,i)=>{let[s,a]=o;return{x:t+s-r/2,y:e+a-n/2,id:"".concat(this.id,"_").concat(i)}})}}).prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Cu(Du.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Du.prototype,"pointsPosition"),Du.prototype),Cu(Du.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Du.prototype,"width"),Du.prototype),Cu(Du.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Du.prototype,"height"),Du.prototype),Du);var Iu,Lu;function Ru(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ru(Object(r),!0).forEach((function(e){Bu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ru(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let Xu=(Lu=function(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}((Iu=class extends ru{constructor(){super(...arguments),Bu(this,"modelType",Qn.RECT_NODE),function(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}(this,"radius",Lu,this)}getDefaultAnchor(){const{x:t,y:e,width:r,height:n}=this;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}getNodeStyle(){const t=super.getNodeStyle(),{rect:e}=this.graphModel.theme;return zu(zu({},t),ti(e))}}).prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Iu);var Hu;function Yu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yu(Object(r),!0).forEach((function(e){Uu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Uu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fu(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let Vu=(Fu((Hu=class extends ru{constructor(){super(...arguments),Uu(this,"modelType",Qn.TEXT_NODE)}getTextStyle(){const t=super.getTextStyle(),{text:e}=this.graphModel.theme;return Gu(Gu({},t),ti(e))}get width(){const t=String(this.text.value).split(/[\r\n]/g),{fontSize:e}=this.getTextStyle(),{width:r}=qi({rows:t,fontSize:e,rowsLength:t.length});return r}get height(){const t=String(this.text.value).split(/[\r\n]/g),{fontSize:e}=this.getTextStyle(),{height:r}=qi({rows:t,fontSize:e,rowsLength:t.length});return r}}).prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Hu.prototype,"width"),Hu.prototype),Fu(Hu.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Hu.prototype,"height"),Hu.prototype),Hu);class Wu extends ru{constructor(){var t,e,r;super(...arguments),t=this,e="modelType",r=Qn.HTML_NODE,e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}getDefaultAnchor(){const{x:t,y:e,width:r,height:n}=this;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}}var Ku,Zu,qu,$u;function Ju(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Qu(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function tl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function el(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}let rl=(Zu=el((Ku=class{constructor(t){tl(this,"graphModel",void 0),Qu(this,"isShowHorizontal",Zu,this),Qu(this,"isShowVertical",qu,this),Qu(this,"position",$u,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=t}getStyle(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ju(Object(r),!0).forEach((function(e){tl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ju(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},this.graphModel.theme.snapline)}getCenterSnapLine(t,e){const{x:r,y:n}=t;let o=!1,i=!1;for(let s=0;s<e.length;s++){const a=e[s];if(a.id!==t.id&&(r===a.x&&(o=!0),n===a.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:r,y:n}}}getHorizontalSnapline(t,e){let r,n=!1;const{id:o}=t;let i;if(o){const{fakerNode:t}=this.graphModel;if(t&&t.id===o)i=Yi(t);else{const t=this.graphModel.getNodeModelById(o);i=Yi(t)}}for(let o=0;o<e.length;o++){const s=e[o];if(s.id!==t.id){const t=Yi(s);if(t.minY===i.minY||t.maxY===i.minY){n=!0,r=i.minY;break}if(t.minY===i.maxY||t.maxY===i.maxY){n=!0,r=i.maxY;break}}}return _n({isShowHorizontal:n,position:{y:r}})}getVerticalSnapline(t,e){let r,n=!1;const{id:o}=t;let i;if(o){const{fakerNode:t}=this.graphModel;if(t&&t.id===o)i=Yi(t);else{const t=this.graphModel.getNodeModelById(o);i=Yi(t)}}for(let o=0;o<e.length;o++){const s=e[o];if(s.id!==t.id){const t=Yi(s);if(t.minX===i.minX||t.maxX===i.minX){n=!0,r=i.minX;break}if(t.minX===i.maxX||t.maxX===i.maxX){n=!0,r=i.maxX;break}}}return _n({isShowVertical:n,position:{x:r}})}getSnapLinePosition(t,e){const r=this.getCenterSnapLine(t,e),{isShowHorizontal:n,isShowVertical:o}=r;if(!n){const n=this.getHorizontalSnapline(t,e);n.isShowHorizontal&&(r.isShowHorizontal=n.isShowHorizontal,r.position.y=n.position.y)}if(!o){const n=this.getVerticalSnapline(t,e);n.isShowVertical&&(r.isShowVertical=n.isShowVertical,r.position.x=n.position.x)}return r}setSnaplineInfo(t){const{isShowHorizontal:e,isShowVertical:r,position:n}=t;this.position=n,this.isShowHorizontal=e,this.isShowVertical=r}clearSnapline(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}setNodeSnapLine(t){const{nodes:e}=this.graphModel,r=this.getSnapLinePosition(t,e);this.setSnaplineInfo(r)}}).prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qu=el(Ku.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$u=el(Ku.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),el(Ku.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(Ku.prototype,"clearSnapline"),Ku.prototype),el(Ku.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(Ku.prototype,"setNodeSnapLine"),Ku.prototype),Ku);function nl(){return(nl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function ol(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function il(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ol(Object(r),!0).forEach((function(e){sl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ol(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function sl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class al extends Q.a{constructor(){super(),sl(this,"preTargetNode",void 0),sl(this,"dragHandler",void 0),sl(this,"sourceRuleResults",void 0),sl(this,"targetRuleResults",void 0),sl(this,"onDragStart",()=>{const{x:t,y:e,nodeModel:r,graphModel:n}=this.props,{overlapMode:o}=n;n.selectNodeById(r.id),o!==oo.INCREASE&&n.toFront(r.id),this.setState({startX:t,startY:e,endX:t,endY:e})}),sl(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;const{endX:n,endY:o}=this.state,{graphModel:i,nodeModel:s}=this.props,{transformModel:a,nodes:c}=i,[u,l]=a.moveCanvasPointByHtml([n,o],e,r);this.setState({endX:u,endY:l,draging:!0});const p=Ri({x:n,y:o},c);if(p){const t=p.node;this.preTargetNode=t;const e=p.anchor.id,r="".concat(t.id,"_").concat(e);if(!this.targetRuleResults.has(r)){const{anchorData:e}=this.props,n=p.anchor,o=s.isAllowConnectedAsSource(t,e,n),i=t.isAllowConnectedAsTarget(s,e,n);this.sourceRuleResults.set(t.id,$i(o)),this.targetRuleResults.set(r,$i(i))}const{isAllPass:n}=this.sourceRuleResults.get(t.id),{isAllPass:o}=this.targetRuleResults.get(r);n&&o?t.setElementState($n.ALLOW_CONNECT):t.setElementState($n.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==$n.DEFAULT&&this.preTargetNode.setElementState($n.DEFAULT)}),sl(this,"onDragEnd",()=>{this.checkEnd(),this.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),this.sourceRuleResults.clear(),this.targetRuleResults.clear()}),sl(this,"checkEnd",()=>{const{graphModel:t,nodeModel:e,x:r,y:n,id:o}=this.props,{nodes:i,edgeType:s}=t,{endX:a,endY:c,draging:u}=this.state,l=Ri({x:a,y:c},i);if(this.preTargetNode&&this.preTargetNode.state!==$n.DEFAULT&&this.preTargetNode.setElementState($n.DEFAULT),u&&l&&l.node){const i=l.node,{isAllPass:a,msg:c}=this.sourceRuleResults.get(i.id)||{},u=l.anchor.id,p="".concat(i.id,"_").concat(u),{isAllPass:d,msg:h}=this.targetRuleResults.get(p)||{};if(a&&d)i.setElementState($n.ALLOW_CONNECT),r===l.anchor.x&&n===l.anchor.y||t.addEdge({type:s,sourceNodeId:e.id,sourceAnchorId:o,startPoint:{x:r,y:n},targetNodeId:l.node.id,targetAnchorId:l.anchor.id,endPoint:{x:l.anchor.x,y:l.anchor.y}});else{const e=i.getData();t.eventCenter.emit(eo.CONNECTION_NOT_ALLOWED,{data:e,msg:h||c})}}}),this.sourceRuleResults=new Map,this.targetRuleResults=new Map,this.state={startX:0,startY:0,endX:0,endY:0,draging:!1},this.dragHandler=_a({onDragStart:this.onDragStart,onDraging:this.onDraging,onDragEnd:this.onDragEnd})}isShowLine(){const{startX:t,startY:e,endX:r,endY:n}=this.state;return Bi(t,e,r,n)>10}render(){const{startX:t,startY:e,endX:r,endY:n}=this.state,{x:o,y:i,style:s,edgeStyle:a}=this.props,c=il(il({},s),s.hover);return Object(Q.g)("g",{className:"lf-anchor"},Object(Q.g)(pc,nl({className:"lf-node-anchor-hover"},c,{x:o,y:i,onMouseDown:this.dragHandler})),Object(Q.g)(pc,nl({className:"lf-node-anchor"},s,{x:o,y:i,onMouseDown:this.dragHandler})),this.isShowLine()&&Object(Q.g)(Qa,nl({x1:t,y1:e,x2:r,y2:n},a,{"pointer-events":"none"})))}}var cl=al;function ul(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ll(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ul(Object(r),!0).forEach((function(e){pl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ul(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dl(t){const{x:e=0,y:r=0,value:n,fontSize:o,fill:i="currentColor",overflowMode:s="default",textWidth:a="",model:c}=t,u={textAnchor:"middle","dominant-baseline":"middle",x:e,y:r,fill:i};if(Object.entries(t).forEach(t=>{let[e,r]=t;"object"!==typeof r&&(u[e]=r)}),n){const i=String(n).split(/[\r\n]/g),l=i.length;if("default"!==s){const{BaseType:e,modelType:r}=c;if(e===to.NODE&&r!==Qn.TEXT_NODE||e===to.EDGE&&a)return function(t){const{value:e,fontSize:r,model:n,fontFamily:o="",lineHeight:i,wrapPadding:s="0, 0",overflowMode:a,x:c,y:u}=t,{width:l,textHeight:p}=n,d=t.textWidth||l,h=String(e).split(/[\r\n]/g),f=h.length,g=Zi({rows:h,style:{fontSize:"".concat(r,"px"),width:"".concat(d,"px"),fontFamily:o,lineHeight:i,padding:s},rowsLength:f,className:"lf-get-text-height"});let y=n.height>g?n.height:g;p&&(y=p);const v="ellipsis"===a;return Object(Q.g)("g",null,Object(Q.g)("foreignObject",{width:d,height:y,x:c-d/2,y:u-y/2},Object(Q.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:y,width:d,padding:s}},Object(Q.g)("div",{className:v?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:ll({},t)},h.map(t=>Object(Q.g)("div",{className:"lf-node-text--auto-wrap-inner"},t))))))}(t)}if(l>1){const t=i.map((t,n)=>{const i=(n-(l-1)/2)*(o+2);return Object(Q.g)("tspan",{className:"lf-text-tspan",x:e,y:r+i},t)});return Object(Q.g)("text",u,t)}return Object(Q.g)("text",u,n)}}function hl(){return(hl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function fl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class gl extends Q.a{constructor(t){super(),fl(this,"dragHandler",void 0),fl(this,"sumDeltaX",0),fl(this,"sumDeltaY",0),fl(this,"stepDrag",void 0),fl(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;const{model:n,graphModel:{transformModel:o}}=this.props,[i,s]=o.fixDeltaXY(e,r);n.moveText(i,s)}),fl(this,"dblClickHandler",()=>{const{editable:t}=this.props;if(t){const{model:t}=this.props;t.setElementState($n.TEXT_EDIT)}}),fl(this,"mouseDownHandle",t=>{const{draggable:e,graphModel:{editConfigModel:{nodeTextDraggable:r}}}=this.props;(e||r)&&this.stepDrag.handleMouseDown(t)});const{model:e,draggable:r}=t;this.stepDrag=new xa({onDraging:this.onDraging,step:1,model:e,isStopPropagation:r})}getShape(){const{model:t}=this.props,{text:e}=t,{value:r,x:n,y:o}=e,i={x:n,y:o,className:"lf-element-text",value:r},s=t.getTextStyle();return Object(Q.g)(dl,hl({},i,s,{model:t}))}render(){const{model:{text:t}}=this.props;if(t)return Object(Q.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}const yl=null!==window.navigator.userAgent.match(/MSIE|Trident/);function vl(){return(vl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function bl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ml extends Q.a{static getModel(t){return t}constructor(t){super(),bl(this,"stepDrag",void 0),bl(this,"contextMenuTime",void 0),bl(this,"startTime",void 0),bl(this,"clickTimer",void 0),bl(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;const{model:n,graphModel:o}=this.props,{isDraging:i}=this.state;i||this.setState({isDraging:!0});const{transformModel:s}=o,[a,c]=s.fixDeltaXY(e,r);o.moveNode(n.id,a,c)}),bl(this,"onDragEnd",()=>{const{model:t}=this.props;t.isDragging=!1}),bl(this,"handleClick",t=>{if(!this.startTime)return;if((new Date).getTime()-this.startTime>200)return;const{model:e,graphModel:r}=this.props,n={data:e.getData(),e:t,position:r.getPointByClient({x:t.clientX,y:t.clientY})},o=2===t.button,i=2===t.detail;if(o)return;const{editConfigModel:s}=r;r.selectNodeById(e.id,Oi(t,s)),this.toFront(),i?(s.nodeTextEdit&&e.text.editable&&(e.setSelected(!1),r.setElementStateById(e.id,$n.TEXT_EDIT)),r.eventCenter.emit(eo.NODE_DBCLICK,n)):(r.eventCenter.emit(eo.ELEMENT_CLICK,n),r.eventCenter.emit(eo.NODE_CLICK,n))}),bl(this,"handleContextMenu",t=>{t.preventDefault();const{model:e,graphModel:r}=this.props,n=e.getData(),o=r.getPointByClient({x:t.clientX,y:t.clientY});r.setElementStateById(e.id,$n.SHOW_MENU,o.domOverlayPosition),r.selectNodeById(e.id),r.eventCenter.emit(eo.NODE_CONTEXTMENU,{data:n,e:t,position:o}),this.toFront()}),bl(this,"handleMouseDown",t=>{const{model:e,graphModel:r}=this.props;this.toFront(),this.startTime=(new Date).getTime();const{editConfigModel:n}=r;n.adjustNodePosition&&e.draggable&&this.stepDrag&&this.stepDrag.handleMouseDown(t)}),bl(this,"setHoverON",t=>{const{isHovered:e}=this.state;if(e)return;this.setState({isHovered:!0});const{model:r,graphModel:n}=this.props,o=r.getData();r.setHovered(!0),n.eventCenter.emit(eo.NODE_MOUSEENTER,{data:o,e:t})}),bl(this,"setHoverOFF",t=>{this.setState({isHovered:!1});const{model:e,graphModel:r}=this.props,n=e.getData();e.setHovered(!1),r.eventCenter.emit(eo.NODE_MOUSELEAVE,{data:n,e:t})}),bl(this,"onMouseOut",t=>{yl&&this.setHoverOFF(t)});const{graphModel:{gridSize:e,eventCenter:r},model:n}=t;this.stepDrag=new xa({onDraging:this.onDraging,onDragEnd:this.onDragEnd,step:e,eventType:"NODE",eventCenter:r,model:n}),this.state={isHovered:!1}}getAnchors(){const{model:t,graphModel:e}=this.props,{isSelected:r,isHitable:n,isDragging:o}=t,{isHovered:i}=this.state;if(n&&(r||i)){const r=t.getAnchorStyle(),n=t.getAnchorLineStyle();return nn(t.anchors,(i,s)=>Object(Q.g)(cl,vl({},i,{anchorData:i,nodeDraging:o,style:r,edgeStyle:n,anchorIndex:s,nodeModel:t,graphModel:e,setHoverOFF:this.setHoverOFF})))}return[]}getText(){const{model:t,graphModel:e}=this.props;if(t.state===$n.TEXT_EDIT)return"";if(t.text){const{editConfigModel:r}=e;let n=!1;return(t.text.draggable||r.nodeTextDraggable)&&(n=!0),Object(Q.g)(gl,{editable:r.nodeTextEdit&&t.text.editable,model:t,graphModel:e,draggable:n})}}getStateClassName(){const{model:{state:t,isDraging:e}}=this.props;let r="lf-node";switch(t){case $n.ALLOW_CONNECT:r+=" lf-node-allow";break;case $n.NOT_ALLOW_CONNECT:r+=" lf-node-not-allow";break;default:r+=" lf-node-default"}return e&&(r+=" lf-isDragging"),r}toFront(){const{model:t,graphModel:e}=this.props,{overlapMode:r}=e;r!==oo.INCREASE&&e.toFront(t.id)}render(){const{model:t,graphModel:e}=this.props,{editConfigModel:{hideAnchors:r,adjustNodePosition:n},gridSize:o,transformModel:{SCALE_X:i}}=e,{isHitable:s,draggable:a}=t,c=Object(Q.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),r?null:this.getAnchors());let u;return s?(n&&a&&this.stepDrag.setStep(o*i),u=Object(Q.g)("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},c)):u=Object(Q.g)("g",{className:this.getStateClassName()},c),u}}function Ol(){return(Ol=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}class _l extends ml{getShape(){const{model:t}=this.props,e=t.getNodeStyle();return Object(Q.g)(oc,Ol({},e,{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}function xl(){return(xl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}class El extends ml{getShape(){const{model:t}=this.props,{x:e,y:r,r:n}=t,o=t.getNodeStyle();return Object(Q.g)(pc,xl({},o,{x:e,y:r,r:n}))}}function wl(t){const{points:e,className:r}=t,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:"",className:"lf-basic-shape ".concat(r)};return Object.entries(t).forEach(t=>{let[e,r]=t;"object"!==typeof r&&(n[e]=r)}),n.points=e.map(t=>t.join(",")).join(" "),Object(Q.g)("polygon",n)}function jl(){return(jl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}class Pl extends ml{getShape(){const{model:t}=this.props,{x:e,y:r,width:n,height:o,points:i}=t,s=t.getNodeStyle(),a={transform:"matrix(1 0 0 1 ".concat(e-n/2," ").concat(r-o/2,")")};return Object(Q.g)("g",a,Object(Q.g)(wl,jl({},s,{points:i,x:e,y:r})))}}function Sl(){return(Sl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}class Dl extends ml{getShape(){const{model:t}=this.props,e=t.getNodeStyle();return Object(Q.g)("g",null,Object(Q.g)(wl,Sl({},e,{points:t.points,x:t.x,y:t.y})))}}function Ml(t){const{x:e=0,y:r=0,rx:n=4,ry:o=4}=t,i={cx:e,cy:r,rx:n,ry:o,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(t=>{let[e,r]=t;"object"!==typeof r&&(i[e]=r)}),Object(Q.g)("ellipse",i)}function Al(){return(Al=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}class Nl extends ml{getShape(){const{model:t}=this.props,e=t.getNodeStyle();return Object(Q.g)(Ml,Al({},e,{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}function Tl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Cl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tl(Object(r),!0).forEach((function(e){kl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Il extends ml{getBackgroud(){const{model:t}=this.props,e=t.getTextStyle(),{text:r}=t;if(r&&r.value&&e.background&&"transparnet"!==e.background.fill){const{x:n,y:o}=r,{width:i,height:s}=t,a=Cl(Cl({},e.background),{},{x:n,y:o-1,width:i,height:s});return Object(Q.g)(oc,a)}}getShape(){return Object(Q.g)("g",null,this.getBackgroud())}}function Ll(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Rl extends ml{constructor(){super(...arguments),Ll(this,"ref",void 0),Ll(this,"currrentProperties",void 0),Ll(this,"preProperties",void 0),Ll(this,"setRef",t=>{this.ref=t})}get rootEl(){return this.ref}setHtml(t){t.appendChild(document.createElement("div"))}shouldUpdate(){if(!this.preProperties||this.preProperties!==this.currrentProperties)return this.preProperties=this.currrentProperties,!0}componentDidMount(){this.shouldUpdate()&&this.setHtml(this.rootEl)}componentDidUpdate(){this.shouldUpdate()&&this.setHtml(this.rootEl)}getShape(){const{model:t}=this.props,{x:e,y:r,height:n,width:o}=t;return this.currrentProperties=JSON.stringify(t.properties),Object(Q.g)("foreignObject",{x:e-o/2,y:r-n/2,width:o,height:n,ref:this.setRef})}}var zl,Bl=function(t){const e={d:""};return Object.entries(t).forEach(t=>{let[r,n]=t;"object"!==typeof n&&(e[r]=n)}),Object(Q.g)("path",e)};function Xl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Yl extends Q.a{getArrowAttributes(){const{arrowInfo:t,style:e}=this.props,{start:r,end:n}=t,o={start:r,end:n,offset:e.offset,verticalLength:e.verticalLength,type:"end"},{leftX:i,leftY:s,rightX:a,rightY:c}=Ls(o);return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Xl(Object(r),!0).forEach((function(e){Hl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(i," ").concat(s," L").concat(n.x," ").concat(n.y," L").concat(a," ").concat(c," z")},e)}getShape(){const{d:t,strokeWidth:e,stroke:r,fill:n}=this.getArrowAttributes();return Object(Q.g)(Bl,{d:t,fill:n,strokeWidth:e,stroke:r})}render(){return Object(Q.g)("g",{className:"lf-arrow"},this.getShape())}}function Gl(){return(Gl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Ul(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Fl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ul(Object(r),!0).forEach((function(e){Vl(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ul(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Vl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Wl extends gl{constructor(t){super(t),Vl(this,"setHoverON",()=>{this.setState({isHoverd:!0})}),Vl(this,"setHoverOFF",()=>{this.setState({isHoverd:!1})}),this.state={isHoverd:!1}}getBackgroud(){const t=this.props.model,e=t.getTextStyle(),{text:r}=t;let n=e.background||{};const{isHoverd:o}=this.state;if(o&&e.hover&&e.hover.background&&(n=Fl(Fl({},n),e.hover.background)),r&&r.value&&"transparnet"!==n.fill){const{fontSize:t,overflowMode:o,lineHeight:i,wrapPadding:s,textWidth:a}=e,{value:c,x:u,y:l}=r,p=String(c).split(/[\r\n]/g),d=p.length;let h;if("autoWrap"===o&&a){const e=Zi({rows:p,style:{fontSize:"".concat(t,"px"),width:"".concat(a,"px"),lineHeight:i,padding:s},rowsLength:d,className:"lf-get-text-height"});h=Fl(Fl({},n),{},{x:u-1,y:l-1,width:a,height:e})}else{let e=0;p&&p.forEach(t=>{const r=pa(t);e=r>e?r:e});const{width:r,height:o}=qi({rows:p,fontSize:t,rowsLength:d});h=Fl(Fl({},n),{},{x:u-1,y:l-1,width:r,height:o})}return Object(Q.g)(oc,h)}}getShape(){const{model:t}=this.props,{text:e}=t,{value:r,x:n,y:o}=e;if(!r)return;const i=Fl({x:n,y:o,className:"lf-element-text",value:r},t.getTextStyle());return Object(Q.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),Object(Q.g)(dl,Gl({},i,{model:t})))}}function Kl(){return(Kl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Zl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ql(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zl(Object(r),!0).forEach((function(e){$l(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zl(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $l(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}(zl||(zl={}));class Jl extends Q.a{constructor(){super(),$l(this,"dragHandler",void 0),$l(this,"oldEdge",void 0),$l(this,"onDragStart",()=>{const{x:t,y:e,edgeModel:r}=this.props,{startPoint:n,endPoint:o,pointsList:i}=r;this.oldEdge={startPoint:n,endPoint:o,pointsList:i},this.setState({endX:t,endY:e,draging:!0})}),$l(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;const{endX:n,endY:o}=this.state,{graphModel:i,type:s}=this.props,{transformModel:a}=i,[c,u]=a.moveCanvasPointByHtml([n,o],e,r);this.setState({endX:c,endY:u,draging:!0});const{edgeModel:l}=this.props,{nodes:p}=i,d=Ri({x:n,y:o},p);if(d&&d.node){let t;const{startPoint:e,endPoint:r,sourceNode:n,targetNode:o}=l;s===zl.SOURCE?t={startPoint:{x:d.anchor.x,y:d.anchor.y},endPoint:{x:r.x,y:r.y},sourceNode:d.node,targetNode:o}:s===zl.TARGET&&(t={startPoint:{x:e.x,y:e.y},endPoint:{x:d.anchor.x,y:d.anchor.y},sourceNode:n,targetNode:d.node}),l.updateAfterAdjustStartAndEnd(t)}else s===zl.SOURCE?l.updateStartPoint({x:c,y:u}):s===zl.TARGET&&l.updateEndPoint({x:c,y:u})}),$l(this,"onDragEnd",()=>{this.setState({draging:!1});const{graphModel:t,edgeModel:e,type:r}=this.props,{nodes:n}=t,{endX:o,endY:i,draging:s}=this.state,a=Ri({x:o,y:i},n);if(s)if(a&&a.node){var c;const n=e.getData();let o=ql(ql({},n),{},{sourceAnchorId:"",targetAnchorId:"",text:(null==n||null===(c=n.text)||void 0===c?void 0:c.value)||""});r===zl.SOURCE?o=ql(ql({},o),{},{sourceNodeId:a.node.id,sourceAnchorId:a.anchor.id,startPoint:{x:a.anchor.x,y:a.anchor.y},targetNodeId:e.targetNodeId,endPoint:ql({},e.endPoint)}):r===zl.TARGET&&(o=ql(ql({},o),{},{sourceNodeId:e.sourceNodeId,startPoint:ql({},e.startPoint),targetNodeId:a.node.id,targetAnchorId:a.anchor.id,endPoint:{x:a.anchor.x,y:a.anchor.y}})),t.deleteEdgeById(e.id);const i=t.addEdge(ql({},o));t.eventCenter.emit(eo.EDGE_EXCHANGE_NODE,{data:{newEdge:i.getData(),oldEdge:e.getData()}})}else this.recoveryEdge()}),$l(this,"recoveryEdge",()=>{const{edgeModel:t}=this.props,{startPoint:e,endPoint:r,pointsList:n}=this.oldEdge;t.updateStartPoint(e),t.updateEndPoint(r),t.modelType!==Qn.LINE_EDGE&&(t.pointsList=n,t.initPoints())}),$l(this,"getAdjustPointStyle",()=>{const{graphModel:{theme:t}}=this.props,{edgeAdjust:e}=t;return e}),this.state={draging:!1,endX:0,endY:0},this.dragHandler=_a({onDragStart:this.onDragStart,onDraging:this.onDraging,onDragEnd:this.onDragEnd})}render(){const{x:t,y:e}=this.props,{draging:r}=this.state,n=this.getAdjustPointStyle();return Object(Q.g)("g",null,Object(Q.g)(pc,Kl({className:"lf-edge-adjust-point"},n,{x:t,y:e,onMouseDown:this.dragHandler,"pointer-events":r?"none":""})))}}function Ql(){return(Ql=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function tp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ep(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tp(Object(r),!0).forEach((function(e){rp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function rp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class np extends Q.a{constructor(){super(...arguments),rp(this,"startTime",void 0),rp(this,"contextMenuTime",void 0),rp(this,"clickTimer",void 0),rp(this,"handleHover",(t,e)=>{const{model:r,graphModel:{eventCenter:n}}=this.props;r.setHovered(t);const o=t?eo.EDGE_MOUSEENTER:eo.EDGE_MOUSELEAVE,i=r.getData();n.emit(o,{data:i,e:e})}),rp(this,"setHoverON",t=>{this.handleHover(!0,t)}),rp(this,"setHoverOFF",t=>{this.handleHover(!1,t)}),rp(this,"handleContextMenu",t=>{t.preventDefault(),this.contextMenuTime=(new Date).getTime(),this.clickTimer&&clearTimeout(this.clickTimer);const{model:e,graphModel:r}=this.props,n=r.getPointByClient({x:t.clientX,y:t.clientY});r.setElementStateById(e.id,$n.SHOW_MENU,n.domOverlayPosition),this.toFront(),r.selectEdgeById(e.id);const o=null==e?void 0:e.getData();r.eventCenter.emit(eo.EDGE_CONTEXTMENU,{data:o,e:t,position:n})}),rp(this,"handleMouseDown",t=>{t.stopPropagation(),this.startTime=(new Date).getTime()}),rp(this,"handleMouseUp",t=>{if(!this.startTime)return;if((new Date).getTime()-this.startTime>200)return;if(2===t.button)return;const e=2===t.detail,{model:r,graphModel:n}=this.props,o=null==r?void 0:r.getData(),i=n.getPointByClient({x:t.clientX,y:t.clientY});if(e){const{editConfigModel:e,textEditElement:s}=n;if(s&&s.id===r.id&&n.setElementStateById(r.id,$n.DEFAULT),e.edgeTextEdit&&r.text.editable&&n.setElementStateById(r.id,$n.TEXT_EDIT),r.modelType===Qn.POLYLINE_EDGE){const e=r,{canvasOverlayPosition:{x:o,y:i}}=n.getPointByClient({x:t.x,y:t.y}),s=ga({x:o,y:i},e.points);e.dbClickPosition=s}n.eventCenter.emit(eo.EDGE_DBCLICK,{data:o,e:t,position:i})}else n.eventCenter.emit(eo.ELEMENT_CLICK,{data:o,e:t,position:i}),n.eventCenter.emit(eo.EDGE_CLICK,{data:o,e:t,position:i});const{editConfigModel:s}=n;n.selectEdgeById(r.id,Oi(t,s)),this.toFront()}),rp(this,"getIsDraging",()=>!1)}getShape(){}getTextStyle(){}getText(){const{model:t,graphModel:e}=this.props;if(t.state===$n.TEXT_EDIT)return"";let r=!1;const{editConfigModel:n}=e;return(t.text.draggable||n.edgeTextDraggable)&&(r=!0),Object(Q.g)(Wl,{editable:n.edgeTextEdit&&t.text.editable,model:t,graphModel:e,draggable:r})}getArrowInfo(){const{model:t}=this.props,{startPoint:e,endPoint:r,isSelected:n}=t,{hover:o}=this.state;return{start:e,end:r,hover:o,isSelected:n}}getArrowStyle(){const{model:t,graphModel:e}=this.props,r=t.getEdgeStyle(),{arrow:n}=e.theme;return ep(ep({},r),{},{fill:r.stroke},n)}getArrow(){const t=this.getArrowInfo(),{start:e,end:r}=t;if(!e||!r||e.x===r.x&&e.y===r.y)return;const n=this.getArrowStyle();return Object(Q.g)(Yl,{arrowInfo:t,style:n})}getAdjustPoints(){const{model:t,graphModel:e}=this.props,r=t.getAdjustStart(),n=t.getAdjustEnd();return Object(Q.g)("g",null,Object(Q.g)(Jl,Ql({type:"SOURCE"},r,{edgeModel:t,graphModel:e})),Object(Q.g)(Jl,Ql({type:"TARGET"},n,{edgeModel:t,graphModel:e})))}getAppendWidth(){return Object(Q.g)("g",null)}getAppend(){return Object(Q.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}toFront(){const{graphModel:t,model:e}=this.props,{overlapMode:r}=t;r!==oo.INCREASE&&t.toFront(e.id)}render(){const{model:{isSelected:t},graphModel:{editConfigModel:e}}=this.props,r=this.getIsDraging(),{adjustEdgeStartAndEnd:n}=e;return Object(Q.g)("g",{className:"lf-edge",onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow(),n&&t&&!r?this.getAdjustPoints():"")}}function op(){return(op=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}class ip extends np{getEdge(){const{model:t}=this.props,{startPoint:e,endPoint:r}=t,n=t.getEdgeStyle();return Object(Q.g)(Qa,op({},n,{x1:e.x,y1:e.y,x2:r.x,y2:r.y}))}getShape(){return Object(Q.g)("g",null,this.getEdge())}getAppendWidth(){const{model:t}=this.props,{startPoint:e,endPoint:r}=t,n={start:e,end:r},{d:o,strokeWidth:i,fill:s,strokeDasharray:a,stroke:c}=(t=>{const{start:e,end:r}=t;let n;if(e.x===r.x&&e.y===r.y)n="";else{const t={start:e,end:r,offset:10,verticalLength:5},o=Ls(zs(zs({},t),{},{type:"start"})),i=Ls(zs(zs({},t),{},{type:"end"}));n="M".concat(o.leftX," ").concat(o.leftY," \n L").concat(o.rightX," ").concat(o.rightY," \n L").concat(i.rightX," ").concat(i.rightY,"\n L").concat(i.leftX," ").concat(i.leftY," z")}return{d:n,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}})(n);return Object(Q.g)(Bl,{d:o,fill:s,strokeWidth:i,stroke:c,strokeDasharray:a})}}var sp=function(t){const e={points:"",fill:"none"};return Object.entries(t).forEach(t=>{let[r,n]=t;"object"!==typeof n&&(e[r]=n)}),Object(Q.g)("polyline",e)};function ap(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function cp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ap(Object(r),!0).forEach((function(e){lp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function up(){return(up=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function lp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class pp extends np{constructor(){super(),lp(this,"drag",void 0),lp(this,"isDraging",void 0),lp(this,"appendInfo",void 0),lp(this,"dragHandler",void 0),lp(this,"onDragStart",()=>{this.props.model.dragAppendStart()}),lp(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;const{model:n,graphModel:o}=this.props;this.isDraging=!0;const{transformModel:i,editConfigModel:s}=o,[a,c]=i.fixDeltaXY(e,r),u=n,{adjustEdgeMiddle:l}=s;this.appendInfo=l?u.dragAppendSimple(this.appendInfo,{x:a,y:c}):u.dragAppend(this.appendInfo,{x:a,y:c})}),lp(this,"onDragEnd",()=>{const{model:t,graphModel:{eventCenter:e}}=this.props,r=t;r.dragAppendEnd(),this.isDraging=!1,this.appendInfo=void 0,e.emit(eo.EDGE_ADJUST,{data:r.getData()})}),lp(this,"beforeDragStart",(t,e)=>{e.dragAble&&this.dragHandler(t),this.appendInfo=e}),lp(this,"getIsDraging",()=>this.isDraging),this.drag=_a({onDragStart:this.onDragStart,onDraging:this.onDraging,onDragEnd:this.onDragEnd,isStopPropagation:!1})}getEdge(){const{model:t}=this.props,e=t.getEdgeStyle();return Object(Q.g)(sp,up({points:t.points},e))}getShape(){return Object(Q.g)("g",null,this.getEdge())}getArrowInfo(){const{model:t}=this.props,{points:e,isSelected:r}=t,{hover:n}=this.state,o={start:null,end:null,hover:n,isSelected:r},i=ca(e);return i.length>=2&&(o.start=i[i.length-2],o.end=i[i.length-1]),o}getAppendAttributes(t){const{start:e,end:r}=t;let n;if(e.x===r.x&&e.y===r.y)n="";else{const t={start:e,end:r,offset:10,verticalLength:5},o=Ls(cp(cp({},t),{},{type:"start"})),i=Ls(cp(cp({},t),{},{type:"end"}));n="M".concat(o.leftX," ").concat(o.leftY," \n L").concat(o.rightX," ").concat(o.rightY," \n L").concat(i.rightX," ").concat(i.rightY,"\n L").concat(i.leftX," ").concat(i.leftY," z")}return{d:n,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}getAppendShape(t){const{d:e,strokeWidth:r,fill:n,strokeDasharray:o,stroke:i}=this.getAppendAttributes(t);return Object(Q.g)(Bl,{d:e,fill:n,strokeWidth:r,stroke:i,strokeDasharray:o})}getAppendWidth(){const{model:t,graphModel:e}=this.props,{pointsList:r,draggable:n}=t,o=[],i=r.length;for(let t=0;t<i-1;t++){let s="lf-polyline-append";const a={start:{x:r[t].x,y:r[t].y},end:{x:r[t+1].x,y:r[t+1].y},startIndex:t,endIndex:t+1,direction:"",dragAble:!0};let c=Object(Q.g)("g",{className:s},this.getAppendShape(a));const{editConfigModel:u}=e,{adjustEdge:l,adjustEdgeMiddle:p}=u;if(l&&n){this.dragHandler=this.drag;const{startIndex:t,endIndex:e}=a,r=p&&(0===t||e===i-1);a.dragAble=!r,a.start.x===a.end.x?(a.dragAble&&(s+="-ew-resize"),a.direction=ro.VERTICAL):a.start.y===a.end.y&&(a.dragAble&&(s+="-ns-resize"),a.direction=ro.HORIZONTAL),c=Object(Q.g)("g",{className:this.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:t=>this.beforeDragStart(t,a)},Object(Q.g)("g",{className:s},this.getAppendShape(a)))}else this.dragHandler=()=>{};o.push(c)}return Object(Q.g)("g",null,o)}}function dp(){return(dp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}class hp extends np{getEdge(){const{model:t}=this.props,e=t.getEdgeStyle();return Object(Q.g)(Bl,dp({d:t.path},e))}getShape(){return Object(Q.g)("g",null,this.getEdge())}getAppendWidth(){const{path:t}=this.props.model;return Object(Q.g)(Bl,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}getArrowInfo(){const{model:t}=this.props,{hover:e}=this.state,{path:r,isSelected:n}=t,[o,i]=(t=>{const e=ha(t);return[e[2],e[3]]})(r);return{start:o,end:i,hover:e,isSelected:n}}}var fp=function(t,e){return xr(t,e)};var gp=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},yp=function(){return gt.a.Date.now()},vp=/\s/;var bp=function(t){for(var e=t.length;e--&&vp.test(t.charAt(e)););return e},mp=/^\s+/;var Op=function(t){return t?t.slice(0,bp(t)+1).replace(mp,""):t},_p=/^[-+]0x[0-9a-f]+$/i,xp=/^0b[01]+$/i,Ep=/^0o[0-7]+$/i,wp=parseInt;var jp=function(t){if("number"==typeof t)return t;if(Dr(t))return NaN;if(Pt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Pt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Op(t);var r=xp.test(t);return r||Ep.test(t)?wp(t.slice(2),r?2:8):_p.test(t)?NaN:+t},Pp=Math.max,Sp=Math.min;var Dp=function(t,e,r){var n,o,i,s,a,c,u=0,l=!1,p=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var r=n,i=o;return n=o=void 0,u=e,s=t.apply(i,r)}function f(t){return u=t,a=setTimeout(y,e),l?h(t):s}function g(t){var r=t-c;return void 0===c||r>=e||r<0||p&&t-u>=i}function y(){var t=yp();if(g(t))return v(t);a=setTimeout(y,function(t){var r=e-(t-c);return p?Sp(r,i-(t-u)):r}(t))}function v(t){return a=void 0,d&&n?h(t):(n=o=void 0,s)}function b(){var t=yp(),r=g(t);if(n=arguments,o=this,c=t,r){if(void 0===a)return f(c);if(p)return clearTimeout(a),a=setTimeout(y,e),h(c)}return void 0===a&&(a=setTimeout(y,e)),s}return e=jp(e)||0,Pt(r)&&(l=!!r.leading,i=(p="maxWait"in r)?Pp(jp(r.maxWait)||0,e):i,d="trailing"in r?!!r.trailing:d),b.cancel=function(){void 0!==a&&clearTimeout(a),u=0,n=c=o=a=void 0},b.flush=function(){return void 0===a?s:v(yp())},b},Mp=r(92);function Ap(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Np,Tp,Cp,kp=class{constructor(t){Ap(this,"undos",[]),Ap(this,"redos",[]),Ap(this,"callbacks",[]),Ap(this,"stopWatch",null),Ap(this,"curData",null),Ap(this,"maxSize",50),Ap(this,"waitTime",100),Ap(this,"eventCenter",void 0),this.eventCenter=t}add(t){fp(gp(this.undos),t)||(this.undos.push(t),fp(this.curData,t)||(this.redos=[]),this.eventCenter.emit(eo.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}undoAble(){return this.undos.length>1}undo(){if(!this.undoAble())return;const t=this.undos.pop();this.redos.push(t);const e=this.undos.pop();return this.curData=ti(e),e}redoAble(){return this.redos.length>0}redo(){if(!this.redoAble())return;const t=this.redos.pop();return this.curData=ti(t),t}watch(t){this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(Mp.a)(t,Dp(()=>{const e=t.modelToHistoryData();e&&this.add(e)},this.waitTime))}};function Ip(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Lp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ip(Object(r),!0).forEach((function(e){Rp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ip(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Rp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let zp=id((Cp=Tp=class extends Q.a{constructor(){super(),Rp(this,"ref",Object(Q.f)()),Rp(this,"__prevText",{type:"",text:"",id:""}),Rp(this,"keyupHandler",t=>{const{innerText:e}=t.target,{graphModel:{textEditElement:r}}=this.props;"Enter"===t.key&&t.altKey&&r.setElementState(0),this.__prevText={type:r.type,text:e,id:r.id}}),this.state={style:{left:0,top:0}}}componentDidMount(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));const{graphModel:t}=this.props,{eventCenter:e,editConfigModel:{edgeTextEdit:r,nodeTextEdit:n}}=t;(r||n)&&e.on(eo.GRAPH_TRANSFORM,()=>{t.textEditElement&&t.textEditElement.setElementState($n.DEFAULT)})}static getDerivedStateFromProps(t){const{graphModel:e}=t,{transformModel:r,theme:n}=e;let o,{textEditElement:i}=e;if(i){var s;if(null===(s=i.text)||void 0===s||!s.value)if(i.BaseType===to.EDGE){i=i;const t=i.text,{x:e,y:r}=i.textPosition;t.x=e,t.y=r,i.setText(t)}else i=i;const t={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(i.BaseType===to.EDGE){const{edgeText:{overflowMode:e,lineHeight:r,wrapPadding:i,textWidth:s}}=n;s&&"autoWrap"===e&&(o=Lp(Lp({},t),{},{width:s,minWidth:s,lineHeight:r,padding:i}))}else if(i.BaseType===to.NODE){const{nodeText:{overflowMode:e,lineHeight:r,wrapPadding:s,textWidth:a}}=n,{width:c,modelType:u}=i;(u!==Qn.TEXT_NODE&&"autoWrap"===e||u===Qn.TEXT_NODE&&a)&&(o=Lp(Lp({},t),{},{width:a||c,minWidth:a||c,lineHeight:r,padding:s}))}const{x:e,y:a}=i.text,[c,u]=r.CanvasPointToHtmlPoint([e,a]);return{style:Lp({left:c,top:u},o)}}}componentDidUpdate(){const{graphModel:t}=this.props;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){const{text:e,id:r}=this.__prevText;t.updateText(r,e),t.eventCenter.emit(eo.TEXT_UPDATE,Lp({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}placeCaretAtEnd(t){if(void 0!==window.getSelection&&void 0!==document.createRange){const e=document.createRange();e.selectNodeContents(t),e.collapse(!1);const r=window.getSelection();r.removeAllRanges(),r.addRange(e)}}render(){var t;const{graphModel:{textEditElement:e}}=this.props,{style:r}=this.state;return e?Object(Q.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}},Rp(Tp,"toolName","textEdit"),Np=Cp))||Np;const Bp=t=>t.modelType===Qn.LINE_EDGE?(t=>{const{startPoint:e,endPoint:r}=t,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,s=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-s/2,x1:n+i/2,y1:o+s/2}})(t):t.modelType===Qn.POLYLINE_EDGE?(t=>{const{points:e}=t,r=ca(e),n=Us(r,8),{x:o,y:i,width:s,height:a}=n;return{x:o-s/2,y:i-a/2,x1:o+s/2,y1:i+a/2}})(t):t.modelType===Qn.BEZIER_EDGE?(t=>{const{path:e}=t,r=ha(e),n=Us(r,8),{x:o,y:i,width:s,height:a}=n;return{x:o-s/2,y:i-a/2,x1:o+s/2,y1:i+a/2}})(t):void 0;var Xp,Hp,Yp;function Gp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let Up=id((Yp=Hp=class extends Q.a{constructor(t){super(),Gp(this,"stepDrag",void 0),Gp(this,"handleMouseDown",t=>{this.stepDrag.handleMouseDown(t)}),Gp(this,"onDraging",t=>{let{deltaX:e,deltaY:r}=t;const{graphModel:n}=this.props,o=n.getSelectElements(!0);n.moveNodes(o.nodes.map(t=>t.id),e,r)}),Gp(this,"handleContextMenu",t=>{t.preventDefault();const{graphModel:e,graphModel:{eventCenter:r,selectElements:n}}=this.props,o=e.getPointByClient({x:t.clientX,y:t.clientY}),i={nodes:[],edges:[]};[...n.values()].forEach(t=>{t.BaseType===to.NODE&&i.nodes.push(t.getData()),t.BaseType===to.EDGE&&i.edges.push(t.getData())}),r.emit(eo.SELECTION_CONTEXTMENU,{data:i,e:t,position:o})});const{graphModel:{gridSize:e,eventCenter:r}}=t;this.stepDrag=new xa({onDraging:this.onDraging,step:e,eventType:"SELECTION",eventCenter:r})}render(){const{graphModel:{selectElements:t,transformModel:e}}=this.props;if(t.size<=1)return;let r=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER;t.forEach(t=>{let e={x:0,y:0,x1:0,y1:0};t.BaseType===to.NODE&&(e=(t=>{let{x:e,y:r,width:n,height:o}=t;return{x:e-n/2,y:r-o/2,x1:e+n/2,y1:r+o/2}})(t)),t.BaseType===to.EDGE&&(e=Bp(t)),r=Math.min(r,e.x),n=Math.min(n,e.y),o=Math.max(o,e.x1),i=Math.max(i,e.y1)}),[r,n]=e.CanvasPointToHtmlPoint([r,n]),[o,i]=e.CanvasPointToHtmlPoint([o,i]);const s={left:"".concat(r-10,"px"),top:"".concat(n-10,"px"),width:"".concat(o-r+20,"px"),height:"".concat(i-n+20,"px")};return Object(Q.g)("div",{className:"lf-multiple-select",style:s,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}},Gp(Hp,"toolName","multipleSelect"),Xp=Yp))||Xp;function Fp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Vp{constructor(t){Fp(this,"tools",void 0),Fp(this,"components",void 0),Fp(this,"toolMap",new Map),Fp(this,"instance",void 0),this.instance=t,this.isDisabledTool(zp.toolName)||this.registerTool(zp.toolName,zp),this.isDisabledTool(Up.toolName)||this.registerTool(Up.toolName,Up)}isDisabledTool(t){return-1!==this.instance.options.disabledTools.indexOf(t)}registerTool(t,e){this.toolMap.set(t,e)}getTools(){return Array.from(this.toolMap.values())}getInstance(){return this.instance}}var Wp=r(93),Kp=r.n(Wp);function Zp(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class qp{constructor(t){Zp(this,"mousetrap",void 0),Zp(this,"options",void 0),Zp(this,"target",void 0),t.keyboard||(t.keyboard={enabled:!1}),this.options=t;const{lf:e}=t;this.target=e.container,this.mousetrap=new Kp.a(this.target),t.keyboard.enabled&&this.enable(!0)}initShortcuts(){const{shortcuts:t}=this.options.keyboard;if(t)if(Pe(t))t.forEach(t=>{let{keys:e,callback:r,action:n}=t;return this.on(e,r,n)});else{const{keys:e,callback:r,action:n}=t;this.on(e,r,n)}}on(t,e,r){this.mousetrap.bind(this.getKeys(t),e,r)}get disabled(){return!0!==this.options.keyboard.enabled}off(t,e){this.mousetrap.unbind(this.getKeys(t),e)}enable(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}disable(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}getKeys(t){return(Array.isArray(t)?t:[t]).map(t=>this.formatkey(t))}formatkey(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}var $p=qp;let Jp=null;function Qp(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function td(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(t=>{t.x+=e,t.y+=e}),t.text&&(t.text.x+=e,t.text.y+=e),t}function ed(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ed(Object(r),!0).forEach((function(e){nd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ed(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function nd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class od{constructor(t){var e,r;nd(this,"container",void 0),nd(this,"width",void 0),nd(this,"height",void 0),nd(this,"graphModel",void 0),nd(this,"history",void 0),nd(this,"viewMap",new Map),nd(this,"tool",void 0),nd(this,"keyboard",void 0),nd(this,"dnd",void 0),nd(this,"options",void 0),nd(this,"snaplineModel",void 0),nd(this,"components",[]),nd(this,"plugins",void 0),nd(this,"extension",{}),nd(this,"adapterIn",void 0),nd(this,"adapterOut",void 0),nd(this,"getView",t=>this.viewMap.get(t)),t=Pc(t),this.options=t,this.container=t.container,this.plugins=t.plugins,this.graphModel=new Ga(rd({},t)),this.tool=new Vp(this),this.history=new kp(this.graphModel.eventCenter),this.dnd=new jc({lf:this}),this.keyboard=new $p({lf:this,keyboard:t.keyboard}),t.isSilentMode||!1===t.snapline||(this.snaplineModel=new rl(this.graphModel),e=this.graphModel.eventCenter,r=this.snaplineModel,e.on("node:mousemove",t=>{let{data:e}=t;r.setNodeSnapLine(e)}),e.on("node:mouseup",()=>{r.clearSnapline()})),function(t,e){const{keyboard:r}=t,{options:{keyboard:n}}=r;r.on(["cmd + c","ctrl + c"],()=>{if(!n.enabled)return;if(e.textEditElement)return;const{guards:r}=t.options,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)?(Jp=null,!1):(Jp=o,Jp.nodes.forEach(t=>Qp(t,40)),Jp.edges.forEach(t=>td(t,40)),!1)}),r.on(["cmd + v","ctrl + v"],()=>{if(n.enabled&&!e.textEditElement){if(Jp&&(Jp.nodes||Jp.edges)){t.clearSelectElements();const e=t.addElements(Jp);if(!e)return;e.nodes.forEach(e=>t.selectElementById(e.id,!0)),e.edges.forEach(e=>t.selectElementById(e.id,!0)),Jp.nodes.forEach(t=>Qp(t,40)),Jp.edges.forEach(t=>td(t,40))}return!1}}),r.on(["cmd + z","ctrl + z"],()=>{if(n.enabled&&!e.textEditElement)return t.undo(),!1}),r.on(["cmd + y","ctrl + y"],()=>{if(n.enabled&&!e.textEditElement)return t.redo(),!1}),r.on(["backspace"],()=>{if(!n.enabled)return;if(e.textEditElement)return;const r=e.getSelectElements(!0);return t.clearSelectElements(),r.edges.forEach(e=>t.deleteEdge(e.id)),r.nodes.forEach(e=>t.deleteNode(e.id)),!1})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(t.disabledPlugins)}register(t,e){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"!=typeof t)return void this.registerElement(t);const n={BaseEdge:np,BaseEdgeModel:Es,BaseNode:ml,BaseNodeModel:ru,RectNode:_l,RectNodeModel:Xu,CircleNode:El,CircleNodeModel:uu,PolygonNode:Pl,PolygonNodeModel:ku,TextNode:Il,TextNodeModel:Vu,LineEdge:ip,LineEdgeModel:As,DiamondNode:Dl,DiamondNodeModel:bu,PolylineEdge:pp,PolylineEdgeModel:Is,BezierEdge:hp,BezierEdgeModel:kc,EllipseNode:Nl,EllipseNodeModel:Su,HtmlNode:Rl,HtmlNodeModel:Wu,h:Q.g,type:t};this.viewMap.forEach(t=>{const e=t.extendKey;e&&(n[e]=t)}),this.graphModel.modelMap.forEach(t=>{const e=t.extendKey;e&&(n[e]=t)});const{view:o,model:i}=e(n);let s=o;r&&!s.isObervered&&(s.isObervered=!0,s=J(s)),this.setView(t,s),this.graphModel.setModel(t,i)}registerElement(t){let e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=J(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}defaultRegister(){this.registerElement({view:_l,model:Xu,type:"rect"}),this.registerElement({type:"circle",view:El,model:uu}),this.registerElement({type:"polygon",view:Pl,model:ku}),this.registerElement({type:"line",view:ip,model:As}),this.registerElement({type:"polyline",view:pp,model:Is}),this.registerElement({type:"bezier",view:hp,model:kc}),this.registerElement({type:"text",view:Il,model:Vu}),this.registerElement({type:"ellipse",view:Nl,model:Su}),this.registerElement({type:"diamond",view:Dl,model:bu}),this.registerElement({type:"html",view:Rl,model:Wu})}selectElementById(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.graphModel.selectElementById(t,e),e||this.graphModel.toFront(t)}focusOn(t){const{transformModel:e}=this.graphModel;let{coordinate:r}=t;const{id:n}=t;if(!r){const t=this.getNodeModelById(n);t&&(r=t.getData());const e=this.getEdgeModelById(n);e&&(r=e.textPosition)}const{x:o,y:i}=r;e.focusOn(o,i,this.graphModel.width,this.graphModel.height)}setTheme(t){this.graphModel.setTheme(t)}resize(t,e){this.graphModel.resize(t,e)}setDefaultEdgeType(t){this.graphModel.setDefaultEdgeType(t)}updateText(t,e){this.graphModel.updateText(t,e)}deleteElement(t){if(this.graphModel.getNodeModelById(t))return this.deleteNode(t);return!!this.graphModel.getEdgeModelById(t)&&this.deleteEdge(t)}changeNodeType(t,e){this.graphModel.changeNodeType(t,e)}changeEdgeType(t,e){this.graphModel.changeEdgeType(t,e)}getNodeEdges(t){return this.graphModel.getNodeEdges(t)}addNode(t){return this.graphModel.addNode(t)}deleteNode(t){const e=this.graphModel.getNodeModelById(t);if(!e)return!1;const r=e.getData(),{guards:n}=this.options,o=!n||!n.beforeDelete||n.beforeDelete(r);return o&&this.graphModel.deleteNode(t),o}cloneNode(t){const e=this.graphModel.getNodeModelById(t).getData(),{guards:r}=this.options;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}changeNodeId(t,e){return this.graphModel.changeNodeId(t,e)}getNodeModelById(t){return this.graphModel.getNodeModelById(t)}getNodeDataById(t){return this.graphModel.getNodeModelById(t).getData()}addEdge(t){return this.graphModel.addEdge(t)}deleteEdge(t){const{guards:e}=this.options,r=this.graphModel.edgesMap[t];if(!r)return!1;const n=r.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(n);return o&&this.graphModel.deleteEdgeById(t),o}deleteEdgeByNodeId(t){const{sourceNodeId:e,targetNodeId:r}=t;e&&r?this.graphModel.deleteEdgeBySourceAndTarget(e,r):e?this.graphModel.deleteEdgeBySource(e):r&&this.graphModel.deleteEdgeByTarget(r)}changeEdgeId(t,e){return this.graphModel.changeEdgeId(t,e)}getEdgeModelById(t){var e;const{edgesMap:r}=this.graphModel;return null===(e=r[t])||void 0===e?void 0:e.model}getEdgeModels(t){const{edges:e}=this.graphModel,{sourceNodeId:r,targetNodeId:n}=t;if(r&&n){const t=[];return e.forEach(e=>{e.sourceNodeId===r&&e.targetNodeId===n&&t.push(e)}),t}if(r){const t=[];return e.forEach(e=>{e.sourceNodeId===r&&t.push(e)}),t}if(n){const t=[];return e.forEach(e=>{e.targetNodeId===n&&t.push(e)}),t}return[]}getEdgeDataById(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}editText(t){this.graphModel.editText(t)}setProperties(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(Ji(e))}getProperties(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}toFront(t){this.graphModel.toFront(t)}setElementZIndex(t,e){return this.graphModel.setElementZIndex(t,e)}addElements(t){let{nodes:e,edges:r}=t;const n={},o={nodes:[],edges:[]};for(let t=0;t<e.length;t++){const r=e[t],i=r.id,s=this.addNode(r);if(!s)return;i&&(n[i]=s.id),o.nodes.push(s)}return r.forEach(t=>{const e=t.sourceNodeId,r=t.targetNodeId;n[e]&&(t.sourceNodeId=n[e]),n[r]&&(t.targetNodeId=n[r]);const i=this.graphModel.addEdge(t);o.edges.push(i)}),o}getAreaElement(t,e){return this.graphModel.getAreaElement(t,e).map(t=>t.getData())}getSelectElements(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}clearSelectElements(){this.graphModel.clearSelectElements()}getGraphData(){const t=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(t):t}getGraphRawData(){return this.graphModel.modelToGraphData()}clearData(){this.graphModel.clearData()}updateEditConfig(t){this.graphModel.editConfigModel.updateEditConfig(t)}getEditConfig(){return this.graphModel.editConfigModel.getConfig()}getPointByClient(t,e){return this.graphModel.getPointByClient({x:t,y:e})}undo(){if(!this.history.undoAble())return;const t=Ji(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}redo(){if(!this.history.redoAble())return;const t=Ji(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}zoom(t,e){const{transformModel:r}=this.graphModel;return r.zoom(t,e)}resetZoom(){const{transformModel:t}=this.graphModel;t.resetZoom()}setZoomMiniSize(t){const{transformModel:e}=this.graphModel;e.setZoomMiniSize(t)}setZoomMaxSize(t){const{transformModel:e}=this.graphModel;e.setZoomMaxSize(t)}getTransform(){const{transformModel:{SCALE_X:t,SCALE_Y:e,TRANSLATE_X:r,TRANSLATE_Y:n}}=this.graphModel;return{SCALE_X:t,SCALE_Y:e,TRANSLATE_X:r,TRANSLATE_Y:n}}translate(t,e){const{transformModel:r}=this.graphModel;r.translate(t,e)}resetTranslate(){const{transformModel:t}=this.graphModel,{TRANSLATE_X:e,TRANSLATE_Y:r}=t;this.translate(-e,-r)}on(t,e){this.graphModel.eventCenter.on(t,e)}off(t,e){this.graphModel.eventCenter.off(t,e)}once(t,e){this.graphModel.eventCenter.once(t,e)}emit(t,e){this.graphModel.eventCenter.emit(t,e)}static use(t){let{pluginName:e}=t;e||(console.warn("请给插件".concat(t.name||t.constructor.name,"指定pluginName!")),e=t.name);const r=this.extensions.get(e);r&&r.destroy&&r.destroy(),this.extensions.set(e,t)}installPlugins(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(null!==(t=this.plugins)&&void 0!==t?t:od.extensions).forEach(t=>{const r=t.pluginName||t.name;-1===e.indexOf(r)&&this.installPlugin(t)})}installPlugin(t){if("object"==typeof t){const{install:e,render:r}=t;return e&&e.call(t,this,od),r&&this.components.push(r.bind(t)),void(this.extension[t.pluginName]=t)}const e=t,r=new e({lf:this,LogicFlow:od});r.render&&this.components.push(r.render.bind(r)),this.extension[e.pluginName]=r}updateAttributes(t,e){this.graphModel.updateAttributes(t,e)}createFakerNode(t){const e=this.graphModel.modelMap.get(t.type);if(!e)return void console.warn("不存在为".concat(t.type,"类型的节点"));const r=new e(rd(rd({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(r),r}removeFakerNode(){this.graphModel.removeFakerNode()}setNodeSnapLine(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}removeNodeSnapLine(){this.snaplineModel&&this.snaplineModel.clearSnapline()}setView(t,e){this.viewMap.set(t,e)}render(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.graphModel.graphDataToModel(Ji(t)),this.options.isSilentMode||!1===this.options.history||this.history.watch(this.graphModel),Object(Q.j)(Object(Q.g)(_c,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container)}}function id(t){return J(t)}nd(od,"extensions",new Map);e.default=od}])}));