index-c6761c29.js
581 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
var cw=Object.defineProperty,lw=Object.defineProperties;var fw=Object.getOwnPropertyDescriptors;var hg=Object.getOwnPropertySymbols;var pw=Object.prototype.hasOwnProperty,dw=Object.prototype.propertyIsEnumerable;var yg=(g,h,s)=>h in g?cw(g,h,{enumerable:!0,configurable:!0,writable:!0,value:s}):g[h]=s,sf=(g,h)=>{for(var s in h||(h={}))pw.call(h,s)&&yg(g,s,h[s]);if(hg)for(var s of hg(h))dw.call(h,s)&&yg(g,s,h[s]);return g},gg=(g,h)=>lw(g,fw(h));var wu=(g,h,s)=>new Promise((f,i)=>{var l=m=>{try{v(s.next(m))}catch(x){i(x)}},c=m=>{try{v(s.throw(m))}catch(x){i(x)}},v=m=>m.done?f(m.value):Promise.resolve(m.value).then(l,c);v((s=s.apply(g,h)).next())});import{I as hw,_ as vf,h as yw,U as gw,aj as vw}from"./index.js";import{p as bw,c as mw,d as Yg,k as xu,s as Ow,u as dn,q as cf,b as _w,a8 as Yr,_ as Gr,$ as Ai,F as vg,ab as ww,f as Di,aa as Au,E as xw,a1 as Ew,a2 as Eu,ac as lf,ad as Sw,a9 as bf,e as jw,w as bg,o as Pw,a0 as Aw}from"./vue-5a35c3f5.js";import{aA as kw,W as Mw,J as Tw}from"./antd-6b087f69.js";import{B as Dw,u as Nw}from"./index-c1c2669a.js";import{J as Cw}from"./index-8fd1420c.js";import{P as Rw}from"./index-f532aa07.js";import"./useWindowSizeFn-cc2fb57c.js";import"./useContentViewHeight-d0a5c58e.js";import"./onMountedOrActivated-52afb7a7.js";const Vg=Symbol("flow-chart");function Iw(g){bw(Vg,g)}function Lw(){return mw(Vg)}var en=(g=>(g.ZOOM_IN="zoomIn",g.ZOOM_OUT="zoomOut",g.RESET_ZOOM="resetZoom",g.UNDO="undo",g.REDO="redo",g.SNAPSHOT="snapshot",g.VIEW_DATA="viewData",g))(en||{});const zw=Yg({name:"FlowChartToolbar",components:{Icon:hw,Divider:kw,Tooltip:Mw},props:{prefixCls:String},emits:["view-data"],setup(g,{emit:h}){const s=xu([{type:en.ZOOM_IN,icon:"codicon:zoom-out",tooltip:"缩小"},{type:en.ZOOM_OUT,icon:"codicon:zoom-in",tooltip:"放大"},{type:en.RESET_ZOOM,icon:"codicon:screen-normal",tooltip:"重置比例"},{separate:!0},{type:en.UNDO,icon:"ion:arrow-undo-outline",tooltip:"后退",disabled:!0},{type:en.REDO,icon:"ion:arrow-redo-outline",tooltip:"前进",disabled:!0},{separate:!0},{type:en.SNAPSHOT,icon:"ion:download-outline",tooltip:"下载"},{type:en.VIEW_DATA,icon:"carbon:document-view",tooltip:"查看数据"}]),{logicFlow:f}=Lw();function i({data:{undoAble:c,redoAble:v}}){const m=dn(s),x=m.findIndex(A=>A.type===en.UNDO),w=m.findIndex(A=>A.type===en.REDO);x!==-1&&(dn(s)[x].disabled=!c),w!==-1&&(dn(s)[w].disabled=!v)}const l=c=>{const v=dn(f);if(v)switch(c.type){case en.ZOOM_IN:v.zoom();break;case en.ZOOM_OUT:v.zoom(!0);break;case en.RESET_ZOOM:v.resetZoom();break;case en.UNDO:v.undo();break;case en.REDO:v.redo();break;case en.SNAPSHOT:v.getSnapshot();break;case en.VIEW_DATA:h("view-data");break}};return Ow(()=>wu(this,null,function*(){var c;dn(f)&&(yield cf(),(c=dn(f))==null||c.on("history:change",i))})),_w(()=>{var c;(c=dn(f))==null||c.off("history:change",i)}),{toolbarItemList:s,onControl:l}}});const Bw=["onClick"];function Fw(g,h,s,f,i,l){const c=Yr("Icon"),v=Yr("Tooltip"),m=Yr("Divider");return Gr(),Ai("div",{class:Eu([`${g.prefixCls}-toolbar`,"flex items-center px-2 py-1"])},[(Gr(!0),Ai(vg,null,ww(g.toolbarItemList,x=>(Gr(),Ai(vg,{key:x.type},[Di(v,Sw({placement:"bottom"},x.disabled?{visible:!1}:{}),{title:Au(()=>[xw(Ew(x.tooltip),1)]),default:Au(()=>[x.icon?(Gr(),Ai("span",{key:0,class:Eu(`${g.prefixCls}-toolbar__icon`),onClick:w=>g.onControl(x)},[Di(c,{icon:x.icon,class:Eu(x.disabled?"cursor-not-allowed disabeld":"cursor-pointer")},null,8,["icon","class"])],10,Bw)):lf("v-if",!0)]),_:2},1040),x.separate?(Gr(),bf(m,{key:0,type:"vertical"})):lf("v-if",!0)],64))),128))],2)}const Uw=vf(zw,[["render",Fw],["__file","E:/allcode/erp/test7901/order-erp-front/src/components/FlowChart/src/FlowChartToolbar.vue"]]);var ff={exports:{}};(function(g,h){(function(s,f){g.exports=f()})(window,function(){return function(s){var f={};function i(l){if(f[l])return f[l].exports;var c=f[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=f,i.d=function(l,c,v){i.o(l,c)||Object.defineProperty(l,c,{enumerable:!0,get:v})},i.r=function(l){typeof Symbol!="undefined"&&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 v=Object.create(null);if(i.r(v),Object.defineProperty(v,"default",{enumerable:!0,value:l}),2&c&&typeof l!="string")for(var m in l)i.d(v,m,function(x){return l[x]}.bind(null,m));return v},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,f,i){i.d(f,"a",function(){return J}),i.d(f,"b",function(){return ie}),i.d(f,"c",function(){return Ce}),i.d(f,"d",function(){return Ze}),i.d(f,"e",function(){return B}),i.d(f,"f",function(){return ee}),i.d(f,"g",function(){return B}),i.d(f,"h",function(){return Pe}),i.d(f,"i",function(){return c}),i.d(f,"j",function(){return Ke}),i.d(f,"k",function(){return F});var l,c,v,m,x,w,A,P={},j=[],D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function N(q,K){for(var ae in K)q[ae]=K[ae];return q}function I(q){var K=q.parentNode;K&&K.removeChild(q)}function B(q,K,ae){var _e,Ae,we,qe={};for(we in K)we=="key"?_e=K[we]:we=="ref"?Ae=K[we]:qe[we]=K[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 H(q,qe,_e,Ae,null)}function H(q,K,ae,_e,Ae){var we={type:q,props:K,key:ae,ref:_e,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:Ae==null?++v:Ae};return Ae==null&&c.vnode!=null&&c.vnode(we),we}function ee(){return{current:null}}function ie(q){return q.children}function J(q,K){this.props=q,this.context=K}function V(q,K){if(K==null)return q.__?V(q.__,q.__.__k.indexOf(q)+1):null;for(var ae;K<q.__k.length;K++)if((ae=q.__k[K])!=null&&ae.__e!=null)return ae.__e;return typeof q.type=="function"?V(q):null}function Z(q){var K,ae;if((q=q.__)!=null&&q.__c!=null){for(q.__e=q.__c.base=null,K=0;K<q.__k.length;K++)if((ae=q.__k[K])!=null&&ae.__e!=null){q.__e=q.__c.base=ae.__e;break}return Z(q)}}function z(q){(!q.__d&&(q.__d=!0)&&m.push(q)&&!T.__r++||w!==c.debounceRendering)&&((w=c.debounceRendering)||x)(T)}function T(){for(var q;T.__r=m.length;)q=m.sort(function(K,ae){return K.__v.__b-ae.__v.__b}),m=[],q.some(function(K){var ae,_e,Ae,we,qe,nt;K.__d&&(qe=(we=(ae=K).__v).__e,(nt=ae.__P)&&(_e=[],(Ae=N({},we)).__v=we.__v+1,ge(nt,we,Ae,ae.__n,nt.ownerSVGElement!==void 0,we.__h!=null?[qe]:null,_e,qe==null?V(we):qe,we.__h),ue(_e,we),we.__e!=qe&&Z(we)))})}function L(q,K,ae,_e,Ae,we,qe,nt,$e,Ye){var ve,Ue,te,Le,ut,vt,it,yt=_e&&_e.__k||j,St=yt.length;for(ae.__k=[],ve=0;ve<K.length;ve++)if((Le=ae.__k[ve]=(Le=K[ve])==null||typeof Le=="boolean"?null:typeof Le=="string"||typeof Le=="number"||typeof Le=="bigint"?H(null,Le,null,null,Le):Array.isArray(Le)?H(ie,{children:Le},null,null,null):Le.__b>0?H(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(Ue=0;Ue<St;Ue++){if((te=yt[Ue])&&Le.key==te.key&&Le.type===te.type){yt[Ue]=void 0;break}te=null}ge(q,Le,te=te||P,Ae,we,qe,nt,$e,Ye),ut=Le.__e,(Ue=Le.ref)&&te.ref!=Ue&&(it||(it=[]),te.ref&&it.push(te.ref,null,Le),it.push(Ue,Le.__c||ut,Le)),ut!=null?(vt==null&&(vt=ut),typeof Le.type=="function"&&Le.__k===te.__k?Le.__d=$e=C(Le,$e,q):$e=$(q,Le,te,yt,ut,$e),typeof ae.type=="function"&&(ae.__d=$e)):$e&&te.__e==$e&&$e.parentNode!=q&&($e=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(_e,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,K,ae){for(var _e,Ae=q.__k,we=0;Ae&&we<Ae.length;we++)(_e=Ae[we])&&(_e.__=q,K=typeof _e.type=="function"?C(_e,K,ae):$(ae,_e,_e,Ae,_e.__e,K));return K}function F(q,K){return K=K||[],q==null||typeof q=="boolean"||(Array.isArray(q)?q.some(function(ae){F(ae,K)}):K.push(q)),K}function $(q,K,ae,_e,Ae,we){var qe,nt,$e;if(K.__d!==void 0)qe=K.__d,K.__d=void 0;else if(ae==null||Ae!=we||Ae.parentNode==null)e:if(we==null||we.parentNode!==q)q.appendChild(Ae),qe=null;else{for(nt=we,$e=0;(nt=nt.nextSibling)&&$e<_e.length;$e+=2)if(nt==Ae)break e;q.insertBefore(Ae,we),qe=we}return qe!==void 0?qe:Ae.nextSibling}function le(q,K,ae){K[0]==="-"?q.setProperty(K,ae):q[K]=ae==null?"":typeof ae!="number"||D.test(K)?ae:ae+"px"}function ce(q,K,ae,_e,Ae){var we;e:if(K==="style")if(typeof ae=="string")q.style.cssText=ae;else{if(typeof _e=="string"&&(q.style.cssText=_e=""),_e)for(K in _e)ae&&K in ae||le(q.style,K,"");if(ae)for(K in ae)_e&&ae[K]===_e[K]||le(q.style,K,ae[K])}else if(K[0]==="o"&&K[1]==="n")we=K!==(K=K.replace(/Capture$/,"")),K=K.toLowerCase()in q?K.toLowerCase().slice(2):K.slice(2),q.l||(q.l={}),q.l[K+we]=ae,ae?_e||q.addEventListener(K,we?xe:ye,we):q.removeEventListener(K,we?xe:ye,we);else if(K!=="dangerouslySetInnerHTML"){if(Ae)K=K.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(K!=="href"&&K!=="list"&&K!=="form"&&K!=="tabIndex"&&K!=="download"&&K in q)try{q[K]=ae==null?"":ae;break e}catch(qe){}typeof ae=="function"||(ae!=null&&(ae!==!1||K[0]==="a"&&K[1]==="r")?q.setAttribute(K,ae):q.removeAttribute(K))}}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,K,ae,_e,Ae,we,qe,nt,$e){var Ye,ve,Ue,te,Le,ut,vt,it,yt,St,Pt,at=K.type;if(K.constructor!==void 0)return null;ae.__h!=null&&($e=ae.__h,nt=K.__e=ae.__e,K.__h=null,we=[nt]),(Ye=c.__b)&&Ye(K);try{e:if(typeof at=="function"){if(it=K.props,yt=(Ye=at.contextType)&&_e[Ye.__c],St=Ye?yt?yt.props.value:Ye.__:_e,ae.__c?vt=(ve=K.__c=ae.__c).__=ve.__E:("prototype"in at&&at.prototype.render?K.__c=ve=new at(it,St):(K.__c=ve=new J(it,St),ve.constructor=at,ve.render=Ie),yt&&yt.sub(ve),ve.props=it,ve.state||(ve.state={}),ve.context=St,ve.__n=_e,Ue=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,Ue)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||K.__v===ae.__v){ve.props=it,ve.state=ve.__s,K.__v!==ae.__v&&(ve.__d=!1),ve.__v=K,K.__e=ae.__e,K.__k=ae.__k,K.__k.forEach(function(Nt){Nt&&(Nt.__=K)}),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(K),ve.__d=!1,ve.__v=K,ve.__P=q,Ye=ve.render(ve.props,ve.state,ve.context),ve.state=ve.__s,ve.getChildContext!=null&&(_e=N(N({},_e),ve.getChildContext())),Ue||ve.getSnapshotBeforeUpdate==null||(ut=ve.getSnapshotBeforeUpdate(te,Le)),Pt=Ye!=null&&Ye.type===ie&&Ye.key==null?Ye.props.children:Ye,L(q,Array.isArray(Pt)?Pt:[Pt],K,ae,_e,Ae,we,qe,nt,$e),ve.base=K.__e,K.__h=null,ve.__h.length&&qe.push(ve),vt&&(ve.__E=ve.__=null),ve.__e=!1}else we==null&&K.__v===ae.__v?(K.__k=ae.__k,K.__e=ae.__e):K.__e=he(ae.__e,K,ae,_e,Ae,we,qe,$e);(Ye=c.diffed)&&Ye(K)}catch(Nt){K.__v=null,($e||we!=null)&&(K.__e=nt,K.__h=!!$e,we[we.indexOf(nt)]=null),c.__e(Nt,K,ae)}}function ue(q,K){c.__c&&c.__c(K,q),q.some(function(ae){try{q=ae.__h,ae.__h=[],q.some(function(_e){_e.call(ae)})}catch(_e){c.__e(_e,ae.__v)}})}function he(q,K,ae,_e,Ae,we,qe,nt){var $e,Ye,ve,Ue=ae.props,te=K.props,Le=K.type,ut=0;if(Le==="svg"&&(Ae=!0),we!=null){for(;ut<we.length;ut++)if(($e=we[ut])&&"setAttribute"in $e==!!Le&&(Le?$e.localName===Le:$e.nodeType===3)){q=$e,we[ut]=null;break}}if(q==null){if(Le===null)return document.createTextNode(te);q=Ae?document.createElementNS("http://www.w3.org/2000/svg",Le):document.createElement(Le,te.is&&te),we=null,nt=!1}if(Le===null)Ue===te||nt&&q.data===te||(q.data=te);else{if(we=we&&l.call(q.childNodes),Ye=(Ue=ae.props||P).dangerouslySetInnerHTML,ve=te.dangerouslySetInnerHTML,!nt){if(we!=null)for(Ue={},ut=0;ut<q.attributes.length;ut++)Ue[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,Ue,Ae,nt),ve)K.__k=[];else if(ut=K.props.children,L(q,Array.isArray(ut)?ut:[ut],K,ae,_e,Ae&&Le!=="foreignObject",we,qe,we?we[0]:ae.__k&&V(ae,0),nt),we!=null)for(ut=we.length;ut--;)we[ut]!=null&&I(we[ut]);nt||("value"in te&&(ut=te.value)!==void 0&&(ut!==Ue.value||ut!==q.value||Le==="progress"&&!ut)&&ce(q,"value",ut,Ue.value,!1),"checked"in te&&(ut=te.checked)!==void 0&&ut!==q.checked&&ce(q,"checked",ut,Ue.checked,!1))}return q}function be(q,K,ae){try{typeof q=="function"?q(K):q.current=K}catch(_e){c.__e(_e,ae)}}function Se(q,K,ae){var _e,Ae;if(c.unmount&&c.unmount(q),(_e=q.ref)&&(_e.current&&_e.current!==q.__e||be(_e,null,K)),(_e=q.__c)!=null){if(_e.componentWillUnmount)try{_e.componentWillUnmount()}catch(we){c.__e(we,K)}_e.base=_e.__P=null}if(_e=q.__k)for(Ae=0;Ae<_e.length;Ae++)_e[Ae]&&Se(_e[Ae],K,typeof q.type!="function");ae||q.__e==null||I(q.__e),q.__e=q.__d=void 0}function Ie(q,K,ae){return this.constructor(q,ae)}function Ke(q,K,ae){var _e,Ae,we;c.__&&c.__(q,K),Ae=(_e=typeof ae=="function")?null:ae&&ae.__k||K.__k,we=[],ge(K,q=(!_e&&ae||K).__k=B(ie,null,[q]),Ae||P,P,K.ownerSVGElement!==void 0,!_e&&ae?[ae]:Ae?null:K.firstChild?l.call(K.childNodes):null,we,!_e&&ae?ae:Ae?Ae.__e:K.firstChild,_e),ue(we,q)}function Pe(q,K){Ke(q,K,Pe)}function Ce(q,K,ae){var _e,Ae,we,qe=N({},q.props);for(we in K)we=="key"?_e=K[we]:we=="ref"?Ae=K[we]:qe[we]=K[we];return arguments.length>2&&(qe.children=arguments.length>3?l.call(arguments,2):ae),H(q.type,qe,_e||q.key,Ae||q.ref,null)}function Ze(q,K){var ae={__c:K="__cC"+A++,__:q,Consumer:function(_e,Ae){return _e.children(Ae)},Provider:function(_e){var Ae,we;return this.getChildContext||(Ae=[],(we={})[K]=this,this.getChildContext=function(){return we},this.shouldComponentUpdate=function(qe){this.props.value!==qe.value&&Ae.some(z)},this.sub=function(qe){Ae.push(qe);var nt=qe.componentWillUnmount;qe.componentWillUnmount=function(){Ae.splice(Ae.indexOf(qe),1),nt&&nt.call(qe)}}),_e.children}};return ae.Provider.__=ae.Consumer.contextType=ae}l=j.slice,c={__e:function(q,K){for(var ae,_e,Ae;K=K.__;)if((ae=K.__c)&&!ae.__)try{if((_e=ae.constructor)&&_e.getDerivedStateFromError!=null&&(ae.setState(_e.getDerivedStateFromError(q)),Ae=ae.__d),ae.componentDidCatch!=null&&(ae.componentDidCatch(q),Ae=ae.__d),Ae)return ae.__E=ae}catch(we){q=we}throw q}},v=0,J.prototype.setState=function(q,K){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&&(K&&this.__h.push(K),z(this))},J.prototype.forceUpdate=function(q){this.__v&&(this.__e=!0,q&&this.__h.push(q),z(this))},J.prototype.render=ie,m=[],x=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,T.__r=0,A=0},function(s,f,i){(function(l,c){i.d(f,"a",function(){return z}),i.d(f,"b",function(){return qo}),i.d(f,"c",function(){return zn}),i.d(f,"d",function(){return et}),i.d(f,"e",function(){return De}),i.d(f,"f",function(){return Te}),i.d(f,"g",function(){return Ve}),i.d(f,"h",function(){return Tr}),i.d(f,"i",function(){return Pt}),i.d(f,"j",function(){return ze}),i.d(f,"k",function(){return Wn}),i.d(f,"l",function(){return Wo}),i.d(f,"m",function(){return vt}),i.d(f,"n",function(){return kr}),i.d(f,"o",function(){return C}),i.d(f,"p",function(){return qi}),i.d(f,"q",function(){return Kn}),i.d(f,"r",function(){return Wi}),i.d(f,"s",function(){return xn}),i.d(f,"t",function(){return Kr}),i.d(f,"u",function(){return lo}),i.d(f,"v",function(){return Wu}),i.d(f,"w",function(){return Zi}),i.d(f,"x",function(){return qr}),i.d(f,"y",function(){return Nn}),i.d(f,"z",function(){return It}),i.d(f,"A",function(){return gn}),i.d(f,"B",function(){return Zn}),i.d(f,"C",function(){return Ye}),i.d(f,"D",function(){return $i}),i.d(f,"E",function(){return Ar}),i.d(f,"F",function(){return Pr}),i.d(f,"G",function(){return Xu}),i.d(f,"H",function(){return Bi}),i.d(f,"I",function(){return Zu}),i.d(f,"J",function(){return _n}),i.d(f,"K",function(){return ne}),i.d(f,"L",function(){return Jt}),i.d(f,"M",function(){return Qi});var v=[];Object.freeze(v);var m={};function x(){return++Ge.mobxGuid}function w(y){throw A(!1,y),"X"}function A(y,b){if(!y)throw new Error("[mobx] "+(b||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(m);function P(y){var b=!1;return function(){if(!b)return b=!0,y.apply(this,arguments)}}var j=function(){};function D(y){return y!==null&&typeof y=="object"}function N(y){if(y===null||typeof y!="object")return!1;var b=Object.getPrototypeOf(y);return b===Object.prototype||b===null}function I(y,b,E){Object.defineProperty(y,b,{enumerable:!1,writable:!0,configurable:!0,value:E})}function B(y,b){var E="isMobX"+y;return b.prototype[E]=!0,function(M){return D(M)&&M[E]===!0}}function H(y){return y instanceof Map}function ee(y){return y instanceof Set}function ie(y){var b=new Set;for(var E in y)b.add(E);return Object.getOwnPropertySymbols(y).forEach(function(M){Object.getOwnPropertyDescriptor(y,M).enumerable&&b.add(M)}),Array.from(b)}function J(y){return y&&y.toString?y.toString():new String(y).toString()}function V(y){return y===null?null:typeof y=="object"?""+y:y}var Z=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:Object.getOwnPropertyNames,z=Symbol("mobx administration"),T=function(){function y(b){b===void 0&&(b="Atom@"+x()),this.name=b,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Ue.NOT_TRACKING}return y.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(b){return b()})},y.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(b){return b()})},y.prototype.reportObserved=function(){return Li(this)},y.prototype.reportChanged=function(){mn(),function(b){b.lowestObserverState!==Ue.STALE&&(b.lowestObserverState=Ue.STALE,b.observers.forEach(function(E){E.dependenciesState===Ue.UP_TO_DATE&&(E.isTracing!==te.NONE&&Vn(E,b),E.onBecomeStale()),E.dependenciesState=Ue.STALE}))}(this),On()},y.prototype.toString=function(){return this.name},y}(),L=B("Atom",T);function C(y,b,E){b===void 0&&(b=j),E===void 0&&(E=j);var M,U=new T(y);return b!==j&&Hi("onBecomeObserved",U,b,M),E!==j&&Ar(U,E),U}var F={identity:function(y,b){return y===b},structural:function(y,b){return $o(y,b)},default:function(y,b){return Object.is(y,b)},shallow:function(y,b){return $o(y,b,1)}},$=function(y,b){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,M){E.__proto__=M}||function(E,M){for(var U in M)M.hasOwnProperty(U)&&(E[U]=M[U])},$(y,b)};/*! *****************************************************************************
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(y){for(var b,E=1,M=arguments.length;E<M;E++)for(var U in b=arguments[E])Object.prototype.hasOwnProperty.call(b,U)&&(y[U]=b[U]);return y},le.apply(this,arguments)};function ce(y){var b=typeof Symbol=="function"&&y[Symbol.iterator],E=0;return b?b.call(y):{next:function(){return y&&E>=y.length&&(y=void 0),{value:y&&y[E++],done:!y}}}}function ye(y,b){var E=typeof Symbol=="function"&&y[Symbol.iterator];if(!E)return y;var M,U,Q=E.call(y),pe=[];try{for(;(b===void 0||b-- >0)&&!(M=Q.next()).done;)pe.push(M.value)}catch(je){U={error:je}}finally{try{M&&!M.done&&(E=Q.return)&&E.call(Q)}finally{if(U)throw U.error}}return pe}function xe(){for(var y=[],b=0;b<arguments.length;b++)y=y.concat(ye(arguments[b]));return y}var ge=Symbol("mobx did run lazy initializers"),ue=Symbol("mobx pending decorators"),he={},be={};function Se(y,b){var E=b?he:be;return E[y]||(E[y]={configurable:!0,enumerable:b,get:function(){return Ie(this),this[y]},set:function(M){Ie(this),this[y]=M}})}function Ie(y){var b,E;if(y[ge]!==!0){var M=y[ue];if(M){I(y,ge,!0);var U=xe(Object.getOwnPropertySymbols(M),Object.keys(M));try{for(var Q=ce(U),pe=Q.next();!pe.done;pe=Q.next()){var je=M[pe.value];je.propertyCreator(y,je.prop,je.descriptor,je.decoratorTarget,je.decoratorArguments)}}catch(Fe){b={error:Fe}}finally{try{pe&&!pe.done&&(E=Q.return)&&E.call(Q)}finally{if(b)throw b.error}}}}}function Ke(y,b){return function(){var E,M=function(U,Q,pe,je){if(je===!0)return b(U,Q,pe,U,E),null;if(!Object.prototype.hasOwnProperty.call(U,ue)){var Fe=U[ue];I(U,ue,le({},Fe))}return U[ue][Q]={prop:Q,propertyCreator:b,descriptor:pe,decoratorTarget:U,decoratorArguments:E},Se(Q,y)};return Pe(arguments)?(E=v,M.apply(null,arguments)):(E=Array.prototype.slice.call(arguments),M)}}function Pe(y){return(y.length===2||y.length===3)&&(typeof y[1]=="string"||typeof y[1]=="symbol")||y.length===4&&y[3]===!0}function Ce(y,b,E){return qr(y)?y:Array.isArray(y)?Ye.array(y,{name:E}):N(y)?Ye.object(y,void 0,{name:E}):H(y)?Ye.map(y,{name:E}):ee(y)?Ye.set(y,{name:E}):y}function Ze(y){return y}function q(y){A(y);var b=Ke(!0,function(M,U,Q,pe,je){var Fe=Q?Q.initializer?Q.initializer.call(M):Q.value:void 0;$r(M).addObservableProp(U,Fe,y)}),E=(l!==void 0&&l.env,b);return E.enhancer=y,E}var K={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function ae(y){return y==null?K:typeof y=="string"?{name:y,deep:!0,proxy:!0}:y}Object.freeze(K);var _e=q(Ce),Ae=q(function(y,b,E){return y==null||gn(y)||Nn(y)||It(y)||yn(y)?y:Array.isArray(y)?Ye.array(y,{name:E,deep:!1}):N(y)?Ye.object(y,void 0,{name:E,deep:!1}):H(y)?Ye.map(y,{name:E,deep:!1}):ee(y)?Ye.set(y,{name:E,deep:!1}):w(!1)}),we=q(Ze),qe=q(function(y,b,E){return $o(y,b)?b:y});function nt(y){return y.defaultDecorator?y.defaultDecorator.enhancer:y.deep===!1?Ze:Ce}var $e={box:function(y,b){arguments.length>2&&ve("box");var E=ae(b);return new Tt(y,nt(E),E.name,!0,E.equals)},array:function(y,b){arguments.length>2&&ve("array");var E=ae(b);return Zo(y,nt(E),E.name)},map:function(y,b){arguments.length>2&&ve("map");var E=ae(b);return new qo(y,nt(E),E.name)},set:function(y,b){arguments.length>2&&ve("set");var E=ae(b);return new ho(y,nt(E),E.name)},object:function(y,b,E){typeof arguments[1]=="string"&&ve("object");var M=ae(E);if(M.proxy===!1)return Kn({},y,b,M);var U=Gi(M),Q=Kn({},void 0,void 0,M),pe=Ju(Q);return Xi(pe,y,b,U),pe},ref:we,shallow:Ae,deep:_e,struct:qe},Ye=function(y,b,E){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return _e.apply(null,arguments);if(qr(y))return y;var M=N(y)?Ye.object(y,b,E):Array.isArray(y)?Ye.array(y,b):H(y)?Ye.map(y,b):ee(y)?Ye.set(y,b):y;if(M!==y)return M;w(!1)};function ve(y){w("Expected one or two arguments to observable."+y+". Did you accidentally try to use observable."+y+" as decorator?")}Object.keys($e).forEach(function(y){return Ye[y]=$e[y]});var Ue,te,Le=Ke(!1,function(y,b,E,M,U){var Q=E.get,pe=E.set,je=U[0]||{};$r(y).addComputedProp(y,b,le({get:Q,set:pe,context:y},je))}),ut=Le({equals:F.structural}),vt=function(y,b,E){if(typeof b=="string"||y!==null&&typeof y=="object"&&arguments.length===1)return Le.apply(null,arguments);var M=typeof b=="object"?b:{};return M.get=y,M.set=typeof b=="function"?b:M.set,M.name=M.name||y.name||"",new Xn(M)};vt.struct=ut,function(y){y[y.NOT_TRACKING=-1]="NOT_TRACKING",y[y.UP_TO_DATE=0]="UP_TO_DATE",y[y.POSSIBLY_STALE=1]="POSSIBLY_STALE",y[y.STALE=2]="STALE"}(Ue||(Ue={})),function(y){y[y.NONE=0]="NONE",y[y.LOG=1]="LOG",y[y.BREAK=2]="BREAK"}(te||(te={}));var it=function(y){this.cause=y};function yt(y){return y instanceof it}function St(y){switch(y.dependenciesState){case Ue.UP_TO_DATE:return!1;case Ue.NOT_TRACKING:case Ue.STALE:return!0;case Ue.POSSIBLY_STALE:for(var b=Te(!0),E=Y(),M=y.observing,U=M.length,Q=0;Q<U;Q++){var pe=M[Q];if(Yn(pe)){if(Ge.disableErrorBoundaries)pe.get();else try{pe.get()}catch(je){return se(E),De(b),!0}if(y.dependenciesState===Ue.STALE)return se(E),De(b),!0}}return Xe(y),se(E),De(b),!1}}function Pt(){return Ge.trackingDerivation!==null}function at(y){var b=y.observers.size>0;Ge.computationDepth>0&&b&&w(!1),Ge.allowStateChanges||!b&&Ge.enforceActions!=="strict"||w(!1)}function Nt(y,b,E){var M=Te(!0);Xe(y),y.newObserving=new Array(y.observing.length+100),y.unboundDepsCount=0,y.runId=++Ge.runId;var U,Q=Ge.trackingDerivation;if(Ge.trackingDerivation=y,Ge.disableErrorBoundaries===!0)U=b.call(E);else try{U=b.call(E)}catch(pe){U=new it(pe)}return Ge.trackingDerivation=Q,function(pe){for(var je=pe.observing,Fe=pe.observing=pe.newObserving,dt=Ue.UP_TO_DATE,ot=0,xt=pe.unboundDepsCount,ct=0;ct<xt;ct++)(Ot=Fe[ct]).diffValue===0&&(Ot.diffValue=1,ot!==ct&&(Fe[ot]=Ot),ot++),Ot.dependenciesState>dt&&(dt=Ot.dependenciesState);for(Fe.length=ot,pe.newObserving=null,xt=je.length;xt--;)(Ot=je[xt]).diffValue===0&&Ri(Ot,pe),Ot.diffValue=0;for(;ot--;){var Ot;(Ot=Fe[ot]).diffValue===1&&(Ot.diffValue=0,Fu(Ot,pe))}dt!==Ue.UP_TO_DATE&&(pe.dependenciesState=dt,pe.onBecomeStale())}(y),De(M),U}function G(y){var b=y.observing;y.observing=[];for(var E=b.length;E--;)Ri(b[E],y);y.dependenciesState=Ue.NOT_TRACKING}function ne(y){var b=Y();try{return y()}finally{se(b)}}function Y(){var y=Ge.trackingDerivation;return Ge.trackingDerivation=null,y}function se(y){Ge.trackingDerivation=y}function Te(y){var b=Ge.allowStateReads;return Ge.allowStateReads=y,b}function De(y){Ge.allowStateReads=y}function Xe(y){if(y.dependenciesState!==Ue.UP_TO_DATE){y.dependenciesState=Ue.UP_TO_DATE;for(var b=y.observing,E=b.length;E--;)b[E].lowestObserverState=Ue.UP_TO_DATE}}var ft=0,Ut=1,Kt=Object.getOwnPropertyDescriptor(function(){},"name");Kt&&Kt.configurable;function Ct(y,b,E){var M=function(){return Rt(y,b,E||this,arguments)};return M.isMobxAction=!0,M}function Rt(y,b,E,M){var U=ze();try{return b.apply(E,M)}catch(Q){throw U.error=Q,Q}finally{Ve(U)}}function ze(y,b,E){var M=0,U=Y();mn();var Q={prevDerivation:U,prevAllowStateChanges:rt(!0),prevAllowStateReads:Te(!0),notifySpy:!1,startTime:M,actionId:Ut++,parentActionId:ft};return ft=Q.actionId,Q}function Ve(y){ft!==y.actionId&&w("invalid action stack. did you forget to finish an action?"),ft=y.parentActionId,y.error!==void 0&&(Ge.suppressReactionErrors=!0),wt(y.prevAllowStateChanges),De(y.prevAllowStateReads),On(),se(y.prevDerivation),y.notifySpy,Ge.suppressReactionErrors=!1}function et(y,b){var E,M=rt(y);try{E=b()}finally{wt(M)}return E}function rt(y){var b=Ge.allowStateChanges;return Ge.allowStateChanges=y,b}function wt(y){Ge.allowStateChanges=y}var Tt=function(y){function b(E,M,U,Q,pe){U===void 0&&(U="ObservableValue@"+x()),pe===void 0&&(pe=F.default);var je=y.call(this,U)||this;return je.enhancer=M,je.name=U,je.equals=pe,je.hasUnreportedChange=!1,je.value=M(E,void 0,U),je}return function(E,M){function U(){this.constructor=E}$(E,M),E.prototype=M===null?Object.create(M):(U.prototype=M.prototype,new U)}(b,y),b.prototype.dehanceValue=function(E){return this.dehancer!==void 0?this.dehancer(E):E},b.prototype.set=function(E){this.value,(E=this.prepareNewValue(E))!==Ge.UNCHANGED&&this.setNewValue(E)},b.prototype.prepareNewValue=function(E){if(at(this),on(this)){var M=gt(this,{object:this,type:"update",newValue:E});if(!M)return Ge.UNCHANGED;E=M.newValue}return E=this.enhancer(E,this.value,this.name),this.equals(this.value,E)?Ge.UNCHANGED:E},b.prototype.setNewValue=function(E){var M=this.value;this.value=E,this.reportChanged(),wn(this)&&Zt(this,{type:"update",object:this,newValue:E,oldValue:M})},b.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},b.prototype.intercept=function(E){return pr(this,E)},b.prototype.observe=function(E,M){return M&&E({object:this,type:"update",newValue:this.value,oldValue:void 0}),dr(this,E)},b.prototype.toJSON=function(){return this.get()},b.prototype.toString=function(){return this.name+"["+this.value+"]"},b.prototype.valueOf=function(){return V(this.get())},b.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},b}(T),cr=B("ObservableValue",Tt),Xn=function(){function y(b){this.dependenciesState=Ue.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=Ue.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+x(),this.value=new it(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=te.NONE,A(b.get,"missing option for computed: get"),this.derivation=b.get,this.name=b.name||"ComputedValue@"+x(),b.set&&(this.setter=Ct(this.name+"-setter",b.set)),this.equals=b.equals||(b.compareStructural||b.struct?F.structural:F.default),this.scope=b.context,this.requiresReaction=!!b.requiresReaction,this.keepAlive=!!b.keepAlive}return y.prototype.onBecomeStale=function(){(function(b){b.lowestObserverState===Ue.UP_TO_DATE&&(b.lowestObserverState=Ue.POSSIBLY_STALE,b.observers.forEach(function(E){E.dependenciesState===Ue.UP_TO_DATE&&(E.dependenciesState=Ue.POSSIBLY_STALE,E.isTracing!==te.NONE&&Vn(E,b),E.onBecomeStale())}))})(this)},y.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(b){return b()})},y.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(b){return b()})},y.prototype.get=function(){this.isComputing&&w("Cycle detected in computation "+this.name+": "+this.derivation),Ge.inBatch!==0||this.observers.size!==0||this.keepAlive?(Li(this),St(this)&&this.trackAndCompute()&&function(E){E.lowestObserverState!==Ue.STALE&&(E.lowestObserverState=Ue.STALE,E.observers.forEach(function(M){M.dependenciesState===Ue.POSSIBLY_STALE?M.dependenciesState=Ue.STALE:M.dependenciesState===Ue.UP_TO_DATE&&(E.lowestObserverState=Ue.UP_TO_DATE)}))}(this)):St(this)&&(this.warnAboutUntrackedRead(),mn(),this.value=this.computeValue(!1),On());var b=this.value;if(yt(b))throw b.cause;return b},y.prototype.peek=function(){var b=this.computeValue(!1);if(yt(b))throw b.cause;return b},y.prototype.set=function(b){if(this.setter){A(!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,b)}finally{this.isRunningSetter=!1}}else A(!1,!1)},y.prototype.trackAndCompute=function(){var b=this.value,E=this.dependenciesState===Ue.NOT_TRACKING,M=this.computeValue(!0),U=E||yt(b)||yt(M)||!this.equals(b,M);return U&&(this.value=M),U},y.prototype.computeValue=function(b){var E;if(this.isComputing=!0,Ge.computationDepth++,b)E=Nt(this,this.derivation,this.scope);else if(Ge.disableErrorBoundaries===!0)E=this.derivation.call(this.scope);else try{E=this.derivation.call(this.scope)}catch(M){E=new it(M)}return Ge.computationDepth--,this.isComputing=!1,E},y.prototype.suspend=function(){this.keepAlive||(G(this),this.value=void 0)},y.prototype.observe=function(b,E){var M=this,U=!0,Q=void 0;return Wo(function(){var pe=M.get();if(!U||E){var je=Y();b({type:"update",object:M,newValue:pe,oldValue:Q}),se(je)}U=!1,Q=pe})},y.prototype.warnAboutUntrackedRead=function(){},y.prototype.toJSON=function(){return this.get()},y.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},y.prototype.valueOf=function(){return V(this.get())},y.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},y}(),Yn=B("ComputedValue",Xn),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},Bu={};function Xo(){return typeof window!="undefined"?window:c!==void 0?c:typeof self!="undefined"?self:Bu}var kn=!0,Ci=!1,Ge=function(){var y=Xo();return y.__mobxInstanceCount>0&&!y.__mobxGlobals&&(kn=!1),y.__mobxGlobals&&y.__mobxGlobals.version!==new Wr().version&&(kn=!1),kn?y.__mobxGlobals?(y.__mobxInstanceCount+=1,y.__mobxGlobals.UNCHANGED||(y.__mobxGlobals.UNCHANGED={}),y.__mobxGlobals):(y.__mobxInstanceCount=1,y.__mobxGlobals=new Wr):(setTimeout(function(){Ci||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 Fu(y,b){y.observers.add(b),y.lowestObserverState>b.dependenciesState&&(y.lowestObserverState=b.dependenciesState)}function Ri(y,b){y.observers.delete(b),y.observers.size===0&&Ii(y)}function Ii(y){y.isPendingUnobservation===!1&&(y.isPendingUnobservation=!0,Ge.pendingUnobservations.push(y))}function mn(){Ge.inBatch++}function On(){if(--Ge.inBatch==0){zi();for(var y=Ge.pendingUnobservations,b=0;b<y.length;b++){var E=y[b];E.isPendingUnobservation=!1,E.observers.size===0&&(E.isBeingObserved&&(E.isBeingObserved=!1,E.onBecomeUnobserved()),E instanceof Xn&&E.suspend())}Ge.pendingUnobservations=[]}}function Li(y){var b=Ge.trackingDerivation;return b!==null?(b.runId!==y.lastAccessedBy&&(y.lastAccessedBy=b.runId,b.newObserving[b.unboundDepsCount++]=y,y.isBeingObserved||(y.isBeingObserved=!0,y.onBecomeObserved())),!0):(y.observers.size===0&&Ge.inBatch>0&&Ii(y),!1)}function Vn(y,b){if(y.isTracing===te.BREAK){var E=[];jr(Kr(y),E,1),new Function(`debugger;
/*
Tracing '`+y.name+`'
You are entering this break point because derivation '`+y.name+"' is being traced and '"+b.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.
`+(y instanceof Xn?y.derivation.toString().replace(/[*]\//g,"/"):"")+`
The dependencies for this derivation are:
`+E.join(`
`)+`
*/
`)()}}function jr(y,b,E){b.length>=1e3?b.push("(and many more)"):(b.push(""+new Array(E).join(" ")+y.name),y.dependencies&&y.dependencies.forEach(function(M){return jr(M,b,E+1)}))}var zn=function(){function y(b,E,M,U){b===void 0&&(b="Reaction@"+x()),U===void 0&&(U=!1),this.name=b,this.onInvalidate=E,this.errorHandler=M,this.requiresObservable=U,this.observing=[],this.newObserving=[],this.dependenciesState=Ue.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+x(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=te.NONE}return y.prototype.onBecomeStale=function(){this.schedule()},y.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ge.pendingReactions.push(this),zi())},y.prototype.isScheduled=function(){return this._isScheduled},y.prototype.runReaction=function(){if(!this.isDisposed){if(mn(),this._isScheduled=!1,St(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(b){this.reportExceptionInDerivation(b)}}On()}},y.prototype.track=function(b){if(!this.isDisposed){mn(),this._isRunning=!0;var E=Nt(this,b,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&G(this),yt(E)&&this.reportExceptionInDerivation(E.cause),On()}},y.prototype.reportExceptionInDerivation=function(b){var E=this;if(this.errorHandler)this.errorHandler(b,this);else{if(Ge.disableErrorBoundaries)throw b;Ge.suppressReactionErrors,Ge.globalReactionErrorHandlers.forEach(function(M){return M(b,E)})}},y.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(mn(),G(this),On()))},y.prototype.getDisposer=function(){var b=this.dispose.bind(this);return b[z]=this,b},y.prototype.toString=function(){return"Reaction["+this.name+"]"},y.prototype.trace=function(b){b===void 0&&(b=!1),function(){for(var E=[],M=0;M<arguments.length;M++)E[M]=arguments[M];var U=!1;typeof E[E.length-1]=="boolean"&&(U=E.pop());var Q=Tn(E);if(!Q)return w(!1);Q.isTracing,te.NONE,Q.isTracing=U?te.BREAK:te.LOG}(this,b)},y}(),Yo=function(y){return y()};function zi(){Ge.inBatch>0||Ge.isRunningReactions||Yo(Uu)}function Uu(){Ge.isRunningReactions=!0;for(var y=Ge.pendingReactions,b=0;y.length>0;){++b==100&&y.splice(0);for(var E=y.splice(0),M=0,U=E.length;M<U;M++)E[M].runReaction()}Ge.isRunningReactions=!1}var co=B("Reaction",zn);function Hu(y){var b=Yo;Yo=function(E){return y(function(){return b(E)})}}function Bi(y){return function(){}}function Gu(){w(!1)}function lr(y){return function(b,E,M){if(M){if(M.value)return{value:Ct(y,M.value),enumerable:!1,configurable:!0,writable:!0};var U=M.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Ct(y,U.call(this))}}}return Fi(y).apply(this,arguments)}}function Fi(y){return function(b,E,M){Object.defineProperty(b,E,{configurable:!0,enumerable:!1,get:function(){},set:function(U){I(this,E,Wn(y,U))}})}}var Wn=function(y,b,E,M){return arguments.length===1&&typeof y=="function"?Ct(y.name||"<unnamed action>",y):arguments.length===2&&typeof b=="function"?Ct(y,b):arguments.length===1&&typeof y=="string"?lr(y):M!==!0?lr(b).apply(null,arguments):void I(y,b,Ct(y.name||b,E.value,this))};function Xu(y,b){return Rt(typeof y=="string"?y:y.name||"<unnamed action>",typeof y=="function"?y:b,this,void 0)}function lo(y){return typeof y=="function"&&y.isMobxAction===!0}function Vo(y,b,E){I(y,b,Ct(b,E.bind(y)))}function Wo(y,b){b===void 0&&(b=m);var E,M=b&&b.name||y.name||"Autorun@"+x();if(!b.scheduler&&!b.delay)E=new zn(M,function(){this.track(pe)},b.onError,b.requiresObservable);else{var U=Ui(b),Q=!1;E=new zn(M,function(){Q||(Q=!0,U(function(){Q=!1,E.isDisposed||E.track(pe)}))},b.onError,b.requiresObservable)}function pe(){y(E)}return E.schedule(),E.getDisposer()}Wn.bound=function(y,b,E,M){return M===!0?(Vo(y,b,E.value),null):E?{configurable:!0,enumerable:!1,get:function(){return Vo(this,b,E.value||E.initializer.call(this)),this[b]},set:Gu}:{enumerable:!1,configurable:!0,set:function(U){Vo(this,b,U)},get:function(){}}};var Yu=function(y){return y()};function Ui(y){return y.scheduler?y.scheduler:y.delay?function(b){return setTimeout(b,y.delay)}:Yu}function Pr(y,b,E){E===void 0&&(E=m);var M,U,Q,pe=E.name||"Reaction@"+x(),je=Wn(pe,E.onError?(M=E.onError,U=b,function(){try{return U.apply(this,arguments)}catch(kt){M.call(this,kt)}}):b),Fe=!E.scheduler&&!E.delay,dt=Ui(E),ot=!0,xt=!1,ct=E.compareStructural?F.structural:E.equals||F.default,Ot=new zn(pe,function(){ot||Fe?En():xt||(xt=!0,dt(En))},E.onError,E.requiresObservable);function En(){if(xt=!1,!Ot.isDisposed){var kt=!1;Ot.track(function(){var an=y(Ot);kt=ot||!ct(Q,an),Q=an}),ot&&E.fireImmediately&&je(Q,Ot),ot||kt!==!0||je(Q,Ot),ot&&(ot=!1)}}return Ot.schedule(),Ot.getDisposer()}function Ar(y,b,E){return Hi("onBecomeUnobserved",y,b,E)}function Hi(y,b,E,M){var U=typeof M=="function"?xn(b,E):xn(b),Q=typeof M=="function"?M:E,pe=y+"Listeners";return U[pe]?U[pe].add(Q):U[pe]=new Set([Q]),typeof U[y]!="function"?w(!1):function(){var je=U[pe];je&&(je.delete(Q),je.size===0&&delete U[pe])}}function kr(y){var b=y.enforceActions,E=y.computedRequiresReaction,M=y.computedConfigurable,U=y.disableErrorBoundaries,Q=y.reactionScheduler,pe=y.reactionRequiresObservable,je=y.observableRequiresReaction;if(y.isolateGlobalState===!0&&((Ge.pendingReactions.length||Ge.inBatch||Ge.isRunningReactions)&&w("isolateGlobalState should be called before MobX is running any reactions"),Ci=!0,kn&&(--Xo().__mobxInstanceCount==0&&(Xo().__mobxGlobals=void 0),Ge=new Wr)),b!==void 0){var Fe=void 0;switch(b){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': '"+b+"', expected 'never', 'always' or 'observed'")}Ge.enforceActions=Fe,Ge.allowStateChanges=Fe!==!0&&Fe!=="strict"}E!==void 0&&(Ge.computedRequiresReaction=!!E),pe!==void 0&&(Ge.reactionRequiresObservable=!!pe),je!==void 0&&(Ge.observableRequiresReaction=!!je,Ge.allowStateReads=!Ge.observableRequiresReaction),M!==void 0&&(Ge.computedConfigurable=!!M),U!==void 0&&(Ge.disableErrorBoundaries=!!U),Q&&Hu(Q)}function Kn(y,b,E,M){var U=Gi(M=ae(M));return Ie(y),$r(y,M.name,U.enhancer),b&&Xi(y,b,E,U),y}function Gi(y){return y.defaultDecorator||(y.deep===!1?we:_e)}function Xi(y,b,E,M){var U,Q;mn();try{var pe=Z(b);try{for(var je=ce(pe),Fe=je.next();!Fe.done;Fe=je.next()){var dt=Fe.value,ot=Object.getOwnPropertyDescriptor(b,dt),xt=(E&&dt in E?E[dt]:ot.get?Le:M)(y,dt,ot,!0);xt&&Object.defineProperty(y,dt,xt)}}catch(ct){U={error:ct}}finally{try{Fe&&!Fe.done&&(Q=je.return)&&Q.call(je)}finally{if(U)throw U.error}}}finally{On()}}function Kr(y,b){return Yi(xn(y,b))}function Yi(y){var b,E,M={name:y.name};return y.observing&&y.observing.length>0&&(M.dependencies=(b=y.observing,E=[],b.forEach(function(U){E.indexOf(U)===-1&&E.push(U)}),E).map(Yi)),M}var Vu=0;function Vi(){this.message="FLOW_CANCELLED"}function Wi(y){arguments.length!==1&&w("Flow expects 1 argument and cannot be used as decorator");var b=y.name||"<unnamed flow>";return function(){var E,M=this,U=arguments,Q=++Vu,pe=Wn(b+" - runid: "+Q+" - init",y).apply(M,U),je=void 0,Fe=new Promise(function(dt,ot){var xt=0;function ct(kt){var an;je=void 0;try{an=Wn(b+" - runid: "+Q+" - yield "+xt++,pe.next).call(pe,kt)}catch(Qr){return ot(Qr)}En(an)}function Ot(kt){var an;je=void 0;try{an=Wn(b+" - runid: "+Q+" - yield "+xt++,pe.throw).call(pe,kt)}catch(Qr){return ot(Qr)}En(an)}function En(kt){if(!kt||typeof kt.then!="function")return kt.done?dt(kt.value):(je=Promise.resolve(kt.value)).then(ct,Ot);kt.then(En,ot)}E=ot,ct(void 0)});return Fe.cancel=Wn(b+" - runid: "+Q+" - cancel",function(){try{je&&Zr(je);var dt=pe.return(void 0),ot=Promise.resolve(dt.value);ot.then(j,j),Zr(ot),E(new Vi)}catch(xt){E(xt)}}),Fe}}function Zr(y){typeof y.cancel=="function"&&y.cancel()}function Ki(y,b){if(y==null)return!1;if(b!==void 0){if(gn(y)===!1||!y[z].values.has(b))return!1;var E=xn(y,b);return Yn(E)}return Yn(y)}function Wu(y){return arguments.length>1?w(!1):Ki(y)}function Zi(y,b){return typeof b!="string"?w(!1):Ki(y,b)}function Ko(y,b){return y!=null&&(b!==void 0?!!gn(y)&&y[z].values.has(b):gn(y)||!!y[z]||L(y)||co(y)||Yn(y))}function qr(y){return arguments.length!==1&&w(!1),Ko(y)}function Zn(y){return gn(y)?y[z].getKeys():It(y)||yn(y)?Array.from(y.keys()):Nn(y)?y.map(function(b,E){return E}):w(!1)}function Jt(y){return gn(y)?Zn(y).map(function(b){return y[b]}):It(y)?Zn(y).map(function(b){return y.get(b)}):yn(y)?Array.from(y.values()):Nn(y)?y.slice():w(!1)}function qi(y){return gn(y)?Zn(y).map(function(b){return[b,y[b]]}):It(y)?Zn(y).map(function(b){return[b,y.get(b)]}):yn(y)?Array.from(y.entries()):Nn(y)?y.map(function(b,E){return[E,b]}):w(!1)}function Ji(y,b,E){if(arguments.length!==2||yn(y))if(gn(y)){var M=y[z],U=M.values.get(b);U?M.write(b,E):M.addObservableProp(b,E,M.defaultEnhancer)}else if(It(y))y.set(b,E);else if(yn(y))y.add(b);else{if(!Nn(y))return w(!1);typeof b!="number"&&(b=parseInt(b,10)),A(b>=0,"Not a valid index: '"+b+"'"),mn(),b>=y.length&&(y.length=b+1),y[b]=E,On()}else{mn();var Q=b;try{for(var pe in Q)Ji(y,pe,Q[pe])}finally{On()}}}function $i(y,b,E,M){return typeof E=="function"?function(U,Q,pe,je){return Tr(U,Q).observe(pe,je)}(y,b,E,M):function(U,Q,pe){return Tr(U).observe(Q,pe)}(y,b,E)}Vi.prototype=Object.create(Error.prototype);var Ku={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function fr(y,b,E,M){return M.detectCycles&&y.set(b,E),E}function Mn(y,b,E){if(!b.recurseEverything&&!qr(y)||typeof y!="object")return y;if(y===null)return null;if(y instanceof Date)return y;if(cr(y))return Mn(y.get(),b,E);if(qr(y)&&Zn(y),b.detectCycles===!0&&y!==null&&E.has(y))return E.get(y);if(Nn(y)||Array.isArray(y)){var M=fr(E,y,[],b),U=y.map(function(ct){return Mn(ct,b,E)});M.length=U.length;for(var Q=0,pe=U.length;Q<pe;Q++)M[Q]=U[Q];return M}if(yn(y)||Object.getPrototypeOf(y)===Set.prototype){if(b.exportMapsAsObjects===!1){var je=fr(E,y,new Set,b);return y.forEach(function(ct){je.add(Mn(ct,b,E))}),je}var Fe=fr(E,y,[],b);return y.forEach(function(ct){Fe.push(Mn(ct,b,E))}),Fe}if(It(y)||Object.getPrototypeOf(y)===Map.prototype){if(b.exportMapsAsObjects===!1){var dt=fr(E,y,new Map,b);return y.forEach(function(ct,Ot){dt.set(Ot,Mn(ct,b,E))}),dt}var ot=fr(E,y,{},b);return y.forEach(function(ct,Ot){ot[Ot]=Mn(ct,b,E)}),ot}var xt=fr(E,y,{},b);return ie(y).forEach(function(ct){xt[ct]=Mn(y[ct],b,E)}),xt}function Zu(y,b){var E;return typeof b=="boolean"&&(b={detectCycles:b}),b||(b=Ku),b.detectCycles=b.detectCycles===void 0?b.recurseEverything===!0:b.detectCycles===!0,b.detectCycles&&(E=new Map),Mn(y,b,E)}function Tn(y){switch(y.length){case 0:return Ge.trackingDerivation;case 1:return xn(y[0]);case 2:return xn(y[0],y[1])}}function _n(y,b){b===void 0&&(b=void 0),mn();try{return y.apply(b)}finally{On()}}function Qi(y,b,E){return arguments.length===1||b&&typeof b=="object"?qu(y,b):ea(y,b,E||{})}function ea(y,b,E){var M;typeof E.timeout=="number"&&(M=setTimeout(function(){if(!Q[z].isDisposed){Q();var pe=new Error("WHEN_TIMEOUT");if(!E.onError)throw pe;E.onError(pe)}},E.timeout)),E.name=E.name||"When@"+x();var U=Ct(E.name+"-effect",b),Q=Wo(function(pe){y()&&(pe.dispose(),M&&clearTimeout(M),U())},E);return Q}function qu(y,b){var E,M=new Promise(function(U,Q){var pe=ea(y,U,le(le({},b),{onError:Q}));E=function(){pe(),Q("WHEN_CANCELLED")}});return M.cancel=E,M}function fo(y){return y[z]}function qn(y){return typeof y=="string"||typeof y=="number"||typeof y=="symbol"}var Jr={has:function(y,b){if(b===z||b==="constructor"||b===ge)return!0;var E=fo(y);return qn(b)?E.has(b):b in y},get:function(y,b){if(b===z||b==="constructor"||b===ge)return y[b];var E=fo(y),M=E.values.get(b);if(M instanceof T){var U=M.get();return U===void 0&&E.has(b),U}return qn(b)&&E.has(b),y[b]},set:function(y,b,E){return!!qn(b)&&(Ji(y,b,E),!0)},deleteProperty:function(y,b){return!!qn(b)&&(fo(y).remove(b),!0)},ownKeys:function(y){return fo(y).keysAtom.reportObserved(),Reflect.ownKeys(y)},preventExtensions:function(y){return w("Dynamic observable objects cannot be frozen"),!1}};function Ju(y){var b=new Proxy(y,Jr);return y[z].proxy=b,b}function on(y){return y.interceptors!==void 0&&y.interceptors.length>0}function pr(y,b){var E=y.interceptors||(y.interceptors=[]);return E.push(b),P(function(){var M=E.indexOf(b);M!==-1&&E.splice(M,1)})}function gt(y,b){var E=Y();try{for(var M=xe(y.interceptors||[]),U=0,Q=M.length;U<Q&&(A(!(b=M[U](b))||b.type,"Intercept handlers should return nothing or a change object"),b);U++);return b}finally{se(E)}}function wn(y){return y.changeListeners!==void 0&&y.changeListeners.length>0}function dr(y,b){var E=y.changeListeners||(y.changeListeners=[]);return E.push(b),P(function(){var M=E.indexOf(b);M!==-1&&E.splice(M,1)})}function Zt(y,b){var E=Y(),M=y.changeListeners;if(M){for(var U=0,Q=(M=M.slice()).length;U<Q;U++)M[U](b);se(E)}}var ta={get:function(y,b){return b===z?y[z]:b==="length"?y[z].getArrayLength():typeof b=="number"?Dn.get.call(y,b):typeof b!="string"||isNaN(b)?Dn.hasOwnProperty(b)?Dn[b]:y[b]:Dn.get.call(y,parseInt(b))},set:function(y,b,E){return b==="length"&&y[z].setArrayLength(E),typeof b=="number"&&Dn.set.call(y,b,E),typeof b=="symbol"||isNaN(b)?y[b]=E:Dn.set.call(y,parseInt(b),E),!0},preventExtensions:function(y){return w("Observable arrays cannot be frozen"),!1}};function Zo(y,b,E,M){E===void 0&&(E="ObservableArray@"+x()),M===void 0&&(M=!1);var U,Q,pe,je=new na(E,b,M);U=je.values,Q=z,pe=je,Object.defineProperty(U,Q,{enumerable:!1,writable:!1,configurable:!0,value:pe});var Fe=new Proxy(je.values,ta);if(je.proxy=Fe,y&&y.length){var dt=rt(!0);je.spliceWithArray(0,0,y),wt(dt)}return Fe}var na=function(){function y(b,E,M){this.owned=M,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new T(b||"ObservableArray@"+x()),this.enhancer=function(U,Q){return E(U,Q,b+"[..]")}}return y.prototype.dehanceValue=function(b){return this.dehancer!==void 0?this.dehancer(b):b},y.prototype.dehanceValues=function(b){return this.dehancer!==void 0&&b.length>0?b.map(this.dehancer):b},y.prototype.intercept=function(b){return pr(this,b)},y.prototype.observe=function(b,E){return E===void 0&&(E=!1),E&&b({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),dr(this,b)},y.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},y.prototype.setArrayLength=function(b){if(typeof b!="number"||b<0)throw new Error("[mobx.array] Out of range: "+b);var E=this.values.length;if(b!==E)if(b>E){for(var M=new Array(b-E),U=0;U<b-E;U++)M[U]=void 0;this.spliceWithArray(E,0,M)}else this.spliceWithArray(b,E-b)},y.prototype.updateArrayLength=function(b,E){if(b!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=E},y.prototype.spliceWithArray=function(b,E,M){var U=this;at(this.atom);var Q=this.values.length;if(b===void 0?b=0:b>Q?b=Q:b<0&&(b=Math.max(0,Q+b)),E=arguments.length===1?Q-b:E==null?0:Math.max(0,Math.min(E,Q-b)),M===void 0&&(M=v),on(this)){var pe=gt(this,{object:this.proxy,type:"splice",index:b,removedCount:E,added:M});if(!pe)return v;E=pe.removedCount,M=pe.added}M=M.length===0?M:M.map(function(Fe){return U.enhancer(Fe,void 0)});var je=this.spliceItemsIntoValues(b,E,M);return E===0&&M.length===0||this.notifyArraySplice(b,M,je),this.dehanceValues(je)},y.prototype.spliceItemsIntoValues=function(b,E,M){var U;if(M.length<1e4)return(U=this.values).splice.apply(U,xe([b,E],M));var Q=this.values.slice(b,b+E);return this.values=this.values.slice(0,b).concat(M,this.values.slice(b+E)),Q},y.prototype.notifyArrayChildUpdate=function(b,E,M){var U=!this.owned&&!1,Q=wn(this),pe=Q||U?{object:this.proxy,type:"update",index:b,newValue:E,oldValue:M}:null;this.atom.reportChanged(),Q&&Zt(this,pe)},y.prototype.notifyArraySplice=function(b,E,M){var U=!this.owned&&!1,Q=wn(this),pe=Q||U?{object:this.proxy,type:"splice",index:b,removed:M,added:E,removedCount:M.length,addedCount:E.length}:null;this.atom.reportChanged(),Q&&Zt(this,pe)},y}(),Dn={intercept:function(y){return this[z].intercept(y)},observe:function(y,b){return b===void 0&&(b=!1),this[z].observe(y,b)},clear:function(){return this.splice(0)},replace:function(y){var b=this[z];return b.spliceWithArray(0,b.values.length,y)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(y,b){for(var E=[],M=2;M<arguments.length;M++)E[M-2]=arguments[M];var U=this[z];switch(arguments.length){case 0:return[];case 1:return U.spliceWithArray(y);case 2:return U.spliceWithArray(y,b)}return U.spliceWithArray(y,b,E)},spliceWithArray:function(y,b,E){return this[z].spliceWithArray(y,b,E)},push:function(){for(var y=[],b=0;b<arguments.length;b++)y[b]=arguments[b];var E=this[z];return E.spliceWithArray(E.values.length,0,y),E.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 y=[],b=0;b<arguments.length;b++)y[b]=arguments[b];var E=this[z];return E.spliceWithArray(0,0,y),E.values.length},reverse:function(){var y=this.slice();return y.reverse.apply(y,arguments)},sort:function(y){var b=this.slice();return b.sort.apply(b,arguments)},remove:function(y){var b=this[z],E=b.dehanceValues(b.values).indexOf(y);return E>-1&&(this.splice(E,1),!0)},get:function(y){var b=this[z];if(b&&y<b.values.length)return b.atom.reportObserved(),b.dehanceValue(b.values[y])},set:function(y,b){var E=this[z],M=E.values;if(y<M.length){at(E.atom);var U=M[y];if(on(E)){var Q=gt(E,{type:"update",object:E.proxy,index:y,newValue:b});if(!Q)return;b=Q.newValue}(b=E.enhancer(b,U))!==U&&(M[y]=b,E.notifyArrayChildUpdate(y,b,U))}else{if(y!==M.length)throw new Error("[mobx.array] Index out of bounds, "+y+" is larger than "+M.length);E.spliceWithArray(y,0,[b])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(y){typeof Array.prototype[y]=="function"&&(Dn[y]=function(){var b=this[z];b.atom.reportObserved();var E=b.dehanceValues(b.values);return E[y].apply(E,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(y){typeof Array.prototype[y]=="function"&&(Dn[y]=function(b,E){var M=this,U=this[z];return U.atom.reportObserved(),U.dehanceValues(U.values)[y](function(Q,pe){return b.call(E,Q,pe,M)},E)})}),["reduce","reduceRight"].forEach(function(y){Dn[y]=function(){var b=this,E=this[z];E.atom.reportObserved();var M=arguments[0];return arguments[0]=function(U,Q,pe){return Q=E.dehanceValue(Q),M(U,Q,pe,b)},E.values[y].apply(E.values,arguments)}});var ra,po=B("ObservableArrayAdministration",na);function Nn(y){return D(y)&&po(y[z])}var oa,$u={},qo=function(){function y(b,E,M){if(E===void 0&&(E=Ce),M===void 0&&(M="ObservableMap@"+x()),this.enhancer=E,this.name=M,this[ra]=$u,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(b)}return y.prototype._has=function(b){return this._data.has(b)},y.prototype.has=function(b){var E=this;if(!Ge.trackingDerivation)return this._has(b);var M=this._hasMap.get(b);if(!M){var U=M=new Tt(this._has(b),Ze,this.name+"."+J(b)+"?",!1);this._hasMap.set(b,U),Ar(U,function(){return E._hasMap.delete(b)})}return M.get()},y.prototype.set=function(b,E){var M=this._has(b);if(on(this)){var U=gt(this,{type:M?"update":"add",object:this,newValue:E,name:b});if(!U)return this;E=U.newValue}return M?this._updateValue(b,E):this._addValue(b,E),this},y.prototype.delete=function(b){var E=this;if(at(this._keysAtom),on(this)&&!(U=gt(this,{type:"delete",object:this,name:b})))return!1;if(this._has(b)){var M=wn(this),U=M?{type:"delete",object:this,oldValue:this._data.get(b).value,name:b}:null;return _n(function(){E._keysAtom.reportChanged(),E._updateHasMapEntry(b,!1),E._data.get(b).setNewValue(void 0),E._data.delete(b)}),M&&Zt(this,U),!0}return!1},y.prototype._updateHasMapEntry=function(b,E){var M=this._hasMap.get(b);M&&M.setNewValue(E)},y.prototype._updateValue=function(b,E){var M=this._data.get(b);if((E=M.prepareNewValue(E))!==Ge.UNCHANGED){var U=wn(this),Q=U?{type:"update",object:this,oldValue:M.value,name:b,newValue:E}:null;M.setNewValue(E),U&&Zt(this,Q)}},y.prototype._addValue=function(b,E){var M=this;at(this._keysAtom),_n(function(){var pe=new Tt(E,M.enhancer,M.name+"."+J(b),!1);M._data.set(b,pe),E=pe.value,M._updateHasMapEntry(b,!0),M._keysAtom.reportChanged()});var U=wn(this),Q=U?{type:"add",object:this,name:b,newValue:E}:null;U&&Zt(this,Q)},y.prototype.get=function(b){return this.has(b)?this.dehanceValue(this._data.get(b).get()):this.dehanceValue(void 0)},y.prototype.dehanceValue=function(b){return this.dehancer!==void 0?this.dehancer(b):b},y.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},y.prototype.values=function(){var b=this,E=this.keys();return bo({next:function(){var M=E.next(),U=M.done,Q=M.value;return{done:U,value:U?void 0:b.get(Q)}}})},y.prototype.entries=function(){var b=this,E=this.keys();return bo({next:function(){var M=E.next(),U=M.done,Q=M.value;return{done:U,value:U?void 0:[Q,b.get(Q)]}}})},y.prototype[ra=z,Symbol.iterator]=function(){return this.entries()},y.prototype.forEach=function(b,E){var M,U;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];b.call(E,dt,Fe,this)}}catch(ot){M={error:ot}}finally{try{pe&&!pe.done&&(U=Q.return)&&U.call(Q)}finally{if(M)throw M.error}}},y.prototype.merge=function(b){var E=this;return It(b)&&(b=b.toJS()),_n(function(){var M=rt(!0);try{N(b)?ie(b).forEach(function(U){return E.set(U,b[U])}):Array.isArray(b)?b.forEach(function(U){var Q=ye(U,2),pe=Q[0],je=Q[1];return E.set(pe,je)}):H(b)?(b.constructor!==Map&&w("Cannot initialize from classes that inherit from Map: "+b.constructor.name),b.forEach(function(U,Q){return E.set(Q,U)})):b!=null&&w("Cannot initialize map from "+b)}finally{wt(M)}}),this},y.prototype.clear=function(){var b=this;_n(function(){ne(function(){var E,M;try{for(var U=ce(b.keys()),Q=U.next();!Q.done;Q=U.next()){var pe=Q.value;b.delete(pe)}}catch(je){E={error:je}}finally{try{Q&&!Q.done&&(M=U.return)&&M.call(U)}finally{if(E)throw E.error}}})})},y.prototype.replace=function(b){var E=this;return _n(function(){var M,U,Q,pe,je=function(un){if(H(un)||It(un))return un;if(Array.isArray(un))return new Map(un);if(N(un)){var la=new Map;for(var eo in un)la.set(eo,un[eo]);return la}return w("Cannot convert to map from '"+un+"'")}(b),Fe=new Map,dt=!1;try{for(var ot=ce(E._data.keys()),xt=ot.next();!xt.done;xt=ot.next()){var ct=xt.value;if(!je.has(ct))if(E.delete(ct))dt=!0;else{var Ot=E._data.get(ct);Fe.set(ct,Ot)}}}catch(un){M={error:un}}finally{try{xt&&!xt.done&&(U=ot.return)&&U.call(ot)}finally{if(M)throw M.error}}try{for(var En=ce(je.entries()),kt=En.next();!kt.done;kt=En.next()){var an=ye(kt.value,2),Qr=(ct=an[0],Ot=an[1],E._data.has(ct));if(E.set(ct,Ot),E._data.has(ct)){var es=E._data.get(ct);Fe.set(ct,es),Qr||(dt=!0)}}}catch(un){Q={error:un}}finally{try{kt&&!kt.done&&(pe=En.return)&&pe.call(En)}finally{if(Q)throw Q.error}}if(!dt)if(E._data.size!==Fe.size)E._keysAtom.reportChanged();else for(var sa=E._data.keys(),ca=Fe.keys(),mo=sa.next(),ei=ca.next();!mo.done;){if(mo.value!==ei.value){E._keysAtom.reportChanged();break}mo=sa.next(),ei=ca.next()}E._data=Fe}),this},Object.defineProperty(y.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),y.prototype.toPOJO=function(){var b,E,M={};try{for(var U=ce(this),Q=U.next();!Q.done;Q=U.next()){var pe=ye(Q.value,2),je=pe[0],Fe=pe[1];M[typeof je=="symbol"?je:J(je)]=Fe}}catch(dt){b={error:dt}}finally{try{Q&&!Q.done&&(E=U.return)&&E.call(U)}finally{if(b)throw b.error}}return M},y.prototype.toJS=function(){return new Map(this)},y.prototype.toJSON=function(){return this.toPOJO()},y.prototype.toString=function(){var b=this;return this.name+"[{ "+Array.from(this.keys()).map(function(E){return J(E)+": "+b.get(E)}).join(", ")+" }]"},y.prototype.observe=function(b,E){return dr(this,b)},y.prototype.intercept=function(b){return pr(this,b)},y}(),It=B("ObservableMap",qo),Mr={},ho=function(){function y(b,E,M){if(E===void 0&&(E=Ce),M===void 0&&(M="ObservableSet@"+x()),this.name=M,this[oa]=Mr,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(U,Q){return E(U,Q,M)},b&&this.replace(b)}return y.prototype.dehanceValue=function(b){return this.dehancer!==void 0?this.dehancer(b):b},y.prototype.clear=function(){var b=this;_n(function(){ne(function(){var E,M;try{for(var U=ce(b._data.values()),Q=U.next();!Q.done;Q=U.next()){var pe=Q.value;b.delete(pe)}}catch(je){E={error:je}}finally{try{Q&&!Q.done&&(M=U.return)&&M.call(U)}finally{if(E)throw E.error}}})})},y.prototype.forEach=function(b,E){var M,U;try{for(var Q=ce(this),pe=Q.next();!pe.done;pe=Q.next()){var je=pe.value;b.call(E,je,je,this)}}catch(Fe){M={error:Fe}}finally{try{pe&&!pe.done&&(U=Q.return)&&U.call(Q)}finally{if(M)throw M.error}}},Object.defineProperty(y.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),y.prototype.add=function(b){var E=this;if(at(this._atom),on(this)&&!(U=gt(this,{type:"add",object:this,newValue:b})))return this;if(!this.has(b)){_n(function(){E._data.add(E.enhancer(b,void 0)),E._atom.reportChanged()});var M=wn(this),U=M?{type:"add",object:this,newValue:b}:null;M&&Zt(this,U)}return this},y.prototype.delete=function(b){var E=this;if(on(this)&&!(U=gt(this,{type:"delete",object:this,oldValue:b})))return!1;if(this.has(b)){var M=wn(this),U=M?{type:"delete",object:this,oldValue:b}:null;return _n(function(){E._atom.reportChanged(),E._data.delete(b)}),M&&Zt(this,U),!0}return!1},y.prototype.has=function(b){return this._atom.reportObserved(),this._data.has(this.dehanceValue(b))},y.prototype.entries=function(){var b=0,E=Array.from(this.keys()),M=Array.from(this.values());return bo({next:function(){var U=b;return b+=1,U<M.length?{value:[E[U],M[U]],done:!1}:{done:!0}}})},y.prototype.keys=function(){return this.values()},y.prototype.values=function(){this._atom.reportObserved();var b=this,E=0,M=Array.from(this._data.values());return bo({next:function(){return E<M.length?{value:b.dehanceValue(M[E++]),done:!1}:{done:!0}}})},y.prototype.replace=function(b){var E=this;return yn(b)&&(b=b.toJS()),_n(function(){var M=rt(!0);try{Array.isArray(b)||ee(b)?(E.clear(),b.forEach(function(U){return E.add(U)})):b!=null&&w("Cannot initialize set from "+b)}finally{wt(M)}}),this},y.prototype.observe=function(b,E){return dr(this,b)},y.prototype.intercept=function(b){return pr(this,b)},y.prototype.toJS=function(){return new Set(this)},y.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},y.prototype[oa=z,Symbol.iterator]=function(){return this.values()},y}(),yn=B("ObservableSet",ho),ia=function(){function y(b,E,M,U){E===void 0&&(E=new Map),this.target=b,this.values=E,this.name=M,this.defaultEnhancer=U,this.keysAtom=new T(M+".keys")}return y.prototype.read=function(b){return this.values.get(b).get()},y.prototype.write=function(b,E){var M=this.target,U=this.values.get(b);if(U instanceof Xn)U.set(E);else{if(on(this)){if(!(pe=gt(this,{type:"update",object:this.proxy||M,name:b,newValue:E})))return;E=pe.newValue}if((E=U.prepareNewValue(E))!==Ge.UNCHANGED){var Q=wn(this),pe=Q?{type:"update",object:this.proxy||M,oldValue:U.value,name:b,newValue:E}:null;U.setNewValue(E),Q&&Zt(this,pe)}}},y.prototype.has=function(b){var E=this.pendingKeys||(this.pendingKeys=new Map),M=E.get(b);if(M)return M.get();var U=!!this.values.get(b);return M=new Tt(U,Ze,this.name+"."+J(b)+"?",!1),E.set(b,M),M.get()},y.prototype.addObservableProp=function(b,E,M){M===void 0&&(M=this.defaultEnhancer);var U=this.target;if(on(this)){var Q=gt(this,{object:this.proxy||U,name:b,type:"add",newValue:E});if(!Q)return;E=Q.newValue}var pe=new Tt(E,M,this.name+"."+J(b),!1);this.values.set(b,pe),E=pe.value,Object.defineProperty(U,b,function(je){return yo[je]||(yo[je]={configurable:!0,enumerable:!0,get:function(){return this[z].read(je)},set:function(Fe){this[z].write(je,Fe)}})}(b)),this.notifyPropertyAddition(b,E)},y.prototype.addComputedProp=function(b,E,M){var U,Q,pe,je=this.target;M.name=M.name||this.name+"."+J(E),this.values.set(E,new Xn(M)),(b===je||(U=b,Q=E,!(pe=Object.getOwnPropertyDescriptor(U,Q))||pe.configurable!==!1&&pe.writable!==!1))&&Object.defineProperty(b,E,function(Fe){return go[Fe]||(go[Fe]={configurable:Ge.computedConfigurable,enumerable:!1,get:function(){return vo(this).read(Fe)},set:function(dt){vo(this).write(Fe,dt)}})}(E))},y.prototype.remove=function(b){if(this.values.has(b)){var E=this.target;if(on(this)&&!(Fe=gt(this,{object:this.proxy||E,name:b,type:"remove"})))return;try{mn();var M=wn(this),U=!1,Q=this.values.get(b),pe=Q&&Q.get();if(Q&&Q.set(void 0),this.keysAtom.reportChanged(),this.values.delete(b),this.pendingKeys){var je=this.pendingKeys.get(b);je&&je.set(!1)}delete this.target[b];var Fe=M?{type:"remove",object:this.proxy||E,oldValue:pe,name:b}:null;M&&Zt(this,Fe)}finally{On()}}},y.prototype.illegalAccess=function(b,E){},y.prototype.observe=function(b,E){return dr(this,b)},y.prototype.intercept=function(b){return pr(this,b)},y.prototype.notifyPropertyAddition=function(b,E){var M=wn(this),U=M?{type:"add",object:this.proxy||this.target,name:b,newValue:E}:null;if(M&&Zt(this,U),this.pendingKeys){var Q=this.pendingKeys.get(b);Q&&Q.set(!0)}this.keysAtom.reportChanged()},y.prototype.getKeys=function(){var b,E;this.keysAtom.reportObserved();var M=[];try{for(var U=ce(this.values),Q=U.next();!Q.done;Q=U.next()){var pe=ye(Q.value,2),je=pe[0];pe[1]instanceof Tt&&M.push(je)}}catch(Fe){b={error:Fe}}finally{try{Q&&!Q.done&&(E=U.return)&&E.call(U)}finally{if(b)throw b.error}}return M},y}();function $r(y,b,E){if(b===void 0&&(b=""),E===void 0&&(E=Ce),Object.prototype.hasOwnProperty.call(y,z))return y[z];N(y)||(b=(y.constructor.name||"ObservableObject")+"@"+x()),b||(b="ObservableObject@"+x());var M=new ia(y,new Map,J(b),E);return I(y,z,M),M}var yo=Object.create(null),go=Object.create(null);function vo(y){var b=y[z];return b||(Ie(y),y[z])}var aa=B("ObservableObjectAdministration",ia);function gn(y){return!!D(y)&&(Ie(y),aa(y[z]))}function xn(y,b){if(typeof y=="object"&&y!==null){if(Nn(y))return b!==void 0&&w(!1),y[z].atom;if(yn(y))return y[z];if(It(y)){var E=y;return b===void 0?E._keysAtom:((M=E._data.get(b)||E._hasMap.get(b))||w(!1),M)}var M;if(Ie(y),b&&!y[z]&&y[b],gn(y))return b?((M=y[z].values.get(b))||w(!1),M):w(!1);if(L(y)||Yn(y)||co(y))return y}else if(typeof y=="function"&&co(y[z]))return y[z];return w(!1)}function Tr(y,b){return y||w("Expecting some object"),b!==void 0?Tr(xn(y,b)):L(y)||Yn(y)||co(y)||It(y)||yn(y)?y:(Ie(y),y[z]?y[z]:void w(!1))}var Jo=Object.prototype.toString;function $o(y,b,E){return E===void 0&&(E=-1),Qo(y,b,E)}function Qo(y,b,E,M,U){if(y===b)return y!==0||1/y==1/b;if(y==null||b==null)return!1;if(y!=y)return b!=b;var Q=typeof y;if(Q!=="function"&&Q!=="object"&&typeof b!="object")return!1;var pe=Jo.call(y);if(pe!==Jo.call(b))return!1;switch(pe){case"[object RegExp]":case"[object String]":return""+y==""+b;case"[object Number]":return+y!=+y?+b!=+b:+y==0?1/+y==1/b:+y==+b;case"[object Date]":case"[object Boolean]":return+y==+b;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(y)===Symbol.valueOf.call(b);case"[object Map]":case"[object Set]":E>=0&&E++}y=ua(y),b=ua(b);var je=pe==="[object Array]";if(!je){if(typeof y!="object"||typeof b!="object")return!1;var Fe=y.constructor,dt=b.constructor;if(Fe!==dt&&!(typeof Fe=="function"&&Fe instanceof Fe&&typeof dt=="function"&&dt instanceof dt)&&"constructor"in y&&"constructor"in b)return!1}if(E===0)return!1;E<0&&(E=-1),U=U||[];for(var ot=(M=M||[]).length;ot--;)if(M[ot]===y)return U[ot]===b;if(M.push(y),U.push(b),je){if((ot=y.length)!==b.length)return!1;for(;ot--;)if(!Qo(y[ot],b[ot],E-1,M,U))return!1}else{var xt=Object.keys(y),ct=void 0;if(ot=xt.length,Object.keys(b).length!==ot)return!1;for(;ot--;)if(!Qu(b,ct=xt[ot])||!Qo(y[ct],b[ct],E-1,M,U))return!1}return M.pop(),U.pop(),!0}function ua(y){return Nn(y)?y.slice():H(y)||It(y)||ee(y)||yn(y)?Array.from(y.entries()):y}function Qu(y,b){return Object.prototype.hasOwnProperty.call(y,b)}function bo(y){return y[Symbol.iterator]=hr,y}function hr(){return this}if(typeof Proxy=="undefined"||typeof Symbol=="undefined")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:Bi,extras:{getDebugName:function(y,b){return(b!==void 0?xn(y,b):gn(y)||It(y)||yn(y)?Tr(y):xn(y)).name}},$mobx:z})}).call(this,i(155),i(82))},function(s,f,i){var l=i(116),c=i(44),v=i(179);l||c(Object.prototype,"toString",v,{unsafe:!0})},function(s,f,i){var l=i(40),c=i(83),v=i(70),m=i(56),x=i(111),w="Array Iterator",A=m.set,P=m.getterFor(w);s.exports=x(Array,"Array",function(j,D){A(this,{type:w,target:l(j),index:0,kind:D})},function(){var j=P(this),D=j.target,N=j.kind,I=j.index++;return!D||I>=D.length?(j.target=void 0,{value:void 0,done:!0}):N=="keys"?{value:I,done:!1}:N=="values"?{value:D[I],done:!1}:{value:[I,D[I]],done:!1}},"values"),v.Arguments=v.Array,c("keys"),c("values"),c("entries")},function(s,f,i){var l=i(7),c=i(147),v=i(148),m=i(3),x=i(57),w=i(27),A=w("iterator"),P=w("toStringTag"),j=m.values,D=function(I,B){if(I){if(I[A]!==j)try{x(I,A,j)}catch(ee){I[A]=j}if(I[P]||x(I,P,B),c[B]){for(var H in m)if(I[H]!==m[H])try{x(I,H,m[H])}catch(ee){I[H]=m[H]}}}};for(var N in c)D(l[N]&&l[N].prototype,N);D(v,"DOMTokenList")},function(s,f,i){var l=i(17),c=i(7),v=i(46),m=i(76),x=i(35),w=i(15),A=i(64),P=i(36),j=i(109),D=i(19),N=i(34),I=i(99),B=i(28),H=i(33),ee=i(58),ie=i(88),J=i(32),V=i(38),Z=i(40),z=i(87),T=i(41),L=i(71),C=i(54),F=i(66),$=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),Ke=i(85),Pe=i(27),Ce=i(149),Ze=i(150),q=i(73),K=i(56),ae=i(74).forEach,_e=Se("hidden"),Ae="Symbol",we=Pe("toPrimitive"),qe=K.set,nt=K.getterFor(Ae),$e=Object.prototype,Ye=c.Symbol,ve=Ye&&Ye.prototype,Ue=c.TypeError,te=c.QObject,Le=v("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=P&&D(function(){return C(vt({},"a",{get:function(){return vt(this,"a",{value:7}).a}})).a!=7})?function(ze,Ve,et){var rt=ut($e,Ve);rt&&delete $e[Ve],vt(ze,Ve,et),rt&&ze!==$e&&vt($e,Ve,rt)}:vt,Te=function(ze,Ve){var et=Pt[ze]=C(ve);return qe(et,{type:Ae,tag:ze,description:Ve}),P||(et.description=Ve),et},De=function(ze,Ve,et){ze===$e&&De(at,Ve,et),J(ze);var rt=z(Ve);return J(et),N(Pt,rt)?(et.enumerable?(N(ze,_e)&&ze[_e][rt]&&(ze[_e][rt]=!1),et=C(et,{enumerable:L(0,!1)})):(N(ze,_e)||vt(ze,_e,L(1,{})),ze[_e][rt]=!0),se(ze,rt,et)):vt(ze,rt,et)},Xe=function(ze,Ve){J(ze);var et=Z(Ve),rt=F(et).concat(Ct(et));return ae(rt,function(wt){P&&!x(ft,et,wt)||De(ze,wt,et[wt])}),ze},ft=function(ze){var Ve=z(ze),et=x(yt,this,Ve);return!(this===$e&&N(Pt,Ve)&&!N(at,Ve))&&(!(et||!N(this,Ve)||!N(Pt,Ve)||N(this,_e)&&this[_e][Ve])||et)},Ut=function(ze,Ve){var et=Z(ze),rt=z(Ve);if(et!==$e||!N(Pt,rt)||N(at,rt)){var wt=ut(et,rt);return!wt||!N(Pt,rt)||N(et,_e)&&et[_e][rt]||(wt.enumerable=!0),wt}},Kt=function(ze){var Ve=it(Z(ze)),et=[];return ae(Ve,function(rt){N(Pt,rt)||N(Ie,rt)||St(et,rt)}),et},Ct=function(ze){var Ve=ze===$e,et=it(Ve?at:Z(ze)),rt=[];return ae(et,function(wt){!N(Pt,wt)||Ve&&!N($e,wt)||St(rt,Pt[wt])}),rt};if(j||(Ye=function(){if(ee(ve,this))throw Ue("Symbol is not a constructor");var ze=arguments.length&&arguments[0]!==void 0?T(arguments[0]):void 0,Ve=Ke(ze),et=function(rt){this===$e&&x(et,at,rt),N(this,_e)&&N(this[_e],Ve)&&(this[_e][Ve]=!1),se(this,Ve,L(1,rt))};return P&&Y&&se($e,Ve,{configurable:!0,set:et}),Te(Ve,ze)},he(ve=Ye.prototype,"toString",function(){return nt(this).tag}),he(Ye,"withoutSetter",function(ze){return Te(Ke(ze),ze)}),ge.f=ft,xe.f=De,ye.f=Ut,$.f=le.f=Kt,ce.f=Ct,Ce.f=function(ze){return Te(Pe(ze),ze)},P&&(vt(ve,"description",{configurable:!0,get:function(){return nt(this).description}}),A||he($e,"propertyIsEnumerable",ft,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!j,sham:!j},{Symbol:Ye}),ae(F(ne),function(ze){Ze(ze)}),l({target:Ae,stat:!0,forced:!j},{for:function(ze){var Ve=T(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 Ue(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:!j,sham:!P},{create:function(ze,Ve){return Ve===void 0?C(ze):Xe(C(ze),Ve)},defineProperty:De,defineProperties:Xe,getOwnPropertyDescriptor:Ut}),l({target:"Object",stat:!0,forced:!j},{getOwnPropertyNames:Kt,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:!j||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((H(Ve)||ze!==void 0)&&!ie(ze))return I(Ve)||(Ve=function(Tt,cr){if(B(wt)&&(cr=x(wt,this,Tt,cr)),!ie(cr))return cr}),rt[1]=Ve,m(Le,null,rt)}}),!ve[we]){var Rt=ve.valueOf;he(ve,we,function(ze){return x(Rt,this)})}q(Ye,Ae),Ie[_e]=!0},function(s,f,i){var l=i(146).charAt,c=i(41),v=i(56),m=i(111),x="String Iterator",w=v.set,A=v.getterFor(x);m(String,"String",function(P){w(this,{type:x,string:c(P),index:0})},function(){var P,j=A(this),D=j.string,N=j.index;return N>=D.length?{value:void 0,done:!0}:(P=l(D,N),j.index+=P.length,{value:P,done:!1})})},function(s,f,i){(function(l){var c=function(v){return v&&v.Math==Math&&v};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,f,i){var l=i(17),c=i(36),v=i(7),m=i(15),x=i(34),w=i(28),A=i(58),P=i(41),j=i(37).f,D=i(134),N=v.Symbol,I=N&&N.prototype;if(c&&w(N)&&(!("description"in I)||N().description!==void 0)){var B={},H=function(){var T=arguments.length<1||arguments[0]===void 0?void 0:P(arguments[0]),L=A(I,this)?new N(T):T===void 0?N():N(T);return T===""&&(B[L]=!0),L};D(H,N),H.prototype=I,I.constructor=H;var ee=String(N("test"))=="Symbol(test)",ie=m(I.toString),J=m(I.valueOf),V=/^Symbol\((.*)\)[^)]+$/,Z=m("".replace),z=m("".slice);j(I,"description",{configurable:!0,get:function(){var T=J(this),L=ie(T);if(x(B,T))return"";var C=ee?z(L,7,-1):Z(L,V,"$1");return C===""?void 0:C}}),l({global:!0,forced:!0},{Symbol:H})}},function(s,f,i){i(150)("iterator")},function(s,f,i){i.d(f,"a",function(){return m.a}),i.d(f,"c",function(){return m.e}),i.d(f,"h",function(){return V}),i.d(f,"i",function(){return ee}),i.d(f,"j",function(){return B}),i.d(f,"b",function(){return ye}),i.d(f,"e",function(){return he}),i.d(f,"f",function(){return xe}),i.d(f,"g",function(){return Pt});var l,c,v,m=i(0),x=0,w=[],A=m.i.__b,P=m.i.__r,j=m.i.diffed,D=m.i.__c,N=m.i.unmount;function I(G,ne){m.i.__h&&m.i.__h(c,G,x||ne),x=0;var Y=c.__H||(c.__H={__:[],__h:[]});return G>=Y.__.length&&Y.__.push({}),Y.__[G]}function B(G){return x=1,H($,G)}function H(G,ne,Y){var se=I(l++,2);return se.t=G,se.__c||(se.__=[Y?Y(ne):$(void 0,ne),function(Te){var De=se.t(se.__[0],Te);se.__[0]!==De&&(se.__=[De,se.__[1]],se.__c.setState({}))}],se.__c=c),se.__}function ee(G,ne){var Y=I(l++,3);!m.i.__s&&F(Y.__H,ne)&&(Y.__=G,Y.__H=ne,c.__H.__h.push(Y))}function ie(G,ne){var Y=I(l++,4);!m.i.__s&&F(Y.__H,ne)&&(Y.__=G,Y.__H=ne,c.__h.push(Y))}function J(G,ne){var Y=I(l++,7);return F(Y.__H,ne)&&(Y.__=G(),Y.__H=ne,Y.__h=G),Y.__}function V(G,ne){return x=8,J(function(){return G},ne)}function Z(){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(L),G.__H.__h.forEach(C),G.__H.__h=[]}catch(ne){G.__H.__h=[],m.i.__e(ne,G.__v)}}m.i.__b=function(G){c=null,A&&A(G)},m.i.__r=function(G){P&&P(G),l=0;var ne=(c=G.__c).__H;ne&&(ne.__h.forEach(L),ne.__h.forEach(C),ne.__h=[])},m.i.diffed=function(G){j&&j(G);var ne=G.__c;ne&&ne.__H&&ne.__H.__h.length&&(w.push(ne)!==1&&v===m.i.requestAnimationFrame||((v=m.i.requestAnimationFrame)||T)(Z)),c=null},m.i.__c=function(G,ne){ne.some(function(Y){try{Y.__h.forEach(L),Y.__h=Y.__h.filter(function(se){return!se.__||C(se)})}catch(se){ne.some(function(Te){Te.__h&&(Te.__h=[])}),ne=[],m.i.__e(se,Y.__v)}}),D&&D(G,ne)},m.i.unmount=function(G){N&&N(G);var ne,Y=G.__c;Y&&Y.__H&&(Y.__H.__.forEach(function(se){try{L(se)}catch(Te){ne=Te}}),ne&&m.i.__e(ne,Y.__v))};var z=typeof requestAnimationFrame=="function";function T(G){var ne,Y=function(){clearTimeout(se),z&&cancelAnimationFrame(ne),setTimeout(G)},se=setTimeout(Y,100);z&&(ne=requestAnimationFrame(Y))}function L(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 $(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(Te){var De=this.props.ref,Xe=De==Te.ref;return!Xe&&De&&(De.call?De(null):De.current=null),ne?!ne(this.props,Te)||!Xe:ce(this.props,Te)}function se(Te){return this.shouldComponentUpdate=Y,Object(m.e)(G,Te)}return se.displayName="Memo("+(G.displayName||G.name)+")",se.prototype.isReactComponent=!0,se.__f=!0,se}(ye.prototype=new m.a).isPureReactComponent=!0,ye.prototype.shouldComponentUpdate=function(G,ne){return ce(this.props,G)||ce(this.state,ne)};var ge=m.i.__b;m.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!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(G){function ne(Y,se){var Te=le({},Y);return delete Te.ref,G(Te,!(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(m.k)(Object(m.k)(G).map(ne))},Se={map:be,forEach:be,count:function(G){return G?Object(m.k)(G).length:0},only:function(G){var ne=Object(m.k)(G);if(ne.length!==1)throw"Children.only";return ne[0]},toArray:m.k},Ie=m.i.__e;m.i.__e=function(G,ne,Y){if(G.then){for(var se,Te=ne;Te=Te.__;)if((se=Te.__c)&&se.__c)return ne.__e==null&&(ne.__e=Y.__e,ne.__k=Y.__k),se.__c(G,ne)}Ie(G,ne,Y)};var Ke=m.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 Ze(){this.__u=0,this.t=null,this.__b=null}function q(G){var ne=G.__.__c;return ne&&ne.__e&&ne.__e(G)}function K(){this.u=null,this.o=null}m.i.unmount=function(G){var ne=G.__c;ne&&ne.__R&&ne.__R(),ne&&G.__h===!0&&(G.type=null),Ke&&Ke(G)},(Ze.prototype=new m.a).__c=function(G,ne){var Y=ne.__c,se=this;se.t==null&&(se.t=[]),se.t.push(Y);var Te=q(se.__v),De=!1,Xe=function(){De||(De=!0,Y.__R=null,Te?Te(ft):ft())};Y.__R=Xe;var ft=function(){if(!--se.__u){if(se.state.__e){var Kt=se.state.__e;se.__v.__k[0]=Ce(Kt,Kt.__c.__P,Kt.__c.__O)}var Ct;for(se.setState({__e:se.__b=null});Ct=se.t.pop();)Ct.forceUpdate()}},Ut=ne.__h===!0;se.__u++||Ut||se.setState({__e:se.__b=se.__v.__k[0]}),G.then(Xe,Xe)},Ze.prototype.componentWillUnmount=function(){this.t=[]},Ze.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 Te=ne.__e&&Object(m.e)(m.b,null,G.fallback);return Te&&(Te.__h=null),[Object(m.e)(m.b,null,ne.__e?null:G.children),Te]};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 _e(G){return this.getChildContext=function(){return G.context},G.children}function Ae(G){var ne=this,Y=G.i;ne.componentWillUnmount=function(){Object(m.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,Te){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(m.j)(Object(m.e)(_e,{context:ne.context},G.__v),ne.l)):ne.l&&ne.componentWillUnmount()}(K.prototype=new m.a).__e=function(G){var ne=this,Y=q(ne.__v),se=ne.o.get(G);return se[0]++,function(Te){var De=function(){ne.props.revealOrder?(se.push(Te),ae(ne,G,se)):Te()};Y?Y(De):De()}},K.prototype.render=function(G){this.u=null,this.o=new Map;var ne=Object(m.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},K.prototype.componentDidUpdate=K.prototype.componentDidMount=function(){var G=this;this.o.forEach(function(ne,Y){ae(G,Y,ne)})};var we=typeof Symbol!="undefined"&&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!="undefined",$e=function(G){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(G)};m.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(G){Object.defineProperty(m.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=m.i.event;function ve(){}function Ue(){return this.cancelBubble}function te(){return this.defaultPrevented}m.i.event=function(G){return Ye&&(G=Ye(G)),G.persist=ve,G.isPropagationStopped=Ue,G.isDefaultPrevented=te,G.nativeEvent=G};var Le,ut={configurable:!0,get:function(){return this.class}},vt=m.i.vnode;m.i.vnode=function(G){var ne=G.type,Y=G.props,se=Y;if(typeof ne=="string"){var Te=ne.indexOf("-")===-1;for(var De in se={},Y){var Xe=Y[De];nt&&De==="children"&&ne==="noscript"||De==="value"&&"defaultValue"in Y&&Xe==null||(De==="defaultValue"&&"value"in Y&&Y.value==null?De="value":De==="download"&&Xe===!0?Xe="":/ondoubleclick/i.test(De)?De="ondblclick":/^onchange(textarea|input)/i.test(De+ne)&&!$e(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():Te&&qe.test(De)?De=De.replace(/[A-Z0-9]/,"-$&").toLowerCase():Xe===null&&(Xe=void 0),se[De]=Xe)}ne=="select"&&se.multiple&&Array.isArray(se.value)&&(se.value=Object(m.k)(Y.children).forEach(function(ft){ft.props.selected=se.value.indexOf(ft.props.value)!=-1})),ne=="select"&&se.defaultValue!=null&&(se.value=Object(m.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=m.i.__r;m.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=m.b,Nt={useState:B,useReducer:H,useEffect:ee,useLayoutEffect:ie,useRef:function(G){return x=5,J(function(){return{current:G}},[])},useImperativeHandle:function(G,ne,Y){x=6,ie(function(){typeof G=="function"?G(ne()):G&&(G.current=ne())},Y==null?Y:Y.concat(G))},useMemo:J,useCallback:V,useContext:function(G){var ne=c.context[G.__c],Y=I(l++,9);return Y.c=G,ne?(Y.__==null&&(Y.__=!0,ne.sub(c)),ne.props.value):G.__},useDebugValue:function(G,ne){m.i.useDebugValue&&m.i.useDebugValue(ne?ne(G):G)},version:"17.0.2",Children:Se,render:function(G,ne,Y){return ne.__k==null&&(ne.textContent=""),Object(m.j)(G,ne),typeof Y=="function"&&Y(),G?G.__c:null},hydrate:function(G,ne,Y){return Object(m.h)(G,ne),typeof Y=="function"&&Y(),G?G.__c:null},unmountComponentAtNode:function(G){return!!G.__k&&(Object(m.j)(null,G),!0)},createPortal:function(G,ne){return Object(m.e)(Ae,{__v:G,i:ne})},createElement:m.e,createContext:m.d,createFactory:function(G){return m.e.bind(null,G)},cloneElement:function(G){return St(G)?m.c.apply(null,arguments):G},createRef:m.f,Fragment:m.b,isValidElement:St,findDOMNode:function(G){return G&&(G.base||G.nodeType===1&&G)||null},Component:m.a,PureComponent:ye,memo:xe,forwardRef:he,flushSync:function(G,ne){return G(ne)},unstable_batchedUpdates:Pt,StrictMode:at,Suspense:Ze,SuspenseList:K,lazy:function(G){var ne,Y,se;function Te(De){if(ne||(ne=G()).then(function(Xe){Y=Xe.default||Xe},function(Xe){se=Xe}),se)throw se;if(!Y)throw ne;return Object(m.e)(Y,De)}return Te.displayName="Lazy",Te.__f=!0,Te},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:yt};f.d=Nt},function(s,f,i){var l=i(7),c=i(147),v=i(148),m=i(180),x=i(57),w=function(P){if(P&&P.forEach!==m)try{x(P,"forEach",m)}catch(j){P.forEach=m}};for(var A in c)c[A]&&w(l[A]&&l[A].prototype);w(v)},function(s,f,i){i(17)({target:"Object",stat:!0},{setPrototypeOf:i(97)})},function(s,f,i){var l=i(17),c=i(19),v=i(38),m=i(96),x=i(137);l({target:"Object",stat:!0,forced:c(function(){m(1)}),sham:!x},{getPrototypeOf:function(w){return m(v(w))}})},function(s,f,i){var l=i(17),c=i(46),v=i(76),m=i(200),x=i(157),w=i(32),A=i(33),P=i(54),j=i(19),D=c("Reflect","construct"),N=Object.prototype,I=[].push,B=j(function(){function ie(){}return!(D(function(){},[],ie)instanceof ie)}),H=!j(function(){D(function(){})}),ee=B||H;l({target:"Reflect",stat:!0,forced:ee,sham:ee},{construct:function(ie,J){x(ie),w(J);var V=arguments.length<3?ie:x(arguments[2]);if(H&&!B)return D(ie,J,V);if(ie==V){switch(J.length){case 0:return new ie;case 1:return new ie(J[0]);case 2:return new ie(J[0],J[1]);case 3:return new ie(J[0],J[1],J[2]);case 4:return new ie(J[0],J[1],J[2],J[3])}var Z=[null];return v(I,Z,J),new(v(m,ie,Z))}var z=V.prototype,T=P(A(z)?z:N),L=v(ie,T,J);return A(L)?L:T}})},function(s,f){var i=Function.prototype,l=i.bind,c=i.call,v=l&&l.bind(c);s.exports=l?function(m){return m&&v(c,m)}:function(m){return m&&function(){return c.apply(m,arguments)}}},function(s,f,i){var l=i(17),c=i(7),v=i(99),m=i(100),x=i(33),w=i(67),A=i(43),P=i(40),j=i(61),D=i(27),N=i(75),I=i(101),B=N("slice"),H=D("species"),ee=c.Array,ie=Math.max;l({target:"Array",proto:!0,forced:!B},{slice:function(J,V){var Z,z,T,L=P(this),C=A(L),F=w(J,C),$=w(V===void 0?C:V,C);if(v(L)&&(Z=L.constructor,(m(Z)&&(Z===ee||v(Z.prototype))||x(Z)&&(Z=Z[H])===null)&&(Z=void 0),Z===ee||Z===void 0))return I(L,F,$);for(z=new(Z===void 0?ee:Z)(ie($-F,0)),T=0;F<$;F++,T++)F in L&&j(z,T,L[F]);return z.length=T,z}})},function(s,f,i){var l=i(7),c=i(51).f,v=i(57),m=i(44),x=i(108),w=i(134),A=i(95);s.exports=function(P,j){var D,N,I,B,H,ee=P.target,ie=P.global,J=P.stat;if(D=ie?l:J?l[ee]||x(ee,{}):(l[ee]||{}).prototype)for(N in j){if(B=j[N],I=P.noTargetGet?(H=c(D,N))&&H.value:D[N],!A(ie?N:ee+(J?".":"#")+N,P.forced)&&I!==void 0){if(typeof B==typeof I)continue;w(B,I)}(P.sham||I&&I.sham)&&v(B,"sham",!0),m(D,N,B,P)}}},function(s,f,i){var l=i(17),c=i(102);l({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},function(s,f){s.exports=function(i){try{return!!i()}catch(l){return!0}}},function(s,f,i){var l=i(17),c=i(38),v=i(66);l({target:"Object",stat:!0,forced:i(19)(function(){v(1)})},{keys:function(m){return v(c(m))}})},function(s,f,i){var l=i(17),c=i(19),v=i(40),m=i(51).f,x=i(36),w=c(function(){m(1)});l({target:"Object",stat:!0,forced:!x||w,sham:!x},{getOwnPropertyDescriptor:function(A,P){return m(v(A),P)}})},function(s,f,i){var l=i(36),c=i(94).EXISTS,v=i(15),m=i(37).f,x=Function.prototype,w=v(x.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,P=v(A.exec);l&&!c&&m(x,"name",{configurable:!0,get:function(){try{return P(A,w(this))[1]}catch(j){return""}}})},function(s,f,i){var l=i(17),c=i(74).filter;l({target:"Array",proto:!0,forced:!i(75)("filter")},{filter:function(v){return c(this,v,arguments.length>1?arguments[1]:void 0)}})},function(s,f,i){var l=i(17),c=i(183);l({target:"Array",stat:!0,forced:!i(118)(function(v){Array.from(v)})},{from:c})},function(s,f,i){var l=i(17),c=i(36),v=i(135),m=i(40),x=i(51),w=i(61);l({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(A){for(var P,j,D=m(A),N=x.f,I=v(D),B={},H=0;I.length>H;)(j=N(D,P=I[H++]))!==void 0&&w(B,P,j);return B}})},,function(s,f,i){var l=i(7),c=i(84),v=i(34),m=i(85),x=i(109),w=i(128),A=c("wks"),P=l.Symbol,j=P&&P.for,D=w?P:P&&P.withoutSetter||m;s.exports=function(N){if(!v(A,N)||!x&&typeof A[N]!="string"){var I="Symbol."+N;x&&v(P,N)?A[N]=P[N]:A[N]=w&&j?j(I):D(I)}return A[N]}},function(s,f){s.exports=function(i){return typeof i=="function"}},function(s,f,i){var l=i(17),c=i(7),v=i(19),m=i(99),x=i(33),w=i(38),A=i(43),P=i(61),j=i(119),D=i(75),N=i(27),I=i(65),B=N("isConcatSpreadable"),H=9007199254740991,ee="Maximum allowed index exceeded",ie=c.TypeError,J=I>=51||!v(function(){var z=[];return z[B]=!1,z.concat()[0]!==z}),V=D("concat"),Z=function(z){if(!x(z))return!1;var T=z[B];return T!==void 0?!!T:m(z)};l({target:"Array",proto:!0,forced:!J||!V},{concat:function(z){var T,L,C,F,$,le=w(this),ce=j(le,0),ye=0;for(T=-1,C=arguments.length;T<C;T++)if(Z($=T===-1?le:arguments[T])){if(ye+(F=A($))>H)throw ie(ee);for(L=0;L<F;L++,ye++)L in $&&P(ce,ye,$[L])}else{if(ye>=H)throw ie(ee);P(ce,ye++,$)}return ce.length=ye,ce}})},function(s,f,i){var l=i(17),c=i(199);l({target:"Object",stat:!0,forced:Object.assign!==c},{assign:c})},function(s,f,i){var l=i(105),c=typeof self=="object"&&self&&self.Object===Object&&self,v=l.a||c||Function("return this")();f.a=v},function(s,f,i){var l=i(7),c=i(33),v=l.String,m=l.TypeError;s.exports=function(x){if(c(x))return x;throw m(v(x)+" is not an object")}},function(s,f,i){var l=i(28);s.exports=function(c){return typeof c=="object"?c!==null:l(c)}},function(s,f,i){var l=i(15),c=i(38),v=l({}.hasOwnProperty);s.exports=Object.hasOwn||function(m,x){return v(c(m),x)}},function(s,f){var i=Function.prototype.call;s.exports=i.bind?i.bind(i):function(){return i.apply(i,arguments)}},function(s,f,i){var l=i(19);s.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(s,f,i){var l=i(7),c=i(36),v=i(129),m=i(32),x=i(87),w=l.TypeError,A=Object.defineProperty;f.f=c?A:function(P,j,D){if(m(P),j=x(j),m(D),v)try{return A(P,j,D)}catch(N){}if("get"in D||"set"in D)throw w("Accessors not supported");return"value"in D&&(P[j]=D.value),P}},function(s,f,i){var l=i(7),c=i(45),v=l.Object;s.exports=function(m){return v(c(m))}},function(s,f,i){var l=i(17),c=i(74).map;l({target:"Array",proto:!0,forced:!i(75)("map")},{map:function(v){return c(this,v,arguments.length>1?arguments[1]:void 0)}})},function(s,f,i){var l=i(81),c=i(45);s.exports=function(v){return l(c(v))}},function(s,f,i){var l=i(7),c=i(98),v=l.String;s.exports=function(m){if(c(m)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return v(m)}},function(s,f,i){(function(l){i.d(f,"d",function(){return m}),i.d(f,"c",function(){return x}),i.d(f,"b",function(){return w}),i.d(f,"a",function(){return P});var c=i(10),v=function(j,D){var N=typeof Symbol=="function"&&j[Symbol.iterator];if(!N)return j;var I,B,H=N.call(j),ee=[];try{for(;(D===void 0||D-- >0)&&!(I=H.next()).done;)ee.push(I.value)}catch(ie){B={error:ie}}finally{try{I&&!I.done&&(N=H.return)&&N.call(H)}finally{if(B)throw B.error}}return ee};function m(){var j=v(Object(c.j)(0),2)[1];return Object(c.h)(function(){j(function(D){return D+1})},[])}function x(j){if(!j||typeof j!="object")return!1;var D=Object.getPrototypeOf(j);return!D||D===Object.prototype}function w(j){return typeof Symbol=="function"?Symbol.for(j):"__$mobx-react "+j+"__"}var A={};function P(){return typeof window!="undefined"?window:l!==void 0?l:typeof self!="undefined"?self:A}}).call(this,i(82))},function(s,f,i){var l=i(90);s.exports=function(c){return l(c.length)}},function(s,f,i){var l=i(7),c=i(28),v=i(34),m=i(57),x=i(108),w=i(92),A=i(56),P=i(94).CONFIGURABLE,j=A.get,D=A.enforce,N=String(String).split("String");(s.exports=function(I,B,H,ee){var ie,J=!!ee&&!!ee.unsafe,V=!!ee&&!!ee.enumerable,Z=!!ee&&!!ee.noTargetGet,z=ee&&ee.name!==void 0?ee.name:B;c(H)&&(String(z).slice(0,7)==="Symbol("&&(z="["+String(z).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!v(H,"name")||P&&H.name!==z)&&m(H,"name",z),(ie=D(H)).source||(ie.source=N.join(typeof z=="string"?z:""))),I!==l?(J?!Z&&I[B]&&(V=!0):delete I[B],V?I[B]=H:m(I,B,H)):V?I[B]=H:x(B,H)})(Function.prototype,"toString",function(){return c(this)&&j(this).source||w(this)})},function(s,f,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,f,i){var l=i(7),c=i(28),v=function(m){return c(m)?m:void 0};s.exports=function(m,x){return arguments.length<2?v(l[m]):l[m]&&l[m][x]}},function(s,f,i){var l=i(17),c=i(35),v=i(33),m=i(32),x=i(201),w=i(51),A=i(96);l({target:"Reflect",stat:!0},{get:function P(j,D){var N,I,B=arguments.length<3?j:arguments[2];return m(j)===B?j[D]:(N=w.f(j,D))?x(N)?N.value:N.get===void 0?void 0:c(N.get,B):v(I=A(j))?P(I,D,B):void 0}})},function(s,f,i){(function(l){var c=i(31),v=i(166),m=h&&!h.nodeType&&h,x=m&&typeof l=="object"&&l&&!l.nodeType&&l,w=x&&x.exports===m?c.a.Buffer:void 0,A=(w?w.isBuffer:void 0)||v.a;f.a=A}).call(this,i(121)(s))},function(s,f,i){(function(l){var c=i(105),v=h&&!h.nodeType&&h,m=v&&typeof l=="object"&&l&&!l.nodeType&&l,x=m&&m.exports===v&&c.a.process,w=function(){try{var A=m&&m.require&&m.require("util").types;return A||x&&x.binding&&x.binding("util")}catch(P){}}();f.a=w}).call(this,i(121)(s))},function(s,f,i){var l=i(15),c=l({}.toString),v=l("".slice);s.exports=function(m){return v(c(m),8,-1)}},function(s,f,i){var l=i(36),c=i(35),v=i(93),m=i(71),x=i(40),w=i(87),A=i(34),P=i(129),j=Object.getOwnPropertyDescriptor;f.f=l?j:function(D,N){if(D=x(D),N=w(N),P)try{return j(D,N)}catch(I){}if(A(D,N))return m(!c(v.f,D,N),D[N])}},function(s,f,i){var l=i(17),c=i(213).entries;l({target:"Object",stat:!0},{entries:function(v){return c(v)}})},function(s,f,i){var l=i(46);s.exports=l("navigator","userAgent")||""},function(s,f,i){var l,c=i(32),v=i(169),m=i(110),x=i(69),w=i(133),A=i(86),P=i(91),j=P("IE_PROTO"),D=function(){},N=function(H){return"<script>"+H+"<\/script>"},I=function(H){H.write(N("")),H.close();var ee=H.parentWindow.Object;return H=null,ee},B=function(){try{l=new ActiveXObject("htmlfile")}catch(J){}var H,ee;B=typeof document!="undefined"?document.domain&&l?I(l):((ee=A("iframe")).style.display="none",w.appendChild(ee),ee.src="javascript:",(H=ee.contentWindow.document).open(),H.write(N("document.F=Object")),H.close(),H.F):I(l);for(var ie=m.length;ie--;)delete B.prototype[m[ie]];return B()};x[j]=!0,s.exports=Object.create||function(H,ee){var ie;return H!==null?(D.prototype=c(H),ie=new D,D.prototype=null,ie[j]=H):ie=B(),ee===void 0?ie:v(ie,ee)}},function(s,f,i){var l=i(7),c=i(28),v=i(89),m=l.TypeError;s.exports=function(x){if(c(x))return x;throw m(v(x)+" is not a function")}},function(s,f,i){var l,c,v,m=i(171),x=i(7),w=i(15),A=i(33),P=i(57),j=i(34),D=i(107),N=i(91),I=i(69),B="Object already initialized",H=x.TypeError,ee=x.WeakMap;if(m||D.state){var ie=D.state||(D.state=new ee),J=w(ie.get),V=w(ie.has),Z=w(ie.set);l=function(T,L){if(V(ie,T))throw new H(B);return L.facade=T,Z(ie,T,L),L},c=function(T){return J(ie,T)||{}},v=function(T){return V(ie,T)}}else{var z=N("state");I[z]=!0,l=function(T,L){if(j(T,z))throw new H(B);return L.facade=T,P(T,z,L),L},c=function(T){return j(T,z)?T[z]:{}},v=function(T){return j(T,z)}}s.exports={set:l,get:c,has:v,enforce:function(T){return v(T)?c(T):l(T,{})},getterFor:function(T){return function(L){var C;if(!A(L)||(C=c(L)).type!==T)throw H("Incompatible receiver, "+T+" required");return C}}}},function(s,f,i){var l=i(36),c=i(37),v=i(71);s.exports=l?function(m,x,w){return c.f(m,x,v(1,w))}:function(m,x,w){return m[x]=w,m}},function(s,f,i){var l=i(15);s.exports=l({}.isPrototypeOf)},function(s,f,i){var l=i(55);s.exports=function(c,v){var m=c[v];return m==null?void 0:l(m)}},function(s,f,i){i(174)("Map",function(l){return function(){return l(this,arguments.length?arguments[0]:void 0)}},i(178))},function(s,f,i){var l=i(87),c=i(37),v=i(71);s.exports=function(m,x,w){var A=l(x);A in m?c.f(m,A,v(0,w)):m[A]=w}},function(s,f,i){var l=i(15),c=i(55),v=l(l.bind);s.exports=function(m,x){return c(m),x===void 0?m:v?v(m,x):function(){return m.apply(x,arguments)}}},function(s,f,i){var l=i(17),c=i(15),v=i(81),m=i(40),x=i(120),w=c([].join),A=v!=Object,P=x("join",",");l({target:"Array",proto:!0,forced:A||!P},{join:function(j){return w(m(this),j===void 0?",":j)}})},function(s,f){s.exports=!1},function(s,f,i){var l,c,v=i(7),m=i(53),x=v.process,w=v.Deno,A=x&&x.versions||w&&w.version,P=A&&A.v8;P&&(c=(l=P.split("."))[0]>0&&l[0]<4?1:+(l[0]+l[1])),!c&&m&&(!(l=m.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=m.match(/Chrome\/(\d+)/))&&(c=+l[1]),s.exports=c},function(s,f,i){var l=i(131),c=i(110);s.exports=Object.keys||function(v){return l(v,c)}},function(s,f,i){var l=i(68),c=Math.max,v=Math.min;s.exports=function(m,x){var w=l(m);return w<0?c(w+x,0):v(w,x)}},function(s,f){var i=Math.ceil,l=Math.floor;s.exports=function(c){var v=+c;return v!=v||v===0?0:(v>0?l:i)(v)}},function(s,f){s.exports={}},function(s,f){s.exports={}},function(s,f){s.exports=function(i,l){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:l}}},function(s,f,i){var l=i(131),c=i(110).concat("length","prototype");f.f=Object.getOwnPropertyNames||function(v){return l(v,c)}},function(s,f,i){var l=i(37).f,c=i(34),v=i(27)("toStringTag");s.exports=function(m,x,w){m&&!c(m=w?m:m.prototype,v)&&l(m,v,{configurable:!0,value:x})}},function(s,f,i){var l=i(62),c=i(15),v=i(81),m=i(38),x=i(43),w=i(119),A=c([].push),P=function(j){var D=j==1,N=j==2,I=j==3,B=j==4,H=j==6,ee=j==7,ie=j==5||H;return function(J,V,Z,z){for(var T,L,C=m(J),F=v(C),$=l(V,Z),le=x(F),ce=0,ye=z||w,xe=D?ye(J,le):N||ee?ye(J,0):void 0;le>ce;ce++)if((ie||ce in F)&&(L=$(T=F[ce],ce,C),j))if(D)xe[ce]=L;else if(L)switch(j){case 3:return!0;case 5:return T;case 6:return ce;case 2:A(xe,T)}else switch(j){case 4:return!1;case 7:A(xe,T)}return H?-1:I||B?B:xe}};s.exports={forEach:P(0),map:P(1),filter:P(2),some:P(3),every:P(4),find:P(5),findIndex:P(6),filterReject:P(7)}},function(s,f,i){var l=i(19),c=i(27),v=i(65),m=c("species");s.exports=function(x){return v>=51||!l(function(){var w=[];return(w.constructor={})[m]=function(){return{foo:1}},w[x](Boolean).foo!==1})}},function(s,f){var i=Function.prototype,l=i.apply,c=i.bind,v=i.call;s.exports=typeof Reflect=="object"&&Reflect.apply||(c?v.bind(l):function(){return v.apply(l,arguments)})},function(s,f,i){var l=i(76),c=i(35),v=i(15),m=i(122),x=i(154),w=i(32),A=i(45),P=i(156),j=i(123),D=i(90),N=i(41),I=i(59),B=i(113),H=i(124),ee=i(102),ie=i(151),J=i(19),V=ie.UNSUPPORTED_Y,Z=4294967295,z=Math.min,T=[].push,L=v(/./.exec),C=v(T),F=v("".slice),$=!J(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"});m("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(A(this)),be=ue===void 0?Z:ue>>>0;if(be===0)return[];if(ge===void 0)return[he];if(!x(ge))return c(ce,he,ge,be);for(var Se,Ie,Ke,Pe=[],Ce=(ge.ignoreCase?"i":"")+(ge.multiline?"m":"")+(ge.unicode?"u":"")+(ge.sticky?"y":""),Ze=0,q=new RegExp(ge.source,Ce+"g");(Se=c(ee,q,he))&&!((Ie=q.lastIndex)>Ze&&(C(Pe,F(he,Ze,Se.index)),Se.length>1&&Se.index<he.length&&l(T,Pe,B(Se,1)),Ke=Se[0].length,Ze=Ie,Pe.length>=be));)q.lastIndex===Se.index&&q.lastIndex++;return Ze===he.length?!Ke&&L(q,"")||C(Pe,""):C(Pe,F(he,Ze)),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=A(this),be=ge==null?void 0:I(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=P(he,RegExp),Ke=he.unicode,Pe=(he.ignoreCase?"i":"")+(he.multiline?"m":"")+(he.unicode?"u":"")+(V?"g":"y"),Ce=new Ie(V?"^(?:"+he.source+")":he,Pe),Ze=ue===void 0?Z:ue>>>0;if(Ze===0)return[];if(be.length===0)return H(Ce,be)===null?[be]:[];for(var q=0,K=0,ae=[];K<be.length;){Ce.lastIndex=V?0:K;var _e,Ae=H(Ce,V?F(be,K):be);if(Ae===null||(_e=z(D(Ce.lastIndex+(V?K:0)),be.length))===q)K=j(be,K,Ke);else{if(C(ae,F(be,q,K)),ae.length===Ze)return ae;for(var we=1;we<=Ae.length-1;we++)if(C(ae,Ae[we]),ae.length===Ze)return ae;K=q=_e}}return C(ae,F(be,q)),ae}]},!$,V)},function(s,f,i){var l=i(36),c=i(7),v=i(15),m=i(95),x=i(44),w=i(34),A=i(143),P=i(58),j=i(88),D=i(130),N=i(19),I=i(72).f,B=i(51).f,H=i(37).f,ee=i(197),ie=i(159).trim,J="Number",V=c.Number,Z=V.prototype,z=c.TypeError,T=v("".slice),L=v("".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,Ke,Pe,Ce=D(xe,"number");if(j(Ce))throw z("Cannot convert a Symbol value to a number");if(typeof Ce=="string"&&Ce.length>2){if(Ce=ie(Ce),(ge=L(Ce,0))===43||ge===45){if((ue=L(Ce,2))===88||ue===120)return NaN}else if(ge===48){switch(L(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=T(Ce,2)).length,Ke=0;Ke<Ie;Ke++)if((Pe=L(Se,Ke))<48||Pe>be)return NaN;return parseInt(Se,he)}}return+Ce};if(m(J,!V(" 0o1")||!V("0b1")||V("+0x1"))){for(var $,le=function(xe){var ge=arguments.length<1?0:V(C(xe)),ue=this;return P(Z,ue)&&N(function(){ee(ue)})?A(Object(ge),ue,le):ge},ce=l?I(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,$=ce[ye])&&!w(le,$)&&H(le,$,B(V,$));le.prototype=Z,Z.constructor=le,x(c,J,le)}},function(s,f,i){i(17)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(s,f,i){var l=i(17),c=i(214),v=i(83);l({target:"Array",proto:!0},{fill:c}),v("fill")},function(s,f,i){var l=i(7),c=i(15),v=i(19),m=i(50),x=l.Object,w=c("".split);s.exports=v(function(){return!x("z").propertyIsEnumerable(0)})?function(A){return m(A)=="String"?w(A,""):x(A)}:x},function(s,f){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(l){typeof window=="object"&&(i=window)}s.exports=i},function(s,f,i){var l=i(27),c=i(54),v=i(37),m=l("unscopables"),x=Array.prototype;x[m]==null&&v.f(x,m,{configurable:!0,value:c(null)}),s.exports=function(w){x[m][w]=!0}},function(s,f,i){var l=i(64),c=i(107);(s.exports=function(v,m){return c[v]||(c[v]=m!==void 0?m:{})})("versions",[]).push({version:"3.19.3",mode:l?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(s,f,i){var l=i(15),c=0,v=Math.random(),m=l(1 .toString);s.exports=function(x){return"Symbol("+(x===void 0?"":x)+")_"+m(++c+v,36)}},function(s,f,i){var l=i(7),c=i(33),v=l.document,m=c(v)&&c(v.createElement);s.exports=function(x){return m?v.createElement(x):{}}},function(s,f,i){var l=i(130),c=i(88);s.exports=function(v){var m=l(v,"string");return c(m)?m:m+""}},function(s,f,i){var l=i(7),c=i(46),v=i(28),m=i(58),x=i(128),w=l.Object;s.exports=x?function(A){return typeof A=="symbol"}:function(A){var P=c("Symbol");return v(P)&&m(P.prototype,w(A))}},function(s,f,i){var l=i(7).String;s.exports=function(c){try{return l(c)}catch(v){return"Object"}}},function(s,f,i){var l=i(68),c=Math.min;s.exports=function(v){return v>0?c(l(v),9007199254740991):0}},function(s,f,i){var l=i(84),c=i(85),v=l("keys");s.exports=function(m){return v[m]||(v[m]=c(m))}},function(s,f,i){var l=i(15),c=i(28),v=i(107),m=l(Function.toString);c(v.inspectSource)||(v.inspectSource=function(x){return m(x)}),s.exports=v.inspectSource},function(s,f,i){var l={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,v=c&&!l.call({1:2},1);f.f=v?function(m){var x=c(this,m);return!!x&&x.enumerable}:l},function(s,f,i){var l=i(36),c=i(34),v=Function.prototype,m=l&&Object.getOwnPropertyDescriptor,x=c(v,"name"),w=x&&function(){}.name==="something",A=x&&(!l||l&&m(v,"name").configurable);s.exports={EXISTS:x,PROPER:w,CONFIGURABLE:A}},function(s,f,i){var l=i(19),c=i(28),v=/#|\.prototype\./,m=function(j,D){var N=w[x(j)];return N==P||N!=A&&(c(D)?l(D):!!D)},x=m.normalize=function(j){return String(j).replace(v,".").toLowerCase()},w=m.data={},A=m.NATIVE="N",P=m.POLYFILL="P";s.exports=m},function(s,f,i){var l=i(7),c=i(34),v=i(28),m=i(38),x=i(91),w=i(137),A=x("IE_PROTO"),P=l.Object,j=P.prototype;s.exports=w?P.getPrototypeOf:function(D){var N=m(D);if(c(N,A))return N[A];var I=N.constructor;return v(I)&&N instanceof I?I.prototype:N instanceof P?j:null}},function(s,f,i){var l=i(15),c=i(32),v=i(173);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var m,x=!1,w={};try{(m=l(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(w,[]),x=w instanceof Array}catch(A){}return function(A,P){return c(A),v(P),x?m(A,P):A.__proto__=P,A}}():void 0)},function(s,f,i){var l=i(7),c=i(116),v=i(28),m=i(50),x=i(27)("toStringTag"),w=l.Object,A=m(function(){return arguments}())=="Arguments";s.exports=c?m:function(P){var j,D,N;return P===void 0?"Undefined":P===null?"Null":typeof(D=function(I,B){try{return I[B]}catch(H){}}(j=w(P),x))=="string"?D:A?m(j):(N=m(j))=="Object"&&v(j.callee)?"Arguments":N}},function(s,f,i){var l=i(50);s.exports=Array.isArray||function(c){return l(c)=="Array"}},function(s,f,i){var l=i(15),c=i(19),v=i(28),m=i(98),x=i(46),w=i(92),A=function(){},P=[],j=x("Reflect","construct"),D=/^\s*(?:class|function)\b/,N=l(D.exec),I=!D.exec(A),B=function(H){if(!v(H))return!1;try{return j(A,P,H),!0}catch(ee){return!1}};s.exports=!j||c(function(){var H;return B(B.call)||!B(Object)||!B(function(){H=!0})||H})?function(H){if(!v(H))return!1;switch(m(H)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return I||!!N(D,w(H))}:B},function(s,f,i){var l=i(15);s.exports=l([].slice)},function(s,f,i){var l,c,v=i(35),m=i(15),x=i(41),w=i(185),A=i(151),P=i(84),j=i(54),D=i(56).get,N=i(186),I=i(187),B=P("native-string-replace",String.prototype.replace),H=RegExp.prototype.exec,ee=H,ie=m("".charAt),J=m("".indexOf),V=m("".replace),Z=m("".slice),z=(c=/b*/g,v(H,l=/a/,"a"),v(H,c,"a"),l.lastIndex!==0||c.lastIndex!==0),T=A.BROKEN_CARET,L=/()??/.exec("")[1]!==void 0;(z||L||T||N||I)&&(ee=function(C){var F,$,le,ce,ye,xe,ge,ue=this,he=D(ue),be=x(C),Se=he.raw;if(Se)return Se.lastIndex=ue.lastIndex,F=v(ee,Se,be),ue.lastIndex=Se.lastIndex,F;var Ie=he.groups,Ke=T&&ue.sticky,Pe=v(w,ue),Ce=ue.source,Ze=0,q=be;if(Ke&&(Pe=V(Pe,"y",""),J(Pe,"g")===-1&&(Pe+="g"),q=Z(be,ue.lastIndex),ue.lastIndex>0&&(!ue.multiline||ue.multiline&&ie(be,ue.lastIndex-1)!==`
`)&&(Ce="(?: "+Ce+")",q=" "+q,Ze++),$=new RegExp("^(?:"+Ce+")",Pe)),L&&($=new RegExp("^"+Ce+"$(?!\\s)",Pe)),z&&(le=ue.lastIndex),ce=v(H,Ke?$:ue,q),Ke?ce?(ce.input=Z(ce.input,Ze),ce[0]=Z(ce[0],Ze),ce.index=ue.lastIndex,ue.lastIndex+=ce[0].length):ue.lastIndex=0:z&&ce&&(ue.lastIndex=ue.global?ce.index+ce[0].length:le),L&&ce&&ce.length>1&&v(B,ce[0],$,function(){for(ye=1;ye<arguments.length-2;ye++)arguments[ye]===void 0&&(ce[ye]=void 0)}),ce&&Ie)for(ce.groups=xe=j(null),ye=0;ye<Ie.length;ye++)xe[(ge=Ie[ye])[0]]=ce[ge[1]];return ce}),s.exports=ee},function(s,f,i){var l=i(17),c=i(7),v=i(67),m=i(68),x=i(43),w=i(38),A=i(119),P=i(61),j=i(75)("splice"),D=c.TypeError,N=Math.max,I=Math.min,B=9007199254740991,H="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!j},{splice:function(ee,ie){var J,V,Z,z,T,L,C=w(this),F=x(C),$=v(ee,F),le=arguments.length;if(le===0?J=V=0:le===1?(J=0,V=F-$):(J=le-2,V=I(N(m(ie),0),F-$)),F+J-V>B)throw D(H);for(Z=A(C,V),z=0;z<V;z++)(T=$+z)in C&&P(Z,z,C[T]);if(Z.length=V,J<V){for(z=$;z<F-V;z++)L=z+J,(T=z+V)in C?C[L]=C[T]:delete C[L];for(z=F;z>F-V+J;z--)delete C[z-1]}else if(J>V)for(z=F-V;z>$;z--)L=z+J-1,(T=z+V-1)in C?C[L]=C[T]:delete C[L];for(z=0;z<J;z++)C[z+$]=arguments[z+2];return C.length=F-V+J,Z}})},function(s,f,i){var l=i(17),c=i(202);l({target:"String",proto:!0,forced:i(203)("anchor")},{anchor:function(v){return c(this,"a","name",v)}})},function(s,f,i){(function(l){var c=typeof l=="object"&&l&&l.Object===Object&&l;f.a=c}).call(this,i(82))},function(s,f,i){(function(l){var c=i(31),v=h&&!h.nodeType&&h,m=v&&typeof l=="object"&&l&&!l.nodeType&&l,x=m&&m.exports===v?c.a.Buffer:void 0,w=x?x.allocUnsafe:void 0;f.a=function(A,P){if(P)return A.slice();var j=A.length,D=w?w(j):new A.constructor(j);return A.copy(D),D}}).call(this,i(121)(s))},function(s,f,i){var l=i(7),c=i(108),v="__core-js_shared__",m=l[v]||c(v,{});s.exports=m},function(s,f,i){var l=i(7),c=Object.defineProperty;s.exports=function(v,m){try{c(l,v,{value:m,configurable:!0,writable:!0})}catch(x){l[v]=m}return m}},function(s,f,i){var l=i(65),c=i(19);s.exports=!!Object.getOwnPropertySymbols&&!c(function(){var v=Symbol();return!String(v)||!(Object(v)instanceof Symbol)||!Symbol.sham&&l&&l<41})},function(s,f){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(s,f,i){var l=i(17),c=i(35),v=i(64),m=i(94),x=i(28),w=i(172),A=i(96),P=i(97),j=i(73),D=i(57),N=i(44),I=i(27),B=i(70),H=i(136),ee=m.PROPER,ie=m.CONFIGURABLE,J=H.IteratorPrototype,V=H.BUGGY_SAFARI_ITERATORS,Z=I("iterator"),z="keys",T="values",L="entries",C=function(){return this};s.exports=function(F,$,le,ce,ye,xe,ge){w(le,$,ce);var ue,he,be,Se=function(K){if(K===ye&&Ze)return Ze;if(!V&&K in Pe)return Pe[K];switch(K){case z:case T:case L:return function(){return new le(this,K)}}return function(){return new le(this)}},Ie=$+" Iterator",Ke=!1,Pe=F.prototype,Ce=Pe[Z]||Pe["@@iterator"]||ye&&Pe[ye],Ze=!V&&Ce||Se(ye),q=$=="Array"&&Pe.entries||Ce;if(q&&(ue=A(q.call(new F)))!==Object.prototype&&ue.next&&(v||A(ue)===J||(P?P(ue,J):x(ue[Z])||N(ue,Z,C)),j(ue,Ie,!0,!0),v&&(B[Ie]=C)),ee&&ye==T&&Ce&&Ce.name!==T&&(!v&&ie?D(Pe,"name",T):(Ke=!0,Ze=function(){return c(Ce,this)})),ye)if(he={values:Se(T),keys:xe?Ze:Se(z),entries:Se(L)},ge)for(be in he)(V||Ke||!(be in Pe))&&N(Pe,be,he[be]);else l({target:$,proto:!0,forced:V||Ke},he);return v&&!ge||Pe[Z]===Ze||N(Pe,Z,Ze,{name:ye}),B[$]=Ze,he}},function(s,f){f.f=Object.getOwnPropertySymbols},function(s,f,i){var l=i(7),c=i(67),v=i(43),m=i(61),x=l.Array,w=Math.max;s.exports=function(A,P,j){for(var D=v(A),N=c(P,D),I=c(j===void 0?D:j,D),B=x(w(I-N,0)),H=0;N<I;N++,H++)m(B,H,A[N]);return B.length=H,B}},function(s,f,i){var l=i(7),c=i(62),v=i(35),m=i(32),x=i(89),w=i(140),A=i(43),P=i(58),j=i(141),D=i(115),N=i(142),I=l.TypeError,B=function(ee,ie){this.stopped=ee,this.result=ie},H=B.prototype;s.exports=function(ee,ie,J){var V,Z,z,T,L,C,F,$=J&&J.that,le=!(!J||!J.AS_ENTRIES),ce=!(!J||!J.IS_ITERATOR),ye=!(!J||!J.INTERRUPTED),xe=c(ie,$),ge=function(he){return V&&N(V,"normal",he),new B(!0,he)},ue=function(he){return le?(m(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(!(Z=D(ee)))throw I(x(ee)+" is not iterable");if(w(Z)){for(z=0,T=A(ee);T>z;z++)if((L=ue(ee[z]))&&P(H,L))return L;return new B(!1)}V=j(ee,Z)}for(C=V.next;!(F=v(C,V)).done;){try{L=ue(F.value)}catch(he){N(V,"throw",he)}if(typeof L=="object"&&L&&P(H,L))return L}return new B(!1)}},function(s,f,i){var l=i(98),c=i(59),v=i(70),m=i(27)("iterator");s.exports=function(x){if(x!=null)return c(x,m)||c(x,"@@iterator")||v[l(x)]}},function(s,f,i){var l={};l[i(27)("toStringTag")]="z",s.exports=String(l)==="[object z]"},function(s,f,i){var l=i(7),c=i(58),v=l.TypeError;s.exports=function(m,x){if(c(x,m))return m;throw v("Incorrect invocation")}},function(s,f,i){var l=i(27)("iterator"),c=!1;try{var v=0,m={next:function(){return{done:!!v++}},return:function(){c=!0}};m[l]=function(){return this},Array.from(m,function(){throw 2})}catch(x){}s.exports=function(x,w){if(!w&&!c)return!1;var A=!1;try{var P={};P[l]=function(){return{next:function(){return{done:A=!0}}}},x(P)}catch(j){}return A}},function(s,f,i){var l=i(181);s.exports=function(c,v){return new(l(c))(v===0?0:v)}},function(s,f,i){var l=i(19);s.exports=function(c,v){var m=[][c];return!!m&&l(function(){m.call(null,v||function(){throw 1},1)})}},function(s,f){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,f,i){i(18);var l=i(15),c=i(44),v=i(102),m=i(19),x=i(27),w=i(57),A=x("species"),P=RegExp.prototype;s.exports=function(j,D,N,I){var B=x(j),H=!m(function(){var V={};return V[B]=function(){return 7},""[j](V)!=7}),ee=H&&!m(function(){var V=!1,Z=/a/;return j==="split"&&((Z={}).constructor={},Z.constructor[A]=function(){return Z},Z.flags="",Z[B]=/./[B]),Z.exec=function(){return V=!0,null},Z[B](""),!V});if(!H||!ee||N){var ie=l(/./[B]),J=D(B,""[j],function(V,Z,z,T,L){var C=l(V),F=Z.exec;return F===v||F===P.exec?H&&!L?{done:!0,value:ie(Z,z,T)}:{done:!0,value:C(z,Z,T)}:{done:!1}});c(String.prototype,j,J[0]),c(P,B,J[1])}I&&w(P[B],"sham",!0)}},function(s,f,i){var l=i(146).charAt;s.exports=function(c,v,m){return v+(m?l(c,v).length:1)}},function(s,f,i){var l=i(7),c=i(35),v=i(32),m=i(28),x=i(50),w=i(102),A=l.TypeError;s.exports=function(P,j){var D=P.exec;if(m(D)){var N=c(D,P,j);return N!==null&&v(N),N}if(x(P)==="RegExp")return c(w,P,j);throw A("RegExp#exec called on incompatible receiver")}},function(s,f,i){var l=i(76),c=i(35),v=i(15),m=i(122),x=i(19),w=i(32),A=i(28),P=i(68),j=i(90),D=i(41),N=i(45),I=i(123),B=i(59),H=i(198),ee=i(124),ie=i(27)("replace"),J=Math.max,V=Math.min,Z=v([].concat),z=v([].push),T=v("".indexOf),L=v("".slice),C="a".replace(/./,"$0")==="$0",F=!!/./[ie]&&/./[ie]("a","$0")==="";m("replace",function($,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"&&T(ge,ye)===-1&&T(ge,"$<")===-1){var be=ce(le,ue,he,ge);if(be.done)return be.value}var Se=A(ge);Se||(ge=D(ge));var Ie=ue.global;if(Ie){var Ke=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=I(he,j(ue.lastIndex),Ke))}for(var Ze,q="",K=0,ae=0;ae<Pe.length;ae++){for(var _e=D((Ce=Pe[ae])[0]),Ae=J(V(P(Ce.index),he.length),0),we=[],qe=1;qe<Ce.length;qe++)z(we,(Ze=Ce[qe])===void 0?Ze:String(Ze));var nt=Ce.groups;if(Se){var $e=Z([_e],we,Ae,he);nt!==void 0&&z($e,nt);var Ye=D(l(ge,void 0,$e))}else Ye=H(_e,he,Ae,we,nt,ge);Ae>=K&&(q+=L(he,K,Ae)+Ye,K=Ae+_e.length)}return q+L(he,K)}]},!!x(function(){var $=/./;return $.exec=function(){var le=[];return le.groups={a:"7"},le},"".replace($,"$<a>")!=="7"})||!C||F)},function(s,f,i){var l=i(50),c=i(7);s.exports=l(c.process)=="process"},function(s,f,i){i(17)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(s,f,i){var l=i(109);s.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(s,f,i){var l=i(36),c=i(19),v=i(86);s.exports=!l&&!c(function(){return Object.defineProperty(v("div"),"a",{get:function(){return 7}}).a!=7})},function(s,f,i){var l=i(7),c=i(35),v=i(33),m=i(88),x=i(59),w=i(170),A=i(27),P=l.TypeError,j=A("toPrimitive");s.exports=function(D,N){if(!v(D)||m(D))return D;var I,B=x(D,j);if(B){if(N===void 0&&(N="default"),I=c(B,D,N),!v(I)||m(I))return I;throw P("Can't convert object to primitive value")}return N===void 0&&(N="number"),w(D,N)}},function(s,f,i){var l=i(15),c=i(34),v=i(40),m=i(132).indexOf,x=i(69),w=l([].push);s.exports=function(A,P){var j,D=v(A),N=0,I=[];for(j in D)!c(x,j)&&c(D,j)&&w(I,j);for(;P.length>N;)c(D,j=P[N++])&&(~m(I,j)||w(I,j));return I}},function(s,f,i){var l=i(40),c=i(67),v=i(43),m=function(x){return function(w,A,P){var j,D=l(w),N=v(D),I=c(P,N);if(x&&A!=A){for(;N>I;)if((j=D[I++])!=j)return!0}else for(;N>I;I++)if((x||I in D)&&D[I]===A)return x||I||0;return!x&&-1}};s.exports={includes:m(!0),indexOf:m(!1)}},function(s,f,i){var l=i(46);s.exports=l("document","documentElement")},function(s,f,i){var l=i(34),c=i(135),v=i(51),m=i(37);s.exports=function(x,w){for(var A=c(w),P=m.f,j=v.f,D=0;D<A.length;D++){var N=A[D];l(x,N)||P(x,N,j(w,N))}}},function(s,f,i){var l=i(46),c=i(15),v=i(72),m=i(112),x=i(32),w=c([].concat);s.exports=l("Reflect","ownKeys")||function(A){var P=v.f(x(A)),j=m.f;return j?w(P,j(A)):P}},function(s,f,i){var l,c,v,m=i(19),x=i(28),w=i(54),A=i(96),P=i(44),j=i(27),D=i(64),N=j("iterator"),I=!1;[].keys&&("next"in(v=[].keys())?(c=A(A(v)))!==Object.prototype&&(l=c):I=!0),l==null||m(function(){var B={};return l[N].call(B)!==B})?l={}:D&&(l=w(l)),x(l[N])||P(l,N,function(){return this}),s.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:I}},function(s,f,i){var l=i(19);s.exports=!l(function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype})},function(s,f,i){var l=i(17),c=i(15),v=i(69),m=i(33),x=i(34),w=i(37).f,A=i(72),P=i(139),j=i(175),D=i(85),N=i(177),I=!1,B=D("meta"),H=0,ee=function(J){w(J,B,{value:{objectID:"O"+H++,weakData:{}}})},ie=s.exports={enable:function(){ie.enable=function(){},I=!0;var J=A.f,V=c([].splice),Z={};Z[B]=1,J(Z).length&&(A.f=function(z){for(var T=J(z),L=0,C=T.length;L<C;L++)if(T[L]===B){V(T,L,1);break}return T},l({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:P.f}))},fastKey:function(J,V){if(!m(J))return typeof J=="symbol"?J:(typeof J=="string"?"S":"P")+J;if(!x(J,B)){if(!j(J))return"F";if(!V)return"E";ee(J)}return J[B].objectID},getWeakData:function(J,V){if(!x(J,B)){if(!j(J))return!0;if(!V)return!1;ee(J)}return J[B].weakData},onFreeze:function(J){return N&&I&&j(J)&&!x(J,B)&&ee(J),J}};v[B]=!0},function(s,f,i){var l=i(50),c=i(40),v=i(72).f,m=i(113),x=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(w){return x&&l(w)=="Window"?function(A){try{return v(A)}catch(P){return m(x)}}(w):v(c(w))}},function(s,f,i){var l=i(27),c=i(70),v=l("iterator"),m=Array.prototype;s.exports=function(x){return x!==void 0&&(c.Array===x||m[v]===x)}},function(s,f,i){var l=i(7),c=i(35),v=i(55),m=i(32),x=i(89),w=i(115),A=l.TypeError;s.exports=function(P,j){var D=arguments.length<2?w(P):j;if(v(D))return m(c(D,P));throw A(x(P)+" is not iterable")}},function(s,f,i){var l=i(35),c=i(32),v=i(59);s.exports=function(m,x,w){var A,P;c(m);try{if(!(A=v(m,"return"))){if(x==="throw")throw w;return w}A=l(A,m)}catch(j){P=!0,A=j}if(x==="throw")throw w;if(P)throw A;return c(A),w}},function(s,f,i){var l=i(28),c=i(33),v=i(97);s.exports=function(m,x,w){var A,P;return v&&l(A=x.constructor)&&A!==w&&c(P=A.prototype)&&P!==w.prototype&&v(m,P),m}},function(s,f,i){var l=i(44);s.exports=function(c,v,m){for(var x in v)l(c,x,v[x],m);return c}},function(s,f,i){var l=i(46),c=i(37),v=i(27),m=i(36),x=v("species");s.exports=function(w){var A=l(w),P=c.f;m&&A&&!A[x]&&P(A,x,{configurable:!0,get:function(){return this}})}},function(s,f,i){var l=i(15),c=i(68),v=i(41),m=i(45),x=l("".charAt),w=l("".charCodeAt),A=l("".slice),P=function(j){return function(D,N){var I,B,H=v(m(D)),ee=c(N),ie=H.length;return ee<0||ee>=ie?j?"":void 0:(I=w(H,ee))<55296||I>56319||ee+1===ie||(B=w(H,ee+1))<56320||B>57343?j?x(H,ee):I:j?A(H,ee,ee+2):B-56320+(I-55296<<10)+65536}};s.exports={codeAt:P(!1),charAt:P(!0)}},function(s,f){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,f,i){var l=i(86)("span").classList,c=l&&l.constructor&&l.constructor.prototype;s.exports=c===Object.prototype?void 0:c},function(s,f,i){var l=i(27);f.f=l},function(s,f,i){var l=i(182),c=i(34),v=i(149),m=i(37).f;s.exports=function(x){var w=l.Symbol||(l.Symbol={});c(w,x)||m(w,x,{value:v.f(x)})}},function(s,f,i){var l=i(19),c=i(7).RegExp,v=l(function(){var w=c("a","y");return w.lastIndex=2,w.exec("abcd")!=null}),m=v||l(function(){return!c("a","y").sticky}),x=v||l(function(){var w=c("^r","gy");return w.lastIndex=2,w.exec("str")!=null});s.exports={BROKEN_CARET:x,MISSED_STICKY:m,UNSUPPORTED_Y:v}},function(s,f,i){var l=i(17),c=i(132).includes,v=i(83);l({target:"Array",proto:!0},{includes:function(m){return c(this,m,arguments.length>1?arguments[1]:void 0)}}),v("includes")},function(s,f,i){var l=i(17),c=i(15),v=i(194),m=i(45),x=i(41),w=i(195),A=c("".indexOf);l({target:"String",proto:!0,forced:!w("includes")},{includes:function(P){return!!~A(x(m(this)),x(v(P)),arguments.length>1?arguments[1]:void 0)}})},function(s,f,i){var l=i(33),c=i(50),v=i(27)("match");s.exports=function(m){var x;return l(m)&&((x=m[v])!==void 0?!!x:c(m)=="RegExp")}},function(s,f){var i,l,c=s.exports={};function v(){throw new Error("setTimeout has not been defined")}function m(){throw new Error("clearTimeout has not been defined")}function x(H){if(i===setTimeout)return setTimeout(H,0);if((i===v||!i)&&setTimeout)return i=setTimeout,setTimeout(H,0);try{return i(H,0)}catch(ee){try{return i.call(null,H,0)}catch(ie){return i.call(this,H,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:v}catch(H){i=v}try{l=typeof clearTimeout=="function"?clearTimeout:m}catch(H){l=m}})();var w,A=[],P=!1,j=-1;function D(){P&&w&&(P=!1,w.length?A=w.concat(A):j=-1,A.length&&N())}function N(){if(!P){var H=x(D);P=!0;for(var ee=A.length;ee;){for(w=A,A=[];++j<ee;)w&&w[j].run();j=-1,ee=A.length}w=null,P=!1,function(ie){if(l===clearTimeout)return clearTimeout(ie);if((l===m||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(ie);try{l(ie)}catch(J){try{return l.call(null,ie)}catch(V){return l.call(this,ie)}}}(H)}}function I(H,ee){this.fun=H,this.array=ee}function B(){}c.nextTick=function(H){var ee=new Array(arguments.length-1);if(arguments.length>1)for(var ie=1;ie<arguments.length;ie++)ee[ie-1]=arguments[ie];A.push(new I(H,ee)),A.length!==1||P||x(N)},I.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(H){return[]},c.binding=function(H){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(H){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(s,f,i){var l=i(32),c=i(157),v=i(27)("species");s.exports=function(m,x){var w,A=l(m).constructor;return A===void 0||(w=l(A)[v])==null?x:c(w)}},function(s,f,i){var l=i(7),c=i(100),v=i(89),m=l.TypeError;s.exports=function(x){if(c(x))return x;throw m(v(x)+" is not a constructor")}},function(s,f,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,f,i){var l=i(15),c=i(45),v=i(41),m=i(160),x=l("".replace),w="["+m+"]",A=RegExp("^"+w+w+"*"),P=RegExp(w+w+"*$"),j=function(D){return function(N){var I=v(c(N));return 1&D&&(I=x(I,A,"")),2&D&&(I=x(I,P,"")),I}};s.exports={start:j(1),end:j(2),trim:j(3)}},function(s,f){s.exports=`
\v\f\r \u2028\u2029\uFEFF`},function(s,f,i){var l=i(35),c=i(122),v=i(32),m=i(90),x=i(41),w=i(45),A=i(59),P=i(123),j=i(124);c("match",function(D,N,I){return[function(B){var H=w(this),ee=B==null?void 0:A(B,D);return ee?l(ee,B,H):new RegExp(B)[D](x(H))},function(B){var H=v(this),ee=x(B),ie=I(N,H,ee);if(ie.done)return ie.value;if(!H.global)return j(H,ee);var J=H.unicode;H.lastIndex=0;for(var V,Z=[],z=0;(V=j(H,ee))!==null;){var T=x(V[0]);Z[z]=T,T===""&&(H.lastIndex=P(ee,m(H.lastIndex),J)),z++}return z===0?null:Z}]})},function(s,f,i){var l=i(17),c=Math.hypot,v=Math.abs,m=Math.sqrt;l({target:"Math",stat:!0,forced:!!c&&c(1/0,NaN)!==1/0},{hypot:function(x,w){for(var A,P,j=0,D=0,N=arguments.length,I=0;D<N;)I<(A=v(arguments[D++]))?(j=j*(P=I/A)*P+1,I=A):j+=A>0?(P=A/I)*P:A;return I===1/0?1/0:I*m(j)}})},function(s,f,i){var l,c,v,m,x=i(7),w=i(76),A=i(62),P=i(28),j=i(34),D=i(19),N=i(133),I=i(101),B=i(86),H=i(164),ee=i(126),ie=x.setImmediate,J=x.clearImmediate,V=x.process,Z=x.Dispatch,z=x.Function,T=x.MessageChannel,L=x.String,C=0,F={},$="onreadystatechange";try{l=x.location}catch(ge){}var le=function(ge){if(j(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){x.postMessage(L(ge),l.protocol+"//"+l.host)};ie&&J||(ie=function(ge){var ue=I(arguments,1);return F[++C]=function(){w(P(ge)?ge:z(ge),void 0,ue)},c(C),C},J=function(ge){delete F[ge]},ee?c=function(ge){V.nextTick(ce(ge))}:Z&&Z.now?c=function(ge){Z.now(ce(ge))}:T&&!H?(m=(v=new T).port2,v.port1.onmessage=ye,c=A(m.postMessage,m)):x.addEventListener&&P(x.postMessage)&&!x.importScripts&&l&&l.protocol!=="file:"&&!D(xe)?(c=xe,x.addEventListener("message",ye,!1)):c=$ 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:J}},function(s,f,i){var l=i(53);s.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(l)},function(s,f,i){var l=i(55),c=function(v){var m,x;this.promise=new v(function(w,A){if(m!==void 0||x!==void 0)throw TypeError("Bad Promise constructor");m=w,x=A}),this.resolve=l(m),this.reject=l(x)};s.exports.f=function(v){return new c(v)}},function(s,f,i){f.a=function(){return!1}},function(s,f,i){(function(l){i.d(f,"a",function(){return V});var c=i(1);function v(T){throw new Error("[mobx-utils] "+T)}function m(T,L){L===void 0&&(L="Illegal state"),T||v(L)}var x=function(T){return T&&T!==Object.prototype&&Object.getOwnPropertyNames(T).concat(x(Object.getPrototypeOf(T))||[])},w=function(T){return function(L){var C=x(L);return C.filter(function(F,$){return C.indexOf(F)===$})}(T).filter(function(L){return L!=="constructor"&&!~L.indexOf("__")})},A="pending",P="fulfilled",j="rejected";function D(T){switch(this.state){case A:return T.pending&&T.pending(this.value);case j:return T.rejected&&T.rejected(this.value);case P:return T.fulfilled?T.fulfilled(this.value):this.value}}function N(T,L){if(m(arguments.length<=2,"fromPromise expects up to two arguments"),m(typeof T=="function"||typeof T=="object"&&T&&typeof T.then=="function","Please pass a promise or function to fromPromise"),T.isPromiseBasedObservable===!0)return T;typeof T=="function"&&(T=new Promise(T));var C=T;T.then(Object(c.k)("observableFromPromise-resolve",function($){C.value=$,C.state=P}),Object(c.k)("observableFromPromise-reject",function($){C.value=$,C.state=j})),C.isPromiseBasedObservable=!0,C.case=D;var F=L&&L.state===P?L.value:void 0;return Object(c.q)(C,{value:F,state:A},{},{deep:!1}),C}(function(T){T.reject=Object(c.k)("fromPromise.reject",function(L){var C=T(Promise.reject(L));return C.state=j,C.value=L,C}),T.resolve=Object(c.k)("fromPromise.resolve",function(L){L===void 0&&(L=void 0);var C=T(Promise.resolve(L));return C.state=P,C.value=L,C})})(N||(N={}));var I=function(T,L,C,F){var $,le=arguments.length,ce=le<3?L:F===null?F=Object.getOwnPropertyDescriptor(L,C):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(T,L,C,F);else for(var ye=T.length-1;ye>=0;ye--)($=T[ye])&&(ce=(le<3?$(ce):le>3?$(L,C,ce):$(L,C))||ce);return le>3&&ce&&Object.defineProperty(L,C,ce),ce};(function(){function T(L,C){var F=this;Object(c.G)(function(){F.current=C,F.subscription=L.subscribe(F)})}T.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},T.prototype.next=function(L){this.current=L},T.prototype.complete=function(){this.dispose()},T.prototype.error=function(L){this.current=L,this.dispose()},I([c.C.ref],T.prototype,"current",void 0),I([c.k.bound],T.prototype,"next",null),I([c.k.bound],T.prototype,"complete",null),I([c.k.bound],T.prototype,"error",null)})();var B=function(){return B=Object.assign||function(T){for(var L,C=1,F=arguments.length;C<F;C++)for(var $ in L=arguments[C])Object.prototype.hasOwnProperty.call(L,$)&&(T[$]=L[$]);return T},B.apply(this,arguments)},H=function(T,L,C,F){var $,le=arguments.length,ce=le<3?L:F===null?F=Object.getOwnPropertyDescriptor(L,C):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(T,L,C,F);else for(var ye=T.length-1;ye>=0;ye--)($=T[ye])&&(ce=(le<3?$(ce):le>3?$(L,C,ce):$(L,C))||ce);return le>3&&ce&&Object.defineProperty(L,C,ce),ce},ee=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function T(L){var C=this;this.model=L,this.localValues=c.C.map({}),this.localComputedValues=c.C.map({}),this.isPropertyDirty=function(F){return C.localValues.has(F)},m(Object(c.A)(L),"createViewModel expects an observable object"),w(L).forEach(function(F){if(F!==c.a&&F!=="__mobxDidRunLazyInitializers"){if(m(ee.indexOf(F)===-1,"The propertyname "+F+" is reserved and cannot be used with viewModels"),Object(c.w)(L,F)){var $=Object(c.h)(L,F).derivation;C.localComputedValues.set(F,Object(c.m)($.bind(C)))}var le=Object.getOwnPropertyDescriptor(L,F),ce=le?{enumerable:le.enumerable}:{};Object.defineProperty(C,F,B(B({},ce),{configurable:!0,get:function(){return Object(c.w)(L,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(T.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),T.prototype.submit=function(){var L=this;Object(c.B)(this.localValues).forEach(function(C){var F=L.localValues.get(C),$=L.model[C];Object(c.y)($)?$.replace(F):Object(c.z)($)?($.clear(),$.merge(F)):Object(c.v)(F)||(L.model[C]=F)}),this.localValues.clear()},T.prototype.reset=function(){this.localValues.clear()},T.prototype.resetProperty=function(L){this.localValues.delete(L)},H([c.m],T.prototype,"isDirty",null),H([c.m],T.prototype,"changedValues",null),H([c.k.bound],T.prototype,"submit",null),H([c.k.bound],T.prototype,"reset",null),H([c.k.bound],T.prototype,"resetProperty",null)})();function ie(T){if(!T)return"ROOT";for(var L=[];T.parent;)L.push(T.path),T=T.parent;return L.reverse().join("/")}function J(T){return Object(c.A)(T)||Object(c.y)(T)||Object(c.z)(T)}function V(T,L){var C=new WeakMap;function F(ce){var ye=C.get(ce.object);(function(xe,ge){switch(xe.type){case"add":$(xe.newValue,ge,xe.name);break;case"update":le(xe.oldValue),$(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 $(be,ge,""+(xe.index+Se))});for(var ue=xe.index+xe.addedCount;ue<xe.object.length;ue++)if(J(xe.object[ue])){var he=C.get(xe.object[ue]);he&&(he.path=""+ue)}}})(ce,ye),L(ce,ie(ye),T)}function $(ce,ye,xe){if(J(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 $(he[1],ue,be)})}}}function le(ce){if(J(ce)){var ye=C.get(ce);if(!ye)return;C.delete(ce),ye.dispose(),Object(c.L)(ce).forEach(le)}}return $(T,void 0,""),function(){le(T)}}var Z,z=(Z=function(T,L){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,F){C.__proto__=F}||function(C,F){for(var $ in F)F.hasOwnProperty($)&&(C[$]=F[$])},Z(T,L)},function(T,L){function C(){this.constructor=T}Z(T,L),T.prototype=L===null?Object.create(L):(C.prototype=L.prototype,new C)});(function(T){function L(C,F,$){var le=$===void 0?{}:$,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=T.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 Ke=Ie[Se];ue._removeItem(Ke)}for(var Pe=0,Ce=be.added;Pe<Ce.length;Pe++){var Ze=Ce[Pe];ue._addItem(Ze)}});else{if(be.type!=="update")throw new Error("illegal state");Object(c.J)(function(){ue._removeItem(be.oldValue),ue._addItem(be.newValue)})}}),ue}z(L,T),L.prototype.clear=function(){throw new Error("not supported")},L.prototype.delete=function(C){throw new Error("not supported")},L.prototype.set=function(C,F){throw new Error("not supported")},L.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]}},L.prototype._getGroupArr=function(C){var F=T.prototype.get.call(this,C);return F===void 0&&(F=Object(c.C)([],{name:"GroupArray["+this._keyToName(C)+"]",deep:!1}),T.prototype.set.call(this,C,F)),F},L.prototype._removeFromGroupArr=function(C,F){var $=T.prototype.get.call(this,C);$.length===1?T.prototype.delete.call(this,C):(F===$.length-1||($[F]=$[$.length-1],$[F][this._ogmInfoKey].groupArrIndex=F),$.length--)},L.prototype._addItem=function(C){var F=this,$=this._groupBy(C),le=this._getGroupArr($),ce={groupByValue:$,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)},L.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 T(L,C){this.base=L,this.args=C,this.closestIdx=0,this.isDisposed=!1;for(var F=this.closest=this.root=L,$=0;$<this.args.length-1&&(F=F.get(C[$]));$++)this.closest=F;this.closestIdx=$}return T.prototype.exists=function(){this.assertNotDisposed();var L=this.args.length;return this.closestIdx>=L-1&&this.closest.has(this.args[L-1])},T.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},T.prototype.set=function(L){this.assertNotDisposed();for(var C=this.args.length,F=this.closest,$=this.closestIdx;$<C-1;$++){var le=new Map;F.set(this.args[$],le),F=le}this.closestIdx=C-1,this.closest=F,F.set(this.args[C-1],L)},T.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var L=this.args.length;this.closest.delete(this.args[L-1]);for(var C=this.root,F=[C],$=0;$<L-1;$++)C=C.get(this.args[$]),F.push(C);for($=F.length-1;$>0;$--)F[$].size===0&&F[$-1].delete(this.args[$-1]);this.isDisposed=!0},T.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},T}(),Promise.resolve(),typeof queueMicrotask!="undefined"||l!==void 0&&l.nextTick}).call(this,i(155))},function(s,f,i){var l;(function(c,v,m){if(c){for(var x,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"},A={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},P={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},j={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();J.prototype.bind=function(V,Z,z){var T=this;return V=V instanceof Array?V:[V],T._bindMultiple.call(T,V,Z,z),T},J.prototype.unbind=function(V,Z){return this.bind.call(this,V,function(){},Z)},J.prototype.trigger=function(V,Z){var z=this;return z._directMap[V+":"+Z]&&z._directMap[V+":"+Z]({},V),z},J.prototype.reset=function(){var V=this;return V._callbacks={},V._directMap={},V},J.prototype.stopCallback=function(V,Z){if((" "+Z.className+" ").indexOf(" mousetrap ")>-1||ie(Z,this.target))return!1;if("composedPath"in V&&typeof V.composedPath=="function"){var z=V.composedPath()[0];z!==V.target&&(Z=z)}return Z.tagName=="INPUT"||Z.tagName=="SELECT"||Z.tagName=="TEXTAREA"||Z.isContentEditable},J.prototype.handleKey=function(){var V=this;return V._handleKey.apply(V,arguments)},J.addKeycodes=function(V){for(var Z in V)V.hasOwnProperty(Z)&&(w[Z]=V[Z]);x=null},J.init=function(){var V=J(v);for(var Z in V)Z.charAt(0)!=="_"&&(J[Z]=function(z){return function(){return V[z].apply(V,arguments)}}(Z))},J.init(),c.Mousetrap=J,s.exports&&(s.exports=J),(l=function(){return J}.call(f,i,f,s))===void 0||(s.exports=l)}function N(V,Z,z){V.addEventListener?V.addEventListener(Z,z,!1):V.attachEvent("on"+Z,z)}function I(V){if(V.type=="keypress"){var Z=String.fromCharCode(V.which);return V.shiftKey||(Z=Z.toLowerCase()),Z}return w[V.which]?w[V.which]:A[V.which]?A[V.which]:String.fromCharCode(V.which).toLowerCase()}function B(V){return V=="shift"||V=="ctrl"||V=="alt"||V=="meta"}function H(V,Z,z){return z||(z=function(){if(!x)for(var T in x={},w)T>95&&T<112||w.hasOwnProperty(T)&&(x[w[T]]=T);return x}()[V]?"keydown":"keypress"),z=="keypress"&&Z.length&&(z="keydown"),z}function ee(V,Z){var z,T,L,C=[];for(z=function(F){return F==="+"?["+"]:(F=F.replace(/\+{2}/g,"+plus")).split("+")}(V),L=0;L<z.length;++L)T=z[L],j[T]&&(T=j[T]),Z&&Z!="keypress"&&P[T]&&(T=P[T],C.push("shift")),B(T)&&C.push(T);return{key:T,modifiers:C,action:Z=H(T,C,Z)}}function ie(V,Z){return V!==null&&V!==v&&(V===Z||ie(V.parentNode,Z))}function J(V){var Z=this;if(V=V||v,!(Z instanceof J))return new J(V);Z.target=V,Z._callbacks={},Z._directMap={};var z,T={},L=!1,C=!1,F=!1;function $(ue){ue=ue||{};var he,be=!1;for(he in T)ue[he]?be=!0:T[he]=0;be||(F=!1)}function le(ue,he,be,Se,Ie,Ke){var Pe,Ce,Ze,q,K=[],ae=be.type;if(!Z._callbacks[ue])return[];for(ae=="keyup"&&B(ue)&&(he=[ue]),Pe=0;Pe<Z._callbacks[ue].length;++Pe)if(Ce=Z._callbacks[ue][Pe],(Se||!Ce.seq||T[Ce.seq]==Ce.level)&&ae==Ce.action&&(ae=="keypress"&&!be.metaKey&&!be.ctrlKey||(Ze=he,q=Ce.modifiers,Ze.sort().join(",")===q.sort().join(",")))){var _e=!Se&&Ce.combo==Ie,Ae=Se&&Ce.seq==Se&&Ce.level==Ke;(_e||Ae)&&Z._callbacks[ue].splice(Pe,1),K.push(Ce)}return K}function ce(ue,he,be,Se){Z.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=I(ue);he&&(ue.type!="keyup"||L!==he?Z.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):L=!1)}function xe(ue,he,be,Se){function Ie(Ze){return function(){F=Ze,++T[ue],clearTimeout(z),z=setTimeout($,1e3)}}function Ke(Ze){ce(be,Ze,ue),Se!=="keyup"&&(L=I(Ze)),setTimeout($,10)}T[ue]=0;for(var Pe=0;Pe<he.length;++Pe){var Ce=Pe+1===he.length?Ke:Ie(Se||ee(he[Pe+1]).action);ge(he[Pe],Ce,Se,ue,Pe)}}function ge(ue,he,be,Se,Ie){Z._directMap[ue+":"+be]=he;var Ke,Pe=(ue=ue.replace(/\s+/g," ")).split(" ");Pe.length>1?xe(ue,Pe,he,be):(Ke=ee(ue,be),Z._callbacks[Ke.key]=Z._callbacks[Ke.key]||[],le(Ke.key,Ke.modifiers,{type:Ke.action},Se,ue,Ie),Z._callbacks[Ke.key][Se?"unshift":"push"]({callback:he,modifiers:Ke.modifiers,action:Ke.action,seq:Se,level:Ie,combo:ue}))}Z._handleKey=function(ue,he,be){var Se,Ie=le(ue,he,be),Ke={},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,Ke[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 Ze=be.type=="keypress"&&C;be.type!=F||B(ue)||Ze||$(Ke),C=Ce&&be.type=="keydown"},Z._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!="undefined"?window:null,typeof window!="undefined"?document:null)},function(s,f,i){var l=i(36),c=i(37),v=i(32),m=i(40),x=i(66);s.exports=l?Object.defineProperties:function(w,A){v(w);for(var P,j=m(A),D=x(A),N=D.length,I=0;N>I;)c.f(w,P=D[I++],j[P]);return w}},function(s,f,i){var l=i(7),c=i(35),v=i(28),m=i(33),x=l.TypeError;s.exports=function(w,A){var P,j;if(A==="string"&&v(P=w.toString)&&!m(j=c(P,w))||v(P=w.valueOf)&&!m(j=c(P,w))||A!=="string"&&v(P=w.toString)&&!m(j=c(P,w)))return j;throw x("Can't convert object to primitive value")}},function(s,f,i){var l=i(7),c=i(28),v=i(92),m=l.WeakMap;s.exports=c(m)&&/native code/.test(v(m))},function(s,f,i){var l=i(136).IteratorPrototype,c=i(54),v=i(71),m=i(73),x=i(70),w=function(){return this};s.exports=function(A,P,j,D){var N=P+" Iterator";return A.prototype=c(l,{next:v(+!D,j)}),m(A,N,!1,!0),x[N]=w,A}},function(s,f,i){var l=i(7),c=i(28),v=l.String,m=l.TypeError;s.exports=function(x){if(typeof x=="object"||c(x))return x;throw m("Can't set "+v(x)+" as a prototype")}},function(s,f,i){var l=i(17),c=i(7),v=i(15),m=i(95),x=i(44),w=i(138),A=i(114),P=i(117),j=i(28),D=i(33),N=i(19),I=i(118),B=i(73),H=i(143);s.exports=function(ee,ie,J){var V=ee.indexOf("Map")!==-1,Z=ee.indexOf("Weak")!==-1,z=V?"set":"add",T=c[ee],L=T&&T.prototype,C=T,F={},$=function(ue){var he=v(L[ue]);x(L,ue,ue=="add"?function(be){return he(this,be===0?0:be),this}:ue=="delete"?function(be){return!(Z&&!D(be))&&he(this,be===0?0:be)}:ue=="get"?function(be){return Z&&!D(be)?void 0:he(this,be===0?0:be)}:ue=="has"?function(be){return!(Z&&!D(be))&&he(this,be===0?0:be)}:function(be,Se){return he(this,be===0?0:be,Se),this})};if(m(ee,!j(T)||!(Z||L.forEach&&!N(function(){new T().entries().next()}))))C=J.getConstructor(ie,ee,V,z),w.enable();else if(m(ee,!0)){var le=new C,ce=le[z](Z?{}:-0,1)!=le,ye=N(function(){le.has(1)}),xe=I(function(ue){new T(ue)}),ge=!Z&&N(function(){for(var ue=new T,he=5;he--;)ue[z](he,he);return!ue.has(-0)});xe||((C=ie(function(ue,he){P(ue,L);var be=H(new T,ue,C);return he!=null&&A(he,be[z],{that:be,AS_ENTRIES:V}),be})).prototype=L,L.constructor=C),(ye||ge)&&($("delete"),$("has"),V&&$("get")),(ge||ce)&&$(z),Z&&L.clear&&delete L.clear}return F[ee]=C,l({global:!0,forced:C!=T},F),B(C,ee),Z||J.setStrong(C,ee,V),C}},function(s,f,i){var l=i(19),c=i(33),v=i(50),m=i(176),x=Object.isExtensible,w=l(function(){});s.exports=w||m?function(A){return!!c(A)&&(!m||v(A)!="ArrayBuffer")&&(!x||x(A))}:x},function(s,f,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,f,i){var l=i(19);s.exports=!l(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(s,f,i){var l=i(37).f,c=i(54),v=i(144),m=i(62),x=i(117),w=i(114),A=i(111),P=i(145),j=i(36),D=i(138).fastKey,N=i(56),I=N.set,B=N.getterFor;s.exports={getConstructor:function(H,ee,ie,J){var V=H(function(C,F){x(C,Z),I(C,{type:ee,index:c(null),first:void 0,last:void 0,size:0}),j||(C.size=0),F!=null&&w(F,C[J],{that:C,AS_ENTRIES:ie})}),Z=V.prototype,z=B(ee),T=function(C,F,$){var le,ce,ye=z(C),xe=L(C,F);return xe?xe.value=$:(ye.last=xe={index:ce=D(F,!0),key:F,value:$,previous:le=ye.last,next:void 0,removed:!1},ye.first||(ye.first=xe),le&&(le.next=xe),j?ye.size++:C.size++,ce!=="F"&&(ye.index[ce]=xe)),C},L=function(C,F){var $,le=z(C),ce=D(F);if(ce!=="F")return le.index[ce];for($=le.first;$;$=$.next)if($.key==F)return $};return v(Z,{clear:function(){for(var C=z(this),F=C.index,$=C.first;$;)$.removed=!0,$.previous&&($.previous=$.previous.next=void 0),delete F[$.index],$=$.next;C.first=C.last=void 0,j?C.size=0:this.size=0},delete:function(C){var F=this,$=z(F),le=L(F,C);if(le){var ce=le.next,ye=le.previous;delete $.index[le.index],le.removed=!0,ye&&(ye.next=ce),ce&&(ce.previous=ye),$.first==le&&($.first=ce),$.last==le&&($.last=ye),j?$.size--:F.size--}return!!le},forEach:function(C){for(var F,$=z(this),le=m(C,arguments.length>1?arguments[1]:void 0);F=F?F.next:$.first;)for(le(F.value,F.key,this);F&&F.removed;)F=F.previous},has:function(C){return!!L(this,C)}}),v(Z,ie?{get:function(C){var F=L(this,C);return F&&F.value},set:function(C,F){return T(this,C===0?0:C,F)}}:{add:function(C){return T(this,C=C===0?0:C,C)}}),j&&l(Z,"size",{get:function(){return z(this).size}}),V},setStrong:function(H,ee,ie){var J=ee+" Iterator",V=B(ee),Z=B(J);A(H,ee,function(z,T){I(this,{type:J,target:z,state:V(z),kind:T,last:void 0})},function(){for(var z=Z(this),T=z.kind,L=z.last;L&&L.removed;)L=L.previous;return z.target&&(z.last=L=L?L.next:z.state.first)?T=="keys"?{value:L.key,done:!1}:T=="values"?{value:L.value,done:!1}:{value:[L.key,L.value],done:!1}:(z.target=void 0,{value:void 0,done:!0})},ie?"entries":"values",!ie,!0),P(ee)}}},function(s,f,i){var l=i(116),c=i(98);s.exports=l?{}.toString:function(){return"[object "+c(this)+"]"}},function(s,f,i){var l=i(74).forEach,c=i(120)("forEach");s.exports=c?[].forEach:function(v){return l(this,v,arguments.length>1?arguments[1]:void 0)}},function(s,f,i){var l=i(7),c=i(99),v=i(100),m=i(33),x=i(27)("species"),w=l.Array;s.exports=function(A){var P;return c(A)&&(P=A.constructor,(v(P)&&(P===w||c(P.prototype))||m(P)&&(P=P[x])===null)&&(P=void 0)),P===void 0?w:P}},function(s,f,i){var l=i(7);s.exports=l},function(s,f,i){var l=i(7),c=i(62),v=i(35),m=i(38),x=i(184),w=i(140),A=i(100),P=i(43),j=i(61),D=i(141),N=i(115),I=l.Array;s.exports=function(B){var H=m(B),ee=A(this),ie=arguments.length,J=ie>1?arguments[1]:void 0,V=J!==void 0;V&&(J=c(J,ie>2?arguments[2]:void 0));var Z,z,T,L,C,F,$=N(H),le=0;if(!$||this==I&&w($))for(Z=P(H),z=ee?new this(Z):I(Z);Z>le;le++)F=V?J(H[le],le):H[le],j(z,le,F);else for(C=(L=D(H,$)).next,z=ee?new this:[];!(T=v(C,L)).done;le++)F=V?x(L,J,[T.value,le],!0):T.value,j(z,le,F);return z.length=le,z}},function(s,f,i){var l=i(32),c=i(142);s.exports=function(v,m,x,w){try{return w?m(l(x)[0],x[1]):m(x)}catch(A){c(v,"throw",A)}}},function(s,f,i){var l=i(32);s.exports=function(){var c=l(this),v="";return c.global&&(v+="g"),c.ignoreCase&&(v+="i"),c.multiline&&(v+="m"),c.dotAll&&(v+="s"),c.unicode&&(v+="u"),c.sticky&&(v+="y"),v}},function(s,f,i){var l=i(19),c=i(7).RegExp;s.exports=l(function(){var v=c(".","s");return!(v.dotAll&&v.exec(`
`)&&v.flags==="s")})},function(s,f,i){var l=i(19),c=i(7).RegExp;s.exports=l(function(){var v=c("(?<a>b)","g");return v.exec("b").groups.a!=="b"||"b".replace(v,"$<a>c")!=="bc"})},function(s,f,i){var l=i(17),c=i(15),v=i(55),m=i(38),x=i(43),w=i(41),A=i(19),P=i(189),j=i(120),D=i(190),N=i(191),I=i(65),B=i(192),H=[],ee=c(H.sort),ie=c(H.push),J=A(function(){H.sort(void 0)}),V=A(function(){H.sort(null)}),Z=j("sort"),z=!A(function(){if(I)return I<70;if(!(D&&D>3)){if(N)return!0;if(B)return B<603;var T,L,C,F,$="";for(T=65;T<76;T++){switch(L=String.fromCharCode(T),T){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++)H.push({k:L+F,v:C})}for(H.sort(function(le,ce){return ce.v-le.v}),F=0;F<H.length;F++)L=H[F].k.charAt(0),$.charAt($.length-1)!==L&&($+=L);return $!=="DGBEFHACIJK"}});l({target:"Array",proto:!0,forced:J||!V||!Z||!z},{sort:function(T){T!==void 0&&v(T);var L=m(this);if(z)return T===void 0?ee(L):ee(L,T);var C,F,$=[],le=x(L);for(F=0;F<le;F++)F in L&&ie($,L[F]);for(P($,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}}(T)),C=$.length,F=0;F<C;)L[F]=$[F++];for(;F<le;)delete L[F++];return L}})},function(s,f,i){var l=i(113),c=Math.floor,v=function(w,A){var P=w.length,j=c(P/2);return P<8?m(w,A):x(w,v(l(w,0,j),A),v(l(w,j),A),A)},m=function(w,A){for(var P,j,D=w.length,N=1;N<D;){for(j=N,P=w[N];j&&A(w[j-1],P)>0;)w[j]=w[--j];j!==N++&&(w[j]=P)}return w},x=function(w,A,P,j){for(var D=A.length,N=P.length,I=0,B=0;I<D||B<N;)w[I+B]=I<D&&B<N?j(A[I],P[B])<=0?A[I++]:P[B++]:I<D?A[I++]:P[B++];return w};s.exports=v},function(s,f,i){var l=i(53).match(/firefox\/(\d+)/i);s.exports=!!l&&+l[1]},function(s,f,i){var l=i(53);s.exports=/MSIE|Trident/.test(l)},function(s,f,i){var l=i(53).match(/AppleWebKit\/(\d+)\./);s.exports=!!l&&+l[1]},function(s,f,i){var l=i(17),c=i(74).find,v=i(83),m="find",x=!0;m in[]&&Array(1).find(function(){x=!1}),l({target:"Array",proto:!0,forced:x},{find:function(w){return c(this,w,arguments.length>1?arguments[1]:void 0)}}),v(m)},function(s,f,i){var l=i(7),c=i(154),v=l.TypeError;s.exports=function(m){if(c(m))throw v("The method doesn't accept regular expressions");return m}},function(s,f,i){var l=i(27)("match");s.exports=function(c){var v=/./;try{"/./"[c](v)}catch(m){try{return v[l]=!1,"/./"[c](v)}catch(x){}}return!1}},function(s,f,i){var l=i(94).PROPER,c=i(19),v=i(160);s.exports=function(m){return c(function(){return!!v[m]()||"
"[m]()!=="
"||l&&v[m].name!==m})}},function(s,f,i){var l=i(15);s.exports=l(1 .valueOf)},function(s,f,i){var l=i(15),c=i(38),v=Math.floor,m=l("".charAt),x=l("".replace),w=l("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,P=/\$([$&'`]|\d{1,2})/g;s.exports=function(j,D,N,I,B,H){var ee=N+j.length,ie=I.length,J=P;return B!==void 0&&(B=c(B),J=A),x(H,J,function(V,Z){var z;switch(m(Z,0)){case"$":return"$";case"&":return j;case"`":return w(D,0,N);case"'":return w(D,ee);case"<":z=B[w(Z,1,-1)];break;default:var T=+Z;if(T===0)return V;if(T>ie){var L=v(T/10);return L===0?V:L<=ie?I[L-1]===void 0?m(Z,1):I[L-1]+m(Z,1):V}z=I[T-1]}return z===void 0?"":z})}},function(s,f,i){var l=i(36),c=i(15),v=i(35),m=i(19),x=i(66),w=i(112),A=i(93),P=i(38),j=i(81),D=Object.assign,N=Object.defineProperty,I=c([].concat);s.exports=!D||m(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={},H={},ee=Symbol(),ie="abcdefghijklmnopqrst";return B[ee]=7,ie.split("").forEach(function(J){H[J]=J}),D({},B)[ee]!=7||x(D({},H)).join("")!=ie})?function(B,H){for(var ee=P(B),ie=arguments.length,J=1,V=w.f,Z=A.f;ie>J;)for(var z,T=j(arguments[J++]),L=V?I(x(T),V(T)):x(T),C=L.length,F=0;C>F;)z=L[F++],l&&!v(Z,T,z)||(ee[z]=T[z]);return ee}:D},function(s,f,i){var l=i(7),c=i(15),v=i(55),m=i(33),x=i(34),w=i(101),A=l.Function,P=c([].concat),j=c([].join),D={},N=function(I,B,H){if(!x(D,B)){for(var ee=[],ie=0;ie<B;ie++)ee[ie]="a["+ie+"]";D[B]=A("C,a","return new C("+j(ee,",")+")")}return D[B](I,H)};s.exports=A.bind||function(I){var B=v(this),H=B.prototype,ee=w(arguments,1),ie=function(){var J=P(ee,w(arguments));return this instanceof ie?N(B,J.length,J):B.apply(I,J)};return m(H)&&(ie.prototype=H),ie}},function(s,f,i){var l=i(34);s.exports=function(c){return c!==void 0&&(l(c,"value")||l(c,"writable"))}},function(s,f,i){var l=i(15),c=i(45),v=i(41),m=/"/g,x=l("".replace);s.exports=function(w,A,P,j){var D=v(c(w)),N="<"+A;return P!==""&&(N+=" "+P+'="'+x(v(j),m,""")+'"'),N+">"+D+"</"+A+">"}},function(s,f,i){var l=i(19);s.exports=function(c){return l(function(){var v=""[c]('"');return v!==v.toLowerCase()||v.split('"').length>3})}},function(s,f,i){var l,c,v,m,x=i(17),w=i(64),A=i(7),P=i(46),j=i(35),D=i(205),N=i(44),I=i(144),B=i(97),H=i(73),ee=i(145),ie=i(55),J=i(28),V=i(33),Z=i(117),z=i(92),T=i(114),L=i(118),C=i(156),F=i(163).set,$=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),Ke=he("species"),Pe="Promise",Ce=ge.getterFor(Pe),Ze=ge.set,q=ge.getterFor(Pe),K=D&&D.prototype,ae=D,_e=K,Ae=A.TypeError,we=A.document,qe=A.process,nt=ye.f,$e=nt,Ye=!!(we&&we.createEvent&&A.dispatchEvent),ve=J(A.PromiseRejectionEvent),Ue="unhandledrejection",te=!1,Le=ue(Pe,function(){var Y=z(ae),se=Y!==String(ae);if(!se&&Ie===66||w&&!_e.finally)return!0;if(Ie>=51&&/native code/.test(Y))return!1;var Te=new ae(function(Xe){Xe(1)}),De=function(Xe){Xe(function(){},function(){})};return(Te.constructor={})[Ke]=De,!(te=Te.then(function(){})instanceof De)||!se&&be&&!ve}),ut=Le||!L(function(Y){ae.all(Y).catch(function(){})}),vt=function(Y){var se;return!(!V(Y)||!J(se=Y.then))&&se},it=function(Y,se){if(!Y.notified){Y.notified=!0;var Te=Y.reactions;$(function(){for(var De=Y.value,Xe=Y.state==1,ft=0;Te.length>ft;){var Ut,Kt,Ct,Rt=Te[ft++],ze=Xe?Rt.ok:Rt.fail,Ve=Rt.resolve,et=Rt.reject,rt=Rt.domain;try{ze?(Xe||(Y.rejection===2&&at(Y),Y.rejection=1),ze===!0?Ut=De:(rt&&rt.enter(),Ut=ze(De),rt&&(rt.exit(),Ct=!0)),Ut===Rt.promise?et(Ae("Promise-chain cycle")):(Kt=vt(Ut))?j(Kt,Ut,Ve,et):Ve(Ut)):et(De)}catch(wt){rt&&!Ct&&rt.exit(),et(wt)}}Y.reactions=[],Y.notified=!1,se&&!Y.rejection&&St(Y)})}},yt=function(Y,se,Te){var De,Xe;Ye?((De=we.createEvent("Event")).promise=se,De.reason=Te,De.initEvent(Y,!1,!0),A.dispatchEvent(De)):De={promise:se,reason:Te},!ve&&(Xe=A["on"+Y])?Xe(De):Y===Ue&&ce("Unhandled promise rejection",Te)},St=function(Y){j(F,A,function(){var se,Te=Y.facade,De=Y.value;if(Pt(Y)&&(se=xe(function(){Se?qe.emit("unhandledRejection",De,Te):yt(Ue,Te,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){j(F,A,function(){var se=Y.facade;Se?qe.emit("rejectionHandled",se):yt("rejectionhandled",se,Y.value)})},Nt=function(Y,se,Te){return function(De){Y(se,De,Te)}},G=function(Y,se,Te){Y.done||(Y.done=!0,Te&&(Y=Te),Y.value=se,Y.state=2,it(Y,!0))},ne=function(Y,se,Te){if(!Y.done){Y.done=!0,Te&&(Y=Te);try{if(Y.facade===se)throw Ae("Promise can't be resolved itself");var De=vt(se);De?$(function(){var Xe={done:!1};try{j(De,se,Nt(ne,Xe,Y),Nt(G,Xe,Y))}catch(ft){G(Xe,ft,Y)}}):(Y.value=se,Y.state=1,it(Y,!1))}catch(Xe){G({done:!1},Xe,Y)}}};if(Le&&(_e=(ae=function(Y){Z(this,_e),ie(Y),j(l,this);var se=Ce(this);try{Y(Nt(ne,se),Nt(G,se))}catch(Te){G(se,Te)}}).prototype,(l=function(Y){Ze(this,{type:Pe,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=I(_e,{then:function(Y,se){var Te=q(this),De=Te.reactions,Xe=nt(C(this,ae));return Xe.ok=!J(Y)||Y,Xe.fail=J(se)&&se,Xe.domain=Se?qe.domain:void 0,Te.parent=!0,De[De.length]=Xe,Te.state!=0&&it(Te,!1),Xe.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===v?new c(Y):$e(Y)},!w&&J(D)&&K!==Object.prototype)){m=K.then,te||(N(K,"then",function(Y,se){var Te=this;return new ae(function(De,Xe){j(m,Te,De,Xe)}).then(Y,se)},{unsafe:!0}),N(K,"catch",_e.catch,{unsafe:!0}));try{delete K.constructor}catch(Y){}B&&B(K,_e)}x({global:!0,wrap:!0,forced:Le},{Promise:ae}),H(ae,Pe,!1,!0),ee(Pe),v=P(Pe),x({target:Pe,stat:!0,forced:Le},{reject:function(Y){var se=nt(this);return j(se.reject,void 0,Y),se.promise}}),x({target:Pe,stat:!0,forced:w||Le},{resolve:function(Y){return le(w&&this===v?ae:this,Y)}}),x({target:Pe,stat:!0,forced:ut},{all:function(Y){var se=this,Te=nt(se),De=Te.resolve,Xe=Te.reject,ft=xe(function(){var Ut=ie(se.resolve),Kt=[],Ct=0,Rt=1;T(Y,function(ze){var Ve=Ct++,et=!1;Rt++,j(Ut,se,ze).then(function(rt){et||(et=!0,Kt[Ve]=rt,--Rt||De(Kt))},Xe)}),--Rt||De(Kt)});return ft.error&&Xe(ft.value),Te.promise},race:function(Y){var se=this,Te=nt(se),De=Te.reject,Xe=xe(function(){var ft=ie(se.resolve);T(Y,function(Ut){j(ft,se,Ut).then(Te.resolve,De)})});return Xe.error&&De(Xe.value),Te.promise}})},function(s,f,i){var l=i(7);s.exports=l.Promise},function(s,f,i){var l,c,v,m,x,w,A,P,j=i(7),D=i(62),N=i(51).f,I=i(163).set,B=i(164),H=i(207),ee=i(208),ie=i(126),J=j.MutationObserver||j.WebKitMutationObserver,V=j.document,Z=j.process,z=j.Promise,T=N(j,"queueMicrotask"),L=T&&T.value;L||(l=function(){var C,F;for(ie&&(C=Z.domain)&&C.exit();c;){F=c.fn,c=c.next;try{F()}catch($){throw c?m():v=void 0,$}}v=void 0,C&&C.enter()},B||ie||ee||!J||!V?!H&&z&&z.resolve?((A=z.resolve(void 0)).constructor=z,P=D(A.then,A),m=function(){P(l)}):ie?m=function(){Z.nextTick(l)}:(I=D(I,j),m=function(){I(l)}):(x=!0,w=V.createTextNode(""),new J(l).observe(w,{characterData:!0}),m=function(){w.data=x=!x})),s.exports=L||function(C){var F={fn:C,next:void 0};v&&(v.next=F),c||(c=F,m()),v=F}},function(s,f,i){var l=i(53),c=i(7);s.exports=/ipad|iphone|ipod/i.test(l)&&c.Pebble!==void 0},function(s,f,i){var l=i(53);s.exports=/web0s(?!.*chrome)/i.test(l)},function(s,f,i){var l=i(32),c=i(33),v=i(165);s.exports=function(m,x){if(l(m),c(x)&&x.constructor===m)return x;var w=v.f(m);return(0,w.resolve)(x),w.promise}},function(s,f,i){var l=i(7);s.exports=function(c,v){var m=l.console;m&&m.error&&(arguments.length==1?m.error(c):m.error(c,v))}},function(s,f){s.exports=function(i){try{return{error:!1,value:i()}}catch(l){return{error:!0,value:l}}}},function(s,f){s.exports=typeof window=="object"},function(s,f,i){var l=i(36),c=i(15),v=i(66),m=i(40),x=c(i(93).f),w=c([].push),A=function(P){return function(j){for(var D,N=m(j),I=v(N),B=I.length,H=0,ee=[];B>H;)D=I[H++],l&&!x(N,D)||w(ee,P?[D,N[D]]:N[D]);return ee}};s.exports={entries:A(!0),values:A(!1)}},function(s,f,i){var l=i(38),c=i(67),v=i(43);s.exports=function(m){for(var x=l(this),w=v(x),A=arguments.length,P=c(A>1?arguments[1]:void 0,w),j=A>2?arguments[2]:void 0,D=j===void 0?w:c(j,w);D>P;)x[P++]=m;return x}},function(s,f,i){i.r(f),i.d(f,"observer",function(){return Gn}),i.d(f,"LogicFlow",function(){return uf}),i.d(f,"h",function(){return te.g}),i.d(f,"LogicFlowUtil",function(){return l}),i.d(f,"BaseNode",function(){return Or}),i.d(f,"RectNode",function(){return Qc}),i.d(f,"CircleNode",function(){return rl}),i.d(f,"PolygonNode",function(){return sl}),i.d(f,"DiamondNode",function(){return pl}),i.d(f,"EllipseNode",function(){return vl}),i.d(f,"TextNode",function(){return Ol}),i.d(f,"HtmlNode",function(){return El}),i.d(f,"BaseEdge",function(){return Oi}),i.d(f,"LineEdge",function(){return zl}),i.d(f,"PolylineEdge",function(){return Gl}),i.d(f,"BezierEdge",function(){return Wl}),i.d(f,"Arrow",function(){return T_}),i.d(f,"BaseEdgeModel",function(){return Os}),i.d(f,"BezierEdgeModel",function(){return sc}),i.d(f,"LineEdgeModel",function(){return Ss}),i.d(f,"PolylineEdgeModel",function(){return ks}),i.d(f,"BaseNodeModel",function(){return mr}),i.d(f,"CircleNodeModel",function(){return hc}),i.d(f,"DiamondNodeModel",function(){return mc}),i.d(f,"EllipseNodeModel",function(){return xc}),i.d(f,"PolygonNodeModel",function(){return kc}),i.d(f,"RectNodeModel",function(){return Nc}),i.d(f,"TextNodeModel",function(){return Lc}),i.d(f,"HtmlNodeModel",function(){return Fc}),i.d(f,"EditConfigModel",function(){return qf}),i.d(f,"GraphModel",function(){return Ud}),i.d(f,"SnaplineModel",function(){return _y}),i.d(f,"Keyboard",function(){return ug}),i.d(f,"get",function(){return fh}),i.d(f,"defaults",function(){return dh}),i.d(f,"ElementState",function(){return _t}),i.d(f,"ModelType",function(){return ht}),i.d(f,"ElementType",function(){return Ht}),i.d(f,"EventType",function(){return tt}),i.d(f,"formateAnchorConnectValidateData",function(){return ii});var l={};i.r(l),i.d(l,"createUuid",function(){return Nr}),i.d(l,"refreshGraphId",function(){return Rb}),i.d(l,"createDrag",function(){return lm}),i.d(l,"StepDrag",function(){return yr});var c=i(1),v=i(10);if(!v.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 m=i(42),x=Object(m.b)("observerBatching");function w(e){e()}var A=!1;function P(){return A}function j(e){return Object(c.t)(e)}var D,N=1e4,I=new Set;function B(){D===void 0&&(D=setTimeout(H,1e4))}function H(){D=void 0;var e=Date.now();I.forEach(function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,I.delete(t))}),I.size>0&&B()}var ee=!1,ie=[],J={};function V(e){return"observer"+e}function Z(e,t,n){t===void 0&&(t="observed"),n===void 0&&(n=J),P();var r,a=function(O){return function(){ee?ie.push(O):O()}}((n.useForceUpdate||m.d)()),o=v.d.useRef(null);if(!o.current){var u=new c.c(V(t),function(){p.mounted?a():(u.dispose(),o.current=null)}),p=function(O){return{cleanAt:Date.now()+N,reaction:O}}(u);o.current=p,r=o,I.add(r),B()}var d=o.current.reaction;return v.d.useDebugValue(d,j),v.d.useEffect(function(){var O;return O=o,I.delete(O),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(O){ee=!0,ie=[];try{var _=O();ee=!1;var S=ie.length>0?ie:void 0;return v.d.useLayoutEffect(function(){S&&S.forEach(function(k){return k()})},[S]),_}finally{ee=!1}}(function(){var O,_;if(d.track(function(){try{O=e()}catch(S){_=S}}),_)throw _;return O})}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 T(e,t){var n,r,a,o=z({forwardRef:!1},t),u=e.displayName||e.name,p=function(d,O){return Z(function(){return e(d,O)},u)};return p.displayName=u,n=o.forwardRef?Object(v.f)(Object(v.e)(p)):Object(v.f)(p),r=e,a=n,Object.keys(r).forEach(function(d){L[d]||Object.defineProperty(a,d,Object.getOwnPropertyDescriptor(r,d))}),n.displayName=u,n}var L={$$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:Z(r)}function F(e,t,n,r,a){var o=t==="children"?"render":"children",u=typeof e[t]=="function",p=typeof e[o]=="function";return u&&p?new Error("MobX Observer: Do not use children and render in the same time in`"+n):u||p?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 $;($=v.g)||($=w),Object(c.n)({reactionScheduler:$}),Object(m.a)()[x]=!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(p){p.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 Ke(e,t,n){var r=function(p,d){var O=p[he]=p[he]||{},_=O[d]=O[d]||{};return _.locks=_.locks||0,_.methods=_.methods||[],_}(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(p){if(this===e)u=Ie(p,r);else{var d=Pe(this,t,n,r,p);Object.defineProperty(this,t,d)}},o.configurable=!0,o.enumerable=n,o}var Ce=c.a||"$mobx",Ze=ye("isMobXReactObserver"),q=ye("isUnmounted"),K=ye("skipRender"),ae=ye("isForcingUpdate");function _e(e){var t=e.prototype;if(e[Ze]?Ae(t):e[Ze]=!0,t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==v.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)},Ke(t,"componentWillUnmount",function(){var r;(r=this.render[Ce])===null||r===void 0||r.dispose(),this[q]=!0,!this.render[Ce]&&Ae(this)}),e}function Ae(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function we(e){var t=this;ue(this,K,!1),ue(this,ae,!1);var n=Ae(this),r=e.bind(this),a=!1,o=new c.c(n+".render()",function(){if(!a&&(a=!0,t[q]!==!0)){var p=!0;try{ue(t,ae,!0),t[K]||v.a.prototype.forceUpdate.call(t),p=!1}finally{ue(t,ae,!1),p&&o.dispose()}}});function u(){a=!1;var p=void 0,d=void 0;if(o.track(function(){try{d=Object(c.d)(!1,r)}catch(O){p=O}}),p)throw p;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,K,!0),a.call(this).reportChanged(),ue(this,K,!1))}})}var $e=typeof Symbol=="function"&&Symbol.for,Ye=$e?Symbol.for("react.forward_ref"):typeof v.e=="function"&&Object(v.e)(function(e){return null}).$$typeof,ve=$e?Symbol.for("react.memo"):typeof v.f=="function"&&Object(v.f)(function(e){return null}).$$typeof;function Ue(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(v.e)(function(){var n=arguments;return Object(v.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(v.a,e)?_e(e):T(e)}if(!v.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},Te=function(e){return this.__data__.get(e)},De=function(e){return this.__data__.has(e)},Xe=i(31),ft=Xe.a.Symbol,Ut=Object.prototype,Kt=Ut.hasOwnProperty,Ct=Ut.toString,Rt=ft?ft.toStringTag:void 0,ze=function(e){var t=Kt.call(e,Rt),n=e[Rt];try{e[Rt]=void 0;var r=!0}catch(o){}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)},Tt=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},cr,Xn=function(e){if(!Tt(e))return!1;var t=wt(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Yn=Xe.a["__core-js_shared__"],Wr=(cr=/[^.]+$/.exec(Yn&&Yn.keys&&Yn.keys.IE_PROTO||""))?"Symbol(src)_1."+cr:"",Bu=function(e){return!!Wr&&Wr in e},Xo=Function.prototype.toString,kn=function(e){if(e!=null){try{return Xo.call(e)}catch(t){}try{return e+""}catch(t){}}return""},Ci=/^\[object .+?Constructor\]$/,Ge=Function.prototype,Fu=Object.prototype,Ri=Ge.toString,Ii=Fu.hasOwnProperty,mn=RegExp("^"+Ri.call(Ii).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),On=function(e){return!(!Tt(e)||Bu(e))&&(Xn(e)?mn:Ci).test(kn(e))},Li=function(e,t){return e==null?void 0:e[t]},Vn=function(e,t){var n=Li(e,t);return On(n)?n:void 0},jr=Vn(Xe.a,"Map"),zn=Vn(Object,"create"),Yo=function(){this.__data__=zn?zn(null):{},this.size=0},zi=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Uu=Object.prototype.hasOwnProperty,co=function(e){var t=this.__data__;if(zn){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return Uu.call(t,e)?t[e]:void 0},Hu=Object.prototype.hasOwnProperty,Bi=function(e){var t=this.__data__;return zn?t[e]!==void 0:Hu.call(t,e)},Gu=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=zn&&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=Yo,lr.prototype.delete=zi,lr.prototype.get=co,lr.prototype.has=Bi,lr.prototype.set=Gu;var Fi=lr,Wn=function(){this.size=0,this.__data__={hash:new Fi,map:new(jr||ne),string:new Fi}},Xu=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},lo=function(e,t){var n=e.__data__;return Xu(t)?n[typeof t=="string"?"string":"hash"]:n.map},Vo=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},Wo=function(e){return lo(this,e).get(e)},Yu=function(e){return lo(this,e).has(e)},Ui=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Pr(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])}}Pr.prototype.clear=Wn,Pr.prototype.delete=Vo,Pr.prototype.get=Wo,Pr.prototype.has=Yu,Pr.prototype.set=Ui;var Ar=Pr,Hi=function(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!jr||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 kr(e){var t=this.__data__=new ne(e);this.size=t.size}kr.prototype.clear=Y,kr.prototype.delete=se,kr.prototype.get=Te,kr.prototype.has=De,kr.prototype.set=Hi;var Kn=kr,Gi=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Xi=function(e){return this.__data__.has(e)};function Kr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ar;++t<n;)this.add(e[t])}Kr.prototype.add=Kr.prototype.push=Gi,Kr.prototype.has=Xi;var Yi=Kr,Vu=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},Vi=function(e,t){return e.has(t)},Wi=function(e,t,n,r,a,o){var u=1&n,p=e.length,d=t.length;if(p!=d&&!(u&&d>p))return!1;var O=o.get(e),_=o.get(t);if(O&&_)return O==t&&_==e;var S=-1,k=!0,R=2&n?new Yi:void 0;for(o.set(e,t),o.set(t,e);++S<p;){var X=e[S],W=t[S];if(r)var oe=u?r(W,X,S,t,e,o):r(X,W,S,e,t,o);if(oe!==void 0){if(oe)continue;k=!1;break}if(R){if(!Vu(t,function(re,de){if(!Vi(R,de)&&(X===re||a(X,re,n,r,o)))return R.push(de)})){k=!1;break}}else if(X!==W&&!a(X,W,n,r,o)){k=!1;break}}return o.delete(e),o.delete(t),k},Zr=Xe.a.Uint8Array,Ki=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n},Wu=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n},Zi=ft?ft.prototype:void 0,Ko=Zi?Zi.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 Zr(e),new Zr(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 p=Ki;case"[object Set]":var d=1&r;if(p||(p=Wu),e.size!=t.size&&!d)return!1;var O=u.get(e);if(O)return O==t;r|=2,u.set(e,t);var _=Wi(p(e),p(t),r,a,o,u);return u.delete(e),_;case"[object Symbol]":if(Ko)return Ko.call(e)==Ko.call(t)}return!1},Zn=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Jt=Array.isArray,qi=function(e,t,n){var r=t(e);return Jt(e)?r:Zn(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},$i=function(){return[]},Ku=Object.prototype.propertyIsEnumerable,fr=Object.getOwnPropertySymbols,Mn=fr?function(e){return e==null?[]:(e=Object(e),Ji(fr(e),function(t){return Ku.call(e,t)}))}:$i,Zu=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Tn=function(e){return e!=null&&typeof e=="object"},_n=function(e){return Tn(e)&&wt(e)=="[object Arguments]"},Qi=Object.prototype,ea=Qi.hasOwnProperty,qu=Qi.propertyIsEnumerable,fo=_n(function(){return arguments}())?_n:function(e){return Tn(e)&&ea.call(e,"callee")&&!qu.call(e,"callee")},qn=fo,Jr=i(48),Ju=/^(?:0|[1-9]\d*)$/,on=function(e,t){var n=typeof e;return!!(t=t==null?9007199254740991:t)&&(n=="number"||n!="symbol"&&Ju.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 wn=function(e){return Tn(e)&&pr(e.length)&&!!gt[wt(e)]},dr=function(e){return function(t){return e(t)}},Zt=i(49),ta=Zt.a&&Zt.a.isTypedArray,Zo=ta?dr(ta):wn,na=Object.prototype.hasOwnProperty,Dn=function(e,t){var n=Jt(e),r=!n&&qn(e),a=!n&&!r&&Object(Jr.a)(e),o=!n&&!r&&!a&&Zo(e),u=n||r||a||o,p=u?Zu(e.length,String):[],d=p.length;for(var O in e)!t&&!na.call(e,O)||u&&(O=="length"||a&&(O=="offset"||O=="parent")||o&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||on(O,d))||p.push(O);return p},ra=Object.prototype,po=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||ra)},Nn=function(e,t){return function(n){return e(t(n))}},oa=Nn(Object.keys,Object),$u=Object.prototype.hasOwnProperty,qo=function(e){if(!po(e))return oa(e);var t=[];for(var n in Object(e))$u.call(e,n)&&n!="constructor"&&t.push(n);return t},It=function(e){return e!=null&&pr(e.length)&&!Xn(e)},Mr=function(e){return It(e)?Dn(e):qo(e)},ho=function(e){return qi(e,Mr,Mn)},yn=Object.prototype.hasOwnProperty,ia=function(e,t,n,r,a,o){var u=1&n,p=ho(e),d=p.length;if(d!=ho(t).length&&!u)return!1;for(var O=d;O--;){var _=p[O];if(!(u?_ in t:yn.call(t,_)))return!1}var S=o.get(e),k=o.get(t);if(S&&k)return S==t&&k==e;var R=!0;o.set(e,t),o.set(t,e);for(var X=u;++O<d;){var W=e[_=p[O]],oe=t[_];if(r)var re=u?r(oe,W,_,t,e,o):r(W,oe,_,e,t,o);if(!(re===void 0?W===oe||a(W,oe,n,r,o):re)){R=!1;break}X||(X=_=="constructor")}if(R&&!X){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},$r=Vn(Xe.a,"DataView"),yo=Vn(Xe.a,"Promise"),go=Vn(Xe.a,"Set"),vo=Vn(Xe.a,"WeakMap"),aa="[object Map]",gn="[object Promise]",xn="[object Set]",Tr="[object WeakMap]",Jo="[object DataView]",$o=kn($r),Qo=kn(jr),ua=kn(yo),Qu=kn(go),bo=kn(vo),hr=wt;($r&&hr(new $r(new ArrayBuffer(1)))!=Jo||jr&&hr(new jr)!=aa||yo&&hr(yo.resolve())!=gn||go&&hr(new go)!=xn||vo&&hr(new vo)!=Tr)&&(hr=function(e){var t=wt(e),n=t=="[object Object]"?e.constructor:void 0,r=n?kn(n):"";if(r)switch(r){case $o:return Jo;case Qo:return aa;case ua:return gn;case Qu:return xn;case bo:return Tr}return t});var y=hr,b="[object Arguments]",E="[object Array]",M="[object Object]",U=Object.prototype.hasOwnProperty,Q=function(e,t,n,r,a,o){var u=Jt(e),p=Jt(t),d=u?E:y(e),O=p?E:y(t),_=(d=d==b?M:d)==M,S=(O=O==b?M:O)==M,k=d==O;if(k&&Object(Jr.a)(e)){if(!Object(Jr.a)(t))return!1;u=!0,_=!1}if(k&&!_)return o||(o=new Kn),u||Zo(e)?Wi(e,t,n,r,a,o):qr(e,t,d,n,r,a,o);if(!(1&n)){var R=_&&U.call(e,"__wrapped__"),X=S&&U.call(t,"__wrapped__");if(R||X){var W=R?e.value():e,oe=X?t.value():t;return o||(o=new Kn),a(W,oe,n,r,o)}}return!!k&&(o||(o=new Kn),ia(e,t,n,r,a,o))},pe=function e(t,n,r,a,o){return t===n||(t==null||n==null||!Tn(t)&&!Tn(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 p=n[a];if(u&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++a<o;){var d=(p=n[a])[0],O=e[d],_=p[1];if(u&&p[2]){if(O===void 0&&!(d in e))return!1}else{var S=new Kn;if(r)var k=r(O,_,d,e,t,S);if(!(k===void 0?pe(_,O,3,r,S):k))return!1}}return!0},Fe=function(e){return e==e&&!Tt(e)},dt=function(e){for(var t=Mr(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"||Tn(e)&&wt(e)=="[object Symbol]"},Ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,En=/^\w*$/,kt=function(e,t){if(Jt(e))return!1;var n=typeof e;return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!ct(e))||En.test(e)||!Ot.test(e)||t!=null&&e in Object(t)};function an(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(an.Cache||Ar),n}an.Cache=Ar;var Qr=an,es=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sa=/\\(\\)?/g,ca=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(es,function(n,r,a,o){t.push(a?o.replace(sa,"$1"):r||n)}),t}),mo=ft?ft.prototype:void 0,ei=mo?mo.toString:void 0,un=function e(t){if(typeof t=="string")return t;if(Jt(t))return Le(t,e)+"";if(ct(t))return ei?ei.call(t):"";var n=t+"";return n=="0"&&1/t==-1/0?"-0":n},la=function(e){return e==null?"":un(e)},eo=function(e,t){return Jt(e)?e:kt(e,t)?[e]:ca(la(e))},ti=function(e){if(typeof e=="string"||ct(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},ts=function(e,t){for(var n=0,r=(t=eo(t,e)).length;e!=null&&n<r;)e=e[ti(t[n++])];return n&&n==r?e:void 0},xf=function(e,t,n){var r=e==null?void 0:ts(e,t);return r===void 0?n:r},_v=function(e,t){return e!=null&&t in Object(e)},wv=function(e,t,n){for(var r=-1,a=(t=eo(t,e)).length,o=!1;++r<a;){var u=ti(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)&&on(u,a)&&(Jt(e)||qn(e))},Ef=function(e,t){return e!=null&&wv(e,t,_v)},xv=function(e,t){return kt(e)&&Fe(t)?ot(ti(e),t):function(n){var r=xf(n,e);return r===void 0&&r===t?Ef(n,e):pe(t,r,3)}},ns=function(e){return e},Ev=function(e){return function(t){return t==null?void 0:t[e]}},Sv=function(e){return function(t){return ts(t,e)}},jv=function(e){return kt(e)?Ev(ti(e)):Sv(e)},Pv=function(e){return typeof e=="function"?e:e==null?ns:typeof e=="object"?Jt(e)?xv(e[0],e[1]):xt(e):jv(e)},Sf=function(e){return function(t,n,r){for(var a=-1,o=Object(t),u=r(t),p=u.length;p--;){var d=u[e?p:++a];if(n(o[d],d,o)===!1)break}return t}}(),Av=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&&Sf(e,t,Mr)}),kv=function(e,t){var n=-1,r=It(e)?Array(e.length):[];return Av(e,function(a,o,u){r[++n]=t(a,o,u)}),r},fa=function(e,t){return(Jt(e)?Le:kv)(e,Pv(t))};Object(c.n)({isolateGlobalState:!0});var pa=function(){try{var e=Vn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),rs=function(e,t,n){t=="__proto__"&&pa?pa(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Mv=Object.prototype.hasOwnProperty,da=function(e,t,n){var r=e[t];Mv.call(e,t)&&vt(r,n)&&(n!==void 0||t in e)||rs(e,t,n)},Oo=function(e,t,n,r){var a=!n;n||(n={});for(var o=-1,u=t.length;++o<u;){var p=t[o],d=r?r(n[p],e[p],p,n,e):void 0;d===void 0&&(d=e[p]),a?rs(n,p,d):da(n,p,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)},jf=Math.max,Pf=function(e,t,n){return t=jf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=jf(r.length-t,0),u=Array(o);++a<o;)u[a]=r[t+a];a=-1;for(var p=Array(t+1);++a<t;)p[a]=r[a];return p[t]=n(u),Tv(e,this,p)}},Dv=function(e){return function(){return e}},Nv=pa?function(e,t){return pa(e,"toString",{configurable:!0,enumerable:!1,value:Dv(t),writable:!0})}:ns,Cv=Date.now,Rv=function(e){var t=0,n=0;return function(){var r=Cv(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Af=Rv(Nv),Iv=function(e,t){return Af(Pf(e,t,ns),e+"")},Lv=function(e,t,n){if(!Tt(n))return!1;var r=typeof t;return!!(r=="number"?It(n)&&on(t,n.length):r=="string"&&t in n)&&vt(n[t],e)},kf=function(e){return Iv(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&&Lv(n[0],n[1],u)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var p=n[r];p&&e(t,p,r,o)}return t})},zv=Object.prototype.hasOwnProperty,sn=kf(function(e,t){if(po(t)||It(t))Oo(t,Mr(t),e);else for(var n in t)zv.call(t,n)&&da(e,n,t[n])}),Bv=function(e,t,n,r){if(!Tt(e))return e;for(var a=-1,o=(t=eo(t,e)).length,u=o-1,p=e;p!=null&&++a<o;){var d=ti(t[a]),O=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=u){var _=p[d];(O=r?r(_,d,p):void 0)===void 0&&(O=Tt(_)?_:on(t[a+1])?[]:{})}da(p,d,O),p=p[d]}return e},Fv=function(e,t,n){for(var r=-1,a=t.length,o={};++r<a;){var u=t[r],p=ts(e,u);n(p,u)&&Bv(o,eo(u,e),p)}return o},Uv=function(e,t){return Fv(e,t,function(n,r){return Ef(e,r)})},Mf=ft?ft.isConcatSpreadable:void 0,Hv=function(e){return Jt(e)||qn(e)||!!(Mf&&e&&e[Mf])},Gv=function e(t,n,r,a,o){var u=-1,p=t.length;for(r||(r=Hv),o||(o=[]);++u<p;){var d=t[u];n>0&&r(d)?n>1?e(d,n-1,r,a,o):Zn(o,d):a||(o[o.length]=d)}return o},Xv=function(e){return e!=null&&e.length?Gv(e,1):[]},Lt,Tf,Df,Nf,Cf,Rf,If,Lf,zf,Bf,Ff,Uf,Hf,Gf,Xf,Yf,Vf,Wf,ni=function(e){return Af(Pf(e,void 0,Xv),e+"")}(function(e,t){return e==null?{}:Uv(e,t)});function $t(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 Kf(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,p){return p(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 _t,Zf,ht,Ht,tt,Mt,Vv={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},os=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],qf=(Tf=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),$t(this,"isSilentMode",Tf,this),$t(this,"stopZoomGraph",Df,this),$t(this,"stopScrollGraph",Nf,this),$t(this,"stopMoveGraph",Cf,this),$t(this,"adjustEdge",Rf,this),$t(this,"adjustEdgeMiddle",If,this),$t(this,"adjustEdgeStartAndEnd",Lf,this),$t(this,"adjustNodePosition",zf,this),$t(this,"hideAnchors",Bf,this),$t(this,"hoverOutline",Ff,this),$t(this,"nodeSelectedOutline",Uf,this),$t(this,"edgeSelectedOutline",Hf,this),$t(this,"nodeTextEdit",Gf,this),$t(this,"edgeTextEdit",Xf,this),$t(this,"nodeTextDraggable",Yf,this),$t(this,"edgeTextDraggable",Vf,this),$t(this,"autoExpand",Wf,this),Kf(this,"multipleSelectKey",""),Kf(this,"defaultConfig",{}),sn(this,this.getConfigDetail(r))}var t,n;return t=e,(n=[{key:"updateEditConfig",value:function(r){var a=this.getConfigDetail(r);sn(this,a)}},{key:"getConfigDetail",value:function(r){var a=r.isSilentMode,o=r.textEdit,u={};if(a===!1&&sn(u,this.defaultConfig),a===!0&&a!==this.isSilentMode){var p=ni(Vv,os);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},sn(u,p)}o===!1&&sn(u,{nodeTextEdit:!1,edgeTextEdit:!1});var d=ni(r,os);return sn(u,d)}},{key:"getConfig",value:function(){return ni(this,os)}}])&&Yv(t.prototype,n),e}()).prototype,"isSilentMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Df=qt(Lt.prototype,"stopZoomGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nf=qt(Lt.prototype,"stopScrollGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cf=qt(Lt.prototype,"stopMoveGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rf=qt(Lt.prototype,"adjustEdge",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),If=qt(Lt.prototype,"adjustEdgeMiddle",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Lf=qt(Lt.prototype,"adjustEdgeStartAndEnd",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zf=qt(Lt.prototype,"adjustNodePosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bf=qt(Lt.prototype,"hideAnchors",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ff=qt(Lt.prototype,"hoverOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Uf=qt(Lt.prototype,"nodeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hf=qt(Lt.prototype,"edgeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Gf=qt(Lt.prototype,"nodeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xf=qt(Lt.prototype,"edgeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Yf=qt(Lt.prototype,"nodeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Vf=qt(Lt.prototype,"edgeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wf=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"}(_t||(_t={})),function(e){e.KEY="logic-flow",e.NODE_NAME="lf-node",e.EDGE_NAME="lf-edge"}(Zf||(Zf={})),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"}(Ht||(Ht={})),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"}(Mt||(Mt={}));var Sn,zt,Jf,$f,Qf,ep,tp,np,rp;function ha(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return op(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 op(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 op(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 Wv(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,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,p){return p(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"})(Sn||(Sn={}));var Kv=(zt=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),is(this,"MINI_SCALE_SIZE",.2),is(this,"MAX_SCALE_SIZE",16),to(this,"SCALE_X",Jf,this),to(this,"SKEW_Y",$f,this),to(this,"SKEW_X",Qf,this),to(this,"SCALE_Y",ep,this),to(this,"TRANSLATE_X",tp,this),to(this,"TRANSLATE_Y",np,this),to(this,"ZOOM_SIZE",rp,this),is(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=ha(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=ha(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=ha(r,2),p=u[0],d=u[1];return[p+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 p=ha(this.CanvasPointToHtmlPoint([r,a]),2),d=o/2-p[0],O=u/2-p[1];this.TRANSLATE_X+=d,this.TRANSLATE_Y+=O,this.emitGraphTransform("focusOn")}}],n&&Wv(t.prototype,n),e}(),Jf=Bn(zt.prototype,"SCALE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),$f=Bn(zt.prototype,"SKEW_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Qf=Bn(zt.prototype,"SKEW_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ep=Bn(zt.prototype,"SCALE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),tp=Bn(zt.prototype,"TRANSLATE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),np=Bn(zt.prototype,"TRANSLATE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),rp=Bn(zt.prototype,"ZOOM_SIZE",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Bn(zt.prototype,"zoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"zoom"),zt.prototype),Bn(zt.prototype,"resetZoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"resetZoom"),zt.prototype),Bn(zt.prototype,"translate",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"translate"),zt.prototype),Bn(zt.prototype,"focusOn",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"focusOn"),zt.prototype),zt),Zv=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e},qv=function(e,t){return e&&Oo(t,Mr(t),e)},Jv=function(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t},$v=Object.prototype.hasOwnProperty,Qv=function(e){if(!Tt(e))return Jv(e);var t=po(e),n=[];for(var r in e)(r!="constructor"||!t&&$v.call(e,r))&&n.push(r);return n},ri=function(e){return It(e)?Dn(e,!0):Qv(e)},eb=function(e,t){return e&&Oo(t,ri(t),e)},ip=i(106),ap=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},tb=function(e,t){return Oo(e,Mn(e),t)},as=Nn(Object.getPrototypeOf,Object),up=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Zn(t,Mn(e)),e=as(e);return t}:$i,nb=function(e,t){return Oo(e,up(e),t)},rb=function(e){return qi(e,ri,up)},ob=Object.prototype.hasOwnProperty,ib=function(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&ob.call(e,"index")&&(n.index=e.index,n.input=e.input),n},us=function(e){var t=new e.constructor(e.byteLength);return new Zr(t).set(new Zr(e)),t},ab=function(e,t){var n=t?us(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},ub=/\w*$/,sb=function(e){var t=new e.constructor(e.source,ub.exec(e));return t.lastIndex=e.lastIndex,t},sp=ft?ft.prototype:void 0,cp=sp?sp.valueOf:void 0,cb=function(e){return cp?Object(cp.call(e)):{}},lp=function(e,t){var n=t?us(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},lb=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return us(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return ab(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 lp(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 sb(e);case"[object Symbol]":return cb(e)}},fp=Object.create,fb=function(){function e(){}return function(t){if(!Tt(t))return{};if(fp)return fp(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),pp=function(e){return typeof e.constructor!="function"||po(e)?{}:fb(as(e))},pb=function(e){return Tn(e)&&y(e)=="[object Map]"},dp=Zt.a&&Zt.a.isMap,db=dp?dr(dp):pb,hb=function(e){return Tn(e)&&y(e)=="[object Set]"},hp=Zt.a&&Zt.a.isSet,yb=hp?dr(hp):hb,yp="[object Arguments]",gp="[object Function]",gb="[object Object]",At={};At[yp]=At["[object Array]"]=At["[object ArrayBuffer]"]=At["[object DataView]"]=At["[object Boolean]"]=At["[object Date]"]=At["[object Float32Array]"]=At["[object Float64Array]"]=At["[object Int8Array]"]=At["[object Int16Array]"]=At["[object Int32Array]"]=At["[object Map]"]=At["[object Number]"]=At["[object Object]"]=At["[object RegExp]"]=At["[object Set]"]=At["[object String]"]=At["[object Symbol]"]=At["[object Uint8Array]"]=At["[object Uint8ClampedArray]"]=At["[object Uint16Array]"]=At["[object Uint32Array]"]=!0,At["[object Error]"]=At[gp]=At["[object WeakMap]"]=!1;var vb=function e(t,n,r,a,o,u){var p,d=1&n,O=2&n,_=4&n;if(r&&(p=o?r(t,a,o,u):r(t)),p!==void 0)return p;if(!Tt(t))return t;var S=Jt(t);if(S){if(p=ib(t),!d)return ap(t,p)}else{var k=y(t),R=k==gp||k=="[object GeneratorFunction]";if(Object(Jr.a)(t))return Object(ip.a)(t,d);if(k==gb||k==yp||R&&!o){if(p=O||R?{}:pp(t),!d)return O?nb(t,eb(p,t)):tb(t,qv(p,t))}else{if(!At[k])return o?t:{};p=lb(t,k,d)}}u||(u=new Kn);var X=u.get(t);if(X)return X;u.set(t,p),yb(t)?t.forEach(function(oe){p.add(e(oe,n,r,oe,t,u))}):db(t)&&t.forEach(function(oe,re){p.set(re,e(oe,n,r,re,t,u))});var W=S?void 0:(_?O?rb:ho:O?ri:Mr)(t);return Zv(W||t,function(oe,re){W&&(oe=t[re=oe]),da(p,re,e(oe,n,r,re,t,u))}),p},Dt=function(e){return vb(e,5)},ss=function(e,t,n){(n!==void 0&&!vt(e[t],n)||n===void 0&&!(t in e))&&rs(e,t,n)},bb=function(e){return Tn(e)&&It(e)},mb=Function.prototype,Ob=Object.prototype,vp=mb.toString,_b=Ob.hasOwnProperty,wb=vp.call(Object),xb=function(e){if(!Tn(e)||wt(e)!="[object Object]")return!1;var t=as(e);if(t===null)return!0;var n=_b.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&vp.call(n)==wb},cs=function(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]},Eb=function(e){return Oo(e,ri(e))},Sb=function(e,t,n,r,a,o,u){var p=cs(e,n),d=cs(t,n),O=u.get(d);if(O)ss(e,n,O);else{var _=o?o(p,d,n+"",e,t,u):void 0,S=_===void 0;if(S){var k=Jt(d),R=!k&&Object(Jr.a)(d),X=!k&&!R&&Zo(d);_=d,k||R||X?Jt(p)?_=p:bb(p)?_=ap(p):R?(S=!1,_=Object(ip.a)(d,!0)):X?(S=!1,_=lp(d,!0)):_=[]:xb(d)||qn(d)?(_=p,qn(p)?_=Eb(p):Tt(p)&&!Xn(p)||(_=pp(d))):S=!1}S&&(u.set(d,_),a(_,d,r,o,u),u.delete(d)),ss(e,n,_)}},jb=function e(t,n,r,a,o){t!==n&&Sf(n,function(u,p){if(o||(o=new Kn),Tt(u))Sb(t,n,p,r,e,a,o);else{var d=a?a(cs(t,p),u,p+"",t,n,o):void 0;d===void 0&&(d=u),ss(t,p,d)}},ri)},bp=kf(function(e,t,n){jb(e,t,n)}),Pb={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"}},mp=function(e){var t=Dt(Pb);return e&&(t=bp(t,e)),t};i(77),i(158);function Ab(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 kb=function(){function e(){var r,a,o;(function(u,p){if(!(u instanceof p))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(p){p=p.trim(),u._events[p]||(u._events[p]=[]),u._events[p].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 p=o._events[u]||[],d=o._events["*"]||[],O=function(_){for(var S=_.length,k=0;k<S;k++)if(_[k]){var R=_[k],X=R.callback;R.once&&(_.splice(k,1),_.length===0&&delete o._events[u],S--,k--),X.apply(o,[a])}};O(p),O(d)})}},{key:"off",value:function(r,a){var o=this;return r||(this._events={}),r.split(",").forEach(function(u){if(a){for(var p=o._events[u]||[],d=p.length,O=0;O<d;O++)p[O].callback===a&&(p.splice(O,1),d--,O--);p.length===0&&delete o._events[u]}else delete o._events[u]}),this}},{key:"getEvents",value:function(){return this._events}}])&&Ab(t.prototype,n),e}();function Dr(e,t){return t*Math.round(e/t)||e}function Op(e,t){return e%t}function ls(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return _p(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 _p(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 _p(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 fs,ps=function(e,t,n){var r=ls(e,2),a=r[0],o=r[1],u=ls(t,2),p=u[0],d=u[1],O=ls(n,2),_=O[0],S=O[1];return a>p&&a<_&&o>d&&o<S},wp=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},Mb=(i(78),i(161),i(125),i(79),i(30),i(12),i(13),i(14),i(47),new Uint8Array(16));function Tb(){if(!fs&&!(fs=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&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 fs(Mb)}for(var Db=/^(?:[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,Nb=function(e){return typeof e=="string"&&Db.test(e)},Qt=[],ds=0;ds<256;++ds)Qt.push((ds+256).toString(16).substr(1));var Cb=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(!Nb(n))throw TypeError("Stringified UUID is invalid");return n},hs=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 Cb(r)},Nr=function(){return hs()},Rb=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+hs(),a.id=r[a.id],r},{});return e.edges.forEach(function(r){r.id=t+hs(),r.sourceNodeId=n[r.sourceNodeId],r.targetNodeId=n[r.targetNodeId]}),e},oi=(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 ys(e){return ys=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},ys(e)}function xp(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 Ep(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xp(Object(n),!0).forEach(function(r){Ib(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ib(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oe,Sp,jp,Pp,Ap,kp,Mp,Tp,Dp,Np,Cp,Rp,Ip,Lp,zp,Bp,Fp,Up,Hp,Gp,Xp,gs=function(e){return e.anchors},ya=function(e,t){for(var n,r=t.nodes,a=r.length-1;a>=0;a--){var o=r[a];if(zb(e,o)){var u=o.getTargetAnchor(e);if(u){var p={node:o,anchorIndex:u.index,anchor:u.anchor};n&&!Lb(o,n.node,t)||(n=p)}}}return n},Lb=function(e,t,n){return e.zIndex>t.zIndex||n.nodesMap[e.id].index>n.nodesMap[t.id].index},Jn=function(e,t,n,r){return Math.hypot(e-n,t-r)},Cr=function(e,t){var n=!1,r=jn(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},zb=function(e,t){var n=!1,r=jn(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},jn=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}},Yp=function(e,t,n){var r,a=function(u){var p=u,d=p.x,O=p.y,_=p.width,S=p.height,k=p.radius;return[{x:d-_/2+k,y:O-S/2+k,r:k},{x:d+_/2-k,y:O-S/2+k,r:k},{x:d-_/2+k,y:O+S/2-k,r:k},{x:d+_/2-k,y:O+S/2-k,r:k}]}(n),o=Number.MAX_SAFE_INTEGER;return a.forEach(function(u){var p=Jn(e.x,e.y,u.x,u.y);p<o&&(o=p,r=u)}),vs(e,t,r)},vs=function(e,t,n){var r,a=n,o=a.x,u=a.y,p=a.r;if(t===Mt.HORIZONTAL){var d=o-Math.sqrt(p*p-(e.y-u)*(e.y-u)),O=o+Math.sqrt(p*p-(e.y-u)*(e.y-u));r={x:Math.abs(d-e.x)<Math.abs(O-e.x)?d:O,y:e.y}}else if(t===Mt.VERTICAL){var _=u-Math.sqrt(p*p-(e.x-o)*(e.x-o)),S=u+Math.sqrt(p*p-(e.x-o)*(e.x-o)),k=Math.abs(_-e.y)<Math.abs(S-e.y)?_:S;r={x:e.x,y:k}}return r},Vp=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,p=n.y+n.height/2-n.radius,d=n.x,O=n.y,_=n.width,S=n.height;return e.y===O+S/2||e.y===O-S/2?r=e.x>a&&e.x<o:e.x!==d+_/2&&e.x!==d-_/2||(r=e.y>u&&e.y<p),r},Wp=function(e,t,n){var r,a=n,o=a.x,u=a.y,p=a.rx,d=a.ry;if(t===Mt.HORIZONTAL){var O=o-Math.sqrt(p*p-(e.y-u)*(e.y-u)*p*p/(d*d)),_=o+Math.sqrt(p*p-(e.y-u)*(e.y-u)*p*p/(d*d));r={x:Math.abs(O-e.x)<Math.abs(_-e.x)?O:_,y:e.y}}else if(t===Mt.VERTICAL){var S=u-Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(p*p)),k=u+Math.sqrt(d*d-(e.x-o)*(e.x-o)*d*d/(p*p)),R=Math.abs(S-e.y)<Math.abs(k-e.y)?S:k;r={x:e.x,y:R}}return r},Kp=function(e,t,n){for(var r,a=n.pointsPosition,o=Number.MAX_SAFE_INTEGER,u=[],p=0;p<a.length;p++)u.push({start:a[p],end:a[(p+1)%a.length]});return u.forEach(function(d){var O=d.start,_=d.end,S=O,k=_;O.x>_.x&&(S=_,k=O);var R={x:e.x,y:e.y};if(S.x===k.x&&t===Mt.HORIZONTAL&&(R={x:S.x,y:e.y}),S.y===k.y&&t===Mt.VERTICAL&&(R={x:e.x,y:S.y}),S.x!==k.x&&S.y!==k.y){var X=(k.y-S.y)/(k.x-S.x),W=(S.x*k.y-k.x*S.y)/(S.x-k.x);t===Mt.HORIZONTAL?R={x:(e.y-W)/X,y:e.y}:t===Mt.VERTICAL&&(R={x:e.x,y:X*e.x+W})}if(oi(R,O,_)){var oe=Jn(R.x,R.y,e.x,e.y);oe<o&&(o=oe,r=R)}}),r},Zp=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}},qp=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(p){var d=document.createElement("div");d.textContent=p,o.appendChild(d)}):o.textContent=t,document.body.appendChild(o);var u=o.clientHeight;return document.body.removeChild(o),u},bs=function(e){var t=e.rows,n=e.rowsLength,r=e.fontSize,a=0;return t&&t.forEach(function(o){var u=md(o);a=u>a?u:a}),{width:Math.ceil(a/2)*r+r/4,height:n*(r+2)+r/4}},ii=function(e){return ys(e)!=="object"?{isAllPass:!!e,msg:e?"":"不允许连接"}:e},tn=function(e){try{return JSON.parse(JSON.stringify(e))}catch(t){return e}},Bb=1e3,Fb=999,ms=function(){return++Bb};function Jp(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 vn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jp(Object(n),!0).forEach(function(r){Cn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jp(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 Ub(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 Cn(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,p){return p(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 Os=(Oe=function(){function e(r,a){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),Cn(this,"id",""),Gt(this,"type",Sp,this),Gt(this,"sourceNodeId",jp,this),Gt(this,"targetNodeId",Pp,this),Gt(this,"startPoint",Ap,this),Gt(this,"endPoint",kp,this),Gt(this,"text",Mp,this),Gt(this,"properties",Tp,this),Gt(this,"points",Dp,this),Gt(this,"pointsList",Np,this),Gt(this,"isSelected",Cp,this),Gt(this,"isHovered",Rp,this),Gt(this,"isHitable",Ip,this),Gt(this,"draggable",Lp,this),Gt(this,"visible",zp,this),Cn(this,"virtual",!1),Gt(this,"isAnimation",Bp,this),Gt(this,"isShowAdjustPoint",Fp,this),Cn(this,"graphModel",void 0),Gt(this,"zIndex",Up,this),Cn(this,"BaseType",Ht.EDGE),Cn(this,"modelType",ht.EDGE),Gt(this,"state",Hp,this),Cn(this,"additionStateData",void 0),Cn(this,"sourceAnchorId",""),Cn(this,"targetAnchorId",""),Cn(this,"menu",void 0),Cn(this,"customTextPosition",!1),Gt(this,"style",Gp,this),Gt(this,"arrowConfig",Xp,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||Nr()}this.arrowConfig.markerEnd="url(#marker-end-".concat(r.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(r.id,")");var p=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=p,sn(this,sm(r)),this.graphModel.overlapMode===Sn.INCREASE&&(this.zIndex=r.zIndex||ms()),this.setAnchors(),this.initPoints(),this.formatText(r)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return vn(vn({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return vn({},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 vn(vn({},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 gs(r).forEach(function(p){var d=xd(p,a);(u===void 0||d<u)&&(u=d,o=p)}),o}},{key:"getEndAnchor",value:function(r){var a,o,u=this;return gs(r).forEach(function(p){var d=xd(p,u.startPoint);(o===void 0||d<o)&&(o=d,a=p)}),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,p={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&&(p.text={x:a,y:o,value:u}),this.graphModel.overlapMode===Sn.INCREASE&&(p.zIndex=this.zIndex),p}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(r,a){this.properties[r]=tn(a),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=vn(vn({},Object(c.I)(this.properties)),tn(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=vn(vn({},this.style),{},Cn({},r,tn(a)))}},{key:"setStyles",value:function(r){this.style=vn(vn({},this.style),tn(r))}},{key:"updateStyles",value:function(r){this.style=vn({},tn(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,p=o.y,d=o.value,O=o.draggable,_=o.editable;this.text={value:d,draggable:O,x:u+r,y:p+a,editable:_}}}},{key:"setText",value:function(r){r&&sn(this.text,r)}},{key:"updateText",value:function(r){this.text=vn(vn({},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){sn(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&&Ub(t.prototype,n),e}(),Sp=Qe(Oe.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),jp=Qe(Oe.prototype,"sourceNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Pp=Qe(Oe.prototype,"targetNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ap=Qe(Oe.prototype,"startPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),kp=Qe(Oe.prototype,"endPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Mp=Qe(Oe.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Tp=Qe(Oe.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Dp=Qe(Oe.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Np=Qe(Oe.prototype,"pointsList",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cp=Qe(Oe.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rp=Qe(Oe.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ip=Qe(Oe.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Lp=Qe(Oe.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zp=Qe(Oe.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bp=Qe(Oe.prototype,"isAnimation",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fp=Qe(Oe.prototype,"isShowAdjustPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Up=Qe(Oe.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Hp=Qe(Oe.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Gp=Qe(Oe.prototype,"style",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Xp=Qe(Oe.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(Oe.prototype,"sourceNode",[c.m],Object.getOwnPropertyDescriptor(Oe.prototype,"sourceNode"),Oe.prototype),Qe(Oe.prototype,"targetNode",[c.m],Object.getOwnPropertyDescriptor(Oe.prototype,"targetNode"),Oe.prototype),Qe(Oe.prototype,"textPosition",[c.m],Object.getOwnPropertyDescriptor(Oe.prototype,"textPosition"),Oe.prototype),Qe(Oe.prototype,"setProperty",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setProperty"),Oe.prototype),Qe(Oe.prototype,"deleteProperty",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"deleteProperty"),Oe.prototype),Qe(Oe.prototype,"setProperties",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setProperties"),Oe.prototype),Qe(Oe.prototype,"changeEdgeId",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"changeEdgeId"),Oe.prototype),Qe(Oe.prototype,"setStyle",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setStyle"),Oe.prototype),Qe(Oe.prototype,"setStyles",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setStyles"),Oe.prototype),Qe(Oe.prototype,"updateStyles",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateStyles"),Oe.prototype),Qe(Oe.prototype,"formatText",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"formatText"),Oe.prototype),Qe(Oe.prototype,"resetTextPosition",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"resetTextPosition"),Oe.prototype),Qe(Oe.prototype,"moveText",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"moveText"),Oe.prototype),Qe(Oe.prototype,"setText",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setText"),Oe.prototype),Qe(Oe.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateText"),Oe.prototype),Qe(Oe.prototype,"setAnchors",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setAnchors"),Oe.prototype),Qe(Oe.prototype,"setSelected",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setSelected"),Oe.prototype),Qe(Oe.prototype,"setHovered",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setHovered"),Oe.prototype),Qe(Oe.prototype,"setHitable",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setHitable"),Oe.prototype),Qe(Oe.prototype,"openEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"openEdgeAnimation"),Oe.prototype),Qe(Oe.prototype,"closeEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"closeEdgeAnimation"),Oe.prototype),Qe(Oe.prototype,"setElementState",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setElementState"),Oe.prototype),Qe(Oe.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateStartPoint"),Oe.prototype),Qe(Oe.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"moveStartPoint"),Oe.prototype),Qe(Oe.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateEndPoint"),Oe.prototype),Qe(Oe.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"moveEndPoint"),Oe.prototype),Qe(Oe.prototype,"setZIndex",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"setZIndex"),Oe.prototype),Qe(Oe.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"initPoints"),Oe.prototype),Qe(Oe.prototype,"updateAttributes",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateAttributes"),Oe.prototype),Qe(Oe.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"getAdjustStart"),Oe.prototype),Qe(Oe.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"getAdjustEnd"),Oe.prototype),Qe(Oe.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(Oe.prototype,"updateAfterAdjustStartAndEnd"),Oe.prototype),Oe),_s=Os;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 $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 Qp(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){td(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 Hb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gb(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(){return xs=typeof Reflect!="undefined"&&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}},xs.apply(this,arguments)}function Xb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=_o(e))!==null;);return e}function Es(e,t){return Es=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Es(e,t)}function Yb(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=_o(e);if(t){var a=_o(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Vb(this,n)}}function Vb(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 ed(e)}function ed(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_o(e)}function td(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,nd,Ss=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&&Es(o,u)})(a,e);var t,n,r=Yb(a);function a(){var o;Hb(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return td(ed(o=r.call.apply(r,[this].concat(p))),"modelType",ht.LINE_EDGE),o}return t=a,(n=[{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.line;return Qp(Qp({},xs(_o(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}}}])&&Gb(t.prototype,n),a}(_s);function js(e){return js=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},js(e)}function Wb(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return rd(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 rd(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 rd(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 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 id(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){As(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 Kb(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 Zb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qb(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 ai(){return ai=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Jb(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ai.apply(this,arguments)}function Jb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Rr(e))!==null;);return e}function Ps(e,t){return Ps=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ps(e,t)}function $b(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Rr(e);if(t){var a=Rr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Qb(this,n)}}function Qb(e,t){if(t&&(js(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ui(e)}function ui(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rr(e){return Rr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Rr(e)}function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(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,p){return p(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&&Ps(o,u)})(a,e);var t,n,r=$b(a);function a(){var o;Zb(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return As(ui(o=r.call.apply(r,[this].concat(p))),"modelType",ht.POLYLINE_EDGE),As(ui(o),"draggingPointList",void 0),Kb(ui(o),"dbClickPosition",nd,ui(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=30,ai(Rr(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.polyline;return id(id({},ai(Rr(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 p=this.dbClickPosition;return{x:p.x,y:p.y}}var d=no(this.points),O=Wb(am(d),2),_=O[0],S=O[1];return{x:(_.x+S.x)/2,y:(_.y+S.y)/2}}},{key:"getAfterAnchor",value:function(o,u,p){var d,O;return p.forEach(function(_){var S;o===Mt.HORIZONTAL?S=Math.abs(u.y-_.y):o===Mt.VERTICAL&&(S=Math.abs(u.x-_.x)),(!O||O>S)&&(O=S,d=_)}),d}},{key:"getCrossPoint",value:function(o,u,p){var d;return o===Mt.HORIZONTAL?d={x:p.x,y:u.y}:o===Mt.VERTICAL&&(d={x:u.x,y:p.y}),d}},{key:"removeCrossPoints",value:function(o,u,p){var d=p.map(function(re){return re});if(o===1){var O=d[o],_=d[u],S=d[o-1];if(yd(S,O,this.sourceNode)){if(gd(O,_,this.sourceNode)){var k=vd(O,_,this.sourceNode);k&&(d[o]=k,d.splice(o-1,1),o--,u--)}}else this.sourceNode.anchors.forEach(function(re){(re.x===S.x&&re.x===O.x||re.y===S.y&&re.y===O.y)&&Jn(re.x,re.y,O.x,O.y)<Jn(S.x,S.y,O.x,O.y)&&(d[o-1]=re)})}if(u===p.length-2){var R=d[o],X=d[u],W=d[u+1];if(yd(X,W,this.targetNode)){if(gd(R,X,this.targetNode)){var oe=vd(R,X,this.targetNode);oe&&(d[u]=oe,d.splice(u+1,1))}}else this.targetNode.anchors.forEach(function(re){(re.x===W.x&&re.x===X.x||re.y===W.y&&re.y===X.y)&&Jn(re.x,re.y,X.x,X.y)<Jn(W.x,W.y,X.x,X.y)&&(d[u+1]=re)})}return d}},{key:"getDraggingPoints",value:function(o,u,p,d,O){var _=O.map(function(R){return R}),S=this.getAfterAnchor(o,p,d),k=this.getCrossPoint(o,p,S);return u==="start"?(_.unshift(k),_.unshift(S)):(_.push(k),_.push(S)),_}},{key:"updateCrossPoints",value:function(o){var u=o.map(function(me){return me}),p=o[0],d=o[1],O=o[u.length-2],_=o[u.length-1],S=this.sourceNode,k=this.targetNode,R=S.modelType,X=k.modelType,W=wa(p,d),oe=u[0];switch(R){case ht.RECT_NODE:S.radius!==0&&(Vp(p,S)||(oe=Yp(p,W,S)));break;case ht.CIRCLE_NODE:oe=vs(p,W,S);break;case ht.ELLIPSE_NODE:oe=Wp(p,W,S);break;case ht.DIAMOND_NODE:case ht.POLYGON_NODE:oe=Kp(p,W,S)}u[0]=oe;var re=wa(O,_),de=u[u.length-1];switch(X){case ht.RECT_NODE:k.radius!==0&&(Vp(_,k)||(de=Yp(_,re,k)));break;case ht.CIRCLE_NODE:de=vs(_,re,k);break;case ht.ELLIPSE_NODE:de=Wp(_,re,k);break;case ht.DIAMOND_NODE:case ht.POLYGON_NODE:de=Kp(_,re,k)}return u[u.length-1]=de,u}},{key:"getData",value:function(){var o=ai(Rr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(p){return{x:p.x,y:p.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=hd({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 p=o.start,d=o.end,O=o.startIndex,_=o.endIndex,S=o.direction,k=this.pointsList,R=k;return S===Mt.HORIZONTAL?(k[O]={x:p.x,y:p.y+u.y},k[_]={x:d.x,y:d.y+u.y},R=this.pointsList.map(function(X){return X})):S===Mt.VERTICAL&&(k[O]={x:p.x+u.x,y:p.y},k[_]={x:d.x+u.x,y:d.y},R=this.pointsList.map(function(X){return X})),this.updatePointsAfterDrag(R),this.draggingPointList=R,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},k[O]),end:Object.assign({},k[_]),startIndex:O,endIndex:_,direction:S}}},{key:"dragAppend",value:function(o,u){this.isDragging=!0;var p=o.start,d=o.end,O=o.startIndex,_=o.endIndex,S=o.direction,k=this.pointsList;if(S===Mt.HORIZONTAL){k[O]={x:p.x,y:p.y+u.y},k[_]={x:d.x,y:d.y+u.y};var R=this.pointsList.map(function(Me){return Me});if(O!==0&&_!==this.pointsList.length-1&&(R=this.removeCrossPoints(O,_,R)),O===0){var X={x:p.x,y:p.y+u.y};if(!Cr(X,this.sourceNode)){var W=this.sourceNode.anchors;R=this.getDraggingPoints(S,"start",X,W,R)}}if(_===this.pointsList.length-1){var oe={x:d.x,y:d.y+u.y};if(!Cr(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===Mt.VERTICAL){k[O]={x:p.x+u.x,y:p.y},k[_]={x:d.x+u.x,y:d.y};var de=this.pointsList.map(function(Me){return Me});if(O!==0&&_!==this.pointsList.length-1&&(de=this.removeCrossPoints(O,_,de)),O===0){var me={x:p.x+u.x,y:p.y};if(!Cr(me,this.sourceNode)){var ke=this.sourceNode.anchors;de=this.getDraggingPoints(S,"start",me,ke,de)}}if(_===this.pointsList.length-1){var Ee={x:d.x+u.x,y:d.y};if(!Cr(Ee,this.targetNode)){var He=this.targetNode.anchors;de=this.getDraggingPoints(S,"end",Ee,He,de)}}this.updatePointsAfterDrag(de),this.draggingPointList=de}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},k[O]),end:Object.assign({},k[_]),startIndex:O,endIndex:_,direction:S}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var o=dd(no(this.points));this.pointsList=o.map(function(d){return d}),this.draggingPointList=[];var u=o[0];this.startPoint=Object.assign({},u);var p=o[o.length-1];this.endPoint=Object.assign({},p)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(o){var u=this.updateCrossPoints(o);this.points=u.map(function(p){return"".concat(p.x,",").concat(p.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,p=o.endPoint,d=o.sourceNode,O=o.targetNode,_=hd({x:u.x,y:u.y},{x:p.x,y:p.y},d,O,this.offset||0);this.pointsList=_,this.initPoints()}}])&&qb(t.prototype,n),a}(_s),nd=cn(st.prototype,"dbClickPosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),cn(st.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"initPoints"),st.prototype),cn(st.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePoints"),st.prototype),cn(st.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateStartPoint"),st.prototype),cn(st.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveStartPoint"),st.prototype),cn(st.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateEndPoint"),st.prototype),cn(st.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveEndPoint"),st.prototype),cn(st.prototype,"dragAppendStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendStart"),st.prototype),cn(st.prototype,"dragAppendSimple",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendSimple"),st.prototype),cn(st.prototype,"dragAppend",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppend"),st.prototype),cn(st.prototype,"dragAppendEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendEnd"),st.prototype),cn(st.prototype,"updatePointsAfterDrag",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePointsAfterDrag"),st.prototype),cn(st.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustStart"),st.prototype),cn(st.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustEnd"),st.prototype),cn(st.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateAfterAdjustStartAndEnd"),st.prototype),st),si=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},p=Math.atan((n.y-t.y)/(n.x-t.x)),d=Math.atan(r/a),O=Math.sqrt(a*a+r*r);return o==="start"?n.x>=t.x?(u.leftX=t.x+O*Math.sin(p+d),u.leftY=t.y-O*Math.cos(p+d),u.rightX=t.x-O*Math.sin(p-d),u.rightY=t.y+O*Math.cos(p-d)):(u.leftX=t.x-O*Math.sin(p+d),u.leftY=t.y+O*Math.cos(p+d),u.rightX=t.x+O*Math.sin(p-d),u.rightY=t.y-O*Math.cos(p-d)):o==="end"&&(n.x>=t.x?(u.leftX=n.x+O*Math.sin(p-d),u.leftY=n.y-O*Math.cos(p-d),u.rightX=n.x-O*Math.sin(p+d),u.rightY=n.y+O*Math.cos(p+d)):(u.leftX=n.x-O*Math.sin(p-d),u.leftY=n.y+O*Math.cos(p-d),u.rightX=n.x+O*Math.sin(p+d),u.rightY=n.y-O*Math.cos(p+d))),u},em={x:1,y:0,z:0};function ad(e){var t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t,z:0}}function tm(e){return r=function(o,u){return o.x*u.y-o.y*u.x}(t=em,n=e),a=Math.acos(function(o,u){var p=[o.x,o.y,o.z];return[u.x,u.y,u.z].reduce(function(d,O,_){return d+O*p[_]})}(ad(t),ad(n))),r>=0?a:-a;var t,n,r,a}function ud(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 ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ud(Object(n),!0).forEach(function(r){nm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ud(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rm(e){return function(t){if(Array.isArray(t))return Ts(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||sd(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 Ms(e){return Ms=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},Ms(e)}function va(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||sd(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 sd(e,t){if(e){if(typeof e=="string")return Ts(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)?Ts(e,t):void 0}}function Ts(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 Ds=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},ba=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}},ma=function(e,t,n){var r=function(a,o){var u=Math.abs(a.x-o.centerX),p=Math.abs(a.y-o.centerY);return u/o.width>p/o.height?Mt.HORIZONTAL:Mt.VERTICAL}(n,t);return r===Mt.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}},cd=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}},ci=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(_){n.push(_.x),r.push(_.y)});var a=Math.min.apply(Math,n),o=Math.max.apply(Math,n),u=Math.min.apply(Math,r),p=Math.max.apply(Math,r),d=o-a,O=p-u;return t&&(d+=t,O+=t),{centerX:(a+o)/2,centerY:(u+p)/2,maxX:o,maxY:p,minX:a,minY:u,x:(a+o)/2,y:(u+p)/2,height:O,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}]},_a=function(e,t){var n=e.x,r=e.y;return n<t.minX||n>t.maxX||r<t.minY||r>t.maxY},Ns=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},ld=function(e,t,n,r,a){return Ns(e,t)+Ns(e,n)+function(o,u){var p=0;return u.forEach(function(d){d&&(o.x===d.x&&(p+=-2),o.y===d.y&&(p+=-2))}),p}(e,[t,n,r,a])},om=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)},li=function(e,t,n,r){var a=t.x-e.x,o=t.y-e.y,u=r.x-n.x,p=r.y-n.y,d=(-o*(e.x-n.x)+a*(e.y-n.y))/(-u*o+a*p),O=(u*(e.y-n.y)-p*(e.x-n.x))/(-u*o+a*p);return d>=0&&d<=1&&O>=0&&O<=1},fd=function(e,t,n){if(n.width===0&&n.height===0)return!1;var r=va(Oa(n),4),a=r[0],o=r[1],u=r[2],p=r[3];return li(e,t,a,o)||li(e,t,a,p)||li(e,t,o,u)||li(e,t,u,p)},im=function(e,t,n,r,a,o,u){var p=[],d=[t],O={},_={},S={};_[t.id]=0,S[t.id]=ld(t,n,t);var k={};e.forEach(function(W){k[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 ke=[];return om(ke,k,O,n.id),{v:ke}}oe=de,(re=(W=d).indexOf(oe))>-1&&W.splice(re,1),p.push(de),function(Ee,He,Me,Be){var Re=[];return Ee.forEach(function(lt){lt!==He&&(lt.x!==He.x&<.y!==He.y||fd(lt,He,Me)||fd(lt,He,Be)||Re.push(lt))}),Ds(Re)}(e,de,r,a).forEach(function(Ee){if(p.indexOf(Ee)===-1){d.indexOf(Ee)===-1&&d.push(Ee);var He=S[de.id]+Ns(de,Ee);_[Ee.id]&&He>=_[Ee.id]||(O[Ee.id]=de.id,_[Ee.id]=He,S[Ee.id]=_[Ee.id]+ld(Ee,n,t,o,u))}})};d.length;){var X=R();if(Ms(X)==="object")return X.v}return[t,n]},pd=function(e){return jn(e)},dd=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},hd=function(e,t,n,r,a){var o,u,p=pd(n),d=pd(r),O=ba(p,a),_=ba(d,a),S=ma(O,p,e),k=ma(_,d,t);if(o=O,u=_,2*Math.abs(o.centerX-u.centerX)<o.width+u.width&&2*Math.abs(o.centerY-u.centerY)<o.height+u.height){var R=um(e,t,S,k);return[e,S].concat(rm(R),[k,t])}var X=ci([S,k]),W=cd(O,X),oe=cd(_,X),re=[];re=(re=re.concat(Oa(W))).concat(Oa(oe));var de={x:(e.x+t.x)/2,y:(e.y+t.y)/2};[X,W,oe].forEach(function(ke){re=re.concat(function(Ee,He){return function(Me,Be){return Be<Me.minX||Be>Me.maxX?[]:[{x:Be,y:Me.minY},{x:Be,y:Me.maxY}]}(Ee,He.x).concat(function(Me,Be){return Be<Me.minY||Be>Me.maxY?[]:[{x:Me.minX,y:Be},{x:Me.maxX,y:Be}]}(Ee,He.y))}(ke,de).filter(function(Ee){return _a(Ee,O)&&_a(Ee,_)}))}),[{x:S.x,y:k.y},{x:k.x,y:S.y}].forEach(function(ke){_a(ke,O)&&_a(ke,_)&&re.push(ke)}),re.unshift(S),re.push(k),re=Ds(re);var me=im(re,S,k,p,d,e,t);return me.unshift(e),me.push(t),me.length>2&&(me=dd(me)),Ds(me)},am=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=Jn(n.x,n.y,r.x,r.y),o=1;o<e.length-1;o++){var u=e[o],p=e[o+1],d=Jn(u.x,u.y,p.x,p.y);d>a&&(a=d,n=u,r=p)}t=[n,r]}return t},yd=function(e,t,n){var r=Cr(e,n),a=Cr(t,n);return r&&a},gd=function(e,t,n){var r=Cr(e,n),a=Cr(t,n);return!(r&&a)&&(r||a)},vd=function(e,t,n){for(var r,a,o=jn(n),u=Oa(o),p=0;p<u.length;p++)li(e,t,u[p],u[(p+1)%u.length])&&(a=[u[p],u[(p+1)%u.length]]);return a&&(r=function(d,O,_,S){var k=(O.y-d.y)*(S.x-_.x)-(d.x-O.x)*(_.y-S.y);if(k===0)return!1;var R=((O.x-d.x)*(S.x-_.x)*(_.y-d.y)+(O.y-d.y)*(S.x-_.x)*d.x-(S.y-_.y)*(O.x-d.x)*_.x)/k,X=-((O.y-d.y)*(S.y-_.y)*(_.x-d.x)+(O.x-d.x)*(S.y-_.y)*d.y-(S.x-_.x)*(O.y-d.y)*_.y)/k;return(R-d.x)*(R-O.x)<=0&&(X-d.y)*(X-O.y)<=0&&(R-_.x)*(R-S.x)<=0&&(X-_.y)*(X-S.y)<=0&&{x:R,y:X}}(e,t,a[0],a[1])),r},wa=function(e,t){var n;return e.x===t.x?n=Mt.VERTICAL:e.y===t.y&&(n=Mt.HORIZONTAL),n},no=function(e){var t=e.split(" "),n=[];return t&&t.forEach(function(r){var a=va(r.split(","),2),o=a[0],u=a[1];n.push({x:Number(o),y:Number(u)})}),n},um=function(e,t,n,r){var a=[];if(wa(e,n)===wa(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=oi(o,e,n),p=oi(o,t,r);if(u||p)o={x:r.x,y:n.y};else{var d=bd(o,e,n),O=bd(o,t,r);d&&O&&(o={x:r.x,y:n.y})}a.push(o)}return a},bd=function(e,t,n){return e.x===t.x&&e.x===n.x||e.y===t.y&&e.y===n.y},md=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},Od=function(e){var t=e.start,n=e.end,r=e.sourceNode,a=e.targetNode,o=e.offset,u=jn(r),p=jn(a),d=ba(u,o),O=ba(p,o);return{sNext:ma(d,u,t),ePre:ma(O,p,n)}},xa=function(e){var t=e.replace(/M/g,"").replace(/C/g,",").split(",");return[Ea(t[0]),Ea(t[1]),Ea(t[2]),Ea(t[3])]},Ea=function(e){var t=va(e.replace(/(^\s*)/g,"").split(" "),2);return{x:+t[0],y:+t[1]}},_d=function(e){var t=xa(e),n=va(t,4),r=function(a,o,u,p){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)+p.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)+p.y*Math.pow(d,3)}}(.95)}(n[0],n[1],n[2],n[3]);return[r,t[3]]},wd=function(e,t){for(var n,r=e.x,a=e.y,o=no(t),u=Number.MAX_SAFE_INTEGER,p=[],d=0;d<o.length;d++)p.push({start:o[d],end:o[(d+1)%o.length]});if(p.forEach(function(k){var R=k.start,X=k.end;if(R.x===X.x){var W={x:R.x,y:a};if(oi(W,R,X)){var oe=Math.abs(R.x-r);oe<u&&(u=oe,n=W)}}else if(R.y===X.y){var re={x:r,y:R.y};if(oi(re,R,X)){var de=Math.abs(R.y-a);de<u&&(u=de,n=re)}}}),!n){var O=p[0],_=O.start,S=O.end;n={x:_.x+(S.x-_.x)/2,y:_.y+(S.y-_.y)/2}}return n},sm=function(e){return ni(e,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},xd=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))};i(204);var wo=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 Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $n=window.document;function lm(e){var t=e.onDragStart,n=t===void 0?wo:t,r=e.onDragging,a=r===void 0?wo:r,o=e.onDragEnd,u=o===void 0?wo:o,p=e.step,d=p===void 0?1:p,O=e.isStopPropagation,_=O===void 0||O,S=!1,k=!1,R=0,X=0,W=0,oe=0;function re(me){if(_&&me.stopPropagation(),k&&(S=!0,W+=me.clientX-R,oe+=me.clientY-X,R=me.clientX,X=me.clientY,Math.abs(W)>d||Math.abs(oe)>d)){var ke=W%d,Ee=oe%d,He=W-ke,Me=oe-Ee;W=ke,oe=Ee,a({deltaX:He,deltaY:Me,event:me})}}function de(me){if(_&&me.stopPropagation(),k=!1,$n.removeEventListener("mousemove",re,!1),$n.removeEventListener("mouseup",de,!1),S)return S=!1,u({event:me})}return function(me){if(me.button===0)return _&&me.stopPropagation(),k=!0,R=me.clientX,X=me.clientY,$n.addEventListener("mousemove",re,!1),$n.addEventListener("mouseup",de,!1),n({event:me})}}var fe,Ed,Sd,jd,Pd,Ad,kd,Md,Td,Dd,Nd,Cd,Rd,yr=function(){function e(r){var a=this,o=r.onDragStart,u=o===void 0?wo:o,p=r.onDragging,d=p===void 0?wo:p,O=r.onDragEnd,_=O===void 0?wo:O,S=r.eventType,k=S===void 0?"":S,R=r.eventCenter,X=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,ke=me===void 0?null:me,Ee=r.data,He=Ee===void 0?null:Ee;(function(Me,Be){if(!(Me instanceof Be))throw new TypeError("Cannot call a class as a function")})(this,e),Xt(this,"onDragStart",void 0),Xt(this,"onDragging",void 0),Xt(this,"onDragEnd",void 0),Xt(this,"step",void 0),Xt(this,"isStopPropagation",void 0),Xt(this,"isDragging",!1),Xt(this,"isStartDragging",!1),Xt(this,"startX",0),Xt(this,"startY",0),Xt(this,"sumDeltaX",0),Xt(this,"sumDeltaY",0),Xt(this,"eventType",void 0),Xt(this,"eventCenter",void 0),Xt(this,"model",void 0),Xt(this,"data",void 0),Xt(this,"startTime",void 0),Xt(this,"handleMouseDown",function(Me){var Be,Re;if(Me.button===0){a.isStopPropagation&&Me.stopPropagation(),a.isStartDragging=!0,a.startX=Me.clientX,a.startY=Me.clientY,$n.addEventListener("mousemove",a.handleMouseMove,!1),$n.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:Me,data:a.data||lt}),a.startTime=new Date().getTime()}}),Xt(this,"handleMouseMove",function(Me){if(a.isStopPropagation&&Me.stopPropagation(),a.isStartDragging&&(a.sumDeltaX+=Me.clientX-a.startX,a.sumDeltaY+=Me.clientY-a.startY,a.startX=Me.clientX,a.startY=Me.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:Me,data:a.data||Ft}),a.onDragStart({event:Me})),a.isDragging=!0,Promise.resolve().then(function(){var Wt,pn;a.onDragging({deltaX:Et,deltaY:mt,event:Me}),(Wt=a.eventCenter)===null||Wt===void 0||Wt.emit(tt["".concat(a.eventType,"_MOUSEMOVE")],{e:Me,data:a.data||Ft}),(pn=a.eventCenter)===null||pn===void 0||pn.emit(tt["".concat(a.eventType,"_DRAG")],{e:Me,data:a.data||Ft})})}}),Xt(this,"handleMouseUp",function(Me){a.isStartDragging=!1,a.isStopPropagation&&Me.stopPropagation(),Promise.resolve().then(function(){var Be,Re,lt;$n.removeEventListener("mousemove",a.handleMouseMove,!1),$n.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:Me,data:a.data||Et}),a.isDragging&&(a.isDragging=!1,a.onDragEnd({event:Me}),(lt=a.eventCenter)===null||lt===void 0||lt.emit(tt["".concat(a.eventType,"_DROP")],{e:Me,data:a.data||Et}))})}),Xt(this,"cancelDrag",function(){$n.removeEventListener("mousemove",a.handleMouseMove,!1),$n.removeEventListener("mouseup",a.handleMouseUp,!1),a.onDragEnd({event:null}),a.isDragging=!1}),this.onDragStart=u,this.onDragging=d,this.onDragEnd=_,this.step=oe,this.isStopPropagation=de,this.eventType=k,this.eventCenter=X,this.model=ke,this.data=He}var t,n;return t=e,(n=[{key:"setStep",value:function(r){this.step=r}}])&&cm(t.prototype,n),e}(),Id={node:!1,edge:!1},fm={node:!0,edge:!0};function Ld(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 Sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ld(Object(n),!0).forEach(function(r){Qn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fi(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||zd(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 xo(e){return function(t){if(Array.isArray(t))return Cs(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||zd(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 zd(e,t){if(e){if(typeof e=="string")return Cs(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)?Cs(e,t):void 0}}function Cs(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 ja(e){return ja=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},ja(e)}function Rn(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 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 Qn(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,p){return p(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 Bd,Fd=200,Ud=(fe=function(){function e(r){(function(X,W){if(!(X instanceof W))throw new TypeError("Cannot call a class as a function")})(this,e),Qn(this,"rootEl",void 0),Rn(this,"width",Ed,this),Rn(this,"height",Sd,this),Qn(this,"theme",void 0),Qn(this,"eventCenter",void 0),Qn(this,"modelMap",new Map),Qn(this,"topElement",void 0),Qn(this,"animation",void 0),Qn(this,"idGenerator",void 0),Qn(this,"edgeGenerator",void 0),Qn(this,"nodeMoveRules",[]),Rn(this,"edgeType",jd,this),Rn(this,"nodes",Pd,this),Rn(this,"edges",Ad,this),Rn(this,"overlapMode",kd,this),Rn(this,"background",Md,this),Rn(this,"transformModel",Td,this),Rn(this,"editConfigModel",Dd,this),Rn(this,"gridSize",Nd,this),Rn(this,"partial",Cd,this),Rn(this,"fakerNode",Rd,this);var a,o,u,p=r.container,d=r.background,O=d===void 0?{}:d,_=r.grid,S=r.idGenerator,k=r.edgeGenerator,R=r.animation;this.background=O,ja(_)==="object"&&(this.gridSize=_.size),this.rootEl=p,this.editConfigModel=new qf(r),this.eventCenter=new kb,this.transformModel=new Kv(this.eventCenter),this.theme=mp(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=(a=R)&&typeof a!="boolean"?bp(Dt(Id),a):Dt(a===!0?fm:Id),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=S,this.edgeGenerator=(o=this,typeof(u=k)!="function"?function(X,W,oe){return Object.assign({type:o.edgeType},oe)}:function(X,W,oe){var re=u(X,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=Nr()}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(xo(this.nodes),xo(this.edges)).reduce(function(r,a){return r[a.id]=a,r},{})}},{key:"sortElements",get:function(){var r=[];this.nodes.forEach(function(O){return r.push(O)}),this.edges.forEach(function(O){return r.push(O)}),r=r.sort(function(O,_){return O.zIndex-_.zIndex});for(var a=[],o=[-200,-200],u=[this.width+Fd,this.height+Fd],p=0;p<r.length;p++){var d=r[p];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===_t.TEXT_EDIT}),a=this.edges.find(function(o){return o.state===_t.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],p=arguments.length>4&&arguments[4]!==void 0&&arguments[4],d=[],O=[];this.nodes.forEach(function(k){return O.push(k)}),this.edges.forEach(function(k){return O.push(k)});for(var _=0;_<O.length;_++){var S=O[_];p&&!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(),p={x:a-u.left,y:o-u.top},d=fi(this.transformModel.HtmlPointToCanvasPoint([p.x,p.y]),2);return{domOverlayPosition:p,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],p=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(r.BaseType===Ht.NODE){for(var d=jn(r=r),O=d.minX,_=d.minY,S=d.maxX,k=d.maxY,R=[{x:O,y:_},{x:S,y:_},{x:S,y:k},{x:O,y:k}],X=p,W=0;W<R.length;W++){var oe=R[W],re=oe.x,de=oe.y,me=this.transformModel.CanvasPointToHtmlPoint([re,de]),ke=fi(me,2);if(re=ke[0],de=ke[1],ps([re,de],a,o)!==p){X=!p;break}}return X}if(r.BaseType===Ht.EDGE){var Ee=r=r,He=Ee.startPoint,Me=Ee.endPoint,Be=this.transformModel.CanvasPointToHtmlPoint([He.x,He.y]),Re=this.transformModel.CanvasPointToHtmlPoint([Me.x,Me.y]),lt=ps(Be,a,o),Et=ps(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=fa(r.nodes,function(o){var u=a.getModel(o.type);if(!u)throw new Error("找不到".concat(o.type,"对应的节点。"));var p=o.x,d=o.y;return p&&d&&(o.x=Dr(p,a.gridSize),o.y=Dr(d,a.gridSize),ja(o.text)==="object"&&(o.text.x-=Op(p,a.gridSize),o.text.y-=Op(d,a.gridSize))),new u(o,a)}):this.nodes=[],r.edges?this.edges=fa(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 p=!1,d=[],O=0;O<this.edges.length;O++){var _=this.edges[O];if(_.isDragging){p=!0;break}d.push(_.getHistoryData())}return!p&&{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],p=this.edges[o].sourceNodeId===r,d=this.edges[o].targetNodeId===r;(p||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===Ht.NODE&&o.nodes.push(u.getData()),u.BaseType===Ht.EDGE){var p=u.getData(),d=a.get(p.sourceNodeId)&&a.get(p.targetNodeId);(r||d)&&o.edges.push(p)}}),o}},{key:"updateAttributes",value:function(r,a){this.getElement(r).updateAttributes(a)}},{key:"changeNodeId",value:function(r,a){return a||(a=Nr()),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=Nr()),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,p=((a=this.nodesMap[r])===null||a===void 0?void 0:a.model)||((o=this.edgesMap[r])===null||o===void 0?void 0:o.model);p&&(this.overlapMode===Sn.DEFAULT&&((u=this.topElement)===null||u===void 0||u.setZIndex(),p.setZIndex(9999),this.topElement=p),this.overlapMode===Sn.INCREASE&&this.setElementZIndex(r,"top"))}},{key:"setElementZIndex",value:function(r,a){var o,u,p,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"&&(p=a),a==="top"&&(p=ms()),a==="bottom"&&(p=--Fb),d.setZIndex(p))}},{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=tn(r);u.id&&this.nodesMap[r.id]&&delete u.id;var p=this.getModel(u.type);if(!p)throw new Error("找不到".concat(u.type,"对应的节点,请确认是否已注册此类型节点。"));u.x=Dr(u.x,this.gridSize),u.y=Dr(u.y,this.gridSize);var d=new p(u,this);this.nodes.push(d);var O=d.getData(),_={data:O};return o&&(_.e=o),this.eventCenter.emit(a,_),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],p=this.nodesMap[r];if(p){var d=p.model,O=d.getMoveDistance(a,o,u),_=fi(O,2);a=_[0],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],p=this.nodesMap[r];if(p){var d=p.model,O=d.x,_=d.y,S=a-O,k=o-_;this.moveNode(r,S,k,u)}}},{key:"editText",value:function(r){this.setElementStateById(r,_t.TEXT_EDIT)}},{key:"addEdge",value:function(r){var a=tn(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 p=new u(Sa(Sa({},a),{},{type:o}),this),d=p.getData();return this.edges.push(p),this.eventCenter.emit(tt.EDGE_ADD,{data:d}),p}},{key:"moveEdge",value:function(r,a,o){for(var u=0;u<this.edges.length;u++){var p=this.edges[u],d=p.textPosition,O=d.x,_=d.y,S=this.edges[u].sourceNodeId===r,k=this.edges[u].targetNodeId===r;S&&p.moveStartPoint(a,o),k&&p.moveEndPoint(a,o),(S||k)&&this.handleEdgeTextMove(p,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 p=r.text,d=wd(p,r.points);r.moveText(d.x-p.x,d.y-p.y)}else{var O=r.textPosition,_=O.x,S=O.y;r.moveText(_-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(_t.DEFAULT)}),this.edges.forEach(function(u){u.id===r?u.setElementState(a,o):u.setElementState(_t.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===Sn.DEFAULT&&((r=this.topElement)===null||r===void 0||r.setZIndex())}},{key:"moveNodes",value:function(r,a,o){for(var u=this,p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=r.reduce(function(ke,Ee){var He=u.nodesMap[Ee].model.getMoveDistance(a,o,p);return ke[Ee]=He,ke},{}),O=0;O<this.edges.length;O++){var _=this.edges[O],S=_.textPosition,k=S.x,R=S.y,X=d[_.sourceNodeId],W=void 0,oe=void 0;if(X){var re=fi(X,2);W=re[0],oe=re[1],_.moveStartPoint(W,oe)}var de=d[_.targetNodeId];if(de){var me=fi(de,2);W=me[0],oe=me[1],_.moveEndPoint(W,oe)}(X||de)&&this.handleEdgeTextMove(_,k,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 p=this.getModel(a);if(!p)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));var d=new p(u,this);this.nodes.splice(this.nodesMap[r].index,1,d),this.getNodeEdges(r).forEach(function(O){if(O.sourceNodeId===r){var _=Zp(d,O.startPoint,d.width,d.height);O.updateStartPoint(_)}if(O.targetNodeId===r){var S=Zp(d,O.endPoint,d.width,d.height);O.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 p=this.getModel(a);if(!p)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));delete u.pointsList;var d=new p(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=mp(Sa(Sa({},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 k=S.x,R=S.y,X=S.width,W=S.height,oe=S.getNodeStyle().strokeWidth,re=oe===void 0?0:oe;a=a.concat([k+X/2+re,k-X/2-re]),o=o.concat([R+W/2+re,R-W/2-re])});var u=Math.min.apply(Math,xo(a)),p=Math.max.apply(Math,xo(a)),d=Math.min.apply(Math,xo(o)),O=p-u||0,_=Math.max.apply(Math,xo(o))-d||0;return{virtualRectWidth:O,virtualRectHeight:_,virtualRectCenterPositionX:u+O/2,virtualRectCenterPositionY:d+_/2}}},{key:"translateCenter",value:function(){var r=this.nodes,a=this.width,o=this.height,u=this.rootEl,p=this.transformModel;if(r.length){var d=a||u.clientWidth,O=o||u.clientHeight,_=this.getVirtualRectSize(),S=_.virtualRectCenterPositionX,k=_.virtualRectCenterPositionY;p.focusOn(S,k,d,O)}}},{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,p=this.height,d=this.rootEl,O=this.transformModel;if(o.length){var _=u||d.clientWidth,S=p||d.clientHeight,k=this.getVirtualRectSize(),R=k.virtualRectWidth,X=k.virtualRectHeight,W=k.virtualRectCenterPositionX,oe=k.virtualRectCenterPositionY,re=(R+a)/_,de=(X+r)/S,me=0;me=1/Math.max(re,de);var ke=[_/2,S/2];O.zoom(me,ke),O.focusOn(W,oe,_,S)}}},{key:"openEdgeAnimation",value:function(r){this.getEdgeModelById(r).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(r){this.getEdgeModelById(r).closeEdgeAnimation()}}],n&&pm(t.prototype,n),e}(),Ed=We(fe.prototype,"width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Sd=We(fe.prototype,"height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),jd=We(fe.prototype,"edgeType",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Pd=We(fe.prototype,"nodes",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ad=We(fe.prototype,"edges",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),kd=We(fe.prototype,"overlapMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sn.DEFAULT}}),Md=We(fe.prototype,"background",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Td=We(fe.prototype,"transformModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Dd=We(fe.prototype,"editConfigModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Nd=We(fe.prototype,"gridSize",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Cd=We(fe.prototype,"partial",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rd=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),dm=Ud;function Rs(e){return Rs=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},Rs(e)}function Is(){return Is=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},Is.apply(this,arguments)}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 Ls(e,t){return Ls=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ls(e,t)}function ym(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Pa(e);if(t){var a=Pa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return gm(this,n)}}function gm(e,t){if(t&&(Rs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return er(e)}function er(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pa(e){return Pa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Pa(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 Hd,vm=Gn(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&&Ls(o,u)})(a,e);var t,n,r=ym(a);function a(o){var u;(function(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),gr(er(u=r.call(this)),"stepDrag",void 0),gr(er(u),"stepScrollX",0),gr(er(u),"stepScrollY",0),gr(er(u),"onDragging",function(_){var S=_.deltaX,k=_.deltaY;u.setState({isDragging:!0});var R=u.props.graphModel,X=R.transformModel;R.editConfigModel.stopMoveGraph||X.translate(S,k)}),gr(er(u),"onDragEnd",function(){u.setState({isDragging:!1})}),gr(er(u),"zoomHandler",function(_){var S=u.props,k=S.graphModel,R=k.editConfigModel,X=k.transformModel,W=k.gridSize,oe=S.graphModel,re=_.deltaX,de=_.deltaY;if(R.stopScrollGraph||_.ctrlKey===!0){if(!R.stopZoomGraph){_.preventDefault();var me=oe.getPointByClient({x:_.clientX,y:_.clientY}).canvasOverlayPosition,ke=me.x,Ee=me.y;X.zoom(_.deltaY<0,[ke,Ee])}}else{if(_.preventDefault(),u.stepScrollX+=re,u.stepScrollY+=de,Math.abs(u.stepScrollX)>=W){var He=u.stepScrollX%W,Me=u.stepScrollX-He;X.translate(-Me*X.SCALE_X,0),u.stepScrollX=He}if(Math.abs(u.stepScrollY)>=W){var Be=u.stepScrollY%W,Re=u.stepScrollY-Be;X.translate(0,-Re*X.SCALE_Y),u.stepScrollY=Be}}}),gr(er(u),"clickHandler",function(_){if(_.target.getAttribute("name")==="canvas-overlay"){var S=u.props.graphModel;S.selectElements.size>0&&S.clearSelectElements(),S.eventCenter.emit(tt.BLANK_CLICK,{e:_})}}),gr(er(u),"handleContextMenu",function(_){if(_.target.getAttribute("name")==="canvas-overlay"){_.preventDefault();var S=u.props.graphModel,k=S.getPointByClient({x:_.clientX,y:_.clientY});S.eventCenter.emit(tt.BLANK_CONTEXTMENU,{e:_,position:k})}}),gr(er(u),"mouseDownHandler",function(_){var S=u.props.graphModel,k=S.eventCenter,R=S.editConfigModel,X=S.transformModel.SCALE_X,W=S.gridSize,oe=_.target,re=!R.adjustEdge&&!R.adjustNodePosition;(oe.getAttribute("name")==="canvas-overlay"||re)&&(R.stopMoveGraph?k.emit(tt.BLANK_MOUSEDOWN,{e:_}):(u.stepDrag.setStep(W*X),u.stepDrag.handleMouseDown(_)),u.clickHandler(_))});var p=o.graphModel,d=p.gridSize,O=p.eventCenter;return u.stepDrag=new yr({onDragging:u.onDragging,onDragEnd:u.onDragEnd,step:d,eventType:"BLANK",isStopPropagation:!1,eventCenter:O,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,p=u.children,d=u.dnd,O=this.state.isDragging;return Object(te.g)("svg",Is({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:O?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},d.eventMap()),Object(te.g)("g",{transform:o},p))}}])&&hm(t.prototype,n),a}(te.a))||Bd;function zs(e){return zs=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},zs(e)}function bm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mm(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 Bs(e,t){return Bs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bs(e,t)}function Om(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 _m(this,n)}}function _m(e,t){if(t&&(zs(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 wm=Gn(Hd=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&&Bs(o,u)})(a,e);var t,n,r=Om(a);function a(){return bm(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,p=o.graphModel,d=u.getTools().map(function(O){return Object(te.g)(O,{graphModel:p,logicFlow:u.instance})});return u.components=d,d}},{key:"triggerToolRender",value:function(){var o=this.props,u=o.tool,p=o.graphModel,d=document.querySelector("#ToolOverlay_".concat(p.flowId)),O=u.getInstance();O.components.forEach(function(_){return _(O,d)}),O.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())}}])&&mm(t.prototype,n),a}(te.a))||Hd;function Fs(e){return Fs=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},Fs(e)}function xm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Em(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 Us(e,t){return Us=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Us(e,t)}function Sm(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 jm(this,n)}}function jm(e,t){if(t&&(Fs(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 ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ka(e)}var Gd,Pm=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&&Us(o,u)})(a,e);var t,n,r=Sm(a);function a(){return xm(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"}))}}])&&Em(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 Am(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function km(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 Gs(e,t){return Gs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Gs(e,t)}function Mm(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 Xd(e)}function Xd(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 Dm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yd=Gn(Gd=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&&Gs(o,u)})(a,e);var t,n,r=Mm(a);function a(){var o;Am(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return Dm(Xd(o=r.call.apply(r,[this].concat(p))),"id",Nr()),o}return t=a,(n=[{key:"renderDot",value:function(){var o=this.props,u=o.config,p=u.color,d=u.thickness,O=d===void 0?2:d,_=o.size,S=o.visible,k=Math.min(Math.max(2,O),_/2),R=1;return S||(R=0),Object(te.g)("rect",{width:k,height:k,rx:k/2,ry:k/2,fill:p,opacity:R})}},{key:"renderMesh",value:function(){var o=this.props,u=o.config,p=u.color,d=u.thickness,O=d===void 0?1:d,_=o.size,S=o.visible,k=Math.min(Math.max(1,O),_/2),R="M ".concat(_," 0 H0 M0 0 V0 ").concat(_),X=1;return S||(X=0),Object(te.g)("path",{d:R,stroke:p,strokeWidth:k,opacity:X})}},{key:"render",value:function(){var o=this.props,u=o.type,p=o.size,d=o.graphModel.transformModel,O=[d.SCALE_X,d.SKEW_Y,d.SKEW_X,d.SCALE_Y,d.TRANSLATE_X,d.TRANSLATE_Y].join(","),_="matrix(".concat(O,")");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:_,x:"0",y:"0",width:p,height:p},u==="dot"&&this.renderDot(),u==="mesh"&&this.renderMesh())),Object(te.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&km(t.prototype,n),a}(te.a))||Gd;Yd.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},i(52);function Xs(e){return Xs=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},Xs(e)}function Nm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Vd(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 Vd(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 Vd(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 Wd,Eo=function(e){var t={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(n){var r=Nm(n,2),a=r[0],o=r[1];(a==="style"||Xs(o)!=="object")&&(t[a]=o)}),Object(te.g)("line",t)};function Ys(e){return Ys=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},Ys(e)}function Kd(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 Ta(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kd(Object(n),!0).forEach(function(r){Cm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Im(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 Vs(e,t){return Vs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Vs(e,t)}function Lm(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Da(e);if(t){var a=Da(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return zm(this,n)}}function zm(e,t){if(t&&(Ys(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 Da(e){return Da=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(e)}var Zd,Bm=Gn(Wd=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&&Vs(o,u)})(a,e);var t,n,r=Lm(a);function a(){return Rm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var o=this.props.snaplineModel,u=o.position,p=o.isShowHorizontal,d=o.isShowVertical,O=o.getStyle(),_=u.x,S=_===void 0?0:_,k=u.y,R=k===void 0?0:k,X=Ta(Ta({x1:-1e5,y1:R,x2:1e5,y2:R},O),{},{stroke:p?O.stroke:"none"}),W=Ta(Ta({x1:S,y1:-1e5,x2:S,y2:1e5},O),{},{stroke:d?O.stroke:"none"});return Object(te.g)("g",{className:"lf-snapline"},Object(te.g)(Eo,X),Object(te.g)(Eo,W))}}])&&Im(t.prototype,n),a}(te.a))||Wd;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 Fm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return qd(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 qd(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 qd(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 Ir(e){var t=e.x,n=e.y,r=e.width,a=e.height,o=e.className,u=e.radius,p=t-r/2,d=n-a/2,O={};return Object.entries(e).forEach(function(_){var S=Fm(_,2),k=S[0],R=S[1];Ws(R)!=="object"&&(O[k]=R)}),O.className=o?"lf-basic-shape ".concat(o):"lf-basic-shape",u&&(O.rx=u,O.ry=u),O.x=p,O.y=d,Object(te.g)("rect",O)}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 So(){return So=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},So.apply(this,arguments)}function Jd(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 $d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(n),!0).forEach(function(r){Um(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Um(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gm(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 Xm(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 Ym(this,n)}}function Ym(e,t){if(t&&(Ks(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)}Ir.defaultProps={className:"",radius:""};var Qd,Vm=Gn(Zd=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=Xm(a);function a(){return Hm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getNodesOutline",value:function(){var o=this.props.graphModel,u=o.nodes,p=o.editConfigModel,d=p.hoverOutline,O=p.nodeSelectedOutline,_=[];return u.forEach(function(S){if(S.isHovered||S.isSelected){var k=S.isHovered,R=S.isSelected,X=S.x,W=S.y,oe=S.width,re=S.height;if(O&&R||d&&k){var de=S.getOutlineStyle(),me={};if(Object.keys(de).forEach(function(Ee){Ee!=="hover"&&(me[Ee]=de[Ee])}),k){var ke=de.hover;me=$d($d({},me),ke)}_.push(Object(te.g)(Ir,So({className:"lf-outline-node",x:X,y:W,width:oe+10,height:re+10},me)))}}}),_}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,u=o.edges,p=o.editConfigModel,d=p.edgeSelectedOutline,O=p.hoverOutline,_=[],S=0;S<u.length;S++){var k=u[S];(d&&k.isSelected||O&&k.isHovered)&&(k.modelType===ht.LINE_EDGE?_.push(this.getLineOutline(k)):k.modelType===ht.POLYLINE_EDGE?_.push(this.getPolylineOutline(k)):k.modelType===ht.BEZIER_EDGE&&_.push(this.getBezierOutline(k)))}return _}},{key:"getLineOutline",value:function(o){var u=o.startPoint,p=o.endPoint,d=(u.x+p.x)/2,O=(u.y+p.y)/2,_=Math.abs(u.x-p.x)+10,S=Math.abs(u.y-p.y)+10,k=o.getOutlineStyle();return Object(te.g)(Ir,So({className:"lf-outline-edge",x:d,y:O,width:_,height:S},k))}},{key:"getPolylineOutline",value:function(o){var u=o.points,p=no(u),d=ci(p,8),O=d.x,_=d.y,S=d.width,k=d.height,R=o.getOutlineStyle();return Object(te.g)(Ir,So({className:"lf-outline",x:O,y:_,width:S,height:k},R))}},{key:"getBezierOutline",value:function(o){var u=o.path,p=xa(u),d=ci(p,8),O=d.x,_=d.y,S=d.width,k=d.height,R=o.getOutlineStyle();return Object(te.g)(Ir,So({className:"lf-outline",x:O,y:_,width:S,height:k},R))}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&Gm(t.prototype,n),a}(te.a))||Zd;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 Wm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return eh(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 eh(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 eh(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 pi(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,p=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(O){var _=Wm(O,2),S=_[0],k=_[1];qs(k)!=="object"&&(d[S]=k)}),d.className=p?"lf-basic-shape ".concat(p):"lf-basic-shape",Object(te.g)("circle",d)}function Js(e){return Js=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},Js(e)}function Km(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return th(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 th(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 th(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 di(){return di=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},di.apply(this,arguments)}function nh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rh(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 oh(e,t,n){return t&&rh(e.prototype,t),n&&rh(e,n),e}function ih(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&&$s(e,t)}function $s(e,t){return $s=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$s(e,t)}function ah(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Ra(e);if(t){var a=Ra(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Zm(this,n)}}function Zm(e,t){if(t&&(Js(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ca(e)}function Ca(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ra(e){return Ra=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(e)}function Qs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uh,sh=function(e){ih(n,e);var t=ah(n);function n(){var r;return nh(this,n),Qs(Ca(r=t.call(this)),"dragHandler",void 0),Qs(Ca(r),"onDragging",function(a){var o=a.event,u=r.props,p=u.graphModel,d=u.bezierModel,O=u.type,_=p.getPointByClient({x:o.clientX,y:o.clientY}).canvasOverlayPosition,S=_.x,k=_.y;d.updateAdjustAnchor({x:S,y:k},O)}),Qs(Ca(r),"onDragEnd",function(){r.props.bezierModel.isDragging=!1}),r.dragHandler=new yr({onDragging:r.onDragging,onDragEnd:r.onDragEnd}),r}return oh(n,[{key:"render",value:function(){var r=this,a=this.props.position,o=a.x,u=a.y,p=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(te.g)(pi,di({className:"lf-bezier-adjust-anchor",x:o,y:u},p,{onMouseDown:function(d){r.dragHandler.handleMouseDown(d)}}))}}]),n}(te.a),qm=Gn(Qd=function(e){ih(n,e);var t=ah(n);function n(){return nh(this,n),t.apply(this,arguments)}return oh(n,[{key:"getBezierAdjust",value:function(r,a){var o=r.path,u=r.id,p=Km(xa(o),4),d=p[0],O=p[1],_=p[2],S=p[3],k=r.getEdgeStyle().adjustLine,R=[];return R.push(Object(te.g)(Eo,di({x1:d.x,y1:d.y,x2:O.x,y2:O.y},k))),R.push(Object(te.g)(sh,{position:O,bezierModel:r,graphModel:a,key:"".concat(u,"_ePre"),type:"sNext"})),R.push(Object(te.g)(Eo,di({x1:S.x,y1:S.y,x2:_.x,y2:_.y},k))),R.push(Object(te.g)(sh,{position:_,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 p=a[u];p.isSelected&&p.modelType===ht.BEZIER_EDGE&&p.draggable&&o.push(this.getBezierAdjust(p,r))}return o}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(te.a))||Qd;function ec(e){return ec=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},ec(e)}function Jm(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 tc(e,t){return tc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},tc(e,t)}function Qm(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 e0(this,n)}}function e0(e,t){if(t&&(ec(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 Ia(e){return Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ia(e)}var ch,t0=Gn(uh=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&&tc(o,u)})(a,e);var t,n,r=Qm(a);function a(){return Jm(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))}}])&&$m(t.prototype,n),a}(te.a))||uh;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 rc(){return rc=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},rc.apply(this,arguments)}function n0(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 oc(e,t){return oc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},oc(e,t)}function o0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 i0(this,n)}}function i0(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 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 a0=Gn(ch=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=o0(a);function a(){return n0(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getComponent",value:function(o,u){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",d=this.props.getView,O=d(o.type);return Object(te.g)(O,{key:o.id,model:o,graphModel:u,overlay:p})}},{key:"render",value:function(){var o=this,u=this.props,p=u.graphModel,d=u.tool,O=u.options,_=u.dnd,S=u.snaplineModel,k={};O.width&&(k.width="".concat(p.width,"px")),O.height&&(k.height="".concat(p.height,"px"));var R=O.grid,X=p.fakerNode,W=p.editConfigModel.adjustEdge;return Object(te.g)("div",{className:"lf-graph","flow-id":p.flowId,style:k},Object(te.g)(vm,{graphModel:p,dnd:_},Object(te.g)("g",{className:"lf-base"},fa(p.sortElements,function(oe){return o.getComponent(oe,p)})),X?this.getComponent(X,p):""),Object(te.g)(t0,{graphModel:p},Object(te.g)(Vm,{graphModel:p}),W?Object(te.g)(qm,{graphModel:p}):"",O.snapline!==!1?Object(te.g)(Bm,{snaplineModel:S}):""),Object(te.g)(wm,{graphModel:p,tool:d}),O.background&&Object(te.g)(Pm,{background:O.background}),O.grid&&Object(te.g)(Yd,rc({},R,{graphModel:p})))}}],n&&r0(t.prototype,n),a}(te.a))||ch,u0=a0;function lh(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 za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(n),!0).forEach(function(r){vr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s0(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 c0=function(){function e(r){var a=this;(function(u,p){if(!(u instanceof p))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(za(za({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY}))))}),vr(this,"onDragOver",function(u){if(u.preventDefault(),a.fakerNode){var p=a.clientToLocalPoint({x:u.clientX,y:u.clientY}),d=p.x,O=p.y;a.fakerNode.moveTo(d,O);var _=a.fakerNode.getData();a.lf.setNodeSnapLine(_),a.lf.graphModel.eventCenter.emit(tt.NODE_DND_DRAG,{data:_})}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(za(za({},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=xf(this.lf.options,["grid","size"]),p=this.lf.graphModel.getPointByClient({x:a,y:o}).canvasOverlayPosition,d=p.x,O=p.y;return{x:Dr(d,u),y:Dr(O,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}}}])&&s0(t.prototype,n),e}();function fh(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=sn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),sn({},dh,e)}var bt,ph,dh={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function ic(e){return ic=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},ic(e)}function ac(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(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 yh(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?yh(Object(n),!0).forEach(function(r){gh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l0(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 p0(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 hi(){return hi=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=d0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},hi.apply(this,arguments)}function d0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Lr(e))!==null;);return e}function uc(e,t){return uc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},uc(e,t)}function h0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 y0(this,n)}}function y0(e,t){if(t&&(ic(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fa(e)}function Fa(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 gh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fn(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,p){return p(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 sc=(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&&uc(o,u)})(a,e);var t,n,r=h0(a);function a(){var o;f0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return gh(Fa(o=r.call.apply(r,[this].concat(p))),"modelType",ht.BEZIER_EDGE),l0(Fa(o),"path",ph,Fa(o)),o}return t=a,(n=[{key:"initEdgeData",value:function(o){this.offset=100,hi(Lr(a.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.bezier;return Ba(Ba({},hi(Lr(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(p){var d=p.x,O=p.y;o+=d,u+=O}),{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=hi(Lr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(p){return{x:p.x,y:p.y}});return Ba(Ba({},o),{},{pointsList:u})}},{key:"getControls",value:function(){var o=this.startPoint,u=this.endPoint;return Od({start:o,end:u,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(o){var u=ac(o,4),p=u[0],d=u[1],O=u[2],_=u[3];return"M ".concat(p.x," ").concat(p.y,`
C `).concat(d.x," ").concat(d.y,`,
`).concat(O.x," ").concat(O.y,`,
`).concat(_.x," ").concat(_.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,p=o.ePre;this.updatePath(u,p)}},{key:"updatePath",value:function(o,u){o=Dt(o),u=Dt(u);var p={x:this.startPoint.x,y:this.startPoint.y},d={x:this.endPoint.x,y:this.endPoint.y};if(!o||!u){var O=this.getControls();o=O.sNext,u=O.ePre}this.pointsList=[p,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 p=ac(this.pointsList,3),d=p[1],O=p[2];d.x+=o,d.y+=u,this.updatePath(d,O)}},{key:"moveEndPoint",value:function(o,u){this.endPoint.x+=o,this.endPoint.y+=u;var p=ac(this.pointsList,3),d=p[1],O=p[2];O.x+=o,O.y+=u,this.updatePath(d,O)}},{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,p=o.endPoint,d=o.sourceNode,O=o.targetNode,_=Od({start:u,end:p,sourceNode:d,targetNode:O,offset:this.offset}),S=_.sNext,k=_.ePre;this.pointsList=[u,S,k,p],this.initPoints()}}])&&p0(t.prototype,n),a}(_s),ph=Fn(bt.prototype,"path",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Fn(bt.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"initPoints"),bt.prototype),Fn(bt.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updatePoints"),bt.prototype),Fn(bt.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateStartPoint"),bt.prototype),Fn(bt.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateEndPoint"),bt.prototype),Fn(bt.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveStartPoint"),bt.prototype),Fn(bt.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveEndPoint"),bt.prototype),Fn(bt.prototype,"updateAdjustAnchor",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAdjustAnchor"),bt.prototype),Fn(bt.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustStart"),bt.prototype),Fn(bt.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustEnd"),bt.prototype),Fn(bt.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAfterAdjustStartAndEnd"),bt.prototype),bt),Ne,vh,bh,mh,Oh,_h,wh,xh,Eh,Sh,jh,Ph,Ah,kh,Mh,Th,Dh,Nh,Ch,Rh,g0=function(e){return e==null};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 v0(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(d,O){if(d){if(typeof d=="string")return Ih(d,O);var _=Object.prototype.toString.call(d).slice(8,-1);if(_==="Object"&&d.constructor&&(_=d.constructor.name),_==="Map"||_==="Set")return Array.from(d);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return Ih(d,O)}}(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,p=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return u=d.done,d},e:function(d){p=!0,o=d},f:function(){try{u||n.return==null||n.return()}finally{if(p)throw o}}}}function Ih(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 Lh(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 ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lh(Object(n),!0).forEach(function(r){bn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(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 b0(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 bn(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,p){return p(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,zh,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),bn(this,"id",""),Vt(this,"type",vh,this),Vt(this,"x",bh,this),Vt(this,"y",mh,this),Vt(this,"text",Oh,this),Vt(this,"properties",_h,this),Vt(this,"_width",wh,this),Vt(this,"_height",xh,this),Vt(this,"anchorsOffset",Eh,this),Vt(this,"isSelected",Sh,this),Vt(this,"isHovered",jh,this),Vt(this,"isShowAnchor",Ph,this),Vt(this,"isDragging",Ah,this),Vt(this,"isHitable",kh,this),Vt(this,"draggable",Mh,this),Vt(this,"visible",Th,this),bn(this,"virtual",!1),bn(this,"graphModel",void 0),Vt(this,"zIndex",Dh,this),Vt(this,"state",Nh,this),Vt(this,"autoToFront",Ch,this),Vt(this,"style",Rh,this),bn(this,"BaseType",Ht.NODE),bn(this,"modelType",ht.NODE),bn(this,"additionStateData",void 0),bn(this,"targetRules",[]),bn(this,"sourceRules",[]),bn(this,"moveRules",[]),bn(this,"hasSetTargetRules",!1),bn(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||Nr()}this.formatText(r),sn(this,function(p){return ni(p,["id","type","x","y","text","properties","virtual"])}(r)),this.graphModel.overlapMode===Sn.INCREASE&&(this.zIndex=r.zIndex||ms())}},{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,p=this.properties;Object(c.x)(p)&&(p=Object(c.I)(p));var d={id:this.id,type:this.type,x:this.x,y:this.y,properties:p};return this.graphModel.overlapMode===Sn.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 ln(ln({},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 p=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var d,O=!0,_=0;_<p.length;_++){var S=p[_];if(!S.validate.call(this,this,r,a,o,u)){O=!1,d=S.message;break}}return{isAllPass:O,msg:d}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(r,a,o,u){var p=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var d,O=!0,_=0;_<p.length;_++){var S=p[_];if(!S.validate.call(this,r,this,a,o,u)){O=!1,d=S.message;break}}return{isAllPass:O,msg:d}}},{key:"isAllowMoveNode",value:function(r,a){var o,u=!0,p=!0,d=v0(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(d.s();!(o=d.n()).done;){var O=(0,o.value)(this,r,a);if(!O)return!1;if(cc(O)==="object"){var _=O;if(_.x===!1&&_.y===!1)return!1;u=u&&_.x,p=p&&_.y}}}catch(S){d.e(S)}finally{d.f()}return{x:u,y:p}}},{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(p,d){return p.length?(p=p,{id:"".concat(a,"_").concat(d),x:o+p[0],y:u+p[1]}):ln(ln({},p=p),{},{x:o+p.x,y:u+p.y,id:p.id||"".concat(a,"_").concat(d)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(r){return function(a,o){for(var u,p=gs(o),d=Number.MAX_SAFE_INTEGER,O=0;O<p.length;O++){var _=Jn(a.x,a.y,p[O].x,p[O].y);_<d&&(d=_,u={index:O,anchor:Ep(Ep({},p[O]),{},{x:p[O].x,y:p[O].y,id:p[O].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(!g0(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,p=!1;if(o)u=!0,p=!0;else{var d=this.isAllowMoveNode(r,a);typeof d=="boolean"?(u=d,p=d):(u=d.x,p=d.y)}if(u){var O=this.x+r;this.x=O,this.text&&this.moveText(r,0)}if(p){var _=this.y+a;this.y=_,this.text&&this.moveText(0,a)}return u||p}},{key:"getMoveDistance",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,p=!1,d=0,O=0;if(o)u=!0,p=!0;else{var _=this.isAllowMoveNode(r,a);typeof _=="boolean"?(u=_,p=_):(u=_.x,p=_.y)}if(u&&r){var S=this.x+r;this.x=S,this.text&&this.moveText(r,0),d=r}if(p&&a){var k=this.y+a;this.y=k,this.text&&this.moveText(0,a),O=a}return[d,O]}},{key:"moveTo",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=r-this.x,p=a-this.y;return!(!o&&!this.isAllowMoveNode(u,p)||(this.text&&this.text&&this.moveText(u,p),this.x=r,this.y=a,0))}},{key:"moveText",value:function(r,a){var o=this.text,u=o.x,p=o.y,d=o.value,O=o.draggable,_=o.editable;this.text={value:d,editable:_,draggable:O,x:u+r,y:p+a}}},{key:"updateText",value:function(r){this.text=ln(ln({},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=ln(ln({},Object(c.I)(this.properties)),{},bn({},r,tn(a))),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=ln(ln({},Object(c.I)(this.properties)),tn(r)),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setStyle",value:function(r,a){this.style=ln(ln({},this.style),{},bn({},r,tn(a)))}},{key:"setStyles",value:function(r){this.style=ln(ln({},this.style),tn(r))}},{key:"updateStyles",value:function(r){this.style=ln({},tn(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){sn(this,r)}}],n&&b0(t.prototype,n),e}(),vh=pt(Ne.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),bh=pt(Ne.prototype,"x",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),mh=pt(Ne.prototype,"y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Oh=pt(Ne.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),_h=pt(Ne.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),wh=pt(Ne.prototype,"_width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),xh=pt(Ne.prototype,"_height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Eh=pt(Ne.prototype,"anchorsOffset",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Sh=pt(Ne.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),jh=pt(Ne.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ph=pt(Ne.prototype,"isShowAnchor",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ah=pt(Ne.prototype,"isDragging",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),kh=pt(Ne.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Mh=pt(Ne.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Th=pt(Ne.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Dh=pt(Ne.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Nh=pt(Ne.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ch=pt(Ne.prototype,"autoToFront",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Rh=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 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 Bh(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 Fh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(n),!0).forEach(function(r){Uh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m0(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 O0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _0(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 fc(){return fc=typeof Reflect!="undefined"&&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}},fc.apply(this,arguments)}function w0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=jo(e))!==null;);return e}function pc(e,t){return pc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},pc(e,t)}function x0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=jo(e);if(t){var a=jo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return E0(this,n)}}function E0(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 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 jo(e){return jo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jo(e)}function Uh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dc(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,p){return p(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 nn,Hh,Gh,hc=(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&&pc(o,u)})(a,e);var t,n,r=x0(a);function a(){var o;O0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return Uh(Ua(o=r.call.apply(r,[this].concat(p))),"modelType",ht.CIRCLE_NODE),m0(Ua(o),"r",zh,Ua(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=fc(jo(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.circle;return Fh(Fh({},o),Dt(u))}},{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,p=this.r;return[{x:o,y:u-p,id:"".concat(this.id,"_0")},{x:o+p,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+p,id:"".concat(this.id,"_2")},{x:o-p,y:u,id:"".concat(this.id,"_3")}]}}])&&_0(t.prototype,n),a}(mr),zh=dc(br.prototype,"r",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),dc(br.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(br.prototype,"width"),br.prototype),dc(br.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(br.prototype,"height"),br.prototype),br);i(127);function yc(e){return yc=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},yc(e)}function gc(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Xh(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 Xh(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 Xh(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 Yh(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 Vh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yh(Object(n),!0).forEach(function(r){Kh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wh(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 S0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j0(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(){return vc=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=P0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},vc.apply(this,arguments)}function P0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ao(e))!==null;);return e}function bc(e,t){return bc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},bc(e,t)}function A0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Ao(e);if(t){var a=Ao(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return k0(this,n)}}function k0(e,t){if(t&&(yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Po(e)}function Po(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ao(e){return Ao=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ao(e)}function Kh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ko(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,p){return p(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 tr,Zh,qh,mc=(nn=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&&bc(o,u)})(a,e);var t,n,r=A0(a);function a(){var o;S0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return Kh(Po(o=r.call.apply(r,[this].concat(p))),"modelType",ht.DIAMOND_NODE),Wh(Po(o),"rx",Hh,Po(o)),Wh(Po(o),"ry",Gh,Po(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=vc(Ao(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.diamond;return Vh(Vh({},o),Dt(u))}},{key:"points",get:function(){var o=this.x,u=this.y,p=this.rx,d=this.ry;return[[o,u-d],[o+p,u],[o,u+d],[o-p,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(p){var d=gc(p,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(p){var d=gc(p,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,p){var d=gc(u,2);return{x:d[0],y:d[1],id:"".concat(o.id,"_").concat(p)}})}}])&&j0(t.prototype,n),a}(mr),Hh=ko(nn.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Gh=ko(nn.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),ko(nn.prototype,"points",[c.m],Object.getOwnPropertyDescriptor(nn.prototype,"points"),nn.prototype),ko(nn.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(nn.prototype,"pointsPosition"),nn.prototype),ko(nn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(nn.prototype,"width"),nn.prototype),ko(nn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(nn.prototype,"height"),nn.prototype),nn);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 Jh(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 $h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jh(Object(n),!0).forEach(function(r){ey(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jh(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 M0(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!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=D0(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 D0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=To(e))!==null;);return e}function wc(e,t){return wc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},wc(e,t)}function N0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 C0(this,n)}}function C0(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 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 To(e){return To=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},To(e)}function ey(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ha(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,p){return p(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 In,ty,xc=(tr=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&&wc(o,u)})(a,e);var t,n,r=N0(a);function a(){var o;M0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return ey(Mo(o=r.call.apply(r,[this].concat(p))),"modelType",ht.ELLIPSE_NODE),Qh(Mo(o),"rx",Zh,Mo(o)),Qh(Mo(o),"ry",qh,Mo(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=_c(To(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.ellipse;return $h($h({},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,p=this.rx,d=this.ry;return[{x:o,y:u-d,id:"".concat(this.id,"_0")},{x:o+p,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d,id:"".concat(this.id,"_2")},{x:o-p,y:u,id:"".concat(this.id,"_3")}]}}])&&T0(t.prototype,n),a}(mr),Zh=Ha(tr.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),qh=Ha(tr.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Ha(tr.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(tr.prototype,"width"),tr.prototype),Ha(tr.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(tr.prototype,"height"),tr.prototype),tr);function Ec(e){return Ec=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},Ec(e)}function Sc(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return ny(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 ny(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 ny(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 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 oy(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){iy(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 R0(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 I0(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 jc(){return jc=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=z0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},jc.apply(this,arguments)}function z0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Do(e))!==null;);return e}function Pc(e,t){return Pc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Pc(e,t)}function B0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 F0(this,n)}}function F0(e,t){if(t&&(Ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ga(e)}function Ga(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 iy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xa(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,p){return p(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 Ac,ay,kc=(In=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&&Pc(o,u)})(a,e);var t,n,r=B0(a);function a(){var o;I0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return iy(Ga(o=r.call.apply(r,[this].concat(p))),"modelType",ht.POLYGON_NODE),R0(Ga(o),"points",ty,Ga(o)),o}return t=a,(n=[{key:"getNodeStyle",value:function(){var o=jc(Do(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.polygon;return oy(oy({},o),Dt(u))}},{key:"pointsPosition",get:function(){var o=this.x,u=this.y,p=this.width,d=this.height;return this.points.map(function(O){return{x:O[0]+o-p/2,y:O[1]+u-d/2}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(p){var d=Sc(p,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(p){var d=Sc(p,2)[1];d<o&&(o=d),d>u&&(u=d)}),u-o}},{key:"getDefaultAnchor",value:function(){var o=this,u=this.x,p=this.y,d=this.width,O=this.height;return this.points.map(function(_,S){var k=Sc(_,2),R=k[0],X=k[1];return{x:u+R-d/2,y:p+X-O/2,id:"".concat(o.id,"_").concat(S)}})}}])&&L0(t.prototype,n),a}(mr),ty=Xa(In.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Xa(In.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(In.prototype,"pointsPosition"),In.prototype),Xa(In.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(In.prototype,"width"),In.prototype),Xa(In.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(In.prototype,"height"),In.prototype),In);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 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){cy(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 U0(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 H0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 Tc(){return Tc=typeof Reflect!="undefined"&&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}},Tc.apply(this,arguments)}function X0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=No(e))!==null;);return e}function Dc(e,t){return Dc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Dc(e,t)}function Y0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 V0(this,n)}}function V0(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 Ya(e)}function Ya(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 cy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zr,Nc=(Ac=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&&Dc(o,u)})(a,e);var t,n,r=Y0(a);function a(){var o;H0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return cy(Ya(o=r.call.apply(r,[this].concat(p))),"modelType",ht.RECT_NODE),U0(Ya(o),"radius",ay,Ya(o)),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,p=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+p/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-p/2,y:u,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var o=Tc(No(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.rect;return sy(sy({},o),Dt(u))}}])&&G0(t.prototype,n),a}(mr),ay=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,p){return p(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}(Ac.prototype,"radius",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ac);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 ly(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 fy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ly(Object(n),!0).forEach(function(r){dy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ly(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K0(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(){return Rc=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(e,t,n){var r=Z0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Rc.apply(this,arguments)}function Z0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Co(e))!==null;);return e}function Ic(e,t){return Ic=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ic(e,t)}function q0(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 J0(this,n)}}function J0(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 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 Co(e){return Co=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Co(e)}function dy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hy(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,p){return p(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 Lc=(zr=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&&Ic(o,u)})(a,e);var t,n,r=q0(a);function a(){var o;W0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return dy(py(o=r.call.apply(r,[this].concat(p))),"modelType",ht.TEXT_NODE),o}return t=a,(n=[{key:"getTextStyle",value:function(){var o=Rc(Co(a.prototype),"getTextStyle",this).call(this),u=this.graphModel.theme.text;return fy(fy({},o),Dt(u))}},{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return bs({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 bs({rows:o,fontSize:u,rowsLength:o.length}).height}}])&&K0(t.prototype,n),a}(mr),hy(zr.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(zr.prototype,"width"),zr.prototype),hy(zr.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(zr.prototype,"height"),zr.prototype),zr);function zc(e){return zc=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},zc(e)}function $0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q0(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 Bc(e,t){return Bc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bc(e,t)}function eO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Va(e);if(t){var a=Va(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return tO(this,n)}}function tO(e,t){if(t&&(zc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yy(e)}function yy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Va(e){return Va=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Va(e)}function nO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Un,gy,vy,by,Fc=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&&Bc(o,u)})(a,e);var t,n,r=eO(a);function a(){var o;$0(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return nO(yy(o=r.call.apply(r,[this].concat(p))),"modelType",ht.HTML_NODE),o}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var o=this.x,u=this.y,p=this.width,d=this.height;return[{x:o,y:u-d/2,id:"".concat(this.id,"_0")},{x:o+p/2,y:u,id:"".concat(this.id,"_1")},{x:o,y:u+d/2,id:"".concat(this.id,"_2")},{x:o-p/2,y:u,id:"".concat(this.id,"_3")}]}}])&&Q0(t.prototype,n),a}(mr);function my(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 Uc(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 rO(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 Oy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yi(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,p){return p(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 _y=(Un=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Oy(this,"graphModel",void 0),Uc(this,"isShowHorizontal",gy,this),Uc(this,"isShowVertical",vy,this),Uc(this,"position",by,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?my(Object(o),!0).forEach(function(u){Oy(r,u,o[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):my(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,p=!1,d=!1,O=0;O<a.length;O++){var _=a[O];if(_.id!==r.id&&(o===_.x&&(p=!0),u===_.y&&(d=!0),p&&d))break}return{isShowVertical:p,isShowHorizontal:d,position:{x:o,y:u}}}},{key:"getHorizontalSnapline",value:function(r,a){var o,u,p=!1,d=r.id;if(d){var O=this.graphModel.fakerNode;if(O&&O.id===d)u=jn(O);else{var _=this.graphModel.getNodeModelById(d);u=jn(_)}}for(var S=0;S<a.length;S++){var k=a[S];if(k.id!==r.id){var R=jn(k);if(R.minY===u.minY||R.maxY===u.minY){p=!0,o=u.minY;break}if(R.minY===u.maxY||R.maxY===u.maxY){p=!0,o=u.maxY;break}}}return sn({isShowHorizontal:p,position:{y:o}})}},{key:"getVerticalSnapline",value:function(r,a){var o,u,p=!1,d=r.id;if(d){var O=this.graphModel.fakerNode;if(O&&O.id===d)u=jn(O);else{var _=this.graphModel.getNodeModelById(d);u=jn(_)}}for(var S=0;S<a.length;S++){var k=a[S];if(k.id!==r.id){var R=jn(k);if(R.minX===u.minX||R.maxX===u.minX){p=!0,o=u.minX;break}if(R.minX===u.maxX||R.maxX===u.maxX){p=!0,o=u.maxX;break}}}return sn({isShowVertical:p,position:{x:o}})}},{key:"getSnapLinePosition",value:function(r,a){var o=this.getCenterSnapLine(r,a),u=o.isShowHorizontal,p=o.isShowVertical;if(!u){var d=this.getHorizontalSnapline(r,a);d.isShowHorizontal&&(o.isShowHorizontal=d.isShowHorizontal,o.position.y=d.position.y)}if(!p){var O=this.getVerticalSnapline(r,a);O.isShowVertical&&(o.isShowVertical=O.isShowVertical,o.position.x=O.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&&rO(t.prototype,n),e}(),gy=yi(Un.prototype,"isShowHorizontal",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vy=yi(Un.prototype,"isShowVertical",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),by=yi(Un.prototype,"position",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yi(Un.prototype,"clearSnapline",[c.k],Object.getOwnPropertyDescriptor(Un.prototype,"clearSnapline"),Un.prototype),yi(Un.prototype,"setNodeSnapLine",[c.k],Object.getOwnPropertyDescriptor(Un.prototype,"setNodeSnapLine"),Un.prototype),Un),gi=new Map,wy=function(e){var t=Nr(),n=window.requestAnimationFrame(function r(){if(e(),gi.get(t)){var a=window.requestAnimationFrame(r);gi.set(t,a)}});return gi.set(t,n),t},Wa=function(e){var t=gi.get(e);t&&(window.cancelAnimationFrame(t),gi.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 vi(){return vi=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},vi.apply(this,arguments)}function xy(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?xy(Object(n),!0).forEach(function(r){rr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ey(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 Ey(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 Ey(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 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 Gc(e,t){return Gc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Gc(e,t)}function aO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 uO(this,n)}}function uO(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 nr(e)}function nr(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 rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sO=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&&Gc(o,u)})(a,e);var t,n,r=aO(a);function a(){var o;return function(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}(this,a),rr(nr(o=r.call(this)),"preTargetNode",void 0),rr(nr(o),"sourceRuleResults",void 0),rr(nr(o),"targetRuleResults",void 0),rr(nr(o),"dragHandler",void 0),rr(nr(o),"t",void 0),rr(nr(o),"onDragStart",function(u){var p=u.event,d=o.props,O=d.anchorData,_=d.nodeModel,S=d.graphModel,k=S.overlapMode;S.selectNodeById(_.id),k!==Sn.INCREASE&&_.autoToFront&&S.toFront(_.id),S.eventCenter.emit(tt.ANCHOR_DRAGSTART,{data:O,e:p,nodeModel:_}),o.setState({startX:O.x,startY:O.y,endX:O.x,endY:O.y})}),rr(nr(o),"onDragging",function(u){var p=u.event,d=o.props,O=d.graphModel,_=d.nodeModel,S=d.anchorData,k=O.transformModel,R=O.eventCenter,X=O.width,W=O.height,oe=O.editConfigModel,re=oe.autoExpand,de=oe.stopMoveGraph,me=p.clientX,ke=p.clientY,Ee=O.getPointByClient({x:me,y:ke}),He=Ee.domOverlayPosition,Me=He.x,Be=He.y,Re=Ee.canvasOverlayPosition,lt=Re.x,Et=Re.y;o.t&&Wa(o.t);var mt=[];Me<10?mt=[10,0]:Me+10>X?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=wy(function(){var jt=oO(mt,2),Ft=jt[0],Wt=jt[1];k.translate(Ft,Wt);var pn=o.state,ar=pn.endX,Ln=pn.endY;o.setState({endX:ar-Ft,endY:Ln-Wt}),o.moveAnchorEnd(ar-Ft,Ln-Wt)})),R.emit(tt.ANCHOR_DRAG,{data:S,e:p,nodeModel:_})}),rr(nr(o),"onDragEnd",function(u){var p=u.event;o.t&&Wa(o.t),o.checkEnd(p),o.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),o.sourceRuleResults.clear(),o.targetRuleResults.clear();var d=o.props,O=d.graphModel,_=d.nodeModel,S=d.anchorData;O.eventCenter.emit(tt.ANCHOR_DRAGEND,{data:S,e:p,nodeModel:_})}),rr(nr(o),"checkEnd",function(u){var p=o.props,d=p.graphModel,O=p.nodeModel,_=p.anchorData,S=_.x,k=_.y,R=_.id,X=(d.edgeType,o.state),W=X.endX,oe=X.endY,re=X.dragging,de=ya({x:W,y:oe},d);if(o.preTargetNode&&o.preTargetNode.state!==_t.DEFAULT&&o.preTargetNode.setElementState(_t.DEFAULT),re&&de&&de.node){var me=de.node,ke=de.anchor.id,Ee="".concat(O.id,"_").concat(me.id,"_").concat(ke,"_").concat(R),He=o.sourceRuleResults.get(Ee)||{},Me=He.isAllPass,Be=He.msg,Re=o.targetRuleResults.get(Ee)||{},lt=Re.isAllPass,Et=Re.msg;if(Me&<){me.setElementState(_t.DEFAULT);var mt=d.edgeGenerator(O.getData(),d.getNodeModelById(de.node.id).getData()),jt=d.addEdge(Ka(Ka({},mt),{},{sourceNodeId:O.id,sourceAnchorId:R,startPoint:{x:S,y:k},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:O,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,p=o.style,d=o.node.getAnchorShape(u);if(d)return d;var O=u.x,_=u.y,S=Ka(Ka({},p),p.hover);return Object(te.g)("g",null,Object(te.g)(pi,vi({className:"lf-node-anchor-hover"},S,{x:O,y:_})),Object(te.g)(pi,vi({className:"lf-node-anchor"},p,{x:O,y:_})))}},{key:"moveAnchorEnd",value:function(o,u){var p=this.props,d=p.graphModel,O=p.nodeModel,_=p.anchorData,S=ya({x:o,y:u},d);if(S){var k=S.node,R=S.anchor.id;if(this.preTargetNode&&this.preTargetNode!==S.node&&this.preTargetNode.setElementState(_t.DEFAULT),_.id===R)return;this.preTargetNode=k;var X="".concat(O.id,"_").concat(k.id,"_").concat(R,"_").concat(_.id);if(!this.targetRuleResults.has(X)){var W=S.anchor,oe=O.isAllowConnectedAsSource(k,_,W),re=k.isAllowConnectedAsTarget(O,_,W);this.sourceRuleResults.set(X,ii(oe)),this.targetRuleResults.set(X,ii(re))}var de=this.sourceRuleResults.get(X).isAllPass,me=this.targetRuleResults.get(X).isAllPass;de&&me?k.setElementState(_t.ALLOW_CONNECT):k.setElementState(_t.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==_t.DEFAULT&&this.preTargetNode.setElementState(_t.DEFAULT)}},{key:"isShowLine",value:function(){var o=this.state,u=o.startX,p=o.startY,d=o.endX,O=o.endY;return Jn(u,p,d,O)>10}},{key:"render",value:function(){var o=this,u=this.state,p=u.startX,d=u.startY,O=u.endX,_=u.endY,S=this.props,k=S.anchorData.edgeAddable,R=S.edgeStyle;return Object(te.g)("g",{className:"lf-anchor"},Object(te.g)("g",{onMouseDown:function(X){k!==!1&&o.dragHandler.handleMouseDown(X)}},this.getAnchorShape()),this.isShowLine()&&Object(te.g)(Eo,vi({x1:p,y1:d,x2:O,y2:_},R,{"pointer-events":"none"})))}}])&&iO(t.prototype,n),a}(te.a);i(80);function Sy(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 cO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sy(Object(n),!0).forEach(function(r){lO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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 fO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return jy(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 jy(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 jy(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 Py(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,p=e.fill,d=p===void 0?"currentColor":p,O=e.overflowMode,_=O===void 0?"default":O,S=e.textWidth,k=S===void 0?"":S,R=e.model,X={textAnchor:"middle","dominant-baseline":"middle",x:n,y:a,fill:d};if(Object.entries(e).forEach(function(ke){var Ee=fO(ke,2),He=Ee[0],Me=Ee[1];Xc(Me)!=="object"&&(X[He]=Me)}),o){var W=String(o).split(/[\r\n]/g),oe=W.length;if(_!=="default"){var re=R.BaseType,de=R.modelType;if(re===Ht.NODE&&de!==ht.TEXT_NODE||re===Ht.EDGE&&k)return function(ke){var Ee=ke.value,He=ke.fontSize,Me=ke.model,Be=ke.fontFamily,Re=Be===void 0?"":Be,lt=ke.lineHeight,Et=ke.wrapPadding,mt=Et===void 0?"0, 0":Et,jt=ke.overflowMode,Ft=ke.x,Wt=ke.y,pn=Me.width,ar=Me.textHeight,Ln=ke.textWidth||pn,Lo=String(Ee).split(/[\r\n]/g),bu=Lo.length,mu=qp({rows:Lo,style:{fontSize:"".concat(He,"px"),width:"".concat(Ln,"px"),fontFamily:Re,lineHeight:lt,padding:mt},rowsLength:bu,className:"lf-get-text-height"}),ao=Me.height>mu?Me.height:mu;ar&&(ao=ar);var Ur=jt==="ellipsis";return Ur&&(ao=He+2),Object(te.g)("g",null,Object(te.g)("foreignObject",{width:Ln,height:ao,x:Ft-Ln/2,y:Wt-ao/2},Object(te.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:ao,width:Ln,padding:mt}},Object(te.g)("div",{className:Ur?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Ur?Lo.join(""):"",style:cO({},ke)},Lo.map(function(Hr){return Object(te.g)("div",{className:"lf-node-text--auto-wrap-inner"},Hr)})))))}(e)}if(oe>1){var me=W.map(function(ke,Ee){var He=(Ee-(oe-1)/2)*(u+2);return Object(te.g)("tspan",{className:"lf-text-tspan",x:n,y:a+He},ke)});return Object(te.g)("text",X,me)}return Object(te.g)("text",X,o)}}function Yc(e){return Yc=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},Yc(e)}function Vc(){return Vc=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},Vc.apply(this,arguments)}function pO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ay(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 Ay(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 Ay(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 dO(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 Wc(e,t){return Wc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Wc(e,t)}function hO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 yO(this,n)}}function yO(e,t){if(t&&(Yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Br(e)}function Br(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 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 ky=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&&Wc(o,u)})(a,e);var t,n,r=hO(a);function a(o){var u;(function(d,O){if(!(d instanceof O))throw new TypeError("Cannot call a class as a function")})(this,a),ro(Br(u=r.call(this)),"dragHandler",void 0),ro(Br(u),"sumDeltaX",0),ro(Br(u),"sumDeltaY",0),ro(Br(u),"stepDrag",void 0),ro(Br(u),"onDragging",function(d){var O=d.deltaX,_=d.deltaY,S=u.props,k=S.model,R=pO(S.graphModel.transformModel.fixDeltaXY(O,_),2),X=R[0],W=R[1];k.moveText(X,W)}),ro(Br(u),"dblClickHandler",function(){u.props.editable&&u.props.model.setElementState(_t.TEXT_EDIT)}),ro(Br(u),"mouseDownHandle",function(d){var O=u.props,_=O.draggable,S=O.model,k=O.graphModel.editConfigModel.nodeTextDraggable;(_||k)&&(u.stepDrag.model=S,u.stepDrag.handleMouseDown(d))}),o.model;var p=o.draggable;return u.stepDrag=new yr({onDragging:u.onDragging,step:1,isStopPropagation:p}),u}return t=a,(n=[{key:"getShape",value:function(){var o=this.props,u=o.model,p=o.graphModel,d=u.text,O=p.editConfigModel,_=d.value,S=d.x,k=d.y,R=d.editable,X=d.draggable,W={x:S,y:k,className:"",value:_};R?W.className="lf-element-text":X||O.nodeTextDraggable?W.className="lf-text-draggable":W.className="lf-text-disabled";var oe=u.getTextStyle();return Object(te.g)(Py,Vc({},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())}}])&&dO(t.prototype,n),a}(te.a),gO=window.navigator.userAgent.match(/MSIE|Trident/)!==null;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 Ja(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(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 Ty(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 vO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=$a(e);if(t){var a=$a(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return bO(this,n)}}function bO(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 rn(e)}function rn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $a(e){return $a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(e)}function fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Or=function(e){(function(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),p&&Zc(u,p)})(o,e);var t,n,r,a=vO(o);function o(u){var p;(function(k,R){if(!(k instanceof R))throw new TypeError("Cannot call a class as a function")})(this,o),fn(rn(p=a.call(this)),"t",void 0),fn(rn(p),"moveOffset",void 0),fn(rn(p),"stepDrag",void 0),fn(rn(p),"contextMenuTime",void 0),fn(rn(p),"startTime",void 0),fn(rn(p),"clickTimer",void 0),fn(rn(p),"onDragStart",function(k){var R=k.event,X=R.clientX,W=R.clientY,oe=p.props,re=oe.model,de=oe.graphModel.getPointByClient({x:X,y:W}).canvasOverlayPosition,me=de.x,ke=de.y;p.moveOffset={x:re.x-me,y:re.y-ke}}),fn(rn(p),"onDragging",function(k){var R=k.event,X=p.props,W=X.model,oe=X.graphModel,re=oe.editConfigModel,de=re.stopMoveGraph,me=re.autoExpand,ke=oe.transformModel,Ee=oe.selectNodes,He=oe.width,Me=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(ke.CanvasPointToHtmlPoint([mt,jt]),2),Wt=Ft[0],pn=Ft[1];if(mt+=p.moveOffset.x,jt+=p.moveOffset.y,mt=Dr(mt,Be),jt=Dr(jt,Be),He&&Me){if(!me||de||!(Wt<0||pn<0||Wt>He||pn>Me)){var ar=Ja(ke.CanvasPointToHtmlPoint([mt-W.width/2,jt-W.height/2]),2),Ln=ar[0],Lo=ar[1],bu=Ja(ke.CanvasPointToHtmlPoint([mt+W.width/2,jt+W.height/2]),2),mu=bu[0],ao=bu[1],Ur=Math.max(Be,20),Hr=[];Ln<0?Hr=[Ur,0]:mu>oe.width?Hr=[-Ur,0]:Lo<0?Hr=[0,Ur]:ao>oe.height&&(Hr=[0,-Ur]),p.t&&Wa(p.t);var Ou=Ee.map(function(_u){return _u.id});Ou.indexOf(W.id)===-1&&(Ou=[W.id]),Hr.length>0&&!de&&me?p.t=wy(function(){var _u=Ja(Hr,2),pg=_u[0],dg=_u[1];ke.translate(pg,dg);var uw=-pg/ke.SCALE_X,sw=-dg/ke.SCALE_X;oe.moveNodes(Ou,uw,sw)}):oe.moveNodes(Ou,mt-W.x,jt-W.y)}}else oe.moveNode2Coordinate(W.id,mt,jt)}),fn(rn(p),"onDragEnd",function(){p.t&&Wa(p.t),p.props.model.isDragging=!1}),fn(rn(p),"handleClick",function(k){if(p.startTime&&!(new Date().getTime()-p.startTime>200)){var R=p.props,X=R.model,W=R.graphModel,oe={data:X.getData(),e:k,position:W.getPointByClient({x:k.clientX,y:k.clientY}),isSelected:!1,isMultiple:!1},re=k.button===2,de=k.detail===2;if(!re){var me=W.editConfigModel,ke=wp(k,me);oe.isMultiple=ke,X.isSelected&&!de&&ke?(oe.isSelected=!1,X.setSelected(!1)):(W.selectNodeById(X.id,ke),oe.isSelected=!0,p.toFront()),de?(me.nodeTextEdit&&X.text.editable&&(X.setSelected(!1),W.setElementStateById(X.id,_t.TEXT_EDIT)),W.eventCenter.emit(tt.NODE_DBCLICK,oe)):(W.eventCenter.emit(tt.ELEMENT_CLICK,oe),W.eventCenter.emit(tt.NODE_CLICK,oe))}}}),fn(rn(p),"handleContextMenu",function(k){k.preventDefault();var R=p.props,X=R.model,W=R.graphModel,oe=X.getData(),re=W.getPointByClient({x:k.clientX,y:k.clientY});W.setElementStateById(X.id,_t.SHOW_MENU,re.domOverlayPosition),X.isSelected||W.selectNodeById(X.id),W.eventCenter.emit(tt.NODE_CONTEXTMENU,{data:oe,e:k,position:re}),p.toFront()}),fn(rn(p),"handleMouseDown",function(k){var R=p.props,X=R.model,W=R.graphModel;p.startTime=new Date().getTime(),W.editConfigModel.adjustNodePosition&&X.draggable&&p.stepDrag&&p.stepDrag.handleMouseDown(k)}),fn(rn(p),"setHoverON",function(k){var R=p.props,X=R.model,W=R.graphModel;if(!X.isHovered){var oe=X.getData();X.setHovered(!0),W.eventCenter.emit(tt.NODE_MOUSEENTER,{data:oe,e:k})}}),fn(rn(p),"setHoverOFF",function(k){var R=p.props,X=R.model,W=R.graphModel,oe=X.getData();X.isHovered&&(X.setHovered(!1),W.eventCenter.emit(tt.NODE_MOUSELEAVE,{data:oe,e:k}))}),fn(rn(p),"onMouseOut",function(k){gO&&p.setHoverOFF(k)});var d=u.graphModel,O=d.gridSize,_=d.eventCenter,S=u.model;return p.stepDrag=new yr({onDragStart:p.onDragStart,onDragging:p.onDragging,onDragEnd:p.onDragEnd,step:O,eventType:"NODE",isStopPropagation:!1,eventCenter:_,model:S}),p}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,p=this.props,d=p.model,O=p.graphModel,_=d.isSelected,S=d.isHitable,k=d.isDragging,R=d.isShowAnchor;return S&&(_||R)&&!k?fa(d.anchors,function(X,W){var oe=d.getAnchorLineStyle(X),re=d.getAnchorStyle(X);return Object(te.g)(sO,{anchorData:X,node:u,style:re,edgeStyle:oe,anchorIndex:W,nodeModel:d,graphModel:O,setHoverOFF:u.setHoverOFF})}):[]}},{key:"getText",value:function(){var u=this.props,p=u.model,d=u.graphModel;if(p.state===_t.TEXT_EDIT)return"";if(p.text){var O=d.editConfigModel,_=!1;return(p.text.draggable||O.nodeTextDraggable)&&(_=!0),Object(te.g)(ky,{editable:O.nodeTextEdit&&p.text.editable,model:p,graphModel:d,draggable:_})}}},{key:"getStateClassName",value:function(){var u=this.props.model,p=u.state,d=u.isDragging,O=u.isSelected,_="lf-node";switch(p){case _t.ALLOW_CONNECT:_+=" lf-node-allow";break;case _t.NOT_ALLOW_CONNECT:_+=" lf-node-not-allow";break;default:_+=" lf-node-default"}return d&&(_+=" lf-isDragging"),O&&(_+=" lf-node-selected"),_}},{key:"toFront",value:function(){var u=this.props,p=u.model,d=u.graphModel;d.overlapMode!==Sn.INCREASE&&p.autoToFront&&d.toFront(p.id)}},{key:"render",value:function(){var u,p=this.props,d=p.model,O=p.graphModel,_=O.editConfigModel,S=_.hideAnchors,k=_.adjustNodePosition,R=O.gridSize,X=O.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?(k&&oe&&this.stepDrag.setStep(R*X),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}}])&&Ty(t.prototype,n),r&&Ty(t,r),o}(te.a);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 Jc(){return Jc=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},Jc.apply(this,arguments)}function mO(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 $c(e,t){return $c=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$c(e,t)}function _O(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 wO(this,n)}}function wO(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 Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qa(e)}var Qc=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&&$c(o,u)})(a,e);var t,n,r=_O(a);function a(){return mO(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)(Ir,Jc({},u,{x:o.x,y:o.y,width:o.width,height:o.height,radius:o.radius}))}}])&&OO(t.prototype,n),a}(Or);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 tl(){return tl=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},tl.apply(this,arguments)}function xO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 nl(e,t){return nl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},nl(e,t)}function SO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 jO(this,n)}}function jO(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 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 rl=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&&nl(o,u)})(a,e);var t,n,r=SO(a);function a(){return xO(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,p=o.y,d=o.r,O=o.getNodeStyle();return Object(te.g)(pi,tl({},O,{x:u,y:p,r:d}))}}])&&EO(t.prototype,n),a}(Or);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 PO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Dy(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 Dy(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 Dy(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 Ny(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=PO(a,2),u=o[0],p=o[1];ol(p)!=="object"&&(r[u]=p)}),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 il(e){return il=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},il(e)}function al(){return al=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},al.apply(this,arguments)}function AO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kO(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 ul(e,t){return ul=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ul(e,t)}function MO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 TO(this,n)}}function TO(e,t){if(t&&(il(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 sl=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&&ul(o,u)})(a,e);var t,n,r=MO(a);function a(){return AO(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var o=this.props.model,u=o.x,p=o.y,d=o.width,O=o.height,_=o.points,S=o.getNodeStyle(),k={transform:"matrix(1 0 0 1 ".concat(u-d/2," ").concat(p-O/2,")")};return Object(te.g)("g",k,Object(te.g)(Ny,al({},S,{points:_,x:u,y:p})))}}])&&kO(t.prototype,n),a}(Or);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 ll(){return ll=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},ll.apply(this,arguments)}function DO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NO(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 fl(e,t){return fl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},fl(e,t)}function CO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 RO(this,n)}}function RO(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 nu(e){return nu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nu(e)}var pl=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&&fl(o,u)})(a,e);var t,n,r=CO(a);function a(){return DO(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)(Ny,ll({},u,{points:o.points,x:o.x,y:o.y})))}}])&&NO(t.prototype,n),a}(Or);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 IO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Cy(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 Cy(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 Cy(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 LO(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,p=e.ry,d=p===void 0?4:p,O=e.className,_={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 k=IO(S,2),R=k[0],X=k[1];dl(X)!=="object"&&(_[R]=X)}),_.className=O?"lf-basic-shape ".concat(O):"lf-basic-shape",Object(te.g)("ellipse",_)}function hl(e){return hl=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},hl(e)}function yl(){return yl=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},yl.apply(this,arguments)}function zO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BO(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 gl(e,t){return gl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},gl(e,t)}function FO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 UO(this,n)}}function UO(e,t){if(t&&(hl(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 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&&gl(o,u)})(a,e);var t,n,r=FO(a);function a(){return zO(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)(LO,yl({},u,{x:o.x,y:o.y,rx:o.rx,ry:o.ry}))}}])&&BO(t.prototype,n),a}(Or);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 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 Iy(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){HO(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 HO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XO(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 ml(e,t){return ml=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ml(e,t)}function YO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 VO(this,n)}}function VO(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 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 Ol=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&&ml(o,u)})(a,e);var t,n,r=YO(a);function a(){return GO(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getBackground",value:function(){var o=this.props.model,u=o.getTextStyle(),p=o.width,d=o.height,O=o.x,_=o.y,S=Iy(Iy({},u.background),{},{x:O,y:_-1,width:p,height:d});return Object(te.g)(Ir,S)}},{key:"getShape",value:function(){return Object(te.g)("g",null,this.getBackground())}}])&&XO(t.prototype,n),a}(Or);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 wl(){return wl=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},wl.apply(this,arguments)}function WO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KO(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 xl(e,t){return xl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},xl(e,t)}function ZO(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 qO(this,n)}}function qO(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 bi(e)}function bi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iu(e){return iu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},iu(e)}function au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var El=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&&xl(o,u)})(a,e);var t,n,r=ZO(a);function a(){var o;WO(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return au(bi(o=r.call.apply(r,[this].concat(p))),"ref",void 0),au(bi(o),"currentProperties",void 0),au(bi(o),"preProperties",void 0),au(bi(o),"setRef",function(O){o.ref=O}),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,p=o.y,d=o.height,O=o.width,_=o.getNodeStyle();return this.currentProperties=JSON.stringify(o.properties),Object(te.g)("foreignObject",wl({},_,{x:u-O/2,y:p-d/2,width:O,height:d,ref:this.setRef}))}}])&&KO(t.prototype,n),a}(Or);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 jl(){return jl=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},jl.apply(this,arguments)}function Ly(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?Ly(Object(n),!0).forEach(function(r){kl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ly(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}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 Pl(e,t){return Pl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Pl(e,t)}function $O(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=uu(e);if(t){var a=uu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return QO(this,n)}}function QO(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 Al(e)}function Al(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},uu(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 or,e_=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&&Pl(o,u)})(a,e);var t,n,r=$O(a);function a(o){var u;return function(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}(this,a),kl(Al(u=r.call(this,o)),"setHoverON",function(){u.setState({isHovered:!0})}),kl(Al(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(),p=o.text,d=o.width,O=u.background||{};if(this.state.isHovered&&u.hover&&u.hover.background&&(O=oo(oo({},O),u.hover.background)),p&&p.value&&O.fill!=="transparent"){var _,S=u.fontSize,k=u.overflowMode,R=u.lineHeight,X=u.wrapPadding,W=u.textWidth,oe=p.value,re=p.x,de=p.y,me=String(oe).split(/[\r\n]/g),ke=me.length;if(k==="autoWrap"&&W){var Ee=qp({rows:me,style:{fontSize:"".concat(S,"px"),width:"".concat(W,"px"),lineHeight:R,padding:X},rowsLength:ke,className:"lf-get-text-height"});_=oo(oo({},O),{},{x:re-1,y:de-1,width:W,height:Ee})}else{me&&me.forEach(function(lt){md(lt)});var He=bs({rows:me,fontSize:S,rowsLength:ke}),Me=He.width,Be=He.height;if(k==="ellipsis"&&(Me=W||d,Be=S+2),typeof O.wrapPadding=="string"){var Re=O.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]]),Me+=Re[1]+Re[3],Be+=Re[0]+Re[2],re+=(Re[1]-Re[3])/2,de+=(Re[2]-Re[0])/2)}_=oo(oo({},O),{},{x:re-1,y:de-1,width:Me,height:Be})}return Object(te.g)(Ir,_)}}},{key:"getShape",value:function(){var o=this.props.model,u=o.text,p=u.value,d=u.x,O=u.y;if(p){var _=oo({x:d,y:O,className:"lf-element-text",value:p},o.getTextStyle());return Object(te.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(te.g)(Py,jl({},_,{model:o})))}}}])&&JO(t.prototype,n),a}(ky);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 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 _r(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){An(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 t_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(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}function n_(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 r_(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 o_(this,n)}}function o_(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 Pn(e)}function Pn(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 An(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"})(or||(or={}));var Fy=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=r_(a);function a(o){var u;(function(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),An(Pn(u=r.call(this)),"stepDragData",void 0),An(Pn(u),"stepDrag",void 0),An(Pn(u),"oldEdge",void 0),An(Pn(u),"preTargetNode",void 0),An(Pn(u),"targetRuleResults",void 0),An(Pn(u),"sourceRuleResults",void 0),An(Pn(u),"handleMouseDown",function(_){u.stepDrag&&u.stepDrag.handleMouseDown(_)}),An(Pn(u),"onDragStart",function(){var _=u.props,S=_.x,k=_.y,R=_.edgeModel,X=R.startPoint,W=R.endPoint,oe=R.pointsList;u.oldEdge={startPoint:X,endPoint:W,pointsList:oe},u.setState({endX:S,endY:k,dragging:!0})}),An(Pn(u),"onDragging",function(_){var S=_.deltaX,k=_.deltaY,R=u.state,X=R.endX,W=R.endY,oe=u.props,re=oe.graphModel,de=oe.type,me=re.transformModel,ke=re.editConfigModel,Ee=t_(me.moveCanvasPointByHtml([X,W],S,k),2),He=Ee[0],Me=Ee[1];u.setState({endX:He,endY:Me,dragging:!0});var Be=u.props.edgeModel,Re=ya({x:X,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===or.SOURCE?lt={startPoint:{x:Re.anchor.x,y:Re.anchor.y},endPoint:{x:mt.x,y:mt.y},sourceNode:Re.node,targetNode:Ft}:de===or.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===or.SOURCE?Be.updateStartPoint({x:He,y:Me}):de===or.TARGET&&Be.updateEndPoint({x:He,y:Me});Be.text.value&&ke.adjustEdge&&Be.setText(Object.assign({},Be.text,Be.textPosition))}),An(Pn(u),"onDragEnd",function(_){var S=_.event;try{var k;u.setState({dragging:!1});var R=u.props,X=R.graphModel,W=R.edgeModel,oe=R.type,re=u.state,de=re.endX,me=re.endY,ke=re.dragging,Ee=ya({x:de,y:me},X);if(!ke)return;var He,Me=!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();He=_r(_r({},jt),{},{sourceAnchorId:"",targetAnchorId:"",text:(jt==null||(mt=jt.text)===null||mt===void 0?void 0:mt.value)||""}),oe===or.SOURCE?(He=_r(_r({},X.edgeGenerator(X.getNodeModelById(Ee.node.id).getData(),X.getNodeModelById(W.targetNodeId).getData(),He)),{},{sourceNodeId:Ee.node.id,sourceAnchorId:Ee.anchor.id,startPoint:{x:Ee.anchor.x,y:Ee.anchor.y},targetNodeId:W.targetNodeId,endPoint:_r({},W.endPoint)}),W.sourceNodeId===Ee.node.id&&W.sourceAnchorId===Ee.anchor.id&&(Me=!0)):oe===or.TARGET&&(He=_r(_r({},X.edgeGenerator(X.getNodeModelById(W.sourceNodeId).getData(),X.getNodeModelById(Ee.node.id).getData(),He)),{},{sourceNodeId:W.sourceNodeId,startPoint:_r({},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&&(Me=!0))}else{Me=!0;var Ft=Et.getData();X.eventCenter.emit(tt.CONNECTION_NOT_ALLOWED,{data:Ft,msg:lt})}}else Me=!0;if(Me)u.recoveryEdge();else{var Wt=W.getData();X.deleteEdgeById(W.id);var pn=X.addEdge(_r({},He));X.eventCenter.emit(tt.EDGE_EXCHANGE_NODE,{data:{newEdge:pn.getData(),oldEdge:Wt}})}(k=u.preTargetNode)===null||k===void 0||k.setElementState(_t.DEFAULT)}finally{u.props.graphModel.eventCenter.emit(tt.ADJUST_POINT_DRAGEND,{e:S,data:u.stepDragData})}}),An(Pn(u),"recoveryEdge",function(){var _=u.props.edgeModel,S=u.oldEdge,k=S.startPoint,R=S.endPoint,X=S.pointsList;_.updateStartPoint(k),_.updateEndPoint(R),_.modelType!==ht.LINE_EDGE&&(_.pointsList=X,_.initPoints())}),An(Pn(u),"getAdjustPointStyle",function(){var _=u.props,S=_.graphModel.theme;return _.edgeModel,S.edgeAdjust}),u.state={dragging:!1,endX:0,endY:0},u.targetRuleResults=new Map,u.sourceRuleResults=new Map;var p=o.type,d=o.edgeModel,O=o.graphModel.eventCenter;return u.stepDragData={type:p,edgeData:d.getData()},u.stepDrag=new yr({onDragStart:u.onDragStart,onDragging:u.onDragging,onDragEnd:u.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:O,data:u.stepDragData}),u}return t=a,(n=[{key:"isAllowAdjust",value:function(o){var u=this.props,p=u.edgeModel,d=p.id,O=p.sourceNode,_=p.targetNode,S=p.sourceAnchorId,k=p.targetAnchorId,R=u.type,X=null,W=null,oe=null,re=null;if(R===or.SOURCE?(X=o.node,W=_,oe=o.anchor,re=_.getAnchorInfo(k)):(X=O,W=o.node,re=o.anchor,oe=O.getAnchorInfo(S)),this.preTargetNode&&this.preTargetNode!==o.node&&this.preTargetNode.setElementState(_t.DEFAULT),this.preTargetNode=o.node,re.id===oe.id)return{pass:!1,msg:"",newTargetNode:W};var de="".concat(X.id,"_").concat(W.id,"_").concat(oe.id,"_").concat(re.id);if(!this.targetRuleResults.has(de)){var me=X.isAllowConnectedAsSource(W,oe,re,d),ke=W.isAllowConnectedAsTarget(X,oe,re,d);this.sourceRuleResults.set(de,ii(me)),this.targetRuleResults.set(de,ii(ke))}var Ee=this.sourceRuleResults.get(de),He=Ee.isAllPass,Me=Ee.msg,Be=this.targetRuleResults.get(de),Re=Be.isAllPass,lt=Be.msg,Et=He&&Re?_t.ALLOW_CONNECT:_t.NOT_ALLOW_CONNECT;return R===or.SOURCE?X.setElementState(Et):W.setElementState(Et),{pass:He&&Re,msg:lt||Me,newTargetNode:W}}},{key:"render",value:function(){var o=this.props,u=o.x,p=o.y,d=o.getAdjustPointShape,O=o.edgeModel,_=this.state.dragging;return Object(te.g)("g",{pointerEvents:_?"none":"",onMouseDown:this.handleMouseDown},_?"":d(u,p,O))}}])&&n_(t.prototype,n),a}(te.a);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 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 i_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Uy(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 Uy(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 Uy(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 a_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u_(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 Nl(e,t){return Nl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Nl(e,t)}function s_(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 c_(this,n)}}function c_(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 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 cu(e){return cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cu(e)}function ir(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oi=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&&Nl(o,u)})(a,e);var t,n,r=s_(a);function a(){var o;a_(this,a);for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return ir(Hn(o=r.call.apply(r,[this].concat(p))),"startTime",void 0),ir(Hn(o),"contextMenuTime",void 0),ir(Hn(o),"clickTimer",void 0),ir(Hn(o),"textRef",Object(te.f)()),ir(Hn(o),"handleHover",function(O,_){var S=o.props,k=S.model,R=S.graphModel.eventCenter;k.setHovered(O);var X=O?tt.EDGE_MOUSEENTER:tt.EDGE_MOUSELEAVE,W=k.getData();R.emit(X,{data:W,e:_})}),ir(Hn(o),"setHoverON",function(O){o.props.model.isHovered||(o.textRef&&o.textRef.current&&o.textRef.current.setHoverON(),o.handleHover(!0,O))}),ir(Hn(o),"setHoverOFF",function(O){o.props.model.isHovered&&(o.textRef&&o.textRef.current&&o.textRef.current.setHoverOFF(),o.handleHover(!1,O))}),ir(Hn(o),"handleContextMenu",function(O){O.preventDefault(),o.contextMenuTime=new Date().getTime(),o.clickTimer&&clearTimeout(o.clickTimer);var _=o.props,S=_.model,k=_.graphModel,R=k.getPointByClient({x:O.clientX,y:O.clientY});k.setElementStateById(S.id,_t.SHOW_MENU,R.domOverlayPosition),o.toFront(),S.isSelected||k.selectEdgeById(S.id);var X=S==null?void 0:S.getData();k.eventCenter.emit(tt.EDGE_CONTEXTMENU,{data:X,e:O,position:R})}),ir(Hn(o),"handleMouseDown",function(O){O.stopPropagation(),o.startTime=new Date().getTime()}),ir(Hn(o),"handleMouseUp",function(O){if(o.startTime&&!(new Date().getTime()-o.startTime>200||O.button===2)){var _=O.detail===2,S=o.props,k=S.model,R=S.graphModel,X=k==null?void 0:k.getData(),W=R.getPointByClient({x:O.clientX,y:O.clientY});if(_){var oe=R.editConfigModel,re=R.textEditElement;if(re&&re.id===k.id&&R.setElementStateById(k.id,_t.DEFAULT),oe.edgeTextEdit&&k.text.editable&&R.setElementStateById(k.id,_t.TEXT_EDIT),k.modelType===ht.POLYLINE_EDGE){var de=k,me=R.getPointByClient({x:O.x,y:O.y}).canvasOverlayPosition,ke=me.x,Ee=me.y,He=wd({x:ke,y:Ee},de.points);de.dbClickPosition=He}R.eventCenter.emit(tt.EDGE_DBCLICK,{data:X,e:O,position:W})}else R.eventCenter.emit(tt.ELEMENT_CLICK,{data:X,e:O,position:W}),R.eventCenter.emit(tt.EDGE_CLICK,{data:X,e:O,position:W});var Me=R.editConfigModel;R.selectEdgeById(k.id,wp(O,Me)),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,p=o.graphModel;if(u.state===_t.TEXT_EDIT)return null;var d=!1,O=p.editConfigModel;return(u.text.draggable||O.edgeTextDraggable)&&(d=!0),Object(te.g)(e_,{ref:this.textRef,editable:O.edgeTextEdit&&u.text.editable,model:u,graphModel:p,draggable:d})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.startPoint,p=o.endPoint,d=o.isSelected;return{start:u,end:p,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,p=o.getArrowStyle(),d=p.refY,O=d===void 0?0:d,_=p.refX,S=_===void 0?2:_,k=i_(this.getLastTwoPoints(),2),R=k[0],X=k[1],W="auto";return R!==null&&X!==null&&(W=tm({x:X.x-R.x,y:X.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:O,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(te.g)("marker",{id:"marker-end-".concat(u),refX:S,refY:O,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,p=o.strokeWidth,d=o.offset,O=o.verticalLength;return Object(te.g)("path",{stroke:u,fill:u,strokeWidth:p,transform:"rotate(180)",d:"M 0 0 L ".concat(d," -").concat(O," L ").concat(d," ").concat(O," Z")})}},{key:"getAdjustPointShape",value:function(o,u,p){var d=p.getAdjustPointStyle();return Object(te.g)(pi,mi({className:"lf-edge-adjust-point"},d,{x:o,y:u}))}},{key:"getAdjustPoints",value:function(){var o=this.props,u=o.model,p=o.graphModel,d=u.getAdjustStart(),O=u.getAdjustEnd();return Object(te.g)("g",null,Object(te.g)(Fy,mi({type:"SOURCE"},d,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:p})),Object(te.g)(Fy,mi({type:"TARGET"},O,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:p})))}},{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,p=o.model;u.overlapMode!==Sn.INCREASE&&u.toFront(p.id)}},{key:"render",value:function(){var o=this.props,u=o.model,p=u.isSelected,d=u.isHitable,O=u.isShowAdjustPoint;return o.graphModel.animation,Object(te.g)("g",null,Object(te.g)("g",{className:["lf-edge",!d&&"pointer-none",p&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow()),O&&p?this.getAdjustPoints():"")}}])&&u_(t.prototype,n),a}(te.a);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 l_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Hy(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 Hy(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 Hy(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 _i=function(e){var t={d:""};return Object.entries(e).forEach(function(n){var r=l_(n,2),a=r[0],o=r[1],u=Cl(o);a!=="style"&&u==="object"||(t[a]=o)}),Object(te.g)("path",t)};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 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 f_(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 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=="undefined"||!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(n){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 h_(this,n)}}function h_(e,t){if(t&&(Rl(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 lu(e){return lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(e)}var zl=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 f_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.startPoint,p=o.endPoint,d=o.isAnimation,O=o.arrowConfig,_=o.getEdgeStyle(),S=o.getEdgeAnimationStyle(),k=S.strokeDasharray,R=S.stroke,X=S.strokeDashoffset,W=S.animationName,oe=S.animationDuration,re=S.animationIterationCount,de=S.animationTimingFunction,me=S.animationDirection;return Object(te.g)(Eo,Il({},_,{x1:u.x,y1:u.y,x2:p.x,y2:p.y},O,d?{strokeDasharray:k,stroke:R,style:{strokeDashoffset:X,animationName:W,animationDuration:oe,animationIterationCount:re,animationTimingFunction:de,animationDirection:me}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model,u=function(k){var R,X=k.start,W=k.end;if(X.x===W.x&&X.y===W.y)R="";else{var oe={start:X,end:W,offset:10,verticalLength:5},re=si(ga(ga({},oe),{},{type:"start"})),de=si(ga(ga({},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}),p=u.d,d=u.strokeWidth,O=u.fill,_=u.strokeDasharray,S=u.stroke;return Object(te.g)(_i,{d:p,fill:O,strokeWidth:d,stroke:S,strokeDasharray:_})}}])&&p_(t.prototype,n),a}(Oi);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 y_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(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}var g_=function(e){var t={points:"",fill:"none"};return Object.entries(e).forEach(function(n){var r=y_(n,2),a=r[0],o=r[1];(a==="style"||Bl(o)!=="object")&&(t[a]=o)}),Object(te.g)("polyline",t)};function Fl(e){return Fl=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},Fl(e)}function Xy(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 fu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xy(Object(n),!0).forEach(function(r){xr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}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 v_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Yy(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 Yy(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 Yy(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 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 Hl(e,t){return Hl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Hl(e,t)}function m_(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=pu(e);if(t){var a=pu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return O_(this,n)}}function O_(e,t){if(t&&(Fl(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 pu(e){return pu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pu(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 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&&Hl(o,u)})(a,e);var t,n,r=m_(a);function a(){var o;return function(u,p){if(!(u instanceof p))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 p=u.deltaX,d=u.deltaY,O=o.props,_=O.model,S=O.graphModel;o.isDragging=!0;var k=S.transformModel,R=S.editConfigModel,X=v_(k.fixDeltaXY(p,d),2),W=X[0],oe=X[1],re=_,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,p=u.model,d=u.graphModel.eventCenter,O=p;O.dragAppendEnd(),o.isDragging=!1,O.isShowAdjustPoint=o.isShowAdjustPointTemp,o.appendInfo=void 0,d.emit(tt.EDGE_ADJUST,{data:O.getData()})}),xr(wr(o),"beforeDragStart",function(u,p){p.dragAble&&o.drag.handleMouseDown(u),o.appendInfo=p}),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,p=o.isAnimation,d=o.arrowConfig,O=o.getEdgeStyle(),_=o.getEdgeAnimationStyle(),S=_.strokeDasharray,k=_.stroke,R=_.strokeDashoffset,X=_.animationName,W=_.animationDuration,oe=_.animationIterationCount,re=_.animationTimingFunction,de=_.animationDirection;return Object(te.g)(g_,Ul({points:u},O,d,p?{strokeDasharray:S,stroke:k,style:{strokeDashoffset:R,animationName:X,animationDuration:W,animationIterationCount:oe,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=o.points,p=o.isSelected,d={start:null,end:null,hover:this.state.hover,isSelected:p},O=no(u);return O.length>=2&&(d.start=O[O.length-2],d.end=O[O.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,p=o.start,d=o.end;if(p.x===d.x&&p.y===d.y)u="";else{var O={start:p,end:d,offset:10,verticalLength:5},_=si(fu(fu({},O),{},{type:"start"})),S=si(fu(fu({},O),{},{type:"end"}));u="M".concat(_.leftX," ").concat(_.leftY,`
L`).concat(_.rightX," ").concat(_.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),p=u.d,d=u.strokeWidth,O=u.fill,_=u.strokeDasharray,S=u.stroke;return Object(te.g)(_i,{d:p,fill:O,strokeWidth:d,stroke:S,strokeDasharray:_})}},{key:"getAppendWidth",value:function(){for(var o=this,u=this.props,p=u.model,d=u.graphModel,O=p.pointsList,_=p.draggable,S=[],k=O.length,R=function(W){var oe="lf-polyline-append",re={start:{x:O[W].x,y:O[W].y},end:{x:O[W+1].x,y:O[W+1].y},startIndex:W,endIndex:W+1,direction:"",dragAble:!0},de=Object(te.g)("g",{className:oe},o.getAppendShape(re)),me=d.editConfigModel,ke=me.adjustEdge,Ee=me.adjustEdgeMiddle;if(ke&&_){var He=re.startIndex,Me=re.endIndex,Be=Ee&&(He===0||Me===k-1);re.dragAble=!Be,re.start.x===re.end.x?(re.dragAble&&(oe+="-ew-resize"),re.direction=Mt.VERTICAL):re.start.y===re.end.y&&(re.dragAble&&(oe+="-ns-resize"),re.direction=Mt.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)},X=0;X<k-1;X++)R(X);return Object(te.g)("g",null,S)}}])&&b_(t.prototype,n),a}(Oi);function Xl(e){return Xl=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},Xl(e)}function __(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Vy(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 Vy(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 Vy(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 Yl(){return Yl=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},Yl.apply(this,arguments)}function w_(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 Vl(e,t){return Vl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Vl(e,t)}function E_(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 S_(this,n)}}function S_(e,t){if(t&&(Xl(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 du(e){return du=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},du(e)}var Wl=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&&Vl(o,u)})(a,e);var t,n,r=E_(a);function a(){return w_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var o=this.props.model,u=o.getEdgeStyle(),p=o.path,d=o.isAnimation,O=o.arrowConfig,_=o.getEdgeAnimationStyle(),S=_.strokeDasharray,k=_.stroke,R=_.strokeDashoffset,X=_.animationName,W=_.animationDuration,oe=_.animationIterationCount,re=_.animationTimingFunction,de=_.animationDirection;return Object(te.g)(_i,Yl({d:p},u,O,d?{strokeDasharray:S,stroke:k,style:{strokeDashoffset:R,animationName:X,animationDuration:W,animationIterationCount:oe,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model.path;return Object(te.g)(_i,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,u=this.state.hover,p=o,d=p.path,O=p.isSelected,_=__(_d(d),2);return{start:_[0],end:_[1],hover:u,isSelected:O}}},{key:"getLastTwoPoints",value:function(){var o=this.props.model.path;return _d(o)}}])&&x_(t.prototype,n),a}(Oi);function Kl(e){return Kl=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},Kl(e)}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 j_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A_(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 k_(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 M_(this,n)}}function M_(e,t){if(t&&(Kl(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 T_=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&&Zl(o,u)})(a,e);var t,n,r=k_(a);function a(){return P_(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getArrowAttributes",value:function(){var o=this.props,u=o.arrowInfo,p=o.style,d=u.start,O=u.end,_={start:d,end:O,offset:p.offset,verticalLength:p.verticalLength,type:"end"},S=si(_),k=S.leftX,R=S.leftY,X=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?Wy(Object(de),!0).forEach(function(me){j_(oe,me,de[me])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(de)):Wy(Object(de)).forEach(function(me){Object.defineProperty(oe,me,Object.getOwnPropertyDescriptor(de,me))})}return oe}({d:"M".concat(k," ").concat(R," L").concat(O.x," ").concat(O.y," L").concat(X," ").concat(W," z")},p)}},{key:"getShape",value:function(){var o=this.getArrowAttributes(),u=o.d,p=o.strokeWidth,d=o.stroke,O=o.fill;return Object(te.g)(_i,{d:u,fill:O,strokeWidth:p,stroke:d})}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&A_(t.prototype,n),a}(te.a),Ky=function(e,t){return pe(e,t)},D_=function(e){var t=e==null?0:e.length;return t?e[t-1]:void 0},ql=function(){return Xe.a.Date.now()},N_=/\s/,C_=function(e){for(var t=e.length;t--&&N_.test(e.charAt(t)););return t},R_=/^\s+/,I_=function(e){return e&&e.slice(0,C_(e)+1).replace(R_,"")},L_=/^[-+]0x[0-9a-f]+$/i,z_=/^0b[01]+$/i,B_=/^0o[0-7]+$/i,F_=parseInt,Zy=function(e){if(typeof e=="number")return e;if(ct(e))return NaN;if(Tt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=I_(e);var n=z_.test(e);return n||B_.test(e)?F_(e.slice(2),n?2:8):L_.test(e)?NaN:+e},U_=Math.max,H_=Math.min,G_=function(e,t,n){var r,a,o,u,p,d,O=0,_=!1,S=!1,k=!0;if(typeof e!="function")throw new TypeError("Expected a function");function R(me){var ke=r,Ee=a;return r=a=void 0,O=me,u=e.apply(Ee,ke)}function X(me){return O=me,p=setTimeout(oe,t),_?R(me):u}function W(me){var ke=me-d;return d===void 0||ke>=t||ke<0||S&&me-O>=o}function oe(){var me=ql();if(W(me))return re(me);p=setTimeout(oe,function(ke){var Ee=t-(ke-d);return S?H_(Ee,o-(ke-O)):Ee}(me))}function re(me){return p=void 0,k&&r?R(me):(r=a=void 0,u)}function de(){var me=ql(),ke=W(me);if(r=arguments,a=this,d=me,ke){if(p===void 0)return X(d);if(S)return clearTimeout(p),p=setTimeout(oe,t),R(d)}return p===void 0&&(p=setTimeout(oe,t)),u}return t=Zy(t)||0,Tt(n)&&(_=!!n.leading,o=(S="maxWait"in n)?U_(Zy(n.maxWait)||0,t):o,k="trailing"in n?!!n.trailing:k),de.cancel=function(){p!==void 0&&clearTimeout(p),O=0,r=d=a=p=void 0},de.flush=function(){return p===void 0?u:re(ql())},de},X_=i(167);function Y_(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 Fr(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,Jy,$y,V_=function(){function e(r){(function(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")})(this,e),Fr(this,"undos",[]),Fr(this,"redos",[]),Fr(this,"callbacks",[]),Fr(this,"stopWatch",null),Fr(this,"curData",null),Fr(this,"maxSize",50),Fr(this,"waitTime",100),Fr(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,(n=[{key:"add",value:function(r){Ky(D_(this.undos),r)||(this.undos.push(r),Ky(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(X_.a)(r,G_(function(){var o=r.modelToHistoryData();o&&a.add(o)},this.waitTime))}}])&&Y_(t.prototype,n),e}();function Jl(e){return Jl=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},Jl(e)}function W_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(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 eg(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 Ro(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eg(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tg(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 K_(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 Z_(this,n)}}function Z_(e,t){if(t&&(Jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Io(e)}function Io(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yu(e){return yu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},yu(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 ng,rg,og,Ql=Gn(($y=Jy=function(e){(function(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),p&&$l(u,p)})(o,e);var t,n,r,a=K_(o);function o(){var u;return function(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}(this,o),io(Io(u=a.call(this)),"ref",Object(te.f)()),io(Io(u),"__prevText",{type:"",text:"",id:""}),io(Io(u),"keyupHandler",function(p){var d=u.props.graphModel.textEditElement;p.key==="Enter"&&p.altKey&&d.setElementState(0)}),io(Io(u),"inputHandler",function(p){var d=p.target.innerText,O=u.props.graphModel.textEditElement;u.__prevText={type:O.type,text:d.replace(/(\r\n)+$|(\n)+$/,""),id:O.id}}),io(Io(u),"keydownHandler",function(p){p.stopPropagation()}),u.state={style:{left:0,top:0}},u}return t=o,r=[{key:"getDerivedStateFromProps",value:function(u){var p,d=u.graphModel,O=d.transformModel,_=d.theme,S=d.textEditElement;if(S){var k;if((k=S.text)===null||k===void 0||!k.value)if(S.BaseType===Ht.EDGE){var R=(S=S).text,X=S.textPosition,W=X.x,oe=X.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===Ht.EDGE){var de=_.edgeText,me=de.overflowMode,ke=de.lineHeight,Ee=de.wrapPadding,He=de.textWidth;He&&me==="autoWrap"&&(p=Ro(Ro({},re),{},{width:He,minWidth:He,lineHeight:ke,padding:Ee}))}else if(S.BaseType===Ht.NODE){var Me=_.nodeText,Be=Me.overflowMode,Re=Me.lineHeight,lt=Me.wrapPadding,Et=Me.textWidth,mt=S,jt=mt.width,Ft=mt.modelType;(Ft!==ht.TEXT_NODE&&Be==="autoWrap"||Ft===ht.TEXT_NODE&&Et)&&(p=Ro(Ro({},re),{},{width:Et||jt,minWidth:Et||jt,lineHeight:Re,padding:lt}))}var Wt=S.text,pn=Wt.x,ar=Wt.y,Ln=W_(O.CanvasPointToHtmlPoint([pn,ar]),2);return{style:Ro({left:Ln[0],top:Ln[1]},p)}}}}],(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 p=this.__prevText,d=p.text,O=p.id;u.updateText(O,d),u.eventCenter.emit(tt.TEXT_UPDATE,Ro({},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 p=document.createRange();p.selectNodeContents(u),p.collapse(!1);var d=window.getSelection();d.removeAllRanges(),d.addRange(p)}}},{key:"render",value:function(){var u,p=this.props.graphModel.textEditElement,d=this.state.style;return p?Object(te.g)("div",{contentEditable:!0,className:"lf-text-input",style:d,ref:this.ref,key:p.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(u=p.text)===null||u===void 0?void 0:u.value):null}}])&&tg(t.prototype,n),r&&tg(t,r),o}(te.a),io(Jy,"toolName","textEdit"),qy=$y))||qy,q_=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,p=Math.abs(n.y-r.y)+10;return{x:a-u/2,y:o-p/2,x1:a+u/2,y1:o+p/2}}(e):e.modelType===ht.POLYLINE_EDGE?function(t){var n=t.points,r=no(n),a=ci(r,8),o=a.x,u=a.y,p=a.width,d=a.height;return{x:o-p/2,y:u-d/2,x1:o+p/2,y1:u+d/2}}(e):e.modelType===ht.BEZIER_EDGE?function(t){var n=t.path,r=xa(n),a=ci(r,8),o=a.x,u=a.y,p=a.width,d=a.height;return{x:o-p/2,y:u-d/2,x1:o+p/2,y1:u+d/2}}(e):void 0};function ef(e){return ef=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},ef(e)}function ig(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var o,u,p=[],d=!0,O=!1;try{for(a=a.call(n);!(d=(o=a.next()).done)&&(p.push(o.value),!r||p.length!==r);d=!0);}catch(_){O=!0,u=_}finally{try{d||a.return==null||a.return()}finally{if(O)throw u}}return p}}(e,t)||ag(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 J_(e){return function(t){if(Array.isArray(t))return tf(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||ag(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 ag(e,t){if(e){if(typeof e=="string")return tf(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)?tf(e,t):void 0}}function tf(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 $_(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 nf(e,t){return nf=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},nf(e,t)}function Q_(e){var t=function(){if(typeof Reflect=="undefined"||!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(n){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 ew(this,n)}}function ew(e,t){if(t&&(ef(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wi(e)}function wi(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 xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rf=Gn((og=rg=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&&nf(o,u)})(a,e);var t,n,r=Q_(a);function a(o){var u;(function(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),xi(wi(u=r.call(this)),"stepDrag",void 0),xi(wi(u),"handleMouseDown",function(_){u.stepDrag.handleMouseDown(_)}),xi(wi(u),"onDragging",function(_){var S=_.deltaX,k=_.deltaY,R=u.props.graphModel,X=R.getSelectElements(!0);R.moveNodes(X.nodes.map(function(W){return W.id}),S,k)}),xi(wi(u),"handleContextMenu",function(_){_.preventDefault();var S=u.props,k=S.graphModel,R=S.graphModel,X=R.eventCenter,W=R.selectElements,oe=k.getPointByClient({x:_.clientX,y:_.clientY}),re={nodes:[],edges:[]};J_(W.values()).forEach(function(de){de.BaseType===Ht.NODE&&re.nodes.push(de.getData()),de.BaseType===Ht.EDGE&&re.edges.push(de.getData())}),X.emit(tt.SELECTION_CONTEXTMENU,{data:re,e:_,position:oe})});var p=o.graphModel,d=p.gridSize,O=p.eventCenter;return u.stepDrag=new yr({onDragging:u.onDragging,step:d,eventType:"SELECTION",eventCenter:O}),u}return t=a,(n=[{key:"render",value:function(){var o=this.props.graphModel,u=o.selectElements,p=o.transformModel;if(!(u.size<=1)){var d=Number.MAX_SAFE_INTEGER,O=Number.MAX_SAFE_INTEGER,_=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===Ht.NODE&&(oe=function(re){var de=re.x,me=re.y,ke=re.width,Ee=re.height;return{x:de-ke/2,y:me-Ee/2,x1:de+ke/2,y1:me+Ee/2}}(W)),W.BaseType===Ht.EDGE&&(oe=q_(W)),d=Math.min(d,oe.x),O=Math.min(O,oe.y),_=Math.max(_,oe.x1),S=Math.max(S,oe.y1)});var k=ig(p.CanvasPointToHtmlPoint([d,O]),2);d=k[0],O=k[1];var R=ig(p.CanvasPointToHtmlPoint([_,S]),2);_=R[0],S=R[1];var X={left:"".concat(d-10,"px"),top:"".concat(O-10,"px"),width:"".concat(_-d+20,"px"),height:"".concat(S-O+20,"px")};return Object(te.g)("div",{className:"lf-multiple-select",style:X,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&$_(t.prototype,n),a}(te.a),xi(rg,"toolName","multipleSelect"),ng=og))||ng;function tw(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 vu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nw=function(){function e(r){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),vu(this,"tools",void 0),vu(this,"components",void 0),vu(this,"toolMap",new Map),vu(this,"instance",void 0),this.instance=r,this.isDisabledTool(Ql.toolName)||this.registerTool(Ql.toolName,Ql),this.isDisabledTool(rf.toolName)||this.registerTool(rf.toolName,rf);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,p=u.edgeTextEdit,d=u.nodeTextEdit;(p||d)&&o&&a.textEditElement.setElementState(_t.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}}])&&tw(t.prototype,n),e}(),rw=i(168),ow=i.n(rw);function iw(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 of(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ug=function(){function e(r){(function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),of(this,"mousetrap",void 0),of(this,"options",void 0),of(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var a=r.lf;this.target=a.container,this.mousetrap=new ow.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(Jt(a))a.forEach(function(d){var O=d.keys,_=d.callback,S=d.action;return r.on(O,_,S)});else{var o=a.keys,u=a.callback,p=a.action;this.on(o,u,p)}}},{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")}}])&&iw(t.prototype,n),e}(),aw=ug,Er=null;function sg(e,t){return e.x+=t,e.y+=t,e.text&&(e.text.x+=t,e.text.y+=t),e}function cg(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 af(e){return af=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},af(e)}function lg(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 Ei(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lg(Object(n),!0).forEach(function(r){Bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fg(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 uf=function(){function e(a){var o,u,p=this;(function(d,O){if(!(d instanceof O))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 p.viewMap.get(d)}),a=fh(a),this.options=a,this.container=this.initContainer(a.container),this.plugins=a.plugins,this.graphModel=new dm(Ei({},a)),this.tool=new nw(this),this.history=new V_(this.graphModel.eventCenter),this.dnd=new c0({lf:this}),this.keyboard=new aw({lf:this,keyboard:a.keyboard}),a.snapline!==!1&&(this.snaplineModel=new _y(this.graphModel),o=this.graphModel.eventCenter,u=this.snaplineModel,o.on("node:mousemove",function(d){var O=d.data;u.setNodeSnapLine(O)}),o.on("node:mouseup",function(){u.clearSnapline()})),function(d,O){var _=d.keyboard,S=_.options.keyboard;_.on(["cmd + c","ctrl + c"],function(){if(!S.enabled||O.textEditElement)return!0;var k=d.options.guards,R=O.getSelectElements(!1);return k&&k.beforeClone&&!k.beforeClone(R)||R.nodes.length===0&&R.edges.length===0?(Er=null,!0):((Er=R).nodes.forEach(function(X){return sg(X,40)}),Er.edges.forEach(function(X){return cg(X,40)}),!1)}),_.on(["cmd + v","ctrl + v"],function(){if(!S.enabled||O.textEditElement)return!0;if(Er&&(Er.nodes||Er.edges)){d.clearSelectElements();var k=d.addElements(Er);if(!k)return!0;k.nodes.forEach(function(R){return d.selectElementById(R.id,!0)}),k.edges.forEach(function(R){return d.selectElementById(R.id,!0)}),Er.nodes.forEach(function(R){return sg(R,40)}),Er.edges.forEach(function(R){return cg(R,40)})}return!1}),_.on(["cmd + z","ctrl + z"],function(){return!S.enabled||!!O.textEditElement||(d.undo(),!1)}),_.on(["cmd + y","ctrl + y"],function(){return!S.enabled||!!O.textEditElement||(d.redo(),!1)}),_.on(["backspace"],function(){if(!S.enabled||O.textEditElement)return!0;var k=O.getSelectElements(!0);return d.clearSelectElements(),k.edges.forEach(function(R){return d.deleteEdge(R.id)}),k.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 p={BaseEdge:Oi,BaseEdgeModel:Os,BaseNode:Or,BaseNodeModel:mr,RectNode:Qc,RectNodeModel:Nc,CircleNode:rl,CircleNodeModel:hc,PolygonNode:sl,PolygonNodeModel:kc,TextNode:Ol,TextNodeModel:Lc,LineEdge:zl,LineEdgeModel:Ss,DiamondNode:pl,DiamondNodeModel:mc,PolylineEdge:Gl,PolylineEdgeModel:ks,BezierEdge:Wl,BezierEdgeModel:sc,EllipseNode:vl,EllipseNodeModel:xc,HtmlNode:El,HtmlNodeModel:Fc,h:te.g,type:a};this.viewMap.forEach(function(k){var R=k.extendKey;R&&(p[R]=k)}),this.graphModel.modelMap.forEach(function(k){var R=k.extendKey;R&&(p[R]=k)});var d=o(p),O=d.view,_=d.model,S=O;u&&!S.isObervered&&(S.isObervered=!0,S=Ue(S)),this.setView(a,S),this.graphModel.setModel(a,_)}else this.registerElement(a)}},{key:"registerElement",value:function(a){var o=a.view;a.isObserverView===!1||o.isObervered||(o.isObervered=!0,o=Ue(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:Qc,model:Nc,type:"rect"}),this.registerElement({type:"circle",view:rl,model:hc}),this.registerElement({type:"polygon",view:sl,model:kc}),this.registerElement({type:"line",view:zl,model:Ss}),this.registerElement({type:"polyline",view:Gl,model:ks}),this.registerElement({type:"bezier",view:Wl,model:sc}),this.registerElement({type:"text",view:Ol,model:Lc}),this.registerElement({type:"ellipse",view:vl,model:xc}),this.registerElement({type:"diamond",view:pl,model:mc}),this.registerElement({type:"html",view:El,model:Fc})}},{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,p=a.id;if(!u){var d=this.getNodeModelById(p);d&&(u=d.getData());var O=this.getEdgeModelById(p);O&&(u=O.textPosition)}var _=u,S=_.x,k=_.y;o.focusOn(S,k,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,p,d=this.getModelById(a);return!!d&&(u=(p=(Bt(o={},Ht.NODE,this.deleteNode),Bt(o,Ht.EDGE,this.deleteEdge),o)[d.BaseType])===null||p===void 0?void 0:p.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(),p=this.options.guards,d=!p||!p.beforeDelete||p.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 p=u.model.getData(),d=!o||!o.beforeDelete||o.beforeDelete(p);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,p=a.targetNodeId;if(u&&p){var d=[];return o.forEach(function(S){S.sourceNodeId===u&&S.targetNodeId===p&&d.push(S)}),d}if(u){var O=[];return o.forEach(function(S){S.sourceNodeId===u&&O.push(S)}),O}if(p){var _=[];return o.forEach(function(S){S.targetNodeId===p&&_.push(S)}),_}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(tn(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,p=a.edges,d={},O={nodes:[],edges:[]},_=0;_<u.length;_++){var S=u[_],k=S.id,R=this.addNode(S);if(!R)return;k&&(d[k]=R.id),O.nodes.push(R)}return p.forEach(function(X){var W=X.sourceNodeId,oe=X.targetNodeId;d[W]&&(W=d[W]),d[oe]&&(oe=d[oe]);var re=o.graphModel.addEdge(Ei(Ei({},X),{},{sourceNodeId:W,targetNodeId:oe}));O.edges.push(re)}),O}},{key:"getAreaElement",value:function(a,o){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],p=!(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,p,d).map(function(O){return O.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),p=0;p<o;p++)u[p]=arguments[p];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=tn(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"redo",value:function(){if(this.history.redoAble()){var a=tn(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]:[],p=(a=this.plugins)!==null&&a!==void 0?a:e.extensions;p.forEach(function(d){var O=d.pluginName||d.name;u.indexOf(O)===-1&&o.installPlugin(d)})}},{key:"installPlugin",value:function(a){if(af(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 p=a,d=new p({lf:this,LogicFlow:e,options:this.options.pluginsOptions});d.render&&this.components.push(d.render.bind(d)),this.extension[p.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(Ei(Ei({},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(tn(a)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(te.j)(Object(te.g)(u0,{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&&fg(t.prototype,n),r&&fg(t,r),e}();function Gn(e){return Ue(e)}Bt(uf,"extensions",new Map),f.default=uf}])})})(ff,ff.exports);var Je=ff.exports;const zo=Tw(Je);function Hw(g,h){return h={exports:{}},g(h,h.exports),h.exports}var Gw=Hw(function(g){var h=g.exports=function(s,f){if(f||(f=16),s===void 0&&(s=128),s<=0)return"0";for(var i=Math.log(Math.pow(2,s))/Math.log(f),l=2;i===1/0;l*=2)i=Math.log(Math.pow(2,s/l))/Math.log(f)*l;for(var c=i-Math.floor(i),v="",l=0;l<Math.floor(i);l++){var m=Math.floor(Math.random()*f).toString(f);v=m+v}if(c){var x=Math.pow(f,c),m=Math.floor(Math.random()*x).toString(f);v=m+v}var w=parseInt(v,f);return w!==1/0&&w>=Math.pow(2,s)?h(s,f):v};h.rack=function(s,f,i){var l=function(v){var m=0;do{if(m++>10)if(i)s+=i;else throw new Error("too many ID collisions, use more bits");var x=h(s,f)}while(Object.hasOwnProperty.call(c,x));return c[x]=v,x},c=l.hats={};return l.get=function(v){return l.hats[v]},l.set=function(v,m){return l.hats[v]=m,l},l.bits=s||128,l.base=f||16,l}});function ur(g){if(!(this instanceof ur))return new ur(g);g=g||[128,36,1],this._seed=g.length?Gw.rack(g[0],g[1],g[2]):g}ur.prototype.next=function(g){return this._seed(g||!0)};ur.prototype.nextPrefixed=function(g,h){var s;do s=g+this.next(!0);while(this.assigned(s));return this.claim(s,h),s};ur.prototype.claim=function(g,h){this._seed.set(g,h||!0)};ur.prototype.assigned=function(g){return this._seed.get(g)||!1};ur.prototype.unclaim=function(g){delete this._seed.hats[g]};ur.prototype.clear=function(){var g=this._seed.hats,h;for(h in g)this.unclaim(h)};var Xw=new ur([32,32,1]);function Go(){return Xw.next()}var Wg=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),Yw=function(g){Wg(h,g);function h(s,f){var i=this;return s.id||(s.id="Event_"+Go()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=g.call(this,s,f)||this,i}return h.prototype.setAttributes=function(){this.r=18},h.prototype.getConnectedTargetRules=function(){var s=g.prototype.getConnectedTargetRules.call(this),f={message:"起始节点不能作为边的终点",validate:function(){return!1}};return s.push(f),s},h.extendKey="StartEventModel",h}(Je.CircleNodeModel),Vw=function(g){Wg(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.extendKey="StartEventNode",h}(Je.CircleNode),Ww={type:"bpmn:startEvent",view:Vw,model:Yw},Kg=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),ku=globalThis&&globalThis.__assign||function(){return ku=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},ku.apply(this,arguments)},Kw=function(g){Kg(h,g);function h(s,f){var i=this;return s.id||(s.id="Event_"+Go()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=g.call(this,s,f)||this,i}return h.prototype.setAttributes=function(){this.r=18},h.prototype.getConnectedSourceRules=function(){var s=g.prototype.getConnectedSourceRules.call(this),f={message:"结束节点不能作为边的起点",validate:function(){return!1}};return s.push(f),s},h.extendKey="EndEventModel",h}(Je.CircleNodeModel),Zw=function(g){Kg(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},h.prototype.getShape=function(){var s=this.props.model,f=s.getNodeStyle(),i=s.x,l=s.y,c=s.r,v=g.prototype.getShape.call(this);return Je.h("g",{},v,Je.h("circle",ku(ku({},f),{cx:i,cy:l,r:c-5})))},h.extendKey="EndEventView",h}(Je.CircleNode),qw={type:"bpmn:endEvent",view:Zw,model:Kw},Zg=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),ki=globalThis&&globalThis.__assign||function(){return ki=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},ki.apply(this,arguments)},Jw=function(g){Zg(h,g);function h(s,f){var i=this;return s.id||(s.id="Gateway_"+Go()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),i=g.call(this,s,f)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return h.extendKey="ExclusiveGatewayModel",h}(Je.PolygonNodeModel),$w=function(g){Zg(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getShape=function(){var s=this.props.model,f=s.x,i=s.y,l=s.width,c=s.height,v=s.points,m=s.getNodeStyle();return Je.h("g",{transform:"matrix(1 0 0 1 "+(f-l/2)+" "+(i-c/2)+")"},Je.h("polygon",ki(ki({},m),{x:f,y:i,points:v})),Je.h("path",ki({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"},m)))},h.extendKey="ExclusiveGatewayNode",h}(Je.PolygonNode),Qw={type:"bpmn:exclusiveGateway",view:$w,model:Jw},qg=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),Mu=globalThis&&globalThis.__assign||function(){return Mu=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},Mu.apply(this,arguments)},e1=function(g){qg(h,g);function h(s,f){var i=this;return s.id||(s.id="Activity_"+Go()),i=g.call(this,s,f)||this,i}return h.extendKey="UserTaskModel",h}(Je.RectNodeModel),t1=function(g){qg(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getLabelShape=function(){var s=this.props.model,f=s.x,i=s.y,l=s.width,c=s.height,v=s.getNodeStyle();return Je.h("svg",{x:f-l/2+5,y:i-c/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Je.h("path",{fill:v.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"}))},h.prototype.getShape=function(){var s=this.props.model,f=s.x,i=s.y,l=s.width,c=s.height,v=s.radius,m=s.getNodeStyle();return Je.h("g",{},[Je.h("rect",Mu(Mu({},m),{x:f-l/2,y:i-c/2,rx:v,ry:v,width:l,height:c})),this.getLabelShape()])},h.extendKey="UserTaskNode",h}(Je.RectNode),n1={type:"bpmn:userTask",view:t1,model:e1},Jg=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),pf=globalThis&&globalThis.__assign||function(){return pf=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},pf.apply(this,arguments)},r1=function(g){Jg(h,g);function h(s,f){var i=this;return s.id||(s.id="Activity_"+Go()),i=g.call(this,s,f)||this,i}return h.extendKey="ServiceTaskModel",h}(Je.RectNodeModel),o1=function(g){Jg(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getLabelShape=function(){var s=this.props.model,f=s.x,i=s.y,l=s.width,c=s.height,v=s.getNodeStyle();return Je.h("svg",{x:f-l/2+5,y:i-c/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Je.h("path",{fill:v.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"}))},h.prototype.getShape=function(){var s=this.props.model,f=s.x,i=s.y,l=s.width,c=s.height,v=s.radius,m=s.getNodeStyle();return Je.h("g",{},[Je.h("rect",pf({x:f-l/2,y:i-c/2,rx:v,ry:v,width:l,height:c},m)),this.getLabelShape()])},h.extendKey="ServiceTaskNode",h}(Je.RectNode),i1={type:"bpmn:serviceTask",view:o1,model:r1},$g=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),a1=function(g){$g(h,g);function h(s,f){var i=this;return s.id||(s.id="Flow_"+Go()),i=g.call(this,s,f)||this,i}return h.extendKey="SequenceFlowModel",h}(Je.PolylineEdgeModel),u1=function(g){$g(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.extendKey="SequenceFlowEdge",h}(Je.PolylineEdge),s1={type:"bpmn:sequenceFlow",view:u1,model:a1},mg={width:40,height:40},Og={width:40,height:40},_g={width:40,height:40},wg={width:100,height:80},xg={width:100,height:80},c1={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}}},l1=function(){function g(h){var s=h.lf;s.setTheme(c1),s.register(Ww),s.register(qw),s.register(Qw),s.register(n1),s.register(i1),s.options.customBpmnEdge||(s.register(s1),s.setDefaultEdgeType("bpmn:sequenceFlow"))}return g.pluginName="bpmnElement",g}(),f1=function(){function g(h){var s=this,f=h.lf;this.lf=f,this.customCssRules="",this.useGlobalRules=!0,f.getSnapshot=function(i,l){s.getSnapshot(i,l)},f.getSnapshotBlob=function(i){return s.getSnapshotBlob(i)},f.getSnapshotBase64=function(i){return s.getSnapshotBase64(i)}}return g.prototype.getSvgRootElement=function(h){var s=h.container.querySelector(".lf-canvas-overlay");return s},g.prototype.triggerDownload=function(h){var s=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),f=document.createElement("a");f.setAttribute("download",this.fileName),f.setAttribute("href",h),f.setAttribute("target","_blank"),f.dispatchEvent(s)},g.prototype.removeAnchor=function(h){for(var s=h.childNodes,f=h.childNodes&&h.childNodes.length,i=0;i<f;i++){var l=s[i],c=l.classList&&Array.from(l.classList)||[];c.indexOf("lf-anchor")>-1&&(h.removeChild(h.childNodes[i]),f--,i--)}},g.prototype.getSnapshot=function(h,s){var f=this;this.fileName=h||"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");f.triggerDownload(c)})},g.prototype.getSnapshotBase64=function(h){var s=this,f=this.getSvgRootElement(this.lf);return new Promise(function(i){s.getCanvasData(f,h).then(function(l){var c=l.toDataURL("image/png");i({data:c,width:l.width,height:l.height})})})},g.prototype.getSnapshotBlob=function(h){var s=this,f=this.getSvgRootElement(this.lf);return new Promise(function(i){s.getCanvasData(f,h).then(function(l){l.toBlob(function(c){i({data:c,width:l.width,height:l.height})},"image/png")})})},g.prototype.getClassRules=function(){var h="";if(this.useGlobalRules)for(var s=document.styleSheets,f=0;f<s.length;f++)for(var i=s[f],l=0;l<i.cssRules.length;l++)h+=i.cssRules[l].cssText;return this.customCssRules&&(h+=this.customCssRules),h},g.prototype.getCanvasData=function(h,s){var f=this,i=h.cloneNode(!0),l=i.lastChild,c=l.childNodes&&l.childNodes.length;if(c)for(var v=0;v<c;v++){var m=l.childNodes[v],x=m.classList&&Array.from(m.classList);if(x&&x.indexOf("lf-base")<0)l.removeChild(l.childNodes[v]),c--,v--;else{var w=l.childNodes[v];w&&w.childNodes.forEach(function(le){var ce=le;f.removeAnchor(ce.firstChild)})}}var A=window.devicePixelRatio||1,P=document.createElement("canvas"),j=this.lf.graphModel.rootEl.querySelector(".lf-base"),D=j.getBoundingClientRect(),N=document.querySelector(".lf-canvas-overlay").getBoundingClientRect(),I=D.x-N.x,B=D.y-N.y,H=this.lf.graphModel,ee=H.transformModel,ie=ee.SCALE_X,J=ee.SCALE_Y,V=ee.TRANSLATE_X,Z=ee.TRANSLATE_Y;i.lastChild.style.transform="matrix(1, 0, 0, 1, "+((-I+V)*(1/ie)+10)+", "+((-B+Z)*(1/J)+10)+")";var z=Math.ceil(D.width/ie),T=Math.ceil(D.height/J);P.style.width=z+"px",P.style.height=T+"px",P.width=z*A+80,P.height=T*A+80;var L=P.getContext("2d");L.clearRect(0,0,P.width,P.height),L.scale(A,A),s?(L.fillStyle=s,L.fillRect(0,0,z*A+80,T*A+80)):L.clearRect(0,0,z,T);var C=new Image,F=document.createElement("style");F.innerHTML=this.getClassRules();var $=document.createElement("foreignObject");return $.appendChild(F),i.appendChild($),new Promise(function(le){C.onload=function(){var xe=navigator.userAgent.indexOf("Firefox")>-1;try{xe?createImageBitmap(C,{resizeWidth:P.width,resizeHeight:P.height}).then(function(ge){L.drawImage(ge,0,0),le(P)}):(L.drawImage(C,0,0),le(P))}catch(ge){L.drawImage(C,0,0),le(P)}};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})},g.pluginName="snapshot",g}(),p1=new ur([32,32,1]);function Eg(){return p1.next()}function Qg(g){return Object.prototype.toString.call(g)}function d1(g){return" ".repeat(g)}function Tu(g){var h=g;return Qg(g)==="[object Object]"?(h={},Object.keys(g).forEach(function(s){var f=s;s.charAt(0)==="-"&&(f=s.substring(1)),h[f]=Tu(g[s])})):Array.isArray(g)&&(h=[],g.forEach(function(s,f){h[f]=Tu(s)})),h}function h1(g){var h=g;try{typeof h!="string"&&(h=JSON.parse(g))}catch(s){h=JSON.stringify(Tu(g)).replace(/"/g,"'")}return h}var Bo=`
`;function Su(g,h,s){var f=d1(s),i="";if(h==="#text")return Bo+f+g;if(h==="#cdata-section")return Bo+f+"<![CDATA["+g+"]]>";if(h==="#comment")return Bo+f+"<!--"+g+"-->";if((""+h).charAt(0)==="-")return" "+h.substring(1)+'="'+h1(g)+'"';if(Array.isArray(g))g.forEach(function(m){i+=Su(m,h,s+1)});else if(Qg(g)==="[object Object]"){var l=Object.keys(g),c="",v="";i+=(s===0?"":Bo+f)+"<"+h,l.forEach(function(m){m.charAt(0)==="-"?c+=Su(g[m],m,s+1):v+=Su(g[m],m,s+1)}),i+=c+(v!==""?">"+v+(Bo+f)+"</"+h+">":" />")}else i+=Bo+f+("<"+h+">"+g.toString()+"</"+h+">");return i}function y1(g){var h="";for(var s in g)h+=Su(g[s],s,0);return h}var hn=function(){};hn.ObjTree=function(){return this};hn.ObjTree.VERSION="0.23";hn.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
`;hn.ObjTree.prototype.attr_prefix="-";hn.ObjTree.prototype.parseXML=function(g){var h;if(window.DOMParser){var s=new DOMParser,f=s.parseFromString(g,"application/xml");if(!f)return;h=f.documentElement}else window.ActiveXObject&&(s=new ActiveXObject("Microsoft.XMLDOM"),s.async=!1,s.loadXML(g),h=s.documentElement);if(h)return this.parseDOM(h)};hn.ObjTree.prototype.parseHTTP=function(g,h,s){var f={};for(var i in h)f[i]=h[i];if(f.method||(typeof f.postBody=="undefined"&&typeof f.postbody=="undefined"&&typeof f.parameters=="undefined"?f.method="get":f.method="post"),s){f.asynchronous=!0;var l=this,c=s,v=f.onComplete;f.onComplete=function(w){var A;w&&w.responseXML&&w.responseXML.documentElement&&(A=l.parseDOM(w.responseXML.documentElement)),c(A,w),v&&v(w)}}else f.asynchronous=!1;var m;if(typeof HTTP!="undefined"&&HTTP.Request){f.uri=g;var x=new HTTP.Request(f);x&&(m=x.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var x=new Ajax.Request(g,f);x&&(m=x.transport)}if(s)return m;if(m&&m.responseXML&&m.responseXML.documentElement)return this.parseDOM(m.responseXML.documentElement)};hn.ObjTree.prototype.parseDOM=function(g){if(g){if(this.__force_array={},this.force_array)for(var h=0;h<this.force_array.length;h++)this.__force_array[this.force_array[h]]=1;var s=this.parseElement(g);if(this.__force_array[g.nodeName]&&(s=[s]),g.nodeType!=11){var f={};f[g.nodeName]=s,s=f}return s}};hn.ObjTree.prototype.parseElement=function(g){if(g.nodeType!=7){if(g.nodeType==3||g.nodeType==4||g.nodeType==8){var h=g.nodeValue.match(/[^\x00-\x20]/);return h==null?void 0:g.nodeValue}var s=null,f={};if(g.attributes&&g.attributes.length){s={};for(var i=0;i<g.attributes.length;i++){var l=g.attributes[i].nodeName;if(typeof l=="string"){var c=g.attributes[i].nodeValue;try{c=JSON.parse(g.attributes[i].nodeValue.replace(/'/g,'"'))}catch(x){c=g.attributes[i].nodeValue}c&&(l=this.attr_prefix+l,typeof f[l]=="undefined"&&(f[l]=0),f[l]++,this.addNode(s,l,f[l],c))}}}if(g.childNodes&&g.childNodes.length){var v=!0;s&&(v=!1);for(var i=0;i<g.childNodes.length&&v;i++){var m=g.childNodes[i].nodeType;m==3||m==4||m==8||(v=!1)}if(v){s||(s="");for(var i=0;i<g.childNodes.length;i++)s+=g.childNodes[i].nodeValue}else{s||(s={});for(var i=0;i<g.childNodes.length;i++){var l=g.childNodes[i].nodeName;if(typeof l=="string"){var c=this.parseElement(g.childNodes[i]);c&&(typeof f[l]=="undefined"&&(f[l]=0),f[l]++,this.addNode(s,l,f[l],c))}}}}else s===null&&(s={});return s}};hn.ObjTree.prototype.addNode=function(g,h,s,f){this.__force_array[h]?(s==1&&(g[h]=[]),g[h][g[h].length]=f):s==1?g[h]=f:s==2?g[h]=[g[h],f]:g[h][g[h].length]=f};hn.ObjTree.prototype.writeXML=function(g){var h=this.hash_to_xml(null,g);return this.xmlDecl+h};hn.ObjTree.prototype.hash_to_xml=function(g,h){var s=[],f=[];for(var i in h)if(h.hasOwnProperty(i)){var l=h[i];i.charAt(0)!=this.attr_prefix?typeof l=="undefined"||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):f[f.length]=" "+i.substring(1)+'="'+this.xml_escape(l)+'"'}var c=f.join(""),v=s.join("");return typeof g=="undefined"||g==null||(s.length>0?v.match(/\n/)?v="<"+g+c+`>
`+v+"</"+g+`>
`:v="<"+g+c+">"+v+"</"+g+`>
`:v="<"+g+c+` />
`),v};hn.ObjTree.prototype.array_to_xml=function(g,h){for(var s=[],f=0;f<h.length;f++){var i=h[f];typeof i=="undefined"||i==null?s[s.length]="<"+g+" />":typeof i=="object"&&i.constructor==Array?s[s.length]=this.array_to_xml(g,i):typeof i=="object"?s[s.length]=this.hash_to_xml(g,i):s[s.length]=this.scalar_to_xml(g,i)}return s.join("")};hn.ObjTree.prototype.scalar_to_xml=function(g,h){return g=="#text"?this.xml_escape(h):"<"+g+">"+this.xml_escape(h)+"</"+g+`>
`};hn.ObjTree.prototype.xml_escape=function(g){return g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var g1=function(g){return new hn.ObjTree().parseXML(g)},v1=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),df=globalThis&&globalThis.__assign||function(){return df=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},df.apply(this,arguments)},Lu=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l},sr;(function(g){g.START="bpmn:startEvent",g.END="bpmn:endEvent",g.GATEWAY="bpmn:exclusiveGateway",g.USER="bpmn:userTask",g.SYSTEM="bpmn:serviceTask",g.FLOW="bpmn:sequenceFlow"})(sr||(sr={}));var ev=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],Sg=["properties","startPoint","endPoint","pointsList"];function jg(g){var h=g?Sg.concat(g):Sg;return function(s){function f(i){var l={};return typeof i=="string"?i:Array.isArray(i)?i.map(function(c){return f(c)}):(Object.entries(i).forEach(function(c){var v=Lu(c,2),m=v[0],x=v[1];typeof x!="object"?m.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(m)?l[m]=x:l["-"+m]=x:h.includes(m)?l["-"+m]=f(x):l[m]=f(x)}),l)}return f(s)}}function Du(g){var h={};return Object.entries(g).forEach(function(s){var f=Lu(s,2),i=f[0],l=f[1];i.indexOf("-")===0?h[i.substring(1)]=Tu(l):typeof l=="string"?h[i]=l:Object.prototype.toString.call(l)==="[object Object]"?h[i]=Du(l):Array.isArray(l)?h[i]=l.map(function(c){return Du(c)}):h[i]=l}),h}function b1(g,h,s){var f=new Map;h.nodes.forEach(function(l){var c,v={"-id":l.id};if(!((c=l.text)===null||c===void 0)&&c.value&&(v["-name"]=l.text.value),l.properties){var m=jg(s)(l.properties);Object.assign(v,m)}f.set(l.id,v),g[l.type]?Array.isArray(g[l.type])?g[l.type].push(v):g[l.type]=[g[l.type],v]:g[l.type]=v});var i=h.edges.map(function(l){var c,v,m=f.get(l.targetNodeId);m["bpmn:incoming"]?Array.isArray(m["bpmn:incoming"])?m["bpmn:incoming"].push(l.id):m["bpmn:incoming"]=[m["bpmn:incoming"],l.id]:m["bpmn:incoming"]=l.id;var x={"-id":l.id,"-sourceRef":l.sourceNodeId,"-targetRef":l.targetNodeId};if(!((c=l.text)===null||c===void 0)&&c.value&&(x["-name"]=(v=l.text)===null||v===void 0?void 0:v.value),l.properties){var w=jg(s)(l.properties);Object.assign(x,w)}return x});h.edges.forEach(function(l){var c=f.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}),g[sr.FLOW]=i}function m1(g,h){g["bpmndi:BPMNEdge"]=h.edges.map(function(s){var f,i=s.id,l=s.pointsList.map(function(v){var m=v.x,x=v.y;return{"-x":m,"-y":x}}),c={"-id":i+"_di","-bpmnElement":i,"di:waypoint":l};return!((f=s.text)===null||f===void 0)&&f.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}),g["bpmndi:BPMNShape"]=h.nodes.map(function(s){var f,i=s.id,l=100,c=80,v=s.x,m=s.y,x=Vr.shapeConfigMap.get(s.type);x&&(l=x.width,c=x.height),v-=l/2,m-=c/2;var w={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":v,"-y":m,"-width":l,"-height":c}};return!((f=s.text)===null||f===void 0)&&f.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 O1(g){var h=[],s=[],f=g["bpmn:definitions"];if(f){var i=f["bpmn:process"];Object.keys(i).forEach(function(l){if(l.indexOf("bpmn:")===0){var c=i[l];if(l===sr.FLOW){var v=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];s=w1(c,v)}else{var m=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];h=h.concat(_1(c,m,l))}}})}return{nodes:h,edges:s}}function _1(g,h,s){var f=[];if(Array.isArray(g))g.forEach(function(c){var v;Array.isArray(h)?v=h.find(function(x){return x["-bpmnElement"]===c["-id"]}):v=h;var m=Pg(v,s,c);f.push(m)});else{var i=void 0;Array.isArray(h)?i=h.find(function(c){return c["-bpmnElement"]===g["-id"]}):i=h;var l=Pg(i,s,g);f.push(l)}return f}function Pg(g,h,s){var f=Number(g["dc:Bounds"]["-x"]),i=Number(g["dc:Bounds"]["-y"]),l=s["-name"],c=Vr.shapeConfigMap.get(h);c&&(f+=c.width/2,i+=c.height/2);var v;Object.entries(s).forEach(function(A){var P=Lu(A,2),j=P[0],D=P[1];ev.indexOf(j)===-1&&(v||(v={}),v[j]=D)}),v&&(v=Du(v));var m;if(l&&(m={x:f,y:i,value:l},g["bpmndi:BPMNLabel"]&&g["bpmndi:BPMNLabel"]["dc:Bounds"])){var x=g["bpmndi:BPMNLabel"]["dc:Bounds"];m.x=Number(x["-x"])+Number(x["-width"])/2,m.y=Number(x["-y"])+Number(x["-height"])/2}var w={id:g["-bpmnElement"],type:h,x:f,y:i,properties:v};return m&&(w.text=m),w}function w1(g,h){var s=[];if(Array.isArray(g))g.forEach(function(i){var l;Array.isArray(h)?l=h.find(function(c){return c["-bpmnElement"]===i["-id"]}):l=h,s.push(Ag(l,i))});else{var f=void 0;Array.isArray(h)?f=h.find(function(i){return i["-bpmnElement"]===g["-id"]}):f=h,s.push(Ag(f,g))}return s}function Ag(g,h){var s,f=h["-name"];if(f){var i=g["bpmndi:BPMNLabel"]["dc:Bounds"],l=0;f.split(`
`).forEach(function(m){l<m.length&&(l=m.length)}),s={value:f,x:Number(i["-x"])+l*10/2,y:Number(i["-y"])+7}}var c;Object.entries(h).forEach(function(m){var x=Lu(m,2),w=x[0],A=x[1];ev.indexOf(w)===-1&&(c||(c={}),c[w]=A)}),c&&(c=Du(c));var v={id:h["-id"],type:sr.FLOW,pointsList:g["di:waypoint"].map(function(m){return{x:Number(m["-x"]),y:Number(m["-y"])}}),sourceNodeId:h["-sourceRef"],targetNodeId:h["-targetRef"],properties:c};return s&&(v.text=s),v}var Vr=function(){function g(h){var s=this,f=h.lf;this.adapterOut=function(i,l){var c=df({},s.processAttributes);b1(c,i,l);var v={"-id":"BPMNPlane_1","-bpmnElement":c["-id"]};m1(v,i);var m=s.definitionAttributes;m["bpmn:process"]=c,m["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":v};var x={"bpmn:definitions":m};return x},this.adapterIn=function(i){if(i)return O1(i)},f.adapterIn=function(i){return s.adapterIn(i)},f.adapterOut=function(i,l){return s.adapterOut(i,l)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+Eg()},this.definitionAttributes={"-id":"Definitions_"+Eg(),"-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 g.prototype.setCustomShape=function(h,s){g.shapeConfigMap.set(h,s)},g.pluginName="bpmn-adapter",g.shapeConfigMap=new Map,g}();Vr.shapeConfigMap.set(sr.START,{width:mg.width,height:mg.height});Vr.shapeConfigMap.set(sr.END,{width:Og.width,height:Og.height});Vr.shapeConfigMap.set(sr.GATEWAY,{width:_g.width,height:_g.height});Vr.shapeConfigMap.set(sr.SYSTEM,{width:wg.width,height:wg.height});Vr.shapeConfigMap.set(sr.USER,{width:xg.width,height:xg.height});(function(g){v1(h,g);function h(s){var f=g.call(this,s)||this;f.adapterXmlIn=function(l){var c=g1(l);return f.adapterIn(c)},f.adapterXmlOut=function(l,c){var v=f.adapterOut(l,c);return y1(v)};var i=s.lf;return i.adapterIn=f.adapterXmlIn,i.adapterOut=f.adapterXmlOut,f}return h.pluginName="bpmnXmlAdapter",h})(Vr);var kg=globalThis&&globalThis.__assign||function(){return kg=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},kg.apply(this,arguments)};globalThis&&globalThis.__read;var Mg;(function(g){g.HORIZONTAL="horizontal",g.VERTICAL="vertical"})(Mg||(Mg={}));var x1=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var E1=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var S1=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l},j1=globalThis&&globalThis.__spread||function(){for(var g=[],h=0;h<arguments.length;h++)g=g.concat(S1(arguments[h]));return g},Si="lf:defaultNodeMenu",ji="lf:defaultEdgeMenu",Pi="lf:defaultGraphMenu",Tg="lf:defaultSelectionMenu",P1=function(){function g(h){var s=this,f=h.lf;this.__menuDOM=document.createElement("ul"),this.lf=f,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 g.prototype.init=function(){var h=this,s=[{text:"删除",callback:function(l){h.lf.deleteNode(l.id)}},{text:"编辑文本",callback:function(l){h.lf.graphModel.editText(l.id)}},{text:"复制",callback:function(l){h.lf.cloneNode(l.id)}}];this.menuTypeMap.set(Si,s);var f=[{text:"删除",callback:function(l){h.lf.deleteEdge(l.id)}},{text:"编辑文本",callback:function(l){h.lf.graphModel.editText(l.id)}}];this.menuTypeMap.set(ji,f),this.menuTypeMap.set(Pi,[]);var i=[{text:"删除",callback:function(l){h.lf.clearSelectElements(),l.edges.forEach(function(c){return h.lf.deleteEdge(c.id)}),l.nodes.forEach(function(c){return h.lf.deleteNode(c.id)})}}];this.menuTypeMap.set(Tg,i)},g.prototype.render=function(h,s){var f=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(f.__currentData),f.__menuDOM.style.display="none",f.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!")},!0),this.lf.on("node:contextmenu",function(i){var l=i.data,c=i.position,v=c.domOverlayPosition,m=v.x,x=v.y,w=l.id,A=f.lf.graphModel.getNodeModelById(w),P=[],j=f.menuTypeMap.get(A.type);A&&A.menu&&Array.isArray(A.menu)?P=A.menu:j?P=j:P=f.menuTypeMap.get(Si),f.__currentData=l,f.showMenu(m,x,P)}),this.lf.on("edge:contextmenu",function(i){var l=i.data,c=i.position,v=c.domOverlayPosition,m=v.x,x=v.y,w=l.id,A=f.lf.graphModel.getEdgeModelById(w),P=[],j=f.menuTypeMap.get(A.type);A&&A.menu&&Array.isArray(A.menu)?P=A.menu:j?P=j:P=f.menuTypeMap.get(ji),f.__currentData=l,f.showMenu(m,x,P)}),this.lf.on("blank:contextmenu",function(i){var l=i.position,c=f.menuTypeMap.get(Pi),v=l.domOverlayPosition,m=v.x,x=v.y;f.showMenu(m,x,c)}),this.lf.on("selection:contextmenu",function(i){var l=i.data,c=i.position,v=f.menuTypeMap.get(Tg),m=c.domOverlayPosition,x=m.x,w=m.y;f.__currentData=l,f.showMenu(x,w,v)}),this.lf.on("node:mousedown",function(){f.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){f.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){f.__menuDOM.style.display="none"})},g.prototype.destroy=function(){var h;(h=this===null||this===void 0?void 0:this.__container)===null||h===void 0||h.removeChild(this.__menuDOM),this.__menuDOM=null},g.prototype.showMenu=function(h,s,f){if(!(!f||!f.length)){var i=this.__menuDOM;i.innerHTML="",i.append.apply(i,j1(this.__getMenuDom(f))),i.children.length&&(i.style.display="block",i.style.top=s+"px",i.style.left=h+"px")}},g.prototype.setMenuByType=function(h){!h.type||!h.menu||this.menuTypeMap.set(h.type,h.menu)},g.prototype.__getMenuDom=function(h){var s=[];return h&&h.length>0&&h.forEach(function(f){var i=document.createElement("li");if(f.className?i.className="lf-menu-item "+f.className:i.className="lf-menu-item",f.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",f.text&&(c.innerText=f.text),i.appendChild(c),i.onclickCallback=f.callback,s.push(i)}),s},g.prototype.setMenuConfig=function(h){h&&(h.nodeMenu!==void 0&&this.menuTypeMap.set(Si,h.nodeMenu?h.nodeMenu:[]),h.edgeMenu!==void 0&&this.menuTypeMap.set(ji,h.edgeMenu?h.edgeMenu:[]),h.graphMenu!==void 0&&this.menuTypeMap.set(Pi,h.graphMenu?h.graphMenu:[]))},g.prototype.addMenuConfig=function(h){if(h){if(Array.isArray(h.nodeMenu)){var s=this.menuTypeMap.get(Si);this.menuTypeMap.set(Si,s.concat(h.nodeMenu))}if(Array.isArray(h.edgeMenu)){var s=this.menuTypeMap.get(ji);this.menuTypeMap.set(ji,s.concat(h.edgeMenu))}if(Array.isArray(h.graphMenu)){var s=this.menuTypeMap.get(Pi);this.menuTypeMap.set(Pi,s.concat(h.graphMenu))}}},g.prototype.changeMenuItem=function(h,s){if(h==="add")this.addMenuConfig(s);else if(h==="reset")this.setMenuConfig(s);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},g.pluginName="menu",g}();globalThis&&globalThis.__read;var A1=function(){function g(h){var s=this,f=h.lf;this.lf=f,this.lf.setPatternItems=function(i){s.setPatternItems(i)}}return g.prototype.render=function(h,s){var f=this;if(this.destroy(),!this.shapeList||this.shapeList.length===0){this.domContainer=s;return}this.panelEl=document.createElement("div"),this.panelEl.className="lf-dndpanel",this.shapeList.forEach(function(i){f.panelEl.appendChild(f.createDndItem(i))}),s.appendChild(this.panelEl),this.domContainer=s},g.prototype.destroy=function(){this.domContainer&&this.panelEl&&this.domContainer.contains(this.panelEl)&&this.domContainer.removeChild(this.panelEl)},g.prototype.setPatternItems=function(h){this.shapeList=h,this.domContainer&&this.render(this.lf,this.domContainer)},g.prototype.createDndItem=function(h){var s=this,f=document.createElement("div");f.className=h.className?"lf-dnd-item "+h.className:"lf-dnd-item";var i=document.createElement("div");if(i.className="lf-dnd-shape",h.icon&&(i.style.backgroundImage="url("+h.icon+")"),f.appendChild(i),h.label){var l=document.createElement("div");l.innerText=h.label,l.className="lf-dnd-text",f.appendChild(l)}return f.onmousedown=function(){h.type&&s.lf.dnd.startDrag({type:h.type,properties:h.properties,text:h.text}),h.callback&&h.callback(s.lf,s.domContainer)},f.ondblclick=function(c){s.lf.graphModel.eventCenter.emit("dnd:panel-dbclick",{e:c,data:h})},f.onclick=function(c){s.lf.graphModel.eventCenter.emit("dnd:panel-click",{e:c,data:h})},f.oncontextmenu=function(c){s.lf.graphModel.eventCenter.emit("dnd:panel-contextmenu",{e:c,data:h})},f},g.pluginName="dndPanel",g}(),k1=function(){function g(h){var s=this,f=h.lf;this.__disabled=!1,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.__draw=function(l){var c=s.lf.getPointByClient(l.clientX,l.clientY).domOverlayPosition,v=c.x,m=c.y;s.endPoint={x:v,y:m};var x=s.startPoint,w=x.x,A=x.y,P=s.wrapper.style,j=w,D=A,N=v-w,I=m-A;v<w&&(j=v,N=w-v),m<A&&(D=m,I=A-m),P.left=j+"px",P.top=D+"px",P.width=N+"px",P.height=I+"px"},this.__drawOff=function(){document.removeEventListener("mousemove",s.__draw),document.removeEventListener("mouseup",s.__drawOff),s.wrapper.oncontextmenu=null,s.__domContainer.removeChild(s.wrapper);var l=s.startPoint,c=l.x,v=l.y,m=s.endPoint,x=m.x,w=m.y;if(!(Math.abs(x-c)<10&&Math.abs(w-v)<10)){var A=[Math.min(c,x),Math.min(v,w)],P=[Math.max(c,x),Math.max(v,w)],j=s.lf.graphModel.getAreaElement(A,P,s.isWholeEdge,s.isWholeNode,!0),D=s.lf.graphModel.group;j.forEach(function(N){(!D||!D.getNodeGroup(N.id))&&s.lf.selectElementById(N.id,!0)}),s.lf.emit("selection:selected",j)}},this.lf=f;var i=f.getEditConfig().stopMoveGraph;this.isDefaultStopMoveGraph=i,f.openSelectionSelect=function(){s.openSelectionSelect()},f.closeSelectionSelect=function(){s.closeSelectionSelect()}}return g.prototype.render=function(h,s){var f=this;this.__domContainer=s,h.on("blank:mousedown",function(i){var l=i.e,c=h.getEditConfig();if(!(!c.stopMoveGraph||f.__disabled)){var v=l.button===2;if(!v){var m=h.getPointByClient(l.clientX,l.clientY).domOverlayPosition,x=m.x,w=m.y;f.startPoint={x,y:w},f.endPoint={x,y:w};var A=document.createElement("div");A.className="lf-selection-select",A.oncontextmenu=function(j){j.preventDefault()},A.style.top=f.startPoint.y+"px",A.style.left=f.startPoint.x+"px",s.appendChild(A),f.wrapper=A,document.addEventListener("mousemove",f.__draw),document.addEventListener("mouseup",f.__drawOff)}}})},g.prototype.setSelectionSense=function(h,s){h===void 0&&(h=!0),s===void 0&&(s=!0),this.isWholeEdge=h,this.isWholeNode=s},g.prototype.openSelectionSelect=function(){var h=this.lf.getEditConfig().stopMoveGraph;h||(this.isDefaultStopMoveGraph=!1,this.lf.updateEditConfig({stopMoveGraph:!0})),this.open()},g.prototype.closeSelectionSelect=function(){this.isDefaultStopMoveGraph||this.lf.updateEditConfig({stopMoveGraph:!1}),this.close()},g.prototype.open=function(){this.__disabled=!1},g.prototype.close=function(){this.__disabled=!0},g.pluginName="selectionSelect",g}();globalThis&&globalThis.__values;function M1(g){if(g.length<=1)return!1;for(var h=0,s=g.length-1;h!==s&&h+1!==s&&s-1!==h;)h++,s--;return h===s?[--h,s]:[h,s]}var tv=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),Fo=globalThis&&globalThis.__assign||function(){return Fo=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},Fo.apply(this,arguments)},Sr=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l};(function(g){tv(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.pointFilter=function(s){for(var f=s,i=1;i<f.length-1;){var l=Sr(f[i-1],2),c=l[0],v=l[1],m=Sr(f[i],2),x=m[0],w=m[1],A=Sr(f[i+1],2),P=A[0],j=A[1];c===x&&x===P||v===w&&w===j?f.splice(i,1):i++}return f},h.prototype.getEdge=function(){var s=this.props.model,f=s.points,i=s.isAnimation,l=s.arrowConfig,c=s.radius,v=c===void 0?5:c,m=s.getEdgeStyle(),x=s.getEdgeAnimationStyle(),w=this.pointFilter(f.split(" ").map(function(Pe){return Pe.split(",").map(function(Ce){return Number(Ce)})})),A=M1(w);if(A){var P=Sr(A,2),j=P[0],D=P[1],N=w[j],I=w[D],B=N.some(function(Pe,Ce){return Pe===I[Ce]});if(!B){var H=(I[1]-N[1])/2,ee=[I[0],I[1]-H],ie=[N[0],N[1]+H];w.splice(j+1,0,ie,ee)}}for(var J=Sr(w[0],2),V=J[0],Z=J[1],z="M"+V+" "+Z,T=1;T<w.length-1;T++){var L=Sr(w[T-1],2),C=L[0],F=L[1],$=Sr(w[T],2),le=$[0],ce=$[1],ye=Sr(w[T+1],2),xe=ye[0],ge=ye[1];if(le===C&&ce!==F){var ue=ce>F?ce-v:ce+v;z=z+" L "+le+" "+ue}if(ce===F&&le!==C){var he=le>C?le-v:le+v;z=z+" L "+he+" "+ce}if(z=z+" Q "+le+" "+ce,le===xe&&ce!==ge){var ue=ce>ge?ce-v:ce+v;z=z+" "+le+" "+ue}if(ce===ge&&le!==xe){var he=le>xe?le-v:le+v;z=z+" "+he+" "+ce}}var be=Sr(w[w.length-1],2),Se=be[0],Ie=be[1];z=z+" L "+Se+" "+Ie;var Ke=Fo(Fo(Fo({d:z,style:i?x:{}},m),l),{fill:"none"});return Je.h("path",Fo({d:z},Ke))},h})(Je.PolylineEdge);(function(g){tv(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h})(Je.PolylineEdgeModel);var mf,Yt,nv,uo,Dg,rv,hf,ov={},iv=[],T1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Of=Array.isArray;function Xr(g,h){for(var s in h)g[s]=h[s];return g}function av(g){var h=g.parentNode;h&&h.removeChild(g)}function Mi(g,h,s){var f,i,l,c={};for(l in h)l=="key"?f=h[l]:l=="ref"?i=h[l]:c[l]=h[l];if(arguments.length>2&&(c.children=arguments.length>3?mf.call(arguments,2):s),typeof g=="function"&&g.defaultProps!=null)for(l in g.defaultProps)c[l]===void 0&&(c[l]=g.defaultProps[l]);return ju(g,c,f,i,null)}function ju(g,h,s,f,i){var l={type:g,props:h,key:s,ref:f,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++nv:i};return i==null&&Yt.vnode!=null&&Yt.vnode(l),l}function _f(g){return g.children}function Ho(g,h){this.props=g,this.context=h}function Ni(g,h){if(h==null)return g.__?Ni(g.__,g.__.__k.indexOf(g)+1):null;for(var s;h<g.__k.length;h++)if((s=g.__k[h])!=null&&s.__e!=null)return s.__e;return typeof g.type=="function"?Ni(g):null}function uv(g){var h,s;if((g=g.__)!=null&&g.__c!=null){for(g.__e=g.__c.base=null,h=0;h<g.__k.length;h++)if((s=g.__k[h])!=null&&s.__e!=null){g.__e=g.__c.base=s.__e;break}return uv(g)}}function Ng(g){(!g.__d&&(g.__d=!0)&&uo.push(g)&&!Nu.__r++||Dg!==Yt.debounceRendering)&&((Dg=Yt.debounceRendering)||rv)(Nu)}function Nu(){var g,h,s,f,i,l,c,v;for(uo.sort(hf);g=uo.shift();)g.__d&&(h=uo.length,f=void 0,i=void 0,c=(l=(s=g).__v).__e,(v=s.__P)&&(f=[],(i=Xr({},l)).__v=l.__v+1,pv(v,l,i,s.__n,v.ownerSVGElement!==void 0,l.__h!=null?[c]:null,f,c==null?Ni(l):c,l.__h),N1(f,l),l.__e!=c&&uv(l)),uo.length>h&&uo.sort(hf));Nu.__r=0}function sv(g,h,s,f,i,l,c,v,m,x){var w,A,P,j,D,N,I,B=f&&f.__k||iv,H=B.length;for(s.__k=[],w=0;w<h.length;w++)if((j=s.__k[w]=(j=h[w])==null||typeof j=="boolean"||typeof j=="function"?null:typeof j=="string"||typeof j=="number"||typeof j=="bigint"?ju(null,j,null,null,j):Of(j)?ju(_f,{children:j},null,null,null):j.__b>0?ju(j.type,j.props,j.key,j.ref?j.ref:null,j.__v):j)!=null){if(j.__=s,j.__b=s.__b+1,(P=B[w])===null||P&&j.key==P.key&&j.type===P.type)B[w]=void 0;else for(A=0;A<H;A++){if((P=B[A])&&j.key==P.key&&j.type===P.type){B[A]=void 0;break}P=null}pv(g,j,P=P||ov,i,l,c,v,m,x),D=j.__e,(A=j.ref)&&P.ref!=A&&(I||(I=[]),P.ref&&I.push(P.ref,null,j),I.push(A,j.__c||D,j)),D!=null?(N==null&&(N=D),typeof j.type=="function"&&j.__k===P.__k?j.__d=m=cv(j,m,g):m=lv(g,j,P,B,D,m),typeof s.type=="function"&&(s.__d=m)):m&&P.__e==m&&m.parentNode!=g&&(m=Ni(P))}for(s.__e=N,w=H;w--;)B[w]!=null&&(typeof s.type=="function"&&B[w].__e!=null&&B[w].__e==s.__d&&(s.__d=fv(f).nextSibling),hv(B[w],B[w]));if(I)for(w=0;w<I.length;w++)dv(I[w],I[++w],I[++w])}function cv(g,h,s){for(var f,i=g.__k,l=0;i&&l<i.length;l++)(f=i[l])&&(f.__=g,h=typeof f.type=="function"?cv(f,h,s):lv(s,f,f,i,f.__e,h));return h}function lv(g,h,s,f,i,l){var c,v,m;if(h.__d!==void 0)c=h.__d,h.__d=void 0;else if(s==null||i!=l||i.parentNode==null)e:if(l==null||l.parentNode!==g)g.appendChild(i),c=null;else{for(v=l,m=0;(v=v.nextSibling)&&m<f.length;m+=1)if(v==i)break e;g.insertBefore(i,l),c=l}return c!==void 0?c:i.nextSibling}function fv(g){var h,s,f;if(g.type==null||typeof g.type=="string")return g.__e;if(g.__k){for(h=g.__k.length-1;h>=0;h--)if((s=g.__k[h])&&(f=fv(s)))return f}return null}function D1(g,h,s,f,i){var l;for(l in s)l==="children"||l==="key"||l in h||Cu(g,l,null,s[l],f);for(l in h)i&&typeof h[l]!="function"||l==="children"||l==="key"||l==="value"||l==="checked"||s[l]===h[l]||Cu(g,l,h[l],s[l],f)}function Cg(g,h,s){h[0]==="-"?g.setProperty(h,s==null?"":s):g[h]=s==null?"":typeof s!="number"||T1.test(h)?s:s+"px"}function Cu(g,h,s,f,i){var l;e:if(h==="style")if(typeof s=="string")g.style.cssText=s;else{if(typeof f=="string"&&(g.style.cssText=f=""),f)for(h in f)s&&h in s||Cg(g.style,h,"");if(s)for(h in s)f&&s[h]===f[h]||Cg(g.style,h,s[h])}else if(h[0]==="o"&&h[1]==="n")l=h!==(h=h.replace(/Capture$/,"")),h=h.toLowerCase()in g?h.toLowerCase().slice(2):h.slice(2),g.l||(g.l={}),g.l[h+l]=s,s?f||g.addEventListener(h,l?Ig:Rg,l):g.removeEventListener(h,l?Ig:Rg,l);else if(h!=="dangerouslySetInnerHTML"){if(i)h=h.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(h!=="width"&&h!=="height"&&h!=="href"&&h!=="list"&&h!=="form"&&h!=="tabIndex"&&h!=="download"&&h!=="rowSpan"&&h!=="colSpan"&&h in g)try{g[h]=s==null?"":s;break e}catch(c){}typeof s=="function"||(s==null||s===!1&&h[4]!=="-"?g.removeAttribute(h):g.setAttribute(h,s))}}function Rg(g){return this.l[g.type+!1](Yt.event?Yt.event(g):g)}function Ig(g){return this.l[g.type+!0](Yt.event?Yt.event(g):g)}function pv(g,h,s,f,i,l,c,v,m){var x,w,A,P,j,D,N,I,B,H,ee,ie,J,V,Z,z=h.type;if(h.constructor!==void 0)return null;s.__h!=null&&(m=s.__h,v=h.__e=s.__e,h.__h=null,l=[v]),(x=Yt.__b)&&x(h);try{e:if(typeof z=="function"){if(I=h.props,B=(x=z.contextType)&&f[x.__c],H=x?B?B.props.value:x.__:f,s.__c?N=(w=h.__c=s.__c).__=w.__E:("prototype"in z&&z.prototype.render?h.__c=w=new z(I,H):(h.__c=w=new Ho(I,H),w.constructor=z,w.render=R1),B&&B.sub(w),w.props=I,w.state||(w.state={}),w.context=H,w.__n=f,A=w.__d=!0,w.__h=[],w._sb=[]),w.__s==null&&(w.__s=w.state),z.getDerivedStateFromProps!=null&&(w.__s==w.state&&(w.__s=Xr({},w.__s)),Xr(w.__s,z.getDerivedStateFromProps(I,w.__s))),P=w.props,j=w.state,w.__v=h,A)z.getDerivedStateFromProps==null&&w.componentWillMount!=null&&w.componentWillMount(),w.componentDidMount!=null&&w.__h.push(w.componentDidMount);else{if(z.getDerivedStateFromProps==null&&I!==P&&w.componentWillReceiveProps!=null&&w.componentWillReceiveProps(I,H),!w.__e&&w.shouldComponentUpdate!=null&&w.shouldComponentUpdate(I,w.__s,H)===!1||h.__v===s.__v){for(h.__v!==s.__v&&(w.props=I,w.state=w.__s,w.__d=!1),w.__e=!1,h.__e=s.__e,h.__k=s.__k,h.__k.forEach(function(T){T&&(T.__=h)}),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(I,w.__s,H),w.componentDidUpdate!=null&&w.__h.push(function(){w.componentDidUpdate(P,j,D)})}if(w.context=H,w.props=I,w.__P=g,ie=Yt.__r,J=0,"prototype"in z&&z.prototype.render){for(w.state=w.__s,w.__d=!1,ie&&ie(h),x=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(h),x=w.render(w.props,w.state,w.context),w.state=w.__s;while(w.__d&&++J<25);w.state=w.__s,w.getChildContext!=null&&(f=Xr(Xr({},f),w.getChildContext())),A||w.getSnapshotBeforeUpdate==null||(D=w.getSnapshotBeforeUpdate(P,j)),sv(g,Of(Z=x!=null&&x.type===_f&&x.key==null?x.props.children:x)?Z:[Z],h,s,f,i,l,c,v,m),w.base=h.__e,h.__h=null,w.__h.length&&c.push(w),N&&(w.__E=w.__=null),w.__e=!1}else l==null&&h.__v===s.__v?(h.__k=s.__k,h.__e=s.__e):h.__e=C1(s.__e,h,s,f,i,l,c,m);(x=Yt.diffed)&&x(h)}catch(T){h.__v=null,(m||l!=null)&&(h.__e=v,h.__h=!!m,l[l.indexOf(v)]=null),Yt.__e(T,h,s)}}function N1(g,h){Yt.__c&&Yt.__c(h,g),g.some(function(s){try{g=s.__h,s.__h=[],g.some(function(f){f.call(s)})}catch(f){Yt.__e(f,s.__v)}})}function C1(g,h,s,f,i,l,c,v){var m,x,w,A=s.props,P=h.props,j=h.type,D=0;if(j==="svg"&&(i=!0),l!=null){for(;D<l.length;D++)if((m=l[D])&&"setAttribute"in m==!!j&&(j?m.localName===j:m.nodeType===3)){g=m,l[D]=null;break}}if(g==null){if(j===null)return document.createTextNode(P);g=i?document.createElementNS("http://www.w3.org/2000/svg",j):document.createElement(j,P.is&&P),l=null,v=!1}if(j===null)A===P||v&&g.data===P||(g.data=P);else{if(l=l&&mf.call(g.childNodes),x=(A=s.props||ov).dangerouslySetInnerHTML,w=P.dangerouslySetInnerHTML,!v){if(l!=null)for(A={},D=0;D<g.attributes.length;D++)A[g.attributes[D].name]=g.attributes[D].value;(w||x)&&(w&&(x&&w.__html==x.__html||w.__html===g.innerHTML)||(g.innerHTML=w&&w.__html||""))}if(D1(g,P,A,i,v),w)h.__k=[];else if(sv(g,Of(D=h.props.children)?D:[D],h,s,f,i&&j!=="foreignObject",l,c,l?l[0]:s.__k&&Ni(s,0),v),l!=null)for(D=l.length;D--;)l[D]!=null&&av(l[D]);v||("value"in P&&(D=P.value)!==void 0&&(D!==g.value||j==="progress"&&!D||j==="option"&&D!==A.value)&&Cu(g,"value",D,A.value,!1),"checked"in P&&(D=P.checked)!==void 0&&D!==g.checked&&Cu(g,"checked",D,A.checked,!1))}return g}function dv(g,h,s){try{typeof g=="function"?g(h):g.current=h}catch(f){Yt.__e(f,s)}}function hv(g,h,s){var f,i;if(Yt.unmount&&Yt.unmount(g),(f=g.ref)&&(f.current&&f.current!==g.__e||dv(f,null,h)),(f=g.__c)!=null){if(f.componentWillUnmount)try{f.componentWillUnmount()}catch(l){Yt.__e(l,h)}f.base=f.__P=null,g.__c=void 0}if(f=g.__k)for(i=0;i<f.length;i++)f[i]&&hv(f[i],h,s||typeof g.type!="function");s||g.__e==null||av(g.__e),g.__=g.__e=g.__d=void 0}function R1(g,h,s){return this.constructor(g,s)}mf=iv.slice,Yt={__e:function(g,h,s,f){for(var i,l,c;h=h.__;)if((i=h.__c)&&!i.__)try{if((l=i.constructor)&&l.getDerivedStateFromError!=null&&(i.setState(l.getDerivedStateFromError(g)),c=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(g,f||{}),c=i.__d),c)return i.__E=i}catch(v){g=v}throw g}},nv=0,Ho.prototype.setState=function(g,h){var s;s=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xr({},this.state),typeof g=="function"&&(g=g(Xr({},s),this.props)),g&&Xr(s,g),g!=null&&this.__v&&(h&&this._sb.push(h),Ng(this))},Ho.prototype.forceUpdate=function(g){this.__v&&(this.__e=!0,g&&this.__h.push(g),Ng(this))},Ho.prototype.render=_f,uo=[],rv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,hf=function(g,h){return g.__v.__b-h.__v.__b},Nu.__r=0;var Ti=globalThis&&globalThis.__assign||function(){return Ti=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},Ti.apply(this,arguments)};function wf(g){var h=g.x,s=g.y,f=g.width,i=g.height,l=g.radius,c=g.className,v=h-f/2,m=s-i/2,x=Ti(Ti({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},g),{x:v,y:m});return Je.h("rect",Ti({},x))}wf.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Uo;(function(g){g.NODE="node",g.CIRCLE_NODE="circle-node",g.POLYGON_NODE="polygon-node",g.RECT_NODE="rect-node",g.HTML_NODE="html-node",g.TEXT_NODE="text-node",g.ELLIPSE_NODE="ellipse-node",g.DIAMOND_NODE="diamond-node",g.EDGE="edge",g.LINE_EDGE="line-edge",g.POLYLINE_EDGE="polyline-edge",g.BEZIER_EDGE="bezier-edge",g.GRAPH="graph"})(Uo||(Uo={}));function Pu(g){var h=g.x,s=g.y,f=g.width,i=g.height;return{minX:h-f/2,minY:s-i/2,maxX:h+f/2,maxY:s+i/2}}function Lg(g){var h=Pu(g),s=g.radius,f=h.minX,i=h.minY,l=h.maxX,c=h.maxY;return[{x:f+s,y:i+s},{x:l-s,y:i+s},{x:l-s,y:c-s},{x:f+s,y:c-s}]}function zg(g){var h=g.point,s=g.beforeNode,f=g.afterNode,i=h.x,l=h.y,c={x:i,y:l},v=s.radius,m=Pu(s),x=Pu(f);if(i===m.minX){c.x=x.minX;var w=(l-s.y)/(s.height/2-v);w?c.y=f.y+(f.height/2-v)*w:c.y=f.y}else if(i===m.maxX){c.x=x.maxX;var w=(l-s.y)/(s.height/2-v);w?c.y=f.y+(f.height/2-v)*w:c.y=f.y}else if(l===m.minY){c.y=x.minY;var w=(i-s.x)/(s.width/2-v);w?c.x=f.x+(f.width/2-v)*w:c.x=f.x}else if(l===m.maxY){c.y=x.maxY;var w=(i-s.x)/(s.width/2-v);w?c.x=f.x+(f.width/2-v)*w:c.x=f.x}else{var A=Lg(s),P=Lg(f),j=Pu(s),D=j.minX,N=j.minY,I=j.maxX,B=j.maxY,H=-1;if(i-D<v&&l-N<v?H=0:I-i<v&&l-N<v?H=1:I-i<v&&B-l<v?H=2:i-D<v&&N-l<v&&(H=3),H>-1){var ee=Math.atan2(l-A[H].y,i-A[H].x);c.x=P[H].x+v*Math.cos(ee),c.y=P[H].y+v*Math.sin(ee)}}return c}function Bg(g){var h=g.point,s=g.beforeNode,f=g.afterNode,i=f.rx,l=f.ry,c=h,v=(h.y-s.y)/(h.x-s.x),m=i,x=l,w,A;return v>=1/0?(w=0,A=x):v<=-1/0?(w=0,A=-x):h.x-s.x>0?(w=m*x/Math.sqrt(x*x+m*m*v*v),A=m*x*v/Math.sqrt(x*x+m*m*v*v)):(w=-(m*x)/Math.sqrt(x*x+m*m*v*v),A=-(m*x*v)/Math.sqrt(x*x+m*m*v*v)),c={x:w+f.x,y:A+f.y},c}function Fg(g){var h=g.point,s=g.beforeNode,f=g.afterNode,i=h,l,c,v=h.x-s.x,m=h.y-s.y,x=s.rx,w=s.ry,A=Math.sqrt((x-Math.abs(v))*(x-Math.abs(v))+m*m)/Math.sqrt(x*x+w*w),P=f.rx,j=f.ry,D=Math.sqrt((P*P+j*j)*A*A*(P*P/(P*P+j*j))),N=D*(j/P);return v>=0?l=P-D:l=D-P,m>0?c=N:c=-N,i={x:l+f.x,y:c+f.y},i}var I1=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),so=globalThis&&globalThis.__assign||function(){return so=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},so.apply(this,arguments)},L1=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l},z1=Je.LogicFlowUtil.StepDrag,B1=function(g){I1(h,g);function h(s){var f=g.call(this)||this;return f.updatePosition=function(i){var l=i.deltaX,c=i.deltaY,v=f.nodeModel,m=v.x,x=v.y;f.nodeModel.x=m+l/2,f.nodeModel.y=x+c/2,f.nodeModel.moveText(l/2,c/2)},f.getResize=function(i){var l=i.index,c=i.deltaX,v=i.deltaY,m=i.width,x=i.height,w=i.PCTResizeInfo,A=i.pct,P=A===void 0?1:A,j={width:m,height:x,deltaX:c,deltaY:v};if(w){var D=4,N=0,I=0;switch(l){case 0:I=(c*-1-v)/D;break;case 1:I=(c-v)/D;break;case 2:I=(c+v)/D;break;case 3:I=(c*-1+v)/D;break}I!==0&&(N=Math.round(I/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),H=Math.round(w.ResizePCT.hightPCT*w.ResizeBasis.basisHeight/100);switch(l){case 0:c=m-B,v=x-H;break;case 1:c=B-m,v=x-H;break;case 2:c=B-m,v=H-x;break;case 3:c=m-B,v=H-x;break}return j.width=B,j.height=H,j.deltaX=c/P,j.deltaY=v/P,j}switch(l){case 0:j.width=m-c*P,j.height=x-v*P;break;case 1:j.width=m+c*P,j.height=x-v*P;break;case 2:j.width=m+c*P,j.height=x+v*P;break;case 3:j.width=m-c*P,j.height=x+v*P;break}return j},f.updateRect=function(i){var l=i.deltaX,c=i.deltaY,v=f.nodeModel,m=v.id,x=v.x,w=v.y,A=v.width,P=v.height,j=v.radius,D=v.PCTResizeInfo,N=f.index,I=f.getResize({index:N,deltaX:l,deltaY:c,width:A,height:P,PCTResizeInfo:D,pct:1}),B=f.nodeModel,H=B.minWidth,ee=B.minHeight,ie=B.maxWidth,J=B.maxHeight;if(I.width<H||I.width>ie||I.height<ee||I.height>J){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:I.deltaX,deltaY:I.deltaY}),f.nodeModel.width=I.width,f.nodeModel.height=I.height,f.nodeModel.setProperties({nodeSize:{width:I.width,height:I.height}});var V=f.getNodeEdges(m),Z={x,y:w,width:A,height:P,radius:j},z={x:f.nodeModel.x,y:f.nodeModel.y,width:f.nodeModel.width,height:f.nodeModel.height,radius:j},T={point:"",beforeNode:Z,afterNode:z},L;V.sourceEdges.forEach(function(C){T.point=C.startPoint,L=zg(T),C.updateStartPoint(L)}),V.targetEdges.forEach(function(C){T.point=C.endPoint,L=zg(T),C.updateEndPoint(L)}),f.eventEmit({beforeNode:Z,afterNode:z})},f.updateEllipse=function(i){var l=i.deltaX,c=i.deltaY,v=f.nodeModel,m=v.id,x=v.rx,w=v.ry,A=v.x,P=v.y,j=v.PCTResizeInfo,D=f.index,N=x,I=w,B=f.getResize({index:D,deltaX:l,deltaY:c,width:N,height:I,PCTResizeInfo:j,pct:1/2}),H=f.nodeModel,ee=H.minWidth,ie=H.minHeight,J=H.maxWidth,V=H.maxHeight;if(B.width<ee/2||B.width>J/2||B.height<ie/2||B.height>V/2){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),f.nodeModel.rx=B.width,f.nodeModel.ry=B.height,f.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var Z=f.getNodeEdges(m),z={x:A,y:P},T={rx:B.width,ry:B.height,x:f.nodeModel.x,y:f.nodeModel.y},L={point:{},beforeNode:z,afterNode:T},C;Z.sourceEdges.forEach(function(F){L.point=F.startPoint,C=Bg(L),F.updateStartPoint(C)}),Z.targetEdges.forEach(function(F){L.point=F.endPoint,C=Bg(L),F.updateEndPoint(C)}),f.eventEmit({beforeNode:so(so({},z),{rx:x,ry:w}),afterNode:T})},f.updateDiamond=function(i){var l=i.deltaX,c=i.deltaY,v=f.nodeModel,m=v.id,x=v.rx,w=v.ry,A=v.x,P=v.y,j=v.PCTResizeInfo,D=f.index,N=x,I=w,B=f.getResize({index:D,deltaX:l,deltaY:c,width:N,height:I,PCTResizeInfo:j,pct:1/2}),H=f.nodeModel,ee=H.minWidth,ie=H.minHeight,J=H.maxWidth,V=H.maxHeight;if(B.width<ee/2||B.width>J/2||B.height<ie/2||B.height>V/2){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),f.nodeModel.rx=B.width,f.nodeModel.ry=B.height,f.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var Z={x:A,y:P,rx:x,ry:w},z={rx:B.width,ry:B.height,x:f.nodeModel.x,y:f.nodeModel.y},T={point:{},beforeNode:Z,afterNode:z},L,C=f.getNodeEdges(m);C.sourceEdges.forEach(function(F){T.point=F.startPoint,L=Fg(T),F.updateStartPoint(L)}),C.targetEdges.forEach(function(F){T.point=F.endPoint,L=Fg(T),F.updateEndPoint(L)}),f.eventEmit({beforeNode:Z,afterNode:z})},f.eventEmit=function(i){var l=i.beforeNode,c=i.afterNode,v=f.nodeModel,m=v.id,x=v.modelType,w=v.type,A=so({id:m,modelType:x,type:w},l),P=so({id:m,modelType:x,type:w},c);f.graphModel.eventCenter.emit("node:resize",{oldNodeSize:A,newNodeSize:P})},f.onDragging=function(i){var l,c=i.deltaX,v=i.deltaY,m=f.graphModel.transformModel,x=f.nodeModel.modelType;l=L1(m.fixDeltaXY(c,v),2),c=l[0],v=l[1],x===Uo.RECT_NODE||x===Uo.HTML_NODE?f.updateRect({deltaX:c,deltaY:v}):x===Uo.ELLIPSE_NODE?f.updateEllipse({deltaX:c,deltaY:v}):x===Uo.DIAMOND_NODE&&f.updateDiamond({deltaX:c,deltaY:v})},f.onDragEnd=function(){var i=f.graphModel.gridSize,l=i===void 0?1:i,c=l*Math.round(f.nodeModel.x/l),v=l*Math.round(f.nodeModel.y/l);f.nodeModel.moveTo(c,v)},f.index=s.index,f.nodeModel=s.model,f.graphModel=s.graphModel,f.state={},f.dragHandler=new z1({onDragging:f.onDragging,onDragEnd:f.onDragEnd,step:1}),f}return h.prototype.getNodeEdges=function(s){for(var f=this.graphModel,i=f.edges,l=[],c=[],v=0;v<i.length;v++){var m=i[v];m.sourceNodeId===s?l.push(m):i[v].targetNodeId===s&&c.push(m)}return{sourceEdges:l,targetEdges:c}},h.prototype.render=function(){var s=this.props,f=s.x,i=s.y,l=s.index,c=s.model,v=c.getControlPointStyle();return Mi("g",{className:"lf-resize-control-"+l},Mi(wf,so({className:"lf-node-control"},{x:f,y:i},v,{onMouseDown:this.dragHandler.handleMouseDown})))},h}(Ho),F1=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),Ru=globalThis&&globalThis.__assign||function(){return Ru=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},Ru.apply(this,arguments)},zu=function(g){F1(h,g);function h(){var s=g.call(this)||this;return s.state={},s}return h.prototype.getResizeControl=function(){var s=this.props,f=s.model,i=s.graphModel,l=f.x,c=f.y,v=f.width,m=f.height,x={minX:l-v/2,minY:c-m/2,maxX:l+v/2,maxY:c+m/2},w=x.minX,A=x.minY,P=x.maxX,j=x.maxY,D=[{x:w,y:A},{x:P,y:A},{x:P,y:j},{x:w,y:j}];return D.map(function(N,I){return Mi(B1,Ru({index:I},N,{model:f,graphModel:i}))})},h.prototype.getGroupSolid=function(){var s=this.props.model,f=s.x,i=s.y,l=s.width,c=s.height,v=s.getResizeOutlineStyle();return Mi(wf,Ru({fill:"none"},v,{x:f,y:i,width:l,height:c}))},h.prototype.render=function(){return Mi("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},h}(Ho),yv=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),U1=function(g){yv(h,g);function h(s,f){var i=g.call(this,s,f)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return h.prototype.initNodeData=function(s){g.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},h.prototype.getOutlineStyle=function(){var s=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},h.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},h.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},h.prototype.resize=function(s,f){console.log(s,f)},h.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},h}(Je.RectNodeModel),H1=function(g){yv(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getControlGroup=function(){var s=this.props,f=s.model,i=s.graphModel;return Je.h(zu,{model:f,graphModel:i})},h.prototype.getResizeShape=function(){return g.prototype.getShape.call(this)},h.prototype.getShape=function(){var s=this.props,f=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return Je.h("g",null,this.getResizeShape(),f&&!i?this.getControlGroup():"")},h}(Je.RectNode),gv={type:"rect",view:H1,model:U1},vv=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}();(function(g){vv(h,g);function h(s,f){var i=g.call(this,s,f)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return h.prototype.initNodeData=function(s){g.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},h.prototype.getOutlineStyle=function(){var s=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},h.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},h.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},h.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},h})(Je.EllipseNodeModel);(function(g){vv(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getControlGroup=function(){var s=this.props,f=s.model,i=s.graphModel;return Je.h(zu,{model:f,graphModel:i})},h.prototype.getResizeShape=function(){return g.prototype.getShape.call(this)},h.prototype.getShape=function(){var s=this.props,f=s.model,i=s.graphModel.editConfigModel.isSilentMode;return Je.h("g",null,this.getResizeShape(),f.isSelected&&!i?this.getControlGroup():"")},h})(Je.EllipseNode);var yf=globalThis&&globalThis.__assign||function(){return yf=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},yf.apply(this,arguments)};function G1(g){var h=g.fillOpacity,s=h===void 0?1:h,f=g.strokeWidth,i=f===void 0?1:f,l=g.strokeOpacity,c=l===void 0?1:l,v=g.fill,m=v===void 0?"transparent":v,x=g.stroke,w=x===void 0?"#000":x,A=g.points,P=g.className,j=P===void 0?"lf-basic-shape":P,D={fill:m,fillOpacity:s,strokeWidth:i,stroke:w,strokeOpacity:c,points:"",className:j};return D.points=A.map(function(N){return N.join(",")}).join(" "),Je.h("polygon",yf({},D))}var bv=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),gf=globalThis&&globalThis.__assign||function(){return gf=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},gf.apply(this,arguments)};(function(g){bv(h,g);function h(s,f){var i=g.call(this,s,f)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return h.prototype.initNodeData=function(s){g.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},h.prototype.getOutlineStyle=function(){var s=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},h.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},h.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},h.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},h})(Je.DiamondNodeModel);(function(g){bv(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getControlGroup=function(){var s=this.props,f=s.model,i=s.graphModel;return Je.h(zu,{model:f,graphModel:i})},h.prototype.getResizeShape=function(){var s=this.props.model,f=s.points,i=s.getNodeStyle();return Je.h("g",null,Je.h(G1,gf({},i,{points:f})))},h.prototype.getShape=function(){var s=this.props,f=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return Je.h("g",null,this.getResizeShape(),f&&!i?this.getControlGroup():"")},h})(Je.DiamondNode);var mv=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}();(function(g){mv(h,g);function h(s,f){var i=g.call(this,s,f)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return h.prototype.initNodeData=function(s){g.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},h.prototype.getOutlineStyle=function(){var s=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},h.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},h.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},h.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var f={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:f,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},h})(Je.HtmlNodeModel);(function(g){mv(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getControlGroup=function(){var s=this.props,f=s.model,i=s.graphModel;return Je.h(zu,{model:f,graphModel:i})},h.prototype.getResizeShape=function(){return g.prototype.getShape.call(this)},h.prototype.getShape=function(){var s=this.props,f=s.model.isSelected,i=s.graphModel.editConfigModel.isSilentMode;return Je.h("g",null,this.getResizeShape(),f&&!i?this.getControlGroup():"")},h})(Je.HtmlNode);var Ov=globalThis&&globalThis.__extends||function(){var g=function(h,s){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,i){f.__proto__=i}||function(f,i){for(var l in i)i.hasOwnProperty(l)&&(f[l]=i[l])},g(h,s)};return function(h,s){g(h,s);function f(){this.constructor=h}h.prototype=s===null?Object.create(s):(f.prototype=s.prototype,new f)}}(),Iu=globalThis&&globalThis.__assign||function(){return Iu=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},Iu.apply(this,arguments)},X1=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l},Y1=globalThis&&globalThis.__spread||function(){for(var g=[],h=0;h<arguments.length;h++)g=g.concat(X1(arguments[h]));return g},Ug=500,Hg=300,V1=-1e4;(function(g){Ov(h,g);function h(){var s=g!==null&&g.apply(this,arguments)||this;return s.isGroup=!0,s.unfoldedWidth=Ug,s.unfoldedHight=Hg,s.childrenLastFoldStatus={},s}return h.prototype.initNodeData=function(s){var f=this;g.prototype.initNodeData.call(this,s);var i=[];Array.isArray(s.children)&&(i=s.children),this.children=new Set(i),this.width=Ug,this.height=Hg,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=V1,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(){f.isFolded&&f.foldGroup(f.isFolded)})},h.prototype.getResizeOutlineStyle=function(){var s=g.prototype.getResizeOutlineStyle.call(this);return s.stroke="none",s},h.prototype.foldGroup=function(s){var f=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=f.graphModel.getElement(l),v=c.isFolded;if(c.isGroup&&!c.isFolded&&c.foldGroup(s),c.isGroup&&!s){var m=f.childrenLastFoldStatus[l];m!==void 0&&m!==c.isFolded&&c.foldGroup(m)}f.childrenLastFoldStatus[l]=v,c.visible=!s,i=i.concat(c.incoming.edges.concat(c.outgoing.edges))}),this.foldEdge(s,i)}},h.prototype.getAnchorStyle=function(s){var f=g.prototype.getAnchorStyle.call(this,s);return f.stroke="transparent",f.fill="transparent",f.hover.fill="transparent",f.hover.stroke="transparent",f},h.prototype.foldEdge=function(s,f){var i=this;f.forEach(function(l,c){var v=l.id,m=l.sourceNodeId,x=l.targetNodeId,w=l.startPoint,A=l.endPoint,P=l.type,j=l.text,D=l.getProperties(),N={id:v+"__"+c,sourceNodeId:m,targetNodeId:x,startPoint:w,endPoint:A,type:P,properties:D,text:j==null?void 0:j.value};l.virtual&&i.graphModel.deleteEdgeById(l.id);var I=i.graphModel.group.getNodeGroup(x);I||(I=i.graphModel.getNodeModelById(x));var B=i.graphModel.group.getNodeGroup(m);B||(B=i.graphModel.getNodeModelById(m)),s&&l.visible!==!1&&(i.children.has(m)||i.id===m?(N.startPoint=void 0,N.sourceNodeId=i.id):(N.endPoint=void 0,N.targetNodeId=i.id),(I.id!==i.id||B.id!==i.id)&&i.createVirtualEdge(N),l.visible=!1),!s&&l.visible===!1&&(I&&I.isGroup&&I.isFolded?(N.targetNodeId=I.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)})},h.prototype.createVirtualEdge=function(s){s.pointsList=void 0;var f=this.graphModel.addEdge(s);f.virtual=!0,f.text.editable=!1,f.isFoldedEdge=!0},h.prototype.isInRange=function(s){var f=s.x1,i=s.y1,l=s.x2,c=s.y2;return f>=this.x-this.width/2&&l<=this.x+this.width/2&&i>=this.y-this.height/2&&c<=this.y+this.height/2},h.prototype.isAllowMoveTo=function(s){var f=s.x1,i=s.y1,l=s.x2,c=s.y2;return{x:f>=this.x-this.width/2&&l<=this.x+this.width/2,y:i>=this.y-this.height/2&&c<=this.y+this.height/2}},h.prototype.setAllowAppendChild=function(s){this.setProperty("groupAddable",s)},h.prototype.addChild=function(s){this.children.add(s)},h.prototype.removeChild=function(s){this.children.delete(s)},h.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},h.prototype.getData=function(){var s=this,f=g.prototype.getData.call(this);f.children=[],this.children.forEach(function(l){var c=s.graphModel.getNodeModelById(l);c&&!c.virtual&&f.children.push(l)});var i=f.properties;return delete i.groupAddable,delete i.isFolded,f},h.prototype.getHistoryData=function(){var s=g.prototype.getData.call(this);s.children=Y1(this.children),s.isGroup=!0;var f=s.properties;return delete f.groupAddable,f.isFolded&&(s.x=s.x+this.unfoldedWidth/2-this.foldedWidth/2,s.y=s.y+this.unfoldedHight/2-this.foldedHeight/2),s},h.prototype.isAllowAppendIn=function(s){return!0},h.prototype.toBack=function(){this.zIndex--},h})(gv.model);(function(g){Ov(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.prototype.getControlGroup=function(){var s=this.props.model,f=s.resizable,i=s.properties;return f&&!i.isFolded?g.prototype.getControlGroup.call(this):null},h.prototype.getAddableShape=function(){var s=this.props.model,f=s.width,i=s.height,l=s.x,c=s.y,v=s.radius,m=s.properties;if(!m.groupAddable)return null;var x=this.props.model.getNodeStyle().strokeWidth,w=this.props.model.getAddableOutlineStyle(),A=f+x+8,P=i+x+8;return Je.h("rect",Iu(Iu({},w),{width:A,height:P,x:l-A/2,y:c-P/2,rx:v,ry:v}))},h.prototype.getFoldIcon=function(){var s=this.props.model,f=s.x-s.width/2+5,i=s.y-s.height/2+5;if(!s.foldable)return null;var l=Je.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:s.properties.isFolded?"M "+(f+3)+","+(i+6)+" "+(f+11)+","+(i+6)+" M"+(f+7)+","+(i+2)+" "+(f+7)+","+(i+10):"M "+(f+3)+","+(i+6)+" "+(f+11)+","+(i+6)+" "});return Je.h("g",{},[Je.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])},h.prototype.getResizeShape=function(){return Je.h("g",{},[this.getAddableShape(),g.prototype.getResizeShape.call(this),this.getFoldIcon()])},h})(gv.view);var W1=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var Gg=globalThis&&globalThis.__assign||function(){return Gg=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},Gg.apply(this,arguments)},Xg=globalThis&&globalThis.__assign||function(){return Xg=Object.assign||function(g){for(var h,s=1,f=arguments.length;s<f;s++){h=arguments[s];for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(g[i]=h[i])}return g},Xg.apply(this,arguments)},K1=globalThis&&globalThis.__read||function(g,h){var s=typeof Symbol=="function"&&g[Symbol.iterator];if(!s)return g;var f=s.call(g),i,l=[],c;try{for(;(h===void 0||h-- >0)&&!(i=f.next()).done;)l.push(i.value)}catch(v){c={error:v}}finally{try{i&&!i.done&&(s=f.return)&&s.call(f)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;const Z1={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function q1(g){const{incoming:h,outgoing:s,properties:f,key:i}=g,{text:l,startPoint:c,endPoint:v,pointsList:m,logicFlowType:x}=f,w={id:i,type:x,sourceNodeId:h[0],targetNodeId:s[0],text:l,startPoint:c,endPoint:v,pointsList:m,properties:{}},A=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(g.properties).forEach(P=>{A.indexOf(P)===-1&&(w.properties[P]=g.properties[P])}),w}function J1(g){const{properties:h,key:s}=g,{x:f,y:i,text:l,logicFlowType:c}=h,v={id:s,type:c,x:f,y:i,text:l,properties:{}},m=["x","y","text","logicFlowType"];return Object.keys(g.properties).forEach(x=>{m.indexOf(x)===-1&&(v.properties[x]=g.properties[x])}),v}function $1(g){const h={nodes:[],edges:[]},s=g.flowElementList;return s&&s.length>0&&s.forEach(f=>{if(f.type===Z1.SEQUENCE_FLOW){const i=q1(f);h.edges.push(i)}else{const i=J1(f);h.nodes.push(i)}}),h}function Q1(g){return[{text:"选区",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAOVJREFUOBGtVMENwzAIjKP++2026ETdpv10iy7WFbqFyyW6GBywLCv5gI+Dw2Bluj1znuSjhb99Gkn6QILDY2imo60p8nsnc9bEo3+QJ+AKHfMdZHnl78wyTnyHZD53Zzx73MRSgYvnqgCUHj6gwdck7Zsp1VOrz0Uz8NbKunzAW+Gu4fYW28bUYutYlzSa7B84Fh7d1kjLwhcSdYAYrdkMQVpsBr5XgDGuXwQfQr0y9zwLda+DUYXLaGKdd2ZTtvbolaO87pdo24hP7ov16N0zArH1ur3iwJpXxm+v7oAJNR4JEP8DoAuSFEkYH7cAAAAASUVORK5CYII=",callback:()=>{g.updateEditConfig({stopMoveGraph:!0})}},{type:"circle",text:"开始",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAnBJREFUOBGdVL1rU1EcPfdGBddmaZLiEhdx1MHZQXApraCzQ7GKLgoRBxMfcRELuihWKcXFRcEWF8HBf0DdDCKYRZpnl7p0svLe9Zzbd29eQhTbC8nv+9zf130AT63jvooOGS8Vf9Nt5zxba7sXQwODfkWpkbjTQfCGUd9gIp3uuPP8bZ946g56dYQvnBg+b1HB8VIQmMFrazKcKSvFW2dQTxJnJdQ77urmXWOMBCmXM2Rke4S7UAW+/8ywwFoewmBps2tu7mbTdp8VMOkIRAkKfrVawalJTtIliclFbaOBqa0M2xImHeVIfd/nKAfVq/LGnPss5Kh00VEdSzfwnBXPUpmykNss4lUI9C1ga+8PNrBD5YeqRY2Zz8PhjooIbfJXjowvQJBqkmEkVnktWhwu2SM7SMx7Cj0N9IC0oQXRo8xwAGzQms+xrB/nNSUWVveI48ayrFGyC2+E2C+aWrZHXvOuz+CiV6iycWe1Rd1Q6+QUG07nb5SbPrL4426d+9E1axKjY3AoRrlEeSQo2Eu0T6BWAAr6COhTcWjRaYfKG5csnvytvUr/WY4rrPMB53Uo7jZRjXaG6/CFfNMaXEu75nG47X+oepU7PKJvvzGDY1YLSKHJrK7vFUwXKkaxwhCW3u+sDFMVrIju54RYYbFKpALZAo7sB6wcKyyrd+aBMryMT2gPyD6GsQoRFkGHr14TthZni9ck0z+Pnmee460mHXbRAypKNy3nuMdrWgVKj8YVV8E7PSzp1BZ9SJnJAsXdryw/h5ctboUVi4AFiCd+lQaYMw5z3LGTBKjLQOeUF35k89f58Vv/tGh+l+PE/wG0rgfIUbZK5AAAAABJRU5ErkJggg=="},{type:"rect",text:"用户任务",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAEFVwZaAAAABGdBTUEAALGPC/xhBQAAAqlJREFUOBF9VM9rE0EUfrMJNUKLihGbpLGtaCOIR8VjQMGDePCgCCIiCNqzCAp2MyYUCXhUtF5E0D+g1t48qAd7CCLqQUQKEWkStcEfVGlLdp/fm3aW2QQdyLzf33zz5m2IsAZ9XhDpyaaIZkTS4ASzK41TFao88GuJ3hsr2pAbipHxuSYyKRugagICGANkfFnNh3HeE2N0b3nN2cgnpcictw5veJIzxmDamSlxxQZicq/mflxhbaH8BLRbuRwNtZp0JAhoplVRUdzmCe/vO27wFuuA3S5qXruGdboy5/PRGFsbFGKo/haRtQHIrM83bVeTrOgNhZReWaYGnE4aUQgTJNvijJFF4jQ8BxJE5xfKatZWmZcTQ+BVgh7s8SgPlCkcec4mGTmieTP4xd7PcpIEg1TX6gdeLW8rTVMVLVvb7ctXoH0Cydl2QOPJBG21STE5OsnbweVYzAnD3A7PVILuY0yiiyDwSm2g441r6rMSgp6iK42yqroI2QoXeJVeA+YeZSa47gZdXaZWQKTrG93rukk/l2Al6Kzh5AZEl7dDQy+JjgFahQjRopSxPbrbvK7GRe9ePWBo1wcU7sYrFZtavXALwGw/7Dnc50urrHJuTPSoO2IMV3gUQGNg87IbSOIY9BpiT9HV7FCZ94nPXb3MSnwHn/FFFE1vG6DTby+r31KAkUktB3Qf6ikUPWxW1BkXSPQeMHHiW0+HAd2GelJsZz1OJegCxqzl+CLVHa/IibuHeJ1HAKzhuDR+ymNaRFM+4jU6UWKXorRmbyqkq/D76FffevwdCp+jN3UAN/C9JRVTDuOxC/oh+EdMnqIOrlYteKSfadVRGLJFJPSB/ti/6K8f0CNymg/iH2gO/f0DwE0yjAFO6l8JaR5j0VPwPwfaYHqOqrCI319WzwhwzNW/aQAAAABJRU5ErkJggg==",cls:"important-node"},{type:"rect",text:"系统任务",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAEFVwZaAAAABGdBTUEAALGPC/xhBQAAAqlJREFUOBF9VM9rE0EUfrMJNUKLihGbpLGtaCOIR8VjQMGDePCgCCIiCNqzCAp2MyYUCXhUtF5E0D+g1t48qAd7CCLqQUQKEWkStcEfVGlLdp/fm3aW2QQdyLzf33zz5m2IsAZ9XhDpyaaIZkTS4ASzK41TFao88GuJ3hsr2pAbipHxuSYyKRugagICGANkfFnNh3HeE2N0b3nN2cgnpcictw5veJIzxmDamSlxxQZicq/mflxhbaH8BLRbuRwNtZp0JAhoplVRUdzmCe/vO27wFuuA3S5qXruGdboy5/PRGFsbFGKo/haRtQHIrM83bVeTrOgNhZReWaYGnE4aUQgTJNvijJFF4jQ8BxJE5xfKatZWmZcTQ+BVgh7s8SgPlCkcec4mGTmieTP4xd7PcpIEg1TX6gdeLW8rTVMVLVvb7ctXoH0Cydl2QOPJBG21STE5OsnbweVYzAnD3A7PVILuY0yiiyDwSm2g441r6rMSgp6iK42yqroI2QoXeJVeA+YeZSa47gZdXaZWQKTrG93rukk/l2Al6Kzh5AZEl7dDQy+JjgFahQjRopSxPbrbvK7GRe9ePWBo1wcU7sYrFZtavXALwGw/7Dnc50urrHJuTPSoO2IMV3gUQGNg87IbSOIY9BpiT9HV7FCZ94nPXb3MSnwHn/FFFE1vG6DTby+r31KAkUktB3Qf6ikUPWxW1BkXSPQeMHHiW0+HAd2GelJsZz1OJegCxqzl+CLVHa/IibuHeJ1HAKzhuDR+ymNaRFM+4jU6UWKXorRmbyqkq/D76FffevwdCp+jN3UAN/C9JRVTDuOxC/oh+EdMnqIOrlYteKSfadVRGLJFJPSB/ti/6K8f0CNymg/iH2gO/f0DwE0yjAFO6l8JaR5j0VPwPwfaYHqOqrCI319WzwhwzNW/aQAAAABJRU5ErkJggg==",cls:"import_icon"},{type:"diamond",text:"条件判断",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAAHeEJUAAAAABGdBTUEAALGPC/xhBQAAAvVJREFUOBGNVEFrE0EU/mY3bQoiFlOkaUJrQUQoWMGePLX24EH0IIoHKQiCV0G8iE1covgLiqA/QTzVm1JPogc9tIJYFaQtlhQxqYjSpunu+L7JvmUTU3AgmTfvffPNN++9WSA1DO182f6xwILzD5btfAoQmwL5KJEwiQyVbSVZ0IgRyV6PTpIJ81E5ZvqfHQR0HUOBHW4L5Et2kQ6Zf7iAOhTFAA8s0pEP7AXO1uAA52SbqGk6h/6J45LaLhO64ByfcUzM39V7ZiAdS2yCePPEIQYvTUHqM/n7dgQNfBKWPjpF4ISk8q3J4nB11qw6X8l+FsF3EhlkEMfrjIer3wJTLwS2aCNcj4DbGxXTw00JmAuO+Ni6bBxVUCvS5d9aa04+so4pHW5jLTywuXAL7jJ+D06sl82Sgl2JuVBQn498zkc2bGKxULHjCnSMadBKYDYYHAtsby1EQ5lNGrQd4Y3v4Zo0XdGEmDno46yCM9Tk+RiJmUYHS/aXHPNTcjxcbTFna000PFJHIVZ5lFRqRpJWk9/+QtlOUYJj9HG5pVFEU7zqIYDVsw2s+AJaD8wTd2umgSCCyUxgGsS1Y6TBwXQQTFuZaHcd8gAGioE90hlsY+wMcs30RduYtxanjMGal8H5dMW67dmT1JFtYUEe8LiQLRsPZ6IIc7A4J5tqco3T0pnv/4u0kyzrYUq7gASuEyI8VXKvB9Odytv6jS/PNaZBln0nioJG/AVQRZvApOdhjj3Jt8QC8Im09SafwdBdvIpztpxWxpeKCC+EsFdS8DCyuCn2munFpL7ctHKp+Xc5cMybeIyMAN33SPL3ZR9QV1XVwLyzHm6Iv0/yeUuUb7PPlZC4D4HZkeu6dpF4v9j9MreGtMbxMMRLIcjJic9yHi7WQ3yVKzZVWUr5UrViJvn1FfUlwe/KYVfYyWRLSGNu16hR01U9IacajXPei0wx/5BqgInvJN+MMNtNme7ReU9SBbgntovn0kKHpFg7UogZvaZiOue/q1SBo9ktHzQAAAAASUVORK5CYII="},{type:"circle",text:"结束",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAA1BJREFUOBFtVE1IVUEYPXOf+tq40Y3vPcmFIdSjIorWoRG0ERWUgnb5FwVhYQSl72oUoZAboxKNFtWiwKRN0M+jpfSzqJAQclHo001tKkjl3emc8V69igP3znzfnO/M9zcDcKT67azmjYWTwl9Vn7Vumeqzj1DVb6cleQY4oAVnIOPb+mKAGxQmKI5CWNJ2aLPatxWa3aB9K7/fB+/Z0jUF6TmMlFLQqrkECWQzOZxYGjTlOl8eeKaIY5yHnFn486xBustDjWT6dG7pmjHOJd+33t0iitTPkK6tEvjxq4h2MozQ6WFSX/LkDUGfFwfhEZj1Auz/U4pyAi5Sznd7uKzznXeVHlI/Aywmk6j7fsUsEuCGADrWARXXwjxWQsUbIupDHJI7kF5dRktg0eN81IbiZXiTESic50iwS+t1oJgL83jAiBupLDCQqwziaWSoAFSeIR3P5Xv5az00wyIn35QRYTwdSYbz8pH8fxUUAtxnFvYmEmgI0wYXUXcCCSpeEVpXlsRhBnCEATxWylL9+EKCAYhe1NGstUa6356kS9NVvt3DU2fd+Wtbm/+lSbylJqsqkSm9CRhvoJVlvKPvF1RKY/FcPn5j4UfIMLn8D4UYb54BNsilTDXKnF4CfTobA0FpoW/LSp306wkXM+XaOJhZaFkcNM82ASNAWMrhrUbRfmyeI1FvRBTpN06WKxa9BK0o2E4Pd3zfBBEwPsv9sQBnmLVbLEIZ/Xe9LYwJu/Er17W6HYVBc7vmuk0xUQ+pqxdom5Fnp55SiytXLPYoMXNM4u4SNSCFWnrVIzKG3EGyMXo6n/BQOe+bX3FClY4PwydVhthOZ9NnS+ntiLh0fxtlUJHAuGaFoVmttpVMeum0p3WEXbcll94l1wM/gZ0Ccczop77VvN2I7TlsZCsuXf1WHvWEhjO8DPtyOVg2/mvK9QqboEth+7pD6NUQC1HN/TwvydGBARi9MZSzLE4b8Ru3XhX2PBxf8E1er2A6516o0w4sIA+lwURhAON82Kwe2iDAC1Watq4XHaGQ7skLcFOtI5lDxuM2gZe6WFIotPAhbaeYlU4to5cuarF1QrcZ/lwrLaCJl66JBocYZnrNlvm2+MBCTmUymPrYZVbjdlr/BxlMjmNmNI3SAAAAAElFTkSuQmCC"}]}const ex=Yg({name:"FlowChart",components:{BasicModal:Dw,FlowChartToolbar:Uw,JsonPreview:Cw},props:{flowOptions:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})},toolbar:{type:Boolean,default:!0},patternItems:{type:Array}},setup(g){const h=xu(null),s=xu({}),f=xu(null),{prefixCls:i}=yw("flow-chart"),l=gw(),[c,{openModal:v}]=Nw();Iw({logicFlow:f});const m=jw(()=>{const{flowOptions:P}=g;return sf({grid:!0,background:{color:l.getDarkMode==="light"?"#f7f9ff":"#151515"},keyboard:{enabled:!0}},P)});bg(()=>g.data,()=>{w()}),bg(()=>dn(m),P=>{var j;(j=dn(f))==null||j.updateEditConfig(P)});function x(){return wu(this,null,function*(){yield cf();const P=dn(h);if(!P)return;zo.use(A1),zo.use(f1),zo.use(l1),zo.use(P1),zo.use(k1),f.value=new zo(gg(sf({},dn(m)),{container:P}));const j=dn(f);j==null||j.setDefaultEdgeType("line"),w(),j==null||j.setPatternItems(g.patternItems||Q1(j))})}function w(){return wu(this,null,function*(){yield cf();const P=dn(f);if(!P)return;const j=$1(g.data);P.render(j)})}function A(){const P=dn(f);P&&(s.value=dn(P).getGraphData(),v())}return Pw(x),{register:c,prefixCls:i,lfElRef:h,handlePreview:A,graphData:s}}}),tx={ref:"lfElRef",class:"h-full"};function nx(g,h,s,f,i,l){const c=Yr("FlowChartToolbar"),v=Yr("JsonPreview"),m=Yr("BasicModal");return Gr(),Ai("div",{class:Eu(["h-full",g.prefixCls])},[g.toolbar?(Gr(),bf(c,{key:0,prefixCls:g.prefixCls,onViewData:g.handlePreview},null,8,["prefixCls","onViewData"])):lf("v-if",!0),Aw("div",tx,null,512),Di(m,{onRegister:g.register,title:"流程数据",width:"50%"},{default:Au(()=>[Di(v,{data:g.graphData},null,8,["data"])]),_:1},8,["onRegister"])],2)}const rx=vf(ex,[["render",nx],["__file","E:/allcode/erp/test7901/order-erp-front/src/components/FlowChart/src/FlowChart.vue"]]),ox=vw(rx),ix=[{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"}],ax={flowElementList:ix},ux={components:{FlowChart:ox,PageWrapper:Rw},setup(){return{demoData:ax}}};function sx(g,h,s,f,i,l){const c=Yr("FlowChart"),v=Yr("PageWrapper");return Gr(),bf(v,{title:"流程图",content:"简单流程图示例,具体功能需要自己完善",contentFullHeight:"",fixedHeight:""},{default:Au(()=>[Di(c,{data:f.demoData},null,8,["data"])]),_:1})}const mx=vf(ux,[["render",sx],["__file","E:/allcode/erp/test7901/order-erp-front/src/views/demo/comp/flow-chart/index.vue"]]);export{mx as default};