You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
651 KiB
23 lines
651 KiB
!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=259)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return O})),r.d(e,"c",(function(){return X})),r.d(e,"d",(function(){return G})),r.d(e,"e",(function(){return b})),r.d(e,"f",(function(){return m})),r.d(e,"g",(function(){return b})),r.d(e,"h",(function(){return H})),r.d(e,"i",(function(){return o})),r.d(e,"j",(function(){return F})),r.d(e,"k",(function(){return k}));var n,o,i,u,a,c,l,s,f={},p=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function h(t,e){for(var r in e)t[r]=e[r];return t}function v(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,r){var o,i,u,a={};for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:a[u]=e[u];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===a[u]&&(a[u]=t.defaultProps[u]);return g(t,a,o,i,null)}function g(t,e,r,n,u){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==u?++i:u};return null==u&&null!=o.vnode&&o.vnode(a),a}function m(){return{current:null}}function O(t){return t.children}function w(t,e){this.props=t,this.context=e}function _(t,e){if(null==e)return t.__?_(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?_(t):null}function j(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 j(t)}}function S(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!x.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||c)(x)}function x(){var t,e,r,n,o,i,a,c;for(u.sort(l);t=u.shift();)t.__d&&(e=u.length,n=void 0,o=void 0,a=(i=(r=t).__v).__e,(c=r.__P)&&(n=[],(o=h({},i)).__v=i.__v+1,R(c,i,o,r.__n,void 0!==c.ownerSVGElement,null!=i.__h?[a]:null,n,null==a?_(i):a,i.__h),I(n,i),i.__e!=a&&j(i)),u.length>e&&u.sort(l));x.__r=0}function E(t,e,r,n,o,i,u,a,c,l){var s,y,h,v,b,m,w,j=n&&n.__k||p,S=j.length;for(r.__k=[],s=0;s<e.length;s++)if(null!=(v=r.__k[s]=null==(v=e[s])||"boolean"==typeof v||"function"==typeof v?null:"string"==typeof v||"number"==typeof v||"bigint"==typeof v?g(null,v,null,null,v):d(v)?g(O,{children:v},null,null,null):v.__b>0?g(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)){if(v.__=r,v.__b=r.__b+1,null===(h=j[s])||h&&v.key==h.key&&v.type===h.type)j[s]=void 0;else for(y=0;y<S;y++){if((h=j[y])&&v.key==h.key&&v.type===h.type){j[y]=void 0;break}h=null}R(t,v,h=h||f,o,i,u,a,c,l),b=v.__e,(y=v.ref)&&h.ref!=y&&(w||(w=[]),h.ref&&w.push(h.ref,null,v),w.push(y,v.__c||b,v)),null!=b?(null==m&&(m=b),"function"==typeof v.type&&v.__k===h.__k?v.__d=c=P(v,c,t):c=A(t,v,h,j,b,c),"function"==typeof r.type&&(r.__d=c)):c&&h.__e==c&&c.parentNode!=t&&(c=_(h))}for(r.__e=m,s=S;s--;)null!=j[s]&&("function"==typeof r.type&&null!=j[s].__e&&j[s].__e==r.__d&&(r.__d=D(n).nextSibling),B(j[s],j[s]));if(w)for(s=0;s<w.length;s++)z(w[s],w[++s],w[++s])}function P(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?P(n,e,r):A(r,n,n,o,n.__e,e));return e}function k(t,e){return e=e||[],null==t||"boolean"==typeof t||(d(t)?t.some((function(t){k(t,e)})):e.push(t)),e}function A(t,e,r,n,o,i){var u,a,c;if(void 0!==e.__d)u=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),u=null;else{for(a=i,c=0;(a=a.nextSibling)&&c<n.length;c+=1)if(a==o)break t;t.insertBefore(o,i),u=i}return void 0!==u?u:o.nextSibling}function D(t){var e,r,n;if(null==t.type||"string"==typeof t.type)return t.__e;if(t.__k)for(e=t.__k.length-1;e>=0;e--)if((r=t.__k[e])&&(n=D(r)))return n;return null}function T(t,e,r){"-"===e[0]?t.setProperty(e,null==r?"":r):t[e]=null==r?"":"number"!=typeof r||y.test(e)?r:r+"px"}function N(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||T(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||T(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?C:M,i):t.removeEventListener(e,i?C:M,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==e&&"height"!==e&&"href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&"rowSpan"!==e&&"colSpan"!==e&&e in t)try{t[e]=null==r?"":r;break t}catch(t){}"function"==typeof r||(null==r||!1===r&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,r))}}function M(t){return this.l[t.type+!1](o.event?o.event(t):t)}function C(t){return this.l[t.type+!0](o.event?o.event(t):t)}function R(t,e,r,n,i,u,a,c,l){var s,f,p,y,v,b,g,m,_,j,S,x,P,k,A,D=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(l=r.__h,c=e.__e=r.__e,e.__h=null,u=[c]),(s=o.__b)&&s(e);try{t:if("function"==typeof D){if(m=e.props,_=(s=D.contextType)&&n[s.__c],j=s?_?_.props.value:s.__:n,r.__c?g=(f=e.__c=r.__c).__=f.__E:("prototype"in D&&D.prototype.render?e.__c=f=new D(m,j):(e.__c=f=new w(m,j),f.constructor=D,f.render=U),_&&_.sub(f),f.props=m,f.state||(f.state={}),f.context=j,f.__n=n,p=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=D.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=h({},f.__s)),h(f.__s,D.getDerivedStateFromProps(m,f.__s))),y=f.props,v=f.state,f.__v=e,p)null==D.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==D.getDerivedStateFromProps&&m!==y&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(m,j),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(m,f.__s,j)||e.__v===r.__v){for(e.__v!==r.__v&&(f.props=m,f.state=f.__s,f.__d=!1),f.__e=!1,e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&a.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(m,f.__s,j),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(y,v,b)}))}if(f.context=j,f.props=m,f.__P=t,x=o.__r,P=0,"prototype"in D&&D.prototype.render){for(f.state=f.__s,f.__d=!1,x&&x(e),s=f.render(f.props,f.state,f.context),k=0;k<f._sb.length;k++)f.__h.push(f._sb[k]);f._sb=[]}else do{f.__d=!1,x&&x(e),s=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++P<25);f.state=f.__s,null!=f.getChildContext&&(n=h(h({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(b=f.getSnapshotBeforeUpdate(y,v)),E(t,d(A=null!=s&&s.type===O&&null==s.key?s.props.children:s)?A:[A],e,r,n,i,u,a,c,l),f.base=e.__e,e.__h=null,f.__h.length&&a.push(f),g&&(f.__E=f.__=null),f.__e=!1}else null==u&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=L(r.__e,e,r,n,i,u,a,l);(s=o.diffed)&&s(e)}catch(t){e.__v=null,(l||null!=u)&&(e.__e=c,e.__h=!!l,u[u.indexOf(c)]=null),o.__e(t,e,r)}}function I(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 L(t,e,r,o,i,u,a,c){var l,s,p,y=r.props,h=e.props,b=e.type,g=0;if("svg"===b&&(i=!0),null!=u)for(;g<u.length;g++)if((l=u[g])&&"setAttribute"in l==!!b&&(b?l.localName===b:3===l.nodeType)){t=l,u[g]=null;break}if(null==t){if(null===b)return document.createTextNode(h);t=i?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,h.is&&h),u=null,c=!1}if(null===b)y===h||c&&t.data===h||(t.data=h);else{if(u=u&&n.call(t.childNodes),s=(y=r.props||f).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!c){if(null!=u)for(y={},g=0;g<t.attributes.length;g++)y[t.attributes[g].name]=t.attributes[g].value;(p||s)&&(p&&(s&&p.__html==s.__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||N(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]||N(t,i,e[i],r[i],n)}(t,h,y,i,c),p)e.__k=[];else if(E(t,d(g=e.props.children)?g:[g],e,r,o,i&&"foreignObject"!==b,u,a,u?u[0]:r.__k&&_(r,0),c),null!=u)for(g=u.length;g--;)null!=u[g]&&v(u[g]);c||("value"in h&&void 0!==(g=h.value)&&(g!==t.value||"progress"===b&&!g||"option"===b&&g!==y.value)&&N(t,"value",g,y.value,!1),"checked"in h&&void 0!==(g=h.checked)&&g!==t.checked&&N(t,"checked",g,y.checked,!1))}return t}function z(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,r)}}function B(t,e,r){var n,i;if(o.unmount&&o.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||z(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){o.__e(t,e)}n.base=n.__P=null,t.__c=void 0}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&B(n[i],e,r||"function"!=typeof t.type);r||null==t.__e||v(t.__e),t.__=t.__e=t.__d=void 0}function U(t,e,r){return this.constructor(t,r)}function F(t,e,r){var i,u,a;o.__&&o.__(t,e),u=(i="function"==typeof r)?null:r&&r.__k||e.__k,a=[],R(e,t=(!i&&r||e).__k=b(O,null,[t]),u||f,f,void 0!==e.ownerSVGElement,!i&&r?[r]:u?null:e.firstChild?n.call(e.childNodes):null,a,!i&&r?r:u?u.__e:e.firstChild,i),I(a,t)}function H(t,e){F(t,e,H)}function X(t,e,r){var o,i,u,a,c=h({},t.props);for(u in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),e)"key"==u?o=e[u]:"ref"==u?i=e[u]:c[u]=void 0===e[u]&&void 0!==a?a[u]:e[u];return arguments.length>2&&(c.children=arguments.length>3?n.call(arguments,2):r),g(t.type,c,o||t.key,i||t.ref,null)}function G(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((function(t){t.__e=!0,S(t)}))},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,r,n){for(var o,i,u;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),u=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,n||{}),u=o.__d),u)return o.__E=o}catch(e){t=e}throw t}},i=0,w.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._sb.push(e),S(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},w.prototype.render=O,u=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(t,e){return t.__v.__b-e.__v.__b},x.__r=0,s=0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return Qe})),r.d(e,"c",(function(){return Xt})),r.d(e,"d",(function(){return _t})),r.d(e,"e",(function(){return yt})),r.d(e,"f",(function(){return pt})),r.d(e,"g",(function(){return wt})),r.d(e,"h",(function(){return pr})),r.d(e,"i",(function(){return it})),r.d(e,"j",(function(){return Ot})),r.d(e,"k",(function(){return Qt})),r.d(e,"l",(function(){return ne})),r.d(e,"m",(function(){return et})),r.d(e,"n",(function(){return le})),r.d(e,"o",(function(){return x})),r.d(e,"p",(function(){return Ee})),r.d(e,"q",(function(){return se})),r.d(e,"r",(function(){return be})),r.d(e,"s",(function(){return fr})),r.d(e,"t",(function(){return ye})),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 qe})),r.d(e,"z",(function(){return tr})),r.d(e,"A",(function(){return sr})),r.d(e,"B",(function(){return Se})),r.d(e,"C",(function(){return $})),r.d(e,"D",(function(){return ke})),r.d(e,"E",(function(){return ae})),r.d(e,"F",(function(){return ue})),r.d(e,"G",(function(){return te})),r.d(e,"H",(function(){return qt})),r.d(e,"I",(function(){return Ne})),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 Ce}));var o="An invariant failed, however the error is obfuscated because this is a production build.",i=[];Object.freeze(i);var u={};function a(){return++Ct.mobxGuid}function c(t){throw l(!1,t),"X"}function l(t,e){if(!t)throw new Error("[mobx] "+(e||o))}Object.freeze(u);function s(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var f=function(){};function p(t){return null!==t&&"object"==typeof t}function y(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 h(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return p(t)&&!0===t[r]}}function v(t){return t instanceof Map}function b(t){return t instanceof Set}function g(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 m(t){return t&&t.toString?t.toString():new String(t).toString()}function O(t){return null===t?null:"object"==typeof t?""+t:t}var w="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_=Symbol("mobx administration"),j=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=Z.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 Ut(this)},t.prototype.reportChanged=function(){zt(),function(t){if(t.lowestObserverState===Z.STALE)return;t.lowestObserverState=Z.STALE,t.observers.forEach((function(e){e.dependenciesState===Z.UP_TO_DATE&&(e.isTracing!==J.NONE&&Ft(e,t),e.onBecomeStale()),e.dependenciesState=Z.STALE}))}(this),Bt()},t.prototype.toString=function(){return this.name},t}(),S=h("Atom",j);function x(t,e,r){void 0===e&&(e=f),void 0===r&&(r=f);var n,o=new j(t);return e!==f&&ce("onBecomeObserved",o,e,n),r!==f&&ae(o,r),o}var E={identity:function(t,e){return t===e},structural:function(t,e){return dr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return dr(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])},P(t,e)};
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
this file except in compliance with the License. You may obtain a copy of the
|
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
and limitations under the License.
|
|
***************************************************************************** */var k=function(){return k=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},k.apply(this,arguments)};function A(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 D(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.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 u}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(D(arguments[e]));return t}var N=Symbol("mobx did run lazy initializers"),M=Symbol("mobx pending decorators"),C={},R={};function I(t){var e,r;if(!0!==t[N]){var n=t[M];if(n){d(t,N,!0);var o=T(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var i=A(o),u=i.next();!u.done;u=i.next()){var a=n[u.value];a.propertyCreator(t,a.prop,a.descriptor,a.decoratorTarget,a.decoratorArguments)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}function L(t,e){return function(){var r,n,o=function(n,o,i,u){if(!0===u)return e(n,o,i,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,M)){var a=n[M];d(n,M,k({},a))}return n[M][o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},function(t,e){var r=e?C:R;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return I(this),this[t]},set:function(e){I(this),this[t]=e}})}(o,t)};return(2===(n=arguments).length||3===n.length)&&("string"==typeof n[1]||"symbol"==typeof n[1])||4===n.length&&!0===n[3]?(r=i,o.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),o)}}function z(t,e,r){return je(t)?t:Array.isArray(t)?$.array(t,{name:r}):y(t)?$.object(t,void 0,{name:r}):v(t)?$.map(t,{name:r}):b(t)?$.set(t,{name:r}):t}function B(t){return t}function U(e){l(e);var r=L(!0,(function(t,r,n,o,i){var u=n?n.initializer?n.initializer.call(t):n.value:void 0;ir(t).addObservableProp(r,u,e)})),n=(void 0!==t&&t.env,r);return n.enhancer=e,n}var F={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function H(t){return null==t?F:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(F);var X=U(z),G=U((function(t,e,r){return null==t||sr(t)||qe(t)||tr(t)||nr(t)?t:Array.isArray(t)?$.array(t,{name:r,deep:!1}):y(t)?$.object(t,void 0,{name:r,deep:!1}):v(t)?$.map(t,{name:r,deep:!1}):b(t)?$.set(t,{name:r,deep:!1}):c(!1)})),Y=U(B),V=U((function(t,e,r){return dr(t,e)?e:t}));function W(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?B:z}var K={box:function(t,e){arguments.length>2&&q("box");var r=H(e);return new xt(t,W(r),r.name,!0,r.equals)},array:function(t,e){arguments.length>2&&q("array");var r=H(e);return function(t,e,r,n){void 0===r&&(r="ObservableArray@"+a());void 0===n&&(n=!1);var o=new Ve(r,e,n);i=o.values,u=_,c=o,Object.defineProperty(i,u,{enumerable:!1,writable:!1,configurable:!0,value:c});var i,u,c;var l=new Proxy(o.values,Ye);if(o.proxy=l,t&&t.length){var s=jt(!0);o.spliceWithArray(0,0,t),St(s)}return l}(t,W(r),r.name)},map:function(t,e){arguments.length>2&&q("map");var r=H(e);return new Qe(t,W(r),r.name)},set:function(t,e){arguments.length>2&&q("set");var r=H(e);return new rr(t,W(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&q("object");var n=H(r);if(!1===n.proxy)return se({},t,e,n);var o=fe(n),i=function(t){var e=new Proxy(t,ze);return t[_].proxy=e,e}(se({},void 0,void 0,n));return pe(i,t,e,o),i},ref:Y,shallow:G,deep:X,struct:V},$=function(t,e,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return X.apply(null,arguments);if(je(t))return t;var n=y(t)?$.object(t,e,r):Array.isArray(t)?$.array(t,e):v(t)?$.map(t,e):b(t)?$.set(t,e):t;if(n!==t)return n;c(!1)};function q(t){c("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys(K).forEach((function(t){return $[t]=K[t]}));var Z,J,Q=L(!1,(function(t,e,r,n,o){var i=r.get,u=r.set,a=o[0]||{};ir(t).addComputedProp(t,e,k({get:i,set:u,context:t},a))})),tt=Q({equals:E.structural}),et=function(t,e,r){if("string"==typeof e)return Q.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return Q.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 Pt(n)};et.struct=tt,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"}(Z||(Z={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(J||(J={}));var rt=function(t){this.cause=t};function nt(t){return t instanceof rt}function ot(t){switch(t.dependenciesState){case Z.UP_TO_DATE:return!1;case Z.NOT_TRACKING:case Z.STALE:return!0;case Z.POSSIBLY_STALE:for(var e=pt(!0),r=st(),n=t.observing,o=n.length,i=0;i<o;i++){var u=n[i];if(kt(u)){if(Ct.disableErrorBoundaries)u.get();else try{u.get()}catch(t){return ft(r),yt(e),!0}if(t.dependenciesState===Z.STALE)return ft(r),yt(e),!0}}return dt(t),ft(r),yt(e),!1}}function it(){return null!==Ct.trackingDerivation}function ut(t){var e=t.observers.size>0;Ct.computationDepth>0&&e&&c(!1),Ct.allowStateChanges||!e&&"strict"!==Ct.enforceActions||c(!1)}function at(t,e,r){var n=pt(!0);dt(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Ct.runId;var o,i=Ct.trackingDerivation;if(Ct.trackingDerivation=t,!0===Ct.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new rt(t)}return Ct.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=Z.UP_TO_DATE,o=0,i=t.unboundDepsCount,u=0;u<i;u++){0===(a=r[u]).diffValue&&(a.diffValue=1,o!==u&&(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&&It(a,t),a.diffValue=0}for(;o--;){var a;1===(a=r[o]).diffValue&&(a.diffValue=0,Rt(a,t))}n!==Z.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),yt(n),o}function ct(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)It(e[r],t);t.dependenciesState=Z.NOT_TRACKING}function lt(t){var e=st();try{return t()}finally{ft(e)}}function st(){var t=Ct.trackingDerivation;return Ct.trackingDerivation=null,t}function ft(t){Ct.trackingDerivation=t}function pt(t){var e=Ct.allowStateReads;return Ct.allowStateReads=t,e}function yt(t){Ct.allowStateReads=t}function dt(t){if(t.dependenciesState!==Z.UP_TO_DATE){t.dependenciesState=Z.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=Z.UP_TO_DATE}}var ht=0,vt=1,bt=Object.getOwnPropertyDescriptor((function(){}),"name");bt&&bt.configurable;function gt(t,e,r){var n=function(){return mt(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function mt(t,e,r,n){var o=Ot(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{wt(o)}}function Ot(t,e,r){var n=0,o=st();zt();var i={prevDerivation:o,prevAllowStateChanges:jt(!0),prevAllowStateReads:pt(!0),notifySpy:false,startTime:n,actionId:vt++,parentActionId:ht};return ht=i.actionId,i}function wt(t){ht!==t.actionId&&c("invalid action stack. did you forget to finish an action?"),ht=t.parentActionId,void 0!==t.error&&(Ct.suppressReactionErrors=!0),St(t.prevAllowStateChanges),yt(t.prevAllowStateReads),Bt(),ft(t.prevDerivation),t.notifySpy,Ct.suppressReactionErrors=!1}function _t(t,e){var r,n=jt(t);try{r=e()}finally{St(n)}return r}function jt(t){var e=Ct.allowStateChanges;return Ct.allowStateChanges=t,e}function St(t){Ct.allowStateChanges=t}var xt=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+a()),void 0===o&&(o=!0),void 0===i&&(i=E.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}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))!==Ct.UNCHANGED){false,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(ut(this),Be(this)){var e=Fe(this,{object:this,type:"update",newValue:t});if(!e)return Ct.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Ct.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),He(this)&&Ge(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 Ue(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),Xe(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return O(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(j),Et=h("ObservableValue",xt),Pt=function(){function t(t){this.dependenciesState=Z.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=Z.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+a(),this.value=new rt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=J.NONE,l(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+a(),t.set&&(this.setter=gt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?E.structural:E.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==Z.UP_TO_DATE)return;t.lowestObserverState=Z.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===Z.UP_TO_DATE&&(e.dependenciesState=Z.POSSIBLY_STALE,e.isTracing!==J.NONE&&Ft(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&&c("Cycle detected in computation "+this.name+": "+this.derivation),0!==Ct.inBatch||0!==this.observers.size||this.keepAlive?(Ut(this),ot(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===Z.STALE)return;t.lowestObserverState=Z.STALE,t.observers.forEach((function(e){e.dependenciesState===Z.POSSIBLY_STALE?e.dependenciesState=Z.STALE:e.dependenciesState===Z.UP_TO_DATE&&(t.lowestObserverState=Z.UP_TO_DATE)}))}(this)):ot(this)&&(this.warnAboutUntrackedRead(),zt(),this.value=this.computeValue(!1),Bt());var t=this.value;if(nt(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(nt(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){l(!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 l(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===Z.NOT_TRACKING,r=this.computeValue(!0),n=e||nt(t)||nt(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Ct.computationDepth++,t)e=at(this,this.derivation,this.scope);else if(!0===Ct.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new rt(t)}return Ct.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(ct(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 u=st();t({type:"update",object:r,newValue:i,oldValue:o}),ft(u)}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 O(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),kt=h("ComputedValue",Pt),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},Dt={};function Tt(){return"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:Dt}var Nt=!0,Mt=!1,Ct=function(){var t=Tt();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Nt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new At).version&&(Nt=!1),Nt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new At):(setTimeout((function(){Mt||c("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new At)}();function Rt(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function It(t,e){t.observers.delete(e),0===t.observers.size&&Lt(t)}function Lt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Ct.pendingUnobservations.push(t))}function zt(){Ct.inBatch++}function Bt(){if(0==--Ct.inBatch){Vt();for(var t=Ct.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 Pt&&r.suspend())}Ct.pendingUnobservations=[]}}function Ut(t){var e=Ct.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&&Ct.inBatch>0&&Lt(t),!1)}function Ft(t,e){if(t.isTracing===J.BREAK){var r=[];Ht(ye(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 Pt?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}function Ht(t,e,r){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(r).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Ht(t,e,r+1)})))}var Xt=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=Z.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=J.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ct.pendingReactions.push(this),Vt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(zt(),this._isScheduled=!1,ot(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Bt()}},t.prototype.track=function(t){if(!this.isDisposed){zt();false,this._isRunning=!0;var e=at(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ct(this),nt(e)&&this.reportExceptionInDerivation(e.cause),Bt()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Ct.disableErrorBoundaries)throw t;Ct.suppressReactionErrors,Ct.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(zt(),ct(this),Bt()))},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=function(t){switch(t.length){case 0:return Ct.trackingDerivation;case 1:return fr(t[0]);case 2:return fr(t[0],t[1])}}(t);if(!n)return c(!1);n.isTracing,J.NONE;n.isTracing=r?J.BREAK:J.LOG}(this,t)},t}();var Gt=100,Yt=function(t){return t()};function Vt(){Ct.inBatch>0||Ct.isRunningReactions||Yt(Wt)}function Wt(){Ct.isRunningReactions=!0;for(var t=Ct.pendingReactions,e=0;t.length>0;){++e===Gt&&t.splice(0);for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Ct.isRunningReactions=!1}var Kt=h("Reaction",Xt);function $t(t){var e=Yt;Yt=function(r){return t((function(){return e(r)}))}}function qt(t){return function(){}}function Zt(){c(!1)}function Jt(t){return function(e,r,n){if(n){if(n.value)return{value:gt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return gt(t,o.call(this))}}}return function(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))}})}}(t).apply(this,arguments)}}var Qt=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?gt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?gt(t,e):1===arguments.length&&"string"==typeof t?Jt(t):!0!==n?Jt(e).apply(null,arguments):void d(t,e,gt(t.name||e,r.value,this))};function te(t,e){return mt("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,gt(e,r.bind(t)))}function ne(t,e){void 0===e&&(e=u);var r,n=e&&e.name||t.name||"Autorun@"+a();if(!e.scheduler&&!e.delay)r=new Xt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ie(e),i=!1;r=new Xt(n,(function(){i||(i=!0,o((function(){i=!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 ue(t,e,r){void 0===r&&(r=u);var n,o,i,c=r.name||"Reaction@"+a(),l=Qt(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),s=!r.scheduler&&!r.delay,f=ie(r),p=!0,y=!1,d=r.compareStructural?E.structural:r.equals||E.default,h=new Xt(c,(function(){p||s?v():y||(y=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(y=!1,!h.isDisposed){var e=!1;h.track((function(){var r=t(h);e=p||!d(i,r),i=r})),p&&r.fireImmediately&&l(i,h),p||!0!==e||l(i,h),p&&(p=!1)}}return h.schedule(),h.getDisposer()}function ae(t,e,r){return ce("onBecomeUnobserved",t,e,r)}function ce(t,e,r,n){var o="function"==typeof n?fr(e,r):fr(e),i="function"==typeof n?n:r,u=t+"Listeners";return o[u]?o[u].add(i):o[u]=new Set([i]),"function"!=typeof o[t]?c(!1):function(){var t=o[u];t&&(t.delete(i),0===t.size&&delete o[u])}}function le(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,u=t.reactionRequiresObservable,a=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Ct.pendingReactions.length||Ct.inBatch||Ct.isRunningReactions)&&c("isolateGlobalState should be called before MobX is running any reactions"),Mt=!0,Nt&&(0==--Tt().__mobxInstanceCount&&(Tt().__mobxGlobals=void 0),Ct=new At)),void 0!==e){var l=void 0;switch(e){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:c("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Ct.enforceActions=l,Ct.allowStateChanges=!0!==l&&"strict"!==l}void 0!==r&&(Ct.computedRequiresReaction=!!r),void 0!==u&&(Ct.reactionRequiresObservable=!!u),void 0!==a&&(Ct.observableRequiresReaction=!!a,Ct.allowStateReads=!Ct.observableRequiresReaction),void 0!==n&&(Ct.computedConfigurable=!!n),void 0!==o&&(Ct.disableErrorBoundaries=!!o),i&&$t(i)}function se(t,e,r,n){var o=fe(n=H(n));return I(t),ir(t,n.name,o.enhancer),e&&pe(t,e,r,o),t}function fe(t){return t.defaultDecorator||(!1===t.deep?Y:X)}function pe(t,e,r,n){var o,i;zt();try{var u=w(e);try{for(var a=A(u),c=a.next();!c.done;c=a.next()){var l=c.value,s=Object.getOwnPropertyDescriptor(e,l);0;var f=(r&&l in r?r[l]:s.get?Q:n)(t,l,s,!0);f&&Object.defineProperty(t,l,f)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}}finally{Bt()}}function ye(t,e){return de(fr(t,e))}function de(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(de)),n}var he=0;function ve(){this.message="FLOW_CANCELLED"}function be(t){1!==arguments.length&&c("Flow expects 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=arguments,o=++he,i=Qt(e+" - runid: "+o+" - init",t).apply(this,n),u=void 0,a=new Promise((function(t,n){var a=0;function c(t){var r;u=void 0;try{r=Qt(e+" - runid: "+o+" - yield "+a++,i.next).call(i,t)}catch(t){return n(t)}s(r)}function l(t){var r;u=void 0;try{r=Qt(e+" - runid: "+o+" - yield "+a++,i.throw).call(i,t)}catch(t){return n(t)}s(r)}function s(e){if(!e||"function"!=typeof e.then)return e.done?t(e.value):(u=Promise.resolve(e.value)).then(c,l);e.then(s,n)}r=n,c(void 0)}));return a.cancel=Qt(e+" - runid: "+o+" - cancel",(function(){try{u&&ge(u);var t=i.return(void 0),e=Promise.resolve(t.value);e.then(f,f),ge(e),r(new ve)}catch(t){r(t)}})),a}}function ge(t){"function"==typeof t.cancel&&t.cancel()}function me(t,e){if(null==t)return!1;if(void 0!==e){if(!1===sr(t))return!1;if(!t[_].values.has(e))return!1;var r=fr(t,e);return kt(r)}return kt(t)}function Oe(t){return arguments.length>1?c(!1):me(t)}function we(t,e){return"string"!=typeof e?c(!1):me(t,e)}function _e(t,e){return null!=t&&(void 0!==e?!!sr(t)&&t[_].values.has(e):sr(t)||!!t[_]||S(t)||Kt(t)||kt(t))}function je(t){return 1!==arguments.length&&c(!1),_e(t)}function Se(t){return sr(t)?t[_].getKeys():tr(t)||nr(t)?Array.from(t.keys()):qe(t)?t.map((function(t,e){return e})):c(!1)}function xe(t){return sr(t)?Se(t).map((function(e){return t[e]})):tr(t)?Se(t).map((function(e){return t.get(e)})):nr(t)?Array.from(t.values()):qe(t)?t.slice():c(!1)}function Ee(t){return sr(t)?Se(t).map((function(e){return[e,t[e]]})):tr(t)?Se(t).map((function(e){return[e,t.get(e)]})):nr(t)?Array.from(t.entries()):qe(t)?t.map((function(t,e){return[e,t]})):c(!1)}function Pe(t,e,r){if(2!==arguments.length||nr(t))if(sr(t)){var n=t[_];n.values.get(e)?n.write(e,r):n.addObservableProp(e,r,n.defaultEnhancer)}else if(tr(t))t.set(e,r);else if(nr(t))t.add(e);else{if(!qe(t))return c(!1);"number"!=typeof e&&(e=parseInt(e,10)),l(e>=0,"Not a valid index: '"+e+"'"),zt(),e>=t.length&&(t.length=e+1),t[e]=r,Bt()}else{zt();var o=e;try{for(var i in o)Pe(t,i,o[i])}finally{Bt()}}}function ke(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return pr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return pr(t).observe(e,r)}(t,e,r)}ve.prototype=Object.create(Error.prototype);var Ae={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function De(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Te(t,e,r){if(!e.recurseEverything&&!je(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(Et(t))return Te(t.get(),e,r);if(je(t)&&Se(t),!0===e.detectCycles&&null!==t&&r.has(t))return r.get(t);if(qe(t)||Array.isArray(t)){var n=De(r,t,[],e),o=t.map((function(t){return Te(t,e,r)}));n.length=o.length;for(var i=0,u=o.length;i<u;i++)n[i]=o[i];return n}if(nr(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===e.exportMapsAsObjects){var a=De(r,t,new Set,e);return t.forEach((function(t){a.add(Te(t,e,r))})),a}var c=De(r,t,[],e);return t.forEach((function(t){c.push(Te(t,e,r))})),c}if(tr(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===e.exportMapsAsObjects){var l=De(r,t,new Map,e);return t.forEach((function(t,n){l.set(n,Te(t,e,r))})),l}var s=De(r,t,{},e);return t.forEach((function(t,n){s[n]=Te(t,e,r)})),s}var f=De(r,t,{},e);return g(t).forEach((function(n){f[n]=Te(t[n],e,r)})),f}function Ne(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=Ae),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),Te(t,e,r)}function Me(t,e){void 0===e&&(e=void 0),zt();try{return t.apply(e)}finally{Bt()}}function Ce(t,e,r){return 1===arguments.length||e&&"object"==typeof e?function(t,e){0;var r,n=new Promise((function(n,o){var i=Re(t,n,k(k({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}(t,e):Re(t,e,r||{})}function Re(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@"+a();var o=gt(r.name+"-effect",e),i=ne((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function Ie(t){return t[_]}function Le(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=Ie(t);return Le(e)?r.has(e):e in t},get:function(t,e){if(e===_||"constructor"===e||e===N)return t[e];var r=Ie(t),n=r.values.get(e);if(n instanceof j){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)&&(Pe(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 c("Dynamic observable objects cannot be frozen"),!1}};function Be(t){return void 0!==t.interceptors&&t.interceptors.length>0}function Ue(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 Fe(t,e){var r=st();try{for(var n=T(t.interceptors||[]),o=0,i=n.length;o<i&&(l(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{ft(r)}}function He(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function Xe(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 Ge(t,e){var r=st(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);ft(r)}}var Ye={get:function(t,e){return e===_?t[_]:"length"===e?t[_].getArrayLength():"number"==typeof e?We.get.call(t,e):"string"!=typeof e||isNaN(e)?We.hasOwnProperty(e)?We[e]:t[e]:We.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[_].setArrayLength(r),"number"==typeof e&&We.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:We.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return c("Observable arrays cannot be frozen"),!1}};var Ve=function(){function t(t,e,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new j(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 Ue(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}),Xe(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 o=this.values.length;if(void 0===t?t=0:t>o?t=o:t<0&&(t=Math.max(0,o+t)),e=1===arguments.length?o-t:null==e?0:Math.max(0,Math.min(e,o-t)),void 0===r&&(r=i),Be(this)){var u=Fe(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:r});if(!u)return i;e=u.removedCount,r=u.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,T([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=He(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Ge(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=He(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&&Ge(this,i)},t}(),We={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&&t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t])},set:function(t,e){var r=this[_],n=r.values;if(t<n.length){ut(r.atom);var o=n[t];if(Be(r)){var i=Fe(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]&&(We[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]&&(We[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){We[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 Ke,$e=h("ObservableArrayAdministration",Ve);function qe(t){return p(t)&&$e(t[_])}var Ze,Je={},Qe=function(){function t(t,e,r){if(void 0===e&&(e=z),void 0===r&&(r="ObservableMap@"+a()),this.enhancer=e,this.name=r,this[Ke]=Je,this._keysAtom=x(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(!Ct.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new xt(this._has(t),B,this.name+"."+m(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(Be(this)){var n=Fe(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),Be(this))&&!(n=Fe(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=He(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&&Ge(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))!==Ct.UNCHANGED){var n=!1,o=He(this),i=o?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;n,r.setNewValue(e),o&&Ge(this,i)}},t.prototype._addValue=function(t,e){var r=this;ut(this._keysAtom),Me((function(){var n=new xt(e,r.enhancer,r.name+"."+m(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=!1,o=He(this),i=o?{type:"add",object:this,name:t,newValue:e}:null;o&&Ge(this,i)},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 gr({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 gr({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[(Ke=_,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var r,n;try{for(var o=A(this),i=o.next();!i.done;i=o.next()){var u=D(i.value,2),a=u[0],c=u[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 tr(t)&&(t=t.toJS()),Me((function(){var r=jt(!0);try{y(t)?g(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=D(t,2),n=r[0],o=r[1];return e.set(n,o)})):v(t)?(t.constructor!==Map&&c("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,r){return e.set(r,t)}))):null!=t&&c("Cannot initialize map from "+t)}finally{St(r)}})),this},t.prototype.clear=function(){var t=this;Me((function(){lt((function(){var e,r;try{for(var n=A(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,u=function(t){if(v(t)||tr(t))return t;if(Array.isArray(t))return new Map(t);if(y(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return c("Cannot convert to map from '"+t+"'")}(t),a=new Map,l=!1;try{for(var s=A(e._data.keys()),f=s.next();!f.done;f=s.next()){var p=f.value;if(!u.has(p))if(e.delete(p))l=!0;else{var d=e._data.get(p);a.set(p,d)}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}try{for(var h=A(u.entries()),b=h.next();!b.done;b=h.next()){var g=D(b.value,2),m=(p=g[0],d=g[1],e._data.has(p));if(e.set(p,d),e._data.has(p)){var O=e._data.get(p);a.set(p,O),m||(l=!0)}}}catch(t){o={error:t}}finally{try{b&&!b.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}if(!l)if(e._data.size!==a.size)e._keysAtom.reportChanged();else for(var w=e._data.keys(),_=a.keys(),j=w.next(),S=_.next();!j.done;){if(j.value!==S.value){e._keysAtom.reportChanged();break}j=w.next(),S=_.next()}e._data=a})),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=A(this),o=n.next();!o.done;o=n.next()){var i=D(o.value,2),u=i[0],a=i[1];r["symbol"==typeof u?u:m(u)]=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 m(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return Xe(this,t)},t.prototype.intercept=function(t){return Ue(this,t)},t}(),tr=h("ObservableMap",Qe),er={},rr=function(){function t(t,e,r){if(void 0===e&&(e=z),void 0===r&&(r="ObservableSet@"+a()),this.name=r,this[Ze]=er,this._data=new Set,this._atom=x(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=A(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=A(this),i=o.next();!i.done;i=o.next()){var u=i.value;t.call(e,u,u,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),Be(this))&&!(o=Fe(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=!1,n=He(this),o=n?{type:"add",object:this,newValue:t}:null;r,n&&Ge(this,o)}return this},t.prototype.delete=function(t){var e=this;if(Be(this)&&!(n=Fe(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=He(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Me((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Ge(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 gr({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 gr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return nr(t)&&(t=t.toJS()),Me((function(){var r=jt(!0);try{Array.isArray(t)||b(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&c("Cannot initialize set from "+t)}finally{St(r)}})),this},t.prototype.observe=function(t,e){return Xe(this,t)},t.prototype.intercept=function(t){return Ue(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(Ze=_,Symbol.iterator)]=function(){return this.values()},t}(),nr=h("ObservableSet",rr),or=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 j(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 Pt)n.set(e);else{if(Be(this)){if(!(u=Fe(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=u.newValue}if((e=n.prepareNewValue(e))!==Ct.UNCHANGED){var o=He(this),i=!1,u=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;i,n.setNewValue(e),o&&Ge(this,u)}}},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 xt(n,B,this.name+"."+m(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(Be(this)){var o=Fe(this,{object:this.proxy||n,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new xt(e,r,this.name+"."+m(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return ur[t]||(ur[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,u=this.target;r.name=r.name||this.name+"."+m(e),this.values.set(e,new Pt(r)),(t===u||(n=t,o=e,!(i=Object.getOwnPropertyDescriptor(n,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return ar[t]||(ar[t]={configurable:Ct.computedConfigurable,enumerable:!1,get:function(){return cr(this).read(t)},set:function(e){cr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Be(this))if(!(a=Fe(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{zt();var r=He(this),n=!1,o=this.values.get(t),i=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var u=this.pendingKeys.get(t);u&&u.set(!1)}delete this.target[t];var a=r?{type:"remove",object:this.proxy||e,oldValue:i,name:t}:null;n,r&&Ge(this,a)}finally{Bt()}}},t.prototype.illegalAccess=function(t,e){},t.prototype.observe=function(t,e){return Xe(this,t)},t.prototype.intercept=function(t){return Ue(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=He(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Ge(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=A(this.values),o=n.next();!o.done;o=n.next()){var i=D(o.value,2),u=i[0];i[1]instanceof xt&&r.push(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}();function ir(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=z),Object.prototype.hasOwnProperty.call(t,_))return t[_];y(t)||(e=(t.constructor.name||"ObservableObject")+"@"+a()),e||(e="ObservableObject@"+a());var n=new or(t,new Map,m(e),r);return d(t,_,n),n}var ur=Object.create(null),ar=Object.create(null);function cr(t){var e=t[_];return e||(I(t),t[_])}var lr=h("ObservableObjectAdministration",or);function sr(t){return!!p(t)&&(I(t),lr(t[_]))}function fr(t,e){if("object"==typeof t&&null!==t){if(qe(t))return void 0!==e&&c(!1),t[_].atom;if(nr(t))return t[_];if(tr(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||c(!1),n)}var n;if(I(t),e&&!t[_]&&t[e],sr(t))return e?((n=t[_].values.get(e))||c(!1),n):c(!1);if(S(t)||kt(t)||Kt(t))return t}else if("function"==typeof t&&Kt(t[_]))return t[_];return c(!1)}function pr(t,e){return t||c("Expecting some object"),void 0!==e?pr(fr(t,e)):S(t)||kt(t)||Kt(t)||tr(t)||nr(t)?t:(I(t),t[_]?t[_]:void c(!1))}var yr=Object.prototype.toString;function dr(t,e,r){return void 0===r&&(r=-1),hr(t,e,r)}function hr(t,e,r,n,o){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;if("function"!==i&&"object"!==i&&"object"!=typeof e)return!1;var u=yr.call(t);if(u!==yr.call(e))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":r>=0&&r++}t=vr(t),e=vr(e);var a="[object Array]"===u;if(!a){if("object"!=typeof t||"object"!=typeof e)return!1;var c=t.constructor,l=e.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var s=(n=n||[]).length;s--;)if(n[s]===t)return o[s]===e;if(n.push(t),o.push(e),a){if((s=t.length)!==e.length)return!1;for(;s--;)if(!hr(t[s],e[s],r-1,n,o))return!1}else{var f=Object.keys(t),p=void 0;if(s=f.length,Object.keys(e).length!==s)return!1;for(;s--;)if(!br(e,p=f[s])||!hr(t[p],e[p],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function vr(t){return qe(t)?t.slice():v(t)||tr(t)||b(t)||nr(t)?Array.from(t.entries()):t}function br(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function gr(t){return t[Symbol.iterator]=mr,t}function mr(){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:qt,extras:{getDebugName:function(t,e){return(void 0!==e?fr(t,e):sr(t)||tr(t)||nr(t)?pr(t):fr(t)).name}},$mobx:_})}).call(this,r(136),r(77))},function(t,e,r){var n=r(125),o=r(45),i=r(209);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";var n=r(46),o=r(111),i=r(93),u=r(64),a=r(44).f,c=r(130),l=r(131),s=r(49),f=r(40),p="Array Iterator",y=u.set,d=u.getterFor(p);t.exports=c(Array,"Array",(function(t,e){y(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=d(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,l(void 0,!0)):l("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values");var h=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!s&&f&&"values"!==h.name)try{a(h,"name",{value:"values"})}catch(t){}},function(t,e,r){"use strict";var n=r(173).charAt,o=r(42),i=r(64),u=r(130),a=r(131),c="String Iterator",l=i.set,s=i.getterFor(c);u(String,"String",(function(t){l(this,{type:c,string:o(t),index:0})}),(function(){var t,e=s(this),r=e.string,o=e.index;return o>=r.length?a(void 0,!0):(t=n(r,o),e.index+=t.length,a(t,!1))}))},function(t,e,r){var n=r(34),o=r(174),i=r(175),u=r(3),a=r(73),c=r(33),l=c("iterator"),s=c("toStringTag"),f=u.values,p=function(t,e){if(t){if(t[l]!==f)try{a(t,l,f)}catch(e){t[l]=f}if(t[s]||a(t,s,e),o[e])for(var r in u)if(t[r]!==u[r])try{a(t,r,u[r])}catch(e){t[r]=u[r]}}};for(var y in o)p(n[y]&&n[y].prototype,y);p(i,"DOMTokenList")},function(t,e,r){r(200),r(204),r(205),r(206),r(208)},function(t,e,r){"use strict";var n=r(13),o=r(40),i=r(34),u=r(21),a=r(38),c=r(30),l=r(62),s=r(42),f=r(88),p=r(154),y=i.Symbol,d=y&&y.prototype;if(o&&c(y)&&(!("description"in d)||void 0!==y().description)){var h={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:s(arguments[0]),e=l(d,this)?new y(t):void 0===t?y():y(t);return""===t&&(h[e]=!0),e};p(v,y),v.prototype=d,d.constructor=v;var b="Symbol(test)"==String(y("test")),g=u(d.valueOf),m=u(d.toString),O=/^Symbol\((.*)\)[^)]+$/,w=u("".replace),_=u("".slice);f(d,"description",{configurable:!0,get:function(){var t=g(this);if(a(h,t))return"";var e=m(t),r=b?_(e,7,-1):w(e,O,"$1");return""===r?void 0:r}}),n({global:!0,constructor:!0,forced:!0},{Symbol:v})}},function(t,e,r){r(127)("iterator")},function(t,e,r){var n=r(127),o=r(163);n("toPrimitive"),o()},function(t,e,r){var n=r(38),o=r(45),i=r(222),u=r(33)("toPrimitive"),a=Date.prototype;n(a,u)||o(a,u,i)},function(t,e,r){"use strict";var n=r(13),o=r(49),i=r(40),u=r(34),a=r(162),c=r(21),l=r(107),s=r(38),f=r(171),p=r(62),y=r(80),d=r(147),h=r(19),v=r(84).f,b=r(56).f,g=r(44).f,m=r(178),O=r(179).trim,w="Number",_=u[w],j=a[w],S=_.prototype,x=u.TypeError,E=c("".slice),P=c("".charCodeAt),k=function(t){var e,r,n,o,i,u,a,c,l=d(t,"number");if(y(l))throw x("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=O(l),43===(e=P(l,0))||45===e){if(88===(r=P(l,2))||120===r)return NaN}else if(48===e){switch(P(l,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+l}for(u=(i=E(l,2)).length,a=0;a<u;a++)if((c=P(i,a))<48||c>o)return NaN;return parseInt(i,n)}return+l},A=l(w,!_(" 0o1")||!_("0b1")||_("+0x1")),D=function(t){var e,r=arguments.length<1?0:_(function(t){var e=d(t,"number");return"bigint"==typeof e?e:k(e)}(t));return p(S,e=this)&&h((function(){m(e)}))?f(Object(r),this,D):r};D.prototype=S,A&&!o&&(S.constructor=D),n({global:!0,constructor:!0,wrap:!0,forced:A},{Number:D});var T=function(t,e){for(var r,n=i?v(e):"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(","),o=0;n.length>o;o++)s(e,r=n[o])&&!s(t,r)&&g(t,r,b(e,r))};o&&j&&T(a[w],j),(A||o)&&T(a[w],_)},function(t,e,r){var n=r(34),o=r(174),i=r(175),u=r(220),a=r(73),c=function(t){if(t&&t.forEach!==u)try{a(t,"forEach",u)}catch(e){t.forEach=u}};for(var l in o)o[l]&&c(n[l]&&n[l].prototype);c(i)},function(t,e,r){var n=r(34),o=r(56).f,i=r(73),u=r(45),a=r(122),c=r(154),l=r(107);t.exports=function(t,e){var r,s,f,p,y,d=t.target,h=t.global,v=t.stat;if(r=h?n:v?n[d]||a(d,{}):(n[d]||{}).prototype)for(s in e){if(p=e[s],f=t.dontCallGetSet?(y=o(r,s))&&y.value:r[s],!l(h?s:d+(v?".":"#")+s,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),u(r,s,p,t)}}},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 _})),r.d(e,"i",(function(){return m})),r.d(e,"j",(function(){return b})),r.d(e,"b",(function(){return M})),r.d(e,"d",(function(){return vt})),r.d(e,"e",(function(){return L})),r.d(e,"f",(function(){return C})),r.d(e,"g",(function(){return yt}));var n,o,i,u,a=r(0),c=0,l=[],s=[],f=a.i.__b,p=a.i.__r,y=a.i.diffed,d=a.i.__c,h=a.i.unmount;function v(t,e){a.i.__h&&a.i.__h(o,t,c||e),c=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:s}),r.__[t]}function b(t){return c=1,g(A,t)}function g(t,e,r){var i=v(n++,2);if(i.t=t,!i.__c&&(i.__=[r?r(e):A(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],r=i.t(e,t);e!==r&&(i.__N=[r,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var u=function(t,e,r){if(!i.__c.__H)return!0;var n=i.__c.__H.__.filter((function(t){return t.__c}));if(n.every((function(t){return!t.__N})))return!a||a.call(this,t,e,r);var o=!1;return n.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}})),!(!o&&i.__c.props===t)&&(!a||a.call(this,t,e,r))};o.u=!0;var a=o.shouldComponentUpdate,c=o.componentWillUpdate;o.componentWillUpdate=function(t,e,r){if(this.__e){var n=a;a=void 0,u(t,e,r),a=n}c&&c.call(this,t,e,r)},o.shouldComponentUpdate=u}return i.__N||i.__}function m(t,e){var r=v(n++,3);!a.i.__s&&k(r.__H,e)&&(r.__=t,r.i=e,o.__H.__h.push(r))}function O(t,e){var r=v(n++,4);!a.i.__s&&k(r.__H,e)&&(r.__=t,r.i=e,o.__h.push(r))}function w(t,e){var r=v(n++,7);return k(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function _(t,e){return c=8,w((function(){return t}),e)}function j(){for(var t;t=l.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(E),t.__H.__h.forEach(P),t.__H.__h=[]}catch(e){t.__H.__h=[],a.i.__e(e,t.__v)}}a.i.__b=function(t){o=null,f&&f(t)},a.i.__r=function(t){p&&p(t),n=0;var e=(o=t.__c).__H;e&&(i===o?(e.__h=[],o.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=s,t.__N=t.i=void 0}))):(e.__h.forEach(E),e.__h.forEach(P),e.__h=[],n=0)),i=o},a.i.diffed=function(t){y&&y(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==l.push(e)&&u===a.i.requestAnimationFrame||((u=a.i.requestAnimationFrame)||x)(j)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==s&&(t.__=t.__V),t.i=void 0,t.__V=s}))),i=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.__||P(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],a.i.__e(r,t.__v)}})),d&&d(t,e)},a.i.unmount=function(t){h&&h(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{E(t)}catch(t){e=t}})),r.__H=void 0,e&&a.i.__e(e,r.__v))};var S="function"==typeof requestAnimationFrame;function x(t){var e,r=function(){clearTimeout(n),S&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);S&&(e=requestAnimationFrame(r))}function E(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function P(t){var e=o;t.__c=t.__(),o=e}function k(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function A(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 T(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 N(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e}function M(t){this.props=t}function C(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:T(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}(M.prototype=new a.a).isPureReactComponent=!0,M.prototype.shouldComponentUpdate=function(t,e){return T(this.props,t)||T(this.state,e)};var R=a.i.__b;a.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),R&&R(t)};var I="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function L(t){function e(e){var r=D({},e);return delete r.ref,t(r,e.ref||null)}return e.$$typeof=I,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var z=function(t,e){return null==t?null:Object(a.k)(Object(a.k)(t).map(e))},B={map:z,forEach:z,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},U=a.i.__e;a.i.__e=function(t,e,r,n){if(t.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),o.__c(t,e);U(t,e,r,n)};var F=a.i.unmount;function H(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=D({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return H(t,e,r)}))),t}function X(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return X(t,e,r)})),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function G(){this.__u=0,this.t=null,this.__b=null}function Y(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function V(){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),F&&F(t)},(G.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=Y(n.__v),i=!1,u=function(){i||(i=!0,r.__R=null,o?o(a):a())};r.__R=u;var a=function(){if(!--n.__u){if(n.state.__a){var t=n.state.__a;n.__v.__k[0]=X(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__a:n.__b=null});e=n.t.pop();)e.forceUpdate()}},c=!0===e.__h;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(u,u)},G.prototype.componentWillUnmount=function(){this.t=[]},G.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]=H(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__a&&Object(a.e)(a.b,null,t.fallback);return o&&(o.__h=null),[Object(a.e)(a.b,null,e.__a?null:t.children),o]};var W=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 K(t){return this.getChildContext=function(){return t.context},t.children}function $(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)(K,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(V.prototype=new a.a).__a=function(t){var e=this,r=Y(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),W(e,t,n)):o()};r?r(i):i()}},V.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},V.prototype.componentDidUpdate=V.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){W(t,r,e)}))};var q="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Z=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Q=/[A-Z0-9]/g,tt="undefined"!=typeof document,et=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).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 rt=a.i.event;function nt(){}function ot(){return this.cancelBubble}function it(){return this.defaultPrevented}a.i.event=function(t){return rt&&(t=rt(t)),t.persist=nt,t.isPropagationStopped=ot,t.isDefaultPrevented=it,t.nativeEvent=t};var ut,at={enumerable:!1,configurable:!0,get:function(){return this.class}},ct=a.i.vnode;a.i.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,r=t.type,n={};for(var o in e){var i=e[o];if(!("value"===o&&"defaultValue"in e&&null==i||tt&&"children"===o&&"noscript"===r||"class"===o||"className"===o)){var u=o.toLowerCase();"defaultValue"===o&&"value"in e&&null==e.value?o="value":"download"===o&&!0===i?i="":"ondoubleclick"===u?o="ondblclick":"onchange"!==u||"input"!==r&&"textarea"!==r||et(e.type)?"onfocus"===u?o="onfocusin":"onblur"===u?o="onfocusout":J.test(o)?o=u:-1===r.indexOf("-")&&Z.test(o)?o=o.replace(Q,"-$&").toLowerCase():null===i&&(i=void 0):u=o="oninput","oninput"===u&&n[o=u]&&(o="oninputCapture"),n[o]=i}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=Object(a.k)(e.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=Object(a.k)(e.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),e.class&&!e.className?(n.class=e.class,Object.defineProperty(n,"className",at)):(e.className&&!e.class||e.class&&e.className)&&(n.class=n.className=e.className),t.props=n}(t),t.$$typeof=q,ct&&ct(t)};var lt=a.i.__r;a.i.__r=function(t){lt&<(t),ut=t.__c};var st=a.i.diffed;a.i.diffed=function(t){st&&st(t);var e=t.props,r=t.__e;null!=r&&"textarea"===t.type&&"value"in e&&e.value!==r.value&&(r.value=null==e.value?"":e.value),ut=null};var ft={ReactCurrentDispatcher:{current:{readContext:function(t){return ut.__n[t.__c].props.value}}}};function pt(t){return!!t&&t.$$typeof===q}var yt=function(t,e){return t(e)},dt=a.b;function ht(t){t()}var vt={useState:b,useId:function(){var t=v(n++,11);if(!t.__){for(var e=o.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__},useReducer:g,useEffect:m,useLayoutEffect:O,useInsertionEffect:O,useTransition:function(){return[!1,ht]},useDeferredValue:function(t){return t},useSyncExternalStore:function(t,e){var r=e(),n=b({h:{__:r,v:e}}),o=n[0].h,i=n[1];return O((function(){o.__=r,o.v=e,N(o.__,e())||i({h:o})}),[t,r,e]),m((function(){return N(o.__,o.v())||i({h:o}),t((function(){N(o.__,o.v())||i({h:o})}))}),[t]),r},startTransition:ht,useRef:function(t){return c=5,w((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){c=6,O((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==r?r:r.concat(t))},useMemo:w,useCallback:_,useContext:function(t){var e=o.context[t.__c],r=v(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:B,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){var r=Object(a.e)($,{__v:t,i:e});return r.containerInfo=e,r},createElement:a.e,createContext:a.d,createFactory:function(t){return a.e.bind(null,t)},cloneElement:function(t){return pt(t)?a.c.apply(null,arguments):t},createRef:a.f,Fragment:a.b,isValidElement:pt,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:a.a,PureComponent:M,memo:C,forwardRef:L,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:yt,StrictMode:dt,Suspense:G,SuspenseList:V,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:ft}},function(t,e,r){r(13)({target:"Object",stat:!0},{setPrototypeOf:r(113)})},function(t,e,r){var n=r(13),o=r(19),i=r(43),u=r(112),a=r(166);n({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!a},{getPrototypeOf:function(t){return u(i(t))}})},function(t,e,r){var n=r(13),o=r(48),i=r(92),u=r(236),a=r(190),c=r(39),l=r(41),s=r(66),f=r(19),p=o("Reflect","construct"),y=Object.prototype,d=[].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){a(t),c(e);var r=arguments.length<3?t:a(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(d,n,e),new(i(u,t,n))}var o=r.prototype,f=s(l(o)?o:y),b=i(t,f,e);return l(b)?b:f}})},function(t,e,r){"use strict";var n=r(13),o=r(91),i=r(109),u=r(41),a=r(85),c=r(54),l=r(46),s=r(74),f=r(33),p=r(94),y=r(110),d=p("slice"),h=f("species"),v=Array,b=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(t,e){var r,n,f,p=l(this),d=c(p),g=a(t,d),m=a(void 0===e?d:e,d);if(o(p)&&(r=p.constructor,(i(r)&&(r===v||o(r.prototype))||u(r)&&null===(r=r[h]))&&(r=void 0),r===v||void 0===r))return y(p,g,m);for(n=new(void 0===r?v:r)(b(m-g,0)),f=0;g<m;g++,f++)g in p&&s(n,f,p[g]);return n.length=f,n}})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";var n=r(13),o=r(115);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){var n=r(78),o=Function.prototype,i=o.call,u=n&&o.bind.bind(i,i);t.exports=n?u:function(t){return function(){return i.apply(t,arguments)}}},function(t,e,r){"use strict";var n=r(82).PROPER,o=r(45),i=r(39),u=r(42),a=r(19),c=r(221),l="toString",s=RegExp.prototype[l],f=a((function(){return"/a/b"!=s.call({source:"a",flags:"b"})})),p=n&&s.name!=l;(f||p)&&o(RegExp.prototype,l,(function(){var t=i(this);return"/"+u(t.source)+"/"+u(c(t))}),{unsafe:!0})},function(t,e,r){var n=r(40),o=r(82).EXISTS,i=r(21),u=r(88),a=Function.prototype,c=i(a.toString),l=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=i(l.exec);n&&!o&&u(a,"name",{configurable:!0,get:function(){try{return s(l,c(this))[1]}catch(t){return""}}})},function(t,e,r){var n=r(13),o=r(43),i=r(87);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(13),o=r(223);n({target:"Array",stat:!0,forced:!r(134)((function(t){Array.from(t)}))},{from:o})},function(t,e,r){"use strict";var n=r(13),o=r(19),i=r(91),u=r(41),a=r(43),c=r(54),l=r(176),s=r(74),f=r(129),p=r(94),y=r(33),d=r(81),h=y("isConcatSpreadable"),v=d>=51||!o((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),b=function(t){if(!u(t))return!1;var e=t[h];return void 0!==e?!!e:i(t)};n({target:"Array",proto:!0,arity:1,forced:!v||!p("concat")},{concat:function(t){var e,r,n,o,i,u=a(this),p=f(u,0),y=0;for(e=-1,n=arguments.length;e<n;e++)if(b(i=-1===e?u:arguments[e]))for(o=c(i),l(y+o),r=0;r<o;r++,y++)r in i&&s(p,y,i[r]);else l(y+1),s(p,y++,i);return p.length=y,p}})},function(t,e,r){var n=r(13),o=r(19),i=r(46),u=r(56).f,a=r(40);n({target:"Object",stat:!0,forced:!a||o((function(){u(1)})),sham:!a},{getOwnPropertyDescriptor:function(t,e){return u(i(t),e)}})},function(t,e,r){"use strict";var n=r(13),o=r(90).filter;n({target:"Array",proto:!0,forced:!r(94)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(13),o=r(40),i=r(155),u=r(46),a=r(56),c=r(74);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=u(t),o=a.f,l=i(n),s={},f=0;l.length>f;)void 0!==(r=o(n,e=l[f++]))&&c(s,e,r);return s}})},function(t,e,r){var n=r(148),o=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},function(t,e,r){var n=r(13),o=r(235);n({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},,function(t,e,r){var n=r(34),o=r(72),i=r(38),u=r(103),a=r(69),c=r(149),l=n.Symbol,s=o("wks"),f=c?l.for||l:l&&l.withoutSetter||u;t.exports=function(t){return i(s,t)||(s[t]=a&&i(l,t)?l[t]:f("Symbol."+t)),s[t]}},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}()||this||Function("return this")()}).call(this,r(77))},function(t,e,r){var n=r(78),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},function(t,e,r){"use strict";var n=r(13),o=r(90).map;n({target:"Array",proto:!0,forced:!r(94)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){"use strict";var n=r(119),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(21),o=r(43),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,r){var n=r(41),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not an object")}},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,r){var n=r(30),o=r(148),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===i}:function(t){return"object"==typeof t?null!==t:n(t)}},function(t,e,r){var n=r(108),o=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},function(t,e,r){var n=r(47),o=Object;t.exports=function(t){return o(n(t))}},function(t,e,r){var n=r(40),o=r(151),i=r(152),u=r(39),a=r(102),c=TypeError,l=Object.defineProperty,s=Object.getOwnPropertyDescriptor,f="enumerable",p="configurable",y="writable";e.f=n?i?function(t,e,r){if(u(t),e=a(e),u(r),"function"==typeof t&&"prototype"===e&&"value"in r&&y in r&&!r[y]){var n=s(t,e);n&&n[y]&&(t[e]=r.value,r={configurable:p in r?r[p]:n[p],enumerable:f in r?r[f]:n[f],writable:!1})}return l(t,e,r)}:l:function(t,e,r){if(u(t),e=a(e),u(r),o)try{return l(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(30),o=r(44),i=r(153),u=r(122);t.exports=function(t,e,r,a){a||(a={});var c=a.enumerable,l=void 0!==a.name?a.name:e;if(n(r)&&i(r,l,a),a.global)c?t[e]=r:u(e,r);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},function(t,e,r){var n=r(101),o=r(47);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(57),o=TypeError;t.exports=function(t){if(n(t))throw o("Can't call method on "+t);return t}},function(t,e,r){var n=r(34),o=r(30);t.exports=function(t,e){return arguments.length<2?(r=n[t],o(r)?r:void 0):n[t]&&n[t][e];var r}},function(t,e){t.exports=!1},function(t,e,r){var n=r(13),o=r(35),i=r(41),u=r(39),a=r(237),c=r(56),l=r(112);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,s,f=arguments.length<3?e:arguments[2];return u(e)===f?e[r]:(n=c.f(e,r))?a(n)?n.value:void 0===n.get?void 0:o(n.get,f):i(s=l(e))?t(s,r,f):void 0}})},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return l}));var n=r(14),o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.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 u};function i(){var t=o(Object(n.j)(0),2)[1];return Object(n.h)((function(){t((function(t){return t+1}))}),[])}function u(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 l(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:c}}).call(this,r(77))},function(t,e,r){var n=r(21),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){var n=r(30),o=r(71),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a function")}},function(t,e,r){var n=r(86);t.exports=function(t){return n(t.length)}},function(t,e,r){"use strict";var n=r(13),o=r(21),i=r(101),u=r(46),a=r(135),c=o([].join);n({target:"Array",proto:!0,forced:i!=Object||!a("join",",")},{join:function(t){return c(u(this),void 0===t?",":t)}})},function(t,e,r){var n=r(40),o=r(35),i=r(100),u=r(79),a=r(46),c=r(102),l=r(38),s=r(151),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=c(e),s)try{return f(t,e)}catch(t){}if(l(t,e))return u(!o(i.f,t,e),t[e])}},function(t,e){t.exports=function(t){return null==t}},function(t,e,r){"use strict";(function(t){var n=r(37),o=r(197),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,u=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=u&&u.exports===i?n.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||o.a;e.a=c}).call(this,r(137)(t))},function(t,e,r){"use strict";(function(t){var n=r(119),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o&&n.a.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||u&&u.binding&&u.binding("util")}catch(t){}}();e.a=a}).call(this,r(137)(t))},function(t,e,r){r(213)},function(t,e,r){var n=r(13),o=r(256).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(21);t.exports=n({}.isPrototypeOf)},function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},function(t,e,r){var n,o,i,u=r(201),a=r(34),c=r(41),l=r(73),s=r(38),f=r(121),p=r(105),y=r(83),d="Object already initialized",h=a.TypeError,v=a.WeakMap;if(u||f.state){var b=f.state||(f.state=new v);b.get=b.get,b.has=b.has,b.set=b.set,n=function(t,e){if(b.has(t))throw h(d);return e.facade=t,b.set(t,e),e},o=function(t){return b.get(t)||{}},i=function(t){return b.has(t)}}else{var g=p("state");y[g]=!0,n=function(t,e){if(s(t,g))throw h(d);return e.facade=t,l(t,g,e),e},o=function(t){return s(t,g)?t[g]:{}},i=function(t){return s(t,g)}}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(!c(e)||(r=o(e)).type!==t)throw h("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var n=r(202);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},function(t,e,r){var n,o=r(39),i=r(158),u=r(124),a=r(83),c=r(159),l=r(104),s=r(105),f="prototype",p="script",y=s("IE_PROTO"),d=function(){},h=function(t){return"<"+p+">"+t+"</"+p+">"},v=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},b=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;b="undefined"!=typeof document?document.domain&&n?v(n):(e=l("iframe"),r="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):v(n);for(var o=u.length;o--;)delete b[f][u[o]];return b()};a[y]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(d[f]=o(t),r=new d,d[f]=null,r[y]=t):r=b(),void 0===e?r:i.f(r,e)}},function(t,e,r){"use strict";var n=r(13),o=r(157).includes,i=r(19),u=r(111);n({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),u("includes")},function(t,e,r){"use strict";var n=r(13),o=r(21),i=r(184),u=r(47),a=r(42),c=r(186),l=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~l(a(u(this)),a(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(81),o=r(19),i=r(34).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!i(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e,r){var n=r(53),o=r(57);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},function(t,e){var r=String;t.exports=function(t){try{return r(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(49),o=r(121);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t,e,r){var n=r(40),o=r(44),i=r(79);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){"use strict";var n=r(102),o=r(44),i=r(79);t.exports=function(t,e,r){var u=n(e);u in t?o.f(t,u,i(0,r)):t[u]=r}},function(t,e,r){var n=r(128),o=r(53),i=r(78),u=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?u(t,e):function(){return t.apply(e,arguments)}}},function(t,e,r){var n=r(13),o=r(254),i=r(111);n({target:"Array",proto:!0},{fill:o}),i("fill")},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(19);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},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(48),o=r(30),i=r(62),u=r(149),a=Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,a(t))}},function(t,e,r){var n,o,i=r(34),u=r(63),a=i.process,c=i.Deno,l=a&&a.versions||c&&c.version,s=l&&l.v8;s&&(o=(n=s.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&u&&(!(n=u.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=u.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},function(t,e,r){var n=r(40),o=r(38),i=Function.prototype,u=n&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,l=a&&(!n||n&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:l}},function(t,e){t.exports={}},function(t,e,r){var n=r(156),o=r(124).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(65),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(65),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(156),o=r(124);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(153),o=r(44);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),o.f(t,e,r)}},function(t,e,r){var n=r(44).f,o=r(38),i=r(33)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(75),o=r(21),i=r(101),u=r(43),a=r(54),c=r(129),l=o([].push),s=function(t){var e=1==t,r=2==t,o=3==t,s=4==t,f=6==t,p=7==t,y=5==t||f;return function(d,h,v,b){for(var g,m,O=u(d),w=i(O),_=n(h,v),j=a(w),S=0,x=b||c,E=e?x(d,j):r||p?x(d,0):void 0;j>S;S++)if((y||S in w)&&(m=_(g=w[S],S,O),t))if(e)E[S]=m;else if(m)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:l(E,g)}else switch(t){case 4:return!1;case 7:l(E,g)}return f?-1:o||s?s:E}};t.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}},function(t,e,r){var n=r(52);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(78),o=Function.prototype,i=o.apply,u=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?u.bind(i):function(){return u.apply(i,arguments)})},function(t,e){t.exports={}},function(t,e,r){var n=r(19),o=r(33),i=r(81),u=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){"use strict";var n=r(13),o=r(43),i=r(85),u=r(65),a=r(54),c=r(232),l=r(176),s=r(129),f=r(74),p=r(182),y=r(94)("splice"),d=Math.max,h=Math.min;n({target:"Array",proto:!0,forced:!y},{splice:function(t,e){var r,n,y,v,b,g,m=o(this),O=a(m),w=i(t,O),_=arguments.length;for(0===_?r=n=0:1===_?(r=0,n=O-w):(r=_-2,n=h(d(u(e),0),O-w)),l(O+r-n),y=s(m,n),v=0;v<n;v++)(b=w+v)in m&&f(y,v,m[b]);if(y.length=n,r<n){for(v=w;v<O-n;v++)g=v+r,(b=v+n)in m?m[g]=m[b]:p(m,g);for(v=O;v>O-n+r;v--)p(m,v-1)}else if(r>n)for(v=O-n;v>w;v--)g=v+r-1,(b=v+n-1)in m?m[g]=m[b]:p(m,g);for(v=0;v<r;v++)m[v+w]=arguments[v+2];return c(m,O-n+r),y}})},function(t,e,r){r(13)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){var n=r(34);t.exports=n.Promise},function(t,e,r){var n=r(34),o=r(97),i=r(30),u=r(107),a=r(123),c=r(33),l=r(247),s=r(195),f=r(49),p=r(81),y=o&&o.prototype,d=c("species"),h=!1,v=i(n.PromiseRejectionEvent),b=u("Promise",(function(){var t=a(o),e=t!==String(o);if(!e&&66===p)return!0;if(f&&(!y.catch||!y.finally))return!0;if(!p||p<51||!/native code/.test(t)){var r=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[d]=n,!(h=r.then((function(){}))instanceof n))return!0}return!e&&(l||s)&&!v}));t.exports={CONSTRUCTOR:b,REJECTION_EVENT:v,SUBCLASSING:h}},function(t,e,r){"use strict";var n=r(53),o=TypeError,i=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw o("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new i(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(21),o=r(19),i=r(52),u=Object,a=n("".split);t.exports=o((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):u(t)}:u},function(t,e,r){var n=r(147),o=r(80);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(21),o=0,i=Math.random(),u=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},function(t,e,r){var n=r(34),o=r(41),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,e,r){var n=r(72),o=r(103),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n=r(19),o=r(30),i=/#|\.prototype\./,u=function(t,e){var r=c[a(t)];return r==s||r!=l&&(o(e)?n(e):!!e)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},l=u.NATIVE="N",s=u.POLYFILL="P";t.exports=u},function(t,e,r){var n=r(125),o=r(30),i=r(52),u=r(33)("toStringTag"),a=Object,c="Arguments"==i(function(){return arguments}());t.exports=n?i: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=a(t),u))?r:c?i(e):"Object"==(n=i(e))&&o(e.callee)?"Arguments":n}},function(t,e,r){var n=r(21),o=r(19),i=r(30),u=r(108),a=r(48),c=r(123),l=function(){},s=[],f=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,y=n(p.exec),d=!p.exec(l),h=function(t){if(!i(t))return!1;try{return f(l,s,t),!0}catch(t){return!1}},v=function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!y(p,c(t))}catch(t){return!0}};v.sham=!0,t.exports=!f||o((function(){var t;return h(h.call)||!h(Object)||!h((function(){t=!0}))||t}))?v:h},function(t,e,r){var n=r(21);t.exports=n([].slice)},function(t,e,r){var n=r(33),o=r(66),i=r(44).f,u=n("unscopables"),a=Array.prototype;null==a[u]&&i(a,u,{configurable:!0,value:o(null)}),t.exports=function(t){a[u][t]=!0}},function(t,e,r){var n=r(38),o=r(30),i=r(43),u=r(105),a=r(166),c=u("IE_PROTO"),l=Object,s=l.prototype;t.exports=a?l.getPrototypeOf:function(t){var e=i(t);if(n(e,c))return e[c];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof l?s:null}},function(t,e,r){var n=r(211),o=r(39),i=r(212);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(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(75),o=r(35),i=r(39),u=r(71),a=r(168),c=r(54),l=r(62),s=r(169),f=r(132),p=r(170),y=TypeError,d=function(t,e){this.stopped=t,this.result=e},h=d.prototype;t.exports=function(t,e,r){var v,b,g,m,O,w,_,j=r&&r.that,S=!(!r||!r.AS_ENTRIES),x=!(!r||!r.IS_RECORD),E=!(!r||!r.IS_ITERATOR),P=!(!r||!r.INTERRUPTED),k=n(e,j),A=function(t){return v&&p(v,"normal",t),new d(!0,t)},D=function(t){return S?(i(t),P?k(t[0],t[1],A):k(t[0],t[1])):P?k(t,A):k(t)};if(x)v=t.iterator;else if(E)v=t;else{if(!(b=f(t)))throw y(u(t)+" is not iterable");if(a(b)){for(g=0,m=c(t);m>g;g++)if((O=D(t[g]))&&l(h,O))return O;return new d(!1)}v=s(t,b)}for(w=x?t.next:v.next;!(_=o(w,v)).done;){try{O=D(_.value)}catch(t){p(v,"throw",t)}if("object"==typeof O&&O&&l(h,O))return O}return new d(!1)}},function(t,e,r){"use strict";var n,o,i=r(35),u=r(21),a=r(42),c=r(177),l=r(181),s=r(72),f=r(66),p=r(64).get,y=r(225),d=r(226),h=s("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,b=v,g=u("".charAt),m=u("".indexOf),O=u("".replace),w=u("".slice),_=(o=/b*/g,i(v,n=/a/,"a"),i(v,o,"a"),0!==n.lastIndex||0!==o.lastIndex),j=l.BROKEN_CARET,S=void 0!==/()??/.exec("")[1];(_||S||j||y||d)&&(b=function(t){var e,r,n,o,u,l,s,y=this,d=p(y),x=a(t),E=d.raw;if(E)return E.lastIndex=y.lastIndex,e=i(b,E,x),y.lastIndex=E.lastIndex,e;var P=d.groups,k=j&&y.sticky,A=i(c,y),D=y.source,T=0,N=x;if(k&&(A=O(A,"y",""),-1===m(A,"g")&&(A+="g"),N=w(x,y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&"\n"!==g(x,y.lastIndex-1))&&(D="(?: "+D+")",N=" "+N,T++),r=new RegExp("^(?:"+D+")",A)),S&&(r=new RegExp("^"+D+"$(?!\\s)",A)),_&&(n=y.lastIndex),o=i(v,k?r:y,N),k?o?(o.input=w(o.input,T),o[0]=w(o[0],T),o.index=y.lastIndex,y.lastIndex+=o[0].length):y.lastIndex=0:_&&o&&(y.lastIndex=y.global?o.index+o[0].length:n),S&&o&&o.length>1&&i(h,o[0],r,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&P)for(o.groups=l=f(null),u=0;u<P.length;u++)l[(s=P[u])[0]]=o[s[1]];return o}),t.exports=b},function(t,e,r){"use strict";var n=r(92),o=r(35),i=r(21),u=r(138),a=r(19),c=r(39),l=r(30),s=r(57),f=r(65),p=r(86),y=r(42),d=r(47),h=r(139),v=r(70),b=r(234),g=r(140),m=r(33)("replace"),O=Math.max,w=Math.min,_=i([].concat),j=i([].push),S=i("".indexOf),x=i("".slice),E="$0"==="a".replace(/./,"$0"),P=!!/./[m]&&""===/./[m]("a","$0");u("replace",(function(t,e,r){var i=P?"$":"$0";return[function(t,r){var n=d(this),i=s(t)?void 0:v(t,m);return i?o(i,t,n,r):o(e,y(n),t,r)},function(t,o){var u=c(this),a=y(t);if("string"==typeof o&&-1===S(o,i)&&-1===S(o,"$<")){var s=r(e,u,a,o);if(s.done)return s.value}var d=l(o);d||(o=y(o));var v=u.global;if(v){var m=u.unicode;u.lastIndex=0}for(var E=[];;){var P=g(u,a);if(null===P)break;if(j(E,P),!v)break;""===y(P[0])&&(u.lastIndex=h(a,p(u.lastIndex),m))}for(var k,A="",D=0,T=0;T<E.length;T++){for(var N=y((P=E[T])[0]),M=O(w(f(P.index),a.length),0),C=[],R=1;R<P.length;R++)j(C,void 0===(k=P[R])?k:String(k));var I=P.groups;if(d){var L=_([N],C,M,a);void 0!==I&&j(L,I);var z=y(n(o,void 0,L))}else z=b(N,a,M,C,I,o);M>=D&&(A+=x(a,D,M)+z,D=M+N.length)}return A+x(a,D)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||P)},function(t,e,r){"use strict";var n=r(13),o=r(238);n({target:"String",proto:!0,forced:r(239)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,r){(function(e){var n=r(52);t.exports=void 0!==e&&"process"==n(e)}).call(this,r(136))},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(77))},function(t,e,r){"use strict";(function(t){var n=r(37),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o?n.a.Buffer:void 0,a=u?u.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(137)(t))},function(t,e,r){var n=r(34),o=r(122),i="__core-js_shared__",u=n[i]||o(i,{});t.exports=u},function(t,e,r){var n=r(34),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(21),o=r(30),i=r(121),u=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var n={};n[r(33)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(85),o=r(54),i=r(74),u=Array,a=Math.max;t.exports=function(t,e,r){for(var c=o(t),l=n(e,c),s=n(void 0===r?c:r,c),f=u(a(s-l,0)),p=0;l<s;l++,p++)i(f,p,t[l]);return f.length=p,f}},function(t,e,r){var n=r(162),o=r(38),i=r(161),u=r(44).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||u(e,t,{value:i.f(t)})}},function(t,e,r){var n=r(52),o=r(21);t.exports=function(t){if("Function"===n(t))return o(t)}},function(t,e,r){var n=r(203);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(13),o=r(35),i=r(49),u=r(82),a=r(30),c=r(210),l=r(112),s=r(113),f=r(89),p=r(73),y=r(45),d=r(33),h=r(93),v=r(165),b=u.PROPER,g=u.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,w=d("iterator"),_="keys",j="values",S="entries",x=function(){return this};t.exports=function(t,e,r,u,d,v,E){c(r,e,u);var P,k,A,D=function(t){if(t===d&&R)return R;if(!O&&t in M)return M[t];switch(t){case _:case j:case S:return function(){return new r(this,t)}}return function(){return new r(this)}},T=e+" Iterator",N=!1,M=t.prototype,C=M[w]||M["@@iterator"]||d&&M[d],R=!O&&C||D(d),I="Array"==e&&M.entries||C;if(I&&(P=l(I.call(new t)))!==Object.prototype&&P.next&&(i||l(P)===m||(s?s(P,m):a(P[w])||y(P,w,x)),f(P,T,!0,!0),i&&(h[T]=x)),b&&d==j&&C&&C.name!==j&&(!i&&g?p(M,"name",j):(N=!0,R=function(){return o(C,this)})),d)if(k={values:D(j),keys:v?R:D(_),entries:D(S)},E)for(A in k)(O||N||!(A in M))&&y(M,A,k[A]);else n({target:e,proto:!0,forced:O||N},k);return i&&!E||M[w]===R||y(M,w,R,{name:d}),h[e]=R,k}},function(t,e){t.exports=function(t,e){return{value:t,done:e}}},function(t,e,r){var n=r(108),o=r(70),i=r(57),u=r(93),a=r(33)("iterator");t.exports=function(t){if(!i(t))return o(t,a)||o(t,"@@iterator")||u[n(t)]}},function(t,e,r){var n=r(62),o=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw o("Incorrect invocation")}},function(t,e,r){var n=r(33)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[n]=function(){return this},Array.from(u,(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){"use strict";var n=r(19);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){return 1},1)}))}},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){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:u}catch(t){n=u}}();var c,l=[],s=!1,f=-1;function p(){s&&c&&(s=!1,c.length?l=c.concat(l):f=-1,l.length&&y())}function y(){if(!s){var t=a(p);s=!0;for(var e=l.length;e;){for(c=l,l=[];++f<e;)c&&c[f].run();f=-1,e=l.length}c=null,s=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{return n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(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];l.push(new d(t,e)),1!==l.length||s||a(y)},d.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){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(20);var n=r(128),o=r(45),i=r(115),u=r(19),a=r(33),c=r(73),l=a("species"),s=RegExp.prototype;t.exports=function(t,e,r,f){var p=a(t),y=!u((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=y&&!u((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[l]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!y||!d||r){var h=n(/./[p]),v=e(p,""[t],(function(t,e,r,o,u){var a=n(t),c=e.exec;return c===i||c===s.exec?y&&!u?{done:!0,value:h(e,r,o)}:{done:!0,value:a(r,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(s,p,v[1])}f&&c(s[p],"sham",!0)}},function(t,e,r){"use strict";var n=r(173).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(35),o=r(39),i=r(30),u=r(52),a=r(115),c=TypeError;t.exports=function(t,e){var r=t.exec;if(i(r)){var l=n(r,t,e);return null!==l&&o(l),l}if("RegExp"===u(t))return n(a,t,e);throw c("RegExp#exec called on incompatible receiver")}},function(t,e,r){var n=r(13),o=Math.hypot,i=Math.abs,u=Math.sqrt;n({target:"Math",stat:!0,arity:2,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,a=0,c=arguments.length,l=0;a<c;)l<(r=i(arguments[a++]))?(o=o*(n=l/r)*n+1,l=r):o+=r>0?(n=r/l)*n:r;return l===1/0?1/0:l*u(o)}})},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,r){"use strict";var n=r(13),o=r(21),i=r(65),u=r(178),a=r(255),c=r(19),l=RangeError,s=String,f=Math.floor,p=o(a),y=o("".slice),d=o(1..toFixed),h=function(t,e,r){return 0===e?r:e%2==1?h(t,e-1,r*t):h(t*t,e/2,r)},v=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=f(o/1e7)},b=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=f(n/e),n=n%e*1e7},g=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=s(t[e]);r=""===r?n:r+p("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:c((function(){return"0.000"!==d(8e-5,3)||"1"!==d(.9,0)||"1.25"!==d(1.255,2)||"1000000000000000128"!==d(0xde0b6b3a7640080,0)}))||!c((function(){d({})}))},{toFixed:function(t){var e,r,n,o,a=u(this),c=i(t),f=[0,0,0,0,0,0],d="",m="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return s(a);if(a<0&&(d="-",a=-a),a>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(a*h(2,69,1))-69)<0?a*h(2,-e,1):a/h(2,e,1),r*=4503599627370496,(e=52-e)>0){for(v(f,0,r),n=c;n>=7;)v(f,1e7,0),n-=7;for(v(f,h(10,n,1),0),n=e-1;n>=23;)b(f,1<<23),n-=23;b(f,1<<n),v(f,1,1),b(f,2),m=g(f)}else v(f,0,r),v(f,1<<-e,0),m=g(f)+p("0",c);return m=c>0?d+((o=m.length)<=c?"0."+p("0",c-o)+m:y(m,0,o-c)+"."+y(m,o-c)):d+m}})},function(t,e,r){r(13)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){"use strict";var n=r(92),o=r(35),i=r(21),u=r(138),a=r(39),c=r(57),l=r(185),s=r(47),f=r(191),p=r(139),y=r(86),d=r(42),h=r(70),v=r(126),b=r(140),g=r(115),m=r(181),O=r(19),w=m.UNSUPPORTED_Y,_=4294967295,j=Math.min,S=[].push,x=i(/./.exec),E=i(S),P=i("".slice),k=!O((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]}));u("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)),u=void 0===r?_:r>>>0;if(0===u)return[];if(void 0===t)return[i];if(!l(t))return o(e,i,t,u);for(var a,c,f,p=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,b=new RegExp(t.source,y+"g");(a=o(g,b,i))&&!((c=b.lastIndex)>h&&(E(p,P(i,h,a.index)),a.length>1&&a.index<i.length&&n(S,p,v(a,1)),f=a[0].length,h=c,p.length>=u));)b.lastIndex===a.index&&b.lastIndex++;return h===i.length?!f&&x(b,"")||E(p,""):E(p,P(i,h)),p.length>u?v(p,0,u):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),u=c(e)?void 0:h(e,t);return u?o(u,e,n,r):o(i,d(n),e,r)},function(t,n){var o=a(this),u=d(t),c=r(i,o,u,n,i!==e);if(c.done)return c.value;var l=f(o,RegExp),s=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(w?"g":"y"),v=new l(w?"^(?:"+o.source+")":o,h),g=void 0===n?_:n>>>0;if(0===g)return[];if(0===u.length)return null===b(v,u)?[u]:[];for(var m=0,O=0,S=[];O<u.length;){v.lastIndex=w?0:O;var x,k=b(v,w?P(u,O):u);if(null===k||(x=j(y(v.lastIndex+(w?O:0)),u.length))===m)O=p(u,O,s);else{if(E(S,P(u,m,O)),S.length===g)return S;for(var A=1;A<=k.length-1;A++)if(E(S,k[A]),S.length===g)return S;O=m=x}}return E(S,P(u,m)),S}]}),!k,w)},function(t,e,r){(function(t,n){var o;
|
|
/**
|
|
* @license
|
|
* Lodash <https://lodash.com/>
|
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
* Released under MIT license <https://lodash.com/license>
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
*/(function(){var i,u="Expected a function",a="__lodash_hash_undefined__",c="__lodash_placeholder__",l=16,s=32,f=64,p=128,y=256,d=1/0,h=9007199254740991,v=NaN,b=4294967295,g=[["ary",p],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",s],["partialRight",f],["rearg",y]],m="[object Arguments]",O="[object Array]",w="[object Boolean]",_="[object Date]",j="[object Error]",S="[object Function]",x="[object GeneratorFunction]",E="[object Map]",P="[object Number]",k="[object Object]",A="[object Promise]",D="[object RegExp]",T="[object Set]",N="[object String]",M="[object Symbol]",C="[object WeakMap]",R="[object ArrayBuffer]",I="[object DataView]",L="[object Float32Array]",z="[object Float64Array]",B="[object Int8Array]",U="[object Int16Array]",F="[object Int32Array]",H="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Y="[object Uint32Array]",V=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Z=RegExp($.source),J=RegExp(q.source),Q=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(it.source),at=/^\s+/,ct=/\s/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,ft=/,? & /,pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yt=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,bt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,Ot=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,_t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jt=/($^)/,St=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pt="\\u2700-\\u27bf",kt="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Dt="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Nt="['’]",Mt="["+xt+"]",Ct="["+Tt+"]",Rt="["+Et+"]",It="\\d+",Lt="["+Pt+"]",zt="["+kt+"]",Bt="[^"+xt+Tt+It+Pt+kt+At+"]",Ut="\\ud83c[\\udffb-\\udfff]",Ft="[^"+xt+"]",Ht="(?:\\ud83c[\\udde6-\\uddff]){2}",Xt="[\\ud800-\\udbff][\\udc00-\\udfff]",Gt="["+At+"]",Yt="\\u200d",Vt="(?:"+zt+"|"+Bt+")",Wt="(?:"+Gt+"|"+Bt+")",Kt="(?:['’](?:d|ll|m|re|s|t|ve))?",$t="(?:['’](?:D|LL|M|RE|S|T|VE))?",qt="(?:"+Rt+"|"+Ut+")"+"?",Zt="["+Dt+"]?",Jt=Zt+qt+("(?:"+Yt+"(?:"+[Ft,Ht,Xt].join("|")+")"+Zt+qt+")*"),Qt="(?:"+[Lt,Ht,Xt].join("|")+")"+Jt,te="(?:"+[Ft+Rt+"?",Rt,Ht,Xt,Mt].join("|")+")",ee=RegExp(Nt,"g"),re=RegExp(Rt,"g"),ne=RegExp(Ut+"(?="+Ut+")|"+te+Jt,"g"),oe=RegExp([Gt+"?"+zt+"+"+Kt+"(?="+[Ct,Gt,"$"].join("|")+")",Wt+"+"+$t+"(?="+[Ct,Gt+Vt,"$"].join("|")+")",Gt+"?"+Vt+"+"+Kt,Gt+"+"+$t,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It,Qt].join("|"),"g"),ie=RegExp("["+Yt+xt+Et+Dt+"]"),ue=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ce=-1,le={};le[L]=le[z]=le[B]=le[U]=le[F]=le[H]=le[X]=le[G]=le[Y]=!0,le[m]=le[O]=le[R]=le[w]=le[I]=le[_]=le[j]=le[S]=le[E]=le[P]=le[k]=le[D]=le[T]=le[N]=le[C]=!1;var se={};se[m]=se[O]=se[R]=se[I]=se[w]=se[_]=se[L]=se[z]=se[B]=se[U]=se[F]=se[E]=se[P]=se[k]=se[D]=se[T]=se[N]=se[M]=se[H]=se[X]=se[G]=se[Y]=!0,se[j]=se[S]=se[C]=!1;var fe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,ye=parseInt,de="object"==typeof t&&t&&t.Object===Object&&t,he="object"==typeof self&&self&&self.Object===Object&&self,ve=de||he||Function("return this")(),be=e&&!e.nodeType&&e,ge=be&&"object"==typeof n&&n&&!n.nodeType&&n,me=ge&&ge.exports===be,Oe=me&&de.process,we=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||Oe&&Oe.binding&&Oe.binding("util")}catch(t){}}(),_e=we&&we.isArrayBuffer,je=we&&we.isDate,Se=we&&we.isMap,xe=we&&we.isRegExp,Ee=we&&we.isSet,Pe=we&&we.isTypedArray;function ke(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)}function Ae(t,e,r,n){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(n,u,r(u),t)}return n}function De(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function Te(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Ne(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Me(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}function Ce(t,e){return!!(null==t?0:t.length)&&Ge(t,e,0)>-1}function Re(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function Ie(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}function Le(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function ze(t,e,r,n){var o=-1,i=null==t?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function Be(t,e,r,n){var o=null==t?0:t.length;for(n&&o&&(r=t[--o]);o--;)r=e(r,t[o],o,t);return r}function Ue(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 Fe=Ke("length");function He(t,e,r){var n;return r(t,(function(t,r,o){if(e(t,r,o))return n=r,!1})),n}function Xe(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Ge(t,e,r){return e==e?function(t,e,r){var n=r-1,o=t.length;for(;++n<o;)if(t[n]===e)return n;return-1}(t,e,r):Xe(t,Ve,r)}function Ye(t,e,r,n){for(var o=r-1,i=t.length;++o<i;)if(n(t[o],e))return o;return-1}function Ve(t){return t!=t}function We(t,e){var r=null==t?0:t.length;return r?Ze(t,e)/r:v}function Ke(t){return function(e){return null==e?i:e[t]}}function $e(t){return function(e){return null==t?i:t[e]}}function qe(t,e,r,n,o){return o(t,(function(t,o,i){r=n?(n=!1,t):e(r,t,o,i)})),r}function Ze(t,e){for(var r,n=-1,o=t.length;++n<o;){var u=e(t[n]);u!==i&&(r=r===i?u:r+u)}return r}function Je(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Qe(t){return t?t.slice(0,vr(t)+1).replace(at,""):t}function tr(t){return function(e){return t(e)}}function er(t,e){return Ie(e,(function(e){return t[e]}))}function rr(t,e){return t.has(e)}function nr(t,e){for(var r=-1,n=t.length;++r<n&&Ge(e,t[r],0)>-1;);return r}function or(t,e){for(var r=t.length;r--&&Ge(e,t[r],0)>-1;);return r}var ir=$e({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ur=$e({"&":"&","<":"<",">":">",'"':""","'":"'"});function ar(t){return"\\"+fe[t]}function cr(t){return ie.test(t)}function lr(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function sr(t,e){return function(r){return t(e(r))}}function fr(t,e){for(var r=-1,n=t.length,o=0,i=[];++r<n;){var u=t[r];u!==e&&u!==c||(t[r]=c,i[o++]=r)}return i}function pr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function yr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function dr(t){return cr(t)?function(t){var e=ne.lastIndex=0;for(;ne.test(t);)++e;return e}(t):Fe(t)}function hr(t){return cr(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function vr(t){for(var e=t.length;e--&&ct.test(t.charAt(e)););return e}var br=$e({"&":"&","<":"<",">":">",""":'"',"'":"'"});var gr=function t(e){var r,n=(e=null==e?ve:gr.defaults(ve.Object(),e,gr.pick(ve,ae))).Array,o=e.Date,ct=e.Error,xt=e.Function,Et=e.Math,Pt=e.Object,kt=e.RegExp,At=e.String,Dt=e.TypeError,Tt=n.prototype,Nt=xt.prototype,Mt=Pt.prototype,Ct=e["__core-js_shared__"],Rt=Nt.toString,It=Mt.hasOwnProperty,Lt=0,zt=(r=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Bt=Mt.toString,Ut=Rt.call(Pt),Ft=ve._,Ht=kt("^"+Rt.call(It).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=me?e.Buffer:i,Gt=e.Symbol,Yt=e.Uint8Array,Vt=Xt?Xt.allocUnsafe:i,Wt=sr(Pt.getPrototypeOf,Pt),Kt=Pt.create,$t=Mt.propertyIsEnumerable,qt=Tt.splice,Zt=Gt?Gt.isConcatSpreadable:i,Jt=Gt?Gt.iterator:i,Qt=Gt?Gt.toStringTag:i,te=function(){try{var t=yi(Pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),ne=e.clearTimeout!==ve.clearTimeout&&e.clearTimeout,ie=o&&o.now!==ve.Date.now&&o.now,fe=e.setTimeout!==ve.setTimeout&&e.setTimeout,de=Et.ceil,he=Et.floor,be=Pt.getOwnPropertySymbols,ge=Xt?Xt.isBuffer:i,Oe=e.isFinite,we=Tt.join,Fe=sr(Pt.keys,Pt),$e=Et.max,mr=Et.min,Or=o.now,wr=e.parseInt,_r=Et.random,jr=Tt.reverse,Sr=yi(e,"DataView"),xr=yi(e,"Map"),Er=yi(e,"Promise"),Pr=yi(e,"Set"),kr=yi(e,"WeakMap"),Ar=yi(Pt,"create"),Dr=kr&&new kr,Tr={},Nr=Bi(Sr),Mr=Bi(xr),Cr=Bi(Er),Rr=Bi(Pr),Ir=Bi(kr),Lr=Gt?Gt.prototype:i,zr=Lr?Lr.valueOf:i,Br=Lr?Lr.toString:i;function Ur(t){if(ra(t)&&!Yu(t)&&!(t instanceof Gr)){if(t instanceof Xr)return t;if(It.call(t,"__wrapped__"))return Ui(t)}return new Xr(t)}var Fr=function(){function t(){}return function(e){if(!ea(e))return{};if(Kt)return Kt(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Hr(){}function Xr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Gr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=b,this.__views__=[]}function Yr(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])}}function Vr(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])}}function Wr(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])}}function Kr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Wr;++e<r;)this.add(t[e])}function $r(t){var e=this.__data__=new Vr(t);this.size=e.size}function qr(t,e){var r=Yu(t),n=!r&&Gu(t),o=!r&&!n&&$u(t),i=!r&&!n&&!o&&sa(t),u=r||n||o||i,a=u?Je(t.length,At):[],c=a.length;for(var l in t)!e&&!It.call(t,l)||u&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Oi(l,c))||a.push(l);return a}function Zr(t){var e=t.length;return e?t[$n(0,e-1)]:i}function Jr(t,e){return Ii(To(t),cn(e,0,t.length))}function Qr(t){return Ii(To(t))}function tn(t,e,r){(r!==i&&!Fu(t[e],r)||r===i&&!(e in t))&&un(t,e,r)}function en(t,e,r){var n=t[e];It.call(t,e)&&Fu(n,r)&&(r!==i||e in t)||un(t,e,r)}function rn(t,e){for(var r=t.length;r--;)if(Fu(t[r][0],e))return r;return-1}function nn(t,e,r,n){return yn(t,(function(t,o,i){e(n,t,r(t),i)})),n}function on(t,e){return t&&No(e,Na(e),t)}function un(t,e,r){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function an(t,e){for(var r=-1,o=e.length,u=n(o),a=null==t;++r<o;)u[r]=a?i:Pa(t,e[r]);return u}function cn(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function ln(t,e,r,n,o,u){var a,c=1&e,l=2&e,s=4&e;if(r&&(a=o?r(t,n,o,u):r(t)),a!==i)return a;if(!ea(t))return t;var f=Yu(t);if(f){if(a=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&It.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!c)return To(t,a)}else{var p=vi(t),y=p==S||p==x;if($u(t))return xo(t,c);if(p==k||p==m||y&&!o){if(a=l||y?{}:gi(t),!c)return l?function(t,e){return No(t,hi(t),e)}(t,function(t,e){return t&&No(e,Ma(e),t)}(a,t)):function(t,e){return No(t,di(t),e)}(t,on(a,t))}else{if(!se[p])return o?t:{};a=function(t,e,r){var n=t.constructor;switch(e){case R:return Eo(t);case w:case _:return new n(+t);case I:return function(t,e){var r=e?Eo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case L:case z:case B:case U:case F:case H:case X:case G:case Y:return Po(t,r);case E:return new n;case P:case N:return new n(t);case D:return function(t){var e=new t.constructor(t.source,vt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new n;case M:return o=t,zr?Pt(zr.call(o)):{}}var o}(t,p,c)}}u||(u=new $r);var d=u.get(t);if(d)return d;u.set(t,a),aa(t)?t.forEach((function(n){a.add(ln(n,e,r,n,t,u))})):na(t)&&t.forEach((function(n,o){a.set(o,ln(n,e,r,o,t,u))}));var h=f?i:(s?l?ui:ii:l?Ma:Na)(t);return De(h||t,(function(n,o){h&&(n=t[o=n]),en(a,o,ln(n,e,r,o,t,u))})),a}function sn(t,e,r){var n=r.length;if(null==t)return!n;for(t=Pt(t);n--;){var o=r[n],u=e[o],a=t[o];if(a===i&&!(o in t)||!u(a))return!1}return!0}function fn(t,e,r){if("function"!=typeof t)throw new Dt(u);return Ni((function(){t.apply(i,r)}),e)}function pn(t,e,r,n){var o=-1,i=Ce,u=!0,a=t.length,c=[],l=e.length;if(!a)return c;r&&(e=Ie(e,tr(r))),n?(i=Re,u=!1):e.length>=200&&(i=rr,u=!1,e=new Kr(e));t:for(;++o<a;){var s=t[o],f=null==r?s:r(s);if(s=n||0!==s?s:0,u&&f==f){for(var p=l;p--;)if(e[p]===f)continue t;c.push(s)}else i(e,f,n)||c.push(s)}return c}Ur.templateSettings={escape:Q,evaluate:tt,interpolate:et,variable:"",imports:{_:Ur}},Ur.prototype=Hr.prototype,Ur.prototype.constructor=Ur,Xr.prototype=Fr(Hr.prototype),Xr.prototype.constructor=Xr,Gr.prototype=Fr(Hr.prototype),Gr.prototype.constructor=Gr,Yr.prototype.clear=function(){this.__data__=Ar?Ar(null):{},this.size=0},Yr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Yr.prototype.get=function(t){var e=this.__data__;if(Ar){var r=e[t];return r===a?i:r}return It.call(e,t)?e[t]:i},Yr.prototype.has=function(t){var e=this.__data__;return Ar?e[t]!==i:It.call(e,t)},Yr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ar&&e===i?a:e,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,r=rn(e,t);return!(r<0)&&(r==e.length-1?e.pop():qt.call(e,r,1),--this.size,!0)},Vr.prototype.get=function(t){var e=this.__data__,r=rn(e,t);return r<0?i:e[r][1]},Vr.prototype.has=function(t){return rn(this.__data__,t)>-1},Vr.prototype.set=function(t,e){var r=this.__data__,n=rn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Wr.prototype.clear=function(){this.size=0,this.__data__={hash:new Yr,map:new(xr||Vr),string:new Yr}},Wr.prototype.delete=function(t){var e=fi(this,t).delete(t);return this.size-=e?1:0,e},Wr.prototype.get=function(t){return fi(this,t).get(t)},Wr.prototype.has=function(t){return fi(this,t).has(t)},Wr.prototype.set=function(t,e){var r=fi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Kr.prototype.add=Kr.prototype.push=function(t){return this.__data__.set(t,a),this},Kr.prototype.has=function(t){return this.__data__.has(t)},$r.prototype.clear=function(){this.__data__=new Vr,this.size=0},$r.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},$r.prototype.get=function(t){return this.__data__.get(t)},$r.prototype.has=function(t){return this.__data__.has(t)},$r.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!xr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Wr(n)}return r.set(t,e),this.size=r.size,this};var yn=Ro(wn),dn=Ro(_n,!0);function hn(t,e){var r=!0;return yn(t,(function(t,n,o){return r=!!e(t,n,o)})),r}function vn(t,e,r){for(var n=-1,o=t.length;++n<o;){var u=t[n],a=e(u);if(null!=a&&(c===i?a==a&&!la(a):r(a,c)))var c=a,l=u}return l}function bn(t,e){var r=[];return yn(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}function gn(t,e,r,n,o){var i=-1,u=t.length;for(r||(r=mi),o||(o=[]);++i<u;){var a=t[i];e>0&&r(a)?e>1?gn(a,e-1,r,n,o):Le(o,a):n||(o[o.length]=a)}return o}var mn=Io(),On=Io(!0);function wn(t,e){return t&&mn(t,e,Na)}function _n(t,e){return t&&On(t,e,Na)}function jn(t,e){return Me(e,(function(e){return Ju(t[e])}))}function Sn(t,e){for(var r=0,n=(e=wo(e,t)).length;null!=t&&r<n;)t=t[zi(e[r++])];return r&&r==n?t:i}function xn(t,e,r){var n=e(t);return Yu(t)?n:Le(n,r(t))}function En(t){return null==t?t===i?"[object Undefined]":"[object Null]":Qt&&Qt in Pt(t)?function(t){var e=It.call(t,Qt),r=t[Qt];try{t[Qt]=i;var n=!0}catch(t){}var o=Bt.call(t);n&&(e?t[Qt]=r:delete t[Qt]);return o}(t):function(t){return Bt.call(t)}(t)}function Pn(t,e){return t>e}function kn(t,e){return null!=t&&It.call(t,e)}function An(t,e){return null!=t&&e in Pt(t)}function Dn(t,e,r){for(var o=r?Re:Ce,u=t[0].length,a=t.length,c=a,l=n(a),s=1/0,f=[];c--;){var p=t[c];c&&e&&(p=Ie(p,tr(e))),s=mr(p.length,s),l[c]=!r&&(e||u>=120&&p.length>=120)?new Kr(c&&p):i}p=t[0];var y=-1,d=l[0];t:for(;++y<u&&f.length<s;){var h=p[y],v=e?e(h):h;if(h=r||0!==h?h:0,!(d?rr(d,v):o(f,v,r))){for(c=a;--c;){var b=l[c];if(!(b?rr(b,v):o(t[c],v,r)))continue t}d&&d.push(v),f.push(h)}}return f}function Tn(t,e,r){var n=null==(t=Ai(t,e=wo(e,t)))?t:t[zi(Zi(e))];return null==n?i:ke(n,t,r)}function Nn(t){return ra(t)&&En(t)==m}function Mn(t,e,r,n,o){return t===e||(null==t||null==e||!ra(t)&&!ra(e)?t!=t&&e!=e:function(t,e,r,n,o,u){var a=Yu(t),c=Yu(e),l=a?O:vi(t),s=c?O:vi(e),f=(l=l==m?k:l)==k,p=(s=s==m?k:s)==k,y=l==s;if(y&&$u(t)){if(!$u(e))return!1;a=!0,f=!1}if(y&&!f)return u||(u=new $r),a||sa(t)?ni(t,e,r,n,o,u):function(t,e,r,n,o,i,u){switch(r){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!i(new Yt(t),new Yt(e)));case w:case _:case P:return Fu(+t,+e);case j:return t.name==e.name&&t.message==e.message;case D:case N:return t==e+"";case E:var a=lr;case T:var c=1&n;if(a||(a=pr),t.size!=e.size&&!c)return!1;var l=u.get(t);if(l)return l==e;n|=2,u.set(t,e);var s=ni(a(t),a(e),n,o,i,u);return u.delete(t),s;case M:if(zr)return zr.call(t)==zr.call(e)}return!1}(t,e,l,r,n,o,u);if(!(1&r)){var d=f&&It.call(t,"__wrapped__"),h=p&&It.call(e,"__wrapped__");if(d||h){var v=d?t.value():t,b=h?e.value():e;return u||(u=new $r),o(v,b,r,n,u)}}if(!y)return!1;return u||(u=new $r),function(t,e,r,n,o,u){var a=1&r,c=ii(t),l=c.length,s=ii(e),f=s.length;if(l!=f&&!a)return!1;var p=l;for(;p--;){var y=c[p];if(!(a?y in e:It.call(e,y)))return!1}var d=u.get(t),h=u.get(e);if(d&&h)return d==e&&h==t;var v=!0;u.set(t,e),u.set(e,t);var b=a;for(;++p<l;){var g=t[y=c[p]],m=e[y];if(n)var O=a?n(m,g,y,e,t,u):n(g,m,y,t,e,u);if(!(O===i?g===m||o(g,m,r,n,u):O)){v=!1;break}b||(b="constructor"==y)}if(v&&!b){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(v=!1)}return u.delete(t),u.delete(e),v}(t,e,r,n,o,u)}(t,e,r,n,Mn,o))}function Cn(t,e,r,n){var o=r.length,u=o,a=!n;if(null==t)return!u;for(t=Pt(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var l=(c=r[o])[0],s=t[l],f=c[1];if(a&&c[2]){if(s===i&&!(l in t))return!1}else{var p=new $r;if(n)var y=n(s,f,l,t,e,p);if(!(y===i?Mn(f,s,3,n,p):y))return!1}}return!0}function Rn(t){return!(!ea(t)||(e=t,zt&&zt in e))&&(Ju(t)?Ht:mt).test(Bi(t));var e}function In(t){return"function"==typeof t?t:null==t?oc:"object"==typeof t?Yu(t)?Hn(t[0],t[1]):Fn(t):yc(t)}function Ln(t){if(!xi(t))return Fe(t);var e=[];for(var r in Pt(t))It.call(t,r)&&"constructor"!=r&&e.push(r);return e}function zn(t){if(!ea(t))return function(t){var e=[];if(null!=t)for(var r in Pt(t))e.push(r);return e}(t);var e=xi(t),r=[];for(var n in t)("constructor"!=n||!e&&It.call(t,n))&&r.push(n);return r}function Bn(t,e){return t<e}function Un(t,e){var r=-1,o=Wu(t)?n(t.length):[];return yn(t,(function(t,n,i){o[++r]=e(t,n,i)})),o}function Fn(t){var e=pi(t);return 1==e.length&&e[0][2]?Pi(e[0][0],e[0][1]):function(r){return r===t||Cn(r,t,e)}}function Hn(t,e){return _i(t)&&Ei(e)?Pi(zi(t),e):function(r){var n=Pa(r,t);return n===i&&n===e?ka(r,t):Mn(e,n,3)}}function Xn(t,e,r,n,o){t!==e&&mn(e,(function(u,a){if(o||(o=new $r),ea(u))!function(t,e,r,n,o,u,a){var c=Di(t,r),l=Di(e,r),s=a.get(l);if(s)return void tn(t,r,s);var f=u?u(c,l,r+"",t,e,a):i,p=f===i;if(p){var y=Yu(l),d=!y&&$u(l),h=!y&&!d&&sa(l);f=l,y||d||h?Yu(c)?f=c:Ku(c)?f=To(c):d?(p=!1,f=xo(l,!0)):h?(p=!1,f=Po(l,!0)):f=[]:ia(l)||Gu(l)?(f=c,Gu(c)?f=ga(c):ea(c)&&!Ju(c)||(f=gi(l))):p=!1}p&&(a.set(l,f),o(f,l,n,u,a),a.delete(l));tn(t,r,f)}(t,e,a,r,Xn,n,o);else{var c=n?n(Di(t,a),u,a+"",t,e,o):i;c===i&&(c=u),tn(t,a,c)}}),Ma)}function Gn(t,e){var r=t.length;if(r)return Oi(e+=e<0?r:0,r)?t[e]:i}function Yn(t,e,r){e=e.length?Ie(e,(function(t){return Yu(t)?function(e){return Sn(e,1===t.length?t[0]:t)}:t})):[oc];var n=-1;e=Ie(e,tr(si()));var o=Un(t,(function(t,r,o){var i=Ie(e,(function(e){return e(t)}));return{criteria:i,index:++n,value:t}}));return function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(o,(function(t,e){return function(t,e,r){var n=-1,o=t.criteria,i=e.criteria,u=o.length,a=r.length;for(;++n<u;){var c=ko(o[n],i[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}))}function Vn(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var u=e[n],a=Sn(t,u);r(a,u)&&to(i,wo(u,t),a)}return i}function Wn(t,e,r,n){var o=n?Ye:Ge,i=-1,u=e.length,a=t;for(t===e&&(e=To(e)),r&&(a=Ie(t,tr(r)));++i<u;)for(var c=0,l=e[i],s=r?r(l):l;(c=o(a,s,c,n))>-1;)a!==t&&qt.call(a,c,1),qt.call(t,c,1);return t}function Kn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var o=e[r];if(r==n||o!==i){var i=o;Oi(o)?qt.call(t,o,1):po(t,o)}}return t}function $n(t,e){return t+he(_r()*(e-t+1))}function qn(t,e){var r="";if(!t||e<1||e>h)return r;do{e%2&&(r+=t),(e=he(e/2))&&(t+=t)}while(e);return r}function Zn(t,e){return Mi(ki(t,e,oc),t+"")}function Jn(t){return Zr(Fa(t))}function Qn(t,e){var r=Fa(t);return Ii(r,cn(e,0,r.length))}function to(t,e,r,n){if(!ea(t))return t;for(var o=-1,u=(e=wo(e,t)).length,a=u-1,c=t;null!=c&&++o<u;){var l=zi(e[o]),s=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(o!=a){var f=c[l];(s=n?n(f,l,c):i)===i&&(s=ea(f)?f:Oi(e[o+1])?[]:{})}en(c,l,s),c=c[l]}return t}var eo=Dr?function(t,e){return Dr.set(t,e),t}:oc,ro=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:ec(e),writable:!0})}:oc;function no(t){return Ii(Fa(t))}function oo(t,e,r){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var u=n(i);++o<i;)u[o]=t[o+e];return u}function io(t,e){var r;return yn(t,(function(t,n,o){return!(r=e(t,n,o))})),!!r}function uo(t,e,r){var n=0,o=null==t?n:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;n<o;){var i=n+o>>>1,u=t[i];null!==u&&!la(u)&&(r?u<=e:u<e)?n=i+1:o=i}return o}return ao(t,e,oc,r)}function ao(t,e,r,n){var o=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=r(e))!=e,c=null===e,l=la(e),s=e===i;o<u;){var f=he((o+u)/2),p=r(t[f]),y=p!==i,d=null===p,h=p==p,v=la(p);if(a)var b=n||h;else b=s?h&&(n||y):c?h&&y&&(n||!d):l?h&&y&&!d&&(n||!v):!d&&!v&&(n?p<=e:p<e);b?o=f+1:u=f}return mr(u,4294967294)}function co(t,e){for(var r=-1,n=t.length,o=0,i=[];++r<n;){var u=t[r],a=e?e(u):u;if(!r||!Fu(a,c)){var c=a;i[o++]=0===u?0:u}}return i}function lo(t){return"number"==typeof t?t:la(t)?v:+t}function so(t){if("string"==typeof t)return t;if(Yu(t))return Ie(t,so)+"";if(la(t))return Br?Br.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function fo(t,e,r){var n=-1,o=Ce,i=t.length,u=!0,a=[],c=a;if(r)u=!1,o=Re;else if(i>=200){var l=e?null:Zo(t);if(l)return pr(l);u=!1,o=rr,c=new Kr}else c=e?[]:a;t:for(;++n<i;){var s=t[n],f=e?e(s):s;if(s=r||0!==s?s:0,u&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue t;e&&c.push(f),a.push(s)}else o(c,f,r)||(c!==a&&c.push(f),a.push(s))}return a}function po(t,e){return null==(t=Ai(t,e=wo(e,t)))||delete t[zi(Zi(e))]}function yo(t,e,r,n){return to(t,e,r(Sn(t,e)),n)}function ho(t,e,r,n){for(var o=t.length,i=n?o:-1;(n?i--:++i<o)&&e(t[i],i,t););return r?oo(t,n?0:i,n?i+1:o):oo(t,n?i+1:0,n?o:i)}function vo(t,e){var r=t;return r instanceof Gr&&(r=r.value()),ze(e,(function(t,e){return e.func.apply(e.thisArg,Le([t],e.args))}),r)}function bo(t,e,r){var o=t.length;if(o<2)return o?fo(t[0]):[];for(var i=-1,u=n(o);++i<o;)for(var a=t[i],c=-1;++c<o;)c!=i&&(u[i]=pn(u[i]||a,t[c],e,r));return fo(gn(u,1),e,r)}function go(t,e,r){for(var n=-1,o=t.length,u=e.length,a={};++n<o;){var c=n<u?e[n]:i;r(a,t[n],c)}return a}function mo(t){return Ku(t)?t:[]}function Oo(t){return"function"==typeof t?t:oc}function wo(t,e){return Yu(t)?t:_i(t,e)?[t]:Li(ma(t))}var _o=Zn;function jo(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:oo(t,e,r)}var So=ne||function(t){return ve.clearTimeout(t)};function xo(t,e){if(e)return t.slice();var r=t.length,n=Vt?Vt(r):new t.constructor(r);return t.copy(n),n}function Eo(t){var e=new t.constructor(t.byteLength);return new Yt(e).set(new Yt(t)),e}function Po(t,e){var r=e?Eo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function ko(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,u=la(t),a=e!==i,c=null===e,l=e==e,s=la(e);if(!c&&!s&&!u&&t>e||u&&a&&l&&!c&&!s||n&&a&&l||!r&&l||!o)return 1;if(!n&&!u&&!s&&t<e||s&&r&&o&&!n&&!u||c&&r&&o||!a&&o||!l)return-1}return 0}function Ao(t,e,r,o){for(var i=-1,u=t.length,a=r.length,c=-1,l=e.length,s=$e(u-a,0),f=n(l+s),p=!o;++c<l;)f[c]=e[c];for(;++i<a;)(p||i<u)&&(f[r[i]]=t[i]);for(;s--;)f[c++]=t[i++];return f}function Do(t,e,r,o){for(var i=-1,u=t.length,a=-1,c=r.length,l=-1,s=e.length,f=$e(u-c,0),p=n(f+s),y=!o;++i<f;)p[i]=t[i];for(var d=i;++l<s;)p[d+l]=e[l];for(;++a<c;)(y||i<u)&&(p[d+r[a]]=t[i++]);return p}function To(t,e){var r=-1,o=t.length;for(e||(e=n(o));++r<o;)e[r]=t[r];return e}function No(t,e,r,n){var o=!r;r||(r={});for(var u=-1,a=e.length;++u<a;){var c=e[u],l=n?n(r[c],t[c],c,r,t):i;l===i&&(l=t[c]),o?un(r,c,l):en(r,c,l)}return r}function Mo(t,e){return function(r,n){var o=Yu(r)?Ae:nn,i=e?e():{};return o(r,t,si(n,2),i)}}function Co(t){return Zn((function(e,r){var n=-1,o=r.length,u=o>1?r[o-1]:i,a=o>2?r[2]:i;for(u=t.length>3&&"function"==typeof u?(o--,u):i,a&&wi(r[0],r[1],a)&&(u=o<3?i:u,o=1),e=Pt(e);++n<o;){var c=r[n];c&&t(e,c,n,u)}return e}))}function Ro(t,e){return function(r,n){if(null==r)return r;if(!Wu(r))return t(r,n);for(var o=r.length,i=e?o:-1,u=Pt(r);(e?i--:++i<o)&&!1!==n(u[i],i,u););return r}}function Io(t){return function(e,r,n){for(var o=-1,i=Pt(e),u=n(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return e}}function Lo(t){return function(e){var r=cr(e=ma(e))?hr(e):i,n=r?r[0]:e.charAt(0),o=r?jo(r,1).join(""):e.slice(1);return n[t]()+o}}function zo(t){return function(e){return ze(Ja(Ga(e).replace(ee,"")),t,"")}}function Bo(t){return function(){var e=arguments;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]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Fr(t.prototype),n=t.apply(r,e);return ea(n)?n:r}}function Uo(t){return function(e,r,n){var o=Pt(e);if(!Wu(e)){var u=si(r,3);e=Na(e),r=function(t){return u(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[u?e[a]:a]:i}}function Fo(t){return oi((function(e){var r=e.length,n=r,o=Xr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new Dt(u);if(o&&!c&&"wrapper"==ci(a))var c=new Xr([],!0)}for(n=c?n:r;++n<r;){var l=ci(a=e[n]),s="wrapper"==l?ai(a):i;c=s&&ji(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?c[ci(s[0])].apply(c,s[3]):1==a.length&&ji(a)?c[l]():c.thru(a)}return function(){var t=arguments,n=t[0];if(c&&1==t.length&&Yu(n))return c.plant(n).value();for(var o=0,i=r?e[o].apply(this,t):n;++o<r;)i=e[o].call(this,i);return i}}))}function Ho(t,e,r,o,u,a,c,l,s,f){var y=e&p,d=1&e,h=2&e,v=24&e,b=512&e,g=h?i:Bo(t);return function p(){for(var m=arguments.length,O=n(m),w=m;w--;)O[w]=arguments[w];if(v)var _=li(p),j=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}(O,_);if(o&&(O=Ao(O,o,u,v)),a&&(O=Do(O,a,c,v)),m-=j,v&&m<f){var S=fr(O,_);return $o(t,e,Ho,p.placeholder,r,O,S,l,s,f-m)}var x=d?r:this,E=h?x[t]:t;return m=O.length,l?O=function(t,e){var r=t.length,n=mr(e.length,r),o=To(t);for(;n--;){var u=e[n];t[n]=Oi(u,r)?o[u]:i}return t}(O,l):b&&m>1&&O.reverse(),y&&s<m&&(O.length=s),this&&this!==ve&&this instanceof p&&(E=g||Bo(E)),E.apply(x,O)}}function Xo(t,e){return function(r,n){return function(t,e,r,n){return wn(t,(function(t,o,i){e(n,r(t),o,i)})),n}(r,t,e(n),{})}}function Go(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=so(r),n=so(n)):(r=lo(r),n=lo(n)),o=t(r,n)}return o}}function Yo(t){return oi((function(e){return e=Ie(e,tr(si())),Zn((function(r){var n=this;return t(e,(function(t){return ke(t,n,r)}))}))}))}function Vo(t,e){var r=(e=e===i?" ":so(e)).length;if(r<2)return r?qn(e,t):e;var n=qn(e,de(t/dr(e)));return cr(e)?jo(hr(n),0,t).join(""):n.slice(0,t)}function Wo(t){return function(e,r,o){return o&&"number"!=typeof o&&wi(e,r,o)&&(r=o=i),e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r,o){for(var i=-1,u=$e(de((e-t)/(r||1)),0),a=n(u);u--;)a[o?u:++i]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:da(o),t)}}function Ko(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ba(e),r=ba(r)),t(e,r)}}function $o(t,e,r,n,o,u,a,c,l,p){var y=8&e;e|=y?s:f,4&(e&=~(y?f:s))||(e&=-4);var d=[t,e,o,y?u:i,y?a:i,y?i:u,y?i:a,c,l,p],h=r.apply(i,d);return ji(t)&&Ti(h,d),h.placeholder=n,Ci(h,t,e)}function qo(t){var e=Et[t];return function(t,r){if(t=ba(t),(r=null==r?0:mr(ha(r),292))&&Oe(t)){var n=(ma(t)+"e").split("e");return+((n=(ma(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Zo=Pr&&1/pr(new Pr([,-0]))[1]==d?function(t){return new Pr(t)}:lc;function Jo(t){return function(e){var r=vi(e);return r==E?lr(e):r==T?yr(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Qo(t,e,r,o,a,d,h,v){var b=2&e;if(!b&&"function"!=typeof t)throw new Dt(u);var g=o?o.length:0;if(g||(e&=-97,o=a=i),h=h===i?h:$e(ha(h),0),v=v===i?v:ha(v),g-=a?a.length:0,e&f){var m=o,O=a;o=a=i}var w=b?i:ai(t),_=[t,e,r,o,a,m,O,d,h,v];if(w&&function(t,e){var r=t[1],n=e[1],o=r|n,i=o<131,u=n==p&&8==r||n==p&&r==y&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!i&&!u)return t;1&n&&(t[2]=e[2],o|=1&r?0:4);var a=e[3];if(a){var l=t[3];t[3]=l?Ao(l,a,e[4]):a,t[4]=l?fr(t[3],c):e[4]}(a=e[5])&&(l=t[5],t[5]=l?Do(l,a,e[6]):a,t[6]=l?fr(t[5],c):e[6]);(a=e[7])&&(t[7]=a);n&p&&(t[8]=null==t[8]?e[8]:mr(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=o}(_,w),t=_[0],e=_[1],r=_[2],o=_[3],a=_[4],!(v=_[9]=_[9]===i?b?0:t.length:$e(_[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)j=8==e||e==l?function(t,e,r){var o=Bo(t);return function u(){for(var a=arguments.length,c=n(a),l=a,s=li(u);l--;)c[l]=arguments[l];var f=a<3&&c[0]!==s&&c[a-1]!==s?[]:fr(c,s);return(a-=f.length)<r?$o(t,e,Ho,u.placeholder,i,c,f,i,i,r-a):ke(this&&this!==ve&&this instanceof u?o:t,this,c)}}(t,e,v):e!=s&&33!=e||a.length?Ho.apply(i,_):function(t,e,r,o){var i=1&e,u=Bo(t);return function e(){for(var a=-1,c=arguments.length,l=-1,s=o.length,f=n(s+c),p=this&&this!==ve&&this instanceof e?u:t;++l<s;)f[l]=o[l];for(;c--;)f[l++]=arguments[++a];return ke(p,i?r:this,f)}}(t,e,r,o);else var j=function(t,e,r){var n=1&e,o=Bo(t);return function e(){return(this&&this!==ve&&this instanceof e?o:t).apply(n?r:this,arguments)}}(t,e,r);return Ci((w?eo:Ti)(j,_),t,e)}function ti(t,e,r,n){return t===i||Fu(t,Mt[r])&&!It.call(n,r)?e:t}function ei(t,e,r,n,o,u){return ea(t)&&ea(e)&&(u.set(e,t),Xn(t,e,i,ei,u),u.delete(e)),t}function ri(t){return ia(t)?i:t}function ni(t,e,r,n,o,u){var a=1&r,c=t.length,l=e.length;if(c!=l&&!(a&&l>c))return!1;var s=u.get(t),f=u.get(e);if(s&&f)return s==e&&f==t;var p=-1,y=!0,d=2&r?new Kr:i;for(u.set(t,e),u.set(e,t);++p<c;){var h=t[p],v=e[p];if(n)var b=a?n(v,h,p,e,t,u):n(h,v,p,t,e,u);if(b!==i){if(b)continue;y=!1;break}if(d){if(!Ue(e,(function(t,e){if(!rr(d,e)&&(h===t||o(h,t,r,n,u)))return d.push(e)}))){y=!1;break}}else if(h!==v&&!o(h,v,r,n,u)){y=!1;break}}return u.delete(t),u.delete(e),y}function oi(t){return Mi(ki(t,i,Vi),t+"")}function ii(t){return xn(t,Na,di)}function ui(t){return xn(t,Ma,hi)}var ai=Dr?function(t){return Dr.get(t)}:lc;function ci(t){for(var e=t.name+"",r=Tr[e],n=It.call(Tr,e)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==t)return o.name}return e}function li(t){return(It.call(Ur,"placeholder")?Ur:t).placeholder}function si(){var t=Ur.iteratee||ic;return t=t===ic?In:t,arguments.length?t(arguments[0],arguments[1]):t}function fi(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function pi(t){for(var e=Na(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Ei(o)]}return e}function yi(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Rn(r)?r:i}var di=be?function(t){return null==t?[]:(t=Pt(t),Me(be(t),(function(e){return $t.call(t,e)})))}:vc,hi=be?function(t){for(var e=[];t;)Le(e,di(t)),t=Wt(t);return e}:vc,vi=En;function bi(t,e,r){for(var n=-1,o=(e=wo(e,t)).length,i=!1;++n<o;){var u=zi(e[n]);if(!(i=null!=t&&r(t,u)))break;t=t[u]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ta(o)&&Oi(u,o)&&(Yu(t)||Gu(t))}function gi(t){return"function"!=typeof t.constructor||xi(t)?{}:Fr(Wt(t))}function mi(t){return Yu(t)||Gu(t)||!!(Zt&&t&&t[Zt])}function Oi(t,e){var r=typeof t;return!!(e=null==e?h:e)&&("number"==r||"symbol"!=r&&wt.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,r){if(!ea(r))return!1;var n=typeof e;return!!("number"==n?Wu(r)&&Oi(e,r.length):"string"==n&&e in r)&&Fu(r[e],t)}function _i(t,e){if(Yu(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!la(t))||(nt.test(t)||!rt.test(t)||null!=e&&t in Pt(e))}function ji(t){var e=ci(t),r=Ur[e];if("function"!=typeof r||!(e in Gr.prototype))return!1;if(t===r)return!0;var n=ai(r);return!!n&&t===n[0]}(Sr&&vi(new Sr(new ArrayBuffer(1)))!=I||xr&&vi(new xr)!=E||Er&&vi(Er.resolve())!=A||Pr&&vi(new Pr)!=T||kr&&vi(new kr)!=C)&&(vi=function(t){var e=En(t),r=e==k?t.constructor:i,n=r?Bi(r):"";if(n)switch(n){case Nr:return I;case Mr:return E;case Cr:return A;case Rr:return T;case Ir:return C}return e});var Si=Ct?Ju:bc;function xi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Mt)}function Ei(t){return t==t&&!ea(t)}function Pi(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==i||t in Pt(r)))}}function ki(t,e,r){return e=$e(e===i?t.length-1:e,0),function(){for(var o=arguments,i=-1,u=$e(o.length-e,0),a=n(u);++i<u;)a[i]=o[e+i];i=-1;for(var c=n(e+1);++i<e;)c[i]=o[i];return c[e]=r(a),ke(t,this,c)}}function Ai(t,e){return e.length<2?t:Sn(t,oo(e,0,-1))}function Di(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ti=Ri(eo),Ni=fe||function(t,e){return ve.setTimeout(t,e)},Mi=Ri(ro);function Ci(t,e,r){var n=e+"";return Mi(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(lt,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return De(g,(function(r){var n="_."+r[0];e&r[1]&&!Ce(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(ft):[]}(n),r)))}function Ri(t){var e=0,r=0;return function(){var n=Or(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ii(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var u=$n(r,o),a=t[u];t[u]=t[r],t[r]=a}return t.length=e,t}var Li=function(t){var e=Ru(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(ot,(function(t,r,n,o){e.push(n?o.replace(dt,"$1"):r||t)})),e}));function zi(t){if("string"==typeof t||la(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Bi(t){if(null!=t){try{return Rt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ui(t){if(t instanceof Gr)return t.clone();var e=new Xr(t.__wrapped__,t.__chain__);return e.__actions__=To(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Fi=Zn((function(t,e){return Ku(t)?pn(t,gn(e,1,Ku,!0)):[]})),Hi=Zn((function(t,e){var r=Zi(e);return Ku(r)&&(r=i),Ku(t)?pn(t,gn(e,1,Ku,!0),si(r,2)):[]})),Xi=Zn((function(t,e){var r=Zi(e);return Ku(r)&&(r=i),Ku(t)?pn(t,gn(e,1,Ku,!0),i,r):[]}));function Gi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:ha(r);return o<0&&(o=$e(n+o,0)),Xe(t,si(e,3),o)}function Yi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ha(r),o=r<0?$e(n+o,0):mr(o,n-1)),Xe(t,si(e,3),o,!0)}function Vi(t){return(null==t?0:t.length)?gn(t,1):[]}function Wi(t){return t&&t.length?t[0]:i}var Ki=Zn((function(t){var e=Ie(t,mo);return e.length&&e[0]===t[0]?Dn(e):[]})),$i=Zn((function(t){var e=Zi(t),r=Ie(t,mo);return e===Zi(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Dn(r,si(e,2)):[]})),qi=Zn((function(t){var e=Zi(t),r=Ie(t,mo);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Dn(r,i,e):[]}));function Zi(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Ji=Zn(Qi);function Qi(t,e){return t&&t.length&&e&&e.length?Wn(t,e):t}var tu=oi((function(t,e){var r=null==t?0:t.length,n=an(t,e);return Kn(t,Ie(e,(function(t){return Oi(t,r)?+t:t})).sort(ko)),n}));function eu(t){return null==t?t:jr.call(t)}var ru=Zn((function(t){return fo(gn(t,1,Ku,!0))})),nu=Zn((function(t){var e=Zi(t);return Ku(e)&&(e=i),fo(gn(t,1,Ku,!0),si(e,2))})),ou=Zn((function(t){var e=Zi(t);return e="function"==typeof e?e:i,fo(gn(t,1,Ku,!0),i,e)}));function iu(t){if(!t||!t.length)return[];var e=0;return t=Me(t,(function(t){if(Ku(t))return e=$e(t.length,e),!0})),Je(e,(function(e){return Ie(t,Ke(e))}))}function uu(t,e){if(!t||!t.length)return[];var r=iu(t);return null==e?r:Ie(r,(function(t){return ke(e,i,t)}))}var au=Zn((function(t,e){return Ku(t)?pn(t,e):[]})),cu=Zn((function(t){return bo(Me(t,Ku))})),lu=Zn((function(t){var e=Zi(t);return Ku(e)&&(e=i),bo(Me(t,Ku),si(e,2))})),su=Zn((function(t){var e=Zi(t);return e="function"==typeof e?e:i,bo(Me(t,Ku),i,e)})),fu=Zn(iu);var pu=Zn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,uu(t,r)}));function yu(t){var e=Ur(t);return e.__chain__=!0,e}function du(t,e){return e(t)}var hu=oi((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return an(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Gr&&Oi(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:du,args:[o],thisArg:i}),new Xr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var vu=Mo((function(t,e,r){It.call(t,r)?++t[r]:un(t,r,1)}));var bu=Uo(Gi),gu=Uo(Yi);function mu(t,e){return(Yu(t)?De:yn)(t,si(e,3))}function Ou(t,e){return(Yu(t)?Te:dn)(t,si(e,3))}var wu=Mo((function(t,e,r){It.call(t,r)?t[r].push(e):un(t,r,[e])}));var _u=Zn((function(t,e,r){var o=-1,i="function"==typeof e,u=Wu(t)?n(t.length):[];return yn(t,(function(t){u[++o]=i?ke(e,t,r):Tn(t,e,r)})),u})),ju=Mo((function(t,e,r){un(t,r,e)}));function Su(t,e){return(Yu(t)?Ie:Un)(t,si(e,3))}var xu=Mo((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var Eu=Zn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&wi(t,e[0],e[1])?e=[]:r>2&&wi(e[0],e[1],e[2])&&(e=[e[0]]),Yn(t,gn(e,1),[])})),Pu=ie||function(){return ve.Date.now()};function ku(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Qo(t,p,i,i,i,i,e)}function Au(t,e){var r;if("function"!=typeof e)throw new Dt(u);return t=ha(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Du=Zn((function(t,e,r){var n=1;if(r.length){var o=fr(r,li(Du));n|=s}return Qo(t,n,e,r,o)})),Tu=Zn((function(t,e,r){var n=3;if(r.length){var o=fr(r,li(Tu));n|=s}return Qo(e,n,t,r,o)}));function Nu(t,e,r){var n,o,a,c,l,s,f=0,p=!1,y=!1,d=!0;if("function"!=typeof t)throw new Dt(u);function h(e){var r=n,u=o;return n=o=i,f=e,c=t.apply(u,r)}function v(t){var r=t-s;return s===i||r>=e||r<0||y&&t-f>=a}function b(){var t=Pu();if(v(t))return g(t);l=Ni(b,function(t){var r=e-(t-s);return y?mr(r,a-(t-f)):r}(t))}function g(t){return l=i,d&&n?h(t):(n=o=i,c)}function m(){var t=Pu(),r=v(t);if(n=arguments,o=this,s=t,r){if(l===i)return function(t){return f=t,l=Ni(b,e),p?h(t):c}(s);if(y)return So(l),l=Ni(b,e),h(s)}return l===i&&(l=Ni(b,e)),c}return e=ba(e)||0,ea(r)&&(p=!!r.leading,a=(y="maxWait"in r)?$e(ba(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d),m.cancel=function(){l!==i&&So(l),f=0,n=s=o=l=i},m.flush=function(){return l===i?c:g(Pu())},m}var Mu=Zn((function(t,e){return fn(t,1,e)})),Cu=Zn((function(t,e,r){return fn(t,ba(e)||0,r)}));function Ru(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Dt(u);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 u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(Ru.Cache||Wr),r}function Iu(t){if("function"!=typeof t)throw new Dt(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ru.Cache=Wr;var Lu=_o((function(t,e){var r=(e=1==e.length&&Yu(e[0])?Ie(e[0],tr(si())):Ie(gn(e,1),tr(si()))).length;return Zn((function(n){for(var o=-1,i=mr(n.length,r);++o<i;)n[o]=e[o].call(this,n[o]);return ke(t,this,n)}))})),zu=Zn((function(t,e){var r=fr(e,li(zu));return Qo(t,s,i,e,r)})),Bu=Zn((function(t,e){var r=fr(e,li(Bu));return Qo(t,f,i,e,r)})),Uu=oi((function(t,e){return Qo(t,y,i,i,i,e)}));function Fu(t,e){return t===e||t!=t&&e!=e}var Hu=Ko(Pn),Xu=Ko((function(t,e){return t>=e})),Gu=Nn(function(){return arguments}())?Nn:function(t){return ra(t)&&It.call(t,"callee")&&!$t.call(t,"callee")},Yu=n.isArray,Vu=_e?tr(_e):function(t){return ra(t)&&En(t)==R};function Wu(t){return null!=t&&ta(t.length)&&!Ju(t)}function Ku(t){return ra(t)&&Wu(t)}var $u=ge||bc,qu=je?tr(je):function(t){return ra(t)&&En(t)==_};function Zu(t){if(!ra(t))return!1;var e=En(t);return e==j||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ia(t)}function Ju(t){if(!ea(t))return!1;var e=En(t);return e==S||e==x||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qu(t){return"number"==typeof t&&t==ha(t)}function ta(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ea(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ra(t){return null!=t&&"object"==typeof t}var na=Se?tr(Se):function(t){return ra(t)&&vi(t)==E};function oa(t){return"number"==typeof t||ra(t)&&En(t)==P}function ia(t){if(!ra(t)||En(t)!=k)return!1;var e=Wt(t);if(null===e)return!0;var r=It.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Rt.call(r)==Ut}var ua=xe?tr(xe):function(t){return ra(t)&&En(t)==D};var aa=Ee?tr(Ee):function(t){return ra(t)&&vi(t)==T};function ca(t){return"string"==typeof t||!Yu(t)&&ra(t)&&En(t)==N}function la(t){return"symbol"==typeof t||ra(t)&&En(t)==M}var sa=Pe?tr(Pe):function(t){return ra(t)&&ta(t.length)&&!!le[En(t)]};var fa=Ko(Bn),pa=Ko((function(t,e){return t<=e}));function ya(t){if(!t)return[];if(Wu(t))return ca(t)?hr(t):To(t);if(Jt&&t[Jt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Jt]());var e=vi(t);return(e==E?lr:e==T?pr:Fa)(t)}function da(t){return t?(t=ba(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ha(t){var e=da(t),r=e%1;return e==e?r?e-r:e:0}function va(t){return t?cn(ha(t),0,b):0}function ba(t){if("number"==typeof t)return t;if(la(t))return v;if(ea(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ea(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Qe(t);var r=gt.test(t);return r||Ot.test(t)?ye(t.slice(2),r?2:8):bt.test(t)?v:+t}function ga(t){return No(t,Ma(t))}function ma(t){return null==t?"":so(t)}var Oa=Co((function(t,e){if(xi(e)||Wu(e))No(e,Na(e),t);else for(var r in e)It.call(e,r)&&en(t,r,e[r])})),wa=Co((function(t,e){No(e,Ma(e),t)})),_a=Co((function(t,e,r,n){No(e,Ma(e),t,n)})),ja=Co((function(t,e,r,n){No(e,Na(e),t,n)})),Sa=oi(an);var xa=Zn((function(t,e){t=Pt(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&wi(e[0],e[1],o)&&(n=1);++r<n;)for(var u=e[r],a=Ma(u),c=-1,l=a.length;++c<l;){var s=a[c],f=t[s];(f===i||Fu(f,Mt[s])&&!It.call(t,s))&&(t[s]=u[s])}return t})),Ea=Zn((function(t){return t.push(i,ei),ke(Ra,i,t)}));function Pa(t,e,r){var n=null==t?i:Sn(t,e);return n===i?r:n}function ka(t,e){return null!=t&&bi(t,e,An)}var Aa=Xo((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=r}),ec(oc)),Da=Xo((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),It.call(t,e)?t[e].push(r):t[e]=[r]}),si),Ta=Zn(Tn);function Na(t){return Wu(t)?qr(t):Ln(t)}function Ma(t){return Wu(t)?qr(t,!0):zn(t)}var Ca=Co((function(t,e,r){Xn(t,e,r)})),Ra=Co((function(t,e,r,n){Xn(t,e,r,n)})),Ia=oi((function(t,e){var r={};if(null==t)return r;var n=!1;e=Ie(e,(function(e){return e=wo(e,t),n||(n=e.length>1),e})),No(t,ui(t),r),n&&(r=ln(r,7,ri));for(var o=e.length;o--;)po(r,e[o]);return r}));var La=oi((function(t,e){return null==t?{}:function(t,e){return Vn(t,e,(function(e,r){return ka(t,r)}))}(t,e)}));function za(t,e){if(null==t)return{};var r=Ie(ui(t),(function(t){return[t]}));return e=si(e),Vn(t,r,(function(t,r){return e(t,r[0])}))}var Ba=Jo(Na),Ua=Jo(Ma);function Fa(t){return null==t?[]:er(t,Na(t))}var Ha=zo((function(t,e,r){return e=e.toLowerCase(),t+(r?Xa(e):e)}));function Xa(t){return Za(ma(t).toLowerCase())}function Ga(t){return(t=ma(t))&&t.replace(_t,ir).replace(re,"")}var Ya=zo((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Va=zo((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Wa=Lo("toLowerCase");var Ka=zo((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var $a=zo((function(t,e,r){return t+(r?" ":"")+Za(e)}));var qa=zo((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Za=Lo("toUpperCase");function Ja(t,e,r){return t=ma(t),(e=r?i:e)===i?function(t){return ue.test(t)}(t)?function(t){return t.match(oe)||[]}(t):function(t){return t.match(pt)||[]}(t):t.match(e)||[]}var Qa=Zn((function(t,e){try{return ke(t,i,e)}catch(t){return Zu(t)?t:new ct(t)}})),tc=oi((function(t,e){return De(e,(function(e){e=zi(e),un(t,e,Du(t[e],t))})),t}));function ec(t){return function(){return t}}var rc=Fo(),nc=Fo(!0);function oc(t){return t}function ic(t){return In("function"==typeof t?t:ln(t,1))}var uc=Zn((function(t,e){return function(r){return Tn(r,t,e)}})),ac=Zn((function(t,e){return function(r){return Tn(t,r,e)}}));function cc(t,e,r){var n=Na(e),o=jn(e,n);null!=r||ea(e)&&(o.length||!n.length)||(r=e,e=t,t=this,o=jn(e,Na(e)));var i=!(ea(r)&&"chain"in r&&!r.chain),u=Ju(t);return De(o,(function(r){var n=e[r];t[r]=n,u&&(t.prototype[r]=function(){var e=this.__chain__;if(i||e){var r=t(this.__wrapped__);return(r.__actions__=To(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Le([this.value()],arguments))})})),t}function lc(){}var sc=Yo(Ie),fc=Yo(Ne),pc=Yo(Ue);function yc(t){return _i(t)?Ke(zi(t)):function(t){return function(e){return Sn(e,t)}}(t)}var dc=Wo(),hc=Wo(!0);function vc(){return[]}function bc(){return!1}var gc=Go((function(t,e){return t+e}),0),mc=qo("ceil"),Oc=Go((function(t,e){return t/e}),1),wc=qo("floor");var _c,jc=Go((function(t,e){return t*e}),1),Sc=qo("round"),xc=Go((function(t,e){return t-e}),0);return Ur.after=function(t,e){if("function"!=typeof e)throw new Dt(u);return t=ha(t),function(){if(--t<1)return e.apply(this,arguments)}},Ur.ary=ku,Ur.assign=Oa,Ur.assignIn=wa,Ur.assignInWith=_a,Ur.assignWith=ja,Ur.at=Sa,Ur.before=Au,Ur.bind=Du,Ur.bindAll=tc,Ur.bindKey=Tu,Ur.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Yu(t)?t:[t]},Ur.chain=yu,Ur.chunk=function(t,e,r){e=(r?wi(t,e,r):e===i)?1:$e(ha(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var u=0,a=0,c=n(de(o/e));u<o;)c[a++]=oo(t,u,u+=e);return c},Ur.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,o=[];++e<r;){var i=t[e];i&&(o[n++]=i)}return o},Ur.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Le(Yu(r)?To(r):[r],gn(e,1))},Ur.cond=function(t){var e=null==t?0:t.length,r=si();return t=e?Ie(t,(function(t){if("function"!=typeof t[1])throw new Dt(u);return[r(t[0]),t[1]]})):[],Zn((function(r){for(var n=-1;++n<e;){var o=t[n];if(ke(o[0],this,r))return ke(o[1],this,r)}}))},Ur.conforms=function(t){return function(t){var e=Na(t);return function(r){return sn(r,t,e)}}(ln(t,1))},Ur.constant=ec,Ur.countBy=vu,Ur.create=function(t,e){var r=Fr(t);return null==e?r:on(r,e)},Ur.curry=function t(e,r,n){var o=Qo(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Ur.curryRight=function t(e,r,n){var o=Qo(e,l,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Ur.debounce=Nu,Ur.defaults=xa,Ur.defaultsDeep=Ea,Ur.defer=Mu,Ur.delay=Cu,Ur.difference=Fi,Ur.differenceBy=Hi,Ur.differenceWith=Xi,Ur.drop=function(t,e,r){var n=null==t?0:t.length;return n?oo(t,(e=r||e===i?1:ha(e))<0?0:e,n):[]},Ur.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?oo(t,0,(e=n-(e=r||e===i?1:ha(e)))<0?0:e):[]},Ur.dropRightWhile=function(t,e){return t&&t.length?ho(t,si(e,3),!0,!0):[]},Ur.dropWhile=function(t,e){return t&&t.length?ho(t,si(e,3),!0):[]},Ur.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wi(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ha(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ha(n))<0&&(n+=o),n=r>n?0:va(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Ur.filter=function(t,e){return(Yu(t)?Me:bn)(t,si(e,3))},Ur.flatMap=function(t,e){return gn(Su(t,e),1)},Ur.flatMapDeep=function(t,e){return gn(Su(t,e),d)},Ur.flatMapDepth=function(t,e,r){return r=r===i?1:ha(r),gn(Su(t,e),r)},Ur.flatten=Vi,Ur.flattenDeep=function(t){return(null==t?0:t.length)?gn(t,d):[]},Ur.flattenDepth=function(t,e){return(null==t?0:t.length)?gn(t,e=e===i?1:ha(e)):[]},Ur.flip=function(t){return Qo(t,512)},Ur.flow=rc,Ur.flowRight=nc,Ur.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var o=t[e];n[o[0]]=o[1]}return n},Ur.functions=function(t){return null==t?[]:jn(t,Na(t))},Ur.functionsIn=function(t){return null==t?[]:jn(t,Ma(t))},Ur.groupBy=wu,Ur.initial=function(t){return(null==t?0:t.length)?oo(t,0,-1):[]},Ur.intersection=Ki,Ur.intersectionBy=$i,Ur.intersectionWith=qi,Ur.invert=Aa,Ur.invertBy=Da,Ur.invokeMap=_u,Ur.iteratee=ic,Ur.keyBy=ju,Ur.keys=Na,Ur.keysIn=Ma,Ur.map=Su,Ur.mapKeys=function(t,e){var r={};return e=si(e,3),wn(t,(function(t,n,o){un(r,e(t,n,o),t)})),r},Ur.mapValues=function(t,e){var r={};return e=si(e,3),wn(t,(function(t,n,o){un(r,n,e(t,n,o))})),r},Ur.matches=function(t){return Fn(ln(t,1))},Ur.matchesProperty=function(t,e){return Hn(t,ln(e,1))},Ur.memoize=Ru,Ur.merge=Ca,Ur.mergeWith=Ra,Ur.method=uc,Ur.methodOf=ac,Ur.mixin=cc,Ur.negate=Iu,Ur.nthArg=function(t){return t=ha(t),Zn((function(e){return Gn(e,t)}))},Ur.omit=Ia,Ur.omitBy=function(t,e){return za(t,Iu(si(e)))},Ur.once=function(t){return Au(2,t)},Ur.orderBy=function(t,e,r,n){return null==t?[]:(Yu(e)||(e=null==e?[]:[e]),Yu(r=n?i:r)||(r=null==r?[]:[r]),Yn(t,e,r))},Ur.over=sc,Ur.overArgs=Lu,Ur.overEvery=fc,Ur.overSome=pc,Ur.partial=zu,Ur.partialRight=Bu,Ur.partition=xu,Ur.pick=La,Ur.pickBy=za,Ur.property=yc,Ur.propertyOf=function(t){return function(e){return null==t?i:Sn(t,e)}},Ur.pull=Ji,Ur.pullAll=Qi,Ur.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,si(r,2)):t},Ur.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Wn(t,e,i,r):t},Ur.pullAt=tu,Ur.range=dc,Ur.rangeRight=hc,Ur.rearg=Uu,Ur.reject=function(t,e){return(Yu(t)?Me:bn)(t,Iu(si(e,3)))},Ur.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,o=[],i=t.length;for(e=si(e,3);++n<i;){var u=t[n];e(u,n,t)&&(r.push(u),o.push(n))}return Kn(t,o),r},Ur.rest=function(t,e){if("function"!=typeof t)throw new Dt(u);return Zn(t,e=e===i?e:ha(e))},Ur.reverse=eu,Ur.sampleSize=function(t,e,r){return e=(r?wi(t,e,r):e===i)?1:ha(e),(Yu(t)?Jr:Qn)(t,e)},Ur.set=function(t,e,r){return null==t?t:to(t,e,r)},Ur.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:to(t,e,r,n)},Ur.shuffle=function(t){return(Yu(t)?Qr:no)(t)},Ur.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&wi(t,e,r)?(e=0,r=n):(e=null==e?0:ha(e),r=r===i?n:ha(r)),oo(t,e,r)):[]},Ur.sortBy=Eu,Ur.sortedUniq=function(t){return t&&t.length?co(t):[]},Ur.sortedUniqBy=function(t,e){return t&&t.length?co(t,si(e,2)):[]},Ur.split=function(t,e,r){return r&&"number"!=typeof r&&wi(t,e,r)&&(e=r=i),(r=r===i?b:r>>>0)?(t=ma(t))&&("string"==typeof e||null!=e&&!ua(e))&&!(e=so(e))&&cr(t)?jo(hr(t),0,r):t.split(e,r):[]},Ur.spread=function(t,e){if("function"!=typeof t)throw new Dt(u);return e=null==e?0:$e(ha(e),0),Zn((function(r){var n=r[e],o=jo(r,0,e);return n&&Le(o,n),ke(t,this,o)}))},Ur.tail=function(t){var e=null==t?0:t.length;return e?oo(t,1,e):[]},Ur.take=function(t,e,r){return t&&t.length?oo(t,0,(e=r||e===i?1:ha(e))<0?0:e):[]},Ur.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?oo(t,(e=n-(e=r||e===i?1:ha(e)))<0?0:e,n):[]},Ur.takeRightWhile=function(t,e){return t&&t.length?ho(t,si(e,3),!1,!0):[]},Ur.takeWhile=function(t,e){return t&&t.length?ho(t,si(e,3)):[]},Ur.tap=function(t,e){return e(t),t},Ur.throttle=function(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw new Dt(u);return ea(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Nu(t,e,{leading:n,maxWait:e,trailing:o})},Ur.thru=du,Ur.toArray=ya,Ur.toPairs=Ba,Ur.toPairsIn=Ua,Ur.toPath=function(t){return Yu(t)?Ie(t,zi):la(t)?[t]:To(Li(ma(t)))},Ur.toPlainObject=ga,Ur.transform=function(t,e,r){var n=Yu(t),o=n||$u(t)||sa(t);if(e=si(e,4),null==r){var i=t&&t.constructor;r=o?n?new i:[]:ea(t)&&Ju(i)?Fr(Wt(t)):{}}return(o?De:wn)(t,(function(t,n,o){return e(r,t,n,o)})),r},Ur.unary=function(t){return ku(t,1)},Ur.union=ru,Ur.unionBy=nu,Ur.unionWith=ou,Ur.uniq=function(t){return t&&t.length?fo(t):[]},Ur.uniqBy=function(t,e){return t&&t.length?fo(t,si(e,2)):[]},Ur.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?fo(t,i,e):[]},Ur.unset=function(t,e){return null==t||po(t,e)},Ur.unzip=iu,Ur.unzipWith=uu,Ur.update=function(t,e,r){return null==t?t:yo(t,e,Oo(r))},Ur.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:yo(t,e,Oo(r),n)},Ur.values=Fa,Ur.valuesIn=function(t){return null==t?[]:er(t,Ma(t))},Ur.without=au,Ur.words=Ja,Ur.wrap=function(t,e){return zu(Oo(e),t)},Ur.xor=cu,Ur.xorBy=lu,Ur.xorWith=su,Ur.zip=fu,Ur.zipObject=function(t,e){return go(t||[],e||[],en)},Ur.zipObjectDeep=function(t,e){return go(t||[],e||[],to)},Ur.zipWith=pu,Ur.entries=Ba,Ur.entriesIn=Ua,Ur.extend=wa,Ur.extendWith=_a,cc(Ur,Ur),Ur.add=gc,Ur.attempt=Qa,Ur.camelCase=Ha,Ur.capitalize=Xa,Ur.ceil=mc,Ur.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=ba(r))==r?r:0),e!==i&&(e=(e=ba(e))==e?e:0),cn(ba(t),e,r)},Ur.clone=function(t){return ln(t,4)},Ur.cloneDeep=function(t){return ln(t,5)},Ur.cloneDeepWith=function(t,e){return ln(t,5,e="function"==typeof e?e:i)},Ur.cloneWith=function(t,e){return ln(t,4,e="function"==typeof e?e:i)},Ur.conformsTo=function(t,e){return null==e||sn(t,e,Na(e))},Ur.deburr=Ga,Ur.defaultTo=function(t,e){return null==t||t!=t?e:t},Ur.divide=Oc,Ur.endsWith=function(t,e,r){t=ma(t),e=so(e);var n=t.length,o=r=r===i?n:cn(ha(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Ur.eq=Fu,Ur.escape=function(t){return(t=ma(t))&&J.test(t)?t.replace(q,ur):t},Ur.escapeRegExp=function(t){return(t=ma(t))&&ut.test(t)?t.replace(it,"\\$&"):t},Ur.every=function(t,e,r){var n=Yu(t)?Ne:hn;return r&&wi(t,e,r)&&(e=i),n(t,si(e,3))},Ur.find=bu,Ur.findIndex=Gi,Ur.findKey=function(t,e){return He(t,si(e,3),wn)},Ur.findLast=gu,Ur.findLastIndex=Yi,Ur.findLastKey=function(t,e){return He(t,si(e,3),_n)},Ur.floor=wc,Ur.forEach=mu,Ur.forEachRight=Ou,Ur.forIn=function(t,e){return null==t?t:mn(t,si(e,3),Ma)},Ur.forInRight=function(t,e){return null==t?t:On(t,si(e,3),Ma)},Ur.forOwn=function(t,e){return t&&wn(t,si(e,3))},Ur.forOwnRight=function(t,e){return t&&_n(t,si(e,3))},Ur.get=Pa,Ur.gt=Hu,Ur.gte=Xu,Ur.has=function(t,e){return null!=t&&bi(t,e,kn)},Ur.hasIn=ka,Ur.head=Wi,Ur.identity=oc,Ur.includes=function(t,e,r,n){t=Wu(t)?t:Fa(t),r=r&&!n?ha(r):0;var o=t.length;return r<0&&(r=$e(o+r,0)),ca(t)?r<=o&&t.indexOf(e,r)>-1:!!o&&Ge(t,e,r)>-1},Ur.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:ha(r);return o<0&&(o=$e(n+o,0)),Ge(t,e,o)},Ur.inRange=function(t,e,r){return e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r){return t>=mr(e,r)&&t<$e(e,r)}(t=ba(t),e,r)},Ur.invoke=Ta,Ur.isArguments=Gu,Ur.isArray=Yu,Ur.isArrayBuffer=Vu,Ur.isArrayLike=Wu,Ur.isArrayLikeObject=Ku,Ur.isBoolean=function(t){return!0===t||!1===t||ra(t)&&En(t)==w},Ur.isBuffer=$u,Ur.isDate=qu,Ur.isElement=function(t){return ra(t)&&1===t.nodeType&&!ia(t)},Ur.isEmpty=function(t){if(null==t)return!0;if(Wu(t)&&(Yu(t)||"string"==typeof t||"function"==typeof t.splice||$u(t)||sa(t)||Gu(t)))return!t.length;var e=vi(t);if(e==E||e==T)return!t.size;if(xi(t))return!Ln(t).length;for(var r in t)if(It.call(t,r))return!1;return!0},Ur.isEqual=function(t,e){return Mn(t,e)},Ur.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Mn(t,e,i,r):!!n},Ur.isError=Zu,Ur.isFinite=function(t){return"number"==typeof t&&Oe(t)},Ur.isFunction=Ju,Ur.isInteger=Qu,Ur.isLength=ta,Ur.isMap=na,Ur.isMatch=function(t,e){return t===e||Cn(t,e,pi(e))},Ur.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Cn(t,e,pi(e),r)},Ur.isNaN=function(t){return oa(t)&&t!=+t},Ur.isNative=function(t){if(Si(t))throw new ct("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rn(t)},Ur.isNil=function(t){return null==t},Ur.isNull=function(t){return null===t},Ur.isNumber=oa,Ur.isObject=ea,Ur.isObjectLike=ra,Ur.isPlainObject=ia,Ur.isRegExp=ua,Ur.isSafeInteger=function(t){return Qu(t)&&t>=-9007199254740991&&t<=h},Ur.isSet=aa,Ur.isString=ca,Ur.isSymbol=la,Ur.isTypedArray=sa,Ur.isUndefined=function(t){return t===i},Ur.isWeakMap=function(t){return ra(t)&&vi(t)==C},Ur.isWeakSet=function(t){return ra(t)&&"[object WeakSet]"==En(t)},Ur.join=function(t,e){return null==t?"":we.call(t,e)},Ur.kebabCase=Ya,Ur.last=Zi,Ur.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ha(r))<0?$e(n+o,0):mr(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Xe(t,Ve,o,!0)},Ur.lowerCase=Va,Ur.lowerFirst=Wa,Ur.lt=fa,Ur.lte=pa,Ur.max=function(t){return t&&t.length?vn(t,oc,Pn):i},Ur.maxBy=function(t,e){return t&&t.length?vn(t,si(e,2),Pn):i},Ur.mean=function(t){return We(t,oc)},Ur.meanBy=function(t,e){return We(t,si(e,2))},Ur.min=function(t){return t&&t.length?vn(t,oc,Bn):i},Ur.minBy=function(t,e){return t&&t.length?vn(t,si(e,2),Bn):i},Ur.stubArray=vc,Ur.stubFalse=bc,Ur.stubObject=function(){return{}},Ur.stubString=function(){return""},Ur.stubTrue=function(){return!0},Ur.multiply=jc,Ur.nth=function(t,e){return t&&t.length?Gn(t,ha(e)):i},Ur.noConflict=function(){return ve._===this&&(ve._=Ft),this},Ur.noop=lc,Ur.now=Pu,Ur.pad=function(t,e,r){t=ma(t);var n=(e=ha(e))?dr(t):0;if(!e||n>=e)return t;var o=(e-n)/2;return Vo(he(o),r)+t+Vo(de(o),r)},Ur.padEnd=function(t,e,r){t=ma(t);var n=(e=ha(e))?dr(t):0;return e&&n<e?t+Vo(e-n,r):t},Ur.padStart=function(t,e,r){t=ma(t);var n=(e=ha(e))?dr(t):0;return e&&n<e?Vo(e-n,r)+t:t},Ur.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),wr(ma(t).replace(at,""),e||0)},Ur.random=function(t,e,r){if(r&&"boolean"!=typeof r&&wi(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=da(t),e===i?(e=t,t=0):e=da(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=_r();return mr(t+o*(e-t+pe("1e-"+((o+"").length-1))),e)}return $n(t,e)},Ur.reduce=function(t,e,r){var n=Yu(t)?ze:qe,o=arguments.length<3;return n(t,si(e,4),r,o,yn)},Ur.reduceRight=function(t,e,r){var n=Yu(t)?Be:qe,o=arguments.length<3;return n(t,si(e,4),r,o,dn)},Ur.repeat=function(t,e,r){return e=(r?wi(t,e,r):e===i)?1:ha(e),qn(ma(t),e)},Ur.replace=function(){var t=arguments,e=ma(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Ur.result=function(t,e,r){var n=-1,o=(e=wo(e,t)).length;for(o||(o=1,t=i);++n<o;){var u=null==t?i:t[zi(e[n])];u===i&&(n=o,u=r),t=Ju(u)?u.call(t):u}return t},Ur.round=Sc,Ur.runInContext=t,Ur.sample=function(t){return(Yu(t)?Zr:Jn)(t)},Ur.size=function(t){if(null==t)return 0;if(Wu(t))return ca(t)?dr(t):t.length;var e=vi(t);return e==E||e==T?t.size:Ln(t).length},Ur.snakeCase=Ka,Ur.some=function(t,e,r){var n=Yu(t)?Ue:io;return r&&wi(t,e,r)&&(e=i),n(t,si(e,3))},Ur.sortedIndex=function(t,e){return uo(t,e)},Ur.sortedIndexBy=function(t,e,r){return ao(t,e,si(r,2))},Ur.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=uo(t,e);if(n<r&&Fu(t[n],e))return n}return-1},Ur.sortedLastIndex=function(t,e){return uo(t,e,!0)},Ur.sortedLastIndexBy=function(t,e,r){return ao(t,e,si(r,2),!0)},Ur.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var r=uo(t,e,!0)-1;if(Fu(t[r],e))return r}return-1},Ur.startCase=$a,Ur.startsWith=function(t,e,r){return t=ma(t),r=null==r?0:cn(ha(r),0,t.length),e=so(e),t.slice(r,r+e.length)==e},Ur.subtract=xc,Ur.sum=function(t){return t&&t.length?Ze(t,oc):0},Ur.sumBy=function(t,e){return t&&t.length?Ze(t,si(e,2)):0},Ur.template=function(t,e,r){var n=Ur.templateSettings;r&&wi(t,e,r)&&(e=i),t=ma(t),e=_a({},e,n,ti);var o,u,a=_a({},e.imports,n.imports,ti),c=Na(a),l=er(a,c),s=0,f=e.interpolate||jt,p="__p += '",y=kt((e.escape||jt).source+"|"+f.source+"|"+(f===et?ht:jt).source+"|"+(e.evaluate||jt).source+"|$","g"),d="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ce+"]")+"\n";t.replace(y,(function(e,r,n,i,a,c){return n||(n=i),p+=t.slice(s,c).replace(St,ar),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),s=c+e.length,e})),p+="';\n";var h=It.call(e,"variable")&&e.variable;if(h){if(yt.test(h))throw new ct("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(u?p.replace(V,""):p).replace(W,"$1").replace(K,"$1;"),p="function("+(h||"obj")+") {\n"+(h?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Qa((function(){return xt(c,d+"return "+p).apply(i,l)}));if(v.source=p,Zu(v))throw v;return v},Ur.times=function(t,e){if((t=ha(t))<1||t>h)return[];var r=b,n=mr(t,b);e=si(e),t-=b;for(var o=Je(n,e);++r<t;)e(r);return o},Ur.toFinite=da,Ur.toInteger=ha,Ur.toLength=va,Ur.toLower=function(t){return ma(t).toLowerCase()},Ur.toNumber=ba,Ur.toSafeInteger=function(t){return t?cn(ha(t),-9007199254740991,h):0===t?t:0},Ur.toString=ma,Ur.toUpper=function(t){return ma(t).toUpperCase()},Ur.trim=function(t,e,r){if((t=ma(t))&&(r||e===i))return Qe(t);if(!t||!(e=so(e)))return t;var n=hr(t),o=hr(e);return jo(n,nr(n,o),or(n,o)+1).join("")},Ur.trimEnd=function(t,e,r){if((t=ma(t))&&(r||e===i))return t.slice(0,vr(t)+1);if(!t||!(e=so(e)))return t;var n=hr(t);return jo(n,0,or(n,hr(e))+1).join("")},Ur.trimStart=function(t,e,r){if((t=ma(t))&&(r||e===i))return t.replace(at,"");if(!t||!(e=so(e)))return t;var n=hr(t);return jo(n,nr(n,hr(e))).join("")},Ur.truncate=function(t,e){var r=30,n="...";if(ea(e)){var o="separator"in e?e.separator:o;r="length"in e?ha(e.length):r,n="omission"in e?so(e.omission):n}var u=(t=ma(t)).length;if(cr(t)){var a=hr(t);u=a.length}if(r>=u)return t;var c=r-dr(n);if(c<1)return n;var l=a?jo(a,0,c).join(""):t.slice(0,c);if(o===i)return l+n;if(a&&(c+=l.length-c),ua(o)){if(t.slice(c).search(o)){var s,f=l;for(o.global||(o=kt(o.source,ma(vt.exec(o))+"g")),o.lastIndex=0;s=o.exec(f);)var p=s.index;l=l.slice(0,p===i?c:p)}}else if(t.indexOf(so(o),c)!=c){var y=l.lastIndexOf(o);y>-1&&(l=l.slice(0,y))}return l+n},Ur.unescape=function(t){return(t=ma(t))&&Z.test(t)?t.replace($,br):t},Ur.uniqueId=function(t){var e=++Lt;return ma(t)+e},Ur.upperCase=qa,Ur.upperFirst=Za,Ur.each=mu,Ur.eachRight=Ou,Ur.first=Wi,cc(Ur,(_c={},wn(Ur,(function(t,e){It.call(Ur.prototype,e)||(_c[e]=t)})),_c),{chain:!1}),Ur.VERSION="4.17.21",De(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Ur[t].placeholder=Ur})),De(["drop","take"],(function(t,e){Gr.prototype[t]=function(r){r=r===i?1:$e(ha(r),0);var n=this.__filtered__&&!e?new Gr(this):this.clone();return n.__filtered__?n.__takeCount__=mr(r,n.__takeCount__):n.__views__.push({size:mr(r,b),type:t+(n.__dir__<0?"Right":"")}),n},Gr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),De(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Gr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:si(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),De(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Gr.prototype[t]=function(){return this[r](1).value()[0]}})),De(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Gr.prototype[t]=function(){return this.__filtered__?new Gr(this):this[r](1)}})),Gr.prototype.compact=function(){return this.filter(oc)},Gr.prototype.find=function(t){return this.filter(t).head()},Gr.prototype.findLast=function(t){return this.reverse().find(t)},Gr.prototype.invokeMap=Zn((function(t,e){return"function"==typeof t?new Gr(this):this.map((function(r){return Tn(r,t,e)}))})),Gr.prototype.reject=function(t){return this.filter(Iu(si(t)))},Gr.prototype.slice=function(t,e){t=ha(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Gr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ha(e))<0?r.dropRight(-e):r.take(e-t)),r)},Gr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gr.prototype.toArray=function(){return this.take(b)},wn(Gr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Ur[n?"take"+("last"==e?"Right":""):e],u=n||/^find/.test(e);o&&(Ur.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,c=e instanceof Gr,l=a[0],s=c||Yu(e),f=function(t){var e=o.apply(Ur,Le([t],a));return n&&p?e[0]:e};s&&r&&"function"==typeof l&&1!=l.length&&(c=s=!1);var p=this.__chain__,y=!!this.__actions__.length,d=u&&!p,h=c&&!y;if(!u&&s){e=h?e:new Gr(this);var v=t.apply(e,a);return v.__actions__.push({func:du,args:[f],thisArg:i}),new Xr(v,p)}return d&&h?t.apply(this,a):(v=this.thru(f),d?n?v.value()[0]:v.value():v)})})),De(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Ur.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var o=this.value();return e.apply(Yu(o)?o:[],t)}return this[r]((function(r){return e.apply(Yu(r)?r:[],t)}))}})),wn(Gr.prototype,(function(t,e){var r=Ur[e];if(r){var n=r.name+"";It.call(Tr,n)||(Tr[n]=[]),Tr[n].push({name:e,func:r})}})),Tr[Ho(i,2).name]=[{name:"wrapper",func:i}],Gr.prototype.clone=function(){var t=new Gr(this.__wrapped__);return t.__actions__=To(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=To(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=To(this.__views__),t},Gr.prototype.reverse=function(){if(this.__filtered__){var t=new Gr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Yu(t),n=e<0,o=r?t.length:0,i=function(t,e,r){var n=-1,o=r.length;for(;++n<o;){var i=r[n],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=mr(e,t+u);break;case"takeRight":t=$e(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,l=n?a:u-1,s=this.__iteratees__,f=s.length,p=0,y=mr(c,this.__takeCount__);if(!r||!n&&o==c&&y==c)return vo(t,this.__actions__);var d=[];t:for(;c--&&p<y;){for(var h=-1,v=t[l+=e];++h<f;){var b=s[h],g=b.iteratee,m=b.type,O=g(v);if(2==m)v=O;else if(!O){if(1==m)continue t;break t}}d[p++]=v}return d},Ur.prototype.at=hu,Ur.prototype.chain=function(){return yu(this)},Ur.prototype.commit=function(){return new Xr(this.value(),this.__chain__)},Ur.prototype.next=function(){this.__values__===i&&(this.__values__=ya(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Ur.prototype.plant=function(t){for(var e,r=this;r instanceof Hr;){var n=Ui(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Ur.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gr){var e=t;return this.__actions__.length&&(e=new Gr(this)),(e=e.reverse()).__actions__.push({func:du,args:[eu],thisArg:i}),new Xr(e,this.__chain__)}return this.thru(eu)},Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Ur.prototype.first=Ur.prototype.head,Jt&&(Ur.prototype[Jt]=function(){return this}),Ur}();ve._=gr,(o=function(){return gr}.call(e,r,e,n))===i||(n.exports=o)}).call(this)}).call(this,r(77),r(257)(t))},function(t,e,r){var n=r(35),o=r(41),i=r(80),u=r(70),a=r(150),c=r(33),l=TypeError,s=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,c=u(t,s);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!o(r)||i(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},function(t,e){var r="object"==typeof document&&document.all,n=void 0===r&&void 0!==r;t.exports={all:r,IS_HTMLDDA:n}},function(t,e,r){var n=r(69);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(35),o=r(30),i=r(41),u=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&o(r=t.toString)&&!i(a=n(r,t)))return a;if(o(r=t.valueOf)&&!i(a=n(r,t)))return a;if("string"!==e&&o(r=t.toString)&&!i(a=n(r,t)))return a;throw u("Can't convert object to primitive value")}},function(t,e,r){var n=r(40),o=r(19),i=r(104);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(40),o=r(19);t.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,r){var n=r(21),o=r(19),i=r(30),u=r(38),a=r(40),c=r(82).CONFIGURABLE,l=r(123),s=r(64),f=s.enforce,p=s.get,y=String,d=Object.defineProperty,h=n("".slice),v=n("".replace),b=n([].join),g=a&&!o((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),O=t.exports=function(t,e,r){"Symbol("===h(y(e),0,7)&&(e="["+v(y(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!u(t,"name")||c&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),g&&r&&u(r,"arity")&&t.length!==r.arity&&d(t,"length",{value:r.arity});try{r&&u(r,"constructor")&&r.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=f(t);return u(n,"source")||(n.source=b(m,"string"==typeof e?e:"")),t};Function.prototype.toString=O((function(){return i(this)&&p(this).source||l(this)}),"toString")},function(t,e,r){var n=r(38),o=r(155),i=r(56),u=r(44);t.exports=function(t,e,r){for(var a=o(e),c=u.f,l=i.f,s=0;s<a.length;s++){var f=a[s];n(t,f)||r&&n(r,f)||c(t,f,l(e,f))}}},function(t,e,r){var n=r(48),o=r(21),i=r(84),u=r(106),a=r(39),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(a(t)),r=u.f;return r?c(e,r(t)):e}},function(t,e,r){var n=r(21),o=r(38),i=r(46),u=r(157).indexOf,a=r(83),c=n([].push);t.exports=function(t,e){var r,n=i(t),l=0,s=[];for(r in n)!o(a,r)&&o(n,r)&&c(s,r);for(;e.length>l;)o(n,r=e[l++])&&(~u(s,r)||c(s,r));return s}},function(t,e,r){var n=r(46),o=r(85),i=r(54),u=function(t){return function(e,r,u){var a,c=n(e),l=i(c),s=o(u,l);if(t&&r!=r){for(;l>s;)if((a=c[s++])!=a)return!0}else for(;l>s;s++)if((t||s in c)&&c[s]===r)return t||s||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,e,r){var n=r(40),o=r(152),i=r(44),u=r(39),a=r(46),c=r(87);e.f=n&&!o?Object.defineProperties:function(t,e){u(t);for(var r,n=a(e),o=c(e),l=o.length,s=0;l>s;)i.f(t,r=o[s++],n[r]);return t}},function(t,e,r){var n=r(48);t.exports=n("document","documentElement")},function(t,e,r){var n=r(52),o=r(46),i=r(84).f,u=r(126),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return u(a)}}(t):i(o(t))}},function(t,e,r){var n=r(33);e.f=n},function(t,e,r){var n=r(34);t.exports=n},function(t,e,r){var n=r(35),o=r(48),i=r(33),u=r(45);t.exports=function(){var t=o("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,a=i("toPrimitive");e&&!e[a]&&u(e,a,(function(t){return n(r,this)}),{arity:1})}},function(t,e,r){var n=r(69);t.exports=n&&!!Symbol.for&&!!Symbol.keyFor},function(t,e,r){"use strict";var n,o,i,u=r(19),a=r(30),c=r(41),l=r(66),s=r(112),f=r(45),p=r(33),y=r(49),d=p("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):h=!0),!c(n)||u((function(){var t={};return n[d].call(t)!==t}))?n={}:y&&(n=l(n)),a(n[d])||f(n,d,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},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(13),o=r(21),i=r(83),u=r(41),a=r(38),c=r(44).f,l=r(84),s=r(160),f=r(215),p=r(103),y=r(217),d=!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(){},d=!0;var t=l.f,e=o([].splice),r={};r[h]=1,t(r).length&&(l.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:s.f}))},fastKey:function(t,e){if(!u(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,h)){if(!f(t))return"F";if(!e)return"E";b(t)}return t[h].objectID},getWeakData:function(t,e){if(!a(t,h)){if(!f(t))return!0;if(!e)return!1;b(t)}return t[h].weakData},onFreeze:function(t){return y&&d&&f(t)&&!a(t,h)&&b(t),t}};i[h]=!0},function(t,e,r){var n=r(33),o=r(93),i=n("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},function(t,e,r){var n=r(35),o=r(53),i=r(39),u=r(71),a=r(132),c=TypeError;t.exports=function(t,e){var r=arguments.length<2?a(t):e;if(o(r))return i(n(r,t));throw c(u(t)+" is not iterable")}},function(t,e,r){var n=r(35),o=r(39),i=r(70);t.exports=function(t,e,r){var u,a;o(t);try{if(!(u=i(t,"return"))){if("throw"===e)throw r;return r}u=n(u,t)}catch(t){a=!0,u=t}if("throw"===e)throw r;if(a)throw u;return o(u),r}},function(t,e,r){var n=r(30),o=r(41),i=r(113);t.exports=function(t,e,r){var u,a;return i&&n(u=e.constructor)&&u!==r&&o(a=u.prototype)&&a!==r.prototype&&i(t,a),t}},function(t,e,r){"use strict";var n=r(48),o=r(88),i=r(33),u=r(40),a=i("species");t.exports=function(t){var e=n(t);u&&e&&!e[a]&&o(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(21),o=r(65),i=r(42),u=r(47),a=n("".charAt),c=n("".charCodeAt),l=n("".slice),s=function(t){return function(e,r){var n,s,f=i(u(e)),p=o(r),y=f.length;return p<0||p>=y?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===y||(s=c(f,p+1))<56320||s>57343?t?a(f,p):n:t?l(f,p,p+2):s-56320+(n-55296<<10)+65536}};t.exports={codeAt:s(!1),charAt:s(!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(104)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e){var r=TypeError;t.exports=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}},function(t,e,r){"use strict";var n=r(39);t.exports=function(){var t=n(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},function(t,e,r){var n=r(21);t.exports=n(1..valueOf)},function(t,e,r){var n=r(21),o=r(47),i=r(42),u=r(180),a=n("".replace),c=RegExp("^["+u+"]+"),l=RegExp("(^|[^"+u+"])["+u+"]+$"),s=function(t){return function(e){var r=i(o(e));return 1&t&&(r=a(r,c,"")),2&t&&(r=a(r,l,"$1")),r}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,e,r){var n=r(19),o=r(34).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),u=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:u,UNSUPPORTED_Y:i}},function(t,e,r){"use strict";var n=r(71),o=TypeError;t.exports=function(t,e){if(!delete t[e])throw o("Cannot delete property "+n(e)+" of "+n(t))}},function(t,e,r){"use strict";var n=r(13),o=r(90).find,i=r(111),u="find",a=!0;u in[]&&Array(1)[u]((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(u)},function(t,e,r){var n=r(185),o=TypeError;t.exports=function(t){if(n(t))throw o("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(41),o=r(52),i=r(33)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,r){var n=r(33)("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){r(13)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,r){"use strict";var n=r(13),o=r(179).trim;n({target:"String",proto:!0,forced:r(233)("trim")},{trim:function(){return o(this)}})},function(t,e,r){"use strict";var n=r(35),o=r(138),i=r(39),u=r(57),a=r(86),c=r(42),l=r(47),s=r(70),f=r(139),p=r(140);o("match",(function(t,e,r){return[function(e){var r=l(this),o=u(e)?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](c(r))},function(t){var n=i(this),o=c(t),u=r(e,n,o);if(u.done)return u.value;if(!n.global)return p(n,o);var l=n.unicode;n.lastIndex=0;for(var s,y=[],d=0;null!==(s=p(n,o));){var h=c(s[0]);y[d]=h,""===h&&(n.lastIndex=f(o,a(n.lastIndex),l)),d++}return 0===d?null:y}]}))},function(t,e,r){var n=r(109),o=r(71),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a constructor")}},function(t,e,r){var n=r(39),o=r(190),i=r(57),u=r(33)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||i(r=n(a)[u])?e:o(r)}},function(t,e,r){var n,o,i,u,a=r(34),c=r(92),l=r(75),s=r(30),f=r(38),p=r(19),y=r(159),d=r(110),h=r(104),v=r(242),b=r(193),g=r(118),m=a.setImmediate,O=a.clearImmediate,w=a.process,_=a.Dispatch,j=a.Function,S=a.MessageChannel,x=a.String,E=0,P={},k="onreadystatechange";p((function(){n=a.location}));var A=function(t){if(f(P,t)){var e=P[t];delete P[t],e()}},D=function(t){return function(){A(t)}},T=function(t){A(t.data)},N=function(t){a.postMessage(x(t),n.protocol+"//"+n.host)};m&&O||(m=function(t){v(arguments.length,1);var e=s(t)?t:j(t),r=d(arguments,1);return P[++E]=function(){c(e,void 0,r)},o(E),E},O=function(t){delete P[t]},g?o=function(t){w.nextTick(D(t))}:_&&_.now?o=function(t){_.now(D(t))}:S&&!b?(u=(i=new S).port2,i.port1.onmessage=T,o=l(u.postMessage,u)):a.addEventListener&&s(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!p(N)?(o=N,a.addEventListener("message",T,!1)):o=k in h("script")?function(t){y.appendChild(h("script"))[k]=function(){y.removeChild(this),A(t)}}:function(t){setTimeout(D(t),0)}),t.exports={set:m,clear:O}},function(t,e,r){var n=r(63);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},function(t,e){var r=function(){this.head=null,this.tail=null};r.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=r},function(t,e){t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},function(t,e,r){var n=r(97),o=r(134),i=r(98).CONSTRUCTOR;t.exports=i||!o((function(t){n.all(t).then(void 0,(function(){}))}))},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 m}));var n=r(1);function o(t){throw new Error("[mobx-utils] "+t)}function i(t,e){void 0===e&&(e="Illegal state"),t||o(e)}var u=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(u(Object.getPrototypeOf(t))||[])},a=function(t){return function(t){var e=u(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))},c="pending",l="fulfilled",s="rejected";function f(t){switch(this.state){case c:return t.pending&&t.pending(this.value);case s:return t.rejected&&t.rejected(this.value);case l:return t.fulfilled?t.fulfilled(this.value):this.value}}function p(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=l})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state=s}))),r.isPromiseBasedObservable=!0,r.case=f;var o=e&&e.state===l?e.value:void 0;return Object(n.q)(r,{value:o,state:c},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state=s,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=l,r.value=e,r}))}(p||(p={}));var y=function(t,e,r,n){var o,i=arguments.length,u=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,r,u):o(e,r))||u);return i>3&&u&&Object.defineProperty(e,r,u),u};!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()},y([n.C.ref],t.prototype,"current",void 0),y([n.k.bound],t.prototype,"next",null),y([n.k.bound],t.prototype,"complete",null),y([n.k.bound],t.prototype,"error",null)}();var d=function(){return d=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},d.apply(this,arguments)},h=function(t,e,r,n){var o,i=arguments.length,u=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,r,u):o(e,r))||u);return i>3&&u&&Object.defineProperty(e,r,u),u},v=["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===v.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 u=Object.getOwnPropertyDescriptor(t,r),a=u?{enumerable:u.enumerable}:{};Object.defineProperty(e,r,d(d({},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)},h([n.m],t.prototype,"isDirty",null),h([n.m],t.prototype,"changedValues",null),h([n.k.bound],t.prototype,"submit",null),h([n.k.bound],t.prototype,"reset",null),h([n.k.bound],t.prototype,"resetProperty",null)}();function b(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 m(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":u(t.oldValue),i(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":u(t.oldValue);break;case"splice":t.removed.map(u),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,b(o),t)}function i(t,e,u){if(g(t)){var a=r.get(t);if(a){if(a.parent!==e||a.path!==u)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+b(e)+"/"+u+"', but it already exists at '"+b(a.parent)+"/"+a.path+"'")}else{var c={parent:e,path:u,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 u(t){if(g(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),Object(n.L)(t).forEach(u)}}return i(t,void 0,""),function(){u(t)}}var O,w=(O=function(t,e){return O=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])},O(t,e)},function(t,e){function r(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),_=(function(t){function e(e,r,o){var i=void 0===o?{}:o,u=i.name,a=void 0===u?"ogm"+(1e3*Math.random()|0):u,c=i.keyToName,l=void 0===c?function(t){return""+t}:c,s=t.call(this)||this;s._keyToName=l,s._groupBy=r,s._ogmInfoKey=Symbol("ogmInfo"+a),s._base=e;for(var f=0;f<e.length;f++)s._addItem(e[f]);return s._disposeBaseObserver=Object(n.D)(s._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];s._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var u=i[o];s._addItem(u)}}));else{if("update"!==t.type)throw new Error("illegal state");Object(n.J)((function(){s._removeItem(t.oldValue),s._addItem(t.newValue)}))}})),s}w(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),u=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=u}))};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 _(this.store,t)}}();new Set,new Set;var j,S=Promise.resolve();j="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){j(t)}))}}).call(this,r(136))},function(t,e,r){var n;!function(o,i,u){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"},l={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s={"~":"`","!":"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();m.prototype.bind=function(t,e,r){var n=this;return t=t instanceof Array?t:[t],n._bindMultiple.call(n,t,e,r),n},m.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},m.prototype.trigger=function(t,e){var r=this;return r._directMap[t+":"+e]&&r._directMap[t+":"+e]({},t),r},m.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},m.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(g(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},m.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)},m.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);a=null},m.init=function(){var t=m(i);for(var e in t)"_"!==e.charAt(0)&&(m[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},m.init(),o.Mousetrap=m,t.exports&&(t.exports=m),void 0===(n=function(){return m}.call(e,r,e,t))||(t.exports=n)}function y(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function d(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]:l[t.which]?l[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(!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 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&&s[n]&&(n=s[n],i.push("shift")),h(n)&&i.push(n);return{key:n,modifiers:i,action:e=v(n,i,e)}}function g(t,e){return null!==t&&t!==i&&(t===e||g(t.parentNode,e))}function m(t){var e=this;if(t=t||i,!(e instanceof m))return new m(t);e.target=t,e._callbacks={},e._directMap={};var r,n={},o=!1,u=!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 l(t,r,o,i,u,a){var c,l,s,f,p=[],y=o.type;if(!e._callbacks[t])return[];for("keyup"==y&&h(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(l=e._callbacks[t][c],(i||!l.seq||n[l.seq]==l.level)&&y==l.action&&("keypress"==y&&!o.metaKey&&!o.ctrlKey||(s=r,f=l.modifiers,s.sort().join(",")===f.sort().join(",")))){var d=!i&&l.combo==u,v=i&&l.seq==i&&l.level==a;(d||v)&&e._callbacks[t].splice(c,1),p.push(l)}return p}function s(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=d(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,u){function l(e){return function(){a=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function f(e){s(i,e,t),"keyup"!==u&&(o=d(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var y=p+1===e.length?f:l(u||b(e[p+1]).action);v(e[p],y,u,t,p)}}function v(t,r,n,o,i){e._directMap[t+":"+n]=r;var u,a=(t=t.replace(/\s+/g," ")).split(" ");a.length>1?p(t,a,r,n):(u=b(t,n),e._callbacks[u.key]=e._callbacks[u.key]||[],l(u.key,u.modifiers,{type:u.action},o,t,i),e._callbacks[u.key][o?"unshift":"push"]({callback:r,modifiers:u.modifiers,action:u.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,r){var n,o=l(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,s(o[n].callback,r,o[n].combo,o[n].seq)}else p||s(o[n].callback,r,o[n].combo);var y="keypress"==r.type&&u;r.type!=a||h(t)||y||c(i),u=p&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)v(t[n],e,r)},y(t,"keypress",f),y(t,"keydown",f),y(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){"use strict";var n=r(13),o=r(34),i=r(35),u=r(21),a=r(49),c=r(40),l=r(69),s=r(19),f=r(38),p=r(62),y=r(39),d=r(46),h=r(102),v=r(42),b=r(79),g=r(66),m=r(87),O=r(84),w=r(160),_=r(106),j=r(56),S=r(44),x=r(158),E=r(100),P=r(45),k=r(88),A=r(72),D=r(105),T=r(83),N=r(103),M=r(33),C=r(161),R=r(127),I=r(163),L=r(89),z=r(64),B=r(90).forEach,U=D("hidden"),F="Symbol",H="prototype",X=z.set,G=z.getterFor(F),Y=Object[H],V=o.Symbol,W=V&&V[H],K=o.TypeError,$=o.QObject,q=j.f,Z=S.f,J=w.f,Q=E.f,tt=u([].push),et=A("symbols"),rt=A("op-symbols"),nt=A("wks"),ot=!$||!$[H]||!$[H].findChild,it=c&&s((function(){return 7!=g(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=q(Y,e);n&&delete Y[e],Z(t,e,r),n&&t!==Y&&Z(Y,e,n)}:Z,ut=function(t,e){var r=et[t]=g(W);return X(r,{type:F,tag:t,description:e}),c||(r.description=e),r},at=function(t,e,r){t===Y&&at(rt,e,r),y(t);var n=h(e);return y(r),f(et,n)?(r.enumerable?(f(t,U)&&t[U][n]&&(t[U][n]=!1),r=g(r,{enumerable:b(0,!1)})):(f(t,U)||Z(t,U,b(1,{})),t[U][n]=!0),it(t,n,r)):Z(t,n,r)},ct=function(t,e){y(t);var r=d(e),n=m(r).concat(pt(r));return B(n,(function(e){c&&!i(lt,r,e)||at(t,e,r[e])})),t},lt=function(t){var e=h(t),r=i(Q,this,e);return!(this===Y&&f(et,e)&&!f(rt,e))&&(!(r||!f(this,e)||!f(et,e)||f(this,U)&&this[U][e])||r)},st=function(t,e){var r=d(t),n=h(e);if(r!==Y||!f(et,n)||f(rt,n)){var o=q(r,n);return!o||!f(et,n)||f(r,U)&&r[U][n]||(o.enumerable=!0),o}},ft=function(t){var e=J(d(t)),r=[];return B(e,(function(t){f(et,t)||f(T,t)||tt(r,t)})),r},pt=function(t){var e=t===Y,r=J(e?rt:d(t)),n=[];return B(r,(function(t){!f(et,t)||e&&!f(Y,t)||tt(n,et[t])})),n};l||(V=function(){if(p(W,this))throw K("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?v(arguments[0]):void 0,e=N(t),r=function(t){this===Y&&i(r,rt,t),f(this,U)&&f(this[U],e)&&(this[U][e]=!1),it(this,e,b(1,t))};return c&&ot&&it(Y,e,{configurable:!0,set:r}),ut(e,t)},P(W=V[H],"toString",(function(){return G(this).tag})),P(V,"withoutSetter",(function(t){return ut(N(t),t)})),E.f=lt,S.f=at,x.f=ct,j.f=st,O.f=w.f=ft,_.f=pt,C.f=function(t){return ut(M(t),t)},c&&(k(W,"description",{configurable:!0,get:function(){return G(this).description}}),a||P(Y,"propertyIsEnumerable",lt,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!l,sham:!l},{Symbol:V}),B(m(nt),(function(t){R(t)})),n({target:F,stat:!0,forced:!l},{useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!c},{create:function(t,e){return void 0===e?g(t):ct(g(t),e)},defineProperty:at,defineProperties:ct,getOwnPropertyDescriptor:st}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ft}),I(),L(V,F),T[U]=!0},function(t,e,r){var n=r(34),o=r(30),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?n:r)(e)}},function(t,e,r){var n=r(91),o=r(109),i=r(41),u=r(33)("species"),a=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,(o(e)&&(e===a||n(e.prototype))||i(e)&&null===(e=e[u]))&&(e=void 0)),void 0===e?a:e}},function(t,e,r){var n=r(13),o=r(48),i=r(38),u=r(42),a=r(72),c=r(164),l=a("string-to-symbol-registry"),s=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{for:function(t){var e=u(t);if(i(l,e))return l[e];var r=o("Symbol")(e);return l[e]=r,s[r]=e,r}})},function(t,e,r){var n=r(13),o=r(38),i=r(80),u=r(71),a=r(72),c=r(164),l=a("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!c},{keyFor:function(t){if(!i(t))throw TypeError(u(t)+" is not a symbol");if(o(l,t))return l[t]}})},function(t,e,r){var n=r(13),o=r(48),i=r(92),u=r(35),a=r(21),c=r(19),l=r(30),s=r(80),f=r(110),p=r(207),y=r(69),d=String,h=o("JSON","stringify"),v=a(/./.exec),b=a("".charAt),g=a("".charCodeAt),m=a("".replace),O=a(1..toString),w=/[\uD800-\uDFFF]/g,_=/^[\uD800-\uDBFF]$/,j=/^[\uDC00-\uDFFF]$/,S=!y||c((function(){var t=o("Symbol")();return"[null]"!=h([t])||"{}"!=h({a:t})||"{}"!=h(Object(t))})),x=c((function(){return'"\\udf06\\ud834"'!==h("\udf06\ud834")||'"\\udead"'!==h("\udead")})),E=function(t,e){var r=f(arguments),n=p(e);if(l(n)||void 0!==t&&!s(t))return r[1]=function(t,e){if(l(n)&&(e=u(n,this,d(t),e)),!s(e))return e},i(h,null,r)},P=function(t,e,r){var n=b(r,e-1),o=b(r,e+1);return v(_,t)&&!v(j,o)||v(j,t)&&!v(_,n)?"\\u"+O(g(t,0),16):t};h&&n({target:"JSON",stat:!0,arity:3,forced:S||x},{stringify:function(t,e,r){var n=f(arguments),o=i(S?E:h,null,n);return x&&"string"==typeof o?m(o,w,P):o}})},function(t,e,r){var n=r(21),o=r(91),i=r(30),u=r(52),a=r(42),c=n([].push);t.exports=function(t){if(i(t))return t;if(o(t)){for(var e=t.length,r=[],n=0;n<e;n++){var l=t[n];"string"==typeof l?c(r,l):"number"!=typeof l&&"Number"!=u(l)&&"String"!=u(l)||c(r,a(l))}var s=r.length,f=!0;return function(t,e){if(f)return f=!1,e;if(o(this))return e;for(var n=0;n<s;n++)if(r[n]===t)return e}}}},function(t,e,r){var n=r(13),o=r(69),i=r(19),u=r(106),a=r(43);n({target:"Object",stat:!0,forced:!o||i((function(){u.f(1)}))},{getOwnPropertySymbols:function(t){var e=u.f;return e?e(a(t)):[]}})},function(t,e,r){"use strict";var n=r(125),o=r(108);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(165).IteratorPrototype,o=r(66),i=r(79),u=r(89),a=r(93),c=function(){return this};t.exports=function(t,e,r,l){var s=e+" Iterator";return t.prototype=o(n,{next:i(+!l,r)}),u(t,s,!1,!0),a[s]=c,t}},function(t,e,r){var n=r(21),o=r(53);t.exports=function(t,e,r){try{return n(o(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}},function(t,e,r){var n=r(30),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},function(t,e,r){"use strict";r(214)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(218))},function(t,e,r){"use strict";var n=r(13),o=r(34),i=r(21),u=r(107),a=r(45),c=r(167),l=r(114),s=r(133),f=r(30),p=r(57),y=r(41),d=r(19),h=r(134),v=r(89),b=r(171);t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),m=-1!==t.indexOf("Weak"),O=g?"set":"add",w=o[t],_=w&&w.prototype,j=w,S={},x=function(t){var e=i(_[t]);a(_,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(m&&!y(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return m&&!y(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!y(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(u(t,!f(w)||!(m||_.forEach&&!d((function(){(new w).entries().next()})))))j=r.getConstructor(e,t,g,O),c.enable();else if(u(t,!0)){var E=new j,P=E[O](m?{}:-0,1)!=E,k=d((function(){E.has(1)})),A=h((function(t){new w(t)})),D=!m&&d((function(){for(var t=new w,e=5;e--;)t[O](e,e);return!t.has(-0)}));A||((j=e((function(t,e){s(t,_);var r=b(new w,t,j);return p(e)||l(e,r[O],{that:r,AS_ENTRIES:g}),r}))).prototype=_,_.constructor=j),(k||D)&&(x("delete"),x("has"),g&&x("get")),(D||P)&&x(O),m&&_.clear&&delete _.clear}return S[t]=j,n({global:!0,constructor:!0,forced:j!=w},S),v(j,t),m||r.setStrong(j,t,g),j}},function(t,e,r){var n=r(19),o=r(41),i=r(52),u=r(216),a=Object.isExtensible,c=n((function(){a(1)}));t.exports=c||u?function(t){return!!o(t)&&((!u||"ArrayBuffer"!=i(t))&&(!a||a(t)))}:a},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(66),o=r(88),i=r(219),u=r(75),a=r(133),c=r(57),l=r(114),s=r(130),f=r(131),p=r(172),y=r(40),d=r(167).fastKey,h=r(64),v=h.set,b=h.getterFor;t.exports={getConstructor:function(t,e,r,s){var f=t((function(t,o){a(t,p),v(t,{type:e,index:n(null),first:void 0,last:void 0,size:0}),y||(t.size=0),c(o)||l(o,t[s],{that:t,AS_ENTRIES:r})})),p=f.prototype,h=b(e),g=function(t,e,r){var n,o,i=h(t),u=m(t,e);return u?u.value=r:(i.last=u={index:o=d(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=u),n&&(n.next=u),y?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},m=function(t,e){var r,n=h(t),o=d(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(p,{clear:function(){for(var t=h(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,y?t.size=0:this.size=0},delete:function(t){var e=this,r=h(e),n=m(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),y?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=h(this),n=u(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!!m(this,t)}}),i(p,r?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),y&&o(p,"size",{configurable:!0,get:function(){return h(this).size}}),f},setStrong:function(t,e,r){var n=e+" Iterator",o=b(e),i=b(n);s(t,e,(function(t,e){v(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)?f("keys"==e?r.key:"values"==e?r.value:[r.key,r.value],!1):(t.target=void 0,f(void 0,!0))}),r?"entries":"values",!r,!0),p(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(90).forEach,o=r(135)("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(35),o=r(38),i=r(62),u=r(177),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||o(t,"flags")||!i(a,t)?e:n(u,t)}},function(t,e,r){"use strict";var n=r(39),o=r(150),i=TypeError;t.exports=function(t){if(n(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw i("Incorrect hint");return o(this,t)}},function(t,e,r){"use strict";var n=r(75),o=r(35),i=r(43),u=r(224),a=r(168),c=r(109),l=r(54),s=r(74),f=r(169),p=r(132),y=Array;t.exports=function(t){var e=i(t),r=c(this),d=arguments.length,h=d>1?arguments[1]:void 0,v=void 0!==h;v&&(h=n(h,d>2?arguments[2]:void 0));var b,g,m,O,w,_,j=p(e),S=0;if(!j||this===y&&a(j))for(b=l(e),g=r?new this(b):y(b);b>S;S++)_=v?h(e[S],S):e[S],s(g,S,_);else for(w=(O=f(e,j)).next,g=r?new this:[];!(m=o(w,O)).done;S++)_=v?u(O,h,[m.value,S],!0):m.value,s(g,S,_);return g.length=S,g}},function(t,e,r){var n=r(39),o=r(170);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){var n=r(19),o=r(34).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(34).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(13),o=r(21),i=r(53),u=r(43),a=r(54),c=r(182),l=r(42),s=r(19),f=r(228),p=r(135),y=r(229),d=r(230),h=r(81),v=r(231),b=[],g=o(b.sort),m=o(b.push),O=s((function(){b.sort(void 0)})),w=s((function(){b.sort(null)})),_=p("sort"),j=!s((function(){if(h)return h<70;if(!(y&&y>3)){if(d)return!0;if(v)return v<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++)b.push({k:e+n,v:r})}for(b.sort((function(t,e){return e.v-t.v})),n=0;n<b.length;n++)e=b[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:O||!w||!_||!j},{sort:function(t){void 0!==t&&i(t);var e=u(this);if(j)return void 0===t?g(e):g(e,t);var r,n,o=[],s=a(e);for(n=0;n<s;n++)n in e&&m(o,e[n]);for(f(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:l(e)>l(r)?1:-1}}(t)),r=a(o),n=0;n<r;)e[n]=o[n++];for(;n<s;)c(e,n++);return e}})},function(t,e,r){var n=r(126),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?u(t,e):a(t,i(n(t,0,c),e),i(n(t,c),e),e)},u=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,u=0,a=0;u<o||a<i;)t[u+a]=u<o&&a<i?n(e[u],r[a])<=0?e[u++]:r[a++]:u<o?e[u++]:r[a++];return t};t.exports=i},function(t,e,r){var n=r(63).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(63);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(63).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){"use strict";var n=r(40),o=r(91),i=TypeError,u=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!u(t,"length").writable)throw i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},function(t,e,r){var n=r(82).PROPER,o=r(19),i=r(180);t.exports=function(t){return o((function(){return!!i[t]()||"
"!=="
"[t]()||n&&i[t].name!==t}))}},function(t,e,r){var n=r(21),o=r(43),i=Math.floor,u=n("".charAt),a=n("".replace),c=n("".slice),l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,f,p){var y=r+t.length,d=n.length,h=s;return void 0!==f&&(f=o(f),h=l),a(p,h,(function(o,a){var l;switch(u(a,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,y);case"<":l=f[c(a,1,-1)];break;default:var s=+a;if(0===s)return o;if(s>d){var p=i(s/10);return 0===p?o:p<=d?void 0===n[p-1]?u(a,1):n[p-1]+u(a,1):o}l=n[s-1]}return void 0===l?"":l}))}},function(t,e,r){"use strict";var n=r(40),o=r(21),i=r(35),u=r(19),a=r(87),c=r(106),l=r(100),s=r(43),f=r(101),p=Object.assign,y=Object.defineProperty,d=o([].concat);t.exports=!p||u((function(){if(n&&1!==p({b:1},p(y({},"a",{enumerable:!0,get:function(){y(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||a(p({},e)).join("")!=o}))?function(t,e){for(var r=s(t),o=arguments.length,u=1,p=c.f,y=l.f;o>u;)for(var h,v=f(arguments[u++]),b=p?d(a(v),p(v)):a(v),g=b.length,m=0;g>m;)h=b[m++],n&&!i(y,v,h)||(r[h]=v[h]);return r}:p},function(t,e,r){"use strict";var n=r(21),o=r(53),i=r(41),u=r(38),a=r(110),c=r(78),l=Function,s=n([].concat),f=n([].join),p={};t.exports=c?l.bind:function(t){var e=o(this),r=e.prototype,n=a(arguments,1),c=function(){var r=s(n,a(arguments));return this instanceof c?function(t,e,r){if(!u(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=l("C,a","return new C("+f(n,",")+")")}return p[e](t,r)}(e,r.length,r):e.apply(t,r)};return i(r)&&(c.prototype=r),c}},function(t,e,r){var n=r(38);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){var n=r(21),o=r(47),i=r(42),u=/"/g,a=n("".replace);t.exports=function(t,e,r,n){var c=i(o(t)),l="<"+e;return""!==r&&(l+=" "+r+'="'+a(i(n),u,""")+'"'),l+">"+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){r(241),r(248),r(249),r(250),r(251),r(252)},function(t,e,r){"use strict";var n,o,i,u=r(13),a=r(49),c=r(118),l=r(34),s=r(35),f=r(45),p=r(113),y=r(89),d=r(172),h=r(53),v=r(30),b=r(41),g=r(133),m=r(191),O=r(192).set,w=r(243),_=r(246),j=r(142),S=r(194),x=r(64),E=r(97),P=r(98),k=r(99),A="Promise",D=P.CONSTRUCTOR,T=P.REJECTION_EVENT,N=P.SUBCLASSING,M=x.getterFor(A),C=x.set,R=E&&E.prototype,I=E,L=R,z=l.TypeError,B=l.document,U=l.process,F=k.f,H=F,X=!!(B&&B.createEvent&&l.dispatchEvent),G="unhandledrejection",Y=function(t){var e;return!(!b(t)||!v(e=t.then))&&e},V=function(t,e){var r,n,o,i=e.value,u=1==e.state,a=u?t.ok:t.fail,c=t.resolve,l=t.reject,f=t.domain;try{a?(u||(2===e.rejection&&Z(e),e.rejection=1),!0===a?r=i:(f&&f.enter(),r=a(i),f&&(f.exit(),o=!0)),r===t.promise?l(z("Promise-chain cycle")):(n=Y(r))?s(n,r,c,l):c(r)):l(i)}catch(t){f&&!o&&f.exit(),l(t)}},W=function(t,e){t.notified||(t.notified=!0,w((function(){for(var r,n=t.reactions;r=n.get();)V(r,t);t.notified=!1,e&&!t.rejection&&$(t)})))},K=function(t,e,r){var n,o;X?((n=B.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),l.dispatchEvent(n)):n={promise:e,reason:r},!T&&(o=l["on"+t])?o(n):t===G&&_("Unhandled promise rejection",r)},$=function(t){s(O,l,(function(){var e,r=t.facade,n=t.value;if(q(t)&&(e=j((function(){c?U.emit("unhandledRejection",n,r):K(G,r,n)})),t.rejection=c||q(t)?2:1,e.error))throw e.value}))},q=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){s(O,l,(function(){var e=t.facade;c?U.emit("rejectionHandled",e):K("rejectionhandled",e,t.value)}))},J=function(t,e,r){return function(n){t(e,n,r)}},Q=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,W(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw z("Promise can't be resolved itself");var n=Y(e);n?w((function(){var r={done:!1};try{s(n,e,J(tt,r,t),J(Q,r,t))}catch(e){Q(r,e,t)}})):(t.value=e,t.state=1,W(t,!1))}catch(e){Q({done:!1},e,t)}}};if(D&&(L=(I=function(t){g(this,L),h(t),s(n,this);var e=M(this);try{t(J(tt,e),J(Q,e))}catch(t){Q(e,t)}}).prototype,(n=function(t){C(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:void 0})}).prototype=f(L,"then",(function(t,e){var r=M(this),n=F(m(this,I));return r.parent=!0,n.ok=!v(t)||t,n.fail=v(e)&&e,n.domain=c?U.domain:void 0,0==r.state?r.reactions.add(n):w((function(){V(n,r)})),n.promise})),o=function(){var t=new n,e=M(t);this.promise=t,this.resolve=J(tt,e),this.reject=J(Q,e)},k.f=F=function(t){return t===I||undefined===t?new o(t):H(t)},!a&&v(E)&&R!==Object.prototype)){i=R.then,N||f(R,"then",(function(t,e){var r=this;return new I((function(t,e){s(i,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete R.constructor}catch(t){}p&&p(R,L)}u({global:!0,constructor:!0,wrap:!0,forced:D},{Promise:I}),y(I,A,!1,!0),d(A)},function(t,e){var r=TypeError;t.exports=function(t,e){if(t<e)throw r("Not enough arguments");return t}},function(t,e,r){var n,o,i,u,a,c=r(34),l=r(75),s=r(56).f,f=r(192).set,p=r(194),y=r(193),d=r(244),h=r(245),v=r(118),b=c.MutationObserver||c.WebKitMutationObserver,g=c.document,m=c.process,O=c.Promise,w=s(c,"queueMicrotask"),_=w&&w.value;if(!_){var j=new p,S=function(){var t,e;for(v&&(t=m.domain)&&t.exit();e=j.get();)try{e()}catch(t){throw j.head&&n(),t}t&&t.enter()};y||v||h||!b||!g?!d&&O&&O.resolve?((u=O.resolve(void 0)).constructor=O,a=l(u.then,u),n=function(){a(S)}):v?n=function(){m.nextTick(S)}:(f=l(f,c),n=function(){f(S)}):(o=!0,i=g.createTextNode(""),new b(S).observe(i,{characterData:!0}),n=function(){i.data=o=!o}),_=function(t){j.head||n(),j.add(t)}}t.exports=_},function(t,e,r){var n=r(63);t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},function(t,e,r){var n=r(63);t.exports=/web0s(?!.*chrome)/i.test(n)},function(t,e){t.exports=function(t,e){}},function(t,e,r){var n=r(195),o=r(118);t.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},function(t,e,r){"use strict";var n=r(13),o=r(35),i=r(53),u=r(99),a=r(142),c=r(114);n({target:"Promise",stat:!0,forced:r(196)},{all:function(t){var e=this,r=u.f(e),n=r.resolve,l=r.reject,s=a((function(){var r=i(e.resolve),u=[],a=0,s=1;c(t,(function(t){var i=a++,c=!1;s++,o(r,e,t).then((function(t){c||(c=!0,u[i]=t,--s||n(u))}),l)})),--s||n(u)}));return s.error&&l(s.value),r.promise}})},function(t,e,r){"use strict";var n=r(13),o=r(49),i=r(98).CONSTRUCTOR,u=r(97),a=r(48),c=r(30),l=r(45),s=u&&u.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&c(u)){var f=a("Promise").prototype.catch;s.catch!==f&&l(s,"catch",f,{unsafe:!0})}},function(t,e,r){"use strict";var n=r(13),o=r(35),i=r(53),u=r(99),a=r(142),c=r(114);n({target:"Promise",stat:!0,forced:r(196)},{race:function(t){var e=this,r=u.f(e),n=r.reject,l=a((function(){var u=i(e.resolve);c(t,(function(t){o(u,e,t).then(r.resolve,n)}))}));return l.error&&n(l.value),r.promise}})},function(t,e,r){"use strict";var n=r(13),o=r(35),i=r(99);n({target:"Promise",stat:!0,forced:r(98).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return o(e.reject,void 0,t),e.promise}})},function(t,e,r){"use strict";var n=r(13),o=r(48),i=r(49),u=r(97),a=r(98).CONSTRUCTOR,c=r(253),l=o("Promise"),s=i&&!a;n({target:"Promise",stat:!0,forced:i||a},{resolve:function(t){return c(s&&this===l?u:this,t)}})},function(t,e,r){var n=r(39),o=r(41),i=r(99);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){"use strict";var n=r(43),o=r(85),i=r(54);t.exports=function(t){for(var e=n(this),r=i(e),u=arguments.length,a=o(u>1?arguments[1]:void 0,r),c=u>2?arguments[2]:void 0,l=void 0===c?r:o(c,r);l>a;)e[a++]=t;return e}},function(t,e,r){"use strict";var n=r(65),o=r(42),i=r(47),u=RangeError;t.exports=function(t){var e=o(i(this)),r="",a=n(t);if(a<0||a==1/0)throw u("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(r+=e);return r}},function(t,e,r){var n=r(40),o=r(21),i=r(87),u=r(46),a=o(r(100).f),c=o([].push),l=function(t){return function(e){for(var r,o=u(e),l=i(o),s=l.length,f=0,p=[];s>f;)r=l[f++],n&&!a(o,r)||c(p,t?[r,o[r]]:o[r]);return p}};t.exports={entries:l(!0),values:l(!1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";var n,o=r(13),i=r(128),u=r(56).f,a=r(86),c=r(42),l=r(184),s=r(47),f=r(186),p=r(49),y=i("".startsWith),d=i("".slice),h=Math.min,v=f("startsWith");o({target:"String",proto:!0,forced:!!(p||v||(n=u(String.prototype,"startsWith"),!n||n.writable))&&!v},{startsWith:function(t){var e=c(s(this));l(t);var r=a(h(arguments.length>1?arguments[1]:void 0,e.length)),n=c(t);return y?y(e,n,r):d(e,r,r+n.length)===n}})},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return i_})),r.d(e,"LogicFlow",(function(){return o_})),r.d(e,"h",(function(){return et.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return db})),r.d(e,"RectNode",(function(){return wb})),r.d(e,"CircleNode",(function(){return kb})),r.d(e,"PolygonNode",(function(){return Bb})),r.d(e,"DiamondNode",(function(){return Vb})),r.d(e,"EllipseNode",(function(){return ng})),r.d(e,"TextNode",(function(){return yg})),r.d(e,"HtmlNode",(function(){return jg})),r.d(e,"BaseEdge",(function(){return lm})),r.d(e,"LineEdge",(function(){return Sm})),r.d(e,"PolylineEdge",(function(){return Gm})),r.d(e,"BezierEdge",(function(){return eO})),r.d(e,"Arrow",(function(){return sO})),r.d(e,"PurePolylineEdge",(function(){return mO})),r.d(e,"PureCurvedPolylineEdge",(function(){return MO})),r.d(e,"BaseEdgeModel",(function(){return la})),r.d(e,"BezierEdgeModel",(function(){return Lp})),r.d(e,"LineEdgeModel",(function(){return Sa})),r.d(e,"PolylineEdgeModel",(function(){return Ba})),r.d(e,"PurePolylineEdgeModel",(function(){return ty})),r.d(e,"PureCurvedPolylineEdgeModel",(function(){return hy})),r.d(e,"BaseNodeModel",(function(){return td})),r.d(e,"CircleNodeModel",(function(){return vd})),r.d(e,"DiamondNodeModel",(function(){return Rd})),r.d(e,"EllipseNodeModel",(function(){return Zd})),r.d(e,"PolygonNodeModel",(function(){return dh})),r.d(e,"RectNodeModel",(function(){return Ph})),r.d(e,"TextNodeModel",(function(){return Uh})),r.d(e,"HtmlNodeModel",(function(){return Jh})),r.d(e,"EditConfigModel",(function(){return So})),r.d(e,"GraphModel",(function(){return hs})),r.d(e,"SnaplineModel",(function(){return uv})),r.d(e,"Keyboard",(function(){return Gw})),r.d(e,"get",(function(){return bp})),r.d(e,"defaults",(function(){return Op})),r.d(e,"ElementState",(function(){return xo})),r.d(e,"ModelType",(function(){return Eo})),r.d(e,"ElementType",(function(){return Po})),r.d(e,"EventType",(function(){return ko})),r.d(e,"formateAnchorConnectValidateData",(function(){return qu}));var n={};r.r(n),r.d(n,"createUuid",(function(){return au})),r.d(n,"refreshGraphId",(function(){return cu})),r.d(n,"createDrag",(function(){return Jc})),r.d(n,"StepDrag",(function(){return Qc})),r.d(n,"setupEdgeModel",(function(){return Qa})),r.d(n,"isBboxOverLapping",(function(){return tc})),r.d(n,"filterRepeatPoints",(function(){return ec})),r.d(n,"getSimplePolyline",(function(){return rc})),r.d(n,"getExpandedBBox",(function(){return nc})),r.d(n,"pointDirection",(function(){return oc})),r.d(n,"getExpandedBBoxPoint",(function(){return ic})),r.d(n,"mergeBBox",(function(){return uc})),r.d(n,"getBBoxOfPoints",(function(){return ac})),r.d(n,"getPointsFromBBox",(function(){return cc})),r.d(n,"isPointOutsideBBox",(function(){return lc})),r.d(n,"getBBoxXCrossPoints",(function(){return sc})),r.d(n,"getBBoxYCrossPoints",(function(){return fc})),r.d(n,"getBBoxCrossPointsByPoint",(function(){return pc})),r.d(n,"estimateDistance",(function(){return yc})),r.d(n,"costByPoints",(function(){return dc})),r.d(n,"heuristicCostEstimate",(function(){return hc})),r.d(n,"rebuildPath",(function(){return vc})),r.d(n,"removeClosePointFromOpenList",(function(){return bc})),r.d(n,"isSegmentsIntersected",(function(){return gc})),r.d(n,"isSegmentCrossingBBox",(function(){return mc})),r.d(n,"getNextNeighborPoints",(function(){return Oc})),r.d(n,"pathFinder",(function(){return wc})),r.d(n,"getBoxByOriginNode",(function(){return _c})),r.d(n,"pointFilter",(function(){return jc})),r.d(n,"getPolylinePoints",(function(){return Sc})),r.d(n,"getLongestEdge",(function(){return xc})),r.d(n,"isSegmentsInNode",(function(){return Ec})),r.d(n,"isSegmentsCrossNode",(function(){return Pc})),r.d(n,"getCrossPointInRect",(function(){return kc})),r.d(n,"segmentDirection",(function(){return Ac})),r.d(n,"points2PointsList",(function(){return Dc})),r.d(n,"getSimplePoints",(function(){return Tc})),r.d(n,"getBytesLength",(function(){return Mc})),r.d(n,"getTextWidth",(function(){return Rc})),r.d(n,"getAppendAttributes",(function(){return Ic})),r.d(n,"getBezierControlPoints",(function(){return Lc})),r.d(n,"getBezierPoints",(function(){return zc})),r.d(n,"getEndTangent",(function(){return Uc})),r.d(n,"getClosestPointOfPolyline",(function(){return Fc})),r.d(n,"pickEdgeConfig",(function(){return Hc})),r.d(n,"twoPointDistance",(function(){return Xc})),r.d(n,"createEdgeGenerator",(function(){return Gc})),r.d(n,"snapToGrid",(function(){return Vi})),r.d(n,"getGridOffset",(function(){return Wi})),r.d(n,"sampleCubic",(function(){return Xa})),r.d(n,"getThetaOfVector",(function(){return Ya})),r.d(n,"degrees",(function(){return Va})),r.d(n,"Vector",(function(){return vl})),r.d(n,"Point",(function(){return bl})),r.d(n,"Matrix",(function(){return $l})),r.d(n,"RotateMatrix",(function(){return ql})),r.d(n,"ScaleMatrix",(function(){return Zl})),r.d(n,"TranslateMatrix",(function(){return Jl}));var o=r(1),i=r(14);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 u=r(51),a=Object(u.b)("observerBatching");function c(t){t()}var l=!1;function s(){return l}function f(t){return Object(o.t)(t)}var p,y=1e4,d=1e4,h=new Set;function v(){void 0===p&&(p=setTimeout(b,d))}function b(){p=void 0;var t=Date.now();h.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,h.delete(e))})),h.size>0&&v()}var g=!1,m=[];var O={};function w(t){return"observer"+t}function _(t,e,r){if(void 0===e&&(e="observed"),void 0===r&&(r=O),s())return t();var n,a=function(t){return function(){g?m.push(t):t()}}((r.useForceUpdate||u.d)()),c=i.d.useRef(null);if(!c.current){var l=new o.c(w(e),(function(){p.mounted?a():(l.dispose(),c.current=null)})),p=function(t){return{cleanAt:Date.now()+y,reaction:t}}(l);c.current=p,n=c,h.add(n),v()}var d=c.current.reaction;return i.d.useDebugValue(d,f),i.d.useEffect((function(){var t;return t=c,h.delete(t),c.current?c.current.mounted=!0:(c.current={reaction:new o.c(w(e),(function(){a()})),cleanAt:1/0},a()),function(){c.current.reaction.dispose(),c.current=null}}),[]),function(t){g=!0,m=[];try{var e=t();g=!1;var r=m.length>0?m:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{g=!1}}((function(){var e,r;if(d.track((function(){try{e=t()}catch(t){r=t}})),r)throw r;return e}))}var j=function(){return j=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},j.apply(this,arguments)};function S(t,e){if(s())return t;var r,n,o,u=j({forwardRef:!1},e),a=t.displayName||t.name,c=function(e,r){return _((function(){return t(e,r)}),a)};return c.displayName=a,r=u.forwardRef?Object(i.f)(Object(i.e)(c)):Object(i.f)(c),n=t,o=r,Object.keys(n).forEach((function(t){x[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=a,r}var x={$$typeof:!0,render:!0,compare:!0,type:!0};function E(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",u="function"==typeof t[e],a="function"==typeof t[i];return u&&a?new Error("MobX Observer: Do not use children and render in the same time in`"+r):u||a?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}E.propTypes={children:P,render:P},E.displayName="Observer";var k;(k=i.g)||(k=c),Object(o.n)({reactionScheduler:k}),Object(u.a)()[a]=!0;var A=0;var D={};function T(t){return D[t]||(D[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+A+")";return A++,e}(t)),D[t]}function N(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 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 R=T("patchMixins"),I=T("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 u;return null!=t&&(u=t.apply(this,o)),u}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(r,o)}))}}function z(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 B(t,e,r){var n=function(t,e){var r=t[R]=t[R]||{},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],u=U(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,u)}}function U(t,e,r,n,o){var i,u=z(o,n);return(i={})[I]=!0,i.get=function(){return u},i.set=function(o){if(this===t)u=z(o,n);else{var i=U(this,e,r,n,o);Object.defineProperty(this,e,i)}},i.configurable=!0,i.enumerable=r,i}var F=o.a||"$mobx",H=T("isMobXReactObserver"),X=T("isUnmounted"),G=T("skipRender"),Y=T("isForcingUpdate");function V(t){var e=t.prototype;if(t[H])W(e);else t[H]=!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!==$)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=$;q(e,"props"),q(e,"state");var r=e.render;return e.render=function(){return K.call(this,r)},B(e,"componentWillUnmount",(function(){var t;if(!0!==s()&&(null===(t=this.render[F])||void 0===t||t.dispose(),this[X]=!0,!this.render[F]))W(this)})),t}function W(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function K(t){var e=this;if(!0===s())return t.call(this);C(this,G,!1),C(this,Y,!1);var r=W(this),n=t.bind(this),u=!1,a=new o.c(r+".render()",(function(){if(!u&&(u=!0,!0!==e[X])){var t=!0;try{C(e,Y,!0),e[G]||i.a.prototype.forceUpdate.call(e),t=!1}finally{C(e,Y,!1),t&&a.dispose()}}}));function c(){u=!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[F]=a,this.render=c,c.call(this)}function $(t,e){return s(),this.state!==e||!N(this.props,t)}function q(t,e){var r=T("reactProp_"+e+"_valueHolder"),n=T("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[Y]||N(this[r],t)?C(this,r,t):(C(this,r,t),C(this,G,!0),i.call(this).reportChanged(),C(this,G,!1))}})}var Z="function"==typeof Symbol&&Symbol.for,J=Z?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,Q=Z?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function tt(t){if(t.isMobxInjector,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(J&&t.$$typeof===J){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)(E,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)?V(t):S(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 et=r(0);r(6),r(7),r(2),r(3),r(60),r(4),r(5),r(12),r(36),r(26),r(23),r(22),r(9),r(10),r(11),r(24),r(28),r(27),r(29),r(8),r(18),r(25),r(20),r(227),r(183),r(95),r(67),r(68),r(187);var rt=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 nt=function(){this.__data__=[],this.size=0};var ot=function(t,e){return t===e||t!=t&&e!=e};var it=function(t,e){for(var r=t.length;r--;)if(ot(t[r][0],e))return r;return-1},ut=Array.prototype.splice;var at=function(t){var e=this.__data__,r=it(e,t);return!(r<0)&&(r==e.length-1?e.pop():ut.call(e,r,1),--this.size,!0)};var ct=function(t){var e=this.__data__,r=it(e,t);return r<0?void 0:e[r][1]};var lt=function(t){return it(this.__data__,t)>-1};var st=function(t,e){var r=this.__data__,n=it(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function ft(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])}}ft.prototype.clear=nt,ft.prototype.delete=at,ft.prototype.get=ct,ft.prototype.has=lt,ft.prototype.set=st;var pt=ft;var yt=function(){this.__data__=new pt,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 vt=function(t){return this.__data__.has(t)},bt=r(37),gt=bt.a.Symbol,mt=Object.prototype,Ot=mt.hasOwnProperty,wt=mt.toString,_t=gt?gt.toStringTag:void 0;var jt=function(t){var e=Ot.call(t,_t),r=t[_t];try{t[_t]=void 0;var n=!0}catch(t){}var o=wt.call(t);return n&&(e?t[_t]=r:delete t[_t]),o},St=Object.prototype.toString;var xt=function(t){return St.call(t)},Et=gt?gt.toStringTag:void 0;var Pt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Et&&Et in Object(t)?jt(t):xt(t)};var kt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var At,Dt=function(t){if(!kt(t))return!1;var e=Pt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Tt=bt.a["__core-js_shared__"],Nt=(At=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||""))?"Symbol(src)_1."+At:"";var Mt=function(t){return!!Nt&&Nt in t},Ct=Function.prototype.toString;var Rt=function(t){if(null!=t){try{return Ct.call(t)}catch(t){}try{return t+""}catch(t){}}return""},It=/^\[object .+?Constructor\]$/,Lt=Function.prototype,zt=Object.prototype,Bt=Lt.toString,Ut=zt.hasOwnProperty,Ft=RegExp("^"+Bt.call(Ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ht=function(t){return!(!kt(t)||Mt(t))&&(Dt(t)?Ft:It).test(Rt(t))};var Xt=function(t,e){return null==t?void 0:t[e]};var Gt=function(t,e){var r=Xt(t,e);return Ht(r)?r:void 0},Yt=Gt(bt.a,"Map"),Vt=Gt(Object,"create");var Wt=function(){this.__data__=Vt?Vt(null):{},this.size=0};var Kt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$t=Object.prototype.hasOwnProperty;var qt=function(t){var e=this.__data__;if(Vt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return $t.call(e,t)?e[t]:void 0},Zt=Object.prototype.hasOwnProperty;var Jt=function(t){var e=this.__data__;return Vt?void 0!==e[t]:Zt.call(e,t)};var Qt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Vt&&void 0===e?"__lodash_hash_undefined__":e,this};function te(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])}}te.prototype.clear=Wt,te.prototype.delete=Kt,te.prototype.get=qt,te.prototype.has=Jt,te.prototype.set=Qt;var ee=te;var re=function(){this.size=0,this.__data__={hash:new ee,map:new(Yt||pt),string:new ee}};var ne=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var oe=function(t,e){var r=t.__data__;return ne(e)?r["string"==typeof e?"string":"hash"]:r.map};var ie=function(t){var e=oe(this,t).delete(t);return this.size-=e?1:0,e};var ue=function(t){return oe(this,t).get(t)};var ae=function(t){return oe(this,t).has(t)};var ce=function(t,e){var r=oe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function le(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])}}le.prototype.clear=re,le.prototype.delete=ie,le.prototype.get=ue,le.prototype.has=ae,le.prototype.set=ce;var se=le;var fe=function(t,e){var r=this.__data__;if(r instanceof pt){var n=r.__data__;if(!Yt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new se(n)}return r.set(t,e),this.size=r.size,this};function pe(t){var e=this.__data__=new pt(t);this.size=e.size}pe.prototype.clear=yt,pe.prototype.delete=dt,pe.prototype.get=ht,pe.prototype.has=vt,pe.prototype.set=fe;var ye=pe;var de=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var he=function(t){return this.__data__.has(t)};function ve(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new se;++e<r;)this.add(t[e])}ve.prototype.add=ve.prototype.push=de,ve.prototype.has=he;var be=ve;var ge=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 me=function(t,e){return t.has(e)};var Oe=function(t,e,r,n,o,i){var u=1&r,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var l=i.get(t),s=i.get(e);if(l&&s)return l==e&&s==t;var f=-1,p=!0,y=2&r?new be:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],h=e[f];if(n)var v=u?n(h,d,f,e,t,i):n(d,h,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(y){if(!ge(e,(function(t,e){if(!me(y,e)&&(d===t||o(d,t,r,n,i)))return y.push(e)}))){p=!1;break}}else if(d!==h&&!o(d,h,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},we=bt.a.Uint8Array;var _e=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var je=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Se=gt?gt.prototype:void 0,xe=Se?Se.valueOf:void 0;var Ee=function(t,e,r,n,o,i,u){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 we(t),new we(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ot(+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=_e;case"[object Set]":var c=1&n;if(a||(a=je),t.size!=e.size&&!c)return!1;var l=u.get(t);if(l)return l==e;n|=2,u.set(t,e);var s=Oe(a(t),a(e),n,o,i,u);return u.delete(t),s;case"[object Symbol]":if(xe)return xe.call(t)==xe.call(e)}return!1};var Pe=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},ke=Array.isArray;var Ae=function(t,e,r){var n=e(t);return ke(t)?n:Pe(n,r(t))};var De=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i};var Te=function(){return[]},Ne=Object.prototype.propertyIsEnumerable,Me=Object.getOwnPropertySymbols,Ce=Me?function(t){return null==t?[]:(t=Object(t),De(Me(t),(function(e){return Ne.call(t,e)})))}:Te;var Re=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Ie=function(t){return null!=t&&"object"==typeof t};var Le=function(t){return Ie(t)&&"[object Arguments]"==Pt(t)},ze=Object.prototype,Be=ze.hasOwnProperty,Ue=ze.propertyIsEnumerable,Fe=Le(function(){return arguments}())?Le:function(t){return Ie(t)&&Be.call(t,"callee")&&!Ue.call(t,"callee")},He=Fe,Xe=r(58),Ge=/^(?:0|[1-9]\d*)$/;var Ye=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Ge.test(t))&&t>-1&&t%1==0&&t<e};var Ve=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},We={};We["[object Float32Array]"]=We["[object Float64Array]"]=We["[object Int8Array]"]=We["[object Int16Array]"]=We["[object Int32Array]"]=We["[object Uint8Array]"]=We["[object Uint8ClampedArray]"]=We["[object Uint16Array]"]=We["[object Uint32Array]"]=!0,We["[object Arguments]"]=We["[object Array]"]=We["[object ArrayBuffer]"]=We["[object Boolean]"]=We["[object DataView]"]=We["[object Date]"]=We["[object Error]"]=We["[object Function]"]=We["[object Map]"]=We["[object Number]"]=We["[object Object]"]=We["[object RegExp]"]=We["[object Set]"]=We["[object String]"]=We["[object WeakMap]"]=!1;var Ke=function(t){return Ie(t)&&Ve(t.length)&&!!We[Pt(t)]};var $e=function(t){return function(e){return t(e)}},qe=r(59),Ze=qe.a&&qe.a.isTypedArray,Je=Ze?$e(Ze):Ke,Qe=Object.prototype.hasOwnProperty;var tr=function(t,e){var r=ke(t),n=!r&&He(t),o=!r&&!n&&Object(Xe.a)(t),i=!r&&!n&&!o&&Je(t),u=r||n||o||i,a=u?Re(t.length,String):[],c=a.length;for(var l in t)!e&&!Qe.call(t,l)||u&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ye(l,c))||a.push(l);return a},er=Object.prototype;var rr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||er)};var nr=function(t,e){return function(r){return t(e(r))}},or=nr(Object.keys,Object),ir=Object.prototype.hasOwnProperty;var ur=function(t){if(!rr(t))return or(t);var e=[];for(var r in Object(t))ir.call(t,r)&&"constructor"!=r&&e.push(r);return e};var ar=function(t){return null!=t&&Ve(t.length)&&!Dt(t)};var cr=function(t){return ar(t)?tr(t):ur(t)};var lr=function(t){return Ae(t,cr,Ce)},sr=Object.prototype.hasOwnProperty;var fr=function(t,e,r,n,o,i){var u=1&r,a=lr(t),c=a.length;if(c!=lr(e).length&&!u)return!1;for(var l=c;l--;){var s=a[l];if(!(u?s in e:sr.call(e,s)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var y=!0;i.set(t,e),i.set(e,t);for(var d=u;++l<c;){var h=t[s=a[l]],v=e[s];if(n)var b=u?n(v,h,s,e,t,i):n(h,v,s,t,e,i);if(!(void 0===b?h===v||o(h,v,r,n,i):b)){y=!1;break}d||(d="constructor"==s)}if(y&&!d){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||(y=!1)}return i.delete(t),i.delete(e),y},pr=Gt(bt.a,"DataView"),yr=Gt(bt.a,"Promise"),dr=Gt(bt.a,"Set"),hr=Gt(bt.a,"WeakMap"),vr="[object Map]",br="[object Promise]",gr="[object Set]",mr="[object WeakMap]",Or="[object DataView]",wr=Rt(pr),_r=Rt(Yt),jr=Rt(yr),Sr=Rt(dr),xr=Rt(hr),Er=Pt;(pr&&Er(new pr(new ArrayBuffer(1)))!=Or||Yt&&Er(new Yt)!=vr||yr&&Er(yr.resolve())!=br||dr&&Er(new dr)!=gr||hr&&Er(new hr)!=mr)&&(Er=function(t){var e=Pt(t),r="[object Object]"==e?t.constructor:void 0,n=r?Rt(r):"";if(n)switch(n){case wr:return Or;case _r:return vr;case jr:return br;case Sr:return gr;case xr:return mr}return e});var Pr=Er,kr="[object Arguments]",Ar="[object Array]",Dr="[object Object]",Tr=Object.prototype.hasOwnProperty;var Nr=function(t,e,r,n,o,i){var u=ke(t),a=ke(e),c=u?Ar:Pr(t),l=a?Ar:Pr(e),s=(c=c==kr?Dr:c)==Dr,f=(l=l==kr?Dr:l)==Dr,p=c==l;if(p&&Object(Xe.a)(t)){if(!Object(Xe.a)(e))return!1;u=!0,s=!1}if(p&&!s)return i||(i=new ye),u||Je(t)?Oe(t,e,r,n,o,i):Ee(t,e,c,r,n,o,i);if(!(1&r)){var y=s&&Tr.call(t,"__wrapped__"),d=f&&Tr.call(e,"__wrapped__");if(y||d){var h=y?t.value():t,v=d?e.value():e;return i||(i=new ye),o(h,v,r,n,i)}}return!!p&&(i||(i=new ye),fr(t,e,r,n,o,i))};var Mr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Ie(e)&&!Ie(r)?e!=e&&r!=r:Nr(e,r,n,o,t,i))};var Cr=function(t,e,r,n){var o=r.length,i=o,u=!n;if(null==t)return!i;for(t=Object(t);o--;){var a=r[o];if(u&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var c=(a=r[o])[0],l=t[c],s=a[1];if(u&&a[2]){if(void 0===l&&!(c in t))return!1}else{var f=new ye;if(n)var p=n(l,s,c,t,e,f);if(!(void 0===p?Mr(s,l,3,n,f):p))return!1}}return!0};var Rr=function(t){return t==t&&!kt(t)};var Ir=function(t){for(var e=cr(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Rr(o)]}return e};var Lr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var zr=function(t){var e=Ir(t);return 1==e.length&&e[0][2]?Lr(e[0][0],e[0][1]):function(r){return r===t||Cr(r,t,e)}};var Br=function(t){return"symbol"==typeof t||Ie(t)&&"[object Symbol]"==Pt(t)},Ur=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fr=/^\w*$/;var Hr=function(t,e){if(ke(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Br(t))||(Fr.test(t)||!Ur.test(t)||null!=e&&t in Object(e))};function Xr(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 u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(Xr.Cache||se),r}Xr.Cache=se;var Gr=Xr;var Yr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vr=/\\(\\)?/g,Wr=function(t){var e=Gr(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(Yr,(function(t,r,n,o){e.push(n?o.replace(Vr,"$1"):r||t)})),e})),Kr=gt?gt.prototype:void 0,$r=Kr?Kr.toString:void 0;var qr=function t(e){if("string"==typeof e)return e;if(ke(e))return rt(e,t)+"";if(Br(e))return $r?$r.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Zr=function(t){return null==t?"":qr(t)};var Jr=function(t,e){return ke(t)?t:Hr(t,e)?[t]:Wr(Zr(t))};var Qr=function(t){if("string"==typeof t||Br(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var tn=function(t,e){for(var r=0,n=(e=Jr(e,t)).length;null!=t&&r<n;)t=t[Qr(e[r++])];return r&&r==n?t:void 0};var en=function(t,e,r){var n=null==t?void 0:tn(t,e);return void 0===n?r:n};var rn=function(t,e){return null!=t&&e in Object(t)};var nn=function(t,e,r){for(var n=-1,o=(e=Jr(e,t)).length,i=!1;++n<o;){var u=Qr(e[n]);if(!(i=null!=t&&r(t,u)))break;t=t[u]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ve(o)&&Ye(u,o)&&(ke(t)||He(t))};var on=function(t,e){return null!=t&&nn(t,e,rn)};var un=function(t,e){return Hr(t)&&Rr(e)?Lr(Qr(t),e):function(r){var n=en(r,t);return void 0===n&&n===e?on(r,t):Mr(e,n,3)}};var an=function(t){return t};var cn=function(t){return function(e){return null==e?void 0:e[t]}};var ln=function(t){return function(e){return tn(e,t)}};var sn=function(t){return Hr(t)?cn(Qr(t)):ln(t)};var fn=function(t){return"function"==typeof t?t:null==t?an:"object"==typeof t?ke(t)?un(t[0],t[1]):zr(t):sn(t)};var pn=function(t){return function(e,r,n){for(var o=-1,i=Object(e),u=n(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return e}}();var yn=function(t,e){return function(r,n){if(null==r)return r;if(!ar(r))return t(r,n);for(var o=r.length,i=e?o:-1,u=Object(r);(e?i--:++i<o)&&!1!==n(u[i],i,u););return r}}((function(t,e){return t&&pn(t,e,cr)}));var dn=function(t,e){var r=-1,n=ar(t)?Array(t.length):[];return yn(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var hn=function(t,e){return(ke(t)?rt:dn)(t,fn(e,3))};Object(o.n)({isolateGlobalState:!0});var vn=function(){try{var t=Gt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var bn=function(t,e,r){"__proto__"==e&&vn?vn(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},gn=Object.prototype.hasOwnProperty;var mn=function(t,e,r){var n=t[e];gn.call(t,e)&&ot(n,r)&&(void 0!==r||e in t)||bn(t,e,r)};var On=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,u=e.length;++i<u;){var a=e[i],c=n?n(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),o?bn(r,a,c):mn(r,a,c)}return r};var wn=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)},_n=Math.max;var jn=function(t,e,r){return e=_n(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=_n(n.length-e,0),u=Array(i);++o<i;)u[o]=n[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=n[o];return a[e]=r(u),wn(t,this,a)}};var Sn=function(t){return function(){return t}},xn=vn?function(t,e){return vn(t,"toString",{configurable:!0,enumerable:!1,value:Sn(e),writable:!0})}:an,En=Date.now;var Pn=function(t){var e=0,r=0;return function(){var n=En(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},kn=Pn(xn);var An=function(t,e){return kn(jn(t,e,an),t+"")};var Dn=function(t,e,r){if(!kt(r))return!1;var n=typeof e;return!!("number"==n?ar(r)&&Ye(e,r.length):"string"==n&&e in r)&&ot(r[e],t)};var Tn=function(t){return An((function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,u=o>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,u&&Dn(r[0],r[1],u)&&(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}))},Nn=Object.prototype.hasOwnProperty,Mn=Tn((function(t,e){if(rr(e)||ar(e))On(e,cr(e),t);else for(var r in e)Nn.call(e,r)&&mn(t,r,e[r])}));var Cn=function(t,e,r,n){if(!kt(t))return t;for(var o=-1,i=(e=Jr(e,t)).length,u=i-1,a=t;null!=a&&++o<i;){var c=Qr(e[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=u){var s=a[c];void 0===(l=n?n(s,c,a):void 0)&&(l=kt(s)?s:Ye(e[o+1])?[]:{})}mn(a,c,l),a=a[c]}return t};var Rn=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var u=e[n],a=tn(t,u);r(a,u)&&Cn(i,Jr(u,t),a)}return i};var In=function(t,e){return Rn(t,e,(function(e,r){return on(t,r)}))},Ln=gt?gt.isConcatSpreadable:void 0;var zn=function(t){return ke(t)||He(t)||!!(Ln&&t&&t[Ln])};var Bn=function t(e,r,n,o,i){var u=-1,a=e.length;for(n||(n=zn),i||(i=[]);++u<a;){var c=e[u];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Pe(i,c):o||(i[i.length]=c)}return i};var Un=function(t){return(null==t?0:t.length)?Bn(t,1):[]};var Fn,Hn,Xn,Gn,Yn,Vn,Wn,Kn,$n,qn,Zn,Jn,Qn,to,eo,ro,no,oo,io,uo=function(t){return kn(jn(t,void 0,Un),t+"")}((function(t,e){return null==t?{}:In(t,e)}));function ao(t){return ao="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},ao(t)}function co(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 lo(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,fo(n.key),n)}}function so(t,e,r){return(e=fo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fo(t){var e=function(t,e){if("object"!==ao(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===ao(e)?e:String(e)}function po(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 yo,ho,vo,bo,go,mo,Oo,wo,_o={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotation:!1,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},jo=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","allowRotation","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],So=(Hn=po((Fn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),co(this,"isSilentMode",Hn,this),co(this,"stopZoomGraph",Xn,this),co(this,"stopScrollGraph",Gn,this),co(this,"stopMoveGraph",Yn,this),co(this,"adjustEdge",Vn,this),co(this,"adjustEdgeMiddle",Wn,this),co(this,"adjustEdgeStartAndEnd",Kn,this),co(this,"adjustNodePosition",$n,this),co(this,"hideAnchors",qn,this),co(this,"allowRotation",Zn,this),co(this,"hoverOutline",Jn,this),co(this,"nodeSelectedOutline",Qn,this),co(this,"edgeSelectedOutline",to,this),co(this,"nodeTextEdit",eo,this),co(this,"edgeTextEdit",ro,this),co(this,"nodeTextDraggable",no,this),co(this,"edgeTextDraggable",oo,this),co(this,"autoExpand",io,this),so(this,"multipleSelectKey",""),so(this,"defaultConfig",{}),Mn(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);Mn(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&Mn(n,this.defaultConfig),!0===e&&e!==this.isSilentMode){var o=uo(_o,jo);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,allowRotation:this.allowRotation,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},Mn(n,o)}!1===r&&Mn(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=uo(t,jo);return Mn(n,i)}},{key:"getConfig",value:function(){return uo(this,jo)}}])&&lo(e.prototype,r),n&&lo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()).prototype,"isSilentMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xn=po(Fn.prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=po(Fn.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yn=po(Fn.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Vn=po(Fn.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Wn=po(Fn.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kn=po(Fn.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),$n=po(Fn.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qn=po(Fn.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zn=po(Fn.prototype,"allowRotation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Jn=po(Fn.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Qn=po(Fn.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),to=po(Fn.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),eo=po(Fn.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ro=po(Fn.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),no=po(Fn.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),oo=po(Fn.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),io=po(Fn.prototype,"autoExpand",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),po(Fn.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(Fn.prototype,"updateEditConfig"),Fn.prototype),Fn),xo=(r(55),function(t){return 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",t}({})),Eo=function(t){return 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.PURE_POLYLINE_EDGE="pure-polyline-edge",t.PURE_CURVED_POLYLINE_EDGE="pure-curved-polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph",t}({}),Po=function(t){return t.NODE="node",t.EDGE="edge",t.GRAPH="graph",t}({}),ko=function(t){return 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_GROUP_COPY="node:group-copy-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.NODE_ROTATE="node:rotate",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEDOWN="edge:mousedown",t.EDGE_MOUSEUP="edge:mouseup",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.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_MOUSEDOWN="anchor:mousedown",t.ANCHOR_MOUSEMOVE="anchor:mousemove",t.ANCHOR_MOUNTED="anchor:mounted",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",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",t.GRAPH_RENDERED="graph:rendered",t}({}),Ao=function(t){return t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t}({}),Do=function(t){return t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE",t}({});function To(t){return To="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},To(t)}function No(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Mo(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 Mo(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 Mo(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 Co(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 Ro(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,Lo(n.key),n)}}function Io(t,e,r){return(e=Lo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lo(t){var e=function(t,e){if("object"!==To(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==To(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===To(e)?e:String(e)}function zo(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 Bo={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},Uo=(yo=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Io(this,"MINI_SCALE_SIZE",.2),Io(this,"MAX_SCALE_SIZE",16),Co(this,"SCALE_X",ho,this),Co(this,"SKEW_Y",vo,this),Co(this,"SKEW_X",bo,this),Co(this,"SCALE_Y",go,this),Co(this,"TRANSLATE_X",mo,this),Co(this,"TRANSLATE_Y",Oo,this),Co(this,"ZOOM_SIZE",wo,this),Io(this,"eventCenter",void 0),Io(this,"translateLimitMinX",void 0),Io(this,"translateLimitMinY",void 0),Io(this,"translateLimitMaxX",void 0),Io(this,"translateLimitMaxY",void 0),this.eventCenter=e;var n=r.stopMoveGraph,o=void 0!==n&&n;this.updateTranslateLimits(o)}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=No(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=No(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=No(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(ko.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.translateLimitMaxX&&this.TRANSLATE_X+t>=this.translateLimitMinX&&(this.TRANSLATE_X+=t),this.TRANSLATE_Y+e<=this.translateLimitMaxY&&this.TRANSLATE_Y+e>=this.translateLimitMinY&&(this.TRANSLATE_Y+=e),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,e,r,n){var o=No(this.CanvasPointToHtmlPoint([t,e]),2),i=r/2-o[0],u=n/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=u,this.emitGraphTransform("focusOn")}},{key:"updateTranslateLimits",value:function(t){var e=No(Array.isArray(t)&&4===t.length?t:Bo[t.toString()],4);this.translateLimitMinX=e[0],this.translateLimitMinY=e[1],this.translateLimitMaxX=e[2],this.translateLimitMaxY=e[3]}}],r&&Ro(e.prototype,r),n&&Ro(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ho=zo(yo.prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),vo=zo(yo.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),bo=zo(yo.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),go=zo(yo.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),mo=zo(yo.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Oo=zo(yo.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),wo=zo(yo.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),zo(yo.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(yo.prototype,"zoom"),yo.prototype),zo(yo.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(yo.prototype,"resetZoom"),yo.prototype),zo(yo.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(yo.prototype,"translate"),yo.prototype),zo(yo.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(yo.prototype,"focusOn"),yo.prototype),yo);var Fo=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var Ho=function(t,e){return t&&On(e,cr(e),t)};var Xo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},Go=Object.prototype.hasOwnProperty;var Yo=function(t){if(!kt(t))return Xo(t);var e=rr(t),r=[];for(var n in t)("constructor"!=n||!e&&Go.call(t,n))&&r.push(n);return r};var Vo=function(t){return ar(t)?tr(t,!0):Yo(t)};var Wo=function(t,e){return t&&On(e,Vo(e),t)},Ko=r(120);var $o=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var qo=function(t,e){return On(t,Ce(t),e)},Zo=nr(Object.getPrototypeOf,Object),Jo=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Pe(e,Ce(t)),t=Zo(t);return e}:Te;var Qo=function(t,e){return On(t,Jo(t),e)};var ti=function(t){return Ae(t,Vo,Jo)},ei=Object.prototype.hasOwnProperty;var ri=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&ei.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var ni=function(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e};var oi=function(t,e){var r=e?ni(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},ii=/\w*$/;var ui=function(t){var e=new t.constructor(t.source,ii.exec(t));return e.lastIndex=t.lastIndex,e},ai=gt?gt.prototype:void 0,ci=ai?ai.valueOf:void 0;var li=function(t){return ci?Object(ci.call(t)):{}};var si=function(t,e){var r=e?ni(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var fi=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return ni(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return oi(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 si(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return ui(t);case"[object Symbol]":return li(t)}},pi=Object.create,yi=function(){function t(){}return function(e){if(!kt(e))return{};if(pi)return pi(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var di=function(t){return"function"!=typeof t.constructor||rr(t)?{}:yi(Zo(t))};var hi=function(t){return Ie(t)&&"[object Map]"==Pr(t)},vi=qe.a&&qe.a.isMap,bi=vi?$e(vi):hi;var gi=function(t){return Ie(t)&&"[object Set]"==Pr(t)},mi=qe.a&&qe.a.isSet,Oi=mi?$e(mi):gi,wi="[object Arguments]",_i="[object Function]",ji="[object Object]",Si={};Si[wi]=Si["[object Array]"]=Si["[object ArrayBuffer]"]=Si["[object DataView]"]=Si["[object Boolean]"]=Si["[object Date]"]=Si["[object Float32Array]"]=Si["[object Float64Array]"]=Si["[object Int8Array]"]=Si["[object Int16Array]"]=Si["[object Int32Array]"]=Si["[object Map]"]=Si["[object Number]"]=Si[ji]=Si["[object RegExp]"]=Si["[object Set]"]=Si["[object String]"]=Si["[object Symbol]"]=Si["[object Uint8Array]"]=Si["[object Uint8ClampedArray]"]=Si["[object Uint16Array]"]=Si["[object Uint32Array]"]=!0,Si["[object Error]"]=Si[_i]=Si["[object WeakMap]"]=!1;var xi=function t(e,r,n,o,i,u){var a,c=1&r,l=2&r,s=4&r;if(n&&(a=i?n(e,o,i,u):n(e)),void 0!==a)return a;if(!kt(e))return e;var f=ke(e);if(f){if(a=ri(e),!c)return $o(e,a)}else{var p=Pr(e),y=p==_i||"[object GeneratorFunction]"==p;if(Object(Xe.a)(e))return Object(Ko.a)(e,c);if(p==ji||p==wi||y&&!i){if(a=l||y?{}:di(e),!c)return l?Qo(e,Wo(a,e)):qo(e,Ho(a,e))}else{if(!Si[p])return i?e:{};a=fi(e,p,c)}}u||(u=new ye);var d=u.get(e);if(d)return d;u.set(e,a),Oi(e)?e.forEach((function(o){a.add(t(o,r,n,o,e,u))})):bi(e)&&e.forEach((function(o,i){a.set(i,t(o,r,n,i,e,u))}));var h=f?void 0:(s?l?ti:lr:l?Vo:cr)(e);return Fo(h||e,(function(o,i){h&&(o=e[i=o]),mn(a,i,t(o,r,n,i,e,u))})),a};var Ei=function(t){return xi(t,5)};var Pi=function(t,e,r){(void 0!==r&&!ot(t[e],r)||void 0===r&&!(e in t))&&bn(t,e,r)};var ki=function(t){return Ie(t)&&ar(t)},Ai=Function.prototype,Di=Object.prototype,Ti=Ai.toString,Ni=Di.hasOwnProperty,Mi=Ti.call(Object);var Ci=function(t){if(!Ie(t)||"[object Object]"!=Pt(t))return!1;var e=Zo(t);if(null===e)return!0;var r=Ni.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ti.call(r)==Mi};var Ri=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Ii=function(t){return On(t,Vo(t))};var Li=function(t,e,r,n,o,i,u){var a=Ri(t,r),c=Ri(e,r),l=u.get(c);if(l)Pi(t,r,l);else{var s=i?i(a,c,r+"",t,e,u):void 0,f=void 0===s;if(f){var p=ke(c),y=!p&&Object(Xe.a)(c),d=!p&&!y&&Je(c);s=c,p||y||d?ke(a)?s=a:ki(a)?s=$o(a):y?(f=!1,s=Object(Ko.a)(c,!0)):d?(f=!1,s=si(c,!0)):s=[]:Ci(c)||He(c)?(s=a,He(a)?s=Ii(a):kt(a)&&!Dt(a)||(s=di(c))):f=!1}f&&(u.set(c,s),o(s,c,n,i,u),u.delete(c)),Pi(t,r,s)}};var zi=function t(e,r,n,o,i){e!==r&&pn(r,(function(u,a){if(i||(i=new ye),kt(u))Li(e,r,a,n,t,o,i);else{var c=o?o(Ri(e,a),u,a+"",e,r,i):void 0;void 0===c&&(c=u),Pi(e,a,c)}}),Vo)},Bi=Tn((function(t,e,r){zi(t,e,r)})),Ui={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"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#00ffff",fill:"none",strokeWidth:1.5}},Fi=function(t){var e=Ei(Ui);return t&&(e=Bi(e,t)),e};r(188);function Hi(t){return Hi="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},Hi(t)}function Xi(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,Gi(n.key),n)}}function Gi(t){var e=function(t,e){if("object"!==Hi(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Hi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Hi(e)?e:String(e)}var Yi=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),e=this,n={},(r=Gi(r="_events"))in e?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 u=n[i],a=u.callback;u.once&&(n.splice(i,1),0===n.length&&delete r._events[t],o--,i--),a.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}}])&&Xi(e.prototype,r),n&&Xi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Vi(t,e){return e*Math.round(t/e)||t}function Wi(t,e){return t%e}function Ki(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return $i(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 $i(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 $i(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 qi,Zi=function(t,e,r){var n=Ki(t,2),o=n[0],i=n[1],u=Ki(e,2),a=u[0],c=u[1],l=Ki(r,2),s=l[0],f=l[1];return o>a&&o<s&&i>c&&i<f},Ji=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;case"ctrl":r=t.ctrlKey;break;default:r=!1}return r},Qi=(r(189),r(116),r(96),r(31),r(15),r(16),r(17),r(50),new Uint8Array(16));function tu(){if(!qi&&!(qi="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 qi(Qi)}var eu=/^(?:[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 ru=function(t){return"string"==typeof t&&eu.test(t)},nu=[],ou=0;ou<256;++ou)nu.push((ou+256).toString(16).substr(1));var iu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(nu[t[e+0]]+nu[t[e+1]]+nu[t[e+2]]+nu[t[e+3]]+"-"+nu[t[e+4]]+nu[t[e+5]]+"-"+nu[t[e+6]]+nu[t[e+7]]+"-"+nu[t[e+8]]+nu[t[e+9]]+"-"+nu[t[e+10]]+nu[t[e+11]]+nu[t[e+12]]+nu[t[e+13]]+nu[t[e+14]]+nu[t[e+15]]).toLowerCase();if(!ru(r))throw TypeError("Stringified UUID is invalid");return r};var uu=function(t,e,r){var n=(t=t||{}).random||(t.rng||tu)();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 iu(n)},au=function(){return uu()},cu=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+uu(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+uu(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},lu=(r(117),r(141),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 su(t){return su="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},su(t)}function fu(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 pu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fu(Object(r),!0).forEach((function(e){yu(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fu(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function yu(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==su(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==su(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===su(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var du,hu,vu,bu,gu,mu,Ou,wu,_u,ju,Su,xu,Eu,Pu,ku,Au,Du,Tu,Nu,Mu,Cu,Ru=function(t){return t.anchors},Iu=function(t,e){for(var r,n=e.nodes,o=n.length-1;o>=0;o--){var i=n[o];if(Uu(t,i)){var u=i.getTargetAnchor(t);if(u){var a={node:i,anchorIndex:u.index,anchor:u.anchor};r&&!Lu(i,r.node,e)||(r=a)}}}return r},Lu=function(t,e,r){return t.zIndex>e.zIndex||r.nodesMap[t.id].index>r.nodesMap[e.id].index},zu=function(t,e,r,n){return Math.hypot(t-r,e-n)},Bu=function(t,e){var r=!1,n=Fu(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},Uu=function(t,e){var r=!1,n=Fu(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},Fu=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}},Hu=function(t,e,r){var n,o=function(t){var e=t,r=e.x,n=e.y,o=e.width,i=e.height,u=e.radius;return[{x:r-o/2+u,y:n-i/2+u,r:u},{x:r+o/2-u,y:n-i/2+u,r:u},{x:r-o/2+u,y:n+i/2-u,r:u},{x:r+o/2-u,y:n+i/2-u,r:u}]}(r),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var r=zu(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),Xu(t,e,n)},Xu=function(t,e,r){var n,o=r,i=o.x,u=o.y,a=o.r;if(e===Ao.HORIZONTAL){var c=i-Math.sqrt(a*a-(t.y-u)*(t.y-u)),l=i+Math.sqrt(a*a-(t.y-u)*(t.y-u));n={x:Math.abs(c-t.x)<Math.abs(l-t.x)?c:l,y:t.y}}else if(e===Ao.VERTICAL){var s=u-Math.sqrt(a*a-(t.x-i)*(t.x-i)),f=u+Math.sqrt(a*a-(t.x-i)*(t.x-i)),p=Math.abs(s-t.y)<Math.abs(f-t.y)?s:f;n={x:t.x,y:p}}return n},Gu=function(t,e){var r=e,n=!1,o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,u=r.y-r.height/2+r.radius,a=r.y+r.height/2-r.radius,c=r.x,l=r.y,s=r.width,f=r.height;return t.y===l+f/2||t.y===l-f/2?n=t.x>o&&t.x<i:t.x!==c+s/2&&t.x!==c-s/2||(n=t.y>u&&t.y<a),n},Yu=function(t,e,r){var n,o=r,i=o.x,u=o.y,a=o.rx,c=o.ry;if(e===Ao.HORIZONTAL){var l=i-Math.sqrt(a*a-(t.y-u)*(t.y-u)*a*a/(c*c)),s=i+Math.sqrt(a*a-(t.y-u)*(t.y-u)*a*a/(c*c));n={x:Math.abs(l-t.x)<Math.abs(s-t.x)?l:s,y:t.y}}else if(e===Ao.VERTICAL){var f=u-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(a*a)),p=u+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(a*a)),y=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:y}}return n},Vu=function(t,e,r){for(var n,o=r.pointsPosition,i=Number.MAX_SAFE_INTEGER,u=[],a=0;a<o.length;a++)u.push({start:o[a],end:o[(a+1)%o.length]});return u.forEach((function(r){var o=r.start,u=r.end,a=o,c=u;o.x>u.x&&(a=u,c=o);var l={x:t.x,y:t.y};if(a.x===c.x&&e===Ao.HORIZONTAL&&(l={x:a.x,y:t.y}),a.y===c.y&&e===Ao.VERTICAL&&(l={x:t.x,y:a.y}),a.x!==c.x&&a.y!==c.y){var s=(c.y-a.y)/(c.x-a.x),f=(a.x*c.y-c.x*a.y)/(a.x-c.x);e===Ao.HORIZONTAL?l={x:(t.y-f)/s,y:t.y}:e===Ao.VERTICAL&&(l={x:t.x,y:s*t.x+f})}if(lu(l,o,u)){var p=zu(l.x,l.y,t.x,t.y);p<i&&(i=p,n=l)}})),n},Wu=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}},Ku=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 u=i.clientHeight;return document.body.removeChild(i),u},$u=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=Mc(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},qu=function(t){return"object"!==su(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},Zu=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},Ju=1e3,Qu=999,ta=function(){return++Ju};function ea(t){return ea="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},ea(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 na(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){ua(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 oa(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 ia(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,aa(n.key),n)}}function ua(t,e,r){return(e=aa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aa(t){var e=function(t,e){if("object"!==ea(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==ea(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===ea(e)?e:String(e)}function ca(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 la=(du=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ua(this,"id",""),oa(this,"type",hu,this),oa(this,"sourceNodeId",vu,this),oa(this,"targetNodeId",bu,this),oa(this,"startPoint",gu,this),oa(this,"endPoint",mu,this),oa(this,"text",Ou,this),oa(this,"properties",wu,this),oa(this,"points",_u,this),oa(this,"pointsList",ju,this),oa(this,"isSelected",Su,this),oa(this,"isHovered",xu,this),oa(this,"isHitable",Eu,this),oa(this,"draggable",Pu,this),oa(this,"visible",ku,this),ua(this,"virtual",!1),oa(this,"isAnimation",Au,this),oa(this,"isShowAdjustPoint",Du,this),ua(this,"graphModel",void 0),oa(this,"zIndex",Tu,this),ua(this,"BaseType",Po.EDGE),ua(this,"modelType",Eo.EDGE),oa(this,"state",Nu,this),ua(this,"additionStateData",void 0),ua(this,"sourceAnchorId",""),ua(this,"targetAnchorId",""),ua(this,"menu",void 0),ua(this,"customTextPosition",!1),oa(this,"style",Mu,this),oa(this,"arrowConfig",Cu,this),this.graphModel=r,this.initEdgeData(e),this.setAttributes()}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),n=this.createId();t.id=n||r||au()}this.arrowConfig.markerEnd="url(#marker-end-".concat(t.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(t.id,")");var o=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=o,Mn(this,Hc(t)),this.graphModel.overlapMode===Do.INCREASE&&(this.zIndex=t.zIndex||ta()),this.setAnchors(),this.initPoints(),this.formatText(t)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return na(na({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return na({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return Ei(t)}},{key:"getEdgeAnimationStyle",value:function(){var t=this.graphModel.theme.edgeAnimation;return Ei(t)}},{key:"getArrowStyle",value:function(){var t=this.getEdgeStyle(),e=this.getEdgeAnimationStyle(),r=this.graphModel.theme.arrow,n=this.isAnimation?e.stroke:t.stroke;return na(na({},t),{},{fill:n,stroke:n},r)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return Ei(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 Ru(t).forEach((function(t){var o=Xc(t,e);(void 0===n||o<n)&&(n=o,r=t)})),r}},{key:"getEndAnchor",value:function(t){var e,r,n=this;return Ru(t).forEach((function(t){var o=Xc(t,n.startPoint);(void 0===r||o<r)&&(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===Do.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,e){this.properties[t]=Zu(e),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=na(na({},Object(o.I)(this.properties)),Zu(t)),this.setAttributes()}},{key:"changeEdgeId",value:function(t){var e=this.arrowConfig,r=e.markerEnd,n=e.markerStart;n&&n==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(t,")")),r&&r==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(t,")")),this.id=t}},{key:"setStyle",value:function(t,e){this.style=na(na({},this.style),{},ua({},t,Zu(e)))}},{key:"setStyles",value:function(t){this.style=na(na({},this.style),Zu(t))}},{key:"updateStyles",value:function(t){this.style=na({},Zu(t))}},{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,u=r.draggable,a=r.editable;this.text={value:i,draggable:u,x:n+t,y:o+e,editable:a}}}},{key:"setText",value:function(t){t&&Mn(this.text,t)}},{key:"updateText",value:function(t){this.text=na(na({},Object(o.I)(this.text)),{},{value:t})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);if(!(t||this.startPoint&&this.sourceAnchorId))throw new Error("无法获取beginAnchor,请检查anchors相关逻辑,anchors不能为空");this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode);if(!(e||this.endPoint&&this.targetAnchorId))throw new Error("无法获取endAnchor,请检查anchors相关逻辑,anchors不能为空");this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Mn(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})}}],r&&ia(e.prototype,r),n&&ia(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),hu=ca(du.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),vu=ca(du.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),bu=ca(du.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),gu=ca(du.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),mu=ca(du.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Ou=ca(du.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),wu=ca(du.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),_u=ca(du.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ju=ca(du.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Su=ca(du.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xu=ca(du.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Eu=ca(du.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Pu=ca(du.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ku=ca(du.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Au=ca(du.prototype,"isAnimation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Du=ca(du.prototype,"isShowAdjustPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tu=ca(du.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Nu=ca(du.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Mu=ca(du.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Cu=ca(du.prototype,"arrowConfig",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),ca(du.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(du.prototype,"sourceNode"),du.prototype),ca(du.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(du.prototype,"targetNode"),du.prototype),ca(du.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(du.prototype,"textPosition"),du.prototype),ca(du.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setProperty"),du.prototype),ca(du.prototype,"deleteProperty",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"deleteProperty"),du.prototype),ca(du.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setProperties"),du.prototype),ca(du.prototype,"changeEdgeId",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"changeEdgeId"),du.prototype),ca(du.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setStyle"),du.prototype),ca(du.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setStyles"),du.prototype),ca(du.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"updateStyles"),du.prototype),ca(du.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"formatText"),du.prototype),ca(du.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"resetTextPosition"),du.prototype),ca(du.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"moveText"),du.prototype),ca(du.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setText"),du.prototype),ca(du.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"updateText"),du.prototype),ca(du.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setAnchors"),du.prototype),ca(du.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setSelected"),du.prototype),ca(du.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setHovered"),du.prototype),ca(du.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setHitable"),du.prototype),ca(du.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"openEdgeAnimation"),du.prototype),ca(du.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"closeEdgeAnimation"),du.prototype),ca(du.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setElementState"),du.prototype),ca(du.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"updateStartPoint"),du.prototype),ca(du.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"moveStartPoint"),du.prototype),ca(du.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"updateEndPoint"),du.prototype),ca(du.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"moveEndPoint"),du.prototype),ca(du.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"setZIndex"),du.prototype),ca(du.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"initPoints"),du.prototype),ca(du.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"updateAttributes"),du.prototype),ca(du.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"getAdjustStart"),du.prototype),ca(du.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"getAdjustEnd"),du.prototype),ca(du.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(du.prototype,"updateAfterAdjustStartAndEnd"),du.prototype),du),sa=la;function fa(t){return fa="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},fa(t)}function pa(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 ya(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pa(Object(r),!0).forEach((function(e){Oa(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function da(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,wa(n.key),n)}}function ha(){return ha="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ma(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ha.apply(this,arguments)}function va(t,e){return va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},va(t,e)}function ba(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=ma(t);if(e){var o=ma(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===fa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ga(t)}(this,r)}}function ga(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ma(t){return ma=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ma(t)}function Oa(t,e,r){return(e=wa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wa(t){var e=function(t,e){if("object"!==fa(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==fa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===fa(e)?e:String(e)}var _a,ja,Sa=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&va(t,e)}(i,t);var e,r,n,o=ba(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Oa(ga(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.LINE_EDGE),t}return e=i,(r=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return ya(ya({},ha(ma(i.prototype),"getEdgeStyle",this).call(this)),Ei(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&da(e.prototype,r),n&&da(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(sa);function xa(t){return xa="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},xa(t)}function Ea(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pa(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 Pa(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 Pa(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 ka(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 Aa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ka(Object(r),!0).forEach((function(e){Ia(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ka(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Da(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,La(n.key),n)}}function Ta(){return Ta="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ta.apply(this,arguments)}function Na(t,e){return Na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Na(t,e)}function Ma(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=Ra(t);if(e){var o=Ra(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ca(t)}(this,r)}}function Ca(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function Ia(t,e,r){return(e=La(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function La(t){var e=function(t,e){if("object"!==xa(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==xa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===xa(e)?e:String(e)}function za(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 Ba=(_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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Na(t,e)}(i,t);var e,r,n,o=Ma(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ia(Ca(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.POLYLINE_EDGE),Ia(Ca(t),"draggingPointList",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})}(Ca(t),"dbClickPosition",ja,Ca(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,Ta(Ra(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return Aa(Aa({},Ta(Ra(i.prototype),"getEdgeStyle",this).call(this)),Ei(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=Dc(this.points),o=Ea(xc(n),2),i=o[0],u=o[1];return{x:(i.x+u.x)/2,y:(i.y+u.y)/2}}},{key:"getAfterAnchor",value:function(t,e,r){var n,o;return r.forEach((function(r){var i;t===Ao.HORIZONTAL?i=Math.abs(e.y-r.y):t===Ao.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)})),n}},{key:"getCrossPoint",value:function(t,e,r){var n;return t===Ao.HORIZONTAL?n={x:r.x,y:e.y}:t===Ao.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],u=n[t-1];if(Ec(u,o,this.sourceNode)){if(Pc(o,i,this.sourceNode)){var a=kc(o,i,this.sourceNode);a&&(n[t]=a,n.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===u.x&&e.x===o.x||e.y===u.y&&e.y===o.y)&&zu(e.x,e.y,o.x,o.y)<zu(u.x,u.y,o.x,o.y)&&(n[t-1]=e)}))}if(e===r.length-2){var c=n[t],l=n[e],s=n[e+1];if(Ec(l,s,this.targetNode)){if(Pc(c,l,this.targetNode)){var f=kc(c,l,this.targetNode);f&&(n[e]=f,n.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===s.x&&t.x===l.x||t.y===s.y&&t.y===l.y)&&zu(t.x,t.y,l.x,l.y)<zu(s.x,s.y,l.x,l.y)&&(n[e+1]=t)}))}return n}},{key:"getDraggingPoints",value:function(t,e,r,n,o){var i=o.map((function(t){return t})),u=this.getAfterAnchor(t,r,n),a=this.getCrossPoint(t,r,u);return"start"===e?(i.unshift(a),i.unshift(u)):(i.push(a),i.push(u)),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],u=this.sourceNode,a=this.targetNode,c=u.modelType,l=a.modelType,s=Ac(r,n),f=e[0];switch(c){case Eo.RECT_NODE:0!==u.radius&&(Gu(r,u)||(f=Hu(r,s,u)));break;case Eo.CIRCLE_NODE:f=Xu(r,s,u);break;case Eo.ELLIPSE_NODE:f=Yu(r,s,u);break;case Eo.DIAMOND_NODE:case Eo.POLYGON_NODE:f=Vu(r,s,u)}e[0]=f;var p=Ac(o,i),y=e[e.length-1];switch(l){case Eo.RECT_NODE:0!==a.radius&&(Gu(i,a)||(y=Hu(i,p,a)));break;case Eo.CIRCLE_NODE:y=Xu(i,p,a);break;case Eo.ELLIPSE_NODE:y=Yu(i,p,a);break;case Eo.DIAMOND_NODE:case Eo.POLYGON_NODE:y=Vu(i,p,a)}return e[e.length-1]=y,e}},{key:"getData",value:function(){var t=Ta(Ra(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=Sc({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,u=t.direction,a=this.pointsList,c=a;return u===Ao.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((function(t){return t}))):u===Ao.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((function(t){return t}))),this.updatePointsAfterDrag(c),this.draggingPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:u}}},{key:"dragAppend",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,u=t.direction,a=this.pointsList;if(u===Ao.HORIZONTAL){a[o]={x:r.x,y:r.y+e.y},a[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 l={x:r.x,y:r.y+e.y};if(!Bu(l,this.sourceNode)){var s=this.sourceNode.anchors;c=this.getDraggingPoints(u,"start",l,s,c)}}if(i===this.pointsList.length-1){var f={x:n.x,y:n.y+e.y};if(!Bu(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDraggingPoints(u,"end",f,p,c)}}this.updatePointsAfterDrag(c),this.draggingPointList=c}else if(u===Ao.VERTICAL){a[o]={x:r.x+e.x,y:r.y},a[i]={x:n.x+e.x,y:n.y};var y=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(y=this.removeCrossPoints(o,i,y)),0===o){var d={x:r.x+e.x,y:r.y};if(!Bu(d,this.sourceNode)){var h=this.sourceNode.anchors;y=this.getDraggingPoints(u,"start",d,h,y)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!Bu(v,this.targetNode)){var b=this.targetNode.anchors;y=this.getDraggingPoints(u,"end",v,b,y)}}this.updatePointsAfterDrag(y),this.draggingPointList=y}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:u}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var t=jc(Dc(this.points));this.pointsList=t.map((function(t){return t})),this.draggingPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var r=t[t.length-1];this.endPoint=Object.assign({},r)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=Sc({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&Da(e.prototype,r),n&&Da(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(sa),ja=za(_a.prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),za(_a.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"initPoints"),_a.prototype),za(_a.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"updatePoints"),_a.prototype),za(_a.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"updateStartPoint"),_a.prototype),za(_a.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"moveStartPoint"),_a.prototype),za(_a.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"updateEndPoint"),_a.prototype),za(_a.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"moveEndPoint"),_a.prototype),za(_a.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"dragAppendStart"),_a.prototype),za(_a.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"dragAppendSimple"),_a.prototype),za(_a.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"dragAppend"),_a.prototype),za(_a.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"dragAppendEnd"),_a.prototype),za(_a.prototype,"updatePointsAfterDrag",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"updatePointsAfterDrag"),_a.prototype),za(_a.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"getAdjustStart"),_a.prototype),za(_a.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"getAdjustEnd"),_a.prototype),za(_a.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(_a.prototype,"updateAfterAdjustStartAndEnd"),_a.prototype),_a),Ua=function(t){var e=t.start,r=t.end,n=t.offset,o=t.verticalLength,i=t.type,u={leftX:0,leftY:0,rightX:0,rightY:0},a=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),l=Math.sqrt(o*o+n*n);return"start"===i?r.x>=e.x?(u.leftX=e.x+l*Math.sin(a+c),u.leftY=e.y-l*Math.cos(a+c),u.rightX=e.x-l*Math.sin(a-c),u.rightY=e.y+l*Math.cos(a-c)):(u.leftX=e.x-l*Math.sin(a+c),u.leftY=e.y+l*Math.cos(a+c),u.rightX=e.x+l*Math.sin(a-c),u.rightY=e.y-l*Math.cos(a-c)):"end"===i&&(r.x>=e.x?(u.leftX=r.x+l*Math.sin(a-c),u.leftY=r.y-l*Math.cos(a-c),u.rightX=r.x-l*Math.sin(a+c),u.rightY=r.y+l*Math.cos(a+c)):(u.leftX=r.x-l*Math.sin(a-c),u.leftY=r.y+l*Math.cos(a-c),u.rightX=r.x+l*Math.sin(a+c),u.rightY=r.y-l*Math.cos(a+c))),u},Fa=100,Ha={x:1,y:0,z:0};function Xa(t,e,r,n,o){for(var i=function(o){if(o<0||o>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-o,3)+3*e.x*o*Math.pow(1-o,2)+3*r.x*Math.pow(o,2)*(1-o)+n.x*Math.pow(o,3),y:t.y*Math.pow(1-o,3)+3*e.y*o*Math.pow(1-o,2)+3*r.y*Math.pow(o,2)*(1-o)+n.y*Math.pow(o,3)}},u=0,a=2,c=n.x,l=n.y,s=n;u<o&&a<50;){var f=s=i(1-a/Fa),p=f.x,y=f.y;u=zu(c,l,p,y),a++}return s}function Ga(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function Ya(t){return n=function(t,e){return t.x*e.y-t.y*e.x}(e=Ha,r=t),o=Math.acos(function(t,e){var r=[t.x,t.y,t.z];return[e.x,e.y,e.z].reduce((function(t,e,n){return t+e*r[n]}))}(Ga(e),Ga(r))),n>=0?o:-o;var e,r,n,o}function Va(t){return t*(180/Math.PI)}function Wa(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 Ka(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Wa(Object(r),!0).forEach((function(e){$a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $a(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==qa(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==qa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===qa(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qa(t){return qa="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},qa(t)}function Za(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(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}var Qa=function(t,e){var r;switch(t.type){case"line":default:r=new Sa(t,e);break;case"polyline":r=new Ba(t,e)}return r},tc=function(t,e){return 2*Math.abs(t.centerX-e.centerX)<t.width+e.width&&2*Math.abs(t.centerY-e.centerY)<t.height+e.height},ec=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},rc=function(t,e){var r=[t,{x:t.x,y:e.y},e];return ec(r)},nc=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}},oc=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?Ao.HORIZONTAL:Ao.VERTICAL},ic=function(t,e,r){return oc(r,e)===Ao.HORIZONTAL?{x:r.x>t.centerX?t.maxX:t.minX,y:r.y}:{x:r.x,y:r.y>t.centerY?t.maxY:t.minY}},uc=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}},ac=function(){var t=arguments.length>1?arguments[1]:void 0,e=[],r=[];(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){e.push(t.x),r.push(t.y)}));var n=Math.min.apply(Math,e),o=Math.max.apply(Math,e),i=Math.min.apply(Math,r),u=Math.max.apply(Math,r),a=o-n,c=u-i;return t&&(a+=t,c+=t),{centerX:(n+o)/2,centerY:(i+u)/2,maxX:o,maxY:u,minX:n,minY:i,x:(n+o)/2,y:(i+u)/2,height:c,width:a}},cc=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}]},lc=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},sc=function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},fc=function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},pc=function(t,e){return sc(t,e.x).concat(fc(t,e.y))},yc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},dc=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},hc=function(t,e,r,n,o){return yc(t,e)+yc(t,r)+dc(t,[e,r,n,o])},vc=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)},bc=function(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)},gc=function(t,e,r,n){var o=e.x-t.x,i=e.y-t.y,u=n.x-r.x,a=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-u*i+o*a),l=(u*(t.y-r.y)-a*(t.x-r.x))/(-u*i+o*a);return c>=0&&c<=1&&l>=0&&l<=1},mc=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=Za(cc(r),4),o=n[0],i=n[1],u=n[2],a=n[3];return gc(t,e,o,i)||gc(t,e,o,a)||gc(t,e,i,u)||gc(t,e,u,a)},Oc=function(t,e,r,n){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||mc(t,e,r)||mc(t,e,n)||o.push(t))})),ec(o)},wc=function(t,e,r,n,o,i,u){var a=[],c=[e],l={},s={},f={};s[e.id]=0,f[e.id]=hc(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var y=function(){var y,d=1/0;if(c.forEach((function(t){f[t.id]<d&&(d=f[t.id],y=t)})),y===r){var h=[];return vc(h,p,l,r.id),{v:h}}bc(c,y),a.push(y),Oc(t,y,n,o).forEach((function(t){if(-1===a.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var n=f[y.id]+yc(y,t);s[t.id]&&n>=s[t.id]||(l[t.id]=y.id,s[t.id]=n,f[t.id]=s[t.id]+hc(t,r,e,i,u))}}))};c.length;){var d=y();if("object"===qa(d))return d.v}return[e,r]},_c=function(t){return Fu(t)},jc=function(t){for(var e=1;e<t.length-1;){var r=t[e-1],n=t[e],o=t[e+1];r.x===n.x&&n.x===o.x||r.y===n.y&&n.y===o.y?t.splice(e,1):e++}return t},Sc=function(t,e,r,n,o){var i=_c(r),u=_c(n),a=nc(i,o),c=nc(u,o),l=ic(a,i,t),s=ic(c,u,e);if(tc(a,c)){var f=Tc(t,e,l,s);return[t,l].concat(f,[s,e])}var p=ac([l,s]),y=uc(a,p),d=uc(c,p),h=[];h=(h=h.concat(cc(y))).concat(cc(d));var v={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[p,y,d].forEach((function(t){h=h.concat(pc(t,v).filter((function(t){return lc(t,a)&&lc(t,c)})))})),[{x:l.x,y:s.y},{x:s.x,y:l.y}].forEach((function(t){lc(t,a)&&lc(t,c)&&h.push(t)})),h.unshift(l),h.push(s),h=ec(h);var b=wc(h,l,s,i,u,t,e);return b.unshift(t),b.push(e),b.length>2&&(b=jc(b)),ec(b)},xc=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=zu(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var u=t[i],a=t[i+1],c=zu(u.x,u.y,a.x,a.y);c>o&&(o=c,r=u,n=a)}e=[r,n]}return e},Ec=function(t,e,r){var n=Bu(t,r),o=Bu(e,r);return n&&o},Pc=function(t,e,r){var n=Bu(t,r),o=Bu(e,r);return!(n&&o)&&(n||o)},kc=function(t,e,r){for(var n,o,i=Fu(r),u=cc(i),a=0;a<u.length;a++){gc(t,e,u[a],u[(a+1)%u.length])&&(o=[u[a],u[(a+1)%u.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,u=-((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&&(u-t.y)*(u-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(u-r.y)*(u-n.y)<=0&&{x:i,y:u}}(t,e,o[0],o[1])),n},Ac=function(t,e){var r;return t.x===e.x?r=Ao.VERTICAL:t.y===e.y&&(r=Ao.HORIZONTAL),r},Dc=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=Za(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},Tc=function(t,e,r,n){var o=[];if(Ac(t,r)===Ac(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},u=lu(i,t,r),a=lu(i,e,n);if(u||a)i={x:n.x,y:r.y};else{var c=Nc(i,t,r),l=Nc(i,e,n);c&&l&&(i={x:n.x,y:r.y})}o.push(i)}return o},Nc=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},Mc=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},Cc=null,Rc=function(t,e){Cc||(Cc=document.createElement("canvas"));var r=Cc.getContext("2d");return r.font=e,r.measureText(t).width},Ic=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=Ua(Ka(Ka({},o),{},{type:"start"})),u=Ua(Ka(Ka({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(u.rightX," ").concat(u.rightY,"\n L").concat(u.leftX," ").concat(u.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},Lc=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,u=Fu(n),a=Fu(o),c=nc(u,i),l=nc(a,i);return{sNext:ic(c,u,e),ePre:ic(l,a,r)}},zc=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Bc(e[0]),Bc(e[1]),Bc(e[2]),Bc(e[3])]},Bc=function(t){var e=Za(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Uc=function(t,e){var r=Za(t,4);return[Xa(r[0],r[1],r[2],r[3],e),t[3]]},Fc=function(t,e){for(var r,n=t.x,o=t.y,i=Dc(e),u=Number.MAX_SAFE_INTEGER,a=[],c=0;c<i.length;c++)a.push({start:i[c],end:i[(c+1)%i.length]});if(a.forEach((function(t){var e=t.start,i=t.end;if(e.x===i.x){var a={x:e.x,y:o};if(lu(a,e,i)){var c=Math.abs(e.x-n);c<u&&(u=c,r=a)}}else if(e.y===i.y){var l={x:n,y:e.y};if(lu(l,e,i)){var s=Math.abs(e.y-o);s<u&&(u=s,r=l)}}})),!r){var l=a[0],s=l.start,f=l.end;r={x:s.x+(f.x-s.x)/2,y:s.y+(f.y-s.y)/2}}return r},Hc=function(t){return uo(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Xc=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function Gc(t,e){return"function"!=typeof e?function(e,r,n){return Object.assign({type:t.edgeType},n)}:function(r,n,o){var i=e(r,n,o);return i?"string"==typeof i?Object.assign({},o,{type:i}):Object.assign({type:i},o):{type:t.edgeType}}}r(240);var Yc=function(){};function Vc(t){return Vc="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},Vc(t)}function Wc(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,$c(n.key),n)}}function Kc(t,e,r){return(e=$c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $c(t){var e=function(t,e){if("object"!==Vc(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Vc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Vc(e)?e:String(e)}var qc=window.document,Zc=0;function Jc(t){var e=t.onDragStart,r=void 0===e?Yc:e,n=t.onDragging,o=void 0===n?Yc:n,i=t.onDragEnd,u=void 0===i?Yc:i,a=t.step,c=void 0===a?1:a,l=t.isStopPropagation,s=void 0===l||l,f=!1,p=!1,y=0,d=0,h=0,v=0;function b(t){if(s&&t.stopPropagation(),p&&(f=!0,h+=t.clientX-y,v+=t.clientY-d,y=t.clientX,d=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(s&&t.stopPropagation(),p=!1,qc.removeEventListener("mousemove",b,!1),qc.removeEventListener("mouseup",g,!1),f)return f=!1,u({event:t})}return function(t){if(t.button===Zc)return s&&t.stopPropagation(),p=!0,y=t.clientX,d=t.clientY,qc.addEventListener("mousemove",b,!1),qc.addEventListener("mouseup",g,!1),r({event:t})}}var Qc=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?Yc:n,i=e.onDragging,u=void 0===i?Yc:i,a=e.onDragEnd,c=void 0===a?Yc:a,l=e.eventType,s=void 0===l?"":l,f=e.eventCenter,p=void 0===f?null:f,y=e.step,d=void 0===y?1:y,h=e.isStopPropagation,v=void 0===h||h,b=e.model,g=void 0===b?null:b,m=e.data,O=void 0===m?null:m;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Kc(this,"onDragStart",void 0),Kc(this,"onDragging",void 0),Kc(this,"onDragEnd",void 0),Kc(this,"step",void 0),Kc(this,"isStopPropagation",void 0),Kc(this,"isDragging",!1),Kc(this,"isStartDragging",!1),Kc(this,"startX",0),Kc(this,"startY",0),Kc(this,"sumDeltaX",0),Kc(this,"sumDeltaY",0),Kc(this,"eventType",void 0),Kc(this,"eventCenter",void 0),Kc(this,"model",void 0),Kc(this,"data",void 0),Kc(this,"startTime",void 0),Kc(this,"handleMouseDown",(function(t){var e,n;if(t.button===Zc){r.isStopPropagation&&t.stopPropagation(),r.isStartDragging=!0,r.startX=t.clientX,r.startY=t.clientY,qc.addEventListener("mousemove",r.handleMouseMove,!1),qc.addEventListener("mouseup",r.handleMouseUp,!1);var o=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(ko["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:r.data||o}),r.startTime=(new Date).getTime()}})),Kc(this,"handleMouseMove",(function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDragging&&(r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,r.step<=1||Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n=r.sumDeltaX%r.step,o=r.sumDeltaY%r.step,i=r.sumDeltaX-n,u=r.sumDeltaY-o;r.sumDeltaX=n,r.sumDeltaY=o;var a,c=null===(e=r.model)||void 0===e?void 0:e.getData();if(!r.isDragging)null===(a=r.eventCenter)||void 0===a||a.emit(ko["".concat(r.eventType,"_DRAGSTART")],{e:t,data:r.data||c}),r.onDragStart({event:t});r.isDragging=!0,Promise.resolve().then((function(){var e,n;r.onDragging({deltaX:i,deltaY:u,event:t}),null===(e=r.eventCenter)||void 0===e||e.emit(ko["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:r.data||c}),null===(n=r.eventCenter)||void 0===n||n.emit(ko["".concat(r.eventType,"_DRAG")],{e:t,data:r.data||c})}))}})),Kc(this,"handleMouseUp",(function(t){r.isStartDragging=!1,r.isStopPropagation&&t.stopPropagation(),Promise.resolve().then((function(){var e,n,o;qc.removeEventListener("mousemove",r.handleMouseMove,!1),qc.removeEventListener("mouseup",r.handleMouseUp,!1);var i=null===(e=r.model)||void 0===e?void 0:e.getData();null===(n=r.eventCenter)||void 0===n||n.emit(ko["".concat(r.eventType,"_MOUSEUP")],{e:t,data:r.data||i}),r.isDragging&&(r.isDragging=!1,r.onDragEnd({event:t}),null===(o=r.eventCenter)||void 0===o||o.emit(ko["".concat(r.eventType,"_DROP")],{e:t,data:r.data||i}))}))})),Kc(this,"cancelDrag",(function(){qc.removeEventListener("mousemove",r.handleMouseMove,!1),qc.removeEventListener("mouseup",r.handleMouseUp,!1),r.onDragEnd({event:null}),r.isDragging=!1})),this.onDragStart=o,this.onDragging=u,this.onDragEnd=c,this.step=d,this.isStopPropagation=v,this.eventType=s,this.eventCenter=p,this.model=g,this.data=O}var e,r,n;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}},{key:"setModel",value:function(t){this.model=t}}])&&Wc(e.prototype,r),n&&Wc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();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},tl(t)}function el(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rl(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,yl(n.key),n)}}function nl(t,e,r){return e&&rl(t.prototype,e),r&&rl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ol(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sl(t,e)}function il(t){var e=ll();return function(){var r,n=fl(t);if(e){var o=fl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(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 ul(t)}(this,r)}}function ul(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function al(t){var e="function"==typeof Map?new Map:void 0;return al=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return cl(t,arguments,fl(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),sl(n,t)},al(t)}function cl(t,e,r){return cl=ll()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&sl(o,r.prototype),o},cl.apply(null,arguments)}function ll(){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}}function sl(t,e){return sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sl(t,e)}function fl(t){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fl(t)}function pl(t,e,r){return(e=yl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yl(t){var e=function(t,e){if("object"!==tl(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==tl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===tl(e)?e:String(e)}function dl(t,e){return!!(t instanceof vl&&e instanceof vl)}var hl=function(t){ol(r,t);var e=il(r);function r(t,n,o){var i;return el(this,r),pl(ul(i=e.call(this,3)),"x",void 0),pl(ul(i),"y",void 0),pl(ul(i),"z",void 0),i[0]=t,i[1]=n,i[2]=o,i.x=t,i.y=n,i.z=o,Object.setPrototypeOf(ul(i),r.prototype),i}return nl(r,[{key:"add",value:function(t){if(dl(this,t))return new vl(this.x+t.x,this.y+t.y);var e=this.z+t.z;return new bl((this.x+t.x)/e,(this.y+t.y)/e)}},{key:"subtract",value:function(t){if(dl(this,t))return new vl(this.x-t.x,this.y-t.y);var e=this.z-t.z;return 0===e?new vl(this.x-t.x,this.y-t.y):new bl((this.x-t.x)/e,(this.y-t.y)/e)}}]),r}(al(Array)),vl=function(t){ol(r,t);var e=il(r);function r(t,n,o){var i;return el(this,r),i=e.call(this,t,n,null!=o?o:0),Object.setPrototypeOf(ul(i),r.prototype),i}return nl(r,[{key:"toString",value:function(){return"Vector"}},{key:"dot",value:function(t){var e=this;return t.reduce((function(t,r,n){return t+r*e[n]}))}},{key:"cross",value:function(t){return new r(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}},{key:"getLength",value:function(){return Math.hypot(this.x,this.y)}},{key:"normalize",value:function(){var t=this.getLength();return new r(this.x/t,this.y/t)}},{key:"crossZ",value:function(t){return this.x*t.y-this.y*t.x}},{key:"angle",value:function(t){var e=this.crossZ(t),r=Math.acos(this.normalize().dot(t.normalize()));return e>=0?r:-r}}]),r}(hl),bl=function(t){ol(r,t);var e=il(r);function r(t,n){var o;return el(this,r),o=e.call(this,t,n,1),Object.setPrototypeOf(ul(o),r.prototype),o}return nl(r,[{key:"toString",value:function(){return"Point"}}]),r}(hl);r(76),r(143);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},gl(t)}function ml(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||wl(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 Ol(t){return function(t){if(Array.isArray(t))return _l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wl(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 wl(t,e){if(t){if("string"==typeof t)return _l(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)?_l(t,e):void 0}}function _l(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 jl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sl(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,Rl(n.key),n)}}function xl(t,e,r){return e&&Sl(t.prototype,e),r&&Sl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function El(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nl(t,e)}function Pl(t){var e=Tl();return function(){var r,n=Ml(t);if(e){var o=Ml(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(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 kl(t)}(this,r)}}function kl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Al(t){var e="function"==typeof Map?new Map:void 0;return Al=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Dl(t,arguments,Ml(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Nl(n,t)},Al(t)}function Dl(t,e,r){return Dl=Tl()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&Nl(o,r.prototype),o},Dl.apply(null,arguments)}function Tl(){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}}function Nl(t,e){return Nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nl(t,e)}function Ml(t){return Ml=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ml(t)}function Cl(t,e,r){return(e=Rl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rl(t){var e=function(t,e){if("object"!==gl(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==gl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===gl(e)?e:String(e)}var Il,Ll,zl,Bl,Ul,Fl,Hl,Xl,Gl,Yl,Vl,Wl,Kl,$l=function(t){El(r,t);var e=Pl(r);function r(){var t;jl(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Cl(kl(t=e.call(this,o.length)),"rows",void 0),Cl(kl(t),"columns",void 0),t.fill(new Array(3)),o.forEach((function(e,r){t[r]=e})),t.columns=o[0].length,t.rows=o.length,Object.setPrototypeOf(kl(t),r.prototype),t}return xl(r,[{key:"getRow",value:function(t){return this[t]}},{key:"getColumn",value:function(t){return Ol(this.map((function(e){return e[t]})))}},{key:"transpose",value:function(){for(var t=[],e=0;e<this.columns;e++)t.push(this.getColumn(e));return Dl(r,t)}},{key:"cross",value:function(t){var e=new Array(this.rows).fill("").map((function(){return[]}));if(this.columns===t.rows)for(var n=0;n<this.rows;n++)for(var o=this.getRow(n),i=function(){var r=t.getColumn(u);e[n][u]=o.reduce((function(t,e,n){return t+e*r[n]}),0)},u=0;u<t.columns;u++)i();return Dl(r,Ol(e))}},{key:"to2D",value:function(){return this.map((function(t){return[t[0],t[1]]}))}},{key:"toPoints",value:function(){return this.map((function(t){return new bl(t[0],t[1])}))}},{key:"toString",value:function(){var t=ml(this[0],2),e=t[0],r=t[1],n=ml(this[1],2),o=n[0],i=n[1],u=ml(this[2],2),a=u[0],c=u[1];return"matrix(".concat(e," ").concat(r," ").concat(o," ").concat(i," ").concat(a," ").concat(c,")")}},{key:"translate",value:function(t,e){return this.cross(new Jl(t,e))}},{key:"rotate",value:function(t){return this.cross(new ql(t))}},{key:"scale",value:function(t,e){return this.cross(new Zl(t,e))}}]),r}(Al(Array)),ql=function(t){El(r,t);var e=Pl(r);function r(t){var n;return jl(this,r),n=e.call(this,new vl(+Math.cos(t).toFixed(2),+Math.sin(t).toFixed(2),0),new vl(-Math.sin(t).toFixed(2),+Math.cos(t).toFixed(2),0),new vl(0,0,1)),Object.setPrototypeOf(kl(n),r.prototype),n}return xl(r,[{key:"inverse",value:function(){return this.transpose()}}]),r}($l),Zl=function(t){El(r,t);var e=Pl(r);function r(t,n){var o;return jl(this,r),Cl(kl(o=e.call(this,new vl(t,0,0),new vl(0,n,0),new vl(0,0,1))),"sx",void 0),Cl(kl(o),"sy",void 0),o.sx=t,o.sy=n,Object.setPrototypeOf(kl(o),r.prototype),o}return xl(r,[{key:"inverse",value:function(){return new r(1/this.sx,1/this.sy)}}]),r}($l),Jl=function(t){El(r,t);var e=Pl(r);function r(t,n){var o;return jl(this,r),Cl(kl(o=e.call(this,new vl(1,0,0),new vl(0,1,0),new vl(t,n,1))),"tx",void 0),Cl(kl(o),"ty",void 0),o.tx=t,o.ty=n,Object.setPrototypeOf(kl(o),r.prototype),o}return xl(r,[{key:"inverse",value:function(){return new r(-this.tx,-this.ty)}}]),r}($l),Ql={node:!1,edge:!1},ts={node:!0,edge:!0};function es(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 rs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?es(Object(r),!0).forEach((function(e){ss(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):es(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ns(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||is(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 os(t){return function(t){if(Array.isArray(t))return us(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||is(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 is(t,e){if(t){if("string"==typeof t)return us(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)?us(t,e):void 0}}function us(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 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},as(t)}function cs(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 ls(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,fs(n.key),n)}}function ss(t,e,r){return(e=fs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fs(t){var e=function(t,e){if("object"!==as(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==as(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===as(e)?e:String(e)}function ps(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 ys,ds=200,hs=(Il=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ss(this,"rootEl",void 0),cs(this,"width",Ll,this),cs(this,"height",zl,this),ss(this,"theme",void 0),ss(this,"eventCenter",void 0),ss(this,"modelMap",new Map),ss(this,"topElement",void 0),ss(this,"animation",void 0),ss(this,"idGenerator",void 0),ss(this,"edgeGenerator",void 0),ss(this,"nodeMoveRules",[]),ss(this,"customTrajectory",void 0),cs(this,"edgeType",Bl,this),cs(this,"nodes",Ul,this),cs(this,"edges",Fl,this),cs(this,"overlapMode",Hl,this),cs(this,"background",Xl,this),cs(this,"transformModel",Gl,this),cs(this,"editConfigModel",Yl,this),cs(this,"gridSize",Vl,this),cs(this,"partial",Wl,this),cs(this,"fakerNode",Kl,this);var r,n=e.container,o=e.background,i=void 0===o?{}:o,u=e.grid,a=e.idGenerator,c=e.edgeGenerator,l=e.animation,s=e.customTrajectory;this.background=i,"object"===as(u)&&(this.gridSize=u.size),this.rootEl=n,this.editConfigModel=new So(e),this.eventCenter=new Yi,this.transformModel=new Uo(this.eventCenter,e),this.theme=Fi(e.style),this.edgeType=e.edgeType||"polyline",this.width=e.width,this.height=e.height,this.animation=(r=l)&&"boolean"!=typeof r?Bi(Ei(Ql),r):Ei(!0===r?ts:Ql),this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=a,this.customTrajectory=s,this.edgeGenerator=Gc(this,c),this.width=e.width||this.rootEl.getBoundingClientRect().width,this.height=e.height||this.rootEl.getBoundingClientRect().height,this.flowId=au()}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:"modelsMap",get:function(){return[].concat(os(this.nodes),os(this.edges)).reduce((function(t,e){return t[e.id]=e,t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)})),t=t.sort((function(t,e){return t.zIndex-e.zIndex}));for(var e=[],r=[-200,-200],n=[this.width+ds,this.height+ds],o=0;o<t.length;o++){var i=t[o];i.visible&&(!this.partial||i.isSelected||this.isElementInArea(i,r,n,!1,!1))&&e.push(i)}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===xo.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===xo.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:"selectNodes",get:function(){var t=[];return this.nodes.forEach((function(e){e.isSelected&&t.push(e)})),t}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=[],u=[];this.nodes.forEach((function(t){return u.push(t)})),this.edges.forEach((function(t){return u.push(t)}));for(var a=0;a<u.length;a++){var c=u[a];o&&!c.visible||!this.isElementInArea(c,t,e,r,n)||i.push(c)}return i}},{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=ns(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],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(t.BaseType===Po.NODE){for(var i=Fu(t),u=i.minX,a=i.minY,c=i.maxX,l=i.maxY,s=[{x:u,y:a},{x:c,y:a},{x:c,y:l},{x:u,y:l}],f=o,p=0;p<s.length;p++){var y=s[p],d=y.x,h=y.y,v=ns(this.transformModel.CanvasPointToHtmlPoint([d,h]),2);if(d=v[0],h=v[1],Zi([d,h],e,r)!==o){f=!o;break}}return f}if(t.BaseType===Po.EDGE){var b=t,g=b.startPoint,m=b.endPoint,O=this.transformModel.CanvasPointToHtmlPoint([g.x,g.y]),w=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),_=Zi(O,e,r),j=Zi(w,e,r);return n?_&&j:_||j}return!1}},{key:"graphDataToModel",value:function(t){var e=this;if(this.width&&this.height||this.resize(),!t)return this.nodes=[],void(this.edges=[]);t.nodes?this.nodes=hn(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=Vi(n,e.gridSize),t.y=Vi(o,e.gridSize),"object"===as(t.text)&&(t.text.x-=Wi(n,e.gridSize),t.text.y-=Wi(o,e.gridSize))),new r(t,e)})):this.nodes=[],t.edges?this.edges=hn(t.edges,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的边。"));return new r(t,e)})):this.edges=[]}},{key:"modelToGraphData",value:function(){var t=[];this.edges.forEach((function(e){var r=e.getData();r&&!e.virtual&&t.push(r)}));var e=[];return this.nodes.forEach((function(t){var r=t.getData();r&&!t.virtual&&e.push(r)})),{nodes:e,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.getHistoryData())}if(t)return!1;for(var o=!1,i=[],u=0;u<this.edges.length;u++){var a=this.edges[u];if(a.isDragging){o=!0;break}i.push(a.getHistoryData())}return!o&&{nodes:e,edges:i}}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.modelsMap[t]}},{key:"getNodeEdges",value:function(t){for(var e=[],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===Po.NODE&&r.nodes.push(n.getData()),n.BaseType===Po.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=au()),this.nodesMap[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,this.nodesMap[e]=this.nodesMap[t],e):""}},{key:"changeEdgeId",value:function(t,e){return e||(e=au()),this.edgesMap[e]?"":this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&r.changeEdgeId(e)})),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===Do.DEFAULT&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===Do.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=ta()),"bottom"===e&&(o=--Qu),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(ko.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko.NODE_ADD,r=arguments.length>2?arguments[2]:void 0,n=Zu(t);n.id&&this.nodesMap[t.id]&&delete n.id;var o=this.getModel(n.type);if(!o)throw new Error("找不到".concat(n.type,"对应的节点,请确认是否已注册此类型节点。"));n.x=Vi(n.x,this.gridSize),n.y=Vi(n.y,this.gridSize);var i=new o(n,this);this.nodes.push(i);var u={data:i.getData()};return r&&(u.e=r),this.eventCenter.emit(e,u),i}},{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=ns(o.model.getMoveDistance(e,r,n),2);e=i[0],r=i[1],this.moveEdge(t,e,r)}}},{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,u=e-i.x,a=r-i.y;this.moveNode(t,u,a,n)}}},{key:"editText",value:function(t){this.setElementStateById(t,xo.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=Zu(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(rs(rs({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(ko.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,r){for(var n=0;n<this.edges.length;n++){var o=this.edges[n],i=o.textPosition,u=i.x,a=i.y,c=this.edges[n].sourceNodeId===t,l=this.edges[n].targetNodeId===t;c&&o.moveStartPoint(e,r),l&&o.moveEndPoint(e,r),(c||l)&&this.handleEdgeTextMove(o,u,a)}}},{key:"handleEdgeTextMove",value:function(t,e,r){var n;if(!0===t.customTextPosition)t.resetTextPosition();else if(t.modelType===Eo.POLYLINE_EDGE&&null!==(n=t.text)&&void 0!==n&&n.value){var o=t.text,i=Fc(o,t.points);t.moveText(i.x-o.x,i.y-o.y)}else{var u=t.textPosition,a=u.x,c=u.y;t.moveText(a-e,c-r)}}},{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(ko.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeById",value:function(t){if(this.edgesMap[t]){var e=this.edgesMap[t].index,r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(ko.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(ko.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(ko.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(xo.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(xo.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;arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.clearSelectElements();var r=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e;arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.clearSelectElements();var r=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==r||r.setSelected(!0)}},{key:"selectElementById",value:function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||this.clearSelectElements();var e=this.getElement(t);null==e||e.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===Do.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveNodes",value:function(t,e,r){for(var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=t.reduce((function(t,i){var u=n.nodesMap[i].model.getMoveDistance(e,r,o);return t[i]=u,t}),{}),u=0;u<this.edges.length;u++){var a=this.edges[u],c=a.textPosition,l=c.x,s=c.y,f=i[a.sourceNodeId],p=void 0,y=void 0;if(f){var d=ns(f,2);p=d[0],y=d[1],a.moveStartPoint(p,y)}var h=i[a.targetNodeId];if(h){var v=ns(h,2);p=v[0],y=v[1],a.moveEndPoint(p,y)}(f||h)&&this.handleEdgeTextMove(a,l,s)}}},{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=Wu(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=Wu(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModelById(t);if(r&&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)}}},{key:"getNodeIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.targetNodeId===t&&e.push(r)})),e}},{key:"getNodeOutgoingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.sourceNodeId===t&&e.push(r)})),e}},{key:"getNodeIncomingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.targetNodeId===t&&r.push(e.nodesMap[n.sourceNodeId].model)})),r}},{key:"getNodeOutgoingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.sourceNodeId===t&&r.push(e.nodesMap[n.targetNodeId].model)})),r}},{key:"setTheme",value:function(t){this.theme=Fi(rs(rs({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=t||this.rootEl.getBoundingClientRect().width,this.height=e||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"changeBackground",value:function(t){this.background=t}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,e=[],r=[];t.forEach((function(t){var n=t.x,o=t.y,i=t.width,u=t.height,a=t.getNodeStyle().strokeWidth,c=void 0===a?0:a,l=n+i/2+c,s=n-i/2-c,f=o+u/2+c,p=o-u/2-c;e=e.concat([l,s].filter((function(t){return!Number.isNaN(t)}))),r=r.concat([f,p].filter((function(t){return!Number.isNaN(t)})))}));var n=Math.min.apply(Math,os(e)),o=Math.max.apply(Math,os(e)),i=Math.min.apply(Math,os(r)),u=o-n||0,a=Math.max.apply(Math,os(r))-i||0;return{virtualRectWidth:u,virtualRectHeight:a,virtualRectCenterPositionX:n+u/2,virtualRectCenterPositionY:i+a/2}}},{key:"translateCenter",value:function(){var t=this.nodes,e=this.width,r=this.height,n=this.rootEl,o=this.transformModel;if(t.length){var i=e||n.clientWidth,u=r||n.clientHeight,a=this.getVirtualRectSize(),c=a.virtualRectCenterPositionX,l=a.virtualRectCenterPositionY;o.focusOn(c,l,i,u)}}},{key:"fitView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=this.nodes,n=this.width,o=this.height,i=this.rootEl,u=this.transformModel;if(r.length){var a,c=n||i.clientWidth,l=o||i.clientHeight,s=this.getVirtualRectSize(),f=s.virtualRectWidth,p=s.virtualRectHeight,y=s.virtualRectCenterPositionX,d=s.virtualRectCenterPositionY,h=(f+e)/c,v=(p+t)/l;a=1/Math.max(h,v);var b=[c/2,l/2];u.zoom(a,b),u.focusOn(y,d,c,l)}}},{key:"openEdgeAnimation",value:function(t){this.getEdgeModelById(t).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(t){this.getEdgeModelById(t).closeEdgeAnimation()}}],r&&ls(e.prototype,r),n&&ls(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ll=ps(Il.prototype,"width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zl=ps(Il.prototype,"height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Bl=ps(Il.prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ul=ps(Il.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Fl=ps(Il.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Hl=ps(Il.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Do.DEFAULT}}),Xl=ps(Il.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Gl=ps(Il.prototype,"transformModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yl=ps(Il.prototype,"editConfigModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Vl=ps(Il.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Wl=ps(Il.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kl=ps(Il.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ps(Il.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(Il.prototype,"nodesMap"),Il.prototype),ps(Il.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(Il.prototype,"edgesMap"),Il.prototype),ps(Il.prototype,"modelsMap",[o.m],Object.getOwnPropertyDescriptor(Il.prototype,"modelsMap"),Il.prototype),ps(Il.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(Il.prototype,"sortElements"),Il.prototype),ps(Il.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(Il.prototype,"textEditElement"),Il.prototype),ps(Il.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(Il.prototype,"selectElements"),Il.prototype),ps(Il.prototype,"selectNodes",[o.m],Object.getOwnPropertyDescriptor(Il.prototype,"selectNodes"),Il.prototype),ps(Il.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"setFakerNode"),Il.prototype),ps(Il.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"removeFakerNode"),Il.prototype),ps(Il.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"setModel"),Il.prototype),ps(Il.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"toFront"),Il.prototype),ps(Il.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"setElementZIndex"),Il.prototype),ps(Il.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"deleteNode"),Il.prototype),ps(Il.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"addNode"),Il.prototype),ps(Il.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"cloneNode"),Il.prototype),ps(Il.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"moveNode"),Il.prototype),ps(Il.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"moveNode2Coordinate"),Il.prototype),ps(Il.prototype,"editText",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"editText"),Il.prototype),ps(Il.prototype,"addEdge",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"addEdge"),Il.prototype),ps(Il.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"moveEdge"),Il.prototype),ps(Il.prototype,"deleteEdgeBySourceAndTarget",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"deleteEdgeBySourceAndTarget"),Il.prototype),ps(Il.prototype,"deleteEdgeById",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"deleteEdgeById"),Il.prototype),ps(Il.prototype,"deleteEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"deleteEdgeBySource"),Il.prototype),ps(Il.prototype,"deleteEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"deleteEdgeByTarget"),Il.prototype),ps(Il.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"setElementStateById"),Il.prototype),ps(Il.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"updateText"),Il.prototype),ps(Il.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"selectNodeById"),Il.prototype),ps(Il.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"selectEdgeById"),Il.prototype),ps(Il.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"selectElementById"),Il.prototype),ps(Il.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"clearSelectElements"),Il.prototype),ps(Il.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"moveNodes"),Il.prototype),ps(Il.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"setDefaultEdgeType"),Il.prototype),ps(Il.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"changeNodeType"),Il.prototype),ps(Il.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"changeEdgeType"),Il.prototype),ps(Il.prototype,"getNodeIncomingEdge",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"getNodeIncomingEdge"),Il.prototype),ps(Il.prototype,"getNodeOutgoingEdge",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"getNodeOutgoingEdge"),Il.prototype),ps(Il.prototype,"getNodeIncomingNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"getNodeIncomingNode"),Il.prototype),ps(Il.prototype,"getNodeOutgoingNode",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"getNodeOutgoingNode"),Il.prototype),ps(Il.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"setTheme"),Il.prototype),ps(Il.prototype,"resize",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"resize"),Il.prototype),ps(Il.prototype,"changeBackground",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"changeBackground"),Il.prototype),ps(Il.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"clearData"),Il.prototype),ps(Il.prototype,"translateCenter",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"translateCenter"),Il.prototype),ps(Il.prototype,"fitView",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"fitView"),Il.prototype),ps(Il.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"openEdgeAnimation"),Il.prototype),ps(Il.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Il.prototype,"closeEdgeAnimation"),Il.prototype),Il),vs=hs;function bs(t){return bs="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},bs(t)}function gs(){return gs=Object.assign?Object.assign.bind():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},gs.apply(this,arguments)}function ms(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,xs(n.key),n)}}function Os(t,e){return Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Os(t,e)}function ws(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=js(t);if(e){var o=js(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===bs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _s(t)}(this,r)}}function _s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function js(t){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},js(t)}function Ss(t,e,r){return(e=xs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xs(t){var e=function(t,e){if("object"!==bs(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==bs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===bs(e)?e:String(e)}var Es,Ps=i_(ys=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Os(t,e)}(i,t);var e,r,n,o=ws(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),Ss(_s(e=o.call(this)),"stepDrag",void 0),Ss(_s(e),"stepScrollX",0),Ss(_s(e),"stepScrollY",0),Ss(_s(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDragging:!0});var o=e.props.graphModel,i=o.transformModel;!0!==o.editConfigModel.stopMoveGraph&&i.translate(r,n)})),Ss(_s(e),"onDragEnd",(function(){e.setState({isDragging:!1})})),Ss(_s(e),"zoomHandler",(function(t){var r=e.props,n=r.graphModel,o=n.editConfigModel,i=n.transformModel,u=n.gridSize,a=r.graphModel,c=t.deltaX,l=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){t.preventDefault();var s=a.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=s.x,p=s.y;i.zoom(t.deltaY<0,[f,p])}}else{if(t.preventDefault(),e.stepScrollX+=c,e.stepScrollY+=l,Math.abs(e.stepScrollX)>=u){var y=e.stepScrollX%u,d=e.stepScrollX-y;i.translate(-d*i.SCALE_X,0),e.stepScrollX=y}if(Math.abs(e.stepScrollY)>=u){var h=e.stepScrollY%u,v=e.stepScrollY-h;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=h}}})),Ss(_s(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props.graphModel;r.selectElements.size>0&&r.clearSelectElements(),r.eventCenter.emit(ko.BLANK_CLICK,{e:t})}})),Ss(_s(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(ko.BLANK_CONTEXTMENU,{e:t,position:n})}})),Ss(_s(e),"mouseDownHandler",(function(t){var r=e.props.graphModel,n=r.eventCenter,o=r.editConfigModel,i=r.transformModel.SCALE_X,u=r.gridSize,a=t.target,c=!o.adjustEdge&&!o.adjustNodePosition;("canvas-overlay"===a.getAttribute("name")||c)&&(!0!==o.stopMoveGraph?(e.stepDrag.setStep(u*i),e.stepDrag.handleMouseDown(t)):n.emit(ko.BLANK_MOUSEDOWN,{e:t}),e.clickHandler(t))}));var r=t.graphModel,n=r.gridSize,u=r.eventCenter;return e.stepDrag=new Qc({onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:n,eventType:"BLANK",isStopPropagation:!1,eventCenter:u,model:null}),e.state={isDragging:!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.isDragging;return Object(et.g)("svg",gs({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(et.g)("g",{transform:t},r))}}])&&ms(e.prototype,r),n&&ms(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a))||ys;function ks(t){return ks="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},ks(t)}function As(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==ks(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==ks(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===ks(i)?i:String(i)),n)}var o,i}function Ds(t,e){return Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ds(t,e)}function Ts(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ns(t);if(e){var o=Ns(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===ks(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)}(this,r)}}function Ns(t){return Ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ns(t)}var Ms=i_(Es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ds(t,e)}(i,t);var e,r,n,o=Ts(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=e.getTools().map((function(t){return Object(et.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"triggerToolRender",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=document.querySelector("#ToolOverlay_".concat(r.flowId));if(n){var o=e.getInstance();o.components.forEach((function(t){return t(o,n)})),o.components=[]}}},{key:"render",value:function(){var t=this.props.graphModel;return Object(et.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(t.flowId)},this.getTools())}}])&&As(e.prototype,r),n&&As(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a))||Es;function Cs(t){return Cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(t)}function Rs(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==Cs(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Cs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===Cs(i)?i:String(i)),n)}var o,i}function Is(t,e){return Is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Is(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=zs(t);if(e){var o=zs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Cs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function zs(t){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zs(t)}var Bs,Us=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Is(t,e)}(i,t);var e,r,n,o=Ls(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.background;return Object(et.g)("div",{className:"lf-background"},Object(et.g)("div",{style:t,className:"lf-background-area"}))}}])&&Rs(e.prototype,r),n&&Rs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a);function Fs(t){return Fs="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},Fs(t)}function Hs(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,Ws(n.key),n)}}function Xs(t,e){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xs(t,e)}function Gs(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=Vs(t);if(e){var o=Vs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Fs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ys(t)}(this,r)}}function Ys(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vs(t){return Vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vs(t)}function Ws(t){var e=function(t,e){if("object"!==Fs(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Fs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Fs(e)?e:String(e)}var Ks=i_(Bs=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)}(i,t);var e,r,n,o=Gs(i);function i(){var t,e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];return t=o.call.apply(o,[this].concat(a)),e=Ys(t),r="id",n=au(),(r=Ws(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,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,u=t.visible,a=Math.min(Math.max(2,o),i/2),c=1;return u||(c=0),Object(et.g)("rect",{width:a,height:a,rx:a/2,ry:a/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,u=t.visible,a=Math.min(Math.max(1,o),i/2),c="M ".concat(i," 0 H0 M0 0 V0 ").concat(i),l=1;return u||(l=0),Object(et.g)("path",{d:c,stroke:r,strokeWidth:a,opacity:l})}},{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(et.g)("div",{className:"lf-grid"},Object(et.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(et.g)("defs",null,Object(et.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(et.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Hs(e.prototype,r),n&&Hs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a))||Bs;Ks.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(61);function $s(t){return $s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Zs(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 Zs(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 Zs(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 Js,Qs=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=qs(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==$s(o)&&(e[n]=o)})),Object(et.g)("line",e)};function tf(t){return tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(t)}function ef(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 rf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ef(Object(r),!0).forEach((function(e){nf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ef(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function nf(t,e,r){return(e=uf(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function of(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,uf(n.key),n)}}function uf(t){var e=function(t,e){if("object"!==tf(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==tf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===tf(e)?e:String(e)}function af(t,e){return af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},af(t,e)}function cf(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=lf(t);if(e){var o=lf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===tf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function lf(t){return lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lf(t)}var sf,ff=i_(Js=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&af(t,e)}(i,t);var e,r,n,o=cf(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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,u=void 0===i?0:i,a=e.y,c=void 0===a?0:a,l=rf(rf({x1:-1e5,y1:c,x2:1e5,y2:c},o),{},{stroke:r?o.stroke:"none"}),s=rf(rf({x1:u,y1:-1e5,x2:u,y2:1e5},o),{},{stroke:n?o.stroke:"none"});return Object(et.g)("g",{className:"lf-snapline"},Object(et.g)(Qs,l),Object(et.g)(Qs,s))}}])&&of(e.prototype,r),n&&of(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a))||Js;function pf(t){return pf="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},pf(t)}function yf(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return df(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 df(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 df(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 hf(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.className,u=t.radius,a=e-n/2,c=r-o/2,l={};return Object.entries(t).forEach((function(t){var e=yf(t,2),r=e[0],n=e[1];"object"!==pf(n)&&(l[r]=n)})),l.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",u&&(l.rx=u,l.ry=u),l.x=a,l.y=c,Object(et.g)("rect",l)}function vf(t){return vf="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},vf(t)}function bf(){return bf=Object.assign?Object.assign.bind():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},bf.apply(this,arguments)}function gf(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 mf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gf(Object(r),!0).forEach((function(e){Of(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Of(t,e,r){return(e=_f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function wf(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,_f(n.key),n)}}function _f(t){var e=function(t,e){if("object"!==vf(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==vf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vf(e)?e:String(e)}function jf(t,e){return jf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jf(t,e)}function Sf(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=xf(t);if(e){var o=xf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===vf(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)}(this,r)}}function xf(t){return xf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xf(t)}hf.defaultProps={className:"",radius:""};var Ef,Pf=i_(sf=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jf(t,e)}(i,t);var e,r,n,o=Sf(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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,u=t.x,a=t.y,c=t.width,l=t.height;if(o&&r||n&&e){var s=t.getOutlineStyle(),f={};if(Object.keys(s).forEach((function(t){"hover"!==t&&(f[t]=s[t])})),e){var p=mf(mf({},s.hover),{},{width:s.width,height:s.height,x:s.x,y:s.y});f=mf(mf({},f),p)}if(!f.x&&!f.y)return;i.push(Object(et.g)(hf,bf({className:"lf-outline-node",x:u,y:a,width:c+10,height:l+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=[],u=0;u<e.length;u++){var a=e[u];(n&&a.isSelected||o&&a.isHovered)&&(a.modelType===Eo.LINE_EDGE?i.push(this.getLineOutline(a)):a.modelType===Eo.POLYLINE_EDGE?i.push(this.getPolylineOutline(a)):a.modelType===Eo.BEZIER_EDGE&&i.push(this.getBezierOutline(a)))}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,u=Math.abs(e.y-r.y)+10,a=t.getOutlineStyle();return Object(et.g)(hf,bf({className:"lf-outline-edge",x:n,y:o,width:i,height:u},a))}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=Dc(e),n=ac(r,8),o=n.x,i=n.y,u=n.width,a=n.height,c=t.getOutlineStyle();return Object(et.g)(hf,bf({className:"lf-outline",x:o,y:i,width:u,height:a},c))}},{key:"getPurePolylineEdge",value:function(t){var e=t.points,r=Dc(e),n=ac(r,8),o=n.x,i=n.y,u=n.width,a=n.height,c=t.getOutlineStyle();return Object(et.g)(hf,bf({className:"lf-outline",x:o,y:i,width:u,height:a},c))}},{key:"getBezierOutline",value:function(t){var e=t.path,r=zc(e),n=ac(r,8),o=n.x,i=n.y,u=n.width,a=n.height,c=t.getOutlineStyle();return Object(et.g)(hf,bf({className:"lf-outline",x:o,y:i,width:u,height:a},c))}},{key:"render",value:function(){return Object(et.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&wf(e.prototype,r),n&&wf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a))||sf;function kf(t){return kf="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},kf(t)}function Af(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Df(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 Df(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 Df(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 Tf(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,u=void 0===i?4:i,a=t.className,c={cx:r,cy:o,r:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=Af(t,2),r=e[0],n=e[1];"object"!==kf(n)&&(c[r]=n)})),c.className=a?"lf-basic-shape ".concat(a):"lf-basic-shape",Object(et.g)("circle",c)}function Nf(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Mf(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 Mf(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Cf(t){return Cf="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},Cf(t)}function Rf(){return Rf=Object.assign?Object.assign.bind():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},Rf.apply(this,arguments)}function If(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lf(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,Yf(n.key),n)}}function zf(t,e,r){return e&&Lf(t.prototype,e),r&&Lf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bf(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uf(t,e)}function Uf(t,e){return Uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Uf(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=Xf(t);if(e){var o=Xf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Cf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Hf(t)}(this,r)}}function Hf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xf(t){return Xf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xf(t)}function Gf(t,e,r){return(e=Yf(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yf(t){var e=function(t,e){if("object"!==Cf(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Cf(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Cf(e)?e:String(e)}var Vf,Wf=function(t){Bf(r,t);var e=Ff(r);function r(){var t;return If(this,r),Gf(Hf(t=e.call(this)),"dragHandler",void 0),Gf(Hf(t),"onDragging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.bezierModel,u=n.type,a=o.getPointByClient({x:r.clientX,y:r.clientY}).canvasOverlayPosition,c=a.x,l=a.y;i.updateAdjustAnchor({x:c,y:l},u),o.eventCenter.emit(ko.EDGE_ADJUST,{data:i.getData()})})),Gf(Hf(t),"onDragEnd",(function(){t.props.bezierModel.isDragging=!1})),t.dragHandler=new Qc({onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return zf(r,[{key:"render",value:function(){var t=this,e=this.props.position,r=e.x,n=e.y,o=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(et.g)(Tf,Rf({className:"lf-bezier-adjust-anchor",x:r,y:n},o,{onMouseDown:function(e){t.dragHandler.handleMouseDown(e)}}))}}]),r}(et.a),Kf=i_(Ef=function(t){Bf(r,t);var e=Ff(r);function r(){return If(this,r),e.apply(this,arguments)}return zf(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=Nf(zc(r),4),i=o[0],u=o[1],a=o[2],c=o[3],l=t.getEdgeStyle().adjustLine,s=[];return s.push(Object(et.g)(Qs,Rf({x1:i.x,y1:i.y,x2:u.x,y2:u.y},l))),s.push(Object(et.g)(Wf,{position:u,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),s.push(Object(et.g)(Qs,Rf({x1:c.x,y1:c.y,x2:a.x,y2:a.y},l))),s.push(Object(et.g)(Wf,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_sNext"),type:"ePre"})),s}},{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===Eo.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(et.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(et.a))||Ef;function $f(t){return $f="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},$f(t)}function qf(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==$f(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==$f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===$f(i)?i:String(i)),n)}var o,i}function Zf(t,e){return Zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zf(t,e)}function Jf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Qf(t);if(e){var o=Qf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===$f(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)}(this,r)}}function Qf(t){return Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qf(t)}var tp,ep=i_(Vf=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zf(t,e)}(i,t);var e,r,n,o=Jf(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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(et.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(et.g)("g",{transform:t},e))}}])&&qf(e.prototype,r),n&&qf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a))||Vf;function rp(t){return rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rp(t)}function np(){return np=Object.assign?Object.assign.bind():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},np.apply(this,arguments)}function op(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==rp(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==rp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===rp(i)?i:String(i)),n)}var o,i}function ip(t,e){return ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ip(t,e)}function up(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=ap(t);if(e){var o=ap(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===rp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function ap(t){return ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ap(t)}var cp=i_(tp=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ip(t,e)}(i,t);var e,r,n,o=up(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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=(0,this.props.getView)(t.type);return Object(et.g)(n,{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,u=e.snaplineModel,a={};o.width&&(a.width="".concat(r.width,"px")),o.height&&(a.height="".concat(r.height,"px"));var c=o.grid,l=r.fakerNode,s=r.editConfigModel.adjustEdge;return Object(et.g)("div",{className:"lf-graph","flow-id":r.flowId,style:a},Object(et.g)(Ps,{graphModel:r,dnd:i},Object(et.g)("g",{className:"lf-base"},hn(r.sortElements,(function(e){return t.getComponent(e,r)}))),l?this.getComponent(l,r):""),Object(et.g)(ep,{graphModel:r},Object(et.g)(Pf,{graphModel:r}),s?Object(et.g)(Kf,{graphModel:r}):"",!1!==o.snapline?Object(et.g)(ff,{snaplineModel:u}):""),Object(et.g)(Ms,{graphModel:r,tool:n}),r.background&&Object(et.g)(Us,{background:r.background}),o.grid&&Object(et.g)(Ks,np({},c,{graphModel:r})))}}],r&&op(e.prototype,r),n&&op(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a))||tp,lp=cp;function sp(t){return sp="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},sp(t)}function fp(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 pp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fp(Object(r),!0).forEach((function(e){dp(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function yp(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,hp(n.key),n)}}function dp(t,e,r){return(e=hp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hp(t){var e=function(t,e){if("object"!==sp(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==sp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===sp(e)?e:String(e)}var vp=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),dp(this,"nodeConfig",void 0),dp(this,"lf",void 0),dp(this,"fakerNode",void 0),dp(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),dp(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(pp(pp({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),dp(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(ko.NODE_DND_DRAG,{data:i})}return!1})),dp(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),dp(this,"onDrop",(function(t){r.lf.graphModel&&t&&r.nodeConfig&&(r.lf.addNode(pp(pp({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY})),ko.NODE_DND_ADD,t),t.preventDefault(),t.stopPropagation(),r.nodeConfig=null,r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)}));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=en(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,u=o.y;return{x:Vi(i,n),y:Vi(u,n)}}},{key:"startDrag",value:function(t){this.lf.options.isSilentMode||(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}}}])&&yp(e.prototype,r),n&&yp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function bp(t){var e=t.container,r=t.grid,n=t.width,o=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if("string"==typeof n||"string"==typeof o)throw new Error("width或height不支持传入字符串,请传数字");return r&&(t.grid=Mn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Mn({},Op,t)}var gp,mp,Op={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function wp(t){return wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wp(t)}function _p(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return jp(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 jp(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 jp(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 Sp(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 xp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Sp(Object(r),!0).forEach((function(e){Np(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ep(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,Mp(n.key),n)}}function Pp(){return Pp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Tp(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pp.apply(this,arguments)}function kp(t,e){return kp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kp(t,e)}function Ap(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=Tp(t);if(e){var o=Tp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===wp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Dp(t)}(this,r)}}function Dp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tp(t){return Tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tp(t)}function Np(t,e,r){return(e=Mp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mp(t){var e=function(t,e){if("object"!==wp(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==wp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===wp(e)?e:String(e)}function Cp(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 Rp,Ip,Lp=(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kp(t,e)}(i,t);var e,r,n,o=Ap(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Np(Dp(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.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})}(Dp(t),"path",mp,Dp(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=100,Pp(Tp(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return xp(xp({},Pp(Tp(i.prototype),"getEdgeStyle",this).call(this)),Ei(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=Pp(Tp(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return xp(xp({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return Lc({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=_p(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=this.getControls(),e=t.sNext,r=t.ePre;this.updatePath(e,r)}},{key:"updatePath",value:function(t,e){t=Ei(t),e=Ei(e);var r={x:this.startPoint.x,y:this.startPoint.y},n={x:this.endPoint.x,y:this.endPoint.y};if(!t||!e){var o=this.getControls();t=o.sNext,e=o.ePre}this.pointsList=[r,t,e,n],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=t,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=t,this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e;var r=_p(this.pointsList,3),n=r[1],o=r[2];n.x+=t,n.y+=e,this.updatePath(n,o)}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e;var r=_p(this.pointsList,3),n=r[1],o=r[2];o.x+=t,o.y+=e,this.updatePath(n,o)}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=Lc({start:e,end:r,sourceNode:n,targetNode:o,offset:this.offset}),u=i.sNext,a=i.ePre;this.pointsList=[e,u,a,r],this.initPoints()}}])&&Ep(e.prototype,r),n&&Ep(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(sa),mp=Cp(gp.prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Cp(gp.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"initPoints"),gp.prototype),Cp(gp.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"updatePoints"),gp.prototype),Cp(gp.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"updateStartPoint"),gp.prototype),Cp(gp.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"updateEndPoint"),gp.prototype),Cp(gp.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"moveStartPoint"),gp.prototype),Cp(gp.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"moveEndPoint"),gp.prototype),Cp(gp.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"updateAdjustAnchor"),gp.prototype),Cp(gp.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"getAdjustStart"),gp.prototype),Cp(gp.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"getAdjustEnd"),gp.prototype),Cp(gp.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(gp.prototype,"updateAfterAdjustStartAndEnd"),gp.prototype),gp);function zp(t){return zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(t)}function Bp(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(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 Fp(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 Hp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fp(Object(r),!0).forEach((function(e){$p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xp(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,qp(n.key),n)}}function Gp(){return Gp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kp(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Gp.apply(this,arguments)}function Yp(t,e){return Yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yp(t,e)}function Vp(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=Kp(t);if(e){var o=Kp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===zp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wp(t)}(this,r)}}function Wp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Kp(t){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kp(t)}function $p(t,e,r){return(e=qp(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qp(t){var e=function(t,e){if("object"!==zp(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==zp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===zp(e)?e:String(e)}function Zp(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 Jp,Qp,ty=(Rp=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yp(t,e)}(i,t);var e,r,n,o=Vp(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $p(Wp(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.POLYLINE_EDGE),$p(Wp(t),"draggingPointList",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})}(Wp(t),"dbClickPosition",Ip,Wp(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,Gp(Kp(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return Hp(Hp({},Gp(Kp(i.prototype),"getEdgeStyle",this).call(this)),Ei(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=Dc(this.points),o=Bp(xc(n),2),i=o[0],u=o[1];return{x:(i.x+u.x)/2,y:(i.y+u.y)/2}}},{key:"getData",value:function(){var t=Gp(Kp(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=Sc({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}}])&&Xp(e.prototype,r),n&&Xp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(sa),Ip=Zp(Rp.prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Zp(Rp.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Rp.prototype,"initPoints"),Rp.prototype),Zp(Rp.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Rp.prototype,"updatePoints"),Rp.prototype),Rp);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},ey(t)}function ry(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ny(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 ny(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 ny(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 oy(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 iy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?oy(Object(r),!0).forEach((function(e){py(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function uy(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,yy(n.key),n)}}function ay(){return ay="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=fy(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ay.apply(this,arguments)}function cy(t,e){return cy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cy(t,e)}function ly(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=fy(t);if(e){var o=fy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(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 sy(t)}(this,r)}}function sy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fy(t){return fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fy(t)}function py(t,e,r){return(e=yy(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yy(t){var e=function(t,e){if("object"!==ey(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==ey(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===ey(e)?e:String(e)}function dy(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 hy=(Jp=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cy(t,e)}(i,t);var e,r,n,o=ly(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return py(sy(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.POLYLINE_EDGE),py(sy(t),"draggingPointList",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})}(sy(t),"dbClickPosition",Qp,sy(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,ay(fy(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return iy(iy({},ay(fy(i.prototype),"getEdgeStyle",this).call(this)),Ei(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=Dc(this.points),o=ry(xc(n),2),i=o[0],u=o[1];return{x:(i.x+u.x)/2,y:(i.y+u.y)/2}}},{key:"getData",value:function(){var t=ay(fy(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=Sc({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}}])&&uy(e.prototype,r),n&&uy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(sa),Qp=dy(Jp.prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dy(Jp.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Jp.prototype,"initPoints"),Jp.prototype),dy(Jp.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Jp.prototype,"updatePoints"),Jp.prototype),Jp);var vy,by,gy,my,Oy,wy,_y,jy,Sy,xy,Ey,Py,ky,Ay,Dy,Ty,Ny,My,Cy,Ry,Iy,Ly,zy,By,Uy=function(t){return null==t};function Fy(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||Xy(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 Hy(t){return Hy="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},Hy(t)}function Xy(t,e){if(t){if("string"==typeof t)return Gy(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)?Gy(t,e):void 0}}function Gy(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 Yy(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 Vy(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Yy(Object(r),!0).forEach((function(e){$y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Wy(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 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,qy(n.key),n)}}function $y(t,e,r){return(e=qy(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qy(t){var e=function(t,e){if("object"!==Hy(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Hy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Hy(e)?e:String(e)}function Zy(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 Jy,Qy,td=(vy=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),$y(this,"id",""),Wy(this,"type",by,this),Wy(this,"x",gy,this),Wy(this,"y",my,this),Wy(this,"text",Oy,this),Wy(this,"properties",wy,this),Wy(this,"_width",_y,this),Wy(this,"_height",jy,this),Wy(this,"anchorsOffset",Sy,this),Wy(this,"isSelected",xy,this),Wy(this,"isHovered",Ey,this),Wy(this,"isShowAnchor",Py,this),Wy(this,"alwaysShowAnchor",ky,this),Wy(this,"isDragging",Ay,this),Wy(this,"isHitable",Dy,this),Wy(this,"draggable",Ty,this),Wy(this,"visible",Ny,this),Wy(this,"enableRotate",My,this),$y(this,"virtual",!1),$y(this,"graphModel",void 0),Wy(this,"zIndex",Cy,this),Wy(this,"state",Ry,this),Wy(this,"autoToFront",Iy,this),Wy(this,"style",Ly,this),Wy(this,"transform",zy,this),Wy(this,"_rotate",By,this),$y(this,"BaseType",Po.NODE),$y(this,"modelType",Eo.NODE),$y(this,"additionStateData",void 0),$y(this,"targetRules",[]),$y(this,"sourceRules",[]),$y(this,"moveRules",[]),$y(this,"hasSetTargetRules",!1),$y(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:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t;var e=this.x,r=void 0===e?0:e,n=this.y,o=void 0===n?0:n;this.transform=new Jl(-r,-o).rotate(t).translate(r,o).toString()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type),n=this.createId();t.id=n||r||au()}this.formatText(t),Mn(this,function(t){return uo(t,["id","type","x","y","text","properties","virtual","rotate"])}(t)),this.graphModel.overlapMode===Do.INCREASE&&(this.zIndex=t.zIndex||ta())}},{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 u={id:this.id,type:this.type,x:this.x,y:this.y,properties:i};return this.rotate&&(u.rotate=this.rotate),this.graphModel.overlapMode===Do.INCREASE&&(u.zIndex=this.zIndex),n&&(u.text={x:e,y:r,value:n}),u}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getOuterGAttributes",value:function(){return{className:""}}},{key:"getNodeStyle",value:function(){return Vy(Vy({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return Ei(t)}},{key:"getRotateControlStyle",value:function(){var t=this.graphModel.theme.rotateControl;return Ei(t)}},{key:"getAnchorStyle",value:function(t){var e=this.graphModel.theme.anchor;return Ei(e)}},{key:"getAnchorLineStyle",value:function(t){var e=this.graphModel.theme.anchorLine;return Ei(e)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return Ei(t)}},{key:"isAllowConnectedAsSource",value:function(t,e,r,n){var o=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var i,u=!0,a=0;a<o.length;a++){var c=o[a];if(!c.validate.call(this,this,t,e,r,n)){u=!1,i=c.message;break}}return{isAllPass:u,msg:i}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,r,n){var o=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var i,u=!0,a=0;a<o.length;a++){var c=o[a];if(!c.validate.call(this,t,this,e,r,n)){u=!1,i=c.message;break}}return{isAllPass:u,msg:i}}},{key:"isAllowMoveNode",value:function(t,e){var r,n=!0,o=!0,i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Xy(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,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(i.s();!(r=i.n()).done;){var u=(0,r.value)(this,t,e);if(!u)return!1;if("object"===Hy(u)){var a=u;if(!1===a.x&&!1===a.y)return!1;n=n&&a.x,o=o&&a.y}}}catch(t){i.e(t)}finally{i.f()}return{x:n,y:o}}},{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?{id:"".concat(e,"_").concat(o),x:r+t[0],y:n+t[1]}:Vy(Vy({},t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(t){return function(t,e){for(var r,n=Ru(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var u=zu(t.x,t.y,n[i].x,n[i].y);u<o&&(o=u,r={index:i,anchor:pu(pu({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r}(t,this)}},{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(){var t=this.getAnchorsByOffset(),e=this.x,r=this.y,n=this.rotate;return t.forEach((function(t){var o=t.x,i=t.y,u=Fy(new $l([o,i,1]).translate(-e,-r).rotate(n).translate(e,r)[0],2),a=u[0],c=u[1];t.x=a,t.y=c})),t}},{key:"getAnchorInfo",value:function(t){if(!Uy(t))for(var e=0;e<this.anchors.length;e++){var r=this.anchors[e];if(r.id===t)return r}}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var r=!1,n=!1;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])r=!0,n=!0;else{var o=this.isAllowMoveNode(t,e);"boolean"==typeof o?(r=o,n=o):(r=o.x,n=o.y)}if(r){var i=this.x+t;this.x=i,this.text&&this.moveText(t,0)}if(n){var u=this.y+e;this.y=u,this.text&&this.moveText(0,e)}return r||n}},{key:"getMoveDistance",value:function(t,e){var r=!1,n=!1,o=0,i=0;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])r=!0,n=!0;else{var u=this.isAllowMoveNode(t,e);"boolean"==typeof u?(r=u,n=u):(r=u.x,n=u.y)}if(r&&t){var a=this.x+t;this.x=a,this.text&&this.moveText(t,0),o=t}if(n&&e){var c=this.y+e;this.y=c,this.text&&this.moveText(0,e),i=e}return[o,i]}},{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;return!(!r&&!this.isAllowMoveNode(n,o)||(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e,0))}},{key:"moveText",value:function(t,e){var r=this.text,n=r.x,o=r.y,i=r.value,u=r.draggable,a=r.editable;this.text={value:i,editable:a,draggable:u,x:n+t,y:o+e}}},{key:"updateText",value:function(t){this.text=Vy(Vy({},Object(o.I)(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,this.setIsShowAnchor(t)}},{key:"setIsShowAnchor",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isShowAnchor=t}},{key:"setEnableRotate",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.enableRotate=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=Vy(Vy({},Object(o.I)(this.properties)),{},$y({},t,Zu(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Vy(Vy({},Object(o.I)(this.properties)),Zu(t)),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setStyle",value:function(t,e){this.style=Vy(Vy({},this.style),{},$y({},t,Zu(e)))}},{key:"setStyles",value:function(t){this.style=Vy(Vy({},this.style),Zu(t))}},{key:"updateStyles",value:function(t){this.style=Vy({},Zu(t))}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){Mn(this,t)}}],r&&Ky(e.prototype,r),n&&Ky(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),by=Zy(vy.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),gy=Zy(vy.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),my=Zy(vy.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Oy=Zy(vy.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),wy=Zy(vy.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),_y=Zy(vy.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),jy=Zy(vy.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Sy=Zy(vy.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),xy=Zy(vy.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ey=Zy(vy.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Py=Zy(vy.prototype,"isShowAnchor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ky=Zy(vy.prototype,"alwaysShowAnchor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ay=Zy(vy.prototype,"isDragging",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dy=Zy(vy.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ty=Zy(vy.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ny=Zy(vy.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),My=Zy(vy.prototype,"enableRotate",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Cy=Zy(vy.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ry=Zy(vy.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Iy=Zy(vy.prototype,"autoToFront",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ly=Zy(vy.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),zy=Zy(vy.prototype,"transform",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),By=Zy(vy.prototype,"_rotate",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Zy(vy.prototype,"incoming",[o.m],Object.getOwnPropertyDescriptor(vy.prototype,"incoming"),vy.prototype),Zy(vy.prototype,"outgoing",[o.m],Object.getOwnPropertyDescriptor(vy.prototype,"outgoing"),vy.prototype),Zy(vy.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"addNodeMoveRules"),vy.prototype),Zy(vy.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"move"),vy.prototype),Zy(vy.prototype,"getMoveDistance",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"getMoveDistance"),vy.prototype),Zy(vy.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"moveTo"),vy.prototype),Zy(vy.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"moveText"),vy.prototype),Zy(vy.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"updateText"),vy.prototype),Zy(vy.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setSelected"),vy.prototype),Zy(vy.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setHovered"),vy.prototype),Zy(vy.prototype,"setIsShowAnchor",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setIsShowAnchor"),vy.prototype),Zy(vy.prototype,"setEnableRotate",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setEnableRotate"),vy.prototype),Zy(vy.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setHitable"),vy.prototype),Zy(vy.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setElementState"),vy.prototype),Zy(vy.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setProperty"),vy.prototype),Zy(vy.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setProperties"),vy.prototype),Zy(vy.prototype,"deleteProperty",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"deleteProperty"),vy.prototype),Zy(vy.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setStyle"),vy.prototype),Zy(vy.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setStyles"),vy.prototype),Zy(vy.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"updateStyles"),vy.prototype),Zy(vy.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"setZIndex"),vy.prototype),Zy(vy.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(vy.prototype,"updateAttributes"),vy.prototype),vy);function ed(t){return ed="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ed(t)}function rd(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 nd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?rd(Object(r),!0).forEach((function(e){sd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function od(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,fd(n.key),n)}}function id(){return id="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ld(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},id.apply(this,arguments)}function ud(t,e){return ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ud(t,e)}function ad(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=ld(t);if(e){var o=ld(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===ed(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return cd(t)}(this,r)}}function cd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ld(t){return ld=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ld(t)}function sd(t,e,r){return(e=fd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fd(t){var e=function(t,e){if("object"!==ed(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==ed(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===ed(e)?e:String(e)}function pd(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 yd,dd,hd,vd=(Jy=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ud(t,e)}(i,t);var e,r,n,o=ad(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return sd(cd(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.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})}(cd(t),"r",Qy,cd(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=id(ld(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return nd(nd({},t),Ei(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")}]}}])&&od(e.prototype,r),n&&od(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(td),Qy=pd(Jy.prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),pd(Jy.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Jy.prototype,"width"),Jy.prototype),pd(Jy.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Jy.prototype,"height"),Jy.prototype),Jy);r(144);function bd(t){return bd="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},bd(t)}function gd(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return md(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 md(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 md(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 Od(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 wd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Od(Object(r),!0).forEach((function(e){Ad(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Od(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _d(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 jd(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,Dd(n.key),n)}}function Sd(){return Sd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=kd(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Sd.apply(this,arguments)}function xd(t,e){return xd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xd(t,e)}function Ed(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=kd(t);if(e){var o=kd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===bd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Pd(t)}(this,r)}}function Pd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kd(t){return kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kd(t)}function Ad(t,e,r){return(e=Dd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dd(t){var e=function(t,e){if("object"!==bd(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==bd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===bd(e)?e:String(e)}function Td(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,Md,Cd,Rd=(yd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xd(t,e)}(i,t);var e,r,n,o=Ed(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ad(Pd(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.DIAMOND_NODE),_d(Pd(t),"rx",dd,Pd(t)),_d(Pd(t),"ry",hd,Pd(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Sd(kd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return wd(wd({},t),Ei(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=gd(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=gd(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=gd(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&jd(e.prototype,r),n&&jd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(td),dd=Td(yd.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),hd=Td(yd.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Td(yd.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(yd.prototype,"points"),yd.prototype),Td(yd.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(yd.prototype,"pointsPosition"),yd.prototype),Td(yd.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(yd.prototype,"width"),yd.prototype),Td(yd.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(yd.prototype,"height"),yd.prototype),yd);function Id(t){return Id="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},Id(t)}function Ld(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 zd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ld(Object(r),!0).forEach((function(e){Vd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ld(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Bd(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 Ud(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,Wd(n.key),n)}}function Fd(){return Fd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yd(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fd.apply(this,arguments)}function Hd(t,e){return Hd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Hd(t,e)}function Xd(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=Yd(t);if(e){var o=Yd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Id(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Gd(t)}(this,r)}}function Gd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yd(t){return Yd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yd(t)}function Vd(t,e,r){return(e=Wd(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wd(t){var e=function(t,e){if("object"!==Id(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Id(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Id(e)?e:String(e)}function Kd(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 $d,qd,Zd=(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hd(t,e)}(i,t);var e,r,n,o=Xd(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Vd(Gd(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.ELLIPSE_NODE),Bd(Gd(t),"rx",Md,Gd(t)),Bd(Gd(t),"ry",Cd,Gd(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Fd(Yd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return zd(zd({},t),Ei(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")}]}}])&&Ud(e.prototype,r),n&&Ud(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(td),Md=Kd(Nd.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Cd=Kd(Nd.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Kd(Nd.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Nd.prototype,"width"),Nd.prototype),Kd(Nd.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Nd.prototype,"height"),Nd.prototype),Nd);function Jd(t){return Jd="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},Jd(t)}function Qd(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return th(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 th(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function th(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function eh(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 rh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?eh(Object(r),!0).forEach((function(e){lh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function nh(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,sh(n.key),n)}}function oh(){return oh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ch(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},oh.apply(this,arguments)}function ih(t,e){return ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ih(t,e)}function uh(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=ch(t);if(e){var o=ch(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Jd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ah(t)}(this,r)}}function ah(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ch(t){return ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ch(t)}function lh(t,e,r){return(e=sh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sh(t){var e=function(t,e){if("object"!==Jd(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Jd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Jd(e)?e:String(e)}function fh(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 ph,yh,dh=($d=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ih(t,e)}(i,t);var e,r,n,o=uh(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return lh(ah(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.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})}(ah(t),"points",qd,ah(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=oh(ch(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return rh(rh({},t),Ei(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=Qd(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=Qd(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,u){var a=Qd(i,2),c=a[0],l=a[1];return{x:e+c-n/2,y:r+l-o/2,id:"".concat(t.id,"_").concat(u)}}))}}])&&nh(e.prototype,r),n&&nh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(td),qd=fh($d.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),fh($d.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor($d.prototype,"pointsPosition"),$d.prototype),fh($d.prototype,"width",[o.m],Object.getOwnPropertyDescriptor($d.prototype,"width"),$d.prototype),fh($d.prototype,"height",[o.m],Object.getOwnPropertyDescriptor($d.prototype,"height"),$d.prototype),$d);function hh(t){return hh="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},hh(t)}function vh(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 bh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vh(Object(r),!0).forEach((function(e){Sh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gh(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,xh(n.key),n)}}function mh(){return mh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jh(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},mh.apply(this,arguments)}function Oh(t,e){return Oh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oh(t,e)}function wh(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=jh(t);if(e){var o=jh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===hh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _h(t)}(this,r)}}function _h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jh(t){return jh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jh(t)}function Sh(t,e,r){return(e=xh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xh(t){var e=function(t,e){if("object"!==hh(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==hh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===hh(e)?e:String(e)}var Eh,Ph=(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oh(t,e)}(i,t);var e,r,n,o=wh(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Sh(_h(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.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})}(_h(t),"radius",yh,_h(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=mh(jh(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return bh(bh({},t),Ei(e))}}])&&gh(e.prototype,r),n&&gh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(td),yh=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}(ph.prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ph);r(145);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},kh(t)}function Ah(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 Dh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ah(Object(r),!0).forEach((function(e){Lh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ah(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Th(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,zh(n.key),n)}}function Nh(){return Nh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ih(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Nh.apply(this,arguments)}function Mh(t,e){return Mh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mh(t,e)}function Ch(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=Ih(t);if(e){var o=Ih(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(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 Rh(t)}(this,r)}}function Rh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ih(t){return Ih=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ih(t)}function Lh(t,e,r){return(e=zh(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zh(t){var e=function(t,e){if("object"!==kh(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==kh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===kh(e)?e:String(e)}function Bh(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 Uh=(Eh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mh(t,e)}(i,t);var e,r,n,o=Ch(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Lh(Rh(t=o.call.apply(o,[this].concat(r))),"modelType",Eo.TEXT_NODE),t}return e=i,(r=[{key:"getTextStyle",value:function(){var t=Nh(Ih(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return Dh(Dh({},t),Ei(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return $u({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 $u({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&Th(e.prototype,r),n&&Th(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(td),Bh(Eh.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Eh.prototype,"width"),Eh.prototype),Bh(Eh.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Eh.prototype,"height"),Eh.prototype),Eh);function Fh(t){return Fh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fh(t)}function Hh(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,Wh(n.key),n)}}function Xh(t,e){return Xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xh(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 function(t,e){if(e&&("object"===Fh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Yh(t)}(this,r)}}function Yh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vh(t){return Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vh(t)}function Wh(t){var e=function(t,e){if("object"!==Fh(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Fh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Fh(e)?e:String(e)}var Kh,$h,qh,Zh,Jh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xh(t,e)}(i,t);var e,r,n,o=Gh(i);function i(){var t,e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];return t=o.call.apply(o,[this].concat(a)),e=Yh(t),r="modelType",n=Eo.HTML_NODE,(r=Wh(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,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")}]}}])&&Hh(e.prototype,r),n&&Hh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(td);function Qh(t){return Qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qh(t)}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 ev(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 rv(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,ov(n.key),n)}}function nv(t,e,r){return(e=ov(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ov(t){var e=function(t,e){if("object"!==Qh(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Qh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Qh(e)?e:String(e)}function iv(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 uv=(Kh=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),nv(this,"graphModel",void 0),ev(this,"isShowHorizontal",$h,this),ev(this,"isShowVertical",qh,this),ev(this,"position",Zh,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?tv(Object(r),!0).forEach((function(e){nv(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}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,e){for(var r=t.x,n=t.y,o=!1,i=!1,u=0;u<e.length;u++){var a=e[u];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}}}},{key:"getHorizontalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var u=this.graphModel.fakerNode;if(u&&u.id===i)n=Fu(u);else{var a=this.graphModel.getNodeModelById(i);n=Fu(a)}}for(var c=0;c<e.length;c++){var l=e[c];if(l.id!==t.id){var s=Fu(l);if(s.minY===n.minY||s.maxY===n.minY){o=!0,r=n.minY;break}if(s.minY===n.maxY||s.maxY===n.maxY){o=!0,r=n.maxY;break}}}return Mn({isShowHorizontal:o,position:{y:r}})}},{key:"getVerticalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var u=this.graphModel.fakerNode;if(u&&u.id===i)n=Fu(u);else{var a=this.graphModel.getNodeModelById(i);n=Fu(a)}}for(var c=0;c<e.length;c++){var l=e[c];if(l.id!==t.id){var s=Fu(l);if(s.minX===n.minX||s.maxX===n.minX){o=!0,r=n.minX;break}if(s.minX===n.maxX||s.maxX===n.maxX){o=!0,r=n.maxX;break}}}return Mn({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 u=this.getVerticalSnapline(t,e);u.isShowVertical&&(r.isShowVertical=u.isShowVertical,r.position.x=u.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)}}],r&&rv(e.prototype,r),n&&rv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),$h=iv(Kh.prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qh=iv(Kh.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Zh=iv(Kh.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),iv(Kh.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(Kh.prototype,"clearSnapline"),Kh.prototype),iv(Kh.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(Kh.prototype,"setNodeSnapLine"),Kh.prototype),Kh),av=new Map,cv=function(t){var e=au();var r=window.requestAnimationFrame((function r(){if(t(),av.get(e)){var n=window.requestAnimationFrame(r);av.set(e,n)}}));return av.set(e,r),e},lv=function(t){var e=av.get(t);e&&(window.cancelAnimationFrame(e),av.delete(t))};function sv(t){return sv="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},sv(t)}function fv(){return fv=Object.assign?Object.assign.bind():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},fv.apply(this,arguments)}function pv(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 yv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pv(Object(r),!0).forEach((function(e){wv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dv(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return hv(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 hv(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 hv(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 vv(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,_v(n.key),n)}}function bv(t,e){return bv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bv(t,e)}function gv(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=Ov(t);if(e){var o=Ov(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===sv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return mv(t)}(this,r)}}function mv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ov(t){return Ov=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ov(t)}function wv(t,e,r){return(e=_v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _v(t){var e=function(t,e){if("object"!==sv(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==sv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===sv(e)?e:String(e)}var jv=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bv(t,e)}(i,t);var e,r,n,o=gv(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),wv(mv(t=o.call(this)),"preTargetNode",void 0),wv(mv(t),"sourceRuleResults",void 0),wv(mv(t),"targetRuleResults",void 0),wv(mv(t),"dragHandler",void 0),wv(mv(t),"t",void 0),wv(mv(t),"onDragStart",(function(e){var r=e.event,n=t.props,o=n.anchorData,i=n.nodeModel,u=n.graphModel;u.overlapMode;u.selectNodeById(i.id),i.autoToFront&&u.toFront(i.id),u.eventCenter.emit(ko.ANCHOR_DRAGSTART,{data:o,e:r,nodeModel:i}),t.setState({startX:o.x,startY:o.y,endX:o.x,endY:o.y})})),wv(mv(t),"onDragging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.nodeModel,u=n.anchorData,a=o.transformModel,c=o.eventCenter,l=o.width,s=o.height,f=o.editConfigModel,p=f.autoExpand,y=f.stopMoveGraph,d=r.clientX,h=r.clientY,v=o.getPointByClient({x:d,y:h}),b=v.domOverlayPosition,g=b.x,m=b.y,O=v.canvasOverlayPosition,w=O.x,_=O.y;t.t&&lv(t.t);var j=[];g<10?j=[10,0]:g+10>l?j=[-10,0]:m<10?j=[0,10]:m+10>s&&(j=[0,-10]),t.setState({endX:w,endY:_,dragging:!0}),t.moveAnchorEnd(w,_),j.length>0&&!y&&p&&(t.t=cv((function(){var e=dv(j,2),r=e[0],n=e[1];a.translate(r,n);var o=t.state,i=o.endX,u=o.endY;t.setState({endX:i-r,endY:u-n}),t.moveAnchorEnd(i-r,u-n)}))),c.emit(ko.ANCHOR_DRAG,{data:u,e:r,nodeModel:i})})),wv(mv(t),"onDragEnd",(function(e){var r=e.event;t.t&&lv(t.t);var n=t.checkEnd(r);t.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear();var o=t.props,i=o.graphModel,u=o.nodeModel,a=o.anchorData;i.eventCenter.emit(ko.ANCHOR_DRAGEND,{data:a,e:r,nodeModel:u,edgeModel:n})})),wv(mv(t),"checkEnd",(function(e){var r=t.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,u=i.x,a=i.y,c=i.id,l=(n.edgeType,t.state),s=l.endX,f=l.endY,p=l.dragging,y=Iu({x:s,y:f},n);if(t.preTargetNode&&t.preTargetNode.state!==xo.DEFAULT&&t.preTargetNode.setElementState(xo.DEFAULT),p&&y&&y.node){var d=y.node,h=y.anchor.id,v="".concat(o.id,"_").concat(d.id,"_").concat(h,"_").concat(c),b=t.sourceRuleResults.get(v)||{},g=b.isAllPass,m=b.msg,O=t.targetRuleResults.get(v)||{},w=O.isAllPass,_=O.msg;if(g&&w){d.setElementState(xo.DEFAULT);var j=n.edgeGenerator(o.getData(),n.getNodeModelById(y.node.id).getData()),S=n.addEdge(yv(yv({},j),{},{sourceNodeId:o.id,sourceAnchorId:c,startPoint:{x:u,y:a},targetNodeId:y.node.id,targetAnchorId:y.anchor.id,endPoint:{x:y.anchor.x,y:y.anchor.y}})),x=t.props.anchorData;return n.eventCenter.emit(ko.ANCHOR_DROP,{data:x,e:e,nodeModel:o,edgeModel:S}),S}var E=d.getData();return n.eventCenter.emit(ko.CONNECTION_NOT_ALLOWED,{data:E,msg:_||m}),null}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},t.dragHandler=new Qc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"getAnchorShape",value:function(){var t=this.props,e=t.anchorData,r=t.style,n=t.node.getAnchorShape(e);if(n)return n;var o=e.x,i=e.y,u=yv(yv({},r),r.hover);return Object(et.g)("g",null,Object(et.g)(Tf,fv({className:"lf-node-anchor-hover"},u,{x:o,y:i})),Object(et.g)(Tf,fv({className:"lf-node-anchor"},r,{x:o,y:i})))}},{key:"customTrajectory",get:function(){return this.props.graphModel.customTrajectory}},{key:"moveAnchorEnd",value:function(t,e){var r=this.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,u=Iu({x:t,y:e},n);if(u){var a=u.node,c=u.anchor.id;if(this.preTargetNode&&this.preTargetNode!==u.node&&this.preTargetNode.setElementState(xo.DEFAULT),i.id===c)return;this.preTargetNode=a;var l="".concat(o.id,"_").concat(a.id,"_").concat(c,"_").concat(i.id);if(!this.targetRuleResults.has(l)){var s=u.anchor,f=o.isAllowConnectedAsSource(a,i,s),p=a.isAllowConnectedAsTarget(o,i,s);this.sourceRuleResults.set(l,qu(f)),this.targetRuleResults.set(l,qu(p))}var y=this.sourceRuleResults.get(l).isAllPass,d=this.targetRuleResults.get(l).isAllPass;y&&d?a.setElementState(xo.ALLOW_CONNECT):a.setElementState(xo.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==xo.DEFAULT&&this.preTargetNode.setElementState(xo.DEFAULT)}},{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return zu(e,r,n,o)>10}},{key:"render",value:function(){var t=this,e=this.state,r=e.startX,n=e.startY,o=e.endX,i=e.endY,u=this.props,a=u.anchorData.edgeAddable,c=u.edgeStyle;return Object(et.g)("g",{className:"lf-anchor"},Object(et.g)("g",{onMouseDown:function(e){!1!==a&&t.dragHandler.handleMouseDown(e)}},this.getAnchorShape()),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(yv({sourcePoint:{x:r,y:n},targetPoint:{x:o,y:i}},c)):Object(et.g)(Qs,fv({x1:r,y1:n,x2:o,y2:i},c,{"pointer-events":"none"}))))}}])&&vv(e.prototype,r),n&&vv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a);function Sv(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 xv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Sv(Object(r),!0).forEach((function(e){Ev(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ev(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Pv(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Pv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Pv(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pv(t){return Pv="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},Pv(t)}function kv(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Av(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 Av(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 Av(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 Dv(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.value,u=t.fontSize,a=t.fill,c=void 0===a?"currentColor":a,l=t.overflowMode,s=void 0===l?"default":l,f=t.textWidth,p=void 0===f?"":f,y=t.model,d={textAnchor:"left","dominant-baseline":"middle",x:r,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=kv(t,2),r=e[0],n=e[1];"object"!==Pv(n)&&(d[r]=n)})),i){var h=String(i).split(/[\r\n]/g),v=h.length;if("default"!==s){var b=y.BaseType,g=y.modelType;if(b===Po.NODE&&g!==Eo.TEXT_NODE||b===Po.EDGE&&p)return function(t){var e=t.value,r=t.fontSize,n=t.model,o=t.fontFamily,i=void 0===o?"":o,u=t.lineHeight,a=t.wrapPadding,c=void 0===a?"0, 0":a,l=t.overflowMode,s=t.x,f=t.y,p=n.width,y=n.textHeight,d=t.textWidth||p,h=String(e).split(/[\r\n]/g),v=h.length,b=Ku({rows:h,style:{fontSize:"".concat(r,"px"),width:"".concat(d,"px"),fontFamily:i,lineHeight:u,padding:c},rowsLength:v,className:"lf-get-text-height"}),g=n.height>b?n.height:b;y&&(g=y);var m="ellipsis"===l;m&&(g=r+2);return Object(et.g)("g",null,Object(et.g)("foreignObject",{width:d,height:g,x:s-d/2,y:f-g/2},Object(et.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:g,width:d,padding:c}},Object(et.g)("div",{className:m?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:m?h.join(""):"",style:xv({},t)},h.map((function(t){return Object(et.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)*(u+2);return Object(et.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(et.g)("text",d,m)}}var O=y.properties,w=O.showDefaultValue,_=O.showUnit,j=O.dynamic,S=O.valueColor,x=O.contentColor,E=O.fontColor,P=O.valueDecimal,k=O.valueFormatWan,A=(j||{}).normalData,D="",T="";if(A){var N=A||{},M=N.defaultValue,C=N.unit;if(w&&M){var R=[{val:""}];try{D=(R=JSON.parse(M)||[{val:""}])[0]?R[0].val||"0":void 0===R[0]?"0":R[0]}catch(t){}}_&&C&&(T=" "+C)}if(d.transform="translate(-".concat(y.width/2||0,", 0)"),D){if("number"==typeof P){var I=+D;Number.isNaN(I)||(D=I.toFixed(P))}k&&(D=+D/1e4+"万")}return Object(et.g)("text",d,Object(et.g)("tspan",{style:{color:x||E}},i),Object(et.g)("tspan",{style:{color:S}}," "+D),Object(et.g)("tspan",null," "+T))}function Tv(t){return Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tv(t)}function Nv(){return Nv=Object.assign?Object.assign.bind():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},Nv.apply(this,arguments)}function Mv(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Cv(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 Cv(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 Cv(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 Rv(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,Fv(n.key),n)}}function Iv(t,e){return Iv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Iv(t,e)}function Lv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Bv(t);if(e){var o=Bv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Tv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zv(t)}(this,r)}}function zv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bv(t){return Bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bv(t)}function Uv(t,e,r){return(e=Fv(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fv(t){var e=function(t,e){if("object"!==Tv(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Tv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Tv(e)?e:String(e)}var 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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Iv(t,e)}(i,t);var e,r,n,o=Lv(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),Uv(zv(e=o.call(this)),"dragHandler",void 0),Uv(zv(e),"sumDeltaX",0),Uv(zv(e),"sumDeltaY",0),Uv(zv(e),"stepDrag",void 0),Uv(zv(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,u=Mv(o.graphModel.transformModel.fixDeltaXY(r,n),2),a=u[0],c=u[1];i.moveText(a,c)})),Uv(zv(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(xo.TEXT_EDIT)})),Uv(zv(e),"mouseDownHandle",(function(t){var r=e.props,n=r.draggable,o=r.model,i=r.graphModel.editConfigModel.nodeTextDraggable;(n||i)&&(e.stepDrag.model=o,e.stepDrag.handleMouseDown(t))}));t.model;var r=t.draggable;return e.stepDrag=new Qc({onDragging:e.onDragging,step:1,isStopPropagation:r}),e}return e=i,(r=[{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.text,o=r.editConfigModel,i=n.value,u=n.x,a=n.y,c=n.editable,l=n.draggable,s={x:u,y:a,className:"",value:i};c?s.className="lf-element-text":l||o.nodeTextDraggable?s.className="lf-text-draggable":s.className="lf-text-disabled";var f=e.getTextStyle();return Object(et.g)(Dv,Nv({},s,f,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return Object(et.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&Rv(e.prototype,r),n&&Rv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a),Xv=null!==window.navigator.userAgent.match(/MSIE|Trident/),Gv=r(146);function Yv(t){return Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yv(t)}function Vv(){return Vv=Object.assign?Object.assign.bind():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},Vv.apply(this,arguments)}function Wv(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,Qv(n.key),n)}}function Kv(t,e){return Kv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kv(t,e)}function $v(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 function(t,e){if(e&&("object"===Yv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qv(t)}(this,r)}}function qv(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.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zv(t)}function Jv(t,e,r){return(e=Qv(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qv(t){var e=function(t,e){if("object"!==Yv(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Yv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Yv(e)?e:String(e)}var tb=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kv(t,e)}(i,t);var e,r,n,o=$v(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),Jv(qv(e=o.call(this,t)),"style",{}),Jv(qv(e),"defaultAngle",void 0),Jv(qv(e),"normal",void 0),Jv(qv(e),"stepperDrag",void 0),Jv(qv(e),"onDragging",(function(t){var r,n=t.event,o=e.props,i=o.graphModel,u=o.nodeModel,a=o.eventCenter,c=i.selectNodes,l=u.x,s=u.y,f=n.clientX,p=n.clientY,y=i.getPointByClient({x:f,y:p}).canvasOverlayPosition,d=y.x,h=y.y,v=new vl(d-l,h-s),b=(null===(r=e.normal)||void 0===r?void 0:r.angle(v))-e.defaultAngle,g=new Jl(-l,-s).rotate(b).translate(l,s).toString();u.transform=g,u.rotate=b;var m=Object(Gv.map)(c,(function(t){return t.id}));-1===m.indexOf(u.id)&&(m=[u.id]);var O=Object(Gv.reduce)(m,(function(t,e){var r=i.getNodeModelById(e);return t[e]=null==r?void 0:r.getMoveDistance(0,0,!1),t}),{});m.forEach((function(t){i.getNodeEdges(t).forEach((function(t){if(O[t.sourceNodeId]){var e=i.getNodeModelById(t.sourceNodeId).anchors.find((function(e){return e.id===t.sourceAnchorId}));t.updateStartPoint(e)}if(O[t.targetNodeId]){var r=i.getNodeModelById(t.targetNodeId).anchors.find((function(e){return e.id===t.targetAnchorId}));t.updateEndPoint(r)}}))})),a.emit(ko.NODE_ROTATE,{e:n,nodeModel:u})})),e.style=t.style,e.stepperDrag=new Qc({onDragging:e.onDragging}),e}return e=i,(r=[{key:"render",value:function(){var t=this,e=this.props.nodeModel,r=e.x,n=e.y,o=r+e.width/2+20,i=n-e.height/2-20;return this.normal=new vl(1,0),this.defaultAngle=this.normal.angle(new vl(o-r,i-n)),e.defaultAngle=this.defaultAngle,Object(et.g)("g",{className:"lf-rotate-control"},Object(et.g)("g",{onMouseDown:function(e){t.stepperDrag.handleMouseDown(e)}},Object(et.g)(Tf,Vv({},this.style,{cx:o,cy:i}))))}}])&&Wv(e.prototype,r),n&&Wv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a),eb=["className"];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},rb(t)}function nb(){return nb=Object.assign?Object.assign.bind():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},nb.apply(this,arguments)}function ob(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ib(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ub(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 ub(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 ub(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 ab(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,yb(n.key),n)}}function cb(t,e){return cb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cb(t,e)}function lb(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=fb(t);if(e){var o=fb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(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 sb(t)}(this,r)}}function sb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fb(t){return fb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fb(t)}function pb(t,e,r){return(e=yb(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yb(t){var e=function(t,e){if("object"!==rb(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==rb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===rb(e)?e:String(e)}var db=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cb(t,e)}(u,t);var e,r,n,i=lb(u);function u(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),pb(sb(e=i.call(this)),"t",void 0),pb(sb(e),"moveOffset",void 0),pb(sb(e),"stepDrag",void 0),pb(sb(e),"contextMenuTime",void 0),pb(sb(e),"startTime",void 0),pb(sb(e),"clickTimer",void 0),pb(sb(e),"modelDisposer",void 0),pb(sb(e),"onDragStart",(function(t){var r=t.event,n=r.clientX,o=r.clientY,i=e.props,u=i.model,a=i.graphModel.getPointByClient({x:n,y:o}).canvasOverlayPosition,c=a.x,l=a.y;e.moveOffset={x:u.x-c,y:u.y-l}})),pb(sb(e),"onDragging",(function(t){var r=t.event,n=e.props,o=n.model,i=n.graphModel,u=i.editConfigModel,a=u.stopMoveGraph,c=u.autoExpand,l=i.transformModel,s=i.selectNodes,f=i.width,p=i.height,y=i.gridSize;o.isDragging=!0;var d=r.clientX,h=r.clientY,v=i.getPointByClient({x:d,y:h}).canvasOverlayPosition,b=v.x,g=v.y,m=ib(l.CanvasPointToHtmlPoint([b,g]),2),O=m[0],w=m[1];if(b+=e.moveOffset.x,g+=e.moveOffset.y,b=Vi(b,y),g=Vi(g,y),f&&p){if(!c||a||!(O<0||w<0||O>f||w>p)){var _=ib(l.CanvasPointToHtmlPoint([b-o.width/2,g-o.height/2]),2),j=_[0],S=_[1],x=ib(l.CanvasPointToHtmlPoint([b+o.width/2,g+o.height/2]),2),E=x[0],P=x[1],k=Math.max(y,20),A=[];j<0?A=[k,0]:E>i.width?A=[-k,0]:S<0?A=[0,k]:P>i.height&&(A=[0,-k]),e.t&&lv(e.t);var D=new Jl(-b,-g).rotate(o.rotate).translate(b,g).toString();o.transform=D;var T=s.map((function(t){return t.id}));-1===T.indexOf(o.id)&&(T=[o.id]),A.length>0&&!a&&c?e.t=cv((function(){var t=ib(A,2),e=t[0],r=t[1];l.translate(e,r);var n=-e/l.SCALE_X,o=-r/l.SCALE_X;i.moveNodes(T,n,o)})):i.moveNodes(T,b-o.x,g-o.y)}}else i.moveNode2Coordinate(o.id,b,g)})),pb(sb(e),"onDragEnd",(function(){e.t&&lv(e.t),e.props.model.isDragging=!1})),pb(sb(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}),isSelected:!1,isMultiple:!1},u=2===t.button,a=2===t.detail;if(!u){var c=o.editConfigModel,l=Ji(t,c);i.isMultiple=l,n.isSelected&&!a&&l?(i.isSelected=!1,n.setSelected(!1)):(o.selectNodeById(n.id,l),i.isSelected=!0,e.toFront()),a?(c.nodeTextEdit&&n.text.editable&&(n.setSelected(!1),o.setElementStateById(n.id,xo.TEXT_EDIT)),o.eventCenter.emit(ko.NODE_DBCLICK,i)):(o.eventCenter.emit(ko.ELEMENT_CLICK,i),o.eventCenter.emit(ko.NODE_CLICK,i))}}})),pb(sb(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.model,o=r.graphModel,i=n.getData(),u=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(n.id,xo.SHOW_MENU,u.domOverlayPosition),n.isSelected||o.selectNodeById(n.id),o.eventCenter.emit(ko.NODE_CONTEXTMENU,{data:i,e:t,position:u}),e.toFront()})),pb(sb(e),"handleMouseDown",(function(t){var r=e.props,n=r.model,o=r.graphModel;e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),pb(sb(e),"setHoverON",(function(t){var r=e.props,n=r.model,o=r.graphModel;if(!n.isHovered){var i=n.getData();n.setHovered(!0),o.eventCenter.emit(ko.NODE_MOUSEENTER,{data:i,e:t})}})),pb(sb(e),"setHoverOFF",(function(t){var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.isHovered&&(n.setHovered(!1),o.eventCenter.emit(ko.NODE_MOUSELEAVE,{data:i,e:t}))})),pb(sb(e),"onMouseOut",(function(t){Xv&&e.setHoverOFF(t)}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter,c=t.model;return e.stepDrag=new Qc({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:n,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:c}),e.modelDisposer=Object(o.F)((function(){return e.props}),(function(t){t&&t.model&&e.stepDrag.setModel(t.model)})),e}return e=u,n=[{key:"getModel",value:function(t){return t}}],(r=[{key:"componentWillUnmount",value:function(){this.modelDisposer&&this.modelDisposer()}},{key:"getAnchorShape",value:function(t){return null}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.isSelected,i=r.isHitable,u=r.isDragging,a=r.isShowAnchor;return r.alwaysShowAnchor||i&&(o||a)&&!u?hn(r.anchors,(function(e,o){var i=r.getAnchorLineStyle(e),u=r.getAnchorStyle(e);return Object(et.g)(jv,{anchorData:e,node:t,style:u,edgeStyle:i,anchorIndex:o,nodeModel:r,graphModel:n,setHoverOFF:t.setHoverOFF})})):[]}},{key:"getRotateControl",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.isSelected,o=e.isHitable,i=e.enableRotate,u=e.isHovered,a=e.getRotateControlStyle().style;if(o&&(n||u)&&i)return Object(et.g)(tb,{graphModel:r,nodeModel:e,eventCenter:r.eventCenter,style:a})}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===xo.TEXT_EDIT)return"";if(e.text){var n=r.editConfigModel,o=!1;return(e.text.draggable||n.nodeTextDraggable)&&(o=!0),Object(et.g)(Hv,{editable:(n.nodeTextEdit||"custom-input-node"===e.type)&&e.text.editable,model:e,graphModel:r,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,r=t.isDragging,n=t.isSelected,o=t.type,i="lf-node";switch(e){case xo.ALLOW_CONNECT:i+=" lf-node-allow";break;case xo.NOT_ALLOW_CONNECT:i+=" lf-node-not-allow";break;default:i+=" lf-node-default"}return"helper-circle-point"===o&&(i+=" helper-circle-point"),r&&(i+=" lf-isDragging"),n&&(i+=" lf-node-selected"),i}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;e.autoToFront&&r.toFront(e.id)}},{key:"render",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.properties,o=n.rotation,i=n.flipX,u=n.flipY,a=(n.rotateAnimation,n.animationTime,r.editConfigModel),c=a.hideAnchors,l=a.adjustNodePosition,s=a.allowRotation,f=r.gridSize,p=r.transformModel.SCALE_X,y=e.isHitable,d=e.draggable,h=e.transform,v=e.id,b=e.getOuterGAttributes(),g=b.className,m=void 0===g?"":g,O=ob(b,eb),w="rotate(".concat(o||0,", ").concat(e.x,", ").concat(e.y,") ");i?w+="translate(".concat(e.x,", ").concat(e.y,") matrix(-1, 0, 0, 1, 0, 0) translate(-").concat(e.x,", -").concat(e.y,")"):u&&(w+="translate(".concat(e.x,", ").concat(e.y,") matrix(1, 0, 0, -1, 0, 0) translate(-").concat(e.x,", -").concat(e.y,")"));var _,j=Object(et.g)("g",{className:"lf-node-content",id:v,transform:w},Object(et.g)("g",{transform:h},this.getShape(),this.getText(),s&&this.getRotateControl()),!c&&this.getAnchors());return y?(l&&d&&this.stepDrag.setStep(f*p),_=Object(et.g)("g",nb({className:"".concat(this.getStateClassName()," ").concat(m),onMouseDown:this.handleMouseDown,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},O),j)):_=Object(et.g)("g",nb({className:"".concat(this.getStateClassName()," ").concat(m)},O),j),_}}])&&ab(e.prototype,r),n&&ab(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(et.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},hb(t)}function vb(){return vb=Object.assign?Object.assign.bind():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},vb.apply(this,arguments)}function bb(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==hb(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==hb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===hb(i)?i:String(i)),n)}var o,i}function gb(t,e){return gb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},gb(t,e)}function mb(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=Ob(t);if(e){var o=Ob(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(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)}(this,r)}}function Ob(t){return Ob=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ob(t)}var wb=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gb(t,e)}(i,t);var e,r,n,o=mb(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(et.g)(hf,vb({},e,{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&bb(e.prototype,r),n&&bb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(db);function _b(t){return _b="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},_b(t)}function jb(){return jb=Object.assign?Object.assign.bind():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},jb.apply(this,arguments)}function Sb(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==_b(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==_b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===_b(i)?i:String(i)),n)}var o,i}function xb(t,e){return xb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xb(t,e)}function Eb(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 function(t,e){if(e&&("object"===_b(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)}(this,r)}}function Pb(t){return Pb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pb(t)}var kb=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xb(t,e)}(i,t);var e,r,n,o=Eb(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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(et.g)(Tf,jb({},o,{x:e,y:r,r:n}))}}])&&Sb(e.prototype,r),n&&Sb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(db);function Ab(t){return Ab="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},Ab(t)}function Db(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Tb(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 Tb(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 Tb(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 Nb(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach((function(t){var e=Db(t,2),r=e[0],o=e[1];"object"!==Ab(o)&&(n[r]=o)})),n.className=r?"lf-basic-shape ".concat(r):"lf-basic-shape",n.points=e.map((function(t){return t.join(",")})).join(" "),Object(et.g)("polygon",n)}function Mb(t){return Mb="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},Mb(t)}function Cb(){return Cb=Object.assign?Object.assign.bind():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},Cb.apply(this,arguments)}function Rb(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==Mb(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Mb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===Mb(i)?i:String(i)),n)}var o,i}function Ib(t,e){return Ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ib(t,e)}function Lb(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=zb(t);if(e){var o=zb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Mb(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)}(this,r)}}function zb(t){return zb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zb(t)}var Bb=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ib(t,e)}(i,t);var e,r,n,o=Lb(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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,u=t.getNodeStyle(),a={transform:"matrix(1 0 0 1 ".concat(e-n/2," ").concat(r-o/2,")")};return Object(et.g)("g",a,Object(et.g)(Nb,Cb({},u,{points:i,x:e,y:r})))}}])&&Rb(e.prototype,r),n&&Rb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(db);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},Ub(t)}function Fb(){return Fb=Object.assign?Object.assign.bind():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},Fb.apply(this,arguments)}function Hb(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==Ub(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ub(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===Ub(i)?i:String(i)),n)}var o,i}function Xb(t,e){return Xb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xb(t,e)}function Gb(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=Yb(t);if(e){var o=Yb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(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)}(this,r)}}function Yb(t){return Yb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yb(t)}var Vb=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xb(t,e)}(i,t);var e,r,n,o=Gb(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(et.g)("g",null,Object(et.g)(Nb,Fb({},e,{points:t.points,x:t.x,y:t.y})))}}])&&Hb(e.prototype,r),n&&Hb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(db);function Wb(t){return Wb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wb(t)}function Kb(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return $b(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 $b(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 $b(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 qb(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.rx,u=void 0===i?4:i,a=t.ry,c=void 0===a?4:a,l=t.className,s={cx:r,cy:o,rx:u,ry:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=Kb(t,2),r=e[0],n=e[1];"object"!==Wb(n)&&(s[r]=n)})),s.className=l?"lf-basic-shape ".concat(l):"lf-basic-shape",Object(et.g)("ellipse",s)}function Zb(t){return Zb="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},Zb(t)}function Jb(){return Jb=Object.assign?Object.assign.bind():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},Jb.apply(this,arguments)}function Qb(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==Zb(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Zb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===Zb(i)?i:String(i)),n)}var o,i}function tg(t,e){return tg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tg(t,e)}function eg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rg(t);if(e){var o=rg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Zb(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)}(this,r)}}function rg(t){return rg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rg(t)}var ng=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tg(t,e)}(i,t);var e,r,n,o=eg(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(et.g)(qb,Jb({},e,{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&Qb(e.prototype,r),n&&Qb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(db);function og(t){return og="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},og(t)}function ig(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 ug(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ig(Object(r),!0).forEach((function(e){ag(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ag(t,e,r){return(e=lg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cg(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,lg(n.key),n)}}function lg(t){var e=function(t,e){if("object"!==og(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==og(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===og(e)?e:String(e)}function sg(t,e){return sg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sg(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=pg(t);if(e){var o=pg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===og(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)}(this,r)}}function pg(t){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pg(t)}var yg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sg(t,e)}(i,t);var e,r,n,o=fg(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.width,n=t.height,o=t.x,i=t.y,u=ug(ug({},e.background),{},{x:o,y:i-1,width:r,height:n});return Object(et.g)(hf,u)}},{key:"getShape",value:function(){return Object(et.g)("g",null,this.getBackground())}}])&&cg(e.prototype,r),n&&cg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(db);function dg(t){return dg="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},dg(t)}function hg(){return hg=Object.assign?Object.assign.bind():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},hg.apply(this,arguments)}function vg(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,_g(n.key),n)}}function bg(t,e){return bg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bg(t,e)}function gg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Og(t);if(e){var o=Og(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===dg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return mg(t)}(this,r)}}function mg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Og(t){return Og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Og(t)}function wg(t,e,r){return(e=_g(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _g(t){var e=function(t,e){if("object"!==dg(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==dg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===dg(e)?e:String(e)}var jg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bg(t,e)}(i,t);var e,r,n,o=gg(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return wg(mg(t=o.call.apply(o,[this].concat(r))),"ref",void 0),wg(mg(t),"currentProperties",void 0),wg(mg(t),"preProperties",void 0),wg(mg(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.currentProperties)return this.preProperties=this.currentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.height,o=t.width,i=t.getNodeStyle();return this.currentProperties=JSON.stringify(t.properties),Object(et.g)("foreignObject",hg({},i,{x:e-o/2,y:r-n/2,width:o,height:n,ref:this.setRef}))}}])&&vg(e.prototype,r),n&&vg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(db);function Sg(t){return Sg="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},Sg(t)}function xg(){return xg=Object.assign?Object.assign.bind():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},xg.apply(this,arguments)}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 Pg(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 kg(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,Cg(n.key),n)}}function Ag(t,e){return Ag=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ag(t,e)}function Dg(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=Ng(t);if(e){var o=Ng(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Sg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Tg(t)}(this,r)}}function Tg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ng(t){return Ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ng(t)}function Mg(t,e,r){return(e=Cg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cg(t){var e=function(t,e){if("object"!==Sg(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Sg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Sg(e)?e:String(e)}var Rg=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ag(t,e)}(i,t);var e,r,n,o=Dg(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),Mg(Tg(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHovered:!0})})),Mg(Tg(e),"setHoverOFF",(function(){e.setState({isHovered:!1})})),e.state={isHovered:!1},e}return e=i,(r=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.text,n=t.width,o=e.background||{};if(this.state.isHovered&&e.hover&&e.hover.background&&(o=Pg(Pg({},o),e.hover.background)),r&&r.value&&"transparent"!==o.fill){var i,u=e.fontSize,a=e.overflowMode,c=e.lineHeight,l=e.wrapPadding,s=e.textWidth,f=r.value,p=r.x,y=r.y,d=String(f).split(/[\r\n]/g),h=d.length;if("autoWrap"===a&&s){var v=Ku({rows:d,style:{fontSize:"".concat(u,"px"),width:"".concat(s,"px"),lineHeight:c,padding:l},rowsLength:h,className:"lf-get-text-height"});i=Pg(Pg({},o),{},{x:p-1,y:y-1,width:s,height:v})}else{var b=0;d&&d.forEach((function(t){var e=Mc(t);b=e>b?e:b}));var g=$u({rows:d,fontSize:u,rowsLength:h}),m=g.width,O=g.height;if("ellipsis"===a&&(m=s||n,O=u+2),"string"==typeof o.wrapPadding){var w=o.wrapPadding.split(",").filter((function(t){return t.trim()})).map((function(t){return parseFloat(t.trim())}));w.length>0&&w.length<=4&&(1===w.length?w=[w[0],w[0],w[0],w[0]]:2===w.length?w=[w[0],w[1],w[0],w[1]]:3===w.length&&(w=[w[0],w[1],w[2],w[1]]),m+=w[1]+w[3],O+=w[0]+w[2],p+=(w[1]-w[3])/2,y+=(w[2]-w[0])/2)}i=Pg(Pg({},o),{},{x:p-1,y:y-1,width:m,height:O})}return Object(et.g)(hf,i)}}},{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=Pg({x:n,y:o,className:"lf-element-text",value:r},t.getTextStyle());return Object(et.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(et.g)(Dv,xg({},i,{model:t})))}}}])&&kg(e.prototype,r),n&&kg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(Hv),Ig=["text","sourceAnchorId","targetAnchorId"];function Lg(t){return Lg="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},Lg(t)}function zg(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 Bg(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zg(Object(r),!0).forEach((function(e){Kg(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zg(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ug(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Fg(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Hg(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 Hg(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 Hg(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 Xg(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,$g(n.key),n)}}function Gg(t,e){return Gg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gg(t,e)}function Yg(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=Wg(t);if(e){var o=Wg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Lg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vg(t)}(this,r)}}function Vg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wg(t){return Wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wg(t)}function Kg(t,e,r){return(e=$g(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $g(t){var e=function(t,e){if("object"!==Lg(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Lg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lg(e)?e:String(e)}var qg=function(t){return t.SOURCE="SOURCE",t.TARGET="TARGET",t}(qg||{}),Zg=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gg(t,e)}(i,t);var e,r,n,o=Yg(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),Kg(Vg(e=o.call(this)),"stepDragData",void 0),Kg(Vg(e),"stepDrag",void 0),Kg(Vg(e),"oldEdge",void 0),Kg(Vg(e),"preTargetNode",void 0),Kg(Vg(e),"targetRuleResults",void 0),Kg(Vg(e),"sourceRuleResults",void 0),Kg(Vg(e),"handleMouseDown",(function(t){e.stepDrag&&e.stepDrag.handleMouseDown(t)})),Kg(Vg(e),"onDragStart",(function(){var t=e.props,r=t.x,n=t.y,o=t.edgeModel,i=o.startPoint,u=o.endPoint,a=o.pointsList;e.oldEdge={startPoint:i,endPoint:u,pointsList:a},e.setState({endX:r,endY:n,dragging:!0})})),Kg(Vg(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.state,i=o.endX,u=o.endY,a=e.props,c=a.graphModel,l=a.type,s=c.transformModel,f=c.editConfigModel,p=Fg(s.moveCanvasPointByHtml([i,u],r,n),2),y=p[0],d=p[1];e.setState({endX:y,endY:d,dragging:!0});var h=e.props.edgeModel,v=Iu({x:i,y:u},c);if(v&&v.node&&e.isAllowAdjust(v).pass){var b,g=h.startPoint,m=h.endPoint,O=h.sourceNode,w=h.targetNode;l===qg.SOURCE?b={startPoint:{x:v.anchor.x,y:v.anchor.y},endPoint:{x:m.x,y:m.y},sourceNode:v.node,targetNode:w}:l===qg.TARGET&&(b={startPoint:{x:g.x,y:g.y},endPoint:{x:v.anchor.x,y:v.anchor.y},sourceNode:O,targetNode:v.node}),h.updateAfterAdjustStartAndEnd(b)}else l===qg.SOURCE?h.updateStartPoint({x:y,y:d}):l===qg.TARGET&&h.updateEndPoint({x:y,y:d});h.text.value&&f.adjustEdge&&h.setText(Object.assign({},h.text,h.textPosition))})),Kg(Vg(e),"onDragEnd",(function(t){var r=t.event;try{var n;e.setState({dragging:!1});var o=e.props,i=o.graphModel,u=o.edgeModel,a=o.type,c=e.state,l=c.endX,s=c.endY,f=c.dragging,p=Iu({x:l,y:s},i);if(!f)return;var y,d=!1;if(p&&p.node){var h=e.isAllowAdjust(p),v=h.pass,b=h.msg,g=h.newTargetNode;if(v){var m=u.getData(),O=m.text,w=m.sourceAnchorId,_=void 0===w?"":w,j=m.targetAnchorId;if(y=Bg(Bg({sourceAnchorId:_,targetAnchorId:void 0===j?"":j},Ug(m,Ig)),{},{text:(null==O?void 0:O.value)||""}),a===qg.SOURCE)y=Bg(Bg({},i.edgeGenerator(i.getNodeModelById(p.node.id).getData(),i.getNodeModelById(u.targetNodeId).getData(),y)),{},{sourceNodeId:p.node.id,sourceAnchorId:p.anchor.id,startPoint:{x:p.anchor.x,y:p.anchor.y},targetNodeId:u.targetNodeId,endPoint:Bg({},u.endPoint)}),u.sourceNodeId===p.node.id&&u.sourceAnchorId===p.anchor.id&&(d=!0);else if(a===qg.TARGET){y=Bg(Bg({},i.edgeGenerator(i.getNodeModelById(u.sourceNodeId).getData(),i.getNodeModelById(p.node.id).getData(),y)),{},{sourceNodeId:u.sourceNodeId,startPoint:Bg({},u.startPoint),targetNodeId:p.node.id,targetAnchorId:p.anchor.id,endPoint:{x:p.anchor.x,y:p.anchor.y}}),u.targetNodeId===p.node.id&&u.targetAnchorId===p.anchor.id&&(d=!0)}}else{d=!0;var S=g.getData();i.eventCenter.emit(ko.CONNECTION_NOT_ALLOWED,{data:S,msg:b})}}else d=!0;if(d)e.recoveryEdge();else{var x=u.getData();i.deleteEdgeById(u.id);var E=i.addEdge(Bg({},y));i.eventCenter.emit(ko.EDGE_EXCHANGE_NODE,{data:{newEdge:E.getData(),oldEdge:x}})}null===(n=e.preTargetNode)||void 0===n||n.setElementState(xo.DEFAULT)}finally{e.props.graphModel.eventCenter.emit(ko.ADJUST_POINT_DRAGEND,{e:r,data:e.stepDragData})}})),Kg(Vg(e),"recoveryEdge",(function(){var t=e.props.edgeModel,r=e.oldEdge,n=r.startPoint,o=r.endPoint,i=r.pointsList;t.updateStartPoint(n),t.updateEndPoint(o),t.modelType!==Eo.LINE_EDGE&&(t.pointsList=i,t.initPoints())})),Kg(Vg(e),"getAdjustPointStyle",(function(){var t=e.props,r=t.graphModel.theme;t.edgeModel;return r.edgeAdjust})),e.state={dragging:!1,endX:0,endY:0},e.targetRuleResults=new Map,e.sourceRuleResults=new Map;var r=t.type,n=t.edgeModel,u=t.graphModel.eventCenter;return e.stepDragData={type:r,edgeData:n.getData()},e.stepDrag=new Qc({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:u,data:e.stepDragData}),e}return e=i,(r=[{key:"isAllowAdjust",value:function(t){var e=this.props,r=e.edgeModel,n=r.id,o=r.sourceNode,i=r.targetNode,u=r.sourceAnchorId,a=r.targetAnchorId,c=e.type,l=null,s=null,f=null,p=null;if(c===qg.SOURCE?(l=t.node,s=i,f=t.anchor,p=i.getAnchorInfo(a)):(l=o,s=t.node,p=t.anchor,f=o.getAnchorInfo(u)),this.preTargetNode&&this.preTargetNode!==t.node&&this.preTargetNode.setElementState(xo.DEFAULT),this.preTargetNode=t.node,p.id===f.id)return{pass:!1,msg:"",newTargetNode:s};var y="".concat(l.id,"_").concat(s.id,"_").concat(f.id,"_").concat(p.id);if(!this.targetRuleResults.has(y)){var d=l.isAllowConnectedAsSource(s,f,p,n),h=s.isAllowConnectedAsTarget(l,f,p,n);this.sourceRuleResults.set(y,qu(d)),this.targetRuleResults.set(y,qu(h))}var v=this.sourceRuleResults.get(y),b=v.isAllPass,g=v.msg,m=this.targetRuleResults.get(y),O=m.isAllPass,w=m.msg,_=b&&O?xo.ALLOW_CONNECT:xo.NOT_ALLOW_CONNECT;return c===qg.SOURCE?l.setElementState(_):s.setElementState(_),{pass:b&&O,msg:w||g,newTargetNode:s}}},{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=t.getAdjustPointShape,o=t.edgeModel,i=this.state.dragging;return Object(et.g)("g",{pointerEvents:i?"none":"",onMouseDown:this.handleMouseDown},i?"":n(e,r,o))}}])&&Xg(e.prototype,r),n&&Xg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a);function Jg(t){return Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(t)}function Qg(){return Qg=Object.assign?Object.assign.bind():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},Qg.apply(this,arguments)}function tm(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return em(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 em(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 em(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 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,cm(n.key),n)}}function nm(t,e){return nm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nm(t,e)}function om(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=um(t);if(e){var o=um(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Jg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return im(t)}(this,r)}}function im(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function um(t){return um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},um(t)}function am(t,e,r){return(e=cm(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cm(t){var e=function(t,e){if("object"!==Jg(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Jg(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Jg(e)?e:String(e)}var lm=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nm(t,e)}(i,t);var e,r,n,o=om(i);function i(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return am(im(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),am(im(t),"contextMenuTime",void 0),am(im(t),"clickTimer",void 0),am(im(t),"textRef",Object(et.f)()),am(im(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.graphModel.eventCenter;o.setHovered(e);var u=e?ko.EDGE_MOUSEENTER:ko.EDGE_MOUSELEAVE,a=o.getData();i.emit(u,{data:a,e:r})})),am(im(t),"setHoverON",(function(e){t.props.model.isHovered||(t.textRef&&t.textRef.current&&t.textRef.current.setHoverON(),t.handleHover(!0,e))})),am(im(t),"setHoverOFF",(function(e){t.props.model.isHovered&&(t.textRef&&t.textRef.current&&t.textRef.current.setHoverOFF(),t.handleHover(!1,e))})),am(im(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,xo.SHOW_MENU,i.domOverlayPosition),t.toFront(),n.isSelected||o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();o.eventCenter.emit(ko.EDGE_CONTEXTMENU,{data:u,e:e,position:i})})),am(im(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime();var r=t.props,n=r.model,o=r.graphModel.eventCenter,i=ko.EDGE_MOUSEDOWN;o.emit(i,{data:n,e:e})})),am(im(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,u=null==o?void 0:o.getData(),a=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var c=i.editConfigModel,l=i.textEditElement;if(l&&l.id===o.id&&i.setElementStateById(o.id,xo.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,xo.TEXT_EDIT),o.modelType===Eo.POLYLINE_EDGE){var s=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,p=f.x,y=f.y,d=Fc({x:p,y:y},s.points);s.dbClickPosition=d}i.eventCenter.emit(ko.EDGE_DBCLICK,{data:u,e:e,position:a})}else i.eventCenter.emit(ko.ELEMENT_CLICK,{data:u,e:e,position:a}),i.eventCenter.emit(ko.EDGE_CLICK,{data:u,e:e,position:a});var h=i.editConfigModel;i.selectEdgeById(o.id,Ji(e,h)),t.toFront()}})),t}return e=i,(r=[{key:"getShape",value:function(){return Object(et.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===xo.TEXT_EDIT)return null;var n=!1,o=r.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(n=!0),Object(et.g)(Rg,{ref:this.textRef,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:"getLastTwoPoints",value:function(){var t=this.props.model;return[t.startPoint,t.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var t=this.props.model,e=t.id,r=t.getArrowStyle(),n=r.refY,o=void 0===n?0:n,i=r.refX,u=void 0===i?2:i,a=tm(this.getLastTwoPoints(),2),c=a[0],l=a[1],s="auto";return null!==c&&null!==l&&(s=Va(Ya({x:l.x-c.x,y:l.y-c.y,z:0}))),Object(et.g)("g",null,Object(et.g)("defs",null,Object(et.g)("marker",{id:"marker-start-".concat(e),refX:-u,refY:o,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(et.g)("marker",{id:"marker-end-".concat(e),refX:u,refY:o,overflow:"visible",orient:s,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var t=this.props.model.getArrowStyle();return t.stroke,t.strokeWidth,t.offset,t.verticalLength,Object(et.g)("path",null)}},{key:"getEndArrow",value:function(){var t=this.props.model.getArrowStyle(),e=t.stroke,r=t.strokeWidth,n=t.offset,o=t.verticalLength;return Object(et.g)("path",{stroke:e,fill:e,strokeWidth:r,transform:"rotate(180)",d:"M 0 0 L ".concat(n," -").concat(o," L ").concat(n," ").concat(o," Z")})}},{key:"getAdjustPointShape",value:function(t,e,r){var n=r.getAdjustPointStyle();return Object(et.g)(Tf,Qg({className:"lf-edge-adjust-point"},n,{x:t,y:e}))}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.getAdjustStart(),o=e.getAdjustEnd();return Object(et.g)("g",null,Object(et.g)(Zg,Qg({type:"SOURCE"},n,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:e,graphModel:r})),Object(et.g)(Zg,Qg({type:"TARGET"},o,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:e,graphModel:r})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(et.g)("g",null)}},{key:"getAppend",value:function(){return Object(et.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model,r=e.isSelected,n=e.isHitable,o=e.isShowAdjustPoint;return t.graphModel.animation,Object(et.g)("g",null,Object(et.g)("g",{className:["lf-edge",!n&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),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&&r?this.getAdjustPoints():"")}}])&&rm(e.prototype,r),n&&rm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a);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},sm(t)}function fm(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pm(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 pm(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 pm(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 ym=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=fm(t,2),n=r[0],o=r[1],i=sm(o);"style"!==n&&"object"===i||(e[n]=o)})),Object(et.g)("path",e)};r(258);function dm(t){return t.startsWith("#")?function(t){var e=t.replace("#","");3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);if(6===e.length)return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1};if(8===e.length)return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:parseFloat((parseInt(e.slice(6,8),16)/255).toFixed(2))};throw new Error("Invalid Hex color format")}(t):function(t){var e=t.substring(5,t.length-1).split(",").map((function(t){return parseFloat(t)}));return{r:e[0],g:e[1],b:e[2],a:e[3]}}(t)}var hm=function(t,e,r){for(var n=dm(t),o=dm(e),i=(o.r-n.r)/r,u=(o.g-n.g)/r,a=(o.b-n.b)/r,c=(o.a-n.a)/r,l=[],s=0;s<=r;s++){var f=Math.round(n.r+i*s),p=Math.round(n.g+u*s),y=Math.round(n.b+a*s),d=(n.a+c*s).toFixed(2),h="rgba(".concat(f,",").concat(p,",").concat(y,",").concat(d,")");l.push(h)}return l};function vm(t){return vm="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},vm(t)}function bm(){return bm=Object.assign?Object.assign.bind():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},bm.apply(this,arguments)}function gm(t){return function(t){if(Array.isArray(t))return mm(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return mm(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 mm(t,e)}(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 mm(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 Om(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==vm(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==vm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===vm(i)?i:String(i)),n)}var o,i}function wm(t,e){return wm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wm(t,e)}function _m(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=jm(t);if(e){var o=jm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===vm(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)}(this,r)}}function jm(t){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jm(t)}var Sm=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wm(t,e)}(i,t);var e,r,n,o=_m(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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.isAnimation,o=t.arrowConfig,i=t.properties,u=(i.lineBackgroundColor,i.lineBackStrokeWidth),a=void 0===u?2:u,c=i.lineBackgradient,l=i.lineBackgradientArr,s=t.getEdgeStyle(),f=t.getEdgeAnimationStyle(),p=f.strokeDasharray,y=f.stroke,d=f.strokeDashoffset,h=f.animationName,v=f.animationDuration,b=f.animationIterationCount,g=f.animationTimingFunction,m=f.animationDirection,O=[],w=null;if(c&&c.includes("linear-gradient"))for(var _=a,j=a,S=0;S<l.length;S++){var x=Math.floor(_*l[S].ratio),E=hm(l[S].beginColor,l[S].endColor,x),P=E.map((function(t,n){return Object(et.g)(Qs,{x1:e.x,y1:e.y,x2:r.x,y2:r.y,fill:"none",strokeWidth:j-n,stroke:t})}));O.push.apply(O,gm(P)),j-=E.length}else w=c;return[w?Object(et.g)(Qs,{x1:e.x,y1:e.y,x2:r.x,y2:r.y,fill:"none",strokeWidth:a,stroke:w}):null].concat(O,[Object(et.g)(Qs,bm({},s,{x1:e.x,y1:e.y,x2:r.x,y2:r.y},o,n?{strokeDasharray:p,stroke:y,style:{strokeDashoffset:d,animationName:h,animationDuration:v,animationIterationCount:b,animationTimingFunction:g,animationDirection:m}}:{}))])}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=Ic({start:e,end:r}),o=n.d,i=n.strokeWidth,u=n.fill,a=n.strokeDasharray,c=n.stroke;return Object(et.g)(ym,{d:o,fill:u,strokeWidth:i,stroke:c,strokeDasharray:a})}}])&&Om(e.prototype,r),n&&Om(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(lm);function xm(t){return xm="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},xm(t)}function Em(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pm(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 Pm(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 Pm(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 km=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=Em(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==xm(o)&&(e[n]=o)})),Object(et.g)("polyline",e)};function Am(t){return Am="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},Am(t)}function Dm(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 Tm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dm(Object(r),!0).forEach((function(e){Hm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nm(){return Nm=Object.assign?Object.assign.bind():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},Nm.apply(this,arguments)}function Mm(t){return function(t){if(Array.isArray(t))return Im(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Rm(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 Cm(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||Rm(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 Rm(t,e){if(t){if("string"==typeof t)return Im(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)?Im(t,e):void 0}}function Im(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 Lm(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,Xm(n.key),n)}}function zm(t,e){return zm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zm(t,e)}function Bm(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=Fm(t);if(e){var o=Fm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Am(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Um(t)}(this,r)}}function Um(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fm(t){return Fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fm(t)}function Hm(t,e,r){return(e=Xm(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xm(t){var e=function(t,e){if("object"!==Am(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Am(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Am(e)?e:String(e)}var Gm=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zm(t,e)}(i,t);var e,r,n,o=Bm(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),Hm(Um(t=o.call(this)),"drag",void 0),Hm(Um(t),"isDragging",void 0),Hm(Um(t),"isShowAdjustPointTemp",void 0),Hm(Um(t),"appendInfo",void 0),Hm(Um(t),"onDragStart",(function(){var e=t.props.model;e.dragAppendStart(),t.isShowAdjustPointTemp=e.isShowAdjustPoint,e.isShowAdjustPoint=!1})),Hm(Um(t),"onDragging",(function(e){var r=e.deltaX,n=e.deltaY,o=t.props,i=o.model,u=o.graphModel;t.isDragging=!0;var a=u.transformModel,c=u.editConfigModel,l=Cm(a.fixDeltaXY(r,n),2),s=l[0],f=l[1],p=i,y=c.adjustEdgeMiddle;t.appendInfo=y?p.dragAppendSimple(t.appendInfo,{x:s,y:f}):p.dragAppend(t.appendInfo,{x:s,y:f})})),Hm(Um(t),"onDragEnd",(function(){var e=t.props,r=e.model,n=e.graphModel.eventCenter,o=r;o.dragAppendEnd(),t.isDragging=!1,o.isShowAdjustPoint=t.isShowAdjustPointTemp,t.appendInfo=void 0,n.emit(ko.EDGE_ADJUST,{data:o.getData()})})),Hm(Um(t),"beforeDragStart",(function(e,r){r.dragAble&&t.drag.handleMouseDown(e),t.appendInfo=r})),t.drag=new Qc({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.points,r=t.isAnimation,n=t.arrowConfig,o=t.properties,i=(o.lineBackgroundColor,o.lineBackStrokeWidth),u=void 0===i?2:i,a=o.lineBackgradient,c=o.lineBackgradientArr,l=t.getEdgeStyle(),s=t.getEdgeAnimationStyle(),f=s.strokeDasharray,p=s.stroke,y=s.strokeDashoffset,d=s.animationName,h=s.animationDuration,v=s.animationIterationCount,b=s.animationTimingFunction,g=s.animationDirection,m=[],O=null;if(a&&a.includes("linear-gradient"))for(var w=u,_=u,j=0;j<c.length;j++){var S=Math.floor(w*c[j].ratio),x=hm(c[j].beginColor,c[j].endColor,S),E=x.map((function(t,r){return Object(et.g)(km,{points:e,fill:"none",strokeWidth:_-r,stroke:t})}));m.push.apply(m,Mm(E)),_-=x.length}else O=a;return[O?Object(et.g)(km,{points:e,fill:"none",strokeWidth:u,stroke:O}):null].concat(m,[Object(et.g)(km,Nm({points:e},l,n,r?{strokeDasharray:f,stroke:p,style:{strokeDashoffset:y,animationName:d,animationDuration:h,animationIterationCount:v,animationTimingFunction:b,animationDirection:g}}:{}))])}},{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=Dc(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getLastTwoPoints",value:function(){var t=this.props.model.points,e=Dc(t);return e.length>=2?[e[e.length-2],e[e.length-1]]:[null,null]}},{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=Ua(Tm(Tm({},o),{},{type:"start"})),u=Ua(Tm(Tm({},o),{},{type:"end"})),a=i.leftX,c=i.leftY,l=u.rightX,s=u.rightY;e=a&&c&&l&&s?"M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(u.rightX," ").concat(u.rightY,"\n L").concat(u.leftX," ").concat(u.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,u=e.stroke;return Object(et.g)(ym,{d:r,fill:o,strokeWidth:n,stroke:u,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,u=[],a=o.length,c=function(){var e="lf-polyline-append",r={start:{x:o[l].x,y:o[l].y},end:{x:o[l+1].x,y:o[l+1].y},startIndex:l,endIndex:l+1,direction:"",dragAble:!0},c=Object(et.g)("g",{className:e},t.getAppendShape(r)),s=n.editConfigModel,f=s.adjustEdge,p=s.adjustEdgeMiddle;if(f&&i){var y=r.startIndex,d=r.endIndex,h=p&&(0===y||d===a-1);r.dragAble=!h,r.start.x===r.end.x?(r.dragAble&&(e+="-ew-resize"),r.direction=Ao.VERTICAL):r.start.y===r.end.y&&(r.dragAble&&(e+="-ns-resize"),r.direction=Ao.HORIZONTAL),c=Object(et.g)("g",{className:t.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,r)}},Object(et.g)("g",{className:e},t.getAppendShape(r)))}u.push(c)},l=0;l<a-1;l++)c();return Object(et.g)("g",null,u)}}])&&Lm(e.prototype,r),n&&Lm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(lm);function Ym(t){return Ym="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},Ym(t)}function Vm(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||$m(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 Wm(){return Wm=Object.assign?Object.assign.bind():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},Wm.apply(this,arguments)}function Km(t){return function(t){if(Array.isArray(t))return qm(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$m(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 $m(t,e){if(t){if("string"==typeof t)return qm(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)?qm(t,e):void 0}}function qm(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 Zm(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==Ym(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ym(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===Ym(i)?i:String(i)),n)}var o,i}function Jm(t,e){return Jm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jm(t,e)}function Qm(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=tO(t);if(e){var o=tO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Ym(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)}(this,r)}}function tO(t){return tO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tO(t)}var eO=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jm(t,e)}(i,t);var e,r,n,o=Qm(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle(),r=t.path,n=t.isAnimation,o=t.arrowConfig,i=t.properties,u=(i.lineBackgroundColor,i.lineBackStrokeWidth),a=void 0===u?2:u,c=i.lineBackgradient,l=i.lineBackgradientArr,s=t.getEdgeAnimationStyle(),f=s.strokeDasharray,p=s.stroke,y=s.strokeDashoffset,d=s.animationName,h=s.animationDuration,v=s.animationIterationCount,b=s.animationTimingFunction,g=s.animationDirection,m=[],O=null;if(c&&c.includes("linear-gradient"))for(var w=a,_=a,j=0;j<l.length;j++){var S=Math.floor(w*l[j].ratio),x=generateGradientColors(l[j].beginColor,l[j].endColor,S),E=x.map((function(t,e){return Object(et.g)(ym,{d:r,fill:"none",strokeWidth:_-e,stroke:t})}));m.push.apply(m,Km(E)),_-=x.length}else O=c;return[O?Object(et.g)(ym,{d:r,fill:"none",strokeWidth:a,stroke:O}):null].concat(m,[Object(et.g)(ym,Wm({d:r},e,o,n?{strokeDasharray:f,stroke:p,style:{strokeDashoffset:y,animationName:d,animationDuration:h,animationIterationCount:v,animationTimingFunction:b,animationDirection:g}}:{}))])}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return Object(et.g)(ym,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,r=t.isSelected,n=t.getArrowStyle().offset,o=t.pointsList.map((function(t){return{x:t.x,y:t.y}})),i=Vm(Uc(o,n),2);return{start:i[0],end:i[1],hover:e,isSelected:r}}},{key:"getLastTwoPoints",value:function(){var t=this.props.model,e=t.getArrowStyle().offset,r=t.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Uc(r,e)}}])&&Zm(e.prototype,r),n&&Zm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(lm);function rO(t){return rO="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},rO(t)}function nO(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 oO(t,e,r){return(e=uO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iO(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,uO(n.key),n)}}function uO(t){var e=function(t,e){if("object"!==rO(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==rO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===rO(e)?e:String(e)}function aO(t,e){return aO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},aO(t,e)}function cO(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=lO(t);if(e){var o=lO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===rO(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)}(this,r)}}function lO(t){return lO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lO(t)}var sO=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&aO(t,e)}(i,t);var e,r,n,o=cO(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(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"},u=Ua(i),a=u.leftX,c=u.leftY,l=u.rightX,s=u.rightY;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?nO(Object(r),!0).forEach((function(e){oO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):nO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(a," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(l," ").concat(s," z")},r)}},{key:"getShape",value:function(){var t=this.getArrowAttributes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Object(et.g)(ym,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(et.g)("g",{className:"lf-arrow"},this.getShape())}}],r&&iO(e.prototype,r),n&&iO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a);function fO(t){return fO="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},fO(t)}function pO(){return pO=Object.assign?Object.assign.bind():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},pO.apply(this,arguments)}function yO(t){return function(t){if(Array.isArray(t))return dO(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return dO(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 dO(t,e)}(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 dO(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 hO(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,(o=n.key,i=void 0,i=function(t,e){if("object"!==fO(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==fO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===fO(i)?i:String(i)),n)}var o,i}function vO(t,e){return vO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vO(t,e)}function bO(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=gO(t);if(e){var o=gO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===fO(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)}(this,r)}}function gO(t){return gO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gO(t)}var mO=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vO(t,e)}(i,t);var e,r,n,o=bO(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this)}return e=i,(r=[{key:"getText",value:function(){return null}},{key:"getEdge",value:function(){var t=this.props.model,e=t.points,r=t.isAnimation,n=t.arrowConfig,o=t.properties,i=(o.lineBackgroundColor,o.lineBackStrokeWidth),u=void 0===i?2:i,a=o.lineBackgradient,c=o.lineBackgradientArr,l=t.getEdgeStyle(),s=t.getEdgeAnimationStyle(),f=s.strokeDasharray,p=s.stroke,y=s.strokeDashoffset,d=s.animationName,h=s.animationDuration,v=s.animationIterationCount,b=s.animationTimingFunction,g=s.animationDirection,m=[],O=null;if(a&&a.includes("linear-gradient"))for(var w=u,_=u,j=0;j<c.length;j++){var S=Math.floor(w*c[j].ratio),x=hm(c[j].beginColor,c[j].endColor,S),E=x.map((function(t,r){return Object(et.g)(km,{points:e,fill:"none",strokeWidth:_-r,stroke:t})}));m.push.apply(m,yO(E)),_-=x.length}else O=a;return[O?Object(et.g)(km,{points:e,fill:"none",strokeWidth:u,stroke:O}):null].concat(m,[Object(et.g)(km,pO({points:e},l,n,r?{strokeDasharray:f,stroke:p,style:{strokeDashoffset:y,animationName:d,animationDuration:h,animationIterationCount:v,animationTimingFunction:b,animationDirection:g}}:{}))])}},{key:"smoothPath",value:function(t,e){for(var r=[],n=[],o=0;o<t.length;o++){var i=t[o],u=t[(o+1)%t.length];if(0===o)r.push("M".concat(i.x,",").concat(i.y));else{var a=t[o-1];if(Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2))<=e)r.push("L".concat(i.x,",").concat(i.y));else{var c=i.x-a.x,l=i.y-a.y,s=Math.sqrt(Math.pow(c,2)+Math.pow(l,2)),f=c/s,p=l/s,y=u.x-i.x,d=u.y-i.y,h=Math.sqrt(Math.pow(y,2)+Math.pow(d,2)),v=y/h,b=d/h,g=i.x-e*f,m=i.y-e*p,O=i.x+e*v,w=i.y+e*b;o!==t.length-1?(r.push("L".concat(g,",").concat(m)),i.x&&i.y&&r.push("Q".concat(i.x,",").concat(i.y)),O&&w&&r.push("".concat(O,",").concat(w)),n.push("M".concat(g,",").concat(m)),i.x&&i.y&&n.push("Q".concat(i.x,",").concat(i.y)),O&&w&&n.push("".concat(O,",").concat(w))):r.push("L".concat(i.x,",").concat(i.y))}}}return{path:r.join(" "),cornerPath:n.join(" ")}}},{key:"getAppendWidth",value:function(){var t=this.props.model.pointsList,e=this.smoothPath(t,0).path;return Object(et.g)("g",null,Object(et.g)("path",{d:e,strokeWidth:"10",stroke:"transparent",fill:"none",class:"edge-move-append"}))}}])&&hO(e.prototype,r),n&&hO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(lm);function OO(t){return OO="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},OO(t)}function wO(t){return function(t){if(Array.isArray(t))return PO(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||EO(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 _O(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 jO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_O(Object(r),!0).forEach((function(e){SO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_O(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function SO(t,e,r){return(e=AO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xO(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||EO(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 EO(t,e){if(t){if("string"==typeof t)return PO(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)?PO(t,e):void 0}}function PO(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 kO(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,AO(n.key),n)}}function AO(t){var e=function(t,e){if("object"!==OO(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==OO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===OO(e)?e:String(e)}function DO(t,e){return DO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},DO(t,e)}function TO(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=NO(t);if(e){var o=NO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===OO(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)}(this,r)}}function NO(t){return NO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},NO(t)}var MO=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&DO(t,e)}(i,t);var e,r,n,o=TO(i);function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this)}return e=i,(r=[{key:"getText",value:function(){return null}},{key:"pointFilter",value:function(t){for(var e=t,r=1;r<e.length-1;){var n=xO(e[r-1],2),o=n[0],i=n[1],u=xO(e[r],2),a=u[0],c=u[1],l=xO(e[r+1],2),s=l[0],f=l[1];o===a&&a===s||i===c&&c===f?e.splice(r,1):r++}return e}},{key:"smoothPath",value:function(t,e){for(var r=[],n=[],o=0;o<t.length;o++){var i=t[o],u=t[(o+1)%t.length];if(0===o)r.push("M".concat(i.x,",").concat(i.y));else{var a=t[o-1];if(Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2))<=e)r.push("L".concat(i.x,",").concat(i.y));else{var c=i.x-a.x,l=i.y-a.y,s=Math.sqrt(Math.pow(c,2)+Math.pow(l,2)),f=c/s,p=l/s,y=u.x-i.x,d=u.y-i.y,h=Math.sqrt(Math.pow(y,2)+Math.pow(d,2)),v=y/h,b=d/h,g=i.x-e*f,m=i.y-e*p,O=i.x+e*v,w=i.y+e*b;o!==t.length-1?(r.push("L".concat(g,",").concat(m)),i.x&&i.y&&r.push("Q".concat(i.x,",").concat(i.y)),O&&w&&r.push("".concat(O,",").concat(w)),n.push("M".concat(g,",").concat(m)),i.x&&i.y&&n.push("Q".concat(i.x,",").concat(i.y)),O&&w&&n.push("".concat(O,",").concat(w))):r.push("L".concat(i.x,",").concat(i.y))}}}return{path:r.join(" "),cornerPath:n.join(" ")}}},{key:"getEdge",value:function(){var t=this.props.model,e=(t.points,t.pointsList),r=t.isAnimation,n=t.arrowConfig,o=t.properties,i=o.animationDuration,u=void 0===i?"10s":i,a=(o.lineBackgroundColor,o.lineBackStrokeWidth),c=void 0===a?2:a,l=o.lineBackgradient,s=o.lineBackgradientArr,f=o.showCorner,p=void 0!==f&&f,y=o.cornerWidth,d=void 0===y?15:y,h=o.cornerBack,v=void 0===h?"red":h,b=o.radius,g=void 0===b?5:b,m=o.animationStyle,O=o.circlePointWidth,w=o.circlePointMoving,_=o.circlePointBackground,j=t.getEdgeStyle(),S=t.getEdgeAnimationStyle(),x=this.smoothPath(e,g),E=x.path,P=x.cornerPath,k=jO(jO(jO({d:E,style:r?S:{}},j),n),{},{fill:"none"}),A=[];p&&A.push(Object(et.g)("path",{d:P,fill:"transparent",stroke:v,strokeWidth:d}));var D=[],T=null;if(l&&l.includes("linear-gradient"))for(var N=c,M=c,C=0;C<s.length;C++){var R=Math.floor(N*s[C].ratio),I=hm(s[C].beginColor,s[C].endColor,R),L=I.map((function(t,e){return Object(et.g)("path",{d:E,fill:"none",strokeWidth:M-e,stroke:t})}));D.push.apply(D,wO(L)),M-=I.length}else T=l;return[Object(et.g)("path",{d:E,fill:"none",strokeWidth:c,stroke:T})].concat(D,[Object(et.g)("path",jO({d:E},k))],A,["waterPoint"===m&&w?Object(et.g)("circle",{cx:0,cy:0,r:O/2,fill:_},Object(et.g)("animateMotion",{path:E,dur:u,repeatCount:"indefinite",fill:"remove",rotate:"auto"})):null])}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=t.pointsList,r=t.properties,n=r.radius,o=void 0===n?5:n,i=(r.animationStyle,t.getEdgeStyle(),this.smoothPath(e,o).path);return Object(et.g)("g",null,Object(et.g)("path",{d:i,strokeWidth:"10",stroke:"transparent",fill:"none",class:"edge-move-append"}))}}])&&kO(e.prototype,r),n&&kO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(lm);var CO=function(t,e){return Mr(t,e)};var RO=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},IO=function(){return bt.a.Date.now()},LO=/\s/;var zO=function(t){for(var e=t.length;e--&&LO.test(t.charAt(e)););return e},BO=/^\s+/;var UO=function(t){return t?t.slice(0,zO(t)+1).replace(BO,""):t},FO=/^[-+]0x[0-9a-f]+$/i,HO=/^0b[01]+$/i,XO=/^0o[0-7]+$/i,GO=parseInt;var YO=function(t){if("number"==typeof t)return t;if(Br(t))return NaN;if(kt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=kt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=UO(t);var r=HO.test(t);return r||XO.test(t)?GO(t.slice(2),r?2:8):FO.test(t)?NaN:+t},VO=Math.max,WO=Math.min;var KO=function(t,e,r){var n,o,i,u,a,c,l=0,s=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var r=n,i=o;return n=o=void 0,l=e,u=t.apply(i,r)}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=i}function h(){var t=IO();if(d(t))return v(t);a=setTimeout(h,function(t){var r=e-(t-c);return f?WO(r,i-(t-l)):r}(t))}function v(t){return a=void 0,p&&n?y(t):(n=o=void 0,u)}function b(){var t=IO(),r=d(t);if(n=arguments,o=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(h,e),s?y(t):u}(c);if(f)return clearTimeout(a),a=setTimeout(h,e),y(c)}return void 0===a&&(a=setTimeout(h,e)),u}return e=YO(e)||0,kt(r)&&(s=!!r.leading,i=(f="maxWait"in r)?VO(YO(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=o=a=void 0},b.flush=function(){return void 0===a?u:v(IO())},b},$O=r(198);function qO(t){return qO="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},qO(t)}function ZO(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,QO(n.key),n)}}function JO(t,e,r){return(e=QO(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function QO(t){var e=function(t,e){if("object"!==qO(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==qO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===qO(e)?e:String(e)}var tw,ew,rw=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),JO(this,"undos",[]),JO(this,"redos",[]),JO(this,"callbacks",[]),JO(this,"stopWatch",null),JO(this,"curData",null),JO(this,"maxSize",50),JO(this,"waitTime",100),JO(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){CO(RO(this.undos),t)||(this.undos.push(t),CO(this.curData,t)||(this.redos=[]),this.eventCenter.emit(ko.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=Ei(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=Ei(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object($O.a)(t,KO((function(){var r=t.modelToHistoryData();r&&e.add(r)}),this.waitTime))}}])&&ZO(e.prototype,r),n&&ZO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nw(t){return nw="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},nw(t)}function ow(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return iw(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 iw(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 iw(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 uw(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 aw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?uw(Object(r),!0).forEach((function(e){yw(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uw(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function cw(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,dw(n.key),n)}}function lw(t,e){return lw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lw(t,e)}function sw(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=pw(t);if(e){var o=pw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===nw(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fw(t)}(this,r)}}function fw(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pw(t){return pw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pw(t)}function yw(t,e,r){return(e=dw(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dw(t){var e=function(t,e){if("object"!==nw(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==nw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===nw(e)?e:String(e)}var hw,vw,bw=i_((ew=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lw(t,e)}(i,t);var e,r,n,o=sw(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),yw(fw(t=o.call(this)),"ref",Object(et.f)()),yw(fw(t),"__prevText",{type:"",text:"",id:""}),yw(fw(t),"keyupHandler",(function(e){var r=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&r.setElementState(0)})),yw(fw(t),"inputHandler",(function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;t.__prevText={type:n.type,text:r.replace(/(\r\n)+$|(\n)+$/,""),id:n.id}})),yw(fw(t),"keydownHandler",(function(t){t.stopPropagation()})),yw(fw(t),"confirmInput",(function(){var e=t.props.graphModel,r=e.textEditElement,n=e.eventCenter,o=document.querySelector(".lf-text-input");n.emit("text:edited",{id:r.id,value:o.innerText})})),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=o.inputText,u=r.textEditElement;if(u){var a;if((null===(a=u.text)||void 0===a||!a.value)&&u.BaseType===Po.EDGE){var c=u.text,l=u.textPosition,s=l.x,f=l.y;c.x=s,c.y=f,u.setText(c)}var p={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(u.BaseType===Po.EDGE){var y=o.edgeText,d=y.overflowMode,h=y.lineHeight,v=y.wrapPadding,b=y.textWidth;b&&"autoWrap"===d&&(e=aw(aw({},p),{},{width:b,minWidth:b,lineHeight:h,padding:v}))}else if(u.BaseType===Po.NODE){var g=o.nodeText,m=g.overflowMode,O=g.lineHeight,w=g.wrapPadding,_=g.textWidth,j=u,S=j.width,x=j.modelType;(x!==Eo.TEXT_NODE&&"autoWrap"===m||x===Eo.TEXT_NODE&&_)&&(e=aw(aw({},p),{},{width:_||S,minWidth:_||S,lineHeight:O,padding:w}))}var E=u.text,P=E.x,k=E.y,A=ow(n.CanvasPointToHtmlPoint([P,k]),2);return{style:aw(aw(aw({left:A[0],top:A[1],color:u.properties.fontColor},e),e),i)}}}}],(r=[{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(ko.TEXT_UPDATE,aw({},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(et.g)("div",{style:r,class:"lf-text-input-wrapper"},Object(et.g)("div",{contentEditable:!0,className:"lf-text-input",ref:this.ref,key:e.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},null===(t=e.text)||void 0===t?void 0:t.value),"custom-input-node"===e.type?Object(et.g)("div",{className:"lf-text-confirm",style:{left:"98%",top:0},onClick:this.confirmInput},"确认"):null):null}}])&&cw(e.prototype,r),n&&cw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a),yw(ew,"toolName","textEdit"),tw=ew))||tw,gw=function(t){var e=t.points,r=Dc(e),n=ac(r,8),o=n.x,i=n.y,u=n.width,a=n.height;return{x:o-u/2,y:i-a/2,x1:o+u/2,y1:i+a/2}},mw=function(t){return t.modelType===Eo.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,u=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-u/2,x1:n+i/2,y1:o+u/2}}(t):t.modelType===Eo.POLYLINE_EDGE?gw(t):t.modelType===Eo.BEZIER_EDGE?function(t){var e=t.path,r=zc(e),n=ac(r,8),o=n.x,i=n.y,u=n.width,a=n.height;return{x:o-u/2,y:i-a/2,x1:o+u/2,y1:i+a/2}}(t):t.modelType===Eo.PURE_POLYLINE_EDGE||t.modelType===Eo.PURE_CURVED_POLYLINE_EDGE?gw(t):void 0};function Ow(t){return Ow="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},Ow(t)}function ww(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){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||jw(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 _w(t){return function(t){if(Array.isArray(t))return Sw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||jw(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 jw(t,e){if(t){if("string"==typeof t)return Sw(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)?Sw(t,e):void 0}}function Sw(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 xw(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,Tw(n.key),n)}}function Ew(t,e){return Ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ew(t,e)}function Pw(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=Aw(t);if(e){var o=Aw(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===Ow(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return kw(t)}(this,r)}}function kw(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Aw(t){return Aw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Aw(t)}function Dw(t,e,r){return(e=Tw(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tw(t){var e=function(t,e){if("object"!==Ow(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Ow(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Ow(e)?e:String(e)}var Nw=i_((vw=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ew(t,e)}(i,t);var e,r,n,o=Pw(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),Dw(kw(e=o.call(this)),"stepDrag",void 0),Dw(kw(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),Dw(kw(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel,i=o.transformModel,u=o.getSelectElements(!0);o.moveNodes(u.nodes.map((function(t){return t.id})),r/i.SCALE_X,n/i.SCALE_X)})),Dw(kw(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.graphModel,o=r.graphModel,i=o.eventCenter,u=o.selectElements,a=n.getPointByClient({x:t.clientX,y:t.clientY}),c={nodes:[],edges:[]};_w(u.values()).forEach((function(t){t.BaseType===Po.NODE&&c.nodes.push(t.getData()),t.BaseType===Po.EDGE&&c.edges.push(t.getData())})),i.emit(ko.SELECTION_CONTEXTMENU,{data:c,e:t,position:a})}));var r=t.graphModel,n=r.gridSize,u=r.eventCenter;return e.stepDrag=new Qc({onDragging:e.onDragging,step:n,eventType:"SELECTION",eventCenter:u}),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,u=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===Po.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===Po.EDGE&&(e=mw(t)),n=Math.min(n,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),u=Math.max(u,e.y1)}));var a=ww(r.CanvasPointToHtmlPoint([n,o]),2);n=a[0],o=a[1];var c=ww(r.CanvasPointToHtmlPoint([i,u]),2);i=c[0],u=c[1];var l={left:"".concat(n-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-n+20,"px"),height:"".concat(u-o+20,"px")};return Object(et.g)("div",{className:"lf-multiple-select",style:l,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&xw(e.prototype,r),n&&xw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(et.a),Dw(vw,"toolName","multipleSelect"),hw=vw))||hw;function Mw(t){return Mw="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},Mw(t)}function Cw(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,Iw(n.key),n)}}function Rw(t,e,r){return(e=Iw(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Iw(t){var e=function(t,e){if("object"!==Mw(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Mw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mw(e)?e:String(e)}var Lw=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Rw(this,"tools",void 0),Rw(this,"components",void 0),Rw(this,"toolMap",new Map),Rw(this,"instance",void 0),this.instance=e,this.isDisabledTool(bw.toolName)||this.registerTool(bw.toolName,bw),this.isDisabledTool(Nw.toolName)||this.registerTool(Nw.toolName,Nw);var r=e.graphModel;r.eventCenter.on("".concat(ko.GRAPH_TRANSFORM,",").concat(ko.NODE_CLICK,",").concat(ko.BLANK_CLICK," "),(function(){var t=r.textEditElement,e=r.editConfigModel,n=e.edgeTextEdit,o=e.nodeTextEdit;(n||o)&&t&&r.textEditElement.setElementState(xo.DEFAULT)}))}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}}])&&Cw(e.prototype,r),n&&Cw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),zw=r(199),Bw=r.n(zw);function Uw(t){return Uw="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},Uw(t)}function Fw(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,Xw(n.key),n)}}function Hw(t,e,r){return(e=Xw(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xw(t){var e=function(t,e){if("object"!==Uw(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Uw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Uw(e)?e:String(e)}var Gw=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Hw(this,"mousetrap",void 0),Hw(this,"options",void 0),Hw(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new Bw.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(ke(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")}}])&&Fw(e.prototype,r),n&&Fw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Yw=Gw,Vw=null;function Ww(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Kw(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}var $w=40,qw=40;function Zw(t){return Zw="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},Zw(t)}function Jw(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 Qw(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Jw(Object(r),!0).forEach((function(e){e_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Jw(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function t_(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,r_(n.key),n)}}function e_(t,e,r){return(e=r_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function r_(t){var e=function(t,e){if("object"!==Zw(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Zw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Zw(e)?e:String(e)}var n_=Symbol("plugin register by Logicflow.use"),o_=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),e_(this,"container",void 0),e_(this,"width",void 0),e_(this,"height",void 0),e_(this,"graphModel",void 0),e_(this,"history",void 0),e_(this,"viewMap",new Map),e_(this,"tool",void 0),e_(this,"keyboard",void 0),e_(this,"dnd",void 0),e_(this,"options",void 0),e_(this,"snaplineModel",void 0),e_(this,"components",[]),e_(this,"plugins",void 0),e_(this,"extension",{}),e_(this,"adapterIn",void 0),e_(this,"adapterOut",void 0),e_(this,"getView",(function(t){return o.viewMap.get(t)})),e=bp(e),this.options=e,this.container=this.initContainer(e.container),this.plugins=e.plugins,this.graphModel=new vs(Qw({},e)),this.tool=new Lw(this),this.history=new rw(this.graphModel.eventCenter),this.dnd=new vp({lf:this}),this.keyboard=new Yw({lf:this,keyboard:e.keyboard}),!1!==e.snapline&&(this.snaplineModel=new uv(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()}))),this.options.isSilentMode||(!function(t,e){var r=t.keyboard,n=r.options.keyboard;r.on(["cmd + c","ctrl + c"],(function(){if(qw=$w,!n.enabled)return!0;if(e.textEditElement)return!0;var r=t.options.guards,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)||0===o.nodes.length&&0===o.edges.length?(Vw=null,!0):((Vw=o).nodes.forEach((function(t){return Ww(t,$w)})),Vw.edges.forEach((function(t){return Kw(t,$w)})),!1)})),r.on(["cmd + v","ctrl + v"],(function(){if(!n.enabled)return!0;if(e.textEditElement)return!0;if(Vw&&(Vw.nodes||Vw.edges)){t.clearSelectElements();var r=t.addElements(Vw,qw);if(!r)return!0;r.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),r.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),Vw.nodes.forEach((function(t){return Ww(t,$w)})),Vw.edges.forEach((function(t){return Kw(t,$w)})),qw+=$w}return!1})),r.on(["cmd + z","ctrl + z"],(function(){return!n.enabled||!!e.textEditElement||(t.undo(),!1)})),r.on(["cmd + y","ctrl + y"],(function(){return!n.enabled||!!e.textEditElement||(t.redo(),!1)})),r.on(["backspace"],(function(){if(!n.enabled)return!0;if(e.textEditElement)return!0;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,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:lm,BaseEdgeModel:la,BaseNode:db,BaseNodeModel:td,RectNode:wb,RectNodeModel:Ph,CircleNode:kb,CircleNodeModel:vd,PolygonNode:Bb,PolygonNodeModel:dh,TextNode:yg,TextNodeModel:Uh,LineEdge:Sm,LineEdgeModel:Sa,DiamondNode:Vb,DiamondNodeModel:Rd,PolylineEdge:Gm,PolylineEdgeModel:Ba,BezierEdge:eO,BezierEdgeModel:Lp,EllipseNode:ng,EllipseNodeModel:Zd,HtmlNode:jg,HtmlNodeModel:Jh,h:et.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,u=o.model,a=i;r&&!a.isObervered&&(a.isObervered=!0,a=tt(a)),this.setView(t,a),this.graphModel.setModel(t,u)}else this.registerElement(t)}},{key:"registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=tt(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"batchRegister",value:function(){var t=this;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e){t.registerElement(e)}))}},{key:"defaultRegister",value:function(){this.registerElement({view:wb,model:Ph,type:"rect"}),this.registerElement({type:"circle",view:kb,model:vd}),this.registerElement({type:"polygon",view:Bb,model:dh}),this.registerElement({type:"line",view:Sm,model:Sa}),this.registerElement({type:"polyline",view:Gm,model:Ba}),this.registerElement({type:"bezier",view:eO,model:Lp}),this.registerElement({type:"text",view:yg,model:Uh}),this.registerElement({type:"ellipse",view:ng,model:Zd}),this.registerElement({type:"diamond",view:Vb,model:Rd}),this.registerElement({type:"html",view:jg,model:Jh})}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.graphModel.selectElementById(t,e),!e&&r&&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 u=r,a=u.x,c=u.y;e.focusOn(a,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),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.updateText(t,e)}},{key:"deleteElement",value:function(t){var e,r,n,o=this.getModelById(t);return!!o&&null!==(r=null===(n=(e_(e={},Po.NODE,this.deleteNode),e_(e,Po.EDGE,this.deleteEdge),e)[o.BaseType])||void 0===n?void 0:n.call(this,t))&&void 0!==r&&r}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getData()}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"changeEdgeType",value:function(t,e){this.graphModel.changeEdgeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko.NODE_ADD,r=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(t,e,r)}},{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){var e;return null===(e=this.graphModel.getNodeModelById(t))||void 0===e?void 0:e.getData()}},{key:"addEdge",value:function(t){return 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 u=[];return e.forEach((function(t){t.targetNodeId===n&&u.push(t)})),u}return[]}},{key:"getEdgeDataById",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(Zu(e))}},{key:"deleteProperty",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.deleteProperty(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:[]},u=0;u<r.length;u++){var a=r[u],c=a.id,l=this.addNode(a);if(!l)return;c&&(o[c]=l.id),i.nodes.push(l)}return n.forEach((function(t){var r=t.sourceNodeId,n=t.targetNodeId;o[r]&&(r=o[r]),o[n]&&(n=o[n]);var u=e.graphModel.addEdge(Qw(Qw({},t),{},{sourceNodeId:r,targetNodeId:n}));i.edges.push(u)})),i}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this.graphModel.getAreaElement(t,e,r,n,o).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();if(this.adapterOut){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.adapterOut.apply(this,[t].concat(r))}return 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=Zu(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=Zu(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:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t,e){void 0===e&&(e=t),this.graphModel.fitView(t,e)}},{key:"openEdgeAnimation",value:function(t){this.graphModel.openEdgeAnimation(t)}},{key:"closeEdgeAnimation",value:function(t){this.graphModel.closeEdgeAnimation(t)}},{key:"on",value:function(t,e){this.graphModel.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.graphModel.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.graphModel.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.graphModel.eventCenter.emit(t,e)}},{key:"initContainer",value:function(t){var e=document.createElement("div");return e.style.position="relative",e.style.width="100%",e.style.height="100%",t.innerHTML="",t.appendChild(e),e}},{key:"installPlugins",value:function(){var e,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(null!==(e=this.plugins)&&void 0!==e?e:t.extensions).forEach((function(t){var e=null,o=null;t[n_]?(e=t.extension,o=t.props):e=t;var i=e.pluginName||e.name;-1===n.indexOf(i)&&r.installPlugin(e,o)}))}},{key:"installPlugin",value:function(e,r){if("object"===Zw(e)){var n=e.install,o=e.render;return n&&n.call(e,this,t),o&&this.components.push(o.bind(e)),void(this.extension[e.pluginName]=e)}var i=e,u=new i({lf:this,LogicFlow:t,options:this.options.pluginsOptions,props:r});u.render&&this.components.push(u.render.bind(u)),this.extension[i.pluginName]=u}},{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(Qw(Qw({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(r),r}}},{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:"setGridVisible",value:function(t){if("[object Object]"===this.options.grid.toString()){var e=Qw(Qw({},this.options),{},{grid:Qw(Qw({},this.options.grid),{},{visible:t})});this.options=e}}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"renderRawData",value:function(t){this.graphModel.graphDataToModel(Zu(t)),!1!==this.options.history&&this.history.watch(this.graphModel),Object(et.j)(Object(et.g)(lp,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(ko.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t)}}],n=[{key:"use",value:function(t,e){var r,n,o=t.pluginName;o||(o=t.name);var i=null===(r=this.extensions.get(o))||void 0===r?void 0:r.extension;i&&i.destroy&&i.destroy(),this.extensions.set(o,(e_(n={},n_,n_),e_(n,"extension",t),e_(n,"props",e),n))}}],r&&t_(e.prototype,r),n&&t_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function i_(t){return tt(t)}e_(o_,"extensions",new Map);e.default=o_}])}));
|