index-b8EuPz-w.js 700 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. var i1=Object.defineProperty,u1=Object.defineProperties;var a1=Object.getOwnPropertyDescriptors;var Vb=Object.getOwnPropertySymbols;var s1=Object.prototype.hasOwnProperty,c1=Object.prototype.propertyIsEnumerable;var Kb=(m,y,c)=>y in m?i1(m,y,{enumerable:!0,configurable:!0,writable:!0,value:c}):m[y]=c,Wg=(m,y)=>{for(var c in y||(y={}))s1.call(y,c)&&Kb(m,c,y[c]);if(Vb)for(var c of Vb(y))c1.call(y,c)&&Kb(m,c,y[c]);return m},$b=(m,y)=>u1(m,a1(y));var md=(m,y,c)=>new Promise((l,o)=>{var p=g=>{try{O(c.next(g))}catch(E){o(E)}},d=g=>{try{O(c.throw(g))}catch(E){o(E)}},O=g=>g.done?l(g.value):Promise.resolve(g.value).then(p,d);O((c=c.apply(m,y)).next())});import{a as f1,h as l1,k as p1,aD as d1}from"./entry/index-CRWhxBeP.js";import{p as h1,e as y1,d as iv,f as _d,h as g1,u as Dn,y as Vg,b as v1,Z as Gu,_ as rl,F as qb,a7 as m1,k as cl,a5 as Sd,G as b1,a0 as _1,a1 as Od,a8 as Kg,a9 as O1,a4 as uv,c as w1,w as Zb,o as x1,$ as E1}from"./vue-DM5HGU8Z.js";import{T as S1,ab as j1,b as P1,bk as T_}from"./antd-BfqWtMX3.js";import{u as A1,B as M1}from"./index-CD5zFmZN.js";import{J as k1}from"./index-Brpm-Jnb.js";import{P as T1}from"./index-C0mnMlct.js";import"./useWindowSizeFn-CEueHQop.js";import"./useContentViewHeight-D9So7_ch.js";import"./onMountedOrActivated-Ckq_czNf.js";const D_=Symbol("flow-chart");function D1(m){h1(D_,m)}function N1(){return y1(D_)}var jr=(m=>(m.ZOOM_IN="zoomIn",m.ZOOM_OUT="zoomOut",m.RESET_ZOOM="resetZoom",m.UNDO="undo",m.REDO="redo",m.SNAPSHOT="snapshot",m.VIEW_DATA="viewData",m))(jr||{});const C1=["onClick"],R1=iv({name:"FlowChartToolbar",__name:"FlowChartToolbar",props:{prefixCls:String},emits:["view-data"],setup(m,{emit:y}){const c=y,l=_d([{type:jr.ZOOM_IN,icon:"codicon:zoom-out",tooltip:"缩小"},{type:jr.ZOOM_OUT,icon:"codicon:zoom-in",tooltip:"放大"},{type:jr.RESET_ZOOM,icon:"codicon:screen-normal",tooltip:"重置比例"},{separate:!0},{type:jr.UNDO,icon:"ion:arrow-undo-outline",tooltip:"后退",disabled:!0},{type:jr.REDO,icon:"ion:arrow-redo-outline",tooltip:"前进",disabled:!0},{separate:!0},{type:jr.SNAPSHOT,icon:"ion:download-outline",tooltip:"下载"},{type:jr.VIEW_DATA,icon:"carbon:document-view",tooltip:"查看数据"}]),{logicFlow:o}=N1();function p({data:{undoAble:O,redoAble:g}}){const E=Dn(l),M=E.findIndex(T=>T.type===jr.UNDO),A=E.findIndex(T=>T.type===jr.REDO);M!==-1&&(Dn(l)[M].disabled=!O),A!==-1&&(Dn(l)[A].disabled=!g)}const d=O=>{const g=Dn(o);if(g)switch(O.type){case jr.ZOOM_IN:g.zoom();break;case jr.ZOOM_OUT:g.zoom(!0);break;case jr.RESET_ZOOM:g.resetZoom();break;case jr.UNDO:g.undo();break;case jr.REDO:g.redo();break;case jr.SNAPSHOT:g.getSnapshot();break;case jr.VIEW_DATA:c("view-data");break}};return g1(()=>md(this,null,function*(){var O;Dn(o)&&(yield Vg(),(O=Dn(o))==null||O.on("history:change",p))})),v1(()=>{var O;(O=Dn(o))==null||O.off("history:change",p)}),(O,g)=>(Gu(),rl("div",{class:Od([`${m.prefixCls}-toolbar`,"flex items-center px-2 py-1"])},[(Gu(!0),rl(qb,null,m1(l.value,E=>(Gu(),rl(qb,{key:E.type},[cl(Dn(S1),O1({placement:"bottom",ref_for:!0},E.disabled?{visible:!1}:{}),{title:Sd(()=>[b1(_1(E.tooltip),1)]),default:Sd(()=>[E.icon?(Gu(),rl("span",{key:0,class:Od(`${m.prefixCls}-toolbar__icon`),onClick:M=>d(E)},[cl(f1,{icon:E.icon,class:Od(E.disabled?"cursor-not-allowed disabled":"cursor-pointer")},null,8,["icon","class"])],10,C1)):Kg("",!0)]),_:2},1040),E.separate?(Gu(),uv(Dn(j1),{key:0,type:"vertical"})):Kg("",!0)],64))),128))],2))}});var $g={exports:{}};(function(m,y){(function(c,l){m.exports=l()})(window,function(){return function(c){var l={};function o(p){if(l[p])return l[p].exports;var d=l[p]={i:p,l:!1,exports:{}};return c[p].call(d.exports,d,d.exports,o),d.l=!0,d.exports}return o.m=c,o.c=l,o.d=function(p,d,O){o.o(p,d)||Object.defineProperty(p,d,{enumerable:!0,get:O})},o.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},o.t=function(p,d){if(1&d&&(p=o(p)),8&d||4&d&&typeof p=="object"&&p&&p.__esModule)return p;var O=Object.create(null);if(o.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:p}),2&d&&typeof p!="string")for(var g in p)o.d(O,g,function(E){return p[E]}.bind(null,g));return O},o.n=function(p){var d=p&&p.__esModule?function(){return p.default}:function(){return p};return o.d(d,"a",d),d},o.o=function(p,d){return Object.prototype.hasOwnProperty.call(p,d)},o.p="",o(o.s=222)}([function(c,l,o){o.d(l,"a",function(){return re}),o.d(l,"b",function(){return ie}),o.d(l,"c",function(){return Ze}),o.d(l,"d",function(){return gt}),o.d(l,"e",function(){return W}),o.d(l,"f",function(){return te}),o.d(l,"g",function(){return W}),o.d(l,"h",function(){return We}),o.d(l,"i",function(){return d}),o.d(l,"j",function(){return Ot}),o.d(l,"k",function(){return $});var p,d,O,g,E,M,A,T={},k=[],R=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function C(se,ae){for(var he in ae)se[he]=ae[he];return se}function F(se){var ae=se.parentNode;ae&&ae.removeChild(se)}function W(se,ae,he){var Te,He,Le,wt={};for(Le in ae)Le=="key"?Te=ae[Le]:Le=="ref"?He=ae[Le]:wt[Le]=ae[Le];if(arguments.length>2&&(wt.children=arguments.length>3?p.call(arguments,2):he),typeof se=="function"&&se.defaultProps!=null)for(Le in se.defaultProps)wt[Le]===void 0&&(wt[Le]=se.defaultProps[Le]);return V(se,wt,Te,He,null)}function V(se,ae,he,Te,He){var Le={type:se,props:ae,key:he,ref:Te,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:He==null?++O:He};return He==null&&d.vnode!=null&&d.vnode(Le),Le}function te(){return{current:null}}function ie(se){return se.children}function re(se,ae){this.props=se,this.context=ae}function J(se,ae){if(ae==null)return se.__?J(se.__,se.__.__k.indexOf(se)+1):null;for(var he;ae<se.__k.length;ae++)if((he=se.__k[ae])!=null&&he.__e!=null)return he.__e;return typeof se.type=="function"?J(se):null}function Z(se){var ae,he;if((se=se.__)!=null&&se.__c!=null){for(se.__e=se.__c.base=null,ae=0;ae<se.__k.length;ae++)if((he=se.__k[ae])!=null&&he.__e!=null){se.__e=se.__c.base=he.__e;break}return Z(se)}}function Y(se){(!se.__d&&(se.__d=!0)&&g.push(se)&&!z.__r++||M!==d.debounceRendering)&&((M=d.debounceRendering)||E)(z)}function z(){for(var se;z.__r=g.length;)se=g.sort(function(ae,he){return ae.__v.__b-he.__v.__b}),g=[],se.some(function(ae){var he,Te,He,Le,wt,kt;ae.__d&&(wt=(Le=(he=ae).__v).__e,(kt=he.__P)&&(Te=[],(He=C({},Le)).__v=Le.__v+1,Se(kt,Le,He,he.__n,kt.ownerSVGElement!==void 0,Le.__h!=null?[wt]:null,Te,wt==null?J(Le):wt,Le.__h),ye(Te,Le),Le.__e!=wt&&Z(Le)))})}function G(se,ae,he,Te,He,Le,wt,kt,St,yt){var Me,ct,le,ut,It,on,Lt,qt=Te&&Te.__k||k,dn=qt.length;for(he.__k=[],Me=0;Me<ae.length;Me++)if((ut=he.__k[Me]=(ut=ae[Me])==null||typeof ut=="boolean"?null:typeof ut=="string"||typeof ut=="number"||typeof ut=="bigint"?V(null,ut,null,null,ut):Array.isArray(ut)?V(ie,{children:ut},null,null,null):ut.__b>0?V(ut.type,ut.props,ut.key,null,ut.__v):ut)!=null){if(ut.__=he,ut.__b=he.__b+1,(le=qt[Me])===null||le&&ut.key==le.key&&ut.type===le.type)qt[Me]=void 0;else for(ct=0;ct<dn;ct++){if((le=qt[ct])&&ut.key==le.key&&ut.type===le.type){qt[ct]=void 0;break}le=null}Se(se,ut,le=le||T,He,Le,wt,kt,St,yt),It=ut.__e,(ct=ut.ref)&&le.ref!=ct&&(Lt||(Lt=[]),le.ref&&Lt.push(le.ref,null,ut),Lt.push(ct,ut.__c||It,ut)),It!=null?(on==null&&(on=It),typeof ut.type=="function"&&ut.__k===le.__k?ut.__d=St=X(ut,St,se):St=ue(se,ut,le,qt,It,St),typeof he.type=="function"&&(he.__d=St)):St&&le.__e==St&&St.parentNode!=se&&(St=J(le))}for(he.__e=on,Me=dn;Me--;)qt[Me]!=null&&(typeof he.type=="function"&&qt[Me].__e!=null&&qt[Me].__e==he.__d&&(he.__d=J(Te,Me+1)),Ue(qt[Me],qt[Me]));if(Lt)for(Me=0;Me<Lt.length;Me++)Ae(Lt[Me],Lt[++Me],Lt[++Me])}function X(se,ae,he){for(var Te,He=se.__k,Le=0;He&&Le<He.length;Le++)(Te=He[Le])&&(Te.__=se,ae=typeof Te.type=="function"?X(Te,ae,he):ue(he,Te,Te,He,Te.__e,ae));return ae}function $(se,ae){return ae=ae||[],se==null||typeof se=="boolean"||(Array.isArray(se)?se.some(function(he){$(he,ae)}):ae.push(se)),ae}function ue(se,ae,he,Te,He,Le){var wt,kt,St;if(ae.__d!==void 0)wt=ae.__d,ae.__d=void 0;else if(he==null||He!=Le||He.parentNode==null)e:if(Le==null||Le.parentNode!==se)se.appendChild(He),wt=null;else{for(kt=Le,St=0;(kt=kt.nextSibling)&&St<Te.length;St+=2)if(kt==He)break e;se.insertBefore(He,Le),wt=Le}return wt!==void 0?wt:He.nextSibling}function xe(se,ae,he){ae[0]==="-"?se.setProperty(ae,he):se[ae]=he==null?"":typeof he!="number"||R.test(ae)?he:he+"px"}function me(se,ae,he,Te,He){var Le;e:if(ae==="style")if(typeof he=="string")se.style.cssText=he;else{if(typeof Te=="string"&&(se.style.cssText=Te=""),Te)for(ae in Te)he&&ae in he||xe(se.style,ae,"");if(he)for(ae in he)Te&&he[ae]===Te[ae]||xe(se.style,ae,he[ae])}else if(ae[0]==="o"&&ae[1]==="n")Le=ae!==(ae=ae.replace(/Capture$/,"")),ae=ae.toLowerCase()in se?ae.toLowerCase().slice(2):ae.slice(2),se.l||(se.l={}),se.l[ae+Le]=he,he?Te||se.addEventListener(ae,Le?Be:Pe,Le):se.removeEventListener(ae,Le?Be:Pe,Le);else if(ae!=="dangerouslySetInnerHTML"){if(He)ae=ae.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(ae!=="href"&&ae!=="list"&&ae!=="form"&&ae!=="tabIndex"&&ae!=="download"&&ae in se)try{se[ae]=he==null?"":he;break e}catch(wt){}typeof he=="function"||(he!=null&&(he!==!1||ae[0]==="a"&&ae[1]==="r")?se.setAttribute(ae,he):se.removeAttribute(ae))}}function Pe(se){this.l[se.type+!1](d.event?d.event(se):se)}function Be(se){this.l[se.type+!0](d.event?d.event(se):se)}function Se(se,ae,he,Te,He,Le,wt,kt,St){var yt,Me,ct,le,ut,It,on,Lt,qt,dn,bn,Dt=ae.type;if(ae.constructor!==void 0)return null;he.__h!=null&&(St=he.__h,kt=ae.__e=he.__e,ae.__h=null,Le=[kt]),(yt=d.__b)&&yt(ae);try{e:if(typeof Dt=="function"){if(Lt=ae.props,qt=(yt=Dt.contextType)&&Te[yt.__c],dn=yt?qt?qt.props.value:yt.__:Te,he.__c?on=(Me=ae.__c=he.__c).__=Me.__E:("prototype"in Dt&&Dt.prototype.render?ae.__c=Me=new Dt(Lt,dn):(ae.__c=Me=new re(Lt,dn),Me.constructor=Dt,Me.render=nt),qt&&qt.sub(Me),Me.props=Lt,Me.state||(Me.state={}),Me.context=dn,Me.__n=Te,ct=Me.__d=!0,Me.__h=[]),Me.__s==null&&(Me.__s=Me.state),Dt.getDerivedStateFromProps!=null&&(Me.__s==Me.state&&(Me.__s=C({},Me.__s)),C(Me.__s,Dt.getDerivedStateFromProps(Lt,Me.__s))),le=Me.props,ut=Me.state,ct)Dt.getDerivedStateFromProps==null&&Me.componentWillMount!=null&&Me.componentWillMount(),Me.componentDidMount!=null&&Me.__h.push(Me.componentDidMount);else{if(Dt.getDerivedStateFromProps==null&&Lt!==le&&Me.componentWillReceiveProps!=null&&Me.componentWillReceiveProps(Lt,dn),!Me.__e&&Me.shouldComponentUpdate!=null&&Me.shouldComponentUpdate(Lt,Me.__s,dn)===!1||ae.__v===he.__v){Me.props=Lt,Me.state=Me.__s,ae.__v!==he.__v&&(Me.__d=!1),Me.__v=ae,ae.__e=he.__e,ae.__k=he.__k,ae.__k.forEach(function(Nn){Nn&&(Nn.__=ae)}),Me.__h.length&&wt.push(Me);break e}Me.componentWillUpdate!=null&&Me.componentWillUpdate(Lt,Me.__s,dn),Me.componentDidUpdate!=null&&Me.__h.push(function(){Me.componentDidUpdate(le,ut,It)})}Me.context=dn,Me.props=Lt,Me.state=Me.__s,(yt=d.__r)&&yt(ae),Me.__d=!1,Me.__v=ae,Me.__P=se,yt=Me.render(Me.props,Me.state,Me.context),Me.state=Me.__s,Me.getChildContext!=null&&(Te=C(C({},Te),Me.getChildContext())),ct||Me.getSnapshotBeforeUpdate==null||(It=Me.getSnapshotBeforeUpdate(le,ut)),bn=yt!=null&&yt.type===ie&&yt.key==null?yt.props.children:yt,G(se,Array.isArray(bn)?bn:[bn],ae,he,Te,He,Le,wt,kt,St),Me.base=ae.__e,ae.__h=null,Me.__h.length&&wt.push(Me),on&&(Me.__E=Me.__=null),Me.__e=!1}else Le==null&&ae.__v===he.__v?(ae.__k=he.__k,ae.__e=he.__e):ae.__e=je(he.__e,ae,he,Te,He,Le,wt,St);(yt=d.diffed)&&yt(ae)}catch(Nn){ae.__v=null,(St||Le!=null)&&(ae.__e=kt,ae.__h=!!St,Le[Le.indexOf(kt)]=null),d.__e(Nn,ae,he)}}function ye(se,ae){d.__c&&d.__c(ae,se),se.some(function(he){try{se=he.__h,he.__h=[],se.some(function(Te){Te.call(he)})}catch(Te){d.__e(Te,he.__v)}})}function je(se,ae,he,Te,He,Le,wt,kt){var St,yt,Me,ct=he.props,le=ae.props,ut=ae.type,It=0;if(ut==="svg"&&(He=!0),Le!=null){for(;It<Le.length;It++)if((St=Le[It])&&"setAttribute"in St==!!ut&&(ut?St.localName===ut:St.nodeType===3)){se=St,Le[It]=null;break}}if(se==null){if(ut===null)return document.createTextNode(le);se=He?document.createElementNS("http://www.w3.org/2000/svg",ut):document.createElement(ut,le.is&&le),Le=null,kt=!1}if(ut===null)ct===le||kt&&se.data===le||(se.data=le);else{if(Le=Le&&p.call(se.childNodes),yt=(ct=he.props||T).dangerouslySetInnerHTML,Me=le.dangerouslySetInnerHTML,!kt){if(Le!=null)for(ct={},It=0;It<se.attributes.length;It++)ct[se.attributes[It].name]=se.attributes[It].value;(Me||yt)&&(Me&&(yt&&Me.__html==yt.__html||Me.__html===se.innerHTML)||(se.innerHTML=Me&&Me.__html||""))}if(function(on,Lt,qt,dn,bn){var Dt;for(Dt in qt)Dt==="children"||Dt==="key"||Dt in Lt||me(on,Dt,null,qt[Dt],dn);for(Dt in Lt)bn&&typeof Lt[Dt]!="function"||Dt==="children"||Dt==="key"||Dt==="value"||Dt==="checked"||qt[Dt]===Lt[Dt]||me(on,Dt,Lt[Dt],qt[Dt],dn)}(se,le,ct,He,kt),Me)ae.__k=[];else if(It=ae.props.children,G(se,Array.isArray(It)?It:[It],ae,he,Te,He&&ut!=="foreignObject",Le,wt,Le?Le[0]:he.__k&&J(he,0),kt),Le!=null)for(It=Le.length;It--;)Le[It]!=null&&F(Le[It]);kt||("value"in le&&(It=le.value)!==void 0&&(It!==ct.value||It!==se.value||ut==="progress"&&!It)&&me(se,"value",It,ct.value,!1),"checked"in le&&(It=le.checked)!==void 0&&It!==se.checked&&me(se,"checked",It,ct.checked,!1))}return se}function Ae(se,ae,he){try{typeof se=="function"?se(ae):se.current=ae}catch(Te){d.__e(Te,he)}}function Ue(se,ae,he){var Te,He;if(d.unmount&&d.unmount(se),(Te=se.ref)&&(Te.current&&Te.current!==se.__e||Ae(Te,null,ae)),(Te=se.__c)!=null){if(Te.componentWillUnmount)try{Te.componentWillUnmount()}catch(Le){d.__e(Le,ae)}Te.base=Te.__P=null}if(Te=se.__k)for(He=0;He<Te.length;He++)Te[He]&&Ue(Te[He],ae,typeof se.type!="function");he||se.__e==null||F(se.__e),se.__e=se.__d=void 0}function nt(se,ae,he){return this.constructor(se,he)}function Ot(se,ae,he){var Te,He,Le;d.__&&d.__(se,ae),He=(Te=typeof he=="function")?null:he&&he.__k||ae.__k,Le=[],Se(ae,se=(!Te&&he||ae).__k=W(ie,null,[se]),He||T,T,ae.ownerSVGElement!==void 0,!Te&&he?[he]:He?null:ae.firstChild?p.call(ae.childNodes):null,Le,!Te&&he?he:He?He.__e:ae.firstChild,Te),ye(Le,se)}function We(se,ae){Ot(se,ae,We)}function Ze(se,ae,he){var Te,He,Le,wt=C({},se.props);for(Le in ae)Le=="key"?Te=ae[Le]:Le=="ref"?He=ae[Le]:wt[Le]=ae[Le];return arguments.length>2&&(wt.children=arguments.length>3?p.call(arguments,2):he),V(se.type,wt,Te||se.key,He||se.ref,null)}function gt(se,ae){var he={__c:ae="__cC"+A++,__:se,Consumer:function(Te,He){return Te.children(He)},Provider:function(Te){var He,Le;return this.getChildContext||(He=[],(Le={})[ae]=this,this.getChildContext=function(){return Le},this.shouldComponentUpdate=function(wt){this.props.value!==wt.value&&He.some(Y)},this.sub=function(wt){He.push(wt);var kt=wt.componentWillUnmount;wt.componentWillUnmount=function(){He.splice(He.indexOf(wt),1),kt&&kt.call(wt)}}),Te.children}};return he.Provider.__=he.Consumer.contextType=he}p=k.slice,d={__e:function(se,ae){for(var he,Te,He;ae=ae.__;)if((he=ae.__c)&&!he.__)try{if((Te=he.constructor)&&Te.getDerivedStateFromError!=null&&(he.setState(Te.getDerivedStateFromError(se)),He=he.__d),he.componentDidCatch!=null&&(he.componentDidCatch(se),He=he.__d),He)return he.__E=he}catch(Le){se=Le}throw se}},O=0,re.prototype.setState=function(se,ae){var he;he=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C({},this.state),typeof se=="function"&&(se=se(C({},he),this.props)),se&&C(he,se),se!=null&&this.__v&&(ae&&this.__h.push(ae),Y(this))},re.prototype.forceUpdate=function(se){this.__v&&(this.__e=!0,se&&this.__h.push(se),Y(this))},re.prototype.render=ie,g=[],E=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,z.__r=0,A=0},function(c,l,o){(function(p,d){o.d(l,"a",function(){return Y}),o.d(l,"b",function(){return ca}),o.d(l,"c",function(){return qr}),o.d(l,"d",function(){return Et}),o.d(l,"e",function(){return Ke}),o.d(l,"f",function(){return Ve}),o.d(l,"g",function(){return mt}),o.d(l,"h",function(){return fo}),o.d(l,"i",function(){return bn}),o.d(l,"j",function(){return at}),o.d(l,"k",function(){return xo}),o.d(l,"l",function(){return Qu}),o.d(l,"m",function(){return on}),o.d(l,"n",function(){return si}),o.d(l,"o",function(){return X}),o.d(l,"p",function(){return Sc}),o.d(l,"q",function(){return Eo}),o.d(l,"r",function(){return ru}),o.d(l,"s",function(){return Fr}),o.d(l,"t",function(){return An}),o.d(l,"u",function(){return nu}),o.d(l,"v",function(){return ts}),o.d(l,"w",function(){return oa}),o.d(l,"x",function(){return ci}),o.d(l,"y",function(){return Br}),o.d(l,"z",function(){return Rn}),o.d(l,"A",function(){return _r}),o.d(l,"B",function(){return So}),o.d(l,"C",function(){return yt}),o.d(l,"D",function(){return jc}),o.d(l,"E",function(){return un}),o.d(l,"F",function(){return sn}),o.d(l,"G",function(){return Zu}),o.d(l,"H",function(){return qu}),o.d(l,"I",function(){return ia}),o.d(l,"J",function(){return Hn}),o.d(l,"K",function(){return de}),o.d(l,"L",function(){return gn}),o.d(l,"M",function(){return iu});var O=[];Object.freeze(O);var g={};function E(){return++ft.mobxGuid}function M(_){throw A(!1,_),"X"}function A(_,w){if(!_)throw new Error("[mobx] "+(w||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(g);function T(_){var w=!1;return function(){if(!w)return w=!0,_.apply(this,arguments)}}var k=function(){};function R(_){return _!==null&&typeof _=="object"}function C(_){if(_===null||typeof _!="object")return!1;var w=Object.getPrototypeOf(_);return w===Object.prototype||w===null}function F(_,w,P){Object.defineProperty(_,w,{enumerable:!1,writable:!0,configurable:!0,value:P})}function W(_,w){var P="isMobX"+_;return w.prototype[P]=!0,function(L){return R(L)&&L[P]===!0}}function V(_){return _ instanceof Map}function te(_){return _ instanceof Set}function ie(_){var w=new Set;for(var P in _)w.add(P);return Object.getOwnPropertySymbols(_).forEach(function(L){Object.getOwnPropertyDescriptor(_,L).enumerable&&w.add(L)}),Array.from(w)}function re(_){return _&&_.toString?_.toString():new String(_).toString()}function J(_){return _===null?null:typeof _=="object"?""+_:_}var Z=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:Object.getOwnPropertyNames,Y=Symbol("mobx administration"),z=function(){function _(w){w===void 0&&(w="Atom@"+E()),this.name=w,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=ct.NOT_TRACKING}return _.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(w){return w()})},_.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(w){return w()})},_.prototype.reportObserved=function(){return tu(this)},_.prototype.reportChanged=function(){gr(),function(w){w.lowestObserverState!==ct.STALE&&(w.lowestObserverState=ct.STALE,w.observers.forEach(function(P){P.dependenciesState===ct.UP_TO_DATE&&(P.isTracing!==le.NONE&&$r(P,w),P.onBecomeStale()),P.dependenciesState=ct.STALE}))}(this),Pr()},_.prototype.toString=function(){return this.name},_}(),G=W("Atom",z);function X(_,w,P){w===void 0&&(w=k),P===void 0&&(P=k);var L,K=new z(_);return w!==k&&Qa("onBecomeObserved",K,w,L),P!==k&&un(K,P),K}var $={identity:function(_,w){return _===w},structural:function(_,w){return Ne(_,w)},default:function(_,w){return Object.is(_,w)},shallow:function(_,w){return Ne(_,w,1)}},ue=function(_,w){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,L){P.__proto__=L}||function(P,L){for(var K in L)L.hasOwnProperty(K)&&(P[K]=L[K])},ue(_,w)};/*! *****************************************************************************
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  4. this file except in compliance with the License. You may obtain a copy of the
  5. License at http://www.apache.org/licenses/LICENSE-2.0
  6. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  7. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  8. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  9. MERCHANTABLITY OR NON-INFRINGEMENT.
  10. See the Apache Version 2.0 License for specific language governing permissions
  11. and limitations under the License.
  12. ***************************************************************************** */var xe=function(){return xe=Object.assign||function(_){for(var w,P=1,L=arguments.length;P<L;P++)for(var K in w=arguments[P])Object.prototype.hasOwnProperty.call(w,K)&&(_[K]=w[K]);return _},xe.apply(this,arguments)};function me(_){var w=typeof Symbol=="function"&&_[Symbol.iterator],P=0;return w?w.call(_):{next:function(){return _&&P>=_.length&&(_=void 0),{value:_&&_[P++],done:!_}}}}function Pe(_,w){var P=typeof Symbol=="function"&&_[Symbol.iterator];if(!P)return _;var L,K,pe=P.call(_),Ee=[];try{for(;(w===void 0||w-- >0)&&!(L=pe.next()).done;)Ee.push(L.value)}catch(Fe){K={error:Fe}}finally{try{L&&!L.done&&(P=pe.return)&&P.call(pe)}finally{if(K)throw K.error}}return Ee}function Be(){for(var _=[],w=0;w<arguments.length;w++)_=_.concat(Pe(arguments[w]));return _}var Se=Symbol("mobx did run lazy initializers"),ye=Symbol("mobx pending decorators"),je={},Ae={};function Ue(_,w){var P=w?je:Ae;return P[_]||(P[_]={configurable:!0,enumerable:w,get:function(){return nt(this),this[_]},set:function(L){nt(this),this[_]=L}})}function nt(_){var w,P;if(_[Se]!==!0){var L=_[ye];if(L){F(_,Se,!0);var K=Be(Object.getOwnPropertySymbols(L),Object.keys(L));try{for(var pe=me(K),Ee=pe.next();!Ee.done;Ee=pe.next()){var Fe=L[Ee.value];Fe.propertyCreator(_,Fe.prop,Fe.descriptor,Fe.decoratorTarget,Fe.decoratorArguments)}}catch(st){w={error:st}}finally{try{Ee&&!Ee.done&&(P=pe.return)&&P.call(pe)}finally{if(w)throw w.error}}}}}function Ot(_,w){return function(){var P,L=function(K,pe,Ee,Fe){if(Fe===!0)return w(K,pe,Ee,K,P),null;if(!Object.prototype.hasOwnProperty.call(K,ye)){var st=K[ye];F(K,ye,xe({},st))}return K[ye][pe]={prop:pe,propertyCreator:w,descriptor:Ee,decoratorTarget:K,decoratorArguments:P},Ue(pe,_)};return We(arguments)?(P=O,L.apply(null,arguments)):(P=Array.prototype.slice.call(arguments),L)}}function We(_){return(_.length===2||_.length===3)&&(typeof _[1]=="string"||typeof _[1]=="symbol")||_.length===4&&_[3]===!0}function Ze(_,w,P){return ci(_)?_:Array.isArray(_)?yt.array(_,{name:P}):C(_)?yt.object(_,void 0,{name:P}):V(_)?yt.map(_,{name:P}):te(_)?yt.set(_,{name:P}):_}function gt(_){return _}function se(_){A(_);var w=Ot(!0,function(L,K,pe,Ee,Fe){var st=pe?pe.initializer?pe.initializer.call(L):pe.value:void 0;Ar(L).addObservableProp(K,st,_)}),P=(p!==void 0&&p.env,w);return P.enhancer=_,P}var ae={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function he(_){return _==null?ae:typeof _=="string"?{name:_,deep:!0,proxy:!0}:_}Object.freeze(ae);var Te=se(Ze),He=se(function(_,w,P){return _==null||_r(_)||Br(_)||Rn(_)||sr(_)?_:Array.isArray(_)?yt.array(_,{name:P,deep:!1}):C(_)?yt.object(_,void 0,{name:P,deep:!1}):V(_)?yt.map(_,{name:P,deep:!1}):te(_)?yt.set(_,{name:P,deep:!1}):M(!1)}),Le=se(gt),wt=se(function(_,w,P){return Ne(_,w)?w:_});function kt(_){return _.defaultDecorator?_.defaultDecorator.enhancer:_.deep===!1?gt:Ze}var St={box:function(_,w){arguments.length>2&&Me("box");var P=he(w);return new xn(_,kt(P),P.name,!0,P.equals)},array:function(_,w){arguments.length>2&&Me("array");var P=he(w);return Ni(_,kt(P),P.name)},map:function(_,w){arguments.length>2&&Me("map");var P=he(w);return new ca(_,kt(P),P.name)},set:function(_,w){arguments.length>2&&Me("set");var P=he(w);return new so(_,kt(P),P.name)},object:function(_,w,P){typeof arguments[1]=="string"&&Me("object");var L=he(P);if(L.proxy===!1)return Eo({},_,w,L);var K=ea(L),pe=Eo({},void 0,void 0,L),Ee=fi(pe);return es(Ee,_,w,K),Ee},ref:Le,shallow:He,deep:Te,struct:wt},yt=function(_,w,P){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return Te.apply(null,arguments);if(ci(_))return _;var L=C(_)?yt.object(_,w,P):Array.isArray(_)?yt.array(_,w):V(_)?yt.map(_,w):te(_)?yt.set(_,w):_;if(L!==_)return L;M(!1)};function Me(_){M("Expected one or two arguments to observable."+_+". Did you accidentally try to use observable."+_+" as decorator?")}Object.keys(St).forEach(function(_){return yt[_]=St[_]});var ct,le,ut=Ot(!1,function(_,w,P,L,K){var pe=P.get,Ee=P.set,Fe=K[0]||{};Ar(_).addComputedProp(_,w,xe({get:pe,set:Ee,context:_},Fe))}),It=ut({equals:$.structural}),on=function(_,w,P){if(typeof w=="string"||_!==null&&typeof _=="object"&&arguments.length===1)return ut.apply(null,arguments);var L=typeof w=="object"?w:{};return L.get=_,L.set=typeof w=="function"?w:L.set,L.name=L.name||_.name||"",new io(L)};on.struct=It,function(_){_[_.NOT_TRACKING=-1]="NOT_TRACKING",_[_.UP_TO_DATE=0]="UP_TO_DATE",_[_.POSSIBLY_STALE=1]="POSSIBLY_STALE",_[_.STALE=2]="STALE"}(ct||(ct={})),function(_){_[_.NONE=0]="NONE",_[_.LOG=1]="LOG",_[_.BREAK=2]="BREAK"}(le||(le={}));var Lt=function(_){this.cause=_};function qt(_){return _ instanceof Lt}function dn(_){switch(_.dependenciesState){case ct.UP_TO_DATE:return!1;case ct.NOT_TRACKING:case ct.STALE:return!0;case ct.POSSIBLY_STALE:for(var w=Ve(!0),P=oe(),L=_.observing,K=L.length,pe=0;pe<K;pe++){var Ee=L[pe];if(wo(Ee)){if(ft.disableErrorBoundaries)Ee.get();else try{Ee.get()}catch(Fe){return be(P),Ke(w),!0}if(_.dependenciesState===ct.STALE)return be(P),Ke(w),!0}}return lt(_),be(P),Ke(w),!1}}function bn(){return ft.trackingDerivation!==null}function Dt(_){var w=_.observers.size>0;ft.computationDepth>0&&w&&M(!1),ft.allowStateChanges||!w&&ft.enforceActions!=="strict"||M(!1)}function Nn(_,w,P){var L=Ve(!0);lt(_),_.newObserving=new Array(_.observing.length+100),_.unboundDepsCount=0,_.runId=++ft.runId;var K,pe=ft.trackingDerivation;if(ft.trackingDerivation=_,ft.disableErrorBoundaries===!0)K=w.call(P);else try{K=w.call(P)}catch(Ee){K=new Lt(Ee)}return ft.trackingDerivation=pe,function(Ee){for(var Fe=Ee.observing,st=Ee.observing=Ee.newObserving,Ht=ct.UP_TO_DATE,et=0,hn=Ee.unboundDepsCount,Bt=0;Bt<hn;Bt++)(tn=st[Bt]).diffValue===0&&(tn.diffValue=1,et!==Bt&&(st[et]=tn),et++),tn.dependenciesState>Ht&&(Ht=tn.dependenciesState);for(st.length=et,Ee.newObserving=null,hn=Fe.length;hn--;)(tn=Fe[hn]).diffValue===0&&Wu(tn,Ee),tn.diffValue=0;for(;et--;){var tn;(tn=st[et]).diffValue===1&&(tn.diffValue=0,wc(tn,Ee))}Ht!==ct.UP_TO_DATE&&(Ee.dependenciesState=Ht,Ee.onBecomeStale())}(_),Ke(L),K}function Q(_){var w=_.observing;_.observing=[];for(var P=w.length;P--;)Wu(w[P],_);_.dependenciesState=ct.NOT_TRACKING}function de(_){var w=oe();try{return _()}finally{be(w)}}function oe(){var _=ft.trackingDerivation;return ft.trackingDerivation=null,_}function be(_){ft.trackingDerivation=_}function Ve(_){var w=ft.allowStateReads;return ft.allowStateReads=_,w}function Ke(_){ft.allowStateReads=_}function lt(_){if(_.dependenciesState!==ct.UP_TO_DATE){_.dependenciesState=ct.UP_TO_DATE;for(var w=_.observing,P=w.length;P--;)w[P].lowestObserverState=ct.UP_TO_DATE}}var Gt=0,Xn=1,Qn=Object.getOwnPropertyDescriptor(function(){},"name");Qn&&Qn.configurable;function Cn(_,w,P){var L=function(){return zn(_,w,P||this,arguments)};return L.isMobxAction=!0,L}function zn(_,w,P,L){var K=at();try{return w.apply(P,L)}catch(pe){throw K.error=pe,pe}finally{mt(K)}}function at(_,w,P){var L=0,K=oe();gr();var pe={prevDerivation:K,prevAllowStateChanges:Nt(!0),prevAllowStateReads:Ve(!0),notifySpy:!1,startTime:L,actionId:Xn++,parentActionId:Gt};return Gt=pe.actionId,pe}function mt(_){Gt!==_.actionId&&M("invalid action stack. did you forget to finish an action?"),Gt=_.parentActionId,_.error!==void 0&&(ft.suppressReactionErrors=!0),fn(_.prevAllowStateChanges),Ke(_.prevAllowStateReads),Pr(),be(_.prevDerivation),_.notifySpy,ft.suppressReactionErrors=!1}function Et(_,w){var P,L=Nt(_);try{P=w()}finally{fn(L)}return P}function Nt(_){var w=ft.allowStateChanges;return ft.allowStateChanges=_,w}function fn(_){ft.allowStateChanges=_}var xn=function(_){function w(P,L,K,pe,Ee){K===void 0&&(K="ObservableValue@"+E()),Ee===void 0&&(Ee=$.default);var Fe=_.call(this,K)||this;return Fe.enhancer=L,Fe.name=K,Fe.equals=Ee,Fe.hasUnreportedChange=!1,Fe.value=L(P,void 0,K),Fe}return function(P,L){function K(){this.constructor=P}ue(P,L),P.prototype=L===null?Object.create(L):(K.prototype=L.prototype,new K)}(w,_),w.prototype.dehanceValue=function(P){return this.dehancer!==void 0?this.dehancer(P):P},w.prototype.set=function(P){this.value,(P=this.prepareNewValue(P))!==ft.UNCHANGED&&this.setNewValue(P)},w.prototype.prepareNewValue=function(P){if(Dt(this),mr(this)){var L=Zt(this,{object:this,type:"update",newValue:P});if(!L)return ft.UNCHANGED;P=L.newValue}return P=this.enhancer(P,this.value,this.name),this.equals(this.value,P)?ft.UNCHANGED:P},w.prototype.setNewValue=function(P){var L=this.value;this.value=P,this.reportChanged(),br(this)&&qn(this,{type:"update",object:this,newValue:P,oldValue:L})},w.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},w.prototype.intercept=function(P){return Po(this,P)},w.prototype.observe=function(P,L){return L&&P({object:this,type:"update",newValue:this.value,oldValue:void 0}),ao(this,P)},w.prototype.toJSON=function(){return this.get()},w.prototype.toString=function(){return this.name+"["+this.value+"]"},w.prototype.valueOf=function(){return J(this.get())},w.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},w}(z),Oo=W("ObservableValue",xn),io=function(){function _(w){this.dependenciesState=ct.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=ct.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+E(),this.value=new Lt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,A(w.get,"missing option for computed: get"),this.derivation=w.get,this.name=w.name||"ComputedValue@"+E(),w.set&&(this.setter=Cn(this.name+"-setter",w.set)),this.equals=w.equals||(w.compareStructural||w.struct?$.structural:$.default),this.scope=w.context,this.requiresReaction=!!w.requiresReaction,this.keepAlive=!!w.keepAlive}return _.prototype.onBecomeStale=function(){(function(w){w.lowestObserverState===ct.UP_TO_DATE&&(w.lowestObserverState=ct.POSSIBLY_STALE,w.observers.forEach(function(P){P.dependenciesState===ct.UP_TO_DATE&&(P.dependenciesState=ct.POSSIBLY_STALE,P.isTracing!==le.NONE&&$r(P,w),P.onBecomeStale())}))})(this)},_.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(w){return w()})},_.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(w){return w()})},_.prototype.get=function(){this.isComputing&&M("Cycle detected in computation "+this.name+": "+this.derivation),ft.inBatch!==0||this.observers.size!==0||this.keepAlive?(tu(this),dn(this)&&this.trackAndCompute()&&function(P){P.lowestObserverState!==ct.STALE&&(P.lowestObserverState=ct.STALE,P.observers.forEach(function(L){L.dependenciesState===ct.POSSIBLY_STALE?L.dependenciesState=ct.STALE:L.dependenciesState===ct.UP_TO_DATE&&(P.lowestObserverState=ct.UP_TO_DATE)}))}(this)):dn(this)&&(this.warnAboutUntrackedRead(),gr(),this.value=this.computeValue(!1),Pr());var w=this.value;if(qt(w))throw w.cause;return w},_.prototype.peek=function(){var w=this.computeValue(!1);if(qt(w))throw w.cause;return w},_.prototype.set=function(w){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,w)}finally{this.isRunningSetter=!1}}else A(!1,!1)},_.prototype.trackAndCompute=function(){var w=this.value,P=this.dependenciesState===ct.NOT_TRACKING,L=this.computeValue(!0),K=P||qt(w)||qt(L)||!this.equals(w,L);return K&&(this.value=L),K},_.prototype.computeValue=function(w){var P;if(this.isComputing=!0,ft.computationDepth++,w)P=Nn(this,this.derivation,this.scope);else if(ft.disableErrorBoundaries===!0)P=this.derivation.call(this.scope);else try{P=this.derivation.call(this.scope)}catch(L){P=new Lt(L)}return ft.computationDepth--,this.isComputing=!1,P},_.prototype.suspend=function(){this.keepAlive||(Q(this),this.value=void 0)},_.prototype.observe=function(w,P){var L=this,K=!0,pe=void 0;return Qu(function(){var Ee=L.get();if(!K||P){var Fe=oe();w({type:"update",object:L,newValue:Ee,oldValue:pe}),be(Fe)}K=!1,pe=Ee})},_.prototype.warnAboutUntrackedRead=function(){},_.prototype.toJSON=function(){return this.get()},_.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},_.prototype.valueOf=function(){return J(this.get())},_.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},_}(),wo=W("ComputedValue",io),ai=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},Oc={};function Yu(){return typeof window!="undefined"?window:d!==void 0?d:typeof self!="undefined"?self:Oc}var Ir=!0,ki=!1,ft=function(){var _=Yu();return _.__mobxInstanceCount>0&&!_.__mobxGlobals&&(Ir=!1),_.__mobxGlobals&&_.__mobxGlobals.version!==new ai().version&&(Ir=!1),Ir?_.__mobxGlobals?(_.__mobxInstanceCount+=1,_.__mobxGlobals.UNCHANGED||(_.__mobxGlobals.UNCHANGED={}),_.__mobxGlobals):(_.__mobxInstanceCount=1,_.__mobxGlobals=new ai):(setTimeout(function(){ki||M("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ai)}();function wc(_,w){_.observers.add(w),_.lowestObserverState>w.dependenciesState&&(_.lowestObserverState=w.dependenciesState)}function Wu(_,w){_.observers.delete(w),_.observers.size===0&&Vu(_)}function Vu(_){_.isPendingUnobservation===!1&&(_.isPendingUnobservation=!0,ft.pendingUnobservations.push(_))}function gr(){ft.inBatch++}function Pr(){if(--ft.inBatch==0){$u();for(var _=ft.pendingUnobservations,w=0;w<_.length;w++){var P=_[w];P.isPendingUnobservation=!1,P.observers.size===0&&(P.isBeingObserved&&(P.isBeingObserved=!1,P.onBecomeUnobserved()),P instanceof io&&P.suspend())}ft.pendingUnobservations=[]}}function tu(_){var w=ft.trackingDerivation;return w!==null?(w.runId!==_.lastAccessedBy&&(_.lastAccessedBy=w.runId,w.newObserving[w.unboundDepsCount++]=_,_.isBeingObserved||(_.isBeingObserved=!0,_.onBecomeObserved())),!0):(_.observers.size===0&&ft.inBatch>0&&Vu(_),!1)}function $r(_,w){if(_.isTracing===le.BREAK){var P=[];Lr(An(_),P,1),new Function(`debugger;
  13. /*
  14. Tracing '`+_.name+`'
  15. You are entering this break point because derivation '`+_.name+"' is being traced and '"+w.name+`' is now forcing it to update.
  16. Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
  17. The stackframe you are looking for is at least ~6-8 stack-frames up.
  18. `+(_ instanceof io?_.derivation.toString().replace(/[*]\//g,"/"):"")+`
  19. The dependencies for this derivation are:
  20. `+P.join(`
  21. `)+`
  22. */
  23. `)()}}function Lr(_,w,P){w.length>=1e3?w.push("(and many more)"):(w.push(""+new Array(P).join(" ")+_.name),_.dependencies&&_.dependencies.forEach(function(L){return Lr(L,w,P+1)}))}var qr=function(){function _(w,P,L,K){w===void 0&&(w="Reaction@"+E()),K===void 0&&(K=!1),this.name=w,this.onInvalidate=P,this.errorHandler=L,this.requiresObservable=K,this.observing=[],this.newObserving=[],this.dependenciesState=ct.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+E(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=le.NONE}return _.prototype.onBecomeStale=function(){this.schedule()},_.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,ft.pendingReactions.push(this),$u())},_.prototype.isScheduled=function(){return this._isScheduled},_.prototype.runReaction=function(){if(!this.isDisposed){if(gr(),this._isScheduled=!1,dn(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(w){this.reportExceptionInDerivation(w)}}Pr()}},_.prototype.track=function(w){if(!this.isDisposed){gr(),this._isRunning=!0;var P=Nn(this,w,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Q(this),qt(P)&&this.reportExceptionInDerivation(P.cause),Pr()}},_.prototype.reportExceptionInDerivation=function(w){var P=this;if(this.errorHandler)this.errorHandler(w,this);else{if(ft.disableErrorBoundaries)throw w;ft.suppressReactionErrors,ft.globalReactionErrorHandlers.forEach(function(L){return L(w,P)})}},_.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(gr(),Q(this),Pr()))},_.prototype.getDisposer=function(){var w=this.dispose.bind(this);return w[Y]=this,w},_.prototype.toString=function(){return"Reaction["+this.name+"]"},_.prototype.trace=function(w){w===void 0&&(w=!1),function(){for(var P=[],L=0;L<arguments.length;L++)P[L]=arguments[L];var K=!1;typeof P[P.length-1]=="boolean"&&(K=P.pop());var pe=en(P);if(!pe)return M(!1);pe.isTracing,le.NONE,pe.isTracing=K?le.BREAK:le.LOG}(this,w)},_}(),Ku=function(_){return _()};function $u(){ft.inBatch>0||ft.isRunningReactions||Ku($a)}function $a(){ft.isRunningReactions=!0;for(var _=ft.pendingReactions,w=0;_.length>0;){++w==100&&_.splice(0);for(var P=_.splice(0),L=0,K=P.length;L<K;L++)P[L].runReaction()}ft.isRunningReactions=!1}var Ti=W("Reaction",qr);function qa(_){var w=Ku;Ku=function(P){return _(function(){return w(P)})}}function qu(_){return function(){}}function xc(){M(!1)}function Bo(_){return function(w,P,L){if(L){if(L.value)return{value:Cn(_,L.value),enumerable:!1,configurable:!0,writable:!0};var K=L.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Cn(_,K.call(this))}}}return Za(_).apply(this,arguments)}}function Za(_){return function(w,P,L){Object.defineProperty(w,P,{configurable:!0,enumerable:!1,get:function(){},set:function(K){F(this,P,xo(_,K))}})}}var xo=function(_,w,P,L){return arguments.length===1&&typeof _=="function"?Cn(_.name||"<unnamed action>",_):arguments.length===2&&typeof w=="function"?Cn(_,w):arguments.length===1&&typeof _=="string"?Bo(_):L!==!0?Bo(w).apply(null,arguments):void F(_,w,Cn(_.name||w,P.value,this))};function Zu(_,w){return zn(typeof _=="string"?_:_.name||"<unnamed action>",typeof _=="function"?_:w,this,void 0)}function nu(_){return typeof _=="function"&&_.isMobxAction===!0}function Ju(_,w,P){F(_,w,Cn(w,P.bind(_)))}function Qu(_,w){w===void 0&&(w=g);var P,L=w&&w.name||_.name||"Autorun@"+E();if(!w.scheduler&&!w.delay)P=new qr(L,function(){this.track(Ee)},w.onError,w.requiresObservable);else{var K=Ja(w),pe=!1;P=new qr(L,function(){pe||(pe=!0,K(function(){pe=!1,P.isDisposed||P.track(Ee)}))},w.onError,w.requiresObservable)}function Ee(){_(P)}return P.schedule(),P.getDisposer()}xo.bound=function(_,w,P,L){return L===!0?(Ju(_,w,P.value),null):P?{configurable:!0,enumerable:!1,get:function(){return Ju(this,w,P.value||P.initializer.call(this)),this[w]},set:xc}:{enumerable:!1,configurable:!0,set:function(K){Ju(this,w,K)},get:function(){}}};var Ec=function(_){return _()};function Ja(_){return _.scheduler?_.scheduler:_.delay?function(w){return setTimeout(w,_.delay)}:Ec}function sn(_,w,P){P===void 0&&(P=g);var L,K,pe,Ee=P.name||"Reaction@"+E(),Fe=xo(Ee,P.onError?(L=P.onError,K=w,function(){try{return K.apply(this,arguments)}catch(_n){L.call(this,_n)}}):w),st=!P.scheduler&&!P.delay,Ht=Ja(P),et=!0,hn=!1,Bt=P.compareStructural?$.structural:P.equals||$.default,tn=new qr(Ee,function(){et||st?Ur():hn||(hn=!0,Ht(Ur))},P.onError,P.requiresObservable);function Ur(){if(hn=!1,!tn.isDisposed){var _n=!1;tn.track(function(){var Or=_(tn);_n=et||!Bt(pe,Or),pe=Or}),et&&P.fireImmediately&&Fe(pe,tn),et||_n!==!0||Fe(pe,tn),et&&(et=!1)}}return tn.schedule(),tn.getDisposer()}function un(_,w,P){return Qa("onBecomeUnobserved",_,w,P)}function Qa(_,w,P,L){var K=typeof L=="function"?Fr(w,P):Fr(w),pe=typeof L=="function"?L:P,Ee=_+"Listeners";return K[Ee]?K[Ee].add(pe):K[Ee]=new Set([pe]),typeof K[_]!="function"?M(!1):function(){var Fe=K[Ee];Fe&&(Fe.delete(pe),Fe.size===0&&delete K[Ee])}}function si(_){var w=_.enforceActions,P=_.computedRequiresReaction,L=_.computedConfigurable,K=_.disableErrorBoundaries,pe=_.reactionScheduler,Ee=_.reactionRequiresObservable,Fe=_.observableRequiresReaction;if(_.isolateGlobalState===!0&&((ft.pendingReactions.length||ft.inBatch||ft.isRunningReactions)&&M("isolateGlobalState should be called before MobX is running any reactions"),ki=!0,Ir&&(--Yu().__mobxInstanceCount==0&&(Yu().__mobxGlobals=void 0),ft=new ai)),w!==void 0){var st=void 0;switch(w){case!0:case"observed":st=!0;break;case!1:case"never":st=!1;break;case"strict":case"always":st="strict";break;default:M("Invalid value for 'enforceActions': '"+w+"', expected 'never', 'always' or 'observed'")}ft.enforceActions=st,ft.allowStateChanges=st!==!0&&st!=="strict"}P!==void 0&&(ft.computedRequiresReaction=!!P),Ee!==void 0&&(ft.reactionRequiresObservable=!!Ee),Fe!==void 0&&(ft.observableRequiresReaction=!!Fe,ft.allowStateReads=!ft.observableRequiresReaction),L!==void 0&&(ft.computedConfigurable=!!L),K!==void 0&&(ft.disableErrorBoundaries=!!K),pe&&qa(pe)}function Eo(_,w,P,L){var K=ea(L=he(L));return nt(_),Ar(_,L.name,K.enhancer),w&&es(_,w,P,K),_}function ea(_){return _.defaultDecorator||(_.deep===!1?Le:Te)}function es(_,w,P,L){var K,pe;gr();try{var Ee=Z(w);try{for(var Fe=me(Ee),st=Fe.next();!st.done;st=Fe.next()){var Ht=st.value,et=Object.getOwnPropertyDescriptor(w,Ht),hn=(P&&Ht in P?P[Ht]:et.get?ut:L)(_,Ht,et,!0);hn&&Object.defineProperty(_,Ht,hn)}}catch(Bt){K={error:Bt}}finally{try{st&&!st.done&&(pe=Fe.return)&&pe.call(Fe)}finally{if(K)throw K.error}}}finally{Pr()}}function An(_,w){return ta(Fr(_,w))}function ta(_){var w,P,L={name:_.name};return _.observing&&_.observing.length>0&&(L.dependencies=(w=_.observing,P=[],w.forEach(function(K){P.indexOf(K)===-1&&P.push(K)}),P).map(ta)),L}var Di=0;function na(){this.message="FLOW_CANCELLED"}function ru(_){arguments.length!==1&&M("Flow expects 1 argument and cannot be used as decorator");var w=_.name||"<unnamed flow>";return function(){var P,L=this,K=arguments,pe=++Di,Ee=xo(w+" - runid: "+pe+" - init",_).apply(L,K),Fe=void 0,st=new Promise(function(Ht,et){var hn=0;function Bt(_n){var Or;Fe=void 0;try{Or=xo(w+" - runid: "+pe+" - yield "+hn++,Ee.next).call(Ee,_n)}catch(Mo){return et(Mo)}Ur(Or)}function tn(_n){var Or;Fe=void 0;try{Or=xo(w+" - runid: "+pe+" - yield "+hn++,Ee.throw).call(Ee,_n)}catch(Mo){return et(Mo)}Ur(Or)}function Ur(_n){if(!_n||typeof _n.then!="function")return _n.done?Ht(_n.value):(Fe=Promise.resolve(_n.value)).then(Bt,tn);_n.then(Ur,et)}P=et,Bt(void 0)});return st.cancel=xo(w+" - runid: "+pe+" - cancel",function(){try{Fe&&er(Fe);var Ht=Ee.return(void 0),et=Promise.resolve(Ht.value);et.then(k,k),er(et),P(new na)}catch(hn){P(hn)}}),st}}function er(_){typeof _.cancel=="function"&&_.cancel()}function ra(_,w){if(_==null)return!1;if(w!==void 0){if(_r(_)===!1||!_[Y].values.has(w))return!1;var P=Fr(_,w);return wo(P)}return wo(_)}function ts(_){return arguments.length>1?M(!1):ra(_)}function oa(_,w){return typeof w!="string"?M(!1):ra(_,w)}function ou(_,w){return _!=null&&(w!==void 0?!!_r(_)&&_[Y].values.has(w):_r(_)||!!_[Y]||G(_)||Ti(_)||wo(_))}function ci(_){return arguments.length!==1&&M(!1),ou(_)}function So(_){return _r(_)?_[Y].getKeys():Rn(_)||sr(_)?Array.from(_.keys()):Br(_)?_.map(function(w,P){return P}):M(!1)}function gn(_){return _r(_)?So(_).map(function(w){return _[w]}):Rn(_)?So(_).map(function(w){return _.get(w)}):sr(_)?Array.from(_.values()):Br(_)?_.slice():M(!1)}function Sc(_){return _r(_)?So(_).map(function(w){return[w,_[w]]}):Rn(_)?So(_).map(function(w){return[w,_.get(w)]}):sr(_)?Array.from(_.entries()):Br(_)?_.map(function(w,P){return[P,w]}):M(!1)}function vr(_,w,P){if(arguments.length!==2||sr(_))if(_r(_)){var L=_[Y],K=L.values.get(w);K?L.write(w,P):L.addObservableProp(w,P,L.defaultEnhancer)}else if(Rn(_))_.set(w,P);else if(sr(_))_.add(w);else{if(!Br(_))return M(!1);typeof w!="number"&&(w=parseInt(w,10)),A(w>=0,"Not a valid index: '"+w+"'"),gr(),w>=_.length&&(_.length=w+1),_[w]=P,Pr()}else{gr();var pe=w;try{for(var Ee in pe)vr(_,Ee,pe[Ee])}finally{Pr()}}}function jc(_,w,P,L){return typeof P=="function"?function(K,pe,Ee,Fe){return fo(K,pe).observe(Ee,Fe)}(_,w,P,L):function(K,pe,Ee){return fo(K).observe(pe,Ee)}(_,w,P)}na.prototype=Object.create(Error.prototype);var ns={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function ar(_,w,P,L){return L.detectCycles&&_.set(w,P),P}function zr(_,w,P){if(!w.recurseEverything&&!ci(_)||typeof _!="object")return _;if(_===null)return null;if(_ instanceof Date)return _;if(Oo(_))return zr(_.get(),w,P);if(ci(_)&&So(_),w.detectCycles===!0&&_!==null&&P.has(_))return P.get(_);if(Br(_)||Array.isArray(_)){var L=ar(P,_,[],w),K=_.map(function(Bt){return zr(Bt,w,P)});L.length=K.length;for(var pe=0,Ee=K.length;pe<Ee;pe++)L[pe]=K[pe];return L}if(sr(_)||Object.getPrototypeOf(_)===Set.prototype){if(w.exportMapsAsObjects===!1){var Fe=ar(P,_,new Set,w);return _.forEach(function(Bt){Fe.add(zr(Bt,w,P))}),Fe}var st=ar(P,_,[],w);return _.forEach(function(Bt){st.push(zr(Bt,w,P))}),st}if(Rn(_)||Object.getPrototypeOf(_)===Map.prototype){if(w.exportMapsAsObjects===!1){var Ht=ar(P,_,new Map,w);return _.forEach(function(Bt,tn){Ht.set(tn,zr(Bt,w,P))}),Ht}var et=ar(P,_,{},w);return _.forEach(function(Bt,tn){et[tn]=zr(Bt,w,P)}),et}var hn=ar(P,_,{},w);return ie(_).forEach(function(Bt){hn[Bt]=zr(_[Bt],w,P)}),hn}function ia(_,w){var P;return typeof w=="boolean"&&(w={detectCycles:w}),w||(w=ns),w.detectCycles=w.detectCycles===void 0?w.recurseEverything===!0:w.detectCycles===!0,w.detectCycles&&(P=new Map),zr(_,w,P)}function en(_){switch(_.length){case 0:return ft.trackingDerivation;case 1:return Fr(_[0]);case 2:return Fr(_[0],_[1])}}function Hn(_,w){w===void 0&&(w=void 0),gr();try{return _.apply(w)}finally{Pr()}}function iu(_,w,P){return arguments.length===1||w&&typeof w=="object"?ua(_,w):rs(_,w,P||{})}function rs(_,w,P){var L;typeof P.timeout=="number"&&(L=setTimeout(function(){if(!pe[Y].isDisposed){pe();var Ee=new Error("WHEN_TIMEOUT");if(!P.onError)throw Ee;P.onError(Ee)}},P.timeout)),P.name=P.name||"When@"+E();var K=Cn(P.name+"-effect",w),pe=Qu(function(Ee){_()&&(Ee.dispose(),L&&clearTimeout(L),K())},P);return pe}function ua(_,w){var P,L=new Promise(function(K,pe){var Ee=rs(_,K,xe(xe({},w),{onError:pe}));P=function(){Ee(),pe("WHEN_CANCELLED")}});return L.cancel=P,L}function uu(_){return _[Y]}function uo(_){return typeof _=="string"||typeof _=="number"||typeof _=="symbol"}var jo={has:function(_,w){if(w===Y||w==="constructor"||w===Se)return!0;var P=uu(_);return uo(w)?P.has(w):w in _},get:function(_,w){if(w===Y||w==="constructor"||w===Se)return _[w];var P=uu(_),L=P.values.get(w);if(L instanceof z){var K=L.get();return K===void 0&&P.has(w),K}return uo(w)&&P.has(w),_[w]},set:function(_,w,P){return!!uo(w)&&(vr(_,w,P),!0)},deleteProperty:function(_,w){return!!uo(w)&&(uu(_).remove(w),!0)},ownKeys:function(_){return uu(_).keysAtom.reportObserved(),Reflect.ownKeys(_)},preventExtensions:function(_){return M("Dynamic observable objects cannot be frozen"),!1}};function fi(_){var w=new Proxy(_,jo);return _[Y].proxy=w,w}function mr(_){return _.interceptors!==void 0&&_.interceptors.length>0}function Po(_,w){var P=_.interceptors||(_.interceptors=[]);return P.push(w),T(function(){var L=P.indexOf(w);L!==-1&&P.splice(L,1)})}function Zt(_,w){var P=oe();try{for(var L=Be(_.interceptors||[]),K=0,pe=L.length;K<pe&&(A(!(w=L[K](w))||w.type,"Intercept handlers should return nothing or a change object"),w);K++);return w}finally{be(P)}}function br(_){return _.changeListeners!==void 0&&_.changeListeners.length>0}function ao(_,w){var P=_.changeListeners||(_.changeListeners=[]);return P.push(w),T(function(){var L=P.indexOf(w);L!==-1&&P.splice(L,1)})}function qn(_,w){var P=oe(),L=_.changeListeners;if(L){for(var K=0,pe=(L=L.slice()).length;K<pe;K++)L[K](w);be(P)}}var au={get:function(_,w){return w===Y?_[Y]:w==="length"?_[Y].getArrayLength():typeof w=="number"?En.get.call(_,w):typeof w!="string"||isNaN(w)?En.hasOwnProperty(w)?En[w]:_[w]:En.get.call(_,parseInt(w))},set:function(_,w,P){return w==="length"&&_[Y].setArrayLength(P),typeof w=="number"&&En.set.call(_,w,P),typeof w=="symbol"||isNaN(w)?_[w]=P:En.set.call(_,parseInt(w),P),!0},preventExtensions:function(_){return M("Observable arrays cannot be frozen"),!1}};function Ni(_,w,P,L){P===void 0&&(P="ObservableArray@"+E()),L===void 0&&(L=!1);var K,pe,Ee,Fe=new aa(P,w,L);K=Fe.values,pe=Y,Ee=Fe,Object.defineProperty(K,pe,{enumerable:!1,writable:!1,configurable:!0,value:Ee});var st=new Proxy(Fe.values,au);if(Fe.proxy=st,_&&_.length){var Ht=Nt(!0);Fe.spliceWithArray(0,0,_),fn(Ht)}return st}var aa=function(){function _(w,P,L){this.owned=L,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new z(w||"ObservableArray@"+E()),this.enhancer=function(K,pe){return P(K,pe,w+"[..]")}}return _.prototype.dehanceValue=function(w){return this.dehancer!==void 0?this.dehancer(w):w},_.prototype.dehanceValues=function(w){return this.dehancer!==void 0&&w.length>0?w.map(this.dehancer):w},_.prototype.intercept=function(w){return Po(this,w)},_.prototype.observe=function(w,P){return P===void 0&&(P=!1),P&&w({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),ao(this,w)},_.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},_.prototype.setArrayLength=function(w){if(typeof w!="number"||w<0)throw new Error("[mobx.array] Out of range: "+w);var P=this.values.length;if(w!==P)if(w>P){for(var L=new Array(w-P),K=0;K<w-P;K++)L[K]=void 0;this.spliceWithArray(P,0,L)}else this.spliceWithArray(w,P-w)},_.prototype.updateArrayLength=function(w,P){if(w!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=P},_.prototype.spliceWithArray=function(w,P,L){var K=this;Dt(this.atom);var pe=this.values.length;if(w===void 0?w=0:w>pe?w=pe:w<0&&(w=Math.max(0,pe+w)),P=arguments.length===1?pe-w:P==null?0:Math.max(0,Math.min(P,pe-w)),L===void 0&&(L=O),mr(this)){var Ee=Zt(this,{object:this.proxy,type:"splice",index:w,removedCount:P,added:L});if(!Ee)return O;P=Ee.removedCount,L=Ee.added}L=L.length===0?L:L.map(function(st){return K.enhancer(st,void 0)});var Fe=this.spliceItemsIntoValues(w,P,L);return P===0&&L.length===0||this.notifyArraySplice(w,L,Fe),this.dehanceValues(Fe)},_.prototype.spliceItemsIntoValues=function(w,P,L){var K;if(L.length<1e4)return(K=this.values).splice.apply(K,Be([w,P],L));var pe=this.values.slice(w,w+P);return this.values=this.values.slice(0,w).concat(L,this.values.slice(w+P)),pe},_.prototype.notifyArrayChildUpdate=function(w,P,L){var K=!this.owned&&!1,pe=br(this),Ee=pe||K?{object:this.proxy,type:"update",index:w,newValue:P,oldValue:L}:null;this.atom.reportChanged(),pe&&qn(this,Ee)},_.prototype.notifyArraySplice=function(w,P,L){var K=!this.owned&&!1,pe=br(this),Ee=pe||K?{object:this.proxy,type:"splice",index:w,removed:L,added:P,removedCount:L.length,addedCount:P.length}:null;this.atom.reportChanged(),pe&&qn(this,Ee)},_}(),En={intercept:function(_){return this[Y].intercept(_)},observe:function(_,w){return w===void 0&&(w=!1),this[Y].observe(_,w)},clear:function(){return this.splice(0)},replace:function(_){var w=this[Y];return w.spliceWithArray(0,w.values.length,_)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(_,w){for(var P=[],L=2;L<arguments.length;L++)P[L-2]=arguments[L];var K=this[Y];switch(arguments.length){case 0:return[];case 1:return K.spliceWithArray(_);case 2:return K.spliceWithArray(_,w)}return K.spliceWithArray(_,w,P)},spliceWithArray:function(_,w,P){return this[Y].spliceWithArray(_,w,P)},push:function(){for(var _=[],w=0;w<arguments.length;w++)_[w]=arguments[w];var P=this[Y];return P.spliceWithArray(P.values.length,0,_),P.values.length},pop:function(){return this.splice(Math.max(this[Y].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var _=[],w=0;w<arguments.length;w++)_[w]=arguments[w];var P=this[Y];return P.spliceWithArray(0,0,_),P.values.length},reverse:function(){var _=this.slice();return _.reverse.apply(_,arguments)},sort:function(_){var w=this.slice();return w.sort.apply(w,arguments)},remove:function(_){var w=this[Y],P=w.dehanceValues(w.values).indexOf(_);return P>-1&&(this.splice(P,1),!0)},get:function(_){var w=this[Y];if(w&&_<w.values.length)return w.atom.reportObserved(),w.dehanceValue(w.values[_])},set:function(_,w){var P=this[Y],L=P.values;if(_<L.length){Dt(P.atom);var K=L[_];if(mr(P)){var pe=Zt(P,{type:"update",object:P.proxy,index:_,newValue:w});if(!pe)return;w=pe.newValue}(w=P.enhancer(w,K))!==K&&(L[_]=w,P.notifyArrayChildUpdate(_,w,K))}else{if(_!==L.length)throw new Error("[mobx.array] Index out of bounds, "+_+" is larger than "+L.length);P.spliceWithArray(_,0,[w])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(_){typeof Array.prototype[_]=="function"&&(En[_]=function(){var w=this[Y];w.atom.reportObserved();var P=w.dehanceValues(w.values);return P[_].apply(P,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(_){typeof Array.prototype[_]=="function"&&(En[_]=function(w,P){var L=this,K=this[Y];return K.atom.reportObserved(),K.dehanceValues(K.values)[_](function(pe,Ee){return w.call(P,pe,Ee,L)},P)})}),["reduce","reduceRight"].forEach(function(_){En[_]=function(){var w=this,P=this[Y];P.atom.reportObserved();var L=arguments[0];return arguments[0]=function(K,pe,Ee){return pe=P.dehanceValue(pe),L(K,pe,Ee,w)},P.values[_].apply(P.values,arguments)}});var su,Ao=W("ObservableArrayAdministration",aa);function Br(_){return R(_)&&Ao(_[Y])}var sa,Pc={},ca=function(){function _(w,P,L){if(P===void 0&&(P=Ze),L===void 0&&(L="ObservableMap@"+E()),this.enhancer=P,this.name=L,this[su]=Pc,this._keysAtom=X(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(w)}return _.prototype._has=function(w){return this._data.has(w)},_.prototype.has=function(w){var P=this;if(!ft.trackingDerivation)return this._has(w);var L=this._hasMap.get(w);if(!L){var K=L=new xn(this._has(w),gt,this.name+"."+re(w)+"?",!1);this._hasMap.set(w,K),un(K,function(){return P._hasMap.delete(w)})}return L.get()},_.prototype.set=function(w,P){var L=this._has(w);if(mr(this)){var K=Zt(this,{type:L?"update":"add",object:this,newValue:P,name:w});if(!K)return this;P=K.newValue}return L?this._updateValue(w,P):this._addValue(w,P),this},_.prototype.delete=function(w){var P=this;if(Dt(this._keysAtom),mr(this)&&!(K=Zt(this,{type:"delete",object:this,name:w})))return!1;if(this._has(w)){var L=br(this),K=L?{type:"delete",object:this,oldValue:this._data.get(w).value,name:w}:null;return Hn(function(){P._keysAtom.reportChanged(),P._updateHasMapEntry(w,!1),P._data.get(w).setNewValue(void 0),P._data.delete(w)}),L&&qn(this,K),!0}return!1},_.prototype._updateHasMapEntry=function(w,P){var L=this._hasMap.get(w);L&&L.setNewValue(P)},_.prototype._updateValue=function(w,P){var L=this._data.get(w);if((P=L.prepareNewValue(P))!==ft.UNCHANGED){var K=br(this),pe=K?{type:"update",object:this,oldValue:L.value,name:w,newValue:P}:null;L.setNewValue(P),K&&qn(this,pe)}},_.prototype._addValue=function(w,P){var L=this;Dt(this._keysAtom),Hn(function(){var Ee=new xn(P,L.enhancer,L.name+"."+re(w),!1);L._data.set(w,Ee),P=Ee.value,L._updateHasMapEntry(w,!0),L._keysAtom.reportChanged()});var K=br(this),pe=K?{type:"add",object:this,name:w,newValue:P}:null;K&&qn(this,pe)},_.prototype.get=function(w){return this.has(w)?this.dehanceValue(this._data.get(w).get()):this.dehanceValue(void 0)},_.prototype.dehanceValue=function(w){return this.dehancer!==void 0?this.dehancer(w):w},_.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},_.prototype.values=function(){var w=this,P=this.keys();return Wt({next:function(){var L=P.next(),K=L.done,pe=L.value;return{done:K,value:K?void 0:w.get(pe)}}})},_.prototype.entries=function(){var w=this,P=this.keys();return Wt({next:function(){var L=P.next(),K=L.done,pe=L.value;return{done:K,value:K?void 0:[pe,w.get(pe)]}}})},_.prototype[su=Y,Symbol.iterator]=function(){return this.entries()},_.prototype.forEach=function(w,P){var L,K;try{for(var pe=me(this),Ee=pe.next();!Ee.done;Ee=pe.next()){var Fe=Pe(Ee.value,2),st=Fe[0],Ht=Fe[1];w.call(P,Ht,st,this)}}catch(et){L={error:et}}finally{try{Ee&&!Ee.done&&(K=pe.return)&&K.call(pe)}finally{if(L)throw L.error}}},_.prototype.merge=function(w){var P=this;return Rn(w)&&(w=w.toJS()),Hn(function(){var L=Nt(!0);try{C(w)?ie(w).forEach(function(K){return P.set(K,w[K])}):Array.isArray(w)?w.forEach(function(K){var pe=Pe(K,2),Ee=pe[0],Fe=pe[1];return P.set(Ee,Fe)}):V(w)?(w.constructor!==Map&&M("Cannot initialize from classes that inherit from Map: "+w.constructor.name),w.forEach(function(K,pe){return P.set(pe,K)})):w!=null&&M("Cannot initialize map from "+w)}finally{fn(L)}}),this},_.prototype.clear=function(){var w=this;Hn(function(){de(function(){var P,L;try{for(var K=me(w.keys()),pe=K.next();!pe.done;pe=K.next()){var Ee=pe.value;w.delete(Ee)}}catch(Fe){P={error:Fe}}finally{try{pe&&!pe.done&&(L=K.return)&&L.call(K)}finally{if(P)throw P.error}}})})},_.prototype.replace=function(w){var P=this;return Hn(function(){var L,K,pe,Ee,Fe=function(cr){if(V(cr)||Rn(cr))return cr;if(Array.isArray(cr))return new Map(cr);if(C(cr)){var Ii=new Map;for(var li in cr)Ii.set(li,cr[li]);return Ii}return M("Cannot convert to map from '"+cr+"'")}(w),st=new Map,Ht=!1;try{for(var et=me(P._data.keys()),hn=et.next();!hn.done;hn=et.next()){var Bt=hn.value;if(!Fe.has(Bt))if(P.delete(Bt))Ht=!0;else{var tn=P._data.get(Bt);st.set(Bt,tn)}}}catch(cr){L={error:cr}}finally{try{hn&&!hn.done&&(K=et.return)&&K.call(et)}finally{if(L)throw L.error}}try{for(var Ur=me(Fe.entries()),_n=Ur.next();!_n.done;_n=Ur.next()){var Or=Pe(_n.value,2),Mo=(Bt=Or[0],tn=Or[1],P._data.has(Bt));if(P.set(Bt,tn),P._data.has(Bt)){var ko=P._data.get(Bt);st.set(Bt,ko),Mo||(Ht=!0)}}}catch(cr){pe={error:cr}}finally{try{_n&&!_n.done&&(Ee=Ur.return)&&Ee.call(Ur)}finally{if(pe)throw pe.error}}if(!Ht)if(P._data.size!==st.size)P._keysAtom.reportChanged();else for(var Ri=P._data.keys(),la=st.keys(),Uo=Ri.next(),fu=la.next();!Uo.done;){if(Uo.value!==fu.value){P._keysAtom.reportChanged();break}Uo=Ri.next(),fu=la.next()}P._data=st}),this},Object.defineProperty(_.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),_.prototype.toPOJO=function(){var w,P,L={};try{for(var K=me(this),pe=K.next();!pe.done;pe=K.next()){var Ee=Pe(pe.value,2),Fe=Ee[0],st=Ee[1];L[typeof Fe=="symbol"?Fe:re(Fe)]=st}}catch(Ht){w={error:Ht}}finally{try{pe&&!pe.done&&(P=K.return)&&P.call(K)}finally{if(w)throw w.error}}return L},_.prototype.toJS=function(){return new Map(this)},_.prototype.toJSON=function(){return this.toPOJO()},_.prototype.toString=function(){var w=this;return this.name+"[{ "+Array.from(this.keys()).map(function(P){return re(P)+": "+w.get(P)}).join(", ")+" }]"},_.prototype.observe=function(w,P){return ao(this,w)},_.prototype.intercept=function(w){return Po(this,w)},_}(),Rn=W("ObservableMap",ca),Ci={},so=function(){function _(w,P,L){if(P===void 0&&(P=Ze),L===void 0&&(L="ObservableSet@"+E()),this.name=L,this[sa]=Ci,this._data=new Set,this._atom=X(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(K,pe){return P(K,pe,L)},w&&this.replace(w)}return _.prototype.dehanceValue=function(w){return this.dehancer!==void 0?this.dehancer(w):w},_.prototype.clear=function(){var w=this;Hn(function(){de(function(){var P,L;try{for(var K=me(w._data.values()),pe=K.next();!pe.done;pe=K.next()){var Ee=pe.value;w.delete(Ee)}}catch(Fe){P={error:Fe}}finally{try{pe&&!pe.done&&(L=K.return)&&L.call(K)}finally{if(P)throw P.error}}})})},_.prototype.forEach=function(w,P){var L,K;try{for(var pe=me(this),Ee=pe.next();!Ee.done;Ee=pe.next()){var Fe=Ee.value;w.call(P,Fe,Fe,this)}}catch(st){L={error:st}}finally{try{Ee&&!Ee.done&&(K=pe.return)&&K.call(pe)}finally{if(L)throw L.error}}},Object.defineProperty(_.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),_.prototype.add=function(w){var P=this;if(Dt(this._atom),mr(this)&&!(K=Zt(this,{type:"add",object:this,newValue:w})))return this;if(!this.has(w)){Hn(function(){P._data.add(P.enhancer(w,void 0)),P._atom.reportChanged()});var L=br(this),K=L?{type:"add",object:this,newValue:w}:null;L&&qn(this,K)}return this},_.prototype.delete=function(w){var P=this;if(mr(this)&&!(K=Zt(this,{type:"delete",object:this,oldValue:w})))return!1;if(this.has(w)){var L=br(this),K=L?{type:"delete",object:this,oldValue:w}:null;return Hn(function(){P._atom.reportChanged(),P._data.delete(w)}),L&&qn(this,K),!0}return!1},_.prototype.has=function(w){return this._atom.reportObserved(),this._data.has(this.dehanceValue(w))},_.prototype.entries=function(){var w=0,P=Array.from(this.keys()),L=Array.from(this.values());return Wt({next:function(){var K=w;return w+=1,K<L.length?{value:[P[K],L[K]],done:!1}:{done:!0}}})},_.prototype.keys=function(){return this.values()},_.prototype.values=function(){this._atom.reportObserved();var w=this,P=0,L=Array.from(this._data.values());return Wt({next:function(){return P<L.length?{value:w.dehanceValue(L[P++]),done:!1}:{done:!0}}})},_.prototype.replace=function(w){var P=this;return sr(w)&&(w=w.toJS()),Hn(function(){var L=Nt(!0);try{Array.isArray(w)||te(w)?(P.clear(),w.forEach(function(K){return P.add(K)})):w!=null&&M("Cannot initialize set from "+w)}finally{fn(L)}}),this},_.prototype.observe=function(w,P){return ao(this,w)},_.prototype.intercept=function(w){return Po(this,w)},_.prototype.toJS=function(){return new Set(this)},_.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},_.prototype[sa=Y,Symbol.iterator]=function(){return this.values()},_}(),sr=W("ObservableSet",so),fa=function(){function _(w,P,L,K){P===void 0&&(P=new Map),this.target=w,this.values=P,this.name=L,this.defaultEnhancer=K,this.keysAtom=new z(L+".keys")}return _.prototype.read=function(w){return this.values.get(w).get()},_.prototype.write=function(w,P){var L=this.target,K=this.values.get(w);if(K instanceof io)K.set(P);else{if(mr(this)){if(!(Ee=Zt(this,{type:"update",object:this.proxy||L,name:w,newValue:P})))return;P=Ee.newValue}if((P=K.prepareNewValue(P))!==ft.UNCHANGED){var pe=br(this),Ee=pe?{type:"update",object:this.proxy||L,oldValue:K.value,name:w,newValue:P}:null;K.setNewValue(P),pe&&qn(this,Ee)}}},_.prototype.has=function(w){var P=this.pendingKeys||(this.pendingKeys=new Map),L=P.get(w);if(L)return L.get();var K=!!this.values.get(w);return L=new xn(K,gt,this.name+"."+re(w)+"?",!1),P.set(w,L),L.get()},_.prototype.addObservableProp=function(w,P,L){L===void 0&&(L=this.defaultEnhancer);var K=this.target;if(mr(this)){var pe=Zt(this,{object:this.proxy||K,name:w,type:"add",newValue:P});if(!pe)return;P=pe.newValue}var Ee=new xn(P,L,this.name+"."+re(w),!1);this.values.set(w,Ee),P=Ee.value,Object.defineProperty(K,w,function(Fe){return Fo[Fe]||(Fo[Fe]={configurable:!0,enumerable:!0,get:function(){return this[Y].read(Fe)},set:function(st){this[Y].write(Fe,st)}})}(w)),this.notifyPropertyAddition(w,P)},_.prototype.addComputedProp=function(w,P,L){var K,pe,Ee,Fe=this.target;L.name=L.name||this.name+"."+re(P),this.values.set(P,new io(L)),(w===Fe||(K=w,pe=P,!(Ee=Object.getOwnPropertyDescriptor(K,pe))||Ee.configurable!==!1&&Ee.writable!==!1))&&Object.defineProperty(w,P,function(st){return cu[st]||(cu[st]={configurable:ft.computedConfigurable,enumerable:!1,get:function(){return co(this).read(st)},set:function(Ht){co(this).write(st,Ht)}})}(P))},_.prototype.remove=function(w){if(this.values.has(w)){var P=this.target;if(mr(this)&&!(st=Zt(this,{object:this.proxy||P,name:w,type:"remove"})))return;try{gr();var L=br(this),K=!1,pe=this.values.get(w),Ee=pe&&pe.get();if(pe&&pe.set(void 0),this.keysAtom.reportChanged(),this.values.delete(w),this.pendingKeys){var Fe=this.pendingKeys.get(w);Fe&&Fe.set(!1)}delete this.target[w];var st=L?{type:"remove",object:this.proxy||P,oldValue:Ee,name:w}:null;L&&qn(this,st)}finally{Pr()}}},_.prototype.illegalAccess=function(w,P){},_.prototype.observe=function(w,P){return ao(this,w)},_.prototype.intercept=function(w){return Po(this,w)},_.prototype.notifyPropertyAddition=function(w,P){var L=br(this),K=L?{type:"add",object:this.proxy||this.target,name:w,newValue:P}:null;if(L&&qn(this,K),this.pendingKeys){var pe=this.pendingKeys.get(w);pe&&pe.set(!0)}this.keysAtom.reportChanged()},_.prototype.getKeys=function(){var w,P;this.keysAtom.reportObserved();var L=[];try{for(var K=me(this.values),pe=K.next();!pe.done;pe=K.next()){var Ee=Pe(pe.value,2),Fe=Ee[0];Ee[1]instanceof xn&&L.push(Fe)}}catch(st){w={error:st}}finally{try{pe&&!pe.done&&(P=K.return)&&P.call(K)}finally{if(w)throw w.error}}return L},_}();function Ar(_,w,P){if(w===void 0&&(w=""),P===void 0&&(P=Ze),Object.prototype.hasOwnProperty.call(_,Y))return _[Y];C(_)||(w=(_.constructor.name||"ObservableObject")+"@"+E()),w||(w="ObservableObject@"+E());var L=new fa(_,new Map,re(w),P);return F(_,Y,L),L}var Fo=Object.create(null),cu=Object.create(null);function co(_){var w=_[Y];return w||(nt(_),_[Y])}var Mr=W("ObservableObjectAdministration",fa);function _r(_){return!!R(_)&&(nt(_),Mr(_[Y]))}function Fr(_,w){if(typeof _=="object"&&_!==null){if(Br(_))return w!==void 0&&M(!1),_[Y].atom;if(sr(_))return _[Y];if(Rn(_)){var P=_;return w===void 0?P._keysAtom:((L=P._data.get(w)||P._hasMap.get(w))||M(!1),L)}var L;if(nt(_),w&&!_[Y]&&_[w],_r(_))return w?((L=_[Y].values.get(w))||M(!1),L):M(!1);if(G(_)||wo(_)||Ti(_))return _}else if(typeof _=="function"&&Ti(_[Y]))return _[Y];return M(!1)}function fo(_,w){return _||M("Expecting some object"),w!==void 0?fo(Fr(_,w)):G(_)||wo(_)||Ti(_)||Rn(_)||sr(_)?_:(nt(_),_[Y]?_[Y]:void M(!1))}var Oe=Object.prototype.toString;function Ne(_,w,P){return P===void 0&&(P=-1),Re(_,w,P)}function Re(_,w,P,L,K){if(_===w)return _!==0||1/_==1/w;if(_==null||w==null)return!1;if(_!=_)return w!=w;var pe=typeof _;if(pe!=="function"&&pe!=="object"&&typeof w!="object")return!1;var Ee=Oe.call(_);if(Ee!==Oe.call(w))return!1;switch(Ee){case"[object RegExp]":case"[object String]":return""+_==""+w;case"[object Number]":return+_!=+_?+w!=+w:+_==0?1/+_==1/w:+_==+w;case"[object Date]":case"[object Boolean]":return+_==+w;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(_)===Symbol.valueOf.call(w);case"[object Map]":case"[object Set]":P>=0&&P++}_=Qe(_),w=Qe(w);var Fe=Ee==="[object Array]";if(!Fe){if(typeof _!="object"||typeof w!="object")return!1;var st=_.constructor,Ht=w.constructor;if(st!==Ht&&!(typeof st=="function"&&st instanceof st&&typeof Ht=="function"&&Ht instanceof Ht)&&"constructor"in _&&"constructor"in w)return!1}if(P===0)return!1;P<0&&(P=-1),K=K||[];for(var et=(L=L||[]).length;et--;)if(L[et]===_)return K[et]===w;if(L.push(_),K.push(w),Fe){if((et=_.length)!==w.length)return!1;for(;et--;)if(!Re(_[et],w[et],P-1,L,K))return!1}else{var hn=Object.keys(_),Bt=void 0;if(et=hn.length,Object.keys(w).length!==et)return!1;for(;et--;)if(!zt(w,Bt=hn[et])||!Re(_[Bt],w[Bt],P-1,L,K))return!1}return L.pop(),K.pop(),!0}function Qe(_){return Br(_)?_.slice():V(_)||Rn(_)||te(_)||sr(_)?Array.from(_.entries()):_}function zt(_,w){return Object.prototype.hasOwnProperty.call(_,w)}function Wt(_){return _[Symbol.iterator]=vn,_}function vn(){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:qu,extras:{getDebugName:function(_,w){return(w!==void 0?Fr(_,w):_r(_)||Rn(_)||sr(_)?fo(_):Fr(_)).name}},$mobx:Y})}).call(this,o(163),o(68))},function(c,l,o){var p=o(113),d=o(42),O=o(179);p||d(Object.prototype,"toString",O,{unsafe:!0})},function(c,l,o){var p=o(41),d=o(100),O=o(80),g=o(58),E=o(116),M="Array Iterator",A=g.set,T=g.getterFor(M);c.exports=E(Array,"Array",function(k,R){A(this,{type:M,target:p(k),index:0,kind:R})},function(){var k=T(this),R=k.target,C=k.kind,F=k.index++;return!R||F>=R.length?(k.target=void 0,{value:void 0,done:!0}):C=="keys"?{value:F,done:!1}:C=="values"?{value:R[F],done:!1}:{value:[F,R[F]],done:!1}},"values"),O.Arguments=O.Array,d("keys"),d("values"),d("entries")},function(c,l,o){var p=o(16),d=o(7),O=o(46),g=o(76),E=o(34),M=o(15),A=o(71),T=o(36),k=o(108),R=o(18),C=o(35),F=o(96),W=o(30),V=o(33),te=o(54),ie=o(87),re=o(32),J=o(40),Z=o(41),Y=o(86),z=o(39),G=o(69),X=o(60),$=o(77),ue=o(74),xe=o(139),me=o(112),Pe=o(50),Be=o(38),Se=o(84),ye=o(98),je=o(42),Ae=o(89),Ue=o(93),nt=o(72),Ot=o(90),We=o(28),Ze=o(140),gt=o(141),se=o(78),ae=o(58),he=o(79).forEach,Te=Ue("hidden"),He="Symbol",Le=We("toPrimitive"),wt=ae.set,kt=ae.getterFor(He),St=Object.prototype,yt=d.Symbol,Me=yt&&yt.prototype,ct=d.TypeError,le=d.QObject,ut=O("JSON","stringify"),It=Pe.f,on=Be.f,Lt=xe.f,qt=Se.f,dn=M([].push),bn=Ae("symbols"),Dt=Ae("op-symbols"),Nn=Ae("string-to-symbol-registry"),Q=Ae("symbol-to-string-registry"),de=Ae("wks"),oe=!le||!le.prototype||!le.prototype.findChild,be=T&&R(function(){return X(on({},"a",{get:function(){return on(this,"a",{value:7}).a}})).a!=7})?function(at,mt,Et){var Nt=It(St,mt);Nt&&delete St[mt],on(at,mt,Et),Nt&&at!==St&&on(St,mt,Nt)}:on,Ve=function(at,mt){var Et=bn[at]=X(Me);return wt(Et,{type:He,tag:at,description:mt}),T||(Et.description=mt),Et},Ke=function(at,mt,Et){at===St&&Ke(Dt,mt,Et),re(at);var Nt=Y(mt);return re(Et),C(bn,Nt)?(Et.enumerable?(C(at,Te)&&at[Te][Nt]&&(at[Te][Nt]=!1),Et=X(Et,{enumerable:G(0,!1)})):(C(at,Te)||on(at,Te,G(1,{})),at[Te][Nt]=!0),be(at,Nt,Et)):on(at,Nt,Et)},lt=function(at,mt){re(at);var Et=Z(mt),Nt=$(Et).concat(Cn(Et));return he(Nt,function(fn){T&&!E(Gt,Et,fn)||Ke(at,fn,Et[fn])}),at},Gt=function(at){var mt=Y(at),Et=E(qt,this,mt);return!(this===St&&C(bn,mt)&&!C(Dt,mt))&&(!(Et||!C(this,mt)||!C(bn,mt)||C(this,Te)&&this[Te][mt])||Et)},Xn=function(at,mt){var Et=Z(at),Nt=Y(mt);if(Et!==St||!C(bn,Nt)||C(Dt,Nt)){var fn=It(Et,Nt);return!fn||!C(bn,Nt)||C(Et,Te)&&Et[Te][Nt]||(fn.enumerable=!0),fn}},Qn=function(at){var mt=Lt(Z(at)),Et=[];return he(mt,function(Nt){C(bn,Nt)||C(nt,Nt)||dn(Et,Nt)}),Et},Cn=function(at){var mt=at===St,Et=Lt(mt?Dt:Z(at)),Nt=[];return he(Et,function(fn){!C(bn,fn)||mt&&!C(St,fn)||dn(Nt,bn[fn])}),Nt};if(k||(yt=function(){if(te(Me,this))throw ct("Symbol is not a constructor");var at=arguments.length&&arguments[0]!==void 0?z(arguments[0]):void 0,mt=Ot(at),Et=function(Nt){this===St&&E(Et,Dt,Nt),C(this,Te)&&C(this[Te],mt)&&(this[Te][mt]=!1),be(this,mt,G(1,Nt))};return T&&oe&&be(St,mt,{configurable:!0,set:Et}),Ve(mt,at)},je(Me=yt.prototype,"toString",function(){return kt(this).tag}),je(yt,"withoutSetter",function(at){return Ve(Ot(at),at)}),Se.f=Gt,Be.f=Ke,Pe.f=Xn,ue.f=xe.f=Qn,me.f=Cn,Ze.f=function(at){return Ve(We(at),at)},T&&(on(Me,"description",{configurable:!0,get:function(){return kt(this).description}}),A||je(St,"propertyIsEnumerable",Gt,{unsafe:!0}))),p({global:!0,wrap:!0,forced:!k,sham:!k},{Symbol:yt}),he($(de),function(at){gt(at)}),p({target:He,stat:!0,forced:!k},{for:function(at){var mt=z(at);if(C(Nn,mt))return Nn[mt];var Et=yt(mt);return Nn[mt]=Et,Q[Et]=mt,Et},keyFor:function(at){if(!ie(at))throw ct(at+" is not a symbol");if(C(Q,at))return Q[at]},useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),p({target:"Object",stat:!0,forced:!k,sham:!T},{create:function(at,mt){return mt===void 0?X(at):lt(X(at),mt)},defineProperty:Ke,defineProperties:lt,getOwnPropertyDescriptor:Xn}),p({target:"Object",stat:!0,forced:!k},{getOwnPropertyNames:Qn,getOwnPropertySymbols:Cn}),p({target:"Object",stat:!0,forced:R(function(){me.f(1)})},{getOwnPropertySymbols:function(at){return me.f(J(at))}}),ut&&p({target:"JSON",stat:!0,forced:!k||R(function(){var at=yt();return ut([at])!="[null]"||ut({a:at})!="{}"||ut(Object(at))!="{}"})},{stringify:function(at,mt,Et){var Nt=ye(arguments),fn=mt;if((V(mt)||at!==void 0)&&!ie(at))return F(mt)||(mt=function(xn,Oo){if(W(fn)&&(Oo=E(fn,this,xn,Oo)),!ie(Oo))return Oo}),Nt[1]=mt,g(ut,null,Nt)}}),!Me[Le]){var zn=Me.valueOf;je(Me,Le,function(at){return E(zn,this)})}se(yt,He),nt[Te]=!0},function(c,l,o){var p=o(7),d=o(152),O=o(153),g=o(3),E=o(57),M=o(28),A=M("iterator"),T=M("toStringTag"),k=g.values,R=function(F,W){if(F){if(F[A]!==k)try{E(F,A,k)}catch(te){F[A]=k}if(F[T]||E(F,T,W),d[W]){for(var V in g)if(F[V]!==g[V])try{E(F,V,g[V])}catch(te){F[V]=g[V]}}}};for(var C in d)R(p[C]&&p[C].prototype,C);R(O,"DOMTokenList")},function(c,l,o){var p=o(151).charAt,d=o(39),O=o(58),g=o(116),E="String Iterator",M=O.set,A=O.getterFor(E);g(String,"String",function(T){M(this,{type:E,string:d(T),index:0})},function(){var T,k=A(this),R=k.string,C=k.index;return C>=R.length?{value:void 0,done:!0}:(T=p(R,C),k.index+=T.length,{value:T,done:!1})})},function(c,l,o){(function(p){var d=function(O){return O&&O.Math==Math&&O};c.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof p=="object"&&p)||function(){return this}()||Function("return this")()}).call(this,o(68))},function(c,l,o){var p=o(16),d=o(36),O=o(7),g=o(15),E=o(35),M=o(30),A=o(54),T=o(39),k=o(38).f,R=o(134),C=O.Symbol,F=C&&C.prototype;if(d&&M(C)&&(!("description"in F)||C().description!==void 0)){var W={},V=function(){var z=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),G=A(F,this)?new C(z):z===void 0?C():C(z);return z===""&&(W[G]=!0),G};R(V,C),V.prototype=F,F.constructor=V;var te=String(C("test"))=="Symbol(test)",ie=g(F.toString),re=g(F.valueOf),J=/^Symbol\((.*)\)[^)]+$/,Z=g("".replace),Y=g("".slice);k(F,"description",{configurable:!0,get:function(){var z=re(this),G=ie(z);if(E(W,z))return"";var X=te?Y(G,7,-1):Z(G,J,"$1");return X===""?void 0:X}}),p({global:!0,forced:!0},{Symbol:V})}},function(c,l,o){o(141)("iterator")},function(c,l,o){o.d(l,"a",function(){return g.a}),o.d(l,"c",function(){return g.e}),o.d(l,"h",function(){return J}),o.d(l,"i",function(){return te}),o.d(l,"j",function(){return W}),o.d(l,"b",function(){return Pe}),o.d(l,"e",function(){return je}),o.d(l,"f",function(){return Be}),o.d(l,"g",function(){return bn});var p,d,O,g=o(0),E=0,M=[],A=g.i.__b,T=g.i.__r,k=g.i.diffed,R=g.i.__c,C=g.i.unmount;function F(Q,de){g.i.__h&&g.i.__h(d,Q,E||de),E=0;var oe=d.__H||(d.__H={__:[],__h:[]});return Q>=oe.__.length&&oe.__.push({}),oe.__[Q]}function W(Q){return E=1,V(ue,Q)}function V(Q,de,oe){var be=F(p++,2);return be.t=Q,be.__c||(be.__=[oe?oe(de):ue(void 0,de),function(Ve){var Ke=be.t(be.__[0],Ve);be.__[0]!==Ke&&(be.__=[Ke,be.__[1]],be.__c.setState({}))}],be.__c=d),be.__}function te(Q,de){var oe=F(p++,3);!g.i.__s&&$(oe.__H,de)&&(oe.__=Q,oe.__H=de,d.__H.__h.push(oe))}function ie(Q,de){var oe=F(p++,4);!g.i.__s&&$(oe.__H,de)&&(oe.__=Q,oe.__H=de,d.__h.push(oe))}function re(Q,de){var oe=F(p++,7);return $(oe.__H,de)&&(oe.__=Q(),oe.__H=de,oe.__h=Q),oe.__}function J(Q,de){return E=8,re(function(){return Q},de)}function Z(){var Q;for(M.sort(function(de,oe){return de.__v.__b-oe.__v.__b});Q=M.pop();)if(Q.__P)try{Q.__H.__h.forEach(G),Q.__H.__h.forEach(X),Q.__H.__h=[]}catch(de){Q.__H.__h=[],g.i.__e(de,Q.__v)}}g.i.__b=function(Q){d=null,A&&A(Q)},g.i.__r=function(Q){T&&T(Q),p=0;var de=(d=Q.__c).__H;de&&(de.__h.forEach(G),de.__h.forEach(X),de.__h=[])},g.i.diffed=function(Q){k&&k(Q);var de=Q.__c;de&&de.__H&&de.__H.__h.length&&(M.push(de)!==1&&O===g.i.requestAnimationFrame||((O=g.i.requestAnimationFrame)||z)(Z)),d=null},g.i.__c=function(Q,de){de.some(function(oe){try{oe.__h.forEach(G),oe.__h=oe.__h.filter(function(be){return!be.__||X(be)})}catch(be){de.some(function(Ve){Ve.__h&&(Ve.__h=[])}),de=[],g.i.__e(be,oe.__v)}}),R&&R(Q,de)},g.i.unmount=function(Q){C&&C(Q);var de,oe=Q.__c;oe&&oe.__H&&(oe.__H.__.forEach(function(be){try{G(be)}catch(Ve){de=Ve}}),de&&g.i.__e(de,oe.__v))};var Y=typeof requestAnimationFrame=="function";function z(Q){var de,oe=function(){clearTimeout(be),Y&&cancelAnimationFrame(de),setTimeout(Q)},be=setTimeout(oe,100);Y&&(de=requestAnimationFrame(oe))}function G(Q){var de=d,oe=Q.__c;typeof oe=="function"&&(Q.__c=void 0,oe()),d=de}function X(Q){var de=d;Q.__c=Q.__(),d=de}function $(Q,de){return!Q||Q.length!==de.length||de.some(function(oe,be){return oe!==Q[be]})}function ue(Q,de){return typeof de=="function"?de(Q):de}function xe(Q,de){for(var oe in de)Q[oe]=de[oe];return Q}function me(Q,de){for(var oe in Q)if(oe!=="__source"&&!(oe in de))return!0;for(var be in de)if(be!=="__source"&&Q[be]!==de[be])return!0;return!1}function Pe(Q){this.props=Q}function Be(Q,de){function oe(Ve){var Ke=this.props.ref,lt=Ke==Ve.ref;return!lt&&Ke&&(Ke.call?Ke(null):Ke.current=null),de?!de(this.props,Ve)||!lt:me(this.props,Ve)}function be(Ve){return this.shouldComponentUpdate=oe,Object(g.e)(Q,Ve)}return be.displayName="Memo("+(Q.displayName||Q.name)+")",be.prototype.isReactComponent=!0,be.__f=!0,be}(Pe.prototype=new g.a).isPureReactComponent=!0,Pe.prototype.shouldComponentUpdate=function(Q,de){return me(this.props,Q)||me(this.state,de)};var Se=g.i.__b;g.i.__b=function(Q){Q.type&&Q.type.__f&&Q.ref&&(Q.props.ref=Q.ref,Q.ref=null),Se&&Se(Q)};var ye=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function je(Q){function de(oe,be){var Ve=xe({},oe);return delete Ve.ref,Q(Ve,!(be=oe.ref||be)||typeof be=="object"&&!("current"in be)?null:be)}return de.$$typeof=ye,de.render=de,de.prototype.isReactComponent=de.__f=!0,de.displayName="ForwardRef("+(Q.displayName||Q.name)+")",de}var Ae=function(Q,de){return Q==null?null:Object(g.k)(Object(g.k)(Q).map(de))},Ue={map:Ae,forEach:Ae,count:function(Q){return Q?Object(g.k)(Q).length:0},only:function(Q){var de=Object(g.k)(Q);if(de.length!==1)throw"Children.only";return de[0]},toArray:g.k},nt=g.i.__e;g.i.__e=function(Q,de,oe){if(Q.then){for(var be,Ve=de;Ve=Ve.__;)if((be=Ve.__c)&&be.__c)return de.__e==null&&(de.__e=oe.__e,de.__k=oe.__k),be.__c(Q,de)}nt(Q,de,oe)};var Ot=g.i.unmount;function We(Q,de,oe){return Q&&(Q.__c&&Q.__c.__H&&(Q.__c.__H.__.forEach(function(be){typeof be.__c=="function"&&be.__c()}),Q.__c.__H=null),(Q=xe({},Q)).__c!=null&&(Q.__c.__P===oe&&(Q.__c.__P=de),Q.__c=null),Q.__k=Q.__k&&Q.__k.map(function(be){return We(be,de,oe)})),Q}function Ze(Q,de,oe){return Q&&(Q.__v=null,Q.__k=Q.__k&&Q.__k.map(function(be){return Ze(be,de,oe)}),Q.__c&&Q.__c.__P===de&&(Q.__e&&oe.insertBefore(Q.__e,Q.__d),Q.__c.__e=!0,Q.__c.__P=oe)),Q}function gt(){this.__u=0,this.t=null,this.__b=null}function se(Q){var de=Q.__.__c;return de&&de.__e&&de.__e(Q)}function ae(){this.u=null,this.o=null}g.i.unmount=function(Q){var de=Q.__c;de&&de.__R&&de.__R(),de&&Q.__h===!0&&(Q.type=null),Ot&&Ot(Q)},(gt.prototype=new g.a).__c=function(Q,de){var oe=de.__c,be=this;be.t==null&&(be.t=[]),be.t.push(oe);var Ve=se(be.__v),Ke=!1,lt=function(){Ke||(Ke=!0,oe.__R=null,Ve?Ve(Gt):Gt())};oe.__R=lt;var Gt=function(){if(!--be.__u){if(be.state.__e){var Qn=be.state.__e;be.__v.__k[0]=Ze(Qn,Qn.__c.__P,Qn.__c.__O)}var Cn;for(be.setState({__e:be.__b=null});Cn=be.t.pop();)Cn.forceUpdate()}},Xn=de.__h===!0;be.__u++||Xn||be.setState({__e:be.__b=be.__v.__k[0]}),Q.then(lt,lt)},gt.prototype.componentWillUnmount=function(){this.t=[]},gt.prototype.render=function(Q,de){if(this.__b){if(this.__v.__k){var oe=document.createElement("div"),be=this.__v.__k[0].__c;this.__v.__k[0]=We(this.__b,oe,be.__O=be.__P)}this.__b=null}var Ve=de.__e&&Object(g.e)(g.b,null,Q.fallback);return Ve&&(Ve.__h=null),[Object(g.e)(g.b,null,de.__e?null:Q.children),Ve]};var he=function(Q,de,oe){if(++oe[1]===oe[0]&&Q.o.delete(de),Q.props.revealOrder&&(Q.props.revealOrder[0]!=="t"||!Q.o.size))for(oe=Q.u;oe;){for(;oe.length>3;)oe.pop()();if(oe[1]<oe[0])break;Q.u=oe=oe[2]}};function Te(Q){return this.getChildContext=function(){return Q.context},Q.children}function He(Q){var de=this,oe=Q.i;de.componentWillUnmount=function(){Object(g.j)(null,de.l),de.l=null,de.i=null},de.i&&de.i!==oe&&de.componentWillUnmount(),Q.__v?(de.l||(de.i=oe,de.l={nodeType:1,parentNode:oe,childNodes:[],appendChild:function(be){this.childNodes.push(be),de.i.appendChild(be)},insertBefore:function(be,Ve){this.childNodes.push(be),de.i.appendChild(be)},removeChild:function(be){this.childNodes.splice(this.childNodes.indexOf(be)>>>1,1),de.i.removeChild(be)}}),Object(g.j)(Object(g.e)(Te,{context:de.context},Q.__v),de.l)):de.l&&de.componentWillUnmount()}(ae.prototype=new g.a).__e=function(Q){var de=this,oe=se(de.__v),be=de.o.get(Q);return be[0]++,function(Ve){var Ke=function(){de.props.revealOrder?(be.push(Ve),he(de,Q,be)):Ve()};oe?oe(Ke):Ke()}},ae.prototype.render=function(Q){this.u=null,this.o=new Map;var de=Object(g.k)(Q.children);Q.revealOrder&&Q.revealOrder[0]==="b"&&de.reverse();for(var oe=de.length;oe--;)this.o.set(de[oe],this.u=[1,0,this.u]);return Q.children},ae.prototype.componentDidUpdate=ae.prototype.componentDidMount=function(){var Q=this;this.o.forEach(function(de,oe){he(Q,oe,de)})};var Le=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,wt=/^(?: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]/,kt=typeof document!="undefined",St=function(Q){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(Q)};g.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(Q){Object.defineProperty(g.a.prototype,Q,{configurable:!0,get:function(){return this["UNSAFE_"+Q]},set:function(de){Object.defineProperty(this,Q,{configurable:!0,writable:!0,value:de})}})});var yt=g.i.event;function Me(){}function ct(){return this.cancelBubble}function le(){return this.defaultPrevented}g.i.event=function(Q){return yt&&(Q=yt(Q)),Q.persist=Me,Q.isPropagationStopped=ct,Q.isDefaultPrevented=le,Q.nativeEvent=Q};var ut,It={configurable:!0,get:function(){return this.class}},on=g.i.vnode;g.i.vnode=function(Q){var de=Q.type,oe=Q.props,be=oe;if(typeof de=="string"){var Ve=de.indexOf("-")===-1;for(var Ke in be={},oe){var lt=oe[Ke];kt&&Ke==="children"&&de==="noscript"||Ke==="value"&&"defaultValue"in oe&&lt==null||(Ke==="defaultValue"&&"value"in oe&&oe.value==null?Ke="value":Ke==="download"&&lt===!0?lt="":/ondoubleclick/i.test(Ke)?Ke="ondblclick":/^onchange(textarea|input)/i.test(Ke+de)&&!St(oe.type)?Ke="oninput":/^onfocus$/i.test(Ke)?Ke="onfocusin":/^onblur$/i.test(Ke)?Ke="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(Ke)?Ke=Ke.toLowerCase():Ve&&wt.test(Ke)?Ke=Ke.replace(/[A-Z0-9]/,"-$&").toLowerCase():lt===null&&(lt=void 0),be[Ke]=lt)}de=="select"&&be.multiple&&Array.isArray(be.value)&&(be.value=Object(g.k)(oe.children).forEach(function(Gt){Gt.props.selected=be.value.indexOf(Gt.props.value)!=-1})),de=="select"&&be.defaultValue!=null&&(be.value=Object(g.k)(oe.children).forEach(function(Gt){Gt.props.selected=be.multiple?be.defaultValue.indexOf(Gt.props.value)!=-1:be.defaultValue==Gt.props.value})),Q.props=be,oe.class!=oe.className&&(It.enumerable="className"in oe,oe.className!=null&&(be.class=oe.className),Object.defineProperty(be,"className",It))}Q.$$typeof=Le,on&&on(Q)};var Lt=g.i.__r;g.i.__r=function(Q){Lt&&Lt(Q),ut=Q.__c};var qt={ReactCurrentDispatcher:{current:{readContext:function(Q){return ut.__n[Q.__c].props.value}}}};function dn(Q){return!!Q&&Q.$$typeof===Le}var bn=function(Q,de){return Q(de)},Dt=g.b,Nn={useState:W,useReducer:V,useEffect:te,useLayoutEffect:ie,useRef:function(Q){return E=5,re(function(){return{current:Q}},[])},useImperativeHandle:function(Q,de,oe){E=6,ie(function(){typeof Q=="function"?Q(de()):Q&&(Q.current=de())},oe==null?oe:oe.concat(Q))},useMemo:re,useCallback:J,useContext:function(Q){var de=d.context[Q.__c],oe=F(p++,9);return oe.c=Q,de?(oe.__==null&&(oe.__=!0,de.sub(d)),de.props.value):Q.__},useDebugValue:function(Q,de){g.i.useDebugValue&&g.i.useDebugValue(de?de(Q):Q)},version:"17.0.2",Children:Ue,render:function(Q,de,oe){return de.__k==null&&(de.textContent=""),Object(g.j)(Q,de),typeof oe=="function"&&oe(),Q?Q.__c:null},hydrate:function(Q,de,oe){return Object(g.h)(Q,de),typeof oe=="function"&&oe(),Q?Q.__c:null},unmountComponentAtNode:function(Q){return!!Q.__k&&(Object(g.j)(null,Q),!0)},createPortal:function(Q,de){return Object(g.e)(He,{__v:Q,i:de})},createElement:g.e,createContext:g.d,createFactory:function(Q){return g.e.bind(null,Q)},cloneElement:function(Q){return dn(Q)?g.c.apply(null,arguments):Q},createRef:g.f,Fragment:g.b,isValidElement:dn,findDOMNode:function(Q){return Q&&(Q.base||Q.nodeType===1&&Q)||null},Component:g.a,PureComponent:Pe,memo:Be,forwardRef:je,flushSync:function(Q,de){return Q(de)},unstable_batchedUpdates:bn,StrictMode:Dt,Suspense:gt,SuspenseList:ae,lazy:function(Q){var de,oe,be;function Ve(Ke){if(de||(de=Q()).then(function(lt){oe=lt.default||lt},function(lt){be=lt}),be)throw be;if(!oe)throw de;return Object(g.e)(oe,Ke)}return Ve.displayName="Lazy",Ve.__f=!0,Ve},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:qt};l.d=Nn},function(c,l,o){var p=o(7),d=o(152),O=o(153),g=o(187),E=o(57),M=function(T){if(T&&T.forEach!==g)try{E(T,"forEach",g)}catch(k){T.forEach=g}};for(var A in d)d[A]&&M(p[A]&&p[A].prototype);M(O)},function(c,l,o){o(16)({target:"Object",stat:!0},{setPrototypeOf:o(102)})},function(c,l,o){var p=o(16),d=o(18),O=o(40),g=o(101),E=o(143);p({target:"Object",stat:!0,forced:d(function(){g(1)}),sham:!E},{getPrototypeOf:function(M){return g(O(M))}})},function(c,l,o){var p=o(16),d=o(46),O=o(76),g=o(203),E=o(165),M=o(32),A=o(33),T=o(60),k=o(18),R=d("Reflect","construct"),C=Object.prototype,F=[].push,W=k(function(){function ie(){}return!(R(function(){},[],ie)instanceof ie)}),V=!k(function(){R(function(){})}),te=W||V;p({target:"Reflect",stat:!0,forced:te,sham:te},{construct:function(ie,re){E(ie),M(re);var J=arguments.length<3?ie:E(arguments[2]);if(V&&!W)return R(ie,re,J);if(ie==J){switch(re.length){case 0:return new ie;case 1:return new ie(re[0]);case 2:return new ie(re[0],re[1]);case 3:return new ie(re[0],re[1],re[2]);case 4:return new ie(re[0],re[1],re[2],re[3])}var Z=[null];return O(F,Z,re),new(O(g,ie,Z))}var Y=J.prototype,z=T(A(Y)?Y:C),G=O(ie,z,re);return A(G)?G:z}})},function(c,l){var o=Function.prototype,p=o.bind,d=o.call,O=p&&p.bind(d);c.exports=p?function(g){return g&&O(d,g)}:function(g){return g&&function(){return d.apply(g,arguments)}}},function(c,l,o){var p=o(7),d=o(50).f,O=o(57),g=o(42),E=o(110),M=o(134),A=o(95);c.exports=function(T,k){var R,C,F,W,V,te=T.target,ie=T.global,re=T.stat;if(R=ie?p:re?p[te]||E(te,{}):(p[te]||{}).prototype)for(C in k){if(W=k[C],F=T.noTargetGet?(V=d(R,C))&&V.value:R[C],!A(ie?C:te+(re?".":"#")+C,T.forced)&&F!==void 0){if(typeof W==typeof F)continue;M(W,F)}(T.sham||F&&F.sham)&&O(W,"sham",!0),g(R,C,W,T)}}},function(c,l,o){var p=o(16),d=o(7),O=o(96),g=o(99),E=o(33),M=o(75),A=o(45),T=o(41),k=o(63),R=o(28),C=o(81),F=o(98),W=C("slice"),V=R("species"),te=d.Array,ie=Math.max;p({target:"Array",proto:!0,forced:!W},{slice:function(re,J){var Z,Y,z,G=T(this),X=A(G),$=M(re,X),ue=M(J===void 0?X:J,X);if(O(G)&&(Z=G.constructor,(g(Z)&&(Z===te||O(Z.prototype))||E(Z)&&(Z=Z[V])===null)&&(Z=void 0),Z===te||Z===void 0))return F(G,$,ue);for(Y=new(Z===void 0?te:Z)(ie(ue-$,0)),z=0;$<ue;$++,z++)$ in G&&k(Y,z,G[$]);return Y.length=z,Y}})},function(c,l){c.exports=function(o){try{return!!o()}catch(p){return!0}}},function(c,l,o){var p=o(16),d=o(103);p({target:"RegExp",proto:!0,forced:/./.exec!==d},{exec:d})},function(c,l,o){var p=o(16),d=o(40),O=o(77);p({target:"Object",stat:!0,forced:o(18)(function(){O(1)})},{keys:function(g){return O(d(g))}})},function(c,l,o){var p=o(36),d=o(73).EXISTS,O=o(15),g=o(38).f,E=Function.prototype,M=O(E.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=O(A.exec);p&&!d&&g(E,"name",{configurable:!0,get:function(){try{return T(A,M(this))[1]}catch(k){return""}}})},function(c,l,o){var p=o(16),d=o(18),O=o(41),g=o(50).f,E=o(36),M=d(function(){g(1)});p({target:"Object",stat:!0,forced:!E||M,sham:!E},{getOwnPropertyDescriptor:function(A,T){return g(O(A),T)}})},function(c,l,o){var p=o(16),d=o(188);p({target:"Array",stat:!0,forced:!o(120)(function(O){Array.from(O)})},{from:d})},function(c,l,o){var p=o(16),d=o(79).filter;p({target:"Array",proto:!0,forced:!o(81)("filter")},{filter:function(O){return d(this,O,arguments.length>1?arguments[1]:void 0)}})},function(c,l,o){var p=o(16),d=o(36),O=o(135),g=o(41),E=o(50),M=o(63);p({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(A){for(var T,k,R=g(A),C=E.f,F=O(R),W={},V=0;F.length>V;)(k=C(R,T=F[V++]))!==void 0&&M(W,T,k);return W}})},,function(c,l,o){var p=o(16),d=o(7),O=o(18),g=o(96),E=o(33),M=o(40),A=o(45),T=o(63),k=o(115),R=o(81),C=o(28),F=o(70),W=C("isConcatSpreadable"),V=9007199254740991,te="Maximum allowed index exceeded",ie=d.TypeError,re=F>=51||!O(function(){var Y=[];return Y[W]=!1,Y.concat()[0]!==Y}),J=R("concat"),Z=function(Y){if(!E(Y))return!1;var z=Y[W];return z!==void 0?!!z:g(Y)};p({target:"Array",proto:!0,forced:!re||!J},{concat:function(Y){var z,G,X,$,ue,xe=M(this),me=k(xe,0),Pe=0;for(z=-1,X=arguments.length;z<X;z++)if(Z(ue=z===-1?xe:arguments[z])){if(Pe+($=A(ue))>V)throw ie(te);for(G=0;G<$;G++,Pe++)G in ue&&T(me,Pe,ue[G])}else{if(Pe>=V)throw ie(te);T(me,Pe++,ue)}return me.length=Pe,me}})},function(c,l,o){var p=o(7),d=o(89),O=o(35),g=o(90),E=o(108),M=o(132),A=d("wks"),T=p.Symbol,k=T&&T.for,R=M?T:T&&T.withoutSetter||g;c.exports=function(C){if(!O(A,C)||!E&&typeof A[C]!="string"){var F="Symbol."+C;E&&O(T,C)?A[C]=T[C]:A[C]=M&&k?k(F):R(F)}return A[C]}},function(c,l,o){var p=o(16),d=o(202);p({target:"Object",stat:!0,forced:Object.assign!==d},{assign:d})},function(c,l){c.exports=function(o){return typeof o=="function"}},function(c,l,o){var p=o(106),d=typeof self=="object"&&self&&self.Object===Object&&self,O=p.a||d||Function("return this")();l.a=O},function(c,l,o){var p=o(7),d=o(33),O=p.String,g=p.TypeError;c.exports=function(E){if(d(E))return E;throw g(O(E)+" is not an object")}},function(c,l,o){var p=o(30);c.exports=function(d){return typeof d=="object"?d!==null:p(d)}},function(c,l){var o=Function.prototype.call;c.exports=o.bind?o.bind(o):function(){return o.apply(o,arguments)}},function(c,l,o){var p=o(15),d=o(40),O=p({}.hasOwnProperty);c.exports=Object.hasOwn||function(g,E){return O(d(g),E)}},function(c,l,o){var p=o(18);c.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(c,l,o){var p=o(16),d=o(79).map;p({target:"Array",proto:!0,forced:!o(81)("map")},{map:function(O){return d(this,O,arguments.length>1?arguments[1]:void 0)}})},function(c,l,o){var p=o(7),d=o(36),O=o(133),g=o(32),E=o(86),M=p.TypeError,A=Object.defineProperty;l.f=d?A:function(T,k,R){if(g(T),k=E(k),g(R),O)try{return A(T,k,R)}catch(C){}if("get"in R||"set"in R)throw M("Accessors not supported");return"value"in R&&(T[k]=R.value),T}},function(c,l,o){var p=o(7),d=o(97),O=p.String;c.exports=function(g){if(d(g)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return O(g)}},function(c,l,o){var p=o(7),d=o(44),O=p.Object;c.exports=function(g){return O(d(g))}},function(c,l,o){var p=o(85),d=o(44);c.exports=function(O){return p(d(O))}},function(c,l,o){var p=o(7),d=o(30),O=o(35),g=o(57),E=o(110),M=o(92),A=o(58),T=o(73).CONFIGURABLE,k=A.get,R=A.enforce,C=String(String).split("String");(c.exports=function(F,W,V,te){var ie,re=!!te&&!!te.unsafe,J=!!te&&!!te.enumerable,Z=!!te&&!!te.noTargetGet,Y=te&&te.name!==void 0?te.name:W;d(V)&&(String(Y).slice(0,7)==="Symbol("&&(Y="["+String(Y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!O(V,"name")||T&&V.name!==Y)&&g(V,"name",Y),(ie=R(V)).source||(ie.source=C.join(typeof Y=="string"?Y:""))),F!==p?(re?!Z&&F[W]&&(J=!0):delete F[W],J?F[W]=V:g(F,W,V)):J?F[W]=V:E(W,V)})(Function.prototype,"toString",function(){return d(this)&&k(this).source||M(this)})},function(c,l,o){(function(p){o.d(l,"d",function(){return g}),o.d(l,"c",function(){return E}),o.d(l,"b",function(){return M}),o.d(l,"a",function(){return T});var d=o(10),O=function(k,R){var C=typeof Symbol=="function"&&k[Symbol.iterator];if(!C)return k;var F,W,V=C.call(k),te=[];try{for(;(R===void 0||R-- >0)&&!(F=V.next()).done;)te.push(F.value)}catch(ie){W={error:ie}}finally{try{F&&!F.done&&(C=V.return)&&C.call(V)}finally{if(W)throw W.error}}return te};function g(){var k=O(Object(d.j)(0),2)[1];return Object(d.h)(function(){k(function(R){return R+1})},[])}function E(k){if(!k||typeof k!="object")return!1;var R=Object.getPrototypeOf(k);return!R||R===Object.prototype}function M(k){return typeof Symbol=="function"?Symbol.for(k):"__$mobx-react "+k+"__"}var A={};function T(){return typeof window!="undefined"?window:p!==void 0?p:typeof self!="undefined"?self:A}}).call(this,o(68))},function(c,l,o){var p=o(7).TypeError;c.exports=function(d){if(d==null)throw p("Can't call method on "+d);return d}},function(c,l,o){var p=o(94);c.exports=function(d){return p(d.length)}},function(c,l,o){var p=o(7),d=o(30),O=function(g){return d(g)?g:void 0};c.exports=function(g,E){return arguments.length<2?O(p[g]):p[g]&&p[g][E]}},function(c,l,o){var p=o(16),d=o(34),O=o(33),g=o(32),E=o(204),M=o(50),A=o(101);p({target:"Reflect",stat:!0},{get:function T(k,R){var C,F,W=arguments.length<3?k:arguments[2];return g(k)===W?k[R]:(C=M.f(k,R))?E(C)?C.value:C.get===void 0?void 0:d(C.get,W):O(F=A(k))?T(F,R,W):void 0}})},function(c,l,o){(function(p){var d=o(31),O=o(171),g=y&&!y.nodeType&&y,E=g&&typeof p=="object"&&p&&!p.nodeType&&p,M=E&&E.exports===g?d.a.Buffer:void 0,A=(M?M.isBuffer:void 0)||O.a;l.a=A}).call(this,o(122)(c))},function(c,l,o){(function(p){var d=o(106),O=y&&!y.nodeType&&y,g=O&&typeof p=="object"&&p&&!p.nodeType&&p,E=g&&g.exports===O&&d.a.process,M=function(){try{var A=g&&g.require&&g.require("util").types;return A||E&&E.binding&&E.binding("util")}catch(T){}}();l.a=M}).call(this,o(122)(c))},function(c,l,o){var p=o(36),d=o(34),O=o(84),g=o(69),E=o(41),M=o(86),A=o(35),T=o(133),k=Object.getOwnPropertyDescriptor;l.f=p?k:function(R,C){if(R=E(R),C=M(C),T)try{return k(R,C)}catch(F){}if(A(R,C))return g(!d(O.f,R,C),R[C])}},function(c,l,o){var p=o(15),d=p({}.toString),O=p("".slice);c.exports=function(g){return O(d(g),8,-1)}},function(c,l,o){o(182)("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},o(186))},function(c,l,o){var p=o(16),d=o(220).entries;p({target:"Object",stat:!0},{entries:function(O){return d(O)}})},function(c,l,o){var p=o(15);c.exports=p({}.isPrototypeOf)},function(c,l,o){var p=o(46);c.exports=p("navigator","userAgent")||""},function(c,l,o){var p=o(7),d=o(30),O=o(88),g=p.TypeError;c.exports=function(E){if(d(E))return E;throw g(O(E)+" is not a function")}},function(c,l,o){var p=o(36),d=o(38),O=o(69);c.exports=p?function(g,E,M){return d.f(g,E,O(1,M))}:function(g,E,M){return g[E]=M,g}},function(c,l,o){var p,d,O,g=o(175),E=o(7),M=o(15),A=o(33),T=o(57),k=o(35),R=o(109),C=o(93),F=o(72),W="Object already initialized",V=E.TypeError,te=E.WeakMap;if(g||R.state){var ie=R.state||(R.state=new te),re=M(ie.get),J=M(ie.has),Z=M(ie.set);p=function(z,G){if(J(ie,z))throw new V(W);return G.facade=z,Z(ie,z,G),G},d=function(z){return re(ie,z)||{}},O=function(z){return J(ie,z)}}else{var Y=C("state");F[Y]=!0,p=function(z,G){if(k(z,Y))throw new V(W);return G.facade=z,T(z,Y,G),G},d=function(z){return k(z,Y)?z[Y]:{}},O=function(z){return k(z,Y)}}c.exports={set:p,get:d,has:O,enforce:function(z){return O(z)?d(z):p(z,{})},getterFor:function(z){return function(G){var X;if(!A(G)||(X=d(G)).type!==z)throw V("Incompatible receiver, "+z+" required");return X}}}},function(c,l){var o=Math.ceil,p=Math.floor;c.exports=function(d){var O=+d;return O!=O||O===0?0:(O>0?p:o)(O)}},function(c,l,o){var p,d=o(32),O=o(176),g=o(111),E=o(72),M=o(138),A=o(91),T=o(93),k=T("IE_PROTO"),R=function(){},C=function(V){return"<script>"+V+"<\/script>"},F=function(V){V.write(C("")),V.close();var te=V.parentWindow.Object;return V=null,te},W=function(){try{p=new ActiveXObject("htmlfile")}catch(re){}var V,te;W=typeof document!="undefined"?document.domain&&p?F(p):((te=A("iframe")).style.display="none",M.appendChild(te),te.src="javascript:",(V=te.contentWindow.document).open(),V.write(C("document.F=Object")),V.close(),V.F):F(p);for(var ie=g.length;ie--;)delete W.prototype[g[ie]];return W()};E[k]=!0,c.exports=Object.create||function(V,te){var ie;return V!==null?(R.prototype=d(V),ie=new R,R.prototype=null,ie[k]=V):ie=W(),te===void 0?ie:O(ie,te)}},function(c,l,o){var p=o(36),d=o(7),O=o(15),g=o(95),E=o(42),M=o(35),A=o(148),T=o(54),k=o(87),R=o(131),C=o(18),F=o(74).f,W=o(50).f,V=o(38).f,te=o(160),ie=o(161).trim,re="Number",J=d.Number,Z=J.prototype,Y=d.TypeError,z=O("".slice),G=O("".charCodeAt),X=function(Be){var Se=R(Be,"number");return typeof Se=="bigint"?Se:$(Se)},$=function(Be){var Se,ye,je,Ae,Ue,nt,Ot,We,Ze=R(Be,"number");if(k(Ze))throw Y("Cannot convert a Symbol value to a number");if(typeof Ze=="string"&&Ze.length>2){if(Ze=ie(Ze),(Se=G(Ze,0))===43||Se===45){if((ye=G(Ze,2))===88||ye===120)return NaN}else if(Se===48){switch(G(Ze,1)){case 66:case 98:je=2,Ae=49;break;case 79:case 111:je=8,Ae=55;break;default:return+Ze}for(nt=(Ue=z(Ze,2)).length,Ot=0;Ot<nt;Ot++)if((We=G(Ue,Ot))<48||We>Ae)return NaN;return parseInt(Ue,je)}}return+Ze};if(g(re,!J(" 0o1")||!J("0b1")||J("+0x1"))){for(var ue,xe=function(Be){var Se=arguments.length<1?0:J(X(Be)),ye=this;return T(Z,ye)&&C(function(){te(ye)})?A(Object(Se),ye,xe):Se},me=p?F(J):"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(","),Pe=0;me.length>Pe;Pe++)M(J,ue=me[Pe])&&!M(xe,ue)&&V(xe,ue,W(J,ue));xe.prototype=Z,Z.constructor=xe,E(d,re,xe)}},function(c,l,o){var p=o(56);c.exports=function(d,O){var g=d[O];return g==null?void 0:p(g)}},function(c,l,o){var p=o(86),d=o(38),O=o(69);c.exports=function(g,E,M){var A=p(E);A in g?d.f(g,A,O(0,M)):g[A]=M}},function(c,l,o){var p=o(15),d=o(56),O=p(p.bind);c.exports=function(g,E){return d(g),E===void 0?g:O?O(g,E):function(){return g.apply(E,arguments)}}},function(c,l,o){var p=o(16),d=o(15),O=o(85),g=o(41),E=o(121),M=d([].join),A=O!=Object,T=E("join",",");p({target:"Array",proto:!0,forced:A||!T},{join:function(k){return M(g(this),k===void 0?",":k)}})},function(c,l,o){var p=o(15),d=o(73).PROPER,O=o(42),g=o(32),E=o(54),M=o(39),A=o(18),T=o(154),k="toString",R=RegExp.prototype,C=R.toString,F=p(T),W=A(function(){return C.call({source:"a",flags:"b"})!="/a/b"}),V=d&&C.name!=k;(W||V)&&O(RegExp.prototype,k,function(){var te=g(this),ie=M(te.source),re=te.flags;return"/"+ie+"/"+M(re===void 0&&E(R,te)&&!("flags"in R)?F(te):re)},{unsafe:!0})},function(c,l,o){var p=o(16),d=o(217),O=o(100);p({target:"Array",proto:!0},{fill:d}),O("fill")},function(c,l){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(p){typeof window=="object"&&(o=window)}c.exports=o},function(c,l){c.exports=function(o,p){return{enumerable:!(1&o),configurable:!(2&o),writable:!(4&o),value:p}}},function(c,l,o){var p,d,O=o(7),g=o(55),E=O.process,M=O.Deno,A=E&&E.versions||M&&M.version,T=A&&A.v8;T&&(d=(p=T.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!d&&g&&(!(p=g.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=g.match(/Chrome\/(\d+)/))&&(d=+p[1]),c.exports=d},function(c,l){c.exports=!1},function(c,l){c.exports={}},function(c,l,o){var p=o(36),d=o(35),O=Function.prototype,g=p&&Object.getOwnPropertyDescriptor,E=d(O,"name"),M=E&&function(){}.name==="something",A=E&&(!p||p&&g(O,"name").configurable);c.exports={EXISTS:E,PROPER:M,CONFIGURABLE:A}},function(c,l,o){var p=o(136),d=o(111).concat("length","prototype");l.f=Object.getOwnPropertyNames||function(O){return p(O,d)}},function(c,l,o){var p=o(59),d=Math.max,O=Math.min;c.exports=function(g,E){var M=p(g);return M<0?d(M+E,0):O(M,E)}},function(c,l){var o=Function.prototype,p=o.apply,d=o.bind,O=o.call;c.exports=typeof Reflect=="object"&&Reflect.apply||(d?O.bind(p):function(){return O.apply(p,arguments)})},function(c,l,o){var p=o(136),d=o(111);c.exports=Object.keys||function(O){return p(O,d)}},function(c,l,o){var p=o(38).f,d=o(35),O=o(28)("toStringTag");c.exports=function(g,E,M){g&&!d(g=M?g:g.prototype,O)&&p(g,O,{configurable:!0,value:E})}},function(c,l,o){var p=o(64),d=o(15),O=o(85),g=o(40),E=o(45),M=o(115),A=d([].push),T=function(k){var R=k==1,C=k==2,F=k==3,W=k==4,V=k==6,te=k==7,ie=k==5||V;return function(re,J,Z,Y){for(var z,G,X=g(re),$=O(X),ue=p(J,Z),xe=E($),me=0,Pe=Y||M,Be=R?Pe(re,xe):C||te?Pe(re,0):void 0;xe>me;me++)if((ie||me in $)&&(G=ue(z=$[me],me,X),k))if(R)Be[me]=G;else if(G)switch(k){case 3:return!0;case 5:return z;case 6:return me;case 2:A(Be,z)}else switch(k){case 4:return!1;case 7:A(Be,z)}return V?-1:F||W?W:Be}};c.exports={forEach:T(0),map:T(1),filter:T(2),some:T(3),every:T(4),find:T(5),findIndex:T(6),filterReject:T(7)}},function(c,l){c.exports={}},function(c,l,o){var p=o(18),d=o(28),O=o(70),g=d("species");c.exports=function(E){return O>=51||!p(function(){var M=[];return(M.constructor={})[g]=function(){return{foo:1}},M[E](Boolean).foo!==1})}},function(c,l,o){var p=o(76),d=o(34),O=o(15),g=o(123),E=o(159),M=o(32),A=o(44),T=o(164),k=o(124),R=o(94),C=o(39),F=o(62),W=o(114),V=o(125),te=o(103),ie=o(155),re=o(18),J=ie.UNSUPPORTED_Y,Z=4294967295,Y=Math.min,z=[].push,G=O(/./.exec),X=O(z),$=O("".slice),ue=!re(function(){var xe=/(?:)/,me=xe.exec;xe.exec=function(){return me.apply(this,arguments)};var Pe="ab".split(xe);return Pe.length!==2||Pe[0]!=="a"||Pe[1]!=="b"});g("split",function(xe,me,Pe){var Be;return Be="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(Se,ye){var je=C(A(this)),Ae=ye===void 0?Z:ye>>>0;if(Ae===0)return[];if(Se===void 0)return[je];if(!E(Se))return d(me,je,Se,Ae);for(var Ue,nt,Ot,We=[],Ze=(Se.ignoreCase?"i":"")+(Se.multiline?"m":"")+(Se.unicode?"u":"")+(Se.sticky?"y":""),gt=0,se=new RegExp(Se.source,Ze+"g");(Ue=d(te,se,je))&&!((nt=se.lastIndex)>gt&&(X(We,$(je,gt,Ue.index)),Ue.length>1&&Ue.index<je.length&&p(z,We,W(Ue,1)),Ot=Ue[0].length,gt=nt,We.length>=Ae));)se.lastIndex===Ue.index&&se.lastIndex++;return gt===je.length?!Ot&&G(se,"")||X(We,""):X(We,$(je,gt)),We.length>Ae?W(We,0,Ae):We}:"0".split(void 0,0).length?function(Se,ye){return Se===void 0&&ye===0?[]:d(me,this,Se,ye)}:me,[function(Se,ye){var je=A(this),Ae=Se==null?void 0:F(Se,xe);return Ae?d(Ae,Se,je,ye):d(Be,C(je),Se,ye)},function(Se,ye){var je=M(this),Ae=C(Se),Ue=Pe(Be,je,Ae,ye,Be!==me);if(Ue.done)return Ue.value;var nt=T(je,RegExp),Ot=je.unicode,We=(je.ignoreCase?"i":"")+(je.multiline?"m":"")+(je.unicode?"u":"")+(J?"g":"y"),Ze=new nt(J?"^(?:"+je.source+")":je,We),gt=ye===void 0?Z:ye>>>0;if(gt===0)return[];if(Ae.length===0)return V(Ze,Ae)===null?[Ae]:[];for(var se=0,ae=0,he=[];ae<Ae.length;){Ze.lastIndex=J?0:ae;var Te,He=V(Ze,J?$(Ae,ae):Ae);if(He===null||(Te=Y(R(Ze.lastIndex+(J?ae:0)),Ae.length))===se)ae=k(Ae,ae,Ot);else{if(X(he,$(Ae,se,ae)),he.length===gt)return he;for(var Le=1;Le<=He.length-1;Le++)if(X(he,He[Le]),he.length===gt)return he;ae=se=Te}}return X(he,$(Ae,se)),he}]},!ue,J)},function(c,l,o){o(16)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(c,l,o){var p={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,O=d&&!p.call({1:2},1);l.f=O?function(g){var E=d(this,g);return!!E&&E.enumerable}:p},function(c,l,o){var p=o(7),d=o(15),O=o(18),g=o(51),E=p.Object,M=d("".split);c.exports=O(function(){return!E("z").propertyIsEnumerable(0)})?function(A){return g(A)=="String"?M(A,""):E(A)}:E},function(c,l,o){var p=o(131),d=o(87);c.exports=function(O){var g=p(O,"string");return d(g)?g:g+""}},function(c,l,o){var p=o(7),d=o(46),O=o(30),g=o(54),E=o(132),M=p.Object;c.exports=E?function(A){return typeof A=="symbol"}:function(A){var T=d("Symbol");return O(T)&&g(T.prototype,M(A))}},function(c,l,o){var p=o(7).String;c.exports=function(d){try{return p(d)}catch(O){return"Object"}}},function(c,l,o){var p=o(71),d=o(109);(c.exports=function(O,g){return d[O]||(d[O]=g!==void 0?g:{})})("versions",[]).push({version:"3.19.3",mode:p?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(c,l,o){var p=o(15),d=0,O=Math.random(),g=p(1 .toString);c.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+g(++d+O,36)}},function(c,l,o){var p=o(7),d=o(33),O=p.document,g=d(O)&&d(O.createElement);c.exports=function(E){return g?O.createElement(E):{}}},function(c,l,o){var p=o(15),d=o(30),O=o(109),g=p(Function.toString);d(O.inspectSource)||(O.inspectSource=function(E){return g(E)}),c.exports=O.inspectSource},function(c,l,o){var p=o(89),d=o(90),O=p("keys");c.exports=function(g){return O[g]||(O[g]=d(g))}},function(c,l,o){var p=o(59),d=Math.min;c.exports=function(O){return O>0?d(p(O),9007199254740991):0}},function(c,l,o){var p=o(18),d=o(30),O=/#|\.prototype\./,g=function(k,R){var C=M[E(k)];return C==T||C!=A&&(d(R)?p(R):!!R)},E=g.normalize=function(k){return String(k).replace(O,".").toLowerCase()},M=g.data={},A=g.NATIVE="N",T=g.POLYFILL="P";c.exports=g},function(c,l,o){var p=o(51);c.exports=Array.isArray||function(d){return p(d)=="Array"}},function(c,l,o){var p=o(7),d=o(113),O=o(30),g=o(51),E=o(28)("toStringTag"),M=p.Object,A=g(function(){return arguments}())=="Arguments";c.exports=d?g:function(T){var k,R,C;return T===void 0?"Undefined":T===null?"Null":typeof(R=function(F,W){try{return F[W]}catch(V){}}(k=M(T),E))=="string"?R:A?g(k):(C=g(k))=="Object"&&O(k.callee)?"Arguments":C}},function(c,l,o){var p=o(15);c.exports=p([].slice)},function(c,l,o){var p=o(15),d=o(18),O=o(30),g=o(97),E=o(46),M=o(92),A=function(){},T=[],k=E("Reflect","construct"),R=/^\s*(?:class|function)\b/,C=p(R.exec),F=!R.exec(A),W=function(V){if(!O(V))return!1;try{return k(A,T,V),!0}catch(te){return!1}};c.exports=!k||d(function(){var V;return W(W.call)||!W(Object)||!W(function(){V=!0})||V})?function(V){if(!O(V))return!1;switch(g(V)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return F||!!C(R,M(V))}:W},function(c,l,o){var p=o(28),d=o(60),O=o(38),g=p("unscopables"),E=Array.prototype;E[g]==null&&O.f(E,g,{configurable:!0,value:d(null)}),c.exports=function(M){E[g][M]=!0}},function(c,l,o){var p=o(7),d=o(35),O=o(30),g=o(40),E=o(93),M=o(143),A=E("IE_PROTO"),T=p.Object,k=T.prototype;c.exports=M?T.getPrototypeOf:function(R){var C=g(R);if(d(C,A))return C[A];var F=C.constructor;return O(F)&&C instanceof F?F.prototype:C instanceof T?k:null}},function(c,l,o){var p=o(15),d=o(32),O=o(181);c.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var g,E=!1,M={};try{(g=p(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(M,[]),E=M instanceof Array}catch(A){}return function(A,T){return d(A),O(T),E?g(A,T):A.__proto__=T,A}}():void 0)},function(c,l,o){var p,d,O=o(34),g=o(15),E=o(39),M=o(154),A=o(155),T=o(89),k=o(60),R=o(58).get,C=o(190),F=o(191),W=T("native-string-replace",String.prototype.replace),V=RegExp.prototype.exec,te=V,ie=g("".charAt),re=g("".indexOf),J=g("".replace),Z=g("".slice),Y=(d=/b*/g,O(V,p=/a/,"a"),O(V,d,"a"),p.lastIndex!==0||d.lastIndex!==0),z=A.BROKEN_CARET,G=/()??/.exec("")[1]!==void 0;(Y||G||z||C||F)&&(te=function(X){var $,ue,xe,me,Pe,Be,Se,ye=this,je=R(ye),Ae=E(X),Ue=je.raw;if(Ue)return Ue.lastIndex=ye.lastIndex,$=O(te,Ue,Ae),ye.lastIndex=Ue.lastIndex,$;var nt=je.groups,Ot=z&&ye.sticky,We=O(M,ye),Ze=ye.source,gt=0,se=Ae;if(Ot&&(We=J(We,"y",""),re(We,"g")===-1&&(We+="g"),se=Z(Ae,ye.lastIndex),ye.lastIndex>0&&(!ye.multiline||ye.multiline&&ie(Ae,ye.lastIndex-1)!==`
  24. `)&&(Ze="(?: "+Ze+")",se=" "+se,gt++),ue=new RegExp("^(?:"+Ze+")",We)),G&&(ue=new RegExp("^"+Ze+"$(?!\\s)",We)),Y&&(xe=ye.lastIndex),me=O(V,Ot?ue:ye,se),Ot?me?(me.input=Z(me.input,gt),me[0]=Z(me[0],gt),me.index=ye.lastIndex,ye.lastIndex+=me[0].length):ye.lastIndex=0:Y&&me&&(ye.lastIndex=ye.global?me.index+me[0].length:xe),G&&me&&me.length>1&&O(W,me[0],ue,function(){for(Pe=1;Pe<arguments.length-2;Pe++)arguments[Pe]===void 0&&(me[Pe]=void 0)}),me&&nt)for(me.groups=Be=k(null),Pe=0;Pe<nt.length;Pe++)Be[(Se=nt[Pe])[0]]=me[Se[1]];return me}),c.exports=te},function(c,l,o){var p=o(16),d=o(7),O=o(75),g=o(59),E=o(45),M=o(40),A=o(115),T=o(63),k=o(81)("splice"),R=d.TypeError,C=Math.max,F=Math.min,W=9007199254740991,V="Maximum allowed length exceeded";p({target:"Array",proto:!0,forced:!k},{splice:function(te,ie){var re,J,Z,Y,z,G,X=M(this),$=E(X),ue=O(te,$),xe=arguments.length;if(xe===0?re=J=0:xe===1?(re=0,J=$-ue):(re=xe-2,J=F(C(g(ie),0),$-ue)),$+re-J>W)throw R(V);for(Z=A(X,J),Y=0;Y<J;Y++)(z=ue+Y)in X&&T(Z,Y,X[z]);if(Z.length=J,re<J){for(Y=ue;Y<$-J;Y++)G=Y+re,(z=Y+J)in X?X[G]=X[z]:delete X[G];for(Y=$;Y>$-J+re;Y--)delete X[Y-1]}else if(re>J)for(Y=$-J;Y>ue;Y--)G=Y+re-1,(z=Y+J-1)in X?X[G]=X[z]:delete X[G];for(Y=0;Y<re;Y++)X[Y+ue]=arguments[Y+2];return X.length=$-J+re,Z}})},function(c,l,o){var p=o(16),d=o(205);p({target:"String",proto:!0,forced:o(206)("anchor")},{anchor:function(O){return d(this,"a","name",O)}})},function(c,l,o){(function(p){var d=typeof p=="object"&&p&&p.Object===Object&&p;l.a=d}).call(this,o(68))},function(c,l,o){(function(p){var d=o(31),O=y&&!y.nodeType&&y,g=O&&typeof p=="object"&&p&&!p.nodeType&&p,E=g&&g.exports===O?d.a.Buffer:void 0,M=E?E.allocUnsafe:void 0;l.a=function(A,T){if(T)return A.slice();var k=A.length,R=M?M(k):new A.constructor(k);return A.copy(R),R}}).call(this,o(122)(c))},function(c,l,o){var p=o(70),d=o(18);c.exports=!!Object.getOwnPropertySymbols&&!d(function(){var O=Symbol();return!String(O)||!(Object(O)instanceof Symbol)||!Symbol.sham&&p&&p<41})},function(c,l,o){var p=o(7),d=o(110),O="__core-js_shared__",g=p[O]||d(O,{});c.exports=g},function(c,l,o){var p=o(7),d=Object.defineProperty;c.exports=function(O,g){try{d(p,O,{value:g,configurable:!0,writable:!0})}catch(E){p[O]=g}return g}},function(c,l){c.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(c,l){l.f=Object.getOwnPropertySymbols},function(c,l,o){var p={};p[o(28)("toStringTag")]="z",c.exports=String(p)==="[object z]"},function(c,l,o){var p=o(7),d=o(75),O=o(45),g=o(63),E=p.Array,M=Math.max;c.exports=function(A,T,k){for(var R=O(A),C=d(T,R),F=d(k===void 0?R:k,R),W=E(M(F-C,0)),V=0;C<F;C++,V++)g(W,V,A[C]);return W.length=V,W}},function(c,l,o){var p=o(178);c.exports=function(d,O){return new(p(d))(O===0?0:O)}},function(c,l,o){var p=o(16),d=o(34),O=o(71),g=o(73),E=o(30),M=o(180),A=o(101),T=o(102),k=o(78),R=o(57),C=o(42),F=o(28),W=o(80),V=o(142),te=g.PROPER,ie=g.CONFIGURABLE,re=V.IteratorPrototype,J=V.BUGGY_SAFARI_ITERATORS,Z=F("iterator"),Y="keys",z="values",G="entries",X=function(){return this};c.exports=function($,ue,xe,me,Pe,Be,Se){M(xe,ue,me);var ye,je,Ae,Ue=function(ae){if(ae===Pe&&gt)return gt;if(!J&&ae in We)return We[ae];switch(ae){case Y:case z:case G:return function(){return new xe(this,ae)}}return function(){return new xe(this)}},nt=ue+" Iterator",Ot=!1,We=$.prototype,Ze=We[Z]||We["@@iterator"]||Pe&&We[Pe],gt=!J&&Ze||Ue(Pe),se=ue=="Array"&&We.entries||Ze;if(se&&(ye=A(se.call(new $)))!==Object.prototype&&ye.next&&(O||A(ye)===re||(T?T(ye,re):E(ye[Z])||C(ye,Z,X)),k(ye,nt,!0,!0),O&&(W[nt]=X)),te&&Pe==z&&Ze&&Ze.name!==z&&(!O&&ie?R(We,"name",z):(Ot=!0,gt=function(){return d(Ze,this)})),Pe)if(je={values:Ue(z),keys:Be?gt:Ue(Y),entries:Ue(G)},Se)for(Ae in je)(J||Ot||!(Ae in We))&&C(We,Ae,je[Ae]);else p({target:ue,proto:!0,forced:J||Ot},je);return O&&!Se||We[Z]===gt||C(We,Z,gt,{name:Pe}),W[ue]=gt,je}},function(c,l,o){var p=o(7),d=o(64),O=o(34),g=o(32),E=o(88),M=o(145),A=o(45),T=o(54),k=o(146),R=o(118),C=o(147),F=p.TypeError,W=function(te,ie){this.stopped=te,this.result=ie},V=W.prototype;c.exports=function(te,ie,re){var J,Z,Y,z,G,X,$,ue=re&&re.that,xe=!(!re||!re.AS_ENTRIES),me=!(!re||!re.IS_ITERATOR),Pe=!(!re||!re.INTERRUPTED),Be=d(ie,ue),Se=function(je){return J&&C(J,"normal",je),new W(!0,je)},ye=function(je){return xe?(g(je),Pe?Be(je[0],je[1],Se):Be(je[0],je[1])):Pe?Be(je,Se):Be(je)};if(me)J=te;else{if(!(Z=R(te)))throw F(E(te)+" is not iterable");if(M(Z)){for(Y=0,z=A(te);z>Y;Y++)if((G=ye(te[Y]))&&T(V,G))return G;return new W(!1)}J=k(te,Z)}for(X=J.next;!($=O(X,J)).done;){try{G=ye($.value)}catch(je){C(J,"throw",je)}if(typeof G=="object"&&G&&T(V,G))return G}return new W(!1)}},function(c,l,o){var p=o(97),d=o(62),O=o(80),g=o(28)("iterator");c.exports=function(E){if(E!=null)return d(E,g)||d(E,"@@iterator")||O[p(E)]}},function(c,l,o){var p=o(7),d=o(54),O=p.TypeError;c.exports=function(g,E){if(d(E,g))return g;throw O("Incorrect invocation")}},function(c,l,o){var p=o(28)("iterator"),d=!1;try{var O=0,g={next:function(){return{done:!!O++}},return:function(){d=!0}};g[p]=function(){return this},Array.from(g,function(){throw 2})}catch(E){}c.exports=function(E,M){if(!M&&!d)return!1;var A=!1;try{var T={};T[p]=function(){return{next:function(){return{done:A=!0}}}},E(T)}catch(k){}return A}},function(c,l,o){var p=o(18);c.exports=function(d,O){var g=[][d];return!!g&&p(function(){g.call(null,O||function(){throw 1},1)})}},function(c,l){c.exports=function(o){if(!o.webpackPolyfill){var p=Object.create(o);p.children||(p.children=[]),Object.defineProperty(p,"loaded",{enumerable:!0,get:function(){return p.l}}),Object.defineProperty(p,"id",{enumerable:!0,get:function(){return p.i}}),Object.defineProperty(p,"exports",{enumerable:!0}),p.webpackPolyfill=1}return p}},function(c,l,o){o(19);var p=o(15),d=o(42),O=o(103),g=o(18),E=o(28),M=o(57),A=E("species"),T=RegExp.prototype;c.exports=function(k,R,C,F){var W=E(k),V=!g(function(){var J={};return J[W]=function(){return 7},""[k](J)!=7}),te=V&&!g(function(){var J=!1,Z=/a/;return k==="split"&&((Z={}).constructor={},Z.constructor[A]=function(){return Z},Z.flags="",Z[W]=/./[W]),Z.exec=function(){return J=!0,null},Z[W](""),!J});if(!V||!te||C){var ie=p(/./[W]),re=R(W,""[k],function(J,Z,Y,z,G){var X=p(J),$=Z.exec;return $===O||$===T.exec?V&&!G?{done:!0,value:ie(Z,Y,z)}:{done:!0,value:X(Y,Z,z)}:{done:!1}});d(String.prototype,k,re[0]),d(T,W,re[1])}F&&M(T[W],"sham",!0)}},function(c,l,o){var p=o(151).charAt;c.exports=function(d,O,g){return O+(g?p(d,O).length:1)}},function(c,l,o){var p=o(7),d=o(34),O=o(32),g=o(30),E=o(51),M=o(103),A=p.TypeError;c.exports=function(T,k){var R=T.exec;if(g(R)){var C=d(R,T,k);return C!==null&&O(C),C}if(E(T)==="RegExp")return d(M,T,k);throw A("RegExp#exec called on incompatible receiver")}},function(c,l,o){var p=o(76),d=o(34),O=o(15),g=o(123),E=o(18),M=o(32),A=o(30),T=o(59),k=o(94),R=o(39),C=o(44),F=o(124),W=o(62),V=o(201),te=o(125),ie=o(28)("replace"),re=Math.max,J=Math.min,Z=O([].concat),Y=O([].push),z=O("".indexOf),G=O("".slice),X="a".replace(/./,"$0")==="$0",$=!!/./[ie]&&/./[ie]("a","$0")==="";g("replace",function(ue,xe,me){var Pe=$?"$":"$0";return[function(Be,Se){var ye=C(this),je=Be==null?void 0:W(Be,ie);return je?d(je,Be,ye,Se):d(xe,R(ye),Be,Se)},function(Be,Se){var ye=M(this),je=R(Be);if(typeof Se=="string"&&z(Se,Pe)===-1&&z(Se,"$<")===-1){var Ae=me(xe,ye,je,Se);if(Ae.done)return Ae.value}var Ue=A(Se);Ue||(Se=R(Se));var nt=ye.global;if(nt){var Ot=ye.unicode;ye.lastIndex=0}for(var We=[];;){var Ze=te(ye,je);if(Ze===null||(Y(We,Ze),!nt))break;R(Ze[0])===""&&(ye.lastIndex=F(je,k(ye.lastIndex),Ot))}for(var gt,se="",ae=0,he=0;he<We.length;he++){for(var Te=R((Ze=We[he])[0]),He=re(J(T(Ze.index),je.length),0),Le=[],wt=1;wt<Ze.length;wt++)Y(Le,(gt=Ze[wt])===void 0?gt:String(gt));var kt=Ze.groups;if(Ue){var St=Z([Te],Le,He,je);kt!==void 0&&Y(St,kt);var yt=R(p(Se,void 0,St))}else yt=V(Te,je,He,Le,kt,Se);He>=ae&&(se+=G(je,ae,He)+yt,ae=He+Te.length)}return se+G(je,ae)}]},!!E(function(){var ue=/./;return ue.exec=function(){var xe=[];return xe.groups={a:"7"},xe},"".replace(ue,"$<a>")!=="7"})||!X||$)},function(c,l,o){var p=o(16),d=Math.hypot,O=Math.abs,g=Math.sqrt;p({target:"Math",stat:!0,forced:!!d&&d(1/0,NaN)!==1/0},{hypot:function(E,M){for(var A,T,k=0,R=0,C=arguments.length,F=0;R<C;)F<(A=O(arguments[R++]))?(k=k*(T=F/A)*T+1,F=A):k+=A>0?(T=A/F)*T:A;return F===1/0?1/0:F*g(k)}})},function(c,l,o){var p=o(51),d=o(7);c.exports=p(d.process)=="process"},function(c,l,o){o(16)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(c,l,o){(function(p,d){var O;/**
  25. * @license
  26. * Lodash <https://lodash.com/>
  27. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  28. * Released under MIT license <https://lodash.com/license>
  29. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  30. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  31. */(function(){var g,E="Expected a function",M="__lodash_hash_undefined__",A="__lodash_placeholder__",T=16,k=32,R=64,C=128,F=256,W=1/0,V=9007199254740991,te=NaN,ie=4294967295,re=[["ary",C],["bind",1],["bindKey",2],["curry",8],["curryRight",T],["flip",512],["partial",k],["partialRight",R],["rearg",F]],J="[object Arguments]",Z="[object Array]",Y="[object Boolean]",z="[object Date]",G="[object Error]",X="[object Function]",$="[object GeneratorFunction]",ue="[object Map]",xe="[object Number]",me="[object Object]",Pe="[object Promise]",Be="[object RegExp]",Se="[object Set]",ye="[object String]",je="[object Symbol]",Ae="[object WeakMap]",Ue="[object ArrayBuffer]",nt="[object DataView]",Ot="[object Float32Array]",We="[object Float64Array]",Ze="[object Int8Array]",gt="[object Int16Array]",se="[object Int32Array]",ae="[object Uint8Array]",he="[object Uint8ClampedArray]",Te="[object Uint16Array]",He="[object Uint32Array]",Le=/\b__p \+= '';/g,wt=/\b(__p \+=) '' \+/g,kt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,St=/&(?:amp|lt|gt|quot|#39);/g,yt=/[&<>"']/g,Me=RegExp(St.source),ct=RegExp(yt.source),le=/<%-([\s\S]+?)%>/g,ut=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,on=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lt=/^\w*$/,qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dn=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(dn.source),Dt=/^\s+/,Nn=/\s/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,de=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ve=/[()=,{}\[\]\/\s]/,Ke=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Gt=/\w*$/,Xn=/^[-+]0x[0-9a-f]+$/i,Qn=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,zn=/^0o[0-7]+$/i,at=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,Nt=/['\n\r\u2028\u2029\\]/g,fn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xn="\\u2700-\\u27bf",Oo="a-z\\xdf-\\xf6\\xf8-\\xff",io="A-Z\\xc0-\\xd6\\xd8-\\xde",wo="\\ufe0e\\ufe0f",ai="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oc="['’]",Yu="[\\ud800-\\udfff]",Ir="["+ai+"]",ki="["+fn+"]",ft="\\d+",wc="[\\u2700-\\u27bf]",Wu="["+Oo+"]",Vu="[^\\ud800-\\udfff"+ai+ft+xn+Oo+io+"]",gr="\\ud83c[\\udffb-\\udfff]",Pr="[^\\ud800-\\udfff]",tu="(?:\\ud83c[\\udde6-\\uddff]){2}",$r="[\\ud800-\\udbff][\\udc00-\\udfff]",Lr="["+io+"]",qr="(?:"+Wu+"|"+Vu+")",Ku="(?:"+Lr+"|"+Vu+")",$u="(?:['’](?:d|ll|m|re|s|t|ve))?",$a="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ti="(?:"+ki+"|"+gr+")?",qa="[\\ufe0e\\ufe0f]?",qu=qa+Ti+("(?:\\u200d(?:"+[Pr,tu,$r].join("|")+")"+qa+Ti+")*"),xc="(?:"+[wc,tu,$r].join("|")+")"+qu,Bo="(?:"+[Pr+ki+"?",ki,tu,$r,Yu].join("|")+")",Za=RegExp(Oc,"g"),xo=RegExp(ki,"g"),Zu=RegExp(gr+"(?="+gr+")|"+Bo+qu,"g"),nu=RegExp([Lr+"?"+Wu+"+"+$u+"(?="+[Ir,Lr,"$"].join("|")+")",Ku+"+"+$a+"(?="+[Ir,Lr+qr,"$"].join("|")+")",Lr+"?"+qr+"+"+$u,Lr+"+"+$a,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ft,xc].join("|"),"g"),Ju=RegExp("[\\u200d\\ud800-\\udfff"+fn+wo+"]"),Qu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ec=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ja=-1,sn={};sn[Ot]=sn[We]=sn[Ze]=sn[gt]=sn[se]=sn[ae]=sn[he]=sn[Te]=sn[He]=!0,sn[J]=sn[Z]=sn[Ue]=sn[Y]=sn[nt]=sn[z]=sn[G]=sn[X]=sn[ue]=sn[xe]=sn[me]=sn[Be]=sn[Se]=sn[ye]=sn[Ae]=!1;var un={};un[J]=un[Z]=un[Ue]=un[nt]=un[Y]=un[z]=un[Ot]=un[We]=un[Ze]=un[gt]=un[se]=un[ue]=un[xe]=un[me]=un[Be]=un[Se]=un[ye]=un[je]=un[ae]=un[he]=un[Te]=un[He]=!0,un[G]=un[X]=un[Ae]=!1;var Qa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},si=parseFloat,Eo=parseInt,ea=typeof p=="object"&&p&&p.Object===Object&&p,es=typeof self=="object"&&self&&self.Object===Object&&self,An=ea||es||Function("return this")(),ta=l&&!l.nodeType&&l,Di=ta&&typeof d=="object"&&d&&!d.nodeType&&d,na=Di&&Di.exports===ta,ru=na&&ea.process,er=function(){try{var Oe=Di&&Di.require&&Di.require("util").types;return Oe||ru&&ru.binding&&ru.binding("util")}catch(Ne){}}(),ra=er&&er.isArrayBuffer,ts=er&&er.isDate,oa=er&&er.isMap,ou=er&&er.isRegExp,ci=er&&er.isSet,So=er&&er.isTypedArray;function gn(Oe,Ne,Re){switch(Re.length){case 0:return Oe.call(Ne);case 1:return Oe.call(Ne,Re[0]);case 2:return Oe.call(Ne,Re[0],Re[1]);case 3:return Oe.call(Ne,Re[0],Re[1],Re[2])}return Oe.apply(Ne,Re)}function Sc(Oe,Ne,Re,Qe){for(var zt=-1,Wt=Oe==null?0:Oe.length;++zt<Wt;){var vn=Oe[zt];Ne(Qe,vn,Re(vn),Oe)}return Qe}function vr(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length;++Re<Qe&&Ne(Oe[Re],Re,Oe)!==!1;);return Oe}function jc(Oe,Ne){for(var Re=Oe==null?0:Oe.length;Re--&&Ne(Oe[Re],Re,Oe)!==!1;);return Oe}function ns(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length;++Re<Qe;)if(!Ne(Oe[Re],Re,Oe))return!1;return!0}function ar(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length,zt=0,Wt=[];++Re<Qe;){var vn=Oe[Re];Ne(vn,Re,Oe)&&(Wt[zt++]=vn)}return Wt}function zr(Oe,Ne){return!!(Oe!=null&&Oe.length)&&fi(Oe,Ne,0)>-1}function ia(Oe,Ne,Re){for(var Qe=-1,zt=Oe==null?0:Oe.length;++Qe<zt;)if(Re(Ne,Oe[Qe]))return!0;return!1}function en(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length,zt=Array(Qe);++Re<Qe;)zt[Re]=Ne(Oe[Re],Re,Oe);return zt}function Hn(Oe,Ne){for(var Re=-1,Qe=Ne.length,zt=Oe.length;++Re<Qe;)Oe[zt+Re]=Ne[Re];return Oe}function iu(Oe,Ne,Re,Qe){var zt=-1,Wt=Oe==null?0:Oe.length;for(Qe&&Wt&&(Re=Oe[++zt]);++zt<Wt;)Re=Ne(Re,Oe[zt],zt,Oe);return Re}function rs(Oe,Ne,Re,Qe){var zt=Oe==null?0:Oe.length;for(Qe&&zt&&(Re=Oe[--zt]);zt--;)Re=Ne(Re,Oe[zt],zt,Oe);return Re}function ua(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length;++Re<Qe;)if(Ne(Oe[Re],Re,Oe))return!0;return!1}var uu=br("length");function uo(Oe,Ne,Re){var Qe;return Re(Oe,function(zt,Wt,vn){if(Ne(zt,Wt,vn))return Qe=Wt,!1}),Qe}function jo(Oe,Ne,Re,Qe){for(var zt=Oe.length,Wt=Re+(Qe?1:-1);Qe?Wt--:++Wt<zt;)if(Ne(Oe[Wt],Wt,Oe))return Wt;return-1}function fi(Oe,Ne,Re){return Ne==Ne?function(Qe,zt,Wt){for(var vn=Wt-1,_=Qe.length;++vn<_;)if(Qe[vn]===zt)return vn;return-1}(Oe,Ne,Re):jo(Oe,Po,Re)}function mr(Oe,Ne,Re,Qe){for(var zt=Re-1,Wt=Oe.length;++zt<Wt;)if(Qe(Oe[zt],Ne))return zt;return-1}function Po(Oe){return Oe!=Oe}function Zt(Oe,Ne){var Re=Oe==null?0:Oe.length;return Re?au(Oe,Ne)/Re:te}function br(Oe){return function(Ne){return Ne==null?g:Ne[Oe]}}function ao(Oe){return function(Ne){return Oe==null?g:Oe[Ne]}}function qn(Oe,Ne,Re,Qe,zt){return zt(Oe,function(Wt,vn,_){Re=Qe?(Qe=!1,Wt):Ne(Re,Wt,vn,_)}),Re}function au(Oe,Ne){for(var Re,Qe=-1,zt=Oe.length;++Qe<zt;){var Wt=Ne(Oe[Qe]);Wt!==g&&(Re=Re===g?Wt:Re+Wt)}return Re}function Ni(Oe,Ne){for(var Re=-1,Qe=Array(Oe);++Re<Oe;)Qe[Re]=Ne(Re);return Qe}function aa(Oe){return Oe&&Oe.slice(0,_r(Oe)+1).replace(Dt,"")}function En(Oe){return function(Ne){return Oe(Ne)}}function su(Oe,Ne){return en(Ne,function(Re){return Oe[Re]})}function Ao(Oe,Ne){return Oe.has(Ne)}function Br(Oe,Ne){for(var Re=-1,Qe=Oe.length;++Re<Qe&&fi(Ne,Oe[Re],0)>-1;);return Re}function sa(Oe,Ne){for(var Re=Oe.length;Re--&&fi(Ne,Oe[Re],0)>-1;);return Re}function Pc(Oe,Ne){for(var Re=Oe.length,Qe=0;Re--;)Oe[Re]===Ne&&++Qe;return Qe}var ca=ao({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Rn=ao({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Ci(Oe){return"\\"+Qa[Oe]}function so(Oe){return Ju.test(Oe)}function sr(Oe){var Ne=-1,Re=Array(Oe.size);return Oe.forEach(function(Qe,zt){Re[++Ne]=[zt,Qe]}),Re}function fa(Oe,Ne){return function(Re){return Oe(Ne(Re))}}function Ar(Oe,Ne){for(var Re=-1,Qe=Oe.length,zt=0,Wt=[];++Re<Qe;){var vn=Oe[Re];vn!==Ne&&vn!==A||(Oe[Re]=A,Wt[zt++]=Re)}return Wt}function Fo(Oe){var Ne=-1,Re=Array(Oe.size);return Oe.forEach(function(Qe){Re[++Ne]=Qe}),Re}function cu(Oe){var Ne=-1,Re=Array(Oe.size);return Oe.forEach(function(Qe){Re[++Ne]=[Qe,Qe]}),Re}function co(Oe){return so(Oe)?function(Ne){for(var Re=Zu.lastIndex=0;Zu.test(Ne);)++Re;return Re}(Oe):uu(Oe)}function Mr(Oe){return so(Oe)?function(Ne){return Ne.match(Zu)||[]}(Oe):function(Ne){return Ne.split("")}(Oe)}function _r(Oe){for(var Ne=Oe.length;Ne--&&Nn.test(Oe.charAt(Ne)););return Ne}var Fr=ao({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),fo=function Oe(Ne){var Re,Qe=(Ne=Ne==null?An:fo.defaults(An.Object(),Ne,fo.pick(An,Ec))).Array,zt=Ne.Date,Wt=Ne.Error,vn=Ne.Function,_=Ne.Math,w=Ne.Object,P=Ne.RegExp,L=Ne.String,K=Ne.TypeError,pe=Qe.prototype,Ee=vn.prototype,Fe=w.prototype,st=Ne["__core-js_shared__"],Ht=Ee.toString,et=Fe.hasOwnProperty,hn=0,Bt=(Re=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+Re:"",tn=Fe.toString,Ur=Ht.call(w),_n=An._,Or=P("^"+Ht.call(et).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=na?Ne.Buffer:g,ko=Ne.Symbol,Ri=Ne.Uint8Array,la=Mo?Mo.allocUnsafe:g,Uo=fa(w.getPrototypeOf,w),fu=w.create,cr=Fe.propertyIsEnumerable,Ii=pe.splice,li=ko?ko.isConcatSpreadable:g,Go=ko?ko.iterator:g,Xo=ko?ko.toStringTag:g,lu=function(){try{var a=Ui(w,"defineProperty");return a({},"",{}),a}catch(f){}}(),Bd=Ne.clearTimeout!==An.clearTimeout&&Ne.clearTimeout,Fd=zt&&zt.now!==An.Date.now&&zt.now,fl=Ne.setTimeout!==An.setTimeout&&Ne.setTimeout,os=_.ceil,pu=_.floor,Ac=w.getOwnPropertySymbols,Ud=Mo?Mo.isBuffer:g,ll=Ne.isFinite,Mc=pe.join,pl=fa(w.keys,w),Zn=_.max,fr=_.min,is=zt.now,us=Ne.parseInt,as=_.random,Gd=pe.reverse,du=Ui(Ne,"DataView"),hu=Ui(Ne,"Map"),kc=Ui(Ne,"Promise"),Li=Ui(Ne,"Set"),yu=Ui(Ne,"WeakMap"),pa=Ui(w,"create"),ss=yu&&new yu,gu={},Xd=gi(du),dl=gi(hu),Hd=gi(kc),Yd=gi(Li),hl=gi(yu),cs=ko?ko.prototype:g,or=cs?cs.valueOf:g,yl=cs?cs.toString:g;function B(a){if(kn(a)&&!Ft(a)&&!(a instanceof Qt)){if(a instanceof Zr)return a;if(et.call(a,"__wrapped__"))return ff(a)}return new Zr(a)}var vu=function(){function a(){}return function(f){if(!Pn(f))return{};if(fu)return fu(f);a.prototype=f;var b=new a;return a.prototype=g,b}}();function da(){}function Zr(a,f){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=g}function Qt(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ie,this.__views__=[]}function zi(a){var f=-1,b=a==null?0:a.length;for(this.clear();++f<b;){var j=a[f];this.set(j[0],j[1])}}function yn(a){var f=-1,b=a==null?0:a.length;for(this.clear();++f<b;){var j=a[f];this.set(j[0],j[1])}}function To(a){var f=-1,b=a==null?0:a.length;for(this.clear();++f<b;){var j=a[f];this.set(j[0],j[1])}}function pi(a){var f=-1,b=a==null?0:a.length;for(this.__data__=new To;++f<b;)this.add(a[f])}function Jr(a){var f=this.__data__=new yn(a);this.size=f.size}function Tc(a,f){var b=Ft(a),j=!b&&Gi(a),N=!b&&!j&&wr(a),U=!b&&!j&&!N&&Zo(a),ne=b||j||N||U,fe=ne?Ni(a.length,L):[],_e=fe.length;for(var Ie in a)!f&&!et.call(a,Ie)||ne&&(Ie=="length"||N&&(Ie=="offset"||Ie=="parent")||U&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Hr(Ie,_e))||fe.push(Ie);return fe}function Dc(a){var f=a.length;return f?a[Fc(0,f-1)]:g}function gl(a,f){return wa(Tr(a),di(f,0,a.length))}function vl(a){return wa(Tr(a))}function fs(a,f,b){(b!==g&&!yo(a[f],b)||b===g&&!(f in a))&&Do(a,f,b)}function mu(a,f,b){var j=a[f];et.call(a,f)&&yo(j,b)&&(b!==g||f in a)||Do(a,f,b)}function ha(a,f){for(var b=a.length;b--;)if(yo(a[b][0],f))return b;return-1}function ml(a,f,b,j){return On(a,function(N,U,ne){f(j,N,b(N),ne)}),j}function Nc(a,f){return a&&lo(f,Tn(f),a)}function Do(a,f,b){f=="__proto__"&&lu?lu(a,f,{configurable:!0,enumerable:!0,value:b,writable:!0}):a[f]=b}function ls(a,f){for(var b=-1,j=f.length,N=Qe(j),U=a==null;++b<j;)N[b]=U?g:Tu(a,f[b]);return N}function di(a,f,b){return a==a&&(b!==g&&(a=a<=b?a:b),f!==g&&(a=a>=f?a:f)),a}function Gr(a,f,b,j,N,U){var ne,fe=1&f,_e=2&f,Ie=4&f;if(b&&(ne=N?b(a,j,N,U):b(a)),ne!==g)return ne;if(!Pn(a))return a;var De=Ft(a);if(De){if(ne=function(ze){var Xe=ze.length,jt=new ze.constructor(Xe);return Xe&&typeof ze[0]=="string"&&et.call(ze,"index")&&(jt.index=ze.index,jt.input=ze.input),jt}(a),!fe)return Tr(a,ne)}else{var Ge=lr(a),rt=Ge==X||Ge==$;if(wr(a))return Dl(a,fe);if(Ge==me||Ge==J||rt&&!N){if(ne=_e||rt?{}:qo(a),!fe)return _e?function(ze,Xe){return lo(ze,As(ze),Xe)}(a,function(ze,Xe){return ze&&lo(Xe,hr(Xe),ze)}(ne,a)):function(ze,Xe){return lo(ze,Jn(ze),Xe)}(a,Nc(ne,a))}else{if(!un[Ge])return N?a:{};ne=function(ze,Xe,jt){var it=ze.constructor;switch(Xe){case Ue:return Kc(ze);case Y:case z:return new it(+ze);case nt:return function(Rt,$t){var bt=$t?Kc(Rt.buffer):Rt.buffer;return new Rt.constructor(bt,Rt.byteOffset,Rt.byteLength)}(ze,jt);case Ot:case We:case Ze:case gt:case se:case ae:case he:case Te:case He:return Nl(ze,jt);case ue:return new it;case xe:case ye:return new it(ze);case Be:return function(Rt){var $t=new Rt.constructor(Rt.source,Gt.exec(Rt));return $t.lastIndex=Rt.lastIndex,$t}(ze);case Se:return new it;case je:return ce=ze,or?w(or.call(ce)):{}}var ce}(a,Ge,fe)}}U||(U=new Jr);var dt=U.get(a);if(dt)return dt;U.set(a,ne),ip(a)?a.forEach(function(ze){ne.add(Gr(ze,f,b,ze,a,U))}):Of(a)&&a.forEach(function(ze,Xe){ne.set(Xe,Gr(ze,f,b,Xe,a,U))});var xt=De?g:(Ie?_e?Jc:Zc:_e?hr:Tn)(a);return vr(xt||a,function(ze,Xe){xt&&(ze=a[Xe=ze]),mu(ne,Xe,Gr(ze,f,b,Xe,a,U))}),ne}function Cc(a,f,b){var j=b.length;if(a==null)return!j;for(a=w(a);j--;){var N=b[j],U=f[N],ne=a[N];if(ne===g&&!(N in a)||!U(ne))return!1}return!0}function Rc(a,f,b){if(typeof a!="function")throw new K(E);return Eu(function(){a.apply(g,b)},f)}function Ho(a,f,b,j){var N=-1,U=zr,ne=!0,fe=a.length,_e=[],Ie=f.length;if(!fe)return _e;b&&(f=en(f,En(b))),j?(U=ia,ne=!1):f.length>=200&&(U=Ao,ne=!1,f=new pi(f));e:for(;++N<fe;){var De=a[N],Ge=b==null?De:b(De);if(De=j||De!==0?De:0,ne&&Ge==Ge){for(var rt=Ie;rt--;)if(f[rt]===Ge)continue e;_e.push(De)}else U(f,Ge,j)||_e.push(De)}return _e}B.templateSettings={escape:le,evaluate:ut,interpolate:It,variable:"",imports:{_:B}},B.prototype=da.prototype,B.prototype.constructor=B,Zr.prototype=vu(da.prototype),Zr.prototype.constructor=Zr,Qt.prototype=vu(da.prototype),Qt.prototype.constructor=Qt,zi.prototype.clear=function(){this.__data__=pa?pa(null):{},this.size=0},zi.prototype.delete=function(a){var f=this.has(a)&&delete this.__data__[a];return this.size-=f?1:0,f},zi.prototype.get=function(a){var f=this.__data__;if(pa){var b=f[a];return b===M?g:b}return et.call(f,a)?f[a]:g},zi.prototype.has=function(a){var f=this.__data__;return pa?f[a]!==g:et.call(f,a)},zi.prototype.set=function(a,f){var b=this.__data__;return this.size+=this.has(a)?0:1,b[a]=pa&&f===g?M:f,this},yn.prototype.clear=function(){this.__data__=[],this.size=0},yn.prototype.delete=function(a){var f=this.__data__,b=ha(f,a);return!(b<0)&&(b==f.length-1?f.pop():Ii.call(f,b,1),--this.size,!0)},yn.prototype.get=function(a){var f=this.__data__,b=ha(f,a);return b<0?g:f[b][1]},yn.prototype.has=function(a){return ha(this.__data__,a)>-1},yn.prototype.set=function(a,f){var b=this.__data__,j=ha(b,a);return j<0?(++this.size,b.push([a,f])):b[j][1]=f,this},To.prototype.clear=function(){this.size=0,this.__data__={hash:new zi,map:new(hu||yn),string:new zi}},To.prototype.delete=function(a){var f=Ps(this,a).delete(a);return this.size-=f?1:0,f},To.prototype.get=function(a){return Ps(this,a).get(a)},To.prototype.has=function(a){return Ps(this,a).has(a)},To.prototype.set=function(a,f){var b=Ps(this,a),j=b.size;return b.set(a,f),this.size+=b.size==j?0:1,this},pi.prototype.add=pi.prototype.push=function(a){return this.__data__.set(a,M),this},pi.prototype.has=function(a){return this.__data__.has(a)},Jr.prototype.clear=function(){this.__data__=new yn,this.size=0},Jr.prototype.delete=function(a){var f=this.__data__,b=f.delete(a);return this.size=f.size,b},Jr.prototype.get=function(a){return this.__data__.get(a)},Jr.prototype.has=function(a){return this.__data__.has(a)},Jr.prototype.set=function(a,f){var b=this.__data__;if(b instanceof yn){var j=b.__data__;if(!hu||j.length<199)return j.push([a,f]),this.size=++b.size,this;b=this.__data__=new To(j)}return b.set(a,f),this.size=b.size,this};var On=Il(pt),bl=Il(mn,!0);function _l(a,f){var b=!0;return On(a,function(j,N,U){return b=!!f(j,N,U)}),b}function In(a,f,b){for(var j=-1,N=a.length;++j<N;){var U=a[j],ne=f(U);if(ne!=null&&(fe===g?ne==ne&&!xr(ne):b(ne,fe)))var fe=ne,_e=U}return _e}function cn(a,f){var b=[];return On(a,function(j,N,U){f(j,N,U)&&b.push(j)}),b}function tr(a,f,b,j,N){var U=-1,ne=a.length;for(b||(b=Qd),N||(N=[]);++U<ne;){var fe=a[U];f>0&&b(fe)?f>1?tr(fe,f-1,b,j,N):Hn(N,fe):j||(N[N.length]=fe)}return N}var Yt=va(),Bn=va(!0);function pt(a,f){return a&&Yt(a,f,Tn)}function mn(a,f){return a&&Bn(a,f,Tn)}function ps(a,f){return ar(f,function(b){return to(a[b])})}function Yo(a,f){for(var b=0,j=(f=an(f,a)).length;a!=null&&b<j;)a=a[po(f[b++])];return b&&b==j?a:g}function Ic(a,f,b){var j=f(a);return Ft(a)?j:Hn(j,b(a))}function Sn(a){return a==null?a===g?"[object Undefined]":"[object Null]":Xo&&Xo in w(a)?function(f){var b=et.call(f,Xo),j=f[Xo];try{f[Xo]=g;var N=!0}catch(ne){}var U=tn.call(f);return N&&(b?f[Xo]=j:delete f[Xo]),U}(a):function(f){return tn.call(f)}(a)}function Mn(a,f){return a>f}function Ol(a,f){return a!=null&&et.call(a,f)}function wl(a,f){return a!=null&&f in w(a)}function ds(a,f,b){for(var j=b?ia:zr,N=a[0].length,U=a.length,ne=U,fe=Qe(U),_e=1/0,Ie=[];ne--;){var De=a[ne];ne&&f&&(De=en(De,En(f))),_e=fr(De.length,_e),fe[ne]=!b&&(f||N>=120&&De.length>=120)?new pi(ne&&De):g}De=a[0];var Ge=-1,rt=fe[0];e:for(;++Ge<N&&Ie.length<_e;){var dt=De[Ge],xt=f?f(dt):dt;if(dt=b||dt!==0?dt:0,!(rt?Ao(rt,xt):j(Ie,xt,b))){for(ne=U;--ne;){var ze=fe[ne];if(!(ze?Ao(ze,xt):j(a[ne],xt,b)))continue e}rt&&rt.push(xt),Ie.push(dt)}}return Ie}function bu(a,f,b){var j=(a=of(a,f=an(f,a)))==null?a:a[po(jn(f))];return j==null?g:gn(j,a,b)}function Lc(a){return kn(a)&&Sn(a)==J}function _u(a,f,b,j,N){return a===f||(a==null||f==null||!kn(a)&&!kn(f)?a!=a&&f!=f:function(U,ne,fe,_e,Ie,De){var Ge=Ft(U),rt=Ft(ne),dt=Ge?Z:lr(U),xt=rt?Z:lr(ne),ze=(dt=dt==J?me:dt)==me,Xe=(xt=xt==J?me:xt)==me,jt=dt==xt;if(jt&&wr(U)){if(!wr(ne))return!1;Ge=!0,ze=!1}if(jt&&!ze)return De||(De=new Jr),Ge||Zo(U)?js(U,ne,fe,_e,Ie,De):function(bt,Mt,Wn,Cr,go,Vn,Co){switch(Wn){case nt:if(bt.byteLength!=Mt.byteLength||bt.byteOffset!=Mt.byteOffset)return!1;bt=bt.buffer,Mt=Mt.buffer;case Ue:return!(bt.byteLength!=Mt.byteLength||!Vn(new Ri(bt),new Ri(Mt)));case Y:case z:case xe:return yo(+bt,+Mt);case G:return bt.name==Mt.name&&bt.message==Mt.message;case Be:case ye:return bt==Mt+"";case ue:var ei=sr;case Se:var Nu=1&Cr;if(ei||(ei=Fo),bt.size!=Mt.size&&!Nu)return!1;var La=Co.get(bt);if(La)return La==Mt;Cr|=2,Co.set(bt,Mt);var Ro=js(ei(bt),ei(Mt),Cr,go,Vn,Co);return Co.delete(bt),Ro;case je:if(or)return or.call(bt)==or.call(Mt)}return!1}(U,ne,dt,fe,_e,Ie,De);if(!(1&fe)){var it=ze&&et.call(U,"__wrapped__"),ce=Xe&&et.call(ne,"__wrapped__");if(it||ce){var Rt=it?U.value():U,$t=ce?ne.value():ne;return De||(De=new Jr),Ie(Rt,$t,fe,_e,De)}}return jt?(De||(De=new Jr),function(bt,Mt,Wn,Cr,go,Vn){var Co=1&Wn,ei=Zc(bt),Nu=ei.length,La=Zc(Mt).length;if(Nu!=La&&!Co)return!1;for(var Ro=Nu;Ro--;){var Oi=ei[Ro];if(!(Co?Oi in Mt:et.call(Mt,Oi)))return!1}var Ff=Vn.get(bt),Cu=Vn.get(Mt);if(Ff&&Cu)return Ff==Mt&&Cu==bt;var za=!0;Vn.set(bt,Mt),Vn.set(Mt,bt);for(var Uf=Co;++Ro<Nu;){var Ba=bt[Oi=ei[Ro]],Hi=Mt[Oi];if(Cr)var Yi=Co?Cr(Hi,Ba,Oi,Mt,bt,Vn):Cr(Ba,Hi,Oi,bt,Mt,Vn);if(!(Yi===g?Ba===Hi||go(Ba,Hi,Wn,Cr,Vn):Yi)){za=!1;break}Uf||(Uf=Oi=="constructor")}if(za&&!Uf){var ti=bt.constructor,Fa=Mt.constructor;ti==Fa||!("constructor"in bt)||!("constructor"in Mt)||typeof ti=="function"&&ti instanceof ti&&typeof Fa=="function"&&Fa instanceof Fa||(za=!1)}return Vn.delete(bt),Vn.delete(Mt),za}(U,ne,fe,_e,Ie,De)):!1}(a,f,b,j,_u,N))}function hs(a,f,b,j){var N=b.length,U=N,ne=!j;if(a==null)return!U;for(a=w(a);N--;){var fe=b[N];if(ne&&fe[2]?fe[1]!==a[fe[0]]:!(fe[0]in a))return!1}for(;++N<U;){var _e=(fe=b[N])[0],Ie=a[_e],De=fe[1];if(ne&&fe[2]){if(Ie===g&&!(_e in a))return!1}else{var Ge=new Jr;if(j)var rt=j(Ie,De,_e,a,f,Ge);if(!(rt===g?_u(De,Ie,3,j,Ge):rt))return!1}}return!0}function Ou(a){return!(!Pn(a)||(f=a,Bt&&Bt in f))&&(to(a)?Or:Cn).test(gi(a));var f}function zc(a){return typeof a=="function"?a:a==null?Er:typeof a=="object"?Ft(a)?El(a[0],a[1]):xl(a):Ks(a)}function Wo(a){if(!ke(a))return pl(a);var f=[];for(var b in w(a))et.call(a,b)&&b!="constructor"&&f.push(b);return f}function Wd(a){if(!Pn(a))return function(N){var U=[];if(N!=null)for(var ne in w(N))U.push(ne);return U}(a);var f=ke(a),b=[];for(var j in a)(j!="constructor"||!f&&et.call(a,j))&&b.push(j);return b}function Vo(a,f){return a<f}function Qr(a,f){var b=-1,j=Nr(a)?Qe(a.length):[];return On(a,function(N,U,ne){j[++b]=f(N,U,ne)}),j}function xl(a){var f=ef(a);return f.length==1&&f[0][2]?nf(f[0][0],f[0][1]):function(b){return b===a||hs(b,a,f)}}function El(a,f){return ks(a)&&tf(f)?nf(po(a),f):function(b){var j=Tu(b,a);return j===g&&j===f?Ys(b,a):_u(f,j,3)}}function ys(a,f,b,j,N){a!==f&&Yt(f,function(U,ne){if(N||(N=new Jr),Pn(U))(function(_e,Ie,De,Ge,rt,dt,xt){var ze=Ds(_e,De),Xe=Ds(Ie,De),jt=xt.get(Xe);if(jt)return void fs(_e,De,jt);var it=dt?dt(ze,Xe,De+"",_e,Ie,xt):g,ce=it===g;if(ce){var Rt=Ft(Xe),$t=!Rt&&wr(Xe),bt=!Rt&&!$t&&Zo(Xe);it=Xe,Rt||$t||bt?Ft(ze)?it=ze:wn(ze)?it=Tr(ze):$t?(ce=!1,it=Dl(Xe,!0)):bt?(ce=!1,it=Nl(Xe,!0)):it=[]:Mu(Xe)||Gi(Xe)?(it=ze,Gi(ze)?it=Ef(ze):Pn(ze)&&!to(ze)||(it=qo(Xe))):ce=!1}ce&&(xt.set(Xe,it),rt(it,Xe,Ge,dt,xt),xt.delete(Xe)),fs(_e,De,it)})(a,f,ne,b,ys,j,N);else{var fe=j?j(Ds(a,ne),U,ne+"",a,f,N):g;fe===g&&(fe=U),fs(a,ne,fe)}},hr)}function Sl(a,f){var b=a.length;if(b)return Hr(f+=f<0?b:0,b)?a[f]:g}function jl(a,f,b){f=f.length?en(f,function(U){return Ft(U)?function(ne){return Yo(ne,U.length===1?U[0]:U)}:U}):[Er];var j=-1;f=en(f,En(At()));var N=Qr(a,function(U,ne,fe){var _e=en(f,function(Ie){return Ie(U)});return{criteria:_e,index:++j,value:U}});return function(U,ne){var fe=U.length;for(U.sort(ne);fe--;)U[fe]=U[fe].value;return U}(N,function(U,ne){return function(fe,_e,Ie){for(var De=-1,Ge=fe.criteria,rt=_e.criteria,dt=Ge.length,xt=Ie.length;++De<dt;){var ze=$c(Ge[De],rt[De]);if(ze)return De>=xt?ze:ze*(Ie[De]=="desc"?-1:1)}return fe.index-_e.index}(U,ne,b)})}function Pl(a,f,b){for(var j=-1,N=f.length,U={};++j<N;){var ne=f[j],fe=Yo(a,ne);b(fe,ne)&&ya(U,an(ne,a),fe)}return U}function gs(a,f,b,j){var N=j?mr:fi,U=-1,ne=f.length,fe=a;for(a===f&&(f=Tr(f)),b&&(fe=en(a,En(b)));++U<ne;)for(var _e=0,Ie=f[U],De=b?b(Ie):Ie;(_e=N(fe,De,_e,j))>-1;)fe!==a&&Ii.call(fe,_e,1),Ii.call(a,_e,1);return a}function Bc(a,f){for(var b=a?f.length:0,j=b-1;b--;){var N=f[b];if(b==j||N!==U){var U=N;Hr(N)?Ii.call(a,N,1):ms(a,N)}}return a}function Fc(a,f){return a+pu(as()*(f-a+1))}function vs(a,f){var b="";if(!a||f<1||f>V)return b;do f%2&&(b+=a),(f=pu(f/2))&&(a+=a);while(f);return b}function Vt(a,f){return Ns(rf(a,f,Er),a+"")}function Vd(a){return Dc(_i(a))}function Uc(a,f){var b=_i(a);return wa(b,di(f,0,b.length))}function ya(a,f,b,j){if(!Pn(a))return a;for(var N=-1,U=(f=an(f,a)).length,ne=U-1,fe=a;fe!=null&&++N<U;){var _e=po(f[N]),Ie=b;if(_e==="__proto__"||_e==="constructor"||_e==="prototype")return a;if(N!=ne){var De=fe[_e];(Ie=j?j(De,_e,fe):g)===g&&(Ie=Pn(De)?De:Hr(f[N+1])?[]:{})}mu(fe,_e,Ie),fe=fe[_e]}return a}var Al=ss?function(a,f){return ss.set(a,f),a}:Er,Kd=lu?function(a,f){return lu(a,"toString",{configurable:!0,enumerable:!1,value:ka(f),writable:!0})}:Er;function Ml(a){return wa(_i(a))}function Xr(a,f,b){var j=-1,N=a.length;f<0&&(f=-f>N?0:N+f),(b=b>N?N:b)<0&&(b+=N),N=f>b?0:b-f>>>0,f>>>=0;for(var U=Qe(N);++j<N;)U[j]=a[j+f];return U}function $d(a,f){var b;return On(a,function(j,N,U){return!(b=f(j,N,U))}),!!b}function ga(a,f,b){var j=0,N=a==null?j:a.length;if(typeof f=="number"&&f==f&&N<=2147483647){for(;j<N;){var U=j+N>>>1,ne=a[U];ne!==null&&!xr(ne)&&(b?ne<=f:ne<f)?j=U+1:N=U}return N}return Gc(a,f,Er,b)}function Gc(a,f,b,j){var N=0,U=a==null?0:a.length;if(U===0)return 0;for(var ne=(f=b(f))!=f,fe=f===null,_e=xr(f),Ie=f===g;N<U;){var De=pu((N+U)/2),Ge=b(a[De]),rt=Ge!==g,dt=Ge===null,xt=Ge==Ge,ze=xr(Ge);if(ne)var Xe=j||xt;else Xe=Ie?xt&&(j||rt):fe?xt&&rt&&(j||!dt):_e?xt&&rt&&!dt&&(j||!ze):!dt&&!ze&&(j?Ge<=f:Ge<f);Xe?N=De+1:U=De}return fr(U,4294967294)}function Xc(a,f){for(var b=-1,j=a.length,N=0,U=[];++b<j;){var ne=a[b],fe=f?f(ne):ne;if(!b||!yo(fe,_e)){var _e=fe;U[N++]=ne===0?0:ne}}return U}function kl(a){return typeof a=="number"?a:xr(a)?te:+a}function kr(a){if(typeof a=="string")return a;if(Ft(a))return en(a,kr)+"";if(xr(a))return yl?yl.call(a):"";var f=a+"";return f=="0"&&1/a==-1/0?"-0":f}function hi(a,f,b){var j=-1,N=zr,U=a.length,ne=!0,fe=[],_e=fe;if(b)ne=!1,N=ia;else if(U>=200){var Ie=f?null:Zd(a);if(Ie)return Fo(Ie);ne=!1,N=Ao,_e=new pi}else _e=f?[]:fe;e:for(;++j<U;){var De=a[j],Ge=f?f(De):De;if(De=b||De!==0?De:0,ne&&Ge==Ge){for(var rt=_e.length;rt--;)if(_e[rt]===Ge)continue e;f&&_e.push(Ge),fe.push(De)}else N(_e,Ge,b)||(_e!==fe&&_e.push(Ge),fe.push(De))}return fe}function ms(a,f){return(a=of(a,f=an(f,a)))==null||delete a[po(jn(f))]}function Tl(a,f,b,j){return ya(a,f,b(Yo(a,f)),j)}function bs(a,f,b,j){for(var N=a.length,U=j?N:-1;(j?U--:++U<N)&&f(a[U],U,a););return b?Xr(a,j?0:U,j?U+1:N):Xr(a,j?U+1:0,j?N:U)}function Hc(a,f){var b=a;return b instanceof Qt&&(b=b.value()),iu(f,function(j,N){return N.func.apply(N.thisArg,Hn([j],N.args))},b)}function Yc(a,f,b){var j=a.length;if(j<2)return j?hi(a[0]):[];for(var N=-1,U=Qe(j);++N<j;)for(var ne=a[N],fe=-1;++fe<j;)fe!=N&&(U[N]=Ho(U[N]||ne,a[fe],f,b));return hi(tr(U,1),f,b)}function Wc(a,f,b){for(var j=-1,N=a.length,U=f.length,ne={};++j<N;){var fe=j<U?f[j]:g;b(ne,a[j],fe)}return ne}function _s(a){return wn(a)?a:[]}function Vc(a){return typeof a=="function"?a:Er}function an(a,f){return Ft(a)?a:ks(a,f)?[a]:cf(nn(a))}var qd=Vt;function ln(a,f,b){var j=a.length;return b=b===g?j:b,!f&&b>=j?a:Xr(a,f,b)}var Os=Bd||function(a){return An.clearTimeout(a)};function Dl(a,f){if(f)return a.slice();var b=a.length,j=la?la(b):new a.constructor(b);return a.copy(j),j}function Kc(a){var f=new a.constructor(a.byteLength);return new Ri(f).set(new Ri(a)),f}function Nl(a,f){var b=f?Kc(a.buffer):a.buffer;return new a.constructor(b,a.byteOffset,a.length)}function $c(a,f){if(a!==f){var b=a!==g,j=a===null,N=a==a,U=xr(a),ne=f!==g,fe=f===null,_e=f==f,Ie=xr(f);if(!fe&&!Ie&&!U&&a>f||U&&ne&&_e&&!fe&&!Ie||j&&ne&&_e||!b&&_e||!N)return 1;if(!j&&!U&&!Ie&&a<f||Ie&&b&&N&&!j&&!U||fe&&b&&N||!ne&&N||!_e)return-1}return 0}function Cl(a,f,b,j){for(var N=-1,U=a.length,ne=b.length,fe=-1,_e=f.length,Ie=Zn(U-ne,0),De=Qe(_e+Ie),Ge=!j;++fe<_e;)De[fe]=f[fe];for(;++N<ne;)(Ge||N<U)&&(De[b[N]]=a[N]);for(;Ie--;)De[fe++]=a[N++];return De}function Rl(a,f,b,j){for(var N=-1,U=a.length,ne=-1,fe=b.length,_e=-1,Ie=f.length,De=Zn(U-fe,0),Ge=Qe(De+Ie),rt=!j;++N<De;)Ge[N]=a[N];for(var dt=N;++_e<Ie;)Ge[dt+_e]=f[_e];for(;++ne<fe;)(rt||N<U)&&(Ge[dt+b[ne]]=a[N++]);return Ge}function Tr(a,f){var b=-1,j=a.length;for(f||(f=Qe(j));++b<j;)f[b]=a[b];return f}function lo(a,f,b,j){var N=!b;b||(b={});for(var U=-1,ne=f.length;++U<ne;){var fe=f[U],_e=j?j(b[fe],a[fe],fe,b,a):g;_e===g&&(_e=a[fe]),N?Do(b,fe,_e):mu(b,fe,_e)}return b}function ws(a,f){return function(b,j){var N=Ft(b)?Sc:ml,U=f?f():{};return N(b,a,At(j,2),U)}}function wu(a){return Vt(function(f,b){var j=-1,N=b.length,U=N>1?b[N-1]:g,ne=N>2?b[2]:g;for(U=a.length>3&&typeof U=="function"?(N--,U):g,ne&&ir(b[0],b[1],ne)&&(U=N<3?g:U,N=1),f=w(f);++j<N;){var fe=b[j];fe&&a(f,fe,j,U)}return f})}function Il(a,f){return function(b,j){if(b==null)return b;if(!Nr(b))return a(b,j);for(var N=b.length,U=f?N:-1,ne=w(b);(f?U--:++U<N)&&j(ne[U],U,ne)!==!1;);return b}}function va(a){return function(f,b,j){for(var N=-1,U=w(f),ne=j(f),fe=ne.length;fe--;){var _e=ne[a?fe:++N];if(b(U[_e],_e,U)===!1)break}return f}}function Ll(a){return function(f){var b=so(f=nn(f))?Mr(f):g,j=b?b[0]:f.charAt(0),N=b?ln(b,1).join(""):f.slice(1);return j[a]()+N}}function Bi(a){return function(f){return iu(Aa(Jo(f).replace(Za,"")),a,"")}}function ma(a){return function(){var f=arguments;switch(f.length){case 0:return new a;case 1:return new a(f[0]);case 2:return new a(f[0],f[1]);case 3:return new a(f[0],f[1],f[2]);case 4:return new a(f[0],f[1],f[2],f[3]);case 5:return new a(f[0],f[1],f[2],f[3],f[4]);case 6:return new a(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new a(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var b=vu(a.prototype),j=a.apply(b,f);return Pn(j)?j:b}}function zl(a){return function(f,b,j){var N=w(f);if(!Nr(f)){var U=At(b,3);f=Tn(f),b=function(fe){return U(N[fe],fe,N)}}var ne=a(f,b,j);return ne>-1?N[U?f[ne]:ne]:g}}function yi(a){return $o(function(f){var b=f.length,j=b,N=Zr.prototype.thru;for(a&&f.reverse();j--;){var U=f[j];if(typeof U!="function")throw new K(E);if(N&&!ne&&xu(U)=="wrapper")var ne=new Zr([],!0)}for(j=ne?j:b;++j<b;){var fe=xu(U=f[j]),_e=fe=="wrapper"?Qc(U):g;ne=_e&&Ts(_e[0])&&_e[1]==424&&!_e[4].length&&_e[9]==1?ne[xu(_e[0])].apply(ne,_e[3]):U.length==1&&Ts(U)?ne[fe]():ne.thru(U)}return function(){var Ie=arguments,De=Ie[0];if(ne&&Ie.length==1&&Ft(De))return ne.plant(De).value();for(var Ge=0,rt=b?f[Ge].apply(this,Ie):De;++Ge<b;)rt=f[Ge].call(this,rt);return rt}})}function xs(a,f,b,j,N,U,ne,fe,_e,Ie){var De=f&C,Ge=1&f,rt=2&f,dt=24&f,xt=512&f,ze=rt?g:ma(a);return function Xe(){for(var jt=arguments.length,it=Qe(jt),ce=jt;ce--;)it[ce]=arguments[ce];if(dt)var Rt=Fi(Xe),$t=Pc(it,Rt);if(j&&(it=Cl(it,j,N,dt)),U&&(it=Rl(it,U,ne,dt)),jt-=$t,dt&&jt<Ie){var bt=Ar(it,Rt);return Fl(a,f,xs,Xe.placeholder,b,it,bt,fe,_e,Ie-jt)}var Mt=Ge?b:this,Wn=rt?Mt[a]:a;return jt=it.length,fe?it=Hl(it,fe):xt&&jt>1&&it.reverse(),De&&_e<jt&&(it.length=_e),this&&this!==An&&this instanceof Xe&&(Wn=ze||ma(Wn)),Wn.apply(Mt,it)}}function Es(a,f){return function(b,j){return function(N,U,ne,fe){return pt(N,function(_e,Ie,De){U(fe,ne(_e),Ie,De)}),fe}(b,a,f(j),{})}}function ba(a,f){return function(b,j){var N;if(b===g&&j===g)return f;if(b!==g&&(N=b),j!==g){if(N===g)return j;typeof b=="string"||typeof j=="string"?(b=kr(b),j=kr(j)):(b=kl(b),j=kl(j)),N=a(b,j)}return N}}function _a(a){return $o(function(f){return f=en(f,En(At())),Vt(function(b){var j=this;return a(f,function(N){return gn(N,j,b)})})})}function Oa(a,f){var b=(f=f===g?" ":kr(f)).length;if(b<2)return b?vs(f,a):f;var j=vs(f,os(a/co(f)));return so(f)?ln(Mr(j),0,a).join(""):j.slice(0,a)}function Bl(a){return function(f,b,j){return j&&typeof j!="number"&&ir(f,b,j)&&(b=j=g),f=No(f),b===g?(b=f,f=0):b=No(b),function(N,U,ne,fe){for(var _e=-1,Ie=Zn(os((U-N)/(ne||1)),0),De=Qe(Ie);Ie--;)De[fe?Ie:++_e]=N,N+=ne;return De}(f,b,j=j===g?f<b?1:-1:No(j),a)}}function Ss(a){return function(f,b){return typeof f=="string"&&typeof b=="string"||(f=dr(f),b=dr(b)),a(f,b)}}function Fl(a,f,b,j,N,U,ne,fe,_e,Ie){var De=8&f;f|=De?k:R,4&(f&=~(De?R:k))||(f&=-4);var Ge=[a,f,N,De?U:g,De?ne:g,De?g:U,De?g:ne,fe,_e,Ie],rt=b.apply(g,Ge);return Ts(a)&&uf(rt,Ge),rt.placeholder=j,af(rt,a,f)}function qc(a){var f=_[a];return function(b,j){if(b=dr(b),(j=j==null?0:fr(Ut(j),292))&&ll(b)){var N=(nn(b)+"e").split("e");return+((N=(nn(f(N[0]+"e"+(+N[1]+j)))+"e").split("e"))[0]+"e"+(+N[1]-j))}return f(b)}}var Zd=Li&&1/Fo(new Li([,-0]))[1]==W?function(a){return new Li(a)}:Da;function Ul(a){return function(f){var b=lr(f);return b==ue?sr(f):b==Se?cu(f):function(j,N){return en(N,function(U){return[U,j[U]]})}(f,a(f))}}function Ko(a,f,b,j,N,U,ne,fe){var _e=2&f;if(!_e&&typeof a!="function")throw new K(E);var Ie=j?j.length:0;if(Ie||(f&=-97,j=N=g),ne=ne===g?ne:Zn(Ut(ne),0),fe=fe===g?fe:Ut(fe),Ie-=N?N.length:0,f&R){var De=j,Ge=N;j=N=g}var rt=_e?g:Qc(a),dt=[a,f,b,j,N,De,Ge,U,ne,fe];if(rt&&function(ze,Xe){var jt=ze[1],it=Xe[1],ce=jt|it,Rt=ce<131,$t=it==C&&jt==8||it==C&&jt==F&&ze[7].length<=Xe[8]||it==384&&Xe[7].length<=Xe[8]&&jt==8;if(!Rt&&!$t)return ze;1&it&&(ze[2]=Xe[2],ce|=1&jt?0:4);var bt=Xe[3];if(bt){var Mt=ze[3];ze[3]=Mt?Cl(Mt,bt,Xe[4]):bt,ze[4]=Mt?Ar(ze[3],A):Xe[4]}(bt=Xe[5])&&(Mt=ze[5],ze[5]=Mt?Rl(Mt,bt,Xe[6]):bt,ze[6]=Mt?Ar(ze[5],A):Xe[6]),(bt=Xe[7])&&(ze[7]=bt),it&C&&(ze[8]=ze[8]==null?Xe[8]:fr(ze[8],Xe[8])),ze[9]==null&&(ze[9]=Xe[9]),ze[0]=Xe[0],ze[1]=ce}(dt,rt),a=dt[0],f=dt[1],b=dt[2],j=dt[3],N=dt[4],!(fe=dt[9]=dt[9]===g?_e?0:a.length:Zn(dt[9]-Ie,0))&&24&f&&(f&=-25),f&&f!=1)xt=f==8||f==T?function(ze,Xe,jt){var it=ma(ze);return function ce(){for(var Rt=arguments.length,$t=Qe(Rt),bt=Rt,Mt=Fi(ce);bt--;)$t[bt]=arguments[bt];var Wn=Rt<3&&$t[0]!==Mt&&$t[Rt-1]!==Mt?[]:Ar($t,Mt);return(Rt-=Wn.length)<jt?Fl(ze,Xe,xs,ce.placeholder,g,$t,Wn,g,g,jt-Rt):gn(this&&this!==An&&this instanceof ce?it:ze,this,$t)}}(a,f,fe):f!=k&&f!=33||N.length?xs.apply(g,dt):function(ze,Xe,jt,it){var ce=1&Xe,Rt=ma(ze);return function $t(){for(var bt=-1,Mt=arguments.length,Wn=-1,Cr=it.length,go=Qe(Cr+Mt),Vn=this&&this!==An&&this instanceof $t?Rt:ze;++Wn<Cr;)go[Wn]=it[Wn];for(;Mt--;)go[Wn++]=arguments[++bt];return gn(Vn,ce?jt:this,go)}}(a,f,b,j);else var xt=function(ze,Xe,jt){var it=1&Xe,ce=ma(ze);return function Rt(){return(this&&this!==An&&this instanceof Rt?ce:ze).apply(it?jt:this,arguments)}}(a,f,b);return af((rt?Al:uf)(xt,dt),a,f)}function Gl(a,f,b,j){return a===g||yo(a,Fe[b])&&!et.call(j,b)?f:a}function Xl(a,f,b,j,N,U){return Pn(a)&&Pn(f)&&(U.set(f,a),ys(a,f,g,Xl,U),U.delete(f)),a}function Jd(a){return Mu(a)?g:a}function js(a,f,b,j,N,U){var ne=1&b,fe=a.length,_e=f.length;if(fe!=_e&&!(ne&&_e>fe))return!1;var Ie=U.get(a),De=U.get(f);if(Ie&&De)return Ie==f&&De==a;var Ge=-1,rt=!0,dt=2&b?new pi:g;for(U.set(a,f),U.set(f,a);++Ge<fe;){var xt=a[Ge],ze=f[Ge];if(j)var Xe=ne?j(ze,xt,Ge,f,a,U):j(xt,ze,Ge,a,f,U);if(Xe!==g){if(Xe)continue;rt=!1;break}if(dt){if(!ua(f,function(jt,it){if(!Ao(dt,it)&&(xt===jt||N(xt,jt,b,j,U)))return dt.push(it)})){rt=!1;break}}else if(xt!==ze&&!N(xt,ze,b,j,U)){rt=!1;break}}return U.delete(a),U.delete(f),rt}function $o(a){return Ns(rf(a,g,xa),a+"")}function Zc(a){return Ic(a,Tn,Jn)}function Jc(a){return Ic(a,hr,As)}var Qc=ss?function(a){return ss.get(a)}:Da;function xu(a){for(var f=a.name+"",b=gu[f],j=et.call(gu,f)?b.length:0;j--;){var N=b[j],U=N.func;if(U==null||U==a)return N.name}return f}function Fi(a){return(et.call(B,"placeholder")?B:a).placeholder}function At(){var a=B.iteratee||Ta;return a=a===Ta?zc:a,arguments.length?a(arguments[0],arguments[1]):a}function Ps(a,f){var b,j,N=a.__data__;return((j=typeof(b=f))=="string"||j=="number"||j=="symbol"||j=="boolean"?b!=="__proto__":b===null)?N[typeof f=="string"?"string":"hash"]:N.map}function ef(a){for(var f=Tn(a),b=f.length;b--;){var j=f[b],N=a[j];f[b]=[j,N,tf(N)]}return f}function Ui(a,f){var b=function(j,N){return j==null?g:j[N]}(a,f);return Ou(b)?b:g}var Jn=Ac?function(a){return a==null?[]:(a=w(a),ar(Ac(a),function(f){return cr.call(a,f)}))}:Qo,As=Ac?function(a){for(var f=[];a;)Hn(f,Jn(a)),a=Uo(a);return f}:Qo,lr=Sn;function Ms(a,f,b){for(var j=-1,N=(f=an(f,a)).length,U=!1;++j<N;){var ne=po(f[j]);if(!(U=a!=null&&b(a,ne)))break;a=a[ne]}return U||++j!=N?U:!!(N=a==null?0:a.length)&&Xs(N)&&Hr(ne,N)&&(Ft(a)||Gi(a))}function qo(a){return typeof a.constructor!="function"||ke(a)?{}:vu(Uo(a))}function Qd(a){return Ft(a)||Gi(a)||!!(li&&a&&a[li])}function Hr(a,f){var b=typeof a;return!!(f=f==null?V:f)&&(b=="number"||b!="symbol"&&at.test(a))&&a>-1&&a%1==0&&a<f}function ir(a,f,b){if(!Pn(b))return!1;var j=typeof f;return!!(j=="number"?Nr(b)&&Hr(f,b.length):j=="string"&&f in b)&&yo(b[f],a)}function ks(a,f){if(Ft(a))return!1;var b=typeof a;return!(b!="number"&&b!="symbol"&&b!="boolean"&&a!=null&&!xr(a))||Lt.test(a)||!on.test(a)||f!=null&&a in w(f)}function Ts(a){var f=xu(a),b=B[f];if(typeof b!="function"||!(f in Qt.prototype))return!1;if(a===b)return!0;var j=Qc(b);return!!j&&a===j[0]}(du&&lr(new du(new ArrayBuffer(1)))!=nt||hu&&lr(new hu)!=ue||kc&&lr(kc.resolve())!=Pe||Li&&lr(new Li)!=Se||yu&&lr(new yu)!=Ae)&&(lr=function(a){var f=Sn(a),b=f==me?a.constructor:g,j=b?gi(b):"";if(j)switch(j){case Xd:return nt;case dl:return ue;case Hd:return Pe;case Yd:return Se;case hl:return Ae}return f});var eh=st?to:Na;function ke(a){var f=a&&a.constructor;return a===(typeof f=="function"&&f.prototype||Fe)}function tf(a){return a==a&&!Pn(a)}function nf(a,f){return function(b){return b!=null&&b[a]===f&&(f!==g||a in w(b))}}function rf(a,f,b){return f=Zn(f===g?a.length-1:f,0),function(){for(var j=arguments,N=-1,U=Zn(j.length-f,0),ne=Qe(U);++N<U;)ne[N]=j[f+N];N=-1;for(var fe=Qe(f+1);++N<f;)fe[N]=j[N];return fe[f]=b(ne),gn(a,this,fe)}}function of(a,f){return f.length<2?a:Yo(a,Xr(f,0,-1))}function Hl(a,f){for(var b=a.length,j=fr(f.length,b),N=Tr(a);j--;){var U=f[j];a[j]=Hr(U,b)?N[U]:g}return a}function Ds(a,f){if((f!=="constructor"||typeof a[f]!="function")&&f!="__proto__")return a[f]}var uf=sf(Al),Eu=fl||function(a,f){return An.setTimeout(a,f)},Ns=sf(Kd);function af(a,f,b){var j=f+"";return Ns(a,function(N,U){var ne=U.length;if(!ne)return N;var fe=ne-1;return U[fe]=(ne>1?"& ":"")+U[fe],U=U.join(ne>2?", ":" "),N.replace(Q,`{
  32. /* [wrapped with `+U+`] */
  33. `)}(j,function(N,U){return vr(re,function(ne){var fe="_."+ne[0];U&ne[1]&&!zr(N,fe)&&N.push(fe)}),N.sort()}(function(N){var U=N.match(de);return U?U[1].split(oe):[]}(j),b)))}function sf(a){var f=0,b=0;return function(){var j=is(),N=16-(j-b);if(b=j,N>0){if(++f>=800)return arguments[0]}else f=0;return a.apply(g,arguments)}}function wa(a,f){var b=-1,j=a.length,N=j-1;for(f=f===g?j:f;++b<f;){var U=Fc(b,N),ne=a[U];a[U]=a[b],a[b]=ne}return a.length=f,a}var cf=function(a){var f=Pu(a,function(j){return b.size===500&&b.clear(),j}),b=f.cache;return f}(function(a){var f=[];return a.charCodeAt(0)===46&&f.push(""),a.replace(qt,function(b,j,N,U){f.push(N?U.replace(Ke,"$1"):j||b)}),f});function po(a){if(typeof a=="string"||xr(a))return a;var f=a+"";return f=="0"&&1/a==-1/0?"-0":f}function gi(a){if(a!=null){try{return Ht.call(a)}catch(f){}try{return a+""}catch(f){}}return""}function ff(a){if(a instanceof Qt)return a.clone();var f=new Zr(a.__wrapped__,a.__chain__);return f.__actions__=Tr(a.__actions__),f.__index__=a.__index__,f.__values__=a.__values__,f}var Yl=Vt(function(a,f){return wn(a)?Ho(a,tr(f,1,wn,!0)):[]}),Wl=Vt(function(a,f){var b=jn(f);return wn(b)&&(b=g),wn(a)?Ho(a,tr(f,1,wn,!0),At(b,2)):[]}),Vl=Vt(function(a,f){var b=jn(f);return wn(b)&&(b=g),wn(a)?Ho(a,tr(f,1,wn,!0),g,b):[]});function lf(a,f,b){var j=a==null?0:a.length;if(!j)return-1;var N=b==null?0:Ut(b);return N<0&&(N=Zn(j+N,0)),jo(a,At(f,3),N)}function Cs(a,f,b){var j=a==null?0:a.length;if(!j)return-1;var N=j-1;return b!==g&&(N=Ut(b),N=b<0?Zn(j+N,0):fr(N,j-1)),jo(a,At(f,3),N,!0)}function xa(a){return a!=null&&a.length?tr(a,1):[]}function Kl(a){return a&&a.length?a[0]:g}var ho=Vt(function(a){var f=en(a,_s);return f.length&&f[0]===a[0]?ds(f):[]}),vi=Vt(function(a){var f=jn(a),b=en(a,_s);return f===jn(b)?f=g:b.pop(),b.length&&b[0]===a[0]?ds(b,At(f,2)):[]}),th=Vt(function(a){var f=jn(a),b=en(a,_s);return(f=typeof f=="function"?f:g)&&b.pop(),b.length&&b[0]===a[0]?ds(b,g,f):[]});function jn(a){var f=a==null?0:a.length;return f?a[f-1]:g}var $l=Vt(Rs);function Rs(a,f){return a&&a.length&&f&&f.length?gs(a,f):a}var ql=$o(function(a,f){var b=a==null?0:a.length,j=ls(a,f);return Bc(a,en(f,function(N){return Hr(N,b)?+N:N}).sort($c)),j});function Is(a){return a==null?a:Gd.call(a)}var Zl=Vt(function(a){return hi(tr(a,1,wn,!0))}),Jl=Vt(function(a){var f=jn(a);return wn(f)&&(f=g),hi(tr(a,1,wn,!0),At(f,2))}),Ql=Vt(function(a){var f=jn(a);return f=typeof f=="function"?f:g,hi(tr(a,1,wn,!0),g,f)});function Ea(a){if(!a||!a.length)return[];var f=0;return a=ar(a,function(b){if(wn(b))return f=Zn(b.length,f),!0}),Ni(f,function(b){return en(a,br(b))})}function Su(a,f){if(!a||!a.length)return[];var b=Ea(a);return f==null?b:en(b,function(j){return gn(f,g,j)})}var pr=Vt(function(a,f){return wn(a)?Ho(a,f):[]}),nh=Vt(function(a){return Yc(ar(a,wn))}),rh=Vt(function(a){var f=jn(a);return wn(f)&&(f=g),Yc(ar(a,wn),At(f,2))}),pf=Vt(function(a){var f=jn(a);return f=typeof f=="function"?f:g,Yc(ar(a,wn),g,f)}),ep=Vt(Ea),Dr=Vt(function(a){var f=a.length,b=f>1?a[f-1]:g;return b=typeof b=="function"?(a.pop(),b):g,Su(a,b)});function Fn(a){var f=B(a);return f.__chain__=!0,f}function Ls(a,f){return f(a)}var eo=$o(function(a){var f=a.length,b=f?a[0]:0,j=this.__wrapped__,N=function(U){return ls(U,a)};return!(f>1||this.__actions__.length)&&j instanceof Qt&&Hr(b)?((j=j.slice(b,+b+(f?1:0))).__actions__.push({func:Ls,args:[N],thisArg:g}),new Zr(j,this.__chain__).thru(function(U){return f&&!U.length&&U.push(g),U})):this.thru(N)}),Pt=ws(function(a,f,b){et.call(a,b)?++a[b]:Do(a,b,1)}),df=zl(lf),hf=zl(Cs);function zs(a,f){return(Ft(a)?vr:On)(a,At(f,3))}function yf(a,f){return(Ft(a)?jc:bl)(a,At(f,3))}var tp=ws(function(a,f,b){et.call(a,b)?a[b].push(f):Do(a,b,[f])}),oh=Vt(function(a,f,b){var j=-1,N=typeof f=="function",U=Nr(a)?Qe(a.length):[];return On(a,function(ne){U[++j]=N?gn(f,ne,b):bu(ne,f,b)}),U}),ih=ws(function(a,f,b){Do(a,b,f)});function ju(a,f){return(Ft(a)?en:Qr)(a,At(f,3))}var uh=ws(function(a,f,b){a[b?0:1].push(f)},function(){return[[],[]]}),gf=Vt(function(a,f){if(a==null)return[];var b=f.length;return b>1&&ir(a,f[0],f[1])?f=[]:b>2&&ir(f[0],f[1],f[2])&&(f=[f[0]]),jl(a,tr(f,1),[])}),Bs=Fd||function(){return An.Date.now()};function np(a,f,b){return f=b?g:f,f=a&&f==null?a.length:f,Ko(a,C,g,g,g,g,f)}function vf(a,f){var b;if(typeof f!="function")throw new K(E);return a=Ut(a),function(){return--a>0&&(b=f.apply(this,arguments)),a<=1&&(f=g),b}}var mi=Vt(function(a,f,b){var j=1;if(b.length){var N=Ar(b,Fi(mi));j|=k}return Ko(a,j,f,b,N)}),mf=Vt(function(a,f,b){var j=3;if(b.length){var N=Ar(b,Fi(mf));j|=k}return Ko(f,j,a,b,N)});function Ct(a,f,b){var j,N,U,ne,fe,_e,Ie=0,De=!1,Ge=!1,rt=!0;if(typeof a!="function")throw new K(E);function dt(ce){var Rt=j,$t=N;return j=N=g,Ie=ce,ne=a.apply($t,Rt)}function xt(ce){return Ie=ce,fe=Eu(Xe,f),De?dt(ce):ne}function ze(ce){var Rt=ce-_e;return _e===g||Rt>=f||Rt<0||Ge&&ce-Ie>=U}function Xe(){var ce=Bs();if(ze(ce))return jt(ce);fe=Eu(Xe,function(Rt){var $t=f-(Rt-_e);return Ge?fr($t,U-(Rt-Ie)):$t}(ce))}function jt(ce){return fe=g,rt&&j?dt(ce):(j=N=g,ne)}function it(){var ce=Bs(),Rt=ze(ce);if(j=arguments,N=this,_e=ce,Rt){if(fe===g)return xt(_e);if(Ge)return Os(fe),fe=Eu(Xe,f),dt(_e)}return fe===g&&(fe=Eu(Xe,f)),ne}return f=dr(f)||0,Pn(b)&&(De=!!b.leading,U=(Ge="maxWait"in b)?Zn(dr(b.maxWait)||0,f):U,rt="trailing"in b?!!b.trailing:rt),it.cancel=function(){fe!==g&&Os(fe),Ie=0,j=_e=N=fe=g},it.flush=function(){return fe===g?ne:jt(Bs())},it}var rp=Vt(function(a,f){return Rc(a,1,f)}),Fs=Vt(function(a,f,b){return Rc(a,dr(f)||0,b)});function Pu(a,f){if(typeof a!="function"||f!=null&&typeof f!="function")throw new K(E);var b=function(){var j=arguments,N=f?f.apply(this,j):j[0],U=b.cache;if(U.has(N))return U.get(N);var ne=a.apply(this,j);return b.cache=U.set(N,ne)||U,ne};return b.cache=new(Pu.Cache||To),b}function Us(a){if(typeof a!="function")throw new K(E);return function(){var f=arguments;switch(f.length){case 0:return!a.call(this);case 1:return!a.call(this,f[0]);case 2:return!a.call(this,f[0],f[1]);case 3:return!a.call(this,f[0],f[1],f[2])}return!a.apply(this,f)}}Pu.Cache=To;var op=qd(function(a,f){var b=(f=f.length==1&&Ft(f[0])?en(f[0],En(At())):en(tr(f,1),En(At()))).length;return Vt(function(j){for(var N=-1,U=fr(j.length,b);++N<U;)j[N]=f[N].call(this,j[N]);return gn(a,this,j)})}),Gs=Vt(function(a,f){var b=Ar(f,Fi(Gs));return Ko(a,k,g,f,b)}),bf=Vt(function(a,f){var b=Ar(f,Fi(bf));return Ko(a,R,g,f,b)}),ah=$o(function(a,f){return Ko(a,F,g,g,g,f)});function yo(a,f){return a===f||a!=a&&f!=f}var sh=Ss(Mn),Sa=Ss(function(a,f){return a>=f}),Gi=Lc(function(){return arguments}())?Lc:function(a){return kn(a)&&et.call(a,"callee")&&!cr.call(a,"callee")},Ft=Qe.isArray,ch=ra?En(ra):function(a){return kn(a)&&Sn(a)==Ue};function Nr(a){return a!=null&&Xs(a.length)&&!to(a)}function wn(a){return kn(a)&&Nr(a)}var wr=Ud||Na,_f=ts?En(ts):function(a){return kn(a)&&Sn(a)==z};function nr(a){if(!kn(a))return!1;var f=Sn(a);return f==G||f=="[object DOMException]"||typeof a.message=="string"&&typeof a.name=="string"&&!Mu(a)}function to(a){if(!Pn(a))return!1;var f=Sn(a);return f==X||f==$||f=="[object AsyncFunction]"||f=="[object Proxy]"}function Au(a){return typeof a=="number"&&a==Ut(a)}function Xs(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=V}function Pn(a){var f=typeof a;return a!=null&&(f=="object"||f=="function")}function kn(a){return a!=null&&typeof a=="object"}var Of=oa?En(oa):function(a){return kn(a)&&lr(a)==ue};function wf(a){return typeof a=="number"||kn(a)&&Sn(a)==xe}function Mu(a){if(!kn(a)||Sn(a)!=me)return!1;var f=Uo(a);if(f===null)return!0;var b=et.call(f,"constructor")&&f.constructor;return typeof b=="function"&&b instanceof b&&Ht.call(b)==Ur}var ku=ou?En(ou):function(a){return kn(a)&&Sn(a)==Be},ip=ci?En(ci):function(a){return kn(a)&&lr(a)==Se};function Hs(a){return typeof a=="string"||!Ft(a)&&kn(a)&&Sn(a)==ye}function xr(a){return typeof a=="symbol"||kn(a)&&Sn(a)==je}var Zo=So?En(So):function(a){return kn(a)&&Xs(a.length)&&!!sn[Sn(a)]},up=Ss(Vo),xf=Ss(function(a,f){return a<=f});function ap(a){if(!a)return[];if(Nr(a))return Hs(a)?Mr(a):Tr(a);if(Go&&a[Go])return function(b){for(var j,N=[];!(j=b.next()).done;)N.push(j.value);return N}(a[Go]());var f=lr(a);return(f==ue?sr:f==Se?Fo:_i)(a)}function No(a){return a?(a=dr(a))===W||a===-1/0?17976931348623157e292*(a<0?-1:1):a==a?a:0:a===0?a:0}function Ut(a){var f=No(a),b=f%1;return f==f?b?f-b:f:0}function sp(a){return a?di(Ut(a),0,ie):0}function dr(a){if(typeof a=="number")return a;if(xr(a))return te;if(Pn(a)){var f=typeof a.valueOf=="function"?a.valueOf():a;a=Pn(f)?f+"":f}if(typeof a!="string")return a===0?a:+a;a=aa(a);var b=Qn.test(a);return b||zn.test(a)?Eo(a.slice(2),b?2:8):Xn.test(a)?te:+a}function Ef(a){return lo(a,hr(a))}function nn(a){return a==null?"":kr(a)}var Sf=wu(function(a,f){if(ke(f)||Nr(f))lo(f,Tn(f),a);else for(var b in f)et.call(f,b)&&mu(a,b,f[b])}),Xi=wu(function(a,f){lo(f,hr(f),a)}),bi=wu(function(a,f,b,j){lo(f,hr(f),a,j)}),ja=wu(function(a,f,b,j){lo(f,Tn(f),a,j)}),cp=$o(ls),fp=Vt(function(a,f){a=w(a);var b=-1,j=f.length,N=j>2?f[2]:g;for(N&&ir(f[0],f[1],N)&&(j=1);++b<j;)for(var U=f[b],ne=hr(U),fe=-1,_e=ne.length;++fe<_e;){var Ie=ne[fe],De=a[Ie];(De===g||yo(De,Fe[Ie])&&!et.call(a,Ie))&&(a[Ie]=U[Ie])}return a}),lp=Vt(function(a){return a.push(g,Xl),gn(Pf,g,a)});function Tu(a,f,b){var j=a==null?g:Yo(a,f);return j===g?b:j}function Ys(a,f){return a!=null&&Ms(a,f,wl)}var jf=Es(function(a,f,b){f!=null&&typeof f.toString!="function"&&(f=tn.call(f)),a[f]=b},ka(Er)),pp=Es(function(a,f,b){f!=null&&typeof f.toString!="function"&&(f=tn.call(f)),et.call(a,f)?a[f].push(b):a[f]=[b]},At),dp=Vt(bu);function Tn(a){return Nr(a)?Tc(a):Wo(a)}function hr(a){return Nr(a)?Tc(a,!0):Wd(a)}var hp=wu(function(a,f,b){ys(a,f,b)}),Pf=wu(function(a,f,b,j){ys(a,f,b,j)}),Af=$o(function(a,f){var b={};if(a==null)return b;var j=!1;f=en(f,function(U){return U=an(U,a),j||(j=U.length>1),U}),lo(a,Jc(a),b),j&&(b=Gr(b,7,Jd));for(var N=f.length;N--;)ms(b,f[N]);return b}),Mf=$o(function(a,f){return a==null?{}:function(b,j){return Pl(b,j,function(N,U){return Ys(b,U)})}(a,f)});function Ws(a,f){if(a==null)return{};var b=en(Jc(a),function(j){return[j]});return f=At(f),Pl(a,b,function(j,N){return f(j,N[0])})}var kf=Ul(Tn),Vs=Ul(hr);function _i(a){return a==null?[]:su(a,Tn(a))}var Tf=Bi(function(a,f,b){return f=f.toLowerCase(),a+(b?Du(f):f)});function Du(a){return Pa(nn(a).toLowerCase())}function Jo(a){return(a=nn(a))&&a.replace(mt,ca).replace(xo,"")}var yp=Bi(function(a,f,b){return a+(b?"-":"")+f.toLowerCase()}),gp=Bi(function(a,f,b){return a+(b?" ":"")+f.toLowerCase()}),Df=Ll("toLowerCase"),Nf=Bi(function(a,f,b){return a+(b?"_":"")+f.toLowerCase()}),fh=Bi(function(a,f,b){return a+(b?" ":"")+Pa(f)}),vp=Bi(function(a,f,b){return a+(b?" ":"")+f.toUpperCase()}),Pa=Ll("toUpperCase");function Aa(a,f,b){return a=nn(a),(f=b?g:f)===g?function(j){return Qu.test(j)}(a)?function(j){return j.match(nu)||[]}(a):function(j){return j.match(be)||[]}(a):a.match(f)||[]}var Ma=Vt(function(a,f){try{return gn(a,g,f)}catch(b){return nr(b)?b:new Wt(b)}}),Cf=$o(function(a,f){return vr(f,function(b){b=po(b),Do(a,b,mi(a[b],a))}),a});function ka(a){return function(){return a}}var mp=yi(),Rf=yi(!0);function Er(a){return a}function Ta(a){return zc(typeof a=="function"?a:Gr(a,1))}var lh=Vt(function(a,f){return function(b){return bu(b,a,f)}}),Yn=Vt(function(a,f){return function(b){return bu(a,b,f)}});function no(a,f,b){var j=Tn(f),N=ps(f,j);b!=null||Pn(f)&&(N.length||!j.length)||(b=f,f=a,a=this,N=ps(f,Tn(f)));var U=!(Pn(b)&&"chain"in b&&!b.chain),ne=to(a);return vr(N,function(fe){var _e=f[fe];a[fe]=_e,ne&&(a.prototype[fe]=function(){var Ie=this.__chain__;if(U||Ie){var De=a(this.__wrapped__),Ge=De.__actions__=Tr(this.__actions__);return Ge.push({func:_e,args:arguments,thisArg:a}),De.__chain__=Ie,De}return _e.apply(a,Hn([this.value()],arguments))})}),a}function Da(){}var If=_a(en),ph=_a(ns),Lf=_a(ua);function Ks(a){return ks(a)?br(po(a)):function(f){return function(b){return Yo(b,f)}}(a)}var zf=Bl(),dh=Bl(!0);function Qo(){return[]}function Na(){return!1}var Bf=ba(function(a,f){return a+f},0),bp=qc("ceil"),Ca=ba(function(a,f){return a/f},1),Ra=qc("floor"),Ia,_p=ba(function(a,f){return a*f},1),Op=qc("round"),rr=ba(function(a,f){return a-f},0);return B.after=function(a,f){if(typeof f!="function")throw new K(E);return a=Ut(a),function(){if(--a<1)return f.apply(this,arguments)}},B.ary=np,B.assign=Sf,B.assignIn=Xi,B.assignInWith=bi,B.assignWith=ja,B.at=cp,B.before=vf,B.bind=mi,B.bindAll=Cf,B.bindKey=mf,B.castArray=function(){if(!arguments.length)return[];var a=arguments[0];return Ft(a)?a:[a]},B.chain=Fn,B.chunk=function(a,f,b){f=(b?ir(a,f,b):f===g)?1:Zn(Ut(f),0);var j=a==null?0:a.length;if(!j||f<1)return[];for(var N=0,U=0,ne=Qe(os(j/f));N<j;)ne[U++]=Xr(a,N,N+=f);return ne},B.compact=function(a){for(var f=-1,b=a==null?0:a.length,j=0,N=[];++f<b;){var U=a[f];U&&(N[j++]=U)}return N},B.concat=function(){var a=arguments.length;if(!a)return[];for(var f=Qe(a-1),b=arguments[0],j=a;j--;)f[j-1]=arguments[j];return Hn(Ft(b)?Tr(b):[b],tr(f,1))},B.cond=function(a){var f=a==null?0:a.length,b=At();return a=f?en(a,function(j){if(typeof j[1]!="function")throw new K(E);return[b(j[0]),j[1]]}):[],Vt(function(j){for(var N=-1;++N<f;){var U=a[N];if(gn(U[0],this,j))return gn(U[1],this,j)}})},B.conforms=function(a){return function(f){var b=Tn(f);return function(j){return Cc(j,f,b)}}(Gr(a,1))},B.constant=ka,B.countBy=Pt,B.create=function(a,f){var b=vu(a);return f==null?b:Nc(b,f)},B.curry=function a(f,b,j){var N=Ko(f,8,g,g,g,g,g,b=j?g:b);return N.placeholder=a.placeholder,N},B.curryRight=function a(f,b,j){var N=Ko(f,T,g,g,g,g,g,b=j?g:b);return N.placeholder=a.placeholder,N},B.debounce=Ct,B.defaults=fp,B.defaultsDeep=lp,B.defer=rp,B.delay=Fs,B.difference=Yl,B.differenceBy=Wl,B.differenceWith=Vl,B.drop=function(a,f,b){var j=a==null?0:a.length;return j?Xr(a,(f=b||f===g?1:Ut(f))<0?0:f,j):[]},B.dropRight=function(a,f,b){var j=a==null?0:a.length;return j?Xr(a,0,(f=j-(f=b||f===g?1:Ut(f)))<0?0:f):[]},B.dropRightWhile=function(a,f){return a&&a.length?bs(a,At(f,3),!0,!0):[]},B.dropWhile=function(a,f){return a&&a.length?bs(a,At(f,3),!0):[]},B.fill=function(a,f,b,j){var N=a==null?0:a.length;return N?(b&&typeof b!="number"&&ir(a,f,b)&&(b=0,j=N),function(U,ne,fe,_e){var Ie=U.length;for((fe=Ut(fe))<0&&(fe=-fe>Ie?0:Ie+fe),(_e=_e===g||_e>Ie?Ie:Ut(_e))<0&&(_e+=Ie),_e=fe>_e?0:sp(_e);fe<_e;)U[fe++]=ne;return U}(a,f,b,j)):[]},B.filter=function(a,f){return(Ft(a)?ar:cn)(a,At(f,3))},B.flatMap=function(a,f){return tr(ju(a,f),1)},B.flatMapDeep=function(a,f){return tr(ju(a,f),W)},B.flatMapDepth=function(a,f,b){return b=b===g?1:Ut(b),tr(ju(a,f),b)},B.flatten=xa,B.flattenDeep=function(a){return a!=null&&a.length?tr(a,W):[]},B.flattenDepth=function(a,f){return a!=null&&a.length?tr(a,f=f===g?1:Ut(f)):[]},B.flip=function(a){return Ko(a,512)},B.flow=mp,B.flowRight=Rf,B.fromPairs=function(a){for(var f=-1,b=a==null?0:a.length,j={};++f<b;){var N=a[f];j[N[0]]=N[1]}return j},B.functions=function(a){return a==null?[]:ps(a,Tn(a))},B.functionsIn=function(a){return a==null?[]:ps(a,hr(a))},B.groupBy=tp,B.initial=function(a){return a!=null&&a.length?Xr(a,0,-1):[]},B.intersection=ho,B.intersectionBy=vi,B.intersectionWith=th,B.invert=jf,B.invertBy=pp,B.invokeMap=oh,B.iteratee=Ta,B.keyBy=ih,B.keys=Tn,B.keysIn=hr,B.map=ju,B.mapKeys=function(a,f){var b={};return f=At(f,3),pt(a,function(j,N,U){Do(b,f(j,N,U),j)}),b},B.mapValues=function(a,f){var b={};return f=At(f,3),pt(a,function(j,N,U){Do(b,N,f(j,N,U))}),b},B.matches=function(a){return xl(Gr(a,1))},B.matchesProperty=function(a,f){return El(a,Gr(f,1))},B.memoize=Pu,B.merge=hp,B.mergeWith=Pf,B.method=lh,B.methodOf=Yn,B.mixin=no,B.negate=Us,B.nthArg=function(a){return a=Ut(a),Vt(function(f){return Sl(f,a)})},B.omit=Af,B.omitBy=function(a,f){return Ws(a,Us(At(f)))},B.once=function(a){return vf(2,a)},B.orderBy=function(a,f,b,j){return a==null?[]:(Ft(f)||(f=f==null?[]:[f]),Ft(b=j?g:b)||(b=b==null?[]:[b]),jl(a,f,b))},B.over=If,B.overArgs=op,B.overEvery=ph,B.overSome=Lf,B.partial=Gs,B.partialRight=bf,B.partition=uh,B.pick=Mf,B.pickBy=Ws,B.property=Ks,B.propertyOf=function(a){return function(f){return a==null?g:Yo(a,f)}},B.pull=$l,B.pullAll=Rs,B.pullAllBy=function(a,f,b){return a&&a.length&&f&&f.length?gs(a,f,At(b,2)):a},B.pullAllWith=function(a,f,b){return a&&a.length&&f&&f.length?gs(a,f,g,b):a},B.pullAt=ql,B.range=zf,B.rangeRight=dh,B.rearg=ah,B.reject=function(a,f){return(Ft(a)?ar:cn)(a,Us(At(f,3)))},B.remove=function(a,f){var b=[];if(!a||!a.length)return b;var j=-1,N=[],U=a.length;for(f=At(f,3);++j<U;){var ne=a[j];f(ne,j,a)&&(b.push(ne),N.push(j))}return Bc(a,N),b},B.rest=function(a,f){if(typeof a!="function")throw new K(E);return Vt(a,f=f===g?f:Ut(f))},B.reverse=Is,B.sampleSize=function(a,f,b){return f=(b?ir(a,f,b):f===g)?1:Ut(f),(Ft(a)?gl:Uc)(a,f)},B.set=function(a,f,b){return a==null?a:ya(a,f,b)},B.setWith=function(a,f,b,j){return j=typeof j=="function"?j:g,a==null?a:ya(a,f,b,j)},B.shuffle=function(a){return(Ft(a)?vl:Ml)(a)},B.slice=function(a,f,b){var j=a==null?0:a.length;return j?(b&&typeof b!="number"&&ir(a,f,b)?(f=0,b=j):(f=f==null?0:Ut(f),b=b===g?j:Ut(b)),Xr(a,f,b)):[]},B.sortBy=gf,B.sortedUniq=function(a){return a&&a.length?Xc(a):[]},B.sortedUniqBy=function(a,f){return a&&a.length?Xc(a,At(f,2)):[]},B.split=function(a,f,b){return b&&typeof b!="number"&&ir(a,f,b)&&(f=b=g),(b=b===g?ie:b>>>0)?(a=nn(a))&&(typeof f=="string"||f!=null&&!ku(f))&&!(f=kr(f))&&so(a)?ln(Mr(a),0,b):a.split(f,b):[]},B.spread=function(a,f){if(typeof a!="function")throw new K(E);return f=f==null?0:Zn(Ut(f),0),Vt(function(b){var j=b[f],N=ln(b,0,f);return j&&Hn(N,j),gn(a,this,N)})},B.tail=function(a){var f=a==null?0:a.length;return f?Xr(a,1,f):[]},B.take=function(a,f,b){return a&&a.length?Xr(a,0,(f=b||f===g?1:Ut(f))<0?0:f):[]},B.takeRight=function(a,f,b){var j=a==null?0:a.length;return j?Xr(a,(f=j-(f=b||f===g?1:Ut(f)))<0?0:f,j):[]},B.takeRightWhile=function(a,f){return a&&a.length?bs(a,At(f,3),!1,!0):[]},B.takeWhile=function(a,f){return a&&a.length?bs(a,At(f,3)):[]},B.tap=function(a,f){return f(a),a},B.throttle=function(a,f,b){var j=!0,N=!0;if(typeof a!="function")throw new K(E);return Pn(b)&&(j="leading"in b?!!b.leading:j,N="trailing"in b?!!b.trailing:N),Ct(a,f,{leading:j,maxWait:f,trailing:N})},B.thru=Ls,B.toArray=ap,B.toPairs=kf,B.toPairsIn=Vs,B.toPath=function(a){return Ft(a)?en(a,po):xr(a)?[a]:Tr(cf(nn(a)))},B.toPlainObject=Ef,B.transform=function(a,f,b){var j=Ft(a),N=j||wr(a)||Zo(a);if(f=At(f,4),b==null){var U=a&&a.constructor;b=N?j?new U:[]:Pn(a)&&to(U)?vu(Uo(a)):{}}return(N?vr:pt)(a,function(ne,fe,_e){return f(b,ne,fe,_e)}),b},B.unary=function(a){return np(a,1)},B.union=Zl,B.unionBy=Jl,B.unionWith=Ql,B.uniq=function(a){return a&&a.length?hi(a):[]},B.uniqBy=function(a,f){return a&&a.length?hi(a,At(f,2)):[]},B.uniqWith=function(a,f){return f=typeof f=="function"?f:g,a&&a.length?hi(a,g,f):[]},B.unset=function(a,f){return a==null||ms(a,f)},B.unzip=Ea,B.unzipWith=Su,B.update=function(a,f,b){return a==null?a:Tl(a,f,Vc(b))},B.updateWith=function(a,f,b,j){return j=typeof j=="function"?j:g,a==null?a:Tl(a,f,Vc(b),j)},B.values=_i,B.valuesIn=function(a){return a==null?[]:su(a,hr(a))},B.without=pr,B.words=Aa,B.wrap=function(a,f){return Gs(Vc(f),a)},B.xor=nh,B.xorBy=rh,B.xorWith=pf,B.zip=ep,B.zipObject=function(a,f){return Wc(a||[],f||[],mu)},B.zipObjectDeep=function(a,f){return Wc(a||[],f||[],ya)},B.zipWith=Dr,B.entries=kf,B.entriesIn=Vs,B.extend=Xi,B.extendWith=bi,no(B,B),B.add=Bf,B.attempt=Ma,B.camelCase=Tf,B.capitalize=Du,B.ceil=bp,B.clamp=function(a,f,b){return b===g&&(b=f,f=g),b!==g&&(b=(b=dr(b))==b?b:0),f!==g&&(f=(f=dr(f))==f?f:0),di(dr(a),f,b)},B.clone=function(a){return Gr(a,4)},B.cloneDeep=function(a){return Gr(a,5)},B.cloneDeepWith=function(a,f){return Gr(a,5,f=typeof f=="function"?f:g)},B.cloneWith=function(a,f){return Gr(a,4,f=typeof f=="function"?f:g)},B.conformsTo=function(a,f){return f==null||Cc(a,f,Tn(f))},B.deburr=Jo,B.defaultTo=function(a,f){return a==null||a!=a?f:a},B.divide=Ca,B.endsWith=function(a,f,b){a=nn(a),f=kr(f);var j=a.length,N=b=b===g?j:di(Ut(b),0,j);return(b-=f.length)>=0&&a.slice(b,N)==f},B.eq=yo,B.escape=function(a){return(a=nn(a))&&ct.test(a)?a.replace(yt,Rn):a},B.escapeRegExp=function(a){return(a=nn(a))&&bn.test(a)?a.replace(dn,"\\$&"):a},B.every=function(a,f,b){var j=Ft(a)?ns:_l;return b&&ir(a,f,b)&&(f=g),j(a,At(f,3))},B.find=df,B.findIndex=lf,B.findKey=function(a,f){return uo(a,At(f,3),pt)},B.findLast=hf,B.findLastIndex=Cs,B.findLastKey=function(a,f){return uo(a,At(f,3),mn)},B.floor=Ra,B.forEach=zs,B.forEachRight=yf,B.forIn=function(a,f){return a==null?a:Yt(a,At(f,3),hr)},B.forInRight=function(a,f){return a==null?a:Bn(a,At(f,3),hr)},B.forOwn=function(a,f){return a&&pt(a,At(f,3))},B.forOwnRight=function(a,f){return a&&mn(a,At(f,3))},B.get=Tu,B.gt=sh,B.gte=Sa,B.has=function(a,f){return a!=null&&Ms(a,f,Ol)},B.hasIn=Ys,B.head=Kl,B.identity=Er,B.includes=function(a,f,b,j){a=Nr(a)?a:_i(a),b=b&&!j?Ut(b):0;var N=a.length;return b<0&&(b=Zn(N+b,0)),Hs(a)?b<=N&&a.indexOf(f,b)>-1:!!N&&fi(a,f,b)>-1},B.indexOf=function(a,f,b){var j=a==null?0:a.length;if(!j)return-1;var N=b==null?0:Ut(b);return N<0&&(N=Zn(j+N,0)),fi(a,f,N)},B.inRange=function(a,f,b){return f=No(f),b===g?(b=f,f=0):b=No(b),function(j,N,U){return j>=fr(N,U)&&j<Zn(N,U)}(a=dr(a),f,b)},B.invoke=dp,B.isArguments=Gi,B.isArray=Ft,B.isArrayBuffer=ch,B.isArrayLike=Nr,B.isArrayLikeObject=wn,B.isBoolean=function(a){return a===!0||a===!1||kn(a)&&Sn(a)==Y},B.isBuffer=wr,B.isDate=_f,B.isElement=function(a){return kn(a)&&a.nodeType===1&&!Mu(a)},B.isEmpty=function(a){if(a==null)return!0;if(Nr(a)&&(Ft(a)||typeof a=="string"||typeof a.splice=="function"||wr(a)||Zo(a)||Gi(a)))return!a.length;var f=lr(a);if(f==ue||f==Se)return!a.size;if(ke(a))return!Wo(a).length;for(var b in a)if(et.call(a,b))return!1;return!0},B.isEqual=function(a,f){return _u(a,f)},B.isEqualWith=function(a,f,b){var j=(b=typeof b=="function"?b:g)?b(a,f):g;return j===g?_u(a,f,g,b):!!j},B.isError=nr,B.isFinite=function(a){return typeof a=="number"&&ll(a)},B.isFunction=to,B.isInteger=Au,B.isLength=Xs,B.isMap=Of,B.isMatch=function(a,f){return a===f||hs(a,f,ef(f))},B.isMatchWith=function(a,f,b){return b=typeof b=="function"?b:g,hs(a,f,ef(f),b)},B.isNaN=function(a){return wf(a)&&a!=+a},B.isNative=function(a){if(eh(a))throw new Wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ou(a)},B.isNil=function(a){return a==null},B.isNull=function(a){return a===null},B.isNumber=wf,B.isObject=Pn,B.isObjectLike=kn,B.isPlainObject=Mu,B.isRegExp=ku,B.isSafeInteger=function(a){return Au(a)&&a>=-9007199254740991&&a<=V},B.isSet=ip,B.isString=Hs,B.isSymbol=xr,B.isTypedArray=Zo,B.isUndefined=function(a){return a===g},B.isWeakMap=function(a){return kn(a)&&lr(a)==Ae},B.isWeakSet=function(a){return kn(a)&&Sn(a)=="[object WeakSet]"},B.join=function(a,f){return a==null?"":Mc.call(a,f)},B.kebabCase=yp,B.last=jn,B.lastIndexOf=function(a,f,b){var j=a==null?0:a.length;if(!j)return-1;var N=j;return b!==g&&(N=(N=Ut(b))<0?Zn(j+N,0):fr(N,j-1)),f==f?function(U,ne,fe){for(var _e=fe+1;_e--;)if(U[_e]===ne)return _e;return _e}(a,f,N):jo(a,Po,N,!0)},B.lowerCase=gp,B.lowerFirst=Df,B.lt=up,B.lte=xf,B.max=function(a){return a&&a.length?In(a,Er,Mn):g},B.maxBy=function(a,f){return a&&a.length?In(a,At(f,2),Mn):g},B.mean=function(a){return Zt(a,Er)},B.meanBy=function(a,f){return Zt(a,At(f,2))},B.min=function(a){return a&&a.length?In(a,Er,Vo):g},B.minBy=function(a,f){return a&&a.length?In(a,At(f,2),Vo):g},B.stubArray=Qo,B.stubFalse=Na,B.stubObject=function(){return{}},B.stubString=function(){return""},B.stubTrue=function(){return!0},B.multiply=_p,B.nth=function(a,f){return a&&a.length?Sl(a,Ut(f)):g},B.noConflict=function(){return An._===this&&(An._=_n),this},B.noop=Da,B.now=Bs,B.pad=function(a,f,b){a=nn(a);var j=(f=Ut(f))?co(a):0;if(!f||j>=f)return a;var N=(f-j)/2;return Oa(pu(N),b)+a+Oa(os(N),b)},B.padEnd=function(a,f,b){a=nn(a);var j=(f=Ut(f))?co(a):0;return f&&j<f?a+Oa(f-j,b):a},B.padStart=function(a,f,b){a=nn(a);var j=(f=Ut(f))?co(a):0;return f&&j<f?Oa(f-j,b)+a:a},B.parseInt=function(a,f,b){return b||f==null?f=0:f&&(f=+f),us(nn(a).replace(Dt,""),f||0)},B.random=function(a,f,b){if(b&&typeof b!="boolean"&&ir(a,f,b)&&(f=b=g),b===g&&(typeof f=="boolean"?(b=f,f=g):typeof a=="boolean"&&(b=a,a=g)),a===g&&f===g?(a=0,f=1):(a=No(a),f===g?(f=a,a=0):f=No(f)),a>f){var j=a;a=f,f=j}if(b||a%1||f%1){var N=as();return fr(a+N*(f-a+si("1e-"+((N+"").length-1))),f)}return Fc(a,f)},B.reduce=function(a,f,b){var j=Ft(a)?iu:qn,N=arguments.length<3;return j(a,At(f,4),b,N,On)},B.reduceRight=function(a,f,b){var j=Ft(a)?rs:qn,N=arguments.length<3;return j(a,At(f,4),b,N,bl)},B.repeat=function(a,f,b){return f=(b?ir(a,f,b):f===g)?1:Ut(f),vs(nn(a),f)},B.replace=function(){var a=arguments,f=nn(a[0]);return a.length<3?f:f.replace(a[1],a[2])},B.result=function(a,f,b){var j=-1,N=(f=an(f,a)).length;for(N||(N=1,a=g);++j<N;){var U=a==null?g:a[po(f[j])];U===g&&(j=N,U=b),a=to(U)?U.call(a):U}return a},B.round=Op,B.runInContext=Oe,B.sample=function(a){return(Ft(a)?Dc:Vd)(a)},B.size=function(a){if(a==null)return 0;if(Nr(a))return Hs(a)?co(a):a.length;var f=lr(a);return f==ue||f==Se?a.size:Wo(a).length},B.snakeCase=Nf,B.some=function(a,f,b){var j=Ft(a)?ua:$d;return b&&ir(a,f,b)&&(f=g),j(a,At(f,3))},B.sortedIndex=function(a,f){return ga(a,f)},B.sortedIndexBy=function(a,f,b){return Gc(a,f,At(b,2))},B.sortedIndexOf=function(a,f){var b=a==null?0:a.length;if(b){var j=ga(a,f);if(j<b&&yo(a[j],f))return j}return-1},B.sortedLastIndex=function(a,f){return ga(a,f,!0)},B.sortedLastIndexBy=function(a,f,b){return Gc(a,f,At(b,2),!0)},B.sortedLastIndexOf=function(a,f){if(a!=null&&a.length){var b=ga(a,f,!0)-1;if(yo(a[b],f))return b}return-1},B.startCase=fh,B.startsWith=function(a,f,b){return a=nn(a),b=b==null?0:di(Ut(b),0,a.length),f=kr(f),a.slice(b,b+f.length)==f},B.subtract=rr,B.sum=function(a){return a&&a.length?au(a,Er):0},B.sumBy=function(a,f){return a&&a.length?au(a,At(f,2)):0},B.template=function(a,f,b){var j=B.templateSettings;b&&ir(a,f,b)&&(f=g),a=nn(a),f=bi({},f,j,Gl);var N,U,ne=bi({},f.imports,j.imports,Gl),fe=Tn(ne),_e=su(ne,fe),Ie=0,De=f.interpolate||Et,Ge="__p += '",rt=P((f.escape||Et).source+"|"+De.source+"|"+(De===It?lt:Et).source+"|"+(f.evaluate||Et).source+"|$","g"),dt="//# sourceURL="+(et.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ja+"]")+`
  34. `;a.replace(rt,function(Xe,jt,it,ce,Rt,$t){return it||(it=ce),Ge+=a.slice(Ie,$t).replace(Nt,Ci),jt&&(N=!0,Ge+=`' +
  35. __e(`+jt+`) +
  36. '`),Rt&&(U=!0,Ge+=`';
  37. `+Rt+`;
  38. __p += '`),it&&(Ge+=`' +
  39. ((__t = (`+it+`)) == null ? '' : __t) +
  40. '`),Ie=$t+Xe.length,Xe}),Ge+=`';
  41. `;var xt=et.call(f,"variable")&&f.variable;if(xt){if(Ve.test(xt))throw new Wt("Invalid `variable` option passed into `_.template`")}else Ge=`with (obj) {
  42. `+Ge+`
  43. }
  44. `;Ge=(U?Ge.replace(Le,""):Ge).replace(wt,"$1").replace(kt,"$1;"),Ge="function("+(xt||"obj")+`) {
  45. `+(xt?"":`obj || (obj = {});
  46. `)+"var __t, __p = ''"+(N?", __e = _.escape":"")+(U?`, __j = Array.prototype.join;
  47. function print() { __p += __j.call(arguments, '') }
  48. `:`;
  49. `)+Ge+`return __p
  50. }`;var ze=Ma(function(){return vn(fe,dt+"return "+Ge).apply(g,_e)});if(ze.source=Ge,nr(ze))throw ze;return ze},B.times=function(a,f){if((a=Ut(a))<1||a>V)return[];var b=ie,j=fr(a,ie);f=At(f),a-=ie;for(var N=Ni(j,f);++b<a;)f(b);return N},B.toFinite=No,B.toInteger=Ut,B.toLength=sp,B.toLower=function(a){return nn(a).toLowerCase()},B.toNumber=dr,B.toSafeInteger=function(a){return a?di(Ut(a),-9007199254740991,V):a===0?a:0},B.toString=nn,B.toUpper=function(a){return nn(a).toUpperCase()},B.trim=function(a,f,b){if((a=nn(a))&&(b||f===g))return aa(a);if(!a||!(f=kr(f)))return a;var j=Mr(a),N=Mr(f);return ln(j,Br(j,N),sa(j,N)+1).join("")},B.trimEnd=function(a,f,b){if((a=nn(a))&&(b||f===g))return a.slice(0,_r(a)+1);if(!a||!(f=kr(f)))return a;var j=Mr(a);return ln(j,0,sa(j,Mr(f))+1).join("")},B.trimStart=function(a,f,b){if((a=nn(a))&&(b||f===g))return a.replace(Dt,"");if(!a||!(f=kr(f)))return a;var j=Mr(a);return ln(j,Br(j,Mr(f))).join("")},B.truncate=function(a,f){var b=30,j="...";if(Pn(f)){var N="separator"in f?f.separator:N;b="length"in f?Ut(f.length):b,j="omission"in f?kr(f.omission):j}var U=(a=nn(a)).length;if(so(a)){var ne=Mr(a);U=ne.length}if(b>=U)return a;var fe=b-co(j);if(fe<1)return j;var _e=ne?ln(ne,0,fe).join(""):a.slice(0,fe);if(N===g)return _e+j;if(ne&&(fe+=_e.length-fe),ku(N)){if(a.slice(fe).search(N)){var Ie,De=_e;for(N.global||(N=P(N.source,nn(Gt.exec(N))+"g")),N.lastIndex=0;Ie=N.exec(De);)var Ge=Ie.index;_e=_e.slice(0,Ge===g?fe:Ge)}}else if(a.indexOf(kr(N),fe)!=fe){var rt=_e.lastIndexOf(N);rt>-1&&(_e=_e.slice(0,rt))}return _e+j},B.unescape=function(a){return(a=nn(a))&&Me.test(a)?a.replace(St,Fr):a},B.uniqueId=function(a){var f=++hn;return nn(a)+f},B.upperCase=vp,B.upperFirst=Pa,B.each=zs,B.eachRight=yf,B.first=Kl,no(B,(Ia={},pt(B,function(a,f){et.call(B.prototype,f)||(Ia[f]=a)}),Ia),{chain:!1}),B.VERSION="4.17.21",vr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){B[a].placeholder=B}),vr(["drop","take"],function(a,f){Qt.prototype[a]=function(b){b=b===g?1:Zn(Ut(b),0);var j=this.__filtered__&&!f?new Qt(this):this.clone();return j.__filtered__?j.__takeCount__=fr(b,j.__takeCount__):j.__views__.push({size:fr(b,ie),type:a+(j.__dir__<0?"Right":"")}),j},Qt.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),vr(["filter","map","takeWhile"],function(a,f){var b=f+1,j=b==1||b==3;Qt.prototype[a]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:At(N,3),type:b}),U.__filtered__=U.__filtered__||j,U}}),vr(["head","last"],function(a,f){var b="take"+(f?"Right":"");Qt.prototype[a]=function(){return this[b](1).value()[0]}}),vr(["initial","tail"],function(a,f){var b="drop"+(f?"":"Right");Qt.prototype[a]=function(){return this.__filtered__?new Qt(this):this[b](1)}}),Qt.prototype.compact=function(){return this.filter(Er)},Qt.prototype.find=function(a){return this.filter(a).head()},Qt.prototype.findLast=function(a){return this.reverse().find(a)},Qt.prototype.invokeMap=Vt(function(a,f){return typeof a=="function"?new Qt(this):this.map(function(b){return bu(b,a,f)})}),Qt.prototype.reject=function(a){return this.filter(Us(At(a)))},Qt.prototype.slice=function(a,f){a=Ut(a);var b=this;return b.__filtered__&&(a>0||f<0)?new Qt(b):(a<0?b=b.takeRight(-a):a&&(b=b.drop(a)),f!==g&&(b=(f=Ut(f))<0?b.dropRight(-f):b.take(f-a)),b)},Qt.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Qt.prototype.toArray=function(){return this.take(ie)},pt(Qt.prototype,function(a,f){var b=/^(?:filter|find|map|reject)|While$/.test(f),j=/^(?:head|last)$/.test(f),N=B[j?"take"+(f=="last"?"Right":""):f],U=j||/^find/.test(f);N&&(B.prototype[f]=function(){var ne=this.__wrapped__,fe=j?[1]:arguments,_e=ne instanceof Qt,Ie=fe[0],De=_e||Ft(ne),Ge=function(jt){var it=N.apply(B,Hn([jt],fe));return j&&rt?it[0]:it};De&&b&&typeof Ie=="function"&&Ie.length!=1&&(_e=De=!1);var rt=this.__chain__,dt=!!this.__actions__.length,xt=U&&!rt,ze=_e&&!dt;if(!U&&De){ne=ze?ne:new Qt(this);var Xe=a.apply(ne,fe);return Xe.__actions__.push({func:Ls,args:[Ge],thisArg:g}),new Zr(Xe,rt)}return xt&&ze?a.apply(this,fe):(Xe=this.thru(Ge),xt?j?Xe.value()[0]:Xe.value():Xe)})}),vr(["pop","push","shift","sort","splice","unshift"],function(a){var f=pe[a],b=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",j=/^(?:pop|shift)$/.test(a);B.prototype[a]=function(){var N=arguments;if(j&&!this.__chain__){var U=this.value();return f.apply(Ft(U)?U:[],N)}return this[b](function(ne){return f.apply(Ft(ne)?ne:[],N)})}}),pt(Qt.prototype,function(a,f){var b=B[f];if(b){var j=b.name+"";et.call(gu,j)||(gu[j]=[]),gu[j].push({name:f,func:b})}}),gu[xs(g,2).name]=[{name:"wrapper",func:g}],Qt.prototype.clone=function(){var a=new Qt(this.__wrapped__);return a.__actions__=Tr(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Tr(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Tr(this.__views__),a},Qt.prototype.reverse=function(){if(this.__filtered__){var a=new Qt(this);a.__dir__=-1,a.__filtered__=!0}else(a=this.clone()).__dir__*=-1;return a},Qt.prototype.value=function(){var a=this.__wrapped__.value(),f=this.__dir__,b=Ft(a),j=f<0,N=b?a.length:0,U=function($t,bt,Mt){for(var Wn=-1,Cr=Mt.length;++Wn<Cr;){var go=Mt[Wn],Vn=go.size;switch(go.type){case"drop":$t+=Vn;break;case"dropRight":bt-=Vn;break;case"take":bt=fr(bt,$t+Vn);break;case"takeRight":$t=Zn($t,bt-Vn)}}return{start:$t,end:bt}}(0,N,this.__views__),ne=U.start,fe=U.end,_e=fe-ne,Ie=j?fe:ne-1,De=this.__iteratees__,Ge=De.length,rt=0,dt=fr(_e,this.__takeCount__);if(!b||!j&&N==_e&&dt==_e)return Hc(a,this.__actions__);var xt=[];e:for(;_e--&&rt<dt;){for(var ze=-1,Xe=a[Ie+=f];++ze<Ge;){var jt=De[ze],it=jt.iteratee,ce=jt.type,Rt=it(Xe);if(ce==2)Xe=Rt;else if(!Rt){if(ce==1)continue e;break e}}xt[rt++]=Xe}return xt},B.prototype.at=eo,B.prototype.chain=function(){return Fn(this)},B.prototype.commit=function(){return new Zr(this.value(),this.__chain__)},B.prototype.next=function(){this.__values__===g&&(this.__values__=ap(this.value()));var a=this.__index__>=this.__values__.length;return{done:a,value:a?g:this.__values__[this.__index__++]}},B.prototype.plant=function(a){for(var f,b=this;b instanceof da;){var j=ff(b);j.__index__=0,j.__values__=g,f?N.__wrapped__=j:f=j;var N=j;b=b.__wrapped__}return N.__wrapped__=a,f},B.prototype.reverse=function(){var a=this.__wrapped__;if(a instanceof Qt){var f=a;return this.__actions__.length&&(f=new Qt(this)),(f=f.reverse()).__actions__.push({func:Ls,args:[Is],thisArg:g}),new Zr(f,this.__chain__)}return this.thru(Is)},B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=function(){return Hc(this.__wrapped__,this.__actions__)},B.prototype.first=B.prototype.head,Go&&(B.prototype[Go]=function(){return this}),B}();An._=fo,(O=function(){return fo}.call(l,o,l,d))===g||(d.exports=O)}).call(this)}).call(this,o(68),o(221)(c))},function(c,l,o){var p=o(7),d=o(34),O=o(33),g=o(87),E=o(62),M=o(174),A=o(28),T=p.TypeError,k=A("toPrimitive");c.exports=function(R,C){if(!O(R)||g(R))return R;var F,W=E(R,k);if(W){if(C===void 0&&(C="default"),F=d(W,R,C),!O(F)||g(F))return F;throw T("Can't convert object to primitive value")}return C===void 0&&(C="number"),M(R,C)}},function(c,l,o){var p=o(108);c.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(c,l,o){var p=o(36),d=o(18),O=o(91);c.exports=!p&&!d(function(){return Object.defineProperty(O("div"),"a",{get:function(){return 7}}).a!=7})},function(c,l,o){var p=o(35),d=o(135),O=o(50),g=o(38);c.exports=function(E,M){for(var A=d(M),T=g.f,k=O.f,R=0;R<A.length;R++){var C=A[R];p(E,C)||T(E,C,k(M,C))}}},function(c,l,o){var p=o(46),d=o(15),O=o(74),g=o(112),E=o(32),M=d([].concat);c.exports=p("Reflect","ownKeys")||function(A){var T=O.f(E(A)),k=g.f;return k?M(T,k(A)):T}},function(c,l,o){var p=o(15),d=o(35),O=o(41),g=o(137).indexOf,E=o(72),M=p([].push);c.exports=function(A,T){var k,R=O(A),C=0,F=[];for(k in R)!d(E,k)&&d(R,k)&&M(F,k);for(;T.length>C;)d(R,k=T[C++])&&(~g(F,k)||M(F,k));return F}},function(c,l,o){var p=o(41),d=o(75),O=o(45),g=function(E){return function(M,A,T){var k,R=p(M),C=O(R),F=d(T,C);if(E&&A!=A){for(;C>F;)if((k=R[F++])!=k)return!0}else for(;C>F;F++)if((E||F in R)&&R[F]===A)return E||F||0;return!E&&-1}};c.exports={includes:g(!0),indexOf:g(!1)}},function(c,l,o){var p=o(46);c.exports=p("document","documentElement")},function(c,l,o){var p=o(51),d=o(41),O=o(74).f,g=o(114),E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];c.exports.f=function(M){return E&&p(M)=="Window"?function(A){try{return O(A)}catch(T){return g(E)}}(M):O(d(M))}},function(c,l,o){var p=o(28);l.f=p},function(c,l,o){var p=o(177),d=o(35),O=o(140),g=o(38).f;c.exports=function(E){var M=p.Symbol||(p.Symbol={});d(M,E)||g(M,E,{value:O.f(E)})}},function(c,l,o){var p,d,O,g=o(18),E=o(30),M=o(60),A=o(101),T=o(42),k=o(28),R=o(71),C=k("iterator"),F=!1;[].keys&&("next"in(O=[].keys())?(d=A(A(O)))!==Object.prototype&&(p=d):F=!0),p==null||g(function(){var W={};return p[C].call(W)!==W})?p={}:R&&(p=M(p)),E(p[C])||T(p,C,function(){return this}),c.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:F}},function(c,l,o){var p=o(18);c.exports=!p(function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype})},function(c,l,o){var p=o(16),d=o(15),O=o(72),g=o(33),E=o(35),M=o(38).f,A=o(74),T=o(139),k=o(183),R=o(90),C=o(185),F=!1,W=R("meta"),V=0,te=function(re){M(re,W,{value:{objectID:"O"+V++,weakData:{}}})},ie=c.exports={enable:function(){ie.enable=function(){},F=!0;var re=A.f,J=d([].splice),Z={};Z[W]=1,re(Z).length&&(A.f=function(Y){for(var z=re(Y),G=0,X=z.length;G<X;G++)if(z[G]===W){J(z,G,1);break}return z},p({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:T.f}))},fastKey:function(re,J){if(!g(re))return typeof re=="symbol"?re:(typeof re=="string"?"S":"P")+re;if(!E(re,W)){if(!k(re))return"F";if(!J)return"E";te(re)}return re[W].objectID},getWeakData:function(re,J){if(!E(re,W)){if(!k(re))return!0;if(!J)return!1;te(re)}return re[W].weakData},onFreeze:function(re){return C&&F&&k(re)&&!E(re,W)&&te(re),re}};O[W]=!0},function(c,l,o){var p=o(28),d=o(80),O=p("iterator"),g=Array.prototype;c.exports=function(E){return E!==void 0&&(d.Array===E||g[O]===E)}},function(c,l,o){var p=o(7),d=o(34),O=o(56),g=o(32),E=o(88),M=o(118),A=p.TypeError;c.exports=function(T,k){var R=arguments.length<2?M(T):k;if(O(R))return g(d(R,T));throw A(E(T)+" is not iterable")}},function(c,l,o){var p=o(34),d=o(32),O=o(62);c.exports=function(g,E,M){var A,T;d(g);try{if(!(A=O(g,"return"))){if(E==="throw")throw M;return M}A=p(A,g)}catch(k){T=!0,A=k}if(E==="throw")throw M;if(T)throw A;return d(A),M}},function(c,l,o){var p=o(30),d=o(33),O=o(102);c.exports=function(g,E,M){var A,T;return O&&p(A=E.constructor)&&A!==M&&d(T=A.prototype)&&T!==M.prototype&&O(g,T),g}},function(c,l,o){var p=o(42);c.exports=function(d,O,g){for(var E in O)p(d,E,O[E],g);return d}},function(c,l,o){var p=o(46),d=o(38),O=o(28),g=o(36),E=O("species");c.exports=function(M){var A=p(M),T=d.f;g&&A&&!A[E]&&T(A,E,{configurable:!0,get:function(){return this}})}},function(c,l,o){var p=o(15),d=o(59),O=o(39),g=o(44),E=p("".charAt),M=p("".charCodeAt),A=p("".slice),T=function(k){return function(R,C){var F,W,V=O(g(R)),te=d(C),ie=V.length;return te<0||te>=ie?k?"":void 0:(F=M(V,te))<55296||F>56319||te+1===ie||(W=M(V,te+1))<56320||W>57343?k?E(V,te):F:k?A(V,te,te+2):W-56320+(F-55296<<10)+65536}};c.exports={codeAt:T(!1),charAt:T(!0)}},function(c,l){c.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(c,l,o){var p=o(91)("span").classList,d=p&&p.constructor&&p.constructor.prototype;c.exports=d===Object.prototype?void 0:d},function(c,l,o){var p=o(32);c.exports=function(){var d=p(this),O="";return d.global&&(O+="g"),d.ignoreCase&&(O+="i"),d.multiline&&(O+="m"),d.dotAll&&(O+="s"),d.unicode&&(O+="u"),d.sticky&&(O+="y"),O}},function(c,l,o){var p=o(18),d=o(7).RegExp,O=p(function(){var M=d("a","y");return M.lastIndex=2,M.exec("abcd")!=null}),g=O||p(function(){return!d("a","y").sticky}),E=O||p(function(){var M=d("^r","gy");return M.lastIndex=2,M.exec("str")!=null});c.exports={BROKEN_CARET:E,MISSED_STICKY:g,UNSUPPORTED_Y:O}},function(c,l,o){var p=o(16),d=o(79).find,O=o(100),g="find",E=!0;g in[]&&Array(1).find(function(){E=!1}),p({target:"Array",proto:!0,forced:E},{find:function(M){return d(this,M,arguments.length>1?arguments[1]:void 0)}}),O(g)},function(c,l,o){var p=o(16),d=o(137).includes,O=o(100);p({target:"Array",proto:!0},{includes:function(g){return d(this,g,arguments.length>1?arguments[1]:void 0)}}),O("includes")},function(c,l,o){var p=o(16),d=o(15),O=o(197),g=o(44),E=o(39),M=o(198),A=d("".indexOf);p({target:"String",proto:!0,forced:!M("includes")},{includes:function(T){return!!~A(E(g(this)),E(O(T)),arguments.length>1?arguments[1]:void 0)}})},function(c,l,o){var p=o(33),d=o(51),O=o(28)("match");c.exports=function(g){var E;return p(g)&&((E=g[O])!==void 0?!!E:d(g)=="RegExp")}},function(c,l,o){var p=o(15);c.exports=p(1 .valueOf)},function(c,l,o){var p=o(15),d=o(44),O=o(39),g=o(162),E=p("".replace),M="["+g+"]",A=RegExp("^"+M+M+"*"),T=RegExp(M+M+"*$"),k=function(R){return function(C){var F=O(d(C));return 1&R&&(F=E(F,A,"")),2&R&&(F=E(F,T,"")),F}};c.exports={start:k(1),end:k(2),trim:k(3)}},function(c,l){c.exports=`
  51. \v\f\r                 \u2028\u2029\uFEFF`},function(c,l){var o,p,d=c.exports={};function O(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}function E(V){if(o===setTimeout)return setTimeout(V,0);if((o===O||!o)&&setTimeout)return o=setTimeout,setTimeout(V,0);try{return o(V,0)}catch(te){try{return o.call(null,V,0)}catch(ie){return o.call(this,V,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:O}catch(V){o=O}try{p=typeof clearTimeout=="function"?clearTimeout:g}catch(V){p=g}})();var M,A=[],T=!1,k=-1;function R(){T&&M&&(T=!1,M.length?A=M.concat(A):k=-1,A.length&&C())}function C(){if(!T){var V=E(R);T=!0;for(var te=A.length;te;){for(M=A,A=[];++k<te;)M&&M[k].run();k=-1,te=A.length}M=null,T=!1,function(ie){if(p===clearTimeout)return clearTimeout(ie);if((p===g||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(ie);try{p(ie)}catch(re){try{return p.call(null,ie)}catch(J){return p.call(this,ie)}}}(V)}}function F(V,te){this.fun=V,this.array=te}function W(){}d.nextTick=function(V){var te=new Array(arguments.length-1);if(arguments.length>1)for(var ie=1;ie<arguments.length;ie++)te[ie-1]=arguments[ie];A.push(new F(V,te)),A.length!==1||T||E(C)},F.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=W,d.addListener=W,d.once=W,d.off=W,d.removeListener=W,d.removeAllListeners=W,d.emit=W,d.prependListener=W,d.prependOnceListener=W,d.listeners=function(V){return[]},d.binding=function(V){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(V){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(c,l,o){var p=o(32),d=o(165),O=o(28)("species");c.exports=function(g,E){var M,A=p(g).constructor;return A===void 0||(M=p(A)[O])==null?E:d(M)}},function(c,l,o){var p=o(7),d=o(99),O=o(88),g=p.TypeError;c.exports=function(E){if(d(E))return E;throw g(O(E)+" is not a constructor")}},function(c,l,o){var p=o(16),d=o(161).trim;p({target:"String",proto:!0,forced:o(200)("trim")},{trim:function(){return d(this)}})},function(c,l,o){var p=o(34),d=o(123),O=o(32),g=o(94),E=o(39),M=o(44),A=o(62),T=o(124),k=o(125);d("match",function(R,C,F){return[function(W){var V=M(this),te=W==null?void 0:A(W,R);return te?p(te,W,V):new RegExp(W)[R](E(V))},function(W){var V=O(this),te=E(W),ie=F(C,V,te);if(ie.done)return ie.value;if(!V.global)return k(V,te);var re=V.unicode;V.lastIndex=0;for(var J,Z=[],Y=0;(J=k(V,te))!==null;){var z=E(J[0]);Z[Y]=z,z===""&&(V.lastIndex=T(te,g(V.lastIndex),re)),Y++}return Y===0?null:Z}]})},function(c,l,o){var p,d,O,g,E=o(7),M=o(76),A=o(64),T=o(30),k=o(35),R=o(18),C=o(138),F=o(98),W=o(91),V=o(169),te=o(128),ie=E.setImmediate,re=E.clearImmediate,J=E.process,Z=E.Dispatch,Y=E.Function,z=E.MessageChannel,G=E.String,X=0,$={},ue="onreadystatechange";try{p=E.location}catch(Se){}var xe=function(Se){if(k($,Se)){var ye=$[Se];delete $[Se],ye()}},me=function(Se){return function(){xe(Se)}},Pe=function(Se){xe(Se.data)},Be=function(Se){E.postMessage(G(Se),p.protocol+"//"+p.host)};ie&&re||(ie=function(Se){var ye=F(arguments,1);return $[++X]=function(){M(T(Se)?Se:Y(Se),void 0,ye)},d(X),X},re=function(Se){delete $[Se]},te?d=function(Se){J.nextTick(me(Se))}:Z&&Z.now?d=function(Se){Z.now(me(Se))}:z&&!V?(g=(O=new z).port2,O.port1.onmessage=Pe,d=A(g.postMessage,g)):E.addEventListener&&T(E.postMessage)&&!E.importScripts&&p&&p.protocol!=="file:"&&!R(Be)?(d=Be,E.addEventListener("message",Pe,!1)):d=ue in W("script")?function(Se){C.appendChild(W("script")).onreadystatechange=function(){C.removeChild(this),xe(Se)}}:function(Se){setTimeout(me(Se),0)}),c.exports={set:ie,clear:re}},function(c,l,o){var p=o(55);c.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(p)},function(c,l,o){var p=o(56),d=function(O){var g,E;this.promise=new O(function(M,A){if(g!==void 0||E!==void 0)throw TypeError("Bad Promise constructor");g=M,E=A}),this.resolve=p(g),this.reject=p(E)};c.exports.f=function(O){return new d(O)}},function(c,l,o){l.a=function(){return!1}},function(c,l,o){(function(p){o.d(l,"a",function(){return J});var d=o(1);function O(z){throw new Error("[mobx-utils] "+z)}function g(z,G){G===void 0&&(G="Illegal state"),z||O(G)}var E=function(z){return z&&z!==Object.prototype&&Object.getOwnPropertyNames(z).concat(E(Object.getPrototypeOf(z))||[])},M=function(z){return function(G){var X=E(G);return X.filter(function($,ue){return X.indexOf($)===ue})}(z).filter(function(G){return G!=="constructor"&&!~G.indexOf("__")})},A="pending",T="fulfilled",k="rejected";function R(z){switch(this.state){case A:return z.pending&&z.pending(this.value);case k:return z.rejected&&z.rejected(this.value);case T:return z.fulfilled?z.fulfilled(this.value):this.value}}function C(z,G){if(g(arguments.length<=2,"fromPromise expects up to two arguments"),g(typeof z=="function"||typeof z=="object"&&z&&typeof z.then=="function","Please pass a promise or function to fromPromise"),z.isPromiseBasedObservable===!0)return z;typeof z=="function"&&(z=new Promise(z));var X=z;z.then(Object(d.k)("observableFromPromise-resolve",function(ue){X.value=ue,X.state=T}),Object(d.k)("observableFromPromise-reject",function(ue){X.value=ue,X.state=k})),X.isPromiseBasedObservable=!0,X.case=R;var $=G&&G.state===T?G.value:void 0;return Object(d.q)(X,{value:$,state:A},{},{deep:!1}),X}(function(z){z.reject=Object(d.k)("fromPromise.reject",function(G){var X=z(Promise.reject(G));return X.state=k,X.value=G,X}),z.resolve=Object(d.k)("fromPromise.resolve",function(G){G===void 0&&(G=void 0);var X=z(Promise.resolve(G));return X.state=T,X.value=G,X})})(C);var F=function(z,G,X,$){var ue,xe=arguments.length,me=xe<3?G:$===null?$=Object.getOwnPropertyDescriptor(G,X):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(z,G,X,$);else for(var Pe=z.length-1;Pe>=0;Pe--)(ue=z[Pe])&&(me=(xe<3?ue(me):xe>3?ue(G,X,me):ue(G,X))||me);return xe>3&&me&&Object.defineProperty(G,X,me),me};(function(){function z(G,X){var $=this;Object(d.G)(function(){$.current=X,$.subscription=G.subscribe($)})}z.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},z.prototype.next=function(G){this.current=G},z.prototype.complete=function(){this.dispose()},z.prototype.error=function(G){this.current=G,this.dispose()},F([d.C.ref],z.prototype,"current",void 0),F([d.k.bound],z.prototype,"next",null),F([d.k.bound],z.prototype,"complete",null),F([d.k.bound],z.prototype,"error",null)})();var W=function(){return W=Object.assign||function(z){for(var G,X=1,$=arguments.length;X<$;X++)for(var ue in G=arguments[X])Object.prototype.hasOwnProperty.call(G,ue)&&(z[ue]=G[ue]);return z},W.apply(this,arguments)},V=function(z,G,X,$){var ue,xe=arguments.length,me=xe<3?G:$===null?$=Object.getOwnPropertyDescriptor(G,X):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(z,G,X,$);else for(var Pe=z.length-1;Pe>=0;Pe--)(ue=z[Pe])&&(me=(xe<3?ue(me):xe>3?ue(G,X,me):ue(G,X))||me);return xe>3&&me&&Object.defineProperty(G,X,me),me},te=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function z(G){var X=this;this.model=G,this.localValues=d.C.map({}),this.localComputedValues=d.C.map({}),this.isPropertyDirty=function($){return X.localValues.has($)},g(Object(d.A)(G),"createViewModel expects an observable object"),M(G).forEach(function($){if($!==d.a&&$!=="__mobxDidRunLazyInitializers"){if(g(te.indexOf($)===-1,"The propertyname "+$+" is reserved and cannot be used with viewModels"),Object(d.w)(G,$)){var ue=Object(d.h)(G,$).derivation;X.localComputedValues.set($,Object(d.m)(ue.bind(X)))}var xe=Object.getOwnPropertyDescriptor(G,$),me=xe?{enumerable:xe.enumerable}:{};Object.defineProperty(X,$,W(W({},me),{configurable:!0,get:function(){return Object(d.w)(G,$)?X.localComputedValues.get($).get():X.isPropertyDirty($)?X.localValues.get($):X.model[$]},set:Object(d.k)(function(Pe){Pe!==X.model[$]?X.localValues.set($,Pe):X.localValues.delete($)})}))}})}Object.defineProperty(z.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),z.prototype.submit=function(){var G=this;Object(d.B)(this.localValues).forEach(function(X){var $=G.localValues.get(X),ue=G.model[X];Object(d.y)(ue)?ue.replace($):Object(d.z)(ue)?(ue.clear(),ue.merge($)):Object(d.v)($)||(G.model[X]=$)}),this.localValues.clear()},z.prototype.reset=function(){this.localValues.clear()},z.prototype.resetProperty=function(G){this.localValues.delete(G)},V([d.m],z.prototype,"isDirty",null),V([d.m],z.prototype,"changedValues",null),V([d.k.bound],z.prototype,"submit",null),V([d.k.bound],z.prototype,"reset",null),V([d.k.bound],z.prototype,"resetProperty",null)})();function ie(z){if(!z)return"ROOT";for(var G=[];z.parent;)G.push(z.path),z=z.parent;return G.reverse().join("/")}function re(z){return Object(d.A)(z)||Object(d.y)(z)||Object(d.z)(z)}function J(z,G){var X=new WeakMap;function $(me){var Pe=X.get(me.object);(function(Be,Se){switch(Be.type){case"add":ue(Be.newValue,Se,Be.name);break;case"update":xe(Be.oldValue),ue(Be.newValue,Se,Be.name||""+Be.index);break;case"remove":case"delete":xe(Be.oldValue);break;case"splice":Be.removed.map(xe),Be.added.forEach(function(Ae,Ue){return ue(Ae,Se,""+(Be.index+Ue))});for(var ye=Be.index+Be.addedCount;ye<Be.object.length;ye++)if(re(Be.object[ye])){var je=X.get(Be.object[ye]);je&&(je.path=""+ye)}}})(me,Pe),G(me,ie(Pe),z)}function ue(me,Pe,Be){if(re(me)){var Se=X.get(me);if(Se){if(Se.parent!==Pe||Se.path!==Be)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+ie(Pe)+"/"+Be+"', but it already exists at '"+ie(Se.parent)+"/"+Se.path+"'")}else{var ye={parent:Pe,path:Be,dispose:Object(d.D)(me,$)};X.set(me,ye),Object(d.p)(me).forEach(function(je){var Ae=je[0];return ue(je[1],ye,Ae)})}}}function xe(me){if(re(me)){var Pe=X.get(me);if(!Pe)return;X.delete(me),Pe.dispose(),Object(d.L)(me).forEach(xe)}}return ue(z,void 0,""),function(){xe(z)}}var Z,Y=(Z=function(z,G){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,$){X.__proto__=$}||function(X,$){for(var ue in $)$.hasOwnProperty(ue)&&(X[ue]=$[ue])},Z(z,G)},function(z,G){function X(){this.constructor=z}Z(z,G),z.prototype=G===null?Object.create(G):(X.prototype=G.prototype,new X)});(function(z){function G(X,$,ue){var xe=ue===void 0?{}:ue,me=xe.name,Pe=me===void 0?"ogm"+(1e3*Math.random()|0):me,Be=xe.keyToName,Se=Be===void 0?function(Ae){return""+Ae}:Be,ye=z.call(this)||this;ye._keyToName=Se,ye._groupBy=$,ye._ogmInfoKey=Symbol("ogmInfo"+Pe),ye._base=X;for(var je=0;je<X.length;je++)ye._addItem(X[je]);return ye._disposeBaseObserver=Object(d.D)(ye._base,function(Ae){if(Ae.type==="splice")Object(d.J)(function(){for(var Ue=0,nt=Ae.removed;Ue<nt.length;Ue++){var Ot=nt[Ue];ye._removeItem(Ot)}for(var We=0,Ze=Ae.added;We<Ze.length;We++){var gt=Ze[We];ye._addItem(gt)}});else{if(Ae.type!=="update")throw new Error("illegal state");Object(d.J)(function(){ye._removeItem(Ae.oldValue),ye._addItem(Ae.newValue)})}}),ye}Y(G,z),G.prototype.clear=function(){throw new Error("not supported")},G.prototype.delete=function(X){throw new Error("not supported")},G.prototype.set=function(X,$){throw new Error("not supported")},G.prototype.dispose=function(){this._disposeBaseObserver();for(var X=0;X<this._base.length;X++){var $=this._base[X];$[this._ogmInfoKey].reaction(),delete $[this._ogmInfoKey]}},G.prototype._getGroupArr=function(X){var $=z.prototype.get.call(this,X);return $===void 0&&($=Object(d.C)([],{name:"GroupArray["+this._keyToName(X)+"]",deep:!1}),z.prototype.set.call(this,X,$)),$},G.prototype._removeFromGroupArr=function(X,$){var ue=z.prototype.get.call(this,X);ue.length===1?z.prototype.delete.call(this,X):($===ue.length-1||(ue[$]=ue[ue.length-1],ue[$][this._ogmInfoKey].groupArrIndex=$),ue.length--)},G.prototype._addItem=function(X){var $=this,ue=this._groupBy(X),xe=this._getGroupArr(ue),me={groupByValue:ue,groupArrIndex:xe.length,reaction:Object(d.F)(function(){return $._groupBy(X)},function(Pe,Be){var Se=X[$._ogmInfoKey];$._removeFromGroupArr(Se.groupByValue,Se.groupArrIndex);var ye=$._getGroupArr(Pe),je=ye.length;ye.push(X),Se.groupByValue=Pe,Se.groupArrIndex=je})};Object.defineProperty(X,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:me}),xe.push(X)},G.prototype._removeItem=function(X){var $=X[this._ogmInfoKey];this._removeFromGroupArr($.groupByValue,$.groupArrIndex),$.reaction(),delete X[this._ogmInfoKey]}})(d.b),function(){function z(G,X){this.base=G,this.args=X,this.closestIdx=0,this.isDisposed=!1;for(var $=this.closest=this.root=G,ue=0;ue<this.args.length-1&&($=$.get(X[ue]));ue++)this.closest=$;this.closestIdx=ue}return z.prototype.exists=function(){this.assertNotDisposed();var G=this.args.length;return this.closestIdx>=G-1&&this.closest.has(this.args[G-1])},z.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])},z.prototype.set=function(G){this.assertNotDisposed();for(var X=this.args.length,$=this.closest,ue=this.closestIdx;ue<X-1;ue++){var xe=new Map;$.set(this.args[ue],xe),$=xe}this.closestIdx=X-1,this.closest=$,$.set(this.args[X-1],G)},z.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var G=this.args.length;this.closest.delete(this.args[G-1]);for(var X=this.root,$=[X],ue=0;ue<G-1;ue++)X=X.get(this.args[ue]),$.push(X);for(ue=$.length-1;ue>0;ue--)$[ue].size===0&&$[ue-1].delete(this.args[ue-1]);this.isDisposed=!0},z.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},z}(),Promise.resolve(),typeof queueMicrotask!="undefined"||p!==void 0&&p.nextTick}).call(this,o(163))},function(c,l,o){var p;(function(d,O,g){if(d){for(var E,M={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:"'"},T={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},k={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},R=1;R<20;++R)M[111+R]="f"+R;for(R=0;R<=9;++R)M[R+96]=R.toString();re.prototype.bind=function(J,Z,Y){var z=this;return J=J instanceof Array?J:[J],z._bindMultiple.call(z,J,Z,Y),z},re.prototype.unbind=function(J,Z){return this.bind.call(this,J,function(){},Z)},re.prototype.trigger=function(J,Z){var Y=this;return Y._directMap[J+":"+Z]&&Y._directMap[J+":"+Z]({},J),Y},re.prototype.reset=function(){var J=this;return J._callbacks={},J._directMap={},J},re.prototype.stopCallback=function(J,Z){if((" "+Z.className+" ").indexOf(" mousetrap ")>-1||ie(Z,this.target))return!1;if("composedPath"in J&&typeof J.composedPath=="function"){var Y=J.composedPath()[0];Y!==J.target&&(Z=Y)}return Z.tagName=="INPUT"||Z.tagName=="SELECT"||Z.tagName=="TEXTAREA"||Z.isContentEditable},re.prototype.handleKey=function(){var J=this;return J._handleKey.apply(J,arguments)},re.addKeycodes=function(J){for(var Z in J)J.hasOwnProperty(Z)&&(M[Z]=J[Z]);E=null},re.init=function(){var J=re(O);for(var Z in J)Z.charAt(0)!=="_"&&(re[Z]=function(Y){return function(){return J[Y].apply(J,arguments)}}(Z))},re.init(),d.Mousetrap=re,c.exports&&(c.exports=re),(p=function(){return re}.call(l,o,l,c))===void 0||(c.exports=p)}function C(J,Z,Y){J.addEventListener?J.addEventListener(Z,Y,!1):J.attachEvent("on"+Z,Y)}function F(J){if(J.type=="keypress"){var Z=String.fromCharCode(J.which);return J.shiftKey||(Z=Z.toLowerCase()),Z}return M[J.which]?M[J.which]:A[J.which]?A[J.which]:String.fromCharCode(J.which).toLowerCase()}function W(J){return J=="shift"||J=="ctrl"||J=="alt"||J=="meta"}function V(J,Z,Y){return Y||(Y=function(){if(!E)for(var z in E={},M)z>95&&z<112||M.hasOwnProperty(z)&&(E[M[z]]=z);return E}()[J]?"keydown":"keypress"),Y=="keypress"&&Z.length&&(Y="keydown"),Y}function te(J,Z){var Y,z,G,X=[];for(Y=function($){return $==="+"?["+"]:($=$.replace(/\+{2}/g,"+plus")).split("+")}(J),G=0;G<Y.length;++G)z=Y[G],k[z]&&(z=k[z]),Z&&Z!="keypress"&&T[z]&&(z=T[z],X.push("shift")),W(z)&&X.push(z);return{key:z,modifiers:X,action:Z=V(z,X,Z)}}function ie(J,Z){return J!==null&&J!==O&&(J===Z||ie(J.parentNode,Z))}function re(J){var Z=this;if(J=J||O,!(Z instanceof re))return new re(J);Z.target=J,Z._callbacks={},Z._directMap={};var Y,z={},G=!1,X=!1,$=!1;function ue(ye){ye=ye||{};var je,Ae=!1;for(je in z)ye[je]?Ae=!0:z[je]=0;Ae||($=!1)}function xe(ye,je,Ae,Ue,nt,Ot){var We,Ze,gt,se,ae=[],he=Ae.type;if(!Z._callbacks[ye])return[];for(he=="keyup"&&W(ye)&&(je=[ye]),We=0;We<Z._callbacks[ye].length;++We)if(Ze=Z._callbacks[ye][We],(Ue||!Ze.seq||z[Ze.seq]==Ze.level)&&he==Ze.action&&(he=="keypress"&&!Ae.metaKey&&!Ae.ctrlKey||(gt=je,se=Ze.modifiers,gt.sort().join(",")===se.sort().join(",")))){var Te=!Ue&&Ze.combo==nt,He=Ue&&Ze.seq==Ue&&Ze.level==Ot;(Te||He)&&Z._callbacks[ye].splice(We,1),ae.push(Ze)}return ae}function me(ye,je,Ae,Ue){Z.stopCallback(je,je.target||je.srcElement,Ae,Ue)||ye(je,Ae)===!1&&(function(nt){nt.preventDefault?nt.preventDefault():nt.returnValue=!1}(je),function(nt){nt.stopPropagation?nt.stopPropagation():nt.cancelBubble=!0}(je))}function Pe(ye){typeof ye.which!="number"&&(ye.which=ye.keyCode);var je=F(ye);je&&(ye.type!="keyup"||G!==je?Z.handleKey(je,function(Ae){var Ue=[];return Ae.shiftKey&&Ue.push("shift"),Ae.altKey&&Ue.push("alt"),Ae.ctrlKey&&Ue.push("ctrl"),Ae.metaKey&&Ue.push("meta"),Ue}(ye),ye):G=!1)}function Be(ye,je,Ae,Ue){function nt(gt){return function(){$=gt,++z[ye],clearTimeout(Y),Y=setTimeout(ue,1e3)}}function Ot(gt){me(Ae,gt,ye),Ue!=="keyup"&&(G=F(gt)),setTimeout(ue,10)}z[ye]=0;for(var We=0;We<je.length;++We){var Ze=We+1===je.length?Ot:nt(Ue||te(je[We+1]).action);Se(je[We],Ze,Ue,ye,We)}}function Se(ye,je,Ae,Ue,nt){Z._directMap[ye+":"+Ae]=je;var Ot,We=(ye=ye.replace(/\s+/g," ")).split(" ");We.length>1?Be(ye,We,je,Ae):(Ot=te(ye,Ae),Z._callbacks[Ot.key]=Z._callbacks[Ot.key]||[],xe(Ot.key,Ot.modifiers,{type:Ot.action},Ue,ye,nt),Z._callbacks[Ot.key][Ue?"unshift":"push"]({callback:je,modifiers:Ot.modifiers,action:Ot.action,seq:Ue,level:nt,combo:ye}))}Z._handleKey=function(ye,je,Ae){var Ue,nt=xe(ye,je,Ae),Ot={},We=0,Ze=!1;for(Ue=0;Ue<nt.length;++Ue)nt[Ue].seq&&(We=Math.max(We,nt[Ue].level));for(Ue=0;Ue<nt.length;++Ue)if(nt[Ue].seq){if(nt[Ue].level!=We)continue;Ze=!0,Ot[nt[Ue].seq]=1,me(nt[Ue].callback,Ae,nt[Ue].combo,nt[Ue].seq)}else Ze||me(nt[Ue].callback,Ae,nt[Ue].combo);var gt=Ae.type=="keypress"&&X;Ae.type!=$||W(ye)||gt||ue(Ot),X=Ze&&Ae.type=="keydown"},Z._bindMultiple=function(ye,je,Ae){for(var Ue=0;Ue<ye.length;++Ue)Se(ye[Ue],je,Ae)},C(J,"keypress",Pe),C(J,"keydown",Pe),C(J,"keyup",Pe)}})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)},function(c,l,o){var p=o(7),d=o(34),O=o(30),g=o(33),E=p.TypeError;c.exports=function(M,A){var T,k;if(A==="string"&&O(T=M.toString)&&!g(k=d(T,M))||O(T=M.valueOf)&&!g(k=d(T,M))||A!=="string"&&O(T=M.toString)&&!g(k=d(T,M)))return k;throw E("Can't convert object to primitive value")}},function(c,l,o){var p=o(7),d=o(30),O=o(92),g=p.WeakMap;c.exports=d(g)&&/native code/.test(O(g))},function(c,l,o){var p=o(36),d=o(38),O=o(32),g=o(41),E=o(77);c.exports=p?Object.defineProperties:function(M,A){O(M);for(var T,k=g(A),R=E(A),C=R.length,F=0;C>F;)d.f(M,T=R[F++],k[T]);return M}},function(c,l,o){var p=o(7);c.exports=p},function(c,l,o){var p=o(7),d=o(96),O=o(99),g=o(33),E=o(28)("species"),M=p.Array;c.exports=function(A){var T;return d(A)&&(T=A.constructor,(O(T)&&(T===M||d(T.prototype))||g(T)&&(T=T[E])===null)&&(T=void 0)),T===void 0?M:T}},function(c,l,o){var p=o(113),d=o(97);c.exports=p?{}.toString:function(){return"[object "+d(this)+"]"}},function(c,l,o){var p=o(142).IteratorPrototype,d=o(60),O=o(69),g=o(78),E=o(80),M=function(){return this};c.exports=function(A,T,k,R){var C=T+" Iterator";return A.prototype=d(p,{next:O(+!R,k)}),g(A,C,!1,!0),E[C]=M,A}},function(c,l,o){var p=o(7),d=o(30),O=p.String,g=p.TypeError;c.exports=function(E){if(typeof E=="object"||d(E))return E;throw g("Can't set "+O(E)+" as a prototype")}},function(c,l,o){var p=o(16),d=o(7),O=o(15),g=o(95),E=o(42),M=o(144),A=o(117),T=o(119),k=o(30),R=o(33),C=o(18),F=o(120),W=o(78),V=o(148);c.exports=function(te,ie,re){var J=te.indexOf("Map")!==-1,Z=te.indexOf("Weak")!==-1,Y=J?"set":"add",z=d[te],G=z&&z.prototype,X=z,$={},ue=function(ye){var je=O(G[ye]);E(G,ye,ye=="add"?function(Ae){return je(this,Ae===0?0:Ae),this}:ye=="delete"?function(Ae){return!(Z&&!R(Ae))&&je(this,Ae===0?0:Ae)}:ye=="get"?function(Ae){return Z&&!R(Ae)?void 0:je(this,Ae===0?0:Ae)}:ye=="has"?function(Ae){return!(Z&&!R(Ae))&&je(this,Ae===0?0:Ae)}:function(Ae,Ue){return je(this,Ae===0?0:Ae,Ue),this})};if(g(te,!k(z)||!(Z||G.forEach&&!C(function(){new z().entries().next()}))))X=re.getConstructor(ie,te,J,Y),M.enable();else if(g(te,!0)){var xe=new X,me=xe[Y](Z?{}:-0,1)!=xe,Pe=C(function(){xe.has(1)}),Be=F(function(ye){new z(ye)}),Se=!Z&&C(function(){for(var ye=new z,je=5;je--;)ye[Y](je,je);return!ye.has(-0)});Be||((X=ie(function(ye,je){T(ye,G);var Ae=V(new z,ye,X);return je!=null&&A(je,Ae[Y],{that:Ae,AS_ENTRIES:J}),Ae})).prototype=G,G.constructor=X),(Pe||Se)&&(ue("delete"),ue("has"),J&&ue("get")),(Se||me)&&ue(Y),Z&&G.clear&&delete G.clear}return $[te]=X,p({global:!0,forced:X!=z},$),W(X,te),Z||re.setStrong(X,te,J),X}},function(c,l,o){var p=o(18),d=o(33),O=o(51),g=o(184),E=Object.isExtensible,M=p(function(){});c.exports=M||g?function(A){return!!d(A)&&(!g||O(A)!="ArrayBuffer")&&(!E||E(A))}:E},function(c,l,o){var p=o(18);c.exports=p(function(){if(typeof ArrayBuffer=="function"){var d=new ArrayBuffer(8);Object.isExtensible(d)&&Object.defineProperty(d,"a",{value:8})}})},function(c,l,o){var p=o(18);c.exports=!p(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(c,l,o){var p=o(38).f,d=o(60),O=o(149),g=o(64),E=o(119),M=o(117),A=o(116),T=o(150),k=o(36),R=o(144).fastKey,C=o(58),F=C.set,W=C.getterFor;c.exports={getConstructor:function(V,te,ie,re){var J=V(function(X,$){E(X,Z),F(X,{type:te,index:d(null),first:void 0,last:void 0,size:0}),k||(X.size=0),$!=null&&M($,X[re],{that:X,AS_ENTRIES:ie})}),Z=J.prototype,Y=W(te),z=function(X,$,ue){var xe,me,Pe=Y(X),Be=G(X,$);return Be?Be.value=ue:(Pe.last=Be={index:me=R($,!0),key:$,value:ue,previous:xe=Pe.last,next:void 0,removed:!1},Pe.first||(Pe.first=Be),xe&&(xe.next=Be),k?Pe.size++:X.size++,me!=="F"&&(Pe.index[me]=Be)),X},G=function(X,$){var ue,xe=Y(X),me=R($);if(me!=="F")return xe.index[me];for(ue=xe.first;ue;ue=ue.next)if(ue.key==$)return ue};return O(Z,{clear:function(){for(var X=Y(this),$=X.index,ue=X.first;ue;)ue.removed=!0,ue.previous&&(ue.previous=ue.previous.next=void 0),delete $[ue.index],ue=ue.next;X.first=X.last=void 0,k?X.size=0:this.size=0},delete:function(X){var $=this,ue=Y($),xe=G($,X);if(xe){var me=xe.next,Pe=xe.previous;delete ue.index[xe.index],xe.removed=!0,Pe&&(Pe.next=me),me&&(me.previous=Pe),ue.first==xe&&(ue.first=me),ue.last==xe&&(ue.last=Pe),k?ue.size--:$.size--}return!!xe},forEach:function(X){for(var $,ue=Y(this),xe=g(X,arguments.length>1?arguments[1]:void 0);$=$?$.next:ue.first;)for(xe($.value,$.key,this);$&&$.removed;)$=$.previous},has:function(X){return!!G(this,X)}}),O(Z,ie?{get:function(X){var $=G(this,X);return $&&$.value},set:function(X,$){return z(this,X===0?0:X,$)}}:{add:function(X){return z(this,X=X===0?0:X,X)}}),k&&p(Z,"size",{get:function(){return Y(this).size}}),J},setStrong:function(V,te,ie){var re=te+" Iterator",J=W(te),Z=W(re);A(V,te,function(Y,z){F(this,{type:re,target:Y,state:J(Y),kind:z,last:void 0})},function(){for(var Y=Z(this),z=Y.kind,G=Y.last;G&&G.removed;)G=G.previous;return Y.target&&(Y.last=G=G?G.next:Y.state.first)?z=="keys"?{value:G.key,done:!1}:z=="values"?{value:G.value,done:!1}:{value:[G.key,G.value],done:!1}:(Y.target=void 0,{value:void 0,done:!0})},ie?"entries":"values",!ie,!0),T(te)}}},function(c,l,o){var p=o(79).forEach,d=o(121)("forEach");c.exports=d?[].forEach:function(O){return p(this,O,arguments.length>1?arguments[1]:void 0)}},function(c,l,o){var p=o(7),d=o(64),O=o(34),g=o(40),E=o(189),M=o(145),A=o(99),T=o(45),k=o(63),R=o(146),C=o(118),F=p.Array;c.exports=function(W){var V=g(W),te=A(this),ie=arguments.length,re=ie>1?arguments[1]:void 0,J=re!==void 0;J&&(re=d(re,ie>2?arguments[2]:void 0));var Z,Y,z,G,X,$,ue=C(V),xe=0;if(!ue||this==F&&M(ue))for(Z=T(V),Y=te?new this(Z):F(Z);Z>xe;xe++)$=J?re(V[xe],xe):V[xe],k(Y,xe,$);else for(X=(G=R(V,ue)).next,Y=te?new this:[];!(z=O(X,G)).done;xe++)$=J?E(G,re,[z.value,xe],!0):z.value,k(Y,xe,$);return Y.length=xe,Y}},function(c,l,o){var p=o(32),d=o(147);c.exports=function(O,g,E,M){try{return M?g(p(E)[0],E[1]):g(E)}catch(A){d(O,"throw",A)}}},function(c,l,o){var p=o(18),d=o(7).RegExp;c.exports=p(function(){var O=d(".","s");return!(O.dotAll&&O.exec(`
  52. `)&&O.flags==="s")})},function(c,l,o){var p=o(18),d=o(7).RegExp;c.exports=p(function(){var O=d("(?<a>b)","g");return O.exec("b").groups.a!=="b"||"b".replace(O,"$<a>c")!=="bc"})},function(c,l,o){var p=o(16),d=o(15),O=o(56),g=o(40),E=o(45),M=o(39),A=o(18),T=o(193),k=o(121),R=o(194),C=o(195),F=o(70),W=o(196),V=[],te=d(V.sort),ie=d(V.push),re=A(function(){V.sort(void 0)}),J=A(function(){V.sort(null)}),Z=k("sort"),Y=!A(function(){if(F)return F<70;if(!(R&&R>3)){if(C)return!0;if(W)return W<603;var z,G,X,$,ue="";for(z=65;z<76;z++){switch(G=String.fromCharCode(z),z){case 66:case 69:case 70:case 72:X=3;break;case 68:case 71:X=4;break;default:X=2}for($=0;$<47;$++)V.push({k:G+$,v:X})}for(V.sort(function(xe,me){return me.v-xe.v}),$=0;$<V.length;$++)G=V[$].k.charAt(0),ue.charAt(ue.length-1)!==G&&(ue+=G);return ue!=="DGBEFHACIJK"}});p({target:"Array",proto:!0,forced:re||!J||!Z||!Y},{sort:function(z){z!==void 0&&O(z);var G=g(this);if(Y)return z===void 0?te(G):te(G,z);var X,$,ue=[],xe=E(G);for($=0;$<xe;$++)$ in G&&ie(ue,G[$]);for(T(ue,function(me){return function(Pe,Be){return Be===void 0?-1:Pe===void 0?1:me!==void 0?+me(Pe,Be)||0:M(Pe)>M(Be)?1:-1}}(z)),X=ue.length,$=0;$<X;)G[$]=ue[$++];for(;$<xe;)delete G[$++];return G}})},function(c,l,o){var p=o(114),d=Math.floor,O=function(M,A){var T=M.length,k=d(T/2);return T<8?g(M,A):E(M,O(p(M,0,k),A),O(p(M,k),A),A)},g=function(M,A){for(var T,k,R=M.length,C=1;C<R;){for(k=C,T=M[C];k&&A(M[k-1],T)>0;)M[k]=M[--k];k!==C++&&(M[k]=T)}return M},E=function(M,A,T,k){for(var R=A.length,C=T.length,F=0,W=0;F<R||W<C;)M[F+W]=F<R&&W<C?k(A[F],T[W])<=0?A[F++]:T[W++]:F<R?A[F++]:T[W++];return M};c.exports=O},function(c,l,o){var p=o(55).match(/firefox\/(\d+)/i);c.exports=!!p&&+p[1]},function(c,l,o){var p=o(55);c.exports=/MSIE|Trident/.test(p)},function(c,l,o){var p=o(55).match(/AppleWebKit\/(\d+)\./);c.exports=!!p&&+p[1]},function(c,l,o){var p=o(7),d=o(159),O=p.TypeError;c.exports=function(g){if(d(g))throw O("The method doesn't accept regular expressions");return g}},function(c,l,o){var p=o(28)("match");c.exports=function(d){var O=/./;try{"/./"[d](O)}catch(g){try{return O[p]=!1,"/./"[d](O)}catch(E){}}return!1}},function(c,l,o){o(16)({target:"Number",stat:!0},{isNaN:function(p){return p!=p}})},function(c,l,o){var p=o(73).PROPER,d=o(18),O=o(162);c.exports=function(g){return d(function(){return!!O[g]()||"​…᠎"[g]()!=="​…᠎"||p&&O[g].name!==g})}},function(c,l,o){var p=o(15),d=o(40),O=Math.floor,g=p("".charAt),E=p("".replace),M=p("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;c.exports=function(k,R,C,F,W,V){var te=C+k.length,ie=F.length,re=T;return W!==void 0&&(W=d(W),re=A),E(V,re,function(J,Z){var Y;switch(g(Z,0)){case"$":return"$";case"&":return k;case"`":return M(R,0,C);case"'":return M(R,te);case"<":Y=W[M(Z,1,-1)];break;default:var z=+Z;if(z===0)return J;if(z>ie){var G=O(z/10);return G===0?J:G<=ie?F[G-1]===void 0?g(Z,1):F[G-1]+g(Z,1):J}Y=F[z-1]}return Y===void 0?"":Y})}},function(c,l,o){var p=o(36),d=o(15),O=o(34),g=o(18),E=o(77),M=o(112),A=o(84),T=o(40),k=o(85),R=Object.assign,C=Object.defineProperty,F=d([].concat);c.exports=!R||g(function(){if(p&&R({b:1},R(C({},"a",{enumerable:!0,get:function(){C(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var W={},V={},te=Symbol(),ie="abcdefghijklmnopqrst";return W[te]=7,ie.split("").forEach(function(re){V[re]=re}),R({},W)[te]!=7||E(R({},V)).join("")!=ie})?function(W,V){for(var te=T(W),ie=arguments.length,re=1,J=M.f,Z=A.f;ie>re;)for(var Y,z=k(arguments[re++]),G=J?F(E(z),J(z)):E(z),X=G.length,$=0;X>$;)Y=G[$++],p&&!O(Z,z,Y)||(te[Y]=z[Y]);return te}:R},function(c,l,o){var p=o(7),d=o(15),O=o(56),g=o(33),E=o(35),M=o(98),A=p.Function,T=d([].concat),k=d([].join),R={},C=function(F,W,V){if(!E(R,W)){for(var te=[],ie=0;ie<W;ie++)te[ie]="a["+ie+"]";R[W]=A("C,a","return new C("+k(te,",")+")")}return R[W](F,V)};c.exports=A.bind||function(F){var W=O(this),V=W.prototype,te=M(arguments,1),ie=function(){var re=T(te,M(arguments));return this instanceof ie?C(W,re.length,re):W.apply(F,re)};return g(V)&&(ie.prototype=V),ie}},function(c,l,o){var p=o(35);c.exports=function(d){return d!==void 0&&(p(d,"value")||p(d,"writable"))}},function(c,l,o){var p=o(15),d=o(44),O=o(39),g=/"/g,E=p("".replace);c.exports=function(M,A,T,k){var R=O(d(M)),C="<"+A;return T!==""&&(C+=" "+T+'="'+E(O(k),g,"&quot;")+'"'),C+">"+R+"</"+A+">"}},function(c,l,o){var p=o(18);c.exports=function(d){return p(function(){var O=""[d]('"');return O!==O.toLowerCase()||O.split('"').length>3})}},function(c,l,o){o(16)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(c,l,o){var p,d,O,g,E=o(16),M=o(71),A=o(7),T=o(46),k=o(34),R=o(209),C=o(42),F=o(149),W=o(102),V=o(78),te=o(150),ie=o(56),re=o(30),J=o(33),Z=o(119),Y=o(92),z=o(117),G=o(120),X=o(164),$=o(168).set,ue=o(210),xe=o(213),me=o(214),Pe=o(170),Be=o(215),Se=o(58),ye=o(95),je=o(28),Ae=o(216),Ue=o(128),nt=o(70),Ot=je("species"),We="Promise",Ze=Se.getterFor(We),gt=Se.set,se=Se.getterFor(We),ae=R&&R.prototype,he=R,Te=ae,He=A.TypeError,Le=A.document,wt=A.process,kt=Pe.f,St=kt,yt=!!(Le&&Le.createEvent&&A.dispatchEvent),Me=re(A.PromiseRejectionEvent),ct="unhandledrejection",le=!1,ut=ye(We,function(){var oe=Y(he),be=oe!==String(he);if(!be&&nt===66||M&&!Te.finally)return!0;if(nt>=51&&/native code/.test(oe))return!1;var Ve=new he(function(lt){lt(1)}),Ke=function(lt){lt(function(){},function(){})};return(Ve.constructor={})[Ot]=Ke,!(le=Ve.then(function(){})instanceof Ke)||!be&&Ae&&!Me}),It=ut||!G(function(oe){he.all(oe).catch(function(){})}),on=function(oe){var be;return!(!J(oe)||!re(be=oe.then))&&be},Lt=function(oe,be){if(!oe.notified){oe.notified=!0;var Ve=oe.reactions;ue(function(){for(var Ke=oe.value,lt=oe.state==1,Gt=0;Ve.length>Gt;){var Xn,Qn,Cn,zn=Ve[Gt++],at=lt?zn.ok:zn.fail,mt=zn.resolve,Et=zn.reject,Nt=zn.domain;try{at?(lt||(oe.rejection===2&&Dt(oe),oe.rejection=1),at===!0?Xn=Ke:(Nt&&Nt.enter(),Xn=at(Ke),Nt&&(Nt.exit(),Cn=!0)),Xn===zn.promise?Et(He("Promise-chain cycle")):(Qn=on(Xn))?k(Qn,Xn,mt,Et):mt(Xn)):Et(Ke)}catch(fn){Nt&&!Cn&&Nt.exit(),Et(fn)}}oe.reactions=[],oe.notified=!1,be&&!oe.rejection&&dn(oe)})}},qt=function(oe,be,Ve){var Ke,lt;yt?((Ke=Le.createEvent("Event")).promise=be,Ke.reason=Ve,Ke.initEvent(oe,!1,!0),A.dispatchEvent(Ke)):Ke={promise:be,reason:Ve},!Me&&(lt=A["on"+oe])?lt(Ke):oe===ct&&me("Unhandled promise rejection",Ve)},dn=function(oe){k($,A,function(){var be,Ve=oe.facade,Ke=oe.value;if(bn(oe)&&(be=Be(function(){Ue?wt.emit("unhandledRejection",Ke,Ve):qt(ct,Ve,Ke)}),oe.rejection=Ue||bn(oe)?2:1,be.error))throw be.value})},bn=function(oe){return oe.rejection!==1&&!oe.parent},Dt=function(oe){k($,A,function(){var be=oe.facade;Ue?wt.emit("rejectionHandled",be):qt("rejectionhandled",be,oe.value)})},Nn=function(oe,be,Ve){return function(Ke){oe(be,Ke,Ve)}},Q=function(oe,be,Ve){oe.done||(oe.done=!0,Ve&&(oe=Ve),oe.value=be,oe.state=2,Lt(oe,!0))},de=function(oe,be,Ve){if(!oe.done){oe.done=!0,Ve&&(oe=Ve);try{if(oe.facade===be)throw He("Promise can't be resolved itself");var Ke=on(be);Ke?ue(function(){var lt={done:!1};try{k(Ke,be,Nn(de,lt,oe),Nn(Q,lt,oe))}catch(Gt){Q(lt,Gt,oe)}}):(oe.value=be,oe.state=1,Lt(oe,!1))}catch(lt){Q({done:!1},lt,oe)}}};if(ut&&(Te=(he=function(oe){Z(this,Te),ie(oe),k(p,this);var be=Ze(this);try{oe(Nn(de,be),Nn(Q,be))}catch(Ve){Q(be,Ve)}}).prototype,(p=function(oe){gt(this,{type:We,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=F(Te,{then:function(oe,be){var Ve=se(this),Ke=Ve.reactions,lt=kt(X(this,he));return lt.ok=!re(oe)||oe,lt.fail=re(be)&&be,lt.domain=Ue?wt.domain:void 0,Ve.parent=!0,Ke[Ke.length]=lt,Ve.state!=0&&Lt(Ve,!1),lt.promise},catch:function(oe){return this.then(void 0,oe)}}),d=function(){var oe=new p,be=Ze(oe);this.promise=oe,this.resolve=Nn(de,be),this.reject=Nn(Q,be)},Pe.f=kt=function(oe){return oe===he||oe===O?new d(oe):St(oe)},!M&&re(R)&&ae!==Object.prototype)){g=ae.then,le||(C(ae,"then",function(oe,be){var Ve=this;return new he(function(Ke,lt){k(g,Ve,Ke,lt)}).then(oe,be)},{unsafe:!0}),C(ae,"catch",Te.catch,{unsafe:!0}));try{delete ae.constructor}catch(oe){}W&&W(ae,Te)}E({global:!0,wrap:!0,forced:ut},{Promise:he}),V(he,We,!1,!0),te(We),O=T(We),E({target:We,stat:!0,forced:ut},{reject:function(oe){var be=kt(this);return k(be.reject,void 0,oe),be.promise}}),E({target:We,stat:!0,forced:M||ut},{resolve:function(oe){return xe(M&&this===O?he:this,oe)}}),E({target:We,stat:!0,forced:It},{all:function(oe){var be=this,Ve=kt(be),Ke=Ve.resolve,lt=Ve.reject,Gt=Be(function(){var Xn=ie(be.resolve),Qn=[],Cn=0,zn=1;z(oe,function(at){var mt=Cn++,Et=!1;zn++,k(Xn,be,at).then(function(Nt){Et||(Et=!0,Qn[mt]=Nt,--zn||Ke(Qn))},lt)}),--zn||Ke(Qn)});return Gt.error&&lt(Gt.value),Ve.promise},race:function(oe){var be=this,Ve=kt(be),Ke=Ve.reject,lt=Be(function(){var Gt=ie(be.resolve);z(oe,function(Xn){k(Gt,be,Xn).then(Ve.resolve,Ke)})});return lt.error&&Ke(lt.value),Ve.promise}})},function(c,l,o){var p=o(7);c.exports=p.Promise},function(c,l,o){var p,d,O,g,E,M,A,T,k=o(7),R=o(64),C=o(50).f,F=o(168).set,W=o(169),V=o(211),te=o(212),ie=o(128),re=k.MutationObserver||k.WebKitMutationObserver,J=k.document,Z=k.process,Y=k.Promise,z=C(k,"queueMicrotask"),G=z&&z.value;G||(p=function(){var X,$;for(ie&&(X=Z.domain)&&X.exit();d;){$=d.fn,d=d.next;try{$()}catch(ue){throw d?g():O=void 0,ue}}O=void 0,X&&X.enter()},W||ie||te||!re||!J?!V&&Y&&Y.resolve?((A=Y.resolve(void 0)).constructor=Y,T=R(A.then,A),g=function(){T(p)}):ie?g=function(){Z.nextTick(p)}:(F=R(F,k),g=function(){F(p)}):(E=!0,M=J.createTextNode(""),new re(p).observe(M,{characterData:!0}),g=function(){M.data=E=!E})),c.exports=G||function(X){var $={fn:X,next:void 0};O&&(O.next=$),d||(d=$,g()),O=$}},function(c,l,o){var p=o(55),d=o(7);c.exports=/ipad|iphone|ipod/i.test(p)&&d.Pebble!==void 0},function(c,l,o){var p=o(55);c.exports=/web0s(?!.*chrome)/i.test(p)},function(c,l,o){var p=o(32),d=o(33),O=o(170);c.exports=function(g,E){if(p(g),d(E)&&E.constructor===g)return E;var M=O.f(g);return(0,M.resolve)(E),M.promise}},function(c,l,o){var p=o(7);c.exports=function(d,O){var g=p.console;g&&g.error&&(arguments.length==1?g.error(d):g.error(d,O))}},function(c,l){c.exports=function(o){try{return{error:!1,value:o()}}catch(p){return{error:!0,value:p}}}},function(c,l){c.exports=typeof window=="object"},function(c,l,o){var p=o(40),d=o(75),O=o(45);c.exports=function(g){for(var E=p(this),M=O(E),A=arguments.length,T=d(A>1?arguments[1]:void 0,M),k=A>2?arguments[2]:void 0,R=k===void 0?M:d(k,M);R>T;)E[T++]=g;return E}},function(c,l,o){var p=o(16),d=o(7),O=o(15),g=o(59),E=o(160),M=o(219),A=o(18),T=d.RangeError,k=d.String,R=Math.floor,C=O(M),F=O("".slice),W=O(1 .toFixed),V=function(J,Z,Y){return Z===0?Y:Z%2==1?V(J,Z-1,Y*J):V(J*J,Z/2,Y)},te=function(J,Z,Y){for(var z=-1,G=Y;++z<6;)G+=Z*J[z],J[z]=G%1e7,G=R(G/1e7)},ie=function(J,Z){for(var Y=6,z=0;--Y>=0;)z+=J[Y],J[Y]=R(z/Z),z=z%Z*1e7},re=function(J){for(var Z=6,Y="";--Z>=0;)if(Y!==""||Z===0||J[Z]!==0){var z=k(J[Z]);Y=Y===""?z:Y+C("0",7-z.length)+z}return Y};p({target:"Number",proto:!0,forced:A(function(){return W(8e-5,3)!=="0.000"||W(.9,0)!=="1"||W(1.255,2)!=="1.25"||W(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!A(function(){W({})})},{toFixed:function(J){var Z,Y,z,G,X=E(this),$=g(J),ue=[0,0,0,0,0,0],xe="",me="0";if($<0||$>20)throw T("Incorrect fraction digits");if(X!=X)return"NaN";if(X<=-1e21||X>=1e21)return k(X);if(X<0&&(xe="-",X=-X),X>1e-21)if(Y=(Z=function(Pe){for(var Be=0,Se=Pe;Se>=4096;)Be+=12,Se/=4096;for(;Se>=2;)Be+=1,Se/=2;return Be}(X*V(2,69,1))-69)<0?X*V(2,-Z,1):X/V(2,Z,1),Y*=4503599627370496,(Z=52-Z)>0){for(te(ue,0,Y),z=$;z>=7;)te(ue,1e7,0),z-=7;for(te(ue,V(10,z,1),0),z=Z-1;z>=23;)ie(ue,1<<23),z-=23;ie(ue,1<<z),te(ue,1,1),ie(ue,2),me=re(ue)}else te(ue,0,Y),te(ue,1<<-Z,0),me=re(ue)+C("0",$);return me=$>0?xe+((G=me.length)<=$?"0."+C("0",$-G)+me:F(me,0,G-$)+"."+F(me,G-$)):xe+me}})},function(c,l,o){var p=o(7),d=o(59),O=o(39),g=o(44),E=p.RangeError;c.exports=function(M){var A=O(g(this)),T="",k=d(M);if(k<0||k==1/0)throw E("Wrong number of repetitions");for(;k>0;(k>>>=1)&&(A+=A))1&k&&(T+=A);return T}},function(c,l,o){var p=o(36),d=o(15),O=o(77),g=o(41),E=d(o(84).f),M=d([].push),A=function(T){return function(k){for(var R,C=g(k),F=O(C),W=F.length,V=0,te=[];W>V;)R=F[V++],p&&!E(C,R)||M(te,T?[R,C[R]]:C[R]);return te}};c.exports={entries:A(!0),values:A(!1)}},function(c,l){c.exports=function(o){return o.webpackPolyfill||(o.deprecate=function(){},o.paths=[],o.children||(o.children=[]),Object.defineProperty(o,"loaded",{enumerable:!0,get:function(){return o.l}}),Object.defineProperty(o,"id",{enumerable:!0,get:function(){return o.i}}),o.webpackPolyfill=1),o}},function(c,l,o){o.r(l),o.d(l,"observer",function(){return ui}),o.d(l,"LogicFlow",function(){return Yg}),o.d(l,"h",function(){return le.g}),o.d(l,"LogicFlowUtil",function(){return p}),o.d(l,"BaseNode",function(){return qi}),o.d(l,"RectNode",function(){return Iy}),o.d(l,"CircleNode",function(){return Fy}),o.d(l,"PolygonNode",function(){return Yy}),o.d(l,"DiamondNode",function(){return $y}),o.d(l,"EllipseNode",function(){return eg}),o.d(l,"TextNode",function(){return rg}),o.d(l,"HtmlNode",function(){return ag}),o.d(l,"BaseEdge",function(){return Zf}),o.d(l,"LineEdge",function(){return Og}),o.d(l,"PolylineEdge",function(){return jg}),o.d(l,"BezierEdge",function(){return kg}),o.d(l,"Arrow",function(){return Cx}),o.d(l,"BaseEdgeModel",function(){return df}),o.d(l,"BezierEdgeModel",function(){return Gh}),o.d(l,"LineEdgeModel",function(){return Fs}),o.d(l,"PolylineEdgeModel",function(){return to}),o.d(l,"BaseNodeModel",function(){return $i}),o.d(l,"CircleNodeModel",function(){return Kh}),o.d(l,"DiamondNodeModel",function(){return Qh}),o.d(l,"EllipseNodeModel",function(){return ry}),o.d(l,"PolygonNodeModel",function(){return cy}),o.d(l,"RectNodeModel",function(){return dy}),o.d(l,"TextNodeModel",function(){return vy}),o.d(l,"HtmlNodeModel",function(){return _y}),o.d(l,"EditConfigModel",function(){return Ic}),o.d(l,"GraphModel",function(){return vv}),o.d(l,"SnaplineModel",function(){return eb}),o.d(l,"Keyboard",function(){return Fb}),o.d(l,"get",function(){return Fv}),o.d(l,"defaults",function(){return Gv}),o.d(l,"ElementState",function(){return cn}),o.d(l,"ModelType",function(){return Yt}),o.d(l,"ElementType",function(){return Bn}),o.d(l,"EventType",function(){return pt}),o.d(l,"formateAnchorConnectValidateData",function(){return Su});var p={};o.r(p),o.d(p,"createUuid",function(){return qo}),o.d(p,"refreshGraphId",function(){return Qd}),o.d(p,"StepDrag",function(){return no}),o.d(p,"setupEdgeModel",function(){return ap}),o.d(p,"isBboxOverLapping",function(){return No}),o.d(p,"filterRepeatPoints",function(){return Ut}),o.d(p,"getSimplePolyline",function(){return sp}),o.d(p,"getExpandedBBox",function(){return dr}),o.d(p,"pointDirection",function(){return Ef}),o.d(p,"getExpandedBBoxPoint",function(){return nn}),o.d(p,"mergeBBox",function(){return Sf}),o.d(p,"getBBoxOfPoints",function(){return Xi}),o.d(p,"getPointsFromBBox",function(){return bi}),o.d(p,"isPointOutsideBBox",function(){return ja}),o.d(p,"getBBoxXCrossPoints",function(){return cp}),o.d(p,"getBBoxYCrossPoints",function(){return fp}),o.d(p,"getBBoxCrossPointsByPoint",function(){return lp}),o.d(p,"estimateDistance",function(){return Tu}),o.d(p,"costByPoints",function(){return Ys}),o.d(p,"heuristicCostEstimate",function(){return jf}),o.d(p,"rebuildPath",function(){return pp}),o.d(p,"removeClosePointFromOpenList",function(){return dp}),o.d(p,"isSegmentsIntersected",function(){return Tn}),o.d(p,"isSegmentCrossingBBox",function(){return hr}),o.d(p,"getNextNeighborPoints",function(){return hp}),o.d(p,"pathFinder",function(){return Pf}),o.d(p,"getBoxByOriginNode",function(){return Af}),o.d(p,"pointFilter",function(){return Mf}),o.d(p,"getPolylinePoints",function(){return Ws}),o.d(p,"getLongestEdge",function(){return kf}),o.d(p,"isSegmentsInNode",function(){return Vs}),o.d(p,"isSegmentsCrossNode",function(){return _i}),o.d(p,"getCrossPointInRect",function(){return Tf}),o.d(p,"segmentDirection",function(){return Du}),o.d(p,"points2PointsList",function(){return Jo}),o.d(p,"getSimplePoints",function(){return yp}),o.d(p,"getBytesLength",function(){return Df}),o.d(p,"getTextWidth",function(){return fh}),o.d(p,"getAppendAttributes",function(){return vp}),o.d(p,"getBezierControlPoints",function(){return Pa}),o.d(p,"getBezierPoints",function(){return Aa}),o.d(p,"getEndTangent",function(){return Cf}),o.d(p,"getClosestPointOfPolyline",function(){return ka}),o.d(p,"pickEdgeConfig",function(){return mp}),o.d(p,"twoPointDistance",function(){return Rf}),o.d(p,"createEdgeGenerator",function(){return Er}),o.d(p,"snapToGrid",function(){return yi}),o.d(p,"getGridOffset",function(){return xs}),o.d(p,"sampleCubic",function(){return Pn}),o.d(p,"getThetaOfVector",function(){return Of}),o.d(p,"degrees",function(){return wf}),o.d(p,"Vector",function(){return rr}),o.d(p,"Point",function(){return a}),o.d(p,"Matrix",function(){return Ro}),o.d(p,"RotateMatrix",function(){return Oi}),o.d(p,"ScaleMatrix",function(){return Ff}),o.d(p,"TranslateMatrix",function(){return Cu});var d=o(1),O=o(10);if(!O.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!d.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var g=o(43),E=Object(g.b)("observerBatching");function M(t){t()}var A=!1;function T(){return A}function k(t){return Object(d.t)(t)}var R,C=1e4,F=new Set;function W(){R===void 0&&(R=setTimeout(V,1e4))}function V(){R=void 0;var t=Date.now();F.forEach(function(e){var n=e.current;n&&t>=n.cleanAt&&(n.reaction.dispose(),e.current=null,F.delete(e))}),F.size>0&&W()}var te=!1,ie=[],re={};function J(t){return"observer"+t}function Z(t,e,n){e===void 0&&(e="observed"),n===void 0&&(n=re),T();var r,u=function(x){return function(){te?ie.push(x):x()}}((n.useForceUpdate||g.d)()),i=O.d.useRef(null);if(!i.current){var s=new d.c(J(e),function(){h.mounted?u():(s.dispose(),i.current=null)}),h=function(x){return{cleanAt:Date.now()+C,reaction:x}}(s);i.current=h,r=i,F.add(r),W()}var v=i.current.reaction;return O.d.useDebugValue(v,k),O.d.useEffect(function(){var x;return x=i,F.delete(x),i.current?i.current.mounted=!0:(i.current={reaction:new d.c(J(e),function(){u()}),cleanAt:1/0},u()),function(){i.current.reaction.dispose(),i.current=null}},[]),function(x){te=!0,ie=[];try{var S=x();te=!1;var D=ie.length>0?ie:void 0;return O.d.useLayoutEffect(function(){D&&D.forEach(function(I){return I()})},[D]),S}finally{te=!1}}(function(){var x,S;if(v.track(function(){try{x=t()}catch(D){S=D}}),S)throw S;return x})}var Y=function(){return Y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var u in e=arguments[n])Object.prototype.hasOwnProperty.call(e,u)&&(t[u]=e[u]);return t},Y.apply(this,arguments)};function z(t,e){var n,r,u,i=Y({forwardRef:!1},e),s=t.displayName||t.name,h=function(v,x){return Z(function(){return t(v,x)},s)};return h.displayName=s,n=i.forwardRef?Object(O.f)(Object(O.e)(h)):Object(O.f)(h),r=t,u=n,Object.keys(r).forEach(function(v){G[v]||Object.defineProperty(u,v,Object.getOwnPropertyDescriptor(r,v))}),n.displayName=s,n}var G={$$typeof:!0,render:!0,compare:!0,type:!0};function X(t){var e=t.children,n=t.render,r=e||n;return typeof r!="function"?null:Z(r)}function $(t,e,n,r,u){var i=e==="children"?"render":"children",s=typeof t[e]=="function",h=typeof t[i]=="function";return s&&h?new Error("MobX Observer: Do not use children and render in the same time in`"+n):s||h?null:new Error("Invalid prop `"+u+"` of type `"+typeof t[e]+"` supplied to `"+n+"`, expected `function`.")}X.propTypes={children:$,render:$},X.displayName="Observer";var ue;(ue=O.g)||(ue=M),Object(d.n)({reactionScheduler:ue}),Object(g.a)()[E]=!0;var xe=0,me={};function Pe(t){return me[t]||(me[t]=function(e){if(typeof Symbol=="function")return Symbol(e);var n="__$mobx-react "+e+" ("+xe+")";return xe++,n}(t)),me[t]}function Be(t,e){if(Se(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var u=0;u<n.length;u++)if(!Object.hasOwnProperty.call(e,n[u])||!Se(t[n[u]],e[n[u]]))return!1;return!0}function Se(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ye(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var je=Pe("patchMixins"),Ae=Pe("patchedDefinition");function Ue(t,e){for(var n=this,r=arguments.length,u=new Array(r>2?r-2:0),i=2;i<r;i++)u[i-2]=arguments[i];e.locks++;try{var s;return t!=null&&(s=t.apply(this,u)),s}finally{e.locks--,e.locks===0&&e.methods.forEach(function(h){h.apply(n,u)})}}function nt(t,e){return function(){for(var n=arguments.length,r=new Array(n),u=0;u<n;u++)r[u]=arguments[u];Ue.call.apply(Ue,[this,t,e].concat(r))}}function Ot(t,e,n){var r=function(h,v){var x=h[je]=h[je]||{},S=x[v]=x[v]||{};return S.locks=S.locks||0,S.methods=S.methods||[],S}(t,e);r.methods.indexOf(n)<0&&r.methods.push(n);var u=Object.getOwnPropertyDescriptor(t,e);if(!u||!u[Ae]){var i=t[e],s=We(t,e,u?u.enumerable:void 0,r,i);Object.defineProperty(t,e,s)}}function We(t,e,n,r,u){var i,s=nt(u,r);return(i={})[Ae]=!0,i.get=function(){return s},i.set=function(h){if(this===t)s=nt(h,r);else{var v=We(this,e,n,r,h);Object.defineProperty(this,e,v)}},i.configurable=!0,i.enumerable=n,i}var Ze=d.a||"$mobx",gt=Pe("isMobXReactObserver"),se=Pe("isUnmounted"),ae=Pe("skipRender"),he=Pe("isForcingUpdate");function Te(t){var e=t.prototype;if(t[gt]?He(e):t[gt]=!0,e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==O.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==wt)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=wt;kt(e,"props"),kt(e,"state");var n=e.render;return e.render=function(){return Le.call(this,n)},Ot(e,"componentWillUnmount",function(){var r;(r=this.render[Ze])===null||r===void 0||r.dispose(),this[se]=!0,!this.render[Ze]&&He(this)}),t}function He(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function Le(t){var e=this;ye(this,ae,!1),ye(this,he,!1);var n=He(this),r=t.bind(this),u=!1,i=new d.c(n+".render()",function(){if(!u&&(u=!0,e[se]!==!0)){var h=!0;try{ye(e,he,!0),e[ae]||O.a.prototype.forceUpdate.call(e),h=!1}finally{ye(e,he,!1),h&&i.dispose()}}});function s(){u=!1;var h=void 0,v=void 0;if(i.track(function(){try{v=Object(d.d)(!1,r)}catch(x){h=x}}),h)throw h;return v}return i.reactComponent=this,s[Ze]=i,this.render=s,s.call(this)}function wt(t,e){return this.state!==e||!Be(this.props,t)}function kt(t,e){var n=Pe("reactProp_"+e+"_valueHolder"),r=Pe("reactProp_"+e+"_atomHolder");function u(){return this[r]||ye(this,r,Object(d.o)("reactive "+e)),this[r]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var i=!1;return d.f&&d.e&&(i=Object(d.f)(!0)),u.call(this).reportObserved(),d.f&&d.e&&Object(d.e)(i),this[n]},set:function(i){this[he]||Be(this[n],i)?ye(this,n,i):(ye(this,n,i),ye(this,ae,!0),u.call(this).reportChanged(),ye(this,ae,!1))}})}var St=typeof Symbol=="function"&&Symbol.for,yt=St?Symbol.for("react.forward_ref"):typeof O.e=="function"&&Object(O.e)(function(t){return null}).$$typeof,Me=St?Symbol.for("react.memo"):typeof O.f=="function"&&Object(O.f)(function(t){return null}).$$typeof;function ct(t){if(t.isMobxInjector,Me&&t.$$typeof===Me)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(yt&&t.$$typeof===yt){var e=t.render;if(typeof e!="function")throw new Error("render property of ForwardRef was not a function");return Object(O.e)(function(){var n=arguments;return Object(O.c)(X,null,function(){return e.apply(void 0,n)})})}return typeof t!="function"||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(O.a,t)?Te(t):z(t)}if(!O.a)throw new Error("mobx-react requires React to be available");if(!d.C)throw new Error("mobx-react requires mobx to be available");var le=o(0);o(4),o(8),o(2),o(3),o(52),o(6),o(5),o(11),o(37),o(27),o(21),o(20),o(24),o(22),o(25),o(9),o(17),o(23),o(19),o(192),o(156),o(104),o(157),o(158),o(199),o(61);var ut=function(t,e){for(var n=-1,r=t==null?0:t.length,u=Array(r);++n<r;)u[n]=e(t[n],n,t);return u},It=function(){this.__data__=[],this.size=0},on=function(t,e){return t===e||t!=t&&e!=e},Lt=function(t,e){for(var n=t.length;n--;)if(on(t[n][0],e))return n;return-1},qt=Array.prototype.splice,dn=function(t){var e=this.__data__,n=Lt(e,t);return!(n<0)&&(n==e.length-1?e.pop():qt.call(e,n,1),--this.size,!0)},bn=function(t){var e=this.__data__,n=Lt(e,t);return n<0?void 0:e[n][1]},Dt=function(t){return Lt(this.__data__,t)>-1},Nn=function(t,e){var n=this.__data__,r=Lt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Q(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Q.prototype.clear=It,Q.prototype.delete=dn,Q.prototype.get=bn,Q.prototype.has=Dt,Q.prototype.set=Nn;var de=Q,oe=function(){this.__data__=new de,this.size=0},be=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Ve=function(t){return this.__data__.get(t)},Ke=function(t){return this.__data__.has(t)},lt=o(31),Gt=lt.a.Symbol,Xn=Object.prototype,Qn=Xn.hasOwnProperty,Cn=Xn.toString,zn=Gt?Gt.toStringTag:void 0,at=function(t){var e=Qn.call(t,zn),n=t[zn];try{t[zn]=void 0;var r=!0}catch(i){}var u=Cn.call(t);return r&&(e?t[zn]=n:delete t[zn]),u},mt=Object.prototype.toString,Et=function(t){return mt.call(t)},Nt=Gt?Gt.toStringTag:void 0,fn=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Nt&&Nt in Object(t)?at(t):Et(t)},xn=function(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")},Oo,io=function(t){if(!xn(t))return!1;var e=fn(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"},wo=lt.a["__core-js_shared__"],ai=(Oo=/[^.]+$/.exec(wo&&wo.keys&&wo.keys.IE_PROTO||""))?"Symbol(src)_1."+Oo:"",Oc=function(t){return!!ai&&ai in t},Yu=Function.prototype.toString,Ir=function(t){if(t!=null){try{return Yu.call(t)}catch(e){}try{return t+""}catch(e){}}return""},ki=/^\[object .+?Constructor\]$/,ft=Function.prototype,wc=Object.prototype,Wu=ft.toString,Vu=wc.hasOwnProperty,gr=RegExp("^"+Wu.call(Vu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pr=function(t){return!(!xn(t)||Oc(t))&&(io(t)?gr:ki).test(Ir(t))},tu=function(t,e){return t==null?void 0:t[e]},$r=function(t,e){var n=tu(t,e);return Pr(n)?n:void 0},Lr=$r(lt.a,"Map"),qr=$r(Object,"create"),Ku=function(){this.__data__=qr?qr(null):{},this.size=0},$u=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$a=Object.prototype.hasOwnProperty,Ti=function(t){var e=this.__data__;if(qr){var n=e[t];return n==="__lodash_hash_undefined__"?void 0:n}return $a.call(e,t)?e[t]:void 0},qa=Object.prototype.hasOwnProperty,qu=function(t){var e=this.__data__;return qr?e[t]!==void 0:qa.call(e,t)},xc=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=qr&&e===void 0?"__lodash_hash_undefined__":e,this};function Bo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Bo.prototype.clear=Ku,Bo.prototype.delete=$u,Bo.prototype.get=Ti,Bo.prototype.has=qu,Bo.prototype.set=xc;var Za=Bo,xo=function(){this.size=0,this.__data__={hash:new Za,map:new(Lr||de),string:new Za}},Zu=function(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null},nu=function(t,e){var n=t.__data__;return Zu(e)?n[typeof e=="string"?"string":"hash"]:n.map},Ju=function(t){var e=nu(this,t).delete(t);return this.size-=e?1:0,e},Qu=function(t){return nu(this,t).get(t)},Ec=function(t){return nu(this,t).has(t)},Ja=function(t,e){var n=nu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function sn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}sn.prototype.clear=xo,sn.prototype.delete=Ju,sn.prototype.get=Qu,sn.prototype.has=Ec,sn.prototype.set=Ja;var un=sn,Qa=function(t,e){var n=this.__data__;if(n instanceof de){var r=n.__data__;if(!Lr||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new un(r)}return n.set(t,e),this.size=n.size,this};function si(t){var e=this.__data__=new de(t);this.size=e.size}si.prototype.clear=oe,si.prototype.delete=be,si.prototype.get=Ve,si.prototype.has=Ke,si.prototype.set=Qa;var Eo=si,ea=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},es=function(t){return this.__data__.has(t)};function An(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new un;++e<n;)this.add(t[e])}An.prototype.add=An.prototype.push=ea,An.prototype.has=es;var ta=An,Di=function(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},na=function(t,e){return t.has(e)},ru=function(t,e,n,r,u,i){var s=1&n,h=t.length,v=e.length;if(h!=v&&!(s&&v>h))return!1;var x=i.get(t),S=i.get(e);if(x&&S)return x==e&&S==t;var D=-1,I=!0,H=2&n?new ta:void 0;for(i.set(t,e),i.set(e,t);++D<h;){var q=t[D],ee=e[D];if(r)var ve=s?r(ee,q,D,e,t,i):r(q,ee,D,t,e,i);if(ve!==void 0){if(ve)continue;I=!1;break}if(H){if(!Di(e,function(ge,we){if(!na(H,we)&&(q===ge||u(q,ge,n,r,i)))return H.push(we)})){I=!1;break}}else if(q!==ee&&!u(q,ee,n,r,i)){I=!1;break}}return i.delete(t),i.delete(e),I},er=lt.a.Uint8Array,ra=function(t){var e=-1,n=Array(t.size);return t.forEach(function(r,u){n[++e]=[u,r]}),n},ts=function(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n},oa=Gt?Gt.prototype:void 0,ou=oa?oa.valueOf:void 0,ci=function(t,e,n,r,u,i,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new er(t),new er(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return on(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var h=ra;case"[object Set]":var v=1&r;if(h||(h=ts),t.size!=e.size&&!v)return!1;var x=s.get(t);if(x)return x==e;r|=2,s.set(t,e);var S=ru(h(t),h(e),r,u,i,s);return s.delete(t),S;case"[object Symbol]":if(ou)return ou.call(t)==ou.call(e)}return!1},So=function(t,e){for(var n=-1,r=e.length,u=t.length;++n<r;)t[u+n]=e[n];return t},gn=Array.isArray,Sc=function(t,e,n){var r=e(t);return gn(t)?r:So(r,n(t))},vr=function(t,e){for(var n=-1,r=t==null?0:t.length,u=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[u++]=s)}return i},jc=function(){return[]},ns=Object.prototype.propertyIsEnumerable,ar=Object.getOwnPropertySymbols,zr=ar?function(t){return t==null?[]:(t=Object(t),vr(ar(t),function(e){return ns.call(t,e)}))}:jc,ia=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},en=function(t){return t!=null&&typeof t=="object"},Hn=function(t){return en(t)&&fn(t)=="[object Arguments]"},iu=Object.prototype,rs=iu.hasOwnProperty,ua=iu.propertyIsEnumerable,uu=Hn(function(){return arguments}())?Hn:function(t){return en(t)&&rs.call(t,"callee")&&!ua.call(t,"callee")},uo=uu,jo=o(48),fi=/^(?:0|[1-9]\d*)$/,mr=function(t,e){var n=typeof t;return!!(e=e==null?9007199254740991:e)&&(n=="number"||n!="symbol"&&fi.test(t))&&t>-1&&t%1==0&&t<e},Po=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991},Zt={};Zt["[object Float32Array]"]=Zt["[object Float64Array]"]=Zt["[object Int8Array]"]=Zt["[object Int16Array]"]=Zt["[object Int32Array]"]=Zt["[object Uint8Array]"]=Zt["[object Uint8ClampedArray]"]=Zt["[object Uint16Array]"]=Zt["[object Uint32Array]"]=!0,Zt["[object Arguments]"]=Zt["[object Array]"]=Zt["[object ArrayBuffer]"]=Zt["[object Boolean]"]=Zt["[object DataView]"]=Zt["[object Date]"]=Zt["[object Error]"]=Zt["[object Function]"]=Zt["[object Map]"]=Zt["[object Number]"]=Zt["[object Object]"]=Zt["[object RegExp]"]=Zt["[object Set]"]=Zt["[object String]"]=Zt["[object WeakMap]"]=!1;var br=function(t){return en(t)&&Po(t.length)&&!!Zt[fn(t)]},ao=function(t){return function(e){return t(e)}},qn=o(49),au=qn.a&&qn.a.isTypedArray,Ni=au?ao(au):br,aa=Object.prototype.hasOwnProperty,En=function(t,e){var n=gn(t),r=!n&&uo(t),u=!n&&!r&&Object(jo.a)(t),i=!n&&!r&&!u&&Ni(t),s=n||r||u||i,h=s?ia(t.length,String):[],v=h.length;for(var x in t)!e&&!aa.call(t,x)||s&&(x=="length"||u&&(x=="offset"||x=="parent")||i&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||mr(x,v))||h.push(x);return h},su=Object.prototype,Ao=function(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||su)},Br=function(t,e){return function(n){return t(e(n))}},sa=Br(Object.keys,Object),Pc=Object.prototype.hasOwnProperty,ca=function(t){if(!Ao(t))return sa(t);var e=[];for(var n in Object(t))Pc.call(t,n)&&n!="constructor"&&e.push(n);return e},Rn=function(t){return t!=null&&Po(t.length)&&!io(t)},Ci=function(t){return Rn(t)?En(t):ca(t)},so=function(t){return Sc(t,Ci,zr)},sr=Object.prototype.hasOwnProperty,fa=function(t,e,n,r,u,i){var s=1&n,h=so(t),v=h.length;if(v!=so(e).length&&!s)return!1;for(var x=v;x--;){var S=h[x];if(!(s?S in e:sr.call(e,S)))return!1}var D=i.get(t),I=i.get(e);if(D&&I)return D==e&&I==t;var H=!0;i.set(t,e),i.set(e,t);for(var q=s;++x<v;){var ee=t[S=h[x]],ve=e[S];if(r)var ge=s?r(ve,ee,S,e,t,i):r(ee,ve,S,t,e,i);if(!(ge===void 0?ee===ve||u(ee,ve,n,r,i):ge)){H=!1;break}q||(q=S=="constructor")}if(H&&!q){var we=t.constructor,Ce=e.constructor;we==Ce||!("constructor"in t)||!("constructor"in e)||typeof we=="function"&&we instanceof we&&typeof Ce=="function"&&Ce instanceof Ce||(H=!1)}return i.delete(t),i.delete(e),H},Ar=$r(lt.a,"DataView"),Fo=$r(lt.a,"Promise"),cu=$r(lt.a,"Set"),co=$r(lt.a,"WeakMap"),Mr="[object Map]",_r="[object Promise]",Fr="[object Set]",fo="[object WeakMap]",Oe="[object DataView]",Ne=Ir(Ar),Re=Ir(Lr),Qe=Ir(Fo),zt=Ir(cu),Wt=Ir(co),vn=fn;(Ar&&vn(new Ar(new ArrayBuffer(1)))!=Oe||Lr&&vn(new Lr)!=Mr||Fo&&vn(Fo.resolve())!=_r||cu&&vn(new cu)!=Fr||co&&vn(new co)!=fo)&&(vn=function(t){var e=fn(t),n=e=="[object Object]"?t.constructor:void 0,r=n?Ir(n):"";if(r)switch(r){case Ne:return Oe;case Re:return Mr;case Qe:return _r;case zt:return Fr;case Wt:return fo}return e});var _=vn,w="[object Arguments]",P="[object Array]",L="[object Object]",K=Object.prototype.hasOwnProperty,pe=function(t,e,n,r,u,i){var s=gn(t),h=gn(e),v=s?P:_(t),x=h?P:_(e),S=(v=v==w?L:v)==L,D=(x=x==w?L:x)==L,I=v==x;if(I&&Object(jo.a)(t)){if(!Object(jo.a)(e))return!1;s=!0,S=!1}if(I&&!S)return i||(i=new Eo),s||Ni(t)?ru(t,e,n,r,u,i):ci(t,e,v,n,r,u,i);if(!(1&n)){var H=S&&K.call(t,"__wrapped__"),q=D&&K.call(e,"__wrapped__");if(H||q){var ee=H?t.value():t,ve=q?e.value():e;return i||(i=new Eo),u(ee,ve,n,r,i)}}return!!I&&(i||(i=new Eo),fa(t,e,n,r,u,i))},Ee=function t(e,n,r,u,i){return e===n||(e==null||n==null||!en(e)&&!en(n)?e!=e&&n!=n:pe(e,n,r,u,t,i))},Fe=function(t,e,n,r){var u=n.length,i=u;if(t==null)return!i;for(t=Object(t);u--;){var s=n[u];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++u<i;){var h=(s=n[u])[0],v=t[h],x=s[1];if(s[2]){if(v===void 0&&!(h in t))return!1}else{var S=new Eo,D;if(!(D===void 0?Ee(x,v,3,r,S):D))return!1}}return!0},st=function(t){return t==t&&!xn(t)},Ht=function(t){for(var e=Ci(t),n=e.length;n--;){var r=e[n],u=t[r];e[n]=[r,u,st(u)]}return e},et=function(t,e){return function(n){return n!=null&&n[t]===e&&(e!==void 0||t in Object(n))}},hn=function(t){var e=Ht(t);return e.length==1&&e[0][2]?et(e[0][0],e[0][1]):function(n){return n===t||Fe(n,t,e)}},Bt=function(t){return typeof t=="symbol"||en(t)&&fn(t)=="[object Symbol]"},tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/,_n=function(t,e){if(gn(t))return!1;var n=typeof t;return!(n!="number"&&n!="symbol"&&n!="boolean"&&t!=null&&!Bt(t))||Ur.test(t)||!tn.test(t)||e!=null&&t in Object(e)};function Or(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,u=e?e.apply(this,r):r[0],i=n.cache;if(i.has(u))return i.get(u);var s=t.apply(this,r);return n.cache=i.set(u,s)||i,s};return n.cache=new(Or.Cache||un),n}Or.Cache=un;var Mo=Or,ko=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ri=/\\(\\)?/g,la=function(t){var e=Mo(t,function(r){return n.size===500&&n.clear(),r}),n=e.cache;return e}(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ko,function(n,r,u,i){e.push(u?i.replace(Ri,"$1"):r||n)}),e}),Uo=Gt?Gt.prototype:void 0,fu=Uo?Uo.toString:void 0,cr=function t(e){if(typeof e=="string")return e;if(gn(e))return ut(e,t)+"";if(Bt(e))return fu?fu.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n},Ii=function(t){return t==null?"":cr(t)},li=function(t,e){return gn(t)?t:_n(t,e)?[t]:la(Ii(t))},Go=function(t){if(typeof t=="string"||Bt(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e},Xo=function(t,e){for(var n=0,r=(e=li(e,t)).length;t!=null&&n<r;)t=t[Go(e[n++])];return n&&n==r?t:void 0},lu=function(t,e,n){var r=t==null?void 0:Xo(t,e);return r===void 0?n:r},Bd=function(t,e){return t!=null&&e in Object(t)},Fd=function(t,e,n){for(var r=-1,u=(e=li(e,t)).length,i=!1;++r<u;){var s=Go(e[r]);if(!(i=t!=null&&n(t,s)))break;t=t[s]}return i||++r!=u?i:!!(u=t==null?0:t.length)&&Po(u)&&mr(s,u)&&(gn(t)||uo(t))},fl=function(t,e){return t!=null&&Fd(t,e,Bd)},os=function(t,e){return _n(t)&&st(e)?et(Go(t),e):function(n){var r=lu(n,t);return r===void 0&&r===e?fl(n,t):Ee(e,r,3)}},pu=function(t){return t},Ac=function(t){return function(e){return e==null?void 0:e[t]}},Ud=function(t){return function(e){return Xo(e,t)}},ll=function(t){return _n(t)?Ac(Go(t)):Ud(t)},Mc=function(t){return typeof t=="function"?t:t==null?pu:typeof t=="object"?gn(t)?os(t[0],t[1]):hn(t):ll(t)},pl=function(t){return function(e,n,r){for(var u=-1,i=Object(e),s=r(e),h=s.length;h--;){var v=s[++u];if(n(i[v],v,i)===!1)break}return e}}(),Zn=function(t,e){return function(n,r){if(n==null)return n;if(!Rn(n))return t(n,r);for(var u=n.length,i=-1,s=Object(n);++i<u&&r(s[i],i,s)!==!1;);return n}}(function(t,e){return t&&pl(t,e,Ci)}),fr=function(t,e){var n=-1,r=Rn(t)?Array(t.length):[];return Zn(t,function(u,i,s){r[++n]=e(u,i,s)}),r},is=function(t,e){return(gn(t)?ut:fr)(t,Mc(e))};Object(d.n)({isolateGlobalState:!0});var us=function(){try{var t=$r(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),as=function(t,e,n){e=="__proto__"&&us?us(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Gd=Object.prototype.hasOwnProperty,du=function(t,e,n){var r=t[e];Gd.call(t,e)&&on(r,n)&&(n!==void 0||e in t)||as(t,e,n)},hu=function(t,e,n,r){var u=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var h=e[i],v=void 0;v===void 0&&(v=t[h]),u?as(n,h,v):du(n,h,v)}return n},kc=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},Li=Math.max,yu=function(t,e,n){return e=Li(e===void 0?t.length-1:e,0),function(){for(var r=arguments,u=-1,i=Li(r.length-e,0),s=Array(i);++u<i;)s[u]=r[e+u];u=-1;for(var h=Array(e+1);++u<e;)h[u]=r[u];return h[e]=n(s),kc(t,this,h)}},pa=function(t){return function(){return t}},ss=us?function(t,e){return us(t,"toString",{configurable:!0,enumerable:!1,value:pa(e),writable:!0})}:pu,gu=Date.now,Xd=function(t){var e=0,n=0;return function(){var r=gu(),u=16-(r-n);if(n=r,u>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},dl=Xd(ss),Hd=function(t,e){return dl(yu(t,e,pu),t+"")},Yd=function(t,e,n){if(!xn(n))return!1;var r=typeof e;return!!(r=="number"?Rn(n)&&mr(e,n.length):r=="string"&&e in n)&&on(n[e],t)},hl=function(t){return Hd(function(e,n){var r=-1,u=n.length,i=u>1?n[u-1]:void 0,s=u>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(u--,i):void 0,s&&Yd(n[0],n[1],s)&&(i=u<3?void 0:i,u=1),e=Object(e);++r<u;){var h=n[r];h&&t(e,h,r,i)}return e})},cs=Object.prototype.hasOwnProperty,or=hl(function(t,e){if(Ao(e)||Rn(e))hu(e,Ci(e),t);else for(var n in e)cs.call(e,n)&&du(t,n,e[n])}),yl=function(t,e,n,r){if(!xn(t))return t;for(var u=-1,i=(e=li(e,t)).length,s=i-1,h=t;h!=null&&++u<i;){var v=Go(e[u]),x=n;if(v==="__proto__"||v==="constructor"||v==="prototype")return t;if(u!=s){var S=h[v];(x=void 0)==void 0&&(x=xn(S)?S:mr(e[u+1])?[]:{})}du(h,v,x),h=h[v]}return t},B=function(t,e,n){for(var r=-1,u=e.length,i={};++r<u;){var s=e[r],h=Xo(t,s);n(h,s)&&yl(i,li(s,t),h)}return i},vu=function(t,e){return B(t,e,function(n,r){return fl(t,r)})},da=Gt?Gt.isConcatSpreadable:void 0,Zr=function(t){return gn(t)||uo(t)||!!(da&&t&&t[da])},Qt=function(e,n,r,u,i){var s=-1,h=e.length;for(r||(r=Zr),i||(i=[]);++s<h;){var v=e[s];r(v)?So(i,v):i[i.length]=v}return i},zi=function(t){return t!=null&&t.length?Qt(t):[]},yn,To,pi,Jr,Tc,Dc,gl,vl,fs,mu,ha,ml,Nc,Do,ls,di,Gr,Cc,Rc,Ho=function(t){return dl(yu(t,void 0,zi),t+"")}(function(t,e){return t==null?{}:vu(t,e)});function On(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function bl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function In(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var cn,tr,Yt,Bn,pt,mn,ps={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotation:!1,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},Yo=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","allowRotation","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],Ic=(To=In((yn=function(){function t(r){(function(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),On(this,"isSilentMode",To,this),On(this,"stopZoomGraph",pi,this),On(this,"stopScrollGraph",Jr,this),On(this,"stopMoveGraph",Tc,this),On(this,"adjustEdge",Dc,this),On(this,"adjustEdgeMiddle",gl,this),On(this,"adjustEdgeStartAndEnd",vl,this),On(this,"adjustNodePosition",fs,this),On(this,"hideAnchors",mu,this),On(this,"allowRotation",ha,this),On(this,"hoverOutline",ml,this),On(this,"nodeSelectedOutline",Nc,this),On(this,"edgeSelectedOutline",Do,this),On(this,"nodeTextEdit",ls,this),On(this,"edgeTextEdit",di,this),On(this,"nodeTextDraggable",Gr,this),On(this,"edgeTextDraggable",Cc,this),On(this,"autoExpand",Rc,this),_l(this,"multipleSelectKey",""),_l(this,"defaultConfig",{}),or(this,this.getConfigDetail(r))}var e,n;return e=t,(n=[{key:"updateEditConfig",value:function(r){var u=this.getConfigDetail(r);or(this,u)}},{key:"getConfigDetail",value:function(r){var u=r.isSilentMode,i=r.textEdit,s={};if(u===!1&&or(s,this.defaultConfig),u===!0&&u!==this.isSilentMode){var h=Ho(ps,Yo);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,allowRotation:this.allowRotation,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},or(s,h)}i===!1&&or(s,{nodeTextEdit:!1,edgeTextEdit:!1});var v=Ho(r,Yo);return or(s,v)}},{key:"getConfig",value:function(){return Ho(this,Yo)}}])&&bl(e.prototype,n),t}()).prototype,"isSilentMode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),pi=In(yn.prototype,"stopZoomGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Jr=In(yn.prototype,"stopScrollGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tc=In(yn.prototype,"stopMoveGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dc=In(yn.prototype,"adjustEdge",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),gl=In(yn.prototype,"adjustEdgeMiddle",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),vl=In(yn.prototype,"adjustEdgeStartAndEnd",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),fs=In(yn.prototype,"adjustNodePosition",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),mu=In(yn.prototype,"hideAnchors",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ha=In(yn.prototype,"allowRotation",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ml=In(yn.prototype,"hoverOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Nc=In(yn.prototype,"nodeSelectedOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Do=In(yn.prototype,"edgeSelectedOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ls=In(yn.prototype,"nodeTextEdit",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),di=In(yn.prototype,"edgeTextEdit",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Gr=In(yn.prototype,"nodeTextDraggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cc=In(yn.prototype,"edgeTextDraggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rc=In(yn.prototype,"autoExpand",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),In(yn.prototype,"updateEditConfig",[d.k],Object.getOwnPropertyDescriptor(yn.prototype,"updateEditConfig"),yn.prototype),yn);o(65),o(66),function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(cn||(cn={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(tr||(tr={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(Yt||(Yt={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(Bn||(Bn={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_GROUP_COPY="node:group-copy-add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.NODE_ROTATE="node:rotate",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(pt||(pt={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(mn||(mn={}));var Sn,Mn,Ol,wl,ds,bu,Lc,_u,hs;function Ou(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return zc(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return zc(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  53. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function zc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wo(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Wd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qr(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"})(Sn||(Sn={}));var xl={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},El=(Mn=function(){function t(r,u){(function(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")})(this,t),Vo(this,"MINI_SCALE_SIZE",.2),Vo(this,"MAX_SCALE_SIZE",16),Wo(this,"SCALE_X",Ol,this),Wo(this,"SKEW_Y",wl,this),Wo(this,"SKEW_X",ds,this),Wo(this,"SCALE_Y",bu,this),Wo(this,"TRANSLATE_X",Lc,this),Wo(this,"TRANSLATE_Y",_u,this),Wo(this,"ZOOM_SIZE",hs,this),Vo(this,"eventCenter",void 0),Vo(this,"translateLimitMinX",void 0),Vo(this,"translateLimitMinY",void 0),Vo(this,"translateLimitMaxX",void 0),Vo(this,"translateLimitMaxY",void 0),this.eventCenter=r;var i=u.stopMoveGraph,s=i!==void 0&&i;this.updateTranslateLimits(s)}var e,n;return e=t,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 u=Ou(r,2),i=u[0],s=u[1];return[(i-this.TRANSLATE_X)/this.SCALE_X,(s-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(r){var u=Ou(r,2),i=u[0],s=u[1];return[i*this.SCALE_X+this.TRANSLATE_X,s*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(r,u,i){var s=Ou(r,2),h=s[0],v=s[1];return[h+u/this.SCALE_X,v+i/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(r,u){return[r/this.SCALE_X,u/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],u=arguments.length>1?arguments[1]:void 0,i=this.SCALE_X,s=this.SCALE_Y;return r===!0?(i+=this.ZOOM_SIZE,s+=this.ZOOM_SIZE):r===!1?(i-=this.ZOOM_SIZE,s-=this.ZOOM_SIZE):typeof r=="number"&&(i=r,s=r),i<this.MINI_SCALE_SIZE||i>this.MAX_SCALE_SIZE||(u&&(this.TRANSLATE_X-=(i-this.SCALE_X)*u[0],this.TRANSLATE_Y-=(s-this.SCALE_Y)*u[1]),this.SCALE_X=i,this.SCALE_Y=s,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(r){this.eventCenter.emit(pt.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,u){this.TRANSLATE_X+r<=this.translateLimitMaxX&&this.TRANSLATE_X+r>=this.translateLimitMinX&&(this.TRANSLATE_X+=r),this.TRANSLATE_Y+u<=this.translateLimitMaxY&&this.TRANSLATE_Y+u>=this.translateLimitMinY&&(this.TRANSLATE_Y+=u),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(r,u,i,s){var h=Ou(this.CanvasPointToHtmlPoint([r,u]),2),v=i/2-h[0],x=s/2-h[1];this.TRANSLATE_X+=v,this.TRANSLATE_Y+=x,this.emitGraphTransform("focusOn")}},{key:"updateTranslateLimits",value:function(r){var u=Ou(Array.isArray(r)&&r.length===4?r:xl[r.toString()],4);this.translateLimitMinX=u[0],this.translateLimitMinY=u[1],this.translateLimitMaxX=u[2],this.translateLimitMaxY=u[3]}}],n&&Wd(e.prototype,n),t}(),Ol=Qr(Mn.prototype,"SCALE_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wl=Qr(Mn.prototype,"SKEW_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ds=Qr(Mn.prototype,"SKEW_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),bu=Qr(Mn.prototype,"SCALE_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Lc=Qr(Mn.prototype,"TRANSLATE_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),_u=Qr(Mn.prototype,"TRANSLATE_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),hs=Qr(Mn.prototype,"ZOOM_SIZE",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Qr(Mn.prototype,"zoom",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"zoom"),Mn.prototype),Qr(Mn.prototype,"resetZoom",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"resetZoom"),Mn.prototype),Qr(Mn.prototype,"translate",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"translate"),Mn.prototype),Qr(Mn.prototype,"focusOn",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"focusOn"),Mn.prototype),Mn),ys=function(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t},Sl=function(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e},jl=Object.prototype.hasOwnProperty,Pl=function(t){if(!xn(t))return Sl(t);var e=Ao(t),n=[];for(var r in t)(r!="constructor"||!e&&jl.call(t,r))&&n.push(r);return n},gs=function(t){return Rn(t)?En(t,!0):Pl(t)},Bc=o(107),Fc=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e},vs=Br(Object.getPrototypeOf,Object),Vt=Object.prototype.hasOwnProperty,Vd=function(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Vt.call(t,"index")&&(n.index=t.index,n.input=t.input),n},Uc=function(t){var e=new t.constructor(t.byteLength);return new er(e).set(new er(t)),e},ya=function(t,e){var n=Uc(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)},Al=/\w*$/,Kd=function(t){var e=new t.constructor(t.source,Al.exec(t));return e.lastIndex=t.lastIndex,e},Ml=Gt?Gt.prototype:void 0,Xr=Ml?Ml.valueOf:void 0,$d=function(t){return Xr?Object(Xr.call(t)):{}},ga=function(t,e){var n=e?Uc(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},Gc=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Uc(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return ya(t);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 ga(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Kd(t);case"[object Symbol]":return $d(t)}},Xc=Object.create,kl=function(){function t(){}return function(e){if(!xn(e))return{};if(Xc)return Xc(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),kr=function(t){return typeof t.constructor!="function"||Ao(t)?{}:kl(vs(t))},hi=function(t){return en(t)&&_(t)=="[object Map]"},ms=qn.a&&qn.a.isMap,Tl=ms?ao(ms):hi,bs=function(t){return en(t)&&_(t)=="[object Set]"},Hc=qn.a&&qn.a.isSet,Yc=Hc?ao(Hc):bs,Wc="[object Arguments]",_s="[object Function]",Vc="[object Object]",an={};an[Wc]=an["[object Array]"]=an["[object ArrayBuffer]"]=an["[object DataView]"]=an["[object Boolean]"]=an["[object Date]"]=an["[object Float32Array]"]=an["[object Float64Array]"]=an["[object Int8Array]"]=an["[object Int16Array]"]=an["[object Int32Array]"]=an["[object Map]"]=an["[object Number]"]=an["[object Object]"]=an["[object RegExp]"]=an["[object Set]"]=an["[object String]"]=an["[object Symbol]"]=an["[object Uint8Array]"]=an["[object Uint8ClampedArray]"]=an["[object Uint16Array]"]=an["[object Uint32Array]"]=!0,an["[object Error]"]=an[_s]=an["[object WeakMap]"]=!1;var qd=function t(e,n,r,u,i,s){var h,v=1&n;if(h!==void 0)return h;if(!xn(e))return e;var x=gn(e);if(x)h=Vd(e);else{var S=_(e),D=S==_s||S=="[object GeneratorFunction]";if(Object(jo.a)(e))return Object(Bc.a)(e,v);if(S==Vc||S==Wc||D&&!i)h=D?{}:kr(e);else{if(!an[S])return i?e:{};h=Gc(e,S,v)}}s||(s=new Eo);var I=s.get(e);if(I)return I;s.set(e,h),Yc(e)?e.forEach(function(q){h.add(t(q,n,r,q,e,s))}):Tl(e)&&e.forEach(function(q,ee){h.set(ee,t(q,n,r,ee,e,s))});var H=x?void 0:so(e);return ys(H||e,function(q,ee){H&&(q=e[ee=q]),du(h,ee,t(q,n,r,ee,e,s))}),h},ln=function(t){return qd(t,5)},Os=function(t,e,n){(n!==void 0&&!on(t[e],n)||n===void 0&&!(e in t))&&as(t,e,n)},Dl=function(t){return en(t)&&Rn(t)},Kc=Function.prototype,Nl=Object.prototype,$c=Kc.toString,Cl=Nl.hasOwnProperty,Rl=$c.call(Object),Tr=function(t){if(!en(t)||fn(t)!="[object Object]")return!1;var e=vs(t);if(e===null)return!0;var n=Cl.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&$c.call(n)==Rl},lo=function(t,e){if((e!=="constructor"||typeof t[e]!="function")&&e!="__proto__")return t[e]},ws=function(t){return hu(t,gs(t))},wu=function(t,e,n,r,u,i,s){var h=lo(t,n),v=lo(e,n),x=s.get(v);if(x)Os(t,n,x);else{var S=void 0,D=S===void 0;if(D){var I=gn(v),H=!I&&Object(jo.a)(v),q=!I&&!H&&Ni(v);S=v,I||H||q?gn(h)?S=h:Dl(h)?S=Fc(h):H?(D=!1,S=Object(Bc.a)(v,!0)):q?(D=!1,S=ga(v,!0)):S=[]:Tr(v)||uo(v)?(S=h,uo(h)?S=ws(h):xn(h)&&!io(h)||(S=kr(v))):D=!1}D&&(s.set(v,S),u(S,v,r,i,s),s.delete(v)),Os(t,n,S)}},Il=function t(e,n,r,u,i){e!==n&&pl(n,function(s,h){if(i||(i=new Eo),xn(s))wu(e,n,h,r,t,u,i);else{var v=void 0;v===void 0&&(v=s),Os(e,h,v)}},gs)},va=hl(function(t,e,n){Il(t,e,n)}),Ll={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5}},Bi=function(t){var e=ln(Ll);return t&&(e=va(e,t)),e};o(82),o(166);function ma(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var zl=function(){function t(){var r,u,i;(function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t),i={},(u="_events")in(r=this)?Object.defineProperty(r,u,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[u]=i}var e,n;return e=t,(n=[{key:"on",value:function(r,u,i){var s=this;return r==null||r.split(",").forEach(function(h){h=h.trim(),s._events[h]||(s._events[h]=[]),s._events[h].push({callback:u,once:!!i})}),this}},{key:"once",value:function(r,u){var i=this;r==null||r.split(",").forEach(function(s){return s=s.trim(),i.on(s,u,!0)})}},{key:"emit",value:function(r,u){var i=this;r==null||r.split(",").forEach(function(s){var h=i._events[s]||[],v=i._events["*"]||[],x=function(S){for(var D=S.length,I=0;I<D;I++)if(S[I]){var H=S[I],q=H.callback;H.once&&(S.splice(I,1),S.length===0&&delete i._events[s],D--,I--),q.apply(i,[u])}};x(h),x(v)})}},{key:"off",value:function(r,u){var i=this;return r||(this._events={}),r.split(",").forEach(function(s){if(u){for(var h=i._events[s]||[],v=h.length,x=0;x<v;x++)h[x].callback===u&&(h.splice(x,1),v--,x--);h.length===0&&delete i._events[s]}else delete i._events[s]}),this}},{key:"getEvents",value:function(){return this._events}}])&&ma(e.prototype,n),t}();function yi(t,e){return e*Math.round(t/e)||t}function xs(t,e){return t%e}function Es(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return ba(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return ba(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  54. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ba(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _a=function(t,e,n){var r=Es(t,2),u=r[0],i=r[1],s=Es(e,2),h=s[0],v=s[1],x=Es(n,2),S=x[0],D=x[1];return u>h&&u<S&&i>v&&i<D},Oa=function(t,e){var n=!1;switch(e.multipleSelectKey){case"meta":n=t.metaKey;break;case"alt":n=t.altKey;break;case"shift":n=t.shiftKey;break;case"ctrl":n=t.ctrlKey;break;default:n=!1}return n};o(167),o(126),o(83),o(29),o(12),o(13),o(14),o(47);var Bl=function(t){return function(e,n,r){var u=Object(e);if(!Rn(e)){var i=Mc(n);e=Ci(e),n=function(h){return i(u[h],h,u)}}var s=t(e,n,r);return s>-1?u[i?e[s]:s]:void 0}},Ss=function(t,e,n,r){for(var u=t.length,i=n+-1;++i<u;)if(e(t[i],i,t))return i;return-1},Fl=/\s/,qc=function(t){for(var e=t.length;e--&&Fl.test(t.charAt(e)););return e},Zd=/^\s+/,Ul=function(t){return t&&t.slice(0,qc(t)+1).replace(Zd,"")},Ko=/^[-+]0x[0-9a-f]+$/i,Gl=/^0b[01]+$/i,Xl=/^0o[0-7]+$/i,Jd=parseInt,js=function(t){if(typeof t=="number")return t;if(Bt(t))return NaN;if(xn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=xn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ul(t);var n=Gl.test(t);return n||Xl.test(t)?Jd(t.slice(2),n?2:8):Ko.test(t)?NaN:+t},$o=1/0,Zc=function(t){return t?(t=js(t))===$o||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:t===0?t:0},Jc=function(t){var e=Zc(t),n=e%1;return e==e?n?e-n:e:0},Qc=Math.max,xu,Fi=Bl(function(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var u=n==null?0:Jc(n);return u<0&&(u=Qc(r+u,0)),Ss(t,Mc(e),u)}),At=new Uint8Array(16);function Ps(){if(!xu&&!(xu=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 xu(At)}for(var ef=/^(?:[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,Ui=function(t){return typeof t=="string"&&ef.test(t)},Jn=[],As=0;As<256;++As)Jn.push((As+256).toString(16).substr(1));var lr=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Jn[t[e+0]]+Jn[t[e+1]]+Jn[t[e+2]]+Jn[t[e+3]]+"-"+Jn[t[e+4]]+Jn[t[e+5]]+"-"+Jn[t[e+6]]+Jn[t[e+7]]+"-"+Jn[t[e+8]]+Jn[t[e+9]]+"-"+Jn[t[e+10]]+Jn[t[e+11]]+Jn[t[e+12]]+Jn[t[e+13]]+Jn[t[e+14]]+Jn[t[e+15]]).toLowerCase();if(!Ui(n))throw TypeError("Stringified UUID is invalid");return n},Ms=function(t,e,n){var r=(t=t||{}).random||(t.rng||Ps)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,lr(r)},qo=function(){return Ms()},Qd=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=t.nodes.reduce(function(r,u){return r[u.id]=e+Ms(),u.id=r[u.id],r},{});return t.edges.forEach(function(r){r.id=e+Ms(),r.sourceNodeId=n[r.sourceNodeId],r.targetNodeId=n[r.targetNodeId]}),t},Hr=(o(105),o(127),o(207),function(t,e,n){var r=t.x,u=t.y,i=e.x,s=e.y,h=n.x,v=n.y,x=(v-s)/(h-i),S=s-x*i;return r>=i&&r<=h&&u>=s&&u<=v&&Math.abs(u-x*r+S)<Number.EPSILON});function ir(t){return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(t)}function ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Ts(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ks(Object(n),!0).forEach(function(r){eh(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ks(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function eh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ke,tf,nf,rf,of,Hl,Ds,uf,Eu,Ns,af,sf,wa,cf,po,gi,ff,Yl,Wl,Vl,lf,Cs=function(t){return t.anchors},xa=function(t,e){for(var n,r=e.nodes,u=r.length-1;u>=0;u--){var i=r[u];if(th(t,i)){var s=i.getTargetAnchor(t);if(s){var h={node:i,anchorIndex:s.index,anchor:s.anchor};n&&!Kl(i,n.node,e)||(n=h)}}}return n},Kl=function(t,e,n){return t.zIndex>e.zIndex||n.nodesMap[t.id].index>n.nodesMap[e.id].index},ho=function(t,e,n,r){return Math.hypot(t-n,e-r)},vi=function(t,e){var n=!1,r=jn(e);return t.x>=r.minX-0&&t.x<=r.maxX+0&&t.y>=r.minY-0&&t.y<=r.maxY+0&&(n=!0),n},th=function(t,e){var n=!1,r=jn(e);return t.x>=r.minX-5&&t.x<=r.maxX+5&&t.y>=r.minY-5&&t.y<=r.maxY+5&&(n=!0),n},jn=function(t){var e=t.x,n=t.y,r=t.width,u=t.height;return{minX:e-r/2,minY:n-u/2,maxX:e+r/2,maxY:n+u/2,x:e,y:n,width:r,height:u,centerX:e,centerY:n}},$l=function(t,e,n){var r,u=function(s){var h=s,v=h.x,x=h.y,S=h.width,D=h.height,I=h.radius;return[{x:v-S/2+I,y:x-D/2+I,r:I},{x:v+S/2-I,y:x-D/2+I,r:I},{x:v-S/2+I,y:x+D/2-I,r:I},{x:v+S/2-I,y:x+D/2-I,r:I}]}(n),i=Number.MAX_SAFE_INTEGER;return u.forEach(function(s){var h=ho(t.x,t.y,s.x,s.y);h<i&&(i=h,r=s)}),Rs(t,e,r)},Rs=function(t,e,n){var r,u=n,i=u.x,s=u.y,h=u.r;if(e===mn.HORIZONTAL){var v=i-Math.sqrt(h*h-(t.y-s)*(t.y-s)),x=i+Math.sqrt(h*h-(t.y-s)*(t.y-s));r={x:Math.abs(v-t.x)<Math.abs(x-t.x)?v:x,y:t.y}}else if(e===mn.VERTICAL){var S=s-Math.sqrt(h*h-(t.x-i)*(t.x-i)),D=s+Math.sqrt(h*h-(t.x-i)*(t.x-i)),I=Math.abs(S-t.y)<Math.abs(D-t.y)?S:D;r={x:t.x,y:I}}return r},ql=function(t,e){var n=e,r=!1,u=n.x-n.width/2+n.radius,i=n.x+n.width/2-n.radius,s=n.y-n.height/2+n.radius,h=n.y+n.height/2-n.radius,v=n.x,x=n.y,S=n.width,D=n.height;return t.y===x+D/2||t.y===x-D/2?r=t.x>u&&t.x<i:t.x!==v+S/2&&t.x!==v-S/2||(r=t.y>s&&t.y<h),r},Is=function(t,e,n){var r,u=n,i=u.x,s=u.y,h=u.rx,v=u.ry;if(e===mn.HORIZONTAL){var x=i-Math.sqrt(h*h-(t.y-s)*(t.y-s)*h*h/(v*v)),S=i+Math.sqrt(h*h-(t.y-s)*(t.y-s)*h*h/(v*v));r={x:Math.abs(x-t.x)<Math.abs(S-t.x)?x:S,y:t.y}}else if(e===mn.VERTICAL){var D=s-Math.sqrt(v*v-(t.x-i)*(t.x-i)*v*v/(h*h)),I=s+Math.sqrt(v*v-(t.x-i)*(t.x-i)*v*v/(h*h)),H=Math.abs(D-t.y)<Math.abs(I-t.y)?D:I;r={x:t.x,y:H}}return r},Zl=function(t,e,n){for(var r,u=n.pointsPosition,i=Number.MAX_SAFE_INTEGER,s=[],h=0;h<u.length;h++)s.push({start:u[h],end:u[(h+1)%u.length]});return s.forEach(function(v){var x=v.start,S=v.end,D=x,I=S;x.x>S.x&&(D=S,I=x);var H={x:t.x,y:t.y};if(D.x===I.x&&e===mn.HORIZONTAL&&(H={x:D.x,y:t.y}),D.y===I.y&&e===mn.VERTICAL&&(H={x:t.x,y:D.y}),D.x!==I.x&&D.y!==I.y){var q=(I.y-D.y)/(I.x-D.x),ee=(D.x*I.y-I.x*D.y)/(D.x-I.x);e===mn.HORIZONTAL?H={x:(t.y-ee)/q,y:t.y}:e===mn.VERTICAL&&(H={x:t.x,y:q*t.x+ee})}if(Hr(H,x,S)){var ve=ho(H.x,H.y,t.x,t.y);ve<i&&(i=ve,r=H)}}),r},Jl=function(t,e,n,r){var u=t.x,i=t.y;return e.x>t.x?u=t.x+n/2:e.x<t.x&&(u=t.x-n/2),e.y>t.y?i=t.y+r/2:e.y<t.y&&(i=t.y-r/2),{x:u,y:i}},Ql=function(t){var e=t.rows,n=t.style,r=t.rowsLength,u=t.className,i=document.createElement("div");i.style.fontSize=n.fontSize,i.style.width=n.width,i.className=u,i.style.lineHeight=n.lineHeight,i.style.padding=n.padding,n.fontFamily&&(i.style.fontFamily=n.fontFamily),r>1?e.forEach(function(h){var v=document.createElement("div");v.textContent=h,i.appendChild(v)}):i.textContent=e,document.body.appendChild(i);var s=i.clientHeight;return document.body.removeChild(i),s},Ea=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,u=0;return e&&e.forEach(function(i){var s=Df(i);u=s>u?s:u}),{width:Math.ceil(u/2)*r+r/4,height:n*(r+2)+r/4}},Su=function(t){return ir(t)!=="object"?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},pr=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},nh=1e3,rh=999,pf=function(){return++nh};function ep(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Dr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ep(Object(n),!0).forEach(function(r){eo(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Fn(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Ls(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function eo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var df=(ke=function(){function t(r,u){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),eo(this,"id",""),Fn(this,"type",tf,this),Fn(this,"sourceNodeId",nf,this),Fn(this,"targetNodeId",rf,this),Fn(this,"startPoint",of,this),Fn(this,"endPoint",Hl,this),Fn(this,"text",Ds,this),Fn(this,"properties",uf,this),Fn(this,"points",Eu,this),Fn(this,"pointsList",Ns,this),Fn(this,"isSelected",af,this),Fn(this,"isHovered",sf,this),Fn(this,"isHitable",wa,this),Fn(this,"draggable",cf,this),Fn(this,"visible",po,this),eo(this,"virtual",!1),Fn(this,"isAnimation",gi,this),Fn(this,"isShowAdjustPoint",ff,this),eo(this,"graphModel",void 0),Fn(this,"zIndex",Yl,this),eo(this,"BaseType",Bn.EDGE),eo(this,"modelType",Yt.EDGE),Fn(this,"state",Wl,this),eo(this,"additionStateData",void 0),eo(this,"sourceAnchorId",""),eo(this,"targetAnchorId",""),eo(this,"menu",void 0),eo(this,"customTextPosition",!1),Fn(this,"style",Vl,this),Fn(this,"arrowConfig",lf,this),this.graphModel=u,this.initEdgeData(r),this.setAttributes()}var e,n;return e=t,n=[{key:"initEdgeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var u=this.graphModel.idGenerator,i=u&&u(r.type),s=this.createId();r.id=s||i||qo()}this.arrowConfig.markerEnd="url(#marker-end-".concat(r.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(r.id,")");var h=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=h,or(this,mp(r)),this.graphModel.overlapMode===Sn.INCREASE&&(this.zIndex=r.zIndex||pf()),this.setAnchors(),this.initPoints(),this.formatText(r)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return Dr(Dr({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return Dr({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.edgeText;return ln(r)}},{key:"getEdgeAnimationStyle",value:function(){var r=this.graphModel.theme.edgeAnimation;return ln(r)}},{key:"getArrowStyle",value:function(){var r=this.getEdgeStyle(),u=this.getEdgeAnimationStyle(),i=this.graphModel.theme.arrow,s=this.isAnimation?u.stroke:r.stroke;return Dr(Dr({},r),{},{fill:s,stroke:s},i)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return ln(r)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var r,u;return(r=this.graphModel)===null||r===void 0||(u=r.nodesMap[this.sourceNodeId])===null||u===void 0?void 0:u.model}},{key:"targetNode",get:function(){var r,u;return(r=this.graphModel)===null||r===void 0||(u=r.nodesMap[this.targetNodeId])===null||u===void 0?void 0:u.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(r,u,i){var s,h,v=Cs(r);return i&&(s=Fi(v,function(x){return x.id===i}))||v.forEach(function(x){var S=Rf(x,u);(h===void 0||S<h)&&(h=S,s=x)}),s}},{key:"getEndAnchor",value:function(r,u){var i,s,h=this,v=Cs(r);return u&&(i=Fi(v,function(x){return x.id===u}))||v.forEach(function(x){var S=Rf(x,h.startPoint);(s===void 0||S<s)&&(s=S,i=x)}),i}},{key:"getProperties",value:function(){return Object(d.I)(this.properties)}},{key:"getData",value:function(){var r=this.text,u=r.x,i=r.y,s=r.value,h={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(d.I)(this.properties)};return s&&(h.text={x:u,y:i,value:s}),this.graphModel.overlapMode===Sn.INCREASE&&(h.zIndex=this.zIndex),h}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(r,u){this.properties[r]=pr(u),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=Dr(Dr({},Object(d.I)(this.properties)),pr(r)),this.setAttributes()}},{key:"changeEdgeId",value:function(r){var u=this.arrowConfig,i=u.markerEnd,s=u.markerStart;s&&s==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(r,")")),i&&i==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(r,")")),this.id=r}},{key:"setStyle",value:function(r,u){this.style=Dr(Dr({},this.style),{},eo({},r,pr(u)))}},{key:"setStyles",value:function(r){this.style=Dr(Dr({},this.style),pr(r))}},{key:"updateStyles",value:function(r){this.style=Dr({},pr(r))}},{key:"formatText",value:function(r){var u=this.textPosition,i=u.x,s=u.y;r.text&&typeof r.text!="string"?Object.prototype.toString.call(r.text)==="[object Object]"&&(this.text={x:r.text.x||i,y:r.text.y||s,value:r.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:r.text||"",x:i,y:s,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var r=this.textPosition,u=r.x,i=r.y;this.text.x=u,this.text.y=i}},{key:"moveText",value:function(r,u){if(this.text){var i=this.text,s=i.x,h=i.y,v=i.value,x=i.draggable,S=i.editable;this.text={value:v,draggable:x,x:s+r,y:h+u,editable:S}}}},{key:"setText",value:function(r){r&&or(this.text,r)}},{key:"updateText",value:function(r){this.text=Dr(Dr({},Object(d.I)(this.text)),{},{value:r})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var r=this.getBeginAnchor(this.sourceNode,this.targetNode,this.sourceAnchorId);if(!r)throw new Error("无法获取beginAnchor,请检查anchors相关逻辑,anchors不能为空");this.startPoint||(this.startPoint={x:r.x,y:r.y}),this.sourceAnchorId||(this.sourceAnchorId=r.id)}if(!this.targetAnchorId||!this.endPoint){var u=this.getEndAnchor(this.targetNode,this.targetAnchorId);if(!u)throw new Error("无法获取endAnchor,请检查anchors相关逻辑,anchors不能为空");this.endPoint||(this.endPoint={x:u.x,y:u.y}),this.targetAnchorId||(this.targetAnchorId=u.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,u){this.state=r,this.additionStateData=u}},{key:"updateStartPoint",value:function(r){this.startPoint=r}},{key:"moveStartPoint",value:function(r,u){this.startPoint.x+=r,this.startPoint.y+=u}},{key:"updateEndPoint",value:function(r){this.endPoint=r}},{key:"moveEndPoint",value:function(r,u){this.endPoint.x+=r,this.endPoint.y+=u}},{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){or(this,r)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(r){var u=r.startPoint,i=r.endPoint;this.updateStartPoint({x:u.x,y:u.y}),this.updateEndPoint({x:i.x,y:i.y})}}],n&&Ls(e.prototype,n),t}(),tf=Pt(ke.prototype,"type",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),nf=Pt(ke.prototype,"sourceNodeId",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),rf=Pt(ke.prototype,"targetNodeId",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),of=Pt(ke.prototype,"startPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Hl=Pt(ke.prototype,"endPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Ds=Pt(ke.prototype,"text",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),uf=Pt(ke.prototype,"properties",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Eu=Pt(ke.prototype,"points",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ns=Pt(ke.prototype,"pointsList",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),af=Pt(ke.prototype,"isSelected",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),sf=Pt(ke.prototype,"isHovered",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),wa=Pt(ke.prototype,"isHitable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),cf=Pt(ke.prototype,"draggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),po=Pt(ke.prototype,"visible",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),gi=Pt(ke.prototype,"isAnimation",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ff=Pt(ke.prototype,"isShowAdjustPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yl=Pt(ke.prototype,"zIndex",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Wl=Pt(ke.prototype,"state",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Vl=Pt(ke.prototype,"style",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),lf=Pt(ke.prototype,"arrowConfig",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),Pt(ke.prototype,"sourceNode",[d.m],Object.getOwnPropertyDescriptor(ke.prototype,"sourceNode"),ke.prototype),Pt(ke.prototype,"targetNode",[d.m],Object.getOwnPropertyDescriptor(ke.prototype,"targetNode"),ke.prototype),Pt(ke.prototype,"textPosition",[d.m],Object.getOwnPropertyDescriptor(ke.prototype,"textPosition"),ke.prototype),Pt(ke.prototype,"setProperty",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setProperty"),ke.prototype),Pt(ke.prototype,"deleteProperty",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"deleteProperty"),ke.prototype),Pt(ke.prototype,"setProperties",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setProperties"),ke.prototype),Pt(ke.prototype,"changeEdgeId",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"changeEdgeId"),ke.prototype),Pt(ke.prototype,"setStyle",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setStyle"),ke.prototype),Pt(ke.prototype,"setStyles",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setStyles"),ke.prototype),Pt(ke.prototype,"updateStyles",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateStyles"),ke.prototype),Pt(ke.prototype,"formatText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"formatText"),ke.prototype),Pt(ke.prototype,"resetTextPosition",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"resetTextPosition"),ke.prototype),Pt(ke.prototype,"moveText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"moveText"),ke.prototype),Pt(ke.prototype,"setText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setText"),ke.prototype),Pt(ke.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateText"),ke.prototype),Pt(ke.prototype,"setAnchors",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setAnchors"),ke.prototype),Pt(ke.prototype,"setSelected",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setSelected"),ke.prototype),Pt(ke.prototype,"setHovered",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setHovered"),ke.prototype),Pt(ke.prototype,"setHitable",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setHitable"),ke.prototype),Pt(ke.prototype,"openEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"openEdgeAnimation"),ke.prototype),Pt(ke.prototype,"closeEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"closeEdgeAnimation"),ke.prototype),Pt(ke.prototype,"setElementState",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setElementState"),ke.prototype),Pt(ke.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateStartPoint"),ke.prototype),Pt(ke.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"moveStartPoint"),ke.prototype),Pt(ke.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateEndPoint"),ke.prototype),Pt(ke.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"moveEndPoint"),ke.prototype),Pt(ke.prototype,"setZIndex",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setZIndex"),ke.prototype),Pt(ke.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"initPoints"),ke.prototype),Pt(ke.prototype,"updateAttributes",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateAttributes"),ke.prototype),Pt(ke.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"getAdjustStart"),ke.prototype),Pt(ke.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"getAdjustEnd"),ke.prototype),Pt(ke.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateAfterAdjustStartAndEnd"),ke.prototype),ke),hf=df;function zs(t){return zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zs(t)}function yf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function tp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yf(Object(n),!0).forEach(function(r){mf(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function oh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ih(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ju(){return ju=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=uh(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},ju.apply(this,arguments)}function uh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=mi(t))!==null;);return t}function gf(t,e){return gf=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},gf(t,e)}function Bs(t){var e=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=mi(t);if(e){var u=mi(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return np(this,n)}}function np(t,e){if(e&&(zs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vf(t)}function vf(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mi(t){return mi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},mi(t)}function mf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ct,rp,Fs=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&gf(i,s)})(u,t);var e,n,r=Bs(u);function u(){var i;oh(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return mf(vf(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.LINE_EDGE),i}return e=u,(n=[{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.line;return tp(tp({},ju(mi(u.prototype),"getEdgeStyle",this).call(this)),ln(i))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&ih(e.prototype,n),u}(hf);function Pu(t){return Pu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pu(t)}function Us(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return op(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return op(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  55. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function op(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Gs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function bf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gs(Object(n),!0).forEach(function(r){_f(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ah(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function yo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Sa(){return Sa=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=Gi(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},Sa.apply(this,arguments)}function Gi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=wr(t))!==null;);return t}function Ft(t,e){return Ft=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ft(t,e)}function ch(t){var e=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=wr(t);if(e){var u=wr(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Nr(this,n)}}function Nr(t,e){if(e&&(Pu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wn(t)}function wn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wr(t){return wr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wr(t)}function _f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nr(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var to=(Ct=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ft(i,s)})(u,t);var e,n,r=ch(u);function u(){var i;yo(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return _f(wn(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.POLYLINE_EDGE),_f(wn(i),"draggingPointList",void 0),ah(wn(i),"dbClickPosition",rp,wn(i)),i}return e=u,(n=[{key:"initEdgeData",value:function(i){this.offset=30,Sa(wr(u.prototype),"initEdgeData",this).call(this,i)}},{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.polyline;return bf(bf({},Sa(wr(u.prototype),"getEdgeStyle",this).call(this)),ln(i))}},{key:"getTextPosition",value:function(){var i,s=(i=this.text)===null||i===void 0?void 0:i.value;if(this.dbClickPosition&&!s){var h=this.dbClickPosition;return{x:h.x,y:h.y}}var v=Jo(this.points),x=Us(kf(v),2),S=x[0],D=x[1];return{x:(S.x+D.x)/2,y:(S.y+D.y)/2}}},{key:"getAfterAnchor",value:function(i,s,h){var v,x;return h.forEach(function(S){var D;i===mn.HORIZONTAL?D=Math.abs(s.y-S.y):i===mn.VERTICAL&&(D=Math.abs(s.x-S.x)),(!x||x>D)&&(x=D,v=S)}),v}},{key:"getCrossPoint",value:function(i,s,h){var v;return i===mn.HORIZONTAL?v={x:h.x,y:s.y}:i===mn.VERTICAL&&(v={x:s.x,y:h.y}),v}},{key:"removeCrossPoints",value:function(i,s,h){var v=h.map(function(ge){return ge});if(i===1){var x=v[i],S=v[s],D=v[i-1];if(Vs(D,x,this.sourceNode)){if(_i(x,S,this.sourceNode)){var I=Tf(x,S,this.sourceNode);I&&(v[i]=I,v.splice(i-1,1),i--,s--)}}else this.sourceNode.anchors.forEach(function(ge){(ge.x===D.x&&ge.x===x.x||ge.y===D.y&&ge.y===x.y)&&ho(ge.x,ge.y,x.x,x.y)<ho(D.x,D.y,x.x,x.y)&&(v[i-1]=ge)})}if(s===h.length-2){var H=v[i],q=v[s],ee=v[s+1];if(Vs(q,ee,this.targetNode)){if(_i(H,q,this.targetNode)){var ve=Tf(H,q,this.targetNode);ve&&(v[s]=ve,v.splice(s+1,1))}}else this.targetNode.anchors.forEach(function(ge){(ge.x===ee.x&&ge.x===q.x||ge.y===ee.y&&ge.y===q.y)&&ho(ge.x,ge.y,q.x,q.y)<ho(ee.x,ee.y,q.x,q.y)&&(v[s+1]=ge)})}return v}},{key:"getDraggingPoints",value:function(i,s,h,v,x){var S=x.map(function(H){return H}),D=this.getAfterAnchor(i,h,v),I=this.getCrossPoint(i,h,D);return s==="start"?(S.unshift(I),S.unshift(D)):(S.push(I),S.push(D)),S}},{key:"updateCrossPoints",value:function(i){var s=i.map(function(Ce){return Ce}),h=i[0],v=i[1],x=i[s.length-2],S=i[s.length-1],D=this.sourceNode,I=this.targetNode,H=D.modelType,q=I.modelType,ee=Du(h,v),ve=s[0];switch(H){case Yt.RECT_NODE:D.radius!==0&&(ql(h,D)||(ve=$l(h,ee,D)));break;case Yt.CIRCLE_NODE:ve=Rs(h,ee,D);break;case Yt.ELLIPSE_NODE:ve=Is(h,ee,D);break;case Yt.DIAMOND_NODE:case Yt.POLYGON_NODE:ve=Zl(h,ee,D)}ve&&(s[0]=ve);var ge=Du(x,S),we=s[s.length-1];switch(q){case Yt.RECT_NODE:I.radius!==0&&(ql(S,I)||(we=$l(S,ge,I)));break;case Yt.CIRCLE_NODE:we=Rs(S,ge,I);break;case Yt.ELLIPSE_NODE:we=Is(S,ge,I);break;case Yt.DIAMOND_NODE:case Yt.POLYGON_NODE:we=Zl(S,ge,I)}return we&&(s[s.length-1]=we),s}},{key:"getData",value:function(){var i=Sa(wr(u.prototype),"getData",this).call(this),s=this.pointsList.map(function(h){return{x:h.x,y:h.y}});return Object.assign({},i,{pointsList:s})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(i){return"".concat(i.x,",").concat(i.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var i=Ws({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=i,this.points=i.map(function(s){return"".concat(s.x,",").concat(s.y)}).join(" ")}},{key:"updateStartPoint",value:function(i){this.startPoint=Object.assign({},i),this.updatePoints()}},{key:"moveStartPoint",value:function(i,s){this.startPoint.x+=i,this.startPoint.y+=s,this.updatePoints()}},{key:"updateEndPoint",value:function(i){this.endPoint=Object.assign({},i),this.updatePoints()}},{key:"moveEndPoint",value:function(i,s){this.endPoint.x+=i,this.endPoint.y+=s,this.updatePoints()}},{key:"updatePointsList",value:function(i,s){this.pointsList.forEach(function(x){x.x+=i,x.y+=s});var h=this.pointsList[0];this.startPoint=Object.assign({},h);var v=this.pointsList[this.pointsList.length-1];this.endPoint=Object.assign({},v),this.initPoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map(function(i){return i})}},{key:"dragAppendSimple",value:function(i,s){this.isDragging=!0;var h=i.start,v=i.end,x=i.startIndex,S=i.endIndex,D=i.direction,I=this.pointsList,H=I;return D===mn.HORIZONTAL?(I[x]={x:h.x,y:h.y+s.y},I[S]={x:v.x,y:v.y+s.y},H=this.pointsList.map(function(q){return q})):D===mn.VERTICAL&&(I[x]={x:h.x+s.x,y:h.y},I[S]={x:v.x+s.x,y:v.y},H=this.pointsList.map(function(q){return q})),this.updatePointsAfterDrag(H),this.draggingPointList=H,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},I[x]),end:Object.assign({},I[S]),startIndex:x,endIndex:S,direction:D}}},{key:"dragAppend",value:function(i,s){this.isDragging=!0;var h=i.start,v=i.end,x=i.startIndex,S=i.endIndex,D=i.direction,I=this.pointsList;if(D===mn.HORIZONTAL){I[x]={x:h.x,y:h.y+s.y},I[S]={x:v.x,y:v.y+s.y};var H=this.pointsList.map(function($e){return $e});if(x!==0&&S!==this.pointsList.length-1&&(H=this.removeCrossPoints(x,S,H)),x===0){var q={x:h.x,y:h.y+s.y};if(!vi(q,this.sourceNode)){var ee=this.sourceNode.anchors;H=this.getDraggingPoints(D,"start",q,ee,H)}}if(S===this.pointsList.length-1){var ve={x:v.x,y:v.y+s.y};if(!vi(ve,this.targetNode)){var ge=this.targetNode.anchors;H=this.getDraggingPoints(D,"end",ve,ge,H)}}this.updatePointsAfterDrag(H),this.draggingPointList=H}else if(D===mn.VERTICAL){I[x]={x:h.x+s.x,y:h.y},I[S]={x:v.x+s.x,y:v.y};var we=this.pointsList.map(function($e){return $e});if(x!==0&&S!==this.pointsList.length-1&&(we=this.removeCrossPoints(x,S,we)),x===0){var Ce={x:h.x+s.x,y:h.y};if(!vi(Ce,this.sourceNode)){var Je=this.sourceNode.anchors;we=this.getDraggingPoints(D,"start",Ce,Je,we)}}if(S===this.pointsList.length-1){var qe={x:v.x+s.x,y:v.y};if(!vi(qe,this.targetNode)){var vt=this.targetNode.anchors;we=this.getDraggingPoints(D,"end",qe,vt,we)}}this.updatePointsAfterDrag(we),this.draggingPointList=we}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},I[x]),end:Object.assign({},I[S]),startIndex:x,endIndex:S,direction:D}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var i=Mf(Jo(this.points));this.pointsList=i.map(function(v){return v}),this.draggingPointList=[];var s=i[0];this.startPoint=Object.assign({},s);var h=i[i.length-1];this.endPoint=Object.assign({},h)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(i){var s=this.updateCrossPoints(i);this.points=s.map(function(h){return"".concat(h.x,",").concat(h.y)}).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var i=this.pointsList;return i[i.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(i){var s=i.startPoint,h=i.endPoint,v=i.sourceNode,x=i.targetNode,S=Ws({x:s.x,y:s.y},{x:h.x,y:h.y},v,x,this.offset||0);this.pointsList=S,this.initPoints()}}])&&sh(e.prototype,n),u}(hf),rp=nr(Ct.prototype,"dbClickPosition",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),nr(Ct.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"initPoints"),Ct.prototype),nr(Ct.prototype,"updatePoints",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updatePoints"),Ct.prototype),nr(Ct.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updateStartPoint"),Ct.prototype),nr(Ct.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"moveStartPoint"),Ct.prototype),nr(Ct.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updateEndPoint"),Ct.prototype),nr(Ct.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"moveEndPoint"),Ct.prototype),nr(Ct.prototype,"updatePointsList",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updatePointsList"),Ct.prototype),nr(Ct.prototype,"dragAppendStart",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppendStart"),Ct.prototype),nr(Ct.prototype,"dragAppendSimple",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppendSimple"),Ct.prototype),nr(Ct.prototype,"dragAppend",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppend"),Ct.prototype),nr(Ct.prototype,"dragAppendEnd",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppendEnd"),Ct.prototype),nr(Ct.prototype,"updatePointsAfterDrag",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updatePointsAfterDrag"),Ct.prototype),nr(Ct.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"getAdjustStart"),Ct.prototype),nr(Ct.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"getAdjustEnd"),Ct.prototype),nr(Ct.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updateAfterAdjustStartAndEnd"),Ct.prototype),Ct),Au=function(t){var e=t.start,n=t.end,r=t.offset,u=t.verticalLength,i=t.type,s={leftX:0,leftY:0,rightX:0,rightY:0},h=Math.atan((n.y-e.y)/(n.x-e.x)),v=Math.atan(r/u),x=Math.sqrt(u*u+r*r);return i==="start"?n.x>=e.x?(s.leftX=e.x+x*Math.sin(h+v),s.leftY=e.y-x*Math.cos(h+v),s.rightX=e.x-x*Math.sin(h-v),s.rightY=e.y+x*Math.cos(h-v)):(s.leftX=e.x-x*Math.sin(h+v),s.leftY=e.y+x*Math.cos(h+v),s.rightX=e.x+x*Math.sin(h-v),s.rightY=e.y-x*Math.cos(h-v)):i==="end"&&(n.x>=e.x?(s.leftX=n.x+x*Math.sin(h-v),s.leftY=n.y-x*Math.cos(h-v),s.rightX=n.x-x*Math.sin(h+v),s.rightY=n.y+x*Math.cos(h+v)):(s.leftX=n.x-x*Math.sin(h-v),s.leftY=n.y+x*Math.cos(h-v),s.rightX=n.x+x*Math.sin(h+v),s.rightY=n.y-x*Math.cos(h+v))),s},Xs={x:1,y:0,z:0};function Pn(t,e,n,r,u){for(var i=function(q){if(q<0||q>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-q,3)+3*e.x*q*Math.pow(1-q,2)+3*n.x*Math.pow(q,2)*(1-q)+r.x*Math.pow(q,3),y:t.y*Math.pow(1-q,3)+3*e.y*q*Math.pow(1-q,2)+3*n.y*Math.pow(q,2)*(1-q)+r.y*Math.pow(q,3)}},s=0,h=2,v=r.x,x=r.y,S=r;s<u&&h<50;){var D=S=i(1-h/100),I=D.x,H=D.y;s=ho(v,x,I,H),h++}return S}function kn(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function Of(t){return r=function(i,s){return i.x*s.y-i.y*s.x}(e=Xs,n=t),u=Math.acos(function(i,s){var h=[i.x,i.y,i.z];return[s.x,s.y,s.z].reduce(function(v,x,S){return v+x*h[S]})}(kn(e),kn(n))),r>=0?u:-u;var e,n,r,u}function wf(t){return t*(180/Math.PI)}function Mu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function ku(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ip(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hs(t){return function(e){if(Array.isArray(e))return xf(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||up(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  56. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xr(t){return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(t)}function Zo(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||up(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  57. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function up(t,e){if(t){if(typeof t=="string")return xf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xf(t,e):void 0}}function xf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ap=function(t,e){var n;switch(t.type){case"line":default:n=new Fs(t,e);break;case"polyline":n=new to(t,e)}return n},No=function(t,e){return 2*Math.abs(t.centerX-e.centerX)<t.width+e.width&&2*Math.abs(t.centerY-e.centerY)<t.height+e.height},Ut=function(t){var e=[],n={};return t.forEach(function(r){var u="".concat(r.x,"-").concat(r.y);r.id=u,n[u]=r}),Object.keys(n).forEach(function(r){e.push(n[r])}),e},sp=function(t,e){var n=[t,{x:t.x,y:e.y},e];return Ut(n)},dr=function(t,e){return t.width===0&&t.height===0?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},Ef=function(t,e){var n=Math.abs(t.x-e.centerX),r=Math.abs(t.y-e.centerY);return n/e.width>r/e.height?mn.HORIZONTAL:mn.VERTICAL},nn=function(t,e,n){return Ef(n,e)===mn.HORIZONTAL?{x:n.x>t.centerX?t.maxX:t.minX,y:n.y}:{x:n.x,y:n.y>t.centerY?t.maxY:t.minY}},Sf=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),u=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(n+u)/2,centerY:(r+i)/2,minX:n,minY:r,maxX:u,maxY:i,height:i-r,width:u-n}},Xi=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=[],r=[];t.forEach(function(S){n.push(S.x),r.push(S.y)});var u=Math.min.apply(Math,n),i=Math.max.apply(Math,n),s=Math.min.apply(Math,r),h=Math.max.apply(Math,r),v=i-u,x=h-s;return e&&(v+=e,x+=e),{centerX:(u+i)/2,centerY:(s+h)/2,maxX:i,maxY:h,minX:u,minY:s,x:(u+i)/2,y:(s+h)/2,height:x,width:v}},bi=function(t){var e=t.minX,n=t.minY,r=t.maxX,u=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:u},{x:e,y:u}]},ja=function(t,e){var n=t.x,r=t.y;return n<e.minX||n>e.maxX||r<e.minY||r>e.maxY},cp=function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},fp=function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},lp=function(t,e){return cp(t,e.x).concat(fp(t,e.y))},Tu=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Ys=function(t,e){var n=0;return e.forEach(function(r){r&&(t.x===r.x&&(n+=-2),t.y===r.y&&(n+=-2))}),n},jf=function(t,e,n,r,u){return Tu(t,e)+Tu(t,n)+Ys(t,[e,n,r,u])},pp=function t(e,n,r,u,i){i||(i=0),e.unshift(n[u]),r[u]&&r[u]!==u&&i<=100&&t(e,n,r,r[u],i+1)},dp=function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)},Tn=function(t,e,n,r){var u=e.x-t.x,i=e.y-t.y,s=r.x-n.x,h=r.y-n.y,v=(-i*(t.x-n.x)+u*(t.y-n.y))/(-s*i+u*h),x=(s*(t.y-n.y)-h*(t.x-n.x))/(-s*i+u*h);return v>=0&&v<=1&&x>=0&&x<=1},hr=function(t,e,n){if(n.width===0&&n.height===0)return!1;var r=Zo(bi(n),4),u=r[0],i=r[1],s=r[2],h=r[3];return Tn(t,e,u,i)||Tn(t,e,u,h)||Tn(t,e,i,s)||Tn(t,e,s,h)},hp=function(t,e,n,r){var u=[];return t.forEach(function(i){i!==e&&(i.x!==e.x&&i.y!==e.y||hr(i,e,n)||hr(i,e,r)||u.push(i))}),Ut(u)},Pf=function(t,e,n,r,u,i,s){var h=[],v=[e],x={},S={},D={};S[e.id]=0,D[e.id]=jf(e,n,e);var I={};t.forEach(function(ee){I[ee.id]=ee});for(var H=function(){var ee=void 0,ve=1/0;if(v.forEach(function(we){D[we.id]<ve&&(ve=D[we.id],ee=we)}),ee===n){var ge=[];return pp(ge,I,x,n.id),{v:ge}}dp(v,ee),h.push(ee),hp(t,ee,r,u).forEach(function(we){if(h.indexOf(we)===-1){v.indexOf(we)===-1&&v.push(we);var Ce=D[ee.id]+Tu(ee,we);S[we.id]&&Ce>=S[we.id]||(x[we.id]=ee.id,S[we.id]=Ce,D[we.id]=S[we.id]+jf(we,n,e,i,s))}})};v.length;){var q=H();if(xr(q)==="object")return q.v}return[e,n]},Af=function(t){return jn(t)},Mf=function(t){for(var e=1;e<t.length-1;){var n=t[e-1],r=t[e],u=t[e+1];n.x===r.x&&r.x===u.x||n.y===r.y&&r.y===u.y?t.splice(e,1):e++}return t},Ws=function(t,e,n,r,u){var i=Af(n),s=Af(r),h=dr(i,u),v=dr(s,u),x=nn(h,i,t),S=nn(v,s,e);if(No(h,v)){var D=yp(t,e,x,S);return[t,x].concat(Hs(D),[S,e])}var I=Xi([x,S]),H=Sf(h,I),q=Sf(v,I),ee=[];ee=(ee=ee.concat(bi(H))).concat(bi(q));var ve={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[I,H,q].forEach(function(we){ee=ee.concat(lp(we,ve).filter(function(Ce){return ja(Ce,h)&&ja(Ce,v)}))}),[{x:x.x,y:S.y},{x:S.x,y:x.y}].forEach(function(we){ja(we,h)&&ja(we,v)&&ee.push(we)}),ee.unshift(x),ee.push(S),ee=Ut(ee);var ge=Pf(ee,x,S,i,s,t,e);return ge.unshift(t),ge.push(e),ge.length>2&&(ge=Mf(ge)),Ut(ge)},kf=function(t){var e;if(t.length===1)e=[t[0],t[0]];else if(t.length>=2){for(var n=t[0],r=t[1],u=ho(n.x,n.y,r.x,r.y),i=1;i<t.length-1;i++){var s=t[i],h=t[i+1],v=ho(s.x,s.y,h.x,h.y);v>u&&(u=v,n=s,r=h)}e=[n,r]}return e},Vs=function(t,e,n){var r=vi(t,n),u=vi(e,n);return r&&u},_i=function(t,e,n){var r=vi(t,n),u=vi(e,n);return!(r&&u)&&(r||u)},Tf=function(t,e,n){for(var r,u,i=jn(n),s=bi(i),h=0;h<s.length;h++)Tn(t,e,s[h],s[(h+1)%s.length])&&(u=[s[h],s[(h+1)%s.length]]);return u&&(r=function(v,x,S,D){var I=(x.y-v.y)*(D.x-S.x)-(v.x-x.x)*(S.y-D.y);if(I===0)return!1;var H=((x.x-v.x)*(D.x-S.x)*(S.y-v.y)+(x.y-v.y)*(D.x-S.x)*v.x-(D.y-S.y)*(x.x-v.x)*S.x)/I,q=-((x.y-v.y)*(D.y-S.y)*(S.x-v.x)+(x.x-v.x)*(D.y-S.y)*v.y-(D.x-S.x)*(x.y-v.y)*S.y)/I;return(H-v.x)*(H-x.x)<=0&&(q-v.y)*(q-x.y)<=0&&(H-S.x)*(H-D.x)<=0&&(q-S.y)*(q-D.y)<=0&&{x:H,y:q}}(t,e,u[0],u[1])),r},Du=function(t,e){var n;return t.x===e.x?n=mn.VERTICAL:t.y===e.y&&(n=mn.HORIZONTAL),n},Jo=function(t){var e=t.split(" "),n=[];return e&&e.forEach(function(r){var u=Zo(r.split(","),2),i=u[0],s=u[1];n.push({x:Number(i),y:Number(s)})}),n},yp=function(t,e,n,r){var u=[];if(Du(t,n)===Du(e,r))t.y===n.y?(u.push({x:n.x,y:(n.y+r.y)/2}),u.push({x:r.x,y:(n.y+r.y)/2})):(u.push({x:(n.x+r.x)/2,y:n.y}),u.push({x:(n.x+r.x)/2,y:r.y}));else{var i={x:n.x,y:r.y},s=Hr(i,t,n),h=Hr(i,e,r);if(s||h)i={x:r.x,y:n.y};else{var v=gp(i,t,n),x=gp(i,e,r);v&&x&&(i={x:r.x,y:n.y})}u.push(i)}return u},gp=function(t,e,n){return t.x===e.x&&t.x===n.x||t.y===e.y&&t.y===n.y},Df=function(t){if(!t)return 0;for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:e+=r>=1&&r<=126||r>=65376&&r<=65439?1:2}return e},Nf=null,fh=function(t,e){Nf||(Nf=document.createElement("canvas"));var n=Nf.getContext("2d");return n.font=e,n.measureText(t).width},vp=function(t){var e,n=t.start,r=t.end;if(n.x===r.x&&n.y===r.y)e="";else{var u={start:n,end:r,offset:10,verticalLength:5},i=Au(ku(ku({},u),{},{type:"start"})),s=Au(ku(ku({},u),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY,`
  58. L`).concat(i.rightX," ").concat(i.rightY,`
  59. L`).concat(s.rightX," ").concat(s.rightY,`
  60. L`).concat(s.leftX," ").concat(s.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},Pa=function(t){var e=t.start,n=t.end,r=t.sourceNode,u=t.targetNode,i=t.offset,s=jn(r),h=jn(u),v=dr(s,i),x=dr(h,i);return{sNext:nn(v,s,e),ePre:nn(x,h,n)}},Aa=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Ma(e[0]),Ma(e[1]),Ma(e[2]),Ma(e[3])]},Ma=function(t){var e=Zo(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Cf=function(t,e){var n=Zo(t,4);return[Pn(n[0],n[1],n[2],n[3],e),t[3]]},ka=function(t,e){for(var n,r=t.x,u=t.y,i=Jo(e),s=Number.MAX_SAFE_INTEGER,h=[],v=0;v<i.length;v++)h.push({start:i[v],end:i[(v+1)%i.length]});if(h.forEach(function(I){var H=I.start,q=I.end;if(H.x===q.x){var ee={x:H.x,y:u};if(Hr(ee,H,q)){var ve=Math.abs(H.x-r);ve<s&&(s=ve,n=ee)}}else if(H.y===q.y){var ge={x:r,y:H.y};if(Hr(ge,H,q)){var we=Math.abs(H.y-u);we<s&&(s=we,n=ge)}}}),!n){var x=h[0],S=x.start,D=x.end;n={x:S.x+(D.x-S.x)/2,y:S.y+(D.y-S.y)/2}}return n},mp=function(t){return Ho(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Rf=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function Er(t,e){return typeof e!="function"?function(n,r,u){return Object.assign({type:t.edgeType},u)}:function(n,r,u){var i=e(n,r,u);return i?typeof i=="string"?Object.assign({},u,{type:i}):Object.assign({type:i},u):{type:t.edgeType}}}o(208);var Ta=function(){};function lh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var no=function(){function t(r){var u=this,i=r.onDragStart,s=i===void 0?Ta:i,h=r.onDragging,v=h===void 0?Ta:h,x=r.onDragEnd,S=x===void 0?Ta:x,D=r.eventType,I=D===void 0?"":D,H=r.eventCenter,q=H===void 0?null:H,ee=r.step,ve=ee===void 0?1:ee,ge=r.isStopPropagation,we=ge===void 0||ge,Ce=r.model,Je=Ce===void 0?null:Ce,qe=r.data,vt=qe===void 0?null:qe;(function($e,ht){if(!($e instanceof ht))throw new TypeError("Cannot call a class as a function")})(this,t),Yn(this,"onDragStart",void 0),Yn(this,"onDragging",void 0),Yn(this,"onDragEnd",void 0),Yn(this,"step",void 0),Yn(this,"isStopPropagation",void 0),Yn(this,"isDragging",!1),Yn(this,"isStartDragging",!1),Yn(this,"startX",0),Yn(this,"startY",0),Yn(this,"sumDeltaX",0),Yn(this,"sumDeltaY",0),Yn(this,"eventType",void 0),Yn(this,"eventCenter",void 0),Yn(this,"model",void 0),Yn(this,"data",void 0),Yn(this,"startTime",void 0),Yn(this,"handleMouseDown",function($e){var ht,tt,Kt,Jt=(ht=window)===null||ht===void 0?void 0:ht.document;if($e.button===0){u.isStopPropagation&&$e.stopPropagation(),u.isStartDragging=!0,u.startX=$e.clientX,u.startY=$e.clientY,Jt.addEventListener("mousemove",u.handleMouseMove,!1),Jt.addEventListener("mouseup",u.handleMouseUp,!1);var Tt=(tt=u.model)===null||tt===void 0?void 0:tt.getData();(Kt=u.eventCenter)===null||Kt===void 0||Kt.emit(pt["".concat(u.eventType,"_MOUSEDOWN")],{e:$e,data:u.data||Tt}),u.startTime=new Date().getTime()}}),Yn(this,"handleMouseMove",function($e){if(u.isStopPropagation&&$e.stopPropagation(),u.isStartDragging&&(u.sumDeltaX+=$e.clientX-u.startX,u.sumDeltaY+=$e.clientY-u.startY,u.startX=$e.clientX,u.startY=$e.clientY,u.step<=1||Math.abs(u.sumDeltaX)>u.step||Math.abs(u.sumDeltaY)>u.step)){var ht,tt=u.sumDeltaX%u.step,Kt=u.sumDeltaY%u.step,Jt=u.sumDeltaX-tt,Tt=u.sumDeltaY-Kt;u.sumDeltaX=tt,u.sumDeltaY=Kt;var rn,Un=(ht=u.model)===null||ht===void 0?void 0:ht.getData();u.isDragging||((rn=u.eventCenter)===null||rn===void 0||rn.emit(pt["".concat(u.eventType,"_DRAGSTART")],{e:$e,data:u.data||Un}),u.onDragStart({event:$e})),u.isDragging=!0,Promise.resolve().then(function(){var Gn,Sr;u.onDragging({deltaX:Jt,deltaY:Tt,event:$e}),(Gn=u.eventCenter)===null||Gn===void 0||Gn.emit(pt["".concat(u.eventType,"_MOUSEMOVE")],{e:$e,data:u.data||Un}),(Sr=u.eventCenter)===null||Sr===void 0||Sr.emit(pt["".concat(u.eventType,"_DRAG")],{e:$e,data:u.data||Un})})}}),Yn(this,"handleMouseUp",function($e){var ht=window.document;u.isStartDragging=!1,u.isStopPropagation&&$e.stopPropagation(),Promise.resolve().then(function(){var tt,Kt,Jt;ht.removeEventListener("mousemove",u.handleMouseMove,!1),ht.removeEventListener("mouseup",u.handleMouseUp,!1);var Tt=(tt=u.model)===null||tt===void 0?void 0:tt.getData();(Kt=u.eventCenter)===null||Kt===void 0||Kt.emit(pt["".concat(u.eventType,"_MOUSEUP")],{e:$e,data:u.data||Tt}),u.isDragging&&(u.isDragging=!1,u.onDragEnd({event:$e}),(Jt=u.eventCenter)===null||Jt===void 0||Jt.emit(pt["".concat(u.eventType,"_DROP")],{e:$e,data:u.data||Tt}))})}),Yn(this,"cancelDrag",function(){var $e,ht=($e=window)===null||$e===void 0?void 0:$e.document;ht.removeEventListener("mousemove",u.handleMouseMove,!1),ht.removeEventListener("mouseup",u.handleMouseUp,!1),u.onDragEnd({event:null}),u.isDragging=!1}),this.onDragStart=s,this.onDragging=v,this.onDragEnd=S,this.step=ve,this.isStopPropagation=we,this.eventType=I,this.eventCenter=q,this.model=Je,this.data=vt}var e,n;return e=t,(n=[{key:"setStep",value:function(r){this.step=r}},{key:"setModel",value:function(r){this.model=r}}])&&lh(e.prototype,n),t}();function Da(t){return Da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Da(t)}function If(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Lf(t,e,n){return e&&ph(t.prototype,e),t}function Ks(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ca(t,e)}function zf(t){var e=bp();return function(){var n,r=Ra(t);if(e){var u=Ra(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return dh(this,n)}}function dh(t,e){if(e&&(Da(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qo(t)}function Qo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Na(t){var e=typeof Map=="function"?new Map:void 0;return Na=function(n){if(n===null||(r=n,Function.toString.call(r).indexOf("[native code]")===-1))return n;var r;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,u)}function u(){return Bf(n,arguments,Ra(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Ca(u,n)},Na(t)}function Bf(t,e,n){return Bf=bp()?Reflect.construct:function(r,u,i){var s=[null];s.push.apply(s,u);var h=new(Function.bind.apply(r,s));return i&&Ca(h,i.prototype),h},Bf.apply(null,arguments)}function bp(){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(t){return!1}}function Ca(t,e){return Ca=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ca(t,e)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ra(t)}function Ia(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _p(t,e){return t instanceof rr&&e instanceof rr}var Op=function(t){Ks(n,t);var e=zf(n);function n(r,u,i){var s;return If(this,n),Ia(Qo(s=e.call(this,3)),"x",void 0),Ia(Qo(s),"y",void 0),Ia(Qo(s),"z",void 0),s[0]=r,s[1]=u,s[2]=i,s.x=r,s.y=u,s.z=i,Object.setPrototypeOf(Qo(s),n.prototype),s}return Lf(n,[{key:"add",value:function(r){if(_p(this,r))return new rr(this.x+r.x,this.y+r.y);var u=this.z+r.z;return new a((this.x+r.x)/u,(this.y+r.y)/u)}},{key:"subtract",value:function(r){if(_p(this,r))return new rr(this.x-r.x,this.y-r.y);var u=this.z-r.z;return u===0?new rr(this.x-r.x,this.y-r.y):new a((this.x-r.x)/u,(this.y-r.y)/u)}}]),n}(Na(Array)),rr=function(t){Ks(n,t);var e=zf(n);function n(r,u,i){var s;return If(this,n),s=e.call(this,r,u,i!=null?i:0),Object.setPrototypeOf(Qo(s),n.prototype),s}return Lf(n,[{key:"toString",value:function(){return"Vector"}},{key:"dot",value:function(r){var u=this;return r.reduce(function(i,s,h){return i+s*u[h]})}},{key:"cross",value:function(r){return new n(this.y*r.z-this.z*r.y,this.z*r.x-this.x*r.z,this.x*r.y-this.y*r.x)}},{key:"getLength",value:function(){return Math.hypot(this.x,this.y)}},{key:"normalize",value:function(){var r=this.getLength();return new n(this.x/r,this.y/r)}},{key:"crossZ",value:function(r){return this.x*r.y-this.y*r.x}},{key:"angle",value:function(r){var u=this.crossZ(r),i=Math.acos(this.normalize().dot(r.normalize()));return u>=0?i:-i}}]),n}(Op),a=function(t){Ks(n,t);var e=zf(n);function n(r,u){var i;return If(this,n),i=e.call(this,r,u,1),Object.setPrototypeOf(Qo(i),n.prototype),i}return Lf(n,[{key:"toString",value:function(){return"Point"}}]),n}(Op);o(67),o(218);function f(t){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(t)}function b(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||N(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  61. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function j(t){return function(e){if(Array.isArray(e))return U(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||N(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  62. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function N(t,e){if(t){if(typeof t=="string")return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(t,e):void 0}}function U(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _e(t,e,n){return e&&fe(t.prototype,e),t}function Ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xe(t,e)}function De(t){var e=ze();return function(){var n,r=jt(t);if(e){var u=jt(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Ge(this,n)}}function Ge(t,e){if(e&&(f(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rt(t)}function rt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dt(t){var e=typeof Map=="function"?new Map:void 0;return dt=function(n){if(n===null||(r=n,Function.toString.call(r).indexOf("[native code]")===-1))return n;var r;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,u)}function u(){return xt(n,arguments,jt(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Xe(u,n)},dt(t)}function xt(t,e,n){return xt=ze()?Reflect.construct:function(r,u,i){var s=[null];s.push.apply(s,u);var h=new(Function.bind.apply(r,s));return i&&Xe(h,i.prototype),h},xt.apply(null,arguments)}function ze(){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(t){return!1}}function Xe(t,e){return Xe=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Xe(t,e)}function jt(t){return jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jt(t)}function it(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ce,Rt,$t,bt,Mt,Wn,Cr,go,Vn,Co,ei,Nu,La,Ro=function(t){Ie(n,t);var e=De(n);function n(){var r;ne(this,n);for(var u=arguments.length,i=new Array(u),s=0;s<u;s++)i[s]=arguments[s];return it(rt(r=e.call(this,i.length)),"rows",void 0),it(rt(r),"columns",void 0),r.fill(new Array(3)),i.forEach(function(h,v){r[v]=h}),r.columns=i[0].length,r.rows=i.length,Object.setPrototypeOf(rt(r),n.prototype),r}return _e(n,[{key:"getRow",value:function(r){return this[r]}},{key:"getColumn",value:function(r){return j(this.map(function(u){return u[r]}))}},{key:"transpose",value:function(){for(var r=[],u=0;u<this.columns;u++)r.push(this.getColumn(u));return xt(n,r)}},{key:"cross",value:function(r){var u=new Array(this.rows).fill("").map(function(){return[]});if(this.columns===r.rows)for(var i=0;i<this.rows;i++)for(var s=this.getRow(i),h=function(x){var S=r.getColumn(x);u[i][x]=s.reduce(function(D,I,H){return D+I*S[H]},0)},v=0;v<r.columns;v++)h(v);return xt(n,j(u))}},{key:"to2D",value:function(){return this.map(function(r){return[r[0],r[1]]})}},{key:"toPoints",value:function(){return this.map(function(r){return new a(r[0],r[1])})}},{key:"toString",value:function(){var r=b(this[0],2),u=r[0],i=r[1],s=b(this[1],2),h=s[0],v=s[1],x=b(this[2],2),S=x[0],D=x[1];return"matrix(".concat(u," ").concat(i," ").concat(h," ").concat(v," ").concat(S," ").concat(D,")")}},{key:"translate",value:function(r,u){return this.cross(new Cu(r,u))}},{key:"rotate",value:function(r){return this.cross(new Oi(r))}},{key:"scale",value:function(r,u){return this.cross(new Ff(r,u))}}]),n}(dt(Array)),Oi=function(t){Ie(n,t);var e=De(n);function n(r){var u;return ne(this,n),u=e.call(this,new rr(+Math.cos(r).toFixed(2),+Math.sin(r).toFixed(2),0),new rr(-Math.sin(r).toFixed(2),+Math.cos(r).toFixed(2),0),new rr(0,0,1)),Object.setPrototypeOf(rt(u),n.prototype),u}return _e(n,[{key:"inverse",value:function(){return this.transpose()}}]),n}(Ro),Ff=function(t){Ie(n,t);var e=De(n);function n(r,u){var i;return ne(this,n),it(rt(i=e.call(this,new rr(r,0,0),new rr(0,u,0),new rr(0,0,1))),"sx",void 0),it(rt(i),"sy",void 0),i.sx=r,i.sy=u,Object.setPrototypeOf(rt(i),n.prototype),i}return _e(n,[{key:"inverse",value:function(){return new n(1/this.sx,1/this.sy)}}]),n}(Ro),Cu=function(t){Ie(n,t);var e=De(n);function n(r,u){var i;return ne(this,n),it(rt(i=e.call(this,new rr(1,0,0),new rr(0,1,0),new rr(r,u,1))),"tx",void 0),it(rt(i),"ty",void 0),i.tx=r,i.ty=u,Object.setPrototypeOf(rt(i),n.prototype),i}return _e(n,[{key:"inverse",value:function(){return new n(-this.tx,-this.ty)}}]),n}(Ro),za={node:!1,edge:!1},Uf={node:!0,edge:!0};function Ba(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Hi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ba(Object(n),!0).forEach(function(r){ni(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ba(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Yi(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||Fa(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  63. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ti(t){return function(e){if(Array.isArray(e))return hh(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||Fa(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  64. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fa(t,e){if(t){if(typeof t=="string")return hh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hh(t,e):void 0}}function hh(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wp(t){return wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wp(t)}function Io(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function uO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _t(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var yv,gv=200,vv=(ce=function(){function t(r){(function(H,q){if(!(H instanceof q))throw new TypeError("Cannot call a class as a function")})(this,t),ni(this,"rootEl",void 0),Io(this,"width",Rt,this),Io(this,"height",$t,this),ni(this,"theme",void 0),ni(this,"eventCenter",void 0),ni(this,"modelMap",new Map),ni(this,"topElement",void 0),ni(this,"animation",void 0),ni(this,"idGenerator",void 0),ni(this,"edgeGenerator",void 0),ni(this,"nodeMoveRules",[]),ni(this,"customTrajectory",void 0),Io(this,"edgeType",bt,this),Io(this,"nodes",Mt,this),Io(this,"edges",Wn,this),Io(this,"overlapMode",Cr,this),Io(this,"background",go,this),Io(this,"transformModel",Vn,this),Io(this,"editConfigModel",Co,this),Io(this,"gridSize",ei,this),Io(this,"partial",Nu,this),Io(this,"fakerNode",La,this);var u,i=r.container,s=r.background,h=s===void 0?{}:s,v=r.grid,x=r.idGenerator,S=r.edgeGenerator,D=r.animation,I=r.customTrajectory;this.background=h,wp(v)==="object"&&(this.gridSize=v.size),this.rootEl=i,this.editConfigModel=new Ic(r),this.eventCenter=new zl,this.transformModel=new El(this.eventCenter,r),this.theme=Bi(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=(u=D)&&typeof u!="boolean"?va(ln(za),u):ln(u===!0?Uf:za),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=x,this.customTrajectory=I,this.edgeGenerator=Er(this,S),this.width=r.width||this.rootEl.getBoundingClientRect().width,this.height=r.height||this.rootEl.getBoundingClientRect().height,this.flowId=qo()}var e,n;return e=t,n=[{key:"nodesMap",get:function(){return this.nodes.reduce(function(r,u,i){return r[u.id]={index:i,model:u},r},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(r,u,i){return r[u.id]={index:i,model:u},r},{})}},{key:"modelsMap",get:function(){return[].concat(ti(this.nodes),ti(this.edges)).reduce(function(r,u){return r[u.id]=u,r},{})}},{key:"sortElements",get:function(){var r=[];this.nodes.forEach(function(x){return r.push(x)}),this.edges.forEach(function(x){return r.push(x)}),r=r.sort(function(x,S){return x.zIndex-S.zIndex});for(var u=[],i=[-200,-200],s=[this.width+gv,this.height+gv],h=0;h<r.length;h++){var v=r[h];v.visible&&(!this.partial||v.isSelected||this.isElementInArea(v,i,s,!1,!1))&&u.push(v)}return u}},{key:"textEditElement",get:function(){var r=this.nodes.find(function(i){return i.state===cn.TEXT_EDIT}),u=this.edges.find(function(i){return i.state===cn.TEXT_EDIT});return r||u}},{key:"selectElements",get:function(){var r=new Map;return this.nodes.forEach(function(u){u.isSelected&&r.set(u.id,u)}),this.edges.forEach(function(u){u.isSelected&&r.set(u.id,u)}),r}},{key:"selectNodes",get:function(){var r=[];return this.nodes.forEach(function(u){u.isSelected&&r.push(u)}),r}},{key:"getAreaElement",value:function(r,u){var i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],h=arguments.length>4&&arguments[4]!==void 0&&arguments[4],v=[],x=[];this.nodes.forEach(function(I){return x.push(I)}),this.edges.forEach(function(I){return x.push(I)});for(var S=0;S<x.length;S++){var D=x[S];h&&!D.visible||!this.isElementInArea(D,r,u,i,s)||v.push(D)}return v}},{key:"getModel",value:function(r){return this.modelMap.get(r)}},{key:"getNodeModelById",value:function(r){var u;return this.fakerNode&&r===this.fakerNode.id?this.fakerNode:(u=this.nodesMap[r])===null||u===void 0?void 0:u.model}},{key:"getPointByClient",value:function(r){var u=r.x,i=r.y,s=this.rootEl.getBoundingClientRect(),h={x:u-s.left,y:i-s.top},v=Yi(this.transformModel.HtmlPointToCanvasPoint([h.x,h.y]),2);return{domOverlayPosition:h,canvasOverlayPosition:{x:v[0],y:v[1]}}}},{key:"isElementInArea",value:function(r,u,i){var s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],h=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(r.BaseType===Bn.NODE){for(var v=jn(r=r),x=v.minX,S=v.minY,D=v.maxX,I=v.maxY,H=[{x,y:S},{x:D,y:S},{x:D,y:I},{x,y:I}],q=h,ee=0;ee<H.length;ee++){var ve=H[ee],ge=ve.x,we=ve.y,Ce=this.transformModel.CanvasPointToHtmlPoint([ge,we]),Je=Yi(Ce,2);if(ge=Je[0],we=Je[1],_a([ge,we],u,i)!==h){q=!h;break}}return q}if(r.BaseType===Bn.EDGE){var qe=r=r,vt=qe.startPoint,$e=qe.endPoint,ht=this.transformModel.CanvasPointToHtmlPoint([vt.x,vt.y]),tt=this.transformModel.CanvasPointToHtmlPoint([$e.x,$e.y]),Kt=_a(ht,u,i),Jt=_a(tt,u,i);return s?Kt&&Jt:Kt||Jt}return!1}},{key:"graphDataToModel",value:function(r){var u=this;if(this.width&&this.height||this.resize(),!r)return this.nodes=[],void(this.edges=[]);r.nodes?this.nodes=is(r.nodes,function(i){return u.getModelAfterSnapToGrid(i)}):this.nodes=[],r.edges?this.edges=is(r.edges,function(i){var s=u.getModel(i.type);if(!s)throw new Error("找不到".concat(i.type,"对应的边。"));return new s(i,u)}):this.edges=[]}},{key:"modelToGraphData",value:function(){var r=[];this.edges.forEach(function(i){var s=i.getData();s&&!i.virtual&&r.push(s)});var u=[];return this.nodes.forEach(function(i){var s=i.getData();s&&!i.virtual&&u.push(s)}),{nodes:u,edges:r}}},{key:"modelToHistoryData",value:function(){for(var r=!1,u=[],i=0;i<this.nodes.length;i++){var s=this.nodes[i];if(s.isDragging){r=!0;break}u.push(s.getHistoryData())}if(r)return!1;for(var h=!1,v=[],x=0;x<this.edges.length;x++){var S=this.edges[x];if(S.isDragging){h=!0;break}v.push(S.getHistoryData())}return!h&&{nodes:u,edges:v}}},{key:"getEdgeModelById",value:function(r){var u;return(u=this.edgesMap[r])===null||u===void 0?void 0:u.model}},{key:"getElement",value:function(r){return this.modelsMap[r]}},{key:"getNodeEdges",value:function(r){for(var u=[],i=0;i<this.edges.length;i++){var s=this.edges[i],h=this.edges[i].sourceNodeId===r,v=this.edges[i].targetNodeId===r;(h||v)&&u.push(s)}return u}},{key:"getSelectElements",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],u=this.selectElements,i={nodes:[],edges:[]};return u.forEach(function(s){if(s.BaseType===Bn.NODE&&i.nodes.push(s.getData()),s.BaseType===Bn.EDGE){var h=s.getData(),v=u.get(h.sourceNodeId)&&u.get(h.targetNodeId);(r||v)&&i.edges.push(h)}}),i}},{key:"updateAttributes",value:function(r,u){this.getElement(r).updateAttributes(u)}},{key:"changeNodeId",value:function(r,u){return u||(u=qo()),this.nodesMap[u]?"":this.nodesMap[r]?(this.edges.forEach(function(i){i.sourceNodeId===r&&(i.sourceNodeId=u),i.targetNodeId===r&&(i.targetNodeId=u)}),this.nodesMap[r].model.id=u,this.nodesMap[u]=this.nodesMap[r],u):""}},{key:"changeEdgeId",value:function(r,u){return u||(u=qo()),this.edgesMap[u]?"":this.edgesMap[r]?(this.edges.forEach(function(i){i.id===r&&i.changeEdgeId(u)}),u):""}},{key:"setFakerNode",value:function(r){this.fakerNode=r}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(r,u){return this.modelMap.set(r,u)}},{key:"toFront",value:function(r){var u,i,s,h=((u=this.nodesMap[r])===null||u===void 0?void 0:u.model)||((i=this.edgesMap[r])===null||i===void 0?void 0:i.model);h&&(this.overlapMode===Sn.DEFAULT&&((s=this.topElement)===null||s===void 0||s.setZIndex(),h.setZIndex(9999),this.topElement=h),this.overlapMode===Sn.INCREASE&&this.setElementZIndex(r,"top"))}},{key:"setElementZIndex",value:function(r,u){var i,s,h,v=((i=this.nodesMap[r])===null||i===void 0?void 0:i.model)||((s=this.edgesMap[r])===null||s===void 0?void 0:s.model);v&&(typeof u=="number"&&(h=u),u==="top"&&(h=pf()),u==="bottom"&&(h=--rh),v.setZIndex(h))}},{key:"deleteNode",value:function(r){var u=this.nodesMap[r].model.getData();this.deleteEdgeBySource(r),this.deleteEdgeByTarget(r),this.nodes.splice(this.nodesMap[r].index,1),this.eventCenter.emit(pt.NODE_DELETE,{data:u})}},{key:"addNode",value:function(r){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt.NODE_ADD,i=arguments.length>2?arguments[2]:void 0,s=pr(r);s.id&&this.nodesMap[r.id]&&delete s.id;var h=this.getModelAfterSnapToGrid(s);this.nodes.push(h);var v=h.getData(),x={data:v};return i&&(x.e=i),this.eventCenter.emit(u,x),h}},{key:"getModelAfterSnapToGrid",value:function(r){var u=this.getModel(r.type);if(!u)throw new Error("找不到".concat(r.type,"对应的节点,请确认是否已注册此类型节点。"));var i=r.x,s=r.y;return i&&s&&(r.x=yi(i,this.gridSize),r.y=yi(s,this.gridSize),wp(r.text)==="object"&&(r.text.x+=r.x-i,r.text.y+=r.y-s)),new u(r,this)}},{key:"cloneNode",value:function(r){var u=this.getNodeModelById(r),i=u.getData();i.x+=30,i.y+=30,delete i.id,i.text&&(i.text.x+=30,i.text.y+=30);var s=this.addNode(i);return s.setSelected(!0),u.setSelected(!1),s.getData()}},{key:"moveNode",value:function(r,u,i){var s=arguments.length>3&&arguments[3]!==void 0&&arguments[3],h=this.nodesMap[r];if(h){var v=h.model,x=v.getMoveDistance(u,i,s),S=Yi(x,2);u=S[0],i=S[1],this.moveEdge(r,u,i)}}},{key:"moveNode2Coordinate",value:function(r,u,i){var s=arguments.length>3&&arguments[3]!==void 0&&arguments[3],h=this.nodesMap[r];if(h){var v=h.model,x=v.x,S=v.y,D=u-x,I=i-S;this.moveNode(r,D,I,s)}}},{key:"editText",value:function(r){this.setElementStateById(r,cn.TEXT_EDIT)}},{key:"addEdge",value:function(r){var u=pr(r),i=u.type;i||(i=this.edgeType),u.id&&this.edgesMap[u.id]&&delete u.id;var s=this.getModel(i);if(!s)throw new Error("找不到".concat(i,"对应的边,请确认是否已注册此类型边。"));var h=new s(Hi(Hi({},u),{},{type:i}),this),v=h.getData();return this.edges.push(h),this.eventCenter.emit(pt.EDGE_ADD,{data:v}),h}},{key:"moveEdge",value:function(r,u,i){for(var s=0;s<this.edges.length;s++){var h=this.edges[s],v=h.textPosition,x=v.x,S=v.y,D=this.edges[s].sourceNodeId===r,I=this.edges[s].targetNodeId===r;D&&h.moveStartPoint(u,i),I&&h.moveEndPoint(u,i),(D||I)&&this.handleEdgeTextMove(h,x,S)}}},{key:"handleEdgeTextMove",value:function(r,u,i){var s;if(r.customTextPosition===!0)r.resetTextPosition();else if(r.modelType===Yt.POLYLINE_EDGE&&(s=r.text)!==null&&s!==void 0&&s.value){var h=r.text,v=ka(h,r.points);r.moveText(v.x-h.x,v.y-h.y)}else{var x=r.textPosition,S=x.x,D=x.y;r.moveText(S-u,D-i)}}},{key:"deleteEdgeBySourceAndTarget",value:function(r,u){for(var i=0;i<this.edges.length;i++)if(this.edges[i].sourceNodeId===r&&this.edges[i].targetNodeId===u){var s=this.edges[i].getData();this.edges.splice(i,1),i--,this.eventCenter.emit(pt.EDGE_DELETE,{data:s})}}},{key:"deleteEdgeById",value:function(r){if(this.edgesMap[r]){var u=this.edgesMap[r].index,i=this.edgesMap[r].model.getData();this.edges.splice(u,1),this.eventCenter.emit(pt.EDGE_DELETE,{data:i})}}},{key:"deleteEdgeBySource",value:function(r){for(var u=0;u<this.edges.length;u++)if(this.edges[u].sourceNodeId===r){var i=this.edges[u].getData();this.edges.splice(u,1),u--,this.eventCenter.emit(pt.EDGE_DELETE,{data:i})}}},{key:"deleteEdgeByTarget",value:function(r){for(var u=0;u<this.edges.length;u++)if(this.edges[u].targetNodeId===r){var i=this.edges[u].getData();this.edges.splice(u,1),u--,this.eventCenter.emit(pt.EDGE_DELETE,{data:i})}}},{key:"setElementStateById",value:function(r,u,i){this.nodes.forEach(function(s){s.id===r?s.setElementState(u,i):s.setElementState(cn.DEFAULT)}),this.edges.forEach(function(s){s.id===r?s.setElementState(u,i):s.setElementState(cn.DEFAULT)})}},{key:"updateText",value:function(r,u){this.nodes.forEach(function(i){i.id===r&&i.updateText(u)}),this.edges.forEach(function(i){i.id===r&&i.updateText(u)})}},{key:"selectNodeById",value:function(r){var u,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i||this.clearSelectElements();var s=(u=this.nodesMap[r])===null||u===void 0?void 0:u.model;s==null||s.setSelected(!0)}},{key:"selectEdgeById",value:function(r){var u,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i||this.clearSelectElements();var s=(u=this.edgesMap[r])===null||u===void 0?void 0:u.model;s==null||s.setSelected(!0)}},{key:"selectElementById",value:function(r){var u=arguments.length>1&&arguments[1]!==void 0&&arguments[1];u||this.clearSelectElements();var i=this.getElement(r);i==null||i.setSelected(!0)}},{key:"clearSelectElements",value:function(){var r;this.selectElements.forEach(function(u){u==null||u.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===Sn.DEFAULT&&((r=this.topElement)===null||r===void 0||r.setZIndex())}},{key:"moveNodes",value:function(r,u,i){for(var s=this,h=arguments.length>3&&arguments[3]!==void 0&&arguments[3],v=r.reduce(function(qe,vt){var $e=s.nodesMap[vt].model.getMoveDistance(u,i,h);return qe[vt]=$e,qe},{}),x=0;x<this.edges.length;x++){var S=this.edges[x],D=S.textPosition,I=D.x,H=D.y,q=v[S.sourceNodeId],ee=v[S.targetNodeId],ve=void 0,ge=void 0;if(q&&ee&&S.modelType===Yt.POLYLINE_EDGE){var we=Yi(q,2);ve=we[0],ge=we[1],S.updatePointsList(ve,ge)}else{if(q){var Ce=Yi(q,2);ve=Ce[0],ge=Ce[1],S.moveStartPoint(ve,ge)}if(ee){var Je=Yi(ee,2);ve=Je[0],ge=Je[1],S.moveEndPoint(ve,ge)}}(q||ee)&&this.handleEdgeTextMove(S,I,H)}}},{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,u){var i=this.getNodeModelById(r);if(i){var s=i.getData();s.type=u;var h=this.getModel(u);if(!h)throw new Error("找不到".concat(u,"对应的节点,请确认是否已注册此类型节点。"));var v=new h(s,this);this.nodes.splice(this.nodesMap[r].index,1,v),this.getNodeEdges(r).forEach(function(x){if(x.sourceNodeId===r){var S=Jl(v,x.startPoint,v.width,v.height);x.updateStartPoint(S)}if(x.targetNodeId===r){var D=Jl(v,x.endPoint,v.width,v.height);x.updateEndPoint(D)}})}}},{key:"changeEdgeType",value:function(r,u){var i=this.getEdgeModelById(r);if(i&&i.type!==u){var s=i.getData();s.type=u;var h=this.getModel(u);if(!h)throw new Error("找不到".concat(u,"对应的节点,请确认是否已注册此类型节点。"));delete s.pointsList;var v=new h(s,this);this.edges.splice(this.edgesMap[r].index,1,v)}}},{key:"getNodeIncomingEdge",value:function(r){var u=[];return this.edges.forEach(function(i){i.targetNodeId===r&&u.push(i)}),u}},{key:"getNodeOutgoingEdge",value:function(r){var u=[];return this.edges.forEach(function(i){i.sourceNodeId===r&&u.push(i)}),u}},{key:"getAnchorIncomingEdge",value:function(r){var u=[];return this.edges.forEach(function(i){i.targetAnchorId===r&&u.push(i)}),u}},{key:"getAnchorOutcomingEdge",value:function(r){var u=[];return this.edges.forEach(function(i){i.sourceAnchorId===r&&u.push(i)}),u}},{key:"getNodeIncomingNode",value:function(r){var u=this,i=[];return this.edges.forEach(function(s){s.targetNodeId===r&&i.push(u.nodesMap[s.sourceNodeId].model)}),i}},{key:"getNodeOutgoingNode",value:function(r){var u=this,i=[];return this.edges.forEach(function(s){s.sourceNodeId===r&&i.push(u.nodesMap[s.targetNodeId].model)}),i}},{key:"setTheme",value:function(r){this.theme=Bi(Hi(Hi({},this.theme),r))}},{key:"resize",value:function(r,u){this.width=r||this.rootEl.getBoundingClientRect().width,this.height=u||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var r=this.nodes,u=[],i=[];r.forEach(function(D){var I=D.x,H=D.y,q=D.width,ee=D.height,ve=D.getNodeStyle().strokeWidth,ge=ve===void 0?0:ve,we=I+q/2+ge,Ce=I-q/2-ge,Je=H+ee/2+ge,qe=H-ee/2-ge;u=u.concat([we,Ce].filter(function(vt){return!Number.isNaN(vt)})),i=i.concat([Je,qe].filter(function(vt){return!Number.isNaN(vt)}))});var s=Math.min.apply(Math,ti(u)),h=Math.max.apply(Math,ti(u)),v=Math.min.apply(Math,ti(i)),x=h-s||0,S=Math.max.apply(Math,ti(i))-v||0;return{virtualRectWidth:x,virtualRectHeight:S,virtualRectCenterPositionX:s+x/2,virtualRectCenterPositionY:v+S/2}}},{key:"translateCenter",value:function(){var r=this.nodes,u=this.width,i=this.height,s=this.rootEl,h=this.transformModel;if(r.length){var v=u||s.clientWidth,x=i||s.clientHeight,S=this.getVirtualRectSize(),D=S.virtualRectCenterPositionX,I=S.virtualRectCenterPositionY;h.focusOn(D,I,v,x)}}},{key:"fitView",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,i=this.nodes,s=this.width,h=this.height,v=this.rootEl,x=this.transformModel;if(i.length){var S=s||v.clientWidth,D=h||v.clientHeight,I=this.getVirtualRectSize(),H=I.virtualRectWidth,q=I.virtualRectHeight,ee=I.virtualRectCenterPositionX,ve=I.virtualRectCenterPositionY,ge=(H+u)/S,we=(q+r)/D,Ce=0;Ce=1/Math.max(ge,we);var Je=[S/2,D/2];x.zoom(Ce,Je),x.focusOn(ee,ve,S,D)}}},{key:"openEdgeAnimation",value:function(r){this.getEdgeModelById(r).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(r){this.getEdgeModelById(r).closeEdgeAnimation()}}],n&&uO(e.prototype,n),t}(),Rt=_t(ce.prototype,"width",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$t=_t(ce.prototype,"height",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bt=_t(ce.prototype,"edgeType",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mt=_t(ce.prototype,"nodes",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Wn=_t(ce.prototype,"edges",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cr=_t(ce.prototype,"overlapMode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sn.DEFAULT}}),go=_t(ce.prototype,"background",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Vn=_t(ce.prototype,"transformModel",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Co=_t(ce.prototype,"editConfigModel",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ei=_t(ce.prototype,"gridSize",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Nu=_t(ce.prototype,"partial",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),La=_t(ce.prototype,"fakerNode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_t(ce.prototype,"nodesMap",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"nodesMap"),ce.prototype),_t(ce.prototype,"edgesMap",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"edgesMap"),ce.prototype),_t(ce.prototype,"modelsMap",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"modelsMap"),ce.prototype),_t(ce.prototype,"sortElements",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"sortElements"),ce.prototype),_t(ce.prototype,"textEditElement",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"textEditElement"),ce.prototype),_t(ce.prototype,"selectElements",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"selectElements"),ce.prototype),_t(ce.prototype,"selectNodes",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"selectNodes"),ce.prototype),_t(ce.prototype,"setFakerNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setFakerNode"),ce.prototype),_t(ce.prototype,"removeFakerNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"removeFakerNode"),ce.prototype),_t(ce.prototype,"setModel",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setModel"),ce.prototype),_t(ce.prototype,"toFront",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"toFront"),ce.prototype),_t(ce.prototype,"setElementZIndex",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setElementZIndex"),ce.prototype),_t(ce.prototype,"deleteNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteNode"),ce.prototype),_t(ce.prototype,"addNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"addNode"),ce.prototype),_t(ce.prototype,"cloneNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"cloneNode"),ce.prototype),_t(ce.prototype,"moveNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveNode"),ce.prototype),_t(ce.prototype,"moveNode2Coordinate",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveNode2Coordinate"),ce.prototype),_t(ce.prototype,"editText",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"editText"),ce.prototype),_t(ce.prototype,"addEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"addEdge"),ce.prototype),_t(ce.prototype,"moveEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveEdge"),ce.prototype),_t(ce.prototype,"deleteEdgeBySourceAndTarget",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeBySourceAndTarget"),ce.prototype),_t(ce.prototype,"deleteEdgeById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeById"),ce.prototype),_t(ce.prototype,"deleteEdgeBySource",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeBySource"),ce.prototype),_t(ce.prototype,"deleteEdgeByTarget",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeByTarget"),ce.prototype),_t(ce.prototype,"setElementStateById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setElementStateById"),ce.prototype),_t(ce.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"updateText"),ce.prototype),_t(ce.prototype,"selectNodeById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"selectNodeById"),ce.prototype),_t(ce.prototype,"selectEdgeById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"selectEdgeById"),ce.prototype),_t(ce.prototype,"selectElementById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"selectElementById"),ce.prototype),_t(ce.prototype,"clearSelectElements",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"clearSelectElements"),ce.prototype),_t(ce.prototype,"moveNodes",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveNodes"),ce.prototype),_t(ce.prototype,"setDefaultEdgeType",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setDefaultEdgeType"),ce.prototype),_t(ce.prototype,"changeNodeType",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"changeNodeType"),ce.prototype),_t(ce.prototype,"changeEdgeType",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"changeEdgeType"),ce.prototype),_t(ce.prototype,"getNodeIncomingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeIncomingEdge"),ce.prototype),_t(ce.prototype,"getNodeOutgoingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeOutgoingEdge"),ce.prototype),_t(ce.prototype,"getAnchorIncomingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getAnchorIncomingEdge"),ce.prototype),_t(ce.prototype,"getAnchorOutcomingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getAnchorOutcomingEdge"),ce.prototype),_t(ce.prototype,"getNodeIncomingNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeIncomingNode"),ce.prototype),_t(ce.prototype,"getNodeOutgoingNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeOutgoingNode"),ce.prototype),_t(ce.prototype,"setTheme",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setTheme"),ce.prototype),_t(ce.prototype,"resize",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"resize"),ce.prototype),_t(ce.prototype,"clearData",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"clearData"),ce.prototype),_t(ce.prototype,"translateCenter",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"translateCenter"),ce.prototype),_t(ce.prototype,"fitView",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"fitView"),ce.prototype),_t(ce.prototype,"openEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"openEdgeAnimation"),ce.prototype),_t(ce.prototype,"closeEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"closeEdgeAnimation"),ce.prototype),ce),aO=vv;function yh(t){return yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yh(t)}function gh(){return gh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gh.apply(this,arguments)}function sO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vh(t,e){return vh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},vh(t,e)}function cO(t){var e=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=xp(t);if(e){var u=xp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return fO(this,n)}}function fO(t,e){if(e&&(yh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wi(t)}function wi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xp(t){return xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xp(t)}function Wi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var mv,lO=ui(yv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&vh(i,s)})(u,t);var e,n,r=cO(u);function u(i){var s;(function(S,D){if(!(S instanceof D))throw new TypeError("Cannot call a class as a function")})(this,u),Wi(wi(s=r.call(this)),"stepDrag",void 0),Wi(wi(s),"stepScrollX",0),Wi(wi(s),"stepScrollY",0),Wi(wi(s),"onDragging",function(S){var D=S.deltaX,I=S.deltaY;s.setState({isDragging:!0});var H=s.props.graphModel,q=H.transformModel;H.editConfigModel.stopMoveGraph!==!0&&q.translate(D,I)}),Wi(wi(s),"onDragEnd",function(){s.setState({isDragging:!1})}),Wi(wi(s),"zoomHandler",function(S){var D=s.props,I=D.graphModel,H=I.editConfigModel,q=I.transformModel,ee=I.gridSize,ve=D.graphModel,ge=S.deltaX,we=S.deltaY;if(H.stopScrollGraph||S.ctrlKey===!0){if(!H.stopZoomGraph){S.preventDefault();var Ce=ve.getPointByClient({x:S.clientX,y:S.clientY}).canvasOverlayPosition,Je=Ce.x,qe=Ce.y;q.zoom(S.deltaY<0,[Je,qe])}}else{if(S.preventDefault(),s.stepScrollX+=ge,s.stepScrollY+=we,Math.abs(s.stepScrollX)>=ee){var vt=s.stepScrollX%ee,$e=s.stepScrollX-vt;q.translate(-$e*q.SCALE_X,0),s.stepScrollX=vt}if(Math.abs(s.stepScrollY)>=ee){var ht=s.stepScrollY%ee,tt=s.stepScrollY-ht;q.translate(0,-tt*q.SCALE_Y),s.stepScrollY=ht}}}),Wi(wi(s),"clickHandler",function(S){if(S.target.getAttribute("name")==="canvas-overlay"){var D=s.props.graphModel;D.selectElements.size>0&&D.clearSelectElements(),D.eventCenter.emit(pt.BLANK_CLICK,{e:S})}}),Wi(wi(s),"handleContextMenu",function(S){if(S.target.getAttribute("name")==="canvas-overlay"){S.preventDefault();var D=s.props.graphModel,I=D.getPointByClient({x:S.clientX,y:S.clientY});D.eventCenter.emit(pt.BLANK_CONTEXTMENU,{e:S,position:I})}}),Wi(wi(s),"mouseDownHandler",function(S){var D=s.props.graphModel,I=D.eventCenter,H=D.editConfigModel,q=D.transformModel.SCALE_X,ee=D.gridSize,ve=S.target,ge=!H.adjustEdge&&!H.adjustNodePosition;(ve.getAttribute("name")==="canvas-overlay"||ge)&&(H.stopMoveGraph!==!0?(s.stepDrag.setStep(ee*q),s.stepDrag.handleMouseDown(S)):I.emit(pt.BLANK_MOUSEDOWN,{e:S}),s.clickHandler(S))});var h=i.graphModel,v=h.gridSize,x=h.eventCenter;return s.stepDrag=new no({onDragging:s.onDragging,onDragEnd:s.onDragEnd,step:v,eventType:"BLANK",isStopPropagation:!1,eventCenter:x,model:null}),s.state={isDragging:!1},s}return e=u,(n=[{key:"render",value:function(){var i=this.props.graphModel.transformModel.getTransformStyle().transform,s=this.props,h=s.children,v=s.dnd,x=this.state.isDragging;return Object(le.g)("svg",gh({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:x?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},v.eventMap()),Object(le.g)("g",{transform:i},h))}}])&&sO(e.prototype,n),u}(le.a))||yv;function mh(t){return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mh(t)}function pO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bh(t,e){return bh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},bh(t,e)}function hO(t){var e=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=Ep(t);if(e){var u=Ep(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return yO(this,n)}}function yO(t,e){if(e&&(mh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Ep(t){return Ep=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ep(t)}var gO=ui(mv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&bh(i,s)})(u,t);var e,n,r=hO(u);function u(){return pO(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var i=this.props,s=i.tool,h=i.graphModel,v=s.getTools().map(function(x){return Object(le.g)(x,{graphModel:h,logicFlow:s.instance})});return s.components=v,v}},{key:"triggerToolRender",value:function(){var i=this.props,s=i.tool,h=i.graphModel,v=document.querySelector("#ToolOverlay_".concat(h.flowId)),x=s.getInstance();x.components.forEach(function(S){return S(x,v)}),x.components=[]}},{key:"render",value:function(){var i=this.props.graphModel;return Object(le.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(i.flowId)},this.getTools())}}])&&dO(e.prototype,n),u}(le.a))||mv;function _h(t){return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_h(t)}function vO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Oh(t,e){return Oh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Oh(t,e)}function bO(t){var e=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=Sp(t);if(e){var u=Sp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return _O(this,n)}}function _O(t,e){if(e&&(_h(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Sp(t){return Sp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Sp(t)}var bv,OO=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Oh(i,s)})(u,t);var e,n,r=bO(u);function u(){return vO(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"render",value:function(){var i=this.props.background;return Object(le.g)("div",{className:"lf-background"},Object(le.g)("div",{style:i,className:"lf-background-area"}))}}])&&mO(e.prototype,n),u}(le.a);function wh(t){return wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wh(t)}function wO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xh(t,e){return xh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},xh(t,e)}function EO(t){var e=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=jp(t);if(e){var u=jp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return SO(this,n)}}function SO(t,e){if(e&&(wh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _v(t)}function _v(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jp(t){return jp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jp(t)}function jO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ov=ui(bv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&xh(i,s)})(u,t);var e,n,r=EO(u);function u(){var i;wO(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return jO(_v(i=r.call.apply(r,[this].concat(h))),"id",qo()),i}return e=u,(n=[{key:"renderDot",value:function(){var i=this.props,s=i.config,h=s.color,v=s.thickness,x=v===void 0?2:v,S=i.size,D=i.visible,I=Math.min(Math.max(2,x),S/2),H=1;return D||(H=0),Object(le.g)("rect",{width:I,height:I,rx:I/2,ry:I/2,fill:h,opacity:H})}},{key:"renderMesh",value:function(){var i=this.props,s=i.config,h=s.color,v=s.thickness,x=v===void 0?1:v,S=i.size,D=i.visible,I=Math.min(Math.max(1,x),S/2),H="M ".concat(S," 0 H0 M0 0 V0 ").concat(S),q=1;return D||(q=0),Object(le.g)("path",{d:H,stroke:h,strokeWidth:I,opacity:q})}},{key:"render",value:function(){var i=this.props,s=i.type,h=i.size,v=i.graphModel.transformModel,x=[v.SCALE_X,v.SKEW_Y,v.SKEW_X,v.SCALE_Y,v.TRANSLATE_X,v.TRANSLATE_Y].join(","),S="matrix(".concat(x,")");return Object(le.g)("div",{className:"lf-grid"},Object(le.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(le.g)("defs",null,Object(le.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:S,x:"0",y:"0",width:h,height:h},s==="dot"&&this.renderDot(),s==="mesh"&&this.renderMesh())),Object(le.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&xO(e.prototype,n),u}(le.a))||bv;Ov.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},o(53);function Eh(t){return Eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eh(t)}function PO(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return wv(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return wv(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  65. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function wv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var xv,$s=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach(function(n){var r=PO(n,2),u=r[0],i=r[1];(u==="style"||Eh(i)!=="object")&&(e[u]=i)}),Object(le.g)("line",e)};function Sh(t){return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sh(t)}function Ev(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Pp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ev(Object(n),!0).forEach(function(r){AO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ev(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function AO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function MO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function kO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function jh(t,e){return jh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},jh(t,e)}function TO(t){var e=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=Ap(t);if(e){var u=Ap(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return DO(this,n)}}function DO(t,e){if(e&&(Sh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Ap(t){return Ap=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ap(t)}var Sv,NO=ui(xv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&jh(i,s)})(u,t);var e,n,r=TO(u);function u(){return MO(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"render",value:function(){var i=this.props.snaplineModel,s=i.position,h=i.isShowHorizontal,v=i.isShowVertical,x=i.getStyle(),S=s.x,D=S===void 0?0:S,I=s.y,H=I===void 0?0:I,q=Pp(Pp({x1:-1e5,y1:H,x2:1e5,y2:H},x),{},{stroke:h?x.stroke:"none"}),ee=Pp(Pp({x1:D,y1:-1e5,x2:D,y2:1e5},x),{},{stroke:v?x.stroke:"none"});return Object(le.g)("g",{className:"lf-snapline"},Object(le.g)($s,q),Object(le.g)($s,ee))}}])&&kO(e.prototype,n),u}(le.a))||xv;function Ph(t){return Ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ph(t)}function CO(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return jv(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return jv(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  66. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ru(t){var e=t.x,n=t.y,r=t.width,u=t.height,i=t.className,s=t.radius,h=e-r/2,v=n-u/2,x={};return Object.entries(t).forEach(function(S){var D=CO(S,2),I=D[0],H=D[1];Ph(H)!=="object"&&(x[I]=H)}),x.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",s&&(x.rx=s,x.ry=s),x.x=h,x.y=v,Object(le.g)("rect",x)}function Ah(t){return Ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ah(t)}function qs(){return qs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qs.apply(this,arguments)}function Pv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Av(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pv(Object(n),!0).forEach(function(r){RO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function RO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function IO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function LO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mh(t,e){return Mh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Mh(t,e)}function zO(t){var e=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=Mp(t);if(e){var u=Mp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return BO(this,n)}}function BO(t,e){if(e&&(Ah(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Mp(t){return Mp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mp(t)}Ru.defaultProps={className:"",radius:""};var Mv,FO=ui(Sv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Mh(i,s)})(u,t);var e,n,r=zO(u);function u(){return IO(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getNodesOutline",value:function(){var i=this.props.graphModel,s=i.nodes,h=i.editConfigModel,v=h.hoverOutline,x=h.nodeSelectedOutline,S=[];return s.forEach(function(D){if(D.isHovered||D.isSelected){var I=D.isHovered,H=D.isSelected,q=D.x,ee=D.y,ve=D.width,ge=D.height;if(x&&H||v&&I){var we=D.getOutlineStyle(),Ce={};if(Object.keys(we).forEach(function(qe){qe!=="hover"&&(Ce[qe]=we[qe])}),I){var Je=we.hover;Ce=Av(Av({},Ce),Je)}S.push(Object(le.g)(Ru,qs({transform:D.transform,className:"lf-outline-node",x:q,y:ee,width:ve+10,height:ge+10},Ce)))}}}),S}},{key:"getEdgeOutline",value:function(){for(var i=this.props.graphModel,s=i.edges,h=i.editConfigModel,v=h.edgeSelectedOutline,x=h.hoverOutline,S=[],D=0;D<s.length;D++){var I=s[D];(v&&I.isSelected||x&&I.isHovered)&&(I.modelType===Yt.LINE_EDGE?S.push(this.getLineOutline(I)):I.modelType===Yt.POLYLINE_EDGE?S.push(this.getPolylineOutline(I)):I.modelType===Yt.BEZIER_EDGE&&S.push(this.getBezierOutline(I)))}return S}},{key:"getLineOutline",value:function(i){var s=i.startPoint,h=i.endPoint,v=(s.x+h.x)/2,x=(s.y+h.y)/2,S=Math.abs(s.x-h.x)+10,D=Math.abs(s.y-h.y)+10,I=i.getOutlineStyle();return Object(le.g)(Ru,qs({className:"lf-outline-edge",x:v,y:x,width:S,height:D},I))}},{key:"getPolylineOutline",value:function(i){var s=i.points,h=Jo(s),v=Xi(h,8),x=v.x,S=v.y,D=v.width,I=v.height,H=i.getOutlineStyle();return Object(le.g)(Ru,qs({className:"lf-outline",x,y:S,width:D,height:I},H))}},{key:"getBezierOutline",value:function(i){var s=i.path,h=Aa(s),v=Xi(h,8),x=v.x,S=v.y,D=v.width,I=v.height,H=i.getOutlineStyle();return Object(le.g)(Ru,qs({className:"lf-outline",x,y:S,width:D,height:I},H))}},{key:"render",value:function(){return Object(le.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&LO(e.prototype,n),u}(le.a))||Sv;function kh(t){return kh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kh(t)}function UO(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return kv(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return kv(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  67. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zs(t){var e=t.x,n=e===void 0?0:e,r=t.y,u=r===void 0?0:r,i=t.r,s=i===void 0?4:i,h=t.className,v={cx:n,cy:u,r:s,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(function(x){var S=UO(x,2),D=S[0],I=S[1];kh(I)!=="object"&&(v[D]=I)}),v.className=h?"lf-basic-shape ".concat(h):"lf-basic-shape",Object(le.g)("circle",v)}function Th(t){return Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Th(t)}function GO(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Tv(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Tv(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  68. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Tv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Gf(){return Gf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Gf.apply(this,arguments)}function Dv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Nv(t,e,n){return e&&XO(t.prototype,e),t}function Cv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dh(t,e)}function Dh(t,e){return Dh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Dh(t,e)}function Rv(t){var e=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=Tp(t);if(e){var u=Tp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return HO(this,n)}}function HO(t,e){if(e&&(Th(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kp(t)}function kp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tp(t){return Tp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tp(t)}function Nh(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Iv,Lv=function(t){Cv(n,t);var e=Rv(n);function n(){var r;return Dv(this,n),Nh(kp(r=e.call(this)),"dragHandler",void 0),Nh(kp(r),"onDragging",function(u){var i=u.event,s=r.props,h=s.graphModel,v=s.bezierModel,x=s.type,S=h.getPointByClient({x:i.clientX,y:i.clientY}).canvasOverlayPosition,D=S.x,I=S.y;v.updateAdjustAnchor({x:D,y:I},x),h.eventCenter.emit(pt.EDGE_ADJUST,{data:v.getData()})}),Nh(kp(r),"onDragEnd",function(){r.props.bezierModel.isDragging=!1}),r.dragHandler=new no({onDragging:r.onDragging,onDragEnd:r.onDragEnd}),r}return Nv(n,[{key:"render",value:function(){var r=this,u=this.props.position,i=u.x,s=u.y,h=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(le.g)(Zs,Gf({className:"lf-bezier-adjust-anchor",x:i,y:s},h,{onMouseDown:function(v){r.dragHandler.handleMouseDown(v)}}))}}]),n}(le.a),YO=ui(Mv=function(t){Cv(n,t);var e=Rv(n);function n(){return Dv(this,n),e.apply(this,arguments)}return Nv(n,[{key:"getBezierAdjust",value:function(r,u){var i=r.path,s=r.id,h=GO(Aa(i),4),v=h[0],x=h[1],S=h[2],D=h[3],I=r.getEdgeStyle().adjustLine,H=[];return H.push(Object(le.g)($s,Gf({x1:v.x,y1:v.y,x2:x.x,y2:x.y},I))),H.push(Object(le.g)(Lv,{position:x,bezierModel:r,graphModel:u,key:"".concat(s,"_ePre"),type:"sNext"})),H.push(Object(le.g)($s,Gf({x1:D.x,y1:D.y,x2:S.x,y2:S.y},I))),H.push(Object(le.g)(Lv,{position:S,bezierModel:r,graphModel:u,key:"".concat(s,"_sNext"),type:"ePre"})),H}},{key:"selectedBezierEdge",value:function(){for(var r=this.props.graphModel,u=r.edges,i=[],s=0;s<u.length;s++){var h=u[s];h.isSelected&&h.modelType===Yt.BEZIER_EDGE&&h.draggable&&i.push(this.getBezierAdjust(h,r))}return i}},{key:"render",value:function(){return Object(le.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(le.a))||Mv;function Ch(t){return Ch=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ch(t)}function WO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rh(t,e){return Rh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Rh(t,e)}function KO(t){var e=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=Dp(t);if(e){var u=Dp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return $O(this,n)}}function $O(t,e){if(e&&(Ch(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Dp(t){return Dp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dp(t)}var zv,qO=ui(Iv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Rh(i,s)})(u,t);var e,n,r=KO(u);function u(){return WO(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"render",value:function(){var i=this.props.graphModel.transformModel.getTransformStyle().transform,s=this.props.children;return Object(le.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(le.g)("g",{transform:i},s))}}])&&VO(e.prototype,n),u}(le.a))||Iv;function Ih(t){return Ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ih(t)}function Lh(){return Lh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lh.apply(this,arguments)}function ZO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function zh(t,e){return zh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},zh(t,e)}function QO(t){var e=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=Np(t);if(e){var u=Np(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return ew(this,n)}}function ew(t,e){if(e&&(Ih(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Np(t){return Np=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Np(t)}var tw=ui(zv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&zh(i,s)})(u,t);var e,n,r=QO(u);function u(){return ZO(this,u),r.apply(this,arguments)}return e=u,n=[{key:"getComponent",value:function(i,s){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",v=this.props.getView,x=v(i.type);return Object(le.g)(x,{key:i.id,model:i,graphModel:s,overlay:h})}},{key:"render",value:function(){var i=this,s=this.props,h=s.graphModel,v=s.tool,x=s.options,S=s.dnd,D=s.snaplineModel,I={};x.width&&(I.width="".concat(h.width,"px")),x.height&&(I.height="".concat(h.height,"px"));var H=x.grid,q=h.fakerNode,ee=h.editConfigModel.adjustEdge;return Object(le.g)("div",{className:"lf-graph","flow-id":h.flowId,style:I},Object(le.g)(lO,{graphModel:h,dnd:S},Object(le.g)("g",{className:"lf-base"},is(h.sortElements,function(ve){return i.getComponent(ve,h)})),q?this.getComponent(q,h):""),Object(le.g)(qO,{graphModel:h},Object(le.g)(FO,{graphModel:h}),ee?Object(le.g)(YO,{graphModel:h}):"",x.snapline!==!1?Object(le.g)(NO,{snaplineModel:D}):""),Object(le.g)(gO,{graphModel:h,tool:v}),x.background&&Object(le.g)(OO,{background:x.background}),x.grid&&Object(le.g)(Ov,Lh({},H,{graphModel:h})))}}],n&&JO(e.prototype,n),u}(le.a))||zv,nw=tw;function Bv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Cp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bv(Object(n),!0).forEach(function(r){Vi(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ow=function(){function t(r){var u=this;(function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t),Vi(this,"nodeConfig",void 0),Vi(this,"lf",void 0),Vi(this,"fakerNode",void 0),Vi(this,"stopDrag",function(){u.nodeConfig=null,window.document.removeEventListener("mouseup",u.stopDrag)}),Vi(this,"dragEnter",function(s){u.nodeConfig&&!u.fakerNode&&(u.fakerNode=u.lf.createFakerNode(Cp(Cp({},u.nodeConfig),u.clientToLocalPoint({x:s.clientX,y:s.clientY}))))}),Vi(this,"onDragOver",function(s){if(s.preventDefault(),u.fakerNode){var h=u.clientToLocalPoint({x:s.clientX,y:s.clientY}),v=h.x,x=h.y;u.fakerNode.moveTo(v,x);var S=u.fakerNode.getData();u.lf.setNodeSnapLine(S),u.lf.graphModel.eventCenter.emit(pt.NODE_DND_DRAG,{data:S})}return!1}),Vi(this,"onDragLeave",function(){u.fakerNode&&(u.lf.removeNodeSnapLine(),u.lf.graphModel.removeFakerNode(),u.fakerNode=null)}),Vi(this,"onDrop",function(s){u.lf.graphModel&&s&&u.nodeConfig&&(u.lf.addNode(Cp(Cp({},u.nodeConfig),u.clientToLocalPoint({x:s.clientX,y:s.clientY})),pt.NODE_DND_ADD,s),s.preventDefault(),s.stopPropagation(),u.nodeConfig=null,u.lf.removeNodeSnapLine(),u.lf.graphModel.removeFakerNode(),u.fakerNode=null)});var i=r.lf;this.lf=i}var e,n;return e=t,(n=[{key:"clientToLocalPoint",value:function(r){var u=r.x,i=r.y,s=lu(this.lf.options,["grid","size"]),h=this.lf.graphModel.getPointByClient({x:u,y:i}).canvasOverlayPosition,v=h.x,x=h.y;return{x:yi(v,s),y:yi(x,s)}}},{key:"startDrag",value:function(r){var u=this.lf.graphModel.editConfigModel;u!=null&&u.isSilentMode||(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}}}])&&rw(e.prototype,n),t}();function Fv(t){var e=t.container,n=t.grid,r=t.width,u=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if(typeof r=="string"||typeof u=="string")throw new Error("width或height不支持传入字符串,请传数字");return n&&(t.grid=va({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),va({},Gv,t)}var pn,Uv,Gv={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Bh(t){return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bh(t)}function Fh(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Xv(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Xv(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  69. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Xv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Hv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Rp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hv(Object(n),!0).forEach(function(r){Yv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iw(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function uw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function aw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xf(){return Xf=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=sw(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},Xf.apply(this,arguments)}function sw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Iu(t))!==null;);return t}function Uh(t,e){return Uh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Uh(t,e)}function cw(t){var e=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(t);if(e){var u=Iu(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return fw(this,n)}}function fw(t,e){if(e&&(Bh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ip(t)}function Ip(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Iu(t){return Iu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Iu(t)}function Yv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ri(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var Gh=(pn=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Uh(i,s)})(u,t);var e,n,r=cw(u);function u(){var i;uw(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return Yv(Ip(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.BEZIER_EDGE),iw(Ip(i),"path",Uv,Ip(i)),i}return e=u,(n=[{key:"initEdgeData",value:function(i){this.offset=100,Xf(Iu(u.prototype),"initEdgeData",this).call(this,i)}},{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.bezier;return Rp(Rp({},Xf(Iu(u.prototype),"getEdgeStyle",this).call(this)),ln(i))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var i=0,s=0;return this.pointsList.forEach(function(h){var v=h.x,x=h.y;i+=v,s+=x}),{x:i/this.pointsList.length,y:s/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 i=Xf(Iu(u.prototype),"getData",this).call(this),s=this.pointsList.map(function(h){return{x:h.x,y:h.y}});return Rp(Rp({},i),{},{pointsList:s})}},{key:"getControls",value:function(){var i=this.startPoint,s=this.endPoint;return Pa({start:i,end:s,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(i){var s=Fh(i,4),h=s[0],v=s[1],x=s[2],S=s[3];return"M ".concat(h.x," ").concat(h.y,`
  70. C `).concat(v.x," ").concat(v.y,`,
  71. `).concat(x.x," ").concat(x.y,`,
  72. `).concat(S.x," ").concat(S.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var i=this.getControls(),s=i.sNext,h=i.ePre;this.updatePath(s,h)}},{key:"updatePath",value:function(i,s){i=ln(i),s=ln(s);var h={x:this.startPoint.x,y:this.startPoint.y},v={x:this.endPoint.x,y:this.endPoint.y};if(!i||!s){var x=this.getControls();i=x.sNext,s=x.ePre}this.pointsList=[h,i,s,v],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(i){this.startPoint=Object.assign({},i),this.updatePoints()}},{key:"updateEndPoint",value:function(i){this.endPoint=Object.assign({},i),this.updatePoints()}},{key:"moveStartPoint",value:function(i,s){this.startPoint.x+=i,this.startPoint.y+=s;var h=Fh(this.pointsList,3),v=h[1],x=h[2];v.x+=i,v.y+=s,this.updatePath(v,x)}},{key:"moveEndPoint",value:function(i,s){this.endPoint.x+=i,this.endPoint.y+=s;var h=Fh(this.pointsList,3),v=h[1],x=h[2];x.x+=i,x.y+=s,this.updatePath(v,x)}},{key:"updateAdjustAnchor",value:function(i,s){s==="sNext"?this.pointsList[1]=i:s==="ePre"&&(this.pointsList[2]=i),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 i=this.pointsList;return i[i.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(i){var s=i.startPoint,h=i.endPoint,v=i.sourceNode,x=i.targetNode,S=Pa({start:s,end:h,sourceNode:v,targetNode:x,offset:this.offset}),D=S.sNext,I=S.ePre;this.pointsList=[s,D,I,h],this.initPoints()}}])&&aw(e.prototype,n),u}(hf),Uv=ri(pn.prototype,"path",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ri(pn.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"initPoints"),pn.prototype),ri(pn.prototype,"updatePoints",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updatePoints"),pn.prototype),ri(pn.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateStartPoint"),pn.prototype),ri(pn.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateEndPoint"),pn.prototype),ri(pn.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"moveStartPoint"),pn.prototype),ri(pn.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"moveEndPoint"),pn.prototype),ri(pn.prototype,"updateAdjustAnchor",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateAdjustAnchor"),pn.prototype),ri(pn.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"getAdjustStart"),pn.prototype),ri(pn.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"getAdjustEnd"),pn.prototype),ri(pn.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateAfterAdjustStartAndEnd"),pn.prototype),pn),Ye,Wv,Vv,Kv,$v,qv,Zv,Jv,Qv,em,tm,nm,rm,om,im,um,am,sm,cm,fm,lm,pm,dm,lw=function(t){return t==null};function pw(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||hm(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  73. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Xh(t){return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xh(t)}function hm(t,e){if(t){if(typeof t=="string")return ym(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ym(t,e):void 0}}function ym(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function gm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Yr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gm(Object(n),!0).forEach(function(r){ro(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kn(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function dw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ro(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xt(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var Ki,vm,$i=(Ye=function(){function t(r,u){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),ro(this,"id",""),Kn(this,"type",Wv,this),Kn(this,"x",Vv,this),Kn(this,"y",Kv,this),Kn(this,"text",$v,this),Kn(this,"properties",qv,this),Kn(this,"_width",Zv,this),Kn(this,"_height",Jv,this),Kn(this,"anchorsOffset",Qv,this),Kn(this,"isSelected",em,this),Kn(this,"isHovered",tm,this),Kn(this,"isShowAnchor",nm,this),Kn(this,"isDragging",rm,this),Kn(this,"isHitable",om,this),Kn(this,"draggable",im,this),Kn(this,"visible",um,this),Kn(this,"enableRotate",am,this),ro(this,"virtual",!1),ro(this,"graphModel",void 0),Kn(this,"zIndex",sm,this),Kn(this,"state",cm,this),Kn(this,"autoToFront",fm,this),Kn(this,"style",lm,this),Kn(this,"transform",pm,this),Kn(this,"_rotate",dm,this),ro(this,"BaseType",Bn.NODE),ro(this,"modelType",Yt.NODE),ro(this,"additionStateData",void 0),ro(this,"targetRules",[]),ro(this,"sourceRules",[]),ro(this,"moveRules",[]),ro(this,"hasSetTargetRules",!1),ro(this,"hasSetSourceRules",!1),this.graphModel=u,this.initNodeData(r),this.setAttributes()}var e,n;return e=t,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:"rotate",get:function(){return this._rotate},set:function(r){this._rotate=r;var u=this.x,i=u===void 0?0:u,s=this.y,h=s===void 0?0:s;this.transform=new Cu(-i,-h).rotate(r).translate(i,h).toString()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var u=this.graphModel.idGenerator,i=u&&u(r.type),s=this.createId();r.id=s||i||qo()}this.formatText(r),or(this,function(h){return Ho(h,["id","type","x","y","text","properties","virtual","rotate"])}(r)),this.graphModel.overlapMode===Sn.INCREASE&&(this.zIndex=r.zIndex||pf())}},{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,u=r.x,i=r.y,s=r.value,h=this.properties;Object(d.x)(h)&&(h=Object(d.I)(h));var v={id:this.id,type:this.type,x:this.x,y:this.y,properties:h};return this.rotate&&(v.rotate=this.rotate),this.graphModel.overlapMode===Sn.INCREASE&&(v.zIndex=this.zIndex),s&&(v.text={x:u,y:i,value:s}),v}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(d.I)(this.properties)}},{key:"getOuterGAttributes",value:function(){return{className:""}}},{key:"getNodeStyle",value:function(){return Yr(Yr({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.nodeText;return ln(r)}},{key:"getRotateControlStyle",value:function(){var r=this.graphModel.theme.rotateControl;return ln(r)}},{key:"getAnchorStyle",value:function(r){var u=this.graphModel.theme.anchor;return ln(u)}},{key:"getAnchorLineStyle",value:function(r){var u=this.graphModel.theme.anchorLine;return ln(u)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return ln(r)}},{key:"isAllowConnectedAsSource",value:function(r,u,i,s){var h=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var v,x=!0,S=0;S<h.length;S++){var D=h[S];if(!D.validate.call(this,this,r,u,i,s)){x=!1,v=D.message;break}}return{isAllPass:x,msg:v}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(r,u,i,s){var h=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var v,x=!0,S=0;S<h.length;S++){var D=h[S];if(!D.validate.call(this,r,this,u,i,s)){x=!1,v=D.message;break}}return{isAllPass:x,msg:v}}},{key:"isAllowMoveNode",value:function(r,u){var i,s=!0,h=!0,v=function(D,I){var H=typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!H){if(Array.isArray(D)||(H=hm(D))||I){H&&(D=H);var q=0,ee=function(){};return{s:ee,n:function(){return q>=D.length?{done:!0}:{done:!1,value:D[q++]}},e:function(Ce){throw Ce},f:ee}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
  74. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ve,ge=!0,we=!1;return{s:function(){H=H.call(D)},n:function(){var Ce=H.next();return ge=Ce.done,Ce},e:function(Ce){we=!0,ve=Ce},f:function(){try{ge||H.return==null||H.return()}finally{if(we)throw ve}}}}(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(v.s();!(i=v.n()).done;){var x=(0,i.value)(this,r,u);if(!x)return!1;if(Xh(x)==="object"){var S=x;if(S.x===!1&&S.y===!1)return!1;s=s&&S.x,h=h&&S.y}}}catch(D){v.e(D)}finally{v.f()}return{x:s,y:h}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var r=this.anchorsOffset,u=this.id,i=this.x,s=this.y;return r&&r.length>0?r.map(function(h,v){return h.length?(h=h,{id:"".concat(u,"_").concat(v),x:i+h[0],y:s+h[1]}):Yr(Yr({},h=h),{},{x:i+h.x,y:s+h.y,id:h.id||"".concat(u,"_").concat(v)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(r){return function(u,i){for(var s,h=Cs(i),v=Number.MAX_SAFE_INTEGER,x=0;x<h.length;x++){var S=ho(u.x,u.y,h[x].x,h[x].y);S<v&&(v=S,s={index:x,anchor:Ts(Ts({},h[x]),{},{x:h[x].x,y:h[x].y,id:h[x].id})})}return s}(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(){var r=this.getAnchorsByOffset(),u=this.x,i=this.y,s=this.rotate;return r.forEach(function(h){var v=h.x,x=h.y,S=pw(new Ro([v,x,1]).translate(-u,-i).rotate(s).translate(u,i)[0],2),D=S[0],I=S[1];h.x=D,h.y=I}),r}},{key:"getAnchorInfo",value:function(r){if(!lw(r))for(var u=0;u<this.anchors.length;u++){var i=this.anchors[u];if(i.id===r)return i}}},{key:"addNodeMoveRules",value:function(r){this.moveRules.includes(r)||this.moveRules.push(r)}},{key:"move",value:function(r,u){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,h=!1;if(i)s=!0,h=!0;else{var v=this.isAllowMoveNode(r,u);typeof v=="boolean"?(s=v,h=v):(s=v.x,h=v.y)}if(s){var x=this.x+r;this.x=x,this.text&&this.moveText(r,0)}if(h){var S=this.y+u;this.y=S,this.text&&this.moveText(0,u)}return s||h}},{key:"getMoveDistance",value:function(r,u){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,h=!1,v=0,x=0;if(i)s=!0,h=!0;else{var S=this.isAllowMoveNode(r,u);typeof S=="boolean"?(s=S,h=S):(s=S.x,h=S.y)}if(s&&r){var D=this.x+r;this.x=D,this.text&&this.moveText(r,0),v=r}if(h&&u){var I=this.y+u;this.y=I,this.text&&this.moveText(0,u),x=u}return[v,x]}},{key:"moveTo",value:function(r,u){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=r-this.x,h=u-this.y;return!(!i&&!this.isAllowMoveNode(s,h)||(this.text&&this.text&&this.moveText(s,h),this.x=r,this.y=u,0))}},{key:"moveText",value:function(r,u){var i=this.text,s=i.x,h=i.y,v=i.value,x=i.draggable,S=i.editable;this.text={value:v,editable:S,draggable:x,x:s+r,y:h+u}}},{key:"updateText",value:function(r){this.text=Yr(Yr({},Object(d.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:"setEnableRotate",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.enableRotate=r}},{key:"setHitable",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=r}},{key:"setElementState",value:function(r,u){this.state=r,this.additionStateData=u}},{key:"setProperty",value:function(r,u){this.properties=Yr(Yr({},Object(d.I)(this.properties)),{},ro({},r,pr(u))),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=Yr(Yr({},Object(d.I)(this.properties)),pr(r)),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setStyle",value:function(r,u){this.style=Yr(Yr({},this.style),{},ro({},r,pr(u)))}},{key:"setStyles",value:function(r){this.style=Yr(Yr({},this.style),pr(r))}},{key:"updateStyles",value:function(r){this.style=Yr({},pr(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){or(this,r)}}],n&&dw(e.prototype,n),t}(),Wv=Xt(Ye.prototype,"type",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Vv=Xt(Ye.prototype,"x",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Kv=Xt(Ye.prototype,"y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),$v=Xt(Ye.prototype,"text",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),qv=Xt(Ye.prototype,"properties",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Zv=Xt(Ye.prototype,"_width",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Jv=Xt(Ye.prototype,"_height",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Qv=Xt(Ye.prototype,"anchorsOffset",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),em=Xt(Ye.prototype,"isSelected",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),tm=Xt(Ye.prototype,"isHovered",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),nm=Xt(Ye.prototype,"isShowAnchor",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),rm=Xt(Ye.prototype,"isDragging",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),om=Xt(Ye.prototype,"isHitable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),im=Xt(Ye.prototype,"draggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),um=Xt(Ye.prototype,"visible",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),am=Xt(Ye.prototype,"enableRotate",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),sm=Xt(Ye.prototype,"zIndex",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),cm=Xt(Ye.prototype,"state",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),fm=Xt(Ye.prototype,"autoToFront",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),lm=Xt(Ye.prototype,"style",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),pm=Xt(Ye.prototype,"transform",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dm=Xt(Ye.prototype,"_rotate",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Xt(Ye.prototype,"incoming",[d.m],Object.getOwnPropertyDescriptor(Ye.prototype,"incoming"),Ye.prototype),Xt(Ye.prototype,"outgoing",[d.m],Object.getOwnPropertyDescriptor(Ye.prototype,"outgoing"),Ye.prototype),Xt(Ye.prototype,"addNodeMoveRules",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"addNodeMoveRules"),Ye.prototype),Xt(Ye.prototype,"move",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"move"),Ye.prototype),Xt(Ye.prototype,"getMoveDistance",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"getMoveDistance"),Ye.prototype),Xt(Ye.prototype,"moveTo",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"moveTo"),Ye.prototype),Xt(Ye.prototype,"moveText",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"moveText"),Ye.prototype),Xt(Ye.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"updateText"),Ye.prototype),Xt(Ye.prototype,"setSelected",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setSelected"),Ye.prototype),Xt(Ye.prototype,"setHovered",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setHovered"),Ye.prototype),Xt(Ye.prototype,"setIsShowAnchor",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setIsShowAnchor"),Ye.prototype),Xt(Ye.prototype,"setEnableRotate",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setEnableRotate"),Ye.prototype),Xt(Ye.prototype,"setHitable",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setHitable"),Ye.prototype),Xt(Ye.prototype,"setElementState",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setElementState"),Ye.prototype),Xt(Ye.prototype,"setProperty",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setProperty"),Ye.prototype),Xt(Ye.prototype,"setProperties",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setProperties"),Ye.prototype),Xt(Ye.prototype,"deleteProperty",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"deleteProperty"),Ye.prototype),Xt(Ye.prototype,"setStyle",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setStyle"),Ye.prototype),Xt(Ye.prototype,"setStyles",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setStyles"),Ye.prototype),Xt(Ye.prototype,"updateStyles",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"updateStyles"),Ye.prototype),Xt(Ye.prototype,"setZIndex",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setZIndex"),Ye.prototype),Xt(Ye.prototype,"updateAttributes",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"updateAttributes"),Ye.prototype),Ye);function Hh(t){return Hh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hh(t)}function mm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function bm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mm(Object(n),!0).forEach(function(r){_m(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function hw(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function yw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yh(){return Yh=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=vw(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},Yh.apply(this,arguments)}function vw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Js(t))!==null;);return t}function Wh(t,e){return Wh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Wh(t,e)}function mw(t){var e=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=Js(t);if(e){var u=Js(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return bw(this,n)}}function bw(t,e){if(e&&(Hh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lp(t)}function Lp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Js(t){return Js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Js(t)}function _m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vh(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var Rr,Om,wm,Kh=(Ki=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Wh(i,s)})(u,t);var e,n,r=mw(u);function u(){var i;yw(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return _m(Lp(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.CIRCLE_NODE),hw(Lp(i),"r",vm,Lp(i)),i}return e=u,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var i=Yh(Js(u.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.circle;return bm(bm({},i),ln(s))}},{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.r;return[{x:i,y:s-h,id:"".concat(this.id,"_0")},{x:i+h,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+h,id:"".concat(this.id,"_2")},{x:i-h,y:s,id:"".concat(this.id,"_3")}]}}])&&gw(e.prototype,n),u}($i),vm=Vh(Ki.prototype,"r",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Vh(Ki.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Ki.prototype,"width"),Ki.prototype),Vh(Ki.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Ki.prototype,"height"),Ki.prototype),Ki);o(129);function $h(t){return $h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$h(t)}function qh(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return xm(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return xm(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  75. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xm(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Em(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Sm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Em(Object(n),!0).forEach(function(r){Pm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Em(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jm(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function _w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ow(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zh(){return Zh=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=ww(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},Zh.apply(this,arguments)}function ww(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=ec(t))!==null;);return t}function Jh(t,e){return Jh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Jh(t,e)}function xw(t){var e=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=ec(t);if(e){var u=ec(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Ew(this,n)}}function Ew(t,e){if(e&&($h(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qs(t)}function Qs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ec(t){return ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ec(t)}function Pm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tc(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var xi,Am,Mm,Qh=(Rr=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Jh(i,s)})(u,t);var e,n,r=xw(u);function u(){var i;_w(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return Pm(Qs(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.DIAMOND_NODE),jm(Qs(i),"rx",Om,Qs(i)),jm(Qs(i),"ry",wm,Qs(i)),i}return e=u,(n=[{key:"getNodeStyle",value:function(){var i=Zh(ec(u.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.diamond;return Sm(Sm({},i),ln(s))}},{key:"points",get:function(){var i=this.x,s=this.y,h=this.rx,v=this.ry;return[[i,s-v],[i+h,s],[i,s+v],[i-h,s]]}},{key:"pointsPosition",get:function(){return this.points.map(function(i){return{x:i[0],y:i[1]}})}},{key:"width",get:function(){var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var v=qh(h,1)[0];v<i&&(i=v),v>s&&(s=v)}),s-i}},{key:"height",get:function(){var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var v=qh(h,2)[1];v<i&&(i=v),v>s&&(s=v)}),s-i}},{key:"getDefaultAnchor",value:function(){var i=this;return this.points.map(function(s,h){var v=qh(s,2);return{x:v[0],y:v[1],id:"".concat(i.id,"_").concat(h)}})}}])&&Ow(e.prototype,n),u}($i),Om=tc(Rr.prototype,"rx",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),wm=tc(Rr.prototype,"ry",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),tc(Rr.prototype,"points",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"points"),Rr.prototype),tc(Rr.prototype,"pointsPosition",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"pointsPosition"),Rr.prototype),tc(Rr.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"width"),Rr.prototype),tc(Rr.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"height"),Rr.prototype),Rr);function ey(t){return ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ey(t)}function km(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Tm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?km(Object(n),!0).forEach(function(r){Nm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):km(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Dm(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Sw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ty(){return ty=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=Pw(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},ty.apply(this,arguments)}function Pw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=rc(t))!==null;);return t}function ny(t,e){return ny=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ny(t,e)}function Aw(t){var e=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=rc(t);if(e){var u=rc(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Mw(this,n)}}function Mw(t,e){if(e&&(ey(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nc(t)}function nc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rc(t){return rc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rc(t)}function Nm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zp(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var Lo,Cm,ry=(xi=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&ny(i,s)})(u,t);var e,n,r=Aw(u);function u(){var i;Sw(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return Nm(nc(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.ELLIPSE_NODE),Dm(nc(i),"rx",Am,nc(i)),Dm(nc(i),"ry",Mm,nc(i)),i}return e=u,(n=[{key:"getNodeStyle",value:function(){var i=ty(rc(u.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.ellipse;return Tm(Tm({},i),ln(s))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.rx,v=this.ry;return[{x:i,y:s-v,id:"".concat(this.id,"_0")},{x:i+h,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+v,id:"".concat(this.id,"_2")},{x:i-h,y:s,id:"".concat(this.id,"_3")}]}}])&&jw(e.prototype,n),u}($i),Am=zp(xi.prototype,"rx",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Mm=zp(xi.prototype,"ry",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),zp(xi.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(xi.prototype,"width"),xi.prototype),zp(xi.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(xi.prototype,"height"),xi.prototype),xi);function oy(t){return oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oy(t)}function iy(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Rm(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Rm(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  76. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Rm(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Im(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Lm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Im(Object(n),!0).forEach(function(r){zm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Im(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function kw(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Tw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uy(){return uy=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=Nw(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},uy.apply(this,arguments)}function Nw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=oc(t))!==null;);return t}function ay(t,e){return ay=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ay(t,e)}function Cw(t){var e=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=oc(t);if(e){var u=oc(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Rw(this,n)}}function Rw(t,e){if(e&&(oy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bp(t)}function Bp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oc(t){return oc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},oc(t)}function zm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fp(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var sy,Bm,cy=(Lo=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&ay(i,s)})(u,t);var e,n,r=Cw(u);function u(){var i;Tw(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return zm(Bp(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.POLYGON_NODE),kw(Bp(i),"points",Cm,Bp(i)),i}return e=u,(n=[{key:"getNodeStyle",value:function(){var i=uy(oc(u.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.polygon;return Lm(Lm({},i),ln(s))}},{key:"pointsPosition",get:function(){var i=this.x,s=this.y,h=this.width,v=this.height;return this.points.map(function(x){return{x:x[0]+i-h/2,y:x[1]+s-v/2}})}},{key:"width",get:function(){var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var v=iy(h,1)[0];v<i&&(i=v),v>s&&(s=v)}),s-i}},{key:"height",get:function(){var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var v=iy(h,2)[1];v<i&&(i=v),v>s&&(s=v)}),s-i}},{key:"getDefaultAnchor",value:function(){var i=this,s=this.x,h=this.y,v=this.width,x=this.height;return this.points.map(function(S,D){var I=iy(S,2),H=I[0],q=I[1];return{x:s+H-v/2,y:h+q-x/2,id:"".concat(i.id,"_").concat(D)}})}}])&&Dw(e.prototype,n),u}($i),Cm=Fp(Lo.prototype,"points",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Fp(Lo.prototype,"pointsPosition",[d.m],Object.getOwnPropertyDescriptor(Lo.prototype,"pointsPosition"),Lo.prototype),Fp(Lo.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Lo.prototype,"width"),Lo.prototype),Fp(Lo.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Lo.prototype,"height"),Lo.prototype),Lo);function fy(t){return fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fy(t)}function Fm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Um(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fm(Object(n),!0).forEach(function(r){Gm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iw(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Lw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ly(){return ly=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=Bw(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},ly.apply(this,arguments)}function Bw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=ic(t))!==null;);return t}function py(t,e){return py=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},py(t,e)}function Fw(t){var e=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=ic(t);if(e){var u=ic(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Uw(this,n)}}function Uw(t,e){if(e&&(fy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Up(t)}function Up(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ic(t){return ic=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ic(t)}function Gm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Lu,dy=(sy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&py(i,s)})(u,t);var e,n,r=Fw(u);function u(){var i;Lw(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return Gm(Up(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.RECT_NODE),Iw(Up(i),"radius",Bm,Up(i)),i}return e=u,(n=[{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.width,v=this.height;return[{x:i,y:s-v/2,id:"".concat(this.id,"_0")},{x:i+h/2,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+v/2,id:"".concat(this.id,"_2")},{x:i-h/2,y:s,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var i=ly(ic(u.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.rect;return Um(Um({},i),ln(s))}}])&&zw(e.prototype,n),u}($i),Bm=function(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}(sy.prototype,"radius",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),sy);function hy(t){return hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hy(t)}function Xm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Hm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xm(Object(n),!0).forEach(function(r){Wm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yy(){return yy=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=Hw(t,e);if(r){var u=Object.getOwnPropertyDescriptor(r,e);return u.get?u.get.call(arguments.length<3?t:n):u.value}},yy.apply(this,arguments)}function Hw(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=uc(t))!==null;);return t}function gy(t,e){return gy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},gy(t,e)}function Yw(t){var e=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=uc(t);if(e){var u=uc(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Ww(this,n)}}function Ww(t,e){if(e&&(hy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ym(t)}function Ym(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uc(t){return uc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},uc(t)}function Wm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vm(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var vy=(Lu=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&gy(i,s)})(u,t);var e,n,r=Yw(u);function u(){var i;Gw(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return Wm(Ym(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.TEXT_NODE),i}return e=u,(n=[{key:"getTextStyle",value:function(){var i=yy(uc(u.prototype),"getTextStyle",this).call(this),s=this.graphModel.theme.text;return Hm(Hm({},i),ln(s))}},{key:"width",get:function(){var i=String(this.text.value).split(/[\r\n]/g),s=this.getTextStyle().fontSize;return Ea({rows:i,fontSize:s,rowsLength:i.length}).width}},{key:"height",get:function(){var i=String(this.text.value).split(/[\r\n]/g),s=this.getTextStyle().fontSize;return Ea({rows:i,fontSize:s,rowsLength:i.length}).height}}])&&Xw(e.prototype,n),u}($i),Vm(Lu.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Lu.prototype,"width"),Lu.prototype),Vm(Lu.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Lu.prototype,"height"),Lu.prototype),Lu);function my(t){return my=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},my(t)}function Vw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function by(t,e){return by=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},by(t,e)}function $w(t){var e=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=Gp(t);if(e){var u=Gp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return qw(this,n)}}function qw(t,e){if(e&&(my(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Km(t)}function Km(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gp(t){return Gp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gp(t)}function Zw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oi,$m,qm,Zm,_y=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&by(i,s)})(u,t);var e,n,r=$w(u);function u(){var i;Vw(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return Zw(Km(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.HTML_NODE),i}return e=u,(n=[{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.width,v=this.height;return[{x:i,y:s-v/2,id:"".concat(this.id,"_0")},{x:i+h/2,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+v/2,id:"".concat(this.id,"_2")},{x:i-h/2,y:s,id:"".concat(this.id,"_3")}]}}])&&Kw(e.prototype,n),u}($i);function Jm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Oy(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Jw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hf(t,e,n,r,u){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),u&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(u):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}var eb=(oi=function(){function t(r){(function(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),Qm(this,"graphModel",void 0),Oy(this,"isShowHorizontal",$m,this),Oy(this,"isShowVertical",qm,this),Oy(this,"position",Zm,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=r}var e,n;return e=t,n=[{key:"getStyle",value:function(){return function(r){for(var u=1;u<arguments.length;u++){var i=arguments[u]!=null?arguments[u]:{};u%2?Jm(Object(i),!0).forEach(function(s){Qm(r,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Jm(Object(i)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(i,s))})}return r}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(r,u){for(var i=r.x,s=r.y,h=!1,v=!1,x=0;x<u.length;x++){var S=u[x];if(S.id!==r.id&&(i===S.x&&(h=!0),s===S.y&&(v=!0),h&&v))break}return{isShowVertical:h,isShowHorizontal:v,position:{x:i,y:s}}}},{key:"getHorizontalSnapline",value:function(r,u){var i,s,h=!1,v=r.id;if(v){var x=this.graphModel.fakerNode;if(x&&x.id===v)s=jn(x);else{var S=this.graphModel.getNodeModelById(v);s=jn(S)}}for(var D=0;D<u.length;D++){var I=u[D];if(I.id!==r.id){var H=jn(I);if(H.minY===s.minY||H.maxY===s.minY){h=!0,i=s.minY;break}if(H.minY===s.maxY||H.maxY===s.maxY){h=!0,i=s.maxY;break}}}return or({isShowHorizontal:h,position:{y:i}})}},{key:"getVerticalSnapline",value:function(r,u){var i,s,h=!1,v=r.id;if(v){var x=this.graphModel.fakerNode;if(x&&x.id===v)s=jn(x);else{var S=this.graphModel.getNodeModelById(v);s=jn(S)}}for(var D=0;D<u.length;D++){var I=u[D];if(I.id!==r.id){var H=jn(I);if(H.minX===s.minX||H.maxX===s.minX){h=!0,i=s.minX;break}if(H.minX===s.maxX||H.maxX===s.maxX){h=!0,i=s.maxX;break}}}return or({isShowVertical:h,position:{x:i}})}},{key:"getSnapLinePosition",value:function(r,u){var i=this.getCenterSnapLine(r,u),s=i.isShowHorizontal,h=i.isShowVertical;if(!s){var v=this.getHorizontalSnapline(r,u);v.isShowHorizontal&&(i.isShowHorizontal=v.isShowHorizontal,i.position.y=v.position.y)}if(!h){var x=this.getVerticalSnapline(r,u);x.isShowVertical&&(i.isShowVertical=x.isShowVertical,i.position.x=x.position.x)}return i}},{key:"setSnaplineInfo",value:function(r){var u=r.isShowHorizontal,i=r.isShowVertical,s=r.position;this.position=s,this.isShowHorizontal=u,this.isShowVertical=i}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(r){var u=this.graphModel.nodes,i=this.getSnapLinePosition(r,u);this.setSnaplineInfo(i)}}],n&&Jw(e.prototype,n),t}(),$m=Hf(oi.prototype,"isShowHorizontal",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qm=Hf(oi.prototype,"isShowVertical",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Zm=Hf(oi.prototype,"position",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hf(oi.prototype,"clearSnapline",[d.k],Object.getOwnPropertyDescriptor(oi.prototype,"clearSnapline"),oi.prototype),Hf(oi.prototype,"setNodeSnapLine",[d.k],Object.getOwnPropertyDescriptor(oi.prototype,"setNodeSnapLine"),oi.prototype),oi),Yf=new Map,tb=function(t){var e=qo(),n=window.requestAnimationFrame(function r(){if(t(),Yf.get(e)){var u=window.requestAnimationFrame(r);Yf.set(e,u)}});return Yf.set(e,n),e},Xp=function(t){var e=Yf.get(t);e&&(window.cancelAnimationFrame(e),Yf.delete(t))};function wy(t){return wy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wy(t)}function Wf(){return Wf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Wf.apply(this,arguments)}function nb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Vf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nb(Object(n),!0).forEach(function(r){Si(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Qw(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return rb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return rb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  77. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function rb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function e0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xy(t,e){return xy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},xy(t,e)}function t0(t){var e=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=Hp(t);if(e){var u=Hp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return n0(this,n)}}function n0(t,e){if(e&&(wy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ei(t)}function Ei(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hp(t){return Hp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Hp(t)}function Si(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r0=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&xy(i,s)})(u,t);var e,n,r=t0(u);function u(){var i;return function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")}(this,u),Si(Ei(i=r.call(this)),"preTargetNode",void 0),Si(Ei(i),"sourceRuleResults",void 0),Si(Ei(i),"targetRuleResults",void 0),Si(Ei(i),"dragHandler",void 0),Si(Ei(i),"t",void 0),Si(Ei(i),"onDragStart",function(s){var h=s.event,v=i.props,x=v.anchorData,S=v.nodeModel,D=v.graphModel;D.overlapMode,D.selectNodeById(S.id),S.autoToFront&&D.toFront(S.id),D.eventCenter.emit(pt.ANCHOR_DRAGSTART,{data:x,e:h,nodeModel:S}),i.setState({startX:x.x,startY:x.y,endX:x.x,endY:x.y})}),Si(Ei(i),"onDragging",function(s){var h=s.event,v=i.props,x=v.graphModel,S=v.nodeModel,D=v.anchorData,I=x.transformModel,H=x.eventCenter,q=x.width,ee=x.height,ve=x.editConfigModel,ge=ve.autoExpand,we=ve.stopMoveGraph,Ce=h.clientX,Je=h.clientY,qe=x.getPointByClient({x:Ce,y:Je}),vt=qe.domOverlayPosition,$e=vt.x,ht=vt.y,tt=qe.canvasOverlayPosition,Kt=tt.x,Jt=tt.y;i.t&&Xp(i.t);var Tt=[];$e<10?Tt=[10,0]:$e+10>q?Tt=[-10,0]:ht<10?Tt=[0,10]:ht+10>ee&&(Tt=[0,-10]),i.setState({endX:Kt,endY:Jt,dragging:!0}),i.moveAnchorEnd(Kt,Jt),Tt.length>0&&!we&&ge&&(i.t=tb(function(){var rn=Qw(Tt,2),Un=rn[0],Gn=rn[1];I.translate(Un,Gn);var Sr=i.state,bo=Sr.endX,_o=Sr.endY;i.setState({endX:bo-Un,endY:_o-Gn}),i.moveAnchorEnd(bo-Un,_o-Gn)})),H.emit(pt.ANCHOR_DRAG,{data:D,e:h,nodeModel:S})}),Si(Ei(i),"onDragEnd",function(s){var h=s.event;i.t&&Xp(i.t);var v=i.checkEnd(h);i.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),i.sourceRuleResults.clear(),i.targetRuleResults.clear();var x=i.props,S=x.graphModel,D=x.nodeModel,I=x.anchorData;S.eventCenter.emit(pt.ANCHOR_DRAGEND,{data:I,e:h,nodeModel:D,edgeModel:v})}),Si(Ei(i),"checkEnd",function(s){var h=i.props,v=h.graphModel,x=h.nodeModel,S=h.anchorData,D=S.x,I=S.y,H=S.id,q=(v.edgeType,i.state),ee=q.endX,ve=q.endY,ge=q.dragging,we=xa({x:ee,y:ve},v);if(i.preTargetNode&&i.preTargetNode.state!==cn.DEFAULT&&i.preTargetNode.setElementState(cn.DEFAULT),ge&&we&&we.node){var Ce=we.node,Je=we.anchor.id,qe="".concat(x.id,"_").concat(Ce.id,"_").concat(Je,"_").concat(H),vt=i.sourceRuleResults.get(qe)||{},$e=vt.isAllPass,ht=vt.msg,tt=i.targetRuleResults.get(qe)||{},Kt=tt.isAllPass,Jt=tt.msg;if($e&&Kt){Ce.setElementState(cn.DEFAULT);var Tt=v.edgeGenerator(x.getData(),v.getNodeModelById(we.node.id).getData()),rn=v.addEdge(Vf(Vf({},Tt),{},{sourceNodeId:x.id,sourceAnchorId:H,startPoint:{x:D,y:I},targetNodeId:we.node.id,targetAnchorId:we.anchor.id,endPoint:{x:we.anchor.x,y:we.anchor.y}})),Un=i.props.anchorData;return v.eventCenter.emit(pt.ANCHOR_DROP,{data:Un,e:s,nodeModel:x,edgeModel:rn}),rn}var Gn=Ce.getData();return v.eventCenter.emit(pt.CONNECTION_NOT_ALLOWED,{data:Gn,msg:Jt||ht||"不允许添加连线"}),null}}),i.sourceRuleResults=new Map,i.targetRuleResults=new Map,i.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},i.dragHandler=new no({onDragStart:i.onDragStart,onDragging:i.onDragging,onDragEnd:i.onDragEnd}),i}return e=u,(n=[{key:"getAnchorShape",value:function(){var i=this.props,s=i.anchorData,h=i.style,v=i.node.getAnchorShape(s);if(v)return v;var x=s.x,S=s.y,D=Vf(Vf({},h),h.hover);return Object(le.g)("g",null,Object(le.g)(Zs,Wf({className:"lf-node-anchor-hover"},D,{x,y:S})),Object(le.g)(Zs,Wf({className:"lf-node-anchor"},h,{x,y:S})))}},{key:"customTrajectory",get:function(){return this.props.graphModel.customTrajectory}},{key:"relateEdges",get:function(){var i=this.props,s=i.graphModel,h=s.getAnchorIncomingEdge,v=s.getAnchorOutcomingEdge,x=i.anchorData.id;return{incomingEdgeList:h(x),outcomingEdgeList:v(x)}}},{key:"moveAnchorEnd",value:function(i,s){var h=this.props,v=h.graphModel,x=h.nodeModel,S=h.anchorData,D=xa({x:i,y:s},v);if(D){var I=D.node,H=D.anchor.id;if(this.preTargetNode&&this.preTargetNode!==D.node&&this.preTargetNode.setElementState(cn.DEFAULT),S.id===H)return;this.preTargetNode=I;var q="".concat(x.id,"_").concat(I.id,"_").concat(H,"_").concat(S.id);if(!this.targetRuleResults.has(q)){var ee=D.anchor,ve=x.isAllowConnectedAsSource(I,S,ee),ge=I.isAllowConnectedAsTarget(x,S,ee);this.sourceRuleResults.set(q,Su(ve)),this.targetRuleResults.set(q,Su(ge))}var we=this.sourceRuleResults.get(q).isAllPass,Ce=this.targetRuleResults.get(q).isAllPass;we&&Ce?I.setElementState(cn.ALLOW_CONNECT):I.setElementState(cn.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==cn.DEFAULT&&this.preTargetNode.setElementState(cn.DEFAULT)}},{key:"isShowLine",value:function(){var i=this.state,s=i.startX,h=i.startY,v=i.endX,x=i.endY;return ho(s,h,v,x)>10}},{key:"render",value:function(){var i=this,s=this.state,h=s.startX,v=s.startY,x=s.endX,S=s.endY,D=this.props,I=D.anchorData.edgeAddable,H=D.edgeStyle;return Object(le.g)("g",{className:"lf-anchor"},Object(le.g)("g",{onMouseDown:function(q){I!==!1&&i.dragHandler.handleMouseDown(q)}},this.getAnchorShape()),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(Vf({sourcePoint:{x:h,y:v},targetPoint:{x,y:S}},H)):Object(le.g)($s,Wf({x1:h,y1:v,x2:x,y2:S},H,{"pointer-events":"none"}))))}}])&&e0(e.prototype,n),u}(le.a);function ob(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function o0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ob(Object(n),!0).forEach(function(r){i0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function i0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ey(t){return Ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ey(t)}function u0(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return ib(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return ib(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  78. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ib(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ub(t){var e=t.x,n=e===void 0?0:e,r=t.y,u=r===void 0?0:r,i=t.value,s=t.fontSize,h=t.fill,v=h===void 0?"currentColor":h,x=t.overflowMode,S=x===void 0?"default":x,D=t.textWidth,I=D===void 0?"":D,H=t.model,q={textAnchor:"middle","dominant-baseline":"middle",x:n,y:u,fill:v};if(Object.entries(t).forEach(function(Je){var qe=u0(Je,2),vt=qe[0],$e=qe[1];Ey($e)!=="object"&&(q[vt]=$e)}),i){var ee=String(i).split(/[\r\n]/g),ve=ee.length;if(S!=="default"){var ge=H.BaseType,we=H.modelType;if(ge===Bn.NODE&&we!==Yt.TEXT_NODE||ge===Bn.EDGE&&I)return function(Je){var qe=Je.value,vt=Je.fontSize,$e=Je.model,ht=Je.fontFamily,tt=ht===void 0?"":ht,Kt=Je.lineHeight,Jt=Je.wrapPadding,Tt=Jt===void 0?"0, 0":Jt,rn=Je.overflowMode,Un=Je.x,Gn=Je.y,Sr=$e.width,bo=$e.textHeight,_o=Je.textWidth||Sr,Ai=String(qe).split(/[\r\n]/g),Ya=Ai.length,yd=Ql({rows:Ai,style:{fontSize:"".concat(vt,"px"),width:"".concat(_o,"px"),fontFamily:tt,lineHeight:Kt,padding:Tt},rowsLength:Ya,className:"lf-get-text-height"}),Wa=$e.height>yd?$e.height:yd;bo&&(Wa=bo);var Fu=rn==="ellipsis";return Fu&&(Wa=vt+2),Object(le.g)("g",null,Object(le.g)("foreignObject",{width:_o,height:Wa,x:Un-_o/2,y:Gn-Wa/2},Object(le.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:Wa,width:_o,padding:Tt}},Object(le.g)("div",{className:Fu?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Fu?Ai.join(""):"",style:o0({},Je)},Ai.map(function(Uu){return Object(le.g)("div",{className:"lf-node-text--auto-wrap-inner"},Uu)})))))}(t)}if(ve>1){var Ce=ee.map(function(Je,qe){var vt=(qe-(ve-1)/2)*(s+2);return Object(le.g)("tspan",{className:"lf-text-tspan",x:n,y:u+vt},Je)});return Object(le.g)("text",q,Ce)}return Object(le.g)("text",q,i)}}function Sy(t){return Sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sy(t)}function jy(){return jy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jy.apply(this,arguments)}function a0(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return ab(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return ab(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  79. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ab(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function s0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Py(t,e){return Py=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Py(t,e)}function c0(t){var e=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=Yp(t);if(e){var u=Yp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return f0(this,n)}}function f0(t,e){if(e&&(Sy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zu(t)}function zu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yp(t){return Yp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Yp(t)}function Ua(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var sb=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Py(i,s)})(u,t);var e,n,r=c0(u);function u(i){var s;(function(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")})(this,u),Ua(zu(s=r.call(this)),"dragHandler",void 0),Ua(zu(s),"sumDeltaX",0),Ua(zu(s),"sumDeltaY",0),Ua(zu(s),"stepDrag",void 0),Ua(zu(s),"onDragging",function(v){var x=v.deltaX,S=v.deltaY,D=s.props,I=D.model,H=a0(D.graphModel.transformModel.fixDeltaXY(x,S),2),q=H[0],ee=H[1];I.moveText(q,ee)}),Ua(zu(s),"dblClickHandler",function(){s.props.editable&&s.props.model.setElementState(cn.TEXT_EDIT)}),Ua(zu(s),"mouseDownHandle",function(v){var x=s.props,S=x.draggable,D=x.model,I=x.graphModel.editConfigModel.nodeTextDraggable;(S||I)&&(s.stepDrag.model=D,s.stepDrag.handleMouseDown(v))}),i.model;var h=i.draggable;return s.stepDrag=new no({onDragging:s.onDragging,step:1,isStopPropagation:h}),s}return e=u,(n=[{key:"getShape",value:function(){var i=this.props,s=i.model,h=i.graphModel,v=s.text,x=h.editConfigModel,S=v.value,D=v.x,I=v.y,H=v.editable,q=v.draggable,ee={x:D,y:I,className:"",value:S};H?ee.className="lf-element-text":q||x.nodeTextDraggable?ee.className="lf-text-draggable":ee.className="lf-text-disabled";var ve=s.getTextStyle();return Object(le.g)(ub,jy({},ee,ve,{model:s}))}},{key:"render",value:function(){if(this.props.model.text)return Object(le.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&s0(e.prototype,n),u}(le.a),l0=lu(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null,cb=o(130);function Ay(t){return Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ay(t)}function My(){return My=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},My.apply(this,arguments)}function p0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ky(t,e){return ky=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ky(t,e)}function d0(t){var e=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=Wp(t);if(e){var u=Wp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return h0(this,n)}}function h0(t,e){if(e&&(Ay(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ac(t)}function ac(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wp(t){return Wp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wp(t)}function Kf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var y0=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&ky(i,s)})(u,t);var e,n,r=d0(u);function u(i){var s;return function(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}(this,u),Kf(ac(s=r.call(this,i)),"style",{}),Kf(ac(s),"defaultAngle",void 0),Kf(ac(s),"normal",void 0),Kf(ac(s),"stepperDrag",void 0),Kf(ac(s),"onDragging",function(h){var v,x=h.event,S=s.props,D=S.graphModel,I=S.nodeModel,H=S.eventCenter,q=D.selectNodes,ee=I.x,ve=I.y,ge=x.clientX,we=x.clientY,Ce=D.getPointByClient({x:ge,y:we}).canvasOverlayPosition,Je=Ce.x,qe=Ce.y,vt=new rr(Je-ee,qe-ve),$e=((v=s.normal)===null||v===void 0?void 0:v.angle(vt))-s.defaultAngle,ht=new Cu(-ee,-ve).rotate($e).translate(ee,ve).toString();I.transform=ht,I.rotate=$e;var tt=Object(cb.map)(q,function(Jt){return Jt.id});tt.indexOf(I.id)===-1&&(tt=[I.id]);var Kt=Object(cb.reduce)(tt,function(Jt,Tt){var rn=D.getNodeModelById(Tt);return Jt[Tt]=rn==null?void 0:rn.getMoveDistance(0,0,!1),Jt},{});tt.forEach(function(Jt){D.getNodeEdges(Jt).forEach(function(Tt){if(Kt[Tt.sourceNodeId]){var rn=D.getNodeModelById(Tt.sourceNodeId).anchors.find(function(Gn){return Gn.id===Tt.sourceAnchorId});Tt.updateStartPoint(rn)}if(Kt[Tt.targetNodeId]){var Un=D.getNodeModelById(Tt.targetNodeId).anchors.find(function(Gn){return Gn.id===Tt.targetAnchorId});Tt.updateEndPoint(Un)}})}),H.emit(pt.NODE_ROTATE,{e:x,nodeModel:I})}),s.style=i.style,s.stepperDrag=new no({onDragging:s.onDragging}),s}return e=u,(n=[{key:"render",value:function(){var i=this,s=this.props.nodeModel,h=s.x,v=s.y,x=h+s.width/2+20,S=v-s.height/2-20;return this.normal=new rr(1,0),this.defaultAngle=this.normal.angle(new rr(x-h,S-v)),s.defaultAngle=this.defaultAngle,Object(le.g)("g",{className:"lf-rotate-control"},Object(le.g)("g",{onMouseDown:function(D){i.stepperDrag.handleMouseDown(D)}},Object(le.g)(Zs,My({},this.style,{cx:x,cy:S}))))}}])&&p0(e.prototype,n),u}(le.a);function Ty(t){return Ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ty(t)}var g0=["className"];function Vp(){return Vp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vp.apply(this,arguments)}function v0(t,e){if(t==null)return{};var n,r,u=function(s,h){if(s==null)return{};var v,x,S={},D=Object.keys(s);for(x=0;x<D.length;x++)v=D[x],h.indexOf(v)>=0||(S[v]=s[v]);return S}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(u[n]=t[n])}return u}function Kp(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return fb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return fb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  80. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function lb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Dy(t,e){return Dy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Dy(t,e)}function m0(t){var e=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=$p(t);if(e){var u=$p(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return b0(this,n)}}function b0(t,e){if(e&&(Ty(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ur(t)}function ur(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $p(t){return $p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$p(t)}function yr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qi=function(t){(function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(h&&h.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),h&&Dy(s,h)})(i,t);var e,n,r,u=m0(i);function i(s){var h;(function(I,H){if(!(I instanceof H))throw new TypeError("Cannot call a class as a function")})(this,i),yr(ur(h=u.call(this)),"t",void 0),yr(ur(h),"moveOffset",void 0),yr(ur(h),"stepDrag",void 0),yr(ur(h),"contextMenuTime",void 0),yr(ur(h),"mouseUpDrag",void 0),yr(ur(h),"startTime",void 0),yr(ur(h),"clickTimer",void 0),yr(ur(h),"modelDisposer",void 0),yr(ur(h),"onDragStart",function(I){var H=I.event,q=H.clientX,ee=H.clientY,ve=h.props,ge=ve.model,we=ve.graphModel.getPointByClient({x:q,y:ee}).canvasOverlayPosition,Ce=we.x,Je=we.y;h.moveOffset={x:ge.x-Ce,y:ge.y-Je}}),yr(ur(h),"onDragging",function(I){var H=I.event,q=h.props,ee=q.model,ve=q.graphModel,ge=ve.editConfigModel,we=ge.stopMoveGraph,Ce=ge.autoExpand,Je=ve.transformModel,qe=ve.selectNodes,vt=ve.width,$e=ve.height,ht=ve.gridSize;ee.isDragging=!0;var tt=H.clientX,Kt=H.clientY,Jt=ve.getPointByClient({x:tt,y:Kt}).canvasOverlayPosition,Tt=Jt.x,rn=Jt.y,Un=Kp(Je.CanvasPointToHtmlPoint([Tt,rn]),2),Gn=Un[0],Sr=Un[1];if(Tt+=h.moveOffset.x,rn+=h.moveOffset.y,Tt=yi(Tt,ht),rn=yi(rn,ht),vt&&$e){if(!Ce||we||!(Gn<0||Sr<0||Gn>vt||Sr>$e)){var bo=Kp(Je.CanvasPointToHtmlPoint([Tt-ee.width/2,rn-ee.height/2]),2),_o=bo[0],Ai=bo[1],Ya=Kp(Je.CanvasPointToHtmlPoint([Tt+ee.width/2,rn+ee.height/2]),2),yd=Ya[0],Wa=Ya[1],Fu=Math.max(ht,20),Uu=[];_o<0?Uu=[Fu,0]:yd>ve.width?Uu=[-Fu,0]:Ai<0?Uu=[0,Fu]:Wa>ve.height&&(Uu=[0,-Fu]),h.t&&Xp(h.t);var n1=new Cu(-Tt,-rn).rotate(ee.rotate).translate(Tt,rn).toString();ee.transform=n1;var gd=qe.map(function(vd){return vd.id});gd.indexOf(ee.id)===-1&&(gd=[ee.id]),Uu.length>0&&!we&&Ce?h.t=tb(function(){var vd=Kp(Uu,2),Yb=vd[0],Wb=vd[1];Je.translate(Yb,Wb);var r1=-Yb/Je.SCALE_X,o1=-Wb/Je.SCALE_X;ve.moveNodes(gd,r1,o1)}):ve.moveNodes(gd,Tt-ee.x,rn-ee.y)}}else ve.moveNode2Coordinate(ee.id,Tt,rn)}),yr(ur(h),"onDragEnd",function(){h.t&&Xp(h.t),h.props.model.isDragging=!1}),yr(ur(h),"handleMouseUp",function(){var I=h.props.model;h.mouseUpDrag=I.isDragging}),yr(ur(h),"handleClick",function(I){var H=h.mouseUpDrag===!1;if(h.startTime){var q=h.props,ee=q.model,ve=q.graphModel;if(H){var ge={data:ee.getData(),e:I,position:ve.getPointByClient({x:I.clientX,y:I.clientY}),isSelected:!1,isMultiple:!1},we=I.button===2,Ce=I.detail===2;if(!we){var Je=ve.editConfigModel,qe=Oa(I,Je);ge.isMultiple=qe,ee.isSelected&&!Ce&&qe?(ge.isSelected=!1,ee.setSelected(!1)):(ve.selectNodeById(ee.id,qe),ge.isSelected=!0,h.toFront()),Ce?(Je.nodeTextEdit&&ee.text.editable&&(ee.setSelected(!1),ve.setElementStateById(ee.id,cn.TEXT_EDIT)),ve.eventCenter.emit(pt.NODE_DBCLICK,ge)):(ve.eventCenter.emit(pt.ELEMENT_CLICK,ge),ve.eventCenter.emit(pt.NODE_CLICK,ge))}}}}),yr(ur(h),"handleContextMenu",function(I){I.preventDefault();var H=h.props,q=H.model,ee=H.graphModel,ve=q.getData(),ge=ee.getPointByClient({x:I.clientX,y:I.clientY});ee.setElementStateById(q.id,cn.SHOW_MENU,ge.domOverlayPosition),q.isSelected||ee.selectNodeById(q.id),ee.eventCenter.emit(pt.NODE_CONTEXTMENU,{data:ve,e:I,position:ge}),h.toFront()}),yr(ur(h),"handleMouseDown",function(I){var H=h.props,q=H.model,ee=H.graphModel;h.startTime=new Date().getTime(),ee.editConfigModel.adjustNodePosition&&q.draggable&&h.stepDrag&&h.stepDrag.handleMouseDown(I)}),yr(ur(h),"setHoverON",function(I){var H=h.props,q=H.model,ee=H.graphModel;if(!q.isHovered){var ve=q.getData();q.setHovered(!0),ee.eventCenter.emit(pt.NODE_MOUSEENTER,{data:ve,e:I})}}),yr(ur(h),"setHoverOFF",function(I){var H=h.props,q=H.model,ee=H.graphModel,ve=q.getData();q.isHovered&&(q.setHovered(!1),ee.eventCenter.emit(pt.NODE_MOUSELEAVE,{data:ve,e:I}))}),yr(ur(h),"onMouseOut",function(I){l0&&h.setHoverOFF(I)});var v=s.graphModel,x=v.gridSize,S=v.eventCenter,D=s.model;return h.stepDrag=new no({onDragStart:h.onDragStart,onDragging:h.onDragging,onDragEnd:h.onDragEnd,step:x,eventType:"NODE",isStopPropagation:!1,eventCenter:S,model:D}),h.modelDisposer=Object(d.F)(function(){return h.props},function(I){I&&I.model&&h.stepDrag.setModel(I.model)}),h}return e=i,r=[{key:"getModel",value:function(s){return s}}],(n=[{key:"componentWillUnmount",value:function(){this.modelDisposer&&this.modelDisposer()}},{key:"getAnchorShape",value:function(s){return null}},{key:"getAnchors",value:function(){var s=this,h=this.props,v=h.model,x=h.graphModel,S=v.isSelected,D=v.isHitable,I=v.isDragging,H=v.isShowAnchor;return D&&(S||H)&&!I?is(v.anchors,function(q,ee){var ve=v.getAnchorLineStyle(q),ge=v.getAnchorStyle(q);return Object(le.g)(r0,{anchorData:q,node:s,style:ge,edgeStyle:ve,anchorIndex:ee,nodeModel:v,graphModel:x,setHoverOFF:s.setHoverOFF})}):[]}},{key:"getRotateControl",value:function(){var s=this.props,h=s.model,v=s.graphModel,x=h.isSelected,S=h.isHitable,D=h.enableRotate,I=h.isHovered,H=h.getRotateControlStyle().style;if(S&&(x||I)&&D)return Object(le.g)(y0,{graphModel:v,nodeModel:h,eventCenter:v.eventCenter,style:H})}},{key:"getText",value:function(){var s=this.props,h=s.model,v=s.graphModel;if(h.state===cn.TEXT_EDIT)return"";if(h.text){var x=v.editConfigModel,S=!1;return(h.text.draggable||x.nodeTextDraggable)&&(S=!0),Object(le.g)(sb,{editable:x.nodeTextEdit&&h.text.editable,model:h,graphModel:v,draggable:S})}}},{key:"getStateClassName",value:function(){var s=this.props.model,h=s.state,v=s.isDragging,x=s.isSelected,S="lf-node";switch(h){case cn.ALLOW_CONNECT:S+=" lf-node-allow";break;case cn.NOT_ALLOW_CONNECT:S+=" lf-node-not-allow";break;default:S+=" lf-node-default"}return v&&(S+=" lf-isDragging"),x&&(S+=" lf-node-selected"),S}},{key:"toFront",value:function(){var s=this.props,h=s.model,v=s.graphModel;h.autoToFront&&v.toFront(h.id)}},{key:"render",value:function(){var s,h=this.props,v=h.model,x=h.graphModel,S=x.editConfigModel,D=S.hideAnchors,I=S.adjustNodePosition,H=S.allowRotation,q=x.gridSize,ee=x.transformModel.SCALE_X,ve=v.isHitable,ge=v.draggable,we=v.transform,Ce=v.getOuterGAttributes(),Je=Ce.className,qe=Je===void 0?"":Je,vt=v0(Ce,g0),$e=Object(le.g)("g",{className:"lf-node-content"},Object(le.g)("g",{transform:we},this.getShape(),this.getText(),H&&this.getRotateControl()),!D&&this.getAnchors());return ve?(I&&ge&&this.stepDrag.setStep(q*ee),s=Object(le.g)("g",Vp({className:"".concat(this.getStateClassName()," ").concat(qe),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},vt),$e)):s=Object(le.g)("g",Vp({className:"".concat(this.getStateClassName()," ").concat(qe)},vt),$e),s}}])&&lb(e.prototype,n),r&&lb(e,r),i}(le.a);function Ny(t){return Ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ny(t)}function Cy(){return Cy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Cy.apply(this,arguments)}function _0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ry(t,e){return Ry=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ry(t,e)}function w0(t){var e=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=qp(t);if(e){var u=qp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return x0(this,n)}}function x0(t,e){if(e&&(Ny(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function qp(t){return qp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qp(t)}var Iy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Ry(i,s)})(u,t);var e,n,r=w0(u);function u(){return _0(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.getNodeStyle();return Object(le.g)(Ru,Cy({},s,{x:i.x,y:i.y,width:i.width,height:i.height,radius:i.radius}))}}])&&O0(e.prototype,n),u}(qi);function Ly(t){return Ly=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ly(t)}function zy(){return zy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zy.apply(this,arguments)}function E0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function By(t,e){return By=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},By(t,e)}function j0(t){var e=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=Zp(t);if(e){var u=Zp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return P0(this,n)}}function P0(t,e){if(e&&(Ly(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Zp(t){return Zp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zp(t)}var Fy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),By(i,s)})(u,t);var e,n,r=j0(u);function u(){return E0(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.x,h=i.y,v=i.r,x=i.getNodeStyle();return Object(le.g)(Zs,zy({},x,{x:s,y:h,r:v}))}}])&&S0(e.prototype,n),u}(qi);function Uy(t){return Uy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uy(t)}function A0(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return pb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return pb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  81. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function pb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function db(t){var e=t.points,n=t.className,r={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach(function(u){var i=A0(u,2),s=i[0],h=i[1];Uy(h)!=="object"&&(r[s]=h)}),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=e.map(function(u){return u.join(",")}).join(" "),Object(le.g)("polygon",r)}function Gy(t){return Gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gy(t)}function Xy(){return Xy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xy.apply(this,arguments)}function M0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Hy(t,e){return Hy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Hy(t,e)}function T0(t){var e=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=Jp(t);if(e){var u=Jp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return D0(this,n)}}function D0(t,e){if(e&&(Gy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Jp(t){return Jp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Jp(t)}var Yy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Hy(i,s)})(u,t);var e,n,r=T0(u);function u(){return M0(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.x,h=i.y,v=i.width,x=i.height,S=i.points,D=i.getNodeStyle(),I={transform:"matrix(1 0 0 1 ".concat(s-v/2," ").concat(h-x/2,")")};return Object(le.g)("g",I,Object(le.g)(db,Xy({},D,{points:S,x:s,y:h})))}}])&&k0(e.prototype,n),u}(qi);function Wy(t){return Wy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wy(t)}function Vy(){return Vy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vy.apply(this,arguments)}function N0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ky(t,e){return Ky=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ky(t,e)}function R0(t){var e=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=Qp(t);if(e){var u=Qp(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return I0(this,n)}}function I0(t,e){if(e&&(Wy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Qp(t){return Qp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qp(t)}var $y=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Ky(i,s)})(u,t);var e,n,r=R0(u);function u(){return N0(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.getNodeStyle();return Object(le.g)("g",null,Object(le.g)(db,Vy({},s,{points:i.points,x:i.x,y:i.y})))}}])&&C0(e.prototype,n),u}(qi);function qy(t){return qy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qy(t)}function L0(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return hb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return hb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  82. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function hb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function z0(t){var e=t.x,n=e===void 0?0:e,r=t.y,u=r===void 0?0:r,i=t.rx,s=i===void 0?4:i,h=t.ry,v=h===void 0?4:h,x=t.className,S={cx:n,cy:u,rx:s,ry:v,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(function(D){var I=L0(D,2),H=I[0],q=I[1];qy(q)!=="object"&&(S[H]=q)}),S.className=x?"lf-basic-shape ".concat(x):"lf-basic-shape",Object(le.g)("ellipse",S)}function Zy(t){return Zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zy(t)}function Jy(){return Jy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jy.apply(this,arguments)}function B0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qy(t,e){return Qy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Qy(t,e)}function U0(t){var e=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=ed(t);if(e){var u=ed(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return G0(this,n)}}function G0(t,e){if(e&&(Zy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function ed(t){return ed=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ed(t)}var eg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Qy(i,s)})(u,t);var e,n,r=U0(u);function u(){return B0(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.getNodeStyle();return Object(le.g)(z0,Jy({},s,{x:i.x,y:i.y,rx:i.rx,ry:i.ry}))}}])&&F0(e.prototype,n),u}(qi);function tg(t){return tg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tg(t)}function yb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function gb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yb(Object(n),!0).forEach(function(r){X0(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function X0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function H0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ng(t,e){return ng=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ng(t,e)}function W0(t){var e=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=td(t);if(e){var u=td(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return V0(this,n)}}function V0(t,e){if(e&&(tg(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function td(t){return td=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},td(t)}var rg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),ng(i,s)})(u,t);var e,n,r=W0(u);function u(){return H0(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getBackground",value:function(){var i=this.props.model,s=i.getTextStyle(),h=i.width,v=i.height,x=i.x,S=i.y,D=gb(gb({},s.background),{},{x,y:S-1,width:h,height:v});return Object(le.g)(Ru,D)}},{key:"getShape",value:function(){return Object(le.g)("g",null,this.getBackground())}}])&&Y0(e.prototype,n),u}(qi);function og(t){return og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},og(t)}function ig(){return ig=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ig.apply(this,arguments)}function K0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ug(t,e){return ug=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ug(t,e)}function q0(t){var e=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=nd(t);if(e){var u=nd(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Z0(this,n)}}function Z0(t,e){if(e&&(og(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $f(t)}function $f(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nd(t){return nd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},nd(t)}function rd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ag=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),ug(i,s)})(u,t);var e,n,r=q0(u);function u(){var i;K0(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return rd($f(i=r.call.apply(r,[this].concat(h))),"ref",void 0),rd($f(i),"currentProperties",void 0),rd($f(i),"preProperties",void 0),rd($f(i),"setRef",function(x){i.ref=x}),i}return e=u,(n=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(i){i.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 i=this.props.model,s=i.x,h=i.y,v=i.height,x=i.width,S=i.getNodeStyle();return this.currentProperties=JSON.stringify(i.properties),Object(le.g)("foreignObject",ig({},S,{x:s-x/2,y:h-v/2,width:x,height:v,ref:this.setRef}))}}])&&$0(e.prototype,n),u}(qi);function sg(t){return sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sg(t)}function cg(){return cg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},cg.apply(this,arguments)}function vb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Ga(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vb(Object(n),!0).forEach(function(r){pg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function J0(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function fg(t,e){return fg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},fg(t,e)}function Q0(t){var e=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=od(t);if(e){var u=od(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return ex(this,n)}}function ex(t,e){if(e&&(sg(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lg(t)}function lg(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function od(t){return od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},od(t)}function pg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var tx=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),fg(i,s)})(u,t);var e,n,r=Q0(u);function u(i){var s;return function(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}(this,u),pg(lg(s=r.call(this,i)),"setHoverON",function(){s.setState({isHovered:!0})}),pg(lg(s),"setHoverOFF",function(){s.setState({isHovered:!1})}),s.state={isHovered:!1},s}return e=u,(n=[{key:"getBackground",value:function(){var i=this.props.model,s=i.getTextStyle(),h=i.text,v=i.width,x=s.background||{};if(this.state.isHovered&&s.hover&&s.hover.background&&(x=Ga(Ga({},x),s.hover.background)),h&&h.value&&x.fill!=="transparent"){var S,D=s.fontSize,I=s.overflowMode,H=s.lineHeight,q=s.wrapPadding,ee=s.textWidth,ve=h.value,ge=h.x,we=h.y,Ce=String(ve).split(/[\r\n]/g),Je=Ce.length;if(I==="autoWrap"&&ee){var qe=Ql({rows:Ce,style:{fontSize:"".concat(D,"px"),width:"".concat(ee,"px"),lineHeight:H,padding:q},rowsLength:Je,className:"lf-get-text-height"});S=Ga(Ga({},x),{},{x:ge-1,y:we-1,width:ee,height:qe})}else{Ce&&Ce.forEach(function(Kt){Df(Kt)});var vt=Ea({rows:Ce,fontSize:D,rowsLength:Je}),$e=vt.width,ht=vt.height;if(I==="ellipsis"&&($e=ee||v,ht=D+2),typeof x.wrapPadding=="string"){var tt=x.wrapPadding.split(",").filter(function(Kt){return Kt.trim()}).map(function(Kt){return parseFloat(Kt.trim())});tt.length>0&&tt.length<=4&&(tt.length===1?tt=[tt[0],tt[0],tt[0],tt[0]]:tt.length===2?tt=[tt[0],tt[1],tt[0],tt[1]]:tt.length===3&&(tt=[tt[0],tt[1],tt[2],tt[1]]),$e+=tt[1]+tt[3],ht+=tt[0]+tt[2],ge+=(tt[1]-tt[3])/2,we+=(tt[2]-tt[0])/2)}S=Ga(Ga({},x),{},{x:ge-1,y:we-1,width:$e,height:ht})}return Object(le.g)(Ru,S)}}},{key:"getShape",value:function(){var i=this.props.model,s=i.text,h=s.value,v=s.x,x=s.y;if(h){var S=Ga({x:v,y:x,className:"lf-element-text",value:h},i.getTextStyle());return Object(le.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(le.g)(ub,cg({},S,{model:i})))}}}])&&J0(e.prototype,n),u}(sb);function dg(t){return dg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dg(t)}var ji,nx=["text","sourceAnchorId","targetAnchorId"];function mb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Zi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mb(Object(n),!0).forEach(function(r){mo(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function rx(t,e){if(t==null)return{};var n,r,u=function(s,h){if(s==null)return{};var v,x,S={},D=Object.keys(s);for(x=0;x<D.length;x++)v=D[x],h.indexOf(v)>=0||(S[v]=s[v]);return S}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(u[n]=t[n])}return u}function ox(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return bb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return bb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  83. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function bb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ix(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hg(t,e){return hg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},hg(t,e)}function ux(t){var e=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=id(t);if(e){var u=id(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return ax(this,n)}}function ax(t,e){if(e&&(dg(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vo(t)}function vo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function id(t){return id=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},id(t)}function mo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ji||(ji={}));var _b=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&hg(i,s)})(u,t);var e,n,r=ux(u);function u(i){var s;(function(S,D){if(!(S instanceof D))throw new TypeError("Cannot call a class as a function")})(this,u),mo(vo(s=r.call(this)),"stepDragData",void 0),mo(vo(s),"stepDrag",void 0),mo(vo(s),"oldEdge",void 0),mo(vo(s),"preTargetNode",void 0),mo(vo(s),"targetRuleResults",void 0),mo(vo(s),"sourceRuleResults",void 0),mo(vo(s),"handleMouseDown",function(S){s.stepDrag&&s.stepDrag.handleMouseDown(S)}),mo(vo(s),"onDragStart",function(){var S=s.props,D=S.x,I=S.y,H=S.edgeModel,q=H.startPoint,ee=H.endPoint,ve=H.pointsList;s.oldEdge={startPoint:q,endPoint:ee,pointsList:ve},s.setState({endX:D,endY:I,dragging:!0})}),mo(vo(s),"onDragging",function(S){var D=S.deltaX,I=S.deltaY,H=s.state,q=H.endX,ee=H.endY,ve=s.props,ge=ve.graphModel,we=ve.type,Ce=ge.transformModel,Je=ge.editConfigModel,qe=ox(Ce.moveCanvasPointByHtml([q,ee],D,I),2),vt=qe[0],$e=qe[1];s.setState({endX:vt,endY:$e,dragging:!0});var ht=s.props.edgeModel,tt=xa({x:q,y:ee},ge);if(tt&&tt.node&&s.isAllowAdjust(tt).pass){var Kt,Jt=ht.startPoint,Tt=ht.endPoint,rn=ht.sourceNode,Un=ht.targetNode;we===ji.SOURCE?Kt={startPoint:{x:tt.anchor.x,y:tt.anchor.y},endPoint:{x:Tt.x,y:Tt.y},sourceNode:tt.node,targetNode:Un}:we===ji.TARGET&&(Kt={startPoint:{x:Jt.x,y:Jt.y},endPoint:{x:tt.anchor.x,y:tt.anchor.y},sourceNode:rn,targetNode:tt.node}),ht.updateAfterAdjustStartAndEnd(Kt)}else we===ji.SOURCE?ht.updateStartPoint({x:vt,y:$e}):we===ji.TARGET&&ht.updateEndPoint({x:vt,y:$e});ht.text.value&&Je.adjustEdge&&ht.setText(Object.assign({},ht.text,ht.textPosition))}),mo(vo(s),"onDragEnd",function(S){var D=S.event;try{var I;s.setState({dragging:!1});var H=s.props,q=H.graphModel,ee=H.edgeModel,ve=H.type,ge=s.state,we=ge.endX,Ce=ge.endY,Je=ge.dragging,qe=xa({x:we,y:Ce},q);if(!Je)return;var vt,$e=!1;if(qe&&qe.node){var ht=s.isAllowAdjust(qe),tt=ht.pass,Kt=ht.msg,Jt=ht.newTargetNode;if(tt){var Tt=ee.getData(),rn=Tt.text,Un=Tt.sourceAnchorId,Gn=Un===void 0?"":Un,Sr=Tt.targetAnchorId;vt=Zi(Zi({sourceAnchorId:Gn,targetAnchorId:Sr===void 0?"":Sr},rx(Tt,nx)),{},{text:(rn==null?void 0:rn.value)||""}),ve===ji.SOURCE?(vt=Zi(Zi({},q.edgeGenerator(q.getNodeModelById(qe.node.id).getData(),q.getNodeModelById(ee.targetNodeId).getData(),vt)),{},{sourceNodeId:qe.node.id,sourceAnchorId:qe.anchor.id,startPoint:{x:qe.anchor.x,y:qe.anchor.y},targetNodeId:ee.targetNodeId,endPoint:Zi({},ee.endPoint)}),ee.sourceNodeId===qe.node.id&&ee.sourceAnchorId===qe.anchor.id&&($e=!0)):ve===ji.TARGET&&(vt=Zi(Zi({},q.edgeGenerator(q.getNodeModelById(ee.sourceNodeId).getData(),q.getNodeModelById(qe.node.id).getData(),vt)),{},{sourceNodeId:ee.sourceNodeId,startPoint:Zi({},ee.startPoint),targetNodeId:qe.node.id,targetAnchorId:qe.anchor.id,endPoint:{x:qe.anchor.x,y:qe.anchor.y}}),ee.targetNodeId===qe.node.id&&ee.targetAnchorId===qe.anchor.id&&($e=!0))}else{$e=!0;var bo=Jt.getData();q.eventCenter.emit(pt.CONNECTION_NOT_ALLOWED,{data:bo,msg:Kt})}}else $e=!0;if($e)s.recoveryEdge();else{var _o=ee.getData();q.deleteEdgeById(ee.id);var Ai=q.addEdge(Zi({},vt));q.eventCenter.emit(pt.EDGE_EXCHANGE_NODE,{data:{newEdge:Ai.getData(),oldEdge:_o}})}(I=s.preTargetNode)===null||I===void 0||I.setElementState(cn.DEFAULT)}finally{s.props.graphModel.eventCenter.emit(pt.ADJUST_POINT_DRAGEND,{e:D,data:s.stepDragData})}}),mo(vo(s),"recoveryEdge",function(){var S=s.props.edgeModel,D=s.oldEdge,I=D.startPoint,H=D.endPoint,q=D.pointsList;S.updateStartPoint(I),S.updateEndPoint(H),S.modelType!==Yt.LINE_EDGE&&(S.pointsList=q,S.initPoints())}),mo(vo(s),"getAdjustPointStyle",function(){var S=s.props,D=S.graphModel.theme;return S.edgeModel,D.edgeAdjust}),s.state={dragging:!1,endX:0,endY:0},s.targetRuleResults=new Map,s.sourceRuleResults=new Map;var h=i.type,v=i.edgeModel,x=i.graphModel.eventCenter;return s.stepDragData={type:h,edgeData:v.getData()},s.stepDrag=new no({onDragStart:s.onDragStart,onDragging:s.onDragging,onDragEnd:s.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:x,data:s.stepDragData}),s}return e=u,(n=[{key:"isAllowAdjust",value:function(i){var s=this.props,h=s.edgeModel,v=h.id,x=h.sourceNode,S=h.targetNode,D=h.sourceAnchorId,I=h.targetAnchorId,H=s.type,q=null,ee=null,ve=null,ge=null;if(H===ji.SOURCE?(q=i.node,ee=S,ve=i.anchor,ge=S.getAnchorInfo(I)):(q=x,ee=i.node,ge=i.anchor,ve=x.getAnchorInfo(D)),this.preTargetNode&&this.preTargetNode!==i.node&&this.preTargetNode.setElementState(cn.DEFAULT),this.preTargetNode=i.node,ge.id===ve.id)return{pass:!1,msg:"",newTargetNode:ee};var we="".concat(q.id,"_").concat(ee.id,"_").concat(ve.id,"_").concat(ge.id);if(!this.targetRuleResults.has(we)){var Ce=q.isAllowConnectedAsSource(ee,ve,ge,v),Je=ee.isAllowConnectedAsTarget(q,ve,ge,v);this.sourceRuleResults.set(we,Su(Ce)),this.targetRuleResults.set(we,Su(Je))}var qe=this.sourceRuleResults.get(we),vt=qe.isAllPass,$e=qe.msg,ht=this.targetRuleResults.get(we),tt=ht.isAllPass,Kt=ht.msg,Jt=vt&&tt?cn.ALLOW_CONNECT:cn.NOT_ALLOW_CONNECT;return H===ji.SOURCE?q.setElementState(Jt):ee.setElementState(Jt),{pass:vt&&tt,msg:Kt||$e,newTargetNode:ee}}},{key:"render",value:function(){var i=this.props,s=i.x,h=i.y,v=i.getAdjustPointShape,x=i.edgeModel,S=this.state.dragging;return Object(le.g)("g",{pointerEvents:S?"none":"",onMouseDown:this.handleMouseDown},S?"":v(s,h,x))}}])&&ix(e.prototype,n),u}(le.a);function yg(t){return yg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yg(t)}function qf(){return qf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qf.apply(this,arguments)}function sx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Ob(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Ob(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  84. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ob(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gg(t,e){return gg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},gg(t,e)}function lx(t){var e=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=ud(t);if(e){var u=ud(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return px(this,n)}}function px(t,e){if(e&&(yg(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ii(t)}function ii(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ud(t){return ud=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ud(t)}function Pi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zf=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&gg(i,s)})(u,t);var e,n,r=lx(u);function u(){var i;cx(this,u);for(var s=arguments.length,h=new Array(s),v=0;v<s;v++)h[v]=arguments[v];return Pi(ii(i=r.call.apply(r,[this].concat(h))),"startTime",void 0),Pi(ii(i),"contextMenuTime",void 0),Pi(ii(i),"clickTimer",void 0),Pi(ii(i),"textRef",Object(le.f)()),Pi(ii(i),"handleHover",function(x,S){var D=i.props,I=D.model,H=D.graphModel.eventCenter;I.setHovered(x);var q=x?pt.EDGE_MOUSEENTER:pt.EDGE_MOUSELEAVE,ee=I.getData();H.emit(q,{data:ee,e:S})}),Pi(ii(i),"setHoverON",function(x){i.props.model.isHovered||(i.textRef&&i.textRef.current&&i.textRef.current.setHoverON(),i.handleHover(!0,x))}),Pi(ii(i),"setHoverOFF",function(x){i.props.model.isHovered&&(i.textRef&&i.textRef.current&&i.textRef.current.setHoverOFF(),i.handleHover(!1,x))}),Pi(ii(i),"handleContextMenu",function(x){x.preventDefault(),i.contextMenuTime=new Date().getTime(),i.clickTimer&&clearTimeout(i.clickTimer);var S=i.props,D=S.model,I=S.graphModel,H=I.getPointByClient({x:x.clientX,y:x.clientY});I.setElementStateById(D.id,cn.SHOW_MENU,H.domOverlayPosition),i.toFront(),D.isSelected||I.selectEdgeById(D.id);var q=D==null?void 0:D.getData();I.eventCenter.emit(pt.EDGE_CONTEXTMENU,{data:q,e:x,position:H})}),Pi(ii(i),"handleMouseDown",function(x){x.stopPropagation(),i.startTime=new Date().getTime()}),Pi(ii(i),"handleMouseUp",function(x){if(i.startTime&&!(new Date().getTime()-i.startTime>200||x.button===2)){var S=x.detail===2,D=i.props,I=D.model,H=D.graphModel,q=I==null?void 0:I.getData(),ee=H.getPointByClient({x:x.clientX,y:x.clientY});if(S){var ve=H.editConfigModel,ge=H.textEditElement;if(ge&&ge.id===I.id&&H.setElementStateById(I.id,cn.DEFAULT),ve.edgeTextEdit&&I.text.editable&&H.setElementStateById(I.id,cn.TEXT_EDIT),I.modelType===Yt.POLYLINE_EDGE){var we=I,Ce=H.getPointByClient({x:x.x,y:x.y}).canvasOverlayPosition,Je=Ce.x,qe=Ce.y,vt=ka({x:Je,y:qe},we.points);we.dbClickPosition=vt}H.eventCenter.emit(pt.EDGE_DBCLICK,{data:q,e:x,position:ee})}else H.eventCenter.emit(pt.ELEMENT_CLICK,{data:q,e:x,position:ee}),H.eventCenter.emit(pt.EDGE_CLICK,{data:q,e:x,position:ee});var $e=H.editConfigModel;H.selectEdgeById(I.id,Oa(x,$e)),i.toFront()}}),i}return e=u,(n=[{key:"getShape",value:function(){return Object(le.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var i=this.props,s=i.model,h=i.graphModel;if(s.state===cn.TEXT_EDIT)return null;var v=!1,x=h.editConfigModel;return(s.text.draggable||x.edgeTextDraggable)&&(v=!0),Object(le.g)(tx,{ref:this.textRef,editable:x.edgeTextEdit&&s.text.editable,model:s,graphModel:h,draggable:v})}},{key:"getArrowInfo",value:function(){var i=this.props.model,s=i.startPoint,h=i.endPoint,v=i.isSelected;return{start:s,end:h,hover:this.state.hover,isSelected:v}}},{key:"getLastTwoPoints",value:function(){var i=this.props.model;return[i.startPoint,i.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var i=this.props.model,s=i.id,h=i.getArrowStyle(),v=h.refY,x=v===void 0?0:v,S=h.refX,D=S===void 0?2:S,I=sx(this.getLastTwoPoints(),2),H=I[0],q=I[1],ee="auto";return H!==null&&q!==null&&(ee=wf(Of({x:q.x-H.x,y:q.y-H.y,z:0}))),Object(le.g)("g",null,Object(le.g)("defs",null,Object(le.g)("marker",{id:"marker-start-".concat(s),refX:-D,refY:x,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(le.g)("marker",{id:"marker-end-".concat(s),refX:D,refY:x,overflow:"visible",orient:ee,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var i=this.props.model.getArrowStyle();return i.stroke,i.strokeWidth,i.offset,i.verticalLength,Object(le.g)("path",null)}},{key:"getEndArrow",value:function(){var i=this.props.model.getArrowStyle(),s=i.stroke,h=i.strokeWidth,v=i.offset,x=i.verticalLength;return Object(le.g)("path",{stroke:s,fill:s,strokeWidth:h,transform:"rotate(180)",d:"M 0 0 L ".concat(v," -").concat(x," L ").concat(v," ").concat(x," Z")})}},{key:"getAdjustPointShape",value:function(i,s,h){var v=h.getAdjustPointStyle();return Object(le.g)(Zs,qf({className:"lf-edge-adjust-point"},v,{x:i,y:s}))}},{key:"getAdjustPoints",value:function(){var i=this.props,s=i.model,h=i.graphModel,v=s.getAdjustStart(),x=s.getAdjustEnd();return Object(le.g)("g",null,Object(le.g)(_b,qf({type:"SOURCE"},v,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:s,graphModel:h})),Object(le.g)(_b,qf({type:"TARGET"},x,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:s,graphModel:h})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(le.g)("g",null)}},{key:"getAppend",value:function(){return Object(le.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var i=this.props,s=i.graphModel,h=i.model;s.toFront(h.id)}},{key:"render",value:function(){var i=this.props,s=i.model,h=s.isSelected,v=s.isHitable,x=s.isShowAdjustPoint;return i.graphModel.animation,Object(le.g)("g",null,Object(le.g)("g",{className:["lf-edge",!v&&"pointer-none",h&&"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()),x&&h?this.getAdjustPoints():"")}}])&&fx(e.prototype,n),u}(le.a);function vg(t){return vg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vg(t)}function dx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return wb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return wb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  85. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function wb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Jf=function(t){var e={d:""};return Object.entries(t).forEach(function(n){var r=dx(n,2),u=r[0],i=r[1],s=vg(i);u!=="style"&&s==="object"||(e[u]=i)}),Object(le.g)("path",e)};function mg(t){return mg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mg(t)}function bg(){return bg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bg.apply(this,arguments)}function hx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _g(t,e){return _g=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},_g(t,e)}function gx(t){var e=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=ad(t);if(e){var u=ad(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return vx(this,n)}}function vx(t,e){if(e&&(mg(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function ad(t){return ad=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ad(t)}var Og=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),_g(i,s)})(u,t);var e,n,r=gx(u);function u(){return hx(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getEdge",value:function(){var i=this.props.model,s=i.startPoint,h=i.endPoint,v=i.isAnimation,x=i.arrowConfig,S=i.getEdgeStyle(),D=i.getEdgeAnimationStyle(),I=D.strokeDasharray,H=D.stroke,q=D.strokeDashoffset,ee=D.animationName,ve=D.animationDuration,ge=D.animationIterationCount,we=D.animationTimingFunction,Ce=D.animationDirection;return Object(le.g)($s,bg({},S,{x1:s.x,y1:s.y,x2:h.x,y2:h.y},x,v?{strokeDasharray:I,stroke:H,style:{strokeDashoffset:q,animationName:ee,animationDuration:ve,animationIterationCount:ge,animationTimingFunction:we,animationDirection:Ce}}:{}))}},{key:"getAppendWidth",value:function(){var i=this.props.model,s=i.startPoint,h=i.endPoint,v=vp({start:s,end:h}),x=v.d,S=v.strokeWidth,D=v.fill,I=v.strokeDasharray,H=v.stroke;return Object(le.g)(Jf,{d:x,fill:D,strokeWidth:S,stroke:H,strokeDasharray:I})}}])&&yx(e.prototype,n),u}(Zf);function wg(t){return wg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wg(t)}function mx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return xb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return xb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  86. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var bx=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach(function(n){var r=mx(n,2),u=r[0],i=r[1];(u==="style"||wg(i)!=="object")&&(e[u]=i)}),Object(le.g)("polyline",e)};function xg(t){return xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xg(t)}function Eb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function sd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Eb(Object(n),!0).forEach(function(r){Qi(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Eb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Eg(){return Eg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Eg.apply(this,arguments)}function _x(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Sb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Sb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  87. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ox(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Sg(t,e){return Sg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Sg(t,e)}function wx(t){var e=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=cd(t);if(e){var u=cd(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return xx(this,n)}}function xx(t,e){if(e&&(xg(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ji(t)}function Ji(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cd(t){return cd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},cd(t)}function Qi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Sg(i,s)})(u,t);var e,n,r=wx(u);function u(){var i;return function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")}(this,u),Qi(Ji(i=r.call(this)),"drag",void 0),Qi(Ji(i),"isDragging",void 0),Qi(Ji(i),"isShowAdjustPointTemp",void 0),Qi(Ji(i),"appendInfo",void 0),Qi(Ji(i),"onDragStart",function(){var s=i.props.model;s.dragAppendStart(),i.isShowAdjustPointTemp=s.isShowAdjustPoint,s.isShowAdjustPoint=!1}),Qi(Ji(i),"onDragging",function(s){var h=s.deltaX,v=s.deltaY,x=i.props,S=x.model,D=x.graphModel;i.isDragging=!0;var I=D.transformModel,H=D.editConfigModel,q=_x(I.fixDeltaXY(h,v),2),ee=q[0],ve=q[1],ge=S,we=H.adjustEdgeMiddle;i.appendInfo=we?ge.dragAppendSimple(i.appendInfo,{x:ee,y:ve}):ge.dragAppend(i.appendInfo,{x:ee,y:ve})}),Qi(Ji(i),"onDragEnd",function(){var s=i.props,h=s.model,v=s.graphModel.eventCenter,x=h;x.dragAppendEnd(),i.isDragging=!1,x.isShowAdjustPoint=i.isShowAdjustPointTemp,i.appendInfo=void 0,v.emit(pt.EDGE_ADJUST,{data:x.getData()})}),Qi(Ji(i),"beforeDragStart",function(s,h){h.dragAble&&i.drag.handleMouseDown(s),i.appendInfo=h}),i.drag=new no({onDragStart:i.onDragStart,onDragging:i.onDragging,onDragEnd:i.onDragEnd,isStopPropagation:!1}),i}return e=u,(n=[{key:"getEdge",value:function(){var i=this.props.model,s=i.points,h=i.isAnimation,v=i.arrowConfig,x=i.getEdgeStyle(),S=i.getEdgeAnimationStyle(),D=S.strokeDasharray,I=S.stroke,H=S.strokeDashoffset,q=S.animationName,ee=S.animationDuration,ve=S.animationIterationCount,ge=S.animationTimingFunction,we=S.animationDirection;return Object(le.g)(bx,Eg({points:s},x,v,h?{strokeDasharray:D,stroke:I,style:{strokeDashoffset:H,animationName:q,animationDuration:ee,animationIterationCount:ve,animationTimingFunction:ge,animationDirection:we}}:{}))}},{key:"getArrowInfo",value:function(){var i=this.props.model,s=i.points,h=i.isSelected,v={start:null,end:null,hover:this.state.hover,isSelected:h},x=Jo(s);return x.length>=2&&(v.start=x[x.length-2],v.end=x[x.length-1]),v}},{key:"getLastTwoPoints",value:function(){var i=this.props.model.points,s=Jo(i);return s.length>=2?[s[s.length-2],s[s.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(i){var s,h=i.start,v=i.end;if(h.x===v.x&&h.y===v.y)s="";else{var x={start:h,end:v,offset:10,verticalLength:5},S=Au(sd(sd({},x),{},{type:"start"})),D=Au(sd(sd({},x),{},{type:"end"}));s="M".concat(S.leftX," ").concat(S.leftY,`
  88. L`).concat(S.rightX," ").concat(S.rightY,`
  89. L`).concat(D.rightX," ").concat(D.rightY,`
  90. L`).concat(D.leftX," ").concat(D.leftY," z")}return{d:s,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(i){var s=this.getAppendAttributes(i),h=s.d,v=s.strokeWidth,x=s.fill,S=s.strokeDasharray,D=s.stroke;return Object(le.g)(Jf,{d:h,fill:x,strokeWidth:v,stroke:D,strokeDasharray:S})}},{key:"getAppendWidth",value:function(){for(var i=this,s=this.props,h=s.model,v=s.graphModel,x=h.pointsList,S=h.draggable,D=[],I=x.length,H=function(ee){var ve="lf-polyline-append",ge={start:{x:x[ee].x,y:x[ee].y},end:{x:x[ee+1].x,y:x[ee+1].y},startIndex:ee,endIndex:ee+1,direction:"",dragAble:!0},we=Object(le.g)("g",{className:ve},i.getAppendShape(ge)),Ce=v.editConfigModel,Je=Ce.adjustEdge,qe=Ce.adjustEdgeMiddle;if(Je&&S){var vt=ge.startIndex,$e=ge.endIndex,ht=qe&&(vt===0||$e===I-1);ge.dragAble=!ht,ge.start.x===ge.end.x?(ge.dragAble&&(ve+="-ew-resize"),ge.direction=mn.VERTICAL):ge.start.y===ge.end.y&&(ge.dragAble&&(ve+="-ns-resize"),ge.direction=mn.HORIZONTAL),we=Object(le.g)("g",{className:i.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(tt){return i.beforeDragStart(tt,ge)}},Object(le.g)("g",{className:ve},i.getAppendShape(ge)))}D.push(we)},q=0;q<I-1;q++)H(q);return Object(le.g)("g",null,D)}}])&&Ox(e.prototype,n),u}(Zf);function Pg(t){return Pg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pg(t)}function Ex(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return jb(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return jb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  91. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ag(){return Ag=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ag.apply(this,arguments)}function Sx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Mg(t,e){return Mg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Mg(t,e)}function Px(t){var e=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=fd(t);if(e){var u=fd(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Ax(this,n)}}function Ax(t,e){if(e&&(Pg(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function fd(t){return fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fd(t)}var kg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Mg(i,s)})(u,t);var e,n,r=Px(u);function u(){return Sx(this,u),r.apply(this,arguments)}return e=u,(n=[{key:"getEdge",value:function(){var i=this.props.model,s=i.getEdgeStyle(),h=i.path,v=i.isAnimation,x=i.arrowConfig,S=i.getEdgeAnimationStyle(),D=S.strokeDasharray,I=S.stroke,H=S.strokeDashoffset,q=S.animationName,ee=S.animationDuration,ve=S.animationIterationCount,ge=S.animationTimingFunction,we=S.animationDirection;return Object(le.g)(Jf,Ag({d:h},s,x,v?{strokeDasharray:D,stroke:I,style:{strokeDashoffset:H,animationName:q,animationDuration:ee,animationIterationCount:ve,animationTimingFunction:ge,animationDirection:we}}:{}))}},{key:"getAppendWidth",value:function(){var i=this.props.model.path;return Object(le.g)(Jf,{d:i,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var i=this.props.model,s=this.state.hover,h=i.isSelected,v=i.getArrowStyle().offset,x=i.pointsList.map(function(D){return{x:D.x,y:D.y}}),S=Ex(Cf(x,v),2);return{start:S[0],end:S[1],hover:s,isSelected:h}}},{key:"getLastTwoPoints",value:function(){var i=this.props.model,s=i.getArrowStyle().offset,h=i.pointsList.map(function(v){return{x:v.x,y:v.y}});return Cf(h,s)}}])&&jx(e.prototype,n),u}(Zf);function Tg(t){return Tg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tg(t)}function Pb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Mx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Dg(t,e){return Dg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Dg(t,e)}function Dx(t){var e=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=ld(t);if(e){var u=ld(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Nx(this,n)}}function Nx(t,e){if(e&&(Tg(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function ld(t){return ld=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ld(t)}var Cx=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Dg(i,s)})(u,t);var e,n,r=Dx(u);function u(){return kx(this,u),r.apply(this,arguments)}return e=u,n=[{key:"getArrowAttributes",value:function(){var i=this.props,s=i.arrowInfo,h=i.style,v=s.start,x=s.end,S={start:v,end:x,offset:h.offset,verticalLength:h.verticalLength,type:"end"},D=Au(S),I=D.leftX,H=D.leftY,q=D.rightX,ee=D.rightY;return function(ve){for(var ge=1;ge<arguments.length;ge++){var we=arguments[ge]!=null?arguments[ge]:{};ge%2?Pb(Object(we),!0).forEach(function(Ce){Mx(ve,Ce,we[Ce])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ve,Object.getOwnPropertyDescriptors(we)):Pb(Object(we)).forEach(function(Ce){Object.defineProperty(ve,Ce,Object.getOwnPropertyDescriptor(we,Ce))})}return ve}({d:"M".concat(I," ").concat(H," L").concat(x.x," ").concat(x.y," L").concat(q," ").concat(ee," z")},h)}},{key:"getShape",value:function(){var i=this.getArrowAttributes(),s=i.d,h=i.strokeWidth,v=i.stroke,x=i.fill;return Object(le.g)(Jf,{d:s,fill:x,strokeWidth:h,stroke:v})}},{key:"render",value:function(){return Object(le.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&Tx(e.prototype,n),u}(le.a),Ab=function(t,e){return Ee(t,e)},Rx=function(t){var e=t==null?0:t.length;return e?t[e-1]:void 0},Ng=function(){return lt.a.Date.now()},Ix=Math.max,Lx=Math.min,zx=function(t,e,n){var r,u,i,s,h,v,x=0,S=!1,D=!1,I=!0;if(typeof t!="function")throw new TypeError("Expected a function");function H(Ce){var Je=r,qe=u;return r=u=void 0,x=Ce,s=t.apply(qe,Je)}function q(Ce){return x=Ce,h=setTimeout(ve,e),S?H(Ce):s}function ee(Ce){var Je=Ce-v;return v===void 0||Je>=e||Je<0||D&&Ce-x>=i}function ve(){var Ce=Ng();if(ee(Ce))return ge(Ce);h=setTimeout(ve,function(Je){var qe=e-(Je-v);return D?Lx(qe,i-(Je-x)):qe}(Ce))}function ge(Ce){return h=void 0,I&&r?H(Ce):(r=u=void 0,s)}function we(){var Ce=Ng(),Je=ee(Ce);if(r=arguments,u=this,v=Ce,Je){if(h===void 0)return q(v);if(D)return clearTimeout(h),h=setTimeout(ve,e),H(v)}return h===void 0&&(h=setTimeout(ve,e)),s}return e=js(e)||0,xn(n)&&(S=!!n.leading,i=(D="maxWait"in n)?Ix(js(n.maxWait)||0,e):i,I="trailing"in n?!!n.trailing:I),we.cancel=function(){h!==void 0&&clearTimeout(h),x=0,r=v=u=h=void 0},we.flush=function(){return h===void 0?s:ge(Ng())},we},Bx=o(172);function Fx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Mb,kb,Tb,Ux=function(){function t(r){(function(u,i){if(!(u instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),Bu(this,"undos",[]),Bu(this,"redos",[]),Bu(this,"callbacks",[]),Bu(this,"stopWatch",null),Bu(this,"curData",null),Bu(this,"maxSize",50),Bu(this,"waitTime",100),Bu(this,"eventCenter",void 0),this.eventCenter=r}var e,n;return e=t,(n=[{key:"add",value:function(r){Ab(Rx(this.undos),r)||(this.undos.push(r),Ab(this.curData,r)||(this.redos=[]),this.eventCenter.emit(pt.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 u=this.undos.pop();return this.curData=ln(u),u}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var r=this.redos.pop();return this.curData=ln(r),r}}},{key:"watch",value:function(r){var u=this;this.stopWatch&&this.stopWatch(),this.undos.push(r.modelToGraphData()),this.stopWatch=Object(Bx.a)(r,zx(function(){var i=r.modelToHistoryData();i&&u.add(i)},this.waitTime))}}])&&Fx(e.prototype,n),t}();function Cg(t){return Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cg(t)}function Gx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Db(n,r);var u=Object.prototype.toString.call(n).slice(8,-1);if(u==="Object"&&n.constructor&&(u=n.constructor.name),u==="Map"||u==="Set")return Array.from(n);if(u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u))return Db(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  92. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Db(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Nb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Xa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nb(Object(n),!0).forEach(function(r){Ha(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Cb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rg(t,e){return Rg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Rg(t,e)}function Xx(t){var e=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=pd(t);if(e){var u=pd(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return Hx(this,n)}}function Hx(t,e){if(e&&(Cg(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sc(t)}function sc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pd(t){return pd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pd(t)}function Ha(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rb,Ib,Lb,Ig=ui((Tb=kb=function(t){(function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(h&&h.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),h&&Rg(s,h)})(i,t);var e,n,r,u=Xx(i);function i(){var s;return function(h,v){if(!(h instanceof v))throw new TypeError("Cannot call a class as a function")}(this,i),Ha(sc(s=u.call(this)),"ref",Object(le.f)()),Ha(sc(s),"__prevText",{type:"",text:"",id:""}),Ha(sc(s),"keyupHandler",function(h){var v=s.props.graphModel.textEditElement;h.key==="Enter"&&h.altKey&&v.setElementState(0)}),Ha(sc(s),"inputHandler",function(h){var v=h.target.innerText,x=s.props.graphModel.textEditElement;s.__prevText={type:x.type,text:v.replace(/(\r\n)+$|(\n)+$/,""),id:x.id}}),Ha(sc(s),"keydownHandler",function(h){h.stopPropagation()}),s.state={style:{left:0,top:0}},s}return e=i,r=[{key:"getDerivedStateFromProps",value:function(s){var h,v=s.graphModel,x=v.transformModel,S=v.theme,D=S.inputText,I=v.textEditElement;if(I){var H;if((H=I.text)===null||H===void 0||!H.value)if(I.BaseType===Bn.EDGE){var q=(I=I).text,ee=I.textPosition,ve=ee.x,ge=ee.y;q.x=ve,q.y=ge,I.setText(q)}else I=I;var we={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(I.BaseType===Bn.EDGE){var Ce=S.edgeText,Je=Ce.overflowMode,qe=Ce.lineHeight,vt=Ce.wrapPadding,$e=Ce.textWidth;$e&&Je==="autoWrap"&&(h=Xa(Xa({},we),{},{width:$e,minWidth:$e,lineHeight:qe,padding:vt}))}else if(I.BaseType===Bn.NODE){var ht=S.nodeText,tt=ht.overflowMode,Kt=ht.lineHeight,Jt=ht.wrapPadding,Tt=ht.textWidth,rn=I,Un=rn.width,Gn=rn.modelType,Sr=rn.textWidth||Tt||Un;(Gn!==Yt.TEXT_NODE&&tt==="autoWrap"||Gn===Yt.TEXT_NODE&&Tt)&&(h=Xa(Xa({},we),{},{width:Sr,minWidth:Sr,lineHeight:Kt,padding:Jt}))}var bo=I.text,_o=bo.x,Ai=bo.y,Ya=Gx(x.CanvasPointToHtmlPoint([_o,Ai]),2);return{style:Xa(Xa({left:Ya[0],top:Ya[1]},h),D)}}}}],(n=[{key:"componentDidUpdate",value:function(){var s=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var h=this.__prevText,v=h.text,x=h.id;s.updateText(x,v),s.eventCenter.emit(pt.TEXT_UPDATE,Xa({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(s){if(window.getSelection!==void 0&&document.createRange!==void 0){var h=document.createRange();h.selectNodeContents(s),h.collapse(!1);var v=window.getSelection();v.removeAllRanges(),v.addRange(h)}}},{key:"render",value:function(){var s,h=this.props.graphModel.textEditElement,v=this.state.style;return h?Object(le.g)("div",{contentEditable:!0,className:"lf-text-input",style:v,ref:this.ref,key:h.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(s=h.text)===null||s===void 0?void 0:s.value):null}}])&&Cb(e.prototype,n),r&&Cb(e,r),i}(le.a),Ha(kb,"toolName","textEdit"),Mb=Tb))||Mb,Yx=function(t){return t.modelType===Yt.LINE_EDGE?function(e){var n=e.startPoint,r=e.endPoint,u=(n.x+r.x)/2,i=(n.y+r.y)/2,s=Math.abs(n.x-r.x)+10,h=Math.abs(n.y-r.y)+10;return{x:u-s/2,y:i-h/2,x1:u+s/2,y1:i+h/2}}(t):t.modelType===Yt.POLYLINE_EDGE?function(e){var n=e.points,r=Jo(n),u=Xi(r,8),i=u.x,s=u.y,h=u.width,v=u.height;return{x:i-h/2,y:s-v/2,x1:i+h/2,y1:s+v/2}}(t):t.modelType===Yt.BEZIER_EDGE?function(e){var n=e.path,r=Aa(n),u=Xi(r,8),i=u.x,s=u.y,h=u.width,v=u.height;return{x:i-h/2,y:s-v/2,x1:i+h/2,y1:s+v/2}}(t):void 0};function Lg(t){return Lg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lg(t)}function zb(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var u=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(u!=null){var i,s,h=[],v=!0,x=!1;try{for(u=u.call(n);!(v=(i=u.next()).done)&&(h.push(i.value),!r||h.length!==r);v=!0);}catch(S){x=!0,s=S}finally{try{v||u.return==null||u.return()}finally{if(x)throw s}}return h}}(t,e)||Bb(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  93. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Wx(t){return function(e){if(Array.isArray(e))return zg(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||Bb(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  94. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Bb(t,e){if(t){if(typeof t=="string")return zg(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zg(t,e):void 0}}function zg(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Vx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bg(t,e){return Bg=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bg(t,e)}function Kx(t){var e=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=dd(t);if(e){var u=dd(this).constructor;n=Reflect.construct(r,arguments,u)}else n=r.apply(this,arguments);return $x(this,n)}}function $x(t,e){if(e&&(Lg(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cc(t)}function cc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dd(t){return dd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},dd(t)}function fc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fg=ui((Lb=Ib=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Bg(i,s)})(u,t);var e,n,r=Kx(u);function u(i){var s;(function(S,D){if(!(S instanceof D))throw new TypeError("Cannot call a class as a function")})(this,u),fc(cc(s=r.call(this)),"stepDrag",void 0),fc(cc(s),"handleMouseDown",function(S){s.stepDrag.handleMouseDown(S)}),fc(cc(s),"handleWheelEvent",function(S){var D,I;S.preventDefault();var H=S.deltaX,q=S.deltaY,ee=S.clientX,ve=S.clientY,ge=S.ctrlKey,we=new WheelEvent("wheel",{deltaX:H,deltaY:q,clientX:ee,clientY:ve,ctrlKey:ge});(D=s.props.logicFlow.container)===null||D===void 0||(I=D.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||I===void 0||I.dispatchEvent(we)}),fc(cc(s),"onDragging",function(S){var D=S.deltaX,I=S.deltaY,H=s.props.graphModel,q=H.getSelectElements(!0);H.moveNodes(q.nodes.map(function(ee){return ee.id}),D,I)}),fc(cc(s),"handleContextMenu",function(S){S.preventDefault();var D=s.props,I=D.graphModel,H=D.graphModel,q=H.eventCenter,ee=H.selectElements,ve=I.getPointByClient({x:S.clientX,y:S.clientY}),ge={nodes:[],edges:[]};Wx(ee.values()).forEach(function(we){we.BaseType===Bn.NODE&&ge.nodes.push(we.getData()),we.BaseType===Bn.EDGE&&ge.edges.push(we.getData())}),q.emit(pt.SELECTION_CONTEXTMENU,{data:ge,e:S,position:ve})});var h=i.graphModel,v=h.gridSize,x=h.eventCenter;return s.stepDrag=new no({onDragging:s.onDragging,step:v,eventType:"SELECTION",eventCenter:x}),s}return e=u,(n=[{key:"render",value:function(){var i=this.props.graphModel,s=i.selectElements,h=i.transformModel;if(!(s.size<=1)){var v=Number.MAX_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER;s.forEach(function(ee){var ve={x:0,y:0,x1:0,y1:0};ee.BaseType===Bn.NODE&&(ve=function(ge){var we=ge.x,Ce=ge.y,Je=ge.width,qe=ge.height;return{x:we-Je/2,y:Ce-qe/2,x1:we+Je/2,y1:Ce+qe/2}}(ee)),ee.BaseType===Bn.EDGE&&(ve=Yx(ee)),v=Math.min(v,ve.x),x=Math.min(x,ve.y),S=Math.max(S,ve.x1),D=Math.max(D,ve.y1)});var I=zb(h.CanvasPointToHtmlPoint([v,x]),2);v=I[0],x=I[1];var H=zb(h.CanvasPointToHtmlPoint([S,D]),2);S=H[0],D=H[1];var q={left:"".concat(v-10,"px"),top:"".concat(x-10,"px"),width:"".concat(S-v+20,"px"),height:"".concat(D-x+20,"px")};return Object(le.g)("div",{className:"lf-multiple-select",style:q,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu,onWheel:this.handleWheelEvent})}}}])&&Vx(e.prototype,n),u}(le.a),fc(Ib,"toolName","multipleSelect"),Rb=Lb))||Rb;function qx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zx=function(){function t(r){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),hd(this,"tools",void 0),hd(this,"components",void 0),hd(this,"toolMap",new Map),hd(this,"instance",void 0),this.instance=r,this.isDisabledTool(Ig.toolName)||this.registerTool(Ig.toolName,Ig),this.isDisabledTool(Fg.toolName)||this.registerTool(Fg.toolName,Fg);var u=r.graphModel;u.eventCenter.on("".concat(pt.GRAPH_TRANSFORM,",").concat(pt.NODE_CLICK,",").concat(pt.BLANK_CLICK," "),function(){var i=u.textEditElement,s=u.editConfigModel,h=s.edgeTextEdit,v=s.nodeTextEdit;(h||v)&&i&&u.textEditElement.setElementState(cn.DEFAULT)})}var e,n;return e=t,(n=[{key:"isDisabledTool",value:function(r){return this.instance.options.disabledTools.indexOf(r)!==-1}},{key:"registerTool",value:function(r,u){this.toolMap.set(r,u)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&qx(e.prototype,n),t}(),Jx=o(173),Qx=o.n(Jx);function e1(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ug(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fb=function(){function t(r){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),Ug(this,"mousetrap",void 0),Ug(this,"options",void 0),Ug(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var u=r.lf;this.target=u.container,this.mousetrap=new Qx.a(this.target),r.keyboard.enabled&&!u.options.isSilentMode&&this.enable(!0)}var e,n;return e=t,(n=[{key:"initShortcuts",value:function(){var r=this,u=this.options.keyboard.shortcuts;if(u)if(gn(u))u.forEach(function(v){var x=v.keys,S=v.callback,D=v.action;return r.on(x,S,D)});else{var i=u.keys,s=u.callback,h=u.action;this.on(i,s,h)}}},{key:"on",value:function(r,u,i){this.mousetrap.bind(this.getKeys(r),u,i)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(r,u){this.mousetrap.unbind(this.getKeys(r),u)}},{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 u=this;return(Array.isArray(r)?r:[r]).map(function(i){return u.formatKey(i)})}},{key:"formatKey",value:function(r){return r.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&e1(e.prototype,n),t}(),t1=Fb,eu=null;function Ub(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Gb(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach(function(n){n.x+=e,n.y+=e}),t.text&&(t.text.x+=e,t.text.y+=e),t}var lc=40,Gg=40;function Xg(t){return Xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xg(t)}function Xb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),n.push.apply(n,r)}return n}function Qf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xb(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ln(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Hg=Symbol("plugin register by Logicflow.use"),Yg=function(){function t(u){var i,s,h=this;(function(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")})(this,t),Ln(this,"container",void 0),Ln(this,"width",void 0),Ln(this,"height",void 0),Ln(this,"graphModel",void 0),Ln(this,"history",void 0),Ln(this,"viewMap",new Map),Ln(this,"tool",void 0),Ln(this,"keyboard",void 0),Ln(this,"dnd",void 0),Ln(this,"options",void 0),Ln(this,"snaplineModel",void 0),Ln(this,"components",[]),Ln(this,"plugins",void 0),Ln(this,"extension",{}),Ln(this,"adapterIn",void 0),Ln(this,"adapterOut",void 0),Ln(this,"getView",function(v){return h.viewMap.get(v)}),u=Fv(u),this.options=u,this.container=this.initContainer(u.container),this.plugins=u.plugins,this.graphModel=new aO(Qf({},u)),this.tool=new Zx(this),this.history=new Ux(this.graphModel.eventCenter),this.dnd=new ow({lf:this}),this.keyboard=new t1({lf:this,keyboard:u.keyboard}),u.snapline!==!1&&(this.snaplineModel=new eb(this.graphModel),i=this.graphModel.eventCenter,s=this.snaplineModel,i.on("node:mousemove",function(v){var x=v.data;s.setNodeSnapLine(x)}),i.on("node:mouseup",function(){s.clearSnapline()})),function(v,x){var S=v.keyboard,D=S.options.keyboard;S.on(["cmd + c","ctrl + c"],function(){if(Gg=lc,!D.enabled||x.textEditElement)return!0;var I=v.options.guards,H=x.getSelectElements(!1);return I&&I.beforeClone&&!I.beforeClone(H)||H.nodes.length===0&&H.edges.length===0?(eu=null,!0):((eu=H).nodes.forEach(function(q){return Ub(q,lc)}),eu.edges.forEach(function(q){return Gb(q,lc)}),!1)}),S.on(["cmd + v","ctrl + v"],function(){if(!D.enabled||x.textEditElement)return!0;if(eu&&(eu.nodes||eu.edges)){v.clearSelectElements();var I=v.addElements(eu,Gg);if(!I)return!0;I.nodes.forEach(function(H){return v.selectElementById(H.id,!0)}),I.edges.forEach(function(H){return v.selectElementById(H.id,!0)}),eu.nodes.forEach(function(H){return Ub(H,lc)}),eu.edges.forEach(function(H){return Gb(H,lc)}),Gg+=lc}return!1}),S.on(["cmd + z","ctrl + z"],function(){return!D.enabled||!!x.textEditElement||(v.undo(),!1)}),S.on(["cmd + y","ctrl + y"],function(){return!D.enabled||!!x.textEditElement||(v.redo(),!1)}),S.on(["backspace"],function(){if(!D.enabled||x.textEditElement)return!0;var I=x.getSelectElements(!0);return v.clearSelectElements(),I.edges.forEach(function(H){return v.deleteEdge(H.id)}),I.nodes.forEach(function(H){return v.deleteNode(H.id)}),!1})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(u.disabledPlugins)}var e,n,r;return e=t,n=[{key:"register",value:function(u,i){var s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof u=="string"){var h={BaseEdge:Zf,BaseEdgeModel:df,BaseNode:qi,BaseNodeModel:$i,RectNode:Iy,RectNodeModel:dy,CircleNode:Fy,CircleNodeModel:Kh,PolygonNode:Yy,PolygonNodeModel:cy,TextNode:rg,TextNodeModel:vy,LineEdge:Og,LineEdgeModel:Fs,DiamondNode:$y,DiamondNodeModel:Qh,PolylineEdge:jg,PolylineEdgeModel:to,BezierEdge:kg,BezierEdgeModel:Gh,EllipseNode:eg,EllipseNodeModel:ry,HtmlNode:ag,HtmlNodeModel:_y,h:le.g,type:u};this.viewMap.forEach(function(I){var H=I.extendKey;H&&(h[H]=I)}),this.graphModel.modelMap.forEach(function(I){var H=I.extendKey;H&&(h[H]=I)});var v=i(h),x=v.view,S=v.model,D=x;s&&!D.isObervered&&(D.isObervered=!0,D=ct(D)),this.setView(u,D),this.graphModel.setModel(u,S)}else this.registerElement(u)}},{key:"registerElement",value:function(u){var i=u.view;u.isObserverView===!1||i.isObervered||(i.isObervered=!0,i=ct(i)),this.setView(u.type,i),this.graphModel.setModel(u.type,u.model)}},{key:"batchRegister",value:function(){var u=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.forEach(function(s){u.registerElement(s)})}},{key:"defaultRegister",value:function(){this.registerElement({view:Iy,model:dy,type:"rect"}),this.registerElement({type:"circle",view:Fy,model:Kh}),this.registerElement({type:"polygon",view:Yy,model:cy}),this.registerElement({type:"line",view:Og,model:Fs}),this.registerElement({type:"polyline",view:jg,model:to}),this.registerElement({type:"bezier",view:kg,model:Gh}),this.registerElement({type:"text",view:rg,model:vy}),this.registerElement({type:"ellipse",view:eg,model:ry}),this.registerElement({type:"diamond",view:$y,model:Qh}),this.registerElement({type:"html",view:ag,model:_y})}},{key:"selectElementById",value:function(u){var i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];this.graphModel.selectElementById(u,i),!i&&s&&this.graphModel.toFront(u)}},{key:"focusOn",value:function(u){var i=this.graphModel.transformModel,s=u.coordinate,h=u.id;if(!s){var v=this.getNodeModelById(h);v&&(s=v.getData());var x=this.getEdgeModelById(h);x&&(s=x.textPosition)}var S=s,D=S.x,I=S.y;i.focusOn(D,I,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(u){this.graphModel.setTheme(u)}},{key:"resize",value:function(u,i){this.graphModel.resize(u,i),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(u){this.graphModel.setDefaultEdgeType(u)}},{key:"updateText",value:function(u,i){this.graphModel.updateText(u,i)}},{key:"deleteElement",value:function(u){var i,s,h,v=this.getModelById(u);return!!v&&(s=(h=(Ln(i={},Bn.NODE,this.deleteNode),Ln(i,Bn.EDGE,this.deleteEdge),i)[v.BaseType])===null||h===void 0?void 0:h.call(this,u))!==null&&s!==void 0&&s}},{key:"getModelById",value:function(u){return this.graphModel.getElement(u)}},{key:"getDataById",value:function(u){var i;return(i=this.graphModel.getElement(u))===null||i===void 0?void 0:i.getData()}},{key:"changeNodeType",value:function(u,i){this.graphModel.changeNodeType(u,i)}},{key:"changeEdgeType",value:function(u,i){this.graphModel.changeEdgeType(u,i)}},{key:"getNodeEdges",value:function(u){return this.graphModel.getNodeEdges(u)}},{key:"addNode",value:function(u){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt.NODE_ADD,s=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(u,i,s)}},{key:"deleteNode",value:function(u){var i=this.graphModel.getNodeModelById(u);if(!i)return!1;var s=i.getData(),h=this.options.guards,v=!h||!h.beforeDelete||h.beforeDelete(s);return v&&this.graphModel.deleteNode(u),v}},{key:"cloneNode",value:function(u){var i=this.graphModel.getNodeModelById(u).getData(),s=this.options.guards;if(!s||!s.beforeClone||s.beforeClone(i))return this.graphModel.cloneNode(u)}},{key:"changeNodeId",value:function(u,i){return this.graphModel.changeNodeId(u,i)}},{key:"getNodeModelById",value:function(u){return this.graphModel.getNodeModelById(u)}},{key:"getNodeDataById",value:function(u){var i;return(i=this.graphModel.getNodeModelById(u))===null||i===void 0?void 0:i.getData()}},{key:"addEdge",value:function(u){return this.graphModel.addEdge(u)}},{key:"deleteEdge",value:function(u){var i=this.options.guards,s=this.graphModel.edgesMap[u];if(!s)return!1;var h=s.model.getData(),v=!i||!i.beforeDelete||i.beforeDelete(h);return v&&this.graphModel.deleteEdgeById(u),v}},{key:"deleteEdgeByNodeId",value:function(u){var i=u.sourceNodeId,s=u.targetNodeId;i&&s?this.graphModel.deleteEdgeBySourceAndTarget(i,s):i?this.graphModel.deleteEdgeBySource(i):s&&this.graphModel.deleteEdgeByTarget(s)}},{key:"changeEdgeId",value:function(u,i){return this.graphModel.changeEdgeId(u,i)}},{key:"getEdgeModelById",value:function(u){var i;return(i=this.graphModel.edgesMap[u])===null||i===void 0?void 0:i.model}},{key:"getEdgeModels",value:function(u){var i=this.graphModel.edges,s=u.sourceNodeId,h=u.targetNodeId;if(s&&h){var v=[];return i.forEach(function(D){D.sourceNodeId===s&&D.targetNodeId===h&&v.push(D)}),v}if(s){var x=[];return i.forEach(function(D){D.sourceNodeId===s&&x.push(D)}),x}if(h){var S=[];return i.forEach(function(D){D.targetNodeId===h&&S.push(D)}),S}return[]}},{key:"getEdgeDataById",value:function(u){var i;return(i=this.getEdgeModelById(u))===null||i===void 0?void 0:i.getData()}},{key:"getNodeIncomingEdge",value:function(u){return this.graphModel.getNodeIncomingEdge(u)}},{key:"getNodeOutgoingEdge",value:function(u){return this.graphModel.getNodeOutgoingEdge(u)}},{key:"getNodeIncomingNode",value:function(u){return this.graphModel.getNodeIncomingNode(u)}},{key:"getNodeOutgoingNode",value:function(u){return this.graphModel.getNodeOutgoingNode(u)}},{key:"editText",value:function(u){this.graphModel.editText(u)}},{key:"setProperties",value:function(u,i){var s;(s=this.graphModel.getElement(u))===null||s===void 0||s.setProperties(pr(i))}},{key:"deleteProperty",value:function(u,i){var s;(s=this.graphModel.getElement(u))===null||s===void 0||s.deleteProperty(i)}},{key:"getProperties",value:function(u){var i;return(i=this.graphModel.getElement(u))===null||i===void 0?void 0:i.getProperties()}},{key:"toFront",value:function(u){this.graphModel.toFront(u)}},{key:"setElementZIndex",value:function(u,i){return this.graphModel.setElementZIndex(u,i)}},{key:"addElements",value:function(u){for(var i=this,s=u.nodes,h=u.edges,v={},x={nodes:[],edges:[]},S=0;S<s.length;S++){var D=s[S],I=D.id,H=this.addNode(D);if(!H)return;I&&(v[I]=H.id),x.nodes.push(H)}return h.forEach(function(q){var ee=q.sourceNodeId,ve=q.targetNodeId;v[ee]&&(ee=v[ee]),v[ve]&&(ve=v[ve]);var ge=i.graphModel.addEdge(Qf(Qf({},q),{},{sourceNodeId:ee,targetNodeId:ve}));x.edges.push(ge)}),x}},{key:"getAreaElement",value:function(u,i){var s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],h=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],v=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return this.graphModel.getAreaElement(u,i,s,h,v).map(function(x){return x.getData()})}},{key:"getSelectElements",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.graphModel.getSelectElements(u)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var u=this.graphModel.modelToGraphData();if(this.adapterOut){for(var i=arguments.length,s=new Array(i),h=0;h<i;h++)s[h]=arguments[h];return this.adapterOut.apply(this,[u].concat(s))}return u}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(u){var i=this.graphModel,s=i.editConfigModel,h=i.transformModel;s.updateEditConfig(u),(u==null?void 0:u.stopMoveGraph)!==void 0&&h.updateTranslateLimits(u.stopMoveGraph),u!=null&&u.isSilentMode?this.keyboard.disable():this.keyboard.enable(!0)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(u,i){return this.graphModel.getPointByClient({x:u,y:i})}},{key:"undo",value:function(){if(this.history.undoAble()){var u=pr(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(u)}}},{key:"redo",value:function(){if(this.history.redoAble()){var u=pr(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(u)}}},{key:"zoom",value:function(u,i){return this.graphModel.transformModel.zoom(u,i)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(u){this.graphModel.transformModel.setZoomMiniSize(u)}},{key:"setZoomMaxSize",value:function(u){this.graphModel.transformModel.setZoomMaxSize(u)}},{key:"getTransform",value:function(){var u=this.graphModel.transformModel;return{SCALE_X:u.SCALE_X,SCALE_Y:u.SCALE_Y,TRANSLATE_X:u.TRANSLATE_X,TRANSLATE_Y:u.TRANSLATE_Y}}},{key:"translate",value:function(u,i){this.graphModel.transformModel.translate(u,i)}},{key:"resetTranslate",value:function(){var u=this.graphModel.transformModel,i=u.TRANSLATE_X,s=u.TRANSLATE_Y;this.translate(-i,-s)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(u,i){i===void 0&&(i=u),this.graphModel.fitView(u,i)}},{key:"openEdgeAnimation",value:function(u){this.graphModel.openEdgeAnimation(u)}},{key:"closeEdgeAnimation",value:function(u){this.graphModel.closeEdgeAnimation(u)}},{key:"on",value:function(u,i){this.graphModel.eventCenter.on(u,i)}},{key:"off",value:function(u,i){this.graphModel.eventCenter.off(u,i)}},{key:"once",value:function(u,i){this.graphModel.eventCenter.once(u,i)}},{key:"emit",value:function(u,i){this.graphModel.eventCenter.emit(u,i)}},{key:"initContainer",value:function(u){var i=document.createElement("div");return i.style.position="relative",i.style.width="100%",i.style.height="100%",u.innerHTML="",u.appendChild(i),i}},{key:"installPlugins",value:function(){var u,i=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=(u=this.plugins)!==null&&u!==void 0?u:t.extensions;h.forEach(function(v){var x=null,S=null;v[Hg]?(x=v.extension,S=v.props):x=v;var D=x.pluginName||x.name;s.indexOf(D)===-1&&i.installPlugin(x,S)})}},{key:"installPlugin",value:function(u,i){if(Xg(u)==="object"){var s=u.install,h=u.render;return s&&s.call(u,this,t),h&&this.components.push(h.bind(u)),void(this.extension[u.pluginName]=u)}var v=u,x=new v({lf:this,LogicFlow:t,options:this.options.pluginsOptions,props:i});x.render&&this.components.push(x.render.bind(x)),this.extension[v.pluginName]=x}},{key:"updateAttributes",value:function(u,i){this.graphModel.updateAttributes(u,i)}},{key:"createFakerNode",value:function(u){var i=this.graphModel.modelMap.get(u.type);if(i){var s=new i(Qf(Qf({},u),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(s),s}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(u){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(u)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(u,i){this.viewMap.set(u,i)}},{key:"renderRawData",value:function(u){this.graphModel.graphDataToModel(pr(u)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(le.j)(Object(le.g)(nw,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(pt.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(u=this.adapterIn(u)),this.renderRawData(u)}}],r=[{key:"use",value:function(u,i){var s,h,v=u.pluginName;v||(v=u.name);var x=(s=this.extensions.get(v))===null||s===void 0?void 0:s.extension;x&&x.destroy&&x.destroy(),this.extensions.set(v,(Ln(h={},Hg,Hg),Ln(h,"extension",u),Ln(h,"props",i),h))}}],n&&Hb(e.prototype,n),r&&Hb(e,r),t}();function ui(t){return ct(t)}Ln(Yg,"extensions",new Map),l.default=Yg}])})})($g,$g.exports);var ot=$g.exports;const pc=P1(ot);var I1=function(){function m(){globalThis._ids=this,this._ids=new Set}return m.prototype.generateId=function(){var y="xxxxxxx".replace(/[x]/g,function(c){var l=Math.random()*16|0,o=c==="x"?l:l&3|8;return o.toString(16)});return y},m.prototype.next=function(){for(var y=this.generateId();this._ids.has(y);)y=this.generateId();return this._ids.add(y),y},m}(),L1=(globalThis==null?void 0:globalThis._ids)||new I1;function bc(){return L1.next()}var N_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),z1=function(m){N_(y,m);function y(c,l){var o=this;return c.id||(c.id="Event_"+bc()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),o=m.call(this,c,l)||this,o}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedTargetRules=function(){var c=m.prototype.getConnectedTargetRules.call(this),l={message:"起始节点不能作为边的终点",validate:function(){return!1}};return c.push(l),c},y.extendKey="StartEventModel",y}(ot.CircleNodeModel),B1=function(m){N_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.extendKey="StartEventNode",y}(ot.CircleNode),F1={type:"bpmn:startEvent",view:B1,model:z1},C_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),jd=function(){return jd=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},jd.apply(this,arguments)},U1=function(m){C_(y,m);function y(c,l){var o=this;return c.id||(c.id="Event_"+bc()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),o=m.call(this,c,l)||this,o}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedSourceRules=function(){var c=m.prototype.getConnectedSourceRules.call(this),l={message:"结束节点不能作为边的起点",validate:function(){return!1}};return c.push(l),c},y.extendKey="EndEventModel",y}(ot.CircleNodeModel),G1=function(m){C_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},y.prototype.getShape=function(){var c=this.props.model,l=c.getNodeStyle(),o=c.x,p=c.y,d=c.r,O=m.prototype.getShape.call(this);return ot.h("g",{},O,ot.h("circle",jd(jd({},l),{cx:o,cy:p,r:d-5})))},y.extendKey="EndEventView",y}(ot.CircleNode),X1={type:"bpmn:endEvent",view:G1,model:U1},R_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),ol=function(){return ol=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},ol.apply(this,arguments)},H1=function(m){R_(y,m);function y(c,l){var o=this;return c.id||(c.id="Gateway_"+bc()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),o=m.call(this,c,l)||this,o.points=[[25,0],[50,25],[25,50],[0,25]],o}return y.extendKey="ExclusiveGatewayModel",y}(ot.PolygonNodeModel),Y1=function(m){R_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getShape=function(){var c=this.props.model,l=c.x,o=c.y,p=c.width,d=c.height,O=c.points,g=c.getNodeStyle();return ot.h("g",{transform:"matrix(1 0 0 1 "+(l-p/2)+" "+(o-d/2)+")"},ot.h("polygon",ol(ol({},g),{x:l,y:o,points:O})),ot.h("path",ol({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"},g)))},y.extendKey="ExclusiveGatewayNode",y}(ot.PolygonNode),W1={type:"bpmn:exclusiveGateway",view:Y1,model:H1},I_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),Pd=function(){return Pd=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},Pd.apply(this,arguments)},V1=function(m){I_(y,m);function y(c,l){var o=this;return c.id||(c.id="Activity_"+bc()),o=m.call(this,c,l)||this,o}return y.extendKey="UserTaskModel",y}(ot.RectNodeModel),K1=function(m){I_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var c=this.props.model,l=c.x,o=c.y,p=c.width,d=c.height,O=c.getNodeStyle();return ot.h("svg",{x:l-p/2+5,y:o-d/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},ot.h("path",{fill:O.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},y.prototype.getShape=function(){var c=this.props.model,l=c.x,o=c.y,p=c.width,d=c.height,O=c.radius,g=c.getNodeStyle();return ot.h("g",{},[ot.h("rect",Pd(Pd({},g),{x:l-p/2,y:o-d/2,rx:O,ry:O,width:p,height:d})),this.getLabelShape()])},y.extendKey="UserTaskNode",y}(ot.RectNode),$1={type:"bpmn:userTask",view:K1,model:V1},L_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),qg=function(){return qg=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},qg.apply(this,arguments)},q1=function(m){L_(y,m);function y(c,l){var o=this;return c.id||(c.id="Activity_"+bc()),o=m.call(this,c,l)||this,o}return y.extendKey="ServiceTaskModel",y}(ot.RectNodeModel),Z1=function(m){L_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var c=this.props.model,l=c.x,o=c.y,p=c.width,d=c.height,O=c.getNodeStyle();return ot.h("svg",{x:l-p/2+5,y:o-d/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},ot.h("path",{fill:O.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},y.prototype.getShape=function(){var c=this.props.model,l=c.x,o=c.y,p=c.width,d=c.height,O=c.radius,g=c.getNodeStyle();return ot.h("g",{},[ot.h("rect",qg({x:l-p/2,y:o-d/2,rx:O,ry:O,width:p,height:d},g)),this.getLabelShape()])},y.extendKey="ServiceTaskNode",y}(ot.RectNode),J1={type:"bpmn:serviceTask",view:Z1,model:q1},z_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),Q1=function(m){z_(y,m);function y(c,l){var o=this;return c.id||(c.id="Flow_"+bc()),o=m.call(this,c,l)||this,o}return y.extendKey="SequenceFlowModel",y}(ot.PolylineEdgeModel),eE=function(m){z_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.extendKey="SequenceFlowEdge",y}(ot.PolylineEdge),tE={type:"bpmn:sequenceFlow",view:eE,model:Q1},Jb={width:40,height:40},Qb={width:40,height:40},e_={width:40,height:40},t_={width:100,height:80},n_={width:100,height:80},nE={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}}},rE=function(){function m(y){var c=y.lf;c.setTheme(nE),c.register(F1),c.register(X1),c.register(W1),c.register($1),c.register(J1),c.options.customBpmnEdge||(c.register(tE),c.setDefaultEdgeType("bpmn:sequenceFlow"))}return m.pluginName="bpmnElement",m}(),oE=function(){function m(){globalThis._ids=this,this._ids=new Set}return m.prototype.generateId=function(){var y="xxxxxxx".replace(/[x]/g,function(c){var l=Math.random()*16|0,o=c==="x"?l:l&3|8;return o.toString(16)});return y},m.prototype.next=function(){for(var y=this.generateId();this._ids.has(y);)y=this.generateId();return this._ids.add(y),y},m}(),iE=(globalThis==null?void 0:globalThis._ids)||new oE;function r_(){return iE.next()}function B_(m){return Object.prototype.toString.call(m)}function uE(m){return" ".repeat(m)}function Ad(m){var y=m;return B_(m)==="[object Object]"?(y={},Object.keys(m).forEach(function(c){var l=c;c.charAt(0)==="-"&&(l=c.substring(1)),y[l]=Ad(m[c])})):Array.isArray(m)&&(y=[],m.forEach(function(c,l){y[l]=Ad(c)})),y}function aE(m){var y=m;try{typeof y!="string"&&(y=JSON.parse(m))}catch(c){y=JSON.stringify(Ad(m)).replace(/"/g,"'")}return y}var dc=`
  95. `;function wd(m,y,c){var l=uE(c),o="";if(y==="#text")return dc+l+m;if(y==="#cdata-section")return dc+l+"<![CDATA["+m+"]]>";if(y==="#comment")return dc+l+"<!--"+m+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+aE(m)+'"';if(Array.isArray(m))m.forEach(function(g){o+=wd(g,y,c+1)});else if(B_(m)==="[object Object]"){var p=Object.keys(m),d="",O="";o+=(c===0?"":dc+l)+"<"+y,p.forEach(function(g){g.charAt(0)==="-"?d+=wd(m[g],g,c+1):O+=wd(m[g],g,c+1)}),o+=d+(O!==""?">"+O+(dc+l)+"</"+y+">":" />")}else o+=dc+l+("<"+y+">"+m.toString()+"</"+y+">");return o}function sE(m){var y="";for(var c in m)y+=wd(m[c],c,0);return y}var Vr=function(){};Vr.ObjTree=function(){return this};Vr.ObjTree.VERSION="0.23";Vr.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
  96. `;Vr.ObjTree.prototype.attr_prefix="-";Vr.ObjTree.prototype.parseXML=function(m){var y;if(window.DOMParser){var c=new DOMParser,l=c.parseFromString(m,"application/xml");if(!l)return;y=l.documentElement}else window.ActiveXObject&&(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(m),y=c.documentElement);if(y)return this.parseDOM(y)};Vr.ObjTree.prototype.parseHTTP=function(m,y,c){var l={};for(var o in y)l[o]=y[o];if(l.method||(typeof l.postBody=="undefined"&&typeof l.postbody=="undefined"&&typeof l.parameters=="undefined"?l.method="get":l.method="post"),c){l.asynchronous=!0;var p=this,d=c,O=l.onComplete;l.onComplete=function(M){var A;M&&M.responseXML&&M.responseXML.documentElement&&(A=p.parseDOM(M.responseXML.documentElement)),d(A,M),O&&O(M)}}else l.asynchronous=!1;var g;if(typeof HTTP!="undefined"&&HTTP.Request){l.uri=m;var E=new HTTP.Request(l);E&&(g=E.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var E=new Ajax.Request(m,l);E&&(g=E.transport)}if(c)return g;if(g&&g.responseXML&&g.responseXML.documentElement)return this.parseDOM(g.responseXML.documentElement)};Vr.ObjTree.prototype.parseDOM=function(m){if(m){if(this.__force_array={},this.force_array)for(var y=0;y<this.force_array.length;y++)this.__force_array[this.force_array[y]]=1;var c=this.parseElement(m);if(this.__force_array[m.nodeName]&&(c=[c]),m.nodeType!=11){var l={};l[m.nodeName]=c,c=l}return c}};Vr.ObjTree.prototype.parseElement=function(m){if(m.nodeType!=7){if(m.nodeType==3||m.nodeType==4||m.nodeType==8){var y=m.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:m.nodeValue}var c=null,l={};if(m.attributes&&m.attributes.length){c={};for(var o=0;o<m.attributes.length;o++){var p=m.attributes[o].nodeName;if(typeof p=="string"){var d=m.attributes[o].nodeValue;try{d=JSON.parse(m.attributes[o].nodeValue.replace(/'/g,'"'))}catch(E){d=m.attributes[o].nodeValue}d&&(p=this.attr_prefix+p,typeof l[p]=="undefined"&&(l[p]=0),l[p]++,this.addNode(c,p,l[p],d))}}}if(m.childNodes&&m.childNodes.length){var O=!0;c&&(O=!1);for(var o=0;o<m.childNodes.length&&O;o++){var g=m.childNodes[o].nodeType;g==3||g==4||g==8||(O=!1)}if(O){c||(c="");for(var o=0;o<m.childNodes.length;o++)c+=m.childNodes[o].nodeValue}else{c||(c={});for(var o=0;o<m.childNodes.length;o++){var p=m.childNodes[o].nodeName;if(typeof p=="string"){var d=this.parseElement(m.childNodes[o]);d&&(typeof l[p]=="undefined"&&(l[p]=0),l[p]++,this.addNode(c,p,l[p],d))}}}}else c===null&&(c={});return c}};Vr.ObjTree.prototype.addNode=function(m,y,c,l){this.__force_array[y]?(c==1&&(m[y]=[]),m[y][m[y].length]=l):c==1?m[y]=l:c==2?m[y]=[m[y],l]:m[y][m[y].length]=l};Vr.ObjTree.prototype.writeXML=function(m){var y=this.hash_to_xml(null,m);return this.xmlDecl+y};Vr.ObjTree.prototype.hash_to_xml=function(m,y){var c=[],l=[];for(var o in y)if(y.hasOwnProperty(o)){var p=y[o];o.charAt(0)!=this.attr_prefix?typeof p=="undefined"||p==null?c[c.length]="<"+o+" />":typeof p=="object"&&p.constructor==Array?c[c.length]=this.array_to_xml(o,p):typeof p=="object"?c[c.length]=this.hash_to_xml(o,p):c[c.length]=this.scalar_to_xml(o,p):l[l.length]=" "+o.substring(1)+'="'+this.xml_escape(p)+'"'}var d=l.join(""),O=c.join("");return typeof m=="undefined"||m==null||(c.length>0?O.match(/\n/)?O="<"+m+d+`>
  97. `+O+"</"+m+`>
  98. `:O="<"+m+d+">"+O+"</"+m+`>
  99. `:O="<"+m+d+` />
  100. `),O};Vr.ObjTree.prototype.array_to_xml=function(m,y){for(var c=[],l=0;l<y.length;l++){var o=y[l];typeof o=="undefined"||o==null?c[c.length]="<"+m+" />":typeof o=="object"&&o.constructor==Array?c[c.length]=this.array_to_xml(m,o):typeof o=="object"?c[c.length]=this.hash_to_xml(m,o):c[c.length]=this.scalar_to_xml(m,o)}return c.join("")};Vr.ObjTree.prototype.scalar_to_xml=function(m,y){return m=="#text"?this.xml_escape(y):"<"+m+">"+this.xml_escape(y)+"</"+m+`>
  101. `};Vr.ObjTree.prototype.xml_escape=function(m){return m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var cE=function(m){return new Vr.ObjTree().parseXML(m)},fE=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),Zg=function(){return Zg=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},Zg.apply(this,arguments)},Ld=function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var l=c.call(m),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=l.return)&&c.call(l)}finally{if(d)throw d.error}}return p},Mi;(function(m){m.START="bpmn:startEvent",m.END="bpmn:endEvent",m.GATEWAY="bpmn:exclusiveGateway",m.USER="bpmn:userTask",m.SYSTEM="bpmn:serviceTask",m.FLOW="bpmn:sequenceFlow"})(Mi||(Mi={}));var F_=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],o_=["properties","startPoint","endPoint","pointsList"];function i_(m){var y=m?o_.concat(m):o_;return function(c){function l(o){var p={};return typeof o=="string"?o:Array.isArray(o)?o.map(function(d){return l(d)}):(Object.entries(o).forEach(function(d){var O=Ld(d,2),g=O[0],E=O[1];typeof E!="object"?g.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(g)?p[g]=E:p["-"+g]=E:y.includes(g)?p["-"+g]=l(E):p[g]=l(E)}),p)}return l(c)}}function Md(m){var y={};return Object.entries(m).forEach(function(c){var l=Ld(c,2),o=l[0],p=l[1];o.indexOf("-")===0?y[o.substring(1)]=Ad(p):typeof p=="string"?y[o]=p:Object.prototype.toString.call(p)==="[object Object]"?y[o]=Md(p):Array.isArray(p)?y[o]=p.map(function(d){return Md(d)}):y[o]=p}),y}function lE(m,y,c){var l=new Map;y.nodes.forEach(function(p){var d,O={"-id":p.id};if(!((d=p.text)===null||d===void 0)&&d.value&&(O["-name"]=p.text.value),p.properties){var g=i_(c)(p.properties);Object.assign(O,g)}l.set(p.id,O),m[p.type]?Array.isArray(m[p.type])?m[p.type].push(O):m[p.type]=[m[p.type],O]:m[p.type]=O});var o=y.edges.map(function(p){var d,O,g=l.get(p.targetNodeId);g["bpmn:incoming"]?Array.isArray(g["bpmn:incoming"])?g["bpmn:incoming"].push(p.id):g["bpmn:incoming"]=[g["bpmn:incoming"],p.id]:g["bpmn:incoming"]=p.id;var E={"-id":p.id,"-sourceRef":p.sourceNodeId,"-targetRef":p.targetNodeId};if(!((d=p.text)===null||d===void 0)&&d.value&&(E["-name"]=(O=p.text)===null||O===void 0?void 0:O.value),p.properties){var M=i_(c)(p.properties);Object.assign(E,M)}return E});y.edges.forEach(function(p){var d=l.get(p.sourceNodeId);d["bpmn:outgoing"]?Array.isArray(d["bpmn:outgoing"])?d["bpmn:outgoing"].push(p.id):d["bpmn:outgoing"]=[d["bpmn:outgoing"],p.id]:d["bpmn:outgoing"]=p.id}),m[Mi.FLOW]=o}function pE(m,y){m["bpmndi:BPMNEdge"]=y.edges.map(function(c){var l,o=c.id,p=c.pointsList.map(function(O){var g=O.x,E=O.y;return{"-x":g,"-y":E}}),d={"-id":o+"_di","-bpmnElement":o,"di:waypoint":p};return!((l=c.text)===null||l===void 0)&&l.value&&(d["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),d}),m["bpmndi:BPMNShape"]=y.nodes.map(function(c){var l,o=c.id,p=100,d=80,O=c.x,g=c.y,E=Hu.shapeConfigMap.get(c.type);E&&(p=E.width,d=E.height),O-=p/2,g-=d/2;var M={"-id":o+"_di","-bpmnElement":o,"dc:Bounds":{"-x":O,"-y":g,"-width":p,"-height":d}};return!((l=c.text)===null||l===void 0)&&l.value&&(M["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),M})}function dE(m){var y=[],c=[],l=m["bpmn:definitions"];if(l){var o=l["bpmn:process"];Object.keys(o).forEach(function(p){if(p.indexOf("bpmn:")===0){var d=o[p];if(p===Mi.FLOW){var O=l["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];c=yE(d,O)}else{var g=l["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];y=y.concat(hE(d,g,p))}}})}return{nodes:y,edges:c}}function hE(m,y,c){var l=[];if(Array.isArray(m))m.forEach(function(d){var O;Array.isArray(y)?O=y.find(function(E){return E["-bpmnElement"]===d["-id"]}):O=y;var g=u_(O,c,d);l.push(g)});else{var o=void 0;Array.isArray(y)?o=y.find(function(d){return d["-bpmnElement"]===m["-id"]}):o=y;var p=u_(o,c,m);l.push(p)}return l}function u_(m,y,c){var l=Number(m["dc:Bounds"]["-x"]),o=Number(m["dc:Bounds"]["-y"]),p=c["-name"],d=Hu.shapeConfigMap.get(y);d&&(l+=d.width/2,o+=d.height/2);var O;Object.entries(c).forEach(function(A){var T=Ld(A,2),k=T[0],R=T[1];F_.indexOf(k)===-1&&(O||(O={}),O[k]=R)}),O&&(O=Md(O));var g;if(p&&(g={x:l,y:o,value:p},m["bpmndi:BPMNLabel"]&&m["bpmndi:BPMNLabel"]["dc:Bounds"])){var E=m["bpmndi:BPMNLabel"]["dc:Bounds"];g.x=Number(E["-x"])+Number(E["-width"])/2,g.y=Number(E["-y"])+Number(E["-height"])/2}var M={id:m["-bpmnElement"],type:y,x:l,y:o,properties:O};return g&&(M.text=g),M}function yE(m,y){var c=[];if(Array.isArray(m))m.forEach(function(o){var p;Array.isArray(y)?p=y.find(function(d){return d["-bpmnElement"]===o["-id"]}):p=y,c.push(a_(p,o))});else{var l=void 0;Array.isArray(y)?l=y.find(function(o){return o["-bpmnElement"]===m["-id"]}):l=y,c.push(a_(l,m))}return c}function a_(m,y){var c,l=y["-name"];if(l){var o=m["bpmndi:BPMNLabel"]["dc:Bounds"],p=0;l.split(`
  102. `).forEach(function(g){p<g.length&&(p=g.length)}),c={value:l,x:Number(o["-x"])+p*10/2,y:Number(o["-y"])+7}}var d;Object.entries(y).forEach(function(g){var E=Ld(g,2),M=E[0],A=E[1];F_.indexOf(M)===-1&&(d||(d={}),d[M]=A)}),d&&(d=Md(d));var O={id:y["-id"],type:Mi.FLOW,pointsList:m["di:waypoint"].map(function(g){return{x:Number(g["-x"]),y:Number(g["-y"])}}),sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:d};return c&&(O.text=c),O}var Hu=function(){function m(y){var c=this,l=y.lf;this.adapterOut=function(o,p){var d=Zg({},c.processAttributes);lE(d,o,p);var O={"-id":"BPMNPlane_1","-bpmnElement":d["-id"]};pE(O,o);var g=c.definitionAttributes;g["bpmn:process"]=d,g["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":O};var E={"bpmn:definitions":g};return E},this.adapterIn=function(o){if(o)return dE(o)},l.adapterIn=function(o){return c.adapterIn(o)},l.adapterOut=function(o,p){return c.adapterOut(o,p)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+r_()},this.definitionAttributes={"-id":"Definitions_"+r_(),"-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 m.prototype.setCustomShape=function(y,c){m.shapeConfigMap.set(y,c)},m.pluginName="bpmn-adapter",m.shapeConfigMap=new Map,m}();Hu.shapeConfigMap.set(Mi.START,{width:Jb.width,height:Jb.height});Hu.shapeConfigMap.set(Mi.END,{width:Qb.width,height:Qb.height});Hu.shapeConfigMap.set(Mi.GATEWAY,{width:e_.width,height:e_.height});Hu.shapeConfigMap.set(Mi.SYSTEM,{width:t_.width,height:t_.height});Hu.shapeConfigMap.set(Mi.USER,{width:n_.width,height:n_.height});(function(m){fE(y,m);function y(c){var l=m.call(this,c)||this;l.adapterXmlIn=function(p){var d=cE(p);return l.adapterIn(d)},l.adapterXmlOut=function(p,d){var O=l.adapterOut(p,d);return sE(O)};var o=c.lf;return o.adapterIn=l.adapterXmlIn,o.adapterOut=l.adapterXmlOut,l}return y.pluginName="bpmnXmlAdapter",y})(Hu);var gE=function(){function m(){globalThis._ids=this,this._ids=new Set}return m.prototype.generateId=function(){var y="xxxxxxx".replace(/[x]/g,function(c){var l=Math.random()*16|0,o=c==="x"?l:l&3|8;return o.toString(16)});return y},m.prototype.next=function(){for(var y=this.generateId();this._ids.has(y);)y=this.generateId();return this._ids.add(y),y},m}(),vE=(globalThis==null?void 0:globalThis._ids)||new gE;function mE(){return vE.next()}ot.h("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),ot.h("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(180,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(210,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(240,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(270,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(300,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(330,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"});ot.h("circle",{cx:18,cy:18,r:10,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 4px; fill: rgb(34, 36, 42);"});ot.h("circle",{cx:25,cy:25,r:13,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2.5px; fill: white;"});var av,$n,U_,Va,s_,G_,Jg,X_,sv,Qg,ev,tv={},H_=[],bE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cv=Array.isArray;function Xu(m,y){for(var c in y)m[c]=y[c];return m}function fv(m){m&&m.parentNode&&m.parentNode.removeChild(m)}function il(m,y,c){var l,o,p,d={};for(p in y)p=="key"?l=y[p]:p=="ref"?o=y[p]:d[p]=y[p];if(arguments.length>2&&(d.children=arguments.length>3?av.call(arguments,2):c),typeof m=="function"&&m.defaultProps!=null)for(p in m.defaultProps)d[p]===void 0&&(d[p]=m.defaultProps[p]);return xd(m,d,l,o,null)}function xd(m,y,c,l,o){var p={type:m,props:y,key:c,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o==null?++U_:o,__i:-1,__u:0};return o==null&&$n.vnode!=null&&$n.vnode(p),p}function lv(m){return m.children}function gc(m,y){this.props=m,this.context=y}function mc(m,y){if(y==null)return m.__?mc(m.__,m.__i+1):null;for(var c;y<m.__k.length;y++)if((c=m.__k[y])!=null&&c.__e!=null)return c.__e;return typeof m.type=="function"?mc(m):null}function Y_(m){var y,c;if((m=m.__)!=null&&m.__c!=null){for(m.__e=m.__c.base=null,y=0;y<m.__k.length;y++)if((c=m.__k[y])!=null&&c.__e!=null){m.__e=m.__c.base=c.__e;break}return Y_(m)}}function c_(m){(!m.__d&&(m.__d=!0)&&Va.push(m)&&!kd.__r++||s_!==$n.debounceRendering)&&((s_=$n.debounceRendering)||G_)(kd)}function kd(){var m,y,c,l,o,p,d,O;for(Va.sort(Jg);m=Va.shift();)m.__d&&(y=Va.length,l=void 0,p=(o=(c=m).__v).__e,d=[],O=[],c.__P&&((l=Xu({},o)).__v=o.__v+1,$n.vnode&&$n.vnode(l),K_(c.__P,l,o,c.__n,c.__P.namespaceURI,32&o.__u?[p]:null,d,p==null?mc(o):p,!!(32&o.__u),O),l.__v=o.__v,l.__.__k[l.__i]=l,wE(d,l,O),l.__e!=p&&Y_(l)),Va.length>y&&Va.sort(Jg));kd.__r=0}function W_(m,y,c,l,o,p,d,O,g,E,M){var A,T,k,R,C,F,W=l&&l.__k||H_,V=y.length;for(g=_E(c,y,W,g,V),A=0;A<V;A++)(k=c.__k[A])!=null&&(T=k.__i===-1?tv:W[k.__i]||tv,k.__i=A,F=K_(m,k,T,o,p,d,O,g,E,M),R=k.__e,k.ref&&T.ref!=k.ref&&(T.ref&&pv(T.ref,null,k),M.push(k.ref,k.__c||R,k)),C==null&&R!=null&&(C=R),4&k.__u||T.__k===k.__k?g=V_(k,g,m):typeof k.type=="function"&&F!==void 0?g=F:R&&(g=R.nextSibling),k.__u&=-7);return c.__e=C,g}function _E(m,y,c,l,o){var p,d,O,g,E,M=c.length,A=M,T=0;for(m.__k=new Array(o),p=0;p<o;p++)(d=y[p])!=null&&typeof d!="boolean"&&typeof d!="function"?(g=p+T,(d=m.__k[p]=typeof d=="string"||typeof d=="number"||typeof d=="bigint"||d.constructor==String?xd(null,d,null,null,null):cv(d)?xd(lv,{children:d},null,null,null):d.constructor===void 0&&d.__b>0?xd(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d).__=m,d.__b=m.__b+1,O=null,(E=d.__i=OE(d,c,g,A))!==-1&&(A--,(O=c[E])&&(O.__u|=2)),O==null||O.__v===null?(E==-1&&T--,typeof d.type!="function"&&(d.__u|=4)):E!=g&&(E==g-1?T--:E==g+1?T++:(E>g?T--:T++,d.__u|=4))):m.__k[p]=null;if(A)for(p=0;p<M;p++)(O=c[p])!=null&&!(2&O.__u)&&(O.__e==l&&(l=mc(O)),$_(O,O));return l}function V_(m,y,c){var l,o;if(typeof m.type=="function"){for(l=m.__k,o=0;l&&o<l.length;o++)l[o]&&(l[o].__=m,y=V_(l[o],y,c));return y}m.__e!=y&&(y&&m.type&&!c.contains(y)&&(y=mc(m)),c.insertBefore(m.__e,y||null),y=m.__e);do y=y&&y.nextSibling;while(y!=null&&y.nodeType==8);return y}function OE(m,y,c,l){var o,p,d=m.key,O=m.type,g=y[c];if(g===null||g&&d==g.key&&O===g.type&&!(2&g.__u))return c;if(l>(g!=null&&!(2&g.__u)?1:0))for(o=c-1,p=c+1;o>=0||p<y.length;){if(o>=0){if((g=y[o])&&!(2&g.__u)&&d==g.key&&O===g.type)return o;o--}if(p<y.length){if((g=y[p])&&!(2&g.__u)&&d==g.key&&O===g.type)return p;p++}}return-1}function f_(m,y,c){y[0]=="-"?m.setProperty(y,c==null?"":c):m[y]=c==null?"":typeof c!="number"||bE.test(y)?c:c+"px"}function bd(m,y,c,l,o){var p;e:if(y=="style")if(typeof c=="string")m.style.cssText=c;else{if(typeof l=="string"&&(m.style.cssText=l=""),l)for(y in l)c&&y in c||f_(m.style,y,"");if(c)for(y in c)l&&c[y]===l[y]||f_(m.style,y,c[y])}else if(y[0]=="o"&&y[1]=="n")p=y!=(y=y.replace(X_,"$1")),y=y.toLowerCase()in m||y=="onFocusOut"||y=="onFocusIn"?y.toLowerCase().slice(2):y.slice(2),m.l||(m.l={}),m.l[y+p]=c,c?l?c.u=l.u:(c.u=sv,m.addEventListener(y,p?ev:Qg,p)):m.removeEventListener(y,p?ev:Qg,p);else{if(o=="http://www.w3.org/2000/svg")y=y.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(y!="width"&&y!="height"&&y!="href"&&y!="list"&&y!="form"&&y!="tabIndex"&&y!="download"&&y!="rowSpan"&&y!="colSpan"&&y!="role"&&y!="popover"&&y in m)try{m[y]=c==null?"":c;break e}catch(d){}typeof c=="function"||(c==null||c===!1&&y[4]!="-"?m.removeAttribute(y):m.setAttribute(y,y=="popover"&&c==1?"":c))}}function l_(m){return function(y){if(this.l){var c=this.l[y.type+m];if(y.t==null)y.t=sv++;else if(y.t<c.u)return;return c($n.event?$n.event(y):y)}}}function K_(m,y,c,l,o,p,d,O,g,E){var M,A,T,k,R,C,F,W,V,te,ie,re,J,Z,Y,z,G,X=y.type;if(y.constructor!==void 0)return null;128&c.__u&&(g=!!(32&c.__u),p=[O=y.__e=c.__e]),(M=$n.__b)&&M(y);e:if(typeof X=="function")try{if(W=y.props,V="prototype"in X&&X.prototype.render,te=(M=X.contextType)&&l[M.__c],ie=M?te?te.props.value:M.__:l,c.__c?F=(A=y.__c=c.__c).__=A.__E:(V?y.__c=A=new X(W,ie):(y.__c=A=new gc(W,ie),A.constructor=X,A.render=EE),te&&te.sub(A),A.props=W,A.state||(A.state={}),A.context=ie,A.__n=l,T=A.__d=!0,A.__h=[],A._sb=[]),V&&A.__s==null&&(A.__s=A.state),V&&X.getDerivedStateFromProps!=null&&(A.__s==A.state&&(A.__s=Xu({},A.__s)),Xu(A.__s,X.getDerivedStateFromProps(W,A.__s))),k=A.props,R=A.state,A.__v=y,T)V&&X.getDerivedStateFromProps==null&&A.componentWillMount!=null&&A.componentWillMount(),V&&A.componentDidMount!=null&&A.__h.push(A.componentDidMount);else{if(V&&X.getDerivedStateFromProps==null&&W!==k&&A.componentWillReceiveProps!=null&&A.componentWillReceiveProps(W,ie),!A.__e&&(A.shouldComponentUpdate!=null&&A.shouldComponentUpdate(W,A.__s,ie)===!1||y.__v==c.__v)){for(y.__v!=c.__v&&(A.props=W,A.state=A.__s,A.__d=!1),y.__e=c.__e,y.__k=c.__k,y.__k.some(function($){$&&($.__=y)}),re=0;re<A._sb.length;re++)A.__h.push(A._sb[re]);A._sb=[],A.__h.length&&d.push(A);break e}A.componentWillUpdate!=null&&A.componentWillUpdate(W,A.__s,ie),V&&A.componentDidUpdate!=null&&A.__h.push(function(){A.componentDidUpdate(k,R,C)})}if(A.context=ie,A.props=W,A.__P=m,A.__e=!1,J=$n.__r,Z=0,V){for(A.state=A.__s,A.__d=!1,J&&J(y),M=A.render(A.props,A.state,A.context),Y=0;Y<A._sb.length;Y++)A.__h.push(A._sb[Y]);A._sb=[]}else do A.__d=!1,J&&J(y),M=A.render(A.props,A.state,A.context),A.state=A.__s;while(A.__d&&++Z<25);A.state=A.__s,A.getChildContext!=null&&(l=Xu(Xu({},l),A.getChildContext())),V&&!T&&A.getSnapshotBeforeUpdate!=null&&(C=A.getSnapshotBeforeUpdate(k,R)),O=W_(m,cv(z=M!=null&&M.type===lv&&M.key==null?M.props.children:M)?z:[z],y,c,l,o,p,d,O,g,E),A.base=y.__e,y.__u&=-161,A.__h.length&&d.push(A),F&&(A.__E=A.__=null)}catch($){if(y.__v=null,g||p!=null)if($.then){for(y.__u|=g?160:128;O&&O.nodeType==8&&O.nextSibling;)O=O.nextSibling;p[p.indexOf(O)]=null,y.__e=O}else for(G=p.length;G--;)fv(p[G]);else y.__e=c.__e,y.__k=c.__k;$n.__e($,y,c)}else p==null&&y.__v==c.__v?(y.__k=c.__k,y.__e=c.__e):O=y.__e=xE(c.__e,y,c,l,o,p,d,g,E);return(M=$n.diffed)&&M(y),128&y.__u?void 0:O}function wE(m,y,c){for(var l=0;l<c.length;l++)pv(c[l],c[++l],c[++l]);$n.__c&&$n.__c(y,m),m.some(function(o){try{m=o.__h,o.__h=[],m.some(function(p){p.call(o)})}catch(p){$n.__e(p,o.__v)}})}function xE(m,y,c,l,o,p,d,O,g){var E,M,A,T,k,R,C,F=c.props,W=y.props,V=y.type;if(V=="svg"?o="http://www.w3.org/2000/svg":V=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),p!=null){for(E=0;E<p.length;E++)if((k=p[E])&&"setAttribute"in k==!!V&&(V?k.localName==V:k.nodeType==3)){m=k,p[E]=null;break}}if(m==null){if(V==null)return document.createTextNode(W);m=document.createElementNS(o,V,W.is&&W),O&&($n.__m&&$n.__m(y,p),O=!1),p=null}if(V===null)F===W||O&&m.data===W||(m.data=W);else{if(p=p&&av.call(m.childNodes),F=c.props||tv,!O&&p!=null)for(F={},E=0;E<m.attributes.length;E++)F[(k=m.attributes[E]).name]=k.value;for(E in F)if(k=F[E],E!="children"){if(E=="dangerouslySetInnerHTML")A=k;else if(!(E in W)){if(E=="value"&&"defaultValue"in W||E=="checked"&&"defaultChecked"in W)continue;bd(m,E,null,k,o)}}for(E in W)k=W[E],E=="children"?T=k:E=="dangerouslySetInnerHTML"?M=k:E=="value"?R=k:E=="checked"?C=k:O&&typeof k!="function"||F[E]===k||bd(m,E,k,F[E],o);if(M)O||A&&(M.__html===A.__html||M.__html===m.innerHTML)||(m.innerHTML=M.__html),y.__k=[];else if(A&&(m.innerHTML=""),W_(m,cv(T)?T:[T],y,c,l,V=="foreignObject"?"http://www.w3.org/1999/xhtml":o,p,d,p?p[0]:c.__k&&mc(c,0),O,g),p!=null)for(E=p.length;E--;)fv(p[E]);O||(E="value",V=="progress"&&R==null?m.removeAttribute("value"):R!==void 0&&(R!==m[E]||V=="progress"&&!R||V=="option"&&R!==F[E])&&bd(m,E,R,F[E],o),E="checked",C!==void 0&&C!==m[E]&&bd(m,E,C,F[E],o))}return m}function pv(m,y,c){try{if(typeof m=="function"){var l=typeof m.__u=="function";l&&m.__u(),l&&y==null||(m.__u=m(y))}else m.current=y}catch(o){$n.__e(o,c)}}function $_(m,y,c){var l,o;if($n.unmount&&$n.unmount(m),(l=m.ref)&&(l.current&&l.current!==m.__e||pv(l,null,y)),(l=m.__c)!=null){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(p){$n.__e(p,y)}l.base=l.__P=null}if(l=m.__k)for(o=0;o<l.length;o++)l[o]&&$_(l[o],y,c||typeof m.type!="function");c||fv(m.__e),m.__c=m.__=m.__e=void 0}function EE(m,y,c){return this.constructor(m,c)}av=H_.slice,$n={__e:function(m,y,c,l){for(var o,p,d;y=y.__;)if((o=y.__c)&&!o.__)try{if((p=o.constructor)&&p.getDerivedStateFromError!=null&&(o.setState(p.getDerivedStateFromError(m)),d=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(m,l||{}),d=o.__d),d)return o.__E=o}catch(O){m=O}throw m}},U_=0,gc.prototype.setState=function(m,y){var c;c=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xu({},this.state),typeof m=="function"&&(m=m(Xu({},c),this.props)),m&&Xu(c,m),m!=null&&this.__v&&(y&&this._sb.push(y),c_(this))},gc.prototype.forceUpdate=function(m){this.__v&&(this.__e=!0,m&&this.__h.push(m),c_(this))},gc.prototype.render=lv,Va=[],G_=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Jg=function(m,y){return m.__v.__b-y.__v.__b},kd.__r=0,X_=/(PointerCapture)$|Capture$/i,sv=0,Qg=l_(!1),ev=l_(!0);var ul=function(){return ul=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},ul.apply(this,arguments)};function dv(m){var y=m.x,c=m.y,l=m.width,o=m.height,p=m.radius,d=m.className,O=y-l/2,g=c-o/2,E=ul(ul({width:10,height:10,cx:0,cy:0,rx:p||0,ry:p||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+d},m),{x:O,y:g});return ot.h("rect",ul({},E))}dv.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var hc;(function(m){m.NODE="node",m.CIRCLE_NODE="circle-node",m.POLYGON_NODE="polygon-node",m.RECT_NODE="rect-node",m.HTML_NODE="html-node",m.TEXT_NODE="text-node",m.ELLIPSE_NODE="ellipse-node",m.DIAMOND_NODE="diamond-node",m.EDGE="edge",m.LINE_EDGE="line-edge",m.POLYLINE_EDGE="polyline-edge",m.BEZIER_EDGE="bezier-edge",m.GRAPH="graph"})(hc||(hc={}));var SE=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),Ka=function(){return Ka=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},Ka.apply(this,arguments)},jE=function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var l=c.call(m),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=l.return)&&c.call(l)}finally{if(d)throw d.error}}return p},PE=ot.LogicFlowUtil.StepDrag,AE=function(m){SE(y,m);function y(c){var l=m.call(this)||this;return l.updatePosition=function(o){var p=o.deltaX,d=o.deltaY,O=l.nodeModel,g=O.x,E=O.y;l.nodeModel.x=g+p/2,l.nodeModel.y=E+d/2,l.nodeModel.moveText(p/2,d/2)},l.getResize=function(o){var p=o.index,d=o.deltaX,O=o.deltaY,g=o.width,E=o.height,M=o.PCTResizeInfo,A=o.pct,T=A===void 0?1:A,k=o.freezeWidth,R=k===void 0?!1:k,C=o.freezeHeight,F=C===void 0?!1:C,W={width:g,height:E,deltaX:d,deltaY:O};if(M){var V=4,te=0,ie=0;switch(p){case 0:ie=(d*-1-O)/V;break;case 1:ie=(d-O)/V;break;case 2:ie=(d+O)/V;break;case 3:ie=(d*-1+O)/V;break}ie!==0&&(te=Math.round(ie/M.ResizeBasis.basisHeight*1e5)/1e3),M.ResizePCT.widthPCT=Math.max(Math.min(M.ResizePCT.widthPCT+te,M.ScaleLimit.maxScaleLimit),M.ScaleLimit.minScaleLimit),M.ResizePCT.hightPCT=Math.max(Math.min(M.ResizePCT.hightPCT+te,M.ScaleLimit.maxScaleLimit),M.ScaleLimit.minScaleLimit);var re=Math.round(M.ResizePCT.widthPCT*M.ResizeBasis.basisWidth/100),J=Math.round(M.ResizePCT.hightPCT*M.ResizeBasis.basisHeight/100);switch(p){case 0:d=g-re,O=E-J;break;case 1:d=re-g,O=E-J;break;case 2:d=re-g,O=J-E;break;case 3:d=g-re,O=J-E;break}return W.width=re,W.height=J,W.deltaX=d/T,W.deltaY=O/T,W}switch(p){case 0:W.width=R?g:g-d*T,W.height=F?E:E-O*T;break;case 1:W.width=R?g:g+d*T,W.height=F?E:E-O*T;break;case 2:W.width=R?g:g+d*T,W.height=F?E:E+O*T;break;case 3:W.width=R?g:g-d*T,W.height=F?E:E+O*T;break}return W},l.updateEdgePointByAnchors=function(){var o=l.nodeModel,p=o.id,d=o.anchors,O=l.getNodeEdges(p);O.sourceEdges.forEach(function(g){var E=d.find(function(M){return M.id===g.sourceAnchorId});g.updateStartPoint({x:E.x,y:E.y})}),O.targetEdges.forEach(function(g){var E=d.find(function(M){return M.id===g.targetAnchorId});g.updateEndPoint({x:E.x,y:E.y})})},l.updateRect=function(o){var p=o.deltaX,d=o.deltaY,O=l.nodeModel,g=O.id,E=O.x,M=O.y,A=O.width,T=O.height,k=O.radius,R=O.PCTResizeInfo,C=l.nodeModel,F=C.minWidth,W=C.minHeight,V=C.maxWidth,te=C.maxHeight,ie=l.index,re=F===V,J=W===te,Z=l.getResize({index:ie,deltaX:p,deltaY:d,width:A,height:T,PCTResizeInfo:R,pct:1,freezeWidth:re,freezeHeight:J});if(Z.width<F||Z.width>V||Z.height<W||Z.height>te){l.dragHandler.cancelDrag();return}l.updatePosition({deltaX:re?0:Z.deltaX,deltaY:J?0:Z.deltaY}),l.nodeModel.width=Z.width,l.nodeModel.height=Z.height,l.nodeModel.setProperties({nodeSize:{width:Z.width,height:Z.height}}),l.getNodeEdges(g);var Y={x:E,y:M,width:A,height:T,radius:k},z={x:l.nodeModel.x,y:l.nodeModel.y,width:l.nodeModel.width,height:l.nodeModel.height,radius:k};l.updateEdgePointByAnchors(),l.eventEmit({beforeNode:Y,afterNode:z})},l.updateEllipse=function(o){var p=o.deltaX,d=o.deltaY,O=l.nodeModel,g=O.id,E=O.rx,M=O.ry,A=O.x,T=O.y,k=O.PCTResizeInfo,R=l.index,C=l.nodeModel,F=C.minWidth,W=C.minHeight,V=C.maxWidth,te=C.maxHeight,ie=F===V,re=W===te,J=E,Z=M,Y=l.getResize({index:R,deltaX:p,deltaY:d,width:J,height:Z,PCTResizeInfo:k,pct:1/2,freezeWidth:ie,freezeHeight:re});if(Y.width<F/2||Y.width>V/2||Y.height<W/2||Y.height>te/2){l.dragHandler.cancelDrag();return}l.updatePosition({deltaX:ie?0:Y.deltaX,deltaY:re?0:Y.deltaY}),l.nodeModel.rx=Y.width,l.nodeModel.ry=Y.height,l.nodeModel.setProperties({nodeSize:{rx:Y.width,ry:Y.height}}),l.getNodeEdges(g);var z={x:A,y:T},G={rx:Y.width,ry:Y.height,x:l.nodeModel.x,y:l.nodeModel.y};l.updateEdgePointByAnchors(),l.eventEmit({beforeNode:Ka(Ka({},z),{rx:E,ry:M}),afterNode:G})},l.updateDiamond=function(o){var p=o.deltaX,d=o.deltaY,O=l.nodeModel;O.id;var g=O.rx,E=O.ry,M=O.x,A=O.y,T=O.PCTResizeInfo,k=l.index,R=l.nodeModel,C=R.minWidth,F=R.minHeight,W=R.maxWidth,V=R.maxHeight,te=C===W,ie=F===V,re=g,J=E,Z=l.getResize({index:k,deltaX:p,deltaY:d,width:re,height:J,PCTResizeInfo:T,pct:1/2,freezeWidth:te,freezeHeight:ie});if(Z.width<C/2||Z.width>W/2||Z.height<F/2||Z.height>V/2){l.dragHandler.cancelDrag();return}l.updatePosition({deltaX:te?0:Z.deltaX,deltaY:ie?0:Z.deltaY}),l.nodeModel.rx=Z.width,l.nodeModel.ry=Z.height,l.nodeModel.setProperties({nodeSize:{rx:Z.width,ry:Z.height}});var Y={x:M,y:A,rx:g,ry:E},z={rx:Z.width,ry:Z.height,x:l.nodeModel.x,y:l.nodeModel.y};l.updateEdgePointByAnchors(),l.eventEmit({beforeNode:Y,afterNode:z})},l.eventEmit=function(o){var p=o.beforeNode,d=o.afterNode,O=l.nodeModel,g=O.id,E=O.modelType,M=O.type,A=Ka({id:g,modelType:E,type:M},p),T=Ka({id:g,modelType:E,type:M},d);l.graphModel.eventCenter.emit("node:resize",{oldNodeSize:A,newNodeSize:T})},l.onDragging=function(o){var p,d=o.deltaX,O=o.deltaY,g=l.graphModel.transformModel,E=l.nodeModel.modelType;p=jE(g.fixDeltaXY(d,O),2),d=p[0],O=p[1],E===hc.RECT_NODE||E===hc.HTML_NODE?l.updateRect({deltaX:d,deltaY:O}):E===hc.ELLIPSE_NODE?l.updateEllipse({deltaX:d,deltaY:O}):E===hc.DIAMOND_NODE&&l.updateDiamond({deltaX:d,deltaY:O})},l.onDragEnd=function(){var o=l.graphModel.gridSize,p=o===void 0?1:o,d=p*Math.round(l.nodeModel.x/p),O=p*Math.round(l.nodeModel.y/p);l.nodeModel.moveTo(d,O),l.updateEdgePointByAnchors()},l.index=c.index,l.nodeModel=c.model,l.graphModel=c.graphModel,l.state={},l.dragHandler=new PE({onDragging:l.onDragging,onDragEnd:l.onDragEnd,step:1}),l}return y.prototype.getNodeEdges=function(c){for(var l=this.graphModel,o=l.edges,p=[],d=[],O=0;O<o.length;O++){var g=o[O];g.sourceNodeId===c?p.push(g):o[O].targetNodeId===c&&d.push(g)}return{sourceEdges:p,targetEdges:d}},y.prototype.render=function(){var c=this.props,l=c.x,o=c.y,p=c.index,d=c.model,O=d.getControlPointStyle();return il("g",{className:"lf-resize-control-"+p},il(dv,Ka({className:"lf-node-control"},{x:l,y:o},O,{onMouseDown:this.dragHandler.handleMouseDown})))},y}(gc),ME=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),Td=function(){return Td=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},Td.apply(this,arguments)},zd=function(m){ME(y,m);function y(){var c=m.call(this)||this;return c.state={},c}return y.prototype.getResizeControl=function(){var c=this.props,l=c.model,o=c.graphModel,p=l.x,d=l.y,O=l.width,g=l.height,E={minX:p-O/2,minY:d-g/2,maxX:p+O/2,maxY:d+g/2},M=E.minX,A=E.minY,T=E.maxX,k=E.maxY,R=[{x:M,y:A},{x:T,y:A},{x:T,y:k},{x:M,y:k}];return R.map(function(C,F){return il(AE,Td({index:F},C,{model:l,graphModel:o}))})},y.prototype.getGroupSolid=function(){var c=this.props.model,l=c.x,o=c.y,p=c.width,d=c.height,O=c.getResizeOutlineStyle();return il(dv,Td({fill:"none"},O,{x:l,y:o,width:p,height:d}))},y.prototype.render=function(){return il("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},y}(gc),q_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),kE=function(m){q_(y,m);function y(c,l){var o=m.call(this,c,l)||this,p=o.properties.nodeSize;return p&&(o.width=p.width,o.height=p.height),o}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},y.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.resize=function(c,l){},y.prototype.enableProportionResize=function(c){if(c===void 0&&(c=!0),c){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y}(ot.RectNodeModel),TE=function(m){q_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,l=c.model,o=c.graphModel;return ot.h(zd,{model:l,graphModel:o})},y.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,l=c.model.isSelected,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),l&&!o?this.getControlGroup():"")},y}(ot.RectNode),Z_={type:"rect",view:TE,model:kE},J_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}();(function(m){J_(y,m);function y(c,l){var o=m.call(this,c,l)||this,p=o.properties.nodeSize;return p&&(o.rx=p.rx,o.ry=p.ry),o}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(c){if(c===void 0&&(c=!0),c){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y})(ot.EllipseNodeModel);(function(m){J_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,l=c.model,o=c.graphModel;return ot.h(zd,{model:l,graphModel:o})},y.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,l=c.model,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),l.isSelected&&!o?this.getControlGroup():"")},y})(ot.EllipseNode);var nv=function(){return nv=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},nv.apply(this,arguments)};function DE(m){var y=m.fillOpacity,c=y===void 0?1:y,l=m.strokeWidth,o=l===void 0?1:l,p=m.strokeOpacity,d=p===void 0?1:p,O=m.fill,g=O===void 0?"transparent":O,E=m.stroke,M=E===void 0?"#000":E,A=m.points,T=m.className,k=T===void 0?"lf-basic-shape":T,R={fill:g,fillOpacity:c,strokeWidth:o,stroke:M,strokeOpacity:d,points:"",className:k};return R.points=A.map(function(C){return C.join(",")}).join(" "),ot.h("polygon",nv({},R))}var Q_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),rv=function(){return rv=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},rv.apply(this,arguments)};(function(m){Q_(y,m);function y(c,l){var o=m.call(this,c,l)||this,p=o.properties.nodeSize;return p&&(o.rx=p.rx,o.ry=p.ry),o}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(c){if(c===void 0&&(c=!0),c){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y})(ot.DiamondNodeModel);(function(m){Q_(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,l=c.model,o=c.graphModel;return ot.h(zd,{model:l,graphModel:o})},y.prototype.getResizeShape=function(){var c=this.props.model,l=c.points,o=c.getNodeStyle();return ot.h("g",null,ot.h(DE,rv({},o,{points:l})))},y.prototype.getShape=function(){var c=this.props,l=c.model.isSelected,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),l&&!o?this.getControlGroup():"")},y})(ot.DiamondNode);var eO=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}();(function(m){eO(y,m);function y(c,l){var o=m.call(this,c,l)||this,p=o.properties.nodeSize;return p&&(o.width=p.width,o.height=p.height),o}return y.prototype.initNodeData=function(c){m.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=m.prototype.getOutlineStyle.call(this),l=this.graphModel.editConfigModel.isSilentMode;return l||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(c){if(c===void 0&&(c=!0),c){var l={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},p={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:l,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y})(ot.HtmlNodeModel);(function(m){eO(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,l=c.model,o=c.graphModel;return ot.h(zd,{model:l,graphModel:o})},y.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,l=c.model.isSelected,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),l&&!o?this.getControlGroup():"")},y})(ot.HtmlNode);var tO=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),Dd=function(){return Dd=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},Dd.apply(this,arguments)},NE=function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var l=c.call(m),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=l.return)&&c.call(l)}finally{if(d)throw d.error}}return p},CE=function(){for(var m=[],y=0;y<arguments.length;y++)m=m.concat(NE(arguments[y]));return m},p_=500,d_=300,RE=-1e4;(function(m){tO(y,m);function y(){var c=m!==null&&m.apply(this,arguments)||this;return c.isGroup=!0,c.unfoldedWidth=p_,c.unfoldedHight=d_,c.childrenLastFoldStatus={},c}return y.prototype.initNodeData=function(c){var l=this;m.prototype.initNodeData.call(this,c);var o=[];Array.isArray(c.children)&&(o=c.children),this.children=new Set(o),this.width=p_,this.height=d_,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=RE,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(){l.isFolded&&l.foldGroup(l.isFolded)})},y.prototype.getResizeOutlineStyle=function(){var c=m.prototype.getResizeOutlineStyle.call(this);return c.stroke="none",c},y.prototype.foldGroup=function(c){var l=this;if(c!==this.isFolded){this.setProperty("isFolded",c),this.isFolded=c,c?(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 o=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(p){var d=l.graphModel.getElement(p),O=d.isFolded;if(d.isGroup&&!d.isFolded&&d.foldGroup(c),d.isGroup&&!c){var g=l.childrenLastFoldStatus[p];g!==void 0&&g!==d.isFolded&&d.foldGroup(g)}l.childrenLastFoldStatus[p]=O,d.visible=!c,o=o.concat(d.incoming.edges.concat(d.outgoing.edges))}),this.foldEdge(c,o)}},y.prototype.getAnchorStyle=function(c){var l=m.prototype.getAnchorStyle.call(this,c);return l.stroke="transparent",l.fill="transparent",l.hover.fill="transparent",l.hover.stroke="transparent",l},y.prototype.foldEdge=function(c,l){var o=this;l.forEach(function(p,d){var O=p.id,g=p.sourceNodeId,E=p.targetNodeId,M=p.startPoint,A=p.endPoint,T=p.type,k=p.text,R=p.getProperties(),C={id:O+"__"+d,sourceNodeId:g,targetNodeId:E,startPoint:M,endPoint:A,type:T,properties:R,text:k==null?void 0:k.value};p.virtual&&o.graphModel.deleteEdgeById(p.id);var F=o.graphModel.group.getNodeGroup(E);F||(F=o.graphModel.getNodeModelById(E));var W=o.graphModel.group.getNodeGroup(g);W||(W=o.graphModel.getNodeModelById(g)),c&&p.visible!==!1&&(o.children.has(g)||o.id===g?(C.startPoint=void 0,C.sourceNodeId=o.id):(C.endPoint=void 0,C.targetNodeId=o.id),(F.id!==o.id||W.id!==o.id)&&o.createVirtualEdge(C),p.visible=!1),!c&&p.visible===!1&&(F&&F.isGroup&&F.isFolded?(C.targetNodeId=F.id,C.endPoint=void 0,o.createVirtualEdge(C)):W&&W.isGroup&&W.isFolded?(C.sourceNodeId=W.id,C.startPoint=void 0,o.createVirtualEdge(C)):p.visible=!0)})},y.prototype.createVirtualEdge=function(c){c.pointsList=void 0;var l=this.graphModel.addEdge(c);l.virtual=!0,l.text.editable=!1,l.isFoldedEdge=!0},y.prototype.isInRange=function(c){var l=c.x1,o=c.y1,p=c.x2,d=c.y2;return l>=this.x-this.width/2&&p<=this.x+this.width/2&&o>=this.y-this.height/2&&d<=this.y+this.height/2},y.prototype.isAllowMoveTo=function(c){var l=c.x1,o=c.y1,p=c.x2,d=c.y2;return{x:l>=this.x-this.width/2&&p<=this.x+this.width/2,y:o>=this.y-this.height/2&&d<=this.y+this.height/2}},y.prototype.setAllowAppendChild=function(c){this.setProperty("groupAddable",c)},y.prototype.addChild=function(c){this.children.add(c),this.graphModel.eventCenter.emit("group:add-node",{data:this.getData()})},y.prototype.removeChild=function(c){this.children.delete(c),this.graphModel.eventCenter.emit("group:remove-node",{data:this.getData()})},y.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},y.prototype.getData=function(){var c=this,l=m.prototype.getData.call(this);l.children=[],this.children.forEach(function(p){var d=c.graphModel.getNodeModelById(p);d&&!d.virtual&&l.children.push(p)});var o=l.properties;return delete o.groupAddable,delete o.isFolded,l},y.prototype.getHistoryData=function(){var c=m.prototype.getData.call(this);c.children=CE(this.children),c.isGroup=!0;var l=c.properties;return delete l.groupAddable,l.isFolded&&(c.x=c.x+this.unfoldedWidth/2-this.foldedWidth/2,c.y=c.y+this.unfoldedHight/2-this.foldedHeight/2),c},y.prototype.isAllowAppendIn=function(c){return!0},y.prototype.toBack=function(){this.zIndex--},y})(Z_.model);(function(m){tO(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props.model,l=c.resizable,o=c.properties;return l&&!o.isFolded?m.prototype.getControlGroup.call(this):null},y.prototype.getAddableShape=function(){var c=this.props.model,l=c.width,o=c.height,p=c.x,d=c.y,O=c.radius,g=c.properties;if(!g.groupAddable)return null;var E=this.props.model.getNodeStyle().strokeWidth,M=this.props.model.getAddableOutlineStyle(),A=l+E+8,T=o+E+8;return ot.h("rect",Dd(Dd({},M),{width:A,height:T,x:p-A/2,y:d-T/2,rx:O,ry:O}))},y.prototype.getFoldIcon=function(){var c=this.props.model,l=c.x-c.width/2+5,o=c.y-c.height/2+5;if(!c.foldable)return null;var p=ot.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:c.properties.isFolded?"M "+(l+3)+","+(o+6)+" "+(l+11)+","+(o+6)+" M"+(l+7)+","+(o+2)+" "+(l+7)+","+(o+10):"M "+(l+3)+","+(o+6)+" "+(l+11)+","+(o+6)+" "});return ot.h("g",{},[ot.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:c.x-c.width/2+5,y:c.y-c.height/2+5,onClick:function(){c.foldGroup(!c.properties.isFolded)}}),p])},y.prototype.getResizeShape=function(){return ot.h("g",{},[this.getAddableShape(),m.prototype.getResizeShape.call(this),this.getFoldIcon()])},y})(Z_.view);var h_=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),al=function(){return al=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},al.apply(this,arguments)};function IE(m){var y=function(l){h_(o,l);function o(p,d){var O=this;p.id||(p.id="Flow_"+mE());var g=al(al(al({},{}),p.properties),{isDefaultFlow:!1});return p.properties=g,O=l.call(this,p,d)||this,O}return o.extendKey="SequenceFlowModel",o}(ot.PolylineEdgeModel),c=function(l){h_(o,l);function o(){return l!==null&&l.apply(this,arguments)||this}return o.prototype.getStartArrow=function(){var p=this.props.model,d=p.properties.isDefaultFlow;return d?ot.h("path",{refX:15,stroke:"#000000",strokeWidth:2,d:"M 20 5 10 -5 z"}):ot.h("path",{d:""})},o.extendKey="SequenceFlowEdge",o}(ot.PolylineEdge);return{type:"bpmn:sequenceFlow",view:c,model:y}}IE();var y_={width:40,height:40},g_={width:40,height:40},v_={width:100,height:80},Nd={width:100,height:80},m_={width:100,height:80},b_={width:100,height:80},__={width:100,height:80},O_={width:100,height:80},w_={width:100,height:80},x_={width:100,height:80},Kr=function(){};Kr.ObjTree=function(){return this};Kr.ObjTree.VERSION="0.23";Kr.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
  103. `;Kr.ObjTree.prototype.attr_prefix="-";Kr.ObjTree.prototype.parseXML=function(m){var y;if(window.DOMParser){var c=new DOMParser,l=c.parseFromString(m,"application/xml");if(!l)return;y=l.documentElement}else window.ActiveXObject&&(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(m),y=c.documentElement);if(y){var o=this.parseDOM(y);return o}};Kr.ObjTree.prototype.parseHTTP=function(m,y,c){var l={};for(var o in y)l[o]=y[o];if(l.method||(typeof l.postBody=="undefined"&&typeof l.postbody=="undefined"&&typeof l.parameters=="undefined"?l.method="get":l.method="post"),c){l.asynchronous=!0;var p=this,d=c,O=l.onComplete;l.onComplete=function(M){var A;M&&M.responseXML&&M.responseXML.documentElement&&(A=p.parseDOM(M.responseXML.documentElement)),d(A,M),O&&O(M)}}else l.asynchronous=!1;var g;if(typeof HTTP!="undefined"&&HTTP.Request){l.uri=m;var E=new HTTP.Request(l);E&&(g=E.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var E=new Ajax.Request(m,l);E&&(g=E.transport)}if(c)return g;if(g&&g.responseXML&&g.responseXML.documentElement)return this.parseDOM(g.responseXML.documentElement)};Kr.ObjTree.prototype.parseDOM=function(m){if(m){if(this.__force_array={},this.force_array)for(var y=0;y<this.force_array.length;y++)this.__force_array[this.force_array[y]]=1;var c=this.parseElement(m);if(this.__force_array[m.nodeName]&&(c=[c]),m.nodeType!==11){var l={};l[m.nodeName]=c,c=l}return c}};Kr.ObjTree.prototype.parseElement=function(m){if(m.nodeType!==7){if(m.nodeType===3||m.nodeType===4||m.nodeType===8){var y=m.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:m.nodeValue}var c=null,l={};if(m.attributes&&m.attributes.length){c={};for(var o=0;o<m.attributes.length;o++){var p=m.attributes[o].nodeName;if(typeof p=="string"){var d=m.attributes[o].nodeValue;try{d=JSON.parse(m.attributes[o].nodeValue.replace(/'/g,'"'))}catch(E){d=m.attributes[o].nodeValue}d!=null&&(p=this.attr_prefix+p,typeof l[p]=="undefined"&&(l[p]=0),l[p]++,this.addNode(c,p,l[p],d))}}}if(m.childNodes&&m.childNodes.length){var O=!0;c&&(O=!1);for(var o=0;o<m.childNodes.length&&O;o++){var g=m.childNodes[o].nodeType;g===3||g===4||g===8||(O=!1)}if(O){c||(c="");for(var o=0;o<m.childNodes.length;o++)c+=m.childNodes[o].nodeValue}else{c||(c={});for(var o=0;o<m.childNodes.length;o++){var p=m.childNodes[o].nodeName;if(typeof p=="string"){var d=this.parseElement(m.childNodes[o]);d&&(typeof l[p]=="undefined"&&(l[p]=0),l[p]++,this.addNode(c,p,l[p],d))}}}}else c===null&&(c={});return c}};Kr.ObjTree.prototype.addNode=function(m,y,c,l){this.__force_array[y]?(c===1&&(m[y]=[]),m[y][m[y].length]=l):c===1?m[y]=l:c===2?m[y]=[m[y],l]:m[y][m[y].length]=l};Kr.ObjTree.prototype.writeXML=function(m){var y=this.hash_to_xml(null,m);return this.xmlDecl+y};Kr.ObjTree.prototype.hash_to_xml=function(m,y){var c=[],l=[];for(var o in y)if(y!=null&&y.hasOwnProperty(o)){var p=y[o];o.charAt(0)!==this.attr_prefix?typeof p=="undefined"||p==null?c[c.length]="<"+o+" />":typeof p=="object"&&p.constructor===Array?c[c.length]=this.array_to_xml(o,p):typeof p=="object"?c[c.length]=this.hash_to_xml(o,p):c[c.length]=this.scalar_to_xml(o,p):l[l.length]=" "+o.substring(1)+'="'+this.xml_escape(p)+'"'}var d=l.join(""),O=c.join("");return typeof m=="undefined"||m==null||(c.length>0?O.match(/\n/)?O="<"+m+d+`>
  104. `+O+"</"+m+`>
  105. `:O="<"+m+d+">"+O+"</"+m+`>
  106. `:O="<"+m+d+` />
  107. `),O};Kr.ObjTree.prototype.array_to_xml=function(m,y){for(var c=[],l=0;l<y.length;l++){var o=y[l];typeof o=="undefined"||o==null?c[c.length]="<"+m+" />":typeof o=="object"&&o.constructor===Array?c[c.length]=this.array_to_xml(m,o):typeof o=="object"?c[c.length]=this.hash_to_xml(m,o):c[c.length]=this.scalar_to_xml(m,o)}return c.join("")};Kr.ObjTree.prototype.scalar_to_xml=function(m,y){return m==="#text"?this.xml_escape(y):"<"+m+">"+this.xml_escape(y)+"</"+m+`>
  108. `};Kr.ObjTree.prototype.xml_escape=function(m){return m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var LE=function(m){return new Kr.ObjTree().parseXML(m)};function nO(m){return Object.prototype.toString.call(m)}function E_(m){return" ".repeat(m)}function Cd(m){return nO(m)==="[object Object]"?Object.keys(m).reduce(function(y,c){var l=c;return c.charAt(0)==="-"&&(l=c.substring(1)),y[l]=Cd(m[c]),y},{}):Array.isArray(m)?m.map(function(y){return Cd(y)}):m}function zE(m){var y=m;try{typeof y!="string"&&(y=JSON.parse(m))}catch(c){y=JSON.stringify(Cd(m)).replace(/"/g,"'")}return y}var S_=`
  109. `;function Ed(m,y,c){var l=E_(c),o="",p=S_+l;if(y==="-json")return"";if(y==="#text")return p+m;if(y==="#cdata-section")return p+"<![CDATA["+m+"]]>";if(y==="#comment")return p+"<!--"+m+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+zE(m)+'"';if(Array.isArray(m))o+=m.map(function(E){return Ed(E,y,c+1)}).join("");else if(nO(m)==="[object Object]"){var d=Object.keys(m),O="",g=m["-json"]?S_+E_(c+1)+m["-json"]:"";o+=(c===0?"":p)+"<"+y,d.forEach(function(E){E.charAt(0)==="-"?O+=Ed(m[E],E,c+1):g+=Ed(m[E],E,c+1)}),o+=O+(g!==""?">"+g+p+"</"+y+">":" />")}else o+=p+"<"+y+">"+m.toString()+"</"+y+">";return o}function BE(m){var y="";for(var c in m)y+=Ed(m[c],c,0);return y}var FE=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),ov=function(){return ov=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},ov.apply(this,arguments)},j_=function(m,y){var c={};for(var l in m)Object.prototype.hasOwnProperty.call(m,l)&&y.indexOf(l)<0&&(c[l]=m[l]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(m);o<l.length;o++)y.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(m,l[o])&&(c[l[o]]=m[l[o]]);return c},hv=function(m){var y=typeof Symbol=="function"&&Symbol.iterator,c=y&&m[y],l=0;if(c)return c.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&l>=m.length&&(m=void 0),{value:m&&m[l++],done:!m}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},_c=function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var l=c.call(m),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=l.return)&&c.call(l)}finally{if(d)throw d.error}}return p},vc=function(){for(var m=[],y=0;y<arguments.length;y++)m=m.concat(_c(arguments[y]));return m},Wr;(function(m){m.START="bpmn:startEvent",m.END="bpmn:endEvent",m.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",m.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",m.BOUNDARY="bpmn:boundaryEvent",m.PARALLEL_GATEWAY="bpmn:parallelGateway",m.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",m.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",m.USER="bpmn:userTask",m.SYSTEM="bpmn:serviceTask",m.FLOW="bpmn:sequenceFlow",m.SUBPROCESS="bpmn:subProcess"})(Wr||(Wr={}));var rO=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],UE=["properties","startPoint","endPoint","pointsList"],Rd={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},oO=function(m,y){var c=Object.keys(y||{});return c.forEach(function(l){if(m[l]){var o=y[l],p=o.in,d=o.out;p&&(m[l].in=p),d&&(m[l].out=d)}else m[l]=y[l]}),m},zo={"bpmn:startEvent":{out:function(m){var y,c,l=m.properties;return((c=(y=zo[l.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,m))||{}}},"bpmn:intermediateCatchEvent":{out:function(m){var y,c,l=m.properties;return((c=(y=zo[l.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,m))||{}}},"bpmn:intermediateThrowEvent":{out:function(m){var y,c,l=m.properties;return((c=(y=zo[l.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,m))||{}}},"bpmn:boundaryEvent":{out:function(m){var y,c,l=m.properties;return((c=(y=zo[l.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,m))||{}}},"bpmn:sequenceFlow":{out:function(m){var y=m.properties,c=y.expressionType,l=y.condition;return l?c==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${'+l+"}]]></bpmn:conditionExpression>"}:{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression">'+l+"</bpmn:conditionExpression>"}:{json:""}}},"bpmn:timerEventDefinition":{out:function(m){var y=m.properties,c=y.timerType,l=y.timerValue,o=y.definitionId,p=function(){return"<bpmn:"+c+' xsi:type="bpmn:tFormalExpression">'+l+"</bpmn:"+c+">"};return{json:'<bpmn:timerEventDefinition id="'+o+'"'+(c&&l?">"+p()+"</bpmn:timerEventDefinition>":"/>")}},in:function(m,y){var c,l,o,p,d=m,O=y["-id"],g="",E="";try{for(var M=hv(Object.keys(y)),A=M.next();!A.done;A=M.next()){var T=A.value;T.includes("bpmn:")&&(o=_c(T.split(":"),2),g=o[1],E=(p=y[T])===null||p===void 0?void 0:p["#text"])}}catch(k){c={error:k}}finally{try{A&&!A.done&&(l=M.return)&&l.call(M)}finally{if(c)throw c.error}}return{"-definitionId":O,"-definitionType":d,"-timerType":g,"-timerValue":E}}},"bpmn:conditionExpression":{in:function(m,y){var c,l="",o="";return y["#cdata-section"]?(o="cdata",l=((c=/^\$\{(.*)\}$/g.exec(y["#cdata-section"]))===null||c===void 0?void 0:c[1])||""):y["#text"]&&(o="normal",l=y["#text"]),{"-condition":l,"-expressionType":o}}}};function GE(m){var y=m!=null?m:{},c=y.retainedAttrsFields,l=y.excludeFields,o=y.transformer,p=new Set(vc(UE,c||[])),d={in:new Set(vc(Rd.in,(l==null?void 0:l.in)||[])),out:new Set(vc(Rd.out,(l==null?void 0:l.out)||[]))};return zo=oO(zo,o),function(O){var g=O.nodes,E=O.edges;function M(A,T){var k,R,C;if((A==null?void 0:A.flag)!==1){var F;if((F=zo[A.type])&&F.out){var W=F.out(A),V=Object.keys(W);V.length>0&&V.forEach(function(G){A[G]=W[G]})}A!=null&&A.children&&(A.children=A.children.map(function(G){var X=g.find(function($){return $.id===G})||E.find(function($){return $.id===G});return X||{}}));var te={};if(typeof A=="string")return A;if(Array.isArray(A))return A.map(function(G){return M(G,"")}).filter(function(G){return G!=null});try{for(var ie=hv(Object.entries(A)),re=ie.next();!re.done;re=ie.next()){var J=_c(re.value,2),Z=J[0],Y=J[1];if(((C=Y)===null||C===void 0?void 0:C.flag)===1)return;var z=[T,Z].filter(function(G){return G}).join(".");d.out.has(z)||(typeof Y!="object"?Z.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(Z)?te[Z]=Y:te["-"+Z]=Y:p.has(z)?te["-"+Z]=M(Y,z):te[Z]=M(Y,z))}}catch(G){k={error:G}}finally{try{re&&!re.done&&(R=ie.return)&&R.call(ie)}finally{if(k)throw k.error}}return te}}return M(O,"")}}function Id(m){var y,c,l={};try{for(var o=hv(Object.entries(m)),p=o.next();!p.done;p=o.next()){var d=_c(p.value,2),O=d[0],g=d[1];O.indexOf("-")===0?l[O.substring(1)]=Cd(g):typeof g=="string"?l[O]=g:Object.prototype.toString.call(g)==="[object Object]"?l[O]=Id(g):Array.isArray(g)?l[O]=g.map(function(E){return Id(E)}):l[O]=g}}catch(E){y={error:E}}finally{try{p&&!p.done&&(c=o.return)&&c.call(o)}finally{if(y)throw y.error}}return l}function XE(m,y,c){var l,o=new Map,p=GE(c)(y);p.nodes.forEach(function(O){var g=O["-id"],E=O["-type"],M=O.text,A=O.children,T=j_(O,["-id","-type","text","children"]),k={"-id":g};M!=null&&M["-value"]&&(k["-name"]=M["-value"]),T["-json"]&&(k["-json"]=T["-json"]),T["-properties"]&&Object.assign(k,T["-properties"]),A&&(k.children=A),m[E]||(m[E]=[]),m[E].push(k),o.set(g,k)});var d=p.edges.map(function(O){var g=O["-id"];O["-type"];var E=O["-sourceNodeId"],M=O["-targetNodeId"],A=O.text,T=j_(O,["-id","-type","-sourceNodeId","-targetNodeId","text"]),k=o.get(M);k["bpmn:incoming"]||(k["bpmn:incoming"]=[]),k["bpmn:incoming"].push(g);var R={"-id":g,"-sourceRef":E,"-targetRef":M};return A!=null&&A["-value"]&&(R["-name"]=A["-value"]),T["-json"]&&(R["-json"]=T["-json"]),T["-properties"]&&Object.assign(R,T["-properties"]),R});return y.edges.forEach(function(O){var g=O.sourceNodeId,E=O.id,M=o.get(g);M["bpmn:outgoing"]||(M["bpmn:outgoing"]=[]),M["bpmn:outgoing"].push(E)}),(l=m["bpmn:subProcess"])===null||l===void 0||l.forEach(function(O){var g={"bpmn:incoming":new Set,"bpmn:outgoing":new Set},E=[];O.children.forEach(function(C){var F,W=o.get(C["-id"]);["bpmn:incoming","bpmn:outgoing"].forEach(function(te){W[te]&&W[te].forEach(function(ie){g[te].add(ie)})});var V=(F=m[C["-type"]])===null||F===void 0?void 0:F.findIndex(function(te){return te["-id"]===C["-id"]});V>=0&&m[C["-type"]].splice(V,1),o.delete(C["-id"]),O[C["-type"]]||(O[C["-type"]]=[]),O[C["-type"]].push(W)});var M=g["bpmn:incoming"],A=g["bpmn:outgoing"];A.forEach(function(C){M.has(C)&&E.push(C)});for(var T=function(C){var F=d.findIndex(function(W){return W["-id"]===E[C]});F>=0?(O["bpmn:sequenceFlow"]||(O["bpmn:sequenceFlow"]=[]),O["bpmn:sequenceFlow"].push(d[F]),d.splice(F,1)):C++,k=C},k,R=0;R<E.length;)T(R),R=k;delete O.children}),m[Wr.FLOW]=d,m}function HE(m,y){m["bpmndi:BPMNEdge"]=y.edges.map(function(c){var l,o=c.id,p=c.pointsList.map(function(O){var g=O.x,E=O.y;return{"-x":g,"-y":E}}),d={"-id":o+"_di","-bpmnElement":o,"di:waypoint":p};return!((l=c.text)===null||l===void 0)&&l.value&&(d["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),d}),m["bpmndi:BPMNShape"]=y.nodes.map(function(c){var l,o=c.id,p=100,d=80,O=c.x,g=c.y,E=oo.shapeConfigMap.get(c.type);E&&(p=E.width,d=E.height),O-=p/2,g-=d/2;var M={"-id":o+"_di","-bpmnElement":o,"dc:Bounds":{"-x":O,"-y":g,"-width":p,"-height":d}};return!((l=c.text)===null||l===void 0)&&l.value&&(M["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),M})}var YE=["bpmn:incoming","bpmn:outgoing"];function WE(m,y){var c=[],l=[],o=new Map,p=y!=null?y:{},d=p.transformer,O=p.excludeFields,g={in:new Set(vc(Rd.in,(O==null?void 0:O.in)||[])),out:new Set(vc(Rd.out,(O==null?void 0:O.out)||[]))};zo=oO(zo,d);var E=m["bpmn:definitions"];if(E){var M=E["bpmn:process"];(function(T,k){k.forEach(function(R){try{Object.keys(T).forEach(function(C){try{R(C)}catch(F){}})}catch(C){}})})(M,[function(T){function k(C){C["-children"]||(C["-children"]=[]),Object.keys(C).forEach(function(F){var W;F.indexOf("bpmn:")===0&&!YE.includes(F)&&(M[F]||(M[F]=[]),!Array.isArray(M[F])&&(M[F]=[M[F]]),Array.isArray(C[F])?(W=M[F]).push.apply(W,vc(C[F])):M[F].push(C[F]),Array.isArray(C[F])?C[F].forEach(function(V){!F.includes("Flow")&&C["-children"].push(V["-id"])}):!F.includes("Flow")&&C["-children"].push(C[F]["-id"]),delete C[F])})}if(T==="bpmn:subProcess"){var R=M[T];Array.isArray(R)?R.forEach(function(C){T==="bpmn:subProcess"&&k(C)}):k(R)}},function(T){var k=function(C){Object.keys(C).forEach(function(F){var W,V;if(F.includes("bpmn:")){var te={};zo[F]&&zo[F].in?(te=(V=(W=zo[F]).in)===null||V===void 0?void 0:V.call(W,F,T_.cloneDeep(C[F])),delete C[F]):R(C[F]);var ie=void 0;(ie=Reflect.ownKeys(te)).length>0&&ie.forEach(function(re){Reflect.set(C,re,te[re])})}})};function R(C){o.set(C["-id"],C),Array.isArray(C)?C.forEach(function(F){R(F)}):typeof C=="object"&&k(C)}R(M[T])},function(T){if(T.indexOf("bpmn:")===0){var k=M[T];if(T==="bpmn:sequenceFlow"){var R=E["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];l=KE(k,R)}else{var C=E["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];if(T==="bpmn:boundaryEvent"){var F=M[T],W=function(V){var te=V["-attachedToRef"],ie=o.get(te);ie["-boundaryEvents"]||(ie["-boundaryEvents"]=[]),ie["-boundaryEvents"].push(V["-id"])};Array.isArray(F)?F.forEach(function(V){W(V)}):W(F)}c=c.concat(VE(k,C,T))}}}])}var A=function(T,k,R){Object.keys(T).forEach(function(C){var F=R?R+"."+C:C;k.has(F)?delete T[C]:typeof T[C]=="object"&&A(T[C],k,F)})};return c.forEach(function(T){var k,R;if(!((k=y==null?void 0:y.mapping)===null||k===void 0)&&k.in){var C=(R=y==null?void 0:y.mapping)===null||R===void 0?void 0:R.in,F=T.type;C[F]&&(T.type=C[F])}A(T,g.in,"")}),l.forEach(function(T){var k,R;if(!((k=y==null?void 0:y.mapping)===null||k===void 0)&&k.in){var C=(R=y==null?void 0:y.mapping)===null||R===void 0?void 0:R.in,F=T.type;C[F]&&(T.type=C[F])}A(T,g.in,"")}),{nodes:c,edges:l}}function VE(m,y,c){var l=[];if(Array.isArray(m))m.forEach(function(d){var O;Array.isArray(y)?O=y.find(function(E){return E["-bpmnElement"]===d["-id"]}):O=y;var g=P_(O,c,d);l.push(g)});else{var o=void 0;Array.isArray(y)?o=y.find(function(d){return d["-bpmnElement"]===m["-id"]}):o=y;var p=P_(o,c,m);l.push(p)}return l}function P_(m,y,c){var l=Number(m["dc:Bounds"]["-x"]),o=Number(m["dc:Bounds"]["-y"]),p=c["-children"],d=c["-name"],O=oo.shapeConfigMap.get(y);O&&(l+=O.width/2,o+=O.height/2);var g={};Object.entries(c).forEach(function(T){var k=_c(T,2),R=k[0],C=k[1];rO.includes(R)||(g[R]=C)}),g=Id(g);var E;if(d&&(E={x:l,y:o,value:d},m["bpmndi:BPMNLabel"]&&m["bpmndi:BPMNLabel"]["dc:Bounds"])){var M=m["bpmndi:BPMNLabel"]["dc:Bounds"];E.x=Number(M["-x"])+Number(M["-width"])/2,E.y=Number(M["-y"])+Number(M["-height"])/2}var A={id:m["-bpmnElement"],type:y,x:l,y:o,properties:g};return p&&(A.children=p),E&&(A.text=E),A}function KE(m,y){var c=[];if(Array.isArray(m))m.forEach(function(o){var p;Array.isArray(y)?p=y.find(function(d){return d["-bpmnElement"]===o["-id"]}):p=y,c.push(A_(p,o))});else{var l=void 0;Array.isArray(y)?l=y.find(function(o){return o["-bpmnElement"]===m["-id"]}):l=y,c.push(A_(l,m))}return c}function A_(m,y){var c,l=y["-name"];if(l){var o=m["bpmndi:BPMNLabel"]["dc:Bounds"],p=0;l.split(`
  110. `).forEach(function(E){p<E.length&&(p=E.length)}),c={value:l,x:Number(o["-x"])+p*10/2,y:Number(o["-y"])+7}}var d={};Object.entries(y).forEach(function(E){var M=_c(E,2),A=M[0],T=M[1];rO.includes(A)||(d[A]=T)}),d=Id(d);var O=m["di:waypoint"].map(function(E){return{x:Number(E["-x"]),y:Number(E["-y"])}}),g={id:y["-id"],type:Wr.FLOW,pointsList:O,sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:d};return c&&(g.text=c),g}var oo=function(){function m(y){var c=this,l=y.lf;this.adapterOut=function(o,p){var d,O,g=ov({},c.processAttributes);XE(g,o,p);var E={"-id":"BPMNPlane_1","-bpmnElement":g["-id"]};HE(E,o);var M=c.definitionAttributes;M["bpmn:process"]=g,M["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":E};var A={"bpmn:definitions":M};if(!((d=p==null?void 0:p.mapping)===null||d===void 0)&&d.out){var T=(O=p==null?void 0:p.mapping)===null||O===void 0?void 0:O.out,k=function(R){Array.isArray(R)&&R.forEach(function(C){return k(C)}),typeof R=="object"&&Object.keys(R).forEach(function(C){var F;(F=T[C])?(R[F]=T_.cloneDeep(R[C]),delete R[C],k(R[F])):k(R[C])})};k(A)}return A},this.adapterIn=function(o,p){if(o)return WE(o,p)},l.adapterIn=this.adapterIn,l.adapterOut=this.adapterOut,this.processAttributes={"-isExecutable":"true","-id":"Process"},this.definitionAttributes={"-id":"Definitions","-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.10"}}return m.prototype.setCustomShape=function(y,c){m.shapeConfigMap.set(y,c)},m.pluginName="bpmn-adapter",m.shapeConfigMap=new Map,m}();oo.shapeConfigMap.set(Wr.START,{width:y_.width,height:y_.height});oo.shapeConfigMap.set(Wr.END,{width:g_.width,height:g_.height});oo.shapeConfigMap.set(Wr.INTERMEDIATE_CATCH,{width:Nd.width,height:Nd.height});oo.shapeConfigMap.set(Wr.INTERMEDIATE_THROW,{width:Nd.width,height:Nd.height});oo.shapeConfigMap.set(Wr.BOUNDARY,{width:v_.width,height:v_.height});oo.shapeConfigMap.set(Wr.PARALLEL_GATEWAY,{width:m_.width,height:m_.height});oo.shapeConfigMap.set(Wr.INCLUSIVE_GATEWAY,{width:b_.width,height:b_.height});oo.shapeConfigMap.set(Wr.EXCLUSIVE_GATEWAY,{width:__.width,height:__.height});oo.shapeConfigMap.set(Wr.SYSTEM,{width:O_.width,height:O_.height});oo.shapeConfigMap.set(Wr.USER,{width:w_.width,height:w_.height});oo.shapeConfigMap.set(Wr.SUBPROCESS,{width:x_.width,height:x_.height});(function(m){FE(y,m);function y(c){var l=m.call(this,c)||this;l.adapterXmlIn=function(d){var O=LE(d);return l.adapterIn(O,l.props)},l.adapterXmlOut=function(d){var O=l.adapterOut(d,l.props);return BE(O)};var o=c.lf,p=c.props;return o.adapterIn=l.adapterXmlIn,o.adapterOut=l.adapterXmlOut,l.props=p,l}return y.pluginName="BPMNAdapter",y})(oo);var $E=function(){function m(y){var c=this,l=y.lf;this.lf=l,this.customCssRules="",this.useGlobalRules=!0,l.getSnapshot=function(o,p){c.getSnapshot(o,p)},l.getSnapshotBlob=function(o){return c.getSnapshotBlob(o)},l.getSnapshotBase64=function(o){return c.getSnapshotBase64(o)}}return m.prototype.getSvgRootElement=function(y){var c=y.container.querySelector(".lf-canvas-overlay");return c},m.prototype.triggerDownload=function(y){var c=new MouseEvent("click",{view:document.defaultView,bubbles:!1,cancelable:!0}),l=document.createElement("a");l.setAttribute("download",this.fileName),l.setAttribute("href",y),l.setAttribute("target","_blank"),l.dispatchEvent(c)},m.prototype.removeAnchor=function(y){for(var c=y.childNodes,l=y.childNodes&&y.childNodes.length,o=0;o<l;o++){var p=c[o],d=p.classList&&Array.from(p.classList)||[];d.indexOf("lf-anchor")>-1&&(y.removeChild(y.childNodes[o]),l--,o--)}},m.prototype.removeRotateControl=function(y){for(var c=y.childNodes,l=y.childNodes&&y.childNodes.length,o=0;o<l;o++){var p=c[o],d=p.classList&&Array.from(p.classList)||[];d.indexOf("lf-rotate-control")>-1&&(y.removeChild(y.childNodes[o]),l--,o--)}},m.prototype.getSnapshot=function(y,c){var l=this;this.fileName=y||"logic-flow."+Date.now()+".png";var o=this.getSvgRootElement(this.lf);this.getCanvasData(o,c).then(function(p){var d=p.toDataURL("image/png").replace("image/png","image/octet-stream");l.triggerDownload(d)})},m.prototype.getSnapshotBase64=function(y){var c=this,l=this.getSvgRootElement(this.lf);return new Promise(function(o){c.getCanvasData(l,y).then(function(p){var d=p.toDataURL("image/png");o({data:d,width:p.width,height:p.height})})})},m.prototype.getSnapshotBlob=function(y){var c=this,l=this.getSvgRootElement(this.lf);return new Promise(function(o){c.getCanvasData(l,y).then(function(p){p.toBlob(function(d){o({data:d,width:p.width,height:p.height})},"image/png")})})},m.prototype.getClassRules=function(){var y="";if(this.useGlobalRules)for(var c=document.styleSheets,l=0;l<c.length;l++)for(var o=c[l],p=0;p<o.cssRules.length;p++)y+=o.cssRules[p].cssText;return this.customCssRules&&(y+=this.customCssRules),y},m.prototype.getCanvasData=function(y,c){var l=this,o=y.cloneNode(!0),p=o.lastChild,d=p.childNodes&&p.childNodes.length;if(d)for(var O=0;O<d;O++){var g=p.childNodes[O],E=g.classList&&Array.from(g.classList);if(E&&E.indexOf("lf-base")<0)p.removeChild(p.childNodes[O]),d--,O--;else{var M=p.childNodes[O];M&&M.childNodes.forEach(function(xe){var me=xe;l.removeAnchor(me.firstChild),l.removeRotateControl(me.firstChild)})}}var A=window.devicePixelRatio||1;A<1&&(A=1);var T=document.createElement("canvas"),k=this.lf.graphModel.rootEl.querySelector(".lf-base"),R=k.getBoundingClientRect(),C=this.lf.container.querySelector(".lf-canvas-overlay").getBoundingClientRect(),F=R.x-C.x,W=R.y-C.y,V=this.lf.graphModel,te=V.transformModel,ie=te.SCALE_X,re=te.SCALE_Y,J=te.TRANSLATE_X,Z=te.TRANSLATE_Y;o.lastChild.style.transform="matrix(1, 0, 0, 1, "+((-F+J)*(1/ie)+10)+", "+((-W+Z)*(1/re)+10)+")";var Y=Math.ceil(R.width/ie),z=Math.ceil(R.height/re);T.style.width=Y+"px",T.style.height=z+"px",T.width=Y*A+80,T.height=z*A+80;var G=T.getContext("2d");G.clearRect(0,0,T.width,T.height),G.scale(A,A),c?(G.fillStyle=c,G.fillRect(0,0,Y*A+80,z*A+80)):G.clearRect(0,0,Y,z);var X=new Image,$=document.createElement("style");$.innerHTML=this.getClassRules();var ue=document.createElement("foreignObject");return ue.appendChild($),o.appendChild(ue),new Promise(function(xe){X.onload=function(){var Be=navigator.userAgent.indexOf("Firefox")>-1;try{Be?createImageBitmap(X,{resizeWidth:T.width,resizeHeight:T.height}).then(function(Se){G.drawImage(Se,0,0),xe(T)}):(G.drawImage(X,0,0),xe(T))}catch(Se){G.drawImage(X,0,0),xe(T)}};var me="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(o),Pe=me.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");X.src=Pe})},m.pluginName="snapshot",m}();var M_;(function(m){m.HORIZONTAL="horizontal",m.VERTICAL="vertical"})(M_||(M_={}));var qE=function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var l=c.call(m),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=l.return)&&c.call(l)}finally{if(d)throw d.error}}return p},ZE=function(){for(var m=[],y=0;y<arguments.length;y++)m=m.concat(qE(arguments[y]));return m},el="lf:defaultNodeMenu",tl="lf:defaultEdgeMenu",nl="lf:defaultGraphMenu",k_="lf:defaultSelectionMenu",JE=function(){function m(y){var c=this,l=y.lf;this.lf=l;var o=l.options.isSilentMode;o||(this.__menuDOM=document.createElement("ul"),this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(p){c.setMenuConfig(p)},this.lf.addMenuConfig=function(p){c.addMenuConfig(p)},this.lf.setMenuByType=function(p){c.setMenuByType(p)})}return m.prototype.init=function(){var y=this,c=[{text:"删除",callback:function(p){y.lf.deleteNode(p.id)}},{text:"编辑文本",callback:function(p){y.lf.graphModel.editText(p.id)}},{text:"复制",callback:function(p){y.lf.cloneNode(p.id)}}];this.menuTypeMap.set(el,c);var l=[{text:"删除",callback:function(p){y.lf.deleteEdge(p.id)}},{text:"编辑文本",callback:function(p){y.lf.graphModel.editText(p.id)}}];this.menuTypeMap.set(tl,l),this.menuTypeMap.set(nl,[]);var o=[{text:"删除",callback:function(p){y.lf.clearSelectElements(),p.edges.forEach(function(d){return y.lf.deleteEdge(d.id)}),p.nodes.forEach(function(d){return y.lf.deleteNode(d.id)})}}];this.menuTypeMap.set(k_,o)},m.prototype.render=function(y,c){var l=this;y.options.isSilentMode||(this.__container=c,this.__currentData=null,this.__menuDOM.className="lf-menu",c.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(o){o.stopPropagation();for(var p=o.target;Array.from(p.classList).indexOf("lf-menu-item")===-1&&Array.from(p.classList).indexOf("lf-menu")===-1;)p=p.parentElement;Array.from(p.classList).indexOf("lf-menu-item")>-1&&(p.onclickCallback(l.__currentData),l.__menuDOM.style.display="none",l.__currentData=null)},!0),this.lf.on("node:contextmenu",function(o){var p=o.data,d=o.position,O=o.e,g=d.domOverlayPosition,E=g.x,M=g.y,A=p.id,T=l.lf.graphModel.getNodeModelById(A),k=[],R=l.menuTypeMap.get(T.type);T&&T.menu&&Array.isArray(T.menu)?k=T.menu:R?k=R:k=l.menuTypeMap.get(el),l.__currentData=p,l.showMenu(E,M,k,{width:T.width,height:T.height,clientX:O.clientX,clientY:O.clientY})}),this.lf.on("edge:contextmenu",function(o){var p=o.data,d=o.position,O=o.e,g=d.domOverlayPosition,E=g.x,M=g.y,A=p.id,T=l.lf.graphModel.getEdgeModelById(A),k=[],R=l.menuTypeMap.get(T.type);T&&T.menu&&Array.isArray(T.menu)?k=T.menu:R?k=R:k=l.menuTypeMap.get(tl),l.__currentData=p,l.showMenu(E,M,k,{width:T.width,height:T.height,clientX:O.clientX,clientY:O.clientY})}),this.lf.on("blank:contextmenu",function(o){var p=o.position,d=l.menuTypeMap.get(nl),O=p.domOverlayPosition,g=O.x,E=O.y;l.showMenu(g,E,d)}),this.lf.on("selection:contextmenu",function(o){var p=o.data,d=o.position,O=l.menuTypeMap.get(k_),g=d.domOverlayPosition,E=g.x,M=g.y;l.__currentData=p,l.showMenu(E,M,O)}),this.lf.on("node:mousedown",function(){l.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){l.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){l.__menuDOM.style.display="none"}))},m.prototype.destroy=function(){var y;(y=this===null||this===void 0?void 0:this.__container)===null||y===void 0||y.removeChild(this.__menuDOM),this.__menuDOM=null},m.prototype.showMenu=function(y,c,l,o){if(!(!l||!l.length)){var p=this.__menuDOM;if(p.innerHTML="",p.append.apply(p,ZE(this.__getMenuDom(l))),!!p.children.length){if(p.style.display="block",!o){p.style.top=c+"px",p.style.left=y+"px";return}var d=o.width,O=o.height,g=o.clientX,E=o.clientY,M=this.lf.graphModel,A=p.offsetWidth,T=!0,k=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,R=k-g,C=M.rootEl.getBoundingClientRect(),F=C.left+C.width;F<k&&(R=F-g),R<A&&(T=!1),T?p.style.left=y+"px":p.style.left=y-d+"px";var W=p.offsetHeight,V=!0,te=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,ie=te-E,re=C.top+C.height;re<te&&(ie=re-E),ie<W&&(V=!1),V?p.style.top=c+"px":p.style.top=c-O+"px"}}},m.prototype.setMenuByType=function(y){!y.type||!y.menu||this.menuTypeMap.set(y.type,y.menu)},m.prototype.__getMenuDom=function(y){var c=[];return y&&y.length>0&&y.forEach(function(l){var o=document.createElement("li");if(l.className?o.className="lf-menu-item "+l.className:o.className="lf-menu-item",l.icon===!0){var p=document.createElement("span");p.className="lf-menu-item-icon",o.appendChild(p)}var d=document.createElement("span");d.className="lf-menu-item-text",l.text&&(d.innerText=l.text),o.appendChild(d),o.onclickCallback=l.callback,c.push(o)}),c},m.prototype.setMenuConfig=function(y){y&&(y.nodeMenu!==void 0&&this.menuTypeMap.set(el,y.nodeMenu?y.nodeMenu:[]),y.edgeMenu!==void 0&&this.menuTypeMap.set(tl,y.edgeMenu?y.edgeMenu:[]),y.graphMenu!==void 0&&this.menuTypeMap.set(nl,y.graphMenu?y.graphMenu:[]))},m.prototype.addMenuConfig=function(y){if(y){if(Array.isArray(y.nodeMenu)){var c=this.menuTypeMap.get(el);this.menuTypeMap.set(el,c.concat(y.nodeMenu))}if(Array.isArray(y.edgeMenu)){var c=this.menuTypeMap.get(tl);this.menuTypeMap.set(tl,c.concat(y.edgeMenu))}if(Array.isArray(y.graphMenu)){var c=this.menuTypeMap.get(nl);this.menuTypeMap.set(nl,c.concat(y.graphMenu))}}},m.prototype.changeMenuItem=function(y,c){if(y==="add")this.addMenuConfig(c);else if(y==="reset")this.setMenuConfig(c);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},m.pluginName="menu",m}(),QE=function(){function m(y){var c=this,l=y.lf;this.lf=l,this.lf.setPatternItems=function(o){c.setPatternItems(o)}}return m.prototype.render=function(y,c){var l=this;if(this.destroy(),!this.shapeList||this.shapeList.length===0){this.domContainer=c;return}this.panelEl=document.createElement("div"),this.panelEl.className="lf-dndpanel",this.shapeList.forEach(function(o){l.panelEl.appendChild(l.createDndItem(o))}),c.appendChild(this.panelEl),this.domContainer=c},m.prototype.destroy=function(){this.domContainer&&this.panelEl&&this.domContainer.contains(this.panelEl)&&this.domContainer.removeChild(this.panelEl)},m.prototype.setPatternItems=function(y){this.shapeList=y,this.domContainer&&this.render(this.lf,this.domContainer)},m.prototype.createDndItem=function(y){var c=this,l=document.createElement("div");l.className=y.className?"lf-dnd-item "+y.className:"lf-dnd-item";var o=document.createElement("div");if(o.className="lf-dnd-shape",y.icon&&(o.style.backgroundImage="url("+y.icon+")"),l.appendChild(o),y.label){var p=document.createElement("div");p.innerText=y.label,p.className="lf-dnd-text",l.appendChild(p)}return y.disabled?(l.classList.add("disabled"),l.onmousedown=function(){y.callback&&y.callback(c.lf,c.domContainer)},l):(l.onmousedown=function(){y.type&&c.lf.dnd.startDrag({type:y.type,properties:y.properties,text:y.text}),y.callback&&y.callback(c.lf,c.domContainer)},l.ondblclick=function(d){c.lf.graphModel.eventCenter.emit("dnd:panel-dbclick",{e:d,data:y})},l.onclick=function(d){c.lf.graphModel.eventCenter.emit("dnd:panel-click",{e:d,data:y})},l.oncontextmenu=function(d){c.lf.graphModel.eventCenter.emit("dnd:panel-contextmenu",{e:d,data:y})},l)},m.pluginName="dndPanel",m}(),eS=function(){function m(y){var c=this,l=y.lf;this.__disabled=!1,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.__draw=function(p){var d=c.lf.getPointByClient(p.clientX,p.clientY).domOverlayPosition,O=d.x,g=d.y;c.endPoint={x:O,y:g};var E=c.startPoint,M=E.x,A=E.y,T=c.wrapper.style,k=M,R=A,C=O-M,F=g-A;O<M&&(k=O,C=M-O),g<A&&(R=g,F=A-g),T.left=k+"px",T.top=R+"px",T.width=C+"px",T.height=F+"px"},this.__drawOff=function(){document.removeEventListener("mousemove",c.__draw),document.removeEventListener("mouseup",c.__drawOff),c.wrapper.oncontextmenu=null,c.__domContainer.removeChild(c.wrapper);var p=c.startPoint,d=p.x,O=p.y,g=c.endPoint,E=g.x,M=g.y;if(!(Math.abs(E-d)<10&&Math.abs(M-O)<10)){var A=[Math.min(d,E),Math.min(O,M)],T=[Math.max(d,E),Math.max(O,M)],k=c.lf.graphModel.getAreaElement(A,T,c.isWholeEdge,c.isWholeNode,!0),R=c.lf.graphModel.group;k.forEach(function(C){(!R||!R.getNodeGroup(C.id))&&c.lf.selectElementById(C.id,!0)}),c.lf.emit("selection:selected",k)}},this.lf=l;var o=l.getEditConfig().stopMoveGraph;this.isDefaultStopMoveGraph=o,l.openSelectionSelect=function(){c.openSelectionSelect()},l.closeSelectionSelect=function(){c.closeSelectionSelect()}}return m.prototype.render=function(y,c){var l=this;this.__domContainer=c,y.on("blank:mousedown",function(o){var p=o.e,d=y.getEditConfig();if(!(!d.stopMoveGraph||l.__disabled)){var O=p.button===2;if(!O){var g=y.getPointByClient(p.clientX,p.clientY).domOverlayPosition,E=g.x,M=g.y;l.startPoint={x:E,y:M},l.endPoint={x:E,y:M};var A=document.createElement("div");A.className="lf-selection-select",A.oncontextmenu=function(k){k.preventDefault()},A.style.top=l.startPoint.y+"px",A.style.left=l.startPoint.x+"px",c.appendChild(A),l.wrapper=A,document.addEventListener("mousemove",l.__draw),document.addEventListener("mouseup",l.__drawOff)}}})},m.prototype.setSelectionSense=function(y,c){y===void 0&&(y=!0),c===void 0&&(c=!0),this.isWholeEdge=y,this.isWholeNode=c},m.prototype.openSelectionSelect=function(){var y=this.lf.getEditConfig().stopMoveGraph;y||(this.isDefaultStopMoveGraph=!1,this.lf.updateEditConfig({stopMoveGraph:!0})),this.open()},m.prototype.closeSelectionSelect=function(){this.isDefaultStopMoveGraph||this.lf.updateEditConfig({stopMoveGraph:!1}),this.close()},m.prototype.open=function(){this.__disabled=!1},m.prototype.close=function(){this.__disabled=!0},m.pluginName="selectionSelect",m}(),iO=function(){var m=function(y,c){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var p in o)o.hasOwnProperty(p)&&(l[p]=o[p])},m(y,c)};return function(y,c){m(y,c);function l(){this.constructor=y}y.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}}(),yc=function(){return yc=Object.assign||function(m){for(var y,c=1,l=arguments.length;c<l;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(m[o]=y[o])}return m},yc.apply(this,arguments)},sl=function(m,y){var c=typeof Symbol=="function"&&m[Symbol.iterator];if(!c)return m;var l=c.call(m),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=l.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=l.return)&&c.call(l)}finally{if(d)throw d.error}}return p},tS={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function nS(m){for(var y=m,c=1;c<y.length-1;){var l=sl(y[c-1],2),o=l[0],p=l[1],d=sl(y[c],2),O=d[0],g=d[1],E=sl(y[c+1],2),M=E[0],A=E[1];o===O&&O===M||p===g&&g===A?y.splice(c,1):c++}return y}function rS(m,y,c,l){var o=[m[0],m[1]],p=[m[0],m[1]];switch(c){case"tl":return y==="tr"?(o[1]+=l,p[0]+=l):y==="lb"&&(o[0]+=l,p[1]+=l),[o,p];case"tr":return y==="tl"?(o[1]+=l,p[0]-=l):y==="rb"&&(o[0]-=l,p[1]+=l),[o,p];case"bl":return y==="br"?(o[1]-=l,p[0]+=l):y==="lt"&&(o[0]+=l,p[1]-=l),[o,p];case"br":return y==="bl"?(o[1]-=l,p[0]-=l):y==="rt"&&(o[0]-=l,p[1]-=l),[o,p];default:return[]}}function oS(m,y,c,l){var o,p="",d="";m[0]===y[0]?p=m[1]>y[1]?"t":"b":m[1]===y[1]&&(p=m[0]>y[0]?"l":"r"),y[0]===c[0]?d=y[1]>c[1]?"t":"b":y[1]===c[1]&&(d=y[0]>c[0]?"l":"r");var O=Math.min(Math.hypot(y[0]-m[0],y[1]-m[1])/2,Math.hypot(c[0]-y[0],c[1]-y[1])/2,l)||1/5*l,g=""+p+d,E=tS[g]||"-",M="L "+m[0]+" "+m[1];if(E==="-")M+="L "+y[0]+" "+y[1]+" L "+c[0]+" "+c[1];else{var A=sl(rS(y,g,E,O),2),T=A[0],k=A[1];T&&k&&(M+="L "+T[0]+" "+T[1]+" Q "+y[0]+" "+y[1]+" "+k[0]+" "+k[1],o=sl(k,2),y[0]=o[0],y[1]=o[1])}return M}function iS(m,y){var c=0,l="";if(m.length===2)l+="M"+m[c][0]+" "+m[c++][1]+" L "+m[c][0]+" "+m[c][1];else{for(l+="M"+m[c][0]+" "+m[c++][1];c+1<m.length;){var o=m[c-1],p=m[c],d=m[c+++1];l+=oS(o,p,d,y)}l+="L "+m[c][0]+" "+m[c][1]}return l}(function(m){iO(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y.prototype.getEdge=function(){var c=this.props.model,l=c.points,o=c.isAnimation,p=c.arrowConfig,d=c.radius,O=d===void 0?5:d,g=c.getEdgeStyle(),E=c.getEdgeAnimationStyle(),M=nS(l.split(" ").map(function(k){return k.split(",").map(function(R){return+R})})),A=iS(M,O),T=yc(yc(yc({style:o?E:{}},g),p),{fill:"none"});return ot.h("path",yc({d:A},T))},y})(ot.PolylineEdge);(function(m){iO(y,m);function y(){return m!==null&&m.apply(this,arguments)||this}return y})(ot.PolylineEdgeModel);const uS={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function aS(m){const{incoming:y,outgoing:c,properties:l,key:o}=m,{text:p,startPoint:d,endPoint:O,pointsList:g,logicFlowType:E}=l,M={id:o,type:E,sourceNodeId:y[0],targetNodeId:c[0],text:p,startPoint:d,endPoint:O,pointsList:g,properties:{}},A=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(m.properties).forEach(T=>{A.indexOf(T)===-1&&(M.properties[T]=m.properties[T])}),M}function sS(m){const{properties:y,key:c}=m,{x:l,y:o,text:p,logicFlowType:d}=y,O={id:c,type:d,x:l,y:o,text:p,properties:{}},g=["x","y","text","logicFlowType"];return Object.keys(m.properties).forEach(E=>{g.indexOf(E)===-1&&(O.properties[E]=m.properties[E])}),O}function cS(m){const y={nodes:[],edges:[]},c=m.flowElementList;return c&&c.length>0&&c.forEach(l=>{if(l.type===uS.SEQUENCE_FLOW){const o=aS(l);y.edges.push(o)}else{const o=sS(l);y.nodes.push(o)}}),y}function fS(m){return[{text:"选区",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAOVJREFUOBGtVMENwzAIjKP++2026ETdpv10iy7WFbqFyyW6GBywLCv5gI+Dw2Bluj1znuSjhb99Gkn6QILDY2imo60p8nsnc9bEo3+QJ+AKHfMdZHnl78wyTnyHZD53Zzx73MRSgYvnqgCUHj6gwdck7Zsp1VOrz0Uz8NbKunzAW+Gu4fYW28bUYutYlzSa7B84Fh7d1kjLwhcSdYAYrdkMQVpsBr5XgDGuXwQfQr0y9zwLda+DUYXLaGKdd2ZTtvbolaO87pdo24hP7ov16N0zArH1ur3iwJpXxm+v7oAJNR4JEP8DoAuSFEkYH7cAAAAASUVORK5CYII=",callback:()=>{m.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 lS=iv({name:"FlowChart",__name:"FlowChart",props:{flowOptions:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})},toolbar:{type:Boolean,default:!0},patternItems:{type:Array}},setup(m){const y=m,c=_d(null),l=_d({}),o=_d(null),{prefixCls:p}=l1("flow-chart"),d=p1(),[O,{openModal:g}]=A1();D1({logicFlow:o});const E=w1(()=>{const{flowOptions:k}=y;return Wg({grid:!0,background:{color:d.getDarkMode==="light"?"#f7f9ff":"#151515"},keyboard:{enabled:!0}},k)});Zb(()=>y.data,()=>{A()}),Zb(()=>Dn(E),k=>{var R;(R=Dn(o))==null||R.updateEditConfig(k)});function M(){return md(this,null,function*(){yield Vg();const k=Dn(c);if(!k)return;pc.use(QE),pc.use($E),pc.use(rE),pc.use(JE),pc.use(eS),o.value=new pc($b(Wg({},Dn(E)),{container:k}));const R=Dn(o);R==null||R.setDefaultEdgeType("line"),A(),R==null||R.setPatternItems(y.patternItems||fS(R))})}function A(){return md(this,null,function*(){yield Vg();const k=Dn(o);if(!k)return;const R=cS(y.data);k.render(R)})}function T(){const k=Dn(o);k&&(l.value=Dn(k).getGraphData(),g())}return x1(M),(k,R)=>(Gu(),rl("div",{class:Od(["h-full",Dn(p)])},[m.toolbar?(Gu(),uv(R1,{key:0,prefixCls:Dn(p),onViewData:T},null,8,["prefixCls"])):Kg("",!0),E1("div",{ref_key:"lfElRef",ref:c,class:"h-full"},null,512),cl(Dn(M1),{onRegister:Dn(O),title:"流程数据",width:"50%"},{default:Sd(()=>[cl(Dn(k1),{data:l.value},null,8,["data"])]),_:1},8,["onRegister"])],2))}}),pS=d1(lS),dS=[{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"}],hS={flowElementList:dS},SS=iv({__name:"index",setup(m){return(y,c)=>(Gu(),uv(Dn(T1),{title:"流程图",content:"简单流程图示例,具体功能需要自己完善",contentFullHeight:"",fixedHeight:""},{default:Sd(()=>[cl(Dn(pS),{data:Dn(hS)},null,8,["data"])]),_:1}))}});export{SS as default};