2023-07-18 12:46:39 +08:00

80 lines
568 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{V as u1,d as Ru,r as jr,o as Fg,u as pn,c as Ai,n as co,h as Pr,F as Hg,y as Xg,g as ar,an as fg,j as Fo,w as Ho,J as pg,at as Gg,_ as hf,k as Ug,t as s1,f as uf,X as yf,i as dg,p as c1,m as l1}from"./index.js";import{u as f1}from"./hooks.js";import{V as p1}from"./styles.js";import{d as d1}from"./set-up.js";import"./vue.runtime.esm-bundler.js";const h1=[{incoming:[],outgoing:["Flow_33inf2k"],dockers:[],type:2,properties:{a:"efrwe",b:"wewe",name:"开始",x:280,y:200,text:{x:280,y:200,value:"开始"},logicFlowType:"bpmn:startEvent"},key:"Event_1d42u4p"},{incoming:["Flow_379e0o9"],outgoing:[],dockers:[],type:3,properties:{a:"efrwe",b:"wewe",name:"结束",x:920,y:200,text:{x:920,y:200,value:"结束"},logicFlowType:"bpmn:endEvent"},key:"Event_08p8i6q"},{incoming:["Flow_0pfouf0"],outgoing:["Flow_3918lhh"],dockers:[],type:6,properties:{a:"efrwe",b:"wewe",name:"网关",x:580,y:200,text:{x:580,y:200,value:"网关"},logicFlowType:"bpmn:exclusiveGateway"},key:"Gateway_1fngqgj"},{incoming:["Flow_33inf2k"],outgoing:["Flow_0pfouf0"],dockers:[],type:4,properties:{a:"efrwe",b:"wewe",name:"用户",x:420,y:200,text:{x:420,y:200,value:"用户"},logicFlowType:"bpmn:userTask"},key:"Activity_2mgtaia"},{incoming:["Flow_3918lhh"],outgoing:["Flow_379e0o9"],dockers:[],type:5,properties:{a:"efrwe",b:"wewe",name:"服务",x:760,y:200,text:{x:760,y:200,value:"服务"},logicFlowType:"bpmn:serviceTask"},key:"Activity_1sp8qc8"},{incoming:["Event_1d42u4p"],outgoing:["Activity_2mgtaia"],type:1,dockers:[],properties:{name:"边",text:{x:331,y:200,value:"边"},startPoint:{x:298,y:200},endPoint:{x:370,y:200},pointsList:[{x:298,y:200},{x:370,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_33inf2k"},{incoming:["Activity_2mgtaia"],outgoing:["Gateway_1fngqgj"],type:1,dockers:[],properties:{name:"边2",text:{x:507,y:200,value:"边2"},startPoint:{x:470,y:200},endPoint:{x:555,y:200},pointsList:[{x:470,y:200},{x:555,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_0pfouf0"},{incoming:["Gateway_1fngqgj"],outgoing:["Activity_1sp8qc8"],type:1,dockers:[],properties:{name:"边3",text:{x:664,y:200,value:"边3"},startPoint:{x:605,y:200},endPoint:{x:710,y:200},pointsList:[{x:605,y:200},{x:710,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_3918lhh"},{incoming:["Activity_1sp8qc8"],outgoing:["Event_08p8i6q"],type:1,dockers:[],properties:{name:"边4",text:{x:871,y:200,value:"边4"},startPoint:{x:810,y:200},endPoint:{x:902,y:200},pointsList:[{x:810,y:200},{x:902,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_379e0o9"}],y1={flowElementList:h1};var sf={exports:{}};(function(v,y){(function(s,p){v.exports=p()})(window,function(){return function(s){var p={};function i(l){if(p[l])return p[l].exports;var c=p[l]={i:l,l:!1,exports:{}};return s[l].call(c.exports,c,c.exports,i),c.l=!0,c.exports}return i.m=s,i.c=p,i.d=function(l,c,b){i.o(l,c)||Object.defineProperty(l,c,{enumerable:!0,get:b})},i.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},i.t=function(l,c){if(1&c&&(l=i(l)),8&c||4&c&&typeof l=="object"&&l&&l.__esModule)return l;var b=Object.create(null);if(i.r(b),Object.defineProperty(b,"default",{enumerable:!0,value:l}),2&c&&typeof l!="string")for(var _ in l)i.d(b,_,function(E){return l[E]}.bind(null,_));return b},i.n=function(l){var c=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(c,"a",c),c},i.o=function(l,c){return Object.prototype.hasOwnProperty.call(l,c)},i.p="",i(i.s=215)}([function(s,p,i){i.d(p,"a",function(){return Z}),i.d(p,"b",function(){return ie}),i.d(p,"c",function(){return Ce}),i.d(p,"d",function(){return Ke}),i.d(p,"e",function(){return B}),i.d(p,"f",function(){return ee}),i.d(p,"g",function(){return B}),i.d(p,"h",function(){return Pe}),i.d(p,"i",function(){return c}),i.d(p,"j",function(){return $e}),i.d(p,"k",function(){return F});var l,c,b,_,E,w,k,j={},P=[],D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function N(q,$){for(var ae in $)q[ae]=$[ae];return q}function L(q){var $=q.parentNode;$&&$.removeChild(q)}function B(q,$,ae){var Oe,ke,we,qe={};for(we in $)we=="key"?Oe=$[we]:we=="ref"?ke=$[we]:qe[we]=$[we];if(arguments.length>2&&(qe.children=arguments.length>3?l.call(arguments,2):ae),typeof q=="function"&&q.defaultProps!=null)for(we in q.defaultProps)qe[we]===void 0&&(qe[we]=q.defaultProps[we]);return X(q,qe,Oe,ke,null)}function X(q,$,ae,Oe,ke){var we={type:q,props:$,key:ae,ref:Oe,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:ke??++b};return ke==null&&c.vnode!=null&&c.vnode(we),we}function ee(){return{current:null}}function ie(q){return q.children}function Z(q,$){this.props=q,this.context=$}function V(q,$){if($==null)return q.__?V(q.__,q.__.__k.indexOf(q)+1):null;for(var ae;$<q.__k.length;$++)if((ae=q.__k[$])!=null&&ae.__e!=null)return ae.__e;return typeof q.type=="function"?V(q):null}function K(q){var $,ae;if((q=q.__)!=null&&q.__c!=null){for(q.__e=q.__c.base=null,$=0;$<q.__k.length;$++)if((ae=q.__k[$])!=null&&ae.__e!=null){q.__e=q.__c.base=ae.__e;break}return K(q)}}function z(q){(!q.__d&&(q.__d=!0)&&_.push(q)&&!M.__r++||w!==c.debounceRendering)&&((w=c.debounceRendering)||E)(M)}function M(){for(var q;M.__r=_.length;)q=_.sort(function($,ae){return $.__v.__b-ae.__v.__b}),_=[],q.some(function($){var ae,Oe,ke,we,qe,nt;$.__d&&(qe=(we=(ae=$).__v).__e,(nt=ae.__P)&&(Oe=[],(ke=N({},we)).__v=we.__v+1,ge(nt,we,ke,ae.__n,nt.ownerSVGElement!==void 0,we.__h!=null?[qe]:null,Oe,qe??V(we),we.__h),ue(Oe,we),we.__e!=qe&&K(we)))})}function I(q,$,ae,Oe,ke,we,qe,nt,Je,Ye){var ve,He,te,Le,ut,vt,it,yt=Oe&&Oe.__k||P,St=yt.length;for(ae.__k=[],ve=0;ve<$.length;ve++)if((Le=ae.__k[ve]=(Le=$[ve])==null||typeof Le=="boolean"?null:typeof Le=="string"||typeof Le=="number"||typeof Le=="bigint"?X(null,Le,null,null,Le):Array.isArray(Le)?X(ie,{children:Le},null,null,null):Le.__b>0?X(Le.type,Le.props,Le.key,null,Le.__v):Le)!=null){if(Le.__=ae,Le.__b=ae.__b+1,(te=yt[ve])===null||te&&Le.key==te.key&&Le.type===te.type)yt[ve]=void 0;else for(He=0;He<St;He++){if((te=yt[He])&&Le.key==te.key&&Le.type===te.type){yt[He]=void 0;break}te=null}ge(q,Le,te=te||j,ke,we,qe,nt,Je,Ye),ut=Le.__e,(He=Le.ref)&&te.ref!=He&&(it||(it=[]),te.ref&&it.push(te.ref,null,Le),it.push(He,Le.__c||ut,Le)),ut!=null?(vt==null&&(vt=ut),typeof Le.type=="function"&&Le.__k===te.__k?Le.__d=Je=C(Le,Je,q):Je=J(q,Le,te,yt,ut,Je),typeof ae.type=="function"&&(ae.__d=Je)):Je&&te.__e==Je&&Je.parentNode!=q&&(Je=V(te))}for(ae.__e=vt,ve=St;ve--;)yt[ve]!=null&&(typeof ae.type=="function"&&yt[ve].__e!=null&&yt[ve].__e==ae.__d&&(ae.__d=V(Oe,ve+1)),Se(yt[ve],yt[ve]));if(it)for(ve=0;ve<it.length;ve++)be(it[ve],it[++ve],it[++ve])}function C(q,$,ae){for(var Oe,ke=q.__k,we=0;ke&&we<ke.length;we++)(Oe=ke[we])&&(Oe.__=q,$=typeof Oe.type=="function"?C(Oe,$,ae):J(ae,Oe,Oe,ke,Oe.__e,$));return $}function F(q,$){return $=$||[],q==null||typeof q=="boolean"||(Array.isArray(q)?q.some(function(ae){F(ae,$)}):$.push(q)),$}function J(q,$,ae,Oe,ke,we){var qe,nt,Je;if($.__d!==void 0)qe=$.__d,$.__d=void 0;else if(ae==null||ke!=we||ke.parentNode==null)e:if(we==null||we.parentNode!==q)q.appendChild(ke),qe=null;else{for(nt=we,Je=0;(nt=nt.nextSibling)&&Je<Oe.length;Je+=2)if(nt==ke)break e;q.insertBefore(ke,we),qe=we}return qe!==void 0?qe:ke.nextSibling}function le(q,$,ae){$[0]==="-"?q.setProperty($,ae):q[$]=ae==null?"":typeof ae!="number"||D.test($)?ae:ae+"px"}function ce(q,$,ae,Oe,ke){var we;e:if($==="style")if(typeof ae=="string")q.style.cssText=ae;else{if(typeof Oe=="string"&&(q.style.cssText=Oe=""),Oe)for($ in Oe)ae&&$ in ae||le(q.style,$,"");if(ae)for($ in ae)Oe&&ae[$]===Oe[$]||le(q.style,$,ae[$])}else if($[0]==="o"&&$[1]==="n")we=$!==($=$.replace(/Capture$/,"")),$=$.toLowerCase()in q?$.toLowerCase().slice(2):$.slice(2),q.l||(q.l={}),q.l[$+we]=ae,ae?Oe||q.addEventListener($,we?xe:ye,we):q.removeEventListener($,we?xe:ye,we);else if($!=="dangerouslySetInnerHTML"){if(ke)$=$.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if($!=="href"&&$!=="list"&&$!=="form"&&$!=="tabIndex"&&$!=="download"&&$ in q)try{q[$]=ae??"";break e}catch{}typeof ae=="function"||(ae!=null&&(ae!==!1||$[0]==="a"&&$[1]==="r")?q.setAttribute($,ae):q.removeAttribute($))}}function ye(q){this.l[q.type+!1](c.event?c.event(q):q)}function xe(q){this.l[q.type+!0](c.event?c.event(q):q)}function ge(q,$,ae,Oe,ke,we,qe,nt,Je){var Ye,ve,He,te,Le,ut,vt,it,yt,St,Pt,at=$.type;if($.constructor!==void 0)return null;ae.__h!=null&&(Je=ae.__h,nt=$.__e=ae.__e,$.__h=null,we=[nt]),(Ye=c.__b)&&Ye($);try{e:if(typeof at=="function"){if(it=$.props,yt=(Ye=at.contextType)&&Oe[Ye.__c],St=Ye?yt?yt.props.value:Ye.__:Oe,ae.__c?vt=(ve=$.__c=ae.__c).__=ve.__E:("prototype"in at&&at.prototype.render?$.__c=ve=new at(it,St):($.__c=ve=new Z(it,St),ve.constructor=at,ve.render=Ie),yt&&yt.sub(ve),ve.props=it,ve.state||(ve.state={}),ve.context=St,ve.__n=Oe,He=ve.__d=!0,ve.__h=[]),ve.__s==null&&(ve.__s=ve.state),at.getDerivedStateFromProps!=null&&(ve.__s==ve.state&&(ve.__s=N({},ve.__s)),N(ve.__s,at.getDerivedStateFromProps(it,ve.__s))),te=ve.props,Le=ve.state,He)at.getDerivedStateFromProps==null&&ve.componentWillMount!=null&&ve.componentWillMount(),ve.componentDidMount!=null&&ve.__h.push(ve.componentDidMount);else{if(at.getDerivedStateFromProps==null&&it!==te&&ve.componentWillReceiveProps!=null&&ve.componentWillReceiveProps(it,St),!ve.__e&&ve.shouldComponentUpdate!=null&&ve.shouldComponentUpdate(it,ve.__s,St)===!1||$.__v===ae.__v){ve.props=it,ve.state=ve.__s,$.__v!==ae.__v&&(ve.__d=!1),ve.__v=$,$.__e=ae.__e,$.__k=ae.__k,$.__k.forEach(function(Nt){Nt&&(Nt.__=$)}),ve.__h.length&&qe.push(ve);break e}ve.componentWillUpdate!=null&&ve.componentWillUpdate(it,ve.__s,St),ve.componentDidUpdate!=null&&ve.__h.push(function(){ve.componentDidUpdate(te,Le,ut)})}ve.context=St,ve.props=it,ve.state=ve.__s,(Ye=c.__r)&&Ye($),ve.__d=!1,ve.__v=$,ve.__P=q,Ye=ve.render(ve.props,ve.state,ve.context),ve.state=ve.__s,ve.getChildContext!=null&&(Oe=N(N({},Oe),ve.getChildContext())),He||ve.getSnapshotBeforeUpdate==null||(ut=ve.getSnapshotBeforeUpdate(te,Le)),Pt=Ye!=null&&Ye.type===ie&&Ye.key==null?Ye.props.children:Ye,I(q,Array.isArray(Pt)?Pt:[Pt],$,ae,Oe,ke,we,qe,nt,Je),ve.base=$.__e,$.__h=null,ve.__h.length&&qe.push(ve),vt&&(ve.__E=ve.__=null),ve.__e=!1}else we==null&&$.__v===ae.__v?($.__k=ae.__k,$.__e=ae.__e):$.__e=he(ae.__e,$,ae,Oe,ke,we,qe,Je);(Ye=c.diffed)&&Ye($)}catch(Nt){$.__v=null,(Je||we!=null)&&($.__e=nt,$.__h=!!Je,we[we.indexOf(nt)]=null),c.__e(Nt,$,ae)}}function ue(q,$){c.__c&&c.__c($,q),q.some(function(ae){try{q=ae.__h,ae.__h=[],q.some(function(Oe){Oe.call(ae)})}catch(Oe){c.__e(Oe,ae.__v)}})}function he(q,$,ae,Oe,ke,we,qe,nt){var Je,Ye,ve,He=ae.props,te=$.props,Le=$.type,ut=0;if(Le==="svg"&&(ke=!0),we!=null){for(;ut<we.length;ut++)if((Je=we[ut])&&"setAttribute"in Je==!!Le&&(Le?Je.localName===Le:Je.nodeType===3)){q=Je,we[ut]=null;break}}if(q==null){if(Le===null)return document.createTextNode(te);q=ke?document.createElementNS("http://www.w3.org/2000/svg",Le):document.createElement(Le,te.is&&te),we=null,nt=!1}if(Le===null)He===te||nt&&q.data===te||(q.data=te);else{if(we=we&&l.call(q.childNodes),Ye=(He=ae.props||j).dangerouslySetInnerHTML,ve=te.dangerouslySetInnerHTML,!nt){if(we!=null)for(He={},ut=0;ut<q.attributes.length;ut++)He[q.attributes[ut].name]=q.attributes[ut].value;(ve||Ye)&&(ve&&(Ye&&ve.__html==Ye.__html||ve.__html===q.innerHTML)||(q.innerHTML=ve&&ve.__html||""))}if(function(vt,it,yt,St,Pt){var at;for(at in yt)at==="children"||at==="key"||at in it||ce(vt,at,null,yt[at],St);for(at in it)Pt&&typeof it[at]!="function"||at==="children"||at==="key"||at==="value"||at==="checked"||yt[at]===it[at]||ce(vt,at,it[at],yt[at],St)}(q,te,He,ke,nt),ve)$.__k=[];else if(ut=$.props.children,I(q,Array.isArray(ut)?ut:[ut],$,ae,Oe,ke&&Le!=="foreignObject",we,qe,we?we[0]:ae.__k&&V(ae,0),nt),we!=null)for(ut=we.length;ut--;)we[ut]!=null&&L(we[ut]);nt||("value"in te&&(ut=te.value)!==void 0&&(ut!==He.value||ut!==q.value||Le==="progress"&&!ut)&&ce(q,"value",ut,He.value,!1),"checked"in te&&(ut=te.checked)!==void 0&&ut!==q.checked&&ce(q,"checked",ut,He.checked,!1))}return q}function be(q,$,ae){try{typeof q=="function"?q($):q.current=$}catch(Oe){c.__e(Oe,ae)}}function Se(q,$,ae){var Oe,ke;if(c.unmount&&c.unmount(q),(Oe=q.ref)&&(Oe.current&&Oe.current!==q.__e||be(Oe,null,$)),(Oe=q.__c)!=null){if(Oe.componentWillUnmount)try{Oe.componentWillUnmount()}catch(we){c.__e(we,$)}Oe.base=Oe.__P=null}if(Oe=q.__k)for(ke=0;ke<Oe.length;ke++)Oe[ke]&&Se(Oe[ke],$,typeof q.type!="function");ae||q.__e==null||L(q.__e),q.__e=q.__d=void 0}function Ie(q,$,ae){return this.constructor(q,ae)}function $e(q,$,ae){var Oe,ke,we;c.__&&c.__(q,$),ke=(Oe=typeof ae=="function")?null:ae&&ae.__k||$.__k,we=[],ge($,q=(!Oe&&ae||$).__k=B(ie,null,[q]),ke||j,j,$.ownerSVGElement!==void 0,!Oe&&ae?[ae]:ke?null:$.firstChild?l.call($.childNodes):null,we,!Oe&&ae?ae:ke?ke.__e:$.firstChild,Oe),ue(we,q)}function Pe(q,$){$e(q,$,Pe)}function Ce(q,$,ae){var Oe,ke,we,qe=N({},q.props);for(we in $)we=="key"?Oe=$[we]:we=="ref"?ke=$[we]:qe[we]=$[we];return arguments.length>2&&(qe.children=arguments.length>3?l.call(arguments,2):ae),X(q.type,qe,Oe||q.key,ke||q.ref,null)}function Ke(q,$){var ae={__c:$="__cC"+k++,__:q,Consumer:function(Oe,ke){return Oe.children(ke)},Provider:function(Oe){var ke,we;return this.getChildContext||(ke=[],(we={})[$]=this,this.getChildContext=function(){return we},this.shouldComponentUpdate=function(qe){this.props.value!==qe.value&&ke.some(z)},this.sub=function(qe){ke.push(qe);var nt=qe.componentWillUnmount;qe.componentWillUnmount=function(){ke.splice(ke.indexOf(qe),1),nt&&nt.call(qe)}}),Oe.children}};return ae.Provider.__=ae.Consumer.contextType=ae}l=P.slice,c={__e:function(q,$){for(var ae,Oe,ke;$=$.__;)if((ae=$.__c)&&!ae.__)try{if((Oe=ae.constructor)&&Oe.getDerivedStateFromError!=null&&(ae.setState(Oe.getDerivedStateFromError(q)),ke=ae.__d),ae.componentDidCatch!=null&&(ae.componentDidCatch(q),ke=ae.__d),ke)return ae.__E=ae}catch(we){q=we}throw q}},b=0,Z.prototype.setState=function(q,$){var ae;ae=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=N({},this.state),typeof q=="function"&&(q=q(N({},ae),this.props)),q&&N(ae,q),q!=null&&this.__v&&($&&this.__h.push($),z(this))},Z.prototype.forceUpdate=function(q){this.__v&&(this.__e=!0,q&&this.__h.push(q),z(this))},Z.prototype.render=ie,_=[],E=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,M.__r=0,k=0},function(s,p,i){(function(l,c){i.d(p,"a",function(){return z}),i.d(p,"b",function(){return Jo}),i.d(p,"c",function(){return Ln}),i.d(p,"d",function(){return et}),i.d(p,"e",function(){return De}),i.d(p,"f",function(){return Me}),i.d(p,"g",function(){return Ve}),i.d(p,"h",function(){return Nr}),i.d(p,"i",function(){return Pt}),i.d(p,"j",function(){return ze}),i.d(p,"k",function(){return Vn}),i.d(p,"l",function(){return Ko}),i.d(p,"m",function(){return vt}),i.d(p,"n",function(){return Mr}),i.d(p,"o",function(){return C}),i.d(p,"p",function(){return Zi}),i.d(p,"q",function(){return Wn}),i.d(p,"r",function(){return $i}),i.d(p,"s",function(){return wn}),i.d(p,"t",function(){return $r}),i.d(p,"u",function(){return fo}),i.d(p,"v",function(){return Vu}),i.d(p,"w",function(){return qi}),i.d(p,"x",function(){return qr}),i.d(p,"y",function(){return Dn}),i.d(p,"z",function(){return It}),i.d(p,"A",function(){return yn}),i.d(p,"B",function(){return $n}),i.d(p,"C",function(){return Ye}),i.d(p,"D",function(){return Qi}),i.d(p,"E",function(){return Ar}),i.d(p,"F",function(){return Tr}),i.d(p,"G",function(){return Gu}),i.d(p,"H",function(){return Fi}),i.d(p,"I",function(){return $u}),i.d(p,"J",function(){return _n}),i.d(p,"K",function(){return ne}),i.d(p,"L",function(){return Zt}),i.d(p,"M",function(){return ea});var b=[];Object.freeze(b);var _={};function E(){return++Ge.mobxGuid}function w(h){throw k(!1,h),"X"}function k(h,g){if(!h)throw new Error("[mobx] "+(g||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(_);function j(h){var g=!1;return function(){if(!g)return g=!0,h.apply(this,arguments)}}var P=function(){};function D(h){return h!==null&&typeof h=="object"}function N(h){if(h===null||typeof h!="object")return!1;var g=Object.getPrototypeOf(h);return g===Object.prototype||g===null}function L(h,g,x){Object.defineProperty(h,g,{enumerable:!1,writable:!0,configurable:!0,value:x})}function B(h,g){var x="isMobX"+h;return g.prototype[x]=!0,function(A){return D(A)&&A[x]===!0}}function X(h){return h instanceof Map}function ee(h){return h instanceof Set}function ie(h){var g=new Set;for(var x in h)g.add(x);return Object.getOwnPropertySymbols(h).forEach(function(A){Object.getOwnPropertyDescriptor(h,A).enumerable&&g.add(A)}),Array.from(g)}function Z(h){return h&&h.toString?h.toString():new String(h).toString()}function V(h){return h===null?null:typeof h=="object"?""+h:h}var K=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:Object.getOwnPropertyNames,z=Symbol("mobx administration"),M=function(){function h(g){g===void 0&&(g="Atom@"+E()),this.name=g,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=He.NOT_TRACKING}return h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(g){return g()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(g){return g()})},h.prototype.reportObserved=function(){return zi(this)},h.prototype.reportChanged=function(){bn(),function(g){g.lowestObserverState!==He.STALE&&(g.lowestObserverState=He.STALE,g.observers.forEach(function(x){x.dependenciesState===He.UP_TO_DATE&&(x.isTracing!==te.NONE&&Yn(x,g),x.onBecomeStale()),x.dependenciesState=He.STALE}))}(this),mn()},h.prototype.toString=function(){return this.name},h}(),I=B("Atom",M);function C(h,g,x){g===void 0&&(g=P),x===void 0&&(x=P);var A,H=new M(h);return g!==P&&Gi("onBecomeObserved",H,g,A),x!==P&&Ar(H,x),H}var F={identity:function(h,g){return h===g},structural:function(h,g){return ei(h,g)},default:function(h,g){return Object.is(h,g)},shallow:function(h,g){return ei(h,g,1)}},J=function(h,g){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,A){x.__proto__=A}||function(x,A){for(var H in A)A.hasOwnProperty(H)&&(x[H]=A[H])},J(h,g)};/*! *****************************************************************************
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 le=function(){return le=Object.assign||function(h){for(var g,x=1,A=arguments.length;x<A;x++)for(var H in g=arguments[x])Object.prototype.hasOwnProperty.call(g,H)&&(h[H]=g[H]);return h},le.apply(this,arguments)};function ce(h){var g=typeof Symbol=="function"&&h[Symbol.iterator],x=0;return g?g.call(h):{next:function(){return h&&x>=h.length&&(h=void 0),{value:h&&h[x++],done:!h}}}}function ye(h,g){var x=typeof Symbol=="function"&&h[Symbol.iterator];if(!x)return h;var A,H,Q=x.call(h),pe=[];try{for(;(g===void 0||g-- >0)&&!(A=Q.next()).done;)pe.push(A.value)}catch(je){H={error:je}}finally{try{A&&!A.done&&(x=Q.return)&&x.call(Q)}finally{if(H)throw H.error}}return pe}function xe(){for(var h=[],g=0;g<arguments.length;g++)h=h.concat(ye(arguments[g]));return h}var ge=Symbol("mobx did run lazy initializers"),ue=Symbol("mobx pending decorators"),he={},be={};function Se(h,g){var x=g?he:be;return x[h]||(x[h]={configurable:!0,enumerable:g,get:function(){return Ie(this),this[h]},set:function(A){Ie(this),this[h]=A}})}function Ie(h){var g,x;if(h[ge]!==!0){var A=h[ue];if(A){L(h,ge,!0);var H=xe(Object.getOwnPropertySymbols(A),Object.keys(A));try{for(var Q=ce(H),pe=Q.next();!pe.done;pe=Q.next()){var je=A[pe.value];je.propertyCreator(h,je.prop,je.descriptor,je.decoratorTarget,je.decoratorArguments)}}catch(Fe){g={error:Fe}}finally{try{pe&&!pe.done&&(x=Q.return)&&x.call(Q)}finally{if(g)throw g.error}}}}}function $e(h,g){return function(){var x,A=function(H,Q,pe,je){if(je===!0)return g(H,Q,pe,H,x),null;if(!Object.prototype.hasOwnProperty.call(H,ue)){var Fe=H[ue];L(H,ue,le({},Fe))}return H[ue][Q]={prop:Q,propertyCreator:g,descriptor:pe,decoratorTarget:H,decoratorArguments:x},Se(Q,h)};return Pe(arguments)?(x=b,A.apply(null,arguments)):(x=Array.prototype.slice.call(arguments),A)}}function Pe(h){return(h.length===2||h.length===3)&&(typeof h[1]=="string"||typeof h[1]=="symbol")||h.length===4&&h[3]===!0}function Ce(h,g,x){return qr(h)?h:Array.isArray(h)?Ye.array(h,{name:x}):N(h)?Ye.object(h,void 0,{name:x}):X(h)?Ye.map(h,{name:x}):ee(h)?Ye.set(h,{name:x}):h}function Ke(h){return h}function q(h){k(h);var g=$e(!0,function(A,H,Q,pe,je){var Fe=Q?Q.initializer?Q.initializer.call(A):Q.value:void 0;Jr(A).addObservableProp(H,Fe,h)}),x=(l!==void 0&&l.env,g);return x.enhancer=h,x}var $={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function ae(h){return h==null?$:typeof h=="string"?{name:h,deep:!0,proxy:!0}:h}Object.freeze($);var Oe=q(Ce),ke=q(function(h,g,x){return h==null||yn(h)||Dn(h)||It(h)||hn(h)?h:Array.isArray(h)?Ye.array(h,{name:x,deep:!1}):N(h)?Ye.object(h,void 0,{name:x,deep:!1}):X(h)?Ye.map(h,{name:x,deep:!1}):ee(h)?Ye.set(h,{name:x,deep:!1}):w(!1)}),we=q(Ke),qe=q(function(h,g,x){return ei(h,g)?g:h});function nt(h){return h.defaultDecorator?h.defaultDecorator.enhancer:h.deep===!1?Ke:Ce}var Je={box:function(h,g){arguments.length>2&&ve("box");var x=ae(g);return new Mt(h,nt(x),x.name,!0,x.equals)},array:function(h,g){arguments.length>2&&ve("array");var x=ae(g);return Zo(h,nt(x),x.name)},map:function(h,g){arguments.length>2&&ve("map");var x=ae(g);return new Jo(h,nt(x),x.name)},set:function(h,g){arguments.length>2&&ve("set");var x=ae(g);return new yo(h,nt(x),x.name)},object:function(h,g,x){typeof arguments[1]=="string"&&ve("object");var A=ae(x);if(A.proxy===!1)return Wn({},h,g,A);var H=Ui(A),Q=Wn({},void 0,void 0,A),pe=qu(Q);return Yi(pe,h,g,H),pe},ref:we,shallow:ke,deep:Oe,struct:qe},Ye=function(h,g,x){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return Oe.apply(null,arguments);if(qr(h))return h;var A=N(h)?Ye.object(h,g,x):Array.isArray(h)?Ye.array(h,g):X(h)?Ye.map(h,g):ee(h)?Ye.set(h,g):h;if(A!==h)return A;w(!1)};function ve(h){w("Expected one or two arguments to observable."+h+". Did you accidentally try to use observable."+h+" as decorator?")}Object.keys(Je).forEach(function(h){return Ye[h]=Je[h]});var He,te,Le=$e(!1,function(h,g,x,A,H){var Q=x.get,pe=x.set,je=H[0]||{};Jr(h).addComputedProp(h,g,le({get:Q,set:pe,context:h},je))}),ut=Le({equals:F.structural}),vt=function(h,g,x){if(typeof g=="string"||h!==null&&typeof h=="object"&&arguments.length===1)return Le.apply(null,arguments);var A=typeof g=="object"?g:{};return A.get=h,A.set=typeof g=="function"?g:A.set,A.name=A.name||h.name||"",new Gn(A)};vt.struct=ut,function(h){h[h.NOT_TRACKING=-1]="NOT_TRACKING",h[h.UP_TO_DATE=0]="UP_TO_DATE",h[h.POSSIBLY_STALE=1]="POSSIBLY_STALE",h[h.STALE=2]="STALE"}(He||(He={})),function(h){h[h.NONE=0]="NONE",h[h.LOG=1]="LOG",h[h.BREAK=2]="BREAK"}(te||(te={}));var it=function(h){this.cause=h};function yt(h){return h instanceof it}function St(h){switch(h.dependenciesState){case He.UP_TO_DATE:return!1;case He.NOT_TRACKING:case He.STALE:return!0;case He.POSSIBLY_STALE:for(var g=Me(!0),x=Y(),A=h.observing,H=A.length,Q=0;Q<H;Q++){var pe=A[Q];if(Un(pe)){if(Ge.disableErrorBoundaries)pe.get();else try{pe.get()}catch{return se(x),De(g),!0}if(h.dependenciesState===He.STALE)return se(x),De(g),!0}}return Ue(h),se(x),De(g),!1}}function Pt(){return Ge.trackingDerivation!==null}function at(h){var g=h.observers.size>0;Ge.computationDepth>0&&g&&w(!1),Ge.allowStateChanges||!g&&Ge.enforceActions!=="strict"||w(!1)}function Nt(h,g,x){var A=Me(!0);Ue(h),h.newObserving=new Array(h.observing.length+100),h.unboundDepsCount=0,h.runId=++Ge.runId;var H,Q=Ge.trackingDerivation;if(Ge.trackingDerivation=h,Ge.disableErrorBoundaries===!0)H=g.call(x);else try{H=g.call(x)}catch(pe){H=new it(pe)}return Ge.trackingDerivation=Q,function(pe){for(var je=pe.observing,Fe=pe.observing=pe.newObserving,dt=He.UP_TO_DATE,ot=0,xt=pe.unboundDepsCount,ct=0;ct<xt;ct++)(_t=Fe[ct]).diffValue===0&&(_t.diffValue=1,ot!==ct&&(Fe[ot]=_t),ot++),_t.dependenciesState>dt&&(dt=_t.dependenciesState);for(Fe.length=ot,pe.newObserving=null,xt=je.length;xt--;)(_t=je[xt]).diffValue===0&&Ii(_t,pe),_t.diffValue=0;for(;ot--;){var _t;(_t=Fe[ot]).diffValue===1&&(_t.diffValue=0,Bu(_t,pe))}dt!==He.UP_TO_DATE&&(pe.dependenciesState=dt,pe.onBecomeStale())}(h),De(A),H}function G(h){var g=h.observing;h.observing=[];for(var x=g.length;x--;)Ii(g[x],h);h.dependenciesState=He.NOT_TRACKING}function ne(h){var g=Y();try{return h()}finally{se(g)}}function Y(){var h=Ge.trackingDerivation;return Ge.trackingDerivation=null,h}function se(h){Ge.trackingDerivation=h}function Me(h){var g=Ge.allowStateReads;return Ge.allowStateReads=h,g}function De(h){Ge.allowStateReads=h}function Ue(h){if(h.dependenciesState!==He.UP_TO_DATE){h.dependenciesState=He.UP_TO_DATE;for(var g=h.observing,x=g.length;x--;)g[x].lowestObserverState=He.UP_TO_DATE}}var ft=0,Ht=1,$t=Object.getOwnPropertyDescriptor(function(){},"name");$t&&$t.configurable;function Ct(h,g,x){var A=function(){return Rt(h,g,x||this,arguments)};return A.isMobxAction=!0,A}function Rt(h,g,x,A){var H=ze();try{return g.apply(x,A)}catch(Q){throw H.error=Q,Q}finally{Ve(H)}}function ze(h,g,x){var A=0,H=Y();bn();var Q={prevDerivation:H,prevAllowStateChanges:rt(!0),prevAllowStateReads:Me(!0),notifySpy:!1,startTime:A,actionId:Ht++,parentActionId:ft};return ft=Q.actionId,Q}function Ve(h){ft!==h.actionId&&w("invalid action stack. did you forget to finish an action?"),ft=h.parentActionId,h.error!==void 0&&(Ge.suppressReactionErrors=!0),wt(h.prevAllowStateChanges),De(h.prevAllowStateReads),mn(),se(h.prevDerivation),h.notifySpy,Ge.suppressReactionErrors=!1}function et(h,g){var x,A=rt(h);try{x=g()}finally{wt(A)}return x}function rt(h){var g=Ge.allowStateChanges;return Ge.allowStateChanges=h,g}function wt(h){Ge.allowStateChanges=h}var Mt=function(h){function g(x,A,H,Q,pe){H===void 0&&(H="ObservableValue@"+E()),pe===void 0&&(pe=F.default);var je=h.call(this,H)||this;return je.enhancer=A,je.name=H,je.equals=pe,je.hasUnreportedChange=!1,je.value=A(x,void 0,H),je}return function(x,A){function H(){this.constructor=x}J(x,A),x.prototype=A===null?Object.create(A):(H.prototype=A.prototype,new H)}(g,h),g.prototype.dehanceValue=function(x){return this.dehancer!==void 0?this.dehancer(x):x},g.prototype.set=function(x){this.value,(x=this.prepareNewValue(x))!==Ge.UNCHANGED&&this.setNewValue(x)},g.prototype.prepareNewValue=function(x){if(at(this),rn(this)){var A=gt(this,{object:this,type:"update",newValue:x});if(!A)return Ge.UNCHANGED;x=A.newValue}return x=this.enhancer(x,this.value,this.name),this.equals(this.value,x)?Ge.UNCHANGED:x},g.prototype.setNewValue=function(x){var A=this.value;this.value=x,this.reportChanged(),On(this)&&Kt(this,{type:"update",object:this,newValue:x,oldValue:A})},g.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},g.prototype.intercept=function(x){return pr(this,x)},g.prototype.observe=function(x,A){return A&&x({object:this,type:"update",newValue:this.value,oldValue:void 0}),dr(this,x)},g.prototype.toJSON=function(){return this.get()},g.prototype.toString=function(){return this.name+"["+this.value+"]"},g.prototype.valueOf=function(){return V(this.get())},g.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},g}(M),cr=B("ObservableValue",Mt),Gn=function(){function h(g){this.dependenciesState=He.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=He.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+E(),this.value=new it(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=te.NONE,k(g.get,"missing option for computed: get"),this.derivation=g.get,this.name=g.name||"ComputedValue@"+E(),g.set&&(this.setter=Ct(this.name+"-setter",g.set)),this.equals=g.equals||(g.compareStructural||g.struct?F.structural:F.default),this.scope=g.context,this.requiresReaction=!!g.requiresReaction,this.keepAlive=!!g.keepAlive}return h.prototype.onBecomeStale=function(){(function(g){g.lowestObserverState===He.UP_TO_DATE&&(g.lowestObserverState=He.POSSIBLY_STALE,g.observers.forEach(function(x){x.dependenciesState===He.UP_TO_DATE&&(x.dependenciesState=He.POSSIBLY_STALE,x.isTracing!==te.NONE&&Yn(x,g),x.onBecomeStale())}))})(this)},h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(g){return g()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(g){return g()})},h.prototype.get=function(){this.isComputing&&w("Cycle detected in computation "+this.name+": "+this.derivation),Ge.inBatch!==0||this.observers.size!==0||this.keepAlive?(zi(this),St(this)&&this.trackAndCompute()&&function(x){x.lowestObserverState!==He.STALE&&(x.lowestObserverState=He.STALE,x.observers.forEach(function(A){A.dependenciesState===He.POSSIBLY_STALE?A.dependenciesState=He.STALE:A.dependenciesState===He.UP_TO_DATE&&(x.lowestObserverState=He.UP_TO_DATE)}))}(this)):St(this)&&(this.warnAboutUntrackedRead(),bn(),this.value=this.computeValue(!1),mn());var g=this.value;if(yt(g))throw g.cause;return g},h.prototype.peek=function(){var g=this.computeValue(!1);if(yt(g))throw g.cause;return g},h.prototype.set=function(g){if(this.setter){k(!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,g)}finally{this.isRunningSetter=!1}}else k(!1,!1)},h.prototype.trackAndCompute=function(){var g=this.value,x=this.dependenciesState===He.NOT_TRACKING,A=this.computeValue(!0),H=x||yt(g)||yt(A)||!this.equals(g,A);return H&&(this.value=A),H},h.prototype.computeValue=function(g){var x;if(this.isComputing=!0,Ge.computationDepth++,g)x=Nt(this,this.derivation,this.scope);else if(Ge.disableErrorBoundaries===!0)x=this.derivation.call(this.scope);else try{x=this.derivation.call(this.scope)}catch(A){x=new it(A)}return Ge.computationDepth--,this.isComputing=!1,x},h.prototype.suspend=function(){this.keepAlive||(G(this),this.value=void 0)},h.prototype.observe=function(g,x){var A=this,H=!0,Q=void 0;return Ko(function(){var pe=A.get();if(!H||x){var je=Y();g({type:"update",object:A,newValue:pe,oldValue:Q}),se(je)}H=!1,Q=pe})},h.prototype.warnAboutUntrackedRead=function(){},h.prototype.toJSON=function(){return this.get()},h.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},h.prototype.valueOf=function(){return V(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(),Un=B("ComputedValue",Gn),Wr=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},zu={};function Vo(){return typeof window<"u"?window:c!==void 0?c:typeof self<"u"?self:zu}var kn=!0,Ri=!1,Ge=function(){var h=Vo();return h.__mobxInstanceCount>0&&!h.__mobxGlobals&&(kn=!1),h.__mobxGlobals&&h.__mobxGlobals.version!==new Wr().version&&(kn=!1),kn?h.__mobxGlobals?(h.__mobxInstanceCount+=1,h.__mobxGlobals.UNCHANGED||(h.__mobxGlobals.UNCHANGED={}),h.__mobxGlobals):(h.__mobxInstanceCount=1,h.__mobxGlobals=new Wr):(setTimeout(function(){Ri||w("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Wr)}();function Bu(h,g){h.observers.add(g),h.lowestObserverState>g.dependenciesState&&(h.lowestObserverState=g.dependenciesState)}function Ii(h,g){h.observers.delete(g),h.observers.size===0&&Li(h)}function Li(h){h.isPendingUnobservation===!1&&(h.isPendingUnobservation=!0,Ge.pendingUnobservations.push(h))}function bn(){Ge.inBatch++}function mn(){if(--Ge.inBatch==0){Bi();for(var h=Ge.pendingUnobservations,g=0;g<h.length;g++){var x=h[g];x.isPendingUnobservation=!1,x.observers.size===0&&(x.isBeingObserved&&(x.isBeingObserved=!1,x.onBecomeUnobserved()),x instanceof Gn&&x.suspend())}Ge.pendingUnobservations=[]}}function zi(h){var g=Ge.trackingDerivation;return g!==null?(g.runId!==h.lastAccessedBy&&(h.lastAccessedBy=g.runId,g.newObserving[g.unboundDepsCount++]=h,h.isBeingObserved||(h.isBeingObserved=!0,h.onBecomeObserved())),!0):(h.observers.size===0&&Ge.inBatch>0&&Li(h),!1)}function Yn(h,g){if(h.isTracing===te.BREAK){var x=[];kr($r(h),x,1),new Function(`debugger;
/*
Tracing '`+h.name+`'
You are entering this break point because derivation '`+h.name+"' is being traced and '"+g.name+`' is now forcing it to update.
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
The stackframe you are looking for is at least ~6-8 stack-frames up.
`+(h instanceof Gn?h.derivation.toString().replace(/[*]\//g,"/"):"")+`
The dependencies for this derivation are:
`+x.join(`
`)+`
*/
`)()}}function kr(h,g,x){g.length>=1e3?g.push("(and many more)"):(g.push(""+new Array(x).join(" ")+h.name),h.dependencies&&h.dependencies.forEach(function(A){return kr(A,g,x+1)}))}var Ln=function(){function h(g,x,A,H){g===void 0&&(g="Reaction@"+E()),H===void 0&&(H=!1),this.name=g,this.onInvalidate=x,this.errorHandler=A,this.requiresObservable=H,this.observing=[],this.newObserving=[],this.dependenciesState=He.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+E(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=te.NONE}return h.prototype.onBecomeStale=function(){this.schedule()},h.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ge.pendingReactions.push(this),Bi())},h.prototype.isScheduled=function(){return this._isScheduled},h.prototype.runReaction=function(){if(!this.isDisposed){if(bn(),this._isScheduled=!1,St(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(g){this.reportExceptionInDerivation(g)}}mn()}},h.prototype.track=function(g){if(!this.isDisposed){bn(),this._isRunning=!0;var x=Nt(this,g,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&G(this),yt(x)&&this.reportExceptionInDerivation(x.cause),mn()}},h.prototype.reportExceptionInDerivation=function(g){var x=this;if(this.errorHandler)this.errorHandler(g,this);else{if(Ge.disableErrorBoundaries)throw g;Ge.suppressReactionErrors,Ge.globalReactionErrorHandlers.forEach(function(A){return A(g,x)})}},h.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(bn(),G(this),mn()))},h.prototype.getDisposer=function(){var g=this.dispose.bind(this);return g[z]=this,g},h.prototype.toString=function(){return"Reaction["+this.name+"]"},h.prototype.trace=function(g){g===void 0&&(g=!1),function(){for(var x=[],A=0;A<arguments.length;A++)x[A]=arguments[A];var H=!1;typeof x[x.length-1]=="boolean"&&(H=x.pop());var Q=An(x);if(!Q)return w(!1);Q.isTracing,te.NONE,Q.isTracing=H?te.BREAK:te.LOG}(this,g)},h}(),Wo=function(h){return h()};function Bi(){Ge.inBatch>0||Ge.isRunningReactions||Wo(Fu)}function Fu(){Ge.isRunningReactions=!0;for(var h=Ge.pendingReactions,g=0;h.length>0;){++g==100&&h.splice(0);for(var x=h.splice(0),A=0,H=x.length;A<H;A++)x[A].runReaction()}Ge.isRunningReactions=!1}var lo=B("Reaction",Ln);function Hu(h){var g=Wo;Wo=function(x){return h(function(){return g(x)})}}function Fi(h){return function(){}}function Xu(){w(!1)}function lr(h){return function(g,x,A){if(A){if(A.value)return{value:Ct(h,A.value),enumerable:!1,configurable:!0,writable:!0};var H=A.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Ct(h,H.call(this))}}}return Hi(h).apply(this,arguments)}}function Hi(h){return function(g,x,A){Object.defineProperty(g,x,{configurable:!0,enumerable:!1,get:function(){},set:function(H){L(this,x,Vn(h,H))}})}}var Vn=function(h,g,x,A){return arguments.length===1&&typeof h=="function"?Ct(h.name||"<unnamed action>",h):arguments.length===2&&typeof g=="function"?Ct(h,g):arguments.length===1&&typeof h=="string"?lr(h):A!==!0?lr(g).apply(null,arguments):void L(h,g,Ct(h.name||g,x.value,this))};function Gu(h,g){return Rt(typeof h=="string"?h:h.name||"<unnamed action>",typeof h=="function"?h:g,this,void 0)}function fo(h){return typeof h=="function"&&h.isMobxAction===!0}function $o(h,g,x){L(h,g,Ct(g,x.bind(h)))}function Ko(h,g){g===void 0&&(g=_);var x,A=g&&g.name||h.name||"Autorun@"+E();if(!g.scheduler&&!g.delay)x=new Ln(A,function(){this.track(pe)},g.onError,g.requiresObservable);else{var H=Xi(g),Q=!1;x=new Ln(A,function(){Q||(Q=!0,H(function(){Q=!1,x.isDisposed||x.track(pe)}))},g.onError,g.requiresObservable)}function pe(){h(x)}return x.schedule(),x.getDisposer()}Vn.bound=function(h,g,x,A){return A===!0?($o(h,g,x.value),null):x?{configurable:!0,enumerable:!1,get:function(){return $o(this,g,x.value||x.initializer.call(this)),this[g]},set:Xu}:{enumerable:!1,configurable:!0,set:function(H){$o(this,g,H)},get:function(){}}};var Uu=function(h){return h()};function Xi(h){return h.scheduler?h.scheduler:h.delay?function(g){return setTimeout(g,h.delay)}:Uu}function Tr(h,g,x){x===void 0&&(x=_);var A,H,Q,pe=x.name||"Reaction@"+E(),je=Vn(pe,x.onError?(A=x.onError,H=g,function(){try{return H.apply(this,arguments)}catch(Tt){A.call(this,Tt)}}):g),Fe=!x.scheduler&&!x.delay,dt=Xi(x),ot=!0,xt=!1,ct=x.compareStructural?F.structural:x.equals||F.default,_t=new Ln(pe,function(){ot||Fe?xn():xt||(xt=!0,dt(xn))},x.onError,x.requiresObservable);function xn(){if(xt=!1,!_t.isDisposed){var Tt=!1;_t.track(function(){var on=h(_t);Tt=ot||!ct(Q,on),Q=on}),ot&&x.fireImmediately&&je(Q,_t),ot||Tt!==!0||je(Q,_t),ot&&(ot=!1)}}return _t.schedule(),_t.getDisposer()}function Ar(h,g,x){return Gi("onBecomeUnobserved",h,g,x)}function Gi(h,g,x,A){var H=typeof A=="function"?wn(g,x):wn(g),Q=typeof A=="function"?A:x,pe=h+"Listeners";return H[pe]?H[pe].add(Q):H[pe]=new Set([Q]),typeof H[h]!="function"?w(!1):function(){var je=H[pe];je&&(je.delete(Q),je.size===0&&delete H[pe])}}function Mr(h){var g=h.enforceActions,x=h.computedRequiresReaction,A=h.computedConfigurable,H=h.disableErrorBoundaries,Q=h.reactionScheduler,pe=h.reactionRequiresObservable,je=h.observableRequiresReaction;if(h.isolateGlobalState===!0&&((Ge.pendingReactions.length||Ge.inBatch||Ge.isRunningReactions)&&w("isolateGlobalState should be called before MobX is running any reactions"),Ri=!0,kn&&(--Vo().__mobxInstanceCount==0&&(Vo().__mobxGlobals=void 0),Ge=new Wr)),g!==void 0){var Fe=void 0;switch(g){case!0:case"observed":Fe=!0;break;case!1:case"never":Fe=!1;break;case"strict":case"always":Fe="strict";break;default:w("Invalid value for 'enforceActions': '"+g+"', expected 'never', 'always' or 'observed'")}Ge.enforceActions=Fe,Ge.allowStateChanges=Fe!==!0&&Fe!=="strict"}x!==void 0&&(Ge.computedRequiresReaction=!!x),pe!==void 0&&(Ge.reactionRequiresObservable=!!pe),je!==void 0&&(Ge.observableRequiresReaction=!!je,Ge.allowStateReads=!Ge.observableRequiresReaction),A!==void 0&&(Ge.computedConfigurable=!!A),H!==void 0&&(Ge.disableErrorBoundaries=!!H),Q&&Hu(Q)}function Wn(h,g,x,A){var H=Ui(A=ae(A));return Ie(h),Jr(h,A.name,H.enhancer),g&&Yi(h,g,x,H),h}function Ui(h){return h.defaultDecorator||(h.deep===!1?we:Oe)}function Yi(h,g,x,A){var H,Q;bn();try{var pe=K(g);try{for(var je=ce(pe),Fe=je.next();!Fe.done;Fe=je.next()){var dt=Fe.value,ot=Object.getOwnPropertyDescriptor(g,dt),xt=(x&&dt in x?x[dt]:ot.get?Le:A)(h,dt,ot,!0);xt&&Object.defineProperty(h,dt,xt)}}catch(ct){H={error:ct}}finally{try{Fe&&!Fe.done&&(Q=je.return)&&Q.call(je)}finally{if(H)throw H.error}}}finally{mn()}}function $r(h,g){return Vi(wn(h,g))}function Vi(h){var g,x,A={name:h.name};return h.observing&&h.observing.length>0&&(A.dependencies=(g=h.observing,x=[],g.forEach(function(H){x.indexOf(H)===-1&&x.push(H)}),x).map(Vi)),A}var Yu=0;function Wi(){this.message="FLOW_CANCELLED"}function $i(h){arguments.length!==1&&w("Flow expects 1 argument and cannot be used as decorator");var g=h.name||"<unnamed flow>";return function(){var x,A=this,H=arguments,Q=++Yu,pe=Vn(g+" - runid: "+Q+" - init",h).apply(A,H),je=void 0,Fe=new Promise(function(dt,ot){var xt=0;function ct(Tt){var on;je=void 0;try{on=Vn(g+" - runid: "+Q+" - yield "+xt++,pe.next).call(pe,Tt)}catch(Qr){return ot(Qr)}xn(on)}function _t(Tt){var on;je=void 0;try{on=Vn(g+" - runid: "+Q+" - yield "+xt++,pe.throw).call(pe,Tt)}catch(Qr){return ot(Qr)}xn(on)}function xn(Tt){if(!Tt||typeof Tt.then!="function")return Tt.done?dt(Tt.value):(je=Promise.resolve(Tt.value)).then(ct,_t);Tt.then(xn,ot)}x=ot,ct(void 0)});return Fe.cancel=Vn(g+" - runid: "+Q+" - cancel",function(){try{je&&Kr(je);var dt=pe.return(void 0),ot=Promise.resolve(dt.value);ot.then(P,P),Kr(ot),x(new Wi)}catch(xt){x(xt)}}),Fe}}function Kr(h){typeof h.cancel=="function"&&h.cancel()}function Ki(h,g){if(h==null)return!1;if(g!==void 0){if(yn(h)===!1||!h[z].values.has(g))return!1;var x=wn(h,g);return Un(x)}return Un(h)}function Vu(h){return arguments.length>1?w(!1):Ki(h)}function qi(h,g){return typeof g!="string"?w(!1):Ki(h,g)}function qo(h,g){return h!=null&&(g!==void 0?!!yn(h)&&h[z].values.has(g):yn(h)||!!h[z]||I(h)||lo(h)||Un(h))}function qr(h){return arguments.length!==1&&w(!1),qo(h)}function $n(h){return yn(h)?h[z].getKeys():It(h)||hn(h)?Array.from(h.keys()):Dn(h)?h.map(function(g,x){return x}):w(!1)}function Zt(h){return yn(h)?$n(h).map(function(g){return h[g]}):It(h)?$n(h).map(function(g){return h.get(g)}):hn(h)?Array.from(h.values()):Dn(h)?h.slice():w(!1)}function Zi(h){return yn(h)?$n(h).map(function(g){return[g,h[g]]}):It(h)?$n(h).map(function(g){return[g,h.get(g)]}):hn(h)?Array.from(h.entries()):Dn(h)?h.map(function(g,x){return[x,g]}):w(!1)}function Ji(h,g,x){if(arguments.length!==2||hn(h))if(yn(h)){var A=h[z],H=A.values.get(g);H?A.write(g,x):A.addObservableProp(g,x,A.defaultEnhancer)}else if(It(h))h.set(g,x);else if(hn(h))h.add(g);else{if(!Dn(h))return w(!1);typeof g!="number"&&(g=parseInt(g,10)),k(g>=0,"Not a valid index: '"+g+"'"),bn(),g>=h.length&&(h.length=g+1),h[g]=x,mn()}else{bn();var Q=g;try{for(var pe in Q)Ji(h,pe,Q[pe])}finally{mn()}}}function Qi(h,g,x,A){return typeof x=="function"?function(H,Q,pe,je){return Nr(H,Q).observe(pe,je)}(h,g,x,A):function(H,Q,pe){return Nr(H).observe(Q,pe)}(h,g,x)}Wi.prototype=Object.create(Error.prototype);var Wu={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function fr(h,g,x,A){return A.detectCycles&&h.set(g,x),x}function Tn(h,g,x){if(!g.recurseEverything&&!qr(h)||typeof h!="object")return h;if(h===null)return null;if(h instanceof Date)return h;if(cr(h))return Tn(h.get(),g,x);if(qr(h)&&$n(h),g.detectCycles===!0&&h!==null&&x.has(h))return x.get(h);if(Dn(h)||Array.isArray(h)){var A=fr(x,h,[],g),H=h.map(function(ct){return Tn(ct,g,x)});A.length=H.length;for(var Q=0,pe=H.length;Q<pe;Q++)A[Q]=H[Q];return A}if(hn(h)||Object.getPrototypeOf(h)===Set.prototype){if(g.exportMapsAsObjects===!1){var je=fr(x,h,new Set,g);return h.forEach(function(ct){je.add(Tn(ct,g,x))}),je}var Fe=fr(x,h,[],g);return h.forEach(function(ct){Fe.push(Tn(ct,g,x))}),Fe}if(It(h)||Object.getPrototypeOf(h)===Map.prototype){if(g.exportMapsAsObjects===!1){var dt=fr(x,h,new Map,g);return h.forEach(function(ct,_t){dt.set(_t,Tn(ct,g,x))}),dt}var ot=fr(x,h,{},g);return h.forEach(function(ct,_t){ot[_t]=Tn(ct,g,x)}),ot}var xt=fr(x,h,{},g);return ie(h).forEach(function(ct){xt[ct]=Tn(h[ct],g,x)}),xt}function $u(h,g){var x;return typeof g=="boolean"&&(g={detectCycles:g}),g||(g=Wu),g.detectCycles=g.detectCycles===void 0?g.recurseEverything===!0:g.detectCycles===!0,g.detectCycles&&(x=new Map),Tn(h,g,x)}function An(h){switch(h.length){case 0:return Ge.trackingDerivation;case 1:return wn(h[0]);case 2:return wn(h[0],h[1])}}function _n(h,g){g===void 0&&(g=void 0),bn();try{return h.apply(g)}finally{mn()}}function ea(h,g,x){return arguments.length===1||g&&typeof g=="object"?Ku(h,g):ta(h,g,x||{})}function ta(h,g,x){var A;typeof x.timeout=="number"&&(A=setTimeout(function(){if(!Q[z].isDisposed){Q();var pe=new Error("WHEN_TIMEOUT");if(!x.onError)throw pe;x.onError(pe)}},x.timeout)),x.name=x.name||"When@"+E();var H=Ct(x.name+"-effect",g),Q=Ko(function(pe){h()&&(pe.dispose(),A&&clearTimeout(A),H())},x);return Q}function Ku(h,g){var x,A=new Promise(function(H,Q){var pe=ta(h,H,le(le({},g),{onError:Q}));x=function(){pe(),Q("WHEN_CANCELLED")}});return A.cancel=x,A}function po(h){return h[z]}function Kn(h){return typeof h=="string"||typeof h=="number"||typeof h=="symbol"}var Zr={has:function(h,g){if(g===z||g==="constructor"||g===ge)return!0;var x=po(h);return Kn(g)?x.has(g):g in h},get:function(h,g){if(g===z||g==="constructor"||g===ge)return h[g];var x=po(h),A=x.values.get(g);if(A instanceof M){var H=A.get();return H===void 0&&x.has(g),H}return Kn(g)&&x.has(g),h[g]},set:function(h,g,x){return!!Kn(g)&&(Ji(h,g,x),!0)},deleteProperty:function(h,g){return!!Kn(g)&&(po(h).remove(g),!0)},ownKeys:function(h){return po(h).keysAtom.reportObserved(),Reflect.ownKeys(h)},preventExtensions:function(h){return w("Dynamic observable objects cannot be frozen"),!1}};function qu(h){var g=new Proxy(h,Zr);return h[z].proxy=g,g}function rn(h){return h.interceptors!==void 0&&h.interceptors.length>0}function pr(h,g){var x=h.interceptors||(h.interceptors=[]);return x.push(g),j(function(){var A=x.indexOf(g);A!==-1&&x.splice(A,1)})}function gt(h,g){var x=Y();try{for(var A=xe(h.interceptors||[]),H=0,Q=A.length;H<Q&&(k(!(g=A[H](g))||g.type,"Intercept handlers should return nothing or a change object"),g);H++);return g}finally{se(x)}}function On(h){return h.changeListeners!==void 0&&h.changeListeners.length>0}function dr(h,g){var x=h.changeListeners||(h.changeListeners=[]);return x.push(g),j(function(){var A=x.indexOf(g);A!==-1&&x.splice(A,1)})}function Kt(h,g){var x=Y(),A=h.changeListeners;if(A){for(var H=0,Q=(A=A.slice()).length;H<Q;H++)A[H](g);se(x)}}var na={get:function(h,g){return g===z?h[z]:g==="length"?h[z].getArrayLength():typeof g=="number"?Mn.get.call(h,g):typeof g!="string"||isNaN(g)?Mn.hasOwnProperty(g)?Mn[g]:h[g]:Mn.get.call(h,parseInt(g))},set:function(h,g,x){return g==="length"&&h[z].setArrayLength(x),typeof g=="number"&&Mn.set.call(h,g,x),typeof g=="symbol"||isNaN(g)?h[g]=x:Mn.set.call(h,parseInt(g),x),!0},preventExtensions:function(h){return w("Observable arrays cannot be frozen"),!1}};function Zo(h,g,x,A){x===void 0&&(x="ObservableArray@"+E()),A===void 0&&(A=!1);var H,Q,pe,je=new ra(x,g,A);H=je.values,Q=z,pe=je,Object.defineProperty(H,Q,{enumerable:!1,writable:!1,configurable:!0,value:pe});var Fe=new Proxy(je.values,na);if(je.proxy=Fe,h&&h.length){var dt=rt(!0);je.spliceWithArray(0,0,h),wt(dt)}return Fe}var ra=function(){function h(g,x,A){this.owned=A,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new M(g||"ObservableArray@"+E()),this.enhancer=function(H,Q){return x(H,Q,g+"[..]")}}return h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.dehanceValues=function(g){return this.dehancer!==void 0&&g.length>0?g.map(this.dehancer):g},h.prototype.intercept=function(g){return pr(this,g)},h.prototype.observe=function(g,x){return x===void 0&&(x=!1),x&&g({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),dr(this,g)},h.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},h.prototype.setArrayLength=function(g){if(typeof g!="number"||g<0)throw new Error("[mobx.array] Out of range: "+g);var x=this.values.length;if(g!==x)if(g>x){for(var A=new Array(g-x),H=0;H<g-x;H++)A[H]=void 0;this.spliceWithArray(x,0,A)}else this.spliceWithArray(g,x-g)},h.prototype.updateArrayLength=function(g,x){if(g!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=x},h.prototype.spliceWithArray=function(g,x,A){var H=this;at(this.atom);var Q=this.values.length;if(g===void 0?g=0:g>Q?g=Q:g<0&&(g=Math.max(0,Q+g)),x=arguments.length===1?Q-g:x==null?0:Math.max(0,Math.min(x,Q-g)),A===void 0&&(A=b),rn(this)){var pe=gt(this,{object:this.proxy,type:"splice",index:g,removedCount:x,added:A});if(!pe)return b;x=pe.removedCount,A=pe.added}A=A.length===0?A:A.map(function(Fe){return H.enhancer(Fe,void 0)});var je=this.spliceItemsIntoValues(g,x,A);return x===0&&A.length===0||this.notifyArraySplice(g,A,je),this.dehanceValues(je)},h.prototype.spliceItemsIntoValues=function(g,x,A){var H;if(A.length<1e4)return(H=this.values).splice.apply(H,xe([g,x],A));var Q=this.values.slice(g,g+x);return this.values=this.values.slice(0,g).concat(A,this.values.slice(g+x)),Q},h.prototype.notifyArrayChildUpdate=function(g,x,A){var H=!this.owned&&!1,Q=On(this),pe=Q||H?{object:this.proxy,type:"update",index:g,newValue:x,oldValue:A}:null;this.atom.reportChanged(),Q&&Kt(this,pe)},h.prototype.notifyArraySplice=function(g,x,A){var H=!this.owned&&!1,Q=On(this),pe=Q||H?{object:this.proxy,type:"splice",index:g,removed:A,added:x,removedCount:A.length,addedCount:x.length}:null;this.atom.reportChanged(),Q&&Kt(this,pe)},h}(),Mn={intercept:function(h){return this[z].intercept(h)},observe:function(h,g){return g===void 0&&(g=!1),this[z].observe(h,g)},clear:function(){return this.splice(0)},replace:function(h){var g=this[z];return g.spliceWithArray(0,g.values.length,h)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(h,g){for(var x=[],A=2;A<arguments.length;A++)x[A-2]=arguments[A];var H=this[z];switch(arguments.length){case 0:return[];case 1:return H.spliceWithArray(h);case 2:return H.spliceWithArray(h,g)}return H.spliceWithArray(h,g,x)},spliceWithArray:function(h,g,x){return this[z].spliceWithArray(h,g,x)},push:function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];var x=this[z];return x.spliceWithArray(x.values.length,0,h),x.values.length},pop:function(){return this.splice(Math.max(this[z].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];var x=this[z];return x.spliceWithArray(0,0,h),x.values.length},reverse:function(){var h=this.slice();return h.reverse.apply(h,arguments)},sort:function(h){var g=this.slice();return g.sort.apply(g,arguments)},remove:function(h){var g=this[z],x=g.dehanceValues(g.values).indexOf(h);return x>-1&&(this.splice(x,1),!0)},get:function(h){var g=this[z];if(g&&h<g.values.length)return g.atom.reportObserved(),g.dehanceValue(g.values[h])},set:function(h,g){var x=this[z],A=x.values;if(h<A.length){at(x.atom);var H=A[h];if(rn(x)){var Q=gt(x,{type:"update",object:x.proxy,index:h,newValue:g});if(!Q)return;g=Q.newValue}(g=x.enhancer(g,H))!==H&&(A[h]=g,x.notifyArrayChildUpdate(h,g,H))}else{if(h!==A.length)throw new Error("[mobx.array] Index out of bounds, "+h+" is larger than "+A.length);x.spliceWithArray(h,0,[g])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Mn[h]=function(){var g=this[z];g.atom.reportObserved();var x=g.dehanceValues(g.values);return x[h].apply(x,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(h){typeof Array.prototype[h]=="function"&&(Mn[h]=function(g,x){var A=this,H=this[z];return H.atom.reportObserved(),H.dehanceValues(H.values)[h](function(Q,pe){return g.call(x,Q,pe,A)},x)})}),["reduce","reduceRight"].forEach(function(h){Mn[h]=function(){var g=this,x=this[z];x.atom.reportObserved();var A=arguments[0];return arguments[0]=function(H,Q,pe){return Q=x.dehanceValue(Q),A(H,Q,pe,g)},x.values[h].apply(x.values,arguments)}});var oa,ho=B("ObservableArrayAdministration",ra);function Dn(h){return D(h)&&ho(h[z])}var ia,Zu={},Jo=function(){function h(g,x,A){if(x===void 0&&(x=Ce),A===void 0&&(A="ObservableMap@"+E()),this.enhancer=x,this.name=A,this[oa]=Zu,this._keysAtom=C(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")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(g)}return h.prototype._has=function(g){return this._data.has(g)},h.prototype.has=function(g){var x=this;if(!Ge.trackingDerivation)return this._has(g);var A=this._hasMap.get(g);if(!A){var H=A=new Mt(this._has(g),Ke,this.name+"."+Z(g)+"?",!1);this._hasMap.set(g,H),Ar(H,function(){return x._hasMap.delete(g)})}return A.get()},h.prototype.set=function(g,x){var A=this._has(g);if(rn(this)){var H=gt(this,{type:A?"update":"add",object:this,newValue:x,name:g});if(!H)return this;x=H.newValue}return A?this._updateValue(g,x):this._addValue(g,x),this},h.prototype.delete=function(g){var x=this;if(at(this._keysAtom),rn(this)&&!(H=gt(this,{type:"delete",object:this,name:g})))return!1;if(this._has(g)){var A=On(this),H=A?{type:"delete",object:this,oldValue:this._data.get(g).value,name:g}:null;return _n(function(){x._keysAtom.reportChanged(),x._updateHasMapEntry(g,!1),x._data.get(g).setNewValue(void 0),x._data.delete(g)}),A&&Kt(this,H),!0}return!1},h.prototype._updateHasMapEntry=function(g,x){var A=this._hasMap.get(g);A&&A.setNewValue(x)},h.prototype._updateValue=function(g,x){var A=this._data.get(g);if((x=A.prepareNewValue(x))!==Ge.UNCHANGED){var H=On(this),Q=H?{type:"update",object:this,oldValue:A.value,name:g,newValue:x}:null;A.setNewValue(x),H&&Kt(this,Q)}},h.prototype._addValue=function(g,x){var A=this;at(this._keysAtom),_n(function(){var pe=new Mt(x,A.enhancer,A.name+"."+Z(g),!1);A._data.set(g,pe),x=pe.value,A._updateHasMapEntry(g,!0),A._keysAtom.reportChanged()});var H=On(this),Q=H?{type:"add",object:this,name:g,newValue:x}:null;H&&Kt(this,Q)},h.prototype.get=function(g){return this.has(g)?this.dehanceValue(this._data.get(g).get()):this.dehanceValue(void 0)},h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},h.prototype.values=function(){var g=this,x=this.keys();return mo({next:function(){var A=x.next(),H=A.done,Q=A.value;return{done:H,value:H?void 0:g.get(Q)}}})},h.prototype.entries=function(){var g=this,x=this.keys();return mo({next:function(){var A=x.next(),H=A.done,Q=A.value;return{done:H,value:H?void 0:[Q,g.get(Q)]}}})},h.prototype[oa=z,Symbol.iterator]=function(){return this.entries()},h.prototype.forEach=function(g,x){var A,H;try{for(var Q=ce(this),pe=Q.next();!pe.done;pe=Q.next()){var je=ye(pe.value,2),Fe=je[0],dt=je[1];g.call(x,dt,Fe,this)}}catch(ot){A={error:ot}}finally{try{pe&&!pe.done&&(H=Q.return)&&H.call(Q)}finally{if(A)throw A.error}}},h.prototype.merge=function(g){var x=this;return It(g)&&(g=g.toJS()),_n(function(){var A=rt(!0);try{N(g)?ie(g).forEach(function(H){return x.set(H,g[H])}):Array.isArray(g)?g.forEach(function(H){var Q=ye(H,2),pe=Q[0],je=Q[1];return x.set(pe,je)}):X(g)?(g.constructor!==Map&&w("Cannot initialize from classes that inherit from Map: "+g.constructor.name),g.forEach(function(H,Q){return x.set(Q,H)})):g!=null&&w("Cannot initialize map from "+g)}finally{wt(A)}}),this},h.prototype.clear=function(){var g=this;_n(function(){ne(function(){var x,A;try{for(var H=ce(g.keys()),Q=H.next();!Q.done;Q=H.next()){var pe=Q.value;g.delete(pe)}}catch(je){x={error:je}}finally{try{Q&&!Q.done&&(A=H.return)&&A.call(H)}finally{if(x)throw x.error}}})})},h.prototype.replace=function(g){var x=this;return _n(function(){var A,H,Q,pe,je=function(an){if(X(an)||It(an))return an;if(Array.isArray(an))return new Map(an);if(N(an)){var fa=new Map;for(var eo in an)fa.set(eo,an[eo]);return fa}return w("Cannot convert to map from '"+an+"'")}(g),Fe=new Map,dt=!1;try{for(var ot=ce(x._data.keys()),xt=ot.next();!xt.done;xt=ot.next()){var ct=xt.value;if(!je.has(ct))if(x.delete(ct))dt=!0;else{var _t=x._data.get(ct);Fe.set(ct,_t)}}}catch(an){A={error:an}}finally{try{xt&&!xt.done&&(H=ot.return)&&H.call(ot)}finally{if(A)throw A.error}}try{for(var xn=ce(je.entries()),Tt=xn.next();!Tt.done;Tt=xn.next()){var on=ye(Tt.value,2),Qr=(ct=on[0],_t=on[1],x._data.has(ct));if(x.set(ct,_t),x._data.has(ct)){var Qu=x._data.get(ct);Fe.set(ct,Qu),Qr||(dt=!0)}}}catch(an){Q={error:an}}finally{try{Tt&&!Tt.done&&(pe=xn.return)&&pe.call(xn)}finally{if(Q)throw Q.error}}if(!dt)if(x._data.size!==Fe.size)x._keysAtom.reportChanged();else for(var ca=x._data.keys(),la=Fe.keys(),_o=ca.next(),ni=la.next();!_o.done;){if(_o.value!==ni.value){x._keysAtom.reportChanged();break}_o=ca.next(),ni=la.next()}x._data=Fe}),this},Object.defineProperty(h.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.toPOJO=function(){var g,x,A={};try{for(var H=ce(this),Q=H.next();!Q.done;Q=H.next()){var pe=ye(Q.value,2),je=pe[0],Fe=pe[1];A[typeof je=="symbol"?je:Z(je)]=Fe}}catch(dt){g={error:dt}}finally{try{Q&&!Q.done&&(x=H.return)&&x.call(H)}finally{if(g)throw g.error}}return A},h.prototype.toJS=function(){return new Map(this)},h.prototype.toJSON=function(){return this.toPOJO()},h.prototype.toString=function(){var g=this;return this.name+"[{ "+Array.from(this.keys()).map(function(x){return Z(x)+": "+g.get(x)}).join(", ")+" }]"},h.prototype.observe=function(g,x){return dr(this,g)},h.prototype.intercept=function(g){return pr(this,g)},h}(),It=B("ObservableMap",Jo),Dr={},yo=function(){function h(g,x,A){if(x===void 0&&(x=Ce),A===void 0&&(A="ObservableSet@"+E()),this.name=A,this[ia]=Dr,this._data=new Set,this._atom=C(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(H,Q){return x(H,Q,A)},g&&this.replace(g)}return h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.clear=function(){var g=this;_n(function(){ne(function(){var x,A;try{for(var H=ce(g._data.values()),Q=H.next();!Q.done;Q=H.next()){var pe=Q.value;g.delete(pe)}}catch(je){x={error:je}}finally{try{Q&&!Q.done&&(A=H.return)&&A.call(H)}finally{if(x)throw x.error}}})})},h.prototype.forEach=function(g,x){var A,H;try{for(var Q=ce(this),pe=Q.next();!pe.done;pe=Q.next()){var je=pe.value;g.call(x,je,je,this)}}catch(Fe){A={error:Fe}}finally{try{pe&&!pe.done&&(H=Q.return)&&H.call(Q)}finally{if(A)throw A.error}}},Object.defineProperty(h.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.add=function(g){var x=this;if(at(this._atom),rn(this)&&!(H=gt(this,{type:"add",object:this,newValue:g})))return this;if(!this.has(g)){_n(function(){x._data.add(x.enhancer(g,void 0)),x._atom.reportChanged()});var A=On(this),H=A?{type:"add",object:this,newValue:g}:null;A&&Kt(this,H)}return this},h.prototype.delete=function(g){var x=this;if(rn(this)&&!(H=gt(this,{type:"delete",object:this,oldValue:g})))return!1;if(this.has(g)){var A=On(this),H=A?{type:"delete",object:this,oldValue:g}:null;return _n(function(){x._atom.reportChanged(),x._data.delete(g)}),A&&Kt(this,H),!0}return!1},h.prototype.has=function(g){return this._atom.reportObserved(),this._data.has(this.dehanceValue(g))},h.prototype.entries=function(){var g=0,x=Array.from(this.keys()),A=Array.from(this.values());return mo({next:function(){var H=g;return g+=1,H<A.length?{value:[x[H],A[H]],done:!1}:{done:!0}}})},h.prototype.keys=function(){return this.values()},h.prototype.values=function(){this._atom.reportObserved();var g=this,x=0,A=Array.from(this._data.values());return mo({next:function(){return x<A.length?{value:g.dehanceValue(A[x++]),done:!1}:{done:!0}}})},h.prototype.replace=function(g){var x=this;return hn(g)&&(g=g.toJS()),_n(function(){var A=rt(!0);try{Array.isArray(g)||ee(g)?(x.clear(),g.forEach(function(H){return x.add(H)})):g!=null&&w("Cannot initialize set from "+g)}finally{wt(A)}}),this},h.prototype.observe=function(g,x){return dr(this,g)},h.prototype.intercept=function(g){return pr(this,g)},h.prototype.toJS=function(){return new Set(this)},h.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},h.prototype[ia=z,Symbol.iterator]=function(){return this.values()},h}(),hn=B("ObservableSet",yo),aa=function(){function h(g,x,A,H){x===void 0&&(x=new Map),this.target=g,this.values=x,this.name=A,this.defaultEnhancer=H,this.keysAtom=new M(A+".keys")}return h.prototype.read=function(g){return this.values.get(g).get()},h.prototype.write=function(g,x){var A=this.target,H=this.values.get(g);if(H instanceof Gn)H.set(x);else{if(rn(this)){if(!(pe=gt(this,{type:"update",object:this.proxy||A,name:g,newValue:x})))return;x=pe.newValue}if((x=H.prepareNewValue(x))!==Ge.UNCHANGED){var Q=On(this),pe=Q?{type:"update",object:this.proxy||A,oldValue:H.value,name:g,newValue:x}:null;H.setNewValue(x),Q&&Kt(this,pe)}}},h.prototype.has=function(g){var x=this.pendingKeys||(this.pendingKeys=new Map),A=x.get(g);if(A)return A.get();var H=!!this.values.get(g);return A=new Mt(H,Ke,this.name+"."+Z(g)+"?",!1),x.set(g,A),A.get()},h.prototype.addObservableProp=function(g,x,A){A===void 0&&(A=this.defaultEnhancer);var H=this.target;if(rn(this)){var Q=gt(this,{object:this.proxy||H,name:g,type:"add",newValue:x});if(!Q)return;x=Q.newValue}var pe=new Mt(x,A,this.name+"."+Z(g),!1);this.values.set(g,pe),x=pe.value,Object.defineProperty(H,g,function(je){return go[je]||(go[je]={configurable:!0,enumerable:!0,get:function(){return this[z].read(je)},set:function(Fe){this[z].write(je,Fe)}})}(g)),this.notifyPropertyAddition(g,x)},h.prototype.addComputedProp=function(g,x,A){var H,Q,pe,je=this.target;A.name=A.name||this.name+"."+Z(x),this.values.set(x,new Gn(A)),(g===je||(H=g,Q=x,!(pe=Object.getOwnPropertyDescriptor(H,Q))||pe.configurable!==!1&&pe.writable!==!1))&&Object.defineProperty(g,x,function(Fe){return vo[Fe]||(vo[Fe]={configurable:Ge.computedConfigurable,enumerable:!1,get:function(){return bo(this).read(Fe)},set:function(dt){bo(this).write(Fe,dt)}})}(x))},h.prototype.remove=function(g){if(this.values.has(g)){var x=this.target;if(rn(this)&&!(Fe=gt(this,{object:this.proxy||x,name:g,type:"remove"})))return;try{bn();var A=On(this),H=!1,Q=this.values.get(g),pe=Q&&Q.get();if(Q&&Q.set(void 0),this.keysAtom.reportChanged(),this.values.delete(g),this.pendingKeys){var je=this.pendingKeys.get(g);je&&je.set(!1)}delete this.target[g];var Fe=A?{type:"remove",object:this.proxy||x,oldValue:pe,name:g}:null;A&&Kt(this,Fe)}finally{mn()}}},h.prototype.illegalAccess=function(g,x){},h.prototype.observe=function(g,x){return dr(this,g)},h.prototype.intercept=function(g){return pr(this,g)},h.prototype.notifyPropertyAddition=function(g,x){var A=On(this),H=A?{type:"add",object:this.proxy||this.target,name:g,newValue:x}:null;if(A&&Kt(this,H),this.pendingKeys){var Q=this.pendingKeys.get(g);Q&&Q.set(!0)}this.keysAtom.reportChanged()},h.prototype.getKeys=function(){var g,x;this.keysAtom.reportObserved();var A=[];try{for(var H=ce(this.values),Q=H.next();!Q.done;Q=H.next()){var pe=ye(Q.value,2),je=pe[0];pe[1]instanceof Mt&&A.push(je)}}catch(Fe){g={error:Fe}}finally{try{Q&&!Q.done&&(x=H.return)&&x.call(H)}finally{if(g)throw g.error}}return A},h}();function Jr(h,g,x){if(g===void 0&&(g=""),x===void 0&&(x=Ce),Object.prototype.hasOwnProperty.call(h,z))return h[z];N(h)||(g=(h.constructor.name||"ObservableObject")+"@"+E()),g||(g="ObservableObject@"+E());var A=new aa(h,new Map,Z(g),x);return L(h,z,A),A}var go=Object.create(null),vo=Object.create(null);function bo(h){var g=h[z];return g||(Ie(h),h[z])}var ua=B("ObservableObjectAdministration",aa);function yn(h){return!!D(h)&&(Ie(h),ua(h[z]))}function wn(h,g){if(typeof h=="object"&&h!==null){if(Dn(h))return g!==void 0&&w(!1),h[z].atom;if(hn(h))return h[z];if(It(h)){var x=h;return g===void 0?x._keysAtom:((A=x._data.get(g)||x._hasMap.get(g))||w(!1),A)}var A;if(Ie(h),g&&!h[z]&&h[g],yn(h))return g?((A=h[z].values.get(g))||w(!1),A):w(!1);if(I(h)||Un(h)||lo(h))return h}else if(typeof h=="function"&&lo(h[z]))return h[z];return w(!1)}function Nr(h,g){return h||w("Expecting some object"),g!==void 0?Nr(wn(h,g)):I(h)||Un(h)||lo(h)||It(h)||hn(h)?h:(Ie(h),h[z]?h[z]:void w(!1))}var Qo=Object.prototype.toString;function ei(h,g,x){return x===void 0&&(x=-1),ti(h,g,x)}function ti(h,g,x,A,H){if(h===g)return h!==0||1/h==1/g;if(h==null||g==null)return!1;if(h!=h)return g!=g;var Q=typeof h;if(Q!=="function"&&Q!=="object"&&typeof g!="object")return!1;var pe=Qo.call(h);if(pe!==Qo.call(g))return!1;switch(pe){case"[object RegExp]":case"[object String]":return""+h==""+g;case"[object Number]":return+h!=+h?+g!=+g:+h==0?1/+h==1/g:+h==+g;case"[object Date]":case"[object Boolean]":return+h==+g;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(h)===Symbol.valueOf.call(g);case"[object Map]":case"[object Set]":x>=0&&x++}h=sa(h),g=sa(g);var je=pe==="[object Array]";if(!je){if(typeof h!="object"||typeof g!="object")return!1;var Fe=h.constructor,dt=g.constructor;if(Fe!==dt&&!(typeof Fe=="function"&&Fe instanceof Fe&&typeof dt=="function"&&dt instanceof dt)&&"constructor"in h&&"constructor"in g)return!1}if(x===0)return!1;x<0&&(x=-1),H=H||[];for(var ot=(A=A||[]).length;ot--;)if(A[ot]===h)return H[ot]===g;if(A.push(h),H.push(g),je){if((ot=h.length)!==g.length)return!1;for(;ot--;)if(!ti(h[ot],g[ot],x-1,A,H))return!1}else{var xt=Object.keys(h),ct=void 0;if(ot=xt.length,Object.keys(g).length!==ot)return!1;for(;ot--;)if(!Ju(g,ct=xt[ot])||!ti(h[ct],g[ct],x-1,A,H))return!1}return A.pop(),H.pop(),!0}function sa(h){return Dn(h)?h.slice():X(h)||It(h)||ee(h)||hn(h)?Array.from(h.entries()):h}function Ju(h,g){return Object.prototype.hasOwnProperty.call(h,g)}function mo(h){return h[Symbol.iterator]=hr,h}function hr(){return this}if(typeof Proxy>"u"||typeof Symbol>"u")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.");typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Fi,extras:{getDebugName:function(h,g){return(g!==void 0?wn(h,g):yn(h)||It(h)||hn(h)?Nr(h):wn(h)).name}},$mobx:z})}).call(this,i(155),i(82))},function(s,p,i){var l=i(116),c=i(44),b=i(179);l||c(Object.prototype,"toString",b,{unsafe:!0})},function(s,p,i){var l=i(40),c=i(83),b=i(70),_=i(56),E=i(111),w="Array Iterator",k=_.set,j=_.getterFor(w);s.exports=E(Array,"Array",function(P,D){k(this,{type:w,target:l(P),index:0,kind:D})},function(){var P=j(this),D=P.target,N=P.kind,L=P.index++;return!D||L>=D.length?(P.target=void 0,{value:void 0,done:!0}):N=="keys"?{value:L,done:!1}:N=="values"?{value:D[L],done:!1}:{value:[L,D[L]],done:!1}},"values"),b.Arguments=b.Array,c("keys"),c("values"),c("entries")},function(s,p,i){var l=i(7),c=i(147),b=i(148),_=i(3),E=i(57),w=i(27),k=w("iterator"),j=w("toStringTag"),P=_.values,D=function(L,B){if(L){if(L[k]!==P)try{E(L,k,P)}catch{L[k]=P}if(L[j]||E(L,j,B),c[B]){for(var X in _)if(L[X]!==_[X])try{E(L,X,_[X])}catch{L[X]=_[X]}}}};for(var N in c)D(l[N]&&l[N].prototype,N);D(b,"DOMTokenList")},function(s,p,i){var l=i(17),c=i(7),b=i(46),_=i(76),E=i(35),w=i(15),k=i(64),j=i(36),P=i(109),D=i(19),N=i(34),L=i(99),B=i(28),X=i(33),ee=i(58),ie=i(88),Z=i(32),V=i(38),K=i(40),z=i(87),M=i(41),I=i(71),C=i(54),F=i(66),J=i(72),le=i(139),ce=i(112),ye=i(51),xe=i(37),ge=i(93),ue=i(101),he=i(44),be=i(84),Se=i(91),Ie=i(69),$e=i(85),Pe=i(27),Ce=i(149),Ke=i(150),q=i(73),$=i(56),ae=i(74).forEach,Oe=Se("hidden"),ke="Symbol",we=Pe("toPrimitive"),qe=$.set,nt=$.getterFor(ke),Je=Object.prototype,Ye=c.Symbol,ve=Ye&&Ye.prototype,He=c.TypeError,te=c.QObject,Le=b("JSON","stringify"),ut=ye.f,vt=xe.f,it=le.f,yt=ge.f,St=w([].push),Pt=be("symbols"),at=be("op-symbols"),Nt=be("string-to-symbol-registry"),G=be("symbol-to-string-registry"),ne=be("wks"),Y=!te||!te.prototype||!te.prototype.findChild,se=j&&D(function(){return C(vt({},"a",{get:function(){return vt(this,"a",{value:7}).a}})).a!=7})?function(ze,Ve,et){var rt=ut(Je,Ve);rt&&delete Je[Ve],vt(ze,Ve,et),rt&&ze!==Je&&vt(Je,Ve,rt)}:vt,Me=function(ze,Ve){var et=Pt[ze]=C(ve);return qe(et,{type:ke,tag:ze,description:Ve}),j||(et.description=Ve),et},De=function(ze,Ve,et){ze===Je&&De(at,Ve,et),Z(ze);var rt=z(Ve);return Z(et),N(Pt,rt)?(et.enumerable?(N(ze,Oe)&&ze[Oe][rt]&&(ze[Oe][rt]=!1),et=C(et,{enumerable:I(0,!1)})):(N(ze,Oe)||vt(ze,Oe,I(1,{})),ze[Oe][rt]=!0),se(ze,rt,et)):vt(ze,rt,et)},Ue=function(ze,Ve){Z(ze);var et=K(Ve),rt=F(et).concat(Ct(et));return ae(rt,function(wt){j&&!E(ft,et,wt)||De(ze,wt,et[wt])}),ze},ft=function(ze){var Ve=z(ze),et=E(yt,this,Ve);return!(this===Je&&N(Pt,Ve)&&!N(at,Ve))&&(!(et||!N(this,Ve)||!N(Pt,Ve)||N(this,Oe)&&this[Oe][Ve])||et)},Ht=function(ze,Ve){var et=K(ze),rt=z(Ve);if(et!==Je||!N(Pt,rt)||N(at,rt)){var wt=ut(et,rt);return!wt||!N(Pt,rt)||N(et,Oe)&&et[Oe][rt]||(wt.enumerable=!0),wt}},$t=function(ze){var Ve=it(K(ze)),et=[];return ae(Ve,function(rt){N(Pt,rt)||N(Ie,rt)||St(et,rt)}),et},Ct=function(ze){var Ve=ze===Je,et=it(Ve?at:K(ze)),rt=[];return ae(et,function(wt){!N(Pt,wt)||Ve&&!N(Je,wt)||St(rt,Pt[wt])}),rt};if(P||(Ye=function(){if(ee(ve,this))throw He("Symbol is not a constructor");var ze=arguments.length&&arguments[0]!==void 0?M(arguments[0]):void 0,Ve=$e(ze),et=function(rt){this===Je&&E(et,at,rt),N(this,Oe)&&N(this[Oe],Ve)&&(this[Oe][Ve]=!1),se(this,Ve,I(1,rt))};return j&&Y&&se(Je,Ve,{configurable:!0,set:et}),Me(Ve,ze)},he(ve=Ye.prototype,"toString",function(){return nt(this).tag}),he(Ye,"withoutSetter",function(ze){return Me($e(ze),ze)}),ge.f=ft,xe.f=De,ye.f=Ht,J.f=le.f=$t,ce.f=Ct,Ce.f=function(ze){return Me(Pe(ze),ze)},j&&(vt(ve,"description",{configurable:!0,get:function(){return nt(this).description}}),k||he(Je,"propertyIsEnumerable",ft,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:Ye}),ae(F(ne),function(ze){Ke(ze)}),l({target:ke,stat:!0,forced:!P},{for:function(ze){var Ve=M(ze);if(N(Nt,Ve))return Nt[Ve];var et=Ye(Ve);return Nt[Ve]=et,G[et]=Ve,et},keyFor:function(ze){if(!ie(ze))throw He(ze+" is not a symbol");if(N(G,ze))return G[ze]},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),l({target:"Object",stat:!0,forced:!P,sham:!j},{create:function(ze,Ve){return Ve===void 0?C(ze):Ue(C(ze),Ve)},defineProperty:De,defineProperties:Ue,getOwnPropertyDescriptor:Ht}),l({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:$t,getOwnPropertySymbols:Ct}),l({target:"Object",stat:!0,forced:D(function(){ce.f(1)})},{getOwnPropertySymbols:function(ze){return ce.f(V(ze))}}),Le&&l({target:"JSON",stat:!0,forced:!P||D(function(){var ze=Ye();return Le([ze])!="[null]"||Le({a:ze})!="{}"||Le(Object(ze))!="{}"})},{stringify:function(ze,Ve,et){var rt=ue(arguments),wt=Ve;if((X(Ve)||ze!==void 0)&&!ie(ze))return L(Ve)||(Ve=function(Mt,cr){if(B(wt)&&(cr=E(wt,this,Mt,cr)),!ie(cr))return cr}),rt[1]=Ve,_(Le,null,rt)}}),!ve[we]){var Rt=ve.valueOf;he(ve,we,function(ze){return E(Rt,this)})}q(Ye,ke),Ie[Oe]=!0},function(s,p,i){var l=i(146).charAt,c=i(41),b=i(56),_=i(111),E="String Iterator",w=b.set,k=b.getterFor(E);_(String,"String",function(j){w(this,{type:E,string:c(j),index:0})},function(){var j,P=k(this),D=P.string,N=P.index;return N>=D.length?{value:void 0,done:!0}:(j=l(D,N),P.index+=j.length,{value:j,done:!1})})},function(s,p,i){(function(l){var c=function(b){return b&&b.Math==Math&&b};s.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof l=="object"&&l)||function(){return this}()||Function("return this")()}).call(this,i(82))},function(s,p,i){var l=i(17),c=i(36),b=i(7),_=i(15),E=i(34),w=i(28),k=i(58),j=i(41),P=i(37).f,D=i(134),N=b.Symbol,L=N&&N.prototype;if(c&&w(N)&&(!("description"in L)||N().description!==void 0)){var B={},X=function(){var M=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),I=k(L,this)?new N(M):M===void 0?N():N(M);return M===""&&(B[I]=!0),I};D(X,N),X.prototype=L,L.constructor=X;var ee=String(N("test"))=="Symbol(test)",ie=_(L.toString),Z=_(L.valueOf),V=/^Symbol\((.*)\)[^)]+$/,K=_("".replace),z=_("".slice);P(L,"description",{configurable:!0,get:function(){var M=Z(this),I=ie(M);if(E(B,M))return"";var C=ee?z(I,7,-1):K(I,V,"$1");return C===""?void 0:C}}),l({global:!0,forced:!0},{Symbol:X})}},function(s,p,i){i(150)("iterator")},function(s,p,i){i.d(p,"a",function(){return _.a}),i.d(p,"c",function(){return _.e}),i.d(p,"h",function(){return V}),i.d(p,"i",function(){return ee}),i.d(p,"j",function(){return B}),i.d(p,"b",function(){return ye}),i.d(p,"e",function(){return he}),i.d(p,"f",function(){return xe}),i.d(p,"g",function(){return Pt});var l,c,b,_=i(0),E=0,w=[],k=_.i.__b,j=_.i.__r,P=_.i.diffed,D=_.i.__c,N=_.i.unmount;function L(G,ne){_.i.__h&&_.i.__h(c,G,E||ne),E=0;var Y=c.__H||(c.__H={__:[],__h:[]});return G>=Y.__.length&&Y.__.push({}),Y.__[G]}function B(G){return E=1,X(J,G)}function X(G,ne,Y){var se=L(l++,2);return se.t=G,se.__c||(se.__=[Y?Y(ne):J(void 0,ne),function(Me){var De=se.t(se.__[0],Me);se.__[0]!==De&&(se.__=[De,se.__[1]],se.__c.setState({}))}],se.__c=c),se.__}function ee(G,ne){var Y=L(l++,3);!_.i.__s&&F(Y.__H,ne)&&(Y.__=G,Y.__H=ne,c.__H.__h.push(Y))}function ie(G,ne){var Y=L(l++,4);!_.i.__s&&F(Y.__H,ne)&&(Y.__=G,Y.__H=ne,c.__h.push(Y))}function Z(G,ne){var Y=L(l++,7);return F(Y.__H,ne)&&(Y.__=G(),Y.__H=ne,Y.__h=G),Y.__}function V(G,ne){return E=8,Z(function(){return G},ne)}function K(){var G;for(w.sort(function(ne,Y){return ne.__v.__b-Y.__v.__b});G=w.pop();)if(G.__P)try{G.__H.__h.forEach(I),G.__H.__h.forEach(C),G.__H.__h=[]}catch(ne){G.__H.__h=[],_.i.__e(ne,G.__v)}}_.i.__b=function(G){c=null,k&&k(G)},_.i.__r=function(G){j&&j(G),l=0;var ne=(c=G.__c).__H;ne&&(ne.__h.forEach(I),ne.__h.forEach(C),ne.__h=[])},_.i.diffed=function(G){P&&P(G);var ne=G.__c;ne&&ne.__H&&ne.__H.__h.length&&(w.push(ne)!==1&&b===_.i.requestAnimationFrame||((b=_.i.requestAnimationFrame)||M)(K)),c=null},_.i.__c=function(G,ne){ne.some(function(Y){try{Y.__h.forEach(I),Y.__h=Y.__h.filter(function(se){return!se.__||C(se)})}catch(se){ne.some(function(Me){Me.__h&&(Me.__h=[])}),ne=[],_.i.__e(se,Y.__v)}}),D&&D(G,ne)},_.i.unmount=function(G){N&&N(G);var ne,Y=G.__c;Y&&Y.__H&&(Y.__H.__.forEach(function(se){try{I(se)}catch(Me){ne=Me}}),ne&&_.i.__e(ne,Y.__v))};var z=typeof requestAnimationFrame=="function";function M(G){var ne,Y=function(){clearTimeout(se),z&&cancelAnimationFrame(ne),setTimeout(G)},se=setTimeout(Y,100);z&&(ne=requestAnimationFrame(Y))}function I(G){var ne=c,Y=G.__c;typeof Y=="function"&&(G.__c=void 0,Y()),c=ne}function C(G){var ne=c;G.__c=G.__(),c=ne}function F(G,ne){return!G||G.length!==ne.length||ne.some(function(Y,se){return Y!==G[se]})}function J(G,ne){return typeof ne=="function"?ne(G):ne}function le(G,ne){for(var Y in ne)G[Y]=ne[Y];return G}function ce(G,ne){for(var Y in G)if(Y!=="__source"&&!(Y in ne))return!0;for(var se in ne)if(se!=="__source"&&G[se]!==ne[se])return!0;return!1}function ye(G){this.props=G}function xe(G,ne){function Y(Me){var De=this.props.ref,Ue=De==Me.ref;return!Ue&&De&&(De.call?De(null):De.current=null),ne?!ne(this.props,Me)||!Ue:ce(this.props,Me)}function se(Me){return this.shouldComponentUpdate=Y,Object(_.e)(G,Me)}return se.displayName="Memo("+(G.displayName||G.name)+")",se.prototype.isReactComponent=!0,se.__f=!0,se}(ye.prototype=new _.a).isPureReactComponent=!0,ye.prototype.shouldComponentUpdate=function(G,ne){return ce(this.props,G)||ce(this.state,ne)};var ge=_.i.__b;_.i.__b=function(G){G.type&&G.type.__f&&G.ref&&(G.props.ref=G.ref,G.ref=null),ge&&ge(G)};var ue=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(G){function ne(Y,se){var Me=le({},Y);return delete Me.ref,G(Me,!(se=Y.ref||se)||typeof se=="object"&&!("current"in se)?null:se)}return ne.$$typeof=ue,ne.render=ne,ne.prototype.isReactComponent=ne.__f=!0,ne.displayName="ForwardRef("+(G.displayName||G.name)+")",ne}var be=function(G,ne){return G==null?null:Object(_.k)(Object(_.k)(G).map(ne))},Se={map:be,forEach:be,count:function(G){return G?Object(_.k)(G).length:0},only:function(G){var ne=Object(_.k)(G);if(ne.length!==1)throw"Children.only";return ne[0]},toArray:_.k},Ie=_.i.__e;_.i.__e=function(G,ne,Y){if(G.then){for(var se,Me=ne;Me=Me.__;)if((se=Me.__c)&&se.__c)return ne.__e==null&&(ne.__e=Y.__e,ne.__k=Y.__k),se.__c(G,ne)}Ie(G,ne,Y)};var $e=_.i.unmount;function Pe(G,ne,Y){return G&&(G.__c&&G.__c.__H&&(G.__c.__H.__.forEach(function(se){typeof se.__c=="function"&&se.__c()}),G.__c.__H=null),(G=le({},G)).__c!=null&&(G.__c.__P===Y&&(G.__c.__P=ne),G.__c=null),G.__k=G.__k&&G.__k.map(function(se){return Pe(se,ne,Y)})),G}function Ce(G,ne,Y){return G&&(G.__v=null,G.__k=G.__k&&G.__k.map(function(se){return Ce(se,ne,Y)}),G.__c&&G.__c.__P===ne&&(G.__e&&Y.insertBefore(G.__e,G.__d),G.__c.__e=!0,G.__c.__P=Y)),G}function Ke(){this.__u=0,this.t=null,this.__b=null}function q(G){var ne=G.__.__c;return ne&&ne.__e&&ne.__e(G)}function $(){this.u=null,this.o=null}_.i.unmount=function(G){var ne=G.__c;ne&&ne.__R&&ne.__R(),ne&&G.__h===!0&&(G.type=null),$e&&$e(G)},(Ke.prototype=new _.a).__c=function(G,ne){var Y=ne.__c,se=this;se.t==null&&(se.t=[]),se.t.push(Y);var Me=q(se.__v),De=!1,Ue=function(){De||(De=!0,Y.__R=null,Me?Me(ft):ft())};Y.__R=Ue;var ft=function(){if(!--se.__u){if(se.state.__e){var $t=se.state.__e;se.__v.__k[0]=Ce($t,$t.__c.__P,$t.__c.__O)}var Ct;for(se.setState({__e:se.__b=null});Ct=se.t.pop();)Ct.forceUpdate()}},Ht=ne.__h===!0;se.__u++||Ht||se.setState({__e:se.__b=se.__v.__k[0]}),G.then(Ue,Ue)},Ke.prototype.componentWillUnmount=function(){this.t=[]},Ke.prototype.render=function(G,ne){if(this.__b){if(this.__v.__k){var Y=document.createElement("div"),se=this.__v.__k[0].__c;this.__v.__k[0]=Pe(this.__b,Y,se.__O=se.__P)}this.__b=null}var Me=ne.__e&&Object(_.e)(_.b,null,G.fallback);return Me&&(Me.__h=null),[Object(_.e)(_.b,null,ne.__e?null:G.children),Me]};var ae=function(G,ne,Y){if(++Y[1]===Y[0]&&G.o.delete(ne),G.props.revealOrder&&(G.props.revealOrder[0]!=="t"||!G.o.size))for(Y=G.u;Y;){for(;Y.length>3;)Y.pop()();if(Y[1]<Y[0])break;G.u=Y=Y[2]}};function Oe(G){return this.getChildContext=function(){return G.context},G.children}function ke(G){var ne=this,Y=G.i;ne.componentWillUnmount=function(){Object(_.j)(null,ne.l),ne.l=null,ne.i=null},ne.i&&ne.i!==Y&&ne.componentWillUnmount(),G.__v?(ne.l||(ne.i=Y,ne.l={nodeType:1,parentNode:Y,childNodes:[],appendChild:function(se){this.childNodes.push(se),ne.i.appendChild(se)},insertBefore:function(se,Me){this.childNodes.push(se),ne.i.appendChild(se)},removeChild:function(se){this.childNodes.splice(this.childNodes.indexOf(se)>>>1,1),ne.i.removeChild(se)}}),Object(_.j)(Object(_.e)(Oe,{context:ne.context},G.__v),ne.l)):ne.l&&ne.componentWillUnmount()}($.prototype=new _.a).__e=function(G){var ne=this,Y=q(ne.__v),se=ne.o.get(G);return se[0]++,function(Me){var De=function(){ne.props.revealOrder?(se.push(Me),ae(ne,G,se)):Me()};Y?Y(De):De()}},$.prototype.render=function(G){this.u=null,this.o=new Map;var ne=Object(_.k)(G.children);G.revealOrder&&G.revealOrder[0]==="b"&&ne.reverse();for(var Y=ne.length;Y--;)this.o.set(ne[Y],this.u=[1,0,this.u]);return G.children},$.prototype.componentDidUpdate=$.prototype.componentDidMount=function(){var G=this;this.o.forEach(function(ne,Y){ae(G,Y,ne)})};var we=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,qe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,nt=typeof document<"u",Je=function(G){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(G)};_.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(G){Object.defineProperty(_.a.prototype,G,{configurable:!0,get:function(){return this["UNSAFE_"+G]},set:function(ne){Object.defineProperty(this,G,{configurable:!0,writable:!0,value:ne})}})});var Ye=_.i.event;function ve(){}function He(){return this.cancelBubble}function te(){return this.defaultPrevented}_.i.event=function(G){return Ye&&(G=Ye(G)),G.persist=ve,G.isPropagationStopped=He,G.isDefaultPrevented=te,G.nativeEvent=G};var Le,ut={configurable:!0,get:function(){return this.class}},vt=_.i.vnode;_.i.vnode=function(G){var ne=G.type,Y=G.props,se=Y;if(typeof ne=="string"){var Me=ne.indexOf("-")===-1;for(var De in se={},Y){var Ue=Y[De];nt&&De==="children"&&ne==="noscript"||De==="value"&&"defaultValue"in Y&&Ue==null||(De==="defaultValue"&&"value"in Y&&Y.value==null?De="value":De==="download"&&Ue===!0?Ue="":/ondoubleclick/i.test(De)?De="ondblclick":/^onchange(textarea|input)/i.test(De+ne)&&!Je(Y.type)?De="oninput":/^onfocus$/i.test(De)?De="onfocusin":/^onblur$/i.test(De)?De="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(De)?De=De.toLowerCase():Me&&qe.test(De)?De=De.replace(/[A-Z0-9]/,"-$&").toLowerCase():Ue===null&&(Ue=void 0),se[De]=Ue)}ne=="select"&&se.multiple&&Array.isArray(se.value)&&(se.value=Object(_.k)(Y.children).forEach(function(ft){ft.props.selected=se.value.indexOf(ft.props.value)!=-1})),ne=="select"&&se.defaultValue!=null&&(se.value=Object(_.k)(Y.children).forEach(function(ft){ft.props.selected=se.multiple?se.defaultValue.indexOf(ft.props.value)!=-1:se.defaultValue==ft.props.value})),G.props=se,Y.class!=Y.className&&(ut.enumerable="className"in Y,Y.className!=null&&(se.class=Y.className),Object.defineProperty(se,"className",ut))}G.$$typeof=we,vt&&vt(G)};var it=_.i.__r;_.i.__r=function(G){it&&it(G),Le=G.__c};var yt={ReactCurrentDispatcher:{current:{readContext:function(G){return Le.__n[G.__c].props.value}}}};function St(G){return!!G&&G.$$typeof===we}var Pt=function(G,ne){return G(ne)},at=_.b,Nt={useState:B,useReducer:X,useEffect:ee,useLayoutEffect:ie,useRef:function(G){return E=5,Z(function(){return{current:G}},[])},useImperativeHandle:function(G,ne,Y){E=6,ie(function(){typeof G=="function"?G(ne()):G&&(G.current=ne())},Y==null?Y:Y.concat(G))},useMemo:Z,useCallback:V,useContext:function(G){var ne=c.context[G.__c],Y=L(l++,9);return Y.c=G,ne?(Y.__==null&&(Y.__=!0,ne.sub(c)),ne.props.value):G.__},useDebugValue:function(G,ne){_.i.useDebugValue&&_.i.useDebugValue(ne?ne(G):G)},version:"17.0.2",Children:Se,render:function(G,ne,Y){return ne.__k==null&&(ne.textContent=""),Object(_.j)(G,ne),typeof Y=="function"&&Y(),G?G.__c:null},hydrate:function(G,ne,Y){return Object(_.h)(G,ne),typeof Y=="function"&&Y(),G?G.__c:null},unmountComponentAtNode:function(G){return!!G.__k&&(Object(_.j)(null,G),!0)},createPortal:function(G,ne){return Object(_.e)(ke,{__v:G,i:ne})},createElement:_.e,createContext:_.d,createFactory:function(G){return _.e.bind(null,G)},cloneElement:function(G){return St(G)?_.c.apply(null,arguments):G},createRef:_.f,Fragment:_.b,isValidElement:St,findDOMNode:function(G){return G&&(G.base||G.nodeType===1&&G)||null},Component:_.a,PureComponent:ye,memo:xe,forwardRef:he,flushSync:function(G,ne){return G(ne)},unstable_batchedUpdates:Pt,StrictMode:at,Suspense:Ke,SuspenseList:$,lazy:function(G){var ne,Y,se;function Me(De){if(ne||(ne=G()).then(function(Ue){Y=Ue.default||Ue},function(Ue){se=Ue}),se)throw se;if(!Y)throw ne;return Object(_.e)(Y,De)}return Me.displayName="Lazy",Me.__f=!0,Me},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:yt};p.d=Nt},function(s,p,i){var l=i(7),c=i(147),b=i(148),_=i(180),E=i(57),w=function(j){if(j&&j.forEach!==_)try{E(j,"forEach",_)}catch{j.forEach=_}};for(var k in c)c[k]&&w(l[k]&&l[k].prototype);w(b)},function(s,p,i){i(17)({target:"Object",stat:!0},{setPrototypeOf:i(97)})},function(s,p,i){var l=i(17),c=i(19),b=i(38),_=i(96),E=i(137);l({target:"Object",stat:!0,forced:c(function(){_(1)}),sham:!E},{getPrototypeOf:function(w){return _(b(w))}})},function(s,p,i){var l=i(17),c=i(46),b=i(76),_=i(200),E=i(157),w=i(32),k=i(33),j=i(54),P=i(19),D=c("Reflect","construct"),N=Object.prototype,L=[].push,B=P(function(){function ie(){}return!(D(function(){},[],ie)instanceof ie)}),X=!P(function(){D(function(){})}),ee=B||X;l({target:"Reflect",stat:!0,forced:ee,sham:ee},{construct:function(ie,Z){E(ie),w(Z);var V=arguments.length<3?ie:E(arguments[2]);if(X&&!B)return D(ie,Z,V);if(ie==V){switch(Z.length){case 0:return new ie;case 1:return new ie(Z[0]);case 2:return new ie(Z[0],Z[1]);case 3:return new ie(Z[0],Z[1],Z[2]);case 4:return new ie(Z[0],Z[1],Z[2],Z[3])}var K=[null];return b(L,K,Z),new(b(_,ie,K))}var z=V.prototype,M=j(k(z)?z:N),I=b(ie,M,Z);return k(I)?I:M}})},function(s,p){var i=Function.prototype,l=i.bind,c=i.call,b=l&&l.bind(c);s.exports=l?function(_){return _&&b(c,_)}:function(_){return _&&function(){return c.apply(_,arguments)}}},function(s,p,i){var l=i(17),c=i(7),b=i(99),_=i(100),E=i(33),w=i(67),k=i(43),j=i(40),P=i(61),D=i(27),N=i(75),L=i(101),B=N("slice"),X=D("species"),ee=c.Array,ie=Math.max;l({target:"Array",proto:!0,forced:!B},{slice:function(Z,V){var K,z,M,I=j(this),C=k(I),F=w(Z,C),J=w(V===void 0?C:V,C);if(b(I)&&(K=I.constructor,(_(K)&&(K===ee||b(K.prototype))||E(K)&&(K=K[X])===null)&&(K=void 0),K===ee||K===void 0))return L(I,F,J);for(z=new(K===void 0?ee:K)(ie(J-F,0)),M=0;F<J;F++,M++)F in I&&P(z,M,I[F]);return z.length=M,z}})},function(s,p,i){var l=i(7),c=i(51).f,b=i(57),_=i(44),E=i(108),w=i(134),k=i(95);s.exports=function(j,P){var D,N,L,B,X,ee=j.target,ie=j.global,Z=j.stat;if(D=ie?l:Z?l[ee]||E(ee,{}):(l[ee]||{}).prototype)for(N in P){if(B=P[N],L=j.noTargetGet?(X=c(D,N))&&X.value:D[N],!k(ie?N:ee+(Z?".":"#")+N,j.forced)&&L!==void 0){if(typeof B==typeof L)continue;w(B,L)}(j.sham||L&&L.sham)&&b(B,"sham",!0),_(D,N,B,j)}}},function(s,p,i){var l=i(17),c=i(102);l({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},function(s,p){s.exports=function(i){try{return!!i()}catch{return!0}}},function(s,p,i){var l=i(17),c=i(38),b=i(66);l({target:"Object",stat:!0,forced:i(19)(function(){b(1)})},{keys:function(_){return b(c(_))}})},function(s,p,i){var l=i(17),c=i(19),b=i(40),_=i(51).f,E=i(36),w=c(function(){_(1)});l({target:"Object",stat:!0,forced:!E||w,sham:!E},{getOwnPropertyDescriptor:function(k,j){return _(b(k),j)}})},function(s,p,i){var l=i(36),c=i(94).EXISTS,b=i(15),_=i(37).f,E=Function.prototype,w=b(E.toString),k=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=b(k.exec);l&&!c&&_(E,"name",{configurable:!0,get:function(){try{return j(k,w(this))[1]}catch{return""}}})},function(s,p,i){var l=i(17),c=i(74).filter;l({target:"Array",proto:!0,forced:!i(75)("filter")},{filter:function(b){return c(this,b,arguments.length>1?arguments[1]:void 0)}})},function(s,p,i){var l=i(17),c=i(183);l({target:"Array",stat:!0,forced:!i(118)(function(b){Array.from(b)})},{from:c})},function(s,p,i){var l=i(17),c=i(36),b=i(135),_=i(40),E=i(51),w=i(61);l({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(k){for(var j,P,D=_(k),N=E.f,L=b(D),B={},X=0;L.length>X;)(P=N(D,j=L[X++]))!==void 0&&w(B,j,P);return B}})},,function(s,p,i){var l=i(7),c=i(84),b=i(34),_=i(85),E=i(109),w=i(128),k=c("wks"),j=l.Symbol,P=j&&j.for,D=w?j:j&&j.withoutSetter||_;s.exports=function(N){if(!b(k,N)||!E&&typeof k[N]!="string"){var L="Symbol."+N;E&&b(j,N)?k[N]=j[N]:k[N]=w&&P?P(L):D(L)}return k[N]}},function(s,p){s.exports=function(i){return typeof i=="function"}},function(s,p,i){var l=i(17),c=i(7),b=i(19),_=i(99),E=i(33),w=i(38),k=i(43),j=i(61),P=i(119),D=i(75),N=i(27),L=i(65),B=N("isConcatSpreadable"),X=9007199254740991,ee="Maximum allowed index exceeded",ie=c.TypeError,Z=L>=51||!b(function(){var z=[];return z[B]=!1,z.concat()[0]!==z}),V=D("concat"),K=function(z){if(!E(z))return!1;var M=z[B];return M!==void 0?!!M:_(z)};l({target:"Array",proto:!0,forced:!Z||!V},{concat:function(z){var M,I,C,F,J,le=w(this),ce=P(le,0),ye=0;for(M=-1,C=arguments.length;M<C;M++)if(K(J=M===-1?le:arguments[M])){if(ye+(F=k(J))>X)throw ie(ee);for(I=0;I<F;I++,ye++)I in J&&j(ce,ye,J[I])}else{if(ye>=X)throw ie(ee);j(ce,ye++,J)}return ce.length=ye,ce}})},function(s,p,i){var l=i(17),c=i(199);l({target:"Object",stat:!0,forced:Object.assign!==c},{assign:c})},function(s,p,i){var l=i(105),c=typeof self=="object"&&self&&self.Object===Object&&self,b=l.a||c||Function("return this")();p.a=b},function(s,p,i){var l=i(7),c=i(33),b=l.String,_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not an object")}},function(s,p,i){var l=i(28);s.exports=function(c){return typeof c=="object"?c!==null:l(c)}},function(s,p,i){var l=i(15),c=i(38),b=l({}.hasOwnProperty);s.exports=Object.hasOwn||function(_,E){return b(c(_),E)}},function(s,p){var i=Function.prototype.call;s.exports=i.bind?i.bind(i):function(){return i.apply(i,arguments)}},function(s,p,i){var l=i(19);s.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(s,p,i){var l=i(7),c=i(36),b=i(129),_=i(32),E=i(87),w=l.TypeError,k=Object.defineProperty;p.f=c?k:function(j,P,D){if(_(j),P=E(P),_(D),b)try{return k(j,P,D)}catch{}if("get"in D||"set"in D)throw w("Accessors not supported");return"value"in D&&(j[P]=D.value),j}},function(s,p,i){var l=i(7),c=i(45),b=l.Object;s.exports=function(_){return b(c(_))}},function(s,p,i){var l=i(17),c=i(74).map;l({target:"Array",proto:!0,forced:!i(75)("map")},{map:function(b){return c(this,b,arguments.length>1?arguments[1]:void 0)}})},function(s,p,i){var l=i(81),c=i(45);s.exports=function(b){return l(c(b))}},function(s,p,i){var l=i(7),c=i(98),b=l.String;s.exports=function(_){if(c(_)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return b(_)}},function(s,p,i){(function(l){i.d(p,"d",function(){return _}),i.d(p,"c",function(){return E}),i.d(p,"b",function(){return w}),i.d(p,"a",function(){return j});var c=i(10),b=function(P,D){var N=typeof Symbol=="function"&&P[Symbol.iterator];if(!N)return P;var L,B,X=N.call(P),ee=[];try{for(;(D===void 0||D-- >0)&&!(L=X.next()).done;)ee.push(L.value)}catch(ie){B={error:ie}}finally{try{L&&!L.done&&(N=X.return)&&N.call(X)}finally{if(B)throw B.error}}return ee};function _(){var P=b(Object(c.j)(0),2)[1];return Object(c.h)(function(){P(function(D){return D+1})},[])}function E(P){if(!P||typeof P!="object")return!1;var D=Object.getPrototypeOf(P);return!D||D===Object.prototype}function w(P){return typeof Symbol=="function"?Symbol.for(P):"__$mobx-react "+P+"__"}var k={};function j(){return typeof window<"u"?window:l!==void 0?l:typeof self<"u"?self:k}}).call(this,i(82))},function(s,p,i){var l=i(90);s.exports=function(c){return l(c.length)}},function(s,p,i){var l=i(7),c=i(28),b=i(34),_=i(57),E=i(108),w=i(92),k=i(56),j=i(94).CONFIGURABLE,P=k.get,D=k.enforce,N=String(String).split("String");(s.exports=function(L,B,X,ee){var ie,Z=!!ee&&!!ee.unsafe,V=!!ee&&!!ee.enumerable,K=!!ee&&!!ee.noTargetGet,z=ee&&ee.name!==void 0?ee.name:B;c(X)&&(String(z).slice(0,7)==="Symbol("&&(z="["+String(z).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!b(X,"name")||j&&X.name!==z)&&_(X,"name",z),(ie=D(X)).source||(ie.source=N.join(typeof z=="string"?z:""))),L!==l?(Z?!K&&L[B]&&(V=!0):delete L[B],V?L[B]=X:_(L,B,X)):V?L[B]=X:E(B,X)})(Function.prototype,"toString",function(){return c(this)&&P(this).source||w(this)})},function(s,p,i){var l=i(7).TypeError;s.exports=function(c){if(c==null)throw l("Can't call method on "+c);return c}},function(s,p,i){var l=i(7),c=i(28),b=function(_){return c(_)?_:void 0};s.exports=function(_,E){return arguments.length<2?b(l[_]):l[_]&&l[_][E]}},function(s,p,i){var l=i(17),c=i(35),b=i(33),_=i(32),E=i(201),w=i(51),k=i(96);l({target:"Reflect",stat:!0},{get:function j(P,D){var N,L,B=arguments.length<3?P:arguments[2];return _(P)===B?P[D]:(N=w.f(P,D))?E(N)?N.value:N.get===void 0?void 0:c(N.get,B):b(L=k(P))?j(L,D,B):void 0}})},function(s,p,i){(function(l){var c=i(31),b=i(166),_=y&&!y.nodeType&&y,E=_&&typeof l=="object"&&l&&!l.nodeType&&l,w=E&&E.exports===_?c.a.Buffer:void 0,k=(w?w.isBuffer:void 0)||b.a;p.a=k}).call(this,i(121)(s))},function(s,p,i){(function(l){var c=i(105),b=y&&!y.nodeType&&y,_=b&&typeof l=="object"&&l&&!l.nodeType&&l,E=_&&_.exports===b&&c.a.process,w=function(){try{var k=_&&_.require&&_.require("util").types;return k||E&&E.binding&&E.binding("util")}catch{}}();p.a=w}).call(this,i(121)(s))},function(s,p,i){var l=i(15),c=l({}.toString),b=l("".slice);s.exports=function(_){return b(c(_),8,-1)}},function(s,p,i){var l=i(36),c=i(35),b=i(93),_=i(71),E=i(40),w=i(87),k=i(34),j=i(129),P=Object.getOwnPropertyDescriptor;p.f=l?P:function(D,N){if(D=E(D),N=w(N),j)try{return P(D,N)}catch{}if(k(D,N))return _(!c(b.f,D,N),D[N])}},function(s,p,i){var l=i(17),c=i(213).entries;l({target:"Object",stat:!0},{entries:function(b){return c(b)}})},function(s,p,i){var l=i(46);s.exports=l("navigator","userAgent")||""},function(s,p,i){var l,c=i(32),b=i(169),_=i(110),E=i(69),w=i(133),k=i(86),j=i(91),P=j("IE_PROTO"),D=function(){},N=function(X){return"<script>"+X+"<\/script>"},L=function(X){X.write(N("")),X.close();var ee=X.parentWindow.Object;return X=null,ee},B=function(){try{l=new ActiveXObject("htmlfile")}catch{}var X,ee;B=typeof document<"u"?document.domain&&l?L(l):((ee=k("iframe")).style.display="none",w.appendChild(ee),ee.src="javascript:",(X=ee.contentWindow.document).open(),X.write(N("document.F=Object")),X.close(),X.F):L(l);for(var ie=_.length;ie--;)delete B.prototype[_[ie]];return B()};E[P]=!0,s.exports=Object.create||function(X,ee){var ie;return X!==null?(D.prototype=c(X),ie=new D,D.prototype=null,ie[P]=X):ie=B(),ee===void 0?ie:b(ie,ee)}},function(s,p,i){var l=i(7),c=i(28),b=i(89),_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not a function")}},function(s,p,i){var l,c,b,_=i(171),E=i(7),w=i(15),k=i(33),j=i(57),P=i(34),D=i(107),N=i(91),L=i(69),B="Object already initialized",X=E.TypeError,ee=E.WeakMap;if(_||D.state){var ie=D.state||(D.state=new ee),Z=w(ie.get),V=w(ie.has),K=w(ie.set);l=function(M,I){if(V(ie,M))throw new X(B);return I.facade=M,K(ie,M,I),I},c=function(M){return Z(ie,M)||{}},b=function(M){return V(ie,M)}}else{var z=N("state");L[z]=!0,l=function(M,I){if(P(M,z))throw new X(B);return I.facade=M,j(M,z,I),I},c=function(M){return P(M,z)?M[z]:{}},b=function(M){return P(M,z)}}s.exports={set:l,get:c,has:b,enforce:function(M){return b(M)?c(M):l(M,{})},getterFor:function(M){return function(I){var C;if(!k(I)||(C=c(I)).type!==M)throw X("Incompatible receiver, "+M+" required");return C}}}},function(s,p,i){var l=i(36),c=i(37),b=i(71);s.exports=l?function(_,E,w){return c.f(_,E,b(1,w))}:function(_,E,w){return _[E]=w,_}},function(s,p,i){var l=i(15);s.exports=l({}.isPrototypeOf)},function(s,p,i){var l=i(55);s.exports=function(c,b){var _=c[b];return _==null?void 0:l(_)}},function(s,p,i){i(174)("Map",function(l){return function(){return l(this,arguments.length?arguments[0]:void 0)}},i(178))},function(s,p,i){var l=i(87),c=i(37),b=i(71);s.exports=function(_,E,w){var k=l(E);k in _?c.f(_,k,b(0,w)):_[k]=w}},function(s,p,i){var l=i(15),c=i(55),b=l(l.bind);s.exports=function(_,E){return c(_),E===void 0?_:b?b(_,E):function(){return _.apply(E,arguments)}}},function(s,p,i){var l=i(17),c=i(15),b=i(81),_=i(40),E=i(120),w=c([].join),k=b!=Object,j=E("join",",");l({target:"Array",proto:!0,forced:k||!j},{join:function(P){return w(_(this),P===void 0?",":P)}})},function(s,p){s.exports=!1},function(s,p,i){var l,c,b=i(7),_=i(53),E=b.process,w=b.Deno,k=E&&E.versions||w&&w.version,j=k&&k.v8;j&&(c=(l=j.split("."))[0]>0&&l[0]<4?1:+(l[0]+l[1])),!c&&_&&(!(l=_.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=_.match(/Chrome\/(\d+)/))&&(c=+l[1]),s.exports=c},function(s,p,i){var l=i(131),c=i(110);s.exports=Object.keys||function(b){return l(b,c)}},function(s,p,i){var l=i(68),c=Math.max,b=Math.min;s.exports=function(_,E){var w=l(_);return w<0?c(w+E,0):b(w,E)}},function(s,p){var i=Math.ceil,l=Math.floor;s.exports=function(c){var b=+c;return b!=b||b===0?0:(b>0?l:i)(b)}},function(s,p){s.exports={}},function(s,p){s.exports={}},function(s,p){s.exports=function(i,l){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:l}}},function(s,p,i){var l=i(131),c=i(110).concat("length","prototype");p.f=Object.getOwnPropertyNames||function(b){return l(b,c)}},function(s,p,i){var l=i(37).f,c=i(34),b=i(27)("toStringTag");s.exports=function(_,E,w){_&&!c(_=w?_:_.prototype,b)&&l(_,b,{configurable:!0,value:E})}},function(s,p,i){var l=i(62),c=i(15),b=i(81),_=i(38),E=i(43),w=i(119),k=c([].push),j=function(P){var D=P==1,N=P==2,L=P==3,B=P==4,X=P==6,ee=P==7,ie=P==5||X;return function(Z,V,K,z){for(var M,I,C=_(Z),F=b(C),J=l(V,K),le=E(F),ce=0,ye=z||w,xe=D?ye(Z,le):N||ee?ye(Z,0):void 0;le>ce;ce++)if((ie||ce in F)&&(I=J(M=F[ce],ce,C),P))if(D)xe[ce]=I;else if(I)switch(P){case 3:return!0;case 5:return M;case 6:return ce;case 2:k(xe,M)}else switch(P){case 4:return!1;case 7:k(xe,M)}return X?-1:L||B?B:xe}};s.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},function(s,p,i){var l=i(19),c=i(27),b=i(65),_=c("species");s.exports=function(E){return b>=51||!l(function(){var w=[];return(w.constructor={})[_]=function(){return{foo:1}},w[E](Boolean).foo!==1})}},function(s,p){var i=Function.prototype,l=i.apply,c=i.bind,b=i.call;s.exports=typeof Reflect=="object"&&Reflect.apply||(c?b.bind(l):function(){return b.apply(l,arguments)})},function(s,p,i){var l=i(76),c=i(35),b=i(15),_=i(122),E=i(154),w=i(32),k=i(45),j=i(156),P=i(123),D=i(90),N=i(41),L=i(59),B=i(113),X=i(124),ee=i(102),ie=i(151),Z=i(19),V=ie.UNSUPPORTED_Y,K=4294967295,z=Math.min,M=[].push,I=b(/./.exec),C=b(M),F=b("".slice),J=!Z(function(){var le=/(?:)/,ce=le.exec;le.exec=function(){return ce.apply(this,arguments)};var ye="ab".split(le);return ye.length!==2||ye[0]!=="a"||ye[1]!=="b"});_("split",function(le,ce,ye){var xe;return xe="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(ge,ue){var he=N(k(this)),be=ue===void 0?K:ue>>>0;if(be===0)return[];if(ge===void 0)return[he];if(!E(ge))return c(ce,he,ge,be);for(var Se,Ie,$e,Pe=[],Ce=(ge.ignoreCase?"i":"")+(ge.multiline?"m":"")+(ge.unicode?"u":"")+(ge.sticky?"y":""),Ke=0,q=new RegExp(ge.source,Ce+"g");(Se=c(ee,q,he))&&!((Ie=q.lastIndex)>Ke&&(C(Pe,F(he,Ke,Se.index)),Se.length>1&&Se.index<he.length&&l(M,Pe,B(Se,1)),$e=Se[0].length,Ke=Ie,Pe.length>=be));)q.lastIndex===Se.index&&q.lastIndex++;return Ke===he.length?!$e&&I(q,"")||C(Pe,""):C(Pe,F(he,Ke)),Pe.length>be?B(Pe,0,be):Pe}:"0".split(void 0,0).length?function(ge,ue){return ge===void 0&&ue===0?[]:c(ce,this,ge,ue)}:ce,[function(ge,ue){var he=k(this),be=ge==null?void 0:L(ge,le);return be?c(be,ge,he,ue):c(xe,N(he),ge,ue)},function(ge,ue){var he=w(this),be=N(ge),Se=ye(xe,he,be,ue,xe!==ce);if(Se.done)return Se.value;var Ie=j(he,RegExp),$e=he.unicode,Pe=(he.ignoreCase?"i":"")+(he.multiline?"m":"")+(he.unicode?"u":"")+(V?"g":"y"),Ce=new Ie(V?"^(?:"+he.source+")":he,Pe),Ke=ue===void 0?K:ue>>>0;if(Ke===0)return[];if(be.length===0)return X(Ce,be)===null?[be]:[];for(var q=0,$=0,ae=[];$<be.length;){Ce.lastIndex=V?0:$;var Oe,ke=X(Ce,V?F(be,$):be);if(ke===null||(Oe=z(D(Ce.lastIndex+(V?$:0)),be.length))===q)$=P(be,$,$e);else{if(C(ae,F(be,q,$)),ae.length===Ke)return ae;for(var we=1;we<=ke.length-1;we++)if(C(ae,ke[we]),ae.length===Ke)return ae;$=q=Oe}}return C(ae,F(be,q)),ae}]},!J,V)},function(s,p,i){var l=i(36),c=i(7),b=i(15),_=i(95),E=i(44),w=i(34),k=i(143),j=i(58),P=i(88),D=i(130),N=i(19),L=i(72).f,B=i(51).f,X=i(37).f,ee=i(197),ie=i(159).trim,Z="Number",V=c.Number,K=V.prototype,z=c.TypeError,M=b("".slice),I=b("".charCodeAt),C=function(xe){var ge=D(xe,"number");return typeof ge=="bigint"?ge:F(ge)},F=function(xe){var ge,ue,he,be,Se,Ie,$e,Pe,Ce=D(xe,"number");if(P(Ce))throw z("Cannot convert a Symbol value to a number");if(typeof Ce=="string"&&Ce.length>2){if(Ce=ie(Ce),(ge=I(Ce,0))===43||ge===45){if((ue=I(Ce,2))===88||ue===120)return NaN}else if(ge===48){switch(I(Ce,1)){case 66:case 98:he=2,be=49;break;case 79:case 111:he=8,be=55;break;default:return+Ce}for(Ie=(Se=M(Ce,2)).length,$e=0;$e<Ie;$e++)if((Pe=I(Se,$e))<48||Pe>be)return NaN;return parseInt(Se,he)}}return+Ce};if(_(Z,!V(" 0o1")||!V("0b1")||V("+0x1"))){for(var J,le=function(xe){var ge=arguments.length<1?0:V(C(xe)),ue=this;return j(K,ue)&&N(function(){ee(ue)})?k(Object(ge),ue,le):ge},ce=l?L(V):"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(","),ye=0;ce.length>ye;ye++)w(V,J=ce[ye])&&!w(le,J)&&X(le,J,B(V,J));le.prototype=K,K.constructor=le,E(c,Z,le)}},function(s,p,i){i(17)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(s,p,i){var l=i(17),c=i(214),b=i(83);l({target:"Array",proto:!0},{fill:c}),b("fill")},function(s,p,i){var l=i(7),c=i(15),b=i(19),_=i(50),E=l.Object,w=c("".split);s.exports=b(function(){return!E("z").propertyIsEnumerable(0)})?function(k){return _(k)=="String"?w(k,""):E(k)}:E},function(s,p){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}s.exports=i},function(s,p,i){var l=i(27),c=i(54),b=i(37),_=l("unscopables"),E=Array.prototype;E[_]==null&&b.f(E,_,{configurable:!0,value:c(null)}),s.exports=function(w){E[_][w]=!0}},function(s,p,i){var l=i(64),c=i(107);(s.exports=function(b,_){return c[b]||(c[b]=_!==void 0?_:{})})("versions",[]).push({version:"3.19.3",mode:l?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(s,p,i){var l=i(15),c=0,b=Math.random(),_=l(1 .toString);s.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+_(++c+b,36)}},function(s,p,i){var l=i(7),c=i(33),b=l.document,_=c(b)&&c(b.createElement);s.exports=function(E){return _?b.createElement(E):{}}},function(s,p,i){var l=i(130),c=i(88);s.exports=function(b){var _=l(b,"string");return c(_)?_:_+""}},function(s,p,i){var l=i(7),c=i(46),b=i(28),_=i(58),E=i(128),w=l.Object;s.exports=E?function(k){return typeof k=="symbol"}:function(k){var j=c("Symbol");return b(j)&&_(j.prototype,w(k))}},function(s,p,i){var l=i(7).String;s.exports=function(c){try{return l(c)}catch{return"Object"}}},function(s,p,i){var l=i(68),c=Math.min;s.exports=function(b){return b>0?c(l(b),9007199254740991):0}},function(s,p,i){var l=i(84),c=i(85),b=l("keys");s.exports=function(_){return b[_]||(b[_]=c(_))}},function(s,p,i){var l=i(15),c=i(28),b=i(107),_=l(Function.toString);c(b.inspectSource)||(b.inspectSource=function(E){return _(E)}),s.exports=b.inspectSource},function(s,p,i){var l={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,b=c&&!l.call({1:2},1);p.f=b?function(_){var E=c(this,_);return!!E&&E.enumerable}:l},function(s,p,i){var l=i(36),c=i(34),b=Function.prototype,_=l&&Object.getOwnPropertyDescriptor,E=c(b,"name"),w=E&&function(){}.name==="something",k=E&&(!l||l&&_(b,"name").configurable);s.exports={EXISTS:E,PROPER:w,CONFIGURABLE:k}},function(s,p,i){var l=i(19),c=i(28),b=/#|\.prototype\./,_=function(P,D){var N=w[E(P)];return N==j||N!=k&&(c(D)?l(D):!!D)},E=_.normalize=function(P){return String(P).replace(b,".").toLowerCase()},w=_.data={},k=_.NATIVE="N",j=_.POLYFILL="P";s.exports=_},function(s,p,i){var l=i(7),c=i(34),b=i(28),_=i(38),E=i(91),w=i(137),k=E("IE_PROTO"),j=l.Object,P=j.prototype;s.exports=w?j.getPrototypeOf:function(D){var N=_(D);if(c(N,k))return N[k];var L=N.constructor;return b(L)&&N instanceof L?L.prototype:N instanceof j?P:null}},function(s,p,i){var l=i(15),c=i(32),b=i(173);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var _,E=!1,w={};try{(_=l(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(w,[]),E=w instanceof Array}catch{}return function(k,j){return c(k),b(j),E?_(k,j):k.__proto__=j,k}}():void 0)},function(s,p,i){var l=i(7),c=i(116),b=i(28),_=i(50),E=i(27)("toStringTag"),w=l.Object,k=_(function(){return arguments}())=="Arguments";s.exports=c?_:function(j){var P,D,N;return j===void 0?"Undefined":j===null?"Null":typeof(D=function(L,B){try{return L[B]}catch{}}(P=w(j),E))=="string"?D:k?_(P):(N=_(P))=="Object"&&b(P.callee)?"Arguments":N}},function(s,p,i){var l=i(50);s.exports=Array.isArray||function(c){return l(c)=="Array"}},function(s,p,i){var l=i(15),c=i(19),b=i(28),_=i(98),E=i(46),w=i(92),k=function(){},j=[],P=E("Reflect","construct"),D=/^\s*(?:class|function)\b/,N=l(D.exec),L=!D.exec(k),B=function(X){if(!b(X))return!1;try{return P(k,j,X),!0}catch{return!1}};s.exports=!P||c(function(){var X;return B(B.call)||!B(Object)||!B(function(){X=!0})||X})?function(X){if(!b(X))return!1;switch(_(X)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return L||!!N(D,w(X))}:B},function(s,p,i){var l=i(15);s.exports=l([].slice)},function(s,p,i){var l,c,b=i(35),_=i(15),E=i(41),w=i(185),k=i(151),j=i(84),P=i(54),D=i(56).get,N=i(186),L=i(187),B=j("native-string-replace",String.prototype.replace),X=RegExp.prototype.exec,ee=X,ie=_("".charAt),Z=_("".indexOf),V=_("".replace),K=_("".slice),z=(c=/b*/g,b(X,l=/a/,"a"),b(X,c,"a"),l.lastIndex!==0||c.lastIndex!==0),M=k.BROKEN_CARET,I=/()??/.exec("")[1]!==void 0;(z||I||M||N||L)&&(ee=function(C){var F,J,le,ce,ye,xe,ge,ue=this,he=D(ue),be=E(C),Se=he.raw;if(Se)return Se.lastIndex=ue.lastIndex,F=b(ee,Se,be),ue.lastIndex=Se.lastIndex,F;var Ie=he.groups,$e=M&&ue.sticky,Pe=b(w,ue),Ce=ue.source,Ke=0,q=be;if($e&&(Pe=V(Pe,"y",""),Z(Pe,"g")===-1&&(Pe+="g"),q=K(be,ue.lastIndex),ue.lastIndex>0&&(!ue.multiline||ue.multiline&&ie(be,ue.lastIndex-1)!==`
`)&&(Ce="(?: "+Ce+")",q=" "+q,Ke++),J=new RegExp("^(?:"+Ce+")",Pe)),I&&(J=new RegExp("^"+Ce+"$(?!\\s)",Pe)),z&&(le=ue.lastIndex),ce=b(X,$e?J:ue,q),$e?ce?(ce.input=K(ce.input,Ke),ce[0]=K(ce[0],Ke),ce.index=ue.lastIndex,ue.lastIndex+=ce[0].length):ue.lastIndex=0:z&&ce&&(ue.lastIndex=ue.global?ce.index+ce[0].length:le),I&&ce&&ce.length>1&&b(B,ce[0],J,function(){for(ye=1;ye<arguments.length-2;ye++)arguments[ye]===void 0&&(ce[ye]=void 0)}),ce&&Ie)for(ce.groups=xe=P(null),ye=0;ye<Ie.length;ye++)xe[(ge=Ie[ye])[0]]=ce[ge[1]];return ce}),s.exports=ee},function(s,p,i){var l=i(17),c=i(7),b=i(67),_=i(68),E=i(43),w=i(38),k=i(119),j=i(61),P=i(75)("splice"),D=c.TypeError,N=Math.max,L=Math.min,B=9007199254740991,X="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!P},{splice:function(ee,ie){var Z,V,K,z,M,I,C=w(this),F=E(C),J=b(ee,F),le=arguments.length;if(le===0?Z=V=0:le===1?(Z=0,V=F-J):(Z=le-2,V=L(N(_(ie),0),F-J)),F+Z-V>B)throw D(X);for(K=k(C,V),z=0;z<V;z++)(M=J+z)in C&&j(K,z,C[M]);if(K.length=V,Z<V){for(z=J;z<F-V;z++)I=z+Z,(M=z+V)in C?C[I]=C[M]:delete C[I];for(z=F;z>F-V+Z;z--)delete C[z-1]}else if(Z>V)for(z=F-V;z>J;z--)I=z+Z-1,(M=z+V-1)in C?C[I]=C[M]:delete C[I];for(z=0;z<Z;z++)C[z+J]=arguments[z+2];return C.length=F-V+Z,K}})},function(s,p,i){var l=i(17),c=i(202);l({target:"String",proto:!0,forced:i(203)("anchor")},{anchor:function(b){return c(this,"a","name",b)}})},function(s,p,i){(function(l){var c=typeof l=="object"&&l&&l.Object===Object&&l;p.a=c}).call(this,i(82))},function(s,p,i){(function(l){var c=i(31),b=y&&!y.nodeType&&y,_=b&&typeof l=="object"&&l&&!l.nodeType&&l,E=_&&_.exports===b?c.a.Buffer:void 0,w=E?E.allocUnsafe:void 0;p.a=function(k,j){if(j)return k.slice();var P=k.length,D=w?w(P):new k.constructor(P);return k.copy(D),D}}).call(this,i(121)(s))},function(s,p,i){var l=i(7),c=i(108),b="__core-js_shared__",_=l[b]||c(b,{});s.exports=_},function(s,p,i){var l=i(7),c=Object.defineProperty;s.exports=function(b,_){try{c(l,b,{value:_,configurable:!0,writable:!0})}catch{l[b]=_}return _}},function(s,p,i){var l=i(65),c=i(19);s.exports=!!Object.getOwnPropertySymbols&&!c(function(){var b=Symbol();return!String(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&l&&l<41})},function(s,p){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(s,p,i){var l=i(17),c=i(35),b=i(64),_=i(94),E=i(28),w=i(172),k=i(96),j=i(97),P=i(73),D=i(57),N=i(44),L=i(27),B=i(70),X=i(136),ee=_.PROPER,ie=_.CONFIGURABLE,Z=X.IteratorPrototype,V=X.BUGGY_SAFARI_ITERATORS,K=L("iterator"),z="keys",M="values",I="entries",C=function(){return this};s.exports=function(F,J,le,ce,ye,xe,ge){w(le,J,ce);var ue,he,be,Se=function($){if($===ye&&Ke)return Ke;if(!V&&$ in Pe)return Pe[$];switch($){case z:case M:case I:return function(){return new le(this,$)}}return function(){return new le(this)}},Ie=J+" Iterator",$e=!1,Pe=F.prototype,Ce=Pe[K]||Pe["@@iterator"]||ye&&Pe[ye],Ke=!V&&Ce||Se(ye),q=J=="Array"&&Pe.entries||Ce;if(q&&(ue=k(q.call(new F)))!==Object.prototype&&ue.next&&(b||k(ue)===Z||(j?j(ue,Z):E(ue[K])||N(ue,K,C)),P(ue,Ie,!0,!0),b&&(B[Ie]=C)),ee&&ye==M&&Ce&&Ce.name!==M&&(!b&&ie?D(Pe,"name",M):($e=!0,Ke=function(){return c(Ce,this)})),ye)if(he={values:Se(M),keys:xe?Ke:Se(z),entries:Se(I)},ge)for(be in he)(V||$e||!(be in Pe))&&N(Pe,be,he[be]);else l({target:J,proto:!0,forced:V||$e},he);return b&&!ge||Pe[K]===Ke||N(Pe,K,Ke,{name:ye}),B[J]=Ke,he}},function(s,p){p.f=Object.getOwnPropertySymbols},function(s,p,i){var l=i(7),c=i(67),b=i(43),_=i(61),E=l.Array,w=Math.max;s.exports=function(k,j,P){for(var D=b(k),N=c(j,D),L=c(P===void 0?D:P,D),B=E(w(L-N,0)),X=0;N<L;N++,X++)_(B,X,k[N]);return B.length=X,B}},function(s,p,i){var l=i(7),c=i(62),b=i(35),_=i(32),E=i(89),w=i(140),k=i(43),j=i(58),P=i(141),D=i(115),N=i(142),L=l.TypeError,B=function(ee,ie){this.stopped=ee,this.result=ie},X=B.prototype;s.exports=function(ee,ie,Z){var V,K,z,M,I,C,F,J=Z&&Z.that,le=!(!Z||!Z.AS_ENTRIES),ce=!(!Z||!Z.IS_ITERATOR),ye=!(!Z||!Z.INTERRUPTED),xe=c(ie,J),ge=function(he){return V&&N(V,"normal",he),new B(!0,he)},ue=function(he){return le?(_(he),ye?xe(he[0],he[1],ge):xe(he[0],he[1])):ye?xe(he,ge):xe(he)};if(ce)V=ee;else{if(!(K=D(ee)))throw L(E(ee)+" is not iterable");if(w(K)){for(z=0,M=k(ee);M>z;z++)if((I=ue(ee[z]))&&j(X,I))return I;return new B(!1)}V=P(ee,K)}for(C=V.next;!(F=b(C,V)).done;){try{I=ue(F.value)}catch(he){N(V,"throw",he)}if(typeof I=="object"&&I&&j(X,I))return I}return new B(!1)}},function(s,p,i){var l=i(98),c=i(59),b=i(70),_=i(27)("iterator");s.exports=function(E){if(E!=null)return c(E,_)||c(E,"@@iterator")||b[l(E)]}},function(s,p,i){var l={};l[i(27)("toStringTag")]="z",s.exports=String(l)==="[object z]"},function(s,p,i){var l=i(7),c=i(58),b=l.TypeError;s.exports=function(_,E){if(c(E,_))return _;throw b("Incorrect invocation")}},function(s,p,i){var l=i(27)("iterator"),c=!1;try{var b=0,_={next:function(){return{done:!!b++}},return:function(){c=!0}};_[l]=function(){return this},Array.from(_,function(){throw 2})}catch{}s.exports=function(E,w){if(!w&&!c)return!1;var k=!1;try{var j={};j[l]=function(){return{next:function(){return{done:k=!0}}}},E(j)}catch{}return k}},function(s,p,i){var l=i(181);s.exports=function(c,b){return new(l(c))(b===0?0:b)}},function(s,p,i){var l=i(19);s.exports=function(c,b){var _=[][c];return!!_&&l(function(){_.call(null,b||function(){throw 1},1)})}},function(s,p){s.exports=function(i){if(!i.webpackPolyfill){var l=Object.create(i);l.children||(l.children=[]),Object.defineProperty(l,"loaded",{enumerable:!0,get:function(){return l.l}}),Object.defineProperty(l,"id",{enumerable:!0,get:function(){return l.i}}),Object.defineProperty(l,"exports",{enumerable:!0}),l.webpackPolyfill=1}return l}},function(s,p,i){i(18);var l=i(15),c=i(44),b=i(102),_=i(19),E=i(27),w=i(57),k=E("species"),j=RegExp.prototype;s.exports=function(P,D,N,L){var B=E(P),X=!_(function(){var V={};return V[B]=function(){return 7},""[P](V)!=7}),ee=X&&!_(function(){var V=!1,K=/a/;return P==="split"&&((K={}).constructor={},K.constructor[k]=function(){return K},K.flags="",K[B]=/./[B]),K.exec=function(){return V=!0,null},K[B](""),!V});if(!X||!ee||N){var ie=l(/./[B]),Z=D(B,""[P],function(V,K,z,M,I){var C=l(V),F=K.exec;return F===b||F===j.exec?X&&!I?{done:!0,value:ie(K,z,M)}:{done:!0,value:C(z,K,M)}:{done:!1}});c(String.prototype,P,Z[0]),c(j,B,Z[1])}L&&w(j[B],"sham",!0)}},function(s,p,i){var l=i(146).charAt;s.exports=function(c,b,_){return b+(_?l(c,b).length:1)}},function(s,p,i){var l=i(7),c=i(35),b=i(32),_=i(28),E=i(50),w=i(102),k=l.TypeError;s.exports=function(j,P){var D=j.exec;if(_(D)){var N=c(D,j,P);return N!==null&&b(N),N}if(E(j)==="RegExp")return c(w,j,P);throw k("RegExp#exec called on incompatible receiver")}},function(s,p,i){var l=i(76),c=i(35),b=i(15),_=i(122),E=i(19),w=i(32),k=i(28),j=i(68),P=i(90),D=i(41),N=i(45),L=i(123),B=i(59),X=i(198),ee=i(124),ie=i(27)("replace"),Z=Math.max,V=Math.min,K=b([].concat),z=b([].push),M=b("".indexOf),I=b("".slice),C="a".replace(/./,"$0")==="$0",F=!!/./[ie]&&/./[ie]("a","$0")==="";_("replace",function(J,le,ce){var ye=F?"$":"$0";return[function(xe,ge){var ue=N(this),he=xe==null?void 0:B(xe,ie);return he?c(he,xe,ue,ge):c(le,D(ue),xe,ge)},function(xe,ge){var ue=w(this),he=D(xe);if(typeof ge=="string"&&M(ge,ye)===-1&&M(ge,"$<")===-1){var be=ce(le,ue,he,ge);if(be.done)return be.value}var Se=k(ge);Se||(ge=D(ge));var Ie=ue.global;if(Ie){var $e=ue.unicode;ue.lastIndex=0}for(var Pe=[];;){var Ce=ee(ue,he);if(Ce===null||(z(Pe,Ce),!Ie))break;D(Ce[0])===""&&(ue.lastIndex=L(he,P(ue.lastIndex),$e))}for(var Ke,q="",$=0,ae=0;ae<Pe.length;ae++){for(var Oe=D((Ce=Pe[ae])[0]),ke=Z(V(j(Ce.index),he.length),0),we=[],qe=1;qe<Ce.length;qe++)z(we,(Ke=Ce[qe])===void 0?Ke:String(Ke));var nt=Ce.groups;if(Se){var Je=K([Oe],we,ke,he);nt!==void 0&&z(Je,nt);var Ye=D(l(ge,void 0,Je))}else Ye=X(Oe,he,ke,we,nt,ge);ke>=$&&(q+=I(he,$,ke)+Ye,$=ke+Oe.length)}return q+I(he,$)}]},!!E(function(){var J=/./;return J.exec=function(){var le=[];return le.groups={a:"7"},le},"".replace(J,"$<a>")!=="7"})||!C||F)},function(s,p,i){var l=i(50),c=i(7);s.exports=l(c.process)=="process"},function(s,p,i){i(17)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(s,p,i){var l=i(109);s.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(s,p,i){var l=i(36),c=i(19),b=i(86);s.exports=!l&&!c(function(){return Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a!=7})},function(s,p,i){var l=i(7),c=i(35),b=i(33),_=i(88),E=i(59),w=i(170),k=i(27),j=l.TypeError,P=k("toPrimitive");s.exports=function(D,N){if(!b(D)||_(D))return D;var L,B=E(D,P);if(B){if(N===void 0&&(N="default"),L=c(B,D,N),!b(L)||_(L))return L;throw j("Can't convert object to primitive value")}return N===void 0&&(N="number"),w(D,N)}},function(s,p,i){var l=i(15),c=i(34),b=i(40),_=i(132).indexOf,E=i(69),w=l([].push);s.exports=function(k,j){var P,D=b(k),N=0,L=[];for(P in D)!c(E,P)&&c(D,P)&&w(L,P);for(;j.length>N;)c(D,P=j[N++])&&(~_(L,P)||w(L,P));return L}},function(s,p,i){var l=i(40),c=i(67),b=i(43),_=function(E){return function(w,k,j){var P,D=l(w),N=b(D),L=c(j,N);if(E&&k!=k){for(;N>L;)if((P=D[L++])!=P)return!0}else for(;N>L;L++)if((E||L in D)&&D[L]===k)return E||L||0;return!E&&-1}};s.exports={includes:_(!0),indexOf:_(!1)}},function(s,p,i){var l=i(46);s.exports=l("document","documentElement")},function(s,p,i){var l=i(34),c=i(135),b=i(51),_=i(37);s.exports=function(E,w){for(var k=c(w),j=_.f,P=b.f,D=0;D<k.length;D++){var N=k[D];l(E,N)||j(E,N,P(w,N))}}},function(s,p,i){var l=i(46),c=i(15),b=i(72),_=i(112),E=i(32),w=c([].concat);s.exports=l("Reflect","ownKeys")||function(k){var j=b.f(E(k)),P=_.f;return P?w(j,P(k)):j}},function(s,p,i){var l,c,b,_=i(19),E=i(28),w=i(54),k=i(96),j=i(44),P=i(27),D=i(64),N=P("iterator"),L=!1;[].keys&&("next"in(b=[].keys())?(c=k(k(b)))!==Object.prototype&&(l=c):L=!0),l==null||_(function(){var B={};return l[N].call(B)!==B})?l={}:D&&(l=w(l)),E(l[N])||j(l,N,function(){return this}),s.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:L}},function(s,p,i){var l=i(19);s.exports=!l(function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype})},function(s,p,i){var l=i(17),c=i(15),b=i(69),_=i(33),E=i(34),w=i(37).f,k=i(72),j=i(139),P=i(175),D=i(85),N=i(177),L=!1,B=D("meta"),X=0,ee=function(Z){w(Z,B,{value:{objectID:"O"+X++,weakData:{}}})},ie=s.exports={enable:function(){ie.enable=function(){},L=!0;var Z=k.f,V=c([].splice),K={};K[B]=1,Z(K).length&&(k.f=function(z){for(var M=Z(z),I=0,C=M.length;I<C;I++)if(M[I]===B){V(M,I,1);break}return M},l({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:j.f}))},fastKey:function(Z,V){if(!_(Z))return typeof Z=="symbol"?Z:(typeof Z=="string"?"S":"P")+Z;if(!E(Z,B)){if(!P(Z))return"F";if(!V)return"E";ee(Z)}return Z[B].objectID},getWeakData:function(Z,V){if(!E(Z,B)){if(!P(Z))return!0;if(!V)return!1;ee(Z)}return Z[B].weakData},onFreeze:function(Z){return N&&L&&P(Z)&&!E(Z,B)&&ee(Z),Z}};b[B]=!0},function(s,p,i){var l=i(50),c=i(40),b=i(72).f,_=i(113),E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(w){return E&&l(w)=="Window"?function(k){try{return b(k)}catch{return _(E)}}(w):b(c(w))}},function(s,p,i){var l=i(27),c=i(70),b=l("iterator"),_=Array.prototype;s.exports=function(E){return E!==void 0&&(c.Array===E||_[b]===E)}},function(s,p,i){var l=i(7),c=i(35),b=i(55),_=i(32),E=i(89),w=i(115),k=l.TypeError;s.exports=function(j,P){var D=arguments.length<2?w(j):P;if(b(D))return _(c(D,j));throw k(E(j)+" is not iterable")}},function(s,p,i){var l=i(35),c=i(32),b=i(59);s.exports=function(_,E,w){var k,j;c(_);try{if(!(k=b(_,"return"))){if(E==="throw")throw w;return w}k=l(k,_)}catch(P){j=!0,k=P}if(E==="throw")throw w;if(j)throw k;return c(k),w}},function(s,p,i){var l=i(28),c=i(33),b=i(97);s.exports=function(_,E,w){var k,j;return b&&l(k=E.constructor)&&k!==w&&c(j=k.prototype)&&j!==w.prototype&&b(_,j),_}},function(s,p,i){var l=i(44);s.exports=function(c,b,_){for(var E in b)l(c,E,b[E],_);return c}},function(s,p,i){var l=i(46),c=i(37),b=i(27),_=i(36),E=b("species");s.exports=function(w){var k=l(w),j=c.f;_&&k&&!k[E]&&j(k,E,{configurable:!0,get:function(){return this}})}},function(s,p,i){var l=i(15),c=i(68),b=i(41),_=i(45),E=l("".charAt),w=l("".charCodeAt),k=l("".slice),j=function(P){return function(D,N){var L,B,X=b(_(D)),ee=c(N),ie=X.length;return ee<0||ee>=ie?P?"":void 0:(L=w(X,ee))<55296||L>56319||ee+1===ie||(B=w(X,ee+1))<56320||B>57343?P?E(X,ee):L:P?k(X,ee,ee+2):B-56320+(L-55296<<10)+65536}};s.exports={codeAt:j(!1),charAt:j(!0)}},function(s,p){s.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(s,p,i){var l=i(86)("span").classList,c=l&&l.constructor&&l.constructor.prototype;s.exports=c===Object.prototype?void 0:c},function(s,p,i){var l=i(27);p.f=l},function(s,p,i){var l=i(182),c=i(34),b=i(149),_=i(37).f;s.exports=function(E){var w=l.Symbol||(l.Symbol={});c(w,E)||_(w,E,{value:b.f(E)})}},function(s,p,i){var l=i(19),c=i(7).RegExp,b=l(function(){var w=c("a","y");return w.lastIndex=2,w.exec("abcd")!=null}),_=b||l(function(){return!c("a","y").sticky}),E=b||l(function(){var w=c("^r","gy");return w.lastIndex=2,w.exec("str")!=null});s.exports={BROKEN_CARET:E,MISSED_STICKY:_,UNSUPPORTED_Y:b}},function(s,p,i){var l=i(17),c=i(132).includes,b=i(83);l({target:"Array",proto:!0},{includes:function(_){return c(this,_,arguments.length>1?arguments[1]:void 0)}}),b("includes")},function(s,p,i){var l=i(17),c=i(15),b=i(194),_=i(45),E=i(41),w=i(195),k=c("".indexOf);l({target:"String",proto:!0,forced:!w("includes")},{includes:function(j){return!!~k(E(_(this)),E(b(j)),arguments.length>1?arguments[1]:void 0)}})},function(s,p,i){var l=i(33),c=i(50),b=i(27)("match");s.exports=function(_){var E;return l(_)&&((E=_[b])!==void 0?!!E:c(_)=="RegExp")}},function(s,p){var i,l,c=s.exports={};function b(){throw new Error("setTimeout has not been defined")}function _(){throw new Error("clearTimeout has not been defined")}function E(X){if(i===setTimeout)return setTimeout(X,0);if((i===b||!i)&&setTimeout)return i=setTimeout,setTimeout(X,0);try{return i(X,0)}catch{try{return i.call(null,X,0)}catch{return i.call(this,X,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:b}catch{i=b}try{l=typeof clearTimeout=="function"?clearTimeout:_}catch{l=_}})();var w,k=[],j=!1,P=-1;function D(){j&&w&&(j=!1,w.length?k=w.concat(k):P=-1,k.length&&N())}function N(){if(!j){var X=E(D);j=!0;for(var ee=k.length;ee;){for(w=k,k=[];++P<ee;)w&&w[P].run();P=-1,ee=k.length}w=null,j=!1,function(ie){if(l===clearTimeout)return clearTimeout(ie);if((l===_||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(ie);try{l(ie)}catch{try{return l.call(null,ie)}catch{return l.call(this,ie)}}}(X)}}function L(X,ee){this.fun=X,this.array=ee}function B(){}c.nextTick=function(X){var ee=new Array(arguments.length-1);if(arguments.length>1)for(var ie=1;ie<arguments.length;ie++)ee[ie-1]=arguments[ie];k.push(new L(X,ee)),k.length!==1||j||E(N)},L.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=B,c.addListener=B,c.once=B,c.off=B,c.removeListener=B,c.removeAllListeners=B,c.emit=B,c.prependListener=B,c.prependOnceListener=B,c.listeners=function(X){return[]},c.binding=function(X){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(X){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(s,p,i){var l=i(32),c=i(157),b=i(27)("species");s.exports=function(_,E){var w,k=l(_).constructor;return k===void 0||(w=l(k)[b])==null?E:c(w)}},function(s,p,i){var l=i(7),c=i(100),b=i(89),_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not a constructor")}},function(s,p,i){var l=i(17),c=i(159).trim;l({target:"String",proto:!0,forced:i(196)("trim")},{trim:function(){return c(this)}})},function(s,p,i){var l=i(15),c=i(45),b=i(41),_=i(160),E=l("".replace),w="["+_+"]",k=RegExp("^"+w+w+"*"),j=RegExp(w+w+"*$"),P=function(D){return function(N){var L=b(c(N));return 1&D&&(L=E(L,k,"")),2&D&&(L=E(L,j,"")),L}};s.exports={start:P(1),end:P(2),trim:P(3)}},function(s,p){s.exports=`
\v\f\r    \u2028\u2029\uFEFF`},function(s,p,i){var l=i(35),c=i(122),b=i(32),_=i(90),E=i(41),w=i(45),k=i(59),j=i(123),P=i(124);c("match",function(D,N,L){return[function(B){var X=w(this),ee=B==null?void 0:k(B,D);return ee?l(ee,B,X):new RegExp(B)[D](E(X))},function(B){var X=b(this),ee=E(B),ie=L(N,X,ee);if(ie.done)return ie.value;if(!X.global)return P(X,ee);var Z=X.unicode;X.lastIndex=0;for(var V,K=[],z=0;(V=P(X,ee))!==null;){var M=E(V[0]);K[z]=M,M===""&&(X.lastIndex=j(ee,_(X.lastIndex),Z)),z++}return z===0?null:K}]})},function(s,p,i){var l=i(17),c=Math.hypot,b=Math.abs,_=Math.sqrt;l({target:"Math",stat:!0,forced:!!c&&c(1/0,NaN)!==1/0},{hypot:function(E,w){for(var k,j,P=0,D=0,N=arguments.length,L=0;D<N;)L<(k=b(arguments[D++]))?(P=P*(j=L/k)*j+1,L=k):P+=k>0?(j=k/L)*j:k;return L===1/0?1/0:L*_(P)}})},function(s,p,i){var l,c,b,_,E=i(7),w=i(76),k=i(62),j=i(28),P=i(34),D=i(19),N=i(133),L=i(101),B=i(86),X=i(164),ee=i(126),ie=E.setImmediate,Z=E.clearImmediate,V=E.process,K=E.Dispatch,z=E.Function,M=E.MessageChannel,I=E.String,C=0,F={},J="onreadystatechange";try{l=E.location}catch{}var le=function(ge){if(P(F,ge)){var ue=F[ge];delete F[ge],ue()}},ce=function(ge){return function(){le(ge)}},ye=function(ge){le(ge.data)},xe=function(ge){E.postMessage(I(ge),l.protocol+"//"+l.host)};ie&&Z||(ie=function(ge){var ue=L(arguments,1);return F[++C]=function(){w(j(ge)?ge:z(ge),void 0,ue)},c(C),C},Z=function(ge){delete F[ge]},ee?c=function(ge){V.nextTick(ce(ge))}:K&&K.now?c=function(ge){K.now(ce(ge))}:M&&!X?(_=(b=new M).port2,b.port1.onmessage=ye,c=k(_.postMessage,_)):E.addEventListener&&j(E.postMessage)&&!E.importScripts&&l&&l.protocol!=="file:"&&!D(xe)?(c=xe,E.addEventListener("message",ye,!1)):c=J in B("script")?function(ge){N.appendChild(B("script")).onreadystatechange=function(){N.removeChild(this),le(ge)}}:function(ge){setTimeout(ce(ge),0)}),s.exports={set:ie,clear:Z}},function(s,p,i){var l=i(53);s.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(l)},function(s,p,i){var l=i(55),c=function(b){var _,E;this.promise=new b(function(w,k){if(_!==void 0||E!==void 0)throw TypeError("Bad Promise constructor");_=w,E=k}),this.resolve=l(_),this.reject=l(E)};s.exports.f=function(b){return new c(b)}},function(s,p,i){p.a=function(){return!1}},function(s,p,i){(function(l){i.d(p,"a",function(){return V});var c=i(1);function b(M){throw new Error("[mobx-utils] "+M)}function _(M,I){I===void 0&&(I="Illegal state"),M||b(I)}var E=function(M){return M&&M!==Object.prototype&&Object.getOwnPropertyNames(M).concat(E(Object.getPrototypeOf(M))||[])},w=function(M){return function(I){var C=E(I);return C.filter(function(F,J){return C.indexOf(F)===J})}(M).filter(function(I){return I!=="constructor"&&!~I.indexOf("__")})},k="pending",j="fulfilled",P="rejected";function D(M){switch(this.state){case k:return M.pending&&M.pending(this.value);case P:return M.rejected&&M.rejected(this.value);case j:return M.fulfilled?M.fulfilled(this.value):this.value}}function N(M,I){if(_(arguments.length<=2,"fromPromise expects up to two arguments"),_(typeof M=="function"||typeof M=="object"&&M&&typeof M.then=="function","Please pass a promise or function to fromPromise"),M.isPromiseBasedObservable===!0)return M;typeof M=="function"&&(M=new Promise(M));var C=M;M.then(Object(c.k)("observableFromPromise-resolve",function(J){C.value=J,C.state=j}),Object(c.k)("observableFromPromise-reject",function(J){C.value=J,C.state=P})),C.isPromiseBasedObservable=!0,C.case=D;var F=I&&I.state===j?I.value:void 0;return Object(c.q)(C,{value:F,state:k},{},{deep:!1}),C}(function(M){M.reject=Object(c.k)("fromPromise.reject",function(I){var C=M(Promise.reject(I));return C.state=P,C.value=I,C}),M.resolve=Object(c.k)("fromPromise.resolve",function(I){I===void 0&&(I=void 0);var C=M(Promise.resolve(I));return C.state=j,C.value=I,C})})(N||(N={}));var L=function(M,I,C,F){var J,le=arguments.length,ce=le<3?I:F===null?F=Object.getOwnPropertyDescriptor(I,C):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(M,I,C,F);else for(var ye=M.length-1;ye>=0;ye--)(J=M[ye])&&(ce=(le<3?J(ce):le>3?J(I,C,ce):J(I,C))||ce);return le>3&&ce&&Object.defineProperty(I,C,ce),ce};(function(){function M(I,C){var F=this;Object(c.G)(function(){F.current=C,F.subscription=I.subscribe(F)})}M.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},M.prototype.next=function(I){this.current=I},M.prototype.complete=function(){this.dispose()},M.prototype.error=function(I){this.current=I,this.dispose()},L([c.C.ref],M.prototype,"current",void 0),L([c.k.bound],M.prototype,"next",null),L([c.k.bound],M.prototype,"complete",null),L([c.k.bound],M.prototype,"error",null)})();var B=function(){return B=Object.assign||function(M){for(var I,C=1,F=arguments.length;C<F;C++)for(var J in I=arguments[C])Object.prototype.hasOwnProperty.call(I,J)&&(M[J]=I[J]);return M},B.apply(this,arguments)},X=function(M,I,C,F){var J,le=arguments.length,ce=le<3?I:F===null?F=Object.getOwnPropertyDescriptor(I,C):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(M,I,C,F);else for(var ye=M.length-1;ye>=0;ye--)(J=M[ye])&&(ce=(le<3?J(ce):le>3?J(I,C,ce):J(I,C))||ce);return le>3&&ce&&Object.defineProperty(I,C,ce),ce},ee=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function M(I){var C=this;this.model=I,this.localValues=c.C.map({}),this.localComputedValues=c.C.map({}),this.isPropertyDirty=function(F){return C.localValues.has(F)},_(Object(c.A)(I),"createViewModel expects an observable object"),w(I).forEach(function(F){if(F!==c.a&&F!=="__mobxDidRunLazyInitializers"){if(_(ee.indexOf(F)===-1,"The propertyname "+F+" is reserved and cannot be used with viewModels"),Object(c.w)(I,F)){var J=Object(c.h)(I,F).derivation;C.localComputedValues.set(F,Object(c.m)(J.bind(C)))}var le=Object.getOwnPropertyDescriptor(I,F),ce=le?{enumerable:le.enumerable}:{};Object.defineProperty(C,F,B(B({},ce),{configurable:!0,get:function(){return Object(c.w)(I,F)?C.localComputedValues.get(F).get():C.isPropertyDirty(F)?C.localValues.get(F):C.model[F]},set:Object(c.k)(function(ye){ye!==C.model[F]?C.localValues.set(F,ye):C.localValues.delete(F)})}))}})}Object.defineProperty(M.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),M.prototype.submit=function(){var I=this;Object(c.B)(this.localValues).forEach(function(C){var F=I.localValues.get(C),J=I.model[C];Object(c.y)(J)?J.replace(F):Object(c.z)(J)?(J.clear(),J.merge(F)):Object(c.v)(F)||(I.model[C]=F)}),this.localValues.clear()},M.prototype.reset=function(){this.localValues.clear()},M.prototype.resetProperty=function(I){this.localValues.delete(I)},X([c.m],M.prototype,"isDirty",null),X([c.m],M.prototype,"changedValues",null),X([c.k.bound],M.prototype,"submit",null),X([c.k.bound],M.prototype,"reset",null),X([c.k.bound],M.prototype,"resetProperty",null)})();function ie(M){if(!M)return"ROOT";for(var I=[];M.parent;)I.push(M.path),M=M.parent;return I.reverse().join("/")}function Z(M){return Object(c.A)(M)||Object(c.y)(M)||Object(c.z)(M)}function V(M,I){var C=new WeakMap;function F(ce){var ye=C.get(ce.object);(function(xe,ge){switch(xe.type){case"add":J(xe.newValue,ge,xe.name);break;case"update":le(xe.oldValue),J(xe.newValue,ge,xe.name||""+xe.index);break;case"remove":case"delete":le(xe.oldValue);break;case"splice":xe.removed.map(le),xe.added.forEach(function(be,Se){return J(be,ge,""+(xe.index+Se))});for(var ue=xe.index+xe.addedCount;ue<xe.object.length;ue++)if(Z(xe.object[ue])){var he=C.get(xe.object[ue]);he&&(he.path=""+ue)}}})(ce,ye),I(ce,ie(ye),M)}function J(ce,ye,xe){if(Z(ce)){var ge=C.get(ce);if(ge){if(ge.parent!==ye||ge.path!==xe)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+ie(ye)+"/"+xe+"', but it already exists at '"+ie(ge.parent)+"/"+ge.path+"'")}else{var ue={parent:ye,path:xe,dispose:Object(c.D)(ce,F)};C.set(ce,ue),Object(c.p)(ce).forEach(function(he){var be=he[0];return J(he[1],ue,be)})}}}function le(ce){if(Z(ce)){var ye=C.get(ce);if(!ye)return;C.delete(ce),ye.dispose(),Object(c.L)(ce).forEach(le)}}return J(M,void 0,""),function(){le(M)}}var K,z=(K=function(M,I){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,F){C.__proto__=F}||function(C,F){for(var J in F)F.hasOwnProperty(J)&&(C[J]=F[J])},K(M,I)},function(M,I){function C(){this.constructor=M}K(M,I),M.prototype=I===null?Object.create(I):(C.prototype=I.prototype,new C)});(function(M){function I(C,F,J){var le=J===void 0?{}:J,ce=le.name,ye=ce===void 0?"ogm"+(1e3*Math.random()|0):ce,xe=le.keyToName,ge=xe===void 0?function(be){return""+be}:xe,ue=M.call(this)||this;ue._keyToName=ge,ue._groupBy=F,ue._ogmInfoKey=Symbol("ogmInfo"+ye),ue._base=C;for(var he=0;he<C.length;he++)ue._addItem(C[he]);return ue._disposeBaseObserver=Object(c.D)(ue._base,function(be){if(be.type==="splice")Object(c.J)(function(){for(var Se=0,Ie=be.removed;Se<Ie.length;Se++){var $e=Ie[Se];ue._removeItem($e)}for(var Pe=0,Ce=be.added;Pe<Ce.length;Pe++){var Ke=Ce[Pe];ue._addItem(Ke)}});else{if(be.type!=="update")throw new Error("illegal state");Object(c.J)(function(){ue._removeItem(be.oldValue),ue._addItem(be.newValue)})}}),ue}z(I,M),I.prototype.clear=function(){throw new Error("not supported")},I.prototype.delete=function(C){throw new Error("not supported")},I.prototype.set=function(C,F){throw new Error("not supported")},I.prototype.dispose=function(){this._disposeBaseObserver();for(var C=0;C<this._base.length;C++){var F=this._base[C];F[this._ogmInfoKey].reaction(),delete F[this._ogmInfoKey]}},I.prototype._getGroupArr=function(C){var F=M.prototype.get.call(this,C);return F===void 0&&(F=Object(c.C)([],{name:"GroupArray["+this._keyToName(C)+"]",deep:!1}),M.prototype.set.call(this,C,F)),F},I.prototype._removeFromGroupArr=function(C,F){var J=M.prototype.get.call(this,C);J.length===1?M.prototype.delete.call(this,C):(F===J.length-1||(J[F]=J[J.length-1],J[F][this._ogmInfoKey].groupArrIndex=F),J.length--)},I.prototype._addItem=function(C){var F=this,J=this._groupBy(C),le=this._getGroupArr(J),ce={groupByValue:J,groupArrIndex:le.length,reaction:Object(c.F)(function(){return F._groupBy(C)},function(ye,xe){var ge=C[F._ogmInfoKey];F._removeFromGroupArr(ge.groupByValue,ge.groupArrIndex);var ue=F._getGroupArr(ye),he=ue.length;ue.push(C),ge.groupByValue=ye,ge.groupArrIndex=he})};Object.defineProperty(C,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:ce}),le.push(C)},I.prototype._removeItem=function(C){var F=C[this._ogmInfoKey];this._removeFromGroupArr(F.groupByValue,F.groupArrIndex),F.reaction(),delete C[this._ogmInfoKey]}})(c.b),function(){function M(I,C){this.base=I,this.args=C,this.closestIdx=0,this.isDisposed=!1;for(var F=this.closest=this.root=I,J=0;J<this.args.length-1&&(F=F.get(C[J]));J++)this.closest=F;this.closestIdx=J}return M.prototype.exists=function(){this.assertNotDisposed();var I=this.args.length;return this.closestIdx>=I-1&&this.closest.has(this.args[I-1])},M.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])},M.prototype.set=function(I){this.assertNotDisposed();for(var C=this.args.length,F=this.closest,J=this.closestIdx;J<C-1;J++){var le=new Map;F.set(this.args[J],le),F=le}this.closestIdx=C-1,this.closest=F,F.set(this.args[C-1],I)},M.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var I=this.args.length;this.closest.delete(this.args[I-1]);for(var C=this.root,F=[C],J=0;J<I-1;J++)C=C.get(this.args[J]),F.push(C);for(J=F.length-1;J>0;J--)F[J].size===0&&F[J-1].delete(this.args[J-1]);this.isDisposed=!0},M.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},M}(),Promise.resolve(),typeof queueMicrotask<"u"||l!==void 0&&l.nextTick}).call(this,i(155))},function(s,p,i){var l;(function(c,b,_){if(c){for(var E,w={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"},k={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},j={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},P={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},D=1;D<20;++D)w[111+D]="f"+D;for(D=0;D<=9;++D)w[D+96]=D.toString();Z.prototype.bind=function(V,K,z){var M=this;return V=V instanceof Array?V:[V],M._bindMultiple.call(M,V,K,z),M},Z.prototype.unbind=function(V,K){return this.bind.call(this,V,function(){},K)},Z.prototype.trigger=function(V,K){var z=this;return z._directMap[V+":"+K]&&z._directMap[V+":"+K]({},V),z},Z.prototype.reset=function(){var V=this;return V._callbacks={},V._directMap={},V},Z.prototype.stopCallback=function(V,K){if((" "+K.className+" ").indexOf(" mousetrap ")>-1||ie(K,this.target))return!1;if("composedPath"in V&&typeof V.composedPath=="function"){var z=V.composedPath()[0];z!==V.target&&(K=z)}return K.tagName=="INPUT"||K.tagName=="SELECT"||K.tagName=="TEXTAREA"||K.isContentEditable},Z.prototype.handleKey=function(){var V=this;return V._handleKey.apply(V,arguments)},Z.addKeycodes=function(V){for(var K in V)V.hasOwnProperty(K)&&(w[K]=V[K]);E=null},Z.init=function(){var V=Z(b);for(var K in V)K.charAt(0)!=="_"&&(Z[K]=function(z){return function(){return V[z].apply(V,arguments)}}(K))},Z.init(),c.Mousetrap=Z,s.exports&&(s.exports=Z),(l=function(){return Z}.call(p,i,p,s))===void 0||(s.exports=l)}function N(V,K,z){V.addEventListener?V.addEventListener(K,z,!1):V.attachEvent("on"+K,z)}function L(V){if(V.type=="keypress"){var K=String.fromCharCode(V.which);return V.shiftKey||(K=K.toLowerCase()),K}return w[V.which]?w[V.which]:k[V.which]?k[V.which]:String.fromCharCode(V.which).toLowerCase()}function B(V){return V=="shift"||V=="ctrl"||V=="alt"||V=="meta"}function X(V,K,z){return z||(z=function(){if(!E)for(var M in E={},w)M>95&&M<112||w.hasOwnProperty(M)&&(E[w[M]]=M);return E}()[V]?"keydown":"keypress"),z=="keypress"&&K.length&&(z="keydown"),z}function ee(V,K){var z,M,I,C=[];for(z=function(F){return F==="+"?["+"]:(F=F.replace(/\+{2}/g,"+plus")).split("+")}(V),I=0;I<z.length;++I)M=z[I],P[M]&&(M=P[M]),K&&K!="keypress"&&j[M]&&(M=j[M],C.push("shift")),B(M)&&C.push(M);return{key:M,modifiers:C,action:K=X(M,C,K)}}function ie(V,K){return V!==null&&V!==b&&(V===K||ie(V.parentNode,K))}function Z(V){var K=this;if(V=V||b,!(K instanceof Z))return new Z(V);K.target=V,K._callbacks={},K._directMap={};var z,M={},I=!1,C=!1,F=!1;function J(ue){ue=ue||{};var he,be=!1;for(he in M)ue[he]?be=!0:M[he]=0;be||(F=!1)}function le(ue,he,be,Se,Ie,$e){var Pe,Ce,Ke,q,$=[],ae=be.type;if(!K._callbacks[ue])return[];for(ae=="keyup"&&B(ue)&&(he=[ue]),Pe=0;Pe<K._callbacks[ue].length;++Pe)if(Ce=K._callbacks[ue][Pe],(Se||!Ce.seq||M[Ce.seq]==Ce.level)&&ae==Ce.action&&(ae=="keypress"&&!be.metaKey&&!be.ctrlKey||(Ke=he,q=Ce.modifiers,Ke.sort().join(",")===q.sort().join(",")))){var Oe=!Se&&Ce.combo==Ie,ke=Se&&Ce.seq==Se&&Ce.level==$e;(Oe||ke)&&K._callbacks[ue].splice(Pe,1),$.push(Ce)}return $}function ce(ue,he,be,Se){K.stopCallback(he,he.target||he.srcElement,be,Se)||ue(he,be)===!1&&(function(Ie){Ie.preventDefault?Ie.preventDefault():Ie.returnValue=!1}(he),function(Ie){Ie.stopPropagation?Ie.stopPropagation():Ie.cancelBubble=!0}(he))}function ye(ue){typeof ue.which!="number"&&(ue.which=ue.keyCode);var he=L(ue);he&&(ue.type!="keyup"||I!==he?K.handleKey(he,function(be){var Se=[];return be.shiftKey&&Se.push("shift"),be.altKey&&Se.push("alt"),be.ctrlKey&&Se.push("ctrl"),be.metaKey&&Se.push("meta"),Se}(ue),ue):I=!1)}function xe(ue,he,be,Se){function Ie(Ke){return function(){F=Ke,++M[ue],clearTimeout(z),z=setTimeout(J,1e3)}}function $e(Ke){ce(be,Ke,ue),Se!=="keyup"&&(I=L(Ke)),setTimeout(J,10)}M[ue]=0;for(var Pe=0;Pe<he.length;++Pe){var Ce=Pe+1===he.length?$e:Ie(Se||ee(he[Pe+1]).action);ge(he[Pe],Ce,Se,ue,Pe)}}function ge(ue,he,be,Se,Ie){K._directMap[ue+":"+be]=he;var $e,Pe=(ue=ue.replace(/\s+/g," ")).split(" ");Pe.length>1?xe(ue,Pe,he,be):($e=ee(ue,be),K._callbacks[$e.key]=K._callbacks[$e.key]||[],le($e.key,$e.modifiers,{type:$e.action},Se,ue,Ie),K._callbacks[$e.key][Se?"unshift":"push"]({callback:he,modifiers:$e.modifiers,action:$e.action,seq:Se,level:Ie,combo:ue}))}K._handleKey=function(ue,he,be){var Se,Ie=le(ue,he,be),$e={},Pe=0,Ce=!1;for(Se=0;Se<Ie.length;++Se)Ie[Se].seq&&(Pe=Math.max(Pe,Ie[Se].level));for(Se=0;Se<Ie.length;++Se)if(Ie[Se].seq){if(Ie[Se].level!=Pe)continue;Ce=!0,$e[Ie[Se].seq]=1,ce(Ie[Se].callback,be,Ie[Se].combo,Ie[Se].seq)}else Ce||ce(Ie[Se].callback,be,Ie[Se].combo);var Ke=be.type=="keypress"&&C;be.type!=F||B(ue)||Ke||J($e),C=Ce&&be.type=="keydown"},K._bindMultiple=function(ue,he,be){for(var Se=0;Se<ue.length;++Se)ge(ue[Se],he,be)},N(V,"keypress",ye),N(V,"keydown",ye),N(V,"keyup",ye)}})(typeof window<"u"?window:null,typeof window<"u"?document:null)},function(s,p,i){var l=i(36),c=i(37),b=i(32),_=i(40),E=i(66);s.exports=l?Object.defineProperties:function(w,k){b(w);for(var j,P=_(k),D=E(k),N=D.length,L=0;N>L;)c.f(w,j=D[L++],P[j]);return w}},function(s,p,i){var l=i(7),c=i(35),b=i(28),_=i(33),E=l.TypeError;s.exports=function(w,k){var j,P;if(k==="string"&&b(j=w.toString)&&!_(P=c(j,w))||b(j=w.valueOf)&&!_(P=c(j,w))||k!=="string"&&b(j=w.toString)&&!_(P=c(j,w)))return P;throw E("Can't convert object to primitive value")}},function(s,p,i){var l=i(7),c=i(28),b=i(92),_=l.WeakMap;s.exports=c(_)&&/native code/.test(b(_))},function(s,p,i){var l=i(136).IteratorPrototype,c=i(54),b=i(71),_=i(73),E=i(70),w=function(){return this};s.exports=function(k,j,P,D){var N=j+" Iterator";return k.prototype=c(l,{next:b(+!D,P)}),_(k,N,!1,!0),E[N]=w,k}},function(s,p,i){var l=i(7),c=i(28),b=l.String,_=l.TypeError;s.exports=function(E){if(typeof E=="object"||c(E))return E;throw _("Can't set "+b(E)+" as a prototype")}},function(s,p,i){var l=i(17),c=i(7),b=i(15),_=i(95),E=i(44),w=i(138),k=i(114),j=i(117),P=i(28),D=i(33),N=i(19),L=i(118),B=i(73),X=i(143);s.exports=function(ee,ie,Z){var V=ee.indexOf("Map")!==-1,K=ee.indexOf("Weak")!==-1,z=V?"set":"add",M=c[ee],I=M&&M.prototype,C=M,F={},J=function(ue){var he=b(I[ue]);E(I,ue,ue=="add"?function(be){return he(this,be===0?0:be),this}:ue=="delete"?function(be){return!(K&&!D(be))&&he(this,be===0?0:be)}:ue=="get"?function(be){return K&&!D(be)?void 0:he(this,be===0?0:be)}:ue=="has"?function(be){return!(K&&!D(be))&&he(this,be===0?0:be)}:function(be,Se){return he(this,be===0?0:be,Se),this})};if(_(ee,!P(M)||!(K||I.forEach&&!N(function(){new M().entries().next()}))))C=Z.getConstructor(ie,ee,V,z),w.enable();else if(_(ee,!0)){var le=new C,ce=le[z](K?{}:-0,1)!=le,ye=N(function(){le.has(1)}),xe=L(function(ue){new M(ue)}),ge=!K&&N(function(){for(var ue=new M,he=5;he--;)ue[z](he,he);return!ue.has(-0)});xe||((C=ie(function(ue,he){j(ue,I);var be=X(new M,ue,C);return he!=null&&k(he,be[z],{that:be,AS_ENTRIES:V}),be})).prototype=I,I.constructor=C),(ye||ge)&&(J("delete"),J("has"),V&&J("get")),(ge||ce)&&J(z),K&&I.clear&&delete I.clear}return F[ee]=C,l({global:!0,forced:C!=M},F),B(C,ee),K||Z.setStrong(C,ee,V),C}},function(s,p,i){var l=i(19),c=i(33),b=i(50),_=i(176),E=Object.isExtensible,w=l(function(){});s.exports=w||_?function(k){return!!c(k)&&(!_||b(k)!="ArrayBuffer")&&(!E||E(k))}:E},function(s,p,i){var l=i(19);s.exports=l(function(){if(typeof ArrayBuffer=="function"){var c=new ArrayBuffer(8);Object.isExtensible(c)&&Object.defineProperty(c,"a",{value:8})}})},function(s,p,i){var l=i(19);s.exports=!l(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(s,p,i){var l=i(37).f,c=i(54),b=i(144),_=i(62),E=i(117),w=i(114),k=i(111),j=i(145),P=i(36),D=i(138).fastKey,N=i(56),L=N.set,B=N.getterFor;s.exports={getConstructor:function(X,ee,ie,Z){var V=X(function(C,F){E(C,K),L(C,{type:ee,index:c(null),first:void 0,last:void 0,size:0}),P||(C.size=0),F!=null&&w(F,C[Z],{that:C,AS_ENTRIES:ie})}),K=V.prototype,z=B(ee),M=function(C,F,J){var le,ce,ye=z(C),xe=I(C,F);return xe?xe.value=J:(ye.last=xe={index:ce=D(F,!0),key:F,value:J,previous:le=ye.last,next:void 0,removed:!1},ye.first||(ye.first=xe),le&&(le.next=xe),P?ye.size++:C.size++,ce!=="F"&&(ye.index[ce]=xe)),C},I=function(C,F){var J,le=z(C),ce=D(F);if(ce!=="F")return le.index[ce];for(J=le.first;J;J=J.next)if(J.key==F)return J};return b(K,{clear:function(){for(var C=z(this),F=C.index,J=C.first;J;)J.removed=!0,J.previous&&(J.previous=J.previous.next=void 0),delete F[J.index],J=J.next;C.first=C.last=void 0,P?C.size=0:this.size=0},delete:function(C){var F=this,J=z(F),le=I(F,C);if(le){var ce=le.next,ye=le.previous;delete J.index[le.index],le.removed=!0,ye&&(ye.next=ce),ce&&(ce.previous=ye),J.first==le&&(J.first=ce),J.last==le&&(J.last=ye),P?J.size--:F.size--}return!!le},forEach:function(C){for(var F,J=z(this),le=_(C,arguments.length>1?arguments[1]:void 0);F=F?F.next:J.first;)for(le(F.value,F.key,this);F&&F.removed;)F=F.previous},has:function(C){return!!I(this,C)}}),b(K,ie?{get:function(C){var F=I(this,C);return F&&F.value},set:function(C,F){return M(this,C===0?0:C,F)}}:{add:function(C){return M(this,C=C===0?0:C,C)}}),P&&l(K,"size",{get:function(){return z(this).size}}),V},setStrong:function(X,ee,ie){var Z=ee+" Iterator",V=B(ee),K=B(Z);k(X,ee,function(z,M){L(this,{type:Z,target:z,state:V(z),kind:M,last:void 0})},function(){for(var z=K(this),M=z.kind,I=z.last;I&&I.removed;)I=I.previous;return z.target&&(z.last=I=I?I.next:z.state.first)?M=="keys"?{value:I.key,done:!1}:M=="values"?{value:I.value,done:!1}:{value:[I.key,I.value],done:!1}:(z.target=void 0,{value:void 0,done:!0})},ie?"entries":"values",!ie,!0),j(ee)}}},function(s,p,i){var l=i(116),c=i(98);s.exports=l?{}.toString:function(){return"[object "+c(this)+"]"}},function(s,p,i){var l=i(74).forEach,c=i(120)("forEach");s.exports=c?[].forEach:function(b){return l(this,b,arguments.length>1?arguments[1]:void 0)}},function(s,p,i){var l=i(7),c=i(99),b=i(100),_=i(33),E=i(27)("species"),w=l.Array;s.exports=function(k){var j;return c(k)&&(j=k.constructor,(b(j)&&(j===w||c(j.prototype))||_(j)&&(j=j[E])===null)&&(j=void 0)),j===void 0?w:j}},function(s,p,i){var l=i(7);s.exports=l},function(s,p,i){var l=i(7),c=i(62),b=i(35),_=i(38),E=i(184),w=i(140),k=i(100),j=i(43),P=i(61),D=i(141),N=i(115),L=l.Array;s.exports=function(B){var X=_(B),ee=k(this),ie=arguments.length,Z=ie>1?arguments[1]:void 0,V=Z!==void 0;V&&(Z=c(Z,ie>2?arguments[2]:void 0));var K,z,M,I,C,F,J=N(X),le=0;if(!J||this==L&&w(J))for(K=j(X),z=ee?new this(K):L(K);K>le;le++)F=V?Z(X[le],le):X[le],P(z,le,F);else for(C=(I=D(X,J)).next,z=ee?new this:[];!(M=b(C,I)).done;le++)F=V?E(I,Z,[M.value,le],!0):M.value,P(z,le,F);return z.length=le,z}},function(s,p,i){var l=i(32),c=i(142);s.exports=function(b,_,E,w){try{return w?_(l(E)[0],E[1]):_(E)}catch(k){c(b,"throw",k)}}},function(s,p,i){var l=i(32);s.exports=function(){var c=l(this),b="";return c.global&&(b+="g"),c.ignoreCase&&(b+="i"),c.multiline&&(b+="m"),c.dotAll&&(b+="s"),c.unicode&&(b+="u"),c.sticky&&(b+="y"),b}},function(s,p,i){var l=i(19),c=i(7).RegExp;s.exports=l(function(){var b=c(".","s");return!(b.dotAll&&b.exec(`
`)&&b.flags==="s")})},function(s,p,i){var l=i(19),c=i(7).RegExp;s.exports=l(function(){var b=c("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},function(s,p,i){var l=i(17),c=i(15),b=i(55),_=i(38),E=i(43),w=i(41),k=i(19),j=i(189),P=i(120),D=i(190),N=i(191),L=i(65),B=i(192),X=[],ee=c(X.sort),ie=c(X.push),Z=k(function(){X.sort(void 0)}),V=k(function(){X.sort(null)}),K=P("sort"),z=!k(function(){if(L)return L<70;if(!(D&&D>3)){if(N)return!0;if(B)return B<603;var M,I,C,F,J="";for(M=65;M<76;M++){switch(I=String.fromCharCode(M),M){case 66:case 69:case 70:case 72:C=3;break;case 68:case 71:C=4;break;default:C=2}for(F=0;F<47;F++)X.push({k:I+F,v:C})}for(X.sort(function(le,ce){return ce.v-le.v}),F=0;F<X.length;F++)I=X[F].k.charAt(0),J.charAt(J.length-1)!==I&&(J+=I);return J!=="DGBEFHACIJK"}});l({target:"Array",proto:!0,forced:Z||!V||!K||!z},{sort:function(M){M!==void 0&&b(M);var I=_(this);if(z)return M===void 0?ee(I):ee(I,M);var C,F,J=[],le=E(I);for(F=0;F<le;F++)F in I&&ie(J,I[F]);for(j(J,function(ce){return function(ye,xe){return xe===void 0?-1:ye===void 0?1:ce!==void 0?+ce(ye,xe)||0:w(ye)>w(xe)?1:-1}}(M)),C=J.length,F=0;F<C;)I[F]=J[F++];for(;F<le;)delete I[F++];return I}})},function(s,p,i){var l=i(113),c=Math.floor,b=function(w,k){var j=w.length,P=c(j/2);return j<8?_(w,k):E(w,b(l(w,0,P),k),b(l(w,P),k),k)},_=function(w,k){for(var j,P,D=w.length,N=1;N<D;){for(P=N,j=w[N];P&&k(w[P-1],j)>0;)w[P]=w[--P];P!==N++&&(w[P]=j)}return w},E=function(w,k,j,P){for(var D=k.length,N=j.length,L=0,B=0;L<D||B<N;)w[L+B]=L<D&&B<N?P(k[L],j[B])<=0?k[L++]:j[B++]:L<D?k[L++]:j[B++];return w};s.exports=b},function(s,p,i){var l=i(53).match(/firefox\/(\d+)/i);s.exports=!!l&&+l[1]},function(s,p,i){var l=i(53);s.exports=/MSIE|Trident/.test(l)},function(s,p,i){var l=i(53).match(/AppleWebKit\/(\d+)\./);s.exports=!!l&&+l[1]},function(s,p,i){var l=i(17),c=i(74).find,b=i(83),_="find",E=!0;_ in[]&&Array(1).find(function(){E=!1}),l({target:"Array",proto:!0,forced:E},{find:function(w){return c(this,w,arguments.length>1?arguments[1]:void 0)}}),b(_)},function(s,p,i){var l=i(7),c=i(154),b=l.TypeError;s.exports=function(_){if(c(_))throw b("The method doesn't accept regular expressions");return _}},function(s,p,i){var l=i(27)("match");s.exports=function(c){var b=/./;try{"/./"[c](b)}catch{try{return b[l]=!1,"/./"[c](b)}catch{}}return!1}},function(s,p,i){var l=i(94).PROPER,c=i(19),b=i(160);s.exports=function(_){return c(function(){return!!b[_]()||"…"[_]()!=="…"||l&&b[_].name!==_})}},function(s,p,i){var l=i(15);s.exports=l(1 .valueOf)},function(s,p,i){var l=i(15),c=i(38),b=Math.floor,_=l("".charAt),E=l("".replace),w=l("".slice),k=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;s.exports=function(P,D,N,L,B,X){var ee=N+P.length,ie=L.length,Z=j;return B!==void 0&&(B=c(B),Z=k),E(X,Z,function(V,K){var z;switch(_(K,0)){case"$":return"$";case"&":return P;case"`":return w(D,0,N);case"'":return w(D,ee);case"<":z=B[w(K,1,-1)];break;default:var M=+K;if(M===0)return V;if(M>ie){var I=b(M/10);return I===0?V:I<=ie?L[I-1]===void 0?_(K,1):L[I-1]+_(K,1):V}z=L[M-1]}return z===void 0?"":z})}},function(s,p,i){var l=i(36),c=i(15),b=i(35),_=i(19),E=i(66),w=i(112),k=i(93),j=i(38),P=i(81),D=Object.assign,N=Object.defineProperty,L=c([].concat);s.exports=!D||_(function(){if(l&&D({b:1},D(N({},"a",{enumerable:!0,get:function(){N(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var B={},X={},ee=Symbol(),ie="abcdefghijklmnopqrst";return B[ee]=7,ie.split("").forEach(function(Z){X[Z]=Z}),D({},B)[ee]!=7||E(D({},X)).join("")!=ie})?function(B,X){for(var ee=j(B),ie=arguments.length,Z=1,V=w.f,K=k.f;ie>Z;)for(var z,M=P(arguments[Z++]),I=V?L(E(M),V(M)):E(M),C=I.length,F=0;C>F;)z=I[F++],l&&!b(K,M,z)||(ee[z]=M[z]);return ee}:D},function(s,p,i){var l=i(7),c=i(15),b=i(55),_=i(33),E=i(34),w=i(101),k=l.Function,j=c([].concat),P=c([].join),D={},N=function(L,B,X){if(!E(D,B)){for(var ee=[],ie=0;ie<B;ie++)ee[ie]="a["+ie+"]";D[B]=k("C,a","return new C("+P(ee,",")+")")}return D[B](L,X)};s.exports=k.bind||function(L){var B=b(this),X=B.prototype,ee=w(arguments,1),ie=function(){var Z=j(ee,w(arguments));return this instanceof ie?N(B,Z.length,Z):B.apply(L,Z)};return _(X)&&(ie.prototype=X),ie}},function(s,p,i){var l=i(34);s.exports=function(c){return c!==void 0&&(l(c,"value")||l(c,"writable"))}},function(s,p,i){var l=i(15),c=i(45),b=i(41),_=/"/g,E=l("".replace);s.exports=function(w,k,j,P){var D=b(c(w)),N="<"+k;return j!==""&&(N+=" "+j+'="'+E(b(P),_,"&quot;")+'"'),N+">"+D+"</"+k+">"}},function(s,p,i){var l=i(19);s.exports=function(c){return l(function(){var b=""[c]('"');return b!==b.toLowerCase()||b.split('"').length>3})}},function(s,p,i){var l,c,b,_,E=i(17),w=i(64),k=i(7),j=i(46),P=i(35),D=i(205),N=i(44),L=i(144),B=i(97),X=i(73),ee=i(145),ie=i(55),Z=i(28),V=i(33),K=i(117),z=i(92),M=i(114),I=i(118),C=i(156),F=i(163).set,J=i(206),le=i(209),ce=i(210),ye=i(165),xe=i(211),ge=i(56),ue=i(95),he=i(27),be=i(212),Se=i(126),Ie=i(65),$e=he("species"),Pe="Promise",Ce=ge.getterFor(Pe),Ke=ge.set,q=ge.getterFor(Pe),$=D&&D.prototype,ae=D,Oe=$,ke=k.TypeError,we=k.document,qe=k.process,nt=ye.f,Je=nt,Ye=!!(we&&we.createEvent&&k.dispatchEvent),ve=Z(k.PromiseRejectionEvent),He="unhandledrejection",te=!1,Le=ue(Pe,function(){var Y=z(ae),se=Y!==String(ae);if(!se&&Ie===66||w&&!Oe.finally)return!0;if(Ie>=51&&/native code/.test(Y))return!1;var Me=new ae(function(Ue){Ue(1)}),De=function(Ue){Ue(function(){},function(){})};return(Me.constructor={})[$e]=De,!(te=Me.then(function(){})instanceof De)||!se&&be&&!ve}),ut=Le||!I(function(Y){ae.all(Y).catch(function(){})}),vt=function(Y){var se;return!(!V(Y)||!Z(se=Y.then))&&se},it=function(Y,se){if(!Y.notified){Y.notified=!0;var Me=Y.reactions;J(function(){for(var De=Y.value,Ue=Y.state==1,ft=0;Me.length>ft;){var Ht,$t,Ct,Rt=Me[ft++],ze=Ue?Rt.ok:Rt.fail,Ve=Rt.resolve,et=Rt.reject,rt=Rt.domain;try{ze?(Ue||(Y.rejection===2&&at(Y),Y.rejection=1),ze===!0?Ht=De:(rt&&rt.enter(),Ht=ze(De),rt&&(rt.exit(),Ct=!0)),Ht===Rt.promise?et(ke("Promise-chain cycle")):($t=vt(Ht))?P($t,Ht,Ve,et):Ve(Ht)):et(De)}catch(wt){rt&&!Ct&&rt.exit(),et(wt)}}Y.reactions=[],Y.notified=!1,se&&!Y.rejection&&St(Y)})}},yt=function(Y,se,Me){var De,Ue;Ye?((De=we.createEvent("Event")).promise=se,De.reason=Me,De.initEvent(Y,!1,!0),k.dispatchEvent(De)):De={promise:se,reason:Me},!ve&&(Ue=k["on"+Y])?Ue(De):Y===He&&ce("Unhandled promise rejection",Me)},St=function(Y){P(F,k,function(){var se,Me=Y.facade,De=Y.value;if(Pt(Y)&&(se=xe(function(){Se?qe.emit("unhandledRejection",De,Me):yt(He,Me,De)}),Y.rejection=Se||Pt(Y)?2:1,se.error))throw se.value})},Pt=function(Y){return Y.rejection!==1&&!Y.parent},at=function(Y){P(F,k,function(){var se=Y.facade;Se?qe.emit("rejectionHandled",se):yt("rejectionhandled",se,Y.value)})},Nt=function(Y,se,Me){return function(De){Y(se,De,Me)}},G=function(Y,se,Me){Y.done||(Y.done=!0,Me&&(Y=Me),Y.value=se,Y.state=2,it(Y,!0))},ne=function(Y,se,Me){if(!Y.done){Y.done=!0,Me&&(Y=Me);try{if(Y.facade===se)throw ke("Promise can't be resolved itself");var De=vt(se);De?J(function(){var Ue={done:!1};try{P(De,se,Nt(ne,Ue,Y),Nt(G,Ue,Y))}catch(ft){G(Ue,ft,Y)}}):(Y.value=se,Y.state=1,it(Y,!1))}catch(Ue){G({done:!1},Ue,Y)}}};if(Le&&(Oe=(ae=function(Y){K(this,Oe),ie(Y),P(l,this);var se=Ce(this);try{Y(Nt(ne,se),Nt(G,se))}catch(Me){G(se,Me)}}).prototype,(l=function(Y){Ke(this,{type:Pe,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=L(Oe,{then:function(Y,se){var Me=q(this),De=Me.reactions,Ue=nt(C(this,ae));return Ue.ok=!Z(Y)||Y,Ue.fail=Z(se)&&se,Ue.domain=Se?qe.domain:void 0,Me.parent=!0,De[De.length]=Ue,Me.state!=0&&it(Me,!1),Ue.promise},catch:function(Y){return this.then(void 0,Y)}}),c=function(){var Y=new l,se=Ce(Y);this.promise=Y,this.resolve=Nt(ne,se),this.reject=Nt(G,se)},ye.f=nt=function(Y){return Y===ae||Y===b?new c(Y):Je(Y)},!w&&Z(D)&&$!==Object.prototype)){_=$.then,te||(N($,"then",function(Y,se){var Me=this;return new ae(function(De,Ue){P(_,Me,De,Ue)}).then(Y,se)},{unsafe:!0}),N($,"catch",Oe.catch,{unsafe:!0}));try{delete $.constructor}catch{}B&&B($,Oe)}E({global:!0,wrap:!0,forced:Le},{Promise:ae}),X(ae,Pe,!1,!0),ee(Pe),b=j(Pe),E({target:Pe,stat:!0,forced:Le},{reject:function(Y){var se=nt(this);return P(se.reject,void 0,Y),se.promise}}),E({target:Pe,stat:!0,forced:w||Le},{resolve:function(Y){return le(w&&this===b?ae:this,Y)}}),E({target:Pe,stat:!0,forced:ut},{all:function(Y){var se=this,Me=nt(se),De=Me.resolve,Ue=Me.reject,ft=xe(function(){var Ht=ie(se.resolve),$t=[],Ct=0,Rt=1;M(Y,function(ze){var Ve=Ct++,et=!1;Rt++,P(Ht,se,ze).then(function(rt){et||(et=!0,$t[Ve]=rt,--Rt||De($t))},Ue)}),--Rt||De($t)});return ft.error&&Ue(ft.value),Me.promise},race:function(Y){var se=this,Me=nt(se),De=Me.reject,Ue=xe(function(){var ft=ie(se.resolve);M(Y,function(Ht){P(ft,se,Ht).then(Me.resolve,De)})});return Ue.error&&De(Ue.value),Me.promise}})},function(s,p,i){var l=i(7);s.exports=l.Promise},function(s,p,i){var l,c,b,_,E,w,k,j,P=i(7),D=i(62),N=i(51).f,L=i(163).set,B=i(164),X=i(207),ee=i(208),ie=i(126),Z=P.MutationObserver||P.WebKitMutationObserver,V=P.document,K=P.process,z=P.Promise,M=N(P,"queueMicrotask"),I=M&&M.value;I||(l=function(){var C,F;for(ie&&(C=K.domain)&&C.exit();c;){F=c.fn,c=c.next;try{F()}catch(J){throw c?_():b=void 0,J}}b=void 0,C&&C.enter()},B||ie||ee||!Z||!V?!X&&z&&z.resolve?((k=z.resolve(void 0)).constructor=z,j=D(k.then,k),_=function(){j(l)}):ie?_=function(){K.nextTick(l)}:(L=D(L,P),_=function(){L(l)}):(E=!0,w=V.createTextNode(""),new Z(l).observe(w,{characterData:!0}),_=function(){w.data=E=!E})),s.exports=I||function(C){var F={fn:C,next:void 0};b&&(b.next=F),c||(c=F,_()),b=F}},function(s,p,i){var l=i(53),c=i(7);s.exports=/ipad|iphone|ipod/i.test(l)&&c.Pebble!==void 0},function(s,p,i){var l=i(53);s.exports=/web0s(?!.*chrome)/i.test(l)},function(s,p,i){var l=i(32),c=i(33),b=i(165);s.exports=function(_,E){if(l(_),c(E)&&E.constructor===_)return E;var w=b.f(_);return(0,w.resolve)(E),w.promise}},function(s,p,i){var l=i(7);s.exports=function(c,b){var _=l.console;_&&_.error&&(arguments.length==1?_.error(c):_.error(c,b))}},function(s,p){s.exports=function(i){try{return{error:!1,value:i()}}catch(l){return{error:!0,value:l}}}},function(s,p){s.exports=typeof window=="object"},function(s,p,i){var l=i(36),c=i(15),b=i(66),_=i(40),E=c(i(93).f),w=c([].push),k=function(j){return function(P){for(var D,N=_(P),L=b(N),B=L.length,X=0,ee=[];B>X;)D=L[X++],l&&!E(N,D)||w(ee,j?[D,N[D]]:N[D]);return ee}};s.exports={entries:k(!0),values:k(!1)}},function(s,p,i){var l=i(38),c=i(67),b=i(43);s.exports=function(_){for(var E=l(this),w=b(E),k=arguments.length,j=c(k>1?arguments[1]:void 0,w),P=k>2?arguments[2]:void 0,D=P===void 0?w:c(P,w);D>j;)E[j++]=_;return E}},function(s,p,i){i.r(p),i.d(p,"observer",function(){return Xn}),i.d(p,"LogicFlow",function(){return af}),i.d(p,"h",function(){return te.g}),i.d(p,"LogicFlowUtil",function(){return l}),i.d(p,"BaseNode",function(){return _r}),i.d(p,"RectNode",function(){return Jc}),i.d(p,"CircleNode",function(){return nl}),i.d(p,"PolygonNode",function(){return ul}),i.d(p,"DiamondNode",function(){return fl}),i.d(p,"EllipseNode",function(){return gl}),i.d(p,"TextNode",function(){return ml}),i.d(p,"HtmlNode",function(){return xl}),i.d(p,"BaseEdge",function(){return wi}),i.d(p,"LineEdge",function(){return Ll}),i.d(p,"PolylineEdge",function(){return Xl}),i.d(p,"BezierEdge",function(){return Vl}),i.d(p,"Arrow",function(){return TO}),i.d(p,"BaseEdgeModel",function(){return ms}),i.d(p,"BezierEdgeModel",function(){return uc}),i.d(p,"LineEdgeModel",function(){return Es}),i.d(p,"PolylineEdgeModel",function(){return ks}),i.d(p,"BaseNodeModel",function(){return mr}),i.d(p,"CircleNodeModel",function(){return dc}),i.d(p,"DiamondNodeModel",function(){return bc}),i.d(p,"EllipseNodeModel",function(){return wc}),i.d(p,"PolygonNodeModel",function(){return kc}),i.d(p,"RectNodeModel",function(){return Dc}),i.d(p,"TextNodeModel",function(){return Ic}),i.d(p,"HtmlNodeModel",function(){return Bc}),i.d(p,"EditConfigModel",function(){return Wf}),i.d(p,"GraphModel",function(){return zd}),i.d(p,"SnaplineModel",function(){return by}),i.d(p,"Keyboard",function(){return og}),i.d(p,"get",function(){return sh}),i.d(p,"defaults",function(){return lh}),i.d(p,"ElementState",function(){return Ot}),i.d(p,"ModelType",function(){return ht}),i.d(p,"ElementType",function(){return Xt}),i.d(p,"EventType",function(){return tt}),i.d(p,"formateAnchorConnectValidateData",function(){return ui});var l={};i.r(l),i.d(l,"createUuid",function(){return Rr}),i.d(l,"refreshGraphId",function(){return Nb}),i.d(l,"createDrag",function(){return sm}),i.d(l,"StepDrag",function(){return yr});var c=i(1),b=i(10);if(!b.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!c.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var _=i(42),E=Object(_.b)("observerBatching");function w(e){e()}var k=!1;function j(){return k}function P(e){return Object(c.t)(e)}var D,N=1e4,L=new Set;function B(){D===void 0&&(D=setTimeout(X,1e4))}function X(){D=void 0;var e=Date.now();L.forEach(function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,L.delete(t))}),L.size>0&&B()}var ee=!1,ie=[],Z={};function V(e){return"observer"+e}function K(e,t,n){t===void 0&&(t="observed"),n===void 0&&(n=Z),j();var r,a=function(m){return function(){ee?ie.push(m):m()}}((n.useForceUpdate||_.d)()),o=b.d.useRef(null);if(!o.current){var u=new c.c(V(t),function(){f.mounted?a():(u.dispose(),o.current=null)}),f=function(m){return{cleanAt:Date.now()+N,reaction:m}}(u);o.current=f,r=o,L.add(r),B()}var d=o.current.reaction;return b.d.useDebugValue(d,P),b.d.useEffect(function(){var m;return m=o,L.delete(m),o.current?o.current.mounted=!0:(o.current={reaction:new c.c(V(t),function(){a()}),cleanAt:1/0},a()),function(){o.current.reaction.dispose(),o.current=null}},[]),function(m){ee=!0,ie=[];try{var O=m();ee=!1;var S=ie.length>0?ie:void 0;return b.d.useLayoutEffect(function(){S&&S.forEach(function(T){return T()})},[S]),O}finally{ee=!1}}(function(){var m,O;if(d.track(function(){try{m=e()}catch(S){O=S}}),O)throw O;return m})}var z=function(){return z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},z.apply(this,arguments)};function M(e,t){var n,r,a,o=z({forwardRef:!1},t),u=e.displayName||e.name,f=function(d,m){return K(function(){return e(d,m)},u)};return f.displayName=u,n=o.forwardRef?Object(b.f)(Object(b.e)(f)):Object(b.f)(f),r=e,a=n,Object.keys(r).forEach(function(d){I[d]||Object.defineProperty(a,d,Object.getOwnPropertyDescriptor(r,d))}),n.displayName=u,n}var I={$$typeof:!0,render:!0,compare:!0,type:!0};function C(e){var t=e.children,n=e.render,r=t||n;return typeof r!="function"?null:K(r)}function F(e,t,n,r,a){var o=t==="children"?"render":"children",u=typeof e[t]=="function",f=typeof e[o]=="function";return u&&f?new Error("MobX Observer: Do not use children and render in the same time in`"+n):u||f?null:new Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}C.propTypes={children:F,render:F},C.displayName="Observer";var J;(J=b.g)||(J=w),Object(c.n)({reactionScheduler:J}),Object(_.a)()[E]=!0;var le=0,ce={};function ye(e){return ce[e]||(ce[e]=function(t){if(typeof Symbol=="function")return Symbol(t);var n="__$mobx-react "+t+" ("+le+")";return le++,n}(e)),ce[e]}function xe(e,t){if(ge(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!Object.hasOwnProperty.call(t,n[a])||!ge(e[n[a]],t[n[a]]))return!1;return!0}function ge(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ue(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var he=ye("patchMixins"),be=ye("patchedDefinition");function Se(e,t){for(var n=this,r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];t.locks++;try{var u;return e!=null&&(u=e.apply(this,a)),u}finally{t.locks--,t.locks===0&&t.methods.forEach(function(f){f.apply(n,a)})}}function Ie(e,t){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];Se.call.apply(Se,[this,e,t].concat(r))}}function $e(e,t,n){var r=function(f,d){var m=f[he]=f[he]||{},O=m[d]=m[d]||{};return O.locks=O.locks||0,O.methods=O.methods||[],O}(e,t);r.methods.indexOf(n)<0&&r.methods.push(n);var a=Object.getOwnPropertyDescriptor(e,t);if(!a||!a[be]){var o=e[t],u=Pe(e,t,a?a.enumerable:void 0,r,o);Object.defineProperty(e,t,u)}}function Pe(e,t,n,r,a){var o,u=Ie(a,r);return(o={})[be]=!0,o.get=function(){return u},o.set=function(f){if(this===e)u=Ie(f,r);else{var d=Pe(this,t,n,r,f);Object.defineProperty(this,t,d)}},o.configurable=!0,o.enumerable=n,o}var Ce=c.a||"$mobx",Ke=ye("isMobXReactObserver"),q=ye("isUnmounted"),$=ye("skipRender"),ae=ye("isForcingUpdate");function Oe(e){var t=e.prototype;if(e[Ke]?ke(t):e[Ke]=!0,t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==b.b)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==qe)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=qe;nt(t,"props"),nt(t,"state");var n=t.render;return t.render=function(){return we.call(this,n)},$e(t,"componentWillUnmount",function(){var r;(r=this.render[Ce])===null||r===void 0||r.dispose(),this[q]=!0,!this.render[Ce]&&ke(this)}),e}function ke(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function we(e){var t=this;ue(this,$,!1),ue(this,ae,!1);var n=ke(this),r=e.bind(this),a=!1,o=new c.c(n+".render()",function(){if(!a&&(a=!0,t[q]!==!0)){var f=!0;try{ue(t,ae,!0),t[$]||b.a.prototype.forceUpdate.call(t),f=!1}finally{ue(t,ae,!1),f&&o.dispose()}}});function u(){a=!1;var f=void 0,d=void 0;if(o.track(function(){try{d=Object(c.d)(!1,r)}catch(m){f=m}}),f)throw f;return d}return o.reactComponent=this,u[Ce]=o,this.render=u,u.call(this)}function qe(e,t){return this.state!==t||!xe(this.props,e)}function nt(e,t){var n=ye("reactProp_"+t+"_valueHolder"),r=ye("reactProp_"+t+"_atomHolder");function a(){return this[r]||ue(this,r,Object(c.o)("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var o=!1;return c.f&&c.e&&(o=Object(c.f)(!0)),a.call(this).reportObserved(),c.f&&c.e&&Object(c.e)(o),this[n]},set:function(o){this[ae]||xe(this[n],o)?ue(this,n,o):(ue(this,n,o),ue(this,$,!0),a.call(this).reportChanged(),ue(this,$,!1))}})}var Je=typeof Symbol=="function"&&Symbol.for,Ye=Je?Symbol.for("react.forward_ref"):typeof b.e=="function"&&Object(b.e)(function(e){return null}).$$typeof,ve=Je?Symbol.for("react.memo"):typeof b.f=="function"&&Object(b.f)(function(e){return null}).$$typeof;function He(e){if(e.isMobxInjector,ve&&e.$$typeof===ve)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(Ye&&e.$$typeof===Ye){var t=e.render;if(typeof t!="function")throw new Error("render property of ForwardRef was not a function");return Object(b.e)(function(){var n=arguments;return Object(b.c)(C,null,function(){return t.apply(void 0,n)})})}return typeof e!="function"||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(b.a,e)?Oe(e):M(e)}if(!b.a)throw new Error("mobx-react requires React to be available");if(!c.C)throw new Error("mobx-react requires mobx to be available");var te=i(0);i(3),i(60),i(2),i(6),i(4),i(11),i(39),i(29),i(22),i(20),i(5),i(23),i(21),i(25),i(8),i(9),i(16),i(24),i(18),i(188),i(193),i(103),i(152),i(153);var Le=function(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},ut=function(){this.__data__=[],this.size=0},vt=function(e,t){return e===t||e!=e&&t!=t},it=function(e,t){for(var n=e.length;n--;)if(vt(e[n][0],t))return n;return-1},yt=Array.prototype.splice,St=function(e){var t=this.__data__,n=it(t,e);return!(n<0)&&(n==t.length-1?t.pop():yt.call(t,n,1),--this.size,!0)},Pt=function(e){var t=this.__data__,n=it(t,e);return n<0?void 0:t[n][1]},at=function(e){return it(this.__data__,e)>-1},Nt=function(e,t){var n=this.__data__,r=it(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function G(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}G.prototype.clear=ut,G.prototype.delete=St,G.prototype.get=Pt,G.prototype.has=at,G.prototype.set=Nt;var ne=G,Y=function(){this.__data__=new ne,this.size=0},se=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Me=function(e){return this.__data__.get(e)},De=function(e){return this.__data__.has(e)},Ue=i(31),ft=Ue.a.Symbol,Ht=Object.prototype,$t=Ht.hasOwnProperty,Ct=Ht.toString,Rt=ft?ft.toStringTag:void 0,ze=function(e){var t=$t.call(e,Rt),n=e[Rt];try{e[Rt]=void 0;var r=!0}catch{}var a=Ct.call(e);return r&&(t?e[Rt]=n:delete e[Rt]),a},Ve=Object.prototype.toString,et=function(e){return Ve.call(e)},rt=ft?ft.toStringTag:void 0,wt=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":rt&&rt in Object(e)?ze(e):et(e)},Mt=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},cr,Gn=function(e){if(!Mt(e))return!1;var t=wt(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Un=Ue.a["__core-js_shared__"],Wr=(cr=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||""))?"Symbol(src)_1."+cr:"",zu=function(e){return!!Wr&&Wr in e},Vo=Function.prototype.toString,kn=function(e){if(e!=null){try{return Vo.call(e)}catch{}try{return e+""}catch{}}return""},Ri=/^\[object .+?Constructor\]$/,Ge=Function.prototype,Bu=Object.prototype,Ii=Ge.toString,Li=Bu.hasOwnProperty,bn=RegExp("^"+Ii.call(Li).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mn=function(e){return!(!Mt(e)||zu(e))&&(Gn(e)?bn:Ri).test(kn(e))},zi=function(e,t){return e==null?void 0:e[t]},Yn=function(e,t){var n=zi(e,t);return mn(n)?n:void 0},kr=Yn(Ue.a,"Map"),Ln=Yn(Object,"create"),Wo=function(){this.__data__=Ln?Ln(null):{},this.size=0},Bi=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Fu=Object.prototype.hasOwnProperty,lo=function(e){var t=this.__data__;if(Ln){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return Fu.call(t,e)?t[e]:void 0},Hu=Object.prototype.hasOwnProperty,Fi=function(e){var t=this.__data__;return Ln?t[e]!==void 0:Hu.call(t,e)},Xu=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ln&&t===void 0?"__lodash_hash_undefined__":t,this};function lr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lr.prototype.clear=Wo,lr.prototype.delete=Bi,lr.prototype.get=lo,lr.prototype.has=Fi,lr.prototype.set=Xu;var Hi=lr,Vn=function(){this.size=0,this.__data__={hash:new Hi,map:new(kr||ne),string:new Hi}},Gu=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},fo=function(e,t){var n=e.__data__;return Gu(t)?n[typeof t=="string"?"string":"hash"]:n.map},$o=function(e){var t=fo(this,e).delete(e);return this.size-=t?1:0,t},Ko=function(e){return fo(this,e).get(e)},Uu=function(e){return fo(this,e).has(e)},Xi=function(e,t){var n=fo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Tr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Tr.prototype.clear=Vn,Tr.prototype.delete=$o,Tr.prototype.get=Ko,Tr.prototype.has=Uu,Tr.prototype.set=Xi;var Ar=Tr,Gi=function(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!kr||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ar(r)}return n.set(e,t),this.size=n.size,this};function Mr(e){var t=this.__data__=new ne(e);this.size=t.size}Mr.prototype.clear=Y,Mr.prototype.delete=se,Mr.prototype.get=Me,Mr.prototype.has=De,Mr.prototype.set=Gi;var Wn=Mr,Ui=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Yi=function(e){return this.__data__.has(e)};function $r(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ar;++t<n;)this.add(e[t])}$r.prototype.add=$r.prototype.push=Ui,$r.prototype.has=Yi;var Vi=$r,Yu=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Wi=function(e,t){return e.has(t)},$i=function(e,t,n,r,a,o){var u=1&n,f=e.length,d=t.length;if(f!=d&&!(u&&d>f))return!1;var m=o.get(e),O=o.get(t);if(m&&O)return m==t&&O==e;var S=-1,T=!0,R=2&n?new Vi:void 0;for(o.set(e,t),o.set(t,e);++S<f;){var U=e[S],W=t[S];if(r)var oe=u?r(W,U,S,t,e,o):r(U,W,S,e,t,o);if(oe!==void 0){if(oe)continue;T=!1;break}if(R){if(!Yu(t,function(re,de){if(!Wi(R,de)&&(U===re||a(U,re,n,r,o)))return R.push(de)})){T=!1;break}}else if(U!==W&&!a(U,W,n,r,o)){T=!1;break}}return o.delete(e),o.delete(t),T},Kr=Ue.a.Uint8Array,Ki=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n},Vu=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n},qi=ft?ft.prototype:void 0,qo=qi?qi.valueOf:void 0,qr=function(e,t,n,r,a,o,u){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Kr(e),new Kr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return vt(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=Ki;case"[object Set]":var d=1&r;if(f||(f=Vu),e.size!=t.size&&!d)return!1;var m=u.get(e);if(m)return m==t;r|=2,u.set(e,t);var O=$i(f(e),f(t),r,a,o,u);return u.delete(e),O;case"[object Symbol]":if(qo)return qo.call(e)==qo.call(t)}return!1},$n=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Zt=Array.isArray,Zi=function(e,t,n){var r=t(e);return Zt(e)?r:$n(r,n(e))},Ji=function(e,t){for(var n=-1,r=e==null?0:e.length,a=0,o=[];++n<r;){var u=e[n];t(u,n,e)&&(o[a++]=u)}return o},Qi=function(){return[]},Wu=Object.prototype.propertyIsEnumerable,fr=Object.getOwnPropertySymbols,Tn=fr?function(e){return e==null?[]:(e=Object(e),Ji(fr(e),function(t){return Wu.call(e,t)}))}:Qi,$u=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},An=function(e){return e!=null&&typeof e=="object"},_n=function(e){return An(e)&&wt(e)=="[object Arguments]"},ea=Object.prototype,ta=ea.hasOwnProperty,Ku=ea.propertyIsEnumerable,po=_n(function(){return arguments}())?_n:function(e){return An(e)&&ta.call(e,"callee")&&!Ku.call(e,"callee")},Kn=po,Zr=i(48),qu=/^(?:0|[1-9]\d*)$/,rn=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&(n=="number"||n!="symbol"&&qu.test(e))&&e>-1&&e%1==0&&e<t},pr=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},gt={};gt["[object Float32Array]"]=gt["[object Float64Array]"]=gt["[object Int8Array]"]=gt["[object Int16Array]"]=gt["[object Int32Array]"]=gt["[object Uint8Array]"]=gt["[object Uint8ClampedArray]"]=gt["[object Uint16Array]"]=gt["[object Uint32Array]"]=!0,gt["[object Arguments]"]=gt["[object Array]"]=gt["[object ArrayBuffer]"]=gt["[object Boolean]"]=gt["[object DataView]"]=gt["[object Date]"]=gt["[object Error]"]=gt["[object Function]"]=gt["[object Map]"]=gt["[object Number]"]=gt["[object Object]"]=gt["[object RegExp]"]=gt["[object Set]"]=gt["[object String]"]=gt["[object WeakMap]"]=!1;var On=function(e){return An(e)&&pr(e.length)&&!!gt[wt(e)]},dr=function(e){return function(t){return e(t)}},Kt=i(49),na=Kt.a&&Kt.a.isTypedArray,Zo=na?dr(na):On,ra=Object.prototype.hasOwnProperty,Mn=function(e,t){var n=Zt(e),r=!n&&Kn(e),a=!n&&!r&&Object(Zr.a)(e),o=!n&&!r&&!a&&Zo(e),u=n||r||a||o,f=u?$u(e.length,String):[],d=f.length;for(var m in e)!t&&!ra.call(e,m)||u&&(m=="length"||a&&(m=="offset"||m=="parent")||o&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||rn(m,d))||f.push(m);return f},oa=Object.prototype,ho=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||oa)},Dn=function(e,t){return function(n){return e(t(n))}},ia=Dn(Object.keys,Object),Zu=Object.prototype.hasOwnProperty,Jo=function(e){if(!ho(e))return ia(e);var t=[];for(var n in Object(e))Zu.call(e,n)&&n!="constructor"&&t.push(n);return t},It=function(e){return e!=null&&pr(e.length)&&!Gn(e)},Dr=function(e){return It(e)?Mn(e):Jo(e)},yo=function(e){return Zi(e,Dr,Tn)},hn=Object.prototype.hasOwnProperty,aa=function(e,t,n,r,a,o){var u=1&n,f=yo(e),d=f.length;if(d!=yo(t).length&&!u)return!1;for(var m=d;m--;){var O=f[m];if(!(u?O in t:hn.call(t,O)))return!1}var S=o.get(e),T=o.get(t);if(S&&T)return S==t&&T==e;var R=!0;o.set(e,t),o.set(t,e);for(var U=u;++m<d;){var W=e[O=f[m]],oe=t[O];if(r)var re=u?r(oe,W,O,t,e,o):r(W,oe,O,e,t,o);if(!(re===void 0?W===oe||a(W,oe,n,r,o):re)){R=!1;break}U||(U=O=="constructor")}if(R&&!U){var de=e.constructor,me=t.constructor;de==me||!("constructor"in e)||!("constructor"in t)||typeof de=="function"&&de instanceof de&&typeof me=="function"&&me instanceof me||(R=!1)}return o.delete(e),o.delete(t),R},Jr=Yn(Ue.a,"DataView"),go=Yn(Ue.a,"Promise"),vo=Yn(Ue.a,"Set"),bo=Yn(Ue.a,"WeakMap"),ua="[object Map]",yn="[object Promise]",wn="[object Set]",Nr="[object WeakMap]",Qo="[object DataView]",ei=kn(Jr),ti=kn(kr),sa=kn(go),Ju=kn(vo),mo=kn(bo),hr=wt;(Jr&&hr(new Jr(new ArrayBuffer(1)))!=Qo||kr&&hr(new kr)!=ua||go&&hr(go.resolve())!=yn||vo&&hr(new vo)!=wn||bo&&hr(new bo)!=Nr)&&(hr=function(e){var t=wt(e),n=t=="[object Object]"?e.constructor:void 0,r=n?kn(n):"";if(r)switch(r){case ei:return Qo;case ti:return ua;case sa:return yn;case Ju:return wn;case mo:return Nr}return t});var h=hr,g="[object Arguments]",x="[object Array]",A="[object Object]",H=Object.prototype.hasOwnProperty,Q=function(e,t,n,r,a,o){var u=Zt(e),f=Zt(t),d=u?x:h(e),m=f?x:h(t),O=(d=d==g?A:d)==A,S=(m=m==g?A:m)==A,T=d==m;if(T&&Object(Zr.a)(e)){if(!Object(Zr.a)(t))return!1;u=!0,O=!1}if(T&&!O)return o||(o=new Wn),u||Zo(e)?$i(e,t,n,r,a,o):qr(e,t,d,n,r,a,o);if(!(1&n)){var R=O&&H.call(e,"__wrapped__"),U=S&&H.call(t,"__wrapped__");if(R||U){var W=R?e.value():e,oe=U?t.value():t;return o||(o=new Wn),a(W,oe,n,r,o)}}return!!T&&(o||(o=new Wn),aa(e,t,n,r,a,o))},pe=function e(t,n,r,a,o){return t===n||(t==null||n==null||!An(t)&&!An(n)?t!=t&&n!=n:Q(t,n,r,a,e,o))},je=function(e,t,n,r){var a=n.length,o=a,u=!r;if(e==null)return!o;for(e=Object(e);a--;){var f=n[a];if(u&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++a<o;){var d=(f=n[a])[0],m=e[d],O=f[1];if(u&&f[2]){if(m===void 0&&!(d in e))return!1}else{var S=new Wn;if(r)var T=r(m,O,d,e,t,S);if(!(T===void 0?pe(O,m,3,r,S):T))return!1}}return!0},Fe=function(e){return e==e&&!Mt(e)},dt=function(e){for(var t=Dr(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Fe(a)]}return t},ot=function(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}},xt=function(e){var t=dt(e);return t.length==1&&t[0][2]?ot(t[0][0],t[0][1]):function(n){return n===e||je(n,e,t)}},ct=function(e){return typeof e=="symbol"||An(e)&&wt(e)=="[object Symbol]"},_t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/,Tt=function(e,t){if(Zt(e))return!1;var n=typeof e;return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!ct(e))||xn.test(e)||!_t.test(e)||t!=null&&e in Object(t)};function on(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var u=e.apply(this,r);return n.cache=o.set(a,u)||o,u};return n.cache=new(on.Cache||Ar),n}on.Cache=Ar;var Qr=on,Qu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ca=/\\(\\)?/g,la=function(e){var t=Qr(e,function(r){return n.size===500&&n.clear(),r}),n=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qu,function(n,r,a,o){t.push(a?o.replace(ca,"$1"):r||n)}),t}),_o=ft?ft.prototype:void 0,ni=_o?_o.toString:void 0,an=function e(t){if(typeof t=="string")return t;if(Zt(t))return Le(t,e)+"";if(ct(t))return ni?ni.call(t):"";var n=t+"";return n=="0"&&1/t==-1/0?"-0":n},fa=function(e){return e==null?"":an(e)},eo=function(e,t){return Zt(e)?e:Tt(e,t)?[e]:la(fa(e))},ri=function(e){if(typeof e=="string"||ct(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},es=function(e,t){for(var n=0,r=(t=eo(t,e)).length;e!=null&&n<r;)e=e[ri(t[n++])];return n&&n==r?e:void 0},_f=function(e,t,n){var r=e==null?void 0:es(e,t);return r===void 0?n:r},mv=function(e,t){return e!=null&&t in Object(e)},_v=function(e,t,n){for(var r=-1,a=(t=eo(t,e)).length,o=!1;++r<a;){var u=ri(t[r]);if(!(o=e!=null&&n(e,u)))break;e=e[u]}return o||++r!=a?o:!!(a=e==null?0:e.length)&&pr(a)&&rn(u,a)&&(Zt(e)||Kn(e))},Of=function(e,t){return e!=null&&_v(e,t,mv)},Ov=function(e,t){return Tt(e)&&Fe(t)?ot(ri(e),t):function(n){var r=_f(n,e);return r===void 0&&r===t?Of(n,e):pe(t,r,3)}},ts=function(e){return e},wv=function(e){return function(t){return t==null?void 0:t[e]}},xv=function(e){return function(t){return es(t,e)}},Ev=function(e){return Tt(e)?wv(ri(e)):xv(e)},Sv=function(e){return typeof e=="function"?e:e==null?ts:typeof e=="object"?Zt(e)?Ov(e[0],e[1]):xt(e):Ev(e)},wf=function(e){return function(t,n,r){for(var a=-1,o=Object(t),u=r(t),f=u.length;f--;){var d=u[e?f:++a];if(n(o[d],d,o)===!1)break}return t}}(),jv=function(e,t){return function(n,r){if(n==null)return n;if(!It(n))return e(n,r);for(var a=n.length,o=t?a:-1,u=Object(n);(t?o--:++o<a)&&r(u[o],o,u)!==!1;);return n}}(function(e,t){return e&&wf(e,t,Dr)}),Pv=function(e,t){var n=-1,r=It(e)?Array(e.length):[];return jv(e,function(a,o,u){r[++n]=t(a,o,u)}),r},pa=function(e,t){return(Zt(e)?Le:Pv)(e,Sv(t))};Object(c.n)({isolateGlobalState:!0});var da=function(){try{var e=Yn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ns=function(e,t,n){t=="__proto__"&&da?da(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},kv=Object.prototype.hasOwnProperty,ha=function(e,t,n){var r=e[t];kv.call(e,t)&&vt(r,n)&&(n!==void 0||t in e)||ns(e,t,n)},Oo=function(e,t,n,r){var a=!n;n||(n={});for(var o=-1,u=t.length;++o<u;){var f=t[o],d=r?r(n[f],e[f],f,n,e):void 0;d===void 0&&(d=e[f]),a?ns(n,f,d):ha(n,f,d)}return n},Tv=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},xf=Math.max,Ef=function(e,t,n){return t=xf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=xf(r.length-t,0),u=Array(o);++a<o;)u[a]=r[t+a];a=-1;for(var f=Array(t+1);++a<t;)f[a]=r[a];return f[t]=n(u),Tv(e,this,f)}},Av=function(e){return function(){return e}},Mv=da?function(e,t){return da(e,"toString",{configurable:!0,enumerable:!1,value:Av(t),writable:!0})}:ts,Dv=Date.now,Nv=function(e){var t=0,n=0;return function(){var r=Dv(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Sf=Nv(Mv),Cv=function(e,t){return Sf(Ef(e,t,ts),e+"")},Rv=function(e,t,n){if(!Mt(n))return!1;var r=typeof t;return!!(r=="number"?It(n)&&rn(t,n.length):r=="string"&&t in n)&&vt(n[t],e)},jf=function(e){return Cv(function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,u=a>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(a--,o):void 0,u&&Rv(n[0],n[1],u)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var f=n[r];f&&e(t,f,r,o)}return t})},Iv=Object.prototype.hasOwnProperty,un=jf(function(e,t){if(ho(t)||It(t))Oo(t,Dr(t),e);else for(var n in t)Iv.call(t,n)&&ha(e,n,t[n])}),Lv=function(e,t,n,r){if(!Mt(e))return e;for(var a=-1,o=(t=eo(t,e)).length,u=o-1,f=e;f!=null&&++a<o;){var d=ri(t[a]),m=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=u){var O=f[d];(m=r?r(O,d,f):void 0)===void 0&&(m=Mt(O)?O:rn(t[a+1])?[]:{})}ha(f,d,m),f=f[d]}return e},zv=function(e,t,n){for(var r=-1,a=t.length,o={};++r<a;){var u=t[r],f=es(e,u);n(f,u)&&Lv(o,eo(u,e),f)}return o},Bv=function(e,t){return zv(e,t,function(n,r){return Of(e,r)})},Pf=ft?ft.isConcatSpreadable:void 0,Fv=function(e){return Zt(e)||Kn(e)||!!(Pf&&e&&e[Pf])},Hv=function e(t,n,r,a,o){var u=-1,f=t.length;for(r||(r=Fv),o||(o=[]);++u<f;){var d=t[u];n>0&&r(d)?n>1?e(d,n-1,r,a,o):$n(o,d):a||(o[o.length]=d)}return o},Xv=function(e){return e!=null&&e.length?Hv(e,1):[]},Lt,kf,Tf,Af,Mf,Df,Nf,Cf,Rf,If,Lf,zf,Bf,Ff,Hf,Xf,Gf,Uf,oi=function(e){return Sf(Ef(e,void 0,Xv),e+"")}(function(e,t){return e==null?{}:Bv(e,t)});function Jt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Gv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qt(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Ot,Vf,ht,Xt,tt,At,Uv={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},rs=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],Wf=(kf=qt((Lt=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Jt(this,"isSilentMode",kf,this),Jt(this,"stopZoomGraph",Tf,this),Jt(this,"stopScrollGraph",Af,this),Jt(this,"stopMoveGraph",Mf,this),Jt(this,"adjustEdge",Df,this),Jt(this,"adjustEdgeMiddle",Nf,this),Jt(this,"adjustEdgeStartAndEnd",Cf,this),Jt(this,"adjustNodePosition",Rf,this),Jt(this,"hideAnchors",If,this),Jt(this,"hoverOutline",Lf,this),Jt(this,"nodeSelectedOutline",zf,this),Jt(this,"edgeSelectedOutline",Bf,this),Jt(this,"nodeTextEdit",Ff,this),Jt(this,"edgeTextEdit",Hf,this),Jt(this,"nodeTextDraggable",Xf,this),Jt(this,"edgeTextDraggable",Gf,this),Jt(this,"autoExpand",Uf,this),Yf(this,"multipleSelectKey",""),Yf(this,"defaultConfig",{}),un(this,this.getConfigDetail(r))}var t,n;return t=e,(n=[{key:"updateEditConfig",value:function(r){var a=this.getConfigDetail(r);un(this,a)}},{key:"getConfigDetail",value:function(r){var a=r.isSilentMode,o=r.textEdit,u={};if(a===!1&&un(u,this.defaultConfig),a===!0&&a!==this.isSilentMode){var f=oi(Uv,rs);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},un(u,f)}o===!1&&un(u,{nodeTextEdit:!1,edgeTextEdit:!1});var d=oi(r,rs);return un(u,d)}},{key:"getConfig",value:function(){return oi(this,rs)}}])&&Gv(t.prototype,n),e}()).prototype,"isSilentMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tf=qt(Lt.prototype,"stopZoomGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Af=qt(Lt.prototype,"stopScrollGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mf=qt(Lt.prototype,"stopMoveGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Df=qt(Lt.prototype,"adjustEdge",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Nf=qt(Lt.prototype,"adjustEdgeMiddle",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cf=qt(Lt.prototype,"adjustEdgeStartAndEnd",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rf=qt(Lt.prototype,"adjustNodePosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),If=qt(Lt.prototype,"hideAnchors",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Lf=qt(Lt.prototype,"hoverOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zf=qt(Lt.prototype,"nodeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bf=qt(Lt.prototype,"edgeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ff=qt(Lt.prototype,"nodeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hf=qt(Lt.prototype,"edgeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xf=qt(Lt.prototype,"nodeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gf=qt(Lt.prototype,"edgeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Uf=qt(Lt.prototype,"autoExpand",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qt(Lt.prototype,"updateEditConfig",[c.k],Object.getOwnPropertyDescriptor(Lt.prototype,"updateEditConfig"),Lt.prototype),Lt);i(63),function(e){e[e.DEFAULT=1]="DEFAULT",e[e.TEXT_EDIT=2]="TEXT_EDIT",e[e.SHOW_MENU=3]="SHOW_MENU",e[e.ALLOW_CONNECT=4]="ALLOW_CONNECT",e[e.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(Ot||(Ot={})),function(e){e.KEY="logic-flow",e.NODE_NAME="lf-node",e.EDGE_NAME="lf-edge"}(Vf||(Vf={})),function(e){e.NODE="node",e.CIRCLE_NODE="circle-node",e.POLYGON_NODE="polygon-node",e.RECT_NODE="rect-node",e.TEXT_NODE="text-node",e.ELLIPSE_NODE="ellipse-node",e.DIAMOND_NODE="diamond-node",e.HTML_NODE="html-node",e.EDGE="edge",e.LINE_EDGE="line-edge",e.POLYLINE_EDGE="polyline-edge",e.BEZIER_EDGE="bezier-edge",e.GRAPH="graph"}(ht||(ht={})),function(e){e.NODE="node",e.EDGE="edge",e.GRAPH="graph"}(Xt||(Xt={})),function(e){e.ELEMENT_CLICK="element:click",e.NODE_CLICK="node:click",e.NODE_DBCLICK="node:dbclick",e.NODE_DELETE="node:delete",e.NODE_ADD="node:add",e.NODE_DND_ADD="node:dnd-add",e.NODE_DND_DRAG="node:dnd-drag",e.NODE_MOUSEDOWN="node:mousedown",e.NODE_DRAGSTART="node:dragstart",e.NODE_DRAG="node:drag",e.NODE_DROP="node:drop",e.NODE_MOUSEUP="node:mouseup",e.NODE_MOUSEMOVE="node:mousemove",e.NODE_MOUSEENTER="node:mouseenter",e.NODE_MOUSELEAVE="node:mouseleave",e.NODE_CONTEXTMENU="node:contextmenu",e.EDGE_DELETE="edge:delete",e.EDGE_ADD="edge:add",e.EDGE_CLICK="edge:click",e.EDGE_DBCLICK="edge:dbclick",e.EDGE_MOUSEENTER="edge:mouseenter",e.EDGE_MOUSELEAVE="edge:mouseleave",e.EDGE_CONTEXTMENU="edge:contextmenu",e.EDGE_ADJUST="edge:adjust",e.EDGE_EXCHANGE_NODE="edge:exchange-node",e.ANCHOR_DRAGSTART="anchor:dragstart",e.ANCHOR_DRAG="anchor:drag",e.ANCHOR_DROP="anchor:drop",e.ANCHOR_DRAGEND="anchor:dragend",e.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",e.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",e.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",e.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",e.ADJUST_POINT_DRAG="adjustPoint:drag",e.ADJUST_POINT_DROP="adjustPoint:drop",e.ADJUST_POINT_DRAGEND="adjustPoint:dragend",e.BLANK_MOUSEDOWN="blank:mousedown",e.BLANK_DRAGSTART="blank:dragstart",e.BLANK_DRAG="blank:drag",e.BLANK_DROP="blank:drop",e.BLANK_MOUSEMOVE="blank:mousemove",e.BLANK_MOUSEUP="blank:mouseup",e.BLANK_CLICK="blank:click",e.BLANK_CONTEXTMENU="blank:contextmenu",e.SELECTION_MOUSEDOWN="selection:mousedown",e.SELECTION_DRAGSTART="selection:dragstart",e.SELECTION_DRAG="selection:drag",e.SELECTION_DROP="selection:drop",e.SELECTION_MOUSEMOVE="selection:mousemove",e.SELECTION_MOUSEUP="selection:mouseup",e.SELECTION_CONTEXTMENU="selection:contextmenu",e.CONNECTION_NOT_ALLOWED="connection:not-allowed",e.HISTORY_CHANGE="history:change",e.TEXT_UPDATE="text:update",e.GRAPH_TRANSFORM="graph:transform",e.GRAPH_RENDERED="graph:rendered"}(tt||(tt={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(At||(At={}));var En,zt,$f,Kf,qf,Zf,Jf,Qf,ep;function ya(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return tp(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return tp(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function to(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Yv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zn(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.INCREASE=1]="INCREASE"})(En||(En={}));var Vv=(zt=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),os(this,"MINI_SCALE_SIZE",.2),os(this,"MAX_SCALE_SIZE",16),to(this,"SCALE_X",$f,this),to(this,"SKEW_Y",Kf,this),to(this,"SKEW_X",qf,this),to(this,"SCALE_Y",Zf,this),to(this,"TRANSLATE_X",Jf,this),to(this,"TRANSLATE_Y",Qf,this),to(this,"ZOOM_SIZE",ep,this),os(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,n=[{key:"setZoomMiniSize",value:function(r){this.MINI_SCALE_SIZE=r}},{key:"setZoomMaxSize",value:function(r){this.MAX_SCALE_SIZE=r}},{key:"HtmlPointToCanvasPoint",value:function(r){var a=ya(r,2),o=a[0],u=a[1];return[(o-this.TRANSLATE_X)/this.SCALE_X,(u-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(r){var a=ya(r,2),o=a[0],u=a[1];return[o*this.SCALE_X+this.TRANSLATE_X,u*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(r,a,o){var u=ya(r,2),f=u[0],d=u[1];return[f+a/this.SCALE_X,d+o/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(r,a){return[r/this.SCALE_X,a/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var r=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(r,")")}}},{key:"zoom",value:function(){var r=arguments.length>0&&arguments[0]!==void 0&&arguments[0],a=arguments.length>1?arguments[1]:void 0,o=this.SCALE_X,u=this.SCALE_Y;return r===!0?(o+=this.ZOOM_SIZE,u+=this.ZOOM_SIZE):r===!1?(o-=this.ZOOM_SIZE,u-=this.ZOOM_SIZE):typeof r=="number"&&(o=r,u=r),o<this.MINI_SCALE_SIZE||o>this.MAX_SCALE_SIZE||(a&&(this.TRANSLATE_X-=(o-this.SCALE_X)*a[0],this.TRANSLATE_Y-=(u-this.SCALE_Y)*a[1]),this.SCALE_X=o,this.SCALE_Y=u,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(r){this.eventCenter.emit(tt.GRAPH_TRANSFORM,{type:r,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(r,a){this.TRANSLATE_X+=r,this.TRANSLATE_Y+=a,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(r,a,o,u){var f=ya(this.CanvasPointToHtmlPoint([r,a]),2),d=o/2-f[0],m=u/2-f[1];this.TRANSLATE_X+=d,this.TRANSLATE_Y+=m,this.emitGraphTransform("focusOn")}}],n&&Yv(t.prototype,n),e}(),$f=zn(zt.prototype,"SCALE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Kf=zn(zt.prototype,"SKEW_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),qf=zn(zt.prototype,"SKEW_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Zf=zn(zt.prototype,"SCALE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Jf=zn(zt.prototype,"TRANSLATE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Qf=zn(zt.prototype,"TRANSLATE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ep=zn(zt.prototype,"ZOOM_SIZE",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),zn(zt.prototype,"zoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"zoom"),zt.prototype),zn(zt.prototype,"resetZoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"resetZoom"),zt.prototype),zn(zt.prototype,"translate",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"translate"),zt.prototype),zn(zt.prototype,"focusOn",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"focusOn"),zt.prototype),zt),Wv=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e},$v=function(e,t){return e&&Oo(t,Dr(t),e)},Kv=function(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t},qv=Object.prototype.hasOwnProperty,Zv=function(e){if(!Mt(e))return Kv(e);var t=ho(e),n=[];for(var r in e)(r!="constructor"||!t&&qv.call(e,r))&&n.push(r);return n},ii=function(e){return It(e)?Mn(e,!0):Zv(e)},Jv=function(e,t){return e&&Oo(t,ii(t),e)},np=i(106),rp=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Qv=function(e,t){return Oo(e,Tn(e),t)},is=Dn(Object.getPrototypeOf,Object),op=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)$n(t,Tn(e)),e=is(e);return t}:Qi,eb=function(e,t){return Oo(e,op(e),t)},tb=function(e){return Zi(e,ii,op)},nb=Object.prototype.hasOwnProperty,rb=function(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&nb.call(e,"index")&&(n.index=e.index,n.input=e.input),n},as=function(e){var t=new e.constructor(e.byteLength);return new Kr(t).set(new Kr(e)),t},ob=function(e,t){var n=t?as(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},ib=/\w*$/,ab=function(e){var t=new e.constructor(e.source,ib.exec(e));return t.lastIndex=e.lastIndex,t},ip=ft?ft.prototype:void 0,ap=ip?ip.valueOf:void 0,ub=function(e){return ap?Object(ap.call(e)):{}},up=function(e,t){var n=t?as(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},sb=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return as(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return ob(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return up(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return ab(e);case"[object Symbol]":return ub(e)}},sp=Object.create,cb=function(){function e(){}return function(t){if(!Mt(t))return{};if(sp)return sp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),cp=function(e){return typeof e.constructor!="function"||ho(e)?{}:cb(is(e))},lb=function(e){return An(e)&&h(e)=="[object Map]"},lp=Kt.a&&Kt.a.isMap,fb=lp?dr(lp):lb,pb=function(e){return An(e)&&h(e)=="[object Set]"},fp=Kt.a&&Kt.a.isSet,db=fp?dr(fp):pb,pp="[object Arguments]",dp="[object Function]",hb="[object Object]",kt={};kt[pp]=kt["[object Array]"]=kt["[object ArrayBuffer]"]=kt["[object DataView]"]=kt["[object Boolean]"]=kt["[object Date]"]=kt["[object Float32Array]"]=kt["[object Float64Array]"]=kt["[object Int8Array]"]=kt["[object Int16Array]"]=kt["[object Int32Array]"]=kt["[object Map]"]=kt["[object Number]"]=kt["[object Object]"]=kt["[object RegExp]"]=kt["[object Set]"]=kt["[object String]"]=kt["[object Symbol]"]=kt["[object Uint8Array]"]=kt["[object Uint8ClampedArray]"]=kt["[object Uint16Array]"]=kt["[object Uint32Array]"]=!0,kt["[object Error]"]=kt[dp]=kt["[object WeakMap]"]=!1;var yb=function e(t,n,r,a,o,u){var f,d=1&n,m=2&n,O=4&n;if(r&&(f=o?r(t,a,o,u):r(t)),f!==void 0)return f;if(!Mt(t))return t;var S=Zt(t);if(S){if(f=rb(t),!d)return rp(t,f)}else{var T=h(t),R=T==dp||T=="[object GeneratorFunction]";if(Object(Zr.a)(t))return Object(np.a)(t,d);if(T==hb||T==pp||R&&!o){if(f=m||R?{}:cp(t),!d)return m?eb(t,Jv(f,t)):Qv(t,$v(f,t))}else{if(!kt[T])return o?t:{};f=sb(t,T,d)}}u||(u=new Wn);var U=u.get(t);if(U)return U;u.set(t,f),db(t)?t.forEach(function(oe){f.add(e(oe,n,r,oe,t,u))}):fb(t)&&t.forEach(function(oe,re){f.set(re,e(oe,n,r,re,t,u))});var W=S?void 0:(O?m?tb:yo:m?ii:Dr)(t);return Wv(W||t,function(oe,re){W&&(oe=t[re=oe]),ha(f,re,e(oe,n,r,re,t,u))}),f},Dt=function(e){return yb(e,5)},us=function(e,t,n){(n!==void 0&&!vt(e[t],n)||n===void 0&&!(t in e))&&ns(e,t,n)},gb=function(e){return An(e)&&It(e)},vb=Function.prototype,bb=Object.prototype,hp=vb.toString,mb=bb.hasOwnProperty,_b=hp.call(Object),Ob=function(e){if(!An(e)||wt(e)!="[object Object]")return!1;var t=is(e);if(t===null)return!0;var n=mb.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hp.call(n)==_b},ss=function(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]},wb=function(e){return Oo(e,ii(e))},xb=function(e,t,n,r,a,o,u){var f=ss(e,n),d=ss(t,n),m=u.get(d);if(m)us(e,n,m);else{var O=o?o(f,d,n+"",e,t,u):void 0,S=O===void 0;if(S){var T=Zt(d),R=!T&&Object(Zr.a)(d),U=!T&&!R&&Zo(d);O=d,T||R||U?Zt(f)?O=f:gb(f)?O=rp(f):R?(S=!1,O=Object(np.a)(d,!0)):U?(S=!1,O=up(d,!0)):O=[]:Ob(d)||Kn(d)?(O=f,Kn(f)?O=wb(f):Mt(f)&&!Gn(f)||(O=cp(d))):S=!1}S&&(u.set(d,O),a(O,d,r,o,u),u.delete(d)),us(e,n,O)}},Eb=function e(t,n,r,a,o){t!==n&&wf(n,function(u,f){if(o||(o=new Wn),Mt(u))xb(t,n,f,r,e,a,o);else{var d=a?a(ss(t,f),u,f+"",t,n,o):void 0;d===void 0&&(d=u),us(t,f,d)}},ii)},yp=jf(function(e,t,n){Eb(e,t,n)}),Sb={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"}},gp=function(e){var t=Dt(Sb);return e&&(t=yp(t,e)),t};i(77),i(158);function jb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Pb=function(){function e(){var r,a,o;(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),o={},(a="_events")in(r=this)?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}var t,n;return t=e,(n=[{key:"on",value:function(r,a,o){var u=this;return r==null||r.split(",").forEach(function(f){f=f.trim(),u._events[f]||(u._events[f]=[]),u._events[f].push({callback:a,once:!!o})}),this}},{key:"once",value:function(r,a){var o=this;r==null||r.split(",").forEach(function(u){return u=u.trim(),o.on(u,a,!0)})}},{key:"emit",value:function(r,a){var o=this;r==null||r.split(",").forEach(function(u){var f=o._events[u]||[],d=o._events["*"]||[],m=function(O){for(var S=O.length,T=0;T<S;T++)if(O[T]){var R=O[T],U=R.callback;R.once&&(O.splice(T,1),O.length===0&&delete o._events[u],S--,T--),U.apply(o,[a])}};m(f),m(d)})}},{key:"off",value:function(r,a){var o=this;return r||(this._events={}),r.split(",").forEach(function(u){if(a){for(var f=o._events[u]||[],d=f.length,m=0;m<d;m++)f[m].callback===a&&(f.splice(m,1),d--,m--);f.length===0&&delete o._events[u]}else delete o._events[u]}),this}},{key:"getEvents",value:function(){return this._events}}])&&jb(t.prototype,n),e}();function Cr(e,t){return t*Math.round(e/t)||e}function vp(e,t){return e%t}function cs(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return bp(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return bp(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function bp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ls,fs=function(e,t,n){var r=cs(e,2),a=r[0],o=r[1],u=cs(t,2),f=u[0],d=u[1],m=cs(n,2),O=m[0],S=m[1];return a>f&&a<O&&o>d&&o<S},mp=function(e,t){var n=!1;switch(t.multipleSelectKey){case"meta":n=e.metaKey;break;case"alt":n=e.altKey;break;case"shift":n=e.shiftKey;break;case"ctrl":n=e.ctrlKey;break;default:n=!1}return n},kb=(i(78),i(161),i(125),i(79),i(30),i(12),i(13),i(14),i(47),new Uint8Array(16));function Tb(){if(!ls&&!(ls=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ls(kb)}for(var Ab=/^(?:[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,Mb=function(e){return typeof e=="string"&&Ab.test(e)},Qt=[],ps=0;ps<256;++ps)Qt.push((ps+256).toString(16).substr(1));var Db=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]).toLowerCase();if(!Mb(n))throw TypeError("Stringified UUID is invalid");return n},ds=function(e,t,n){var r=(e=e||{}).random||(e.rng||Tb)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return Db(r)},Rr=function(){return ds()},Nb=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.nodes.reduce(function(r,a){return r[a.id]=t+ds(),a.id=r[a.id],r},{});return e.edges.forEach(function(r){r.id=t+ds(),r.sourceNodeId=n[r.sourceNodeId],r.targetNodeId=n[r.targetNodeId]}),e},ai=(i(104),i(162),function(e,t,n){var r=e.x,a=e.y;return(r-t.x)*(r-n.x)<=0&&(a-t.y)*(a-n.y)<=0});function hs(e){return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function _p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Op(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_p(Object(n),!0).forEach(function(r){Cb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_p(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _e,wp,xp,Ep,Sp,jp,Pp,kp,Tp,Ap,Mp,Dp,Np,Cp,Rp,Ip,Lp,zp,Bp,Fp,Hp,ys=function(e){return e.anchors},ga=function(e,t){for(var n,r=t.nodes,a=r.length-1;a>=0;a--){var o=r[a];if(Ib(e,o)){var u=o.getTargetAnchor(e);if(u){var f={node:o,anchorIndex:u.index,anchor:u.anchor};n&&!Rb(o,n.node,t)||(n=f)}}}return n},Rb=function(e,t,n){return e.zIndex>t.zIndex||n.nodesMap[e.id].index>n.nodesMap[t.id].index},qn=function(e,t,n,r){return Math.hypot(e-n,t-r)},Ir=function(e,t){var n=!1,r=Sn(t);return e.x>=r.minX-0&&e.x<=r.maxX+0&&e.y>=r.minY-0&&e.y<=r.maxY+0&&(n=!0),n},Ib=function(e,t){var n=!1,r=Sn(t);return e.x>=r.minX-5&&e.x<=r.maxX+5&&e.y>=r.minY-5&&e.y<=r.maxY+5&&(n=!0),n},Sn=function(e){var t=e.x,n=e.y,r=e.width,a=e.height;return{minX:t-r/2,minY:n-a/2,maxX:t+r/2,maxY:n+a/2,x:t,y:n,width:r,height:a,centerX:t,centerY:n}},Xp=function(e,t,n){var r,a=function(u){var f=u,d=f.x,m=f.y,O=f.width,S=f.height,T=f.radius;return[{x:d-O/2+T,y:m-S/2+T,r:T},{x:d+O/2-T,y:m-S/2+T,r:T},{x:d-O/2+T,y:m+S/2-T,r:T},{x:d+O/2-T,y:m+S/2-T,r:T}]}(n),o=Number.MAX_SAFE_INTEGER;return a.forEach(function(u){var f=qn(e.x,e.y,u.x,u.y);f<o&&(o=f,r=u)}),gs(e,t,r)},gs=function(e,t,n){var r,a=n,o=a.x,u=a.y,f=a.r;if(t===At.HORIZONTAL){var d=o-Math.sqrt(f*f-(e.y-u)*(e.y-u)),m=o+Math.sqrt(f*f-(e.y-u)*(e.y-u));r={x:Math.abs(d-e.x)<Math.abs(m-e.x)?d:m,y:e.y}}else if(t===At.VERTICAL){var O=u-Math.sqrt(f*f-(e.x-o)*(e.x-o)),S=u+Math.sqrt(f*f-(e.x-o)*(e.x-o)),T=Math.abs(O-e.y)<Math.abs(S-e.y)?O:S;r={x:e.x,y:T}}return r},Gp=function(e,t){var n=t,r=!1,a=n.x-n.width/2+n.radius,o=n.x+n.width/2-n.radius,u=n.y-n.height/2+n.radius,f=n.y+n.height/2-n.radius,d=n.x,m=n.y,O=n.width,S=n.height;return e.y===m+S/2||e.y===m-S/2?r=e.x>a&&e.x<o:e.x!==d+O/2&&e.x!==d-O/2||(r=e.y>u&&e.y<f),r},Up=function(e,t,n){var r,a=n,o=a.x,u=a.y,f=a.rx,d=a.ry;if(t===At.HORIZONTAL){var m=o-Math.sqrt(f*f-(e.y-u)*(e.y-u)*f*f/(d*d)),O=o+Math.sqrt(f*f-(e.y-u)*(e.y-u)*f*f/(d*d));r={x:Math.abs(m-e.x)<Math.abs(O-e.x)?m:O,y:e.y}}else if(t===At.VERTICAL){var S=u-Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(f*f)),T=u+Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(f*f)),R=Math.abs(S-e.y)<Math.abs(T-e.y)?S:T;r={x:e.x,y:R}}return r},Yp=function(e,t,n){for(var r,a=n.pointsPosition,o=Number.MAX_SAFE_INTEGER,u=[],f=0;f<a.length;f++)u.push({start:a[f],end:a[(f+1)%a.length]});return u.forEach(function(d){var m=d.start,O=d.end,S=m,T=O;m.x>O.x&&(S=O,T=m);var R={x:e.x,y:e.y};if(S.x===T.x&&t===At.HORIZONTAL&&(R={x:S.x,y:e.y}),S.y===T.y&&t===At.VERTICAL&&(R={x:e.x,y:S.y}),S.x!==T.x&&S.y!==T.y){var U=(T.y-S.y)/(T.x-S.x),W=(S.x*T.y-T.x*S.y)/(S.x-T.x);t===At.HORIZONTAL?R={x:(e.y-W)/U,y:e.y}:t===At.VERTICAL&&(R={x:e.x,y:U*e.x+W})}if(ai(R,m,O)){var oe=qn(R.x,R.y,e.x,e.y);oe<o&&(o=oe,r=R)}}),r},Vp=function(e,t,n,r){var a=e.x,o=e.y;return t.x>e.x?a=e.x+n/2:t.x<e.x&&(a=e.x-n/2),t.y>e.y?o=e.y+r/2:t.y<e.y&&(o=e.y-r/2),{x:a,y:o}},Wp=function(e){var t=e.rows,n=e.style,r=e.rowsLength,a=e.className,o=document.createElement("div");o.style.fontSize=n.fontSize,o.style.width=n.width,o.className=a,o.style.lineHeight=n.lineHeight,o.style.padding=n.padding,n.fontFamily&&(o.style.fontFamily=n.fontFamily),r>1?t.forEach(function(f){var d=document.createElement("div");d.textContent=f,o.appendChild(d)}):o.textContent=t,document.body.appendChild(o);var u=o.clientHeight;return document.body.removeChild(o),u},vs=function(e){var t=e.rows,n=e.rowsLength,r=e.fontSize,a=0;return t&&t.forEach(function(o){var u=gd(o);a=u>a?u:a}),{width:Math.ceil(a/2)*r+r/4,height:n*(r+2)+r/4}},ui=function(e){return hs(e)!=="object"?{isAllPass:!!e,msg:e?"":"不允许连接"}:e},en=function(e){try{return JSON.parse(JSON.stringify(e))}catch{return e}},Lb=1e3,zb=999,bs=function(){return++Lb};function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$p(Object(n),!0).forEach(function(r){Nn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$p(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Bb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var ms=(_e=function(){function e(r,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),Nn(this,"id",""),Gt(this,"type",wp,this),Gt(this,"sourceNodeId",xp,this),Gt(this,"targetNodeId",Ep,this),Gt(this,"startPoint",Sp,this),Gt(this,"endPoint",jp,this),Gt(this,"text",Pp,this),Gt(this,"properties",kp,this),Gt(this,"points",Tp,this),Gt(this,"pointsList",Ap,this),Gt(this,"isSelected",Mp,this),Gt(this,"isHovered",Dp,this),Gt(this,"isHitable",Np,this),Gt(this,"draggable",Cp,this),Gt(this,"visible",Rp,this),Nn(this,"virtual",!1),Gt(this,"isAnimation",Ip,this),Gt(this,"isShowAdjustPoint",Lp,this),Nn(this,"graphModel",void 0),Gt(this,"zIndex",zp,this),Nn(this,"BaseType",Xt.EDGE),Nn(this,"modelType",ht.EDGE),Gt(this,"state",Bp,this),Nn(this,"additionStateData",void 0),Nn(this,"sourceAnchorId",""),Nn(this,"targetAnchorId",""),Nn(this,"menu",void 0),Nn(this,"customTextPosition",!1),Gt(this,"style",Fp,this),Gt(this,"arrowConfig",Hp,this),this.graphModel=a,this.initEdgeData(r),this.setAttributes()}var t,n;return t=e,n=[{key:"initEdgeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,o=a&&a(r.type),u=this.createId();r.id=u||o||Rr()}this.arrowConfig.markerEnd="url(#marker-end-".concat(r.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(r.id,")");var f=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=f,un(this,am(r)),this.graphModel.overlapMode===En.INCREASE&&(this.zIndex=r.zIndex||bs()),this.setAnchors(),this.initPoints(),this.formatText(r)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return gn(gn({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return gn({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.edgeText;return Dt(r)}},{key:"getEdgeAnimationStyle",value:function(){var r=this.graphModel.theme.edgeAnimation;return Dt(r)}},{key:"getArrowStyle",value:function(){var r=this.getEdgeStyle(),a=this.getEdgeAnimationStyle(),o=this.graphModel.theme.arrow,u=this.isAnimation?a.stroke:r.stroke;return gn(gn({},r),{},{fill:u,stroke:u},o)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Dt(r)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var r,a;return(r=this.graphModel)===null||r===void 0||(a=r.nodesMap[this.sourceNodeId])===null||a===void 0?void 0:a.model}},{key:"targetNode",get:function(){var r,a;return(r=this.graphModel)===null||r===void 0||(a=r.nodesMap[this.targetNodeId])===null||a===void 0?void 0:a.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(r,a){var o,u;return ys(r).forEach(function(f){var d=_d(f,a);(u===void 0||d<u)&&(u=d,o=f)}),o}},{key:"getEndAnchor",value:function(r){var a,o,u=this;return ys(r).forEach(function(f){var d=_d(f,u.startPoint);(o===void 0||d<o)&&(o=d,a=f)}),a}},{key:"getProperties",value:function(){return Object(c.I)(this.properties)}},{key:"getData",value:function(){var r=this.text,a=r.x,o=r.y,u=r.value,f={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(c.I)(this.properties)};return u&&(f.text={x:a,y:o,value:u}),this.graphModel.overlapMode===En.INCREASE&&(f.zIndex=this.zIndex),f}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(r,a){this.properties[r]=en(a),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=gn(gn({},Object(c.I)(this.properties)),en(r)),this.setAttributes()}},{key:"changeEdgeId",value:function(r){var a=this.arrowConfig,o=a.markerEnd,u=a.markerStart;u&&u==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(r,")")),o&&o==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(r,")")),this.id=r}},{key:"setStyle",value:function(r,a){this.style=gn(gn({},this.style),{},Nn({},r,en(a)))}},{key:"setStyles",value:function(r){this.style=gn(gn({},this.style),en(r))}},{key:"updateStyles",value:function(r){this.style=gn({},en(r))}},{key:"formatText",value:function(r){var a=this.textPosition,o=a.x,u=a.y;r.text&&typeof r.text!="string"?Object.prototype.toString.call(r.text)==="[object Object]"&&(this.text={x:r.text.x||o,y:r.text.y||u,value:r.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:r.text||"",x:o,y:u,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var r=this.textPosition,a=r.x,o=r.y;this.text.x=a,this.text.y=o}},{key:"moveText",value:function(r,a){if(this.text){var o=this.text,u=o.x,f=o.y,d=o.value,m=o.draggable,O=o.editable;this.text={value:d,draggable:m,x:u+r,y:f+a,editable:O}}}},{key:"setText",value:function(r){r&&un(this.text,r)}},{key:"updateText",value:function(r){this.text=gn(gn({},Object(c.I)(this.text)),{},{value:r})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var r=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:r.x,y:r.y}),this.sourceAnchorId||(this.sourceAnchorId=r.id)}if(!this.targetAnchorId||!this.endPoint){var a=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:a.x,y:a.y}),this.targetAnchorId||(this.targetAnchorId=a.id)}}},{key:"setSelected",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=r}},{key:"setHovered",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=r}},{key:"setHitable",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=r}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(r,a){this.state=r,this.additionStateData=a}},{key:"updateStartPoint",value:function(r){this.startPoint=r}},{key:"moveStartPoint",value:function(r,a){this.startPoint.x+=r,this.startPoint.y+=a}},{key:"updateEndPoint",value:function(r){this.endPoint=r}},{key:"moveEndPoint",value:function(r,a){this.endPoint.x+=r,this.endPoint.y+=a}},{key:"setZIndex",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.zIndex=r}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(r){un(this,r)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(r){var a=r.startPoint,o=r.endPoint;this.updateStartPoint({x:a.x,y:a.y}),this.updateEndPoint({x:o.x,y:o.y})}}],n&&Bb(t.prototype,n),e}(),wp=Qe(_e.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),xp=Qe(_e.prototype,"sourceNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ep=Qe(_e.prototype,"targetNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Sp=Qe(_e.prototype,"startPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),jp=Qe(_e.prototype,"endPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Pp=Qe(_e.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),kp=Qe(_e.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Tp=Qe(_e.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ap=Qe(_e.prototype,"pointsList",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Mp=Qe(_e.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dp=Qe(_e.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Np=Qe(_e.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Cp=Qe(_e.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Rp=Qe(_e.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ip=Qe(_e.prototype,"isAnimation",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Lp=Qe(_e.prototype,"isShowAdjustPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zp=Qe(_e.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Bp=Qe(_e.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Fp=Qe(_e.prototype,"style",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Hp=Qe(_e.prototype,"arrowConfig",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),Qe(_e.prototype,"sourceNode",[c.m],Object.getOwnPropertyDescriptor(_e.prototype,"sourceNode"),_e.prototype),Qe(_e.prototype,"targetNode",[c.m],Object.getOwnPropertyDescriptor(_e.prototype,"targetNode"),_e.prototype),Qe(_e.prototype,"textPosition",[c.m],Object.getOwnPropertyDescriptor(_e.prototype,"textPosition"),_e.prototype),Qe(_e.prototype,"setProperty",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setProperty"),_e.prototype),Qe(_e.prototype,"deleteProperty",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"deleteProperty"),_e.prototype),Qe(_e.prototype,"setProperties",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setProperties"),_e.prototype),Qe(_e.prototype,"changeEdgeId",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"changeEdgeId"),_e.prototype),Qe(_e.prototype,"setStyle",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setStyle"),_e.prototype),Qe(_e.prototype,"setStyles",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setStyles"),_e.prototype),Qe(_e.prototype,"updateStyles",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateStyles"),_e.prototype),Qe(_e.prototype,"formatText",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"formatText"),_e.prototype),Qe(_e.prototype,"resetTextPosition",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"resetTextPosition"),_e.prototype),Qe(_e.prototype,"moveText",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"moveText"),_e.prototype),Qe(_e.prototype,"setText",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setText"),_e.prototype),Qe(_e.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateText"),_e.prototype),Qe(_e.prototype,"setAnchors",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setAnchors"),_e.prototype),Qe(_e.prototype,"setSelected",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setSelected"),_e.prototype),Qe(_e.prototype,"setHovered",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setHovered"),_e.prototype),Qe(_e.prototype,"setHitable",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setHitable"),_e.prototype),Qe(_e.prototype,"openEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"openEdgeAnimation"),_e.prototype),Qe(_e.prototype,"closeEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"closeEdgeAnimation"),_e.prototype),Qe(_e.prototype,"setElementState",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setElementState"),_e.prototype),Qe(_e.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateStartPoint"),_e.prototype),Qe(_e.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"moveStartPoint"),_e.prototype),Qe(_e.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateEndPoint"),_e.prototype),Qe(_e.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"moveEndPoint"),_e.prototype),Qe(_e.prototype,"setZIndex",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"setZIndex"),_e.prototype),Qe(_e.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"initPoints"),_e.prototype),Qe(_e.prototype,"updateAttributes",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateAttributes"),_e.prototype),Qe(_e.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"getAdjustStart"),_e.prototype),Qe(_e.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"getAdjustEnd"),_e.prototype),Qe(_e.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateAfterAdjustStartAndEnd"),_e.prototype),_e),_s=ms;function Os(e){return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(e)}function Kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kp(Object(n),!0).forEach(function(r){Jp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ws(){return ws=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=Xb(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ws.apply(this,arguments)}function Xb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=wo(e))!==null;);return e}function xs(e,t){return xs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},xs(e,t)}function Gb(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=wo(e);if(t){var a=wo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){if(t&&(Os(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zp(e)}function Zp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wo(e){return wo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wo(e)}function Jp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var st,Qp,Es=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&xs(o,u)})(a,e);var t,n,r=Gb(a);function a(){var o;Fb(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Jp(Zp(o=r.call.apply(r,[this].concat(f))),"modelType",ht.LINE_EDGE),o}return t=a,(n=[{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.line;return qp(qp({},ws(wo(a.prototype),"getEdgeStyle",this).call(this)),Dt(o))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Hb(t.prototype,n),a}(_s);function Ss(e){return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(e)}function Yb(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return ed(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ed(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ed(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function td(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?td(Object(n),!0).forEach(function(r){Ps(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):td(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vb(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Wb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function si(){return si=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=Kb(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},si.apply(this,arguments)}function Kb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Lr(e))!==null;);return e}function js(e,t){return js=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},js(e,t)}function qb(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Lr(e);if(t){var a=Lr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Zb(this,n)}}function Zb(e,t){if(t&&(Ss(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ci(e)}function ci(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lr(e){return Lr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Lr(e)}function Ps(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var ks=(st=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&js(o,u)})(a,e);var t,n,r=qb(a);function a(){var o;Wb(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Ps(ci(o=r.call.apply(r,[this].concat(f))),"modelType",ht.POLYLINE_EDGE),Ps(ci(o),"draggingPointList",void 0),Vb(ci(o),"dbClickPosition",Qp,ci(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=30,si(Lr(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.polyline;return nd(nd({},si(Lr(a.prototype),"getEdgeStyle",this).call(this)),Dt(o))}},{key:"getTextPosition",value:function(){var o,u=(o=this.text)===null||o===void 0?void 0:o.value;if(this.dbClickPosition&&!u){var f=this.dbClickPosition;return{x:f.x,y:f.y}}var d=no(this.points),m=Yb(om(d),2),O=m[0],S=m[1];return{x:(O.x+S.x)/2,y:(O.y+S.y)/2}}},{key:"getAfterAnchor",value:function(o,u,f){var d,m;return f.forEach(function(O){var S;o===At.HORIZONTAL?S=Math.abs(u.y-O.y):o===At.VERTICAL&&(S=Math.abs(u.x-O.x)),(!m||m>S)&&(m=S,d=O)}),d}},{key:"getCrossPoint",value:function(o,u,f){var d;return o===At.HORIZONTAL?d={x:f.x,y:u.y}:o===At.VERTICAL&&(d={x:u.x,y:f.y}),d}},{key:"removeCrossPoints",value:function(o,u,f){var d=f.map(function(re){return re});if(o===1){var m=d[o],O=d[u],S=d[o-1];if(pd(S,m,this.sourceNode)){if(dd(m,O,this.sourceNode)){var T=hd(m,O,this.sourceNode);T&&(d[o]=T,d.splice(o-1,1),o--,u--)}}else this.sourceNode.anchors.forEach(function(re){(re.x===S.x&&re.x===m.x||re.y===S.y&&re.y===m.y)&&qn(re.x,re.y,m.x,m.y)<qn(S.x,S.y,m.x,m.y)&&(d[o-1]=re)})}if(u===f.length-2){var R=d[o],U=d[u],W=d[u+1];if(pd(U,W,this.targetNode)){if(dd(R,U,this.targetNode)){var oe=hd(R,U,this.targetNode);oe&&(d[u]=oe,d.splice(u+1,1))}}else this.targetNode.anchors.forEach(function(re){(re.x===W.x&&re.x===U.x||re.y===W.y&&re.y===U.y)&&qn(re.x,re.y,U.x,U.y)<qn(W.x,W.y,U.x,U.y)&&(d[u+1]=re)})}return d}},{key:"getDraggingPoints",value:function(o,u,f,d,m){var O=m.map(function(R){return R}),S=this.getAfterAnchor(o,f,d),T=this.getCrossPoint(o,f,S);return u==="start"?(O.unshift(T),O.unshift(S)):(O.push(T),O.push(S)),O}},{key:"updateCrossPoints",value:function(o){var u=o.map(function(me){return me}),f=o[0],d=o[1],m=o[u.length-2],O=o[u.length-1],S=this.sourceNode,T=this.targetNode,R=S.modelType,U=T.modelType,W=xa(f,d),oe=u[0];switch(R){case ht.RECT_NODE:S.radius!==0&&(Gp(f,S)||(oe=Xp(f,W,S)));break;case ht.CIRCLE_NODE:oe=gs(f,W,S);break;case ht.ELLIPSE_NODE:oe=Up(f,W,S);break;case ht.DIAMOND_NODE:case ht.POLYGON_NODE:oe=Yp(f,W,S)}u[0]=oe;var re=xa(m,O),de=u[u.length-1];switch(U){case ht.RECT_NODE:T.radius!==0&&(Gp(O,T)||(de=Xp(O,re,T)));break;case ht.CIRCLE_NODE:de=gs(O,re,T);break;case ht.ELLIPSE_NODE:de=Up(O,re,T);break;case ht.DIAMOND_NODE:case ht.POLYGON_NODE:de=Yp(O,re,T)}return u[u.length-1]=de,u}},{key:"getData",value:function(){var o=si(Lr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(f){return{x:f.x,y:f.y}});return Object.assign({},o,{pointsList:u})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(o){return"".concat(o.x,",").concat(o.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var o=fd({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=o,this.points=o.map(function(u){return"".concat(u.x,",").concat(u.y)}).join(" ")}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePoints()}},{key:"moveStartPoint",value:function(o,u){this.startPoint.x+=o,this.startPoint.y+=u,this.updatePoints()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"moveEndPoint",value:function(o,u){this.endPoint.x+=o,this.endPoint.y+=u,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map(function(o){return o})}},{key:"dragAppendSimple",value:function(o,u){this.isDragging=!0;var f=o.start,d=o.end,m=o.startIndex,O=o.endIndex,S=o.direction,T=this.pointsList,R=T;return S===At.HORIZONTAL?(T[m]={x:f.x,y:f.y+u.y},T[O]={x:d.x,y:d.y+u.y},R=this.pointsList.map(function(U){return U})):S===At.VERTICAL&&(T[m]={x:f.x+u.x,y:f.y},T[O]={x:d.x+u.x,y:d.y},R=this.pointsList.map(function(U){return U})),this.updatePointsAfterDrag(R),this.draggingPointList=R,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},T[m]),end:Object.assign({},T[O]),startIndex:m,endIndex:O,direction:S}}},{key:"dragAppend",value:function(o,u){this.isDragging=!0;var f=o.start,d=o.end,m=o.startIndex,O=o.endIndex,S=o.direction,T=this.pointsList;if(S===At.HORIZONTAL){T[m]={x:f.x,y:f.y+u.y},T[O]={x:d.x,y:d.y+u.y};var R=this.pointsList.map(function(Ae){return Ae});if(m!==0&&O!==this.pointsList.length-1&&(R=this.removeCrossPoints(m,O,R)),m===0){var U={x:f.x,y:f.y+u.y};if(!Ir(U,this.sourceNode)){var W=this.sourceNode.anchors;R=this.getDraggingPoints(S,"start",U,W,R)}}if(O===this.pointsList.length-1){var oe={x:d.x,y:d.y+u.y};if(!Ir(oe,this.targetNode)){var re=this.targetNode.anchors;R=this.getDraggingPoints(S,"end",oe,re,R)}}this.updatePointsAfterDrag(R),this.draggingPointList=R}else if(S===At.VERTICAL){T[m]={x:f.x+u.x,y:f.y},T[O]={x:d.x+u.x,y:d.y};var de=this.pointsList.map(function(Ae){return Ae});if(m!==0&&O!==this.pointsList.length-1&&(de=this.removeCrossPoints(m,O,de)),m===0){var me={x:f.x+u.x,y:f.y};if(!Ir(me,this.sourceNode)){var Te=this.sourceNode.anchors;de=this.getDraggingPoints(S,"start",me,Te,de)}}if(O===this.pointsList.length-1){var Ee={x:d.x+u.x,y:d.y};if(!Ir(Ee,this.targetNode)){var Xe=this.targetNode.anchors;de=this.getDraggingPoints(S,"end",Ee,Xe,de)}}this.updatePointsAfterDrag(de),this.draggingPointList=de}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},T[m]),end:Object.assign({},T[O]),startIndex:m,endIndex:O,direction:S}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var o=ld(no(this.points));this.pointsList=o.map(function(d){return d}),this.draggingPointList=[];var u=o[0];this.startPoint=Object.assign({},u);var f=o[o.length-1];this.endPoint=Object.assign({},f)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(o){var u=this.updateCrossPoints(o);this.points=u.map(function(f){return"".concat(f.x,",").concat(f.y)}).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var o=this.pointsList;return o[o.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(o){var u=o.startPoint,f=o.endPoint,d=o.sourceNode,m=o.targetNode,O=fd({x:u.x,y:u.y},{x:f.x,y:f.y},d,m,this.offset||0);this.pointsList=O,this.initPoints()}}])&&$b(t.prototype,n),a}(_s),Qp=sn(st.prototype,"dbClickPosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sn(st.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"initPoints"),st.prototype),sn(st.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePoints"),st.prototype),sn(st.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateStartPoint"),st.prototype),sn(st.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveStartPoint"),st.prototype),sn(st.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateEndPoint"),st.prototype),sn(st.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveEndPoint"),st.prototype),sn(st.prototype,"dragAppendStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendStart"),st.prototype),sn(st.prototype,"dragAppendSimple",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendSimple"),st.prototype),sn(st.prototype,"dragAppend",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppend"),st.prototype),sn(st.prototype,"dragAppendEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendEnd"),st.prototype),sn(st.prototype,"updatePointsAfterDrag",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePointsAfterDrag"),st.prototype),sn(st.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustStart"),st.prototype),sn(st.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustEnd"),st.prototype),sn(st.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateAfterAdjustStartAndEnd"),st.prototype),st),li=function(e){var t=e.start,n=e.end,r=e.offset,a=e.verticalLength,o=e.type,u={leftX:0,leftY:0,rightX:0,rightY:0},f=Math.atan((n.y-t.y)/(n.x-t.x)),d=Math.atan(r/a),m=Math.sqrt(a*a+r*r);return o==="start"?n.x>=t.x?(u.leftX=t.x+m*Math.sin(f+d),u.leftY=t.y-m*Math.cos(f+d),u.rightX=t.x-m*Math.sin(f-d),u.rightY=t.y+m*Math.cos(f-d)):(u.leftX=t.x-m*Math.sin(f+d),u.leftY=t.y+m*Math.cos(f+d),u.rightX=t.x+m*Math.sin(f-d),u.rightY=t.y-m*Math.cos(f-d)):o==="end"&&(n.x>=t.x?(u.leftX=n.x+m*Math.sin(f-d),u.leftY=n.y-m*Math.cos(f-d),u.rightX=n.x-m*Math.sin(f+d),u.rightY=n.y+m*Math.cos(f+d)):(u.leftX=n.x-m*Math.sin(f-d),u.leftY=n.y+m*Math.cos(f-d),u.rightX=n.x+m*Math.sin(f+d),u.rightY=n.y-m*Math.cos(f+d))),u},Jb={x:1,y:0,z:0};function rd(e){var t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t,z:0}}function Qb(e){return r=function(o,u){return o.x*u.y-o.y*u.x}(t=Jb,n=e),a=Math.acos(function(o,u){var f=[o.x,o.y,o.z];return[u.x,u.y,u.z].reduce(function(d,m,O){return d+m*f[O]})}(rd(t),rd(n))),r>=0?a:-a;var t,n,r,a}function od(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?od(Object(n),!0).forEach(function(r){em(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):od(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function em(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tm(e){return function(t){if(Array.isArray(t))return As(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||id(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ts(e){return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}function ba(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||id(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function id(e,t){if(e){if(typeof e=="string")return As(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?As(e,t):void 0}}function As(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ms=function(e){var t=[],n={};return e.forEach(function(r){var a="".concat(r.x,"-").concat(r.y);r.id=a,n[a]=r}),Object.keys(n).forEach(function(r){t.push(n[r])}),t},ma=function(e,t){return e.width===0&&e.height===0?e:{centerX:e.centerX,centerY:e.centerY,minX:e.minX-t,minY:e.minY-t,maxX:e.maxX+t,maxY:e.maxY+t,height:e.height+2*t,width:e.width+2*t}},_a=function(e,t,n){var r=function(a,o){var u=Math.abs(a.x-o.centerX),f=Math.abs(a.y-o.centerY);return u/o.width>f/o.height?At.HORIZONTAL:At.VERTICAL}(n,t);return r===At.HORIZONTAL?{x:n.x>e.centerX?e.maxX:e.minX,y:n.y}:{x:n.x,y:n.y>e.centerY?e.maxY:e.minY}},ad=function(e,t){var n=Math.min(e.minX,t.minX),r=Math.min(e.minY,t.minY),a=Math.max(e.maxX,t.maxX),o=Math.max(e.maxY,t.maxY);return{centerX:(n+a)/2,centerY:(r+o)/2,minX:n,minY:r,maxX:a,maxY:o,height:o-r,width:a-n}},fi=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[],r=[];e.forEach(function(O){n.push(O.x),r.push(O.y)});var a=Math.min.apply(Math,n),o=Math.max.apply(Math,n),u=Math.min.apply(Math,r),f=Math.max.apply(Math,r),d=o-a,m=f-u;return t&&(d+=t,m+=t),{centerX:(a+o)/2,centerY:(u+f)/2,maxX:o,maxY:f,minX:a,minY:u,x:(a+o)/2,y:(u+f)/2,height:m,width:d}},Oa=function(e){var t=e.minX,n=e.minY,r=e.maxX,a=e.maxY;return[{x:t,y:n},{x:r,y:n},{x:r,y:a},{x:t,y:a}]},wa=function(e,t){var n=e.x,r=e.y;return n<t.minX||n>t.maxX||r<t.minY||r>t.maxY},Ds=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},ud=function(e,t,n,r,a){return Ds(e,t)+Ds(e,n)+function(o,u){var f=0;return u.forEach(function(d){d&&(o.x===d.x&&(f+=-2),o.y===d.y&&(f+=-2))}),f}(e,[t,n,r,a])},nm=function e(t,n,r,a,o){o||(o=0),t.unshift(n[a]),r[a]&&r[a]!==a&&o<=100&&e(t,n,r,r[a],o+1)},pi=function(e,t,n,r){var a=t.x-e.x,o=t.y-e.y,u=r.x-n.x,f=r.y-n.y,d=(-o*(e.x-n.x)+a*(e.y-n.y))/(-u*o+a*f),m=(u*(e.y-n.y)-f*(e.x-n.x))/(-u*o+a*f);return d>=0&&d<=1&&m>=0&&m<=1},sd=function(e,t,n){if(n.width===0&&n.height===0)return!1;var r=ba(Oa(n),4),a=r[0],o=r[1],u=r[2],f=r[3];return pi(e,t,a,o)||pi(e,t,a,f)||pi(e,t,o,u)||pi(e,t,u,f)},rm=function(e,t,n,r,a,o,u){var f=[],d=[t],m={},O={},S={};O[t.id]=0,S[t.id]=ud(t,n,t);var T={};e.forEach(function(W){T[W.id]=W});for(var R=function(){var W,oe,re,de=void 0,me=1/0;if(d.forEach(function(Ee){S[Ee.id]<me&&(me=S[Ee.id],de=Ee)}),de===n){var Te=[];return nm(Te,T,m,n.id),{v:Te}}oe=de,(re=(W=d).indexOf(oe))>-1&&W.splice(re,1),f.push(de),function(Ee,Xe,Ae,Be){var Re=[];return Ee.forEach(function(lt){lt!==Xe&&(lt.x!==Xe.x&&lt.y!==Xe.y||sd(lt,Xe,Ae)||sd(lt,Xe,Be)||Re.push(lt))}),Ms(Re)}(e,de,r,a).forEach(function(Ee){if(f.indexOf(Ee)===-1){d.indexOf(Ee)===-1&&d.push(Ee);var Xe=S[de.id]+Ds(de,Ee);O[Ee.id]&&Xe>=O[Ee.id]||(m[Ee.id]=de.id,O[Ee.id]=Xe,S[Ee.id]=O[Ee.id]+ud(Ee,n,t,o,u))}})};d.length;){var U=R();if(Ts(U)==="object")return U.v}return[t,n]},cd=function(e){return Sn(e)},ld=function(e){for(var t=1;t<e.length-1;){var n=e[t-1],r=e[t],a=e[t+1];n.x===r.x&&r.x===a.x||n.y===r.y&&r.y===a.y?e.splice(t,1):t++}return e},fd=function(e,t,n,r,a){var o,u,f=cd(n),d=cd(r),m=ma(f,a),O=ma(d,a),S=_a(m,f,e),T=_a(O,d,t);if(o=m,u=O,2*Math.abs(o.centerX-u.centerX)<o.width+u.width&&2*Math.abs(o.centerY-u.centerY)<o.height+u.height){var R=im(e,t,S,T);return[e,S].concat(tm(R),[T,t])}var U=fi([S,T]),W=ad(m,U),oe=ad(O,U),re=[];re=(re=re.concat(Oa(W))).concat(Oa(oe));var de={x:(e.x+t.x)/2,y:(e.y+t.y)/2};[U,W,oe].forEach(function(Te){re=re.concat(function(Ee,Xe){return function(Ae,Be){return Be<Ae.minX||Be>Ae.maxX?[]:[{x:Be,y:Ae.minY},{x:Be,y:Ae.maxY}]}(Ee,Xe.x).concat(function(Ae,Be){return Be<Ae.minY||Be>Ae.maxY?[]:[{x:Ae.minX,y:Be},{x:Ae.maxX,y:Be}]}(Ee,Xe.y))}(Te,de).filter(function(Ee){return wa(Ee,m)&&wa(Ee,O)}))}),[{x:S.x,y:T.y},{x:T.x,y:S.y}].forEach(function(Te){wa(Te,m)&&wa(Te,O)&&re.push(Te)}),re.unshift(S),re.push(T),re=Ms(re);var me=rm(re,S,T,f,d,e,t);return me.unshift(e),me.push(t),me.length>2&&(me=ld(me)),Ms(me)},om=function(e){var t;if(e.length===1)t=[e[0],e[0]];else if(e.length>=2){for(var n=e[0],r=e[1],a=qn(n.x,n.y,r.x,r.y),o=1;o<e.length-1;o++){var u=e[o],f=e[o+1],d=qn(u.x,u.y,f.x,f.y);d>a&&(a=d,n=u,r=f)}t=[n,r]}return t},pd=function(e,t,n){var r=Ir(e,n),a=Ir(t,n);return r&&a},dd=function(e,t,n){var r=Ir(e,n),a=Ir(t,n);return!(r&&a)&&(r||a)},hd=function(e,t,n){for(var r,a,o=Sn(n),u=Oa(o),f=0;f<u.length;f++)pi(e,t,u[f],u[(f+1)%u.length])&&(a=[u[f],u[(f+1)%u.length]]);return a&&(r=function(d,m,O,S){var T=(m.y-d.y)*(S.x-O.x)-(d.x-m.x)*(O.y-S.y);if(T===0)return!1;var R=((m.x-d.x)*(S.x-O.x)*(O.y-d.y)+(m.y-d.y)*(S.x-O.x)*d.x-(S.y-O.y)*(m.x-d.x)*O.x)/T,U=-((m.y-d.y)*(S.y-O.y)*(O.x-d.x)+(m.x-d.x)*(S.y-O.y)*d.y-(S.x-O.x)*(m.y-d.y)*O.y)/T;return(R-d.x)*(R-m.x)<=0&&(U-d.y)*(U-m.y)<=0&&(R-O.x)*(R-S.x)<=0&&(U-O.y)*(U-S.y)<=0&&{x:R,y:U}}(e,t,a[0],a[1])),r},xa=function(e,t){var n;return e.x===t.x?n=At.VERTICAL:e.y===t.y&&(n=At.HORIZONTAL),n},no=function(e){var t=e.split(" "),n=[];return t&&t.forEach(function(r){var a=ba(r.split(","),2),o=a[0],u=a[1];n.push({x:Number(o),y:Number(u)})}),n},im=function(e,t,n,r){var a=[];if(xa(e,n)===xa(t,r))e.y===n.y?(a.push({x:n.x,y:(n.y+r.y)/2}),a.push({x:r.x,y:(n.y+r.y)/2})):(a.push({x:(n.x+r.x)/2,y:n.y}),a.push({x:(n.x+r.x)/2,y:r.y}));else{var o={x:n.x,y:r.y},u=ai(o,e,n),f=ai(o,t,r);if(u||f)o={x:r.x,y:n.y};else{var d=yd(o,e,n),m=yd(o,t,r);d&&m&&(o={x:r.x,y:n.y})}a.push(o)}return a},yd=function(e,t,n){return e.x===t.x&&e.x===n.x||e.y===t.y&&e.y===n.y},gd=function(e){if(!e)return 0;for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);e.match(/[A-Z]/)?t+=1.5:t+=r>=1&&r<=126||r>=65376&&r<=65439?1:2}return t},vd=function(e){var t=e.start,n=e.end,r=e.sourceNode,a=e.targetNode,o=e.offset,u=Sn(r),f=Sn(a),d=ma(u,o),m=ma(f,o);return{sNext:_a(d,u,t),ePre:_a(m,f,n)}},Ea=function(e){var t=e.replace(/M/g,"").replace(/C/g,",").split(",");return[Sa(t[0]),Sa(t[1]),Sa(t[2]),Sa(t[3])]},Sa=function(e){var t=ba(e.replace(/(^\s*)/g,"").split(" "),2);return{x:+t[0],y:+t[1]}},bd=function(e){var t=Ea(e),n=ba(t,4),r=function(a,o,u,f){return function(d){if(d<0||d>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:a.x*Math.pow(1-d,3)+3*o.x*d*Math.pow(1-d,2)+3*u.x*Math.pow(d,2)*(1-d)+f.x*Math.pow(d,3),y:a.y*Math.pow(1-d,3)+3*o.y*d*Math.pow(1-d,2)+3*u.y*Math.pow(d,2)*(1-d)+f.y*Math.pow(d,3)}}(.95)}(n[0],n[1],n[2],n[3]);return[r,t[3]]},md=function(e,t){for(var n,r=e.x,a=e.y,o=no(t),u=Number.MAX_SAFE_INTEGER,f=[],d=0;d<o.length;d++)f.push({start:o[d],end:o[(d+1)%o.length]});if(f.forEach(function(T){var R=T.start,U=T.end;if(R.x===U.x){var W={x:R.x,y:a};if(ai(W,R,U)){var oe=Math.abs(R.x-r);oe<u&&(u=oe,n=W)}}else if(R.y===U.y){var re={x:r,y:R.y};if(ai(re,R,U)){var de=Math.abs(R.y-a);de<u&&(u=de,n=re)}}}),!n){var m=f[0],O=m.start,S=m.end;n={x:O.x+(S.x-O.x)/2,y:O.y+(S.y-O.y)/2}}return n},am=function(e){return oi(e,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},_d=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))};i(204);var xo=function(){};function um(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zn=window.document;function sm(e){var t=e.onDragStart,n=t===void 0?xo:t,r=e.onDragging,a=r===void 0?xo:r,o=e.onDragEnd,u=o===void 0?xo:o,f=e.step,d=f===void 0?1:f,m=e.isStopPropagation,O=m===void 0||m,S=!1,T=!1,R=0,U=0,W=0,oe=0;function re(me){if(O&&me.stopPropagation(),T&&(S=!0,W+=me.clientX-R,oe+=me.clientY-U,R=me.clientX,U=me.clientY,Math.abs(W)>d||Math.abs(oe)>d)){var Te=W%d,Ee=oe%d,Xe=W-Te,Ae=oe-Ee;W=Te,oe=Ee,a({deltaX:Xe,deltaY:Ae,event:me})}}function de(me){if(O&&me.stopPropagation(),T=!1,Zn.removeEventListener("mousemove",re,!1),Zn.removeEventListener("mouseup",de,!1),S)return S=!1,u({event:me})}return function(me){if(me.button===0)return O&&me.stopPropagation(),T=!0,R=me.clientX,U=me.clientY,Zn.addEventListener("mousemove",re,!1),Zn.addEventListener("mouseup",de,!1),n({event:me})}}var fe,Od,wd,xd,Ed,Sd,jd,Pd,kd,Td,Ad,Md,Dd,yr=function(){function e(r){var a=this,o=r.onDragStart,u=o===void 0?xo:o,f=r.onDragging,d=f===void 0?xo:f,m=r.onDragEnd,O=m===void 0?xo:m,S=r.eventType,T=S===void 0?"":S,R=r.eventCenter,U=R===void 0?null:R,W=r.step,oe=W===void 0?1:W,re=r.isStopPropagation,de=re===void 0||re,me=r.model,Te=me===void 0?null:me,Ee=r.data,Xe=Ee===void 0?null:Ee;(function(Ae,Be){if(!(Ae instanceof Be))throw new TypeError("Cannot call a class as a function")})(this,e),Ut(this,"onDragStart",void 0),Ut(this,"onDragging",void 0),Ut(this,"onDragEnd",void 0),Ut(this,"step",void 0),Ut(this,"isStopPropagation",void 0),Ut(this,"isDragging",!1),Ut(this,"isStartDragging",!1),Ut(this,"startX",0),Ut(this,"startY",0),Ut(this,"sumDeltaX",0),Ut(this,"sumDeltaY",0),Ut(this,"eventType",void 0),Ut(this,"eventCenter",void 0),Ut(this,"model",void 0),Ut(this,"data",void 0),Ut(this,"startTime",void 0),Ut(this,"handleMouseDown",function(Ae){var Be,Re;if(Ae.button===0){a.isStopPropagation&&Ae.stopPropagation(),a.isStartDragging=!0,a.startX=Ae.clientX,a.startY=Ae.clientY,Zn.addEventListener("mousemove",a.handleMouseMove,!1),Zn.addEventListener("mouseup",a.handleMouseUp,!1);var lt=(Be=a.model)===null||Be===void 0?void 0:Be.getData();(Re=a.eventCenter)===null||Re===void 0||Re.emit(tt["".concat(a.eventType,"_MOUSEDOWN")],{e:Ae,data:a.data||lt}),a.startTime=new Date().getTime()}}),Ut(this,"handleMouseMove",function(Ae){if(a.isStopPropagation&&Ae.stopPropagation(),a.isStartDragging&&(a.sumDeltaX+=Ae.clientX-a.startX,a.sumDeltaY+=Ae.clientY-a.startY,a.startX=Ae.clientX,a.startY=Ae.clientY,a.step<=1||Math.abs(a.sumDeltaX)>a.step||Math.abs(a.sumDeltaY)>a.step)){var Be,Re=a.sumDeltaX%a.step,lt=a.sumDeltaY%a.step,Et=a.sumDeltaX-Re,mt=a.sumDeltaY-lt;a.sumDeltaX=Re,a.sumDeltaY=lt;var jt,Ft=(Be=a.model)===null||Be===void 0?void 0:Be.getData();a.isDragging||((jt=a.eventCenter)===null||jt===void 0||jt.emit(tt["".concat(a.eventType,"_DRAGSTART")],{e:Ae,data:a.data||Ft}),a.onDragStart({event:Ae})),a.isDragging=!0,Promise.resolve().then(function(){var Wt,fn;a.onDragging({deltaX:Et,deltaY:mt,event:Ae}),(Wt=a.eventCenter)===null||Wt===void 0||Wt.emit(tt["".concat(a.eventType,"_MOUSEMOVE")],{e:Ae,data:a.data||Ft}),(fn=a.eventCenter)===null||fn===void 0||fn.emit(tt["".concat(a.eventType,"_DRAG")],{e:Ae,data:a.data||Ft})})}}),Ut(this,"handleMouseUp",function(Ae){a.isStartDragging=!1,a.isStopPropagation&&Ae.stopPropagation(),Promise.resolve().then(function(){var Be,Re,lt;Zn.removeEventListener("mousemove",a.handleMouseMove,!1),Zn.removeEventListener("mouseup",a.handleMouseUp,!1);var Et=(Be=a.model)===null||Be===void 0?void 0:Be.getData();(Re=a.eventCenter)===null||Re===void 0||Re.emit(tt["".concat(a.eventType,"_MOUSEUP")],{e:Ae,data:a.data||Et}),a.isDragging&&(a.isDragging=!1,a.onDragEnd({event:Ae}),(lt=a.eventCenter)===null||lt===void 0||lt.emit(tt["".concat(a.eventType,"_DROP")],{e:Ae,data:a.data||Et}))})}),Ut(this,"cancelDrag",function(){Zn.removeEventListener("mousemove",a.handleMouseMove,!1),Zn.removeEventListener("mouseup",a.handleMouseUp,!1),a.onDragEnd({event:null}),a.isDragging=!1}),this.onDragStart=u,this.onDragging=d,this.onDragEnd=O,this.step=oe,this.isStopPropagation=de,this.eventType=T,this.eventCenter=U,this.model=Te,this.data=Xe}var t,n;return t=e,(n=[{key:"setStep",value:function(r){this.step=r}}])&&um(t.prototype,n),e}(),Nd={node:!1,edge:!1},cm={node:!0,edge:!0};function Cd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cd(Object(n),!0).forEach(function(r){Jn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function di(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||Rd(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Eo(e){return function(t){if(Array.isArray(t))return Ns(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Rd(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Rd(e,t){if(e){if(typeof e=="string")return Ns(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ns(e,t):void 0}}function Ns(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pa(e){return Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pa(e)}function Cn(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function lm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Id,Ld=200,zd=(fe=function(){function e(r){(function(U,W){if(!(U instanceof W))throw new TypeError("Cannot call a class as a function")})(this,e),Jn(this,"rootEl",void 0),Cn(this,"width",Od,this),Cn(this,"height",wd,this),Jn(this,"theme",void 0),Jn(this,"eventCenter",void 0),Jn(this,"modelMap",new Map),Jn(this,"topElement",void 0),Jn(this,"animation",void 0),Jn(this,"idGenerator",void 0),Jn(this,"edgeGenerator",void 0),Jn(this,"nodeMoveRules",[]),Cn(this,"edgeType",xd,this),Cn(this,"nodes",Ed,this),Cn(this,"edges",Sd,this),Cn(this,"overlapMode",jd,this),Cn(this,"background",Pd,this),Cn(this,"transformModel",kd,this),Cn(this,"editConfigModel",Td,this),Cn(this,"gridSize",Ad,this),Cn(this,"partial",Md,this),Cn(this,"fakerNode",Dd,this);var a,o,u,f=r.container,d=r.background,m=d===void 0?{}:d,O=r.grid,S=r.idGenerator,T=r.edgeGenerator,R=r.animation;this.background=m,Pa(O)==="object"&&(this.gridSize=O.size),this.rootEl=f,this.editConfigModel=new Wf(r),this.eventCenter=new Pb,this.transformModel=new Vv(this.eventCenter),this.theme=gp(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=(a=R)&&typeof a!="boolean"?yp(Dt(Nd),a):Dt(a===!0?cm:Nd),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=S,this.edgeGenerator=(o=this,typeof(u=T)!="function"?function(U,W,oe){return Object.assign({type:o.edgeType},oe)}:function(U,W,oe){var re=u(U,W,oe);return re?typeof re=="string"?Object.assign({},oe,{type:re}):Object.assign({type:re},oe):{type:o.edgeType}}),this.width=r.width||this.rootEl.getBoundingClientRect().width,this.height=r.height||this.rootEl.getBoundingClientRect().height,this.flowId=Rr()}var t,n;return t=e,n=[{key:"nodesMap",get:function(){return this.nodes.reduce(function(r,a,o){return r[a.id]={index:o,model:a},r},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(r,a,o){return r[a.id]={index:o,model:a},r},{})}},{key:"modelsMap",get:function(){return[].concat(Eo(this.nodes),Eo(this.edges)).reduce(function(r,a){return r[a.id]=a,r},{})}},{key:"sortElements",get:function(){var r=[];this.nodes.forEach(function(m){return r.push(m)}),this.edges.forEach(function(m){return r.push(m)}),r=r.sort(function(m,O){return m.zIndex-O.zIndex});for(var a=[],o=[-200,-200],u=[this.width+Ld,this.height+Ld],f=0;f<r.length;f++){var d=r[f];d.visible&&(!this.partial||d.isSelected||this.isElementInArea(d,o,u,!1,!1))&&a.push(d)}return a}},{key:"textEditElement",get:function(){var r=this.nodes.find(function(o){return o.state===Ot.TEXT_EDIT}),a=this.edges.find(function(o){return o.state===Ot.TEXT_EDIT});return r||a}},{key:"selectElements",get:function(){var r=new Map;return this.nodes.forEach(function(a){a.isSelected&&r.set(a.id,a)}),this.edges.forEach(function(a){a.isSelected&&r.set(a.id,a)}),r}},{key:"selectNodes",get:function(){var r=[];return this.nodes.forEach(function(a){a.isSelected&&r.push(a)}),r}},{key:"getAreaElement",value:function(r,a){var o=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],f=arguments.length>4&&arguments[4]!==void 0&&arguments[4],d=[],m=[];this.nodes.forEach(function(T){return m.push(T)}),this.edges.forEach(function(T){return m.push(T)});for(var O=0;O<m.length;O++){var S=m[O];f&&!S.visible||!this.isElementInArea(S,r,a,o,u)||d.push(S)}return d}},{key:"getModel",value:function(r){return this.modelMap.get(r)}},{key:"getNodeModelById",value:function(r){var a;return this.fakerNode&&r===this.fakerNode.id?this.fakerNode:(a=this.nodesMap[r])===null||a===void 0?void 0:a.model}},{key:"getPointByClient",value:function(r){var a=r.x,o=r.y,u=this.rootEl.getBoundingClientRect(),f={x:a-u.left,y:o-u.top},d=di(this.transformModel.HtmlPointToCanvasPoint([f.x,f.y]),2);return{domOverlayPosition:f,canvasOverlayPosition:{x:d[0],y:d[1]}}}},{key:"isElementInArea",value:function(r,a,o){var u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],f=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(r.BaseType===Xt.NODE){for(var d=Sn(r=r),m=d.minX,O=d.minY,S=d.maxX,T=d.maxY,R=[{x:m,y:O},{x:S,y:O},{x:S,y:T},{x:m,y:T}],U=f,W=0;W<R.length;W++){var oe=R[W],re=oe.x,de=oe.y,me=this.transformModel.CanvasPointToHtmlPoint([re,de]),Te=di(me,2);if(re=Te[0],de=Te[1],fs([re,de],a,o)!==f){U=!f;break}}return U}if(r.BaseType===Xt.EDGE){var Ee=r=r,Xe=Ee.startPoint,Ae=Ee.endPoint,Be=this.transformModel.CanvasPointToHtmlPoint([Xe.x,Xe.y]),Re=this.transformModel.CanvasPointToHtmlPoint([Ae.x,Ae.y]),lt=fs(Be,a,o),Et=fs(Re,a,o);return u?lt&&Et:lt||Et}return!1}},{key:"graphDataToModel",value:function(r){var a=this;if(this.width&&this.height||this.resize(),!r)return this.nodes=[],void(this.edges=[]);r.nodes?this.nodes=pa(r.nodes,function(o){var u=a.getModel(o.type);if(!u)throw new Error("找不到".concat(o.type,"对应的节点。"));var f=o.x,d=o.y;return f&&d&&(o.x=Cr(f,a.gridSize),o.y=Cr(d,a.gridSize),Pa(o.text)==="object"&&(o.text.x-=vp(f,a.gridSize),o.text.y-=vp(d,a.gridSize))),new u(o,a)}):this.nodes=[],r.edges?this.edges=pa(r.edges,function(o){var u=a.getModel(o.type);if(!u)throw new Error("找不到".concat(o.type,"对应的边。"));return new u(o,a)}):this.edges=[]}},{key:"modelToGraphData",value:function(){var r=[];this.edges.forEach(function(o){var u=o.getData();u&&!o.virtual&&r.push(u)});var a=[];return this.nodes.forEach(function(o){var u=o.getData();u&&!o.virtual&&a.push(u)}),{nodes:a,edges:r}}},{key:"modelToHistoryData",value:function(){for(var r=!1,a=[],o=0;o<this.nodes.length;o++){var u=this.nodes[o];if(u.isDragging){r=!0;break}a.push(u.getHistoryData())}if(r)return!1;for(var f=!1,d=[],m=0;m<this.edges.length;m++){var O=this.edges[m];if(O.isDragging){f=!0;break}d.push(O.getHistoryData())}return!f&&{nodes:a,edges:d}}},{key:"getEdgeModelById",value:function(r){var a;return(a=this.edgesMap[r])===null||a===void 0?void 0:a.model}},{key:"getElement",value:function(r){return this.modelsMap[r]}},{key:"getNodeEdges",value:function(r){for(var a=[],o=0;o<this.edges.length;o++){var u=this.edges[o],f=this.edges[o].sourceNodeId===r,d=this.edges[o].targetNodeId===r;(f||d)&&a.push(u)}return a}},{key:"getSelectElements",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],a=this.selectElements,o={nodes:[],edges:[]};return a.forEach(function(u){if(u.BaseType===Xt.NODE&&o.nodes.push(u.getData()),u.BaseType===Xt.EDGE){var f=u.getData(),d=a.get(f.sourceNodeId)&&a.get(f.targetNodeId);(r||d)&&o.edges.push(f)}}),o}},{key:"updateAttributes",value:function(r,a){this.getElement(r).updateAttributes(a)}},{key:"changeNodeId",value:function(r,a){return a||(a=Rr()),this.nodesMap[a]?"":this.nodesMap[r]?(this.edges.forEach(function(o){o.sourceNodeId===r&&(o.sourceNodeId=a),o.targetNodeId===r&&(o.targetNodeId=a)}),this.nodesMap[r].model.id=a,this.nodesMap[a]=this.nodesMap[r],a):""}},{key:"changeEdgeId",value:function(r,a){return a||(a=Rr()),this.edgesMap[a]?"":this.edgesMap[r]?(this.edges.forEach(function(o){o.id===r&&o.changeEdgeId(a)}),a):""}},{key:"setFakerNode",value:function(r){this.fakerNode=r}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(r,a){return this.modelMap.set(r,a)}},{key:"toFront",value:function(r){var a,o,u,f=((a=this.nodesMap[r])===null||a===void 0?void 0:a.model)||((o=this.edgesMap[r])===null||o===void 0?void 0:o.model);f&&(this.overlapMode===En.DEFAULT&&((u=this.topElement)===null||u===void 0||u.setZIndex(),f.setZIndex(9999),this.topElement=f),this.overlapMode===En.INCREASE&&this.setElementZIndex(r,"top"))}},{key:"setElementZIndex",value:function(r,a){var o,u,f,d=((o=this.nodesMap[r])===null||o===void 0?void 0:o.model)||((u=this.edgesMap[r])===null||u===void 0?void 0:u.model);d&&(typeof a=="number"&&(f=a),a==="top"&&(f=bs()),a==="bottom"&&(f=--zb),d.setZIndex(f))}},{key:"deleteNode",value:function(r){var a=this.nodesMap[r].model.getData();this.deleteEdgeBySource(r),this.deleteEdgeByTarget(r),this.nodes.splice(this.nodesMap[r].index,1),this.eventCenter.emit(tt.NODE_DELETE,{data:a})}},{key:"addNode",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt.NODE_ADD,o=arguments.length>2?arguments[2]:void 0,u=en(r);u.id&&this.nodesMap[r.id]&&delete u.id;var f=this.getModel(u.type);if(!f)throw new Error("找不到".concat(u.type,"对应的节点,请确认是否已注册此类型节点。"));u.x=Cr(u.x,this.gridSize),u.y=Cr(u.y,this.gridSize);var d=new f(u,this);this.nodes.push(d);var m=d.getData(),O={data:m};return o&&(O.e=o),this.eventCenter.emit(a,O),d}},{key:"cloneNode",value:function(r){var a=this.getNodeModelById(r),o=a.getData();o.x+=30,o.y+=30,delete o.id,o.text&&(o.text.x+=30,o.text.y+=30);var u=this.addNode(o);return u.setSelected(!0),a.setSelected(!1),u.getData()}},{key:"moveNode",value:function(r,a,o){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],f=this.nodesMap[r];if(f){var d=f.model,m=d.getMoveDistance(a,o,u),O=di(m,2);a=O[0],o=O[1],this.moveEdge(r,a,o)}}},{key:"moveNode2Coordinate",value:function(r,a,o){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],f=this.nodesMap[r];if(f){var d=f.model,m=d.x,O=d.y,S=a-m,T=o-O;this.moveNode(r,S,T,u)}}},{key:"editText",value:function(r){this.setElementStateById(r,Ot.TEXT_EDIT)}},{key:"addEdge",value:function(r){var a=en(r),o=a.type;o||(o=this.edgeType),a.id&&this.edgesMap[a.id]&&delete a.id;var u=this.getModel(o);if(!u)throw new Error("找不到".concat(o,"对应的边,请确认是否已注册此类型边。"));var f=new u(ja(ja({},a),{},{type:o}),this),d=f.getData();return this.edges.push(f),this.eventCenter.emit(tt.EDGE_ADD,{data:d}),f}},{key:"moveEdge",value:function(r,a,o){for(var u=0;u<this.edges.length;u++){var f=this.edges[u],d=f.textPosition,m=d.x,O=d.y,S=this.edges[u].sourceNodeId===r,T=this.edges[u].targetNodeId===r;S&&f.moveStartPoint(a,o),T&&f.moveEndPoint(a,o),(S||T)&&this.handleEdgeTextMove(f,m,O)}}},{key:"handleEdgeTextMove",value:function(r,a,o){var u;if(r.customTextPosition===!0)r.resetTextPosition();else if(r.modelType===ht.POLYLINE_EDGE&&(u=r.text)!==null&&u!==void 0&&u.value){var f=r.text,d=md(f,r.points);r.moveText(d.x-f.x,d.y-f.y)}else{var m=r.textPosition,O=m.x,S=m.y;r.moveText(O-a,S-o)}}},{key:"deleteEdgeBySourceAndTarget",value:function(r,a){for(var o=0;o<this.edges.length;o++)if(this.edges[o].sourceNodeId===r&&this.edges[o].targetNodeId===a){var u=this.edges[o].getData();this.edges.splice(o,1),o--,this.eventCenter.emit(tt.EDGE_DELETE,{data:u})}}},{key:"deleteEdgeById",value:function(r){if(this.edgesMap[r]){var a=this.edgesMap[r].index,o=this.edgesMap[r].model.getData();this.edges.splice(a,1),this.eventCenter.emit(tt.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeBySource",value:function(r){for(var a=0;a<this.edges.length;a++)if(this.edges[a].sourceNodeId===r){var o=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(tt.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeByTarget",value:function(r){for(var a=0;a<this.edges.length;a++)if(this.edges[a].targetNodeId===r){var o=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(tt.EDGE_DELETE,{data:o})}}},{key:"setElementStateById",value:function(r,a,o){this.nodes.forEach(function(u){u.id===r?u.setElementState(a,o):u.setElementState(Ot.DEFAULT)}),this.edges.forEach(function(u){u.id===r?u.setElementState(a,o):u.setElementState(Ot.DEFAULT)})}},{key:"updateText",value:function(r,a){this.nodes.forEach(function(o){o.id===r&&o.updateText(a)}),this.edges.forEach(function(o){o.id===r&&o.updateText(a)})}},{key:"selectNodeById",value:function(r){var a,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];o||this.clearSelectElements();var u=(a=this.nodesMap[r])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectEdgeById",value:function(r){var a,o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];o||this.clearSelectElements();var u=(a=this.edgesMap[r])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectElementById",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a||this.clearSelectElements();var o=this.getElement(r);o==null||o.setSelected(!0)}},{key:"clearSelectElements",value:function(){var r;this.selectElements.forEach(function(a){a==null||a.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===En.DEFAULT&&((r=this.topElement)===null||r===void 0||r.setZIndex())}},{key:"moveNodes",value:function(r,a,o){for(var u=this,f=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=r.reduce(function(Te,Ee){var Xe=u.nodesMap[Ee].model.getMoveDistance(a,o,f);return Te[Ee]=Xe,Te},{}),m=0;m<this.edges.length;m++){var O=this.edges[m],S=O.textPosition,T=S.x,R=S.y,U=d[O.sourceNodeId],W=void 0,oe=void 0;if(U){var re=di(U,2);W=re[0],oe=re[1],O.moveStartPoint(W,oe)}var de=d[O.targetNodeId];if(de){var me=di(de,2);W=me[0],oe=me[1],O.moveEndPoint(W,oe)}(U||de)&&this.handleEdgeTextMove(O,T,R)}}},{key:"addNodeMoveRules",value:function(r){this.nodeMoveRules.includes(r)||this.nodeMoveRules.push(r)}},{key:"setDefaultEdgeType",value:function(r){this.edgeType=r}},{key:"changeNodeType",value:function(r,a){var o=this.getNodeModelById(r);if(o){var u=o.getData();u.type=a;var f=this.getModel(a);if(!f)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));var d=new f(u,this);this.nodes.splice(this.nodesMap[r].index,1,d),this.getNodeEdges(r).forEach(function(m){if(m.sourceNodeId===r){var O=Vp(d,m.startPoint,d.width,d.height);m.updateStartPoint(O)}if(m.targetNodeId===r){var S=Vp(d,m.endPoint,d.width,d.height);m.updateEndPoint(S)}})}}},{key:"changeEdgeType",value:function(r,a){var o=this.getEdgeModelById(r);if(o&&o.type!==a){var u=o.getData();u.type=a;var f=this.getModel(a);if(!f)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));delete u.pointsList;var d=new f(u,this);this.edges.splice(this.edgesMap[r].index,1,d)}}},{key:"getNodeIncomingEdge",value:function(r){var a=[];return this.edges.forEach(function(o){o.targetNodeId===r&&a.push(o)}),a}},{key:"getNodeOutgoingEdge",value:function(r){var a=[];return this.edges.forEach(function(o){o.sourceNodeId===r&&a.push(o)}),a}},{key:"getNodeIncomingNode",value:function(r){var a=this,o=[];return this.edges.forEach(function(u){u.targetNodeId===r&&o.push(a.nodesMap[u.sourceNodeId].model)}),o}},{key:"getNodeOutgoingNode",value:function(r){var a=this,o=[];return this.edges.forEach(function(u){u.sourceNodeId===r&&o.push(a.nodesMap[u.targetNodeId].model)}),o}},{key:"setTheme",value:function(r){this.theme=gp(ja(ja({},this.theme),r))}},{key:"resize",value:function(r,a){this.width=r||this.rootEl.getBoundingClientRect().width,this.height=a||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var r=this.nodes,a=[],o=[];r.forEach(function(S){var T=S.x,R=S.y,U=S.width,W=S.height,oe=S.getNodeStyle().strokeWidth,re=oe===void 0?0:oe;a=a.concat([T+U/2+re,T-U/2-re]),o=o.concat([R+W/2+re,R-W/2-re])});var u=Math.min.apply(Math,Eo(a)),f=Math.max.apply(Math,Eo(a)),d=Math.min.apply(Math,Eo(o)),m=f-u||0,O=Math.max.apply(Math,Eo(o))-d||0;return{virtualRectWidth:m,virtualRectHeight:O,virtualRectCenterPositionX:u+m/2,virtualRectCenterPositionY:d+O/2}}},{key:"translateCenter",value:function(){var r=this.nodes,a=this.width,o=this.height,u=this.rootEl,f=this.transformModel;if(r.length){var d=a||u.clientWidth,m=o||u.clientHeight,O=this.getVirtualRectSize(),S=O.virtualRectCenterPositionX,T=O.virtualRectCenterPositionY;f.focusOn(S,T,d,m)}}},{key:"fitView",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,o=this.nodes,u=this.width,f=this.height,d=this.rootEl,m=this.transformModel;if(o.length){var O=u||d.clientWidth,S=f||d.clientHeight,T=this.getVirtualRectSize(),R=T.virtualRectWidth,U=T.virtualRectHeight,W=T.virtualRectCenterPositionX,oe=T.virtualRectCenterPositionY,re=(R+a)/O,de=(U+r)/S,me=0;me=1/Math.max(re,de);var Te=[O/2,S/2];m.zoom(me,Te),m.focusOn(W,oe,O,S)}}},{key:"openEdgeAnimation",value:function(r){this.getEdgeModelById(r).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(r){this.getEdgeModelById(r).closeEdgeAnimation()}}],n&&lm(t.prototype,n),e}(),Od=We(fe.prototype,"width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),wd=We(fe.prototype,"height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xd=We(fe.prototype,"edgeType",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ed=We(fe.prototype,"nodes",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Sd=We(fe.prototype,"edges",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),jd=We(fe.prototype,"overlapMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return En.DEFAULT}}),Pd=We(fe.prototype,"background",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kd=We(fe.prototype,"transformModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Td=We(fe.prototype,"editConfigModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ad=We(fe.prototype,"gridSize",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Md=We(fe.prototype,"partial",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dd=We(fe.prototype,"fakerNode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),We(fe.prototype,"nodesMap",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"nodesMap"),fe.prototype),We(fe.prototype,"edgesMap",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"edgesMap"),fe.prototype),We(fe.prototype,"modelsMap",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"modelsMap"),fe.prototype),We(fe.prototype,"sortElements",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"sortElements"),fe.prototype),We(fe.prototype,"textEditElement",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"textEditElement"),fe.prototype),We(fe.prototype,"selectElements",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"selectElements"),fe.prototype),We(fe.prototype,"selectNodes",[c.m],Object.getOwnPropertyDescriptor(fe.prototype,"selectNodes"),fe.prototype),We(fe.prototype,"setFakerNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setFakerNode"),fe.prototype),We(fe.prototype,"removeFakerNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"removeFakerNode"),fe.prototype),We(fe.prototype,"setModel",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setModel"),fe.prototype),We(fe.prototype,"toFront",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"toFront"),fe.prototype),We(fe.prototype,"setElementZIndex",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setElementZIndex"),fe.prototype),We(fe.prototype,"deleteNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteNode"),fe.prototype),We(fe.prototype,"addNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"addNode"),fe.prototype),We(fe.prototype,"cloneNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"cloneNode"),fe.prototype),We(fe.prototype,"moveNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveNode"),fe.prototype),We(fe.prototype,"moveNode2Coordinate",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveNode2Coordinate"),fe.prototype),We(fe.prototype,"editText",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"editText"),fe.prototype),We(fe.prototype,"addEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"addEdge"),fe.prototype),We(fe.prototype,"moveEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveEdge"),fe.prototype),We(fe.prototype,"deleteEdgeBySourceAndTarget",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeBySourceAndTarget"),fe.prototype),We(fe.prototype,"deleteEdgeById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeById"),fe.prototype),We(fe.prototype,"deleteEdgeBySource",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeBySource"),fe.prototype),We(fe.prototype,"deleteEdgeByTarget",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"deleteEdgeByTarget"),fe.prototype),We(fe.prototype,"setElementStateById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setElementStateById"),fe.prototype),We(fe.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"updateText"),fe.prototype),We(fe.prototype,"selectNodeById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"selectNodeById"),fe.prototype),We(fe.prototype,"selectEdgeById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"selectEdgeById"),fe.prototype),We(fe.prototype,"selectElementById",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"selectElementById"),fe.prototype),We(fe.prototype,"clearSelectElements",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"clearSelectElements"),fe.prototype),We(fe.prototype,"moveNodes",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"moveNodes"),fe.prototype),We(fe.prototype,"setDefaultEdgeType",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setDefaultEdgeType"),fe.prototype),We(fe.prototype,"changeNodeType",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"changeNodeType"),fe.prototype),We(fe.prototype,"changeEdgeType",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"changeEdgeType"),fe.prototype),We(fe.prototype,"getNodeIncomingEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeIncomingEdge"),fe.prototype),We(fe.prototype,"getNodeOutgoingEdge",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeOutgoingEdge"),fe.prototype),We(fe.prototype,"getNodeIncomingNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeIncomingNode"),fe.prototype),We(fe.prototype,"getNodeOutgoingNode",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"getNodeOutgoingNode"),fe.prototype),We(fe.prototype,"setTheme",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"setTheme"),fe.prototype),We(fe.prototype,"resize",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"resize"),fe.prototype),We(fe.prototype,"clearData",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"clearData"),fe.prototype),We(fe.prototype,"translateCenter",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"translateCenter"),fe.prototype),We(fe.prototype,"fitView",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"fitView"),fe.prototype),We(fe.prototype,"openEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"openEdgeAnimation"),fe.prototype),We(fe.prototype,"closeEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(fe.prototype,"closeEdgeAnimation"),fe.prototype),fe),fm=zd;function Cs(e){return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function Rs(){return Rs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rs.apply(this,arguments)}function pm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Is(e,t){return Is=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Is(e,t)}function dm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ka(e);if(t){var a=ka(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return hm(this,n)}}function hm(e,t){if(t&&(Cs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qn(e)}function Qn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ka(e)}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bd,ym=Xn(Id=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Is(o,u)})(a,e);var t,n,r=dm(a);function a(o){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),gr(Qn(u=r.call(this)),"stepDrag",void 0),gr(Qn(u),"stepScrollX",0),gr(Qn(u),"stepScrollY",0),gr(Qn(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY;u.setState({isDragging:!0});var R=u.props.graphModel,U=R.transformModel;R.editConfigModel.stopMoveGraph||U.translate(S,T)}),gr(Qn(u),"onDragEnd",function(){u.setState({isDragging:!1})}),gr(Qn(u),"zoomHandler",function(O){var S=u.props,T=S.graphModel,R=T.editConfigModel,U=T.transformModel,W=T.gridSize,oe=S.graphModel,re=O.deltaX,de=O.deltaY;if(R.stopScrollGraph||O.ctrlKey===!0){if(!R.stopZoomGraph){O.preventDefault();var me=oe.getPointByClient({x:O.clientX,y:O.clientY}).canvasOverlayPosition,Te=me.x,Ee=me.y;U.zoom(O.deltaY<0,[Te,Ee])}}else{if(O.preventDefault(),u.stepScrollX+=re,u.stepScrollY+=de,Math.abs(u.stepScrollX)>=W){var Xe=u.stepScrollX%W,Ae=u.stepScrollX-Xe;U.translate(-Ae*U.SCALE_X,0),u.stepScrollX=Xe}if(Math.abs(u.stepScrollY)>=W){var Be=u.stepScrollY%W,Re=u.stepScrollY-Be;U.translate(0,-Re*U.SCALE_Y),u.stepScrollY=Be}}}),gr(Qn(u),"clickHandler",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){var S=u.props.graphModel;S.selectElements.size>0&&S.clearSelectElements(),S.eventCenter.emit(tt.BLANK_CLICK,{e:O})}}),gr(Qn(u),"handleContextMenu",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){O.preventDefault();var S=u.props.graphModel,T=S.getPointByClient({x:O.clientX,y:O.clientY});S.eventCenter.emit(tt.BLANK_CONTEXTMENU,{e:O,position:T})}}),gr(Qn(u),"mouseDownHandler",function(O){var S=u.props.graphModel,T=S.eventCenter,R=S.editConfigModel,U=S.transformModel.SCALE_X,W=S.gridSize,oe=O.target,re=!R.adjustEdge&&!R.adjustNodePosition;(oe.getAttribute("name")==="canvas-overlay"||re)&&(R.stopMoveGraph?T.emit(tt.BLANK_MOUSEDOWN,{e:O}):(u.stepDrag.setStep(W*U),u.stepDrag.handleMouseDown(O)),u.clickHandler(O))});var f=o.graphModel,d=f.gridSize,m=f.eventCenter;return u.stepDrag=new yr({onDragging:u.onDragging,onDragEnd:u.onDragEnd,step:d,eventType:"BLANK",isStopPropagation:!1,eventCenter:m,model:null}),u.state={isDragging:!1},u}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props,f=u.children,d=u.dnd,m=this.state.isDragging;return Object(te.g)("svg",Rs({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:m?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},d.eventMap()),Object(te.g)("g",{transform:o},f))}}])&&pm(t.prototype,n),a}(te.a))||Id;function Ls(e){return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}function gm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zs(e,t){return zs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},zs(e,t)}function bm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ta(e);if(t){var a=Ta(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return mm(this,n)}}function mm(e,t){if(t&&(Ls(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ta(e){return Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(e)}var _m=Xn(Bd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&zs(o,u)})(a,e);var t,n,r=bm(a);function a(){return gm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var o=this.props,u=o.tool,f=o.graphModel,d=u.getTools().map(function(m){return Object(te.g)(m,{graphModel:f,logicFlow:u.instance})});return u.components=d,d}},{key:"triggerToolRender",value:function(){var o=this.props,u=o.tool,f=o.graphModel,d=document.querySelector("#ToolOverlay_".concat(f.flowId)),m=u.getInstance();m.components.forEach(function(O){return O(m,d)}),m.components=[]}},{key:"render",value:function(){var o=this.props.graphModel;return Object(te.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(o.flowId)},this.getTools())}}])&&vm(t.prototype,n),a}(te.a))||Bd;function Bs(e){return Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bs(e)}function Om(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fs(e,t){return Fs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Fs(e,t)}function xm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Aa(e);if(t){var a=Aa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Em(this,n)}}function Em(e,t){if(t&&(Bs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Aa(e){return Aa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Aa(e)}var Fd,Sm=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Fs(o,u)})(a,e);var t,n,r=xm(a);function a(){return Om(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.background;return Object(te.g)("div",{className:"lf-background"},Object(te.g)("div",{style:o,className:"lf-background-area"}))}}])&&wm(t.prototype,n),a}(te.a);function Hs(e){return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hs(e)}function jm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xs(e,t){return Xs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Xs(e,t)}function km(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ma(e);if(t){var a=Ma(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Tm(this,n)}}function Tm(e,t){if(t&&(Hs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hd(e)}function Hd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ma(e)}function Am(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xd=Xn(Fd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Xs(o,u)})(a,e);var t,n,r=km(a);function a(){var o;jm(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Am(Hd(o=r.call.apply(r,[this].concat(f))),"id",Rr()),o}return t=a,(n=[{key:"renderDot",value:function(){var o=this.props,u=o.config,f=u.color,d=u.thickness,m=d===void 0?2:d,O=o.size,S=o.visible,T=Math.min(Math.max(2,m),O/2),R=1;return S||(R=0),Object(te.g)("rect",{width:T,height:T,rx:T/2,ry:T/2,fill:f,opacity:R})}},{key:"renderMesh",value:function(){var o=this.props,u=o.config,f=u.color,d=u.thickness,m=d===void 0?1:d,O=o.size,S=o.visible,T=Math.min(Math.max(1,m),O/2),R="M ".concat(O," 0 H0 M0 0 V0 ").concat(O),U=1;return S||(U=0),Object(te.g)("path",{d:R,stroke:f,strokeWidth:T,opacity:U})}},{key:"render",value:function(){var o=this.props,u=o.type,f=o.size,d=o.graphModel.transformModel,m=[d.SCALE_X,d.SKEW_Y,d.SKEW_X,d.SCALE_Y,d.TRANSLATE_X,d.TRANSLATE_Y].join(","),O="matrix(".concat(m,")");return Object(te.g)("div",{className:"lf-grid"},Object(te.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(te.g)("defs",null,Object(te.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:O,x:"0",y:"0",width:f,height:f},u==="dot"&&this.renderDot(),u==="mesh"&&this.renderMesh())),Object(te.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&Pm(t.prototype,n),a}(te.a))||Fd;Xd.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},i(52);function Gs(e){return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function Mm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Gd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Gd(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ud,So=function(e){var t={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(n){var r=Mm(n,2),a=r[0],o=r[1];(a==="style"||Gs(o)!=="object")&&(t[a]=o)}),Object(te.g)("line",t)};function Us(e){return Us=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Us(e)}function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(n),!0).forEach(function(r){Dm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ys(e,t){return Ys=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ys(e,t)}function Rm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Na(e);if(t){var a=Na(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Im(this,n)}}function Im(e,t){if(t&&(Us(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Na(e){return Na=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Na(e)}var Vd,Lm=Xn(Ud=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Ys(o,u)})(a,e);var t,n,r=Rm(a);function a(){return Nm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.snaplineModel,u=o.position,f=o.isShowHorizontal,d=o.isShowVertical,m=o.getStyle(),O=u.x,S=O===void 0?0:O,T=u.y,R=T===void 0?0:T,U=Da(Da({x1:-1e5,y1:R,x2:1e5,y2:R},m),{},{stroke:f?m.stroke:"none"}),W=Da(Da({x1:S,y1:-1e5,x2:S,y2:1e5},m),{},{stroke:d?m.stroke:"none"});return Object(te.g)("g",{className:"lf-snapline"},Object(te.g)(So,U),Object(te.g)(So,W))}}])&&Cm(t.prototype,n),a}(te.a))||Ud;function Vs(e){return Vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function zm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Wd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Wd(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Wd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zr(e){var t=e.x,n=e.y,r=e.width,a=e.height,o=e.className,u=e.radius,f=t-r/2,d=n-a/2,m={};return Object.entries(e).forEach(function(O){var S=zm(O,2),T=S[0],R=S[1];Vs(R)!=="object"&&(m[T]=R)}),m.className=o?"lf-basic-shape ".concat(o):"lf-basic-shape",u&&(m.rx=u,m.ry=u),m.x=f,m.y=d,Object(te.g)("rect",m)}function Ws(e){return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ws(e)}function jo(){return jo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jo.apply(this,arguments)}function $d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Kd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$d(Object(n),!0).forEach(function(r){Bm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$d(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $s(e,t){return $s=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$s(e,t)}function Xm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ca(e);if(t){var a=Ca(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Gm(this,n)}}function Gm(e,t){if(t&&(Ws(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}zr.defaultProps={className:"",radius:""};var qd,Um=Xn(Vd=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&$s(o,u)})(a,e);var t,n,r=Xm(a);function a(){return Fm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getNodesOutline",value:function(){var o=this.props.graphModel,u=o.nodes,f=o.editConfigModel,d=f.hoverOutline,m=f.nodeSelectedOutline,O=[];return u.forEach(function(S){if(S.isHovered||S.isSelected){var T=S.isHovered,R=S.isSelected,U=S.x,W=S.y,oe=S.width,re=S.height;if(m&&R||d&&T){var de=S.getOutlineStyle(),me={};if(Object.keys(de).forEach(function(Ee){Ee!=="hover"&&(me[Ee]=de[Ee])}),T){var Te=de.hover;me=Kd(Kd({},me),Te)}O.push(Object(te.g)(zr,jo({className:"lf-outline-node",x:U,y:W,width:oe+10,height:re+10},me)))}}}),O}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,u=o.edges,f=o.editConfigModel,d=f.edgeSelectedOutline,m=f.hoverOutline,O=[],S=0;S<u.length;S++){var T=u[S];(d&&T.isSelected||m&&T.isHovered)&&(T.modelType===ht.LINE_EDGE?O.push(this.getLineOutline(T)):T.modelType===ht.POLYLINE_EDGE?O.push(this.getPolylineOutline(T)):T.modelType===ht.BEZIER_EDGE&&O.push(this.getBezierOutline(T)))}return O}},{key:"getLineOutline",value:function(o){var u=o.startPoint,f=o.endPoint,d=(u.x+f.x)/2,m=(u.y+f.y)/2,O=Math.abs(u.x-f.x)+10,S=Math.abs(u.y-f.y)+10,T=o.getOutlineStyle();return Object(te.g)(zr,jo({className:"lf-outline-edge",x:d,y:m,width:O,height:S},T))}},{key:"getPolylineOutline",value:function(o){var u=o.points,f=no(u),d=fi(f,8),m=d.x,O=d.y,S=d.width,T=d.height,R=o.getOutlineStyle();return Object(te.g)(zr,jo({className:"lf-outline",x:m,y:O,width:S,height:T},R))}},{key:"getBezierOutline",value:function(o){var u=o.path,f=Ea(u),d=fi(f,8),m=d.x,O=d.y,S=d.width,T=d.height,R=o.getOutlineStyle();return Object(te.g)(zr,jo({className:"lf-outline",x:m,y:O,width:S,height:T},R))}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&Hm(t.prototype,n),a}(te.a))||Vd;function Ks(e){return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function Ym(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Zd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Zd(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Zd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hi(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,o=e.r,u=o===void 0?4:o,f=e.className,d={cx:n,cy:a,r:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(m){var O=Ym(m,2),S=O[0],T=O[1];Ks(T)!=="object"&&(d[S]=T)}),d.className=f?"lf-basic-shape ".concat(f):"lf-basic-shape",Object(te.g)("circle",d)}function qs(e){return qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qs(e)}function Vm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Jd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Jd(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Jd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yi(){return yi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yi.apply(this,arguments)}function Qd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function th(e,t,n){return t&&eh(e.prototype,t),n&&eh(e,n),e}function nh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zs(e,t)}function Zs(e,t){return Zs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zs(e,t)}function rh(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ia(e);if(t){var a=Ia(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Wm(this,n)}}function Wm(e,t){if(t&&(qs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ra(e)}function Ra(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ia(e){return Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ia(e)}function Js(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oh,ih=function(e){nh(n,e);var t=rh(n);function n(){var r;return Qd(this,n),Js(Ra(r=t.call(this)),"dragHandler",void 0),Js(Ra(r),"onDragging",function(a){var o=a.event,u=r.props,f=u.graphModel,d=u.bezierModel,m=u.type,O=f.getPointByClient({x:o.clientX,y:o.clientY}).canvasOverlayPosition,S=O.x,T=O.y;d.updateAdjustAnchor({x:S,y:T},m)}),Js(Ra(r),"onDragEnd",function(){r.props.bezierModel.isDragging=!1}),r.dragHandler=new yr({onDragging:r.onDragging,onDragEnd:r.onDragEnd}),r}return th(n,[{key:"render",value:function(){var r=this,a=this.props.position,o=a.x,u=a.y,f=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(te.g)(hi,yi({className:"lf-bezier-adjust-anchor",x:o,y:u},f,{onMouseDown:function(d){r.dragHandler.handleMouseDown(d)}}))}}]),n}(te.a),$m=Xn(qd=function(e){nh(n,e);var t=rh(n);function n(){return Qd(this,n),t.apply(this,arguments)}return th(n,[{key:"getBezierAdjust",value:function(r,a){var o=r.path,u=r.id,f=Vm(Ea(o),4),d=f[0],m=f[1],O=f[2],S=f[3],T=r.getEdgeStyle().adjustLine,R=[];return R.push(Object(te.g)(So,yi({x1:d.x,y1:d.y,x2:m.x,y2:m.y},T))),R.push(Object(te.g)(ih,{position:m,bezierModel:r,graphModel:a,key:"".concat(u,"_ePre"),type:"sNext"})),R.push(Object(te.g)(So,yi({x1:S.x,y1:S.y,x2:O.x,y2:O.y},T))),R.push(Object(te.g)(ih,{position:O,bezierModel:r,graphModel:a,key:"".concat(u,"_sNext"),type:"ePre"})),R}},{key:"selectedBezierEdge",value:function(){for(var r=this.props.graphModel,a=r.edges,o=[],u=0;u<a.length;u++){var f=a[u];f.isSelected&&f.modelType===ht.BEZIER_EDGE&&f.draggable&&o.push(this.getBezierAdjust(f,r))}return o}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(te.a))||qd;function Qs(e){return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(e)}function Km(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ec(e,t){return ec=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ec(e,t)}function Zm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=La(e);if(t){var a=La(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Jm(this,n)}}function Jm(e,t){if(t&&(Qs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function La(e){return La=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},La(e)}var ah,Qm=Xn(oh=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&ec(o,u)})(a,e);var t,n,r=Zm(a);function a(){return Km(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props.children;return Object(te.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(te.g)("g",{transform:o},u))}}])&&qm(t.prototype,n),a}(te.a))||oh;function tc(e){return tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tc(e)}function nc(){return nc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nc.apply(this,arguments)}function e0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rc(e,t){return rc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},rc(e,t)}function n0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=za(e);if(t){var a=za(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return r0(this,n)}}function r0(e,t){if(t&&(tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function za(e){return za=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},za(e)}var o0=Xn(ah=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&rc(o,u)})(a,e);var t,n,r=n0(a);function a(){return e0(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getComponent",value:function(o,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",d=this.props.getView,m=d(o.type);return Object(te.g)(m,{key:o.id,model:o,graphModel:u,overlay:f})}},{key:"render",value:function(){var o=this,u=this.props,f=u.graphModel,d=u.tool,m=u.options,O=u.dnd,S=u.snaplineModel,T={};m.width&&(T.width="".concat(f.width,"px")),m.height&&(T.height="".concat(f.height,"px"));var R=m.grid,U=f.fakerNode,W=f.editConfigModel.adjustEdge;return Object(te.g)("div",{className:"lf-graph","flow-id":f.flowId,style:T},Object(te.g)(ym,{graphModel:f,dnd:O},Object(te.g)("g",{className:"lf-base"},pa(f.sortElements,function(oe){return o.getComponent(oe,f)})),U?this.getComponent(U,f):""),Object(te.g)(Qm,{graphModel:f},Object(te.g)(Um,{graphModel:f}),W?Object(te.g)($m,{graphModel:f}):"",m.snapline!==!1?Object(te.g)(Lm,{snaplineModel:S}):""),Object(te.g)(_m,{graphModel:f,tool:d}),m.background&&Object(te.g)(Sm,{background:m.background}),m.grid&&Object(te.g)(Xd,nc({},R,{graphModel:f})))}}],n&&t0(t.prototype,n),a}(te.a))||ah,i0=o0;function uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(n),!0).forEach(function(r){vr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u0=function(){function e(r){var a=this;(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),vr(this,"nodeConfig",void 0),vr(this,"lf",void 0),vr(this,"fakerNode",void 0),vr(this,"stopDrag",function(){a.nodeConfig=null,window.document.removeEventListener("mouseup",a.stopDrag)}),vr(this,"dragEnter",function(u){a.nodeConfig&&!a.fakerNode&&(a.fakerNode=a.lf.createFakerNode(Ba(Ba({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY}))))}),vr(this,"onDragOver",function(u){if(u.preventDefault(),a.fakerNode){var f=a.clientToLocalPoint({x:u.clientX,y:u.clientY}),d=f.x,m=f.y;a.fakerNode.moveTo(d,m);var O=a.fakerNode.getData();a.lf.setNodeSnapLine(O),a.lf.graphModel.eventCenter.emit(tt.NODE_DND_DRAG,{data:O})}return!1}),vr(this,"onDragLeave",function(){a.fakerNode&&(a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)}),vr(this,"onDrop",function(u){a.lf.graphModel&&u&&a.nodeConfig&&(a.lf.addNode(Ba(Ba({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY})),tt.NODE_DND_ADD,u),u.preventDefault(),u.stopPropagation(),a.nodeConfig=null,a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)});var o=r.lf;this.lf=o}var t,n;return t=e,(n=[{key:"clientToLocalPoint",value:function(r){var a=r.x,o=r.y,u=_f(this.lf.options,["grid","size"]),f=this.lf.graphModel.getPointByClient({x:a,y:o}).canvasOverlayPosition,d=f.x,m=f.y;return{x:Cr(d,u),y:Cr(m,u)}}},{key:"startDrag",value:function(r){this.nodeConfig=r,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}}}])&&a0(t.prototype,n),e}();function sh(e){var t=e.container,n=e.grid,r=e.width,a=e.height;if(!t)throw new Error("请检查 container 参数是否有效");if(typeof r=="string"||typeof a=="string")throw new Error("width或height不支持传入字符串请传数字");return n&&(e.grid=un({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),un({},lh,e)}var bt,ch,lh={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function oc(e){return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(e)}function ic(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return fh(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return fh(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(n),!0).forEach(function(r){dh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ph(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s0(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function c0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gi(){return gi=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=f0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},gi.apply(this,arguments)}function f0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Br(e))!==null;);return e}function ac(e,t){return ac=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ac(e,t)}function p0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Br(e);if(t){var a=Br(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return d0(this,n)}}function d0(e,t){if(t&&(oc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ha(e)}function Ha(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Br(e){return Br=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Br(e)}function dh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bn(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var uc=(bt=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&ac(o,u)})(a,e);var t,n,r=p0(a);function a(){var o;c0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return dh(Ha(o=r.call.apply(r,[this].concat(f))),"modelType",ht.BEZIER_EDGE),s0(Ha(o),"path",ch,Ha(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=100,gi(Br(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.bezier;return Fa(Fa({},gi(Br(a.prototype),"getEdgeStyle",this).call(this)),Dt(o))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var o=0,u=0;return this.pointsList.forEach(function(f){var d=f.x,m=f.y;o+=d,u+=m}),{x:o/this.pointsList.length,y:u/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 o=gi(Br(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(f){return{x:f.x,y:f.y}});return Fa(Fa({},o),{},{pointsList:u})}},{key:"getControls",value:function(){var o=this.startPoint,u=this.endPoint;return vd({start:o,end:u,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(o){var u=ic(o,4),f=u[0],d=u[1],m=u[2],O=u[3];return"M ".concat(f.x," ").concat(f.y,`
C `).concat(d.x," ").concat(d.y,`,
`).concat(m.x," ").concat(m.y,`,
`).concat(O.x," ").concat(O.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var o=this.getControls(),u=o.sNext,f=o.ePre;this.updatePath(u,f)}},{key:"updatePath",value:function(o,u){o=Dt(o),u=Dt(u);var f={x:this.startPoint.x,y:this.startPoint.y},d={x:this.endPoint.x,y:this.endPoint.y};if(!o||!u){var m=this.getControls();o=m.sNext,u=m.ePre}this.pointsList=[f,o,u,d],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePoints()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"moveStartPoint",value:function(o,u){this.startPoint.x+=o,this.startPoint.y+=u;var f=ic(this.pointsList,3),d=f[1],m=f[2];d.x+=o,d.y+=u,this.updatePath(d,m)}},{key:"moveEndPoint",value:function(o,u){this.endPoint.x+=o,this.endPoint.y+=u;var f=ic(this.pointsList,3),d=f[1],m=f[2];m.x+=o,m.y+=u,this.updatePath(d,m)}},{key:"updateAdjustAnchor",value:function(o,u){u==="sNext"?this.pointsList[1]=o:u==="ePre"&&(this.pointsList[2]=o),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 o=this.pointsList;return o[o.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(o){var u=o.startPoint,f=o.endPoint,d=o.sourceNode,m=o.targetNode,O=vd({start:u,end:f,sourceNode:d,targetNode:m,offset:this.offset}),S=O.sNext,T=O.ePre;this.pointsList=[u,S,T,f],this.initPoints()}}])&&l0(t.prototype,n),a}(_s),ch=Bn(bt.prototype,"path",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Bn(bt.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"initPoints"),bt.prototype),Bn(bt.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updatePoints"),bt.prototype),Bn(bt.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateStartPoint"),bt.prototype),Bn(bt.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateEndPoint"),bt.prototype),Bn(bt.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveStartPoint"),bt.prototype),Bn(bt.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveEndPoint"),bt.prototype),Bn(bt.prototype,"updateAdjustAnchor",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAdjustAnchor"),bt.prototype),Bn(bt.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustStart"),bt.prototype),Bn(bt.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustEnd"),bt.prototype),Bn(bt.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAfterAdjustStartAndEnd"),bt.prototype),bt),Ne,hh,yh,gh,vh,bh,mh,_h,Oh,wh,xh,Eh,Sh,jh,Ph,kh,Th,Ah,Mh,Dh,h0=function(e){return e==null};function sc(e){return sc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sc(e)}function y0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(d,m){if(d){if(typeof d=="string")return Nh(d,m);var O=Object.prototype.toString.call(d).slice(8,-1);if(O==="Object"&&d.constructor&&(O=d.constructor.name),O==="Map"||O==="Set")return Array.from(d);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return Nh(d,m)}}(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(d){throw d},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,u=!0,f=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return u=d.done,d},e:function(d){f=!0,o=d},f:function(){try{u||n.return==null||n.return()}finally{if(f)throw o}}}}function Nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ch(Object(n),!0).forEach(function(r){vn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ch(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function g0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pt(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var br,Rh,mr=(Ne=function(){function e(r,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),vn(this,"id",""),Vt(this,"type",hh,this),Vt(this,"x",yh,this),Vt(this,"y",gh,this),Vt(this,"text",vh,this),Vt(this,"properties",bh,this),Vt(this,"_width",mh,this),Vt(this,"_height",_h,this),Vt(this,"anchorsOffset",Oh,this),Vt(this,"isSelected",wh,this),Vt(this,"isHovered",xh,this),Vt(this,"isShowAnchor",Eh,this),Vt(this,"isDragging",Sh,this),Vt(this,"isHitable",jh,this),Vt(this,"draggable",Ph,this),Vt(this,"visible",kh,this),vn(this,"virtual",!1),vn(this,"graphModel",void 0),Vt(this,"zIndex",Th,this),Vt(this,"state",Ah,this),Vt(this,"autoToFront",Mh,this),Vt(this,"style",Dh,this),vn(this,"BaseType",Xt.NODE),vn(this,"modelType",ht.NODE),vn(this,"additionStateData",void 0),vn(this,"targetRules",[]),vn(this,"sourceRules",[]),vn(this,"moveRules",[]),vn(this,"hasSetTargetRules",!1),vn(this,"hasSetSourceRules",!1),this.graphModel=a,this.initNodeData(r),this.setAttributes()}var t,n;return t=e,n=[{key:"width",get:function(){return this._width},set:function(r){this._width=r}},{key:"height",get:function(){return this._height},set:function(r){this._height=r}},{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(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,o=a&&a(r.type),u=this.createId();r.id=u||o||Rr()}this.formatText(r),un(this,function(f){return oi(f,["id","type","x","y","text","properties","virtual"])}(r)),this.graphModel.overlapMode===En.INCREASE&&(this.zIndex=r.zIndex||bs())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(r){r.text||(r.text={value:"",x:r.x,y:r.y,draggable:!1,editable:!0}),r.text&&typeof r.text=="string"?r.text={value:r.text,x:r.x,y:r.y,draggable:!1,editable:!0}:r.text&&r.text.editable===void 0&&(r.text.editable=!0)}},{key:"getData",value:function(){var r=this.text,a=r.x,o=r.y,u=r.value,f=this.properties;Object(c.x)(f)&&(f=Object(c.I)(f));var d={id:this.id,type:this.type,x:this.x,y:this.y,properties:f};return this.graphModel.overlapMode===En.INCREASE&&(d.zIndex=this.zIndex),u&&(d.text={x:a,y:o,value:u}),d}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(c.I)(this.properties)}},{key:"getNodeStyle",value:function(){return cn(cn({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.nodeText;return Dt(r)}},{key:"getAnchorStyle",value:function(r){var a=this.graphModel.theme.anchor;return Dt(a)}},{key:"getAnchorLineStyle",value:function(r){var a=this.graphModel.theme.anchorLine;return Dt(a)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Dt(r)}},{key:"isAllowConnectedAsSource",value:function(r,a,o,u){var f=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var d,m=!0,O=0;O<f.length;O++){var S=f[O];if(!S.validate.call(this,this,r,a,o,u)){m=!1,d=S.message;break}}return{isAllPass:m,msg:d}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(r,a,o,u){var f=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var d,m=!0,O=0;O<f.length;O++){var S=f[O];if(!S.validate.call(this,r,this,a,o,u)){m=!1,d=S.message;break}}return{isAllPass:m,msg:d}}},{key:"isAllowMoveNode",value:function(r,a){var o,u=!0,f=!0,d=y0(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(d.s();!(o=d.n()).done;){var m=(0,o.value)(this,r,a);if(!m)return!1;if(sc(m)==="object"){var O=m;if(O.x===!1&&O.y===!1)return!1;u=u&&O.x,f=f&&O.y}}}catch(S){d.e(S)}finally{d.f()}return{x:u,y:f}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var r=this.anchorsOffset,a=this.id,o=this.x,u=this.y;return r&&r.length>0?r.map(function(f,d){return f.length?(f=f,{id:"".concat(a,"_").concat(d),x:o+f[0],y:u+f[1]}):cn(cn({},f=f),{},{x:o+f.x,y:u+f.y,id:f.id||"".concat(a,"_").concat(d)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(r){return function(a,o){for(var u,f=ys(o),d=Number.MAX_SAFE_INTEGER,m=0;m<f.length;m++){var O=qn(a.x,a.y,f[m].x,f[m].y);O<d&&(d=O,u={index:m,anchor:Op(Op({},f[m]),{},{x:f[m].x,y:f[m].y,id:f[m].id})})}return u}(r,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(){return this.getAnchorsByOffset()}},{key:"getAnchorInfo",value:function(r){if(!h0(r))for(var a=0;a<this.anchors.length;a++){var o=this.anchors[a];if(o.id===r)return o}}},{key:"addNodeMoveRules",value:function(r){this.moveRules.includes(r)||this.moveRules.push(r)}},{key:"move",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,f=!1;if(o)u=!0,f=!0;else{var d=this.isAllowMoveNode(r,a);typeof d=="boolean"?(u=d,f=d):(u=d.x,f=d.y)}if(u){var m=this.x+r;this.x=m,this.text&&this.moveText(r,0)}if(f){var O=this.y+a;this.y=O,this.text&&this.moveText(0,a)}return u||f}},{key:"getMoveDistance",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,f=!1,d=0,m=0;if(o)u=!0,f=!0;else{var O=this.isAllowMoveNode(r,a);typeof O=="boolean"?(u=O,f=O):(u=O.x,f=O.y)}if(u&&r){var S=this.x+r;this.x=S,this.text&&this.moveText(r,0),d=r}if(f&&a){var T=this.y+a;this.y=T,this.text&&this.moveText(0,a),m=a}return[d,m]}},{key:"moveTo",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=r-this.x,f=a-this.y;return!(!o&&!this.isAllowMoveNode(u,f)||(this.text&&this.text&&this.moveText(u,f),this.x=r,this.y=a,0))}},{key:"moveText",value:function(r,a){var o=this.text,u=o.x,f=o.y,d=o.value,m=o.draggable,O=o.editable;this.text={value:d,editable:O,draggable:m,x:u+r,y:f+a}}},{key:"updateText",value:function(r){this.text=cn(cn({},Object(c.I)(this.text)),{},{value:r})}},{key:"setSelected",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=r}},{key:"setHovered",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=r,this.setIsShowAnchor(r)}},{key:"setIsShowAnchor",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=r}},{key:"setHitable",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=r}},{key:"setElementState",value:function(r,a){this.state=r,this.additionStateData=a}},{key:"setProperty",value:function(r,a){this.properties=cn(cn({},Object(c.I)(this.properties)),{},vn({},r,en(a))),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=cn(cn({},Object(c.I)(this.properties)),en(r)),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setStyle",value:function(r,a){this.style=cn(cn({},this.style),{},vn({},r,en(a)))}},{key:"setStyles",value:function(r){this.style=cn(cn({},this.style),en(r))}},{key:"updateStyles",value:function(r){this.style=cn({},en(r))}},{key:"setZIndex",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.zIndex=r}},{key:"updateAttributes",value:function(r){un(this,r)}}],n&&g0(t.prototype,n),e}(),hh=pt(Ne.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),yh=pt(Ne.prototype,"x",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),gh=pt(Ne.prototype,"y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),vh=pt(Ne.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),bh=pt(Ne.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),mh=pt(Ne.prototype,"_width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),_h=pt(Ne.prototype,"_height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Oh=pt(Ne.prototype,"anchorsOffset",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),wh=pt(Ne.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xh=pt(Ne.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Eh=pt(Ne.prototype,"isShowAnchor",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Sh=pt(Ne.prototype,"isDragging",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),jh=pt(Ne.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ph=pt(Ne.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),kh=pt(Ne.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Th=pt(Ne.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ah=pt(Ne.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Mh=pt(Ne.prototype,"autoToFront",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Dh=pt(Ne.prototype,"style",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),pt(Ne.prototype,"incoming",[c.m],Object.getOwnPropertyDescriptor(Ne.prototype,"incoming"),Ne.prototype),pt(Ne.prototype,"outgoing",[c.m],Object.getOwnPropertyDescriptor(Ne.prototype,"outgoing"),Ne.prototype),pt(Ne.prototype,"addNodeMoveRules",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"addNodeMoveRules"),Ne.prototype),pt(Ne.prototype,"move",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"move"),Ne.prototype),pt(Ne.prototype,"getMoveDistance",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"getMoveDistance"),Ne.prototype),pt(Ne.prototype,"moveTo",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"moveTo"),Ne.prototype),pt(Ne.prototype,"moveText",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"moveText"),Ne.prototype),pt(Ne.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateText"),Ne.prototype),pt(Ne.prototype,"setSelected",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setSelected"),Ne.prototype),pt(Ne.prototype,"setHovered",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setHovered"),Ne.prototype),pt(Ne.prototype,"setIsShowAnchor",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setIsShowAnchor"),Ne.prototype),pt(Ne.prototype,"setHitable",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setHitable"),Ne.prototype),pt(Ne.prototype,"setElementState",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setElementState"),Ne.prototype),pt(Ne.prototype,"setProperty",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setProperty"),Ne.prototype),pt(Ne.prototype,"setProperties",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setProperties"),Ne.prototype),pt(Ne.prototype,"deleteProperty",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"deleteProperty"),Ne.prototype),pt(Ne.prototype,"setStyle",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setStyle"),Ne.prototype),pt(Ne.prototype,"setStyles",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setStyles"),Ne.prototype),pt(Ne.prototype,"updateStyles",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateStyles"),Ne.prototype),pt(Ne.prototype,"setZIndex",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setZIndex"),Ne.prototype),pt(Ne.prototype,"updateAttributes",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateAttributes"),Ne.prototype),Ne);function cc(e){return cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cc(e)}function Ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Lh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ih(Object(n),!0).forEach(function(r){zh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ih(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function v0(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function b0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lc(){return lc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=_0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},lc.apply(this,arguments)}function _0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Po(e))!==null;);return e}function fc(e,t){return fc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},fc(e,t)}function O0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Po(e);if(t){var a=Po(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return w0(this,n)}}function w0(e,t){if(t&&(cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xa(e)}function Xa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Po(e){return Po=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Po(e)}function zh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pc(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var tn,Bh,Fh,dc=(br=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&fc(o,u)})(a,e);var t,n,r=O0(a);function a(){var o;b0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return zh(Xa(o=r.call.apply(r,[this].concat(f))),"modelType",ht.CIRCLE_NODE),v0(Xa(o),"r",Rh,Xa(o)),o}return t=a,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var o=lc(Po(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.circle;return Lh(Lh({},o),Dt(u))}},{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,f=this.r;return[{x:o,y:u-f,id:"".concat(this.id,"_0")},{x:o+f,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+f,id:"".concat(this.id,"_2")},{x:o-f,y:u,id:"".concat(this.id,"_3")}]}}])&&m0(t.prototype,n),a}(mr),Rh=pc(br.prototype,"r",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),pc(br.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(br.prototype,"width"),br.prototype),pc(br.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(br.prototype,"height"),br.prototype),br);i(127);function hc(e){return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}function yc(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Hh(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Hh(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Hh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xh(Object(n),!0).forEach(function(r){Yh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uh(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function x0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gc(){return gc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=S0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},gc.apply(this,arguments)}function S0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=To(e))!==null;);return e}function vc(e,t){return vc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},vc(e,t)}function j0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=To(e);if(t){var a=To(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return P0(this,n)}}function P0(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ko(e)}function ko(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function To(e){return To=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},To(e)}function Yh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ao(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var er,Vh,Wh,bc=(tn=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&vc(o,u)})(a,e);var t,n,r=j0(a);function a(){var o;x0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Yh(ko(o=r.call.apply(r,[this].concat(f))),"modelType",ht.DIAMOND_NODE),Uh(ko(o),"rx",Bh,ko(o)),Uh(ko(o),"ry",Fh,ko(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=gc(To(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.diamond;return Gh(Gh({},o),Dt(u))}},{key:"points",get:function(){var o=this.x,u=this.y,f=this.rx,d=this.ry;return[[o,u-d],[o+f,u],[o,u+d],[o-f,u]]}},{key:"pointsPosition",get:function(){return this.points.map(function(o){return{x:o[0],y:o[1]}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=yc(f,1)[0];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=yc(f,2)[1];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"getDefaultAnchor",value:function(){var o=this;return this.points.map(function(u,f){var d=yc(u,2);return{x:d[0],y:d[1],id:"".concat(o.id,"_").concat(f)}})}}])&&E0(t.prototype,n),a}(mr),Bh=Ao(tn.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Fh=Ao(tn.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Ao(tn.prototype,"points",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"points"),tn.prototype),Ao(tn.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"pointsPosition"),tn.prototype),Ao(tn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"width"),tn.prototype),Ao(tn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"height"),tn.prototype),tn);function mc(e){return mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(e)}function $h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Kh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$h(Object(n),!0).forEach(function(r){Zh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$h(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qh(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function k0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _c(){return _c=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=A0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},_c.apply(this,arguments)}function A0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Do(e))!==null;);return e}function Oc(e,t){return Oc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Oc(e,t)}function M0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Do(e);if(t){var a=Do(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return D0(this,n)}}function D0(e,t){if(t&&(mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mo(e)}function Mo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Do(e){return Do=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(e)}function Zh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ga(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Rn,Jh,wc=(er=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Oc(o,u)})(a,e);var t,n,r=M0(a);function a(){var o;k0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Zh(Mo(o=r.call.apply(r,[this].concat(f))),"modelType",ht.ELLIPSE_NODE),qh(Mo(o),"rx",Vh,Mo(o)),qh(Mo(o),"ry",Wh,Mo(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=_c(Do(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.ellipse;return Kh(Kh({},o),Dt(u))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,f=this.rx,d=this.ry;return[{x:o,y:u-d,id:"".concat(this.id,"_0")},{x:o+f,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d,id:"".concat(this.id,"_2")},{x:o-f,y:u,id:"".concat(this.id,"_3")}]}}])&&T0(t.prototype,n),a}(mr),Vh=Ga(er.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Wh=Ga(er.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Ga(er.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(er.prototype,"width"),er.prototype),Ga(er.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(er.prototype,"height"),er.prototype),er);function xc(e){return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xc(e)}function Ec(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Qh(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Qh(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Qh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ty(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ey(Object(n),!0).forEach(function(r){ny(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ey(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N0(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function C0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sc(){return Sc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=I0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Sc.apply(this,arguments)}function I0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=No(e))!==null;);return e}function jc(e,t){return jc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},jc(e,t)}function L0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=No(e);if(t){var a=No(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return z0(this,n)}}function z0(e,t){if(t&&(xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ua(e)}function Ua(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function No(e){return No=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},No(e)}function ny(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Pc,ry,kc=(Rn=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&jc(o,u)})(a,e);var t,n,r=L0(a);function a(){var o;C0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return ny(Ua(o=r.call.apply(r,[this].concat(f))),"modelType",ht.POLYGON_NODE),N0(Ua(o),"points",Jh,Ua(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=Sc(No(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.polygon;return ty(ty({},o),Dt(u))}},{key:"pointsPosition",get:function(){var o=this.x,u=this.y,f=this.width,d=this.height;return this.points.map(function(m){return{x:m[0]+o-f/2,y:m[1]+u-d/2}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=Ec(f,1)[0];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=Ec(f,2)[1];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"getDefaultAnchor",value:function(){var o=this,u=this.x,f=this.y,d=this.width,m=this.height;return this.points.map(function(O,S){var T=Ec(O,2),R=T[0],U=T[1];return{x:u+R-d/2,y:f+U-m/2,id:"".concat(o.id,"_").concat(S)}})}}])&&R0(t.prototype,n),a}(mr),Jh=Ya(Rn.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Ya(Rn.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(Rn.prototype,"pointsPosition"),Rn.prototype),Ya(Rn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(Rn.prototype,"width"),Rn.prototype),Ya(Rn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(Rn.prototype,"height"),Rn.prototype),Rn);function Tc(e){return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function iy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oy(Object(n),!0).forEach(function(r){ay(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function B0(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function F0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ac(){return Ac=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=X0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Ac.apply(this,arguments)}function X0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Co(e))!==null;);return e}function Mc(e,t){return Mc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Mc(e,t)}function G0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Co(e);if(t){var a=Co(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return U0(this,n)}}function U0(e,t){if(t&&(Tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Va(e)}function Va(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Co(e){return Co=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Co(e)}function ay(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fr,Dc=(Pc=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Mc(o,u)})(a,e);var t,n,r=G0(a);function a(){var o;F0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return ay(Va(o=r.call.apply(r,[this].concat(f))),"modelType",ht.RECT_NODE),B0(Va(o),"radius",ry,Va(o)),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,f=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+f/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-f/2,y:u,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var o=Ac(Co(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.rect;return iy(iy({},o),Dt(u))}}])&&H0(t.prototype,n),a}(mr),ry=function(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}(Pc.prototype,"radius",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Pc);function Nc(e){return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uy(Object(n),!0).forEach(function(r){ly(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Y0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cc(){return Cc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=W0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Cc.apply(this,arguments)}function W0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ro(e))!==null;);return e}function Rc(e,t){return Rc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Rc(e,t)}function $0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ro(e);if(t){var a=Ro(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return K0(this,n)}}function K0(e,t){if(t&&(Nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cy(e)}function cy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ro(e){return Ro=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(e)}function ly(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fy(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var Ic=(Fr=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Rc(o,u)})(a,e);var t,n,r=$0(a);function a(){var o;Y0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return ly(cy(o=r.call.apply(r,[this].concat(f))),"modelType",ht.TEXT_NODE),o}return t=a,(n=[{key:"getTextStyle",value:function(){var o=Cc(Ro(a.prototype),"getTextStyle",this).call(this),u=this.graphModel.theme.text;return sy(sy({},o),Dt(u))}},{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return vs({rows:o,fontSize:u,rowsLength:o.length}).width}},{key:"height",get:function(){var o=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return vs({rows:o,fontSize:u,rowsLength:o.length}).height}}])&&V0(t.prototype,n),a}(mr),fy(Fr.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(Fr.prototype,"width"),Fr.prototype),fy(Fr.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(Fr.prototype,"height"),Fr.prototype),Fr);function Lc(e){return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(e)}function q0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zc(e,t){return zc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},zc(e,t)}function J0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Wa(e);if(t){var a=Wa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Q0(this,n)}}function Q0(e,t){if(t&&(Lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return py(e)}function py(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wa(e)}function e_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fn,dy,hy,yy,Bc=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&zc(o,u)})(a,e);var t,n,r=J0(a);function a(){var o;q0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return e_(py(o=r.call.apply(r,[this].concat(f))),"modelType",ht.HTML_NODE),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,f=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+f/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-f/2,y:u,id:"".concat(this.id,"_3")}]}}])&&Z0(t.prototype,n),a}(mr);function gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Fc(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function t_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vi(e,t,n,r,a){var o={};return Object.keys(r).forEach(function(u){o[u]=r[u]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},o),a&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(a):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(e,t,o),o=null),o}var by=(Fn=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),vy(this,"graphModel",void 0),Fc(this,"isShowHorizontal",dy,this),Fc(this,"isShowVertical",hy,this),Fc(this,"position",yy,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=r}var t,n;return t=e,n=[{key:"getStyle",value:function(){return function(r){for(var a=1;a<arguments.length;a++){var o=arguments[a]!=null?arguments[a]:{};a%2?gy(Object(o),!0).forEach(function(u){vy(r,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):gy(Object(o)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(o,u))})}return r}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(r,a){for(var o=r.x,u=r.y,f=!1,d=!1,m=0;m<a.length;m++){var O=a[m];if(O.id!==r.id&&(o===O.x&&(f=!0),u===O.y&&(d=!0),f&&d))break}return{isShowVertical:f,isShowHorizontal:d,position:{x:o,y:u}}}},{key:"getHorizontalSnapline",value:function(r,a){var o,u,f=!1,d=r.id;if(d){var m=this.graphModel.fakerNode;if(m&&m.id===d)u=Sn(m);else{var O=this.graphModel.getNodeModelById(d);u=Sn(O)}}for(var S=0;S<a.length;S++){var T=a[S];if(T.id!==r.id){var R=Sn(T);if(R.minY===u.minY||R.maxY===u.minY){f=!0,o=u.minY;break}if(R.minY===u.maxY||R.maxY===u.maxY){f=!0,o=u.maxY;break}}}return un({isShowHorizontal:f,position:{y:o}})}},{key:"getVerticalSnapline",value:function(r,a){var o,u,f=!1,d=r.id;if(d){var m=this.graphModel.fakerNode;if(m&&m.id===d)u=Sn(m);else{var O=this.graphModel.getNodeModelById(d);u=Sn(O)}}for(var S=0;S<a.length;S++){var T=a[S];if(T.id!==r.id){var R=Sn(T);if(R.minX===u.minX||R.maxX===u.minX){f=!0,o=u.minX;break}if(R.minX===u.maxX||R.maxX===u.maxX){f=!0,o=u.maxX;break}}}return un({isShowVertical:f,position:{x:o}})}},{key:"getSnapLinePosition",value:function(r,a){var o=this.getCenterSnapLine(r,a),u=o.isShowHorizontal,f=o.isShowVertical;if(!u){var d=this.getHorizontalSnapline(r,a);d.isShowHorizontal&&(o.isShowHorizontal=d.isShowHorizontal,o.position.y=d.position.y)}if(!f){var m=this.getVerticalSnapline(r,a);m.isShowVertical&&(o.isShowVertical=m.isShowVertical,o.position.x=m.position.x)}return o}},{key:"setSnaplineInfo",value:function(r){var a=r.isShowHorizontal,o=r.isShowVertical,u=r.position;this.position=u,this.isShowHorizontal=a,this.isShowVertical=o}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(r){var a=this.graphModel.nodes,o=this.getSnapLinePosition(r,a);this.setSnaplineInfo(o)}}],n&&t_(t.prototype,n),e}(),dy=vi(Fn.prototype,"isShowHorizontal",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hy=vi(Fn.prototype,"isShowVertical",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yy=vi(Fn.prototype,"position",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vi(Fn.prototype,"clearSnapline",[c.k],Object.getOwnPropertyDescriptor(Fn.prototype,"clearSnapline"),Fn.prototype),vi(Fn.prototype,"setNodeSnapLine",[c.k],Object.getOwnPropertyDescriptor(Fn.prototype,"setNodeSnapLine"),Fn.prototype),Fn),bi=new Map,my=function(e){var t=Rr(),n=window.requestAnimationFrame(function r(){if(e(),bi.get(t)){var a=window.requestAnimationFrame(r);bi.set(t,a)}});return bi.set(t,n),t},$a=function(e){var t=bi.get(e);t&&(window.cancelAnimationFrame(t),bi.delete(e))};function Hc(e){return Hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hc(e)}function mi(){return mi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mi.apply(this,arguments)}function _y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_y(Object(n),!0).forEach(function(r){nr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_y(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Oy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Oy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Oy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xc(e,t){return Xc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Xc(e,t)}function o_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=qa(e);if(t){var a=qa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return i_(this,n)}}function i_(e,t){if(t&&(Hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tr(e)}function tr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qa(e){return qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qa(e)}function nr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a_=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Xc(o,u)})(a,e);var t,n,r=o_(a);function a(){var o;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),nr(tr(o=r.call(this)),"preTargetNode",void 0),nr(tr(o),"sourceRuleResults",void 0),nr(tr(o),"targetRuleResults",void 0),nr(tr(o),"dragHandler",void 0),nr(tr(o),"t",void 0),nr(tr(o),"onDragStart",function(u){var f=u.event,d=o.props,m=d.anchorData,O=d.nodeModel,S=d.graphModel,T=S.overlapMode;S.selectNodeById(O.id),T!==En.INCREASE&&O.autoToFront&&S.toFront(O.id),S.eventCenter.emit(tt.ANCHOR_DRAGSTART,{data:m,e:f,nodeModel:O}),o.setState({startX:m.x,startY:m.y,endX:m.x,endY:m.y})}),nr(tr(o),"onDragging",function(u){var f=u.event,d=o.props,m=d.graphModel,O=d.nodeModel,S=d.anchorData,T=m.transformModel,R=m.eventCenter,U=m.width,W=m.height,oe=m.editConfigModel,re=oe.autoExpand,de=oe.stopMoveGraph,me=f.clientX,Te=f.clientY,Ee=m.getPointByClient({x:me,y:Te}),Xe=Ee.domOverlayPosition,Ae=Xe.x,Be=Xe.y,Re=Ee.canvasOverlayPosition,lt=Re.x,Et=Re.y;o.t&&$a(o.t);var mt=[];Ae<10?mt=[10,0]:Ae+10>U?mt=[-10,0]:Be<10?mt=[0,10]:Be+10>W&&(mt=[0,-10]),o.setState({endX:lt,endY:Et,dragging:!0}),o.moveAnchorEnd(lt,Et),mt.length>0&&!de&&re&&(o.t=my(function(){var jt=n_(mt,2),Ft=jt[0],Wt=jt[1];T.translate(Ft,Wt);var fn=o.state,ir=fn.endX,In=fn.endY;o.setState({endX:ir-Ft,endY:In-Wt}),o.moveAnchorEnd(ir-Ft,In-Wt)})),R.emit(tt.ANCHOR_DRAG,{data:S,e:f,nodeModel:O})}),nr(tr(o),"onDragEnd",function(u){var f=u.event;o.t&&$a(o.t),o.checkEnd(f),o.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),o.sourceRuleResults.clear(),o.targetRuleResults.clear();var d=o.props,m=d.graphModel,O=d.nodeModel,S=d.anchorData;m.eventCenter.emit(tt.ANCHOR_DRAGEND,{data:S,e:f,nodeModel:O})}),nr(tr(o),"checkEnd",function(u){var f=o.props,d=f.graphModel,m=f.nodeModel,O=f.anchorData,S=O.x,T=O.y,R=O.id,U=(d.edgeType,o.state),W=U.endX,oe=U.endY,re=U.dragging,de=ga({x:W,y:oe},d);if(o.preTargetNode&&o.preTargetNode.state!==Ot.DEFAULT&&o.preTargetNode.setElementState(Ot.DEFAULT),re&&de&&de.node){var me=de.node,Te=de.anchor.id,Ee="".concat(m.id,"_").concat(me.id,"_").concat(Te,"_").concat(R),Xe=o.sourceRuleResults.get(Ee)||{},Ae=Xe.isAllPass,Be=Xe.msg,Re=o.targetRuleResults.get(Ee)||{},lt=Re.isAllPass,Et=Re.msg;if(Ae&&lt){me.setElementState(Ot.DEFAULT);var mt=d.edgeGenerator(m.getData(),d.getNodeModelById(de.node.id).getData()),jt=d.addEdge(Ka(Ka({},mt),{},{sourceNodeId:m.id,sourceAnchorId:R,startPoint:{x:S,y:T},targetNodeId:de.node.id,targetAnchorId:de.anchor.id,endPoint:{x:de.anchor.x,y:de.anchor.y}})),Ft=o.props.anchorData;d.eventCenter.emit(tt.ANCHOR_DROP,{data:Ft,e:u,nodeModel:m,edgeModel:jt})}else{var Wt=me.getData();d.eventCenter.emit(tt.CONNECTION_NOT_ALLOWED,{data:Wt,msg:Et||Be})}}}),o.sourceRuleResults=new Map,o.targetRuleResults=new Map,o.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},o.dragHandler=new yr({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd}),o}return t=a,(n=[{key:"getAnchorShape",value:function(){var o=this.props,u=o.anchorData,f=o.style,d=o.node.getAnchorShape(u);if(d)return d;var m=u.x,O=u.y,S=Ka(Ka({},f),f.hover);return Object(te.g)("g",null,Object(te.g)(hi,mi({className:"lf-node-anchor-hover"},S,{x:m,y:O})),Object(te.g)(hi,mi({className:"lf-node-anchor"},f,{x:m,y:O})))}},{key:"moveAnchorEnd",value:function(o,u){var f=this.props,d=f.graphModel,m=f.nodeModel,O=f.anchorData,S=ga({x:o,y:u},d);if(S){var T=S.node,R=S.anchor.id;if(this.preTargetNode&&this.preTargetNode!==S.node&&this.preTargetNode.setElementState(Ot.DEFAULT),O.id===R)return;this.preTargetNode=T;var U="".concat(m.id,"_").concat(T.id,"_").concat(R,"_").concat(O.id);if(!this.targetRuleResults.has(U)){var W=S.anchor,oe=m.isAllowConnectedAsSource(T,O,W),re=T.isAllowConnectedAsTarget(m,O,W);this.sourceRuleResults.set(U,ui(oe)),this.targetRuleResults.set(U,ui(re))}var de=this.sourceRuleResults.get(U).isAllPass,me=this.targetRuleResults.get(U).isAllPass;de&&me?T.setElementState(Ot.ALLOW_CONNECT):T.setElementState(Ot.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Ot.DEFAULT&&this.preTargetNode.setElementState(Ot.DEFAULT)}},{key:"isShowLine",value:function(){var o=this.state,u=o.startX,f=o.startY,d=o.endX,m=o.endY;return qn(u,f,d,m)>10}},{key:"render",value:function(){var o=this,u=this.state,f=u.startX,d=u.startY,m=u.endX,O=u.endY,S=this.props,T=S.anchorData.edgeAddable,R=S.edgeStyle;return Object(te.g)("g",{className:"lf-anchor"},Object(te.g)("g",{onMouseDown:function(U){T!==!1&&o.dragHandler.handleMouseDown(U)}},this.getAnchorShape()),this.isShowLine()&&Object(te.g)(So,mi({x1:f,y1:d,x2:m,y2:O},R,{"pointer-events":"none"})))}}])&&r_(t.prototype,n),a}(te.a);i(80);function wy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function u_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wy(Object(n),!0).forEach(function(r){s_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gc(e){return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gc(e)}function c_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return xy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return xy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ey(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,o=e.value,u=e.fontSize,f=e.fill,d=f===void 0?"currentColor":f,m=e.overflowMode,O=m===void 0?"default":m,S=e.textWidth,T=S===void 0?"":S,R=e.model,U={textAnchor:"middle","dominant-baseline":"middle",x:n,y:a,fill:d};if(Object.entries(e).forEach(function(Te){var Ee=c_(Te,2),Xe=Ee[0],Ae=Ee[1];Gc(Ae)!=="object"&&(U[Xe]=Ae)}),o){var W=String(o).split(/[\r\n]/g),oe=W.length;if(O!=="default"){var re=R.BaseType,de=R.modelType;if(re===Xt.NODE&&de!==ht.TEXT_NODE||re===Xt.EDGE&&T)return function(Te){var Ee=Te.value,Xe=Te.fontSize,Ae=Te.model,Be=Te.fontFamily,Re=Be===void 0?"":Be,lt=Te.lineHeight,Et=Te.wrapPadding,mt=Et===void 0?"0, 0":Et,jt=Te.overflowMode,Ft=Te.x,Wt=Te.y,fn=Ae.width,ir=Ae.textHeight,In=Te.textWidth||fn,zo=String(Ee).split(/[\r\n]/g),mu=zo.length,_u=Wp({rows:zo,style:{fontSize:"".concat(Xe,"px"),width:"".concat(In,"px"),fontFamily:Re,lineHeight:lt,padding:mt},rowsLength:mu,className:"lf-get-text-height"}),ao=Ae.height>_u?Ae.height:_u;ir&&(ao=ir);var Gr=jt==="ellipsis";return Gr&&(ao=Xe+2),Object(te.g)("g",null,Object(te.g)("foreignObject",{width:In,height:ao,x:Ft-In/2,y:Wt-ao/2},Object(te.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:ao,width:In,padding:mt}},Object(te.g)("div",{className:Gr?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Gr?zo.join(""):"",style:u_({},Te)},zo.map(function(Ur){return Object(te.g)("div",{className:"lf-node-text--auto-wrap-inner"},Ur)})))))}(e)}if(oe>1){var me=W.map(function(Te,Ee){var Xe=(Ee-(oe-1)/2)*(u+2);return Object(te.g)("tspan",{className:"lf-text-tspan",x:n,y:a+Xe},Te)});return Object(te.g)("text",U,me)}return Object(te.g)("text",U,o)}}function Uc(e){return Uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(e)}function Yc(){return Yc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yc.apply(this,arguments)}function l_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Sy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Sy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vc(e,t){return Vc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Vc(e,t)}function p_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Za(e);if(t){var a=Za(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return d_(this,n)}}function d_(e,t){if(t&&(Uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hr(e)}function Hr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Za(e)}function ro(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jy=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Vc(o,u)})(a,e);var t,n,r=p_(a);function a(o){var u;(function(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")})(this,a),ro(Hr(u=r.call(this)),"dragHandler",void 0),ro(Hr(u),"sumDeltaX",0),ro(Hr(u),"sumDeltaY",0),ro(Hr(u),"stepDrag",void 0),ro(Hr(u),"onDragging",function(d){var m=d.deltaX,O=d.deltaY,S=u.props,T=S.model,R=l_(S.graphModel.transformModel.fixDeltaXY(m,O),2),U=R[0],W=R[1];T.moveText(U,W)}),ro(Hr(u),"dblClickHandler",function(){u.props.editable&&u.props.model.setElementState(Ot.TEXT_EDIT)}),ro(Hr(u),"mouseDownHandle",function(d){var m=u.props,O=m.draggable,S=m.model,T=m.graphModel.editConfigModel.nodeTextDraggable;(O||T)&&(u.stepDrag.model=S,u.stepDrag.handleMouseDown(d))}),o.model;var f=o.draggable;return u.stepDrag=new yr({onDragging:u.onDragging,step:1,isStopPropagation:f}),u}return t=a,(n=[{key:"getShape",value:function(){var o=this.props,u=o.model,f=o.graphModel,d=u.text,m=f.editConfigModel,O=d.value,S=d.x,T=d.y,R=d.editable,U=d.draggable,W={x:S,y:T,className:"",value:O};R?W.className="lf-element-text":U||m.nodeTextDraggable?W.className="lf-text-draggable":W.className="lf-text-disabled";var oe=u.getTextStyle();return Object(te.g)(Ey,Yc({},W,oe,{model:u}))}},{key:"render",value:function(){if(this.props.model.text)return Object(te.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&f_(t.prototype,n),a}(te.a),h_=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function Wc(e){return Wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wc(e)}function Ja(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Py(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Py(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Py(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ky(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $c(e,t){return $c=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$c(e,t)}function y_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Qa(e);if(t){var a=Qa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return g_(this,n)}}function g_(e,t){if(t&&(Wc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nn(e)}function nn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qa(e)}function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _r=function(e){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&$c(u,f)})(o,e);var t,n,r,a=y_(o);function o(u){var f;(function(T,R){if(!(T instanceof R))throw new TypeError("Cannot call a class as a function")})(this,o),ln(nn(f=a.call(this)),"t",void 0),ln(nn(f),"moveOffset",void 0),ln(nn(f),"stepDrag",void 0),ln(nn(f),"contextMenuTime",void 0),ln(nn(f),"startTime",void 0),ln(nn(f),"clickTimer",void 0),ln(nn(f),"onDragStart",function(T){var R=T.event,U=R.clientX,W=R.clientY,oe=f.props,re=oe.model,de=oe.graphModel.getPointByClient({x:U,y:W}).canvasOverlayPosition,me=de.x,Te=de.y;f.moveOffset={x:re.x-me,y:re.y-Te}}),ln(nn(f),"onDragging",function(T){var R=T.event,U=f.props,W=U.model,oe=U.graphModel,re=oe.editConfigModel,de=re.stopMoveGraph,me=re.autoExpand,Te=oe.transformModel,Ee=oe.selectNodes,Xe=oe.width,Ae=oe.height,Be=oe.gridSize;W.isDragging=!0;var Re=R.clientX,lt=R.clientY,Et=oe.getPointByClient({x:Re,y:lt}).canvasOverlayPosition,mt=Et.x,jt=Et.y,Ft=Ja(Te.CanvasPointToHtmlPoint([mt,jt]),2),Wt=Ft[0],fn=Ft[1];if(mt+=f.moveOffset.x,jt+=f.moveOffset.y,mt=Cr(mt,Be),jt=Cr(jt,Be),Xe&&Ae){if(!me||de||!(Wt<0||fn<0||Wt>Xe||fn>Ae)){var ir=Ja(Te.CanvasPointToHtmlPoint([mt-W.width/2,jt-W.height/2]),2),In=ir[0],zo=ir[1],mu=Ja(Te.CanvasPointToHtmlPoint([mt+W.width/2,jt+W.height/2]),2),_u=mu[0],ao=mu[1],Gr=Math.max(Be,20),Ur=[];In<0?Ur=[Gr,0]:_u>oe.width?Ur=[-Gr,0]:zo<0?Ur=[0,Gr]:ao>oe.height&&(Ur=[0,-Gr]),f.t&&$a(f.t);var Ou=Ee.map(function(wu){return wu.id});Ou.indexOf(W.id)===-1&&(Ou=[W.id]),Ur.length>0&&!de&&me?f.t=my(function(){var wu=Ja(Ur,2),cg=wu[0],lg=wu[1];Te.translate(cg,lg);var i1=-cg/Te.SCALE_X,a1=-lg/Te.SCALE_X;oe.moveNodes(Ou,i1,a1)}):oe.moveNodes(Ou,mt-W.x,jt-W.y)}}else oe.moveNode2Coordinate(W.id,mt,jt)}),ln(nn(f),"onDragEnd",function(){f.t&&$a(f.t),f.props.model.isDragging=!1}),ln(nn(f),"handleClick",function(T){if(f.startTime&&!(new Date().getTime()-f.startTime>200)){var R=f.props,U=R.model,W=R.graphModel,oe={data:U.getData(),e:T,position:W.getPointByClient({x:T.clientX,y:T.clientY}),isSelected:!1,isMultiple:!1},re=T.button===2,de=T.detail===2;if(!re){var me=W.editConfigModel,Te=mp(T,me);oe.isMultiple=Te,U.isSelected&&!de&&Te?(oe.isSelected=!1,U.setSelected(!1)):(W.selectNodeById(U.id,Te),oe.isSelected=!0,f.toFront()),de?(me.nodeTextEdit&&U.text.editable&&(U.setSelected(!1),W.setElementStateById(U.id,Ot.TEXT_EDIT)),W.eventCenter.emit(tt.NODE_DBCLICK,oe)):(W.eventCenter.emit(tt.ELEMENT_CLICK,oe),W.eventCenter.emit(tt.NODE_CLICK,oe))}}}),ln(nn(f),"handleContextMenu",function(T){T.preventDefault();var R=f.props,U=R.model,W=R.graphModel,oe=U.getData(),re=W.getPointByClient({x:T.clientX,y:T.clientY});W.setElementStateById(U.id,Ot.SHOW_MENU,re.domOverlayPosition),U.isSelected||W.selectNodeById(U.id),W.eventCenter.emit(tt.NODE_CONTEXTMENU,{data:oe,e:T,position:re}),f.toFront()}),ln(nn(f),"handleMouseDown",function(T){var R=f.props,U=R.model,W=R.graphModel;f.startTime=new Date().getTime(),W.editConfigModel.adjustNodePosition&&U.draggable&&f.stepDrag&&f.stepDrag.handleMouseDown(T)}),ln(nn(f),"setHoverON",function(T){var R=f.props,U=R.model,W=R.graphModel;if(!U.isHovered){var oe=U.getData();U.setHovered(!0),W.eventCenter.emit(tt.NODE_MOUSEENTER,{data:oe,e:T})}}),ln(nn(f),"setHoverOFF",function(T){var R=f.props,U=R.model,W=R.graphModel,oe=U.getData();U.isHovered&&(U.setHovered(!1),W.eventCenter.emit(tt.NODE_MOUSELEAVE,{data:oe,e:T}))}),ln(nn(f),"onMouseOut",function(T){h_&&f.setHoverOFF(T)});var d=u.graphModel,m=d.gridSize,O=d.eventCenter,S=u.model;return f.stepDrag=new yr({onDragStart:f.onDragStart,onDragging:f.onDragging,onDragEnd:f.onDragEnd,step:m,eventType:"NODE",isStopPropagation:!1,eventCenter:O,model:S}),f}return t=o,r=[{key:"getModel",value:function(u){return u}}],(n=[{key:"getAnchorShape",value:function(u){return null}},{key:"getAnchors",value:function(){var u=this,f=this.props,d=f.model,m=f.graphModel,O=d.isSelected,S=d.isHitable,T=d.isDragging,R=d.isShowAnchor;return S&&(O||R)&&!T?pa(d.anchors,function(U,W){var oe=d.getAnchorLineStyle(U),re=d.getAnchorStyle(U);return Object(te.g)(a_,{anchorData:U,node:u,style:re,edgeStyle:oe,anchorIndex:W,nodeModel:d,graphModel:m,setHoverOFF:u.setHoverOFF})}):[]}},{key:"getText",value:function(){var u=this.props,f=u.model,d=u.graphModel;if(f.state===Ot.TEXT_EDIT)return"";if(f.text){var m=d.editConfigModel,O=!1;return(f.text.draggable||m.nodeTextDraggable)&&(O=!0),Object(te.g)(jy,{editable:m.nodeTextEdit&&f.text.editable,model:f,graphModel:d,draggable:O})}}},{key:"getStateClassName",value:function(){var u=this.props.model,f=u.state,d=u.isDragging,m=u.isSelected,O="lf-node";switch(f){case Ot.ALLOW_CONNECT:O+=" lf-node-allow";break;case Ot.NOT_ALLOW_CONNECT:O+=" lf-node-not-allow";break;default:O+=" lf-node-default"}return d&&(O+=" lf-isDragging"),m&&(O+=" lf-node-selected"),O}},{key:"toFront",value:function(){var u=this.props,f=u.model,d=u.graphModel;d.overlapMode!==En.INCREASE&&f.autoToFront&&d.toFront(f.id)}},{key:"render",value:function(){var u,f=this.props,d=f.model,m=f.graphModel,O=m.editConfigModel,S=O.hideAnchors,T=O.adjustNodePosition,R=m.gridSize,U=m.transformModel.SCALE_X,W=d.isHitable,oe=d.draggable,re=Object(te.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),S?null:this.getAnchors());return W?(T&&oe&&this.stepDrag.setStep(R*U),u=Object(te.g)("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},re)):u=Object(te.g)("g",{className:this.getStateClassName()},re),u}}])&&ky(t.prototype,n),r&&ky(t,r),o}(te.a);function Kc(e){return Kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kc(e)}function qc(){return qc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}function v_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zc(e,t){return Zc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zc(e,t)}function m_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=eu(e);if(t){var a=eu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return __(this,n)}}function __(e,t){if(t&&(Kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function eu(e){return eu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},eu(e)}var Jc=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Zc(o,u)})(a,e);var t,n,r=m_(a);function a(){return v_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(te.g)(zr,qc({},u,{x:o.x,y:o.y,width:o.width,height:o.height,radius:o.radius}))}}])&&b_(t.prototype,n),a}(_r);function Qc(e){return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(e)}function el(){return el=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(this,arguments)}function O_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tl(e,t){return tl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},tl(e,t)}function x_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=tu(e);if(t){var a=tu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return E_(this,n)}}function E_(e,t){if(t&&(Qc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function tu(e){return tu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},tu(e)}var nl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&tl(o,u)})(a,e);var t,n,r=x_(a);function a(){return O_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,f=o.y,d=o.r,m=o.getNodeStyle();return Object(te.g)(hi,el({},m,{x:u,y:f,r:d}))}}])&&w_(t.prototype,n),a}(_r);function rl(e){return rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rl(e)}function S_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ty(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ty(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ty(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ay(e){var t=e.points,n=e.className,r={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(e).forEach(function(a){var o=S_(a,2),u=o[0],f=o[1];rl(f)!=="object"&&(r[u]=f)}),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=t.map(function(a){return a.join(",")}).join(" "),Object(te.g)("polygon",r)}function ol(e){return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}function il(){return il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},il.apply(this,arguments)}function j_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function al(e,t){return al=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},al(e,t)}function k_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=nu(e);if(t){var a=nu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return T_(this,n)}}function T_(e,t){if(t&&(ol(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function nu(e){return nu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nu(e)}var ul=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&al(o,u)})(a,e);var t,n,r=k_(a);function a(){return j_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,f=o.y,d=o.width,m=o.height,O=o.points,S=o.getNodeStyle(),T={transform:"matrix(1 0 0 1 ".concat(u-d/2," ").concat(f-m/2,")")};return Object(te.g)("g",T,Object(te.g)(Ay,il({},S,{points:O,x:u,y:f})))}}])&&P_(t.prototype,n),a}(_r);function sl(e){return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function cl(){return cl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cl.apply(this,arguments)}function A_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ll(e,t){return ll=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ll(e,t)}function D_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ru(e);if(t){var a=ru(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return N_(this,n)}}function N_(e,t){if(t&&(sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ru(e)}var fl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&ll(o,u)})(a,e);var t,n,r=D_(a);function a(){return A_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(te.g)("g",null,Object(te.g)(Ay,cl({},u,{points:o.points,x:o.x,y:o.y})))}}])&&M_(t.prototype,n),a}(_r);function pl(e){return pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pl(e)}function C_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return My(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return My(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function My(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function R_(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,o=e.rx,u=o===void 0?4:o,f=e.ry,d=f===void 0?4:f,m=e.className,O={cx:n,cy:a,rx:u,ry:d,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(S){var T=C_(S,2),R=T[0],U=T[1];pl(U)!=="object"&&(O[R]=U)}),O.className=m?"lf-basic-shape ".concat(m):"lf-basic-shape",Object(te.g)("ellipse",O)}function dl(e){return dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dl(e)}function hl(){return hl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hl.apply(this,arguments)}function I_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yl(e,t){return yl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},yl(e,t)}function z_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ou(e);if(t){var a=ou(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return B_(this,n)}}function B_(e,t){if(t&&(dl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ou(e){return ou=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ou(e)}var gl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&yl(o,u)})(a,e);var t,n,r=z_(a);function a(){return I_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.getNodeStyle();return Object(te.g)(R_,hl({},u,{x:o.x,y:o.y,rx:o.rx,ry:o.ry}))}}])&&L_(t.prototype,n),a}(_r);function vl(e){return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function Dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ny(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dy(Object(n),!0).forEach(function(r){F_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bl(e,t){return bl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},bl(e,t)}function G_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=iu(e);if(t){var a=iu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return U_(this,n)}}function U_(e,t){if(t&&(vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function iu(e){return iu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},iu(e)}var ml=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&bl(o,u)})(a,e);var t,n,r=G_(a);function a(){return H_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getBackground",value:function(){var o=this.props.model,u=o.getTextStyle(),f=o.width,d=o.height,m=o.x,O=o.y,S=Ny(Ny({},u.background),{},{x:m,y:O-1,width:f,height:d});return Object(te.g)(zr,S)}},{key:"getShape",value:function(){return Object(te.g)("g",null,this.getBackground())}}])&&X_(t.prototype,n),a}(_r);function _l(e){return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function Ol(){return Ol=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ol.apply(this,arguments)}function Y_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wl(e,t){return wl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},wl(e,t)}function W_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=au(e);if(t){var a=au(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $_(this,n)}}function $_(e,t){if(t&&(_l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _i(e)}function _i(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function au(e){return au=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},au(e)}function uu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&wl(o,u)})(a,e);var t,n,r=W_(a);function a(){var o;Y_(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return uu(_i(o=r.call.apply(r,[this].concat(f))),"ref",void 0),uu(_i(o),"currentProperties",void 0),uu(_i(o),"preProperties",void 0),uu(_i(o),"setRef",function(m){o.ref=m}),o}return t=a,(n=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(o){o.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 o=this.props.model,u=o.x,f=o.y,d=o.height,m=o.width,O=o.getNodeStyle();return this.currentProperties=JSON.stringify(o.properties),Object(te.g)("foreignObject",Ol({},O,{x:u-m/2,y:f-d/2,width:m,height:d,ref:this.setRef}))}}])&&V_(t.prototype,n),a}(_r);function El(e){return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(e)}function Sl(){return Sl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sl.apply(this,arguments)}function Cy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function oo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cy(Object(n),!0).forEach(function(r){kl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jl(e,t){return jl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},jl(e,t)}function q_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=su(e);if(t){var a=su(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Z_(this,n)}}function Z_(e,t){if(t&&(El(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pl(e)}function Pl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function su(e){return su=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},su(e)}function kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rr,J_=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&jl(o,u)})(a,e);var t,n,r=q_(a);function a(o){var u;return function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}(this,a),kl(Pl(u=r.call(this,o)),"setHoverON",function(){u.setState({isHovered:!0})}),kl(Pl(u),"setHoverOFF",function(){u.setState({isHovered:!1})}),u.state={isHovered:!1},u}return t=a,(n=[{key:"getBackground",value:function(){var o=this.props.model,u=o.getTextStyle(),f=o.text,d=o.width,m=u.background||{};if(this.state.isHovered&&u.hover&&u.hover.background&&(m=oo(oo({},m),u.hover.background)),f&&f.value&&m.fill!=="transparent"){var O,S=u.fontSize,T=u.overflowMode,R=u.lineHeight,U=u.wrapPadding,W=u.textWidth,oe=f.value,re=f.x,de=f.y,me=String(oe).split(/[\r\n]/g),Te=me.length;if(T==="autoWrap"&&W){var Ee=Wp({rows:me,style:{fontSize:"".concat(S,"px"),width:"".concat(W,"px"),lineHeight:R,padding:U},rowsLength:Te,className:"lf-get-text-height"});O=oo(oo({},m),{},{x:re-1,y:de-1,width:W,height:Ee})}else{me&&me.forEach(function(lt){gd(lt)});var Xe=vs({rows:me,fontSize:S,rowsLength:Te}),Ae=Xe.width,Be=Xe.height;if(T==="ellipsis"&&(Ae=W||d,Be=S+2),typeof m.wrapPadding=="string"){var Re=m.wrapPadding.split(",").filter(function(lt){return lt.trim()}).map(function(lt){return parseFloat(lt.trim())});Re.length>0&&Re.length<=4&&(Re.length===1?Re=[Re[0],Re[0],Re[0],Re[0]]:Re.length===2?Re=[Re[0],Re[1],Re[0],Re[1]]:Re.length===3&&(Re=[Re[0],Re[1],Re[2],Re[1]]),Ae+=Re[1]+Re[3],Be+=Re[0]+Re[2],re+=(Re[1]-Re[3])/2,de+=(Re[2]-Re[0])/2)}O=oo(oo({},m),{},{x:re-1,y:de-1,width:Ae,height:Be})}return Object(te.g)(zr,O)}}},{key:"getShape",value:function(){var o=this.props.model,u=o.text,f=u.value,d=u.x,m=u.y;if(f){var O=oo({x:d,y:m,className:"lf-element-text",value:f},o.getTextStyle());return Object(te.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(te.g)(Ey,Sl({},O,{model:o})))}}}])&&K_(t.prototype,n),a}(jy);function Tl(e){return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function Ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ry(Object(n),!0).forEach(function(r){Pn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ry(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Iy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Iy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Iy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Al(e,t){return Al=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Al(e,t)}function tO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=cu(e);if(t){var a=cu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return nO(this,n)}}function nO(e,t){if(t&&(Tl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jn(e)}function jn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cu(e){return cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cu(e)}function Pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(rr||(rr={}));var Ly=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Al(o,u)})(a,e);var t,n,r=tO(a);function a(o){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),Pn(jn(u=r.call(this)),"stepDragData",void 0),Pn(jn(u),"stepDrag",void 0),Pn(jn(u),"oldEdge",void 0),Pn(jn(u),"preTargetNode",void 0),Pn(jn(u),"targetRuleResults",void 0),Pn(jn(u),"sourceRuleResults",void 0),Pn(jn(u),"handleMouseDown",function(O){u.stepDrag&&u.stepDrag.handleMouseDown(O)}),Pn(jn(u),"onDragStart",function(){var O=u.props,S=O.x,T=O.y,R=O.edgeModel,U=R.startPoint,W=R.endPoint,oe=R.pointsList;u.oldEdge={startPoint:U,endPoint:W,pointsList:oe},u.setState({endX:S,endY:T,dragging:!0})}),Pn(jn(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY,R=u.state,U=R.endX,W=R.endY,oe=u.props,re=oe.graphModel,de=oe.type,me=re.transformModel,Te=re.editConfigModel,Ee=Q_(me.moveCanvasPointByHtml([U,W],S,T),2),Xe=Ee[0],Ae=Ee[1];u.setState({endX:Xe,endY:Ae,dragging:!0});var Be=u.props.edgeModel,Re=ga({x:U,y:W},re);if(Re&&Re.node&&u.isAllowAdjust(Re).pass){var lt,Et=Be.startPoint,mt=Be.endPoint,jt=Be.sourceNode,Ft=Be.targetNode;de===rr.SOURCE?lt={startPoint:{x:Re.anchor.x,y:Re.anchor.y},endPoint:{x:mt.x,y:mt.y},sourceNode:Re.node,targetNode:Ft}:de===rr.TARGET&&(lt={startPoint:{x:Et.x,y:Et.y},endPoint:{x:Re.anchor.x,y:Re.anchor.y},sourceNode:jt,targetNode:Re.node}),Be.updateAfterAdjustStartAndEnd(lt)}else de===rr.SOURCE?Be.updateStartPoint({x:Xe,y:Ae}):de===rr.TARGET&&Be.updateEndPoint({x:Xe,y:Ae});Be.text.value&&Te.adjustEdge&&Be.setText(Object.assign({},Be.text,Be.textPosition))}),Pn(jn(u),"onDragEnd",function(O){var S=O.event;try{var T;u.setState({dragging:!1});var R=u.props,U=R.graphModel,W=R.edgeModel,oe=R.type,re=u.state,de=re.endX,me=re.endY,Te=re.dragging,Ee=ga({x:de,y:me},U);if(!Te)return;var Xe,Ae=!1;if(Ee&&Ee.node){var Be=u.isAllowAdjust(Ee),Re=Be.pass,lt=Be.msg,Et=Be.newTargetNode;if(Re){var mt,jt=W.getData();Xe=Or(Or({},jt),{},{sourceAnchorId:"",targetAnchorId:"",text:(jt==null||(mt=jt.text)===null||mt===void 0?void 0:mt.value)||""}),oe===rr.SOURCE?(Xe=Or(Or({},U.edgeGenerator(U.getNodeModelById(Ee.node.id).getData(),U.getNodeModelById(W.targetNodeId).getData(),Xe)),{},{sourceNodeId:Ee.node.id,sourceAnchorId:Ee.anchor.id,startPoint:{x:Ee.anchor.x,y:Ee.anchor.y},targetNodeId:W.targetNodeId,endPoint:Or({},W.endPoint)}),W.sourceNodeId===Ee.node.id&&W.sourceAnchorId===Ee.anchor.id&&(Ae=!0)):oe===rr.TARGET&&(Xe=Or(Or({},U.edgeGenerator(U.getNodeModelById(W.sourceNodeId).getData(),U.getNodeModelById(Ee.node.id).getData(),Xe)),{},{sourceNodeId:W.sourceNodeId,startPoint:Or({},W.startPoint),targetNodeId:Ee.node.id,targetAnchorId:Ee.anchor.id,endPoint:{x:Ee.anchor.x,y:Ee.anchor.y}}),W.targetNodeId===Ee.node.id&&W.targetAnchorId===Ee.anchor.id&&(Ae=!0))}else{Ae=!0;var Ft=Et.getData();U.eventCenter.emit(tt.CONNECTION_NOT_ALLOWED,{data:Ft,msg:lt})}}else Ae=!0;if(Ae)u.recoveryEdge();else{var Wt=W.getData();U.deleteEdgeById(W.id);var fn=U.addEdge(Or({},Xe));U.eventCenter.emit(tt.EDGE_EXCHANGE_NODE,{data:{newEdge:fn.getData(),oldEdge:Wt}})}(T=u.preTargetNode)===null||T===void 0||T.setElementState(Ot.DEFAULT)}finally{u.props.graphModel.eventCenter.emit(tt.ADJUST_POINT_DRAGEND,{e:S,data:u.stepDragData})}}),Pn(jn(u),"recoveryEdge",function(){var O=u.props.edgeModel,S=u.oldEdge,T=S.startPoint,R=S.endPoint,U=S.pointsList;O.updateStartPoint(T),O.updateEndPoint(R),O.modelType!==ht.LINE_EDGE&&(O.pointsList=U,O.initPoints())}),Pn(jn(u),"getAdjustPointStyle",function(){var O=u.props,S=O.graphModel.theme;return O.edgeModel,S.edgeAdjust}),u.state={dragging:!1,endX:0,endY:0},u.targetRuleResults=new Map,u.sourceRuleResults=new Map;var f=o.type,d=o.edgeModel,m=o.graphModel.eventCenter;return u.stepDragData={type:f,edgeData:d.getData()},u.stepDrag=new yr({onDragStart:u.onDragStart,onDragging:u.onDragging,onDragEnd:u.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:m,data:u.stepDragData}),u}return t=a,(n=[{key:"isAllowAdjust",value:function(o){var u=this.props,f=u.edgeModel,d=f.id,m=f.sourceNode,O=f.targetNode,S=f.sourceAnchorId,T=f.targetAnchorId,R=u.type,U=null,W=null,oe=null,re=null;if(R===rr.SOURCE?(U=o.node,W=O,oe=o.anchor,re=O.getAnchorInfo(T)):(U=m,W=o.node,re=o.anchor,oe=m.getAnchorInfo(S)),this.preTargetNode&&this.preTargetNode!==o.node&&this.preTargetNode.setElementState(Ot.DEFAULT),this.preTargetNode=o.node,re.id===oe.id)return{pass:!1,msg:"",newTargetNode:W};var de="".concat(U.id,"_").concat(W.id,"_").concat(oe.id,"_").concat(re.id);if(!this.targetRuleResults.has(de)){var me=U.isAllowConnectedAsSource(W,oe,re,d),Te=W.isAllowConnectedAsTarget(U,oe,re,d);this.sourceRuleResults.set(de,ui(me)),this.targetRuleResults.set(de,ui(Te))}var Ee=this.sourceRuleResults.get(de),Xe=Ee.isAllPass,Ae=Ee.msg,Be=this.targetRuleResults.get(de),Re=Be.isAllPass,lt=Be.msg,Et=Xe&&Re?Ot.ALLOW_CONNECT:Ot.NOT_ALLOW_CONNECT;return R===rr.SOURCE?U.setElementState(Et):W.setElementState(Et),{pass:Xe&&Re,msg:lt||Ae,newTargetNode:W}}},{key:"render",value:function(){var o=this.props,u=o.x,f=o.y,d=o.getAdjustPointShape,m=o.edgeModel,O=this.state.dragging;return Object(te.g)("g",{pointerEvents:O?"none":"",onMouseDown:this.handleMouseDown},O?"":d(u,f,m))}}])&&eO(t.prototype,n),a}(te.a);function Ml(e){return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function Oi(){return Oi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oi.apply(this,arguments)}function rO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return zy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return zy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function zy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dl(e,t){return Dl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Dl(e,t)}function aO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=lu(e);if(t){var a=lu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return uO(this,n)}}function uO(e,t){if(t&&(Ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hn(e)}function Hn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lu(e){return lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(e)}function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wi=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Dl(o,u)})(a,e);var t,n,r=aO(a);function a(){var o;oO(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return or(Hn(o=r.call.apply(r,[this].concat(f))),"startTime",void 0),or(Hn(o),"contextMenuTime",void 0),or(Hn(o),"clickTimer",void 0),or(Hn(o),"textRef",Object(te.f)()),or(Hn(o),"handleHover",function(m,O){var S=o.props,T=S.model,R=S.graphModel.eventCenter;T.setHovered(m);var U=m?tt.EDGE_MOUSEENTER:tt.EDGE_MOUSELEAVE,W=T.getData();R.emit(U,{data:W,e:O})}),or(Hn(o),"setHoverON",function(m){o.props.model.isHovered||(o.textRef&&o.textRef.current&&o.textRef.current.setHoverON(),o.handleHover(!0,m))}),or(Hn(o),"setHoverOFF",function(m){o.props.model.isHovered&&(o.textRef&&o.textRef.current&&o.textRef.current.setHoverOFF(),o.handleHover(!1,m))}),or(Hn(o),"handleContextMenu",function(m){m.preventDefault(),o.contextMenuTime=new Date().getTime(),o.clickTimer&&clearTimeout(o.clickTimer);var O=o.props,S=O.model,T=O.graphModel,R=T.getPointByClient({x:m.clientX,y:m.clientY});T.setElementStateById(S.id,Ot.SHOW_MENU,R.domOverlayPosition),o.toFront(),S.isSelected||T.selectEdgeById(S.id);var U=S==null?void 0:S.getData();T.eventCenter.emit(tt.EDGE_CONTEXTMENU,{data:U,e:m,position:R})}),or(Hn(o),"handleMouseDown",function(m){m.stopPropagation(),o.startTime=new Date().getTime()}),or(Hn(o),"handleMouseUp",function(m){if(o.startTime&&!(new Date().getTime()-o.startTime>200||m.button===2)){var O=m.detail===2,S=o.props,T=S.model,R=S.graphModel,U=T==null?void 0:T.getData(),W=R.getPointByClient({x:m.clientX,y:m.clientY});if(O){var oe=R.editConfigModel,re=R.textEditElement;if(re&&re.id===T.id&&R.setElementStateById(T.id,Ot.DEFAULT),oe.edgeTextEdit&&T.text.editable&&R.setElementStateById(T.id,Ot.TEXT_EDIT),T.modelType===ht.POLYLINE_EDGE){var de=T,me=R.getPointByClient({x:m.x,y:m.y}).canvasOverlayPosition,Te=me.x,Ee=me.y,Xe=md({x:Te,y:Ee},de.points);de.dbClickPosition=Xe}R.eventCenter.emit(tt.EDGE_DBCLICK,{data:U,e:m,position:W})}else R.eventCenter.emit(tt.ELEMENT_CLICK,{data:U,e:m,position:W}),R.eventCenter.emit(tt.EDGE_CLICK,{data:U,e:m,position:W});var Ae=R.editConfigModel;R.selectEdgeById(T.id,mp(m,Ae)),o.toFront()}}),o}return t=a,(n=[{key:"getShape",value:function(){return Object(te.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,u=o.model,f=o.graphModel;if(u.state===Ot.TEXT_EDIT)return null;var d=!1,m=f.editConfigModel;return(u.text.draggable||m.edgeTextDraggable)&&(d=!0),Object(te.g)(J_,{ref:this.textRef,editable:m.edgeTextEdit&&u.text.editable,model:u,graphModel:f,draggable:d})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.startPoint,f=o.endPoint,d=o.isSelected;return{start:u,end:f,hover:this.state.hover,isSelected:d}}},{key:"getLastTwoPoints",value:function(){var o=this.props.model;return[o.startPoint,o.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var o=this.props.model,u=o.id,f=o.getArrowStyle(),d=f.refY,m=d===void 0?0:d,O=f.refX,S=O===void 0?2:O,T=rO(this.getLastTwoPoints(),2),R=T[0],U=T[1],W="auto";return R!==null&&U!==null&&(W=Qb({x:U.x-R.x,y:U.y-R.y,z:0})*(180/Math.PI)),Object(te.g)("g",null,Object(te.g)("defs",null,Object(te.g)("marker",{id:"marker-start-".concat(u),refX:-S,refY:m,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(te.g)("marker",{id:"marker-end-".concat(u),refX:S,refY:m,overflow:"visible",orient:W,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var o=this.props.model.getArrowStyle();return o.stroke,o.strokeWidth,o.offset,o.verticalLength,Object(te.g)("path",null)}},{key:"getEndArrow",value:function(){var o=this.props.model.getArrowStyle(),u=o.stroke,f=o.strokeWidth,d=o.offset,m=o.verticalLength;return Object(te.g)("path",{stroke:u,fill:u,strokeWidth:f,transform:"rotate(180)",d:"M 0 0 L ".concat(d," -").concat(m," L ").concat(d," ").concat(m," Z")})}},{key:"getAdjustPointShape",value:function(o,u,f){var d=f.getAdjustPointStyle();return Object(te.g)(hi,Oi({className:"lf-edge-adjust-point"},d,{x:o,y:u}))}},{key:"getAdjustPoints",value:function(){var o=this.props,u=o.model,f=o.graphModel,d=u.getAdjustStart(),m=u.getAdjustEnd();return Object(te.g)("g",null,Object(te.g)(Ly,Oi({type:"SOURCE"},d,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:f})),Object(te.g)(Ly,Oi({type:"TARGET"},m,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:f})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(te.g)("g",null)}},{key:"getAppend",value:function(){return Object(te.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var o=this.props,u=o.graphModel,f=o.model;u.overlapMode!==En.INCREASE&&u.toFront(f.id)}},{key:"render",value:function(){var o=this.props,u=o.model,f=u.isSelected,d=u.isHitable,m=u.isShowAdjustPoint;return o.graphModel.animation,Object(te.g)("g",null,Object(te.g)("g",{className:["lf-edge",!d&&"pointer-none",f&&"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()),m&&f?this.getAdjustPoints():"")}}])&&iO(t.prototype,n),a}(te.a);function Nl(e){return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nl(e)}function sO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return By(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return By(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function By(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xi=function(e){var t={d:""};return Object.entries(e).forEach(function(n){var r=sO(n,2),a=r[0],o=r[1],u=Nl(o);a!=="style"&&u==="object"||(t[a]=o)}),Object(te.g)("path",t)};function Cl(e){return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function Rl(){return Rl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rl.apply(this,arguments)}function cO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Il(e,t){return Il=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Il(e,t)}function fO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=fu(e);if(t){var a=fu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return pO(this,n)}}function pO(e,t){if(t&&(Cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function fu(e){return fu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},fu(e)}var Ll=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Il(o,u)})(a,e);var t,n,r=fO(a);function a(){return cO(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.startPoint,f=o.endPoint,d=o.isAnimation,m=o.arrowConfig,O=o.getEdgeStyle(),S=o.getEdgeAnimationStyle(),T=S.strokeDasharray,R=S.stroke,U=S.strokeDashoffset,W=S.animationName,oe=S.animationDuration,re=S.animationIterationCount,de=S.animationTimingFunction,me=S.animationDirection;return Object(te.g)(So,Rl({},O,{x1:u.x,y1:u.y,x2:f.x,y2:f.y},m,d?{strokeDasharray:T,stroke:R,style:{strokeDashoffset:U,animationName:W,animationDuration:oe,animationIterationCount:re,animationTimingFunction:de,animationDirection:me}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model,u=function(T){var R,U=T.start,W=T.end;if(U.x===W.x&&U.y===W.y)R="";else{var oe={start:U,end:W,offset:10,verticalLength:5},re=li(va(va({},oe),{},{type:"start"})),de=li(va(va({},oe),{},{type:"end"}));R="M".concat(re.leftX," ").concat(re.leftY,`
L`).concat(re.rightX," ").concat(re.rightY,`
L`).concat(de.rightX," ").concat(de.rightY,`
L`).concat(de.leftX," ").concat(de.leftY," z")}return{d:R,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:o.startPoint,end:o.endPoint}),f=u.d,d=u.strokeWidth,m=u.fill,O=u.strokeDasharray,S=u.stroke;return Object(te.g)(xi,{d:f,fill:m,strokeWidth:d,stroke:S,strokeDasharray:O})}}])&&lO(t.prototype,n),a}(wi);function zl(e){return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function dO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Fy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Fy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hO=function(e){var t={points:"",fill:"none"};return Object.entries(e).forEach(function(n){var r=dO(n,2),a=r[0],o=r[1];(a==="style"||zl(o)!=="object")&&(t[a]=o)}),Object(te.g)("polyline",t)};function Bl(e){return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function Hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hy(Object(n),!0).forEach(function(r){xr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fl(){return Fl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fl.apply(this,arguments)}function yO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Xy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Xy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Xy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hl(e,t){return Hl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Hl(e,t)}function vO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=du(e);if(t){var a=du(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return bO(this,n)}}function bO(e,t){if(t&&(Bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wr(e)}function wr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function du(e){return du=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},du(e)}function xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Hl(o,u)})(a,e);var t,n,r=vO(a);function a(){var o;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),xr(wr(o=r.call(this)),"drag",void 0),xr(wr(o),"isDragging",void 0),xr(wr(o),"isShowAdjustPointTemp",void 0),xr(wr(o),"appendInfo",void 0),xr(wr(o),"onDragStart",function(){var u=o.props.model;u.dragAppendStart(),o.isShowAdjustPointTemp=u.isShowAdjustPoint,u.isShowAdjustPoint=!1}),xr(wr(o),"onDragging",function(u){var f=u.deltaX,d=u.deltaY,m=o.props,O=m.model,S=m.graphModel;o.isDragging=!0;var T=S.transformModel,R=S.editConfigModel,U=yO(T.fixDeltaXY(f,d),2),W=U[0],oe=U[1],re=O,de=R.adjustEdgeMiddle;o.appendInfo=de?re.dragAppendSimple(o.appendInfo,{x:W,y:oe}):re.dragAppend(o.appendInfo,{x:W,y:oe})}),xr(wr(o),"onDragEnd",function(){var u=o.props,f=u.model,d=u.graphModel.eventCenter,m=f;m.dragAppendEnd(),o.isDragging=!1,m.isShowAdjustPoint=o.isShowAdjustPointTemp,o.appendInfo=void 0,d.emit(tt.EDGE_ADJUST,{data:m.getData()})}),xr(wr(o),"beforeDragStart",function(u,f){f.dragAble&&o.drag.handleMouseDown(u),o.appendInfo=f}),o.drag=new yr({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd,isStopPropagation:!1}),o}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.points,f=o.isAnimation,d=o.arrowConfig,m=o.getEdgeStyle(),O=o.getEdgeAnimationStyle(),S=O.strokeDasharray,T=O.stroke,R=O.strokeDashoffset,U=O.animationName,W=O.animationDuration,oe=O.animationIterationCount,re=O.animationTimingFunction,de=O.animationDirection;return Object(te.g)(hO,Fl({points:u},m,d,f?{strokeDasharray:S,stroke:T,style:{strokeDashoffset:R,animationName:U,animationDuration:W,animationIterationCount:oe,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.points,f=o.isSelected,d={start:null,end:null,hover:this.state.hover,isSelected:f},m=no(u);return m.length>=2&&(d.start=m[m.length-2],d.end=m[m.length-1]),d}},{key:"getLastTwoPoints",value:function(){var o=this.props.model.points,u=no(o);return u.length>=2?[u[u.length-2],u[u.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(o){var u,f=o.start,d=o.end;if(f.x===d.x&&f.y===d.y)u="";else{var m={start:f,end:d,offset:10,verticalLength:5},O=li(pu(pu({},m),{},{type:"start"})),S=li(pu(pu({},m),{},{type:"end"}));u="M".concat(O.leftX," ").concat(O.leftY,`
L`).concat(O.rightX," ").concat(O.rightY,`
L`).concat(S.rightX," ").concat(S.rightY,`
L`).concat(S.leftX," ").concat(S.leftY," z")}return{d:u,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var u=this.getAppendAttributes(o),f=u.d,d=u.strokeWidth,m=u.fill,O=u.strokeDasharray,S=u.stroke;return Object(te.g)(xi,{d:f,fill:m,strokeWidth:d,stroke:S,strokeDasharray:O})}},{key:"getAppendWidth",value:function(){for(var o=this,u=this.props,f=u.model,d=u.graphModel,m=f.pointsList,O=f.draggable,S=[],T=m.length,R=function(W){var oe="lf-polyline-append",re={start:{x:m[W].x,y:m[W].y},end:{x:m[W+1].x,y:m[W+1].y},startIndex:W,endIndex:W+1,direction:"",dragAble:!0},de=Object(te.g)("g",{className:oe},o.getAppendShape(re)),me=d.editConfigModel,Te=me.adjustEdge,Ee=me.adjustEdgeMiddle;if(Te&&O){var Xe=re.startIndex,Ae=re.endIndex,Be=Ee&&(Xe===0||Ae===T-1);re.dragAble=!Be,re.start.x===re.end.x?(re.dragAble&&(oe+="-ew-resize"),re.direction=At.VERTICAL):re.start.y===re.end.y&&(re.dragAble&&(oe+="-ns-resize"),re.direction=At.HORIZONTAL),de=Object(te.g)("g",{className:o.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(Re){return o.beforeDragStart(Re,re)}},Object(te.g)("g",{className:oe},o.getAppendShape(re)))}S.push(de)},U=0;U<T-1;U++)R(U);return Object(te.g)("g",null,S)}}])&&gO(t.prototype,n),a}(wi);function Gl(e){return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function mO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Gy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Gy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ul(){return Ul=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ul.apply(this,arguments)}function _O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yl(e,t){return Yl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Yl(e,t)}function wO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=hu(e);if(t){var a=hu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return xO(this,n)}}function xO(e,t){if(t&&(Gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function hu(e){return hu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},hu(e)}var Vl=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&Yl(o,u)})(a,e);var t,n,r=wO(a);function a(){return _O(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.getEdgeStyle(),f=o.path,d=o.isAnimation,m=o.arrowConfig,O=o.getEdgeAnimationStyle(),S=O.strokeDasharray,T=O.stroke,R=O.strokeDashoffset,U=O.animationName,W=O.animationDuration,oe=O.animationIterationCount,re=O.animationTimingFunction,de=O.animationDirection;return Object(te.g)(xi,Ul({d:f},u,m,d?{strokeDasharray:S,stroke:T,style:{strokeDashoffset:R,animationName:U,animationDuration:W,animationIterationCount:oe,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model.path;return Object(te.g)(xi,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=this.state.hover,f=o,d=f.path,m=f.isSelected,O=mO(bd(d),2);return{start:O[0],end:O[1],hover:u,isSelected:m}}},{key:"getLastTwoPoints",value:function(){var o=this.props.model.path;return bd(o)}}])&&OO(t.prototype,n),a}(wi);function Wl(e){return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function Uy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function EO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $l(e,t){return $l=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$l(e,t)}function PO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=yu(e);if(t){var a=yu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return kO(this,n)}}function kO(e,t){if(t&&(Wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function yu(e){return yu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},yu(e)}var TO=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&$l(o,u)})(a,e);var t,n,r=PO(a);function a(){return SO(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getArrowAttributes",value:function(){var o=this.props,u=o.arrowInfo,f=o.style,d=u.start,m=u.end,O={start:d,end:m,offset:f.offset,verticalLength:f.verticalLength,type:"end"},S=li(O),T=S.leftX,R=S.leftY,U=S.rightX,W=S.rightY;return function(oe){for(var re=1;re<arguments.length;re++){var de=arguments[re]!=null?arguments[re]:{};re%2?Uy(Object(de),!0).forEach(function(me){EO(oe,me,de[me])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(de)):Uy(Object(de)).forEach(function(me){Object.defineProperty(oe,me,Object.getOwnPropertyDescriptor(de,me))})}return oe}({d:"M".concat(T," ").concat(R," L").concat(m.x," ").concat(m.y," L").concat(U," ").concat(W," z")},f)}},{key:"getShape",value:function(){var o=this.getArrowAttributes(),u=o.d,f=o.strokeWidth,d=o.stroke,m=o.fill;return Object(te.g)(xi,{d:u,fill:m,strokeWidth:f,stroke:d})}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&jO(t.prototype,n),a}(te.a),Yy=function(e,t){return pe(e,t)},AO=function(e){var t=e==null?0:e.length;return t?e[t-1]:void 0},Kl=function(){return Ue.a.Date.now()},MO=/\s/,DO=function(e){for(var t=e.length;t--&&MO.test(e.charAt(t)););return t},NO=/^\s+/,CO=function(e){return e&&e.slice(0,DO(e)+1).replace(NO,"")},RO=/^[-+]0x[0-9a-f]+$/i,IO=/^0b[01]+$/i,LO=/^0o[0-7]+$/i,zO=parseInt,Vy=function(e){if(typeof e=="number")return e;if(ct(e))return NaN;if(Mt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Mt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=CO(e);var n=IO.test(e);return n||LO.test(e)?zO(e.slice(2),n?2:8):RO.test(e)?NaN:+e},BO=Math.max,FO=Math.min,HO=function(e,t,n){var r,a,o,u,f,d,m=0,O=!1,S=!1,T=!0;if(typeof e!="function")throw new TypeError("Expected a function");function R(me){var Te=r,Ee=a;return r=a=void 0,m=me,u=e.apply(Ee,Te)}function U(me){return m=me,f=setTimeout(oe,t),O?R(me):u}function W(me){var Te=me-d;return d===void 0||Te>=t||Te<0||S&&me-m>=o}function oe(){var me=Kl();if(W(me))return re(me);f=setTimeout(oe,function(Te){var Ee=t-(Te-d);return S?FO(Ee,o-(Te-m)):Ee}(me))}function re(me){return f=void 0,T&&r?R(me):(r=a=void 0,u)}function de(){var me=Kl(),Te=W(me);if(r=arguments,a=this,d=me,Te){if(f===void 0)return U(d);if(S)return clearTimeout(f),f=setTimeout(oe,t),R(d)}return f===void 0&&(f=setTimeout(oe,t)),u}return t=Vy(t)||0,Mt(n)&&(O=!!n.leading,o=(S="maxWait"in n)?BO(Vy(n.maxWait)||0,t):o,T="trailing"in n?!!n.trailing:T),de.cancel=function(){f!==void 0&&clearTimeout(f),m=0,r=d=a=f=void 0},de.flush=function(){return f===void 0?u:re(Kl())},de},XO=i(167);function GO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wy,$y,Ky,UO=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Xr(this,"undos",[]),Xr(this,"redos",[]),Xr(this,"callbacks",[]),Xr(this,"stopWatch",null),Xr(this,"curData",null),Xr(this,"maxSize",50),Xr(this,"waitTime",100),Xr(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,(n=[{key:"add",value:function(r){Yy(AO(this.undos),r)||(this.undos.push(r),Yy(this.curData,r)||(this.redos=[]),this.eventCenter.emit(tt.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 r=this.undos.pop();this.redos.push(r);var a=this.undos.pop();return this.curData=Dt(a),a}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var r=this.redos.pop();return this.curData=Dt(r),r}}},{key:"watch",value:function(r){var a=this;this.stopWatch&&this.stopWatch(),this.undos.push(r.modelToGraphData()),this.stopWatch=Object(XO.a)(r,HO(function(){var o=r.modelToHistoryData();o&&a.add(o)},this.waitTime))}}])&&GO(t.prototype,n),e}();function ql(e){return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function YO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return qy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return qy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function qy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Io(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zy(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zl(e,t){return Zl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zl(e,t)}function VO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=gu(e);if(t){var a=gu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return WO(this,n)}}function WO(e,t){if(t&&(ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lo(e)}function Lo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gu(e){return gu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gu(e)}function io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qy,eg,tg,Jl=Xn((Ky=$y=function(e){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&Zl(u,f)})(o,e);var t,n,r,a=VO(o);function o(){var u;return function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}(this,o),io(Lo(u=a.call(this)),"ref",Object(te.f)()),io(Lo(u),"__prevText",{type:"",text:"",id:""}),io(Lo(u),"keyupHandler",function(f){var d=u.props.graphModel.textEditElement;f.key==="Enter"&&f.altKey&&d.setElementState(0)}),io(Lo(u),"inputHandler",function(f){var d=f.target.innerText,m=u.props.graphModel.textEditElement;u.__prevText={type:m.type,text:d.replace(/(\r\n)+$|(\n)+$/,""),id:m.id}}),io(Lo(u),"keydownHandler",function(f){f.stopPropagation()}),u.state={style:{left:0,top:0}},u}return t=o,r=[{key:"getDerivedStateFromProps",value:function(u){var f,d=u.graphModel,m=d.transformModel,O=d.theme,S=d.textEditElement;if(S){var T;if((T=S.text)===null||T===void 0||!T.value)if(S.BaseType===Xt.EDGE){var R=(S=S).text,U=S.textPosition,W=U.x,oe=U.y;R.x=W,R.y=oe,S.setText(R)}else S=S;var re={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(S.BaseType===Xt.EDGE){var de=O.edgeText,me=de.overflowMode,Te=de.lineHeight,Ee=de.wrapPadding,Xe=de.textWidth;Xe&&me==="autoWrap"&&(f=Io(Io({},re),{},{width:Xe,minWidth:Xe,lineHeight:Te,padding:Ee}))}else if(S.BaseType===Xt.NODE){var Ae=O.nodeText,Be=Ae.overflowMode,Re=Ae.lineHeight,lt=Ae.wrapPadding,Et=Ae.textWidth,mt=S,jt=mt.width,Ft=mt.modelType;(Ft!==ht.TEXT_NODE&&Be==="autoWrap"||Ft===ht.TEXT_NODE&&Et)&&(f=Io(Io({},re),{},{width:Et||jt,minWidth:Et||jt,lineHeight:Re,padding:lt}))}var Wt=S.text,fn=Wt.x,ir=Wt.y,In=YO(m.CanvasPointToHtmlPoint([fn,ir]),2);return{style:Io({left:In[0],top:In[1]},f)}}}}],(n=[{key:"componentDidUpdate",value:function(){var u=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var f=this.__prevText,d=f.text,m=f.id;u.updateText(m,d),u.eventCenter.emit(tt.TEXT_UPDATE,Io({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(u){if(window.getSelection!==void 0&&document.createRange!==void 0){var f=document.createRange();f.selectNodeContents(u),f.collapse(!1);var d=window.getSelection();d.removeAllRanges(),d.addRange(f)}}},{key:"render",value:function(){var u,f=this.props.graphModel.textEditElement,d=this.state.style;return f?Object(te.g)("div",{contentEditable:!0,className:"lf-text-input",style:d,ref:this.ref,key:f.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(u=f.text)===null||u===void 0?void 0:u.value):null}}])&&Jy(t.prototype,n),r&&Jy(t,r),o}(te.a),io($y,"toolName","textEdit"),Wy=Ky))||Wy,$O=function(e){return e.modelType===ht.LINE_EDGE?function(t){var n=t.startPoint,r=t.endPoint,a=(n.x+r.x)/2,o=(n.y+r.y)/2,u=Math.abs(n.x-r.x)+10,f=Math.abs(n.y-r.y)+10;return{x:a-u/2,y:o-f/2,x1:a+u/2,y1:o+f/2}}(e):e.modelType===ht.POLYLINE_EDGE?function(t){var n=t.points,r=no(n),a=fi(r,8),o=a.x,u=a.y,f=a.width,d=a.height;return{x:o-f/2,y:u-d/2,x1:o+f/2,y1:u+d/2}}(e):e.modelType===ht.BEZIER_EDGE?function(t){var n=t.path,r=Ea(n),a=fi(r,8),o=a.x,u=a.y,f=a.width,d=a.height;return{x:o-f/2,y:u-d/2,x1:o+f/2,y1:u+d/2}}(e):void 0};function Ql(e){return Ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(e)}function ng(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(f.push(o.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||rg(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function KO(e){return function(t){if(Array.isArray(t))return ef(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||rg(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function rg(e,t){if(e){if(typeof e=="string")return ef(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ef(e,t):void 0}}function ef(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tf(e,t){return tf=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},tf(e,t)}function ZO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=vu(e);if(t){var a=vu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return JO(this,n)}}function JO(e,t){if(t&&(Ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ei(e)}function Ei(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vu(e){return vu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vu(e)}function Si(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nf=Xn((tg=eg=function(e){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),u&&tf(o,u)})(a,e);var t,n,r=ZO(a);function a(o){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),Si(Ei(u=r.call(this)),"stepDrag",void 0),Si(Ei(u),"handleMouseDown",function(O){u.stepDrag.handleMouseDown(O)}),Si(Ei(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY,R=u.props.graphModel,U=R.getSelectElements(!0);R.moveNodes(U.nodes.map(function(W){return W.id}),S,T)}),Si(Ei(u),"handleContextMenu",function(O){O.preventDefault();var S=u.props,T=S.graphModel,R=S.graphModel,U=R.eventCenter,W=R.selectElements,oe=T.getPointByClient({x:O.clientX,y:O.clientY}),re={nodes:[],edges:[]};KO(W.values()).forEach(function(de){de.BaseType===Xt.NODE&&re.nodes.push(de.getData()),de.BaseType===Xt.EDGE&&re.edges.push(de.getData())}),U.emit(tt.SELECTION_CONTEXTMENU,{data:re,e:O,position:oe})});var f=o.graphModel,d=f.gridSize,m=f.eventCenter;return u.stepDrag=new yr({onDragging:u.onDragging,step:d,eventType:"SELECTION",eventCenter:m}),u}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel,u=o.selectElements,f=o.transformModel;if(!(u.size<=1)){var d=Number.MAX_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER;u.forEach(function(W){var oe={x:0,y:0,x1:0,y1:0};W.BaseType===Xt.NODE&&(oe=function(re){var de=re.x,me=re.y,Te=re.width,Ee=re.height;return{x:de-Te/2,y:me-Ee/2,x1:de+Te/2,y1:me+Ee/2}}(W)),W.BaseType===Xt.EDGE&&(oe=$O(W)),d=Math.min(d,oe.x),m=Math.min(m,oe.y),O=Math.max(O,oe.x1),S=Math.max(S,oe.y1)});var T=ng(f.CanvasPointToHtmlPoint([d,m]),2);d=T[0],m=T[1];var R=ng(f.CanvasPointToHtmlPoint([O,S]),2);O=R[0],S=R[1];var U={left:"".concat(d-10,"px"),top:"".concat(m-10,"px"),width:"".concat(O-d+20,"px"),height:"".concat(S-m+20,"px")};return Object(te.g)("div",{className:"lf-multiple-select",style:U,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&qO(t.prototype,n),a}(te.a),Si(eg,"toolName","multipleSelect"),Qy=tg))||Qy;function QO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var e1=function(){function e(r){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),bu(this,"tools",void 0),bu(this,"components",void 0),bu(this,"toolMap",new Map),bu(this,"instance",void 0),this.instance=r,this.isDisabledTool(Jl.toolName)||this.registerTool(Jl.toolName,Jl),this.isDisabledTool(nf.toolName)||this.registerTool(nf.toolName,nf);var a=r.graphModel;a.eventCenter.on("".concat(tt.GRAPH_TRANSFORM,",").concat(tt.NODE_CLICK,",").concat(tt.BLANK_CLICK," "),function(){var o=a.textEditElement,u=a.editConfigModel,f=u.edgeTextEdit,d=u.nodeTextEdit;(f||d)&&o&&a.textEditElement.setElementState(Ot.DEFAULT)})}var t,n;return t=e,(n=[{key:"isDisabledTool",value:function(r){return this.instance.options.disabledTools.indexOf(r)!==-1}},{key:"registerTool",value:function(r,a){this.toolMap.set(r,a)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&QO(t.prototype,n),e}(),t1=i(168),n1=i.n(t1);function r1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var og=function(){function e(r){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),rf(this,"mousetrap",void 0),rf(this,"options",void 0),rf(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var a=r.lf;this.target=a.container,this.mousetrap=new n1.a(this.target),r.keyboard.enabled&&this.enable(!0)}var t,n;return t=e,(n=[{key:"initShortcuts",value:function(){var r=this,a=this.options.keyboard.shortcuts;if(a)if(Zt(a))a.forEach(function(d){var m=d.keys,O=d.callback,S=d.action;return r.on(m,O,S)});else{var o=a.keys,u=a.callback,f=a.action;this.on(o,u,f)}}},{key:"on",value:function(r,a,o){this.mousetrap.bind(this.getKeys(r),a,o)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(r,a){this.mousetrap.unbind(this.getKeys(r),a)}},{key:"enable",value:function(r){(this.disabled||r)&&(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(r){var a=this;return(Array.isArray(r)?r:[r]).map(function(o){return a.formatKey(o)})}},{key:"formatKey",value:function(r){return r.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&r1(t.prototype,n),e}(),o1=og,Er=null;function ig(e,t){return e.x+=t,e.y+=t,e.text&&(e.text.x+=t,e.text.y+=t),e}function ag(e,t){return e.startPoint&&(e.startPoint.x+=t,e.startPoint.y+=t),e.endPoint&&(e.endPoint.x+=t,e.endPoint.y+=t),e.pointsList&&e.pointsList.length>0&&e.pointsList.forEach(function(n){n.x+=t,n.y+=t}),e.text&&(e.text.x+=t,e.text.y+=t),e}function of(e){return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function ug(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ji(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ug(Object(n),!0).forEach(function(r){Bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ug(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var af=function(){function e(a){var o,u,f=this;(function(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")})(this,e),Bt(this,"container",void 0),Bt(this,"width",void 0),Bt(this,"height",void 0),Bt(this,"graphModel",void 0),Bt(this,"history",void 0),Bt(this,"viewMap",new Map),Bt(this,"tool",void 0),Bt(this,"keyboard",void 0),Bt(this,"dnd",void 0),Bt(this,"options",void 0),Bt(this,"snaplineModel",void 0),Bt(this,"components",[]),Bt(this,"plugins",void 0),Bt(this,"extension",{}),Bt(this,"adapterIn",void 0),Bt(this,"adapterOut",void 0),Bt(this,"getView",function(d){return f.viewMap.get(d)}),a=sh(a),this.options=a,this.container=this.initContainer(a.container),this.plugins=a.plugins,this.graphModel=new fm(ji({},a)),this.tool=new e1(this),this.history=new UO(this.graphModel.eventCenter),this.dnd=new u0({lf:this}),this.keyboard=new o1({lf:this,keyboard:a.keyboard}),a.snapline!==!1&&(this.snaplineModel=new by(this.graphModel),o=this.graphModel.eventCenter,u=this.snaplineModel,o.on("node:mousemove",function(d){var m=d.data;u.setNodeSnapLine(m)}),o.on("node:mouseup",function(){u.clearSnapline()})),function(d,m){var O=d.keyboard,S=O.options.keyboard;O.on(["cmd + c","ctrl + c"],function(){if(!S.enabled||m.textEditElement)return!0;var T=d.options.guards,R=m.getSelectElements(!1);return T&&T.beforeClone&&!T.beforeClone(R)||R.nodes.length===0&&R.edges.length===0?(Er=null,!0):((Er=R).nodes.forEach(function(U){return ig(U,40)}),Er.edges.forEach(function(U){return ag(U,40)}),!1)}),O.on(["cmd + v","ctrl + v"],function(){if(!S.enabled||m.textEditElement)return!0;if(Er&&(Er.nodes||Er.edges)){d.clearSelectElements();var T=d.addElements(Er);if(!T)return!0;T.nodes.forEach(function(R){return d.selectElementById(R.id,!0)}),T.edges.forEach(function(R){return d.selectElementById(R.id,!0)}),Er.nodes.forEach(function(R){return ig(R,40)}),Er.edges.forEach(function(R){return ag(R,40)})}return!1}),O.on(["cmd + z","ctrl + z"],function(){return!S.enabled||!!m.textEditElement||(d.undo(),!1)}),O.on(["cmd + y","ctrl + y"],function(){return!S.enabled||!!m.textEditElement||(d.redo(),!1)}),O.on(["backspace"],function(){if(!S.enabled||m.textEditElement)return!0;var T=m.getSelectElements(!0);return d.clearSelectElements(),T.edges.forEach(function(R){return d.deleteEdge(R.id)}),T.nodes.forEach(function(R){return d.deleteNode(R.id)}),!1})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(a.disabledPlugins)}var t,n,r;return t=e,n=[{key:"register",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof a=="string"){var f={BaseEdge:wi,BaseEdgeModel:ms,BaseNode:_r,BaseNodeModel:mr,RectNode:Jc,RectNodeModel:Dc,CircleNode:nl,CircleNodeModel:dc,PolygonNode:ul,PolygonNodeModel:kc,TextNode:ml,TextNodeModel:Ic,LineEdge:Ll,LineEdgeModel:Es,DiamondNode:fl,DiamondNodeModel:bc,PolylineEdge:Xl,PolylineEdgeModel:ks,BezierEdge:Vl,BezierEdgeModel:uc,EllipseNode:gl,EllipseNodeModel:wc,HtmlNode:xl,HtmlNodeModel:Bc,h:te.g,type:a};this.viewMap.forEach(function(T){var R=T.extendKey;R&&(f[R]=T)}),this.graphModel.modelMap.forEach(function(T){var R=T.extendKey;R&&(f[R]=T)});var d=o(f),m=d.view,O=d.model,S=m;u&&!S.isObervered&&(S.isObervered=!0,S=He(S)),this.setView(a,S),this.graphModel.setModel(a,O)}else this.registerElement(a)}},{key:"registerElement",value:function(a){var o=a.view;a.isObserverView===!1||o.isObervered||(o.isObervered=!0,o=He(o)),this.setView(a.type,o),this.graphModel.setModel(a.type,a.model)}},{key:"batchRegister",value:function(){var a=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(u){a.registerElement(u)})}},{key:"defaultRegister",value:function(){this.registerElement({view:Jc,model:Dc,type:"rect"}),this.registerElement({type:"circle",view:nl,model:dc}),this.registerElement({type:"polygon",view:ul,model:kc}),this.registerElement({type:"line",view:Ll,model:Es}),this.registerElement({type:"polyline",view:Xl,model:ks}),this.registerElement({type:"bezier",view:Vl,model:uc}),this.registerElement({type:"text",view:ml,model:Ic}),this.registerElement({type:"ellipse",view:gl,model:wc}),this.registerElement({type:"diamond",view:fl,model:bc}),this.registerElement({type:"html",view:xl,model:Bc})}},{key:"selectElementById",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1],u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];this.graphModel.selectElementById(a,o),!o&&u&&this.graphModel.toFront(a)}},{key:"focusOn",value:function(a){var o=this.graphModel.transformModel,u=a.coordinate,f=a.id;if(!u){var d=this.getNodeModelById(f);d&&(u=d.getData());var m=this.getEdgeModelById(f);m&&(u=m.textPosition)}var O=u,S=O.x,T=O.y;o.focusOn(S,T,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(a){this.graphModel.setTheme(a)}},{key:"resize",value:function(a,o){this.graphModel.resize(a,o),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(a){this.graphModel.setDefaultEdgeType(a)}},{key:"updateText",value:function(a,o){this.graphModel.updateText(a,o)}},{key:"deleteElement",value:function(a){var o,u,f,d=this.getModelById(a);return!!d&&(u=(f=(Bt(o={},Xt.NODE,this.deleteNode),Bt(o,Xt.EDGE,this.deleteEdge),o)[d.BaseType])===null||f===void 0?void 0:f.call(this,a))!==null&&u!==void 0&&u}},{key:"getModelById",value:function(a){return this.graphModel.getElement(a)}},{key:"getDataById",value:function(a){var o;return(o=this.graphModel.getElement(a))===null||o===void 0?void 0:o.getData()}},{key:"changeNodeType",value:function(a,o){this.graphModel.changeNodeType(a,o)}},{key:"changeEdgeType",value:function(a,o){this.graphModel.changeEdgeType(a,o)}},{key:"getNodeEdges",value:function(a){return this.graphModel.getNodeEdges(a)}},{key:"addNode",value:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt.NODE_ADD,u=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(a,o,u)}},{key:"deleteNode",value:function(a){var o=this.graphModel.getNodeModelById(a);if(!o)return!1;var u=o.getData(),f=this.options.guards,d=!f||!f.beforeDelete||f.beforeDelete(u);return d&&this.graphModel.deleteNode(a),d}},{key:"cloneNode",value:function(a){var o=this.graphModel.getNodeModelById(a).getData(),u=this.options.guards;if(!u||!u.beforeClone||u.beforeClone(o))return this.graphModel.cloneNode(a)}},{key:"changeNodeId",value:function(a,o){return this.graphModel.changeNodeId(a,o)}},{key:"getNodeModelById",value:function(a){return this.graphModel.getNodeModelById(a)}},{key:"getNodeDataById",value:function(a){var o;return(o=this.graphModel.getNodeModelById(a))===null||o===void 0?void 0:o.getData()}},{key:"addEdge",value:function(a){return this.graphModel.addEdge(a)}},{key:"deleteEdge",value:function(a){var o=this.options.guards,u=this.graphModel.edgesMap[a];if(!u)return!1;var f=u.model.getData(),d=!o||!o.beforeDelete||o.beforeDelete(f);return d&&this.graphModel.deleteEdgeById(a),d}},{key:"deleteEdgeByNodeId",value:function(a){var o=a.sourceNodeId,u=a.targetNodeId;o&&u?this.graphModel.deleteEdgeBySourceAndTarget(o,u):o?this.graphModel.deleteEdgeBySource(o):u&&this.graphModel.deleteEdgeByTarget(u)}},{key:"changeEdgeId",value:function(a,o){return this.graphModel.changeEdgeId(a,o)}},{key:"getEdgeModelById",value:function(a){var o;return(o=this.graphModel.edgesMap[a])===null||o===void 0?void 0:o.model}},{key:"getEdgeModels",value:function(a){var o=this.graphModel.edges,u=a.sourceNodeId,f=a.targetNodeId;if(u&&f){var d=[];return o.forEach(function(S){S.sourceNodeId===u&&S.targetNodeId===f&&d.push(S)}),d}if(u){var m=[];return o.forEach(function(S){S.sourceNodeId===u&&m.push(S)}),m}if(f){var O=[];return o.forEach(function(S){S.targetNodeId===f&&O.push(S)}),O}return[]}},{key:"getEdgeDataById",value:function(a){var o;return(o=this.getEdgeModelById(a))===null||o===void 0?void 0:o.getData()}},{key:"getNodeIncomingEdge",value:function(a){return this.graphModel.getNodeIncomingEdge(a)}},{key:"getNodeOutgoingEdge",value:function(a){return this.graphModel.getNodeOutgoingEdge(a)}},{key:"getNodeIncomingNode",value:function(a){return this.graphModel.getNodeIncomingNode(a)}},{key:"getNodeOutgoingNode",value:function(a){return this.graphModel.getNodeOutgoingNode(a)}},{key:"editText",value:function(a){this.graphModel.editText(a)}},{key:"setProperties",value:function(a,o){var u;(u=this.graphModel.getElement(a))===null||u===void 0||u.setProperties(en(o))}},{key:"deleteProperty",value:function(a,o){var u;(u=this.graphModel.getElement(a))===null||u===void 0||u.deleteProperty(o)}},{key:"getProperties",value:function(a){var o;return(o=this.graphModel.getElement(a))===null||o===void 0?void 0:o.getProperties()}},{key:"toFront",value:function(a){this.graphModel.toFront(a)}},{key:"setElementZIndex",value:function(a,o){return this.graphModel.setElementZIndex(a,o)}},{key:"addElements",value:function(a){for(var o=this,u=a.nodes,f=a.edges,d={},m={nodes:[],edges:[]},O=0;O<u.length;O++){var S=u[O],T=S.id,R=this.addNode(S);if(!R)return;T&&(d[T]=R.id),m.nodes.push(R)}return f.forEach(function(U){var W=U.sourceNodeId,oe=U.targetNodeId;d[W]&&(W=d[W]),d[oe]&&(oe=d[oe]);var re=o.graphModel.addEdge(ji(ji({},U),{},{sourceNodeId:W,targetNodeId:oe}));m.edges.push(re)}),m}},{key:"getAreaElement",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],f=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return this.graphModel.getAreaElement(a,o,u,f,d).map(function(m){return m.getData()})}},{key:"getSelectElements",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.graphModel.getSelectElements(a)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var a=this.graphModel.modelToGraphData();if(this.adapterOut){for(var o=arguments.length,u=new Array(o),f=0;f<o;f++)u[f]=arguments[f];return this.adapterOut.apply(this,[a].concat(u))}return a}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(a){this.graphModel.editConfigModel.updateEditConfig(a)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(a,o){return this.graphModel.getPointByClient({x:a,y:o})}},{key:"undo",value:function(){if(this.history.undoAble()){var a=en(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"redo",value:function(){if(this.history.redoAble()){var a=en(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"zoom",value:function(a,o){return this.graphModel.transformModel.zoom(a,o)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(a){this.graphModel.transformModel.setZoomMiniSize(a)}},{key:"setZoomMaxSize",value:function(a){this.graphModel.transformModel.setZoomMaxSize(a)}},{key:"getTransform",value:function(){var a=this.graphModel.transformModel;return{SCALE_X:a.SCALE_X,SCALE_Y:a.SCALE_Y,TRANSLATE_X:a.TRANSLATE_X,TRANSLATE_Y:a.TRANSLATE_Y}}},{key:"translate",value:function(a,o){this.graphModel.transformModel.translate(a,o)}},{key:"resetTranslate",value:function(){var a=this.graphModel.transformModel,o=a.TRANSLATE_X,u=a.TRANSLATE_Y;this.translate(-o,-u)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(a,o){o===void 0&&(o=a),this.graphModel.fitView(a,o)}},{key:"openEdgeAnimation",value:function(a){this.graphModel.openEdgeAnimation(a)}},{key:"closeEdgeAnimation",value:function(a){this.graphModel.closeEdgeAnimation(a)}},{key:"on",value:function(a,o){this.graphModel.eventCenter.on(a,o)}},{key:"off",value:function(a,o){this.graphModel.eventCenter.off(a,o)}},{key:"once",value:function(a,o){this.graphModel.eventCenter.once(a,o)}},{key:"emit",value:function(a,o){this.graphModel.eventCenter.emit(a,o)}},{key:"initContainer",value:function(a){var o=document.createElement("div");return o.style.position="relative",o.style.width="100%",o.style.height="100%",a.innerHTML="",a.appendChild(o),o}},{key:"installPlugins",value:function(){var a,o=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=(a=this.plugins)!==null&&a!==void 0?a:e.extensions;f.forEach(function(d){var m=d.pluginName||d.name;u.indexOf(m)===-1&&o.installPlugin(d)})}},{key:"installPlugin",value:function(a){if(of(a)==="object"){var o=a.install,u=a.render;return o&&o.call(a,this,e),u&&this.components.push(u.bind(a)),void(this.extension[a.pluginName]=a)}var f=a,d=new f({lf:this,LogicFlow:e,options:this.options.pluginsOptions});d.render&&this.components.push(d.render.bind(d)),this.extension[f.pluginName]=d}},{key:"updateAttributes",value:function(a,o){this.graphModel.updateAttributes(a,o)}},{key:"createFakerNode",value:function(a){var o=this.graphModel.modelMap.get(a.type);if(o){var u=new o(ji(ji({},a),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(u),u}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(a){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(a)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(a,o){this.viewMap.set(a,o)}},{key:"renderRawData",value:function(a){this.graphModel.graphDataToModel(en(a)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(te.j)(Object(te.g)(i0,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(tt.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(a=this.adapterIn(a)),this.renderRawData(a)}}],r=[{key:"use",value:function(a){var o=a.pluginName;o||(o=a.name);var u=this.extensions.get(o);u&&u.destroy&&u.destroy(),this.extensions.set(o,a)}}],n&&sg(t.prototype,n),r&&sg(t,r),e}();function Xn(e){return He(e)}Bt(af,"extensions",new Map),p.default=af}])})})(sf,sf.exports);var Ze=sf.exports;const xu=u1(Ze),g1=[{type:"bpmn:startEvent",text:"开始",class:"bpmn-start"},{type:"bpmn:endEvent",text:"结束",class:"bpmn-end"},{type:"bpmn:exclusiveGateway",text:"网关",class:"bpmn-exclusiveGateway"},{type:"bpmn:userTask",text:"用户",class:"bpmn-user"}];function v1(v,y){return y={exports:{}},v(y,y.exports),y.exports}var b1=v1(function(v){var y=v.exports=function(s,p){if(p||(p=16),s===void 0&&(s=128),s<=0)return"0";for(var i=Math.log(Math.pow(2,s))/Math.log(p),l=2;i===1/0;l*=2)i=Math.log(Math.pow(2,s/l))/Math.log(p)*l;for(var c=i-Math.floor(i),b="",l=0;l<Math.floor(i);l++){var _=Math.floor(Math.random()*p).toString(p);b=_+b}if(c){var E=Math.pow(p,c),_=Math.floor(Math.random()*E).toString(p);b=_+b}var w=parseInt(b,p);return w!==1/0&&w>=Math.pow(2,s)?y(s,p):b};y.rack=function(s,p,i){var l=function(b){var _=0;do{if(_++>10)if(i)s+=i;else throw new Error("too many ID collisions, use more bits");var E=y(s,p)}while(Object.hasOwnProperty.call(c,E));return c[E]=b,E},c=l.hats={};return l.get=function(b){return l.hats[b]},l.set=function(b,_){return l.hats[b]=_,l},l.bits=s||128,l.base=p||16,l}});function ur(v){if(!(this instanceof ur))return new ur(v);v=v||[128,36,1],this._seed=v.length?b1.rack(v[0],v[1],v[2]):v}ur.prototype.next=function(v){return this._seed(v||!0)};ur.prototype.nextPrefixed=function(v,y){var s;do s=v+this.next(!0);while(this.assigned(s));return this.claim(s,y),s};ur.prototype.claim=function(v,y){this._seed.set(v,y||!0)};ur.prototype.assigned=function(v){return this._seed.get(v)||!1};ur.prototype.unclaim=function(v){delete this._seed.hats[v]};ur.prototype.clear=function(){var v=this._seed.hats,y;for(y in v)this.unclaim(y)};var m1=new ur([32,32,1]);function Yo(){return m1.next()}var Yg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),_1=function(v){Yg(y,v);function y(s,p){var i=this;return s.id||(s.id="Event_"+Yo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=v.call(this,s,p)||this,i}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedTargetRules=function(){var s=v.prototype.getConnectedTargetRules.call(this),p={message:"起始节点不能作为边的终点",validate:function(){return!1}};return s.push(p),s},y.extendKey="StartEventModel",y}(Ze.CircleNodeModel),O1=function(v){Yg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.extendKey="StartEventNode",y}(Ze.CircleNode),w1={type:"bpmn:startEvent",view:O1,model:_1},Vg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Pu=globalThis&&globalThis.__assign||function(){return Pu=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Pu.apply(this,arguments)},x1=function(v){Vg(y,v);function y(s,p){var i=this;return s.id||(s.id="Event_"+Yo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=v.call(this,s,p)||this,i}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedSourceRules=function(){var s=v.prototype.getConnectedSourceRules.call(this),p={message:"结束节点不能作为边的起点",validate:function(){return!1}};return s.push(p),s},y.extendKey="EndEventModel",y}(Ze.CircleNodeModel),E1=function(v){Vg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},y.prototype.getShape=function(){var s=this.props.model,p=s.getNodeStyle(),i=s.x,l=s.y,c=s.r,b=v.prototype.getShape.call(this);return Ze.h("g",{},b,Ze.h("circle",Pu(Pu({},p),{cx:i,cy:l,r:c-5})))},y.extendKey="EndEventView",y}(Ze.CircleNode),S1={type:"bpmn:endEvent",view:E1,model:x1},Wg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Mi=globalThis&&globalThis.__assign||function(){return Mi=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Mi.apply(this,arguments)},j1=function(v){Wg(y,v);function y(s,p){var i=this;return s.id||(s.id="Gateway_"+Yo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=v.call(this,s,p)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return y.extendKey="ExclusiveGatewayModel",y}(Ze.PolygonNodeModel),P1=function(v){Wg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.points,_=s.getNodeStyle();return Ze.h("g",{transform:"matrix(1 0 0 1 "+(p-l/2)+" "+(i-c/2)+")"},Ze.h("polygon",Mi(Mi({},_),{x:p,y:i,points:b})),Ze.h("path",Mi({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},_)))},y.extendKey="ExclusiveGatewayNode",y}(Ze.PolygonNode),k1={type:"bpmn:exclusiveGateway",view:P1,model:j1},$g=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),ku=globalThis&&globalThis.__assign||function(){return ku=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},ku.apply(this,arguments)},T1=function(v){$g(y,v);function y(s,p){var i=this;return s.id||(s.id="Activity_"+Yo()),i=v.call(this,s,p)||this,i}return y.extendKey="UserTaskModel",y}(Ze.RectNodeModel),A1=function(v){$g(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.getNodeStyle();return Ze.h("svg",{x:p-l/2+5,y:i-c/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Ze.h("path",{fill:b.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},y.prototype.getShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.radius,_=s.getNodeStyle();return Ze.h("g",{},[Ze.h("rect",ku(ku({},_),{x:p-l/2,y:i-c/2,rx:b,ry:b,width:l,height:c})),this.getLabelShape()])},y.extendKey="UserTaskNode",y}(Ze.RectNode),M1={type:"bpmn:userTask",view:A1,model:T1},Kg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),cf=globalThis&&globalThis.__assign||function(){return cf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},cf.apply(this,arguments)},D1=function(v){Kg(y,v);function y(s,p){var i=this;return s.id||(s.id="Activity_"+Yo()),i=v.call(this,s,p)||this,i}return y.extendKey="ServiceTaskModel",y}(Ze.RectNodeModel),N1=function(v){Kg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.getNodeStyle();return Ze.h("svg",{x:p-l/2+5,y:i-c/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Ze.h("path",{fill:b.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},y.prototype.getShape=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.radius,_=s.getNodeStyle();return Ze.h("g",{},[Ze.h("rect",cf({x:p-l/2,y:i-c/2,rx:b,ry:b,width:l,height:c},_)),this.getLabelShape()])},y.extendKey="ServiceTaskNode",y}(Ze.RectNode),C1={type:"bpmn:serviceTask",view:N1,model:D1},qg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),R1=function(v){qg(y,v);function y(s,p){var i=this;return s.id||(s.id="Flow_"+Yo()),i=v.call(this,s,p)||this,i}return y.extendKey="SequenceFlowModel",y}(Ze.PolylineEdgeModel),I1=function(v){qg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.extendKey="SequenceFlowEdge",y}(Ze.PolylineEdge),L1={type:"bpmn:sequenceFlow",view:I1,model:R1},hg={width:40,height:40},yg={width:40,height:40},gg={width:40,height:40},vg={width:100,height:80},bg={width:100,height:80},z1={rect:{radius:5,stroke:"rgb(24, 125, 255)"},circle:{r:18,stroke:"rgb(24, 125, 255)"},polygon:{stroke:"rgb(24, 125, 255)"},polyline:{stroke:"rgb(24, 125, 255)",hoverStroke:"rgb(24, 125, 255)",selectedStroke:"rgb(24, 125, 255)"},edgeText:{background:{fill:"white",height:14,stroke:"transparent",radius:3}}},B1=function(){function v(y){var s=y.lf;s.setTheme(z1),s.register(w1),s.register(S1),s.register(k1),s.register(M1),s.register(C1),s.options.customBpmnEdge||(s.register(L1),s.setDefaultEdgeType("bpmn:sequenceFlow"))}return v.pluginName="bpmnElement",v}(),F1=function(){function v(y){var s=this,p=y.lf;this.lf=p,this.customCssRules="",this.useGlobalRules=!0,p.getSnapshot=function(i,l){s.getSnapshot(i,l)},p.getSnapshotBlob=function(i){return s.getSnapshotBlob(i)},p.getSnapshotBase64=function(i){return s.getSnapshotBase64(i)}}return v.prototype.getSvgRootElement=function(y){var s=y.container.querySelector(".lf-canvas-overlay");return s},v.prototype.triggerDownload=function(y){var s=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),p=document.createElement("a");p.setAttribute("download",this.fileName),p.setAttribute("href",y),p.setAttribute("target","_blank"),p.dispatchEvent(s)},v.prototype.removeAnchor=function(y){for(var s=y.childNodes,p=y.childNodes&&y.childNodes.length,i=0;i<p;i++){var l=s[i],c=l.classList&&Array.from(l.classList)||[];c.indexOf("lf-anchor")>-1&&(y.removeChild(y.childNodes[i]),p--,i--)}},v.prototype.getSnapshot=function(y,s){var p=this;this.fileName=y||"logic-flow."+Date.now()+".png";var i=this.getSvgRootElement(this.lf);this.getCanvasData(i,s).then(function(l){var c=l.toDataURL("image/png").replace("image/png","image/octet-stream");p.triggerDownload(c)})},v.prototype.getSnapshotBase64=function(y){var s=this,p=this.getSvgRootElement(this.lf);return new Promise(function(i){s.getCanvasData(p,y).then(function(l){var c=l.toDataURL("image/png");i({data:c,width:l.width,height:l.height})})})},v.prototype.getSnapshotBlob=function(y){var s=this,p=this.getSvgRootElement(this.lf);return new Promise(function(i){s.getCanvasData(p,y).then(function(l){l.toBlob(function(c){i({data:c,width:l.width,height:l.height})},"image/png")})})},v.prototype.getClassRules=function(){var y="";if(this.useGlobalRules)for(var s=document.styleSheets,p=0;p<s.length;p++)for(var i=s[p],l=0;l<i.cssRules.length;l++)y+=i.cssRules[l].cssText;return this.customCssRules&&(y+=this.customCssRules),y},v.prototype.getCanvasData=function(y,s){var p=this,i=y.cloneNode(!0),l=i.lastChild,c=l.childNodes&&l.childNodes.length;if(c)for(var b=0;b<c;b++){var _=l.childNodes[b],E=_.classList&&Array.from(_.classList);if(E&&E.indexOf("lf-base")<0)l.removeChild(l.childNodes[b]),c--,b--;else{var w=l.childNodes[b];w&&w.childNodes.forEach(function(le){var ce=le;p.removeAnchor(ce.firstChild)})}}var k=window.devicePixelRatio||1,j=document.createElement("canvas"),P=this.lf.graphModel.rootEl.querySelector(".lf-base"),D=P.getBoundingClientRect(),N=document.querySelector(".lf-canvas-overlay").getBoundingClientRect(),L=D.x-N.x,B=D.y-N.y,X=this.lf.graphModel,ee=X.transformModel,ie=ee.SCALE_X,Z=ee.SCALE_Y,V=ee.TRANSLATE_X,K=ee.TRANSLATE_Y;i.lastChild.style.transform="matrix(1, 0, 0, 1, "+((-L+V)*(1/ie)+10)+", "+((-B+K)*(1/Z)+10)+")";var z=Math.ceil(D.width/ie),M=Math.ceil(D.height/Z);j.style.width=z+"px",j.style.height=M+"px",j.width=z*k+80,j.height=M*k+80;var I=j.getContext("2d");I.clearRect(0,0,j.width,j.height),I.scale(k,k),s?(I.fillStyle=s,I.fillRect(0,0,z*k+80,M*k+80)):I.clearRect(0,0,z,M);var C=new Image,F=document.createElement("style");F.innerHTML=this.getClassRules();var J=document.createElement("foreignObject");return J.appendChild(F),i.appendChild(J),new Promise(function(le){C.onload=function(){var xe=navigator.userAgent.indexOf("Firefox")>-1;try{xe?createImageBitmap(C,{resizeWidth:j.width,resizeHeight:j.height}).then(function(ge){I.drawImage(ge,0,0),le(j)}):(I.drawImage(C,0,0),le(j))}catch{I.drawImage(C,0,0),le(j)}};var ce="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(i),ye=ce.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");C.src=ye})},v.pluginName="snapshot",v}(),H1=new ur([32,32,1]);function mg(){return H1.next()}function Zg(v){return Object.prototype.toString.call(v)}function X1(v){return" ".repeat(v)}function Tu(v){var y=v;return Zg(v)==="[object Object]"?(y={},Object.keys(v).forEach(function(s){var p=s;s.charAt(0)==="-"&&(p=s.substring(1)),y[p]=Tu(v[s])})):Array.isArray(v)&&(y=[],v.forEach(function(s,p){y[p]=Tu(s)})),y}function G1(v){var y=v;try{typeof y!="string"&&(y=JSON.parse(v))}catch{y=JSON.stringify(Tu(v)).replace(/"/g,"'")}return y}var Bo=`
`;function Eu(v,y,s){var p=X1(s),i="";if(y==="#text")return Bo+p+v;if(y==="#cdata-section")return Bo+p+"<![CDATA["+v+"]]>";if(y==="#comment")return Bo+p+"<!--"+v+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+G1(v)+'"';if(Array.isArray(v))v.forEach(function(_){i+=Eu(_,y,s+1)});else if(Zg(v)==="[object Object]"){var l=Object.keys(v),c="",b="";i+=(s===0?"":Bo+p)+"<"+y,l.forEach(function(_){_.charAt(0)==="-"?c+=Eu(v[_],_,s+1):b+=Eu(v[_],_,s+1)}),i+=c+(b!==""?">"+b+(Bo+p)+"</"+y+">":" />")}else i+=Bo+p+("<"+y+">"+v.toString()+"</"+y+">");return i}function U1(v){var y="";for(var s in v)y+=Eu(v[s],s,0);return y}var dn=function(){};dn.ObjTree=function(){return this};dn.ObjTree.VERSION="0.23";dn.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
`;dn.ObjTree.prototype.attr_prefix="-";dn.ObjTree.prototype.parseXML=function(v){var y;if(window.DOMParser){var s=new DOMParser,p=s.parseFromString(v,"application/xml");if(!p)return;y=p.documentElement}else window.ActiveXObject&&(s=new ActiveXObject("Microsoft.XMLDOM"),s.async=!1,s.loadXML(v),y=s.documentElement);if(y)return this.parseDOM(y)};dn.ObjTree.prototype.parseHTTP=function(v,y,s){var p={};for(var i in y)p[i]=y[i];if(p.method||(typeof p.postBody>"u"&&typeof p.postbody>"u"&&typeof p.parameters>"u"?p.method="get":p.method="post"),s){p.asynchronous=!0;var l=this,c=s,b=p.onComplete;p.onComplete=function(w){var k;w&&w.responseXML&&w.responseXML.documentElement&&(k=l.parseDOM(w.responseXML.documentElement)),c(k,w),b&&b(w)}}else p.asynchronous=!1;var _;if(typeof HTTP<"u"&&HTTP.Request){p.uri=v;var E=new HTTP.Request(p);E&&(_=E.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var E=new Ajax.Request(v,p);E&&(_=E.transport)}if(s)return _;if(_&&_.responseXML&&_.responseXML.documentElement)return this.parseDOM(_.responseXML.documentElement)};dn.ObjTree.prototype.parseDOM=function(v){if(v){if(this.__force_array={},this.force_array)for(var y=0;y<this.force_array.length;y++)this.__force_array[this.force_array[y]]=1;var s=this.parseElement(v);if(this.__force_array[v.nodeName]&&(s=[s]),v.nodeType!=11){var p={};p[v.nodeName]=s,s=p}return s}};dn.ObjTree.prototype.parseElement=function(v){if(v.nodeType!=7){if(v.nodeType==3||v.nodeType==4||v.nodeType==8){var y=v.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:v.nodeValue}var s=null,p={};if(v.attributes&&v.attributes.length){s={};for(var i=0;i<v.attributes.length;i++){var l=v.attributes[i].nodeName;if(typeof l=="string"){var c=v.attributes[i].nodeValue;try{c=JSON.parse(v.attributes[i].nodeValue.replace(/'/g,'"'))}catch{c=v.attributes[i].nodeValue}c&&(l=this.attr_prefix+l,typeof p[l]>"u"&&(p[l]=0),p[l]++,this.addNode(s,l,p[l],c))}}}if(v.childNodes&&v.childNodes.length){var b=!0;s&&(b=!1);for(var i=0;i<v.childNodes.length&&b;i++){var _=v.childNodes[i].nodeType;_==3||_==4||_==8||(b=!1)}if(b){s||(s="");for(var i=0;i<v.childNodes.length;i++)s+=v.childNodes[i].nodeValue}else{s||(s={});for(var i=0;i<v.childNodes.length;i++){var l=v.childNodes[i].nodeName;if(typeof l=="string"){var c=this.parseElement(v.childNodes[i]);c&&(typeof p[l]>"u"&&(p[l]=0),p[l]++,this.addNode(s,l,p[l],c))}}}}else s===null&&(s={});return s}};dn.ObjTree.prototype.addNode=function(v,y,s,p){this.__force_array[y]?(s==1&&(v[y]=[]),v[y][v[y].length]=p):s==1?v[y]=p:s==2?v[y]=[v[y],p]:v[y][v[y].length]=p};dn.ObjTree.prototype.writeXML=function(v){var y=this.hash_to_xml(null,v);return this.xmlDecl+y};dn.ObjTree.prototype.hash_to_xml=function(v,y){var s=[],p=[];for(var i in y)if(y.hasOwnProperty(i)){var l=y[i];i.charAt(0)!=this.attr_prefix?typeof l>"u"||l==null?s[s.length]="<"+i+" />":typeof l=="object"&&l.constructor==Array?s[s.length]=this.array_to_xml(i,l):typeof l=="object"?s[s.length]=this.hash_to_xml(i,l):s[s.length]=this.scalar_to_xml(i,l):p[p.length]=" "+i.substring(1)+'="'+this.xml_escape(l)+'"'}var c=p.join(""),b=s.join("");return typeof v>"u"||v==null||(s.length>0?b.match(/\n/)?b="<"+v+c+`>
`+b+"</"+v+`>
`:b="<"+v+c+">"+b+"</"+v+`>
`:b="<"+v+c+` />
`),b};dn.ObjTree.prototype.array_to_xml=function(v,y){for(var s=[],p=0;p<y.length;p++){var i=y[p];typeof i>"u"||i==null?s[s.length]="<"+v+" />":typeof i=="object"&&i.constructor==Array?s[s.length]=this.array_to_xml(v,i):typeof i=="object"?s[s.length]=this.hash_to_xml(v,i):s[s.length]=this.scalar_to_xml(v,i)}return s.join("")};dn.ObjTree.prototype.scalar_to_xml=function(v,y){return v=="#text"?this.xml_escape(y):"<"+v+">"+this.xml_escape(y)+"</"+v+`>
`};dn.ObjTree.prototype.xml_escape=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var Y1=function(v){return new dn.ObjTree().parseXML(v)},V1=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),lf=globalThis&&globalThis.__assign||function(){return lf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},lf.apply(this,arguments)},Iu=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},sr;(function(v){v.START="bpmn:startEvent",v.END="bpmn:endEvent",v.GATEWAY="bpmn:exclusiveGateway",v.USER="bpmn:userTask",v.SYSTEM="bpmn:serviceTask",v.FLOW="bpmn:sequenceFlow"})(sr||(sr={}));var Jg=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],_g=["properties","startPoint","endPoint","pointsList"];function Og(v){var y=v?_g.concat(v):_g;return function(s){function p(i){var l={};return typeof i=="string"?i:Array.isArray(i)?i.map(function(c){return p(c)}):(Object.entries(i).forEach(function(c){var b=Iu(c,2),_=b[0],E=b[1];typeof E!="object"?_.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(_)?l[_]=E:l["-"+_]=E:y.includes(_)?l["-"+_]=p(E):l[_]=p(E)}),l)}return p(s)}}function Au(v){var y={};return Object.entries(v).forEach(function(s){var p=Iu(s,2),i=p[0],l=p[1];i.indexOf("-")===0?y[i.substring(1)]=Tu(l):typeof l=="string"?y[i]=l:Object.prototype.toString.call(l)==="[object Object]"?y[i]=Au(l):Array.isArray(l)?y[i]=l.map(function(c){return Au(c)}):y[i]=l}),y}function W1(v,y,s){var p=new Map;y.nodes.forEach(function(l){var c,b={"-id":l.id};if(!((c=l.text)===null||c===void 0)&&c.value&&(b["-name"]=l.text.value),l.properties){var _=Og(s)(l.properties);Object.assign(b,_)}p.set(l.id,b),v[l.type]?Array.isArray(v[l.type])?v[l.type].push(b):v[l.type]=[v[l.type],b]:v[l.type]=b});var i=y.edges.map(function(l){var c,b,_=p.get(l.targetNodeId);_["bpmn:incoming"]?Array.isArray(_["bpmn:incoming"])?_["bpmn:incoming"].push(l.id):_["bpmn:incoming"]=[_["bpmn:incoming"],l.id]:_["bpmn:incoming"]=l.id;var E={"-id":l.id,"-sourceRef":l.sourceNodeId,"-targetRef":l.targetNodeId};if(!((c=l.text)===null||c===void 0)&&c.value&&(E["-name"]=(b=l.text)===null||b===void 0?void 0:b.value),l.properties){var w=Og(s)(l.properties);Object.assign(E,w)}return E});y.edges.forEach(function(l){var c=p.get(l.sourceNodeId);c["bpmn:outgoing"]?Array.isArray(c["bpmn:outgoing"])?c["bpmn:outgoing"].push(l.id):c["bpmn:outgoing"]=[c["bpmn:outgoing"],l.id]:c["bpmn:outgoing"]=l.id}),v[sr.FLOW]=i}function $1(v,y){v["bpmndi:BPMNEdge"]=y.edges.map(function(s){var p,i=s.id,l=s.pointsList.map(function(b){var _=b.x,E=b.y;return{"-x":_,"-y":E}}),c={"-id":i+"_di","-bpmnElement":i,"di:waypoint":l};return!((p=s.text)===null||p===void 0)&&p.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":s.text.x-s.text.value.length*10/2,"-y":s.text.y-7,"-width":s.text.value.length*10,"-height":14}}),c}),v["bpmndi:BPMNShape"]=y.nodes.map(function(s){var p,i=s.id,l=100,c=80,b=s.x,_=s.y,E=Vr.shapeConfigMap.get(s.type);E&&(l=E.width,c=E.height),b-=l/2,_-=c/2;var w={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":b,"-y":_,"-width":l,"-height":c}};return!((p=s.text)===null||p===void 0)&&p.value&&(w["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":s.text.x-s.text.value.length*10/2,"-y":s.text.y-7,"-width":s.text.value.length*10,"-height":14}}),w})}function K1(v){var y=[],s=[],p=v["bpmn:definitions"];if(p){var i=p["bpmn:process"];Object.keys(i).forEach(function(l){if(l.indexOf("bpmn:")===0){var c=i[l];if(l===sr.FLOW){var b=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];s=Z1(c,b)}else{var _=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];y=y.concat(q1(c,_,l))}}})}return{nodes:y,edges:s}}function q1(v,y,s){var p=[];if(Array.isArray(v))v.forEach(function(c){var b;Array.isArray(y)?b=y.find(function(E){return E["-bpmnElement"]===c["-id"]}):b=y;var _=wg(b,s,c);p.push(_)});else{var i=void 0;Array.isArray(y)?i=y.find(function(c){return c["-bpmnElement"]===v["-id"]}):i=y;var l=wg(i,s,v);p.push(l)}return p}function wg(v,y,s){var p=Number(v["dc:Bounds"]["-x"]),i=Number(v["dc:Bounds"]["-y"]),l=s["-name"],c=Vr.shapeConfigMap.get(y);c&&(p+=c.width/2,i+=c.height/2);var b;Object.entries(s).forEach(function(k){var j=Iu(k,2),P=j[0],D=j[1];Jg.indexOf(P)===-1&&(b||(b={}),b[P]=D)}),b&&(b=Au(b));var _;if(l&&(_={x:p,y:i,value:l},v["bpmndi:BPMNLabel"]&&v["bpmndi:BPMNLabel"]["dc:Bounds"])){var E=v["bpmndi:BPMNLabel"]["dc:Bounds"];_.x=Number(E["-x"])+Number(E["-width"])/2,_.y=Number(E["-y"])+Number(E["-height"])/2}var w={id:v["-bpmnElement"],type:y,x:p,y:i,properties:b};return _&&(w.text=_),w}function Z1(v,y){var s=[];if(Array.isArray(v))v.forEach(function(i){var l;Array.isArray(y)?l=y.find(function(c){return c["-bpmnElement"]===i["-id"]}):l=y,s.push(xg(l,i))});else{var p=void 0;Array.isArray(y)?p=y.find(function(i){return i["-bpmnElement"]===v["-id"]}):p=y,s.push(xg(p,v))}return s}function xg(v,y){var s,p=y["-name"];if(p){var i=v["bpmndi:BPMNLabel"]["dc:Bounds"],l=0;p.split(`
`).forEach(function(_){l<_.length&&(l=_.length)}),s={value:p,x:Number(i["-x"])+l*10/2,y:Number(i["-y"])+7}}var c;Object.entries(y).forEach(function(_){var E=Iu(_,2),w=E[0],k=E[1];Jg.indexOf(w)===-1&&(c||(c={}),c[w]=k)}),c&&(c=Au(c));var b={id:y["-id"],type:sr.FLOW,pointsList:v["di:waypoint"].map(function(_){return{x:Number(_["-x"]),y:Number(_["-y"])}}),sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:c};return s&&(b.text=s),b}var Vr=function(){function v(y){var s=this,p=y.lf;this.adapterOut=function(i,l){var c=lf({},s.processAttributes);W1(c,i,l);var b={"-id":"BPMNPlane_1","-bpmnElement":c["-id"]};$1(b,i);var _=s.definitionAttributes;_["bpmn:process"]=c,_["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":b};var E={"bpmn:definitions":_};return E},this.adapterIn=function(i){if(i)return K1(i)},p.adapterIn=function(i){return s.adapterIn(i)},p.adapterOut=function(i,l){return s.adapterOut(i,l)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+mg()},this.definitionAttributes={"-id":"Definitions_"+mg(),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return v.prototype.setCustomShape=function(y,s){v.shapeConfigMap.set(y,s)},v.pluginName="bpmn-adapter",v.shapeConfigMap=new Map,v}();Vr.shapeConfigMap.set(sr.START,{width:hg.width,height:hg.height});Vr.shapeConfigMap.set(sr.END,{width:yg.width,height:yg.height});Vr.shapeConfigMap.set(sr.GATEWAY,{width:gg.width,height:gg.height});Vr.shapeConfigMap.set(sr.SYSTEM,{width:vg.width,height:vg.height});Vr.shapeConfigMap.set(sr.USER,{width:bg.width,height:bg.height});(function(v){V1(y,v);function y(s){var p=v.call(this,s)||this;p.adapterXmlIn=function(l){var c=Y1(l);return p.adapterIn(c)},p.adapterXmlOut=function(l,c){var b=p.adapterOut(l,c);return U1(b)};var i=s.lf;return i.adapterIn=p.adapterXmlIn,i.adapterOut=p.adapterXmlOut,p}return y.pluginName="bpmnXmlAdapter",y})(Vr);var Eg=globalThis&&globalThis.__assign||function(){return Eg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Eg.apply(this,arguments)};globalThis&&globalThis.__read;var Sg;(function(v){v.HORIZONTAL="horizontal",v.VERTICAL="vertical"})(Sg||(Sg={}));var J1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var Q1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var ew=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},tw=globalThis&&globalThis.__spread||function(){for(var v=[],y=0;y<arguments.length;y++)v=v.concat(ew(arguments[y]));return v},Pi="lf:defaultNodeMenu",ki="lf:defaultEdgeMenu",Ti="lf:defaultGraphMenu",jg="lf:defaultSelectionMenu",nw=function(){function v(y){var s=this,p=y.lf;this.__menuDOM=document.createElement("ul"),this.lf=p,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){s.setMenuConfig(i)},this.lf.addMenuConfig=function(i){s.addMenuConfig(i)},this.lf.setMenuByType=function(i){s.setMenuByType(i)}}return v.prototype.init=function(){var y=this,s=[{text:"删除",callback:function(l){y.lf.deleteNode(l.id)}},{text:"编辑文本",callback:function(l){y.lf.graphModel.editText(l.id)}},{text:"复制",callback:function(l){y.lf.cloneNode(l.id)}}];this.menuTypeMap.set(Pi,s);var p=[{text:"删除",callback:function(l){y.lf.deleteEdge(l.id)}},{text:"编辑文本",callback:function(l){y.lf.graphModel.editText(l.id)}}];this.menuTypeMap.set(ki,p),this.menuTypeMap.set(Ti,[]);var i=[{text:"删除",callback:function(l){y.lf.clearSelectElements(),l.edges.forEach(function(c){return y.lf.deleteEdge(c.id)}),l.nodes.forEach(function(c){return y.lf.deleteNode(c.id)})}}];this.menuTypeMap.set(jg,i)},v.prototype.render=function(y,s){var p=this;this.__container=s,this.__currentData=null,this.__menuDOM.className="lf-menu",s.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var l=i.target;Array.from(l.classList).indexOf("lf-menu-item")===-1&&Array.from(l.classList).indexOf("lf-menu")===-1;)l=l.parentElement;Array.from(l.classList).indexOf("lf-menu-item")>-1?(l.onclickCallback(p.__currentData),p.__menuDOM.style.display="none",p.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!")},!0),this.lf.on("node:contextmenu",function(i){var l=i.data,c=i.position,b=c.domOverlayPosition,_=b.x,E=b.y,w=l.id,k=p.lf.graphModel.getNodeModelById(w),j=[],P=p.menuTypeMap.get(k.type);k&&k.menu&&Array.isArray(k.menu)?j=k.menu:P?j=P:j=p.menuTypeMap.get(Pi),p.__currentData=l,p.showMenu(_,E,j)}),this.lf.on("edge:contextmenu",function(i){var l=i.data,c=i.position,b=c.domOverlayPosition,_=b.x,E=b.y,w=l.id,k=p.lf.graphModel.getEdgeModelById(w),j=[],P=p.menuTypeMap.get(k.type);k&&k.menu&&Array.isArray(k.menu)?j=k.menu:P?j=P:j=p.menuTypeMap.get(ki),p.__currentData=l,p.showMenu(_,E,j)}),this.lf.on("blank:contextmenu",function(i){var l=i.position,c=p.menuTypeMap.get(Ti),b=l.domOverlayPosition,_=b.x,E=b.y;p.showMenu(_,E,c)}),this.lf.on("selection:contextmenu",function(i){var l=i.data,c=i.position,b=p.menuTypeMap.get(jg),_=c.domOverlayPosition,E=_.x,w=_.y;p.__currentData=l,p.showMenu(E,w,b)}),this.lf.on("node:mousedown",function(){p.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){p.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){p.__menuDOM.style.display="none"})},v.prototype.destroy=function(){var y;(y=this===null||this===void 0?void 0:this.__container)===null||y===void 0||y.removeChild(this.__menuDOM),this.__menuDOM=null},v.prototype.showMenu=function(y,s,p){if(!(!p||!p.length)){var i=this.__menuDOM;i.innerHTML="",i.append.apply(i,tw(this.__getMenuDom(p))),i.children.length&&(i.style.display="block",i.style.top=s+"px",i.style.left=y+"px")}},v.prototype.setMenuByType=function(y){!y.type||!y.menu||this.menuTypeMap.set(y.type,y.menu)},v.prototype.__getMenuDom=function(y){var s=[];return y&&y.length>0&&y.forEach(function(p){var i=document.createElement("li");if(p.className?i.className="lf-menu-item "+p.className:i.className="lf-menu-item",p.icon===!0){var l=document.createElement("span");l.className="lf-menu-item-icon",i.appendChild(l)}var c=document.createElement("span");c.className="lf-menu-item-text",p.text&&(c.innerText=p.text),i.appendChild(c),i.onclickCallback=p.callback,s.push(i)}),s},v.prototype.setMenuConfig=function(y){y&&(y.nodeMenu!==void 0&&this.menuTypeMap.set(Pi,y.nodeMenu?y.nodeMenu:[]),y.edgeMenu!==void 0&&this.menuTypeMap.set(ki,y.edgeMenu?y.edgeMenu:[]),y.graphMenu!==void 0&&this.menuTypeMap.set(Ti,y.graphMenu?y.graphMenu:[]))},v.prototype.addMenuConfig=function(y){if(y){if(Array.isArray(y.nodeMenu)){var s=this.menuTypeMap.get(Pi);this.menuTypeMap.set(Pi,s.concat(y.nodeMenu))}if(Array.isArray(y.edgeMenu)){var s=this.menuTypeMap.get(ki);this.menuTypeMap.set(ki,s.concat(y.edgeMenu))}if(Array.isArray(y.graphMenu)){var s=this.menuTypeMap.get(Ti);this.menuTypeMap.set(Ti,s.concat(y.graphMenu))}}},v.prototype.changeMenuItem=function(y,s){if(y==="add")this.addMenuConfig(s);else if(y==="reset")this.setMenuConfig(s);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},v.pluginName="menu",v}();globalThis&&globalThis.__read;globalThis&&globalThis.__values;function rw(v){if(v.length<=1)return!1;for(var y=0,s=v.length-1;y!==s&&y+1!==s&&s-1!==y;)y++,s--;return y===s?[--y,s]:[y,s]}var Qg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Xo=globalThis&&globalThis.__assign||function(){return Xo=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Xo.apply(this,arguments)},Sr=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};(function(v){Qg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.pointFilter=function(s){for(var p=s,i=1;i<p.length-1;){var l=Sr(p[i-1],2),c=l[0],b=l[1],_=Sr(p[i],2),E=_[0],w=_[1],k=Sr(p[i+1],2),j=k[0],P=k[1];c===E&&E===j||b===w&&w===P?p.splice(i,1):i++}return p},y.prototype.getEdge=function(){var s=this.props.model,p=s.points,i=s.isAnimation,l=s.arrowConfig,c=s.radius,b=c===void 0?5:c,_=s.getEdgeStyle(),E=s.getEdgeAnimationStyle(),w=this.pointFilter(p.split(" ").map(function(Pe){return Pe.split(",").map(function(Ce){return Number(Ce)})})),k=rw(w);if(k){var j=Sr(k,2),P=j[0],D=j[1],N=w[P],L=w[D],B=N.some(function(Pe,Ce){return Pe===L[Ce]});if(!B){var X=(L[1]-N[1])/2,ee=[L[0],L[1]-X],ie=[N[0],N[1]+X];w.splice(P+1,0,ie,ee)}}for(var Z=Sr(w[0],2),V=Z[0],K=Z[1],z="M"+V+" "+K,M=1;M<w.length-1;M++){var I=Sr(w[M-1],2),C=I[0],F=I[1],J=Sr(w[M],2),le=J[0],ce=J[1],ye=Sr(w[M+1],2),xe=ye[0],ge=ye[1];if(le===C&&ce!==F){var ue=ce>F?ce-b:ce+b;z=z+" L "+le+" "+ue}if(ce===F&&le!==C){var he=le>C?le-b:le+b;z=z+" L "+he+" "+ce}if(z=z+" Q "+le+" "+ce,le===xe&&ce!==ge){var ue=ce>ge?ce-b:ce+b;z=z+" "+le+" "+ue}if(ce===ge&&le!==xe){var he=le>xe?le-b:le+b;z=z+" "+he+" "+ce}}var be=Sr(w[w.length-1],2),Se=be[0],Ie=be[1];z=z+" L "+Se+" "+Ie;var $e=Xo(Xo(Xo({d:z,style:i?E:{}},_),l),{fill:"none"});return Ze.h("path",Xo({d:z},$e))},y})(Ze.PolylineEdge);(function(v){Qg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y})(Ze.PolylineEdgeModel);var gf,Yt,ev,uo,Pg,tv,ff,nv={},rv=[],ow=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,vf=Array.isArray;function Yr(v,y){for(var s in y)v[s]=y[s];return v}function ov(v){var y=v.parentNode;y&&y.removeChild(v)}function Di(v,y,s){var p,i,l,c={};for(l in y)l=="key"?p=y[l]:l=="ref"?i=y[l]:c[l]=y[l];if(arguments.length>2&&(c.children=arguments.length>3?gf.call(arguments,2):s),typeof v=="function"&&v.defaultProps!=null)for(l in v.defaultProps)c[l]===void 0&&(c[l]=v.defaultProps[l]);return Su(v,c,p,i,null)}function Su(v,y,s,p,i){var l={type:v,props:y,key:s,ref:p,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++ev};return i==null&&Yt.vnode!=null&&Yt.vnode(l),l}function bf(v){return v.children}function Uo(v,y){this.props=v,this.context=y}function Ci(v,y){if(y==null)return v.__?Ci(v.__,v.__.__k.indexOf(v)+1):null;for(var s;y<v.__k.length;y++)if((s=v.__k[y])!=null&&s.__e!=null)return s.__e;return typeof v.type=="function"?Ci(v):null}function iv(v){var y,s;if((v=v.__)!=null&&v.__c!=null){for(v.__e=v.__c.base=null,y=0;y<v.__k.length;y++)if((s=v.__k[y])!=null&&s.__e!=null){v.__e=v.__c.base=s.__e;break}return iv(v)}}function kg(v){(!v.__d&&(v.__d=!0)&&uo.push(v)&&!Mu.__r++||Pg!==Yt.debounceRendering)&&((Pg=Yt.debounceRendering)||tv)(Mu)}function Mu(){var v,y,s,p,i,l,c,b;for(uo.sort(ff);v=uo.shift();)v.__d&&(y=uo.length,p=void 0,i=void 0,c=(l=(s=v).__v).__e,(b=s.__P)&&(p=[],(i=Yr({},l)).__v=l.__v+1,lv(b,l,i,s.__n,b.ownerSVGElement!==void 0,l.__h!=null?[c]:null,p,c??Ci(l),l.__h),aw(p,l),l.__e!=c&&iv(l)),uo.length>y&&uo.sort(ff));Mu.__r=0}function av(v,y,s,p,i,l,c,b,_,E){var w,k,j,P,D,N,L,B=p&&p.__k||rv,X=B.length;for(s.__k=[],w=0;w<y.length;w++)if((P=s.__k[w]=(P=y[w])==null||typeof P=="boolean"||typeof P=="function"?null:typeof P=="string"||typeof P=="number"||typeof P=="bigint"?Su(null,P,null,null,P):vf(P)?Su(bf,{children:P},null,null,null):P.__b>0?Su(P.type,P.props,P.key,P.ref?P.ref:null,P.__v):P)!=null){if(P.__=s,P.__b=s.__b+1,(j=B[w])===null||j&&P.key==j.key&&P.type===j.type)B[w]=void 0;else for(k=0;k<X;k++){if((j=B[k])&&P.key==j.key&&P.type===j.type){B[k]=void 0;break}j=null}lv(v,P,j=j||nv,i,l,c,b,_,E),D=P.__e,(k=P.ref)&&j.ref!=k&&(L||(L=[]),j.ref&&L.push(j.ref,null,P),L.push(k,P.__c||D,P)),D!=null?(N==null&&(N=D),typeof P.type=="function"&&P.__k===j.__k?P.__d=_=uv(P,_,v):_=sv(v,P,j,B,D,_),typeof s.type=="function"&&(s.__d=_)):_&&j.__e==_&&_.parentNode!=v&&(_=Ci(j))}for(s.__e=N,w=X;w--;)B[w]!=null&&(typeof s.type=="function"&&B[w].__e!=null&&B[w].__e==s.__d&&(s.__d=cv(p).nextSibling),pv(B[w],B[w]));if(L)for(w=0;w<L.length;w++)fv(L[w],L[++w],L[++w])}function uv(v,y,s){for(var p,i=v.__k,l=0;i&&l<i.length;l++)(p=i[l])&&(p.__=v,y=typeof p.type=="function"?uv(p,y,s):sv(s,p,p,i,p.__e,y));return y}function sv(v,y,s,p,i,l){var c,b,_;if(y.__d!==void 0)c=y.__d,y.__d=void 0;else if(s==null||i!=l||i.parentNode==null)e:if(l==null||l.parentNode!==v)v.appendChild(i),c=null;else{for(b=l,_=0;(b=b.nextSibling)&&_<p.length;_+=1)if(b==i)break e;v.insertBefore(i,l),c=l}return c!==void 0?c:i.nextSibling}function cv(v){var y,s,p;if(v.type==null||typeof v.type=="string")return v.__e;if(v.__k){for(y=v.__k.length-1;y>=0;y--)if((s=v.__k[y])&&(p=cv(s)))return p}return null}function iw(v,y,s,p,i){var l;for(l in s)l==="children"||l==="key"||l in y||Du(v,l,null,s[l],p);for(l in y)i&&typeof y[l]!="function"||l==="children"||l==="key"||l==="value"||l==="checked"||s[l]===y[l]||Du(v,l,y[l],s[l],p)}function Tg(v,y,s){y[0]==="-"?v.setProperty(y,s??""):v[y]=s==null?"":typeof s!="number"||ow.test(y)?s:s+"px"}function Du(v,y,s,p,i){var l;e:if(y==="style")if(typeof s=="string")v.style.cssText=s;else{if(typeof p=="string"&&(v.style.cssText=p=""),p)for(y in p)s&&y in s||Tg(v.style,y,"");if(s)for(y in s)p&&s[y]===p[y]||Tg(v.style,y,s[y])}else if(y[0]==="o"&&y[1]==="n")l=y!==(y=y.replace(/Capture$/,"")),y=y.toLowerCase()in v?y.toLowerCase().slice(2):y.slice(2),v.l||(v.l={}),v.l[y+l]=s,s?p||v.addEventListener(y,l?Mg:Ag,l):v.removeEventListener(y,l?Mg:Ag,l);else if(y!=="dangerouslySetInnerHTML"){if(i)y=y.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(y!=="width"&&y!=="height"&&y!=="href"&&y!=="list"&&y!=="form"&&y!=="tabIndex"&&y!=="download"&&y!=="rowSpan"&&y!=="colSpan"&&y in v)try{v[y]=s??"";break e}catch{}typeof s=="function"||(s==null||s===!1&&y[4]!=="-"?v.removeAttribute(y):v.setAttribute(y,s))}}function Ag(v){return this.l[v.type+!1](Yt.event?Yt.event(v):v)}function Mg(v){return this.l[v.type+!0](Yt.event?Yt.event(v):v)}function lv(v,y,s,p,i,l,c,b,_){var E,w,k,j,P,D,N,L,B,X,ee,ie,Z,V,K,z=y.type;if(y.constructor!==void 0)return null;s.__h!=null&&(_=s.__h,b=y.__e=s.__e,y.__h=null,l=[b]),(E=Yt.__b)&&E(y);try{e:if(typeof z=="function"){if(L=y.props,B=(E=z.contextType)&&p[E.__c],X=E?B?B.props.value:E.__:p,s.__c?N=(w=y.__c=s.__c).__=w.__E:("prototype"in z&&z.prototype.render?y.__c=w=new z(L,X):(y.__c=w=new Uo(L,X),w.constructor=z,w.render=sw),B&&B.sub(w),w.props=L,w.state||(w.state={}),w.context=X,w.__n=p,k=w.__d=!0,w.__h=[],w._sb=[]),w.__s==null&&(w.__s=w.state),z.getDerivedStateFromProps!=null&&(w.__s==w.state&&(w.__s=Yr({},w.__s)),Yr(w.__s,z.getDerivedStateFromProps(L,w.__s))),j=w.props,P=w.state,w.__v=y,k)z.getDerivedStateFromProps==null&&w.componentWillMount!=null&&w.componentWillMount(),w.componentDidMount!=null&&w.__h.push(w.componentDidMount);else{if(z.getDerivedStateFromProps==null&&L!==j&&w.componentWillReceiveProps!=null&&w.componentWillReceiveProps(L,X),!w.__e&&w.shouldComponentUpdate!=null&&w.shouldComponentUpdate(L,w.__s,X)===!1||y.__v===s.__v){for(y.__v!==s.__v&&(w.props=L,w.state=w.__s,w.__d=!1),w.__e=!1,y.__e=s.__e,y.__k=s.__k,y.__k.forEach(function(M){M&&(M.__=y)}),ee=0;ee<w._sb.length;ee++)w.__h.push(w._sb[ee]);w._sb=[],w.__h.length&&c.push(w);break e}w.componentWillUpdate!=null&&w.componentWillUpdate(L,w.__s,X),w.componentDidUpdate!=null&&w.__h.push(function(){w.componentDidUpdate(j,P,D)})}if(w.context=X,w.props=L,w.__P=v,ie=Yt.__r,Z=0,"prototype"in z&&z.prototype.render){for(w.state=w.__s,w.__d=!1,ie&&ie(y),E=w.render(w.props,w.state,w.context),V=0;V<w._sb.length;V++)w.__h.push(w._sb[V]);w._sb=[]}else do w.__d=!1,ie&&ie(y),E=w.render(w.props,w.state,w.context),w.state=w.__s;while(w.__d&&++Z<25);w.state=w.__s,w.getChildContext!=null&&(p=Yr(Yr({},p),w.getChildContext())),k||w.getSnapshotBeforeUpdate==null||(D=w.getSnapshotBeforeUpdate(j,P)),av(v,vf(K=E!=null&&E.type===bf&&E.key==null?E.props.children:E)?K:[K],y,s,p,i,l,c,b,_),w.base=y.__e,y.__h=null,w.__h.length&&c.push(w),N&&(w.__E=w.__=null),w.__e=!1}else l==null&&y.__v===s.__v?(y.__k=s.__k,y.__e=s.__e):y.__e=uw(s.__e,y,s,p,i,l,c,_);(E=Yt.diffed)&&E(y)}catch(M){y.__v=null,(_||l!=null)&&(y.__e=b,y.__h=!!_,l[l.indexOf(b)]=null),Yt.__e(M,y,s)}}function aw(v,y){Yt.__c&&Yt.__c(y,v),v.some(function(s){try{v=s.__h,s.__h=[],v.some(function(p){p.call(s)})}catch(p){Yt.__e(p,s.__v)}})}function uw(v,y,s,p,i,l,c,b){var _,E,w,k=s.props,j=y.props,P=y.type,D=0;if(P==="svg"&&(i=!0),l!=null){for(;D<l.length;D++)if((_=l[D])&&"setAttribute"in _==!!P&&(P?_.localName===P:_.nodeType===3)){v=_,l[D]=null;break}}if(v==null){if(P===null)return document.createTextNode(j);v=i?document.createElementNS("http://www.w3.org/2000/svg",P):document.createElement(P,j.is&&j),l=null,b=!1}if(P===null)k===j||b&&v.data===j||(v.data=j);else{if(l=l&&gf.call(v.childNodes),E=(k=s.props||nv).dangerouslySetInnerHTML,w=j.dangerouslySetInnerHTML,!b){if(l!=null)for(k={},D=0;D<v.attributes.length;D++)k[v.attributes[D].name]=v.attributes[D].value;(w||E)&&(w&&(E&&w.__html==E.__html||w.__html===v.innerHTML)||(v.innerHTML=w&&w.__html||""))}if(iw(v,j,k,i,b),w)y.__k=[];else if(av(v,vf(D=y.props.children)?D:[D],y,s,p,i&&P!=="foreignObject",l,c,l?l[0]:s.__k&&Ci(s,0),b),l!=null)for(D=l.length;D--;)l[D]!=null&&ov(l[D]);b||("value"in j&&(D=j.value)!==void 0&&(D!==v.value||P==="progress"&&!D||P==="option"&&D!==k.value)&&Du(v,"value",D,k.value,!1),"checked"in j&&(D=j.checked)!==void 0&&D!==v.checked&&Du(v,"checked",D,k.checked,!1))}return v}function fv(v,y,s){try{typeof v=="function"?v(y):v.current=y}catch(p){Yt.__e(p,s)}}function pv(v,y,s){var p,i;if(Yt.unmount&&Yt.unmount(v),(p=v.ref)&&(p.current&&p.current!==v.__e||fv(p,null,y)),(p=v.__c)!=null){if(p.componentWillUnmount)try{p.componentWillUnmount()}catch(l){Yt.__e(l,y)}p.base=p.__P=null,v.__c=void 0}if(p=v.__k)for(i=0;i<p.length;i++)p[i]&&pv(p[i],y,s||typeof v.type!="function");s||v.__e==null||ov(v.__e),v.__=v.__e=v.__d=void 0}function sw(v,y,s){return this.constructor(v,s)}gf=rv.slice,Yt={__e:function(v,y,s,p){for(var i,l,c;y=y.__;)if((i=y.__c)&&!i.__)try{if((l=i.constructor)&&l.getDerivedStateFromError!=null&&(i.setState(l.getDerivedStateFromError(v)),c=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(v,p||{}),c=i.__d),c)return i.__E=i}catch(b){v=b}throw v}},ev=0,Uo.prototype.setState=function(v,y){var s;s=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Yr({},this.state),typeof v=="function"&&(v=v(Yr({},s),this.props)),v&&Yr(s,v),v!=null&&this.__v&&(y&&this._sb.push(y),kg(this))},Uo.prototype.forceUpdate=function(v){this.__v&&(this.__e=!0,v&&this.__h.push(v),kg(this))},Uo.prototype.render=bf,uo=[],tv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ff=function(v,y){return v.__v.__b-y.__v.__b},Mu.__r=0;var Ni=globalThis&&globalThis.__assign||function(){return Ni=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Ni.apply(this,arguments)};function mf(v){var y=v.x,s=v.y,p=v.width,i=v.height,l=v.radius,c=v.className,b=y-p/2,_=s-i/2,E=Ni(Ni({width:10,height:10,cx:0,cy:0,rx:l||0,ry:l||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+c},v),{x:b,y:_});return Ze.h("rect",Ni({},E))}mf.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Go;(function(v){v.NODE="node",v.CIRCLE_NODE="circle-node",v.POLYGON_NODE="polygon-node",v.RECT_NODE="rect-node",v.HTML_NODE="html-node",v.TEXT_NODE="text-node",v.ELLIPSE_NODE="ellipse-node",v.DIAMOND_NODE="diamond-node",v.EDGE="edge",v.LINE_EDGE="line-edge",v.POLYLINE_EDGE="polyline-edge",v.BEZIER_EDGE="bezier-edge",v.GRAPH="graph"})(Go||(Go={}));function ju(v){var y=v.x,s=v.y,p=v.width,i=v.height;return{minX:y-p/2,minY:s-i/2,maxX:y+p/2,maxY:s+i/2}}function Dg(v){var y=ju(v),s=v.radius,p=y.minX,i=y.minY,l=y.maxX,c=y.maxY;return[{x:p+s,y:i+s},{x:l-s,y:i+s},{x:l-s,y:c-s},{x:p+s,y:c-s}]}function Ng(v){var y=v.point,s=v.beforeNode,p=v.afterNode,i=y.x,l=y.y,c={x:i,y:l},b=s.radius,_=ju(s),E=ju(p);if(i===_.minX){c.x=E.minX;var w=(l-s.y)/(s.height/2-b);w?c.y=p.y+(p.height/2-b)*w:c.y=p.y}else if(i===_.maxX){c.x=E.maxX;var w=(l-s.y)/(s.height/2-b);w?c.y=p.y+(p.height/2-b)*w:c.y=p.y}else if(l===_.minY){c.y=E.minY;var w=(i-s.x)/(s.width/2-b);w?c.x=p.x+(p.width/2-b)*w:c.x=p.x}else if(l===_.maxY){c.y=E.maxY;var w=(i-s.x)/(s.width/2-b);w?c.x=p.x+(p.width/2-b)*w:c.x=p.x}else{var k=Dg(s),j=Dg(p),P=ju(s),D=P.minX,N=P.minY,L=P.maxX,B=P.maxY,X=-1;if(i-D<b&&l-N<b?X=0:L-i<b&&l-N<b?X=1:L-i<b&&B-l<b?X=2:i-D<b&&N-l<b&&(X=3),X>-1){var ee=Math.atan2(l-k[X].y,i-k[X].x);c.x=j[X].x+b*Math.cos(ee),c.y=j[X].y+b*Math.sin(ee)}}return c}function Cg(v){var y=v.point,s=v.beforeNode,p=v.afterNode,i=p.rx,l=p.ry,c=y,b=(y.y-s.y)/(y.x-s.x),_=i,E=l,w,k;return b>=1/0?(w=0,k=E):b<=-1/0?(w=0,k=-E):y.x-s.x>0?(w=_*E/Math.sqrt(E*E+_*_*b*b),k=_*E*b/Math.sqrt(E*E+_*_*b*b)):(w=-(_*E)/Math.sqrt(E*E+_*_*b*b),k=-(_*E*b)/Math.sqrt(E*E+_*_*b*b)),c={x:w+p.x,y:k+p.y},c}function Rg(v){var y=v.point,s=v.beforeNode,p=v.afterNode,i=y,l,c,b=y.x-s.x,_=y.y-s.y,E=s.rx,w=s.ry,k=Math.sqrt((E-Math.abs(b))*(E-Math.abs(b))+_*_)/Math.sqrt(E*E+w*w),j=p.rx,P=p.ry,D=Math.sqrt((j*j+P*P)*k*k*(j*j/(j*j+P*P))),N=D*(P/j);return b>=0?l=j-D:l=D-j,_>0?c=N:c=-N,i={x:l+p.x,y:c+p.y},i}var cw=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),so=globalThis&&globalThis.__assign||function(){return so=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},so.apply(this,arguments)},lw=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},fw=Ze.LogicFlowUtil.StepDrag,pw=function(v){cw(y,v);function y(s){var p=v.call(this)||this;return p.updatePosition=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.x,E=b.y;p.nodeModel.x=_+l/2,p.nodeModel.y=E+c/2,p.nodeModel.moveText(l/2,c/2)},p.getResize=function(i){var l=i.index,c=i.deltaX,b=i.deltaY,_=i.width,E=i.height,w=i.PCTResizeInfo,k=i.pct,j=k===void 0?1:k,P={width:_,height:E,deltaX:c,deltaY:b};if(w){var D=4,N=0,L=0;switch(l){case 0:L=(c*-1-b)/D;break;case 1:L=(c-b)/D;break;case 2:L=(c+b)/D;break;case 3:L=(c*-1+b)/D;break}L!==0&&(N=Math.round(L/w.ResizeBasis.basisHeight*1e5)/1e3),w.ResizePCT.widthPCT=Math.max(Math.min(w.ResizePCT.widthPCT+N,w.ScaleLimit.maxScaleLimit),w.ScaleLimit.minScaleLimit),w.ResizePCT.hightPCT=Math.max(Math.min(w.ResizePCT.hightPCT+N,w.ScaleLimit.maxScaleLimit),w.ScaleLimit.minScaleLimit);var B=Math.round(w.ResizePCT.widthPCT*w.ResizeBasis.basisWidth/100),X=Math.round(w.ResizePCT.hightPCT*w.ResizeBasis.basisHeight/100);switch(l){case 0:c=_-B,b=E-X;break;case 1:c=B-_,b=E-X;break;case 2:c=B-_,b=X-E;break;case 3:c=_-B,b=X-E;break}return P.width=B,P.height=X,P.deltaX=c/j,P.deltaY=b/j,P}switch(l){case 0:P.width=_-c*j,P.height=E-b*j;break;case 1:P.width=_+c*j,P.height=E-b*j;break;case 2:P.width=_+c*j,P.height=E+b*j;break;case 3:P.width=_-c*j,P.height=E+b*j;break}return P},p.updateRect=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.id,E=b.x,w=b.y,k=b.width,j=b.height,P=b.radius,D=b.PCTResizeInfo,N=p.index,L=p.getResize({index:N,deltaX:l,deltaY:c,width:k,height:j,PCTResizeInfo:D,pct:1}),B=p.nodeModel,X=B.minWidth,ee=B.minHeight,ie=B.maxWidth,Z=B.maxHeight;if(L.width<X||L.width>ie||L.height<ee||L.height>Z){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:L.deltaX,deltaY:L.deltaY}),p.nodeModel.width=L.width,p.nodeModel.height=L.height,p.nodeModel.setProperties({nodeSize:{width:L.width,height:L.height}});var V=p.getNodeEdges(_),K={x:E,y:w,width:k,height:j,radius:P},z={x:p.nodeModel.x,y:p.nodeModel.y,width:p.nodeModel.width,height:p.nodeModel.height,radius:P},M={point:"",beforeNode:K,afterNode:z},I;V.sourceEdges.forEach(function(C){M.point=C.startPoint,I=Ng(M),C.updateStartPoint(I)}),V.targetEdges.forEach(function(C){M.point=C.endPoint,I=Ng(M),C.updateEndPoint(I)}),p.eventEmit({beforeNode:K,afterNode:z})},p.updateEllipse=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.id,E=b.rx,w=b.ry,k=b.x,j=b.y,P=b.PCTResizeInfo,D=p.index,N=E,L=w,B=p.getResize({index:D,deltaX:l,deltaY:c,width:N,height:L,PCTResizeInfo:P,pct:1/2}),X=p.nodeModel,ee=X.minWidth,ie=X.minHeight,Z=X.maxWidth,V=X.maxHeight;if(B.width<ee/2||B.width>Z/2||B.height<ie/2||B.height>V/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),p.nodeModel.rx=B.width,p.nodeModel.ry=B.height,p.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var K=p.getNodeEdges(_),z={x:k,y:j},M={rx:B.width,ry:B.height,x:p.nodeModel.x,y:p.nodeModel.y},I={point:{},beforeNode:z,afterNode:M},C;K.sourceEdges.forEach(function(F){I.point=F.startPoint,C=Cg(I),F.updateStartPoint(C)}),K.targetEdges.forEach(function(F){I.point=F.endPoint,C=Cg(I),F.updateEndPoint(C)}),p.eventEmit({beforeNode:so(so({},z),{rx:E,ry:w}),afterNode:M})},p.updateDiamond=function(i){var l=i.deltaX,c=i.deltaY,b=p.nodeModel,_=b.id,E=b.rx,w=b.ry,k=b.x,j=b.y,P=b.PCTResizeInfo,D=p.index,N=E,L=w,B=p.getResize({index:D,deltaX:l,deltaY:c,width:N,height:L,PCTResizeInfo:P,pct:1/2}),X=p.nodeModel,ee=X.minWidth,ie=X.minHeight,Z=X.maxWidth,V=X.maxHeight;if(B.width<ee/2||B.width>Z/2||B.height<ie/2||B.height>V/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),p.nodeModel.rx=B.width,p.nodeModel.ry=B.height,p.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var K={x:k,y:j,rx:E,ry:w},z={rx:B.width,ry:B.height,x:p.nodeModel.x,y:p.nodeModel.y},M={point:{},beforeNode:K,afterNode:z},I,C=p.getNodeEdges(_);C.sourceEdges.forEach(function(F){M.point=F.startPoint,I=Rg(M),F.updateStartPoint(I)}),C.targetEdges.forEach(function(F){M.point=F.endPoint,I=Rg(M),F.updateEndPoint(I)}),p.eventEmit({beforeNode:K,afterNode:z})},p.eventEmit=function(i){var l=i.beforeNode,c=i.afterNode,b=p.nodeModel,_=b.id,E=b.modelType,w=b.type,k=so({id:_,modelType:E,type:w},l),j=so({id:_,modelType:E,type:w},c);p.graphModel.eventCenter.emit("node:resize",{oldNodeSize:k,newNodeSize:j})},p.onDragging=function(i){var l,c=i.deltaX,b=i.deltaY,_=p.graphModel.transformModel,E=p.nodeModel.modelType;l=lw(_.fixDeltaXY(c,b),2),c=l[0],b=l[1],E===Go.RECT_NODE||E===Go.HTML_NODE?p.updateRect({deltaX:c,deltaY:b}):E===Go.ELLIPSE_NODE?p.updateEllipse({deltaX:c,deltaY:b}):E===Go.DIAMOND_NODE&&p.updateDiamond({deltaX:c,deltaY:b})},p.onDragEnd=function(){var i=p.graphModel.gridSize,l=i===void 0?1:i,c=l*Math.round(p.nodeModel.x/l),b=l*Math.round(p.nodeModel.y/l);p.nodeModel.moveTo(c,b)},p.index=s.index,p.nodeModel=s.model,p.graphModel=s.graphModel,p.state={},p.dragHandler=new fw({onDragging:p.onDragging,onDragEnd:p.onDragEnd,step:1}),p}return y.prototype.getNodeEdges=function(s){for(var p=this.graphModel,i=p.edges,l=[],c=[],b=0;b<i.length;b++){var _=i[b];_.sourceNodeId===s?l.push(_):i[b].targetNodeId===s&&c.push(_)}return{sourceEdges:l,targetEdges:c}},y.prototype.render=function(){var s=this.props,p=s.x,i=s.y,l=s.index,c=s.model,b=c.getControlPointStyle();return Di("g",{className:"lf-resize-control-"+l},Di(mf,so({className:"lf-node-control"},{x:p,y:i},b,{onMouseDown:this.dragHandler.handleMouseDown})))},y}(Uo),dw=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Nu=globalThis&&globalThis.__assign||function(){return Nu=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Nu.apply(this,arguments)},Lu=function(v){dw(y,v);function y(){var s=v.call(this)||this;return s.state={},s}return y.prototype.getResizeControl=function(){var s=this.props,p=s.model,i=s.graphModel,l=p.x,c=p.y,b=p.width,_=p.height,E={minX:l-b/2,minY:c-_/2,maxX:l+b/2,maxY:c+_/2},w=E.minX,k=E.minY,j=E.maxX,P=E.maxY,D=[{x:w,y:k},{x:j,y:k},{x:j,y:P},{x:w,y:P}];return D.map(function(N,L){return Di(pw,Nu({index:L},N,{model:p,graphModel:i}))})},y.prototype.getGroupSolid=function(){var s=this.props.model,p=s.x,i=s.y,l=s.width,c=s.height,b=s.getResizeOutlineStyle();return Di(mf,Nu({fill:"none"},b,{x:p,y:i,width:l,height:c}))},y.prototype.render=function(){return Di("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},y}(Uo),dv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),hw=function(v){dv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.resize=function(s,p){console.log(s,p)},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y}(Ze.RectNodeModel),yw=function(v){dv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return Ze.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return Ze.h("g",null,this.getResizeShape(),p&&!i?this.getControlGroup():"")},y}(Ze.RectNode),hv={type:"rect",view:yw,model:hw},yv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}();(function(v){yv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(Ze.EllipseNodeModel);(function(v){yv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return Ze.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model,i=s.graphModel.editConfigModel.isSilentMode;return Ze.h("g",null,this.getResizeShape(),p.isSelected&&!i?this.getControlGroup():"")},y})(Ze.EllipseNode);var pf=globalThis&&globalThis.__assign||function(){return pf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},pf.apply(this,arguments)};function gw(v){var y=v.fillOpacity,s=y===void 0?1:y,p=v.strokeWidth,i=p===void 0?1:p,l=v.strokeOpacity,c=l===void 0?1:l,b=v.fill,_=b===void 0?"transparent":b,E=v.stroke,w=E===void 0?"#000":E,k=v.points,j=v.className,P=j===void 0?"lf-basic-shape":j,D={fill:_,fillOpacity:s,strokeWidth:i,stroke:w,strokeOpacity:c,points:"",className:P};return D.points=k.map(function(N){return N.join(",")}).join(" "),Ze.h("polygon",pf({},D))}var gv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),df=globalThis&&globalThis.__assign||function(){return df=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},df.apply(this,arguments)};(function(v){gv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(Ze.DiamondNodeModel);(function(v){gv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return Ze.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){var s=this.props.model,p=s.points,i=s.getNodeStyle();return Ze.h("g",null,Ze.h(gw,df({},i,{points:p})))},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return Ze.h("g",null,this.getResizeShape(),p&&!i?this.getControlGroup():"")},y})(Ze.DiamondNode);var vv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}();(function(v){vv(y,v);function y(s,p){var i=v.call(this,s,p)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(Ze.HtmlNodeModel);(function(v){vv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,i=s.graphModel;return Ze.h(Lu,{model:p,graphModel:i})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return Ze.h("g",null,this.getResizeShape(),p&&!i?this.getControlGroup():"")},y})(Ze.HtmlNode);var bv=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var l in i)i.hasOwnProperty(l)&&(p[l]=i[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Cu=globalThis&&globalThis.__assign||function(){return Cu=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Cu.apply(this,arguments)},vw=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},bw=globalThis&&globalThis.__spread||function(){for(var v=[],y=0;y<arguments.length;y++)v=v.concat(vw(arguments[y]));return v},Ig=500,Lg=300,mw=-1e4;(function(v){bv(y,v);function y(){var s=v!==null&&v.apply(this,arguments)||this;return s.isGroup=!0,s.unfoldedWidth=Ig,s.unfoldedHight=Lg,s.childrenLastFoldStatus={},s}return y.prototype.initNodeData=function(s){var p=this;v.prototype.initNodeData.call(this,s);var i=[];Array.isArray(s.children)&&(i=s.children),this.children=new Set(i),this.width=Ig,this.height=Lg,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=mw,this.radius=0,this.text.editable=!1,this.text.draggable=!1,this.isRestrict=!1,this.resizable=!1,this.autoToFront=!1,this.foldable=!1,this.properties.isFolded===void 0&&(this.properties.isFolded=!1),this.isFolded=this.properties.isFolded,setTimeout(function(){p.isFolded&&p.foldGroup(p.isFolded)})},y.prototype.getResizeOutlineStyle=function(){var s=v.prototype.getResizeOutlineStyle.call(this);return s.stroke="none",s},y.prototype.foldGroup=function(s){var p=this;if(s!==this.isFolded){this.setProperty("isFolded",s),this.isFolded=s,s?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(l){var c=p.graphModel.getElement(l),b=c.isFolded;if(c.isGroup&&!c.isFolded&&c.foldGroup(s),c.isGroup&&!s){var _=p.childrenLastFoldStatus[l];_!==void 0&&_!==c.isFolded&&c.foldGroup(_)}p.childrenLastFoldStatus[l]=b,c.visible=!s,i=i.concat(c.incoming.edges.concat(c.outgoing.edges))}),this.foldEdge(s,i)}},y.prototype.getAnchorStyle=function(s){var p=v.prototype.getAnchorStyle.call(this,s);return p.stroke="transparent",p.fill="transparent",p.hover.fill="transparent",p.hover.stroke="transparent",p},y.prototype.foldEdge=function(s,p){var i=this;p.forEach(function(l,c){var b=l.id,_=l.sourceNodeId,E=l.targetNodeId,w=l.startPoint,k=l.endPoint,j=l.type,P=l.text,D=l.getProperties(),N={id:b+"__"+c,sourceNodeId:_,targetNodeId:E,startPoint:w,endPoint:k,type:j,properties:D,text:P==null?void 0:P.value};l.virtual&&i.graphModel.deleteEdgeById(l.id);var L=i.graphModel.group.getNodeGroup(E);L||(L=i.graphModel.getNodeModelById(E));var B=i.graphModel.group.getNodeGroup(_);B||(B=i.graphModel.getNodeModelById(_)),s&&l.visible!==!1&&(i.children.has(_)||i.id===_?(N.startPoint=void 0,N.sourceNodeId=i.id):(N.endPoint=void 0,N.targetNodeId=i.id),(L.id!==i.id||B.id!==i.id)&&i.createVirtualEdge(N),l.visible=!1),!s&&l.visible===!1&&(L&&L.isGroup&&L.isFolded?(N.targetNodeId=L.id,N.endPoint=void 0,i.createVirtualEdge(N)):B&&B.isGroup&&B.isFolded?(N.sourceNodeId=B.id,N.startPoint=void 0,i.createVirtualEdge(N)):l.visible=!0)})},y.prototype.createVirtualEdge=function(s){s.pointsList=void 0;var p=this.graphModel.addEdge(s);p.virtual=!0,p.text.editable=!1,p.isFoldedEdge=!0},y.prototype.isInRange=function(s){var p=s.x1,i=s.y1,l=s.x2,c=s.y2;return p>=this.x-this.width/2&&l<=this.x+this.width/2&&i>=this.y-this.height/2&&c<=this.y+this.height/2},y.prototype.isAllowMoveTo=function(s){var p=s.x1,i=s.y1,l=s.x2,c=s.y2;return{x:p>=this.x-this.width/2&&l<=this.x+this.width/2,y:i>=this.y-this.height/2&&c<=this.y+this.height/2}},y.prototype.setAllowAppendChild=function(s){this.setProperty("groupAddable",s)},y.prototype.addChild=function(s){this.children.add(s)},y.prototype.removeChild=function(s){this.children.delete(s)},y.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},y.prototype.getData=function(){var s=this,p=v.prototype.getData.call(this);p.children=[],this.children.forEach(function(l){var c=s.graphModel.getNodeModelById(l);c&&!c.virtual&&p.children.push(l)});var i=p.properties;return delete i.groupAddable,delete i.isFolded,p},y.prototype.getHistoryData=function(){var s=v.prototype.getData.call(this);s.children=bw(this.children),s.isGroup=!0;var p=s.properties;return delete p.groupAddable,p.isFolded&&(s.x=s.x+this.unfoldedWidth/2-this.foldedWidth/2,s.y=s.y+this.unfoldedHight/2-this.foldedHeight/2),s},y.prototype.isAllowAppendIn=function(s){return!0},y.prototype.toBack=function(){this.zIndex--},y})(hv.model);(function(v){bv(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props.model,p=s.resizable,i=s.properties;return p&&!i.isFolded?v.prototype.getControlGroup.call(this):null},y.prototype.getAddableShape=function(){var s=this.props.model,p=s.width,i=s.height,l=s.x,c=s.y,b=s.radius,_=s.properties;if(!_.groupAddable)return null;var E=this.props.model.getNodeStyle().strokeWidth,w=this.props.model.getAddableOutlineStyle(),k=p+E+8,j=i+E+8;return Ze.h("rect",Cu(Cu({},w),{width:k,height:j,x:l-k/2,y:c-j/2,rx:b,ry:b}))},y.prototype.getFoldIcon=function(){var s=this.props.model,p=s.x-s.width/2+5,i=s.y-s.height/2+5;if(!s.foldable)return null;var l=Ze.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:s.properties.isFolded?"M "+(p+3)+","+(i+6)+" "+(p+11)+","+(i+6)+" M"+(p+7)+","+(i+2)+" "+(p+7)+","+(i+10):"M "+(p+3)+","+(i+6)+" "+(p+11)+","+(i+6)+" "});return Ze.h("g",{},[Ze.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:s.x-s.width/2+5,y:s.y-s.height/2+5,onClick:function(){s.foldGroup(!s.properties.isFolded)}}),l])},y.prototype.getResizeShape=function(){return Ze.h("g",{},[this.getAddableShape(),v.prototype.getResizeShape.call(this),this.getFoldIcon()])},y})(hv.view);var _w=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var zg=globalThis&&globalThis.__assign||function(){return zg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},zg.apply(this,arguments)},Bg=globalThis&&globalThis.__assign||function(){return Bg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var i in y)Object.prototype.hasOwnProperty.call(y,i)&&(v[i]=y[i])}return v},Bg.apply(this,arguments)},Ow=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),i,l=[],c;try{for(;(y===void 0||y-- >0)&&!(i=p.next()).done;)l.push(i.value)}catch(b){c={error:b}}finally{try{i&&!i.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;const ww={class:"control-container"},xw=["title","onMouseenter"],Ew=["disabled","onClick"],Sw=Ru({__name:"Control",props:{lf:{default:null},catTurboData:{type:Boolean}},emits:["catData"],setup(v,{emit:y}){const s=v,p=jr(),i=jr(),l=jr(-1),c=jr([{icon:"icon-zoom-out-hs",text:"缩小",size:"18",disabled:!1},{icon:"icon-enlarge-hs",text:"放大",size:"18",disabled:!1},{icon:"icon-full-screen-hs",text:"适应",size:"15",disabled:!1},{icon:"icon-previous-hs",text:"上一步",size:"15",disabled:!0},{icon:"icon-next-step-hs",text:"下一步",size:"17",disabled:!0},{icon:"icon-download-hs",text:"下载图片",size:"17",disabled:!1},{icon:"icon-watch-hs",text:"查看数据",size:"17",disabled:!1}]),b=(E,w)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((k,j)=>{const P=s.lf;w===1&&P.zoom(!0),w===6&&y("catData"),w===j&&P[k]()})},_=E=>{l.value=E};return Fg(()=>{s.lf.on("history:change",({data:{undoAble:E,redoAble:w}})=>{pn(c)[3].disabled=pn(p).disabled=!E,pn(c)[4].disabled=pn(i).disabled=!w})}),(E,w)=>{const k=Ai("el-tooltip");return ar(),co("div",ww,[Pr("ul",null,[(ar(!0),co(Hg,null,Xg(c.value,(j,P)=>(ar(),co("li",{key:P,title:j.text,class:"dark:text-bg_color",onMouseenter:fg(D=>_(P),["prevent"]),onMouseleave:w[0]||(w[0]=fg(D=>l.value=-1,["prevent"]))},[Fo(k,{content:j.text,visible:l.value===P,placement:"right"},{default:Ho(()=>[Pr("button",{ref_for:!0,ref:"controlButton"+P,disabled:j.disabled,style:pg({cursor:j.disabled===!1?"pointer":"not-allowed",color:j.disabled===!1?"":"#00000040",background:"transparent"}),onClick:D=>b(j,P)},[Pr("span",{class:Gg("iconfont "+j.icon),style:pg({fontSize:`${j.size}px`})},null,6)],12,Ew)]),_:2},1032,["content","visible"])],40,xw))),128))])])}}});const jw=hf(Sw,[["__scopeId","data-v-44af808d"]]),Pw={class:"node-panel"},kw=["onMousedown"],Tw={key:0,class:"shape"},Aw={class:"node-label"},Mw=Ru({__name:"NodePanel",props:{lf:{default:null},nodeList:{default:null}},setup(v){const y=v,s=jr({a:"efrwe",b:"wewe"}),p=i=>{y.lf.dnd.startDrag({type:i.type,properties:pn(s)})};return(i,l)=>(ar(),co("div",Pw,[(ar(!0),co(Hg,null,Xg(y.nodeList,c=>(ar(),co("div",{class:"node-item dark:text-bg_color",key:c.text,onMousedown:b=>p(c)},[Pr("div",{class:Gg(["node-item-icon",c.class])},[c.type==="user"||c.type==="time"?(ar(),co("div",Tw)):Ug("",!0)],2),Pr("span",Aw,s1(c.text),1)],40,kw))),128))]))}});const Dw=hf(Mw,[["__scopeId","data-v-5c49346d"]]),Nw=Ru({__name:"DataDialog",props:{graphData:Object},setup(v){const y=v;return(s,p)=>(ar(),uf(pn(p1),{path:"res",deep:3,showLength:!0,data:y.graphData},null,8,["data"]))}}),Cw=yf(jw),Rw=yf(Dw),Iw=yf(Nw),Lw={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function zw(v){const{incoming:y,outgoing:s,properties:p,key:i}=v,{text:l,startPoint:c,endPoint:b,pointsList:_,logicFlowType:E}=p,w={id:i,type:E,sourceNodeId:y[0],targetNodeId:s[0],text:l,startPoint:c,endPoint:b,pointsList:_,properties:{}},k=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(v.properties).forEach(j=>{k.indexOf(j)===-1&&(w.properties[j]=v.properties[j])}),w}function Bw(v){const{properties:y,key:s}=v,{x:p,y:i,text:l,logicFlowType:c}=y,b={id:s,type:c,x:p,y:i,text:l,properties:{}},_=["x","y","text","logicFlowType"];return Object.keys(v.properties).forEach(E=>{_.indexOf(E)===-1&&(b.properties[E]=v.properties[E])}),b}function Fw(v){const y={nodes:[],edges:[]},s=v.flowElementList;return s&&s.length>0&&s.forEach(p=>{if(p.type===Lw.SEQUENCE_FLOW){const i=zw(p);y.edges.push(i)}else{const i=Bw(p);y.nodes.push(i)}}),y}const Hw=v=>(c1("data-v-75717ba2"),v=v(),l1(),v),Xw={class:"card-header"},Gw={class:"font-medium"},Uw={class:"logic-flow-view"},Yw=Hw(()=>Pr("div",{id:"turbo"},null,-1)),Vw=Ru({name:"FlowChart",__name:"index",setup(v){const y=jr(null),s=jr(null),p=jr(!1),i=jr({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),l=g1;function c(){xu.use(F1),xu.use(B1),xu.use(nw);const E=new xu({...pn(i),container:document.querySelector("#turbo")});y.value=E,pn(y).setDefaultEdgeType("bpmn:sequenceFlow"),b()}function b(){const E=Fw(y1);y.value.render(E)}function _(){s.value=pn(y).getGraphData(),p.value=!0}return Fg(()=>{c()}),(E,w)=>{const k=Ai("el-link"),j=Ai("el-scrollbar"),P=Ai("el-dialog"),D=Ai("el-card");return ar(),uf(D,{shadow:"never"},{header:Ho(()=>[Pr("div",Xw,[Pr("span",Gw,[dg(" 流程图组件,采用开源的 "),Fo(k,{href:"http://logic-flow.org/",target:"_blank",icon:pn(f1)(pn(d1)),style:{margin:"0 4px 5px","font-size":"16px"}},{default:Ho(()=>[dg(" LogicFlow ")]),_:1},8,["icon"])])])]),default:Ho(()=>[Pr("div",Uw,[y.value?(ar(),uf(pn(Cw),{key:0,class:"demo-control",lf:y.value,catTurboData:!1,onCatData:_},null,8,["lf"])):Ug("",!0),Fo(pn(Rw),{lf:y.value,nodeList:pn(l)},null,8,["lf","nodeList"]),Yw,Fo(P,{class:"flow-dialog",title:"数据",modelValue:p.value,"onUpdate:modelValue":w[0]||(w[0]=N=>p.value=N),width:"50%"},{default:Ho(()=>[Fo(j,null,{default:Ho(()=>[Fo(pn(Iw),{graphData:s.value},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});const Jw=hf(Vw,[["__scopeId","data-v-75717ba2"]]);export{Jw as default};